供应链问题修复

This commit is contained in:
donqi 2022-07-04 17:00:52 +08:00
parent 70d07842a2
commit c7ac112bdf
2 changed files with 45 additions and 44 deletions

View File

@ -25,7 +25,7 @@
</view>
<!-- tab content -->
<view>
<view class="padding bg-white margin-top-sm margin-lr-sm name-card" v-for="(good, index) in goodsList">
<view class="padding bg-white margin-top-sm margin-lr-sm name-card" v-for="(good, index) in goodsList" v-if="good.status !== 2">
<view class="flex justify-start">
<view class="cu-avatar xxl-view" :style="'background-image:url(' + good.goodsImgUrl + ');'"></view>
<view class="margin-left-sm flex-column-between">
@ -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);

View File

@ -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;
// }
// });
// // 01
// 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;
}
});
// 01
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'
})
// }
}
}
},
}