|
@@ -113,19 +113,44 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
- debtPay () {
|
|
|
|
|
|
|
+ debtPay(){
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ that.confirmDebtPay()
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
|
|
+ if(this.getDictionariesInfo && this.getDictionariesInfo.subscribeMessage && this.getDictionariesInfo.subscribeMessage == 1 && this.getDictionariesInfo.hdMiniMessage && this.getDictionariesInfo.hdMiniMessage.cgSuccess && this.getDictionariesInfo.hdMiniMessage.remindHdClear && this.getDictionariesInfo.hdMiniMessage.giveCoupon){
|
|
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
|
|
+ tmplIds: [this.getDictionariesInfo.hdMiniMessage.cgSuccess.msgId,this.getDictionariesInfo.hdMiniMessage.giveCoupon.msgId,this.getDictionariesInfo.hdMiniMessage.remindHdClear.msgId],
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ that.confirmDebtPay()
|
|
|
|
|
+ },
|
|
|
|
|
+ fail(err) {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ },
|
|
|
|
|
+ complete() {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ that.confirmDebtPay()
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ },
|
|
|
|
|
+ confirmDebtPay() {
|
|
|
let that = this
|
|
let that = this
|
|
|
that.$util.confirmModal({content:'确认赊账?'},() => {
|
|
that.$util.confirmModal({content:'确认赊账?'},() => {
|
|
|
- uni.showLoading({mask:true})
|
|
|
|
|
- purchaseDebtPay({ orderSn: that.orderSn }).then(res => {
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- that.pageTo({
|
|
|
|
|
- url: '/pagesPurchase/particulars?id=' + res.data.id,
|
|
|
|
|
- type: 2
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ uni.showLoading({mask:true})
|
|
|
|
|
+ purchaseDebtPay({ orderSn: that.orderSn }).then(res => {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ that.pageTo({
|
|
|
|
|
+ url: '/pagesPurchase/particulars?id=' + res.data.id,
|
|
|
|
|
+ type: 2
|
|
|
})
|
|
})
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
wxPayFn () {
|
|
wxPayFn () {
|
|
@@ -162,10 +187,29 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
getSuccess () {
|
|
getSuccess () {
|
|
|
- this.pageTo({
|
|
|
|
|
- url: '/pagesPurchase/particulars?id=' + this.pageId,
|
|
|
|
|
- type: 2
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ // #ifdef APP-PLUS
|
|
|
|
|
+ that.pageTo({ url: '/pagesPurchase/particulars?id=' + that.pageId, type: 2 })
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
|
|
+ if(this.getDictionariesInfo && this.getDictionariesInfo.subscribeMessage && this.getDictionariesInfo.subscribeMessage == 1 && this.getDictionariesInfo.hdMiniMessage && this.getDictionariesInfo.hdMiniMessage.cgSuccess && this.getDictionariesInfo.hdMiniMessage.remindHdClear && this.getDictionariesInfo.hdMiniMessage.giveCoupon){
|
|
|
|
|
+ uni.requestSubscribeMessage({
|
|
|
|
|
+ tmplIds: [this.getDictionariesInfo.hdMiniMessage.cgSuccess.msgId,this.getDictionariesInfo.hdMiniMessage.giveCoupon.msgId,this.getDictionariesInfo.hdMiniMessage.remindHdClear.msgId],
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ that.pageTo({ url: '/pagesPurchase/particulars?id=' + that.pageId, type: 2 })
|
|
|
|
|
+ },
|
|
|
|
|
+ fail(err) {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ },
|
|
|
|
|
+ complete() {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ that.pageTo({ url: '/pagesPurchase/particulars?id=' + that.pageId, type: 2 })
|
|
|
|
|
+ }
|
|
|
|
|
+ // #endif
|
|
|
},
|
|
},
|
|
|
// 关闭键盘
|
|
// 关闭键盘
|
|
|
closeKeyFn () {
|
|
closeKeyFn () {
|