fix:mlog二级可编辑,并且展示batch
This commit is contained in:
parent
4ae990fbdb
commit
9d7dca9096
|
@ -24,13 +24,12 @@
|
|||
placeholder="生产设备"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="mode == 'edit'"
|
||||
class="width100"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float:left">{{item.name}}</span>
|
||||
|
@ -46,7 +45,6 @@
|
|||
placeholder="个人任务"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="mode == 'edit'"
|
||||
class="width100"
|
||||
>
|
||||
<el-option
|
||||
|
@ -64,7 +62,6 @@
|
|||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="work_start_time">
|
||||
<el-date-picker
|
||||
:disabled="mode == 'edit'"
|
||||
v-model="form.work_start_time"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
|
@ -90,7 +87,6 @@
|
|||
placeholder="班次"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="mode == 'edit'"
|
||||
class="width100"
|
||||
>
|
||||
<el-option
|
||||
|
@ -123,8 +119,8 @@
|
|||
justify-content: space-between;
|
||||
"
|
||||
>
|
||||
<span>{{ item.batch }}</span
|
||||
><span>{{ item.count }}</span>
|
||||
<span style="flex:1;margin-right:15px!important;">{{ item.batch }}</span>
|
||||
<span style="flex:1;">{{ item.count }}</span>
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
@ -392,20 +388,9 @@ export default {
|
|||
form: Object.assign({}, defaultForm),
|
||||
//验证规则
|
||||
rules: {
|
||||
work_start_time: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择生产开始时间",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
route: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择工艺路线",
|
||||
trigger: "blur",
|
||||
},
|
||||
]
|
||||
work_start_time: [{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
||||
work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
||||
route: [{required: true,message: "请选择工艺路线",trigger: "blur",},]
|
||||
},
|
||||
material_in:'',
|
||||
material_out:'',
|
||||
|
@ -449,8 +434,14 @@ export default {
|
|||
},
|
||||
getEquipment() {
|
||||
let that = this;
|
||||
that.options = [];
|
||||
that.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup }).then((res) => {
|
||||
that.options = res;
|
||||
res.forEach((item) => {
|
||||
let obj = {};
|
||||
Object.assign(obj, item);
|
||||
obj.label = item.name+'-'+item.number;
|
||||
that.options.push(obj);
|
||||
});
|
||||
});
|
||||
},
|
||||
getMtask() {
|
||||
|
@ -484,7 +475,6 @@ export default {
|
|||
setData(data) {
|
||||
console.log("data", data);
|
||||
Object.assign(this.form, data);
|
||||
this.getRoute(data.id);
|
||||
},
|
||||
countChange() {
|
||||
this.form.count_notok =
|
||||
|
@ -525,7 +515,7 @@ export default {
|
|||
obj.work_end_time = that.form.work_end_time;
|
||||
obj.handle_user = that.form.handle_user;
|
||||
obj.note = that.form.note;
|
||||
that.$API.wpm.mlog.change.req(that.form.id, that.form).then((res) => {
|
||||
that.$API.wpm.mlog.update.req(that.form.id, that.form).then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
that.visible = false;
|
||||
|
|
|
@ -46,31 +46,40 @@
|
|||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<div style="padding-left: 50px">
|
||||
<el-descriptions :column="2">
|
||||
<template v-for="item in props.row.mlogb_full" :key="item.id">
|
||||
<el-descriptions-item :label="item.material_out!==null?'输出物料':'输入物料'">
|
||||
<span v-if="item.material_out!==null">{{item.batch}}</span>
|
||||
<span v-else>{{item.batch}}</span>
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<el-divider></el-divider>
|
||||
<el-descriptions :column="4">
|
||||
<el-descriptions-item label="划伤">{{
|
||||
props.row.count_n_hs
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="气泡">{{
|
||||
props.row.count_n_qp
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="水纹">{{
|
||||
props.row.count_n_swen
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="崩边">{{
|
||||
props.row.count_n_bb
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="小崩边">{{
|
||||
props.row.count_n_xbb
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="雾面">{{
|
||||
props.row.count_n_wm
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="麻点">{{
|
||||
props.row.count_n_md
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="线痕">{{
|
||||
props.row.count_n_xh
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="划伤" v-if="props.row.count_n_hs>0">
|
||||
{{props.row.count_n_hs}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="气泡" v-if="props.row.count_n_qp>0">
|
||||
{{props.row.count_n_qp}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="水纹" v-if="props.row.count_n_swen>0">
|
||||
{{props.row.count_n_swen}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="崩边" v-if="props.row.count_n_bb>0">
|
||||
{{props.row.count_n_bb}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="小崩边" v-if="props.row.count_n_xbb>0">
|
||||
{{props.row.count_n_xbb}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="雾面" v-if="props.row.count_n_wm>0">
|
||||
{{props.row.count_n_wm}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="麻点" v-if="props.row.count_n_md>0">
|
||||
{{props.row.count_n_md}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="线痕" v-if="props.row.count_n_xh>0">
|
||||
{{props.row.count_n_xh}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -92,6 +101,11 @@
|
|||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button link size="small" v-auth="'mlog.update'"
|
||||
v-if="scope.row.submit_time == null" type="primary"
|
||||
@click.stop="table_edit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button link size="small" v-auth="'mlog.submit'"
|
||||
v-if="scope.row.submit_time == null" type="primary"
|
||||
@click.stop="mlogSubmit(scope.row)"
|
||||
|
@ -218,12 +232,16 @@ export default {
|
|||
Object.assign(this.form, data);
|
||||
this.getRoute(data.id);
|
||||
},
|
||||
|
||||
|
||||
table_add() {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open();
|
||||
this.$refs.saveDialog.open('add');
|
||||
});
|
||||
},
|
||||
table_edit(row){
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open('edit').setData(row);
|
||||
});
|
||||
},
|
||||
//表单提交方法
|
||||
|
|
Loading…
Reference in New Issue