diff --git a/src/api/shop.js b/src/api/shop.js index 00a4a48..e452c19 100644 --- a/src/api/shop.js +++ b/src/api/shop.js @@ -736,11 +736,11 @@ export function queryShopUserFlow(params) { } // 商品列表 V2 -export function tbProductListV2(params) { +export function tbProductListV2(data) { return request({ url: `/api/tbProduct/list/v2`, - method: "get", - params + method: "post", + data }); } diff --git a/src/views/product/index.vue b/src/views/product/index.vue index a45cd77..5c47368 100644 --- a/src/views/product/index.vue +++ b/src/views/product/index.vue @@ -16,6 +16,11 @@ + + + + 查询 重置 @@ -142,10 +147,11 @@ - {{ item.conName }}、 + + {{ scope.row.conInfos | conInfosFilter }} + - + 绑定 @@ -227,7 +233,7 @@ - + @@ -257,7 +263,8 @@ export default { productId: '', name: '', categoryId: '', - typeEnum: '' + typeEnum: '', + createdAt: [] }, categorys: [], typeEnums: settings.typeEnum, @@ -287,7 +294,14 @@ export default { countInfo: {}, showStockWarning: false, // 显示库存预警值 warnLineLoading: false, - warnLine: 0 + warnLine: 0, + warnLineValue: 0 + } + }, + filters: { + conInfosFilter(arr) { + let newarr = arr.map(item => item.conName) + return newarr.join('、') } }, async mounted() { @@ -311,6 +325,7 @@ export default { // 显示修改商品警告线 showStockWarningHandle() { this.showStockWarning = true + this.warnLineValue = this.warnLine }, // 修改商品警告线 async stockWarnLineConfirm() { @@ -318,11 +333,13 @@ export default { this.warnLineLoading = true const res = await stockWarnLine({ shopId: localStorage.getItem('shopId'), - warnLine: this.warnLine + warnLine: this.warnLineValue }) this.warnLineLoading = false this.showStockWarning = false this.$message.success('修改成功') + + this.getTableData() } catch (error) { this.warnLineLoading = false console.log(error); @@ -336,7 +353,11 @@ export default { async tbProductStockDetailStockCount() { try { const res = await tbProductStockDetailStockCount({ - shopId: localStorage.getItem('shopId') + shopId: localStorage.getItem('shopId'), + productName: this.query.name, + categoryId: this.query.categoryId, + startTime: this.query.createdAt[0] || '', + endTime: this.query.createdAt[1] || '' }) this.countInfo = res } catch (error) { @@ -480,7 +501,8 @@ export default { id: this.query.productId, type: this.query.typeEnum, shopId: localStorage.getItem('shopId'), - sort: this.tableData.sort + sort: this.tableData.sort, + createdAt: this.query.createdAt }) this.warnLine = res.warnLine