xiaohaizhao 2 лет назад
Родитель
Сommit
9370696717

+ 4 - 1
app.json

@@ -143,7 +143,10 @@
                 "select/project/select2",
                 "select/orderForm/select",
                 "invoiceforecast/modules/client/select",
-                "project/modules/fail/index"
+                "project/modules/fail/index",
+                "project/impower/initiate",
+                "project/impower/webview",
+                "project/impower/impower"
             ]
         }
     ],

+ 1 - 1
packageA/contacts/details.js

@@ -52,7 +52,7 @@ Page({
                 label: "群组",
                 content: item.groupname
             }, {
-                label: "来源项目",
+                label: "关联项目",
                 content: item.projectname
             }, {
                 label: "备注",

+ 29 - 13
packageA/project/detail.js

@@ -8,6 +8,7 @@ const _Http = getApp().globalData.http,
 let paramvalue = false;
 Page({
     data: {
+        isInsert: false,
         loading: true,
         isLeader: false, //是否为负责人
         isRecover: false, //关闭弹窗是否恢复项目
@@ -245,16 +246,19 @@ Page({
                 icon: "icon-genjin",
                 label: "跟进"
             }];
+        if (wx.getStorageSync('auth').wproject.options.some(v => v == "auditauthorization")) tabbarList.unshift({
+            icon: "icon-shenheshouquan",
+            label: "审核授权"
+        })
         if (!isLeader) {
             let s = await getApp().agentOrNot("sa_project", this.data.sa_projectid);
             isLeader = s.data.editable == 1;
             editdataleader = s.data.editdataleader == 1;
         }
         if (isAdmin) tabbarList = [{
-            icon: "icon-genjin",
+            icon: "icon-baobeishenhe",
             label: "报备审核"
         }].concat(tabbarList);
-
         if (isLeader || isAdmin) {
             if (status != '已失败' && status != '已结案') {
                 _Http.basic({
@@ -271,7 +275,7 @@ Page({
                     icon: "icon-bianji",
                     label: "编辑"
                 }, {
-                    icon: "icon-genjin",
+                    icon: "icon-tijiaobaobei1",
                     label: "提交报备"
                 }])
                 if (editdataleader) tabbarList.push({
@@ -279,7 +283,6 @@ Page({
                     label: "更换负责人"
                 })
             }
-
             if (isLeader) {
                 if (status == '已成交') tabbarList.push({
                     icon: "icon-dibu-jieshu",
@@ -295,19 +298,15 @@ Page({
                     label: "恢复"
                 }]
             }
-
             tabbarList.push({
                 icon: "icon-shanchu",
                 label: "作废"
             })
         }
-
-
         if (this.data.options.find(v => v == 'viewRepetition')) tabbarList.push({
             icon: "icon-a-shouyejingangquhehuoren",
             label: "查看重复"
         });
-
         this.setData({
             isLeader,
             tabbarList,
@@ -330,6 +329,16 @@ Page({
             case "结案":
                 this.selectComponent("#Dialog").onClick(this.data.sa_projectid)
                 break;
+            case "发起授权":
+                wx.navigateTo({
+                    url: `./impower/initiate?projectname=${data.projectname}&sa_projectid=${data.sa_projectid}`,
+                })
+                break;
+            case "审核授权":
+                wx.navigateTo({
+                    url: `./impower/impower?sa_projectid=${data.sa_projectid}`,
+                })
+                break;
             case "恢复":
                 _Http.basic({
                     "id": 20221208184202,
@@ -683,8 +692,9 @@ Page({
     onGetList({
         detail
     }) {
+        let tabbarList = this.data.tabbarList;
         if (detail.data.systemtag.includes('报备中')) {
-            let tabbarList = this.data.tabbarList.filter(v => v.label != '提交报备')
+            tabbarList = tabbarList.filter(v => v.label != '提交报备')
             let index = tabbarList.findIndex(v => v.label == '报备审核');
             if (index != -1) tabbarList.splice(index, 0, {
                 icon: "icon-genjin",
@@ -693,11 +703,17 @@ Page({
             this.setData({
                 tabbarList
             })
+        } else if (detail.data.systemtag.includes('已报备')) {
+            let status = this.data.detail.status
+            if (this.data.isLeader && status != '已失败' && status != '已结案') tabbarList.unshift({
+                icon: "icon-faqishouquan",
+                label: "发起授权"
+            })
+            this.setData({
+                isInsert: true,
+                tabbarList
+            })
         }
-        this.setData({
-            isInsert: detail.data.systemtag.includes('已报备')
-        })
-        console.log(123123, this.data.isInsert)
     },
     onUnload() {
         const page = getCurrentPages().find(v => v.__route__ == 'packageA/project/index');

+ 125 - 0
packageA/project/impower/impower.js

@@ -0,0 +1,125 @@
+const _Http = getApp().globalData.http;
+Page({
+    data: {
+        "content": {
+            "sa_projectid": 1,
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": ""
+            }
+        }
+    },
+    onLoad(options) {
+        this.data.content.sa_projectid = options.sa_projectid;
+        this.getList()
+    },
+    /* 获取列表 */
+    getList(init = false) {
+        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": 20230816124004,
+            content
+        }).then(res => {
+            console.log("授权列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            if (res.msg != '成功') return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            })
+            content.pageNumber = res.pageNumber + 1;
+            content.pageTotal = res.pageTotal;
+            content.total = res.total;
+            this.setData({
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+                content
+            })
+        })
+    },
+    preview(e) {
+        const {
+            item
+        } = e.currentTarget.dataset;
+        if (this.compareDates(item.begdate_auth, item.enddate_auth)) return;
+        _Http.basic({
+            "id": 20221213094501,
+            "content": {
+                "sys_reportid": 104,
+                "dataid": item.sa_projectid,
+                sys_enterpriseid: item.enterpriseid_auth,
+            }
+        }).then(res => {
+            console.log("查看授权书", res)
+            if (res.msg != '成功') return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            })
+            let url = `${_Http.baseUrl+res.data}&sys_enterpriseid=${item.enterpriseid_auth}&begdate=${item.begdate_auth}&enddate=${item.enddate_auth}`
+            wx.navigateTo({
+                url: `/packageA/project/impower/webview`,
+            })
+            this.setData({
+                url
+            })
+        })
+    },
+    dispose(e) {
+        const {
+            item
+        } = e.target.dataset,
+            that = this;
+        if (e.target.id == 1 && this.compareDates(item.begdate_auth, item.enddate_auth)) return;
+        wx.showModal({
+            title: '提示',
+            content: `该项目授权申请确认${e.target.id==1?'通过':'不通过'}?`,
+            complete: ({
+                confirm
+            }) => {
+                if (confirm) _Http.basic({
+                    "id": "20230810161804",
+                    "content": {
+                        "sa_project_authorizationid": item.sa_project_authorizationid,
+                        "begdate": item.begdate_auth,
+                        "enddate": item.enddate_auth,
+                        "isPass": e.target.id
+                    }
+                }).then(res => {
+                    console.log(e.target.id == 1 ? '通过' : '不通过', res)
+                    wx.showToast({
+                        title: res.msg == '成功' ? '操作成功' : res.msg,
+                        icon: "none"
+                    });
+                    if (res.msg == '成功') this.setData({
+                        list: that.data.list.filter(v => v.sa_project_authorizationid != item.sa_project_authorizationid)
+                    })
+                })
+            }
+        })
+    },
+    onChangeDate(e) {
+        const {
+            index,
+            item,
+            name
+        } = e.currentTarget.dataset;
+        item[name] = e.detail.value;
+        this.setData({
+            [`list[${index}]`]: item
+        })
+    },
+    compareDates(d1, d2) {
+        let date1 = new Date(d1).getTime();
+        let date2 = new Date(d2).getTime();
+        if (date1 > date2) wx.showToast({
+            title: '请检查授权书有效期,开始时间不能晚于结束时间',
+            icon: "none"
+        })
+        return date1 > date2
+    },
+    onReady() {
+        this.selectComponent("#ListBox").setHeight(".head", this);
+    }
+})

+ 4 - 0
packageA/project/impower/impower.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "审核授权"
+}

+ 66 - 0
packageA/project/impower/impower.scss

@@ -0,0 +1,66 @@
+.item {
+    width: 100vw;
+    background-color: #fff;
+    padding: 20rpx 30rpx;
+    padding-right: 0;
+    box-sizing: border-box;
+    margin-bottom: 20rpx;
+
+    .title {
+        font-size: 32rpx;
+        margin-bottom: 20rpx;
+    }
+
+    .row {
+        display: flex;
+        justify-content: space-between;
+        width: 100%;
+        height: 70rpx;
+        line-height: 70rpx;
+        font-size: 28rpx;
+        box-sizing: border-box;
+        border-bottom: 1px solid #ddd;
+        padding-right: 30rpx;
+
+        .label {
+            color: #333;
+        }
+
+        .value {
+            display: flex;
+
+            picker {
+                color: #3874F6;
+            }
+        }
+    }
+
+    .new-footer {
+        display: flex;
+        align-items: center;
+        justify-content: flex-end;
+        margin-top: 20rpx;
+
+        .new-submit {
+            width: 160rpx;
+            height: 70rpx;
+            background: #3874F6;
+            border-radius: 8rpx;
+            font-size: 28rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            color: #FFFFFF;
+            margin-right: 30rpx;
+            padding: 0;
+        }
+
+        .query {
+            background-color: #F09E00 !important;
+            margin-right: 20rpx;
+        }
+
+        .preview {
+            color: #3874F6;
+            font-size: 28rpx;
+        }
+    }
+}

+ 47 - 0
packageA/project/impower/impower.wxml

@@ -0,0 +1,47 @@
+<view class="head" />
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+    <view class="item" wx:for="{{list}}" wx:key="sa_project_authorizationid">
+        <view class="title">授权申请</view>
+        <view class="row">
+            <view class="label">发起授权人</view>
+            <view>{{item.initiateauthby}}</view>
+        </view>
+        <view class="row">
+            <view class="label">发起时间</view>
+            <view>{{item.initiateauthdate}}</view>
+        </view>
+        <view class="row">
+            <view class="label">项目名称</view>
+            <view>{{item.projectname}}</view>
+        </view>
+        <view class="row">
+            <view class="label">客户名称</view>
+            <view>{{item.enterprisename}}</view>
+        </view>
+        <view class="row">
+            <view class="label">授权书有效期</view>
+            <view class='value'>
+                <picker mode="date" value='{{item.begdate_auth}}' data-index="{{index}}" data-name="begdate_auth" data-item="{{item}}" bindchange='onChangeDate'>
+                    {{item.begdate_auth}}
+                </picker>
+                <view style="padding: 0 10rpx;">至</view>
+                <picker mode="date" value='{{item.enddate_auth}}' data-index="{{index}}" data-name="enddate_auth" data-item="{{item}}" bindchange='onChangeDate'>
+                    {{item.enddate_auth}}
+                </picker>
+            </view>
+        </view>
+
+        <view class="new-footer" style="padding-bottom:12rpx;">
+            <view style="flex: 1;">
+                <navigator class="preview" url="#" data-item="{{item}}" bindtap="preview">
+                    <text class="iconfont icon-tabfujian1" />
+                    预览授权书
+                </navigator>
+            </view>
+            <van-button custom-class='new-submit query' data-item="{{item}}" id='0' bindclick='dispose'>不通过</van-button>
+            <van-button custom-class='new-submit' data-item="{{item}}" id='1' bindclick='dispose'>审核通过</van-button>
+        </view>
+    </view>
+    <My_empty wx:if="{{list.length==0}}" />
+    <view style="height: 80rpx;" />
+</Yl_ListBox>

+ 139 - 0
packageA/project/impower/initiate.js

@@ -0,0 +1,139 @@
+const _Http = getApp().globalData.http;
+let sa_projectid = 0;
+import {
+    formatTime
+} from "../../../utils/getTime";
+Page({
+    data: {
+        disabled: true,
+        loading: false
+    },
+    onLoad(options) {
+        this.setData({
+            form: [{
+                label: "项目名称",
+                error: false,
+                errMsg: "",
+                type: "number",
+                value: options.projectname,
+                placeholder: "项目名称",
+                valueName: "projectname",
+                checking: "base",
+                required: true,
+                disabled: true
+            }, {
+                label: "客户名称",
+                error: false,
+                errMsg: "",
+                type: "route",
+                url: "/packageA/select/setclient/select",
+                value: "",
+                params: {
+                    "id": 20221027143702,
+                    "content": {
+                        sa_projectid: options.sa_projectid,
+                        "pageSize": 20,
+                        "where": {
+                            "condition": "",
+                        }
+                    },
+                },
+                query: "&radio=true&idname=sys_enterpriseid",
+                placeholder: "选择客户",
+                valueName: "sys_enterpriseid",
+                checking: "base",
+                required: true
+            }, {
+                label: "有效期",
+                error: false,
+                errMsg: "",
+                type: "dateRange",
+                start: "",
+                value: ["", ""],
+                placeholder: ['生效日期', '截止日期'],
+                valueName: "invaliddate",
+                checking: "base",
+                required: true
+            }]
+        })
+        sa_projectid = options.sa_projectid;
+    },
+    /* 表单必填项是否完成 */
+    onConfirm({
+        detail
+    }) {
+        this.setData({
+            disabled: detail
+        })
+    },
+    cancel(){
+        wx.showModal({
+          title: '提示',
+          content: '是否确定取消发起授权',
+          complete: (res) => {
+            if (res.confirm) wx.navigateBack()
+          }
+        })
+    },
+    preview() {
+        let data = this.selectComponent("#Form").submit();
+        _Http.basic({
+            "id": 20221213094501,
+            "content": {
+                "sys_reportid": 104,
+                "dataid": sa_projectid,
+                sys_enterpriseid: data.sys_enterpriseid[1][0],
+            }
+        }).then(res => {
+            if (res.msg != '成功') return wx.showToast({
+                title: res.msg,
+                icon: "none"
+            })
+            let url = `${_Http.baseUrl+res.data}&sys_enterpriseid=${data.sys_enterpriseid[1][0]}&begdate=${data.invaliddate[0]}&enddate=${data.invaliddate[1]}`
+            wx.navigateTo({
+                url: `/packageA/project/impower/webview`,
+            })
+            this.setData({
+                url
+            })
+        })
+    },
+    submit() {
+        let that = this;
+        this.setData({
+            loading: true
+        })
+        wx.showModal({
+            title: '提示',
+            content: '是否确定发起授权',
+            complete: ({
+                confirm
+            }) => {
+                if (confirm) {
+                    let data = this.selectComponent("#Form").submit();
+                    _Http.basic({
+                        "id": 20230810161704,
+                        "content": {
+                            sa_projectid,
+                            "begdate": data.invaliddate[0],
+                            "enddate": data.invaliddate[1],
+                            "sys_enterpriseid": data.sys_enterpriseid[1][0]
+                        }
+                    }).then(res => {
+                        console.log("发起授权", res)
+                        that.setData({
+                            loading: false
+                        })
+                        wx.showToast({
+                            title: res.msg != '成功' ? res.msg : "发起成功",
+                            icon: "none"
+                        });
+                        if (res.msg == '成功') return setTimeout(() => {
+                            wx.navigateBack()
+                        }, 500)
+                    })
+                }
+            }
+        })
+    }
+})

+ 4 - 0
packageA/project/impower/initiate.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "发起授权"
+}

+ 34 - 0
packageA/project/impower/initiate.scss

@@ -0,0 +1,34 @@
+.new-footer {
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    position: fixed;
+    width: 100vw;
+    height: 130rpx;
+    background: #FFFFFF;
+    box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+    bottom: 0;
+
+    .new-submit {
+        width: 156rpx;
+        height: 90rpx;
+        background: #3874F6;
+        border-radius: 8rpx;
+        font-size: 28rpx;
+        font-family: PingFang SC-Bold, PingFang SC;
+        font-weight: bold;
+        color: #FFFFFF;
+        margin-right: 30rpx;
+    }
+
+    .query {
+        border: 1rpx solid #CCCCCC !important;
+        background-color: #fff !important;
+        color: #666666 !important;
+    }
+
+    .preview {
+        color: #3874F6;
+        margin-left: 20rpx;
+    }
+}

+ 13 - 0
packageA/project/impower/initiate.wxml

@@ -0,0 +1,13 @@
+<Yl_field id='Form' form='{{form}}' bind:onConfirm='onConfirm' bind:interrupt='interrupt' /><!-- showAll='{{!showAll}}' -->
+
+<view class="new-footer" style="padding-bottom:12rpx;">
+    <view style="flex: 1;" wx:if="{{!disabled}}">
+        <navigator class="preview" url="#" bindtap="preview">
+            <text class="iconfont icon-tabfujian1" />
+            预览授权书
+        </navigator>
+    </view>
+
+    <van-button custom-class='new-submit query' bindclick='cancel'>取消</van-button>
+    <van-button custom-class='new-submit' disabled='{{disabled}}' loading='{{loading}}' bindclick='submit'>提交</van-button>
+</view>

+ 11 - 0
packageA/project/impower/webview.js

@@ -0,0 +1,11 @@
+Page({
+    data: {
+        url: ""
+    },
+    onLoad(options) {
+        let page = getCurrentPages().find(v => v.__route__ == 'packageA/project/impower/initiate' || v.__route__ == 'packageA/project/impower/impower')
+        this.setData({
+            url: page.data.url
+        })
+    },
+})

+ 4 - 0
packageA/project/impower/webview.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "授权书"
+}

+ 1 - 0
packageA/project/impower/webview.scss

@@ -0,0 +1 @@
+/* packageA/project/impower/webview.wxss */

+ 1 - 0
packageA/project/impower/webview.wxml

@@ -0,0 +1 @@
+<web-view src="{{url}}" />

+ 13 - 2
packageA/saleClue/change.js

@@ -73,12 +73,23 @@ Page({
                 label: "项目规模",
                 error: false,
                 errMsg: "",
-                type: "textarea",
+                type: "digit",
                 value: "",
-                placeholder: "请填写建筑面积(㎡)/吨位(t)",
+                placeholder: "请填写数值",
                 valueName: "scale",
                 checking: "base",
                 required: false
+            }, {
+                label: "项目规模单位",
+                error: false,
+                errMsg: "",
+                type: "option",
+                optionNmae: "scaleunitname",
+                optionType: "radio", //复选   radio 单选
+                value: "",
+                placeholder: "选择单位",
+                valueName: "unitname",
+                required: false
             }, {
                 label: "项目预算(万元)",
                 error: false,

+ 15 - 2
packageA/setclient/modules/contacts/detail/index.js

@@ -48,14 +48,17 @@ Page({
                                     } */
                 ],
                 list1: [{
+                    label: "姓名",
+                    value: item.name
+                }, {
                     label: "联系方式",
                     value: item.phonenumber
                 }, {
                     label: "性别",
                     value: item.sex
                 }, {
-                    label: "生日",
-                    value: item.birthday
+                    label: "家庭住址",
+                    value: item.address
                 }, {
                     label: "微信",
                     value: item.wechatnum
@@ -65,6 +68,9 @@ Page({
                 }, {
                     label: "传真",
                     value: item.fax
+                }, {
+                    label: "单位",
+                    value: item.enterprisename
                 }, {
                     label: "部门",
                     value: item.depname
@@ -74,6 +80,13 @@ Page({
                 }, {
                     label: "备注",
                     value: item.remarks
+                }],
+                list2: [{
+                    label: "职位",
+                    value: item.position
+                }, {
+                    label: "备注",
+                    value: item.remarks
                 }]
             });
             this.getTags()

+ 3 - 1
packageA/setclient/modules/contacts/detail/index.wxml

@@ -23,7 +23,9 @@
 <Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
     <view slot='详细信息'>
         <Yl_Headline title='基本信息' type='switch' switchLabel='仅显示已填信息' switch='{{showAll}}' bind:callBack='onChange' />
-        <Yl_ReportForms showAll='{{!showAll}}' list='{{list1}}' />
+        <Yl_ReportForms showAll='{{!showAll}}' list='{{list1}}' list1='{{list1}}' />
+        <!--  <Yl_Headline title='系统信息' />
+        <Yl_ReportForms showAll='{{!showAll}}' list='{{list2}}' /> -->
     </view>
     <Trace slot='跟进动态' id='Trace' ownertable='{{ownertable}}' ownerid='{{detail.contactsid}}' />
     <view style="height: 140rpx;" />

+ 36 - 0
static/font-icon.wxss

@@ -9,6 +9,42 @@
     -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-shenheshouquan:before {
+    content: "\e6ea";
+}
+
+.icon-tijiaobaobei1:before {
+    content: "\e6eb";
+}
+
+.icon-baobeishenhe:before {
+    content: "\e6ec";
+}
+
+.icon-faqishouquan:before {
+    content: "\e6ed";
+}
+
+.icon-kehu1:before {
+    content: "\e6e7";
+}
+
+.icon-xiangmu:before {
+    content: "\e6e8";
+}
+
+.icon-yewuyuan:before {
+    content: "\e6e9";
+}
+
+.icon-xiangxiazhankai:before {
+    content: "\e8f2";
+}
+
+.icon-xiangshangshouqi:before {
+    content: "\e8f5";
+}
+
 .icon-gouwuche:before {
     content: "\e6e6";
 }

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/stylesheet.wxss


Некоторые файлы не были показаны из-за большого количества измененных файлов