Browse Source

直销项目修改

zhaoxiaohai 2 years ago
parent
commit
2a01d48486
3 changed files with 106 additions and 8 deletions
  1. 70 1
      packageA/contract/add/type3/index.js
  2. 35 7
      packageA/contract/detail.js
  3. 1 0
      packageA/contract/detail.wxml

+ 70 - 1
packageA/contract/add/type3/index.js

@@ -96,6 +96,7 @@ Page({
                 params: {
                     "id": 20221201090802,
                     "content": {
+                        nocache: true,
                         sys_enterpriseid: data.sys_enterpriseid[1][0],
                         type: 1, //1直销 2经销 3居间
                         where: {
@@ -105,6 +106,7 @@ Page({
                 },
                 query: "&radio=true",
                 placeholder: "选择项目",
+                interrupt: true,
                 valueName: "sa_projectid",
                 checking: "base",
                 required: true
@@ -130,7 +132,45 @@ Page({
         if (temporary.item.value[0] == data.value[0]) return wx.navigateBack();
         temporary.item.value = data.value;
         if (temporary.item.valueName == "sys_enterpriseid") {
-            form.splice(2, form[2].label == '项目' ? 1 : 0, {
+            form.splice(2, form.some(v => v.label == '收货人') ? 1 : 0, {
+                label: "收货人",
+                error: false,
+                errMsg: "",
+                type: "route",
+                url: "/packageA/select/contacts/select",
+                value: "",
+                params: {
+                    "id": "20221022165503",
+                    "content": {
+                        nocache: true,
+                        sys_enterpriseid: data.value[1][0],
+                        "where": {
+                            "condition": "",
+                            "workaddress": 0
+                        }
+                    }
+                },
+                query: "&radio=true",
+                interrupt: true,
+                placeholder: "选择收货人",
+                valueName: "rec_contactsid",
+                checking: "base",
+                required: true
+            })
+
+            form.splice(3, form.some(v => v.label == '收货人电话') ? 1 : 0, {
+                label: "收货人电话",
+                error: false,
+                errMsg: "",
+                type: "textare",
+                value: "",
+                placeholder: "收货人电话",
+                valueName: "num",
+                disabled: true,
+                required: false
+            })
+
+            form.splice(4, form.some(v => v.label == '项目') ? form.some(v => v.label == '项目地址') ? 3 : 1 : 0, {
                 label: "项目",
                 error: false,
                 errMsg: "",
@@ -140,6 +180,7 @@ Page({
                 params: {
                     "id": 20221201090802,
                     "content": {
+                        nocache: true,
                         sys_enterpriseid: data.value[1][0],
                         "type": 1, //1直销 2经销 3居间
                         "where": {
@@ -148,11 +189,38 @@ Page({
                     }
                 },
                 query: "&radio=true",
+                interrupt: true,
                 placeholder: "选择项目",
                 valueName: "sa_projectid",
                 checking: "base",
                 required: true
             })
+        } else if (temporary.item.valueName == "sa_projectid") {
+            let item = data.item;
+            form.splice(temporary.index - 0 + 1, form.some(v => v.label == '项目地址') ? 1 : 0, {
+                label: "项目地址",
+                error: false,
+                errMsg: "",
+                type: "textare",
+                value: item.province + item.city + item.county + item.address,
+                placeholder: "项目地址",
+                valueName: "123",
+                disabled: true,
+                required: false
+            })
+            form.splice(temporary.index - 0 + 2, form.some(v => v.label == '项目编号') ? 1 : 0, {
+                label: "项目编号",
+                error: false,
+                errMsg: "",
+                type: "textare",
+                value: item.projectnum,
+                placeholder: "项目编号",
+                valueName: "123",
+                disabled: true,
+                required: false
+            })
+        } else if (temporary.item.valueName == "rec_contactsid") {
+            form.find(v => v.label == '收货人电话').value = data.item.phonenumber;
         }
         form[temporary.index] = temporary.item;
         wx.navigateBack()
@@ -169,6 +237,7 @@ Page({
         content.enddate = content.invaliddate[1];
         content.sa_projectid = content.sa_projectid[1][0] || '';
         content.sys_enterpriseid = content.sys_enterpriseid[1][0] || '';
+        content.rec_contactsid = content.rec_contactsid[1][0] || '';
         delete(content.invaliddate)
         _Http.basic({
             "id": 20221121185302,

+ 35 - 7
packageA/contract/detail.js

@@ -150,11 +150,14 @@ Page({
                     label: "提交时间",
                     value: data.submitdate
                 }, {
-                    label: "审核",
+                    label: "审核",
                     value: data.checkby
                 }, {
                     label: "审核时间",
                     value: data.checkdate
+                }, {
+                    label: "作废原因",
+                    value: data.leader.deletereason
                 }, {
                     label: "转手次数",
                     value: data.leader[0].leadernum
@@ -227,29 +230,54 @@ Page({
                 value: data.status
             }];
         if (data.typemx) {
+            console.log(data)
             briefs.splice(3, 0, {
                 label: "项目",
                 value: data.projectname
             })
             briefs.splice(4, 0, {
-                label: "签约金额",
-                value: data.signamount
+                label: "项目编号",
+                value: data.projectnum
             })
-            briefs.splice(5, 1)
-            briefs.splice(6, 0, {
-                label: "合同有效期",
+            briefs.splice(5, 0, {
+                label: "有效期",
                 value: data.begdate + ' 至 ' + data.enddate
             })
-
+            briefs.splice(6, 1)
+            briefs.splice(7, 0, {
+                label: "签约金额(元)",
+                value: data.signamount
+            })
             list1.splice(3, 0, {
                 label: data.typemx == '直销' ? '客户' : "经销商",
                 value: data.enterprisename
             })
+
             list1.splice(4, 0, {
                 label: "项目",
                 value: data.projectname
             })
             list1.splice(5, 0, {
+                label: "项目编号",
+                value: data.projectnum
+            })
+            list1.splice(6, 0, {
+                label: "项目地址",
+                value: data.address
+            })
+            list1.splice(7, 0, {
+                label: "收货人",
+                value: data.name
+            })
+            list1.splice(8, 0, {
+                label: "收货人电话",
+                value: data.phonenumber
+            })
+            list1.splice(9, 0, {
+                label: "业务员",
+                value: data.salername
+            })
+            list1.splice(10, 0, {
                 label: "签约金额",
                 value: data.signamount
             })

+ 1 - 0
packageA/contract/detail.wxml

@@ -15,6 +15,7 @@
     <PiscountProduct slot='产品明细折扣' id='PiscountProduct' disabled="{{(per.query(options,'app')||isAdmin||isLeader)&&detail.status!='新建'}}" />
     <PiscountType slot='产品类型折扣' id='PiscountType' disabled="{{(per.query(options,'app')||isAdmin||isLeader)&&detail.status!='新建'}}" />
     <Objective slot='业绩目标' id='Objective' />
+    <view slot='合同条款' />
     <view style="height: 140rpx;" />
 </Yl_FunTabs>
 <!-- 底部 -->