|
|
@@ -307,22 +307,21 @@ const treeData = reactive([]);
|
|
|
const getTabdata = async () => {
|
|
|
//接口调用函数
|
|
|
const response = await getInspectCount();
|
|
|
- console.log(response)
|
|
|
|
|
|
-const transformedData = response.data.map(item => ({
|
|
|
- label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
|
|
|
- children: item.sys.map(sysItem => ({
|
|
|
- label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
|
|
|
- params: {
|
|
|
- date: item.date.replace(/-/g, '.'),
|
|
|
- sys_id: sysItem.sys_id,
|
|
|
- total: sysItem.count,
|
|
|
- },
|
|
|
- })),
|
|
|
- }));
|
|
|
- treeData.splice(0, treeData.length, ...transformedData);
|
|
|
- displayMod.value = 'date'
|
|
|
- }
|
|
|
+ const transformedData = response.data.map(item => ({
|
|
|
+ label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
|
|
|
+ children: item.sys.map(sysItem => ({
|
|
|
+ label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
|
|
|
+ params: {
|
|
|
+ date: item.date.replace(/-/g, '.'),
|
|
|
+ sys_id: sysItem.sys_id,
|
|
|
+ total: sysItem.count,
|
|
|
+ },
|
|
|
+ })),
|
|
|
+ }));
|
|
|
+ treeData.splice(0, treeData.length, ...transformedData);
|
|
|
+ displayMod.value = 'date'
|
|
|
+}
|
|
|
|
|
|
getTabdata();
|
|
|
|
|
|
@@ -1364,21 +1363,7 @@ const updateDetailData = async() => {
|
|
|
sczl_fp12: formData.value.sczl_fp12,
|
|
|
sys_id:'[1013/洪丽]',
|
|
|
}
|
|
|
- // detailData.table.forEach((item, index, array) => {
|
|
|
- // const num = index + 1
|
|
|
- // restoredData[`sczl_gdbh${num}`] = item.sczl_gdbh
|
|
|
- // restoredData[`sczl_yjGx${num}`] = item.sczl_yjGx
|
|
|
- // restoredData[`sczl_gxmc${num}`] = item.sczl_gxmc
|
|
|
- // // restoredData[`Gd_cpmc${num}`] = item.Gd_cpmc
|
|
|
- // restoredData[`sczl_cl${num}`] = item.sczl_cl
|
|
|
- // restoredData[`sczl_PgCl${num}`] = item.sczl_PgCl
|
|
|
- // restoredData[`sczl_clAdd${num}`] = item.sczl_clAdd
|
|
|
- // })
|
|
|
if(ADD.value=='新增'){
|
|
|
- // console.log('新增')
|
|
|
- console.log('新增')
|
|
|
- console.log(ADD.value)
|
|
|
- console.log(restoredData)
|
|
|
const response = await inspectadd(restoredData);
|
|
|
// ADD.value='1'
|
|
|
// console.log(ADD.value)
|
|
|
@@ -1393,9 +1378,6 @@ const updateDetailData = async() => {
|
|
|
dialogFormVisible.value = false
|
|
|
}else{
|
|
|
const response = await shougongedit(restoredData);
|
|
|
- console.log('修改')
|
|
|
- console.log(ADD.value)
|
|
|
- console.log(response)
|
|
|
if(response.code==0){
|
|
|
ElMessage({
|
|
|
type: 'success',
|
|
|
@@ -1403,17 +1385,7 @@ const updateDetailData = async() => {
|
|
|
})
|
|
|
}
|
|
|
dialogFormVisible.value = false
|
|
|
- // ADD.value='0'
|
|
|
- // console.log(ADD.value)
|
|
|
}
|
|
|
- // console.log(restoredData)
|
|
|
- // console.log(lastCellValue)
|
|
|
- // formData.value.UniqId=lastCellValue
|
|
|
- // console.log(formData)
|
|
|
- // restoredData.UniqId='5'
|
|
|
-
|
|
|
- // console.log(FormData)
|
|
|
- // console.log(response)
|
|
|
}
|
|
|
// 删除
|
|
|
function onDel() {
|