|
@@ -5,13 +5,13 @@
|
|
|
</view>
|
|
|
<view class="submit-warp">
|
|
|
<view class="form-text">
|
|
|
- 供应商
|
|
|
+ 面料
|
|
|
</view>
|
|
|
<view class="form-box">
|
|
|
<view>
|
|
|
<view class="" style="text-align: left;display: flex;justify-content: space-between;">
|
|
|
- <view class="" style="color:#999;width:90%" @click="openSelectQd('gongyingshang')">
|
|
|
- {{formData.supplierName || '请选择供应商 '}}
|
|
|
+ <view class="" style="color:#999;width:90%" @click="openSelectQd('mianliao')">
|
|
|
+ {{formData.materialName || '请选择面料 '}}
|
|
|
</view>
|
|
|
|
|
|
<uni-icons @click="openSelectQd(index)" type="forward" size="20"></uni-icons>
|
|
@@ -19,16 +19,15 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="submit-warp" style="margin-top:40rpx">
|
|
|
<view class="form-text">
|
|
|
- 面料
|
|
|
+ 供应商
|
|
|
</view>
|
|
|
<view class="form-box">
|
|
|
<view>
|
|
|
<view class="" style="text-align: left;display: flex;justify-content: space-between;">
|
|
|
- <view class="" style="color:#999;width:90%" @click="openSelectQd('mianliao')">
|
|
|
- {{formData.materialName || '请选择面料 '}}
|
|
|
+ <view class="" style="color:#999;width:90%" @click="openSelectQd('gongyingshang')">
|
|
|
+ {{formData.supplierName || '请选择供应商 '}}
|
|
|
</view>
|
|
|
|
|
|
<uni-icons @click="openSelectQd(index)" type="forward" size="20"></uni-icons>
|
|
@@ -71,6 +70,17 @@
|
|
|
<button @click="checkSubmit(2)" style="background:#EF0000;color:#fff;margin-bottom: 30rpx;">取消</button>
|
|
|
<button @click="checkSubmit(1)" style="background:#1A3AF0; color:#fff;margin-bottom: 30rpx;">提交</button>
|
|
|
</view>
|
|
|
+ <uni-popup ref="popup2" type="top">
|
|
|
+ <view class="search-box">
|
|
|
+ <uni-search-bar @confirm="selectList" v-model="req.search" @cancel="reload">
|
|
|
+ </uni-search-bar>
|
|
|
+ <ul>
|
|
|
+ <li @click="selectMaterialList(i)" v-for="i in range2" :key="i.id">
|
|
|
+ {{i.name}}
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
<uni-popup ref="popup" type="top">
|
|
|
<view class="search-box">
|
|
|
<uni-search-bar @confirm="selectList" v-model="req.search" @cancel="reload">
|
|
@@ -130,6 +140,7 @@
|
|
|
pageNum:1,
|
|
|
pageSize:10,
|
|
|
search:null,
|
|
|
+ materialCode:null,
|
|
|
},
|
|
|
selectModalType:'gongyingshang',
|
|
|
}
|
|
@@ -147,18 +158,33 @@
|
|
|
}else{
|
|
|
v.formData.materialId = i.id
|
|
|
v.formData.materialName = i.name
|
|
|
+ v.req.materialCode = i.id
|
|
|
|
|
|
}
|
|
|
console.log(i)
|
|
|
-
|
|
|
+ this.$refs.popup2.close()
|
|
|
this.$refs.popup.close()
|
|
|
},
|
|
|
openSelectQd(modalType){
|
|
|
const v = this
|
|
|
+ if(modalType == 'gongyingshang' && v.formData.materialId == null){
|
|
|
+ wx.showToast({
|
|
|
+ title: "请先选择面料!",
|
|
|
+ icon: "none",
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
v.selectModalType = modalType
|
|
|
v.req.search = null
|
|
|
v.selectList()
|
|
|
- this.$refs.popup.open('top')
|
|
|
+ if(modalType == 'gongyingshang'){
|
|
|
+ this.$refs.popup2.open('top')
|
|
|
+ }else{
|
|
|
+ this.$refs.popup.open('top')
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
bindPickerChange(e){
|
|
|
console.log(e)
|
|
@@ -171,7 +197,7 @@
|
|
|
if(v.selectModalType == 'gongyingshang'){
|
|
|
v.$post('/supplier/selectList',v.req).then(res=>{
|
|
|
console.log(res)
|
|
|
- this.range = res.data
|
|
|
+ this.range2 = res.data
|
|
|
|
|
|
})
|
|
|
}else{
|