|
@@ -18,7 +18,7 @@
|
|
|
>
|
|
>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="记录规则名称" required prop="recordRulesName">
|
|
|
|
|
|
|
+ <el-form-item label="记录规则名称" required>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="addForm.recordRulesName"
|
|
v-model="addForm.recordRulesName"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -28,11 +28,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
- <el-form-item
|
|
|
|
|
- label="记录规则分类"
|
|
|
|
|
- required
|
|
|
|
|
- prop="recordRulesClassify"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-form-item label="记录规则分类" required>
|
|
|
<DictSelection
|
|
<DictSelection
|
|
|
dictName="记录规则类型"
|
|
dictName="记录规则类型"
|
|
|
clearable
|
|
clearable
|
|
@@ -46,7 +42,6 @@
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
v-if="ruleInfo && ruleInfo.classify == 3"
|
|
v-if="ruleInfo && ruleInfo.classify == 3"
|
|
|
label="关联设备"
|
|
label="关联设备"
|
|
|
- prop="workshopArea"
|
|
|
|
|
>
|
|
>
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="addForm.deviceName"
|
|
v-model="addForm.deviceName"
|
|
@@ -69,6 +64,7 @@
|
|
|
v-model="addForm.checkFinishTime"
|
|
v-model="addForm.checkFinishTime"
|
|
|
type="datetime"
|
|
type="datetime"
|
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
placeholder="选择日期"
|
|
placeholder="选择日期"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
>
|
|
>
|
|
@@ -83,15 +79,17 @@
|
|
|
type="text"
|
|
type="text"
|
|
|
>
|
|
>
|
|
|
<template slot="append">
|
|
<template slot="append">
|
|
|
- <div style="width: 40px">
|
|
|
|
|
- <DictSelection
|
|
|
|
|
- dictName="检查有效期单位"
|
|
|
|
|
- clearable
|
|
|
|
|
- v-model="addForm.checkValidityUnit"
|
|
|
|
|
- placeholder="单位"
|
|
|
|
|
- style="width: auto"
|
|
|
|
|
- >
|
|
|
|
|
- </DictSelection>
|
|
|
|
|
|
|
+ <div style="width: 40px; box-sizing: border-box">
|
|
|
|
|
+ <el-form-item required prop="checkValidityUnit">
|
|
|
|
|
+ <DictSelection
|
|
|
|
|
+ dictName="检查有效期单位"
|
|
|
|
|
+ clearable
|
|
|
|
|
+ v-model="addForm.checkValidityUnit"
|
|
|
|
|
+ placeholder="单位"
|
|
|
|
|
+ style="width: auto"
|
|
|
|
|
+ >
|
|
|
|
|
+ </DictSelection>
|
|
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
@@ -111,7 +109,7 @@
|
|
|
<header-title title="检查项目"></header-title>
|
|
<header-title title="检查项目"></header-title>
|
|
|
|
|
|
|
|
<!-- 表格 -->
|
|
<!-- 表格 -->
|
|
|
- <el-table :data="list" style="width: 100%">
|
|
|
|
|
|
|
+ <el-table :data="addForm.details" style="width: 100%">
|
|
|
<el-table-column type="index" label="序号" width="50"> </el-table-column>
|
|
<el-table-column type="index" label="序号" width="50"> </el-table-column>
|
|
|
<el-table-column label="检查内容">
|
|
<el-table-column label="检查内容">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
@@ -124,14 +122,18 @@
|
|
|
<el-table-column label="检查工具">
|
|
<el-table-column label="检查工具">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
<div>
|
|
|
- {{ scope.row.tools.map((i) => i.toolName).join(',') }}
|
|
|
|
|
|
|
+ {{ scope.row.toolNames }}
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column label="检查人">
|
|
<el-table-column label="检查人">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <div @click="openSelectUser">
|
|
|
|
|
- {{ scope.row.id }}
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ @click="openSelectUser(scope.row)"
|
|
|
|
|
+ style="display: flex; align-items: center; cursor: pointer"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div>{{ showCheckUserNames(scope.row.checkUsers) }}</div
|
|
|
|
|
+ ><i class="el-icon-caret-bottom"></i>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -181,52 +183,111 @@
|
|
|
<!-- 底部按钮 -->
|
|
<!-- 底部按钮 -->
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="modal-footer">
|
|
<div class="modal-footer">
|
|
|
- <el-button type="primary" @click="handleOk">一键报工</el-button>
|
|
|
|
|
- <el-button type="primary" @click="handleOk">清空缓存</el-button>
|
|
|
|
|
- <el-button type="primary" @click="handleOk">缓存</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ :loading="butLoading"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="submit('submit')"
|
|
|
|
|
+ :disabled="productionInfo && productionInfo.executeStatus == 2"
|
|
|
|
|
+ >
|
|
|
|
|
+ 一键报工
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-popconfirm
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ productionInfo &&
|
|
|
|
|
+ productionInfo.recordId != null &&
|
|
|
|
|
+ productionInfo.executeStatus == 1
|
|
|
|
|
+ "
|
|
|
|
|
+ title="您确定要清空缓存吗?"
|
|
|
|
|
+ @confirm="clearCache"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button slot="reference" :loading="butLoading" type="primary">
|
|
|
|
|
+ 清空缓存
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-popconfirm>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ :loading="butLoading"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="submit('cache')"
|
|
|
|
|
+ :disabled="productionInfo && productionInfo.executeStatus == 2"
|
|
|
|
|
+ >
|
|
|
|
|
+ 缓存
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="productionInfo && productionInfo.executeStatus == 2"
|
|
|
|
|
+ @click="handleBeforeClose"
|
|
|
|
|
+ >
|
|
|
|
|
+ 关闭
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<!-- 选择用户 -->
|
|
<!-- 选择用户 -->
|
|
|
- <SelectUser ref="SelectUserRef" v-model="showSelectUser"></SelectUser>
|
|
|
|
|
|
|
+ <SelectUser
|
|
|
|
|
+ ref="SelectUserRef"
|
|
|
|
|
+ v-model="showSelectUser"
|
|
|
|
|
+ multipleSelect
|
|
|
|
|
+ @selectUserFinished="selectUserFinished"
|
|
|
|
|
+ ></SelectUser>
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import { submit } from '@/api/entrust';
|
|
|
import {
|
|
import {
|
|
|
recordRulesDetailPage,
|
|
recordRulesDetailPage,
|
|
|
getRecordRulesDetail
|
|
getRecordRulesDetail
|
|
|
} from '@/api/recordRules/index.js';
|
|
} from '@/api/recordRules/index.js';
|
|
|
import DictSelection from '@/components/Dict/DictSelection.vue';
|
|
import DictSelection from '@/components/Dict/DictSelection.vue';
|
|
|
import SelectUser from '@/components/select/SelectUser/index.vue';
|
|
import SelectUser from '@/components/select/SelectUser/index.vue';
|
|
|
|
|
+ import {
|
|
|
|
|
+ saveOrUpdateAndSubmit,
|
|
|
|
|
+ saveOrUpdate,
|
|
|
|
|
+ logicDelete,
|
|
|
|
|
+ getById
|
|
|
|
|
+ } from '@/api/producetaskrecordrulesrecord/index';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: { SelectUser },
|
|
components: { SelectUser },
|
|
|
|
|
+ emits: ['reload'],
|
|
|
props: {},
|
|
props: {},
|
|
|
data() {
|
|
data() {
|
|
|
const formDate = {
|
|
const formDate = {
|
|
|
|
|
+ id: null,
|
|
|
|
|
+ workshopArea: '',
|
|
|
checkFinishTime: '',
|
|
checkFinishTime: '',
|
|
|
checkValidity: null,
|
|
checkValidity: null,
|
|
|
checkValidityUnit: '',
|
|
checkValidityUnit: '',
|
|
|
conclution: 0,
|
|
conclution: 0,
|
|
|
|
|
+ isTempRecord: 0,
|
|
|
details: [],
|
|
details: [],
|
|
|
deviceId: 0,
|
|
deviceId: 0,
|
|
|
deviceName: '',
|
|
deviceName: '',
|
|
|
- id: 0,
|
|
|
|
|
|
|
+ batchNo: '',
|
|
|
|
|
+ executeMethod: 0,
|
|
|
|
|
+ formingNum: 0,
|
|
|
|
|
+ itemType: 0,
|
|
|
produceRoutingId: 0,
|
|
produceRoutingId: 0,
|
|
|
produceRoutingName: '',
|
|
produceRoutingName: '',
|
|
|
produceTaskConfigId: 0,
|
|
produceTaskConfigId: 0,
|
|
|
produceTaskId: 0,
|
|
produceTaskId: 0,
|
|
|
- recordRulesClassify: 0,
|
|
|
|
|
|
|
+ productCode: '',
|
|
|
|
|
+ productModel: '',
|
|
|
|
|
+ productName: '',
|
|
|
|
|
+ recordRulesClassify: null,
|
|
|
recordRulesId: 0,
|
|
recordRulesId: 0,
|
|
|
recordRulesName: '',
|
|
recordRulesName: '',
|
|
|
|
|
+ reportWorkType: 0,
|
|
|
|
|
+ specification: '',
|
|
|
workOrderCode: '',
|
|
workOrderCode: '',
|
|
|
- workOrderId: 0,
|
|
|
|
|
- workshopArea: ''
|
|
|
|
|
|
|
+ workOrderId: 0
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
visible: false,
|
|
visible: false,
|
|
|
- addForm: formDate,
|
|
|
|
|
|
|
+ formDate,
|
|
|
|
|
+ addForm: JSON.parse(JSON.stringify(formDate)),
|
|
|
formRules: {
|
|
formRules: {
|
|
|
checkFinishTime: [
|
|
checkFinishTime: [
|
|
|
{ required: true, message: '请选择检查完成时间', trigger: 'blur' },
|
|
{ required: true, message: '请选择检查完成时间', trigger: 'blur' },
|
|
@@ -239,12 +300,30 @@
|
|
|
checkValidity: [
|
|
checkValidity: [
|
|
|
{ required: true, message: '请输入检查有效期', trigger: 'blur' },
|
|
{ required: true, message: '请输入检查有效期', trigger: 'blur' },
|
|
|
{ required: true, message: '请输入检查有效期', trigger: 'change' }
|
|
{ required: true, message: '请输入检查有效期', trigger: 'change' }
|
|
|
|
|
+ ],
|
|
|
|
|
+ checkValidityUnit: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择检查有效期单位',
|
|
|
|
|
+ trigger: 'blur'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择检查有效期单位',
|
|
|
|
|
+ trigger: 'change'
|
|
|
|
|
+ }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
productionInfo: null,
|
|
productionInfo: null,
|
|
|
list: [],
|
|
list: [],
|
|
|
ruleInfo: null,
|
|
ruleInfo: null,
|
|
|
- showSelectUser: false
|
|
|
|
|
|
|
+ showSelectUser: false,
|
|
|
|
|
+ currentRow: null,
|
|
|
|
|
+ butLoading: false,
|
|
|
|
|
+ // 工艺路线
|
|
|
|
|
+ workOrderInfo: null,
|
|
|
|
|
+ //工序信息
|
|
|
|
|
+ produceTaskInfo: null
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -264,24 +343,60 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- open(productionInfo) {
|
|
|
|
|
|
|
+ open(productionInfo, workOrderInfo, produceTaskInfo) {
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.productionInfo = productionInfo;
|
|
this.productionInfo = productionInfo;
|
|
|
|
|
+ this.workOrderInfo = workOrderInfo;
|
|
|
|
|
+ this.produceTaskInfo = produceTaskInfo;
|
|
|
|
|
+
|
|
|
|
|
+ // 存在缓存记录
|
|
|
|
|
+ if (this.productionInfo.recordId != null) {
|
|
|
|
|
+ // 查询详情
|
|
|
|
|
+ this.getCacheInfo();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.addForm.batchNo = workOrderInfo.batchNo;
|
|
|
|
|
+ this.addForm.executeMethod = productionInfo.executeMethod;
|
|
|
|
|
+ this.addForm.formingNum = workOrderInfo.formingNum;
|
|
|
|
|
+ this.addForm.itemType = productionInfo.itemType;
|
|
|
|
|
+ this.addForm.produceRoutingId = workOrderInfo.produceRoutingId;
|
|
|
|
|
+ this.addForm.produceRoutingName = workOrderInfo.produceRoutingName;
|
|
|
|
|
+ this.addForm.produceTaskConfigId = productionInfo.produceTaskConfigId;
|
|
|
|
|
+ this.addForm.produceTaskId = productionInfo.produceTaskId;
|
|
|
|
|
+ this.addForm.productCode = workOrderInfo.productCode;
|
|
|
|
|
+ this.addForm.productModel = workOrderInfo.model;
|
|
|
|
|
+ this.addForm.productName = workOrderInfo.productName;
|
|
|
|
|
+ this.addForm.reportWorkType = productionInfo.reportWorkType;
|
|
|
|
|
+ this.addForm.specification = workOrderInfo.specification;
|
|
|
|
|
+ this.addForm.workOrderCode = workOrderInfo.code;
|
|
|
|
|
+ this.addForm.workOrderId = workOrderInfo.id;
|
|
|
|
|
+
|
|
|
|
|
+ this.getRuleList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
console.log('this.productionInfo', this.productionInfo);
|
|
console.log('this.productionInfo', this.productionInfo);
|
|
|
- this.getRuleList();
|
|
|
|
|
|
|
+ console.log('this.addForm', this.addForm);
|
|
|
this.getRuleInfo();
|
|
this.getRuleInfo();
|
|
|
},
|
|
},
|
|
|
|
|
+ // 获取详情
|
|
|
|
|
+ async getCacheInfo() {
|
|
|
|
|
+ const data = await getById(this.productionInfo.recordId);
|
|
|
|
|
+ console.log('dat 缓存', data);
|
|
|
|
|
+ this.$util.assignObject(this.addForm, data);
|
|
|
|
|
+ this.addForm.recordRulesClassify += '';
|
|
|
|
|
+ },
|
|
|
// 规则信息
|
|
// 规则信息
|
|
|
async getRuleInfo() {
|
|
async getRuleInfo() {
|
|
|
const data = await getRecordRulesDetail(this.productionInfo.ruleId);
|
|
const data = await getRecordRulesDetail(this.productionInfo.ruleId);
|
|
|
this.ruleInfo = data;
|
|
this.ruleInfo = data;
|
|
|
console.log('this.ruleInfo', this.ruleInfo);
|
|
console.log('this.ruleInfo', this.ruleInfo);
|
|
|
- // 复制表单信息
|
|
|
|
|
- this.addForm.recordRulesClassify = this.ruleInfo.classify;
|
|
|
|
|
- this.addForm.recordRulesId = this.ruleInfo.id;
|
|
|
|
|
- this.addForm.recordRulesName = this.ruleInfo.name;
|
|
|
|
|
- this.addForm.deviceId = this.ruleInfo.deviceId;
|
|
|
|
|
- this.addForm.deviceName = this.ruleInfo.deviceName;
|
|
|
|
|
|
|
+ if (this.productionInfo.recordId == null) {
|
|
|
|
|
+ // 赋值表单信息
|
|
|
|
|
+ this.addForm.recordRulesClassify = this.ruleInfo.classify + '';
|
|
|
|
|
+ this.addForm.recordRulesId = this.ruleInfo.id;
|
|
|
|
|
+ this.addForm.recordRulesName = this.ruleInfo.name;
|
|
|
|
|
+ this.addForm.deviceId = this.ruleInfo.deviceId;
|
|
|
|
|
+ this.addForm.deviceName = this.ruleInfo.deviceName;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
// 查询记录规则 事项列表
|
|
// 查询记录规则 事项列表
|
|
|
async getRuleList() {
|
|
async getRuleList() {
|
|
@@ -291,33 +406,121 @@
|
|
|
size: 9999
|
|
size: 9999
|
|
|
});
|
|
});
|
|
|
// 添加必要参数
|
|
// 添加必要参数
|
|
|
- this.list = list.map((i) => {
|
|
|
|
|
|
|
+ this.addForm.details = list.map((i) => {
|
|
|
return {
|
|
return {
|
|
|
- ...i,
|
|
|
|
|
- checkDeptId: 0,
|
|
|
|
|
- checkDeptName: '',
|
|
|
|
|
checkResult: null,
|
|
checkResult: null,
|
|
|
- checkStatus: 0,
|
|
|
|
|
|
|
+ checkStatus: null,
|
|
|
checkStatusDesc: '',
|
|
checkStatusDesc: '',
|
|
|
- checkUserId: 0,
|
|
|
|
|
- checkUserName: '',
|
|
|
|
|
errorMsg: '',
|
|
errorMsg: '',
|
|
|
- executeStatus: 0
|
|
|
|
|
|
|
+ checkUsers: [],
|
|
|
|
|
+ paramValue: i.paramValue,
|
|
|
|
|
+ toolNames: i.tools.map((i) => i.toolName).join(','),
|
|
|
|
|
+ recordId: i.recordId
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
- console.log('data list 事项列表', this.list);
|
|
|
|
|
|
|
+ console.log('this.addForm 添加规则', this.addForm);
|
|
|
},
|
|
},
|
|
|
- openSelectUser() {
|
|
|
|
|
|
|
+ openSelectUser(row) {
|
|
|
|
|
+ this.currentRow = row;
|
|
|
|
|
+ console.log('row', row);
|
|
|
this.showSelectUser = true;
|
|
this.showSelectUser = true;
|
|
|
|
|
+ console.log('this.showSelectUser', this.showSelectUser);
|
|
|
},
|
|
},
|
|
|
- handleBeforeClose(done) {
|
|
|
|
|
- this.visible = false;
|
|
|
|
|
|
|
+ handleBeforeClose() {
|
|
|
|
|
+ this.addForm = JSON.parse(JSON.stringify(this.formDate));
|
|
|
|
|
+ console.log('this.$refs.ruleFormRef', this.addForm);
|
|
|
|
|
+ this.$refs.ruleFormRef?.clearValidate();
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.visible = false;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- handleCancel() {
|
|
|
|
|
- this.visible = false;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ selectUserFinished(userInfo) {
|
|
|
|
|
+ console.log('userInfo', userInfo);
|
|
|
|
|
+ this.currentRow.checkUsers = userInfo.map((i) => {
|
|
|
|
|
+ // 构建参数和接口的对应上
|
|
|
|
|
+ return { ...i, userName: i.name, userId: i.id };
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- handleOk() {
|
|
|
|
|
- this.visible = false;
|
|
|
|
|
|
|
+ showCheckUserNames(userList) {
|
|
|
|
|
+ if (userList.length == 0) return '请选择部门-选择员工';
|
|
|
|
|
+
|
|
|
|
|
+ return userList
|
|
|
|
|
+ .map((i) => {
|
|
|
|
|
+ return i.groupName + '-' + i.userName;
|
|
|
|
|
+ })
|
|
|
|
|
+ .join(',');
|
|
|
|
|
+ },
|
|
|
|
|
+ // 提交
|
|
|
|
|
+ submit(type) {
|
|
|
|
|
+ // 验证表单
|
|
|
|
|
+ this.$refs.ruleFormRef.validate(async (valid) => {
|
|
|
|
|
+ if (!valid) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 报工需要验证 缓存不验证
|
|
|
|
|
+ if (type == 'submit') {
|
|
|
|
|
+ // 验证检查项目
|
|
|
|
|
+ const detailRequired = this.addForm.details.some((i) => {
|
|
|
|
|
+ let qk = false;
|
|
|
|
|
+ if (this.ruleInfo.classify == 3) {
|
|
|
|
|
+ qk = Boolean(i.checkStatusDesc);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ qk = i.checkStatus != null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return i.checkResult == null || !qk || i.checkUsers?.length == 0;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ if (detailRequired) {
|
|
|
|
|
+ return this.$message.warning(
|
|
|
|
|
+ '请先完善 检查人、检查情况、检查结果 内容!'
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ console.log('this.addForm', this.addForm);
|
|
|
|
|
+
|
|
|
|
|
+ // 提交
|
|
|
|
|
+ this.butLoading = true;
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (type == 'submit') {
|
|
|
|
|
+ await saveOrUpdateAndSubmit(this.addForm);
|
|
|
|
|
+ this.$message.success('报工成功!');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ await saveOrUpdate(this.addForm);
|
|
|
|
|
+ this.$message.success('缓存成功!');
|
|
|
|
|
+ this.productionInfo.executeStatus = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ this.butLoading = false;
|
|
|
|
|
+
|
|
|
|
|
+ // 返回
|
|
|
|
|
+ this.$emit('reload');
|
|
|
|
|
+
|
|
|
|
|
+ if (type == 'submit') {
|
|
|
|
|
+ this.handleBeforeClose();
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.butLoading = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ async clearCache() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ this.butLoading = true;
|
|
|
|
|
+ await logicDelete(this.productionInfo.recordId);
|
|
|
|
|
+ this.butLoading = false;
|
|
|
|
|
+ this.productionInfo.recordId == null;
|
|
|
|
|
+ this.addForm = JSON.parse(JSON.stringify(this.formDate));
|
|
|
|
|
+ this.getRuleList();
|
|
|
|
|
+ this.$message.success('缓存清空成功!');
|
|
|
|
|
+ this.productionInfo.executeStatus = 0;
|
|
|
|
|
+ this.$emit('reload');
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.butLoading = false;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -329,6 +532,9 @@
|
|
|
min-height: 100px;
|
|
min-height: 100px;
|
|
|
}
|
|
}
|
|
|
.modal-footer {
|
|
.modal-footer {
|
|
|
- text-align: right;
|
|
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|