|
@@ -18,10 +18,10 @@
|
|
<view class="switch" @click="switchBrand">切换</view>
|
|
<view class="switch" @click="switchBrand">切换</view>
|
|
</view> -->
|
|
</view> -->
|
|
<view >
|
|
<view >
|
|
- <picker @change="bindChange" class="picker-view" :range="oedata.epc_info" :range-key="'brand'">
|
|
|
|
|
|
+ <picker @change="bindChange" :value="pkvalue" class="picker-view" :range="epc_info" :range-key="'brand'">
|
|
<view class="brandBox">
|
|
<view class="brandBox">
|
|
- <span>共{{oedata.epc_info.length}}个品牌,已选品牌:{{oedata.brand}}</span>
|
|
|
|
- <view class="switch" @click="switchBrand" v-if="oedata.epc_info.length>1">切换</view>
|
|
|
|
|
|
+ <span>共{{oedata.epc_info.length}}个品牌,已选品牌:{{brandName}}</span>
|
|
|
|
+ <view class="switch" @click="switchBrand" >切换</view><!-- v-if="oedata.epc_info.length>1" -->
|
|
</view>
|
|
</view>
|
|
</picker>
|
|
</picker>
|
|
|
|
|
|
@@ -38,10 +38,15 @@
|
|
<view class="lineLeft">配件名称</view>
|
|
<view class="lineLeft">配件名称</view>
|
|
<view class="lineRight">{{oedata.caption}}</view>
|
|
<view class="lineRight">{{oedata.caption}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="line">
|
|
|
|
+ <view class="lineLeft">4S店价:</view>
|
|
|
|
+ <view class="lineRight">¥{{oedata.price}}</view>
|
|
|
|
+ </view>
|
|
<view class="line">
|
|
<view class="line">
|
|
<view class="lineLeft">备注</view>
|
|
<view class="lineLeft">备注</view>
|
|
<view class="lineRight">{{oedata.remark}}</view>
|
|
<view class="lineRight">{{oedata.remark}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -63,6 +68,9 @@
|
|
brand_id:'',
|
|
brand_id:'',
|
|
epc_id:'',
|
|
epc_id:'',
|
|
brandShow:false,
|
|
brandShow:false,
|
|
|
|
+ pkvalue:0,
|
|
|
|
+ brandName:'',
|
|
|
|
+ epc_info:'',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
@@ -77,9 +85,10 @@
|
|
},
|
|
},
|
|
bindChange(e){
|
|
bindChange(e){
|
|
console.log(e)
|
|
console.log(e)
|
|
|
|
+ this.brandName=this.epc_info[e.detail.value].brand
|
|
this.epc_id=this.oedata.epc_info[e.detail.value].epc_id;
|
|
this.epc_id=this.oedata.epc_info[e.detail.value].epc_id;
|
|
this.brand_id=this.oedata.epc_info[e.detail.value].brand_id;
|
|
this.brand_id=this.oedata.epc_info[e.detail.value].brand_id;
|
|
- this.find()
|
|
|
|
|
|
+ this.find2()
|
|
},
|
|
},
|
|
|
|
|
|
// 配件查询
|
|
// 配件查询
|
|
@@ -95,7 +104,8 @@
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
if (res.data.number == 200 || res.data.number == 5212) {
|
|
if (res.data.number == 200 || res.data.number == 5212) {
|
|
this.oedata=res.data.result
|
|
this.oedata=res.data.result
|
|
-
|
|
|
|
|
|
+ this.brandName=res.data.result.brand;
|
|
|
|
+ this.epc_info=res.data.result.epc_info;
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: res.data.message,
|
|
title: res.data.message,
|
|
@@ -106,6 +116,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ find2() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ title: '加载中'
|
|
|
|
+ });
|
|
|
|
+ this.$http('advancedEpc/parts/detail', {
|
|
|
|
+ partsnum: this.partsnum,
|
|
|
|
+ brand_id:this.brand_id,
|
|
|
|
+ epc_id:this.epc_id
|
|
|
|
+ }, 'GET').then(res => {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ if (res.data.number == 200 || res.data.number == 5212) {
|
|
|
|
+ this.oedata=res.data.result
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.message,
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 3000
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|