<template>
|
<div class="quotationEdit height overflow">
|
<div class="width overflow height92">
|
<div>
|
<div class="flex margintopbot justify-between">
|
<div class="width50 flex align-center">
|
<label class="width40 textalign">零件编号:</label>
|
<el-input size="mini" clearable v-model="iqnuer.itemName" class="width60"> </el-input>
|
</div>
|
<div class="width50 flex align-center">
|
<label class="width40 textalign">零件名称:</label>
|
<el-input size="mini" clearable v-model="iqnuer.itemDes" class="width60"> </el-input>
|
</div>
|
</div>
|
<div class="flex width justify-between">
|
<div class="width50 flex align-center">
|
<label class="width40 textalign">计划单号:</label>
|
<el-select class="width60" size="mini" clearable v-model="iqnuer.inOrderCode" placeholder="请选择">
|
<el-option
|
v-for="(item, index) in inOrderCodelist"
|
:key="'inOrderCode' + index"
|
:label="item.label"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
</div>
|
<div>
|
<el-button type="primary" size="mini" @click="$emit('partclick')">查询</el-button>
|
<el-button type="primary" size="mini" @click="$emit('addchoose')">新增</el-button>
|
</div>
|
</div>
|
</div>
|
<div class="width height82 overflow">
|
<table-container
|
height="91%"
|
:wipelist="wipelist"
|
:tableHead="tableHead"
|
:tableData="tableData"
|
:operation="false"
|
:selectionShow="true"
|
:totle="totle"
|
@handleSelectionChange="handleSelectionChange"
|
/>
|
</div>
|
</div>
|
<div class="quotationEdit-button text-right margin-right15 margin-top2">
|
<el-button type="primary" size="mini" class="form-buttom" @click="submitForm">确认选择</el-button>
|
<el-button type="primary" size="mini" class="form-buttom" @click="$emit('cancel')">取消</el-button>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { TableContainer, Modal } from '@/components/index';
|
import { itemSearch } from '@/api/enterchoose';
|
const { edterchoose } = require('@/components/tableContainer/tableHead');
|
export default {
|
data() {
|
return {
|
iqnuer: {},
|
inOrderCodelist: [
|
{
|
label: '无',
|
value: ''
|
}
|
],
|
wipelist: [],
|
tableData: [],
|
handlelist: [], //勾选数据
|
totle: 0,
|
page: 1
|
};
|
},
|
props: {},
|
components: { TableContainer },
|
computed: {
|
tableHead() {
|
return edterchoose;
|
}
|
},
|
mounted() {
|
this.itemSearch();
|
},
|
methods: {
|
//查询
|
itemSearch() {
|
this.$Loading(true);
|
itemSearch(this.page).then(res => {
|
if (res.code == 0) {
|
this.tableData = res.data;
|
this.totle = res.num;
|
}
|
this.$Loading();
|
});
|
},
|
//勾选
|
handleSelectionChange(e) {
|
console.log(e);
|
this.handlelist = e;
|
},
|
submitForm() {
|
if (this.handlelist.length == 1) {
|
this.$emit('chooseClick', this.handlelist, this.iqnuer.inOrderCode);
|
} else if (this.handlelist.length == 0) {
|
this.$message({
|
type: 'warning',
|
message: '请勾选一条数据'
|
});
|
} else if (this.handlelist.length > 1) {
|
this.$message({
|
type: 'warning',
|
message: '只能勾选一条数据'
|
});
|
}
|
}
|
},
|
watch: {}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.quotationEdit {
|
width: 98%;
|
padding: 1%;
|
.show-pwd {
|
position: absolute;
|
right: 10px;
|
top: 3px;
|
font-size: 16px;
|
color: #889aa4;
|
cursor: pointer;
|
user-select: none;
|
}
|
.centent-form {
|
height: 92%;
|
width: 100%;
|
margin: auto;
|
}
|
.quotationEdit-button {
|
}
|
::v-deep .el-form-item__content {
|
width: 60%;
|
}
|
::v-deep .el-select {
|
// width: 100%;
|
}
|
}
|
</style>
|