|
|
@@ -69,7 +69,8 @@
|
|
|
</view>
|
|
|
<view class="order-info_box">
|
|
|
<view>开单:</view>
|
|
|
- <view>{{ item.shopAdminName }}</view>
|
|
|
+ <view v-if="item.shopAdminId > 0">{{ item.shopAdminName}}</view>
|
|
|
+ <view v-else>{{item.customName}}-{{item.customShopAdminName}}</view>
|
|
|
</view>
|
|
|
<view class="order-info_box">
|
|
|
<view>数量:</view>
|
|
|
@@ -126,7 +127,7 @@ import { getCategory, getUsage } from "@/utils/config";
|
|
|
import { list } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { cloudPrintOrder } from "@/api/order";
|
|
|
-import { getListB, freeShipping,confirmFinish } from "@/api/order";
|
|
|
+import { getListB, freeShipping,confirmFinish,cancel } from "@/api/order";
|
|
|
import AppSearchModule from "@/components/module/app-search";
|
|
|
import DorpdownSelect from "@/components/module/dorpdownSelect";
|
|
|
import AppAvatarModule from "@/components/module/app-avatar";
|
|
|
@@ -323,32 +324,70 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}else if(s.type == 'confirm'){
|
|
|
- let that = this
|
|
|
- uni.showActionSheet({
|
|
|
- itemList: ['请选择结算方式:', '欠款', '已收款'],
|
|
|
- success: function (res) {
|
|
|
- let title = res.tapIndex == 1 ? '确认客户欠款?' : '确认已收款?'
|
|
|
- let clearType = res.tapIndex == 1 ? 1 : 2;
|
|
|
- uni.showModal({
|
|
|
- title: '完成订单提示',
|
|
|
- content: title,
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- confirmFinish({id:item.id,clearType:clearType}).then((res) => {
|
|
|
- that._list();
|
|
|
- that.$msg(res.msg);
|
|
|
- })
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- fail: function (res) {
|
|
|
- console.log(res.errMsg);
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ let self = this;
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['请选择结算方式:', '欠款', '已收款'],
|
|
|
+ success: function (res) {
|
|
|
+ let payWay = 0
|
|
|
+ let title = res.tapIndex == 1 ? '确认客户欠款?' : '确认已收款?'
|
|
|
+ //1欠款 2已收款
|
|
|
+ let clearType = res.tapIndex == 1 ? 1 : 2;
|
|
|
+ //选择的已收款,还需要选择收款方式
|
|
|
+ if(clearType == 2){
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['请选择收款方式:', '微信', '支付宝','现金','银行卡'],
|
|
|
+ success: function (respond) {
|
|
|
+ let currentIndex = respond.tapIndex
|
|
|
+ let inWay = [{name:"未选择",id:-1},{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}]
|
|
|
+ if (self.$util.isEmpty(inWay[currentIndex].id || inWay[currentIndex].id == -1)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ payWay = inWay[currentIndex].id
|
|
|
+ let params = {id:item.id,clearType:clearType,payWay:payWay}
|
|
|
+ self.toConfrim(params,title)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ let params = {id:item.id,clearType:clearType,payWay:payWay}
|
|
|
+ self.toConfrim(params,title)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else if(s.type == 'cancel'){
|
|
|
+ let self = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '确认取消?',
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+
|
|
|
+ cancel({id:item.id}).then((res) => {
|
|
|
+ uni.showToast({title:res.msg,icon:'none'})
|
|
|
+ this._list();
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ toConfrim(params,title){
|
|
|
+ uni.showModal({
|
|
|
+ title: '完成订单提示',
|
|
|
+ content: title,
|
|
|
+ success: function (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ self.toConfirmRequest(params)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ toConfirmRequest(params){
|
|
|
+ confirmFinish(params).then((res) => {
|
|
|
+ uni.showToast({title:res.msg,icon:'none'})
|
|
|
+ this.init();
|
|
|
+ })
|
|
|
},
|
|
|
selectSussess(val) {
|
|
|
console.log(val);
|