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