|
@@ -105,11 +105,21 @@
|
|
|
<text style="color: #3385FF">¥{{ form.sendCost }}</text>
|
|
<text style="color: #3385FF">¥{{ form.sendCost }}</text>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
|
|
|
- <view class="tui-title ">配送物流</view>
|
|
|
|
|
- <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
|
|
|
|
|
- </tui-list-cell>
|
|
|
|
|
-
|
|
|
|
|
|
|
+<block v-if="$util.isEmpty(wlList)">
|
|
|
|
|
+<tui-list-cell class="line-cell" :hover="false" v-if="form.sendType == 3">
|
|
|
|
|
+ <view class="tui-title">配送物流</view>
|
|
|
|
|
+ <input type="text" placeholder="请填写物流" v-model="form.wlName" @focus="form.wlName=''" placeholder-class="tui-placeholder"/>
|
|
|
|
|
+</tui-list-cell>
|
|
|
|
|
+</block>
|
|
|
|
|
+<block v-else>
|
|
|
|
|
+<tui-list-cell class="line-cell" :arrow="true" v-if="form.sendType == 3">
|
|
|
|
|
+ <div class="tui-title">配送物流</div>
|
|
|
|
|
+ <picker mode="selector" :value="form.wlId" :range="wlList" range-key="name" @change="changeWlFn" class="tui-input" >
|
|
|
|
|
+ <div v-if="form.wlId">{{ wlSelData.name }}</div>
|
|
|
|
|
+ <div class="tui-placeholder" v-else>请选择</div>
|
|
|
|
|
+ </picker>
|
|
|
|
|
+</tui-list-cell>
|
|
|
|
|
+</block>
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="(form.sendType == 2 || form.sendType == 0)&& Number(form.packCost)>0">
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="(form.sendType == 2 || form.sendType == 0)&& Number(form.packCost)>0">
|
|
|
<view class="tui-title">打包费</view>
|
|
<view class="tui-title">打包费</view>
|
|
|
<text style="color: #3385FF">¥{{ form.packCost }}</text>
|
|
<text style="color: #3385FF">¥{{ form.packCost }}</text>
|
|
@@ -161,7 +171,7 @@ import appFormSend from "@/components/app-form-send";
|
|
|
import appSendTime from "@/components/app-send-time";
|
|
import appSendTime from "@/components/app-send-time";
|
|
|
const formUtil = require("@/utils/formValidation.js");
|
|
const formUtil = require("@/utils/formValidation.js");
|
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
|
-import { getGhsDataApi } from "@/api/ghs";
|
|
|
|
|
|
|
+import { getGhsDataApi,getWlList } from "@/api/ghs";
|
|
|
import { freight,createOrder } from "@/api/purchase";
|
|
import { freight,createOrder } from "@/api/purchase";
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
import { shopHouponHas } from '@/api/coupon'
|
|
import { shopHouponHas } from '@/api/coupon'
|
|
@@ -212,7 +222,8 @@ export default {
|
|
|
product: "",
|
|
product: "",
|
|
|
hbId: '0',
|
|
hbId: '0',
|
|
|
packCost:0,
|
|
packCost:0,
|
|
|
- wlName:''
|
|
|
|
|
|
|
+ wlName:'',
|
|
|
|
|
+ wlId:0
|
|
|
},
|
|
},
|
|
|
showCustomer: false,
|
|
showCustomer: false,
|
|
|
today:'',
|
|
today:'',
|
|
@@ -231,7 +242,7 @@ export default {
|
|
|
showAddress:''
|
|
showAddress:''
|
|
|
},
|
|
},
|
|
|
wlList:[],
|
|
wlList:[],
|
|
|
- wlSelData: {}
|
|
|
|
|
|
|
+ wlSelData: {id:0,name:''}
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -270,6 +281,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
...mapActions(["initMerchantInfo"]),
|
|
|
|
|
+ changeWlFn(e) {
|
|
|
|
|
+ this.wlSelData = this.wlList[e.detail.value];
|
|
|
|
|
+ this.form.wlId = this.wlSelData.id
|
|
|
|
|
+ this.form.wlName = this.wlSelData.name
|
|
|
|
|
+ },
|
|
|
changeSendType(num){
|
|
changeSendType(num){
|
|
|
this.form.sendType = num
|
|
this.form.sendType = num
|
|
|
if(num == 2){
|
|
if(num == 2){
|
|
@@ -365,7 +381,7 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
init() {
|
|
init() {
|
|
|
-
|
|
|
|
|
|
|
+ let that = this
|
|
|
this.getDetailData()
|
|
this.getDetailData()
|
|
|
|
|
|
|
|
currentShop().then(res=>{
|
|
currentShop().then(res=>{
|
|
@@ -375,6 +391,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ getWlList({id:this.option.id}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.wlList = res.data.list ? res.data.list : []
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
calcFreight() {
|
|
calcFreight() {
|
|
|
let weight = 0
|
|
let weight = 0
|