|
|
@@ -176,11 +176,19 @@
|
|
|
|
|
|
<el-col :span="8" label-width="100px">
|
|
|
<el-form-item label="单位" prop="beatUnit">
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
v-if="!isView"
|
|
|
- placeholder=""
|
|
|
v-model="beatParam.beatUnit"
|
|
|
- ></el-input>
|
|
|
+ filterable
|
|
|
+ class="ele-block"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<div v-else>{{ beatParam.beatUnit }}</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -199,11 +207,19 @@
|
|
|
|
|
|
<el-col :span="8" label-width="100px">
|
|
|
<el-form-item label="单位" prop="materielUnit">
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
v-if="!isView"
|
|
|
- placeholder=""
|
|
|
v-model="beatParam.materielUnit"
|
|
|
- ></el-input>
|
|
|
+ filterable
|
|
|
+ class="ele-block"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<div v-else>{{ beatParam.materielUnit }}</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -222,11 +238,19 @@
|
|
|
|
|
|
<el-col :span="8" label-width="100px">
|
|
|
<el-form-item label="单位" prop="beatTimeUnit">
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
v-if="!isView"
|
|
|
- placeholder=""
|
|
|
v-model="beatParam.beatTimeUnit"
|
|
|
- ></el-input>
|
|
|
+ filterable
|
|
|
+ class="ele-block"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<div v-else>{{ beatParam.beatTimeUnit }}</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -244,12 +268,20 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8" label-width="100px">
|
|
|
- <el-form-item label="单位" prop="name">
|
|
|
- <el-input
|
|
|
+ <el-form-item label="单位" prop="beatPrepareUnit">
|
|
|
+ <el-select
|
|
|
v-if="!isView"
|
|
|
- placeholder=""
|
|
|
v-model="beatParam.beatPrepareUnit"
|
|
|
- ></el-input>
|
|
|
+ filterable
|
|
|
+ class="ele-block"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<div v-else>{{ beatParam.beatPrepareUnit }}</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -267,12 +299,20 @@
|
|
|
</el-col>
|
|
|
|
|
|
<el-col :span="8" label-width="100px">
|
|
|
- <el-form-item label="单位" prop="name">
|
|
|
- <el-input
|
|
|
+ <el-form-item label="单位" prop="beatRestUnit">
|
|
|
+ <el-select
|
|
|
v-if="!isView"
|
|
|
- placeholder=""
|
|
|
v-model="beatParam.beatRestUnit"
|
|
|
- ></el-input>
|
|
|
+ filterable
|
|
|
+ class="ele-block"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<div v-else>{{ beatParam.beatRestUnit }}</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -358,11 +398,19 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8" label-width="100px">
|
|
|
<el-form-item label="单位" prop="type">
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
v-if="!isView"
|
|
|
- placeholder="单位"
|
|
|
v-model="normalHours.unit"
|
|
|
- ></el-input>
|
|
|
+ filterable
|
|
|
+ class="ele-block"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dictList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
<div v-else>{{ normalHours.unit }}</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -639,9 +687,6 @@
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="替代料" name="替代料">
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<ele-pro-table
|
|
|
ref="replaceMaterialTable"
|
|
|
:columns="columns1"
|
|
|
@@ -923,7 +968,14 @@
|
|
|
></standardOutput>
|
|
|
|
|
|
<div class="btns">
|
|
|
- <el-button type="primary" size="small" v-if="!isView" @click="save('save')"> 保存</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ v-if="!isView"
|
|
|
+ @click="save('save')"
|
|
|
+ >
|
|
|
+ 保存</el-button
|
|
|
+ >
|
|
|
|
|
|
<el-button type="primary" size="small" @click="save('close')">{{
|
|
|
isView ? '确定' : '保存并关闭'
|
|
|
@@ -941,6 +993,7 @@
|
|
|
import { workingProcedureUpdate } from '@/api/material/BOM';
|
|
|
import ParamModal from '@/views/technology/productParam/components/ParamModal.vue';
|
|
|
import ProductModal from '@/components/select/bom/ProductModal.vue';
|
|
|
+ import { getByCode } from '@/api/system/dictionary-data';
|
|
|
import ProductModalMultiple from './ProductModalMultiple.vue';
|
|
|
import userSearch from './user-search.vue';
|
|
|
import jobDialog from './jobDialog.vue';
|
|
|
@@ -987,6 +1040,9 @@
|
|
|
{ label: '否', value: 0 },
|
|
|
{ label: '是', value: 1 }
|
|
|
],
|
|
|
+
|
|
|
+ dictList: [], //单位下拉
|
|
|
+
|
|
|
// 表格列配置
|
|
|
columns1: [],
|
|
|
defaultColumns1: [
|
|
|
@@ -1314,6 +1370,7 @@
|
|
|
},
|
|
|
created() {
|
|
|
this.requestDict('工种类型');
|
|
|
+ this.getDictList('time_unit');
|
|
|
},
|
|
|
methods: {
|
|
|
addFile() {
|
|
|
@@ -1554,11 +1611,10 @@
|
|
|
this.$refs.table.setData(
|
|
|
this.tableData.taskParam[this.currentIndex].produceList || []
|
|
|
);
|
|
|
- } else if (this.activeName === '质检项参数') {
|
|
|
- this.qualityParam = this.tableData.taskParam[this.currentIndex].qualityParam || []
|
|
|
- }
|
|
|
-
|
|
|
- else if (this.activeName === '生产节拍') {
|
|
|
+ } else if (this.activeName === '质检项参数') {
|
|
|
+ this.qualityParam =
|
|
|
+ this.tableData.taskParam[this.currentIndex].qualityParam || [];
|
|
|
+ } else if (this.activeName === '生产节拍') {
|
|
|
console.log(this.tableData.taskParam[this.currentIndex].beatParam);
|
|
|
this.beatParam =
|
|
|
this.tableData.taskParam[this.currentIndex].beatParam || {};
|
|
|
@@ -1753,15 +1809,15 @@
|
|
|
this.tableData.taskParam[this.currentIndex].baseCountUnit =
|
|
|
this.baseCountUnit;
|
|
|
|
|
|
- this.tableData.taskParam[this.currentIndex].baseCount2 =
|
|
|
+ this.tableData.taskParam[this.currentIndex].baseCount2 =
|
|
|
this.baseCount2;
|
|
|
this.tableData.taskParam[this.currentIndex].baseCountUnit2 =
|
|
|
this.baseCountUnit2;
|
|
|
|
|
|
- if(this.$refs.qualityParamRef) {
|
|
|
- this.tableData.taskParam[this.currentIndex].qualityParam = this.$refs.qualityParamRef.getDate() || []
|
|
|
-
|
|
|
- }
|
|
|
+ if (this.$refs.qualityParamRef) {
|
|
|
+ this.tableData.taskParam[this.currentIndex].qualityParam =
|
|
|
+ this.$refs.qualityParamRef.getDate() || [];
|
|
|
+ }
|
|
|
|
|
|
workingProcedureUpdate({
|
|
|
id: this.tableData.id,
|
|
|
@@ -1772,11 +1828,22 @@
|
|
|
}).then(() => {
|
|
|
this.$message.success('保存成功');
|
|
|
this.$emit('chooseProcess');
|
|
|
- if(type === 'close') {
|
|
|
+ if (type === 'close') {
|
|
|
this.handleClose();
|
|
|
- }
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ async getDictList(code) {
|
|
|
+ let { data: res } = await getByCode(code);
|
|
|
+
|
|
|
+ this.dictList = res.reduce((acc, curr) => {
|
|
|
+ let key = Object.keys(curr)[0]; // 获取当前对象的键
|
|
|
+ let value = curr[key]; // 获取当前对象的值
|
|
|
+ acc.push({ value, label: value }); // 将 { value, label } 格式的对象添加到数组中
|
|
|
+ return acc;
|
|
|
+ }, []); // 初始值为空数组 []
|
|
|
}
|
|
|
}
|
|
|
};
|