|
@@ -43,53 +43,57 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
- <el-link
|
|
|
|
|
- v-if="
|
|
|
|
|
- row.executeStatus == 0 ||
|
|
|
|
|
- (row.executeStatus == 1 && row.executeMethod == 3)
|
|
|
|
|
- "
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="openEdit('edit', row)"
|
|
|
|
|
- >
|
|
|
|
|
- 编辑
|
|
|
|
|
- </el-link>
|
|
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.executeStatus == 0 ||
|
|
|
|
|
+ (row.executeStatus == 1 && row.itemType == 2)
|
|
|
|
|
+ "
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ @click="openEdit('edit', row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 编辑
|
|
|
|
|
+ </el-link>
|
|
|
|
|
|
|
|
- <el-link
|
|
|
|
|
- v-if="
|
|
|
|
|
- row.executeStatus == 0 ||
|
|
|
|
|
- (row.executeStatus == 1 && row.executeMethod == 2) ||
|
|
|
|
|
- (row.executeStatus == 1 && row.executeMethod == 3)
|
|
|
|
|
- "
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="execute(row)"
|
|
|
|
|
- >
|
|
|
|
|
- 报工
|
|
|
|
|
- </el-link>
|
|
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.executeStatus == 0 ||
|
|
|
|
|
+ (row.executeStatus == 1 && row.itemType == 2) ||
|
|
|
|
|
+ (row.executeStatus == 1 && row.itemType == 3)
|
|
|
|
|
+ "
|
|
|
|
|
+ title="确定要报工此记录吗?"
|
|
|
|
|
+ class="ele-action"
|
|
|
|
|
+ @confirm="execute(row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:reference>
|
|
|
|
|
+ <el-link type="primary" :underline="false"> 报工 </el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
|
|
|
- <el-link
|
|
|
|
|
- v-if="row.approvalStatus === 0"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :underline="false"
|
|
|
|
|
- @click="openApproval(row)"
|
|
|
|
|
- >
|
|
|
|
|
- 提交
|
|
|
|
|
- </el-link>
|
|
|
|
|
|
|
+ <el-link
|
|
|
|
|
+ v-if="row.approvalStatus === 0"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :underline="false"
|
|
|
|
|
+ @click="openApproval(row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 提交
|
|
|
|
|
+ </el-link>
|
|
|
|
|
|
|
|
- <el-popconfirm
|
|
|
|
|
- v-if="
|
|
|
|
|
- row.executeStatus == 0 &&
|
|
|
|
|
- $hasPermission('mes:producetaskrecordrulesrecord:logicdelete')
|
|
|
|
|
- "
|
|
|
|
|
- title="确定要删除此用户吗?"
|
|
|
|
|
- class="ele-action"
|
|
|
|
|
- @confirm="deleteById(row)"
|
|
|
|
|
- >
|
|
|
|
|
- <template v-slot:reference>
|
|
|
|
|
- <el-link type="danger" :underline="false"> 删除 </el-link>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-popconfirm>
|
|
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ row.executeStatus == 0 &&
|
|
|
|
|
+ $hasPermission('mes:producetaskrecordrulesrecord:logicdelete')
|
|
|
|
|
+ "
|
|
|
|
|
+ title="确定要删除此用户吗?"
|
|
|
|
|
+ class="ele-action"
|
|
|
|
|
+ @confirm="deleteById(row)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot:reference>
|
|
|
|
|
+ <el-link type="danger" :underline="false"> 删除 </el-link>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
<!-- 编辑添加组件 -->
|
|
<!-- 编辑添加组件 -->
|
|
@@ -127,7 +131,8 @@
|
|
|
import tableColumnsMixin from '@/mixins/tableColumnsMixin';
|
|
import tableColumnsMixin from '@/mixins/tableColumnsMixin';
|
|
|
import {
|
|
import {
|
|
|
producetaskrulerecordPage,
|
|
producetaskrulerecordPage,
|
|
|
- logicDeleteById
|
|
|
|
|
|
|
+ logicDeleteById,
|
|
|
|
|
+ saveRuleRecord
|
|
|
} from '@/api/producetaskrulerecord/index';
|
|
} from '@/api/producetaskrulerecord/index';
|
|
|
import editModal from './editModal.vue';
|
|
import editModal from './editModal.vue';
|
|
|
import { parameterGetByCode } from '@/api/system/dictionary-data';
|
|
import { parameterGetByCode } from '@/api/system/dictionary-data';
|
|
@@ -135,6 +140,10 @@
|
|
|
import programRulesDialog from '@/views/produce/components/prenatalExamination/programRulesDialog.vue';
|
|
import programRulesDialog from '@/views/produce/components/prenatalExamination/programRulesDialog.vue';
|
|
|
import taskDialog from '@/views/produce/components/prenatalExamination/taskDialog.vue';
|
|
import taskDialog from '@/views/produce/components/prenatalExamination/taskDialog.vue';
|
|
|
import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
|
|
import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
|
|
|
|
|
+ import {
|
|
|
|
|
+ queryListByWorkOrderId,
|
|
|
|
|
+ saveOrUpdateAndSubmit
|
|
|
|
|
+ } from '@/api/producetaskrecordrulesrecord/index.js';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -281,7 +290,8 @@
|
|
|
// 是否展示处理按钮
|
|
// 是否展示处理按钮
|
|
|
showBut: false,
|
|
showBut: false,
|
|
|
showReleaseRulesDialog: false,
|
|
showReleaseRulesDialog: false,
|
|
|
- processSubmitDialogFlag: false
|
|
|
|
|
|
|
+ processSubmitDialogFlag: false,
|
|
|
|
|
+ butLoading: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -408,14 +418,36 @@
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (row.executeMethod == 2) {
|
|
if (row.executeMethod == 2) {
|
|
|
- return this.$refs.releaseRulesDialogRef?.open(
|
|
|
|
|
- currentItem,
|
|
|
|
|
- currentItem
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ return this.releaseRulesSaveOrSubmit(row);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 任务确认
|
|
// 任务确认
|
|
|
- this.$refs.taskDialogRef?.open(currentItem, currentItem);
|
|
|
|
|
|
|
+ this.saveRuleRecord(row);
|
|
|
|
|
+ },
|
|
|
|
|
+ // 任务确认报工
|
|
|
|
|
+ async saveRuleRecord(row) {
|
|
|
|
|
+ this.butLoading = true;
|
|
|
|
|
+ await saveRuleRecord(row);
|
|
|
|
|
+ this.$message.success('报工成功!');
|
|
|
|
|
+ this.butLoading = false;
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ },
|
|
|
|
|
+ // 记录规则报工
|
|
|
|
|
+ async releaseRulesSaveOrSubmit(row) {
|
|
|
|
|
+ this.butLoading = true;
|
|
|
|
|
+ if (row.produceTaskId) {
|
|
|
|
|
+ const pickDetails = await queryListByWorkOrderId({
|
|
|
|
|
+ workOrderId: row.workOrderId,
|
|
|
|
|
+ recordId: row.id,
|
|
|
|
|
+ produceTaskId: row.produceTaskId,
|
|
|
|
|
+ ruleId: row.ruleId
|
|
|
|
|
+ });
|
|
|
|
|
+ row.pickDetails = pickDetails;
|
|
|
|
|
+ }
|
|
|
|
|
+ await saveOrUpdateAndSubmit(row);
|
|
|
|
|
+ this.$message.success('报工成功!');
|
|
|
|
|
+ this.butLoading = false;
|
|
|
|
|
+ this.reload();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|