|
|
@@ -257,22 +257,14 @@ export default {
|
|
|
payWay:payWay,
|
|
|
modifyPrice:actPrice
|
|
|
}
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "确认结清欠款?",
|
|
|
- confirmText: "确认",
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- clearOrderApi(params).then(res => {
|
|
|
- if(res.code == 1) {
|
|
|
- that.pageTo({url:'/common/success', type: 2,query:{titleType:1}});
|
|
|
- }
|
|
|
- }).catch(err => {
|
|
|
- console.log('err', err)
|
|
|
- })
|
|
|
+
|
|
|
+ that.$util.confirmModal({content:'确认结清欠款?'},() => {
|
|
|
+ clearOrderApi(params).then(res => {
|
|
|
+ if(res.code == 1) {
|
|
|
+ that.pageTo({url:'/common/success', type: 2,query:{titleType:1}});
|
|
|
}
|
|
|
- },
|
|
|
- });
|
|
|
+ })
|
|
|
+ })
|
|
|
|
|
|
}else{
|
|
|
this.$msg("请选择收款方式");
|
|
|
@@ -326,13 +318,9 @@ export default {
|
|
|
if (s.type === "selfGet") {
|
|
|
// 自取
|
|
|
let self = this;
|
|
|
- uni.showModal({title: "提示",content: "确认客户已自取",confirmText: "确认",
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- self.freeShipModalClick();
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
+ self.$util.confirmModal({content:'确认客户已自取'},() => {
|
|
|
+ self.freeShipModalClick()
|
|
|
+ })
|
|
|
this.freeShipModal = true;
|
|
|
} else if (s.type === "print") {
|
|
|
if(item.hasCloudPrint == 1){
|
|
|
@@ -360,32 +348,22 @@ export default {
|
|
|
}else if (s.type === "debtPay") {
|
|
|
let self = this;
|
|
|
//延期收款
|
|
|
- uni.showModal({
|
|
|
- content: '您确认要延期收款',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- return debtPay({ id: self.option.id }).then(res => {
|
|
|
- console.log(res)
|
|
|
- uni.showToast({title:'操作成功!',icon:'none'})
|
|
|
- self.init();
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ self.$util.confirmModal({content:'确认要延期收款?'},() => {
|
|
|
+ return debtPay({ id: self.option.id }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ uni.showToast({title:'操作成功!',icon:'none'})
|
|
|
+ self.init();
|
|
|
+ })
|
|
|
+ })
|
|
|
}else if (s.type === "hasPay") {
|
|
|
let self = this;
|
|
|
//已收款
|
|
|
- uni.showModal({
|
|
|
- content: '您确认已收款',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- return hasPay({ id: self.option.id }).then(res => {
|
|
|
- uni.showToast({title:'操作成功!',icon:'none'})
|
|
|
- self.init();
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ self.$util.confirmModal({content:'您确认已收款?'},() => {
|
|
|
+ return hasPay({ id: self.option.id }).then(res => {
|
|
|
+ uni.showToast({title:'操作成功!',icon:'none'})
|
|
|
+ self.init();
|
|
|
+ })
|
|
|
+ })
|
|
|
}else if (s.type === "modifyProduct") {
|
|
|
//修改花材
|
|
|
let self = this;
|
|
|
@@ -435,31 +413,19 @@ export default {
|
|
|
});
|
|
|
}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'})
|
|
|
- self.init();
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ self.$util.confirmModal({content:'确认取消订单?'},() => {
|
|
|
+ cancel({id:item.id}).then((res) => {
|
|
|
+ uni.showToast({title:res.msg,icon:'none'})
|
|
|
+ self.init();
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
toConfrim(params,title){
|
|
|
let that = this
|
|
|
- uni.showModal({
|
|
|
- title: '订单完成',
|
|
|
- content: title,
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- that.toConfirmRequest(params)
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ that.$util.confirmModal({content:'订单完成'},() => {
|
|
|
+ that.toConfirmRequest(params)
|
|
|
+ })
|
|
|
},
|
|
|
toConfirmRequest(params){
|
|
|
let self = this;
|