20241017更新
parent
7542075a54
commit
8c5bc2de32
@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
v-model="visible"
|
||||
:width="panelWidth"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel-search">
|
||||
<!-- 型材型号输入框 -->
|
||||
<el-input
|
||||
v-model="search.salesOrderCode"
|
||||
placeholder="销售单号"
|
||||
clearable
|
||||
>
|
||||
</el-input>
|
||||
|
||||
<!-- 物料名称输入框 -->
|
||||
<el-input
|
||||
v-model="search.materialName"
|
||||
placeholder="物料名称"
|
||||
clearable
|
||||
>
|
||||
</el-input>
|
||||
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="upsearch"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="add"
|
||||
>添加</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
:column="column"
|
||||
:params="params"
|
||||
row-key="id"
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" :reserve-selection="true"
|
||||
:selectable="selectable"
|
||||
></el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import module from "./module";
|
||||
import thirdselect from "@/components/scForm/items/thirdselect";
|
||||
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
components: { thirdselect },
|
||||
data() {
|
||||
return {
|
||||
panelWidth: module.tableSelect.panelWidth || "500",
|
||||
title: module.tableSelect.title,
|
||||
search: {
|
||||
materialCategory: "",
|
||||
materialName: "",
|
||||
productCode: "",
|
||||
profileModel: "",
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
loading: false,
|
||||
apiObj: this.$API.getApi(module.tableSelect.api),
|
||||
column: module.tableSelect.column,
|
||||
params: module.tableSelect.params,
|
||||
selection: [],
|
||||
listData: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open() {
|
||||
// console.log(this.apiObj)
|
||||
this.search = {
|
||||
materialCategory: "",
|
||||
materialName: "",
|
||||
productCode: "",
|
||||
profileModel: "",
|
||||
}
|
||||
this.$forceUpdate();
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
setData(listData) {
|
||||
console.log("listData", listData)
|
||||
console.log(typeof listData)
|
||||
this.listData = listData;
|
||||
},
|
||||
selectable(row, index) {
|
||||
console.log("this.listData", this.listData)
|
||||
return !this.listData.some(item => row.documentNumber == item.documentNumber)
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
add() {
|
||||
this.$emit("success", this.selection)
|
||||
this.visible = false;
|
||||
},
|
||||
//搜索
|
||||
upsearch() {
|
||||
this.$refs.table.upData(this.search);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
Loading…
Reference in New Issue