|
|
@@ -0,0 +1,52 @@
|
|
|
+const _Http = getApp().globalData.http;
|
|
|
+
|
|
|
+let sa_quotedpriceid = null;
|
|
|
+Page({
|
|
|
+ data: {
|
|
|
+ deletereason: "",
|
|
|
+ loading: false,
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ sa_quotedpriceid = options.id;
|
|
|
+ },
|
|
|
+ onInput(e) {
|
|
|
+ this.setData({
|
|
|
+ deletereason: e.detail.value
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleDetele() {
|
|
|
+ let that = this;
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '是否确认作废该报价单?',
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) _Http.basic({
|
|
|
+ "id": 20221020165503,
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ "sa_quotedpriceids": [sa_quotedpriceid],
|
|
|
+ deletereason: that.data.deletereason
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("作废报价单", res)
|
|
|
+ that.setData({
|
|
|
+ loading: false
|
|
|
+ })
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg != '成功' ? res.msg : '作废成功',
|
|
|
+ icon: "none",
|
|
|
+ mask: true
|
|
|
+ });
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
+ wx.navigateBack({
|
|
|
+ delta: 2
|
|
|
+ });
|
|
|
+ }, 300)
|
|
|
+ getCurrentPages().find(v => v.__route__ == 'packageA/offers/index').getList(true)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+})
|