Browse Source

2024-05-08 修复工单调序显示bug,修改报工页面

master_hella_20240701
zhousq 6 months ago
parent
commit
96d79e6e0c
  1. 2
      src/views/mes/orderDay/index.vue
  2. 16
      src/views/mes/workScheduling/components/report.vue
  3. 10
      src/views/mes/workScheduling/index.vue

2
src/views/mes/orderDay/index.vue

@ -340,7 +340,7 @@ const handleExport = async () => {
} }
const stopPlan = (id) => { const stopPlan = (id) => {
OrderDayApi.stopPlan(id) OrderDayApi.stopPlan(id)
//getList()
} }
/** 导入 */ /** 导入 */
const importFormRef = ref() const importFormRef = ref()

16
src/views/mes/workScheduling/components/report.vue

@ -40,7 +40,7 @@
<template #footer> <template #footer>
<el-button @click="dialogVisible = false">关闭</el-button> <el-button @click="dialogVisible = false">关闭</el-button>
<el-button type="primary" @click="saveReport">保存</el-button> <el-button type="primary" :disabled="saveFlag" @click="saveReport">保存</el-button>
</template> </Dialog </template> </Dialog
>+ >+
</template> </template>
@ -69,6 +69,7 @@ const unqualified = ref()
const reportCount = ref() const reportCount = ref()
const qualified = ref() const qualified = ref()
const workTerm = ref() const workTerm = ref()
const saveFlag=ref(false)
// //
const getProcessList=async(row)=>{ const getProcessList=async(row)=>{
let params={ let params={
@ -99,9 +100,10 @@ const handleCount = () => {
return return
} }
if (checkFlag) { if (checkFlag.value) {
if (reportCount.value < qualified.value) { if (reportCount.value < qualified.value) {
message.alert('合格数不能超出报工数!') message.alert('合格数不能超出报工数!')
qualified.value=0
return return
} }
if (qualified.value == undefined || qualified.value == 0) { if (qualified.value == undefined || qualified.value == 0) {
@ -112,9 +114,9 @@ const handleCount = () => {
} }
} }
// //
const saveReport = () => { const saveReport = async() => {
let data = { let data = {
reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:sss'), reportDate: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'),
schedulingCode: rowData.value.schedulingCode, schedulingCode: rowData.value.schedulingCode,
processCode: processCodeSelected.value, processCode: processCodeSelected.value,
list: [ list: [
@ -127,8 +129,12 @@ const saveReport = () => {
} }
] ]
} }
saveFlag.value = true
//console.log("report-saveReport-82",data) //console.log("report-saveReport-82",data)
workschedulingApi.reportWorkByProcess(data) await workschedulingApi.reportWorkByProcess(data)
saveFlag.value = false
dialogVisible.value = false
emit('close')
} }
// //
const emit = defineEmits(['success', 'close']) const emit = defineEmits(['success', 'close'])

10
src/views/mes/workScheduling/index.vue

@ -67,8 +67,8 @@
@searchTableSuccessDetail="searchTableSuccessDetail" @searchTableSuccessDetail="searchTableSuccessDetail"
:key="count" :key="count"
/> />
<Report ref="reportRef"></Report> <Report ref="reportRef" @close="handleClose"></Report>
<Finish ref="reportFinishRef"></Finish> <Finish ref="reportFinishRef" @close="handleClose"></Finish>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/work-scheduling/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/mes/work-scheduling/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template> </template>
@ -169,7 +169,7 @@ const buttonBaseClick = (val, item) => {
// FINISHED("9", ""); // FINISHED("9", "");
// - // -
const butttondata=(row) =>{ return [ const butttondata=(row) =>{ return [
defaultButtons.mainListEditBtn({label:"调序",hasPermi:'mes:workScheduling:update'}), // defaultButtons.mainListEditBtn({label:"调序",hide: isShowMainButton(row,['-1','0','3']),hasPermi:'mes:workScheduling:update'}), //
//defaultButtons.mainListDeleteBtn({hasPermi:'mes:workScheduling:delete'}), // //defaultButtons.mainListDeleteBtn({hasPermi:'mes:workScheduling:delete'}), //
defaultButtons.mainListHandleBtn({label:"终止",name:'terminate',hide: isShowMainButton(row,['-1','0']),hasPermi:'mes:workScheduling:update'}), // defaultButtons.mainListHandleBtn({label:"终止",name:'terminate',hide: isShowMainButton(row,['-1','0']),hasPermi:'mes:workScheduling:update'}), //
defaultButtons.mainListHandleBtn({label:"暂停",name:'pause',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}), defaultButtons.mainListHandleBtn({label:"暂停",name:'pause',hide: isShowMainButton(row,['1']),hasPermi:'mes:workScheduling:update'}),
@ -292,7 +292,9 @@ const importTemplateData = reactive({
const importSuccess = () => { const importSuccess = () => {
getList() getList()
} }
const handleClose=()=>{
getList()
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
tableObject.params = { tableObject.params = {

Loading…
Cancel
Save