| | |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | gridOptions.toolbarConfig.buttons[3].disabled = false |
| | | }else{ |
| | | //启用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | //禁用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | gridOptions.toolbarConfig.buttons[3].disabled = true |
| | | |
| | | } |
| | | } else { |
| | |
| | | buttons: [ |
| | | {code: 'delete', name: t('basicData.delete'), status: 'primary'}, |
| | | {code: 'review', name: t('basicData.review'), status: 'primary'}, |
| | | {code: 'cancelReview', name: t('basicData.cancelReview'), status: 'primary'}, |
| | | {code: 'save', name: t('processCard.scheduling'), status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | selectRecords.forEach(item => { |
| | | if(item.reviewStatus=="已审核"){ |
| | | ElMessage.warning("不能删除已审核数据") |
| | | return; |
| | | } |
| | | }); |
| | | alert(1111) |
| | | // const type = await VXETable.modal.confirm('您确定要删除该数据?') |
| | | // if (type === 'confirm') { |
| | | // let schedulingData = ref({ |
| | | // scheduling: selectRecords, |
| | | // }) |
| | | // |
| | | // request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // ElMessage.success("删除成功") |
| | | // location.reload(); |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | const type = await VXETable.modal.confirm('您确定要删除该数据?') |
| | | if (type === 'confirm') { |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | }) |
| | | |
| | | request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | return; |
| | | } |
| | | case 'review': { |
| | | const $table = xGrid.value |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | let date = form.date1 |
| | | let selectProcesses = processVal.value |
| | | let selectState = stateValue.value |
| | | let inputVal = form.orderId |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning("请勾选排产数据") |
| | |
| | | request.post("/productionScheduling/examineScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("审核成功") |
| | | router.push({ |
| | | path: '/main/processCard/ProductionScheduling', |
| | | query: {random: Math.random()} |
| | | }) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | |
| | | } |
| | | return; |
| | | } |
| | | case 'cancelReview': { |
| | | const $table = xGrid.value |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | userName: username//审核人 |
| | | }) |
| | | request.post("/productionScheduling/cancelReviewScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("反审成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | let selectState = stateValue.value |
| | | selectRecords.forEach((selectRecords) => { |
| | | console.log(selectRecords) |
| | | if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) { |
| | | ElMessage.warning("排产数量不能大于待排产数量") |
| | | //禁用保存按钮 |
| | |
| | | } |
| | | const checkBoxConfig = { |
| | | checkMethod: ({ row }) => { |
| | | console.log(row) |
| | | if (row['reviewStatus']==="已审核"){ |
| | | return row.disable |
| | | }else{ |
| | |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | @checkbox-change="determineNum" |
| | | :checkbox-config="checkBoxConfig" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- :checkbox-config="checkBoxConfig" @checkbox-change="determineNum"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |