|
|
@@ -826,6 +826,7 @@ const SelectClickBz = (row, column, event) => {
|
|
|
}
|
|
|
}
|
|
|
const addDetailData = async () => {
|
|
|
+ //将数据给到接口
|
|
|
const restoredData = {
|
|
|
sys_id: sys_id,
|
|
|
sczl_rq: detailData.sczl_rq,
|
|
|
@@ -850,21 +851,30 @@ const SelectClickBz = (row, column, event) => {
|
|
|
restoredData[`sczl_Jtbh${num}`] = item.sczl_Jtbh1
|
|
|
restoredData[`sczl_dedh${num}`] = item.sczl_dedh
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
+ //调用新增接口
|
|
|
const res = await addPackingTable(restoredData)
|
|
|
if (res.code === 0) {
|
|
|
ElMessage({
|
|
|
type: 'success',
|
|
|
message: '新增成功',
|
|
|
})
|
|
|
- getTableData()
|
|
|
+ getTableData()
|
|
|
if (params.date != '') {
|
|
|
getTableData()
|
|
|
}
|
|
|
getSideData()
|
|
|
}
|
|
|
+ //新增成功后清空
|
|
|
+ detailData.table.forEach((row) => {
|
|
|
+ row.hsbz = ""; // 清空核算标准
|
|
|
+ row.sczl_cl = ""; // 清空包装产量
|
|
|
+ row.sczl_返工产量 = ""; // 清空返工产量
|
|
|
+ row.sczl_PgCl = ""; // 清空每箱数量
|
|
|
+ });
|
|
|
+ //自动定位光标
|
|
|
setTimeout(() => {
|
|
|
- const inputElement = document.getElementById('员工编号');
|
|
|
+ const inputElement = document.getElementById('日期');
|
|
|
if (inputElement) {
|
|
|
inputElement.focus();
|
|
|
}
|