库存预警回退

master
chc 2024-01-16 10:18:39 +08:00
parent 07f320ca2f
commit 6221b59b21
2 changed files with 1 additions and 76 deletions

View File

@ -162,12 +162,6 @@
<TabPane label="批量规格更新" name="stockAll"> <TabPane label="批量规格更新" name="stockAll">
<Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" /> <Input type="number" v-model="stockAllUpdate" placeholder="统一规格修改" />
</TabPane> </TabPane>
<TabPane label="手动库存预警更新" name="alertQuantity">
<Table class="mt_10" :columns="alertQuantityColumns" :data="alertQuantityList" border></Table>
</TabPane>
<TabPane label="批量库存预警更新" name="alertQuantityAll">
<Input type="number" v-model="stockAllAlertQuantity" placeholder="统一库存预警修改" />
</TabPane>
</Tabs> </Tabs>
<div slot="footer"> <div slot="footer">
@ -221,7 +215,6 @@ import {
getGoodsListDataSeller, getGoodsListDataSeller,
getGoodsSkuListDataSeller, getGoodsSkuListDataSeller,
updateGoodsSkuStocks, updateGoodsSkuStocks,
updateGoodsAlertStocks,
upGoods, upGoods,
lowGoods, lowGoods,
deleteGoods, deleteGoods,
@ -248,7 +241,6 @@ export default {
logisticsTemplate: [], // logisticsTemplate: [], //
updateStockModalVisible: false, // updateStockModalVisible: false, //
stockAllUpdate: undefined, // stockAllUpdate: undefined, //
stockAllAlertQuantity: undefined, //
searchForm: { searchForm: {
// //
pageNumber: 1, // pageNumber: 1, //
@ -257,7 +249,6 @@ export default {
order: "desc", // order: "desc", //
}, },
stockList: [], // stockList: [], //
alertQuantityList: [], //
form: { form: {
// //
goodsName: "", goodsName: "",
@ -309,49 +300,6 @@ export default {
}, },
}, },
], ],
alertQuantityColumns: [
{
title: "库存预警",
key: "sn",
minWidth: 120,
render: (h, params) => {
return h("div", {}, params.row.simpleSpecs);
},
},
{
title: "审核状态",
key: "authFlag",
width: 130,
render: (h, params) => {
if (params.row.authFlag == "TOBEAUDITED") {
return h("Tag", { props: { color: "blue" } }, "待审核");
} else if (params.row.authFlag == "PASS") {
return h("Tag", { props: { color: "green" } }, "通过");
} else if (params.row.authFlag == "REFUSE") {
return h("Tag", { props: { color: "red" } }, "审核拒绝");
}
},
},
{
title: "操作",
key: "action",
align: "center",
width: 200,
render: (h, params) => {
let vm = this;
return h("InputNumber", {
props: {
value: params.row.alertQuantity,
},
on: {
"on-change": (event) => {
vm.alertQuantityList[params.index].alertQuantity = event;
},
},
});
},
},
],
// //
formValidate: {}, formValidate: {},
submitLoading: false, // submitLoading: false, //
@ -587,8 +535,6 @@ export default {
this.updateStockType = 'updateStock'; this.updateStockType = 'updateStock';
this.stockAllUpdate = undefined; this.stockAllUpdate = undefined;
this.stockList = res.result.records; this.stockList = res.result.records;
this.stockAllAlertQuantity = undefined;
this.alertQuantityList = res.result.records;
} }
}); });
}, },
@ -642,23 +588,7 @@ export default {
}, },
// //
updateStock () { updateStock () {
if (this.updateStockType === 'alertQuantity' || this.updateStockType === 'alertQuantityAll') { if (this.updateStockType === 'updateStock' || this.updateStockType === 'stockAll') {
// alertQuantity alertQuantityAll
let updateAlertQuantityList = this.alertQuantityList.map((i) => {
let j = { skuId: i.id, alertQuantity: i.alertQuantity };
if (this.stockAllAlertQuantity) {
j.alertQuantity = this.stockAllAlertQuantity;
}
return j;
});
updateGoodsAlertStocks(updateAlertQuantityList).then((res) => {
if (res.success) {
this.updateStockModalVisible = false;
this.$Message.success("更新库存预警成功");
this.getDataList();
}
});
} else if (this.updateStockType === 'updateStock' || this.updateStockType === 'stockAll') {
// updateStock stockAll // updateStock stockAll
let updateStockList = this.stockList.map((i) => { let updateStockList = this.stockList.map((i) => {
let j = { skuId: i.id, quantity: i.quantity }; let j = { skuId: i.id, quantity: i.quantity };

View File

@ -213,11 +213,6 @@
overflow-x: hidden; overflow-x: hidden;
} }
"> ">
<template slot="alertQuantity" slot-scope="{ row }">
<Input v-model="row.alertQuantity" clearable placeholder="请输入库存预警" @on-change="updateSkuTable(row, 'alertQuantity')">
<span slot="append">{{baseInfoForm.goodsUnit || ""}}</span>
</Input>
</template>
<template slot="sn" slot-scope="{ row }"> <template slot="sn" slot-scope="{ row }">
<Input v-model="row.sn" clearable placeholder="请输入货号" @on-change="updateSkuTable(row, 'sn')" /> <Input v-model="row.sn" clearable placeholder="请输入货号" @on-change="updateSkuTable(row, 'sn')" />
</template> </template>