master
zhaoxiaolin 1 year ago
parent 5dae96df0a
commit 3c79580c4f

@ -29,7 +29,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.incomeTime" v-model="queryParams.incomeTime"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd "
placeholder="请选择来料时间"> placeholder="请选择来料时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -180,7 +180,7 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="物料名称" prop="materialName"> <el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物料名称" disabled> <el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button> <el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -214,7 +214,7 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="供应商名称" prop="supplierName"> <el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" disabled> <el-input v-model="form.supplierName" placeholder="请选择供应商名称">
<el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button> <el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -229,7 +229,7 @@
<el-date-picker clearable <el-date-picker clearable
v-model="form.incomeTime" v-model="form.incomeTime"
type="datetime" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择来料时间"> placeholder="请选择来料时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -238,7 +238,7 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检测人姓名" prop="checkManName"> <el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" disabled> <el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button> <el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
</el-input> </el-input>
</el-form-item> </el-form-item>

@ -69,15 +69,13 @@ export default {
// //
single: true, single: true,
// //
multiple: true, multiple: false,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// BOM // BOM
itemList: null, itemList: null,
//
itemTypeOptions: undefined,
// //
bomCode: undefined, bomCode: undefined,
defaultProps: { defaultProps: {
@ -122,13 +120,6 @@ export default {
); );
}, },
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
@ -144,11 +135,13 @@ export default {
// //
handleBomSelectionChange(selection) { handleBomSelectionChange(selection) {
this.ids = selection.map(item => item.component); if(selection.length>1){
this.idsName = selection.map(item => item.componentName); this.$modal.msgSuccess("只能选一个");
this.single = selection.length!==1; }
this.multiple = !selection.length;
console.log("多选框",this.ids); this.ids = selection[0].component;
this.idsName = selection[0].componentName;
}, },

@ -128,11 +128,15 @@ export default {
// //
handleBomSelectionChange(selection) { handleBomSelectionChange(selection) {
this.ids = selection.map(item => item.supplierCode);
this.idsName = selection.map(item => item.supplierName); if(selection.length>1){
this.single = selection.length!==1; this.$modal.msgSuccess("只能选一个");
this.multiple = !selection.length; }
console.log("多选框",this.ids);
//this.ids = selection.map(item => item.supplierCode);
//this.idsName = selection.map(item => item.supplierName);
this.ids = selection[0].supplierCode;
this.idsName = selection[0].supplierName;
}, },

@ -126,11 +126,13 @@ export default {
// //
handleBomSelectionChange(selection) { handleBomSelectionChange(selection) {
this.ids = selection.map(item => item.userCode);
this.idsName = selection.map(item => item.userName); if(selection.length>1){
this.single = selection.length!==1; this.$modal.msgSuccess("只能选一个");
this.multiple = !selection.length; }
console.log("多选框",this.ids);
this.ids = selection[0].userCode;
this.idsName = selection[0].userName;
}, },

Loading…
Cancel
Save