zck 1 рік тому
батько
коміт
72951a1faa
1 змінених файлів з 15 додано та 14 видалено
  1. 15 14
      src/view/performance/12-orderAccounting/index.vue

+ 15 - 14
src/view/performance/12-orderAccounting/index.vue

@@ -336,7 +336,7 @@ getSideData()
 const tableCols1 = [
   // { label: '超损工单', prop: 'csgd', width: '110' ,sortable:'sortable'},
   { label: '工单编号', prop: 'Gd_gdbh', width: '110',sortable:'sortable',fixed:'fixed',align:'left'},
-  { label: '参与考核', prop: '质量考核', width: '110' ,sortable:'sortable'},
+  { label: '参与考核', prop: '考核', width: '110' ,sortable:'sortable'},
   { label: '印件号', prop: 'jjcp_yjno', width: '70'},
   { label: '联数', prop: 'yj_ls', width: '70'},
   { label: '产品代号', prop: '成品编码', width: '110' ,sortable:'sortable'},
@@ -392,12 +392,13 @@ watch(currentRow, (value, oldValue, onCleanup) => {
 
 const cjsriqi = ref ('')
 // 显示上方表格
-const handleNodeClick = async(node) => {
-  cjsriqi.value = node.date
-  console.log(cjsriqi.value)
+const handleNodeClick = async (node) => {
+  cjsriqi.value = node.date;
+  console.log(cjsriqi.value);
   if (!node.children) {
-    const { date, code } = node
-    const res = await getTable({ date, code, limit: 9999, page: 1 })
+    const { date, code } = node;
+    const res = await getTable({ date, code, limit: 9999, page: 1 });
+    console.log(res.data.data); // 调试数据
     tableData1.value = res.data.data.map((item) => ({
       ...item,
       csgd:
@@ -405,12 +406,12 @@ const handleNodeClick = async(node) => {
           ? '√'
           : '',
       date: date,
-      质量考核: item['质量考核'] === '0' ? '是' : '否'
-    }))
-    // console.log(tableData1.value )
+      // 质量考核: String(item['质量考核']) === '0' ? '是' : '否' // 确保数据类型一致
+    }));
   } else {
-    const { date, code } = node
-    const res = await getTable({ date, code:'', limit: 9999, page: 1 })
+    const { date, code } = node;
+    const res = await getTable({ date, code: '', limit: 9999, page: 1 });
+    console.log(res.data.data); // 调试数据
     tableData1.value = res.data.data.map((item) => ({
       ...item,
       csgd:
@@ -418,10 +419,10 @@ const handleNodeClick = async(node) => {
           ? '√'
           : '',
       date: date,
-      质量考核: item['质量考核'] === '0' ? '是' : '否'
-    }))
+      // 质量考核: String(item['质量考核']) === '0' ? '是' : '否' // 确保数据类型一致
+    }));
   }
-}
+};
 
 // 显示下方表格
 const showOrderSuperLossGy = async() => {