|
|
@@ -64,13 +64,9 @@
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="true" v-if="form.sendType == 3">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
|
<view class="tui-title ">配送物流</view>
|
|
|
- <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 />
|
|
|
- <view v-if="Number(form.wlId)>0">{{ wlSelData.name }}</view>
|
|
|
- <view class="tui-placeholder" v-else>请选择</view>
|
|
|
- </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="true">
|
|
|
@@ -116,7 +112,7 @@ import appFormSend from "@/components/app-form-send";
|
|
|
import appSendTime from "@/components/app-send-time";
|
|
|
const formUtil = require("@/utils/formValidation.js");
|
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
|
-import { getGhsDataApi,getGhsWl } from "@/api/ghs/index";
|
|
|
+import { getGhsDataApi } from "@/api/ghs/index";
|
|
|
import { freight,createOrder } from "@/api/purchase/index";
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
import { shopHouponHas } from '@/api/coupon'
|
|
|
@@ -162,16 +158,13 @@ export default {
|
|
|
customId: "",
|
|
|
product: "",
|
|
|
hbId: '0',
|
|
|
- wlId:0,
|
|
|
wlName:''
|
|
|
},
|
|
|
showCustomer: false,
|
|
|
today:'',
|
|
|
monthLater:'',
|
|
|
hasHb:0,
|
|
|
- selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
|
|
|
- wlList:[],
|
|
|
- wlSelData: {}
|
|
|
+ selectedHb:{couponAmount:0,hbId:0,couponSelInx:0}
|
|
|
};
|
|
|
},
|
|
|
onLoad(e) {
|
|
|
@@ -200,12 +193,6 @@ export default {
|
|
|
init() {
|
|
|
this._getDet()
|
|
|
},
|
|
|
- changeWlFn(e) {
|
|
|
- let that = this
|
|
|
- this.wlSelData = this.wlList[e.detail.value]
|
|
|
- that.form.wlId = that.wlSelData.id
|
|
|
- that.form.wlName = that.wlSelData.name
|
|
|
- },
|
|
|
changeSendType(num){
|
|
|
this.form.sendType = num
|
|
|
},
|
|
|
@@ -234,27 +221,7 @@ export default {
|
|
|
let that = this
|
|
|
getGhsDataApi({id:id}).then(res => {
|
|
|
that.ghsInfo = res.data;
|
|
|
-
|
|
|
- that.form.wlId = this.ghsInfo.customWlId ? this.ghsInfo.customWlId : 0
|
|
|
- getGhsWl({id:id}).then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.wlList = res.data.list
|
|
|
- if(Number(that.form.wlId)>0){
|
|
|
- let newData = that.wlList.filter(
|
|
|
- e => that.form.wlId == e.id
|
|
|
- )
|
|
|
- if(!this.$util.isEmpty(newData)){
|
|
|
- that.wlSelData = newData[0]
|
|
|
- that.form.wlId = that.wlSelData.id
|
|
|
- that.form.wlName = that.wlSelData.name
|
|
|
- }else{
|
|
|
- that.form.wlId = 0
|
|
|
- that.form.wlName = ''
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
+ that.form.wlName = res.data.customWlName ? res.data.customWlName : ''
|
|
|
});
|
|
|
},
|
|
|
countAllPrices(e){
|
|
|
@@ -313,8 +280,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
|
|
|
}
|
|
|
}
|
|
|
@@ -340,7 +307,6 @@ export default {
|
|
|
ghsId:this.ghsInfo.id,
|
|
|
hbId: this.form.hbId,
|
|
|
xj:JSON.stringify(xj),
|
|
|
- wlId:this.form.wlId,
|
|
|
wlName:this.form.wlName,
|
|
|
//预订单
|
|
|
book:1
|