fix:工艺路线变更组件
This commit is contained in:
parent
e18a9544dc
commit
682f5a2052
|
|
@ -49,68 +49,42 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="输入物料" prop="material_in">
|
||||
<el-select
|
||||
<xtSelect
|
||||
:apiObj="apiObjM"
|
||||
v-model="form.material_in"
|
||||
placeholder="输入物料"
|
||||
clearable
|
||||
filterable
|
||||
:value-on-clear="null"
|
||||
style="width: 100%"
|
||||
@clear="clearHandle('material_in')"
|
||||
v-model:lable="form.material_in_name"
|
||||
:labelField="'full_name'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsMIn"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in materialsIn"
|
||||
:key="item.id"
|
||||
:label="item.full_name"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float: left">{{
|
||||
item.full_name
|
||||
}}</span>
|
||||
<span
|
||||
style="
|
||||
float: right;
|
||||
color: '#E6A23C';
|
||||
font-size: 13px;
|
||||
"
|
||||
v-if="item.is_hidden"
|
||||
>隐</span
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-table-column label="物料">
|
||||
<template #default="scope">
|
||||
{{ scope.row.full_name }}
|
||||
<span v-if="scope.row.is_hidden" style="float: right;color:'#E6A23C';font-size:13px;">隐</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="输出物料" prop="material_out">
|
||||
<el-select
|
||||
<xtSelect
|
||||
:apiObj="apiObjM"
|
||||
v-model="form.material_out"
|
||||
placeholder="输出物料"
|
||||
clearable
|
||||
filterable
|
||||
:value-on-clear="null"
|
||||
style="width: 100%"
|
||||
@clear="clearHandle('material_out')"
|
||||
v-model:lable="form.material_out_name"
|
||||
:labelField="'full_name'"
|
||||
style="width: 100%;"
|
||||
:params = "paramsMOut"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in materialsOut"
|
||||
:key="item.id"
|
||||
:label="item.full_name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-table-column label="物料">
|
||||
<template #default="scope">
|
||||
{{ scope.row.full_name }}
|
||||
<span v-if="scope.row.is_hidden" style="float: right;color:'#E6A23C';font-size:13px;">隐</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
<el-form-item label="统计工序">
|
||||
<el-switch v-model="form.is_count_utask" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="自动排产" prop="is_autotask">
|
||||
<el-switch v-model="form.is_autotask" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="切分数量">
|
||||
<el-input-number
|
||||
|
|
@ -312,7 +286,9 @@ const defaultForm = {
|
|||
sort: 1,
|
||||
out_rate: 100,
|
||||
material_in:'',
|
||||
material_in_name:'',
|
||||
material_out:'',
|
||||
material_out_name:'',
|
||||
hour_work:0,
|
||||
div_number:1,
|
||||
batch_bind: false,
|
||||
|
|
@ -369,15 +345,18 @@ export default {
|
|||
material:'',
|
||||
route:'',
|
||||
|
||||
}
|
||||
},
|
||||
apiObjM: this.$API.mtm.material.list,
|
||||
paramsMIn: { type__in: '10,20,30',ordering: '-create_time',query:'{full_name,id,is_hidden}'},
|
||||
paramsMOut: { type__in: '10,20',ordering: '-create_time',query:'{full_name,id,is_hidden}'},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMgroup();
|
||||
this.getProcess();
|
||||
this.getMaterialIn();
|
||||
this.getMaterialOut();
|
||||
if(this.project_code=='bxerp'&&this.mode=='edit'){
|
||||
this.getMaterialOptions();
|
||||
}
|
||||
this.project_code = this.$TOOL.data.get("BASE_INFO").base.base_code;
|
||||
this.form.routepack = this.routepack;
|
||||
if(this.project_code=='bxerp'||this.project_code=='tcerp'){
|
||||
|
|
@ -400,22 +379,6 @@ export default {
|
|||
that.materialOptions = res;
|
||||
});
|
||||
},
|
||||
getMaterialIn() {
|
||||
let that = this;
|
||||
that.$API.mtm.material.list
|
||||
.req({ page: 0, type__in: "10,20,30",ordering: "-create_time"})
|
||||
.then((res) => {
|
||||
that.materialsIn = res;
|
||||
});
|
||||
},
|
||||
getMaterialOut() {
|
||||
let that = this;
|
||||
that.$API.mtm.material.list
|
||||
.req({ page: 0, type__in: "10,20" })
|
||||
.then((res) => {
|
||||
that.materialsOut = res;
|
||||
});
|
||||
},
|
||||
getProcess() {
|
||||
let that = this;
|
||||
that.$API.mtm.process.list.req({ page: 0 }).then((res) => {
|
||||
|
|
@ -477,6 +440,8 @@ export default {
|
|||
setData(data) {
|
||||
let that = this;
|
||||
Object.assign(that.form, data);
|
||||
console.log('that.form',that.form);
|
||||
console.log('that.form.material_in_name',that.form.material_in_name);
|
||||
that.routeId = data.id;
|
||||
that.addTemplate.route = data.id;
|
||||
that.params_json=that.form.params_json;
|
||||
|
|
|
|||
Loading…
Reference in New Issue