diff --git a/pages/index/goods-manage.vue b/pages/index/goods-manage.vue index e8d08c0..da205fd 100644 --- a/pages/index/goods-manage.vue +++ b/pages/index/goods-manage.vue @@ -25,7 +25,7 @@ - + @@ -175,6 +175,7 @@ async loadProductPage(params = {}) { params.pageNum = this.pageNum; params.pageSize = this.pageSize; + params.workerId = this.$request.getCurUserInfo().workerId; this.$refs.loadStatusBar.showLoading(); try { let res = await this.$request.qryProductPage(params); diff --git a/pages/my/new-serv.vue b/pages/my/new-serv.vue index dc4bd38..3771e5f 100644 --- a/pages/my/new-serv.vue +++ b/pages/my/new-serv.vue @@ -485,56 +485,56 @@ // uni.hideLoading(); // }, async submit() { - // let goodsStandardList = this.formData.specsList.filter((item) => { - // if (item.checked) { - // return { - // ...item, - // goodsNum: 99999 - // } - // } - // }); - // let goodsAreaList = this.formData.districtList.filter((item) => { - // if (item.checked) { - // item.countryAreaId = item.areaId; - // return item; - // } - // }); - // // 0是轮播图,1是详情图 - // let goodsImgsList = []; - // this.formData.imgList.forEach((url) => { - // goodsImgsList.push({ - // imgUrl: url, - // imgType: 0 - // }); - // }); - // this.formData.descImgList.forEach((url) => { - // goodsImgsList.push({ - // imgUrl: url, - // imgType: 1 - // }); - // }); - // let goodsVideoUrl = this.formData.videoList.length ? this.formData.videoList[0] : ''; + let goodsStandardList = this.formData.specsList.filter((item) => { + if (item.checked) { + return { + ...item, + goodsNum: 99999 + } + } + }); + let goodsAreaList = this.formData.districtList.filter((item) => { + if (item.checked) { + item.countryAreaId = item.areaId; + return item; + } + }); + // 0是轮播图,1是详情图 + let goodsImgsList = []; + this.formData.imgList.forEach((url) => { + goodsImgsList.push({ + imgUrl: url, + imgType: 0 + }); + }); + this.formData.descImgList.forEach((url) => { + goodsImgsList.push({ + imgUrl: url, + imgType: 1 + }); + }); + let goodsVideoUrl = this.formData.videoList.length ? this.formData.videoList[0] : ''; - // let params = { - // goodsName: this.formData.servName, - // deptGoodsCategoryId: this.formData.category[2].goodsCategoryId, - // goodsStandardList: goodsStandardList, - // goodsAreaList: goodsAreaList, - // goodsImgUrl: this.formData.coverImgList[0], - // goodsImgsList: goodsImgsList, - // goodsVideoUrl: goodsVideoUrl, - // status: 0, - // remark: this.formData.detailDesc - // } - // let res = await this.$request.addGoods(params); - // if (res && res.code === 0) { + let params = { + goodsName: this.formData.servName, + deptGoodsCategoryId: this.formData.category[2].goodsCategoryId, + goodsStandardList: goodsStandardList, + goodsAreaList: goodsAreaList, + goodsImgUrl: this.formData.coverImgList[0], + goodsImgsList: goodsImgsList, + goodsVideoUrl: goodsVideoUrl, + status: 0, + remark: this.formData.detailDesc + } + let res = await this.$request.addGoods(params); + if (res && res.code === 0) { uni.showToast({ icon: 'success' }) uni.reLaunch({ url: '/pages/index/index?menuCode=supplyChainPage' }) - // } + } } }, }