工序
master
zhaoxiaolin 1 year ago
parent 153d35d5fd
commit 85bc9aca4d

@ -50,7 +50,7 @@ export default {
// //
limit: { limit: {
type: Number, type: Number,
default: 5, default: 15,
}, },
// (MB) // (MB)
fileSize: { fileSize: {
@ -60,7 +60,7 @@ export default {
// , ['png', 'jpg', 'jpeg'] // , ['png', 'jpg', 'jpeg']
fileType: { fileType: {
type: Array, type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"], default: () => ["doc", "xls", "ppt", "txt", "pdf",'png', 'jpg', 'jpeg'],
}, },
// //
isShowTip: { isShowTip: {
@ -146,7 +146,7 @@ export default {
// //
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
if (res.code === 200) { if (res.code === 200) {
this.uploadList.push({ name: res.data.url, url: res.data.url }); this.uploadList.push({ name: res.data.name, url: res.data.url });
this.uploadedSuccessfully(); this.uploadedSuccessfully();
} else { } else {
this.number--; this.number--;
@ -163,6 +163,7 @@ export default {
}, },
// //
uploadedSuccessfully() { uploadedSuccessfully() {
debugger
if (this.number > 0 && this.uploadList.length === this.number) { if (this.number > 0 && this.uploadList.length === this.number) {
this.fileList = this.fileList.concat(this.uploadList); this.fileList = this.fileList.concat(this.uploadList);
this.uploadList = []; this.uploadList = [];

@ -51,7 +51,7 @@
<el-table-column label="顺序编号" align="center" prop="orderNum" /> <el-table-column label="顺序编号" align="center" prop="orderNum" />
<el-table-column label="步骤说明" width="400px" align="center" prop="contentText" :show-overflow-tooltip="true"/> <el-table-column label="步骤说明" width="400px" align="center" prop="contentText" :show-overflow-tooltip="true"/>
<el-table-column label="辅助设备" align="center" prop="device" :show-overflow-tooltip="true"/> <el-table-column label="辅助设备" align="center" prop="device" :show-overflow-tooltip="true"/>
<el-table-column label="辅助材料" align="center" prop="material" :show-overflow-tooltip="true"/> <el-table-column label="BOM材料" align="center" prop="material" :show-overflow-tooltip="true"/>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/> <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<el-table-column label="操作" width="100px" v-if="optType !='view'" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" width="100px" v-if="optType !='view'" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -90,11 +90,12 @@
<el-input-number :min="1" v-model="form.orderNum" placeholder="请输入顺序编号" /> <el-input-number :min="1" v-model="form.orderNum" placeholder="请输入顺序编号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!--
<el-col :span="12"> <el-col :span="12">
<el-form-item label="材料URL" prop="docUrl"> <el-form-item label="材料URL" prop="docUrl">
<el-input v-model="form.docUrl" placeholder="请输入材料URL" /> <el-input v-model="form.docUrl" placeholder="请输入材料URL" />
</el-form-item> </el-form-item>
</el-col> </el-col>-->
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@ -103,7 +104,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="辅助材料" prop="material"> <el-form-item label="BOM材料" prop="material">
<el-input v-model="form.material" placeholder="请输入辅助材料" /> <el-input v-model="form.material" placeholder="请输入辅助材料" />
</el-form-item> </el-form-item>
</el-col> </el-col>

@ -157,35 +157,61 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="8">
<el-form-item label="工作中心" prop="attention"> <el-form-item label="拆分&合并">
<el-input v-model="form.attention" type="input" placeholder="请输入内容" /> <el-select v-model="form.splitMerge" placeholder="请选择">
<el-option
v-for="dict in dict.type.split_merge"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="工作时间" prop="attention"> <el-col :span="7">
<el-input v-model="form.attention" type="input" placeholder="请输入内容" /> <el-form-item label="工序名称" prop="splitMergeNum">
<el-input v-model="form.splitMergeNum" placeholder="请输入拆分&合并数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="可多单运行" prop="sync">
<el-radio-group v-model="form.sync" disabled v-if="optType=='view'">
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
<el-radio-group v-model="form.sync" v-else>
<el-radio
v-for="dict in dict.type.sys_yes_no"
:key="dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="工资费用" prop="attention"> <el-form-item label="工作中心" prop="workCenter">
<el-input v-model="form.attention" type="input" placeholder="请输入内容" /> <el-input v-model="form.workCenter" type="input" placeholder="请输入工作中心" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="检验情况" prop="attention"> <el-form-item label="工作时间" prop="workTime">
<el-input v-model="form.attention" type="input" placeholder="请输入内容" /> <el-input v-model="form.workTime" type="input" placeholder="请输入工作时长" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="工序SOP" prop="attention"> <el-form-item label="工序SOP" prop="fileList">
<el-input v-model="form.attention" type="textarea" placeholder="请输入内容" /> <FileUpload v-model="form.fileList"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -221,7 +247,7 @@ import Processcontent from "./content.vue";
export default { export default {
name: "Process", name: "Process",
dicts: ['sys_yes_no'], dicts: ['sys_yes_no','split_merge'],
components: {Processcontent}, components: {Processcontent},
data() { data() {
return { return {
@ -267,7 +293,17 @@ export default {
enableFlag: [ enableFlag: [
{ required: true, message: "是否启用不能为空", trigger: "blur" } { required: true, message: "是否启用不能为空", trigger: "blur" }
], ],
} splitMerge: [
{ required: true, message: "拆分&合并不能为空", trigger: "blur" }
],
splitMergeNum: [
{ required: true, message: "拆分&合并数量不能为空", trigger: "blur" }
],
sync: [
{ required: true, message: "可多单运行不能为空", trigger: "blur" }
],
},
fileList:[]
}; };
}, },
created() { created() {
@ -300,7 +336,8 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null,
fileList:[]
}; };
this.autoGenFlag = false; this.autoGenFlag = false;
this.resetForm("form"); this.resetForm("form");

Loading…
Cancel
Save