105 lines
2.8 KiB
Plaintext
105 lines
2.8 KiB
Plaintext
<template>
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="80px">
|
|
|
|
<el-form-item label="BOM名称" prop="materialId">
|
|
<el-input
|
|
v-model="queryParams.name"
|
|
placeholder="输入BOM名称"
|
|
clearable
|
|
size="small"
|
|
style="width: 200px"
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<el-table v-loading="loading" border :data="BomList" @row-dblclick="handleDbClick" ref="list" height="400px">
|
|
<el-table-column label="BOM名称" align="center" prop="name" width="200" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="BOM版本" align="center" prop="revision" width="200" :show-overflow-tooltip="true"/>
|
|
<el-table-column label="当前版本" align="center" prop="currentRevision" width="200" :show-overflow-tooltip="true"/>
|
|
</el-table>
|
|
<pagination
|
|
v-show="total>0"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNo"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
/>
|
|
<!-- <order-prod-form :propThis="propsThis" ref="orderForm"></order-prod-form>-->
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
|
|
export default {
|
|
name: 'orderProd',
|
|
props: {
|
|
layerid: {
|
|
type: String,
|
|
default: ""
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
loading:false,
|
|
total:0,
|
|
BomList:[],
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNo: 1,
|
|
pageSize: 50,
|
|
code: undefined,
|
|
name: undefined
|
|
}
|
|
}
|
|
},
|
|
watch: {},
|
|
mounted() {
|
|
this.initData()
|
|
},
|
|
methods: {
|
|
//初始化表格
|
|
initData() {
|
|
this.getList()
|
|
},
|
|
handleDbClick(row, event, column) {
|
|
this.$parent.getSelectBom(row);
|
|
this.$layer.close(this.layerid);
|
|
},
|
|
/** 查询订单列表 */
|
|
getList() {
|
|
this.loading = true
|
|
this.$plan.getBomList(this.queryParams).then(_data => {
|
|
let resp=_data.config?_data.data:_data
|
|
console.log(resp,'order-prod-select-bom getList')
|
|
this.loading = false;
|
|
this.total = resp.data.recordsTotal
|
|
this.BomList = resp.data.data
|
|
})
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNo = 1
|
|
this.getList()
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.dateRange = []
|
|
this.resetForm('queryForm')
|
|
this.handleQuery()
|
|
},
|
|
|
|
|
|
}
|
|
}
|
|
</script>
|