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