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) => {
OrderDayApi.stopPlan(id)
//getList()
}
/** 导入 */
const importFormRef = ref()

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

@ -40,7 +40,7 @@
<template #footer>
<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>
@ -69,6 +69,7 @@ const unqualified = ref()
const reportCount = ref()
const qualified = ref()
const workTerm = ref()
const saveFlag=ref(false)
//
const getProcessList=async(row)=>{
let params={
@ -99,9 +100,10 @@ const handleCount = () => {
return
}
if (checkFlag) {
if (checkFlag.value) {
if (reportCount.value < qualified.value) {
message.alert('合格数不能超出报工数!')
qualified.value=0
return
}
if (qualified.value == undefined || qualified.value == 0) {
@ -112,9 +114,9 @@ const handleCount = () => {
}
}
//
const saveReport = () => {
const saveReport = async() => {
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,
processCode: processCodeSelected.value,
list: [
@ -127,8 +129,12 @@ const saveReport = () => {
}
]
}
saveFlag.value = true
//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'])

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

@ -67,8 +67,8 @@
@searchTableSuccessDetail="searchTableSuccessDetail"
:key="count"
/>
<Report ref="reportRef"></Report>
<Finish ref="reportFinishRef"></Finish>
<Report ref="reportRef" @close="handleClose"></Report>
<Finish ref="reportFinishRef" @close="handleClose"></Finish>
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/mes/work-scheduling/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
@ -169,7 +169,7 @@ const buttonBaseClick = (val, item) => {
// FINISHED("9", "");
// -
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.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'}),
@ -292,7 +292,9 @@ const importTemplateData = reactive({
const importSuccess = () => {
getList()
}
const handleClose=()=>{
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {

Loading…
Cancel
Save