From e64511c4284bb1552eb967f14eaf196f2e442380 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 21 Aug 2023 17:04:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/companyFinance/companyFinance.vue | 1 - pages.json | 2 +- subpkg/companySign/companySign.vue | 140 +++++++++++-------- 3 files changed, 79 insertions(+), 64 deletions(-) diff --git a/components/companyFinance/companyFinance.vue b/components/companyFinance/companyFinance.vue index 446e9cb..c789984 100644 --- a/components/companyFinance/companyFinance.vue +++ b/components/companyFinance/companyFinance.vue @@ -105,7 +105,6 @@ mounted() { uni.$on('companyInfo', (e) => { this.company = e; - console.log(this.company); this.initLoad(); }) }, diff --git a/pages.json b/pages.json index e2deb82..b3ae604 100644 --- a/pages.json +++ b/pages.json @@ -273,7 +273,7 @@ "path": "companySign/companySign", "style": { "navigationBarTitleText": "签约公司详情", - "enablePullDownRefresh": false, + "enablePullDownRefresh": true, "navigationBarBackgroundColor": "#0122C7", "navigationBarTextStyle": "white" } diff --git a/subpkg/companySign/companySign.vue b/subpkg/companySign/companySign.vue index 7c028f0..663f0ed 100644 --- a/subpkg/companySign/companySign.vue +++ b/subpkg/companySign/companySign.vue @@ -2,14 +2,16 @@ - 电子合同 + - + + @@ -34,7 +36,7 @@ - + @@ -61,6 +63,7 @@ + @@ -90,7 +93,10 @@ typeShow: false, timer: null, // 计时器 timerCount: 0, //倒计时 - contractTypeList: [] + contractTypeList: [], + modelShow: false, + modelType: 1, + nowContractType: -1 } }, onLoad(options) { @@ -122,11 +128,13 @@ }, changeType(e) { // console.log(this.contractTypeList[e.detail.value]); - this.createContract({ - party_b: this.id, - contract_type: this.contractTypeList[e.detail.value].id, - type: 1 //1-公司,2-个人 - }) + this.nowContractType = e.detail.value; + this.clickContract(1); + // this.createContract({ + // party_b: this.id, + // contract_type: this.contractTypeList[e.detail.value].id, + // type: 1 //1-公司,2-个人 + // }) }, // 查看合同 naviToContract(file) { @@ -144,61 +152,67 @@ }) this.contractTypeList = res.data; }, + clickContract(e){ + this.modelType = e; + this.modelShow = true; + }, // 生成合同 async createContract(data) { - uni.showModal({ - content: '请检查信息无误后再生成合同', - confirmText: '确认无误', - cancelText: '我再看看', - confirmColor: '#3175f9', - success: async (e) => { - if (e.confirm) { - uni.showLoading({ - title: '合同生成中', - mask: true - }) - let res = await initiateContract({ - party_b: data.party_b, - contract_type: data.contract_type, - type: data.type - }) - this.initCompany(); - uni.hideLoading(); - Toast(res.msg || '合同已生成'); - this.navTo('/subpkg/submit/submit?type=' + 1); - } - } - }) + uni.showLoading({ + title: '合同生成中', + mask: true + }) + let res = await initiateContract({ + party_b: this.id, + contract_type: this.contractTypeList[this.nowContractType].id, + type: 1 + }) + this.initCompany(); + uni.hideLoading(); + Toast(res.msg || '合同已生成'); + this.navTo('/subpkg/submit/submit?type=' + 1); + // uni.showModal({ + // content: '请检查信息无误后再生成合同', + // confirmText: '确认无误', + // cancelText: '我再看看', + // confirmColor: '#3175f9', + // success: async (e) => { + // if (e.confirm) { + + // } + // } + // }) }, // 发送合同 async addContract(data) { - uni.showModal({ - content: '请检查合同无误后再发送', - confirmText: '确认无误', - cancelText: '我再看看', - confirmColor: '#3175f9', - success: async (e) => { - if (e.confirm) { - try { - uni.showLoading({ - title: '合同发送中', - mask: true - }) - let res = await Draftingcontracts({ - id: this.id - }); - this.initCompany(); - this.startTimer(); - uni.hideLoading(); - Toast('合同已发送'); - // this.navTo('/subpkg/submit/submit'); - } catch (e) { - uni.hideLoading(); - Toast(e.msg || '合同发送失败'); - } - } - } - }) + try { + uni.showLoading({ + title: '合同发送中', + mask: true + }) + let res = await Draftingcontracts({ + id: this.id + }); + this.initCompany(); + this.startTimer(); + uni.hideLoading(); + Toast('合同已发送'); + // this.navTo('/subpkg/submit/submit'); + } catch (e) { + uni.hideLoading(); + Toast(e.msg || '合同发送失败'); + } + // uni.showModal({ + // content: '请检查合同无误后再发送', + // confirmText: '确认无误', + // cancelText: '我再看看', + // confirmColor: '#3175f9', + // success: async (e) => { + // if (e.confirm) { + + // } + // } + // }) }, // 发送短信 async getPostsms() { @@ -239,7 +253,9 @@ }, }, onPullDownRefresh() { - uni.stopPullDownRefresh() + this.initCompany().then(()=>{ + uni.stopPullDownRefresh() + }) } } From 6812cfa510c6b30fb6ee6c98cf4a552d95c70ee5 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Mon, 21 Aug 2023 17:24:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/company/company.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/components/company/company.vue b/components/company/company.vue index 807c6ba..50f44bd 100644 --- a/components/company/company.vue +++ b/components/company/company.vue @@ -295,8 +295,6 @@ - - @@ -481,7 +479,7 @@