feat(wpm): use recommended equipment selector
This commit is contained in:
parent
808985d1a9
commit
c5c1e25462
|
|
@ -177,6 +177,15 @@ export default {
|
|||
}
|
||||
},
|
||||
mlog: {
|
||||
equipmentOptions: {
|
||||
name: "日志设备选项",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/wpm/mlog/equipment_options/`,
|
||||
data
|
||||
);
|
||||
},
|
||||
},
|
||||
list: {
|
||||
name: "列表",
|
||||
req: async function (data) {
|
||||
|
|
|
|||
|
|
@ -127,20 +127,19 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="生产设备">
|
||||
<el-select
|
||||
<xtSelect
|
||||
v-model="form.equipments"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
:apiObj="$API.wpm.mlog.equipmentOptions"
|
||||
:params="{ mgroup }"
|
||||
labelField="full_name"
|
||||
multiple
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in equipmentOptions"
|
||||
:key="item.id"
|
||||
:label="item.full_name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-table-column label="来源" prop="option_group" width="110" />
|
||||
<el-table-column label="设备名称" prop="name" min-width="160" />
|
||||
<el-table-column label="设备编号" prop="number" min-width="140" />
|
||||
<el-table-column label="规格型号" prop="model" min-width="140" />
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :md="12" :sm="24">
|
||||
|
|
@ -593,7 +592,6 @@ export default {
|
|||
count_cando:0,
|
||||
mlogb: [],
|
||||
userList: [],
|
||||
equipmentOptions: [],
|
||||
wmaterialOptions: [],
|
||||
shiftOptions: [],
|
||||
routeOptions: [],
|
||||
|
|
@ -614,7 +612,6 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
this.getUserList();
|
||||
this.getEquipment();
|
||||
this.getShiftOptions();
|
||||
this.form.material_out = this.material_out;
|
||||
this.form.handle_date = this.handle_date;
|
||||
|
|
@ -700,14 +697,6 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
//获取设备列表
|
||||
getEquipment() {
|
||||
this.$API.em.equipment.list
|
||||
.req({ page: 0, type: 10 })
|
||||
.then((res) => {
|
||||
this.equipmentOptions = res;
|
||||
});
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
|
|
|
|||
|
|
@ -65,23 +65,19 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24" v-if="base_code=='tcerp'||route_code=='ladansi'||route_code=='yicifusi'||route_code=='ercifusi'||route_code=='zlybcl'||route_code=='djg'||route_code=='cnc'">
|
||||
<el-form-item label="生产设备" :prop="base_code!=='tcerp' ? 'equipment' : null">
|
||||
<el-select
|
||||
<xtSelect
|
||||
v-model="form.equipment"
|
||||
placeholder="生产设备"
|
||||
clearable
|
||||
filterable
|
||||
v-model:label="form.equipment_name"
|
||||
:apiObj="$API.wpm.mlog.equipmentOptions"
|
||||
:params="{ mgroup }"
|
||||
labelField="full_name"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float:left">{{item.name}}</span>
|
||||
<span style="float:right">{{item.number}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-table-column label="来源" prop="option_group" width="110" />
|
||||
<el-table-column label="设备名称" prop="name" min-width="160" />
|
||||
<el-table-column label="设备编号" prop="number" min-width="140" />
|
||||
<el-table-column label="规格型号" prop="model" min-width="140" />
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
||||
|
|
@ -312,7 +308,6 @@ export default {
|
|||
route_code:"",
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
testitems:[],
|
||||
routeOptions: [],
|
||||
mtaskOptions:[],
|
||||
|
|
@ -331,7 +326,6 @@ export default {
|
|||
})
|
||||
}
|
||||
this.getRoute();
|
||||
this.getEquipment();
|
||||
this.getMtask();
|
||||
this.gettestitem();
|
||||
if(this.route_code=='ladansi'||this.route_code=='yicifusi'||this.route_code=='ercifusi'||this.route_code=='zlybcl'){
|
||||
|
|
@ -355,17 +349,6 @@ export default {
|
|||
});
|
||||
},
|
||||
//获取班组设备
|
||||
getEquipment() {
|
||||
let that = this;
|
||||
this.$API.em.equipment.list.req({ page: 0, type: 10,belong_dept:that.dept}).then((res) => {
|
||||
res.forEach((item) => {
|
||||
let obj = {};
|
||||
Object.assign(obj, item);
|
||||
obj.label = item.name+'-'+item.number;
|
||||
that.options.push(obj);
|
||||
});
|
||||
});
|
||||
},
|
||||
//获取任务
|
||||
getMtask() {
|
||||
let that = this;
|
||||
|
|
|
|||
|
|
@ -89,23 +89,19 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24" v-if="base_code=='tcerp'||route_code=='ladansi'||route_code=='yicifusi'||route_code=='ercifusi'||route_code=='zlybcl'||route_code=='djg'||route_code=='cnc'">
|
||||
<el-form-item label="生产设备" :prop="base_code!=='tcerp' ? 'equipment' : null">
|
||||
<el-select
|
||||
<xtSelect
|
||||
v-model="form.equipment"
|
||||
placeholder="生产设备"
|
||||
clearable
|
||||
filterable
|
||||
v-model:label="form.equipment_name"
|
||||
:apiObj="$API.wpm.mlog.equipmentOptions"
|
||||
:params="{ mgroup }"
|
||||
labelField="full_name"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float:left">{{item.name}}</span>
|
||||
<span style="float:right">{{item.number}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-table-column label="来源" prop="option_group" width="110" />
|
||||
<el-table-column label="设备名称" prop="name" min-width="160" />
|
||||
<el-table-column label="设备编号" prop="number" min-width="140" />
|
||||
<el-table-column label="规格型号" prop="model" min-width="140" />
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="12" :xs="24" v-for="item in testitems" :key="item.id">
|
||||
|
|
@ -307,7 +303,6 @@ export default {
|
|||
materialTracking:10,
|
||||
fileList:[],
|
||||
testitems:[],
|
||||
options: [],
|
||||
mtaskOptions:[],
|
||||
bwItemForms: [],
|
||||
routeOptions: [],
|
||||
|
|
@ -327,7 +322,6 @@ export default {
|
|||
this.form.mgroup = this.mgroup;
|
||||
this.getMaterial();
|
||||
this.getRoute();
|
||||
this.getEquipment();
|
||||
this.gettestitem();
|
||||
this.getMtask();
|
||||
if(that.route_code=='tuomoceliang'){
|
||||
|
|
@ -365,17 +359,6 @@ export default {
|
|||
});
|
||||
},
|
||||
//获取班组设备
|
||||
getEquipment() {
|
||||
let that = this;
|
||||
this.$API.em.equipment.list.req({ page: 0, type: 10,belong_dept:that.dept}).then((res) => {
|
||||
res.forEach((item) => {
|
||||
let obj = {};
|
||||
Object.assign(obj, item);
|
||||
obj.label = item.name+'-'+item.number;
|
||||
that.options.push(obj);
|
||||
});
|
||||
});
|
||||
},
|
||||
getSupplier() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
|
|
|
|||
|
|
@ -79,23 +79,19 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="生产设备">
|
||||
<el-select
|
||||
<xtSelect
|
||||
v-model="form.equipment"
|
||||
placeholder="生产设备"
|
||||
clearable
|
||||
filterable
|
||||
v-model:label="form.equipment_name"
|
||||
:apiObj="$API.wpm.mlog.equipmentOptions"
|
||||
:params="{ mgroup }"
|
||||
labelField="full_name"
|
||||
class="width100"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float:left">{{item.name}}</span>
|
||||
<span style="float:right">{{item.number}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-table-column label="来源" prop="option_group" width="110" />
|
||||
<el-table-column label="设备名称" prop="name" min-width="160" />
|
||||
<el-table-column label="设备编号" prop="number" min-width="140" />
|
||||
<el-table-column label="规格型号" prop="model" min-width="140" />
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 操作员多选 -->
|
||||
|
|
@ -427,7 +423,6 @@ export default {
|
|||
userList:[],
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
testitems:[],
|
||||
mlogdefect:[],
|
||||
qct_defects:[],
|
||||
|
|
@ -506,7 +501,6 @@ export default {
|
|||
that.deptId = res.belong_dept;
|
||||
that.mgroupName = res.name;
|
||||
this.getTeam();
|
||||
that.getEquipment();
|
||||
that.getUserList();
|
||||
});
|
||||
},
|
||||
|
|
@ -564,18 +558,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
getEquipment() {
|
||||
let that = this;
|
||||
that.options = [];
|
||||
that.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup }).then((res) => {
|
||||
res.forEach((item) => {
|
||||
let obj = {};
|
||||
Object.assign(obj, item);
|
||||
obj.label = item.name+'-'+item.number;
|
||||
that.options.push(obj);
|
||||
});
|
||||
});
|
||||
},
|
||||
getRoute() {
|
||||
let that = this;
|
||||
if(!that.is_fix){//正常生产
|
||||
|
|
|
|||
|
|
@ -157,24 +157,20 @@
|
|||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="生产设备">
|
||||
<el-select
|
||||
<xtSelect
|
||||
v-model="form.equipment"
|
||||
placeholder="生产设备"
|
||||
clearable
|
||||
filterable
|
||||
:disabled="mode == 'edit'"
|
||||
v-model:label="form.equipment_name"
|
||||
:apiObj="$API.wpm.mlog.equipmentOptions"
|
||||
:params="{ mgroup }"
|
||||
:edit="mode != 'edit'"
|
||||
labelField="full_name"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float:left">{{item.name}}</span>
|
||||
<span style="float:right">{{item.number}}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-table-column label="来源" prop="option_group" width="110" />
|
||||
<el-table-column label="设备名称" prop="name" min-width="160" />
|
||||
<el-table-column label="设备编号" prop="number" min-width="140" />
|
||||
<el-table-column label="规格型号" prop="model" min-width="140" />
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 黑化 -->
|
||||
|
|
@ -375,7 +371,6 @@ export default {
|
|||
is_fix:false,
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
teamOptions:[],
|
||||
routeOptions: [],
|
||||
userOptions: [],
|
||||
|
|
@ -390,7 +385,6 @@ export default {
|
|||
this.getRoute();
|
||||
this.getTeam();
|
||||
this.getSupplier();
|
||||
this.getEquipment();
|
||||
this.gettestitem();
|
||||
let date = new Date();
|
||||
this.form.work_start_time = this.form.work_end_time = this.$TOOL.dateFormat(date);
|
||||
|
|
@ -447,17 +441,6 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
getEquipment() {
|
||||
let that = this;
|
||||
this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => {
|
||||
res.forEach((item) => {
|
||||
let obj = {};
|
||||
Object.assign(obj, item);
|
||||
obj.label = item.name+'-'+item.number;
|
||||
that.options.push(obj);
|
||||
});
|
||||
});
|
||||
},
|
||||
getSupplier() {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
|
|
|
|||
Loading…
Reference in New Issue