From 062822b57a29a767f2fbbd7cc1a8b1f6417cf966 Mon Sep 17 00:00:00 2001 From: chenlu <1320612696@qq.com> Date: 星期五, 08 三月 2024 19:37:17 +0800 Subject: [PATCH] 修改工单管理、流程管理BUG --- north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue | 75 +++++++++++++++++++++++++------------ 1 files changed, 51 insertions(+), 24 deletions(-) diff --git a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue index 241c8b6..91df402 100644 --- a/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue +++ b/north-glass-erp/northglass-erp/src/views/pp/processCard/SelectProcessCard.vue @@ -14,32 +14,55 @@ let productGlassTypeStore = useProductGlassTypeStore() let router = useRouter() +let props = defineProps({ + rowIndex:{} +}) const getTableRow = (row, type) => { + let startTime = form.date1[0] + let endTime = form.date1[1] switch (type) { case 'edit' : { - router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) + // console.log(row) + // router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) break } case 'setType': { - request.post(`/processCard/updateLayoutStatus/${row.processId}`).then((res) => { - if (res.code == 200) { - ElMessage.success("鎺掔増鎴愬姛") - location.reload(); - } else { + let state=row.layoutStatus - ElMessage.warning(res.msg) - } - }) + if (state=='鍙帓鐗�'){ + request.post(`/processCard/updateLayoutStatus/${row.processId}/2`).then((res) => { + if (res.code == 200) { + ElMessage.success("鎺掔増鎴愬姛") + router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}}) + } else { + + ElMessage.warning(res.msg) + } + }) + } + else if(state=='涓嶅彲鎺掔増'){ + request.post(`/processCard/updateLayoutStatus/${row.processId}/1`).then((res) => { + if (res.code == 200) { + ElMessage.success("淇敼鎴愬姛") + router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}}) + } else { + + ElMessage.warning(res.msg) + } + }) + } + break } case 'delete': { request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => { if (res.code == 200) { ElMessage.success("鍒犻櫎鎴愬姛") - location.reload(); + router.push({path: '/main/processCard/SelectProcessCard', query: {random:Math.random()}}) } else { + ElMessage.warning(res.msg) - router.push("/login") + } }) break @@ -122,7 +145,7 @@ let total = reactive({ pageTotal : 0, dataTotal : 0, - pageSize : 5 + pageSize : 100 }) //绗竴娆″姞杞芥暟鎹� @@ -174,7 +197,6 @@ //椤佃剼璺宠浆 const handlePageChange = ({ currentPage, pageSize }) => { - console.log('椤电爜鏀瑰彉锛�', currentPage, pageSize) pageNum.value=currentPage total.pageTotal = pageSize selectPageList() @@ -201,14 +223,15 @@ filterData.value[column.property] = value } -//鑾峰彇閫変腑鏃堕棿鍜屾槸鍚﹁浆鍗曠姸鎬� +//鑾峰彇閫変腑鏃堕棿 let startTime = form.date1[0] let endTime = form.date1[1] - request.post(`/processCard/flowCard/${startTime}/${endTime}`, filterData.value).then((res) => { + request.post(`/processCard/flowCard/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { if(res.code==200){ pageTotal.value=res.data.total - + total.pageTotal=parseInt(res.data.total) + pageNum.value=1 produceList = deepClone(res.data.data) xGrid.value.loadData(produceList) gridOptions.loading=false @@ -256,17 +279,18 @@ },//琛ㄥご鍙傛暟 columns:[ {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, - {title: '鎿嶄綔', width: 140, slots: { default: 'button_slot' },fixed:"left"}, + {title: '鎿嶄綔', width: 160, slots: { default: 'button_slot' },fixed:"left"}, { type: 'seq',fixed:"left", title: '鑷簭', width: 50 }, - {field: 'orderId', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, + {field: 'orderId', title: '閿�鍞崟鍙�',filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 80 }, {field: 'processId', width: 130, title: '娴佺▼鍗″彿' ,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, - {field: 'orderDetail.productId', title: '浜у搧缂栧彿' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, - {field: 'orderDetail.productName', title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, + {field: 'orderDetail.productId', title: '浜у搧缂栧彿' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, + {field: 'orderDetail.productName', title: '浜у搧鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 180}, {field: 'order.project', title: '椤圭洰鍚嶇О' ,showOverflow:"ellipsis"}, - {field: 'binningQuantity', title: '鏁伴噺', }, + {field: 'quantity', title: '鏁伴噺', }, {field: 'orderDetail.computeGrossArea', title: '闈㈢Н', }, {field: 'founder', title: '鍒嗘灦鍛�', }, - {field: 'orderDetail.processingNote', title: '鍔犲伐瑕佹眰', } + {field: 'orderDetail.processingNote', title: '鍔犲伐瑕佹眰', }, + {field: 'layoutStatus', title: '鎺掔増鐘舵��', } ],//琛ㄥご鎸夐挳 toolbarConfig: { @@ -348,9 +372,12 @@ </template> <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�--> - <template #button_slot="{ row }"> + + <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 v-if="row.layoutStatus=='鍙帓鐗�'" @click="getTableRow(row,'setType')" link type="primary" size="small">鎺掔増</el-button> + <el-button v-else-if="row.layoutStatus=='涓嶅彲鎺掔増'" @click="getTableRow(row,'setType')" link type="primary" size="small">鍙帓鐗�</el-button> + <el-button v-else-if="row.layoutStatus=='宸叉帓鐗�'" disabled @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> -- Gitblit v1.8.0