|  |  | 
 |  |  | let tableData = ref([]); | 
 |  |  | let deleteDetlId = ref([]); | 
 |  |  | let orderId = ref(null); | 
 |  |  | let isAdd = ref(false); | 
 |  |  | getColumns(); | 
 |  |  |  | 
 |  |  | const { | 
 |  |  | 
 |  |  |     columns: [], | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | state.columns = [ | 
 |  |  | let defaultColumns = [ | 
 |  |  |     { | 
 |  |  |         title: '#', | 
 |  |  |         dataIndex: '_id', | 
 |  |  | 
 |  |  |         ellipsis: true, | 
 |  |  |         editable: true, | 
 |  |  |     }, | 
 |  |  |     { | 
 |  |  |         title: formatMessage('db.man_loc_detl.qty', '已完成数量'), | 
 |  |  |         dataIndex: 'qty', | 
 |  |  |         width: 140, | 
 |  |  |         ellipsis: true, | 
 |  |  |         editable: true, | 
 |  |  |     }, | 
 |  |  |     { | 
 |  |  |         title: formatMessage('db.man_loc_detl.workQty', '作业中数量'), | 
 |  |  |         dataIndex: 'workQty', | 
 |  |  |         width: 140, | 
 |  |  |         ellipsis: true, | 
 |  |  |         editable: true, | 
 |  |  |     }, | 
 |  |  |     { | 
 |  |  |         title: formatMessage('db.man_loc_detl.memo', '备注'), | 
 |  |  |         dataIndex: 'memo', | 
 |  |  |         width: 140, | 
 |  |  |         ellipsis: true, | 
 |  |  |         editable: true, | 
 |  |  |     }, | 
 |  |  |     // { | 
 |  |  |     //     title: formatMessage('db.man_loc_detl.qty', '已完成数量'), | 
 |  |  |     //     dataIndex: 'qty', | 
 |  |  |     //     width: 140, | 
 |  |  |     //     ellipsis: true, | 
 |  |  |     //     editable: true, | 
 |  |  |     // }, | 
 |  |  |     // { | 
 |  |  |     //     title: formatMessage('db.man_loc_detl.workQty', '作业中数量'), | 
 |  |  |     //     dataIndex: 'workQty', | 
 |  |  |     //     width: 140, | 
 |  |  |     //     ellipsis: true, | 
 |  |  |     //     editable: true, | 
 |  |  |     // }, | 
 |  |  |     // { | 
 |  |  |     //     title: formatMessage('db.man_loc_detl.memo', '备注'), | 
 |  |  |     //     dataIndex: 'memo', | 
 |  |  |     //     width: 140, | 
 |  |  |     //     ellipsis: true, | 
 |  |  |     //     editable: true, | 
 |  |  |     // }, | 
 |  |  | ]; | 
 |  |  |  | 
 |  |  | const fieldList = []; | 
 |  |  | 
 |  |  |         fieldType: 1 | 
 |  |  |     }) | 
 |  |  |     let fieldResult = fieldResp.data; | 
 |  |  |     let tmp = state.columns; | 
 |  |  |     let tmp = defaultColumns; | 
 |  |  |     if (fieldResult.code == 200) { | 
 |  |  |         let data = fieldResult.data; | 
 |  |  |  | 
 |  |  |         if (!isAdd.value) { | 
 |  |  |             tmp.push({ | 
 |  |  |                 title: formatMessage('db.man_loc_detl.qty', '已完成数量'), | 
 |  |  |                 dataIndex: 'qty', | 
 |  |  |                 width: 140, | 
 |  |  |                 ellipsis: true, | 
 |  |  |                 editable: true, | 
 |  |  |             }) | 
 |  |  |  | 
 |  |  |             tmp.push({ | 
 |  |  |                 title: formatMessage('db.man_loc_detl.workQty', '作业中数量'), | 
 |  |  |                 dataIndex: 'workQty', | 
 |  |  |                 width: 140, | 
 |  |  |                 ellipsis: true, | 
 |  |  |                 editable: true, | 
 |  |  |             }) | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         data.forEach((item) => { | 
 |  |  |             tmp.push({ | 
 |  |  | 
 |  |  |             }) | 
 |  |  |  | 
 |  |  |             fieldList.push(item.name); | 
 |  |  |         }) | 
 |  |  |  | 
 |  |  |         tmp.push({ | 
 |  |  |             title: formatMessage('db.man_loc_detl.memo', '备注'), | 
 |  |  |             dataIndex: 'memo', | 
 |  |  |             width: 140, | 
 |  |  |             ellipsis: true, | 
 |  |  |             editable: true, | 
 |  |  |         }) | 
 |  |  |  | 
 |  |  |         tmp.push({ | 
 |  |  | 
 |  |  | watch(orderId, (newVal, oldVal) => { | 
 |  |  |     if (newVal == undefined || newVal == null) { | 
 |  |  |         tableData.value = []; | 
 |  |  |         getColumns() | 
 |  |  |         return; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     tableData, | 
 |  |  |     orderId, | 
 |  |  |     deleteDetlId, | 
 |  |  |     isAdd, | 
 |  |  | }) | 
 |  |  |  | 
 |  |  | </script> | 
 |  |  | 
 |  |  |                 </template> | 
 |  |  |  | 
 |  |  |                 <template v-if="column.editable"> | 
 |  |  |                     <div> | 
 |  |  |                         <a-input v-model:value="record[column.dataIndex]" /> | 
 |  |  |                     </div> | 
 |  |  |                     <a-input v-model:value="record[column.dataIndex]" /> | 
 |  |  |                 </template> | 
 |  |  |             </template> | 
 |  |  |         </a-table> |