|
@@ -298,6 +298,7 @@ const takeStockPeriodList = ref([]);
|
|
const hasAlreadyTakeStock = ref(false);
|
|
const hasAlreadyTakeStock = ref(false);
|
|
//列表中已经存在新增的盘点
|
|
//列表中已经存在新增的盘点
|
|
const hasAlreadyAddTakeStock = ref(false);
|
|
const hasAlreadyAddTakeStock = ref(false);
|
|
|
|
+const canSave = ref(false);
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
|
|
|
|
@@ -323,6 +324,7 @@ function getTakeStockPeriodList() {
|
|
hasAlreadyTakeStock.value = res.others.hasAddTakeStockStatus;
|
|
hasAlreadyTakeStock.value = res.others.hasAddTakeStockStatus;
|
|
hasAlreadyAddTakeStock.value = res.others.hasTakeStockStatus;
|
|
hasAlreadyAddTakeStock.value = res.others.hasTakeStockStatus;
|
|
total.value = res.total;
|
|
total.value = res.total;
|
|
|
|
+ canSave.value = true
|
|
});
|
|
});
|
|
loading.value = false;
|
|
loading.value = false;
|
|
}
|
|
}
|
|
@@ -342,6 +344,7 @@ function handleAdd() {
|
|
}
|
|
}
|
|
//保存按钮
|
|
//保存按钮
|
|
function handleSave(row) {
|
|
function handleSave(row) {
|
|
|
|
+ canSave.value = true
|
|
if (row.stockTime == null) {
|
|
if (row.stockTime == null) {
|
|
proxy.$modal.msgError("请选择盘点时间");
|
|
proxy.$modal.msgError("请选择盘点时间");
|
|
return;
|
|
return;
|
|
@@ -349,12 +352,16 @@ function handleSave(row) {
|
|
row.stockYear = row.stockTime.substring(0, 4);
|
|
row.stockYear = row.stockTime.substring(0, 4);
|
|
row.stockMonth = row.stockTime.substring(5, 7);
|
|
row.stockMonth = row.stockTime.substring(5, 7);
|
|
console.log(row);
|
|
console.log(row);
|
|
|
|
+ if(canSave.value){
|
|
addTakeStockPeriod(row).then((res) => {
|
|
addTakeStockPeriod(row).then((res) => {
|
|
|
|
+ canSave.value = false;
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
getTakeStockPeriodList();
|
|
getTakeStockPeriodList();
|
|
}
|
|
}
|
|
|
|
+
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+}
|
|
function handleExport(data) {
|
|
function handleExport(data) {
|
|
console.log(data);
|
|
console.log(data);
|
|
proxy.download(
|
|
proxy.download(
|