2023-10-20 16:03:40 +08:00
|
|
|
<!--
|
|
|
|
filename: ProcessBomList.vue
|
|
|
|
author: liubin
|
|
|
|
date: 2023-10-20 15:00:58
|
|
|
|
description:
|
|
|
|
-->
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<section class="process-bom">
|
|
|
|
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" />
|
2023-10-20 16:42:28 +08:00
|
|
|
|
2023-10-25 17:02:43 +08:00
|
|
|
<div class="btns" style="
|
2023-10-20 16:42:28 +08:00
|
|
|
text-align: right;
|
|
|
|
position: absolute;
|
|
|
|
top: 20px;
|
|
|
|
right: 20px;
|
|
|
|
display: flex;
|
|
|
|
">
|
2023-10-25 17:02:43 +08:00
|
|
|
<el-button type="primary" plain :disabled="currentDet == null" class="btn-create" icon="el-icon-plus">
|
2023-10-20 16:42:28 +08:00
|
|
|
分配设备
|
|
|
|
</el-button>
|
2023-10-25 17:02:43 +08:00
|
|
|
<el-input icon="el-icon-search" placeholder="搜索" v-model="searchText" style="margin-left: 20px">
|
2023-10-20 16:42:28 +08:00
|
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
|
</el-input>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 列表 -->
|
2023-10-25 17:02:43 +08:00
|
|
|
<base-table :table-props="tableProps" :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-data="list"
|
2023-10-20 16:42:28 +08:00
|
|
|
@emitFun="handleEmitFun">
|
2023-10-25 17:02:43 +08:00
|
|
|
<method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" :method-list="tableBtn"
|
2023-10-20 16:42:28 +08:00
|
|
|
@clickBtn="handleTableBtnClick" />
|
|
|
|
</base-table>
|
|
|
|
|
|
|
|
<!-- 分页组件 -->
|
2023-10-25 17:02:43 +08:00
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
2023-10-20 16:42:28 +08:00
|
|
|
@pagination="getList" />
|
2023-10-20 16:03:40 +08:00
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'ProcessBom',
|
|
|
|
components: {},
|
2023-10-25 17:02:43 +08:00
|
|
|
props: {
|
|
|
|
currentDet: {
|
|
|
|
type: Object,
|
|
|
|
default: null
|
|
|
|
}
|
|
|
|
},
|
2023-10-20 16:03:40 +08:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
searchBarFormConfig: [{ label: '工序下设备' }],
|
2023-10-20 16:42:28 +08:00
|
|
|
tableProps: [
|
|
|
|
// {
|
|
|
|
// prop: 'createTime',
|
|
|
|
// label: '添加时间',
|
|
|
|
// fixed: true,
|
|
|
|
// width: 180,
|
|
|
|
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
|
|
|
// },
|
|
|
|
{ prop: 'name', label: '设备名称' },
|
|
|
|
{ prop: 'code', label: '物料BOM' },
|
|
|
|
{ prop: 'remark', label: '参数BOM' },
|
|
|
|
],
|
|
|
|
list: [],
|
|
|
|
total: 0,
|
|
|
|
tableBtn: [],
|
|
|
|
queryParams: {
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
},
|
2023-10-25 17:02:43 +08:00
|
|
|
searchText: ''
|
2023-10-20 16:03:40 +08:00
|
|
|
};
|
|
|
|
},
|
2023-10-25 17:02:43 +08:00
|
|
|
watch: {
|
|
|
|
currentDet: {
|
|
|
|
handler(val) {
|
|
|
|
if (val != null) {
|
|
|
|
this.getList(val);
|
|
|
|
} else {
|
|
|
|
this.clearList();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
immediate: true,
|
|
|
|
deep: true
|
|
|
|
}
|
|
|
|
},
|
2023-10-20 16:42:28 +08:00
|
|
|
methods: {
|
2023-10-25 17:02:43 +08:00
|
|
|
handleEmitFun() { },
|
|
|
|
handleTableBtnClick() { },
|
|
|
|
put(payload) {
|
|
|
|
return this.http(this.updateUrl, 'put', payload);
|
|
|
|
},
|
|
|
|
post(payload) {
|
|
|
|
return this.http(this.addUrl, 'post', payload);
|
|
|
|
},
|
|
|
|
recv(payload) {
|
|
|
|
return this.http(this.pageUrl, 'get', payload);
|
|
|
|
},
|
|
|
|
info(payload) {
|
|
|
|
return this.http(this.infoUrl, 'get', payload);
|
|
|
|
},
|
|
|
|
http(url, method, payload) {
|
|
|
|
return this.$axios({
|
|
|
|
url,
|
|
|
|
method,
|
|
|
|
params: method === 'get' ? payload : null,
|
|
|
|
data: method !== 'get' ? payload : null,
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
getList({ detId, detName, detDesc, flowId, sectionName } = {}) {
|
|
|
|
console.log('get list')
|
|
|
|
|
|
|
|
},
|
|
|
|
getList() {
|
|
|
|
this.list = [
|
|
|
|
{ name: '1', code: 'bomg-1', remark: 'Tochter' },
|
|
|
|
{ name: '2', code: 'bomg-2', remark: 'Bruder' },
|
|
|
|
{ name: '3', code: 'bomg-3', remark: 'Kalt' },
|
|
|
|
]
|
|
|
|
},
|
|
|
|
clearList() {
|
|
|
|
this.list = [];
|
|
|
|
}
|
2023-10-20 16:42:28 +08:00
|
|
|
},
|
2023-10-20 16:03:40 +08:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.process-bom {
|
2023-10-20 16:42:28 +08:00
|
|
|
position: relative;
|
2023-10-25 17:02:43 +08:00
|
|
|
flex: 1;
|
2023-10-20 16:03:40 +08:00
|
|
|
padding: 12px 20px;
|
|
|
|
background: #fff;
|
|
|
|
border-radius: 8px;
|
|
|
|
}
|
|
|
|
</style>
|