|
|
@@ -373,22 +373,50 @@ Page({
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: `是否确定提交当前报价,提交后禁止使用部分功能`,
|
|
|
- complete: (res) => {
|
|
|
- if (res.confirm) _Http.basic({
|
|
|
- "id": 20221020165303,
|
|
|
- "version": 1,
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) _Http.basic({
|
|
|
+ "id": "2024091910001802",
|
|
|
"content": {
|
|
|
- "sa_quotedpriceid": that.data.sa_quotedpriceid
|
|
|
+ "ownertable": "sa_quotedprice", //sa_project,sa_contract,sa_quotedprice
|
|
|
+ "ownerid": that.data.sa_quotedpriceid
|
|
|
+ }
|
|
|
+ }).then(s => {
|
|
|
+ console.log("报价单是否可以提交", s)
|
|
|
+ if (s.code == 1) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221020165303,
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ "sa_quotedpriceid": that.data.sa_quotedpriceid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("提交报价单", res)
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg == '成功' ? "提交成功" : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
+ that.getDetail();
|
|
|
+ }, 300)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 2024091910214302,
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ "ownertable": "sa_quotedprice", //sa_project,sa_contract,sa_quotedprice
|
|
|
+ "ownerid": that.data.sa_quotedpriceid
|
|
|
+ }
|
|
|
+ }).then(v => {
|
|
|
+ console.log("发送提醒", v)
|
|
|
+ wx.showToast({
|
|
|
+ title: v.msg == '成功' ? "已发送提醒" : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
- }).then(res => {
|
|
|
- console.log("提交报价单", res)
|
|
|
- wx.showToast({
|
|
|
- title: res.msg == '成功' ? "提交成功" : res.msg,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- if (res.msg == '成功') setTimeout(() => {
|
|
|
- that.getDetail();
|
|
|
- }, 300)
|
|
|
})
|
|
|
}
|
|
|
})
|