|
@@ -147,4 +147,97 @@ Page({
|
|
|
"detail.accountclass.rebate_used": this.data.detail.accountclass.rebate_used == 0 ? 1 : 0
|
|
|
});
|
|
|
},
|
|
|
+ /* 删除订单 */
|
|
|
+ deleteItem() {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确认删除订单?',
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20221108152102,
|
|
|
+ "content": {
|
|
|
+ "sa_orderids": [
|
|
|
+ that.data.sa_orderid
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }).then(s => {
|
|
|
+ console.log("删除订单", s)
|
|
|
+ if (s.msg != '成功') return wx.showToast({
|
|
|
+ title: s.msg,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ wx.showToast({
|
|
|
+ title: `成功删除${that.data.detail.sonum}订单`,
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/index');
|
|
|
+ if (page) page.setData({
|
|
|
+ list: page.data.list.filter(v => v.sa_orderid != that.data.sa_orderid),
|
|
|
+ "content.total": page.data.content.total - 1,
|
|
|
+ amount: (page.data.amount - that.data.detail.amount).toFixed(2)
|
|
|
+ });
|
|
|
+ wx.navigateBack()
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 提交订单 */
|
|
|
+ submit() {
|
|
|
+ let that = this,
|
|
|
+ sys_enterpriseid = that.data.detail.sys_enterpriseid,
|
|
|
+ sa_accountclassid = that.data.detail.accountclass.sa_accountclassid;
|
|
|
+ if (!sys_enterpriseid) return wx.showToast({
|
|
|
+ title: '还未选择开票单位',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ if (!sa_accountclassid) return wx.showToast({
|
|
|
+ title: '还完成支付信息',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确认提交订单?',
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20221108153402,
|
|
|
+ "content": {
|
|
|
+ sa_orderid: that.data.sa_orderid,
|
|
|
+ sys_enterpriseid,
|
|
|
+ sa_accountclassid
|
|
|
+ },
|
|
|
+ }).then(s => {
|
|
|
+ console.log("提交订单", s)
|
|
|
+ wx.showToast({
|
|
|
+ title: s.msg != '成功' ? s.msg : '提交成功',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /* 确认订单交期 */
|
|
|
+ notarize() {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确认交期?',
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20221230094802,
|
|
|
+ "content": {
|
|
|
+ sa_orderid: that.data.sa_orderid
|
|
|
+ },
|
|
|
+ }).then(s => {
|
|
|
+ console.log("确认交期", s)
|
|
|
+ wx.showToast({
|
|
|
+ title: s.msg != '成功' ? s.msg : '提交成功',
|
|
|
+ icon: "none"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|