|
|
|
@ -1,6 +1,6 @@ |
|
|
|
// pages/process/order-check/index.js
|
|
|
|
import Scene from '../../index/scene' |
|
|
|
import { pricingOrder, getSideOrderInfo} from "../../../api/saas" |
|
|
|
import { checkSideOrder, getSideOrderInfo, printOrder} from "../../../api/saas" |
|
|
|
const event = require('../../../utils/event') |
|
|
|
const util = require('../../../utils/util') |
|
|
|
const app = getApp() |
|
|
|
@ -29,14 +29,24 @@ Scene({ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
printOrder: function(){ |
|
|
|
wx.showLoading({ title: '正在获取', mask: true }) |
|
|
|
printOrder({id: this.data.id}).then(result => { |
|
|
|
wx.hideLoading() |
|
|
|
util.showToast('即将打印,请稍后') |
|
|
|
}).catch(err => { |
|
|
|
wx.hideLoading() |
|
|
|
util.showToast(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
checkForm: function(){ |
|
|
|
wx.redirectTo({url: `/pages/process/outside-check/index?id=${this.data.id}` }) |
|
|
|
}, |
|
|
|
submitForm: function(){ |
|
|
|
wx.showLoading({ title: '处理中', mask: true }) |
|
|
|
pricingOrder(this.data.form).then(result => { |
|
|
|
checkSideOrder(this.data.form).then(result => { |
|
|
|
wx.hideLoading() |
|
|
|
util.showBackToast('定价成功') |
|
|
|
util.showBackToast('审核成功') |
|
|
|
event.emit('OrderMessage', { what: 12, desc: 'pricingOrder' }) |
|
|
|
}).catch(err => { |
|
|
|
wx.hideLoading() |
|
|
|
|