商品列表新增时间筛选,增加库存预警,优化耗材绑定显示
This commit is contained in:
@@ -736,11 +736,11 @@ export function queryShopUserFlow(params) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 商品列表 V2
|
// 商品列表 V2
|
||||||
export function tbProductListV2(params) {
|
export function tbProductListV2(data) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/tbProduct/list/v2`,
|
url: `/api/tbProduct/list/v2`,
|
||||||
method: "get",
|
method: "post",
|
||||||
params
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,11 @@
|
|||||||
<el-option :label="item.label" :value="item.typeEnum" v-for="item in typeEnums" :key="item.typeEnum" />
|
<el-option :label="item.label" :value="item.typeEnum" v-for="item in typeEnums" :key="item.typeEnum" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-date-picker v-model="query.createdAt" type="daterange" range-separator="至" start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" value-format="yyyy-MM-dd HH:mm:ss">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-button type="primary" @click="queryHandle">查询</el-button>
|
<el-button type="primary" @click="queryHandle">查询</el-button>
|
||||||
<el-button @click="resetHandle">重置</el-button>
|
<el-button @click="resetHandle">重置</el-button>
|
||||||
@@ -142,10 +147,11 @@
|
|||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="cons_wrap" v-if="scope.row.typeEnum">
|
<div class="cons_wrap" v-if="scope.row.typeEnum">
|
||||||
<div v-if="scope.row.conInfos && scope.row.conInfos.length">
|
<div v-if="scope.row.conInfos && scope.row.conInfos.length">
|
||||||
<el-button type="text" v-for="item in scope.row.conInfos" :key="item.id"
|
<el-button type="text" @click="showBindCons(scope.row)">
|
||||||
@click="showBindCons(scope.row)">{{ item.conName }}、</el-button>
|
{{ scope.row.conInfos | conInfosFilter }}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="text" @click="showBindCons(scope.row)">
|
<el-button v-else type="text" @click="showBindCons(scope.row)">
|
||||||
绑定
|
绑定
|
||||||
<i class="el-icon-edit"></i>
|
<i class="el-icon-edit"></i>
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -227,7 +233,7 @@
|
|||||||
<el-dialog title="修改库存预警" :visible.sync="showStockWarning" :show-close="false" width="300px">
|
<el-dialog title="修改库存预警" :visible.sync="showStockWarning" :show-close="false" width="300px">
|
||||||
<el-form :model="editorForm">
|
<el-form :model="editorForm">
|
||||||
<el-form-item label="库存预警">
|
<el-form-item label="库存预警">
|
||||||
<el-input-number v-model="warnLine" :min="0" />
|
<el-input-number v-model="warnLineValue" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
@@ -257,7 +263,8 @@ export default {
|
|||||||
productId: '',
|
productId: '',
|
||||||
name: '',
|
name: '',
|
||||||
categoryId: '',
|
categoryId: '',
|
||||||
typeEnum: ''
|
typeEnum: '',
|
||||||
|
createdAt: []
|
||||||
},
|
},
|
||||||
categorys: [],
|
categorys: [],
|
||||||
typeEnums: settings.typeEnum,
|
typeEnums: settings.typeEnum,
|
||||||
@@ -287,7 +294,14 @@ export default {
|
|||||||
countInfo: {},
|
countInfo: {},
|
||||||
showStockWarning: false, // 显示库存预警值
|
showStockWarning: false, // 显示库存预警值
|
||||||
warnLineLoading: false,
|
warnLineLoading: false,
|
||||||
warnLine: 0
|
warnLine: 0,
|
||||||
|
warnLineValue: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
conInfosFilter(arr) {
|
||||||
|
let newarr = arr.map(item => item.conName)
|
||||||
|
return newarr.join('、')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@@ -311,6 +325,7 @@ export default {
|
|||||||
// 显示修改商品警告线
|
// 显示修改商品警告线
|
||||||
showStockWarningHandle() {
|
showStockWarningHandle() {
|
||||||
this.showStockWarning = true
|
this.showStockWarning = true
|
||||||
|
this.warnLineValue = this.warnLine
|
||||||
},
|
},
|
||||||
// 修改商品警告线
|
// 修改商品警告线
|
||||||
async stockWarnLineConfirm() {
|
async stockWarnLineConfirm() {
|
||||||
@@ -318,11 +333,13 @@ export default {
|
|||||||
this.warnLineLoading = true
|
this.warnLineLoading = true
|
||||||
const res = await stockWarnLine({
|
const res = await stockWarnLine({
|
||||||
shopId: localStorage.getItem('shopId'),
|
shopId: localStorage.getItem('shopId'),
|
||||||
warnLine: this.warnLine
|
warnLine: this.warnLineValue
|
||||||
})
|
})
|
||||||
this.warnLineLoading = false
|
this.warnLineLoading = false
|
||||||
this.showStockWarning = false
|
this.showStockWarning = false
|
||||||
this.$message.success('修改成功')
|
this.$message.success('修改成功')
|
||||||
|
|
||||||
|
this.getTableData()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.warnLineLoading = false
|
this.warnLineLoading = false
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@@ -336,7 +353,11 @@ export default {
|
|||||||
async tbProductStockDetailStockCount() {
|
async tbProductStockDetailStockCount() {
|
||||||
try {
|
try {
|
||||||
const res = await tbProductStockDetailStockCount({
|
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
|
this.countInfo = res
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -480,7 +501,8 @@ export default {
|
|||||||
id: this.query.productId,
|
id: this.query.productId,
|
||||||
type: this.query.typeEnum,
|
type: this.query.typeEnum,
|
||||||
shopId: localStorage.getItem('shopId'),
|
shopId: localStorage.getItem('shopId'),
|
||||||
sort: this.tableData.sort
|
sort: this.tableData.sort,
|
||||||
|
createdAt: this.query.createdAt
|
||||||
})
|
})
|
||||||
|
|
||||||
this.warnLine = res.warnLine
|
this.warnLine = res.warnLine
|
||||||
|
|||||||
Reference in New Issue
Block a user