|
|
@@ -103,6 +103,11 @@ Page({
|
|
|
icon: "icon-tabchanpinleibie",
|
|
|
model: '#PiscountType'
|
|
|
}]);
|
|
|
+ if (this.data.appAuth.options.some(v => v == 'IntermediaryContact')) tabsList.push({
|
|
|
+ label: "联系人",
|
|
|
+ icon: "icon-tablianxiren",
|
|
|
+ model: "#Contacts"
|
|
|
+ })
|
|
|
break;
|
|
|
case "项目":
|
|
|
data.type = data.typemx + '项目协议'
|
|
|
@@ -245,12 +250,19 @@ Page({
|
|
|
label: "作废"
|
|
|
})
|
|
|
|
|
|
-
|
|
|
this.setData({
|
|
|
isLeader,
|
|
|
tabbarList,
|
|
|
editdataleader
|
|
|
});
|
|
|
+
|
|
|
+ if (detail.typemx && (isLeader || this.data.appAuth.options.includes("app")) && status != '审核') {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.selectComponent("#Product").setData({
|
|
|
+ directAddition: true
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
/* 设置详情信息 */
|
|
|
setDetail(data) {
|
|
|
@@ -601,22 +613,59 @@ Page({
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: `是否确定提交当前协议,提交后禁止使用部分功能`,
|
|
|
- complete: (res) => {
|
|
|
- if (res.confirm) _Http.basic({
|
|
|
- "id": 20221121202802,
|
|
|
- "content": {
|
|
|
- "sa_contractids": [that.data.sa_contractid]
|
|
|
- }
|
|
|
- }).then(res => {
|
|
|
- console.log("提交报价单", res)
|
|
|
- wx.showToast({
|
|
|
- title: res.msg == '成功' ? "提交成功" : res.msg,
|
|
|
- icon: "none"
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": "2024091910001802",
|
|
|
+ "content": {
|
|
|
+ "ownertable": "sa_contract", //sa_project,,sa_quotedprice
|
|
|
+ "ownerid": that.data.sa_contractid
|
|
|
+ },
|
|
|
+ }).then(s => {
|
|
|
+ console.log("是否可以提交", s)
|
|
|
+ if (s.code == 1) {
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20221121202802,
|
|
|
+ "content": {
|
|
|
+ "sa_contractids": [that.data.sa_contractid]
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("提交合同", res)
|
|
|
+ wx.showToast({
|
|
|
+ title: res.msg == '成功' ? "提交成功" : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
+ that.getDetail();
|
|
|
+ }, 300)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: s.msg,
|
|
|
+ complete: ({
|
|
|
+ confirm
|
|
|
+ }) => {
|
|
|
+ if (confirm) _Http.basic({
|
|
|
+ "id": "2024091910214302",
|
|
|
+ "content": {
|
|
|
+ "ownertable": "sa_contract", //sa_project,,sa_quotedprice
|
|
|
+ "ownerid": that.data.sa_contractid
|
|
|
+ },
|
|
|
+ }).then(v => {
|
|
|
+ console.log("发送提醒", v)
|
|
|
+ wx.showToast({
|
|
|
+ title: v.msg == '成功' ? "已发送提醒" : res.msg,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
- if (res.msg == '成功') setTimeout(() => {
|
|
|
- that.getDetail();
|
|
|
- }, 300)
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
break;
|