From e2cab7f54b3aa3678637c19285f7d944150b7b57 Mon Sep 17 00:00:00 2001 From: guoyuji <guoyujie@ng.com> Date: 星期四, 22 二月 2024 09:25:53 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override --- north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue | 125 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 110 insertions(+), 15 deletions(-) diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue index 91eafab..cd8f6b0 100644 --- a/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue +++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue @@ -151,7 +151,7 @@ return regex.test(value); // 杩斿洖true/false } -//瀛愮粍浠舵帴鏀跺弬鏁� +//鍙充晶瀛愮粍浠舵帴鏀跺弬鏁� const xGrid = ref() const gridOptions = reactive({ border: "full",//琛ㄦ牸鍔犺竟妗� @@ -226,6 +226,80 @@ }) +//宸︿晶瀛愮粍浠舵帴鏀跺弬鏁� +const xGridLeft = ref() +const gridLeftOptions = 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: 'checkbox', fixed: "left", title: '閫夋嫨'}, + {field: 'orderDetail.orderNumber', title: '娴佺▼鍗″彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' },width:130 }, + {field: 'orderDetail.shape', title: '璁㈠簭', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, + {field: 'orderDetail.width', title: '钀芥灦椤哄簭', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, + {field: 'orderDetail.height', title: '褰㈢姸',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, + {field: 'orderDetail.quantity', title: '闀胯竟', showOverflow:"ellipsis"}, + {field: 'orderDetail.computeGrossArea', title: '鐭竟'}, + {field: 'product.totalThickness', title: '鎬绘暟閲�'}, + {field: 'product.totalThickness', title: '鎬诲帤搴�'}, + ],//琛ㄥご鎸夐挳 + + toolbarConfig: { + // buttons: [{ + // + // }], + import: false, + export: true, + print: true, + zoom: true, + custom: true + }, + 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 '' + }) + ] + } + +}) + + </script> @@ -250,17 +324,41 @@ <div class="common-layout"> <el-container height="100%"> <el-aside width="44%" style=""> - <el-table :data="tableData" border style="width: 100%" height="100%"> - <el-table-column sortable prop="processCard" label="娴佺▼鍗″彿" width="120" /> - <el-table-column prop="orderSequence" label="璁㈠簭" width="60" /> - <el-table-column prop="landingSequence" label="钀芥灦椤哄簭" width="85" /> - <el-table-column prop="floorNumber" label="妤煎眰缂栧彿" :show-overflow-tooltip='true' width="120" /> - <el-table-column prop="shape" label="褰㈢姸" width="65" /> - <el-table-column prop="longSide" label="闀胯竟" width="65" /> - <el-table-column prop="shortSide" label="鐭竟" width="65" /> - <el-table-column prop="total" label="鎬绘暟閲�" width="75" /> - <el-table-column prop="totalThickness" label="鎬诲帤搴�" width="75" /> - </el-table><!-- <h1>{{msg}}</h1> --> + <vxe-grid + max-height="100%" + @filter-change="filterChanged" + class="mytable-scrollbar" + ref="xGridLeft" + v-bind="gridLeftOptions" + > + <!-- @toolbar-button-click="toolbarButtonClickEvent"--> + <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�--> + <template #content="{ row }"> + <ul class="expand-wrapper"> + <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> + <span style="font-weight: bold">{{ item.title + ': ' }}</span> + <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> + <span v-else>{{ row[item.field] }}</span> + </li> + </ul> + </template> + <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�--> + <template #button_slot="{ row }"> + <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">鎵撳嵃</el-button> + <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">鎺掔増</el-button> + <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button> + </template> + <template #num1_filter="{ column, $panel }"> + <div> + <div v-for="(option, index) in column.filters" :key="index"> + <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> + </div> + </div> + </template> + + + </vxe-grid> + </el-aside> <el-main width="12%" style=""> @@ -293,7 +391,6 @@ <span style="font-weight: bold">{{ item.title + ': ' }}</span> <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> <span v-else>{{ row[item.field] }}</span> - </li> </ul> </template> @@ -312,8 +409,6 @@ </div> </div> </template> - - </vxe-grid> </el-aside> </el-container> -- Gitblit v1.8.0