From 0ac8ecdc86225f980ac8553f9b0182134e7fa95e Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 5 Aug 2021 16:05:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E9=98=85=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/process/order-check/index.js | 24 ++++++++++++++++-------- pages/process/order-info/index.js | 22 ++++++++++++++-------- pages/process/outside-add/index.js | 2 +- pages/process/outside-check/index.js | 25 ++++++++++++++++--------- pages/process/outside-info/index.js | 22 ++++++++++++++-------- pages/process/outside-price/index.js | 2 +- pages/process/payment/index.js | 13 ++++++++++++- 7 files changed, 74 insertions(+), 36 deletions(-) diff --git a/pages/process/order-check/index.js b/pages/process/order-check/index.js index e83d549..dc0e391 100644 --- a/pages/process/order-check/index.js +++ b/pages/process/order-check/index.js @@ -144,7 +144,7 @@ Scene({ util.showToast('扣点范围:0-100') return } - wx.showLoading({ title: '处理中', mask: true }) + var data = {id: this.data.form.id} if(Number(this.data.form.deductWeight) > 0){ data.deductWeight = Number(this.data.form.deductWeight) @@ -157,13 +157,21 @@ Scene({ data.deductType = this.data.form.deductType data.unitPrice = Number(this.data.form.unitPrice) var factoryCustomerId = this.data.form.factoryCustomerId - checkingOrder({ id: this.data.form.id, factoryCustomerId, editOrderPriceDto: data }).then(result => { - wx.hideLoading() - event.emit('OrderMessage', { what: 12, desc: 'checkingOrder' }) - util.showBackToast('订单审核已通过') - }).catch(err => { - wx.hideLoading() - util.showToast(err) + + var that = this + wx.requestSubscribeMessage({ + tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA', '4IWtlcg1HhLN7AFepB3VeZF-4D0b9gbjwWBruKMhAJM'], + complete(res) { + wx.showLoading({ title: '处理中', mask: true }) + checkingOrder({ id: that.data.form.id, factoryCustomerId, editOrderPriceDto: data }).then(result => { + wx.hideLoading() + event.emit('OrderMessage', { what: 12, desc: 'checkingOrder' }) + util.showBackToast('订单审核已通过') + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) + } }) }, viewImage: function (e) { diff --git a/pages/process/order-info/index.js b/pages/process/order-info/index.js index 2185e15..9c2aab5 100644 --- a/pages/process/order-info/index.js +++ b/pages/process/order-info/index.js @@ -136,14 +136,20 @@ Scene({ wx.redirectTo({ url: `/pages/process/order-check/index?id=${this.data.form.id}` }) }, checkOrder: function(e){ - wx.showLoading({ title: '正在处理', mask: true }) - checkingOrder({ id: this.data.form.id }).then(result => { - wx.hideLoading() - util.showBackToast('订单审核已通过') - event.emit('OrderMessage', { what: 12, desc: 'checkingOrder' }) - }).catch(err => { - wx.hideLoading() - util.showToast(err) + var that = this + wx.requestSubscribeMessage({ + tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA', '4IWtlcg1HhLN7AFepB3VeZF-4D0b9gbjwWBruKMhAJM'], + complete(res) { + wx.showLoading({ title: '正在处理', mask: true }) + checkingOrder({ id: that.data.form.id }).then(result => { + wx.hideLoading() + util.showBackToast('订单审核已通过') + event.emit('OrderMessage', { what: 12, desc: 'checkingOrder' }) + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) + } }) }, viewImage: function (e) { diff --git a/pages/process/outside-add/index.js b/pages/process/outside-add/index.js index baec736..c2a5ad1 100644 --- a/pages/process/outside-add/index.js +++ b/pages/process/outside-add/index.js @@ -211,7 +211,7 @@ Scene({ } else { var that = this wx.requestSubscribeMessage({ - tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA'], + tmplIds: ['zOH2Mbzn6vVUaS_11s2cW4Mr0Y52O-i6gvu8AWlpOi8', 'DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA'], complete(res) { wx.showLoading({ title: '处理中', mask: true }) createSideOrder(that.data.form).then(result => { diff --git a/pages/process/outside-check/index.js b/pages/process/outside-check/index.js index c78c9f6..9a10165 100644 --- a/pages/process/outside-check/index.js +++ b/pages/process/outside-check/index.js @@ -77,7 +77,7 @@ Scene({ return null }, checkOrder: function(){ - var weightNoteList = [] + var productCategorySettleInfoDtoList = [] for (let index = 0; index < this.data.form.productCategoryInfos.length; index++) { const element = this.data.form.productCategoryInfos[index] if(util.isEmpty(element.settleUnitPrice) || Number(element.settleUnitPrice) <= 0){ @@ -101,15 +101,22 @@ Scene({ item.deductWeight = element.deductWeight item.deductPercent = element.deductPercent item.settleUnitPrice = element.settleUnitPrice - weightNoteList.push(item) + productCategorySettleInfoDtoList.push(item) } - repeatSideOrder({scrapPaperReceiptId: this.data.form.scrapPaperReceiptId, productCategorySettleInfoDtoList: weightNoteList }).then(result => { - wx.hideLoading() - event.emit('OrderMessage', { what: 12, desc: 'repeatSideOrder' }) - util.showBackToast('订单审核已通过') - }).catch(err => { - wx.hideLoading() - util.showToast(err) + var that = this + wx.requestSubscribeMessage({ + tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA', '4IWtlcg1HhLN7AFepB3VeZF-4D0b9gbjwWBruKMhAJM'], + complete(res) { + wx.showLoading({ title: '处理中', mask: true }) + repeatSideOrder({scrapPaperReceiptId: that.data.form.scrapPaperReceiptId, productCategorySettleInfoDtoList }).then(result => { + wx.hideLoading() + event.emit('OrderMessage', { what: 12, desc: 'repeatSideOrder' }) + util.showBackToast('订单审核已通过') + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) + } }) } }) \ No newline at end of file diff --git a/pages/process/outside-info/index.js b/pages/process/outside-info/index.js index 0e6f87f..fbda558 100644 --- a/pages/process/outside-info/index.js +++ b/pages/process/outside-info/index.js @@ -109,14 +109,20 @@ Scene({ } }, checkPass: function(){ - wx.showLoading({ title: '处理中', mask: true }) - repeatSideOrder({scrapPaperReceiptId: this.data.form.scrapPaperReceiptId }).then(result => { - wx.hideLoading() - util.showBackToast('订单审核已通过') - event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) - }).catch(err => { - wx.hideLoading() - util.showToast(err) + var that = this + wx.requestSubscribeMessage({ + tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA', '4IWtlcg1HhLN7AFepB3VeZF-4D0b9gbjwWBruKMhAJM'], + complete(res) { + wx.showLoading({ title: '处理中', mask: true }) + repeatSideOrder({scrapPaperReceiptId: that.data.form.scrapPaperReceiptId }).then(result => { + wx.hideLoading() + util.showBackToast('订单审核已通过') + event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) + }).catch(err => { + wx.hideLoading() + util.showToast(err) + }) + } }) }, paymentOrder: function(){ diff --git a/pages/process/outside-price/index.js b/pages/process/outside-price/index.js index 8163e7d..5dc93c8 100644 --- a/pages/process/outside-price/index.js +++ b/pages/process/outside-price/index.js @@ -213,7 +213,7 @@ Scene({ var that = this wx.requestSubscribeMessage({ - tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA'], + tmplIds: ['DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA', '4IWtlcg1HhLN7AFepB3VeZF-4D0b9gbjwWBruKMhAJM'], complete(res) { wx.showLoading({ title: '处理中', mask: true }) priceSideOrder(data).then(result => { diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js index 86a9acd..be5968a 100644 --- a/pages/process/payment/index.js +++ b/pages/process/payment/index.js @@ -163,6 +163,7 @@ Scene({ wx.showLoading({ title: '正在处理', mask: true }) this.data.requesting = true this.data.params.settleType = Number(settleType) + paymentOrder(this.data.params).then(result => { wx.hideLoading() if(!util.isEmpty(result.message)){ @@ -212,7 +213,17 @@ Scene({ return } Dialog.confirm({ title: '温馨提示', message: '操作后不能撤销,确认付款吗?' }).then(() => { - this.agentPayment(this.data.settleType) + if(Number(this.data.settleType) == 3) { + var that = this + wx.requestSubscribeMessage({ + tmplIds: ['4IWtlcg1HhLN7AFepB3VeZF-4D0b9gbjwWBruKMhAJM', 'DJaSy0a5TNp9v_ICQ0ZY5-hkZ91dEXZuKq_hQVBTnOA'], + complete(res) { + that.agentPayment(that.data.settleType) + } + }) + } else { + this.agentPayment(this.data.settleType) + } }).catch(err => { }) },