From 03b735cf2c5b8151e2fa96da56c2dcd45b0d686c Mon Sep 17 00:00:00 2001 From: dengxiongfei Date: Thu, 27 Jan 2022 12:13:35 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=88=AA=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/commonApi.js | 5 +- pages/add-paper/index.vue | 60 ++++++++++---------- pages/client-credit/index.vue | 1 + pages/guarantee-agreement/index.vue | 8 ++- pages/mall/index.vue | 85 ++++++++++++++++++++--------- pages/order-detail/index.vue | 1 + pages/paper-detail/index.vue | 81 ++++++++++++++++++--------- utils/hook.js | 52 ++++++++++++++++++ 8 files changed, 208 insertions(+), 85 deletions(-) diff --git a/apis/commonApi.js b/apis/commonApi.js index f5e6bd2..66c84f9 100644 --- a/apis/commonApi.js +++ b/apis/commonApi.js @@ -99,7 +99,10 @@ export function getVerifyUrl(data = {}) { * @param {object} data 参数 mallSupplierId */ export function getGuaranteeContract(data = {}) { - return http.post({ url: '/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=' + data.mallSupplierId, data }) + return http.post({ + url: `/yyt-uec/create/supplier/guarantee-contract?mallSupplierId=${data.mallSupplierId}&customerEnterpriseId=${data.customerEnterpriseId}`, + data + }) } /** diff --git a/pages/add-paper/index.vue b/pages/add-paper/index.vue index 89402f9..41813b3 100644 --- a/pages/add-paper/index.vue +++ b/pages/add-paper/index.vue @@ -201,16 +201,16 @@ 纸品图片 - - - - - - - - 上传图片 - - + + + + + + + + 上传图片 + + - - + @@ -456,7 +456,7 @@ export default { // } // this.imgList.push(params) // } - this.imgList = res.imgList + this.imgList = res.imgList console.log('this.imgList', this.imgList) } }) @@ -497,20 +497,20 @@ export default { this.imgList[this.imgList.length - 1].pathUrl = val }) }, - uploadVoucher() { - uploadImage(['album'], 5) - .then((urls) => { - if (urls) { - this.imgList.push(urls[0]) - } - }) - .catch((e) => { - uni.showToast({ - title: '上传失败', - icon: 'fail' - }) - }) - }, + uploadVoucher() { + uploadImage(['album'], 5) + .then((urls) => { + if (urls) { + this.imgList = urls + } + }) + .catch((e) => { + uni.showToast({ + title: '上传失败', + icon: 'fail' + }) + }) + }, // 删除图片 deleteImage(item) { console.log('deleteImage', item) @@ -521,9 +521,9 @@ export default { } console.log(this.imgList) }, - deleteVoucher(index) { - this.imgList.splice(index, 1) - }, + deleteVoucher(index) { + this.imgList.splice(index, 1) + }, uploadPrice() { if (this.skuList.length === 0) { uni.showToast({ diff --git a/pages/client-credit/index.vue b/pages/client-credit/index.vue index 2730b27..5b5b6f4 100644 --- a/pages/client-credit/index.vue +++ b/pages/client-credit/index.vue @@ -194,6 +194,7 @@ export default { getCreditList(data) { getCustomerCreditInfo(data).then((res) => { if (res) { + this.hasCreditList = [] res.hasCredit && this.hasCreditList.push('month') res.hasFeisuanCredit && this.hasCreditList.push('fs') this.isFinishedContract = res.isFinishedContract diff --git a/pages/guarantee-agreement/index.vue b/pages/guarantee-agreement/index.vue index 38793c4..f1262a9 100644 --- a/pages/guarantee-agreement/index.vue +++ b/pages/guarantee-agreement/index.vue @@ -10,7 +10,7 @@ 甲方: 广州千鸟云纸信息科技有限公司 注册地址: 广州市白云区钟落潭镇广从七路28号101 法定代表人/负责人:邹依倩 - 联系电话: + 联系电话:18028689006 乙方: @@ -72,7 +72,7 @@ 甲 方(盖章): - 法定代表人/委托代理人(签名): + 法定代表人/委托代理人(签名):邹依倩 日 期: 年 月 日 @@ -117,6 +117,8 @@ export default { onLoad(option) { if (option) { this.params = option + // 额外处理true / false + this.params.isFinishedContract = this.params.isFinishedContract === 'true' } else { uni.showToast({ title: '参数错误', @@ -161,7 +163,7 @@ export default { return } // 校验是否已签署担保协议 - if (this.isFinishedContract) { + if (this.params.isFinishedContract) { uni.showToast({ title: '您已签署过担保协议,即将跳转', icon: 'none', diff --git a/pages/mall/index.vue b/pages/mall/index.vue index 299dbde..5172b64 100644 --- a/pages/mall/index.vue +++ b/pages/mall/index.vue @@ -72,14 +72,18 @@ 请先完善企业基本信息 - - - - + - + {{ subItem.productName }} @@ -75,7 +79,7 @@ export default { params: { asc: '', desc: '', - customerEnterpriseId: this.id, + customerEnterpriseId: this.id, mallSupplierId: this.$store.state.supplierInfo.supplierId || null, // 供应商id // customerEnterpriseId: '651107734133018624', // 客户企业ID // mallSupplierId: '670334117090562048', // 供应商id @@ -115,7 +119,7 @@ export default { .then((res) => { // console.log('原纸交易', res) if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/client-detail/equipment-information.vue b/pages/client-detail/equipment-information.vue index c0b8d8e..d8555dd 100644 --- a/pages/client-detail/equipment-information.vue +++ b/pages/client-detail/equipment-information.vue @@ -184,7 +184,7 @@ export default { el.collapse = false el.isShowSelect = false }) - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/client-list/index.vue b/pages/client-list/index.vue index ead1686..9e8aa37 100644 --- a/pages/client-list/index.vue +++ b/pages/client-list/index.vue @@ -98,7 +98,7 @@ export default { getCompanyList({ ...this.params, ...this.pagination }) .then((res) => { if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/contract-manage/index.vue b/pages/contract-manage/index.vue index 4cb537e..bd4e016 100644 --- a/pages/contract-manage/index.vue +++ b/pages/contract-manage/index.vue @@ -125,7 +125,7 @@ export default { getContractList({ ...this.condition, ...this.pagination }) .then((res) => { if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/credit-order-list/index.vue b/pages/credit-order-list/index.vue index da05d78..732e040 100644 --- a/pages/credit-order-list/index.vue +++ b/pages/credit-order-list/index.vue @@ -116,7 +116,7 @@ export default { getFinanceList({ ...this.condition, ...this.pagination }) .then((res) => { if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/follow-up-records/index.vue b/pages/follow-up-records/index.vue index cde4003..f2b93c0 100644 --- a/pages/follow-up-records/index.vue +++ b/pages/follow-up-records/index.vue @@ -73,7 +73,7 @@ export default { emptyText: '暂无数据~', background: '#F7F8FA', disabled: false, - emptyImage: '/static/imgs/order/order-empty.png' + emptyImage: '/static/imgs/order/order-empty.png' }, params: { asc: '', @@ -115,7 +115,7 @@ export default { .then((res) => { // console.log('跟踪记录', res) if (res) { - if (this.pagination.pageNum == 1) { + if (res.current == 1) { this.list = res.records } else { this.list = this.list.concat(res.records) diff --git a/pages/start-page/index.vue b/pages/start-page/index.vue index 67d1944..f836e20 100644 --- a/pages/start-page/index.vue +++ b/pages/start-page/index.vue @@ -44,7 +44,7 @@