|
|
@@ -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"
|
|
|
@@ -805,85 +850,6 @@
|
|
|
>删除</el-link
|
|
|
>
|
|
|
</template>
|
|
|
- <template v-slot:type="{ row }">
|
|
|
- <div v-if="isView">{{ row.type }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.type"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:code="{ row }">
|
|
|
- <div v-if="isView">{{ row.code }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.code"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:versions="{ row }">
|
|
|
- <div v-if="isView">{{ row.versions }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.versions"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:status="{ row }">
|
|
|
- <div v-if="isView">{{
|
|
|
- statusOption.filter((item) => item.value == row.status)[0].label
|
|
|
- }}</div>
|
|
|
- <div v-else>
|
|
|
- <template>
|
|
|
- <el-select v-model="row.status" placeholder="请选择">
|
|
|
- <el-option
|
|
|
- v-for="item in statusOption"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- :key="item.value"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:path="{ row }">
|
|
|
- <div v-if="isView">附件</div>
|
|
|
- <div v-else
|
|
|
- ><div class="downLoad">
|
|
|
- <fileUpload
|
|
|
- v-model="jobFiledList"
|
|
|
- :show-file-list="false"
|
|
|
- module="main"
|
|
|
- @input="uploadedJobSuccess($event, row)"
|
|
|
- :showLib="false"
|
|
|
- :limit="1"
|
|
|
- />
|
|
|
- <div v-if="row.path">
|
|
|
- <el-button
|
|
|
- style="margin-left: 10px"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- @click="downloadFile(row.path)"
|
|
|
- >下载</el-button
|
|
|
- >
|
|
|
- </div></div
|
|
|
- >
|
|
|
- </div>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template v-slot:remark="{ row }">
|
|
|
- <div v-if="isView">{{ row.remark }}</div>
|
|
|
- <el-input
|
|
|
- v-else
|
|
|
- v-model="row.remark"
|
|
|
- placeholder="请输入"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
</ele-pro-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
@@ -922,9 +888,20 @@
|
|
|
@selection="chooseStandardList"
|
|
|
></standardOutput>
|
|
|
|
|
|
+ <fileIndex v-if="fileShow" @close="fileClose"></fileIndex>
|
|
|
+
|
|
|
<div class="btns">
|
|
|
- <el-button type="primary" size="small" @click="save">{{
|
|
|
- isView ? '确定' : '保存'
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ v-if="!isView"
|
|
|
+ @click="save('save')"
|
|
|
+ >
|
|
|
+ 保存</el-button
|
|
|
+ >
|
|
|
+
|
|
|
+ <el-button type="primary" size="small" @click="save('close')">{{
|
|
|
+ isView ? '确定' : '保存并关闭'
|
|
|
}}</el-button>
|
|
|
<el-button size="small" @click="handleClose">关闭</el-button>
|
|
|
</div>
|
|
|
@@ -939,11 +916,13 @@
|
|
|
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';
|
|
|
import standardOutput from './standardOutput.vue';
|
|
|
import term from '../qualityTesting/term';
|
|
|
+ import fileIndex from '../file/index.vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
userSearch,
|
|
|
@@ -953,7 +932,8 @@
|
|
|
jobDialog,
|
|
|
ProductModalMultiple,
|
|
|
standardOutput,
|
|
|
- term
|
|
|
+ term,
|
|
|
+ fileIndex
|
|
|
},
|
|
|
mixins: [dictMixins],
|
|
|
data() {
|
|
|
@@ -985,6 +965,9 @@
|
|
|
{ label: '否', value: 0 },
|
|
|
{ label: '是', value: 1 }
|
|
|
],
|
|
|
+
|
|
|
+ dictList: [], //单位下拉
|
|
|
+
|
|
|
// 表格列配置
|
|
|
columns1: [],
|
|
|
defaultColumns1: [
|
|
|
@@ -1178,66 +1161,42 @@
|
|
|
// 表格选中数据
|
|
|
jobColumns1: [
|
|
|
{
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- slot: 'type',
|
|
|
- prop: 'type',
|
|
|
- label: '类型',
|
|
|
- showOverflowTooltip: true,
|
|
|
- align: 'center',
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- slot: 'code',
|
|
|
- prop: 'code',
|
|
|
label: '编码',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'code',
|
|
|
+ width: 180,
|
|
|
align: 'center',
|
|
|
- minWidth: 110
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- slot: 'name',
|
|
|
prop: 'name',
|
|
|
- label: '名称',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ label: '文档名称',
|
|
|
align: 'center',
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- slot: 'path',
|
|
|
- prop: 'path',
|
|
|
- label: '附件',
|
|
|
+ slot: 'name',
|
|
|
showOverflowTooltip: true,
|
|
|
- align: 'center',
|
|
|
minWidth: 200
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- slot: 'versions',
|
|
|
- prop: 'versions',
|
|
|
- label: '版本',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'storagePath',
|
|
|
+ label: '文件名称',
|
|
|
align: 'center',
|
|
|
- minWidth: 110
|
|
|
- },
|
|
|
- {
|
|
|
- slot: 'status',
|
|
|
- prop: 'status',
|
|
|
- label: '状态',
|
|
|
+
|
|
|
showOverflowTooltip: true,
|
|
|
- align: 'center',
|
|
|
- minWidth: 110
|
|
|
+ minWidth: 200,
|
|
|
+ formatter: (_row, _column, cellValue) => {
|
|
|
+ return cellValue[0]?.name;
|
|
|
+ }
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- prop: 'createName',
|
|
|
- label: '创建人',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ prop: 'version',
|
|
|
+ label: '版本',
|
|
|
align: 'center',
|
|
|
- minWidth: 110
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ minWidth: 100
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
prop: 'createTime',
|
|
|
label: '创建时间',
|
|
|
@@ -1307,28 +1266,38 @@
|
|
|
beatParam: {},
|
|
|
normalHours: {},
|
|
|
qualityParam: [],
|
|
|
- qualityPointParam: []
|
|
|
+ qualityPointParam: [],
|
|
|
+
|
|
|
+ fileShow: false
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.requestDict('工种类型');
|
|
|
+ this.getDictList('time_unit');
|
|
|
},
|
|
|
methods: {
|
|
|
addFile() {
|
|
|
- let userInfo = JSON.parse(localStorage.getItem('info'));
|
|
|
- this.tableData.taskParam[this.currentIndex]['fileParam'].push({
|
|
|
- code: '',
|
|
|
- type: '',
|
|
|
- name: '',
|
|
|
- versions: '',
|
|
|
- name: '',
|
|
|
- status: 1,
|
|
|
- createName: userInfo.name,
|
|
|
- createTime: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
|
- });
|
|
|
- this.$refs.fileTable.setData(
|
|
|
- this.tableData.taskParam[this.currentIndex]['fileParam']
|
|
|
+ this.fileShow = true;
|
|
|
+ },
|
|
|
+ fileClose(val) {
|
|
|
+
|
|
|
+ if (val == false) {
|
|
|
+ this.fileShow = false;
|
|
|
+ } else {
|
|
|
+ this.fileShow = false;
|
|
|
+
|
|
|
+ this.$refs.fileTable.setData([
|
|
|
+ ...val,
|
|
|
+ ...this.$refs.fileTable.getData()
|
|
|
+ ]);
|
|
|
+ this.$set(
|
|
|
+ this.tableData.taskParam[this.currentIndex],
|
|
|
+ 'fileParam',
|
|
|
+ this.$refs.fileTable.getData()
|
|
|
);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
addJob() {
|
|
|
this.$refs.jobRef.open();
|
|
|
@@ -1552,11 +1521,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 || {};
|
|
|
@@ -1726,7 +1694,7 @@
|
|
|
this.$refs.table.setSelectedRows([]);
|
|
|
this.selection = [];
|
|
|
},
|
|
|
- save() {
|
|
|
+ save(type) {
|
|
|
if (this.isView) {
|
|
|
this.handleClose();
|
|
|
} else {
|
|
|
@@ -1751,15 +1719,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,
|
|
|
@@ -1770,9 +1738,22 @@
|
|
|
}).then(() => {
|
|
|
this.$message.success('保存成功');
|
|
|
this.$emit('chooseProcess');
|
|
|
- this.handleClose();
|
|
|
+ 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;
|
|
|
+ }, []); // 初始值为空数组 []
|
|
|
}
|
|
|
}
|
|
|
};
|