Commit fa4c4855 by 张立顺

fix 提单bug修复

1 parent 2e6d44f7
...@@ -14,8 +14,8 @@ Component({ ...@@ -14,8 +14,8 @@ Component({
observer: function (n) { observer: function (n) {
} }
}, },
resetTransNo:String, resetTransNo: String,
resetOrder:Boolean resetOrder: Boolean
}, },
/** /**
...@@ -38,8 +38,9 @@ Component({ ...@@ -38,8 +38,9 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
noScroll() {}, noScroll() { },
close() { close() {
let thisPage = wx.$router.getPageInstance()
let { routerBack } = this.data let { routerBack } = this.data
if (routerBack) { if (routerBack) {
wx.navigateBack() wx.navigateBack()
...@@ -48,6 +49,9 @@ Component({ ...@@ -48,6 +49,9 @@ Component({
this.setData({ this.setData({
show: false show: false
}) })
thisPage.setData({
showPopup: false
})
}, },
input(e) { input(e) {
let { value } = e.detail let { value } = e.detail
...@@ -78,7 +82,7 @@ Component({ ...@@ -78,7 +82,7 @@ Component({
console.log(img) console.log(img)
let { code, data, message } = img let { code, data, message } = img
if (code == 0) { if (code == 0) {
payVoucherList.push({url: data}) payVoucherList.push({ url: data })
_this.setData({ _this.setData({
payVoucherList payVoucherList
}) })
...@@ -110,38 +114,38 @@ Component({ ...@@ -110,38 +114,38 @@ Component({
}) })
}, },
confirm(e) { confirm(e) {
let { outTradeNo, payVoucherList,resetOrder } = this.data let { outTradeNo, payVoucherList, resetOrder } = this.data
// debugger // debugger
// console.log(wx.$router) // console.log(wx.$router)
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
if(resetOrder) return this.newResetOrder() if (resetOrder) return this.newResetOrder()
// if (orderType == 2) { // if (orderType == 2) {
if (payVoucherList.length && outTradeNo) { if (payVoucherList.length && outTradeNo) {
thisPage.setData({ thisPage.setData({
['orderInfo.transactionNo']: outTradeNo, ['orderInfo.transactionNo']: outTradeNo,
['orderInfo.paymentDocList']: payVoucherList.map(item=>item.url) ['orderInfo.paymentDocList']: payVoucherList.map(item => item.url)
}) })
console.log(thisPage.handleSecondConfirm); console.log(thisPage.handleSecondConfirm);
thisPage.handleSecondConfirm() thisPage.handleSecondConfirm()
} else { } else {
wx.$util.showToast('交易流水号或付款凭证不能为空!') wx.$util.showToast('交易流水号或付款凭证不能为空!')
} }
// } // }
}, },
// 标记错误订单&补录订单 // 标记错误订单&补录订单
newResetOrder(){ newResetOrder() {
let { resetTransNo, payVoucherList } = this.data let { resetTransNo, payVoucherList } = this.data
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
if (payVoucherList.length && resetTransNo) { if (payVoucherList.length && resetTransNo) {
thisPage.setData({ thisPage.setData({
['orderInfo.transactionNo']: resetTransNo, ['orderInfo.transactionNo']: resetTransNo,
['orderInfo.paymentDocList']: payVoucherList.map(item=>item.url) ['orderInfo.paymentDocList']: payVoucherList.map(item => item.url)
}) })
thisPage.handleSecondConfirm() thisPage.handleSecondConfirm()
} else { } else {
wx.$util.showToast('交易流水号或付款凭证不能为空!') wx.$util.showToast('交易流水号或付款凭证不能为空!')
} }
} }
} }
}) })
...@@ -356,8 +356,8 @@ Page({ ...@@ -356,8 +356,8 @@ Page({
} = this.data } = this.data
// 先写死调试 // 先写死调试
getQuotationInfoById({ getQuotationInfoById({
id id
}) })
.then(result => { .then(result => {
console.log('result', result) console.log('result', result)
let { let {
...@@ -393,7 +393,7 @@ Page({ ...@@ -393,7 +393,7 @@ Page({
} }
}) })
.catch(err => {}) .catch(err => { })
}, },
totalFee() { totalFee() {
let { let {
...@@ -491,9 +491,9 @@ Page({ ...@@ -491,9 +491,9 @@ Page({
orderInfo orderInfo
} = this.data } = this.data
listByMerchantIdAndIds({ listByMerchantIdAndIds({
merchantId: default4SStoreInfo.merchantId, merchantId: default4SStoreInfo.merchantId,
suitCarPrice: price ? parseFloat((price / 10000).toFixed(4)) : '' suitCarPrice: price ? parseFloat((price / 10000).toFixed(4)) : ''
}) })
.then(result => { .then(result => {
console.log(result, 'result') console.log(result, 'result')
// debugger // debugger
...@@ -539,7 +539,7 @@ Page({ ...@@ -539,7 +539,7 @@ Page({
// 判断有没有勾选商品,有的话调用一下 // 判断有没有勾选商品,有的话调用一下
orderInfo.vdQuotationGoodsList.length && this.totalFee() orderInfo.vdQuotationGoodsList.length && this.totalFee()
}) })
.catch(err => {}) .catch(err => { })
}, },
// 后面改成全局方法 // 后面改成全局方法
// 除以100保留两位小数点 // 除以100保留两位小数点
...@@ -600,7 +600,7 @@ Page({ ...@@ -600,7 +600,7 @@ Page({
navBarHeight navBarHeight
}) })
}, },
init() {}, init() { },
onRoute(options) { onRoute(options) {
console.log(options, 'options') console.log(options, 'options')
// 判断是编辑还是新增 // 判断是编辑还是新增
...@@ -674,35 +674,35 @@ Page({ ...@@ -674,35 +674,35 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!