Przeglądaj źródła

Merge branch 'master' into 国际化适配

# Conflicts:
#	packageA/project/addAndEdit.js
#	packageA/project/modules/contacts/select/index.js
#	packageA/saleClue/change.js
#	packageA/saleClue/change.wxml
#	packageA/saleClue/detail.js
#	packageA/saleClue/translate.js
#	packageA/salesHourglass/index.wxml
#	packageA/setclient/addAndEditor.js
#	project.private.config.json
xiaohaizhao 1 rok temu
rodzic
commit
bba7f68409
38 zmienionych plików z 1366 dodań i 198 usunięć
  1. 2 0
      app.json
  2. 6 2
      components/organization/index.js
  3. 1 8
      packageA/contacts/detail.js
  4. 3 12
      packageA/contacts/insert.js
  5. 1 1
      packageA/contract/detail.js
  6. 5 4
      packageA/contract/index.js
  7. 18 3
      packageA/project/addAndEdit.js
  8. 9 9
      packageA/project/detail.js
  9. 30 12
      packageA/project/modules/contacts/add/index.js
  10. 5 4
      packageA/project/modules/contacts/quickly/index.js
  11. 14 17
      packageA/project/modules/contacts/select/index.js
  12. 7 0
      packageA/project/modules/contacts/select/index.scss
  13. 3 0
      packageA/project/modules/contacts/select/index.wxml
  14. 10 0
      packageA/project/modules/contract/index.js
  15. 27 2
      packageA/publicClue/addClue.js
  16. 29 3
      packageA/publicCustomer/addAndEditor.js
  17. 27 2
      packageA/saleAdmin/insert.js
  18. 24 2
      packageA/saleClue/addClue.js
  19. 166 0
      packageA/saleClue/audit/client.js
  20. 4 0
      packageA/saleClue/audit/client.json
  21. 112 0
      packageA/saleClue/audit/client.scss
  22. 41 0
      packageA/saleClue/audit/client.wxml
  23. 160 0
      packageA/saleClue/audit/project.js
  24. 4 0
      packageA/saleClue/audit/project.json
  25. 111 0
      packageA/saleClue/audit/project.scss
  26. 37 0
      packageA/saleClue/audit/project.wxml
  27. 206 38
      packageA/saleClue/change.js
  28. 3 1
      packageA/saleClue/change.json
  29. 62 0
      packageA/saleClue/change.scss
  30. 25 2
      packageA/saleClue/change.wxml
  31. 37 13
      packageA/saleClue/detail.js
  32. 76 37
      packageA/saleClue/translate.js
  33. 13 6
      packageA/salesHourglass/index.js
  34. 1 1
      packageA/salesHourglass/index.wxml
  35. 51 7
      packageA/setclient/addAndEditor.js
  36. 3 12
      packageA/setclient/modules/contacts/add/index.js
  37. 33 0
      static/font-icon.wxss
  38. 0 0
      static/stylesheet.wxss

+ 2 - 0
app.json

@@ -95,6 +95,8 @@
                 "saleClue/addClue",
                 "saleClue/detail",
                 "saleClue/change",
+                "saleClue/audit/client",
+                "saleClue/audit/project",
                 "opponent/index",
                 "opponent/detail",
                 "opponent/add",

+ 6 - 2
components/organization/index.js

@@ -19,12 +19,16 @@ Component({
         },
         dimissionF: {
             type: Boolean
+        },
+        defaultIsleave:{
+            type:[Number,String],
+            value:0
         }
     },
     data: {
         takeEffect: "", //生效筛选项
         result: {},
-        isleave: 0,
+        isleave: 1,
         tabs: [{
             value: 0,
             name: "全部"
@@ -108,7 +112,7 @@ Component({
                         })
                     }
                     if (init) this.setData({
-                        isleave: 0
+                        isleave: this.data.defaultIsleave
                     })
                     resolve({})
                 })

+ 1 - 8
packageA/contacts/detail.js

@@ -133,7 +133,6 @@ Page({
     deleteData() {
         let that = this;
         const contacts = this.data.detail;
-        console.log(contacts)
         let content = getApp().globalData.Language.getMapText('是否确认删除') + (contacts.name || contacts.NAME)
         if (contacts.islinkcustomer || contacts.islinkproject) content = getApp().globalData.Language.getMapText('当前联系人已存在关联客户/项目,是否确定删除')
         wx.showModal({
@@ -156,10 +155,7 @@ Page({
                         title: res.data || res.msg,
                         icon: "none"
                     })
-                    wx.showToast({
-                        title: getApp().globalData.Language.getMapText('删除成功'),
-                        icon: 'none'
-                    })
+                    getApp().globalData.Language.showToast('删除成功')
                     setTimeout(() => {
                         wx.navigateBack()
                     }, 500);
@@ -239,9 +235,6 @@ Page({
             }, {
                 label: "传真",
                 value: item.fax || '--'
-            }, {
-                label: "单位",
-                value: item.company || '--'
             }, {
                 label: "部门",
                 value: item.depname || '--'

+ 3 - 12
packageA/contacts/insert.js

@@ -70,16 +70,7 @@ Page({
             placeholder: "请填写",
             valueName: "fax",
             required: false,
-        }, {
-            label: "单位",
-            error: false,
-            errMsg: "",
-            type: "textarea",
-            value: "",
-            valueName: "company",
-            required: false,
-            checking: "base"
-        }, {
+        },  {
             label: "部门",
             error: false,
             errMsg: "",
@@ -87,7 +78,7 @@ Page({
             value: "",
             placeholder: "联系人所属部门",
             valueName: "depname",
-            required: false,
+            required: true,
             checking: "base"
         }, {
             label: "职位",
@@ -97,7 +88,7 @@ Page({
             value: "",
             placeholder: "联系人职位",
             valueName: "position",
-            required: false,
+            required: true,
             checking: "base"
         }, {
             label: "性别",

+ 1 - 1
packageA/contract/detail.js

@@ -94,7 +94,7 @@ Page({
                     break;
                 case "居间":
                     data.type = '居间协议'
-                    tabsList = tabsList.concat([{
+                    if (wx.getStorageSync('siteP').siteid != 'HY') tabsList = tabsList.concat([{
                         label: "产品明细折扣",
                         icon: "icon-tabchanpin",
                         model: '#PiscountProduct'

+ 5 - 4
packageA/contract/index.js

@@ -1,9 +1,5 @@
 const _Http = getApp().globalData.http;
 Page({
-
-    /**
-     * 页面的初始数据
-     */
     data: {
         loading: true,
         typeList: [{
@@ -86,6 +82,11 @@ Page({
             'navList[0].label': wx.getStorageSync('templetList')[0].templetname,
             "content.type": wx.getStorageSync('templetList')[0].templetid,
         });
+        if (wx.getStorageSync('siteP').siteid == 'HY') {
+            this.setData({
+                typeList: this.data.typeList.filter(v => v.name != '居间协议')
+            })
+        }
         this.getList();
     },
     /* 获取列表 */

+ 18 - 3
packageA/project/addAndEdit.js

@@ -247,6 +247,7 @@ Page({
         this.setData({
             form: this.data.form.filter(v => !remove.includes(v.label)).map(v => {
                 if (required.includes(v.label)) v.required = true;
+                // if (v.valueName == 'projectname') v.interrupt = false;
                 return v
             }),
             siteid: wx.getStorageSync('userMsg').siteid,
@@ -369,7 +370,7 @@ Page({
                 title: getApp().globalData.Language.getMapText('查询到') + res.total + getApp().globalData.Language.getMapText('条疑似重复项目信息'),
                 icon: "none"
             })
-            this.setData({
+            if (wx.getStorageSync('userMsg').siteid != 'HY') this.setData({
                 repetitionShow: true,
                 repetitionList: res.data
             })
@@ -382,7 +383,7 @@ Page({
                 title: getApp().globalData.Language.getMapText('提示'),
                 content: getApp().globalData.Language.getMapText('是否继续创建项目'),
                 cancelText: getApp().globalData.Language.getMapText('取消'),
-                confirmText: getApp().globalData.Language.getMapText('确定'),
+                confirmText: getApp().globalData.Language.getMapText('创建'),
                 complete: (res) => {
                     if (res.confirm) that.handleSubmit(true);
                 }
@@ -414,7 +415,21 @@ Page({
             if (this.data.siteid == 'HY') {
                 wx.showModal({
                     title: getApp().globalData.Language.getMapText('提示'),
-                    content: getApp().globalData.Language.getMapText('该项目疑似重复,是否确认创建项目'),
+                    content: getApp().globalData.Language.joint([{
+                            v: '查询到',
+                            t: 1
+                        },
+                        {
+                            v: query.total,
+                            r: '“',
+                            f: "”"
+                        }, {
+                            v: '条疑似重复项目信息,是否确定继续创建项目',
+                            t: 1,
+                        }
+                    ]),
+                    cancelText: getApp().globalData.Language.getMapText('取消'),
+                    confirmText: getApp().globalData.Language.getMapText('创建'),
                     complete: (res) => {
                         if (res.confirm) that.handleSubmit(true);
                     }

+ 9 - 9
packageA/project/detail.js

@@ -181,15 +181,21 @@ Page({
         }, {
             label: "品牌是否填报方植入",
             value: data.isfillbrangd == 1 ? '是' : (data.isfillbrangd + "").length == 0 ? '' : "否"
-        }, {
+        },  {
+            label: "项目来源",
+            value: data.source
+        },{
             label: "赢率",
             value: data.winrate
+        }, {
+            label: "负责人",
+            value: data.name
         }, {
             label: "项目状态",
             value: getApp().globalData.Language.getMapText(data.status)
         }, {
-            label: "负责人",
-            value: data.name
+            label: "结案/失败原因",
+            value: data.status == '已结案' ? data.endreason : data.defeattype + (data.defeatreason ? "," + data.defeatreason : data.defeatreason)
         }];
         if (wx.getStorageSync('userMsg').siteid == 'HY') list1 = list1.filter(v => !["项目预算(万元)", "总投资额(万元)", "造价(万元)"].includes(v.label))
         this.setData({
@@ -240,12 +246,6 @@ Page({
             }, {
                 label: "报备审核时间",
                 value: data.reportcheckdate
-            }, {
-                label: "结案原因",
-                value: data.endreason
-            }, {
-                label: "失败原因",
-                value: data.defeattype + (data.defeatreason ? "," + data.defeatreason : data.defeatreason)
             }, {
                 label: "转手次数",
                 value: data.changecount

+ 30 - 12
packageA/project/modules/contacts/add/index.js

@@ -83,15 +83,6 @@ Page({
                 valueName: "sys_enterpriseid",
                 required: false,
                 checking: "base",
-            }, {
-                label: "单位",
-                error: false,
-                errMsg: "",
-                type: "text",
-                value: "",
-                valueName: "company",
-                required: false,
-                checking: "base"
             }, {
                 label: "部门",
                 error: false,
@@ -100,7 +91,7 @@ Page({
                 value: "",
                 placeholder: "联系人所属部门",
                 valueName: "depname",
-                required: false,
+                required: true,
                 checking: "base"
             },
             {
@@ -111,7 +102,7 @@ Page({
                 value: "",
                 placeholder: "联系人职位",
                 valueName: "position",
-                required: false,
+                required: true,
                 checking: "base"
             },
             {
@@ -232,12 +223,39 @@ Page({
                     } else {
                         // v.value = Object.hasOwn(item, v.valueName) ? item[v.valueName] : v.value;
                         v.value = item[v.valueName] || v.value || '';
-                        if (v.valueName == 'sys_enterpriseid') v.disabled = true || item.enterprisename
+                        if (v.valueName == 'sys_enterpriseid') {
+                            v.query = v.query + ('&sys_phonebookid=' + (options.sys_phonebookid ? options.sys_phonebookid : item.sys_phonebookid || 0))
+                            console.log(v)
+                        }
                     }
                     return v
                 })
             });
             this.selectComponent("#Form").confirm();
+            if (item.sa_project_contactsid) return;
+            _Http.basic({
+                "id": "20231215134204",
+                "content": {
+                    "sys_phonebookid": item.sys_phonebookid,
+                    "nocache": true,
+                    "pageSize": 1,
+                    "where": {
+                        "condition": ""
+                    },
+                    "sa_projectid": options.sa_projectid,
+                    "total": 1
+                },
+            }).then(res => {
+                if (res.code == 1 && res.total) {
+                    let value = [res.data[0].enterprisename, [res.data[0].sys_enterpriseid]]
+                    let index = this.data.form.findIndex(v => v.label == '关联企业')
+                    if (index != -1) this.setData({
+                        [`form[${index}].value`]: value
+                    })
+                }
+                console.log("获取一条关联企业", res)
+            })
+
         }
         getApp().globalData.Language.getLanguagePackage(this, '联系人');
     },

+ 5 - 4
packageA/project/modules/contacts/quickly/index.js

@@ -57,6 +57,10 @@ Page({
             item
         } = e.currentTarget.dataset;
         delete(item.tag1)
+        return wx.redirectTo({
+            url: `/packageA/project/modules/contacts/add/index?sa_projectid=${this.data.content.sa_projectid}&data=${JSON.stringify(item)}&sys_phonebookid=${item.sys_phonebookid}`,
+        })
+
         item.sa_project_contactsid = 0;
         item.sa_projectid = this.data.content.sa_projectid;
         item.ownertable = "sa_project";
@@ -83,10 +87,7 @@ Page({
                 });
             }, 500)
         })
-        return
-        wx.redirectTo({
-            url: `/packageA/project/modules/contacts/add/index?sa_projectid=${this.data.content.sa_projectid}&data=${JSON.stringify(item)}`,
-        })
+       
     },
     onSearch({
         detail

+ 14 - 17
packageA/project/modules/contacts/select/index.js

@@ -4,6 +4,7 @@ Page({
         item: null,
         radio: true,
         content: {
+            sys_phonebookid: 0,
             "nocache": true,
             "pageNumber": 1,
             "pageTotal": 1,
@@ -14,28 +15,24 @@ Page({
         }
     },
     onLoad(options) {
+        if (options.sys_phonebookid) this.data.content.sys_phonebookid = options.sys_phonebookid;
         this.data.content.sa_projectid = getCurrentPages().find(v => v.__route__ == 'packageA/project/detail').data.sa_projectid
         /* 从表单组件进入进入 */
         this.getList()
     },
     getList(init = false) {
-        _Http.init(this.data.content, init).then(content => {
-            _Http.basic({
-                "id": 20221027143702,
-                content
-            }).then(res => {
-                console.log("选择客户列表", res)
-                this.selectComponent('#ListBox').RefreshToComplete();
-                if (res.code != '1') return wx.showToast({
-                    title: res.msg,
-                    icon: "none"
-                })
-                this.setData({
-                    content: _Http.paging(content, res),
-                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
-                })
-                this.getTags();
-            })
+        //init 用于初始化分页
+        if (init.detail != undefined) init = init.detail;
+        let content = this.data.content;
+        if (init) content.pageNumber = 1;
+        if (content.pageNumber > content.pageTotal) return;
+        _Http.basic({
+            "id": "20231215134204",
+            content
+        }).then(res => {
+            console.log("选择客户列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            if (res.code != '1') return getApp().globalData.Language.showToast(res.msg) 
         })
     },
     /* 获取列表标签 */

+ 7 - 0
packageA/project/modules/contacts/select/index.scss

@@ -1,5 +1,12 @@
 
 
+
+.leader {
+    font-size: 22rpx;
+    margin-top: 8rpx;
+    padding-bottom: 10rpx;
+}
+
 .total {
     height: 60rpx;
     line-height: 60rpx;

+ 3 - 0
packageA/project/modules/contacts/select/index.wxml

@@ -16,6 +16,9 @@
                     <van-tag custom-class='tag' wx:for="{{item.tags.systemtag}}" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
                     <van-tag custom-class='tag' wx:for="{{item.tags.datatag}}" wx:for-item='tag' color='#FAAB16' text-color='#fff' round>{{language[tag]||tag}}</van-tag>
                 </view>
+                <view class="leader">
+                    {{language['负责人']||'负责人'}}:{{item.leader}}
+                </view>
             </view>
             <view class="checkbox" wx:if="{{!radio}}">
                 <van-checkbox value='{{handle.isCheck(item.sys_enterpriseid,result)}}' />

+ 10 - 0
packageA/project/modules/contract/index.js

@@ -11,6 +11,16 @@ Component({
             type: Boolean
         }
     },
+    lifetimes: {
+        attached: function () {
+            if (wx.getStorageSync('siteP').siteid == 'HY') {
+                this.setData({
+                    typeList: this.data.typeList.filter(v => v.name != '居间协议')
+                })
+            }
+            getApp().globalData.Language.getLanguagePackage(this)
+        }
+    },
     data: {
         typeShow: false,
         typeList: [{

+ 27 - 2
packageA/publicClue/addClue.js

@@ -217,12 +217,16 @@ Page({
             label: "来源",
             error: false,
             errMsg: "",
-            type: "text",
+            type: "selector",
+            range: [],
+            rangeKey: "name",
+            selectKey: "value",
+            rangeIndex: "",
             value: "",
             placeholder: "来源",
             valueName: "cluesource",
             checking: "base",
-            required: false
+            required: true
         }, {
             label: "线索概括",
             error: false,
@@ -331,6 +335,27 @@ Page({
                 })
             }
         })
+        /* 获取来源 */
+        _Http.basic({
+            "classname": "sysmanage.develop.optiontype.optiontype",
+            "method": "optiontypeselect",
+            "content": {
+                "typename": "cluesource",
+                pageSize: 9999
+            }
+        }).then(res => {
+            console.log("获取线索来源", res)
+            if (res.code == '1') {
+                let item = form.find(v => v.label == '来源');
+                item.range = res.code == '1' ? res.data.map(v => {
+                    v.name = getApp().globalData.Language.getMapText(v.value)
+                    return v
+                }) : [];
+                this.setData({
+                    form
+                })
+            }
+        })
 
     },
     /* 打断 */

+ 29 - 3
packageA/publicCustomer/addAndEditor.js

@@ -186,12 +186,16 @@ Page({
             label: "客户来源",
             error: false,
             errMsg: "",
-            type: "textarea",
+            type: "selector",
+            range: [],
+            rangeKey: "name",
+            selectKey: "value",
+            rangeIndex: "",
             value: "",
-            placeholder: "客户来源",
+            placeholder: "来源",
             valueName: "source",
             checking: "base",
-            required: false
+            required: true
         }],
         content: {
             "sa_customersid": 0, //新增是传0
@@ -448,6 +452,28 @@ Page({
                 form: this.data.form
             })
         }
+        /* 获取来源 */
+        _Http.basic({
+            "classname": "sysmanage.develop.optiontype.optiontype",
+            "method": "optiontypeselect",
+            "content": {
+                "typename": "cluesource",
+                pageSize: 9999
+            }
+        }).then(res => {
+            console.log("获取线索来源", res)
+            if (res.code == '1') {
+                let form = this.data.form;
+                let item = form.find(v => v.label == '客户来源');
+                item.range = res.code == '1' ? res.data.map(v => {
+                    v.name = getApp().globalData.Language.getMapText(v.value)
+                    return v
+                }) : [];
+                this.setData({
+                    form
+                })
+            }
+        })
     },
     /* 工商查询 */
     introduce({

+ 27 - 2
packageA/saleAdmin/insert.js

@@ -320,12 +320,16 @@ Page({
                 label: "来源",
                 error: false,
                 errMsg: "",
-                type: "text",
+                type: "selector",
+                range: [],
+                rangeKey: "name",
+                selectKey: "value",
+                rangeIndex: "",
                 value: "",
                 placeholder: "来源",
                 valueName: "cluesource",
                 checking: "base",
-                required: false
+                required: true
             }, {
                 label: "线索概括",
                 error: false,
@@ -468,6 +472,27 @@ Page({
                 })
             }
         });
+        /* 获取来源 */
+        _Http.basic({
+            "classname": "sysmanage.develop.optiontype.optiontype",
+            "method": "optiontypeselect",
+            "content": {
+                "typename": "cluesource",
+                pageSize: 9999
+            }
+        }).then(res => {
+            console.log("获取线索来源", res)
+            if (res.code == '1') {
+                let item = form.find(v => v.label == '来源');
+                item.range = res.code == '1' ? res.data.map(v => {
+                    v.name = getApp().globalData.Language.getMapText(v.value)
+                    return v
+                }) : [];
+                this.setData({
+                    form
+                })
+            }
+        })
         this.setData({
             form
         })

+ 24 - 2
packageA/saleClue/addClue.js

@@ -209,12 +209,15 @@ Page({
                 label: "来源",
                 error: false,
                 errMsg: "",
-                type: "text",
+                type: "selector",
+                range: [],
+                rangeKey: "value",
+                rangeIndex: "",
                 value: "",
                 placeholder: "来源",
                 valueName: "cluesource",
                 checking: "base",
-                required: false
+                required: true
             }, {
                 label: "线索概括",
                 error: false,
@@ -325,6 +328,25 @@ Page({
                 form
             })
         })
+
+        /* 获取来源 */
+        _Http.basic({
+            "classname": "sysmanage.develop.optiontype.optiontype",
+            "method": "optiontypeselect",
+            "content": {
+                "typename": "cluesource",
+                pageSize: 9999
+            }
+        }).then(res => {
+            console.log("获取线索来源", res)
+            if (res.code == '1') {
+                let item = form.find(v => v.label == '来源');
+                item.range = res.code == '1' ? res.data : [];
+                this.setData({
+                    form
+                })
+            }
+        })
     },
     /* 打断 */
     interrupt({

+ 166 - 0
packageA/saleClue/audit/client.js

@@ -0,0 +1,166 @@
+let _Http = getApp().globalData.http;
+Page({
+    data: {
+        detail: null,
+        list: [],
+        showPage: "转化客户信息",
+        showItemList: [{
+            label: "客户地址",
+            key: 'address'
+        }, {
+            label: "企业税号",
+            key: 'taxno'
+        }, {
+            label: "客户类型",
+            key: 'type'
+        }, {
+            label: "负责人",
+            key: 'leaderName'
+        }, {
+            label: "负责手机号",
+            key: 'phonenumber'
+        }, {
+            label: "成交状态",
+            key: 'tradingstatus'
+        }, {
+            label: "最近跟进时间",
+            key: 'followdate'
+        }, {
+            label: "归属应用",
+            key: 'systemapp'
+        }]
+    },
+    onLoad(options) {
+        let detail = JSON.parse(options.data),
+            customersnote = detail.customersnote;
+        let industry = []
+        try {
+            industry = JSON.parse(customersnote.industry)
+        } catch (error) {
+        }
+        this.setData({
+            detail,
+            showMsgList: [{
+                label: "客户名称",
+                value: customersnote.enterprisename
+            }, {
+                label: "企业简称",
+                value: customersnote.abbreviation
+            }, {
+                label: "客户类型",
+                value: customersnote.type
+            }, {
+                label: "客户等级",
+                value: customersnote.customergrade
+            }, {
+                label: "客户分类",
+                value: customersnote.customergrade
+            }, {
+                label: "联系人",
+                value: customersnote.contactsinfo.name
+            }, {
+                label: "联系方式",
+                value: customersnote.contactsinfo.phonenumber || customersnote.contactsinfo.telephone
+            }, {
+                label: "客户行业",
+                value: industry.length ? industry.join(",") : ''
+            }, {
+                label: "税号",
+                value: customersnote.taxno
+            }, {
+                label: "法人",
+                value: customersnote.contact
+            }, {
+                label: "联系电话",
+                value: customersnote.phonenumber
+            }, {
+                label: "省市县",
+                value: [customersnote.province, customersnote.city, customersnote.county]
+            }, {
+                label: "详细地址",
+                value: customersnote.address
+            }, {
+                label: "上级企业",
+                value: customersnote.parent_enterprisename
+            }, {
+                label: "客户来源",
+                value: customersnote.source
+            }, {
+                label: "归属经销商",
+                value: customersnote.agents_enterprisename
+            }]
+        })
+        this.queryRepetition()
+    },
+    /* 查询是否重复 */
+    queryRepetition(e) {
+        _Http.basic({
+            "id": 20221208172002,
+            content: {
+                pageSize: 9999,
+                ...this.data.detail.customersnote
+            }
+        }).then(res => {
+            console.log("客户查重", res)
+            if (res.code == 0) return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            });
+            if (res.data.length) {
+                this.setData({
+                    list: res.data.map(v => {
+                        try {
+                            v.leaderName = v.leader[0].name
+                        } catch (error) {
+                            v.leaderName = ""
+                        }
+                        return v
+                    }),
+                    showPage: "重复客户",
+                })
+                wx.showModal({
+                    content: `查询到${res.data.length}条疑似重复客户信息\n
+                    当前线索不可转化客户`,
+                    confirmText: "我知道了",
+                    showCancel: false
+                })
+            }
+        })
+    },
+    tabChange({
+        detail
+    }) {
+        this.setData({
+            showPage: detail.title
+        })
+    },
+    handleAudit(e) {
+        let status = e.currentTarget.dataset.type;
+        wx.showLoading({
+            title: '操作中...',
+        })
+        _Http.basic({
+            "id": 20240907134204,
+            "content": {
+                "sat_orderclueid": this.data.detail.sat_orderclueid,
+                status
+            }
+        }).then(res => {
+            console.log(status + "审核", res)
+            wx.hideLoading()
+            wx.showToast({
+                title: res.code == 0 ? res.msg : '操作成功',
+                icon: "none",
+                mask: res.code == 1
+            });
+            if (res.code == 1) {
+                getCurrentPages().forEach(v => {
+                    if (v.__route__ == 'packageA/saleClue/detail') v.getDetail()
+                })
+                setTimeout(() => {
+                    wx.navigateBack()
+                }, 800)
+            }
+        })
+    }
+})

+ 4 - 0
packageA/saleClue/audit/client.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "审核转化客户"
+}

+ 112 - 0
packageA/saleClue/audit/client.scss

@@ -0,0 +1,112 @@
+.msg-box,
+.item {
+	width: 100vw;
+	background-color: #FFFFFF;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+
+
+	.row {
+		display: flex;
+		line-height: 40rpx;
+		margin-bottom: 20rpx;
+		font-weight: 400;
+		font-size: 28rpx;
+
+		.label {
+			color: #666666;
+			flex-shrink: 0;
+		}
+
+		.value {
+			color: #333333;
+		}
+
+	}
+}
+
+.head {
+	padding: 24rpx 30rpx;
+	font-family: PingFang SC, PingFang SC;
+	font-weight: bold;
+	font-size: 30rpx;
+	color: #333333;
+}
+.item {
+	box-shadow: inset 0rpx -2rpx 0rpx 2rpx #DDDDDD;
+
+	.title {
+		line-height: 44rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #333333;
+	}
+
+	.tag-box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		margin-bottom: 6rpx;
+
+		.datatag,
+		.systemtag {
+			flex-shrink: 0;
+			margin-top: 6rpx;
+			background: #3874f6;
+			color: #ffffff;
+			margin-right: 10rpx;
+			display: flex;
+			align-items: center;
+			height: 40rpx;
+			font-size: 20rpx;
+			padding: 0 10rpx;
+			border-radius: 20rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+		}
+
+		.datatag {
+			background: #FA8C16;
+		}
+	}
+
+	.row {
+		margin-bottom: 8rpx;
+	}
+}
+
+
+
+.new-footer {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	position: fixed;
+	width: 100vw;
+	padding: 0 30rpx;
+	box-sizing: border-box;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+
+	.submit {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 0 !important;
+		width: 334rpx;
+		height: 90rpx !important;
+		background: #3874F6;
+		border-radius: 8rpx !important;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.not {
+		width: 690rpx;
+	}
+
+}

+ 41 - 0
packageA/saleClue/audit/client.wxml

@@ -0,0 +1,41 @@
+<van-tabs wx:if="{{list.length}}" bindchange="tabChange" color='var(--assist)' title-active-color='var(--assist)' custom-class='custom-class' bind:change="tabChange">
+	<van-tab title="重复客户" />
+	<van-tab title="转化客户信息" />
+</van-tabs>
+<block wx:if="{{showPage == '重复客户'}}">
+	<view class="head">
+		重复客户
+	</view>
+	<view class="item" wx:for="{{list}}" wx:key="sys_enterpriseid">
+		<view class="title">
+			{{item.enterprisename}}
+		</view>
+
+    <view class="tag-box">
+        <view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{item}}</view>
+        <view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{item}}</view>
+    </view>
+
+		<view class="row" wx:for="{{showItemList}}" wx:for-item="it" wx:key="label">
+			<view class="label">{{it.label}}:</view>
+			<view class="value">{{item[it.key] || '--'}}</view>
+		</view>
+
+	</view>
+</block>
+
+<view class="msg-box" wx:else>
+	<view class="row" wx:for="{{showMsgList}}" wx:key="label">
+		<view class="label">{{item.label}}:</view>
+		<view class="value">{{item.value || '--'}}</view>
+	</view>
+</view>
+
+<view style="height: 130rpx;" />
+<view class="new-footer">
+	<block wx:if="{{!list.length}}">
+		<van-button custom-class='submit' color='#EB4B5C' data-type="不通过" bindclick='handleAudit'>审核不通过</van-button>
+		<van-button custom-class='submit' color='#5AB73F' data-type="通过" bindclick='handleAudit'>审核通过</van-button>
+	</block>
+	<van-button wx:else custom-class='submit not' color='#EB4B5C' data-type="不通过" bindclick='handleAudit'>审核不通过</van-button>
+</view>

+ 160 - 0
packageA/saleClue/audit/project.js

@@ -0,0 +1,160 @@
+let _Http = getApp().globalData.http;
+Page({
+    data: {
+        detail: null,
+        list: [],
+        showPage: "转化项目信息",
+        showItemList: [{
+            label: "项目状态",
+            key: 'status'
+        }, {
+            label: "项目编号",
+            key: 'projectnum'
+        }, {
+            label: "项目地址",
+            key: 'address'
+        }, {
+            label: "项目类型",
+            key: 'projecttype'
+        }, {
+            label: "领域",
+            key: 'tradefield'
+        }, {
+            label: "品牌",
+            key: 'brandname'
+        }, {
+            label: "负责人",
+            key: 'leaderName'
+        }, {
+            label: "负责人手机号",
+            key: 'phonenumber'
+        }]
+    },
+    onLoad(options) {
+        let detail = JSON.parse(options.data),
+            projectnote = detail.projectnote;
+        this.setData({
+            detail,
+            showMsgList: [{
+                label: "项目名称",
+                value: projectnote.projectname
+            }, {
+                label: "项目类型",
+                value: projectnote.projecttype
+            }, {
+                label: "项目方阶段",
+                value: projectnote.abbreviation
+            }, {
+                label: "项目等级",
+                value: projectnote.grade
+            }, {
+                label: "省市县",
+                value: [projectnote.province, projectnote.city, projectnote.county]
+            }, {
+                label: "详细地址",
+                value: projectnote.address
+            }, {
+                label: "项目规模",
+                value: projectnote.scale + ' ' + projectnote.unitname
+            }, {
+                label: "项目预算(万元)",
+                value: projectnote.budgetary
+            }, {
+                label: "总投资额(万元)",
+                value: projectnote.totalinvestment
+            }, {
+                label: "造价(万元)",
+                value: projectnote.costofconstruction
+            }, {
+                label: "预计开工时间",
+                value: projectnote.begdate_due && projectnote.begdate_due != 'null' ? projectnote.begdate_due : ''
+            }, {
+                label: "预计完工时间",
+                value: projectnote.enddate_due && projectnote.enddate_due != 'null' ? projectnote.enddate_due : ''
+            }, {
+                label: "预计签约时间",
+                value: projectnote.signdate_due || ''
+            }, {
+                label: "领域",
+                value: projectnote.tradefield
+            }, {
+                label: "品牌",
+                value: projectnote.brandname
+            }, {
+                label: "品牌是否由提报方植入",
+                value: projectnote.isfillbrangd == 1 ? '是' : '否'
+            }]
+        })
+        this.queryRepetition()
+    },
+    /* 查询是否重复 */
+    queryRepetition(e) {
+        _Http.basic({
+            "id": 20221208184202,
+            content: {
+                pageSize: 9999,
+                ...this.data.detail.projectnote
+            }
+        }).then(res => {
+            console.log("项目查重", res)
+            if (res.code == 0) return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            });
+            if (res.data.length) {
+                this.setData({
+                    list: res.data.map(v => {
+                        try {
+                            v.leaderName = v.leader[0].name
+                        } catch (error) {
+                            v.leaderName = ""
+                        }
+                        return v
+                    }),
+                    showPage: "重复项目",
+                })
+                wx.showModal({
+                    content: `查询到${res.data.length}条疑似重复项目信息`,
+                    confirmText: "我知道了",
+                    showCancel: false
+                })
+            }
+        })
+    },
+    tabChange({
+        detail
+    }) {
+        this.setData({
+            showPage: detail.title
+        })
+    },
+    handleAudit(e) {
+        let status = e.currentTarget.dataset.type;
+        wx.showLoading({
+            title: '操作中...',
+        })
+        _Http.basic({
+            "id": 20240907162304,
+            "content": {
+                "sat_orderclueid": this.data.detail.sat_orderclueid,
+                status
+            }
+        }).then(res => {
+            console.log(status + "审核", res)
+            wx.hideLoading()
+            wx.showToast({
+                title: res.code == 0 ? res.msg : '操作成功',
+                icon: "none",
+                mask: res.code == 1
+            });
+            if (res.code == 1) {
+                getCurrentPages().forEach(v => {
+                    if (v.__route__ == 'packageA/saleClue/detail') v.getDetail()
+                })
+                setTimeout(() => {
+                    wx.navigateBack()
+                }, 800)
+            }
+        })
+    }
+})

+ 4 - 0
packageA/saleClue/audit/project.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "审核转化项目"
+}

+ 111 - 0
packageA/saleClue/audit/project.scss

@@ -0,0 +1,111 @@
+.msg-box,
+.item {
+	width: 100vw;
+	background-color: #FFFFFF;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+
+
+	.row {
+		display: flex;
+		line-height: 40rpx;
+		margin-bottom: 20rpx;
+		font-weight: 400;
+		font-size: 28rpx;
+
+		.label {
+			color: #666666;
+			flex-shrink: 0;
+		}
+
+		.value {
+			color: #333333;
+		}
+
+	}
+}
+
+.item {
+	box-shadow: inset 0rpx -2rpx 0rpx 2rpx #DDDDDD;
+
+	.title {
+		line-height: 44rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #333333;
+	}
+
+	.tag-box {
+		display: flex;
+		align-items: center;
+		width: 100%;
+		margin-bottom: 6rpx;
+
+		.datatag,
+		.systemtag {
+			flex-shrink: 0;
+			margin-top: 6rpx;
+			background: #3874f6;
+			color: #ffffff;
+			margin-right: 10rpx;
+			display: flex;
+			align-items: center;
+			height: 40rpx;
+			font-size: 20rpx;
+			padding: 0 10rpx;
+			border-radius: 20rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+		}
+
+		.datatag {
+			background: #FA8C16;
+		}
+	}
+
+	.row {
+		margin-bottom: 8rpx;
+	}
+}
+
+.head {
+	padding: 24rpx 30rpx;
+	font-family: PingFang SC, PingFang SC;
+	font-weight: bold;
+	font-size: 30rpx;
+	color: #333333;
+}
+
+.new-footer {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	position: fixed;
+	width: 100vw;
+	padding: 0 30rpx;
+	box-sizing: border-box;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+
+	.submit {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		padding: 0 !important;
+		width: 334rpx;
+		height: 90rpx !important;
+		background: #3874F6;
+		border-radius: 8rpx !important;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.not {
+		width: 690rpx;
+	}
+
+}

+ 37 - 0
packageA/saleClue/audit/project.wxml

@@ -0,0 +1,37 @@
+<van-tabs wx:if="{{list.length}}" bindchange="tabChange" color='var(--assist)' title-active-color='var(--assist)' custom-class='custom-class' bind:change="tabChange">
+	<van-tab title="重复项目" />
+	<van-tab title="转化项目信息" />
+</van-tabs>
+<block wx:if="{{showPage == '重复项目'}}">
+	<view class="head">
+		重复项目
+	</view>
+	<view class="item" wx:for="{{list}}" wx:key="sys_enterpriseid">
+		<view class="title">
+			{{item.projectname}}
+		</view>
+		<view class="tag-box">
+			<view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{item}}</view>
+			<view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{item}}</view>
+		</view>
+		<view class="row" wx:for="{{showItemList}}" wx:for-item="it" wx:key="label">
+			<view class="label">{{it.label}}:</view>
+			<view class="value">{{item[it.key] || '--'}}</view>
+		</view>
+	</view>
+</block>
+
+<view class="msg-box" wx:else>
+	<view class="row" wx:for="{{showMsgList}}" wx:key="label">
+		<view class="label">{{item.label}}:</view>
+		<view class="value">{{item.value || '--'}}</view>
+	</view>
+</view>
+
+<view style="height: 130rpx;" />
+<view class="new-footer">
+	<block>
+		<van-button custom-class='submit' color='#EB4B5C' data-type="不通过" bindclick='handleAudit'>审核不通过</van-button>
+		<van-button custom-class='submit' color='#5AB73F' data-type="通过" bindclick='handleAudit'>审核通过</van-button>
+	</block>
+</view>

+ 206 - 38
packageA/saleClue/change.js

@@ -1,5 +1,5 @@
-const _Http = getApp().globalData.http,
-    getTime = require("../../utils/getTime");
+let _Http = getApp().globalData.http,
+    count = null;
 
 Page({
     data: {
@@ -13,7 +13,9 @@ Page({
                 placeholder: "项目名称",
                 valueName: "projectname",
                 checking: "base",
-                required: true
+                required: true,
+                interrupt: true,
+                permit: true, //无视errMsg 运行提交
             }, {
                 label: "项目类型",
                 error: false,
@@ -253,69 +255,235 @@ Page({
             })
         })
     },
+    async interrupt(e) {
+        let {
+            data,
+            form,
+            temporary
+        } = e.detail;
+        if (data.label == "项目名称") {
+            if (data.value) {
+                const result = await this.selectComponent("#projectname").queryList(data.value);
+                if (result) {
+                    data.errMsg = '疑似重复';
+                    form[0] = data;
+                    this.setData({
+                        form
+                    })
+                } else {
+                    if (data.errMsg) {
+                        data.errMsg = '';
+                        form[0] = data;
+                        this.setData({
+                            form
+                        })
+                    }
+                }
+            } else {
+                if (data.errMsg) {
+                    data.errMsg = '';
+                    form[0] = data;
+                    this.setData({
+                        form
+                    })
+                }
+            }
+        }
+    },
     setHY() {
         let required = ["预计签约时间", "项目等级", "详细地址", "项目规模"],
             remove = ["项目预算(万元)", "总投资额(万元)", "造价(万元)"];
         this.setData({
             form: this.data.form.filter(v => !remove.includes(v.label)).map(v => {
                 if (required.includes(v.label)) v.required = true;
+                // if (v.valueName == 'projectname') v.interrupt = false;
                 return v
-            })
+            }),
+            siteid: wx.getStorageSync('userMsg').siteid,
         })
     },
-    submit() {
-        let content = {
-            ...this.data.content,
-            ...this.selectComponent("#Form").submit()
-        };
-        content.sa_brandid = content.sa_brandid ? content.sa_brandid[1][0] : 0;
-        content.city = content.region[1] || "";
-        content.county = content.region[2] || "";
-        content.province = content.region[0] || "";
 
-        if (content.scale.length != 0) {
-            if (content.scale == 0) {
+    /* 查询是否重复 */
+    async queryRepetition(e) {
+        let data = this.selectComponent("#Form").query();
+        /* if (data.projectname == '') return wx.showToast({
+            title: `您还未填写项目名称`,
+            icon: "none"
+        }); */
+        data.province = data.region[0] || "";
+        data.city = data.region[1] || "";
+        data.county = data.region[2] || "";
+        let res = await this.handleQueryRepetition({
+            sa_projectid: this.data.sa_projectid,
+            ...data
+        });
+        console.log("查询重复", res)
+        if (res.code != '1') return wx.showToast({
+            title: res.msg,
+            icon: "none"
+        });
+        this.setData({
+            countDown: 6
+        });
+        count = setInterval(() => {
+            let countDown = this.data.countDown;
+            if (countDown == 0) {
+                clearInterval(count);
                 this.setData({
-                    loading: false
-                })
-                wx.showToast({
-                    title: '项目规模不可为0',
-                    icon: "none"
+                    countDown: ""
                 })
-                return;
-            };
-
-            if (content.unitname == "") {
+            } else {
+                countDown--;
                 this.setData({
-                    loading: false
+                    countDown
+                })
+            }
+        }, 1000)
+        if (res.total == 0) {
+            wx.showToast({
+                title: '未查询到疑似重复的项目信息',
+                icon: "none"
+            })
+            this.data.repetitionShow = false;
+        } else {
+            wx.showToast({
+                title: `查询到${res.total}条疑似重复项目信息`,
+                icon: "none"
+            })
+            if (wx.getStorageSync('userMsg').siteid != 'HY') this.setData({
+                repetitionShow: true,
+                repetitionList: res.data
+            })
+        }
+    },
+    repClose() {
+        if (this.data.isSubmit) {
+            let that = this;
+            wx.showModal({
+                title: '提示',
+                content: `是否确定继续创建项目`,
+                confirmText: "创建",
+                complete: (res) => {
+                    if (res.confirm) that.handleSubmit(true);
+                }
+            })
+        }
+        this.setData({
+            repetitionShow: false,
+            isSubmit: false
+        })
+    },
+    /* 处理查重 */
+    handleQueryRepetition(content) {
+        return _Http.basic({
+            "id": 20221208184202,
+            content
+        })
+    },
+    async submit() {
+        let data = this.selectComponent("#Form").submit(),
+            that = this;
+        data.province = data.region[0] || "";
+        data.city = data.region[1] || "";
+        data.county = data.region[2] || "";
+        let query = await this.handleQueryRepetition({
+            sa_projectid: this.data.sa_projectid,
+            ...data
+        });
+        if (query.total != 0) {
+            if (this.data.siteid == 'HY') {
+                wx.showModal({
+                    title: '提示',
+                    content: `查询到${query.total}条疑似重复项目信息,是否确定继续创建项目`,
+                    confirmText: "创建",
+                    complete: (res) => {
+                        if (res.confirm) that.handleSubmit(true);
+                    }
                 })
+            } else {
                 wx.showToast({
-                    title: '还未选择项目规模单位',
+                    title: `查询到${query.total}条疑似重复项目信息`,
                     icon: "none"
                 })
-                return;
+                this.setData({
+                    repetitionShow: true,
+                    repetitionList: query.data,
+                    isSubmit: true
+                })
             }
+        } else {
+            this.handleSubmit();
+        }
+    },
+    handleSubmit(tag = false) {
+        this.setData({
+            loading: true
+        })
+        let data = {
+            ...this.data.content,
+            ...this.selectComponent("#Form").submit()
+        };
+        data.province = data.region[0] || "";
+        data.city = data.region[1] || "";
+        data.county = data.region[2] || "";
+        data.tradefields = [data.tradefields];
+        data.sa_brandid = data.sa_brandid ? data.sa_brandid[1][0] : 0;
+
+        if (data.scale.length != 0 && data.scale == 0) {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '项目规模不可为0',
+                icon: "none"
+            })
+            return;
+        }
+
+        if (data.unitname == "") {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '还未选择项目规模单位',
+                icon: "none"
+            })
+            return;
         }
+
+        delete(data.region);
         _Http.basic({
-            "id": "20221124154902",
-            content
+            "id": 20221124154902,
+            content: data
         }).then(res => {
+            this.setData({
+                loading: false
+            })
             console.log("转化", res)
             wx.showToast({
-                title: res.code != '1' ? res.msg : getApp().globalData.Language.getMapText('转化成功'),
+                title: res.code != '1' ? res.msg : getApp().globalData.Language.getMapText(wx.getStorageSync('userMsg').siteid != 'HY' ? '提交成功' : '转化成功'),
                 icon: "none"
             })
             if (res.code != '1') return;
+            //绑定疑似重复标签
+            if (tag) _Http.basic({
+                "id": 20220929090901,
+                "content": {
+                    "ownertable": "sa_project",
+                    "ownerid": res.data.sa_projectid,
+                    "datatag": ["疑似重复"]
+                }
+            })
             setTimeout(() => {
-                wx.navigateBack()
-                getCurrentPages().forEach(item => {
-                    if (item.__route__ == 'packageA/saleClue/detail') {
-                        item.getDetail()
-                    }
-                })
-                wx.navigateTo({
-                    url: `/packageA/project/detail?id=${res.data.sa_projectid}`,
+                getCurrentPages().forEach(v => {
+                    if (v.__route__ == 'packageA/saleClue/detail') v.getDetail()
                 })
+                wx.navigateBack()
+                if (wx.getStorageSync('userMsg').siteid != 'HY') {
+                    wx.navigateTo({
+                        url: `/packageA/project/detail?id=${res.data.sa_projectid}`,
+                    })
+                }
             }, 300)
         })
     },

+ 3 - 1
packageA/saleClue/change.json

@@ -1,4 +1,6 @@
 {
-    "usingComponents": {},
+    "usingComponents": {
+        "projectname": "/packageA/project/modules/projectname/index"
+    },
     "navigationBarTitleText": "转化项目"
 }

+ 62 - 0
packageA/saleClue/change.scss

@@ -20,4 +20,66 @@
         color: #FFFFFF;
         margin-right: 30rpx;
     }
+}
+
+
+
+.popup {
+    .title {
+        position: sticky;
+        height: 80rpx;
+        line-height: 80rpx;
+        width: 100%;
+        text-align: center;
+        border-bottom: 1rpx solid #ddd;
+        font-weight: 600;
+        color: #333;
+        top: 0;
+        background-color: #fff;
+
+        .icon {
+            position: absolute;
+            right: 28rpx;
+            top: 22rpx;
+            color: #999;
+        }
+    }
+
+    .enterprise {
+        width: 100%;
+        box-sizing: border-box;
+        padding-left: 30rpx;
+        padding-right: 10rpx;
+        padding-bottom: 10rpx;
+        border-bottom: 1rpx solid #ddd;
+        margin-top: 10rpx;
+
+        .tag-box {
+            margin-top: 10rpx;
+
+            .tag {
+                height: 40rpx;
+                font-size: 20rpx;
+                font-family: PingFang SC-Regular, PingFang SC;
+                padding: 0 12rpx;
+                margin-right: 8rpx;
+            }
+        }
+
+        &_title {
+            line-height: 40rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            font-weight: bold;
+            color: #333333;
+        }
+
+        .exp {
+            line-height: 34rpx;
+            font-size: 24rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #666666;
+            margin-top: 8rpx;
+        }
+    }
 }

+ 25 - 2
packageA/saleClue/change.wxml

@@ -1,8 +1,31 @@
-<Yl_Headline title='基本信息'  bind:callBack='onChange' />
+<Yl_Headline title='基本信息' bind:callBack='onChange' />
 <Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt="interrupt" />
 <view style="height: 140rpx;" />
 <view class="new-footer">
+    <van-button custom-class='new-submit query' disabled='{{countDown ||disabled|| loading}}' bindclick='queryRepetition'>{{countDown?countDown+'S':language['查重']||"查重"}}</van-button>
     <van-button custom-class='new-submit' disabled='{{disabled}}' bindclick='submit'>{{language['提交']||'提交'}}</van-button>
 </view>
 
-<!-- type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' -->
+<!-- 查重 -->
+<van-popup show="{{ repetitionShow }}" custom-class='popup' round position="bottom" custom-style="height: 100%;" bind:close="repClose">
+    <view class="title">
+        查重
+        <van-icon custom-class='icon' size='40rpx' name="cross" bindtap="repClose" />
+    </view>
+    <navigator url="#" class="enterprise" wx:for="{{repetitionList}}" wx:key="sa_projectid">
+        <view class="enterprise_title">{{item.projectname}}</view>
+        <view class="tag-box">
+            <van-tag custom-class='tag' wx:for="{{item.tag_sys}}" wx:key="index" wx:for-item='tag' color='#3874f6' text-color='#fff' round>{{tag}}</van-tag>
+            <van-tag custom-class='tag' wx:for="{{item.tag}}" wx:key="index" wx:for-item='tag' color='#FA8C16' text-color='#fff' round>{{tag}}</van-tag>
+        </view>
+        <view class="exp">项目状态:{{item.status ||' --'}}</view>
+        <view class="exp">项目编号:{{item.projectnum ||' --'}}</view>
+        <view class="exp">项目地址:{{item.address ||' --'}}</view>
+        <view class="exp">项目类型:{{item.projecttype ||' --'}}</view>
+        <view class="exp">领域:{{item.tradefield||' --'}}</view>
+        <view class="exp">品牌:{{item.brandname||' --'}}</view>
+        <view class="exp">负责人:{{item.leader[0].name||' --'}}</view>
+        <view class="exp">手机号:{{item.phonenumber||" --"}}</view>
+    </navigator>
+</van-popup>
+<projectname id="projectname" siteid='{{siteid}}' />

+ 37 - 13
packageA/saleClue/detail.js

@@ -261,22 +261,36 @@ Page({
                 siteShow: true
             })
         }
-        if (this.data.isAdmin || isLeader) tabbarList = tabbarList.concat([{
+        if (this.data.isAdmin || isLeader) tabbarList.push({
             icon: "icon-bianji",
             label: "编辑"
-        }, {
-            icon: "icon-dibu-zhuanhuan",
-            label: "转化项目"
-        }, {
-            icon: "icon-dibu-zhuanhuan",
-            label: "转化客户"
-        }]);
-        if (editdataleader) tabbarList.push({
-            icon: "icon-zhuanyi",
-            label: "更换负责人"
         })
+
+        if (wx.getStorageSync('userMsg').siteid == 'HY') {
+            if (this.data.appAuth.options.includes('transferAudit') && detail.iscustomer == 0 && detail.istransformingtocustomer == 1) tabbarList.push({
+                icon: "icon-zhuanhuashenhe",
+                label: "转化客户审核"
+            })
+            if (this.data.appAuth.options.includes('transferProjectReview') && detail.isproject == 0 && detail.istransformingtoproject == 1) tabbarList.push({
+                icon: "icon-zhuanhuashenhe",
+                label: "转化项目审核"
+            })
+        }
+        if (this.data.isAdmin || isLeader) {
+            if (detail.isproject == 0 && detail.istransformingtoproject == 0) tabbarList.push({
+                icon: "icon-dibu-zhuanhuan",
+                label: "转化项目"
+            })
+            if (detail.iscustomer == 0 && detail.istransformingtocustomer == 0) tabbarList.push({
+                icon: "icon-dibu-zhuanhuan",
+                label: "转化客户"
+            })
+            if (editdataleader) tabbarList.push({
+                icon: "icon-zhuanyi",
+                label: "更换负责人"
+            })
+        }
         if (isLeader) {
-            // if (detail.isphonebook == 0) 
             tabbarList.push({
                 icon: "icon-baocunlianxiren",
                 label: "保存联系人"
@@ -291,7 +305,7 @@ Page({
             })
         }
         if (detail.status == '已转化') tabbarList = tabbarList.filter(item => {
-            return item.label == '编辑' || item.label == '跟进' || item.label == '转化客户' || item.label == '转化项目'
+            return item.label == '编辑' || item.label == '跟进' || item.label == '转化客户' || item.label == '转化项目' || item.label == '转化项目审核' || item.label == '转化客户审核'
         })
         if (detail.isproject) tabbarList = tabbarList.filter(v => v.label != '转化项目')
         if (detail.iscustomer) tabbarList = tabbarList.filter(v => v.label != '转化客户')
@@ -406,6 +420,16 @@ Page({
                     url: `/packageA/saleClue/translate?data=${JSON.stringify(this.data.detail)}`,
                 })
                 break;
+            case "转化项目审核":
+                wx.navigateTo({
+                    url: `/packageA/saleClue/audit/project?data=${JSON.stringify(this.data.detail)}`,
+                })
+                break;
+            case "转化客户审核":
+                wx.navigateTo({
+                    url: `/packageA/saleClue/audit/client?data=${JSON.stringify(this.data.detail)}`,
+                })
+                break;
             case "跟进":
                 wx.navigateTo({
                     url: `/packageA/publicClue/modules/follow/insert?sat_orderclueid=` + this.data.detail.sat_orderclueid

+ 76 - 37
packageA/saleClue/translate.js

@@ -161,12 +161,16 @@ Page({
             label: "客户来源",
             error: false,
             errMsg: "",
-            type: "textarea",
+            type: "selector",
+            range: [],
+            rangeKey: "name",
+            selectKey: "value",
+            rangeIndex: "",
             value: "",
-            placeholder: "客户来源",
+            placeholder: "来源",
             valueName: "source",
             checking: "base",
-            required: false
+            required: true
         }, {
             label: "归属经销商",
             error: false,
@@ -433,7 +437,27 @@ Page({
                 slot: "TXL",
                 required: true
             })
-
+            /* 获取来源 */
+            _Http.basic({
+                "classname": "sysmanage.develop.optiontype.optiontype",
+                "method": "optiontypeselect",
+                "content": {
+                    "typename": "cluesource",
+                    pageSize: 9999
+                }
+            }).then(res => {
+                console.log("获取线索来源", res)
+                if (res.code == '1') {
+                    let item = form.find(v => v.label == '客户来源');
+                    item.range = res.code == '1' ? res.data.map(v => {
+                        v.name = getApp().globalData.Language.getMapText(v.value)
+                        return v
+                    }) : [];
+                    this.setData({
+                        form
+                    })
+                }
+            })
             this.setData({
                 content: {
                     sat_orderclueid: data.sat_orderclueid,
@@ -444,6 +468,11 @@ Page({
         }
     },
     repClose() {
+        return this.setData({
+            repetitionShow: false,
+            isSubmit: false
+        })
+
         if (this.data.isSubmit) {
             let that = this;
             wx.showModal({
@@ -525,7 +554,7 @@ Page({
                 r: " "
             }, {
                 t: 1,
-                v: '条疑似重复客户信息',
+                v: '条疑似重复客户信息,不允许保存',
             }])
             this.setData({
                 repetitionShow: true,
@@ -550,17 +579,20 @@ Page({
             ...data
         });
         if (query.total != 0) {
-            getApp().globalData.Language.showToast([{
-                t: 1,
-                v: '查询到',
-                r: " "
-            }, {
-                v: query.total,
-                r: " "
-            }, {
-                t: 1,
-                v: '条疑似重复客户信息',
-            }])
+            wx.showModal({
+                content: getApp().globalData.Language.joint([{
+                    t: 1,
+                    v: '查询到',
+                    r: " "
+                }, {
+                    v: query.total,
+                    r: " "
+                }, {
+                    t: 1,
+                    v: '条疑似重复客户信息,不可转化客户',
+                }]),
+                confirmText: this.data.Language['确定'] || "我知道了"
+            })
             this.setData({
                 repetitionShow: true,
                 repetitionList: query.data,
@@ -596,7 +628,7 @@ Page({
                 title: res.data,
                 icon: "none"
             })
-            getApp().globalData.Language.showToast('转化成功')
+            getApp().globalData.Language.showToast(wx.getStorageSync('userMsg').siteid != 'HY' ? '提交成功' : '转化成功')
             //绑定疑似重复标签
             if (tag) _Http.basic({
                 "id": 20220929090901,
@@ -607,28 +639,35 @@ Page({
                 }
             })
             setTimeout(() => {
-                getCurrentPages().forEach(v => {
-                    switch (v.__route__) {
-                        case 'packageA/saleClue/index':
-                            v.getList(true);
-                            break;
-                        case 'packageA/setclient/detail':
-                            v.getDetail();
-                            break;
-                    }
-                })
-                let pages = getCurrentPages();
-                if (pages[pages.length - 2].__route__ == 'packageA/saleClue/detail') {
-                    wx.navigateBack();
-                    getCurrentPages().forEach(item => {
-                        console.log(item);
-                        if (item.__route__ == 'packageA/saleClue/detail') {
-                            item.getDetail()
-                        }
+                if (wx.getStorageSync('userMsg').siteid == 'HY') {
+                    getCurrentPages().forEach(v => {
+                        if (v.__route__ == 'packageA/saleClue/detail') v.getDetail()
                     })
-                    wx.navigateTo({
-                        url: '/packageA/setclient/detail?id=' + res.data.sa_customersid,
+                    wx.navigateBack()
+                } else {
+                    getCurrentPages().forEach(v => {
+                        switch (v.__route__) {
+                            case 'packageA/saleClue/index':
+                                v.getList(true);
+                                break;
+                            case 'packageA/setclient/detail':
+                                v.getDetail();
+                                break;
+                        }
                     })
+                    let pages = getCurrentPages();
+                    if (pages[pages.length - 2].__route__ == 'packageA/saleClue/detail') {
+                        wx.navigateBack();
+                        getCurrentPages().forEach(item => {
+                            console.log(item);
+                            if (item.__route__ == 'packageA/saleClue/detail') {
+                                item.getDetail()
+                            }
+                        })
+                        wx.navigateTo({
+                            url: '/packageA/setclient/detail?id=' + res.data.sa_customersid,
+                        })
+                    }
                 }
             }, tag ? 500 : 300)
         })

+ 13 - 6
packageA/salesHourglass/index.js

@@ -54,7 +54,7 @@ Page({
                 begdate: "",
                 enddate: "",
                 tradefield: "",
-                isleave: 0,
+                isleave: 1,
                 unfinish: 1
             }
         },
@@ -137,6 +137,9 @@ Page({
     },
     onReady() {
         this.setChartData();
+        this.selectComponent("#organization").setData({
+            isleave:1
+        })
         this.selectComponent("#organization").initDepAndUser();
         // this.selectComponent("#Yl_Filtrate1").queryMonths(12)
     },
@@ -155,25 +158,29 @@ Page({
     handleFilter({
         detail
     }) {
-        console.log(detail)
         if (detail.name == 'reset') {
-            // this.selectComponent("#organization").initDepAndUser()
+            this.selectComponent("#organization").setData({
+                isleave:1
+            })
+            this.selectComponent("#organization").initDepAndUser()
             this.setData({
                 'content.dataid': wx.getStorageSync('userMsg').userid,
                 'content.type': 0,
-                'content.where.isleave': 0,
+                'content.where.isleave': 1,
                 'content.where.tradefield': "",
                 'content.where.unfinish': 1,
             })
         } else {
-            let active = this.selectComponent("#organization").data.result;
+            let active = this.selectComponent("#organization").data.result,
+                isleave = this.selectComponent("#organization").data.isleave;
             let type = active.userid ? 0 : 1,
                 dataid = type == 0 ? active.userid : active.departmentid
+            console.log(isleave)
             this.setData({
                 'content.dataid': dataid,
                 'content.type': type,
                 'content.where.tradefield': detail.tradefield,
-                'content.where.isleave': active.isleave || 0,
+                'content.where.isleave': isleave || 1,
                 'content.where.unfinish': detail.unfinish || 0,
             })
         }

+ 1 - 1
packageA/salesHourglass/index.wxml

@@ -50,5 +50,5 @@
 </view>
 <My_empty wx:if="{{!statistics.length}}" />
 <Yl_Filtrate1 id="Yl_Filtrate1" show='{{showFiltrate}}' dateRange list="{{filtratelist}}" dateRangeName="{{language['创建日期']||'创建日期'}}" bindhandle="handleFilter" bindinterrupt='interrupt'>
-    <organization slot='head' dimissionF id='organization' />
+    <organization slot='head' defaultIsleave='1' dimissionF id='organization' />
 </Yl_Filtrate1>

+ 51 - 7
packageA/setclient/addAndEditor.js

@@ -164,12 +164,16 @@ Page({
             label: "客户来源",
             error: false,
             errMsg: "",
-            type: "textarea",
+            type: "selector",
+            range: [],
+            rangeKey: "name",
+            selectKey: "value",
+            rangeIndex: "",
             value: "",
-            placeholder: "客户来源",
+            placeholder: "来源",
             valueName: "source",
             checking: "base",
-            required: false
+            required: true
         }, {
             label: "归属经销商",
             error: false,
@@ -481,6 +485,28 @@ Page({
             })
         }
         getApp().globalData.Language.getLanguagePackage(this, options.data ? '编辑客户' : '新建客户');
+        /* 获取来源 */
+        _Http.basic({
+            "classname": "sysmanage.develop.optiontype.optiontype",
+            "method": "optiontypeselect",
+            "content": {
+                "typename": "cluesource",
+                pageSize: 9999
+            }
+        }).then(res => {
+            console.log("获取线索来源", res)
+            if (res.code == '1') {
+                let form = this.data.form;
+                let item = form.find(v => v.label == '客户来源');
+                item.range = res.code == '1' ? res.data.map(v => {
+                    v.name = getApp().globalData.Language.getMapText(v.value)
+                    return v
+                }) : [];
+                this.setData({
+                    form
+                })
+            }
+        })
     },
     repClose() {
         /* if (this.data.isSubmit) {
@@ -573,7 +599,8 @@ Page({
         })
     },
     async submit() {
-        let data = this.selectComponent("#Form").submit();
+        let data = this.selectComponent("#Form").submit(),
+            taht = this;
         data.province = data.region[0] || "";
         data.city = data.region[1] || "";
         data.county = data.region[2] || "";
@@ -583,9 +610,26 @@ Page({
         });
         if (query.total != 0) {
             wx.showModal({
-                title: getApp().globalData.Language.getMapText('提示'),
-                content: getApp().globalData.Language.getMapText('查询到') + query.total + getApp().globalData.Language.getMapText('条疑似重复客户信息,不允许保存'),
-                confirmText: getApp().globalData.Language.getMapText('确定'),
+                content: getApp().globalData.Language.joint([{
+                    t: 1,
+                    v: '查询到',
+                }, {
+                    v: query.total,
+                    f: "“",
+                    r: "”"
+                }, {
+                    t: 1,
+                    v: '条疑似重复客户信息,不可',
+                    r: " "
+                }, {
+                    t: 1,
+                    v: this.data.content.sa_customersid == 0 ? '创建' : '编辑',
+                    r: " "
+                }, {
+                    t: 1,
+                    v: '客户',
+                }]),
+                confirmText: that.data.Language['确定'] || '我知道了',
                 showCancel: false
             })
             this.setData({

+ 3 - 12
packageA/setclient/modules/contacts/add/index.js

@@ -71,16 +71,7 @@ Page({
             placeholder: "请填写",
             valueName: "fax",
             required: false,
-        }, {
-            label: "单位",
-            error: false,
-            errMsg: "",
-            type: "text",
-            value: "",
-            valueName: "company",
-            required: false,
-            checking: "base"
-        }, {
+        },  {
             label: "部门",
             error: false,
             errMsg: "",
@@ -88,7 +79,7 @@ Page({
             value: "",
             placeholder: "联系人所属部门",
             valueName: "depname",
-            required: false,
+            required: true,
             checking: "base"
         }, {
             label: "职位",
@@ -98,7 +89,7 @@ Page({
             value: "",
             placeholder: "联系人职位",
             valueName: "position",
-            required: false,
+            required: true,
             checking: "base"
         }, {
             label: "性别",

+ 33 - 0
static/font-icon.wxss

@@ -9,6 +9,39 @@
     -moz-osx-font-smoothing: grayscale;
 }
 
+
+.icon-guojihua:before {
+  content: "\e703";
+}
+
+.icon-zhuanhuashenhe:before {
+  content: "\e701";
+}
+
+.icon-jiangxu3:before {
+  content: "\e700";
+}
+
+.icon-shengxu3:before {
+  content: "\e702";
+}
+
+.icon-zhongxuan:before {
+  content: "\e6ff";
+}
+
+.icon-wancheng:before {
+  content: "\e6fd";
+}
+
+.icon-qingkong:before {
+  content: "\e6fe";
+}
+
+.icon-paichuxiangmulishishuju:before {
+  content: "\e6fc";
+}
+
 .icon-yingxiaofeiyongmingxi:before {
   content: "\e6fb";
 }

Plik diff jest za duży
+ 0 - 0
static/stylesheet.wxss


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików