From 52204a6eb5ce441c2abdf68f1e83f8d3fe66549c Mon Sep 17 00:00:00 2001 From: guoyuji <guoyujie@ng.com> Date: 星期五, 01 三月 2024 11:27:47 +0800 Subject: [PATCH] 报工界面 --- north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 235 ++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 169 insertions(+), 66 deletions(-) diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue index ed6cd88..af4a56d 100644 --- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue +++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue @@ -5,7 +5,7 @@ import {ElMessage} from "element-plus"; import {changeFilterEvent, filterChanged} from "@/hook" import {indexOf} from "xe-utils"; - +let brokenVisible = ref(false) const xGrid = ref() let router = useRouter() @@ -139,7 +139,6 @@ // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, { field: 'order_number', - width: 90, title: '搴忓彿', filters: [{data: ''}], slots: {filter: 'num1_filter'}, @@ -147,7 +146,6 @@ }, { field: 'glass_child', - width: 120, title: '鍗曠墖鍚嶇О', showOverflow: "ellipsis", filters: [{data: ''}], @@ -156,7 +154,6 @@ }, { field: 'technology_number', - width: 90, title: '鏍囪', filters: [{data: ''}], slots: {filter: 'num1_filter'}, @@ -164,7 +161,6 @@ }, { field: 'glass_address', - width: 100, title: '鐗囨爣璁�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, @@ -172,7 +168,6 @@ }, { field: 'quantity_card', - width: 110, title: '娴佺▼鍗℃暟閲�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, @@ -181,7 +176,6 @@ }, { field: 'child_width', - width: 70, title: '瀹�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, @@ -189,7 +183,6 @@ }, { field: 'child_height', - width: 70, title: '楂�', filters: [{data: ''}], slots: {filter: 'num1_filter'}, @@ -197,16 +190,15 @@ }, { field: 'shape', - width: 70, title: '褰㈢姸', filters: [{data: ''}], slots: {filter: 'num1_filter'}, showOverflow: "ellipsis", filterMethod: filterChanged }, - {field: 'quantity', width: 120, title: '涓婂伐瀹屽伐鏁伴噺',}, + {field: 'quantity', title: '涓婂伐瀹屽伐鏁伴噺',}, { - field: 'completedQuantity', width: 100, title: '瀹屽伐鏁伴噺', + field: 'completedQuantity', title: '瀹屽伐鏁伴噺', editRender: { name: 'input', attrs: {placeholder: ''}, @@ -214,49 +206,46 @@ }, { - field: 'breakageNumber', width: 100, title: '娆$牬鏁伴噺', - editRender: { - name: 'input', - attrs: {placeholder: ''} - } - }, - {field: 'available', width: 80, title: '鍙埄鐢�', editRender: {name: 'input', attrs: {placeholder: ''}}}, - {field: 'returnProcess', width: 100, title: '閫�鍥炲伐搴�', editRender: {name: 'input', attrs: {placeholder: ''}}}, - { - field: 'reasonType', width: 100, title: '娆$牬绫诲瀷', - editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} - }, - { - field: 'reasonDamage', width: 100, title: '娆$牬鍘熷洜', - editRender: {name: 'input', attrs: {placeholder: ''}} - }, - { - field: 'responsibleProcess', width: 100, title: '璐d换宸ュ簭', - editRender: {}, - slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} - //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, + field: 'breakageNumber', title: '娆$牬鏁伴噺', }, - { - field: 'responsibleEquipment', - width: 100, - title: '璐d换璁惧', - editRender: {}, - slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} - // editRender: {name: 'input', attrs: {placeholder: ''}} - }, - - { - field: 'responsibleTeam', width: 100, title: '璐d换鐝粍', - editRender: {name: 'input', attrs: {placeholder: ''}} - }, - { - field: 'responsibilityPersonnel', - width: 100, - title: '璐d换浜哄憳', - editRender: {name: 'input', attrs: {placeholder: ''}} - - }, + // {field: 'available', width: 80, title: '鍙埄鐢�', editRender: {name: 'input', attrs: {placeholder: ''}}}, + // {field: 'returnProcess', width: 100, title: '閫�鍥炲伐搴�', editRender: {name: 'input', attrs: {placeholder: ''}}}, + // { + // field: 'reasonType', width: 100, title: '娆$牬绫诲瀷', + // editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} + // }, + // { + // field: 'reasonDamage', width: 100, title: '娆$牬鍘熷洜', + // editRender: {name: 'input', attrs: {placeholder: ''}} + // }, + // { + // field: 'responsibleProcess', width: 100, title: '璐d换宸ュ簭', + // editRender: {}, + // slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} + // //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, + // + // }, + // { + // field: 'responsibleEquipment', + // width: 100, + // title: '璐d换璁惧', + // editRender: {}, + // slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} + // // editRender: {name: 'input', attrs: {placeholder: ''}} + // }, + // + // { + // field: 'responsibleTeam', width: 100, title: '璐d换鐝粍', + // editRender: {name: 'input', attrs: {placeholder: ''}} + // }, + // { + // field: 'responsibilityPersonnel', + // width: 100, + // title: '璐d换浜哄憳', + // editRender: {name: 'input', attrs: {placeholder: ''}} + // + // }, {field: 'completed', width: 90, title: '宸插畬宸�',}, {field: 'onceBroken', width: 90, title: '宸叉鐮�',}, @@ -281,22 +270,130 @@ }, data: [],//table body瀹為檯鏁版嵁 //鑴氶儴姹傚拰 - footerMethod({columns, data}) {//椤佃剼鍑芥暟 - let footList = ['', '', '', '', ''] - return [ - columns.map((column, columnIndex) => { - if (columnIndex === 0) { - return '鍚堣:' - } - if (footList.includes(column.field)) { - return sumNum(data, column.field) - } - return '' - }) - ] - } + // footerMethod({columns, data}) {//椤佃剼鍑芥暟 + // let footList = ['', '', '', '', ''] + // return [ + // columns.map((column, columnIndex) => { + // if (columnIndex === 0) { + // return '鍚堣:' + // } + // if (footList.includes(column.field)) { + // return sumNum(data, column.field) + // } + // return '' + // }) + // ] + // } }) + +let brokenRow = ref() +const gridEvents = { + cellDblclick (params) {//琛ㄦ牸鍐呭鍙屽嚮鎵撳紑浜у搧鐣岄潰 + const { row } = params + brokenRow = row + console.log(row) + //brokenGrid.value.reload() + //brokenVisible.value = true + } + + +} + +const brokenGrid =ref() +const brokenGridOptions = reactive({ + border: "full",//琛ㄦ牸鍔犺竟妗� + keepSource: true,//淇濇寔婧愭暟鎹� + align: 'center',//鏂囧瓧灞呬腑 + stripe: true,//鏂戦┈绾� + rowConfig: {isCurrent: true, isHover: true, height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒 + id: 'CustomerList', + showFooter: true,//鏄剧ず鑴� + printConfig: {}, + importConfig: {}, + exportConfig: {}, + scrollY: {enabled: true},//寮�鍚櫄鎷熸粴鍔� + showOverflow: true, + columnConfig: { + resizable: true, + useKey: true + }, + filterConfig: { //绛涢�夐厤缃」 + // remote: true + }, + customConfig: { + storage: true + }, + editConfig: { + trigger: 'click', + mode: 'row', + showStatus: true + },//琛ㄥご鍙傛暟 + columns: [ + // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, + { + field: 'order_number', + title: '搴忓彿', + filters: [{data: ''}], + slots: {filter: 'num1_filter'}, + filterMethod: filterChanged + }, + + { + field: 'breakageNumber', title: '娆$牬鏁伴噺', + + }, + {field: 'available', title: '鍙埄鐢�', editRender: {name: 'input', attrs: {placeholder: ''}}}, + {field: 'returnProcess', title: '閫�鍥炲伐搴�', editRender: {name: 'input', attrs: {placeholder: ''}}}, + { + field: 'reasonType', title: '娆$牬绫诲瀷', + editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} + }, + { + field: 'reasonDamage', title: '娆$牬鍘熷洜', + editRender: {name: 'input', attrs: {placeholder: ''}} + }, + { + field: 'responsibleProcess', title: '璐d换宸ュ簭', + editRender: {}, + slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} + //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, + + }, + { + field: 'responsibleEquipment', + title: '璐d换璁惧', + editRender: {}, + slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} + // editRender: {name: 'input', attrs: {placeholder: ''}} + }, + + { + field: 'responsibleTeam', title: '璐d换鐝粍', + editRender: {name: 'input', attrs: {placeholder: ''}} + }, + { + field: 'responsibilityPersonnel', + title: '璐d换浜哄憳', + editRender: {name: 'input', attrs: {placeholder: ''}} + + }, + + ], +//琛ㄥ崟楠岃瘉 + editRules: {}, + toolbarConfig: {//琛ㄥご鎸夐挳 + buttons: [ + {code: 'print_lck', name: '娣诲姞', status: 'primary', icon: 'vxe-icon-save'}, + ], + // import: false, + // export: true, + // print: true, + zoom: true, + custom: true + }, +}) + //绗竴娆″姞杞芥暟鎹� @@ -565,6 +662,7 @@ max-height="100%" size="small" v-bind="gridOptions" + v-on="gridEvents" @filter-change="filterChanged" @edit-closed="verifyNum" @@ -598,6 +696,11 @@ </vxe-grid> + <el-dialog v-model="brokenVisible" title="鐮存崯鍒楄〃" style="width: 80%;height:75% "> + <vxe-grid ref="brokenGrid" v-bind="brokenGridOptions"> + + </vxe-grid> + </el-dialog> </div> </div> </template> -- Gitblit v1.8.0