From dd4bc6b8df631114a59aa5851a0d5e81c7ff3971 Mon Sep 17 00:00:00 2001 From: donqi <240832390@qq.com> Date: Thu, 9 Nov 2023 01:01:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=A4=A7=E5=8E=85=E7=B1=BB?= =?UTF-8?q?=E7=9B=AE=E7=AD=9B=E9=80=89=E5=A2=9E=E5=8A=A0=E4=BC=A0=E9=80=92?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=9A=84=E5=8F=82=E6=95=B0=EF=BC=9B=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=A4=E4=B8=AA=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=A0=87=E7=AD=BE=EF=BC=9B=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=B1=95=E7=A4=BA=E5=AD=97=E6=AE=B5=E5=8F=8A=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/request.js | 2 +- .../goods-card/horizontal-goods-card.vue | 4 +- pages/demand-center/accept-demand-center.vue | 84 ++++++++++++++++++- pages/order-manage/order-manage.vue | 4 + pages/order-manage/serv-detail.vue | 7 +- 5 files changed, 93 insertions(+), 8 deletions(-) diff --git a/common/js/request.js b/common/js/request.js index 4fae295..06a874f 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -15,7 +15,7 @@ export default { // request 触发前拼接 url args.url = 'https://www.opsoul.com:8881' + args.url; // args.url = 'http://127.0.0.1:80' + args.url; - // args.url = 'http://192.168.10.106:80' + args.url; + // args.url = 'http://192.168.10.103:80' + args.url; if (!args.data) { args.data = {} diff --git a/components/goods-card/horizontal-goods-card.vue b/components/goods-card/horizontal-goods-card.vue index 307fde7..3da849c 100644 --- a/components/goods-card/horizontal-goods-card.vue +++ b/components/goods-card/horizontal-goods-card.vue @@ -4,7 +4,7 @@ - {{product.goodsName}} + {{product.totalName}} {{product.remark}} @@ -58,7 +58,7 @@ }, ifShowComments: { type: Boolean, - default: true + default: false }, product: { type: Object, diff --git a/pages/demand-center/accept-demand-center.vue b/pages/demand-center/accept-demand-center.vue index a49271d..9f8111a 100644 --- a/pages/demand-center/accept-demand-center.vue +++ b/pages/demand-center/accept-demand-center.vue @@ -38,7 +38,7 @@ :range="categoryList"> - {{chosenCategory && chosenCategory.length ? chosenCategory[2].goodsCategoryName : item.title}} + {{chosenCategory && chosenCategory.length ? chosenCategory[chosenCategory.length - 1].goodsCategoryName : item.title}} @@ -279,7 +279,10 @@ hasNotice: false, workerCityIds: [], workerDistrictIds: [], - workerStreetIds: [] + workerStreetIds: [], + workerFirstCategoryIds: [], + workerSecondCategoryIds: [], + workerThirdCategoryIds: [] } }, onShow() { @@ -288,7 +291,8 @@ methods: { async loadData() { this.curUserInfo = this.$request.getCurUserInfo(); - await this.getWorkerAreaIds(); + this.getWorkerAreaIds(); + await this.getWorkerDataCategoryIds(); // this.checkBankAndCertify(); // this.tasks = await this.$api.data('tasks'); this.reloadMasterOrderPage(); @@ -341,6 +345,28 @@ this.workerDistrictIds = districtIds; this.workerStreetIds = streetIds; }, + async getWorkerDataCategoryIds() { + let res = await this.$request.getWorkerGoodsCategory({ + workerId: this.curUserInfo.workerId + }); + let firstGoodsCategoryIds = []; + let secondGoodsCategoryIds = []; + let thirdGoodsCategoryIds = []; + for(let i = 0; i < res.data.length; i++) { + if (firstGoodsCategoryIds.indexOf(res.data[i].goodsCategoryId) === -1) { + firstGoodsCategoryIds.push(res.data[i].goodsCategoryId) + } + if (secondGoodsCategoryIds.indexOf(res.data[i].goodsCategoryId) === -1) { + secondGoodsCategoryIds.push(res.data[i].goodsCategoryId) + } + if (thirdGoodsCategoryIds.indexOf(res.data[i].goodsCategoryId) === -1) { + thirdGoodsCategoryIds.push(res.data[i].goodsCategoryId) + } + } + this.workerFirstCategoryIds = firstGoodsCategoryIds; + this.workerSecondCategoryIds = secondGoodsCategoryIds; + this.workerThirdCategoryIds = thirdGoodsCategoryIds; + }, async loadMasterOrderPage(params = {}) { params.pageSize = this.$globalData.initPageSize; params.pageNum = this.pageNum; @@ -355,6 +381,8 @@ params.params[condition.code] = condition.value === 1 ? 'desc' : 'asc'; } }) + + // 区域条件 params.cityIds = this.workerCityIds; if (this.chosenArea.length === 1) { // 选中了区列表中的全部选项 @@ -368,6 +396,22 @@ params.streetIds = [this.chosenArea[2].areaId]; } + // 类目条件 + params.thirdGoodsCategoryIds = this.workerThirdCategoryIds; + if (this.chosenCategory.length === 1) { + // 选了一级类目 + params.firstGoodsCategoryIds = [this.chosenCategory[0].goodsCategoryId]; + } else if (this.chosenCategory.length === 2) { + // 选了二级类目 + params.firstGoodsCategoryIds = [this.chosenCategory[0].goodsCategoryId]; + params.secondGoodsCategoryIds = [this.chosenCategory[1].goodsCategoryId]; + } else if (this.chosenArea.length === 3) { + // 选了三级类目 + params.firstGoodsCategoryIds = [this.chosenCategory[0].goodsCategoryId]; + params.secondGoodsCategoryIds = [this.chosenCategory[1].goodsCategoryId]; + params.thirdGoodsCategoryIds = [this.chosenCategory[2].goodsCategoryId]; + } + this.$refs.loadStatusBar.showLoading(); try { let res = await this.$request.qryMasterOrderPage(params); @@ -433,6 +477,20 @@ goodsCategoryId: col3Id }); thirdTypeList = thirdTypeList.data; + + // 加上“全部”节点 + subTypeList.unshift({ + goodsCategoryName: '全部', + goodsCategoryId: -1 + }); + subSubTypeList.unshift({ + goodsCategoryName: '全部', + goodsCategoryId: -1 + }); + thirdTypeList.unshift({ + goodsCategoryName: '全部', + goodsCategoryId: -1 + }); this.categoryList.push(subTypeList); this.categoryList.push(subSubTypeList); this.categoryList.push(thirdTypeList); @@ -552,10 +610,14 @@ this.categoryMultiIndex = e.detail.value; let chosenCategory = []; for (let i = 0; i < this.categoryList.length; i++) { + if (this.categoryMultiIndex[i] === 0) { + // 选中了全部节点 + break; + } chosenCategory.push(this.categoryList[i][this.categoryMultiIndex[i]]); } this.chosenCategory = chosenCategory; - this.taskConditions[this.tabCur].value = chosenCategory[chosenCategory.length - 1].goodsCategoryId; + // this.taskConditions[this.tabCur].value = chosenCategory[chosenCategory.length - 1].goodsCategoryId; this.searchTasks(); }, async categoryColChange(e) { @@ -575,6 +637,15 @@ }); subSubTypeList = subSubTypeList.data; } + // 加上“全部”节点 + subTypeList.unshift({ + goodsCategoryName: '全部', + goodsCategoryId: -1 + }); + subSubTypeList.unshift({ + goodsCategoryName: '全部', + goodsCategoryId: -1 + }); this.categoryList.pop(); this.categoryList.pop(); this.categoryList.push(subTypeList); @@ -587,6 +658,11 @@ goodsCategoryId: this.categoryList[1][colObj.value].goodsCategoryId }); subSubTypeList = subSubTypeList.data; + // 加上“全部”节点 + subSubTypeList.unshift({ + goodsCategoryName: '全部', + goodsCategoryId: -1 + }); this.categoryList.pop(); this.categoryList.push(subSubTypeList); this.categoryMultiIndex = [this.categoryMultiIndex[0], colObj.value, 0]; diff --git a/pages/order-manage/order-manage.vue b/pages/order-manage/order-manage.vue index c978114..eac0fd6 100644 --- a/pages/order-manage/order-manage.vue +++ b/pages/order-manage/order-manage.vue @@ -105,6 +105,10 @@ + + {{order.goodsBrand}} + {{order.goodsSpecification}} + 到付单 有待付款 diff --git a/pages/order-manage/serv-detail.vue b/pages/order-manage/serv-detail.vue index 021dd59..30935b1 100644 --- a/pages/order-manage/serv-detail.vue +++ b/pages/order-manage/serv-detail.vue @@ -117,6 +117,10 @@ + + + {{servDetail.remark}} + @@ -558,11 +562,12 @@ - + 订单编码:{{servDetail.orderDetailCode}} 订单编码:{{servDetail.orderMasterCode}} 订单时间:{{servDetail.createTime}} +