|
|
@@ -108,13 +108,9 @@
|
|
|
<input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder"/>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-show="form.sendType == 3">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-show="form.sendType == 3">
|
|
|
<div class="tui-title">配送物流</div>
|
|
|
- <picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
|
|
|
- <input v-model="form.wlId" name="wlId" type="text" hidden />
|
|
|
- <div v-if="Number(form.wlId)>0">{{ wlSelData.name }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择</div>
|
|
|
- </picker>
|
|
|
+ <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
@@ -280,7 +276,6 @@ export default {
|
|
|
hasPay:0,
|
|
|
getStaffName:'',
|
|
|
dealPrice:0,
|
|
|
- wlId:0,
|
|
|
wlName:''
|
|
|
},
|
|
|
showCustomer: false,
|
|
|
@@ -294,9 +289,7 @@ export default {
|
|
|
isScanEnv:false,
|
|
|
calc:'add',
|
|
|
diffPriceList:[],
|
|
|
- currentShop:{default:0},
|
|
|
- wlList: [],
|
|
|
- wlSelData: {},
|
|
|
+ currentShop:{default:0}
|
|
|
};
|
|
|
},
|
|
|
onLoad (option) {
|
|
|
@@ -322,24 +315,7 @@ export default {
|
|
|
getUserDet({ id: option.customId }).then(res => {
|
|
|
that.form.customName = res.data.name
|
|
|
that.customInfo = res.data
|
|
|
-
|
|
|
- that.form.wlId = that.customInfo.wlId||0
|
|
|
- getAllWl().then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.wlList = res.data.list
|
|
|
- let newData = that.wlList.filter(
|
|
|
- e => that.form.wlId == e.id
|
|
|
- )
|
|
|
- if(!that.$util.isEmpty(newData)){
|
|
|
- that.wlSelData = newData[0]
|
|
|
- that.form.wlName = that.wlSelData.name || ''
|
|
|
- }else{
|
|
|
- that.form.wlId = 0
|
|
|
- that.form.wlName = ''
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
+ that.form.wlName = res.data.wlName ? res.data.wlName : ''
|
|
|
that.$forceUpdate()
|
|
|
})
|
|
|
|
|
|
@@ -419,12 +395,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
- changeWlFn(e) {
|
|
|
- let that = this
|
|
|
- this.wlSelData = this.wlList[e.detail.value]||{}
|
|
|
- that.form.wlId = that.wlSelData.id||0
|
|
|
- that.form.wlName = that.wlSelData.name||''
|
|
|
- },
|
|
|
changeGet(){
|
|
|
this.calc = this.calc == 'add' ? 'sub' : 'add'
|
|
|
},
|
|
|
@@ -492,8 +462,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
if(this.form.sendType == 3){
|
|
|
- if(Number(this.form.wlId)<=0){
|
|
|
- this.$msg('请选择物流')
|
|
|
+ if(this.$util.isEmpty(this.form.wlName)){
|
|
|
+ this.$msg('请填写物流')
|
|
|
return false
|
|
|
}
|
|
|
}
|