|
@@ -97,16 +97,26 @@
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">配送方式</view>
|
|
<view class="tui-title">配送方式</view>
|
|
|
- <button @tap="setSendType(0)" class="admin-button-com middle" :class="form.sendType == 0 ? 'blue' : 'default'">出车</button>
|
|
|
|
|
- <button @tap="setSendType(1)" class="admin-button-com middle" :class="form.sendType == 1 ? 'blue' : 'default'">自取</button>
|
|
|
|
|
- <button @click="setSendType(2)" class="admin-button-com middle" :class="form.sendType == 2 ? 'blue' : 'default'">发快递</button>
|
|
|
|
|
|
|
+ <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setSendType(0)" class="admin-button-com mini-btn" :class="form.sendType == 0 ? 'blue' : 'default'">出车</button>
|
|
|
|
|
+ <button style="margin-right:16upx;height:70upx;line-height:46upx;" @tap="setSendType(1)" class="admin-button-com mini-btn" :class="form.sendType == 1 ? 'blue' : 'default'">自取</button>
|
|
|
|
|
+ <button style="margin-right:16upx;height:70upx;line-height:46upx;" @click="setSendType(2)" class="admin-button-com mini-btn" :class="form.sendType == 2 ? 'blue' : 'default'">快递</button>
|
|
|
|
|
+ <button style="margin-right:0upx;height:70upx;line-height:46upx;" @click="setSendType(3)" class="admin-button-com mini-btn" :class="form.sendType == 3 ? 'blue' : 'default'">物流</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
- <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="form.sendType == 2" >
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="form.sendType == 2">
|
|
|
<view class="tui-title">运费</view>
|
|
<view class="tui-title">运费</view>
|
|
|
<input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder"/>
|
|
<input type="digit" placeholder="请填写运费" v-model="form.sendCost" placeholder-class="tui-placeholder"/>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" :arrow="true" 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>
|
|
|
|
|
+ </tui-list-cell>
|
|
|
|
|
+
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false">
|
|
|
<view class="tui-title">结账方式</view>
|
|
<view class="tui-title">结账方式</view>
|
|
|
<button @click="form.hasPay = 2" class="admin-button-com middle" :class="form.hasPay == 2 ? 'blue' : 'default'">欠款</button>
|
|
<button @click="form.hasPay = 2" class="admin-button-com middle" :class="form.hasPay == 2 ? 'blue' : 'default'">欠款</button>
|
|
@@ -225,6 +235,7 @@ import { getAllStaff } from "@/api/shop-admin"
|
|
|
import { mapActions, mapGetters } from "vuex";
|
|
import { mapActions, mapGetters } from "vuex";
|
|
|
import { getUserDet} from "@/api/member"
|
|
import { getUserDet} from "@/api/member"
|
|
|
import ModalModule from "@/components/plugin/modal"
|
|
import ModalModule from "@/components/plugin/modal"
|
|
|
|
|
+import { getAllWl } from "@/api/shop"
|
|
|
export default {
|
|
export default {
|
|
|
name: "BillingAffirm",
|
|
name: "BillingAffirm",
|
|
|
components: {
|
|
components: {
|
|
@@ -268,7 +279,9 @@ export default {
|
|
|
needPrint:1,//订单生成时打印订单1需要2不需要
|
|
needPrint:1,//订单生成时打印订单1需要2不需要
|
|
|
hasPay:0,
|
|
hasPay:0,
|
|
|
getStaffName:'',
|
|
getStaffName:'',
|
|
|
- dealPrice:0
|
|
|
|
|
|
|
+ dealPrice:0,
|
|
|
|
|
+ wlId:0,
|
|
|
|
|
+ wlName:''
|
|
|
},
|
|
},
|
|
|
showCustomer: false,
|
|
showCustomer: false,
|
|
|
customInfo:{discount:1},
|
|
customInfo:{discount:1},
|
|
@@ -281,7 +294,9 @@ export default {
|
|
|
isScanEnv:false,
|
|
isScanEnv:false,
|
|
|
calc:'add',
|
|
calc:'add',
|
|
|
diffPriceList:[],
|
|
diffPriceList:[],
|
|
|
- currentShop:{default:0}
|
|
|
|
|
|
|
+ currentShop:{default:0},
|
|
|
|
|
+ wlList: [],
|
|
|
|
|
+ wlSelData: {},
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad (option) {
|
|
onLoad (option) {
|
|
@@ -307,6 +322,24 @@ export default {
|
|
|
getUserDet({ id: option.customId }).then(res => {
|
|
getUserDet({ id: option.customId }).then(res => {
|
|
|
that.form.customName = res.data.name
|
|
that.form.customName = res.data.name
|
|
|
that.customInfo = res.data
|
|
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.$forceUpdate()
|
|
that.$forceUpdate()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -386,6 +419,12 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
...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(){
|
|
changeGet(){
|
|
|
this.calc = this.calc == 'add' ? 'sub' : 'add'
|
|
this.calc = this.calc == 'add' ? 'sub' : 'add'
|
|
|
},
|
|
},
|
|
@@ -451,6 +490,14 @@ export default {
|
|
|
}else{
|
|
}else{
|
|
|
name = '确认提交'
|
|
name = '确认提交'
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if(this.form.sendType == 3){
|
|
|
|
|
+ if(Number(this.form.wlId)<=0){
|
|
|
|
|
+ this.$msg('请选择物流')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
self.$util.confirmModal({content:name},() => {
|
|
self.$util.confirmModal({content:name},() => {
|
|
|
self.formSubmit()
|
|
self.formSubmit()
|
|
|
})
|
|
})
|
|
@@ -470,6 +517,7 @@ export default {
|
|
|
this.$msg('收款金额必须大于0');
|
|
this.$msg('收款金额必须大于0');
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
let Fn = createOrder
|
|
let Fn = createOrder
|
|
|
let params = {...formData,modifyPrice: this.modifyPrice,newVersion:1};
|
|
let params = {...formData,modifyPrice: this.modifyPrice,newVersion:1};
|
|
|
if(this.option.orderId && this.option.orderId > 0){
|
|
if(this.option.orderId && this.option.orderId > 0){
|