|
|
@@ -8,6 +8,15 @@ Page({
|
|
|
num: 132
|
|
|
}],
|
|
|
tabbarList: [{
|
|
|
+ icon: "icon-genjin",
|
|
|
+ label: "提交"
|
|
|
+ }, {
|
|
|
+ icon: "icon-genjin",
|
|
|
+ label: "审核"
|
|
|
+ }, {
|
|
|
+ icon: "icon-genjin",
|
|
|
+ label: "反审核"
|
|
|
+ }, {
|
|
|
icon: "icon-genjin",
|
|
|
label: "跟进"
|
|
|
}, {
|
|
|
@@ -28,6 +37,7 @@ Page({
|
|
|
_Http.basic({
|
|
|
"id": 20221121195102,
|
|
|
"content": {
|
|
|
+ nocache: true,
|
|
|
"sa_contractid": this.data.sa_contractid
|
|
|
},
|
|
|
}).then(res => {
|
|
|
@@ -69,13 +79,14 @@ Page({
|
|
|
data.type = '居间协议'
|
|
|
break;
|
|
|
case "项目":
|
|
|
+ /* {
|
|
|
+ label: "合同条款",
|
|
|
+ num: 132
|
|
|
+ }, */
|
|
|
data.type = data.typemx + '项目协议'
|
|
|
tabsList = tabsList.concat([{
|
|
|
label: "产品清单",
|
|
|
num: 132
|
|
|
- }, {
|
|
|
- label: "合同条款",
|
|
|
- num: 132
|
|
|
}, {
|
|
|
label: "跟进动态",
|
|
|
num: 132
|
|
|
@@ -111,6 +122,16 @@ Page({
|
|
|
tabsList,
|
|
|
tabsActive
|
|
|
});
|
|
|
+
|
|
|
+ /* 更新列表数据 */
|
|
|
+ let page = getCurrentPages().find(v => v.__route__ == 'packageA/contract/index');
|
|
|
+ if (page) {
|
|
|
+ let i = page.data.list.findIndex(v => v.sa_contractid == this.data.sa_contractid);
|
|
|
+ if (i != -1) page.setData({
|
|
|
+ [`list[${i}].status`]: res.data.status
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
this.getTags();
|
|
|
this.getGroup();
|
|
|
this.partialRenewal();
|
|
|
@@ -300,8 +321,92 @@ Page({
|
|
|
tabbarOnClick({
|
|
|
detail
|
|
|
}) {
|
|
|
- let data = this.data.detail;
|
|
|
+ let data = this.data.detail,
|
|
|
+ that = this;
|
|
|
switch (detail.label) {
|
|
|
+ case "提交":
|
|
|
+ if (data.status != '新建') return wx.showToast({
|
|
|
+ title: '当前状态不可提交!',
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ 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"
|
|
|
+ })
|
|
|
+ if (res.msg == '成功') setTimeout(() => {
|
|
|
+ that.getDetail();
|
|
|
+ }, 300)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case "审核":
|
|
|
+ if (data.status != '已提交') return wx.showToast({
|
|
|
+ title: '当前状态不可审核!',
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否通过当前协议`,
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20221121203102,
|
|
|
+ "version": 1,
|
|
|
+ "content": {
|
|
|
+ "type": 1, //0:不通过,1:通过
|
|
|
+ "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)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break;
|
|
|
+ case "反审核":
|
|
|
+ if (data.status == '新建') return wx.showToast({
|
|
|
+ title: '当前状态不可反审核!',
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ wx.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: `是否退回当前协议`,
|
|
|
+ complete: (res) => {
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
+ "id": 20221212135402,
|
|
|
+ "content": {
|
|
|
+ "sa_contractid": 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)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ break;
|
|
|
case "跟进":
|
|
|
wx.navigateTo({
|
|
|
url: `/packageA/setclient/modules/trace/add/index?ownertable=sa_contract&ownerid=${data.sa_contractid}`,
|