|
@@ -4,12 +4,18 @@
|
|
|
<div class="filter-container">
|
|
|
<span>
|
|
|
<span>零件编号:</span>
|
|
|
- <el-input
|
|
|
- v-model="queryParams.model.partsNo"
|
|
|
- :placeholder="$t('common.pleaseEnter')"
|
|
|
- style="width: 150px"
|
|
|
- size="medium"
|
|
|
- />
|
|
|
+ <el-select v-model="queryParams.model.partsNo" :placeholder='$t("common.pleaseSelect")' >
|
|
|
+ <el-option
|
|
|
+ v-for="item in bomList"
|
|
|
+ :key="item.parts_no"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.parts_no"
|
|
|
+ :disabled="item.disabled"
|
|
|
+ style="width: 500px;">
|
|
|
+ <span style="float:left; width: 60%;font-size: 16px">{{ item.name }}</span>
|
|
|
+ <span style="float:left; width: 40%;font-size: 16px">{{ item.parts_no }}</span>
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</span>
|
|
|
<span>
|
|
|
<span>刀具号:</span>
|
|
@@ -31,8 +37,8 @@
|
|
|
</span>
|
|
|
<span>
|
|
|
<span>当前位置:</span>
|
|
|
- <el-select v-model="queryParams.model.thisCutterLocation" placeholder="当前位置" >
|
|
|
- <el-option clearable v-for="device in cutToolDeviceList" :label="device.name" :value="device.code" :key="device.code" ></el-option>
|
|
|
+ <el-select clearable v-model="queryParams.model.thisCutterLocation" placeholder="当前位置" >
|
|
|
+ <el-option v-for="device in cutToolDeviceList" :label="device.name" :value="device.code" :key="device.code" ></el-option>
|
|
|
</el-select>
|
|
|
<!-- <el-input
|
|
|
v-model="queryParams.model.thisCutterLocation"
|
|
@@ -94,6 +100,7 @@
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 列表数据 -->
|
|
|
+ <!-- <div>出现重复性问题,可能刀具号重复</div> -->
|
|
|
<el-table
|
|
|
:key="tableKey"
|
|
|
ref="table"
|
|
@@ -374,7 +381,8 @@
|
|
|
TenantTypeEnum: {},
|
|
|
TenantStatusEnum: {}
|
|
|
},
|
|
|
- cutToolDeviceList: []
|
|
|
+ cutToolDeviceList: [],
|
|
|
+ bomList:[]
|
|
|
}
|
|
|
},
|
|
|
// 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
|
|
@@ -399,8 +407,23 @@
|
|
|
},
|
|
|
mounted () {
|
|
|
this.findeDeviceCode()
|
|
|
+ this.initBom()
|
|
|
},
|
|
|
methods: {
|
|
|
+ initBom(){
|
|
|
+ classScheduleMgrApi.getAllbomList({})
|
|
|
+ .then((response) => {
|
|
|
+ const res = response.data
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.bomList = res.data.data
|
|
|
+ // 添加表头
|
|
|
+ const newItem = { name: '零件名', parts_no: '图号' , disabled: true}
|
|
|
+ this.bomList.unshift(newItem);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ return true
|
|
|
+ })
|
|
|
+ },
|
|
|
spanMethod({rowIndex,columnIndex}) {
|
|
|
// 第二列相同的行合并
|
|
|
if (columnIndex === 1 || columnIndex === 0 ) {
|
|
@@ -663,7 +686,7 @@
|
|
|
// 清理已经删除的数据
|
|
|
this.$refs.table.clearSelection()
|
|
|
}
|
|
|
- })
|
|
|
+ }).finally(() => this.loading = false)
|
|
|
},
|
|
|
view (row) {
|
|
|
this.$refs.view.setTenant(row)
|