出库问题修改

master
zhangdi 3 days ago
parent 45beafffa0
commit a64e391e8b
  1. 925
      src/views/firstOrder/components/outDialog.vue

@ -423,510 +423,521 @@ export default {
}
},
getStatistics() {
let arr = JSON.parse(JSON.stringify(this.sizeForm.inTableData));
let arr = this.sizeForm.inTableData;
arr.forEach((row) => {
row.id = row.oneFormId;
});
getStatistics(arr).then((res) => {
this.statisticsList = res.data.result;
this.statisticsList = this.statisticsList.map((stat) => {
// this.statisticsList = res.data.result;
let data_ = res.data.result
// this.statisticsList =
console.log('批量易耗品', this.sizeForm.inTableData, data_)
data_.forEach((stat,index) => {
const detail = this.sizeForm.inTableData.find(
(item) => item.materialCode === stat.materialCode
);
//
if (
(this.sizeForm.options == 1 &&
this.inBatchForm.optionType == "NY") ||
(this.sizeForm.options == 2 && this.sizeForm.optionType == "NY")
) {
const detailList = this.sizeForm.inTableData.filter(
(item) =>
item.materialCode === stat.materialCode &&
item.materialName === stat.materialName
);
console.log(8989898989, detailList)
detail.theOutboundQuantity = detailList.reduce(
(acc, cur) => acc + cur.theOutboundQuantity,
0
);
}
return {
...stat,
theOutboundQuantity: detail.theOutboundQuantity, //
unitPrice: detail.unitPrice,
totalQuantity: stat.num - detail.theOutboundQuantity,
department: detail.department, // ID
departmentName:
detail.departmentName ||
this.getDepartmentName(detail.department),
};
});
});
},
changeDepartment() {
this.getStatistics();
},
batchclose() {
this.batchSelectionVisible = false;
},
selectionChange(row) {
this.batchSelectionVisible = false;
row.forEach((item) => {
item.outboundQuantity = 1;
item.theOutboundQuantity = 1;
item.oneFormId = item.id
});
this.sizeForm.inTableData = row;
this.getStatistics();
},
confirm(allSelectedList) {
this.consumableVisible = false;
allSelectedList.forEach((item) => {
item.outboundQuantity = 1;
item.theOutboundQuantity = 1;
item.oneFormId = item.id
});
this.sizeForm.inTableData = allSelectedList;
this.getStatistics();
}, //
async handleSearch() {
//
this.currentPage = 1;
await this.loadGoodsList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.currentPage = 1;
this.loadGoodsList();
},
if (detail) {
// console.log(99999,index, detail, stat.materialCode)
if (
(this.sizeForm.options == 1 &&
this.inBatchForm.optionType == "NY") ||
(this.sizeForm.options == 2 && this.sizeForm.optionType == "NY")
) {
const detailList = this.sizeForm.inTableData.filter(
(item) =>
item.materialCode === stat.materialCode &&
item.materialName === stat.materialName
);
detail.theOutboundQuantity = detailList.reduce(
(acc, cur) => cur.theOutboundQuantity,
0
);
}
this.statisticsList.push({
...stat,
theOutboundQuantity: detail.theOutboundQuantity, //
unitPrice: detail.unitPrice,
totalQuantity: stat.num - detail.theOutboundQuantity,
department: detail.department, // ID
departmentName:
detail.departmentName ||
this.getDepartmentName(detail.department),
})
//
handleCurrentChange(val) {
this.currentPage = val;
this.loadGoodsList();
},
depchange(value) {
this.departmentList = this.departmentList;
},
//
handleBatchClose() {
this.inBatchDialogVisible = false;
},
//
inTableAdd() {
const requiredFields = [
{ value: this.sizeForm.reason, message: "请填写事由" },
{ value: this.sizeForm.materialType, message: "请选择物资类型" },
{
value: this.sizeForm.optionType,
message: "请选择类别(易耗品/耐用品)",
},
];
//
for (const field of requiredFields) {
if (!field.value) {
this.$message.warning(field.message);
return;
}
}
this.sizeForm.inTableData.push({});
},
addInit() {
this.sizeForm.outDate = new Date(); //
},
//
syncInboundQuantity(row) {
row.theOutboundQuantity = Number(row.theOutboundQuantity);
if (this.sizeForm.options === 1) {
const maxAllowQuantity =
(row.applicationQuantity || 0) - (row.outboundQuantity || 0);
if (row.theOutboundQuantity > maxAllowQuantity) {
this.$message.error(`本次出库数量不能大于${maxAllowQuantity}`);
row.theOutboundQuantity = maxAllowQuantity;
return false;
}
}
if (this.sizeForm.optionType === "NY") {
row.outboundQuantity = 1;
}
this.getStatistics();
},
//
handleCloseDetail() {
this.outDialogVisible = false;
this.$emit("handleCloseDetail");
},
closeDialog() {
this.consumableVisible = false;
},
});
console.log('detail', this.statisticsList)
});
},
changeDepartment() {
this.getStatistics();
},
batchclose() {
this.batchSelectionVisible = false;
},
selectionChange(row) {
this.batchSelectionVisible = false;
row.forEach((item) => {
item.outboundQuantity = 1;
item.theOutboundQuantity = 1;
item.oneFormId = item.id
});
this.sizeForm.inTableData = row;
this.getStatistics();
},
confirm(allSelectedList) {
this.consumableVisible = false;
allSelectedList.forEach((item) => {
item.outboundQuantity = 1;
item.theOutboundQuantity = 1;
item.oneFormId = item.id
});
this.sizeForm.inTableData = allSelectedList;
this.getStatistics();
}, //
async handleSearch() {
//
this.currentPage = 1;
await this.loadGoodsList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.currentPage = 1;
this.loadGoodsList();
},
//
handleCurrentChange(val) {
this.currentPage = val;
this.loadGoodsList();
},
depchange(value) {
this.departmentList = this.departmentList;
},
//
handleBatchClose() {
this.inBatchDialogVisible = false;
},
//
inTableAdd() {
const requiredFields = [
{ value: this.sizeForm.reason, message: "请填写事由" },
{ value: this.sizeForm.materialType, message: "请选择物资类型" },
{
value: this.sizeForm.optionType,
message: "请选择类别(易耗品/耐用品)",
},
];
//
for (const field of requiredFields) {
if (!field.value) {
this.$message.warning(field.message);
return;
}
}
this.sizeForm.inTableData.push({});
},
addInit() {
this.sizeForm.outDate = new Date(); //
},
//
syncInboundQuantity(row) {
row.theOutboundQuantity = Number(row.theOutboundQuantity);
if (this.sizeForm.options === 1) {
const maxAllowQuantity =
(row.applicationQuantity || 0) - (row.outboundQuantity || 0);
if (row.theOutboundQuantity > maxAllowQuantity) {
this.$message.error(`本次出库数量不能大于${maxAllowQuantity}`);
row.theOutboundQuantity = maxAllowQuantity;
return false;
}
}
if (this.sizeForm.optionType === "NY") {
row.outboundQuantity = 1;
}
this.getStatistics();
},
//
handleCloseDetail() {
this.outDialogVisible = false;
this.$emit("handleCloseDetail");
},
closeDialog() {
this.consumableVisible = false;
},
//
async getQuarterList() {
try {
const res = await getQuarterList();
if (res.data && res.data.result) {
this.quarterList = res.data.result;
this.quarterList.forEach((item) => {
if (item.year && item.quarter && item.ids) {
this.quarterYearMap[item.ids] = item.year;
this.quarterQuarterMap[item.ids] = item.quarter;
this.sizeForm.inTableData.ldDemandEndId = item.ids;
}
});
try {
const res = await getQuarterList();
if (res.data && res.data.result) {
this.quarterList = res.data.result;
this.quarterList.forEach((item) => {
if (item.year && item.quarter && item.ids) {
this.quarterYearMap[item.ids] = item.year;
this.quarterQuarterMap[item.ids] = item.quarter;
this.sizeForm.inTableData.ldDemandEndId = item.ids;
}
} catch (error) {
this.$message.error("获取需求单列表失败");
}
},
});
}
} catch (error) {
this.$message.error("获取需求单列表失败");
}
},
//
async onQuarterSelectChange(ids) {
if (!ids) return;
const year = this.quarterYearMap[ids];
const quarter = this.quarterQuarterMap[ids];
if (year && quarter) {
try {
const res = await getDepartmentList({
year: year,
quarter: quarter,
});
if (res.data && res.data.result) {
this.departmentList = res.data.result;
} else {
this.departmentList = [];
}
} catch (error) {
this.$message.error("获取部门列表失败");
this.departmentList = [];
}
if (!ids) return;
const year = this.quarterYearMap[ids];
const quarter = this.quarterQuarterMap[ids];
if (year && quarter) {
try {
const res = await getDepartmentList({
year: year,
quarter: quarter,
});
if (res.data && res.data.result) {
this.departmentList = res.data.result;
} else {
this.departmentList = [];
}
},
} catch (error) {
this.$message.error("获取部门列表失败");
this.departmentList = [];
}
} else {
this.departmentList = [];
}
},
async batchSubmit() {
if (!this.inBatchForm.batchType) {
this.$message.error("请选择需求单");
return;
}
if (!this.inBatchForm.department) {
this.$message.error("请选择部门");
return;
}
if (!this.inBatchForm.optionType) {
this.$message.error("请选择类别");
return;
}
if (!this.inBatchForm.batchType) {
this.$message.error("请选择需求单");
return;
}
if (!this.inBatchForm.department) {
this.$message.error("请选择部门");
return;
}
if (!this.inBatchForm.optionType) {
this.$message.error("请选择类别");
return;
}
const requestParams = {
ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department,
optionType: this.inBatchForm.optionType,
};
try {
let res;
if (this.inBatchForm.optionType === "YH") {
res = await getDetailedList(requestParams);
} else if (this.inBatchForm.optionType === "NY") {
res = await batchList(requestParams);
}
const requestParams = {
ids: this.inBatchForm.batchType,
departmentId: this.inBatchForm.department,
optionType: this.inBatchForm.optionType,
};
if (res.data && res.data.result) {
// this.sizeForm.inTableData = res.data.result;
const selectedDept = this.departmentList.find(
(dept) => dept.departmentId === this.inBatchForm.department
);
const processedData = res.data.result.map((item) => {
// -
// 0
const appQty = Number(item.applicationQuantity || 0);
const outQty = Number(item.outboundQuantity || 0);
try {
let res;
const defaultQty = appQty - outQty;
if (this.inBatchForm.optionType === "YH") {
res = await getDetailedList(requestParams);
} else if (this.inBatchForm.optionType === "NY") {
res = await batchList(requestParams);
item.department = selectedDept.departmentId
item.departmentName = selectedDept.department
}
return {
...item,
IdDemandEndld: this.inBatchForm.batchType,
// department: deptName, // IDsubmit
// 0
theOutboundQuantity: defaultQty > 0 ? defaultQty : 0,
};
});
if (res.data && res.data.result) {
this.sizeForm.inTableData = res.data.result;
const selectedDept = this.departmentList.find(
(dept) => dept.departmentId === this.inBatchForm.department
);
const processedData = res.data.result.map((item) => {
// -
// 0
const appQty = Number(item.applicationQuantity || 0);
const outQty = Number(item.outboundQuantity || 0);
const defaultQty = appQty - outQty;
if (this.inBatchForm.optionType === "YH") {
item.department = selectedDept.departmentId
item.departmentName = selectedDept.department
}
return {
...item,
IdDemandEndld: this.inBatchForm.batchType,
// department: deptName, // IDsubmit
// 0
theOutboundQuantity: defaultQty > 0 ? defaultQty : 0,
};
});
this.sizeForm.inTableData = processedData;
//
this.inBatchDialogVisible = false;
//
const selectedQuarter = this.quarterList.find(
(item) => item.ids === this.inBatchForm.batchType
);
if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
}
this.sizeForm.inTableData = processedData;
//
//
this.inBatchDialogVisible = false;
//
if (this.inBatchForm.optionType === "NY") {
this.batchSelectionVisible = true;
this.dialogVisible = true;
this.batchTableData = res.data.result;
} else {
//
const selectedQuarter = this.quarterList.find(
(item) => item.ids === this.inBatchForm.batchType
);
if (selectedQuarter) {
this.sizeForm.demandEndInfo = selectedQuarter.quarterName;
}
this.getStatistics();
}
//
if (this.inBatchForm.optionType === "NY") {
this.batchSelectionVisible = true;
this.dialogVisible = true;
this.batchTableData = res.data.result;
} else {
//
this.$nextTick(() => {
this.$forceUpdate();
});
} else {
this.$message.warning("未获取到详细数据");
}
} catch (error) {
this.$message.error(
`获取${this.inBatchForm.optionType === "YH" ? "易耗品" : "耐用品"
}数据失败${error.message}`
);
this.getStatistics();
}
},
//
this.$nextTick(() => {
this.$forceUpdate();
});
} else {
this.$message.warning("未获取到详细数据");
}
} catch (error) {
this.$message.error(
`获取${this.inBatchForm.optionType === "YH" ? "易耗品" : "耐用品"
}数据失败${error.message}`
);
}
},
//
async getDetailedItems() {
this.loading = true;
try {
// const res = await ;
// this.list = res.data.result;
getDetailedItems().then(res=>{
this.list = res.data.result;
})
} catch (error) {
this.$message.error("获取数据来源失败,请重试");
} finally {
this.loading = false;
}
},
getDepartmentName(departmentId) {
const department = this.list.find(
(item) => item.departmentId === departmentId
);
return department ? department.department : "";
},
this.loading = true;
try {
// const res = await ;
// this.list = res.data.result;
getDetailedItems().then(res => {
this.list = res.data.result;
})
} catch (error) {
this.$message.error("获取数据来源失败,请重试");
} finally {
this.loading = false;
}
},
getDepartmentName(departmentId) {
const department = this.list.find(
(item) => item.departmentId === departmentId
);
return department ? department.department : "";
},
//
async getMaterialList() {
this.loading = true;
this.consumableVisible = false;
try {
if (
this.sizeForm.optionType === "NY" &&
this.outDialogType !== "details"
) {
this.consumableVisible = true;
} else {
getMaterialList({
optionType: this.sizeForm.optionType,
}).then((res) => {
this.materials = res.data.result;
});
}
} catch (error) {
this.$message.error("获取失败,请重试");
} finally {
this.loading = false;
}
},
//
handleMaterialChange(row, index) {
let select = this.materials.filter(
(item) => item.materialId === row.materialId
)[0];
this.sizeForm.inTableData[index].materialId = select.materialId;
this.sizeForm.inTableData[index].model = select.model;
this.sizeForm.inTableData[index].materialCode = select.materialCode;
this.sizeForm.inTableData[index].materialName = select.materialName;
this.sizeForm.inTableData[index].type = select.type;
this.sizeForm.inTableData[index].unit = select.unit;
this.sizeForm.inTableData[index].num = select.num;
this.getStatistics();
},
this.loading = true;
this.consumableVisible = false;
try {
if (
this.sizeForm.optionType === "NY" &&
this.outDialogType !== "details"
) {
this.consumableVisible = true;
} else {
getMaterialList({
optionType: this.sizeForm.optionType,
}).then((res) => {
this.materials = res.data.result;
});
}
} catch (error) {
this.$message.error("获取失败,请重试");
} finally {
this.loading = false;
}
},
//
handleMaterialChange(row, index) {
let select = this.materials.filter(
(item) => item.materialId === row.materialId
)[0];
this.sizeForm.inTableData[index].materialId = select.materialId;
this.sizeForm.inTableData[index].model = select.model;
this.sizeForm.inTableData[index].materialCode = select.materialCode;
this.sizeForm.inTableData[index].materialName = select.materialName;
this.sizeForm.inTableData[index].type = select.type;
this.sizeForm.inTableData[index].unit = select.unit;
this.sizeForm.inTableData[index].num = select.num;
this.getStatistics();
},
//
async submit(index) {
if (!this.sizeForm.reason) {
this.$message.error("事由不能为空");
return;
}
if (!this.sizeForm.materialType) {
this.$message.error("请选择物资类型");
return;
}
if (this.sizeForm.options === 1) {
if (!this.sizeForm.demandEndInfo) {
this.$message.error("请选择需求单名称");
return;
}
if (
!this.sizeForm.inTableData ||
this.sizeForm.inTableData.length === 0
) {
this.$message.error("请添加批量选择数据");
return;
}
if (this.sizeForm.options === 2) {
for (const row of this.sizeForm.inTableData) {
if (!row.departmentName) {
this.$message.error("请选择部门");
return;
}
}
}
}
if (this.sizeForm.options == 2) {
console.log(898989, "易耗是否选择部门!");
const invalidRow = this.sizeForm.inTableData.find(
(row) => !row.department
);
if (invalidRow) {
this.$message.error("存在未选择部门的物资,请补充完整");
if (!this.sizeForm.reason) {
this.$message.error("事由不能为空");
return;
}
if (!this.sizeForm.materialType) {
this.$message.error("请选择物资类型");
return;
}
if (this.sizeForm.options === 1) {
if (!this.sizeForm.demandEndInfo) {
this.$message.error("请选择需求单名称");
return;
}
if (
!this.sizeForm.inTableData ||
this.sizeForm.inTableData.length === 0
) {
this.$message.error("请添加批量选择数据");
return;
}
if (this.sizeForm.options === 2) {
for (const row of this.sizeForm.inTableData) {
if (!row.departmentName) {
this.$message.error("请选择部门");
return;
}
}
// status == 1 2
this.sizeForm.status = index;
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData;
let arr = this.list.find(
(item) => item.departmentId === this.inBatchForm.department
);
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData.map(
(row) => {
const deptId = row.department;
const dept = this.list.find((item) => item.departmentId === deptId);
let select = this.sizeForm.inTableData.find(
(item) => item.materialId === row.materialId
);
console.log(99999, select, this.sizeForm.inTableData);
const oneFormId = row.oneFormId
return {
...row,
department: deptId,
departmentName: dept.department,
oneFormId: oneFormId,
};
}
}
}
if (this.sizeForm.options == 2) {
console.log(898989, "易耗是否选择部门!");
const invalidRow = this.sizeForm.inTableData.find(
(row) => !row.department
);
if (invalidRow) {
this.$message.error("存在未选择部门的物资,请补充完整");
return;
}
}
// status == 1 2
this.sizeForm.status = index;
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData;
let arr = this.list.find(
(item) => item.departmentId === this.inBatchForm.department
);
this.sizeForm.ldOneOutStorageDetailVOList = this.sizeForm.inTableData.map(
(row) => {
const deptId = row.department;
const dept = this.list.find((item) => item.departmentId === deptId);
let select = this.sizeForm.inTableData.find(
(item) => item.materialId === row.materialId
);
if (this.outDialogTiltle == "编辑") {
this.sizeForm.id = this.id;
}
if (this.sizeForm.options == 1) {
this.sizeForm.optionType = this.inBatchForm.optionType;
}
try {
console.log(this.sizeForm, "提交数据");
this.saveLoading = true;
const res = await submitData(this.sizeForm);
if (res.data.success) {
this.$message({
type: "success",
message: "提交成功",
});
this.$emit("submitSuccess");
this.saveLoading = false;
this.handleCloseDetail();
} else {
this.saveLoading = false;
this.$message.error(res.data.message || "提交失败");
}
} catch (error) {
this.saveLoading = false;
this.$message.error(error.message || "服务器错误");
}
},
console.log(99999, select, this.sizeForm.inTableData);
const oneFormId = row.oneFormId
return {
...row,
department: deptId,
departmentName: dept.department,
oneFormId: oneFormId,
};
}
);
if (this.outDialogTiltle == "编辑") {
this.sizeForm.id = this.id;
}
if (this.sizeForm.options == 1) {
this.sizeForm.optionType = this.inBatchForm.optionType;
}
try {
console.log(this.sizeForm, "提交数据");
this.saveLoading = true;
const res = await submitData(this.sizeForm);
if (res.data.success) {
this.$message({
type: "success",
message: "提交成功",
});
this.$emit("submitSuccess");
this.saveLoading = false;
this.handleCloseDetail();
} else {
this.saveLoading = false;
this.$message.error(res.data.message || "提交失败");
}
} catch (error) {
this.saveLoading = false;
this.$message.error(error.message || "服务器错误");
}
},
//
async inInit() {
if (this.outDialogType == "details" || this.outDialogType == "edit") {
editList(this.id).then((res) => {
const { ldOneOutStorage, ldOneOutStorageDetails } =
res.data.result || {};
// this.sizeForm = res.data.result.ldOneOutStorage
// this.sizeForm.id =
this.sizeForm.inTableData = res.data.result.ldOneOutStorageDetails;
this.sizeForm.orderNo = ldOneOutStorage.orderNo;
this.sizeForm.reason = ldOneOutStorage.reason;
this.sizeForm.demandEndInfo = ldOneOutStorage.demandEndInfo;
this.sizeForm.outDate = ldOneOutStorage.outDate;
this.sizeForm.options = Number(ldOneOutStorage.options);
this.sizeForm.optionType = ldOneOutStorage.optionType;
this.batchSelectionVisible = false;
this.inBatchForm.optionType = ldOneOutStorage.optionType;
if (this.sizeForm.options == 2 && this.sizeForm.optionType == "YH") {
this.getMaterialList();
}
this.$set(this.sizeForm, "inTableData", ldOneOutStorageDetails);
this.getStatistics();
});
}
},
//
radioChange() {
this.sizeForm.inTableData = [];
this.statisticsList = [];
this.sizeForm.optionType = "";
this.inBatchDialogVisible = false;
this.consumableVisible = false;
this.inBatchDialogVisible = false;
if (this.outDialogType == "details" || this.outDialogType == "edit") {
editList(this.id).then((res) => {
const { ldOneOutStorage, ldOneOutStorageDetails } =
res.data.result || {};
// this.sizeForm = res.data.result.ldOneOutStorage
// this.sizeForm.id =
this.sizeForm.inTableData = res.data.result.ldOneOutStorageDetails;
this.sizeForm.orderNo = ldOneOutStorage.orderNo;
this.sizeForm.reason = ldOneOutStorage.reason;
this.sizeForm.demandEndInfo = ldOneOutStorage.demandEndInfo;
this.sizeForm.outDate = ldOneOutStorage.outDate;
this.sizeForm.options = Number(ldOneOutStorage.options);
this.sizeForm.optionType = ldOneOutStorage.optionType;
this.batchSelectionVisible = false;
this.batchTableData = [];
// this.inBatchForm.batchType = ""
// this.inBatchForm.department = ""
this.sizeForm.demandEndInfo = "";
if (this.sizeForm.options === 1) {
this.getQuarterList();
this.inBatchDialogVisible = true;
(this.inBatchForm.batchType = ""), (this.inBatchForm.department = "");
this.inBatchForm.optionType = "";
this.inBatchForm.optionType = "";
this.inBatchForm.optionType = ldOneOutStorage.optionType;
if (this.sizeForm.options == 2 && this.sizeForm.optionType == "YH") {
this.getMaterialList();
}
},
//
handleDelete(index, row) {
this.sizeForm.inTableData.splice(index, 1);
this.$message.success("已成功删除该条记录");
this.$set(this.sizeForm, "inTableData", ldOneOutStorageDetails);
this.getStatistics();
},
},
watch: {
//
// "inBatchForm.batchType": function (newVal) {
// (this.inBatchForm.department = ""), (this.inBatchForm.optionType = 1);
// if (newVal) {
// this.onQuarterSelectChange(newVal);
// }
// },
// "sizeForm.optionType": function (newVal) {
// if (newVal && this.outDialogType === "add") {
// this.sizeForm.inTableData = [];
// this.getMaterialList();
// } else if (newVal && this.outDialogType !== "add") {
// this.getMaterialList();
// }
// },
});
}
},
//
radioChange() {
this.sizeForm.inTableData = [];
this.statisticsList = [];
this.sizeForm.optionType = "";
this.inBatchDialogVisible = false;
this.consumableVisible = false;
this.inBatchDialogVisible = false;
this.batchSelectionVisible = false;
this.batchTableData = [];
// this.inBatchForm.batchType = ""
// this.inBatchForm.department = ""
this.sizeForm.demandEndInfo = "";
if (this.sizeForm.options === 1) {
this.getQuarterList();
this.inBatchDialogVisible = true;
(this.inBatchForm.batchType = ""), (this.inBatchForm.department = "");
this.inBatchForm.optionType = "";
this.inBatchForm.optionType = "";
}
},
//
handleDelete(index, row) {
this.sizeForm.inTableData.splice(index, 1);
this.$message.success("已成功删除该条记录");
this.getStatistics();
},
},
watch: {
//
// "inBatchForm.batchType": function (newVal) {
// (this.inBatchForm.department = ""), (this.inBatchForm.optionType = 1);
// if (newVal) {
// this.onQuarterSelectChange(newVal);
// }
// },
// "sizeForm.optionType": function (newVal) {
// if (newVal && this.outDialogType === "add") {
// this.sizeForm.inTableData = [];
// this.getMaterialList();
// } else if (newVal && this.outDialogType !== "add") {
// this.getMaterialList();
// }
// },
},
};
</script>
<style lang="scss" scoped>

Loading…
Cancel
Save