给商品选择框里面增加助记码等查询条件
This commit is contained in:
@@ -17,15 +17,13 @@
|
|||||||
<a-form layout="inline" @keyup.enter.native="onSearch">
|
<a-form layout="inline" @keyup.enter.native="onSearch">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item label="商品" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
<a-form-item label="条码名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
<a-input ref="material" placeholder="条码、名称、规格、型号、颜色" v-model="queryParam.q"></a-input>
|
<a-input ref="material" placeholder="条码、名称、助记码" v-model="queryParam.q"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="类别">
|
<a-form-item label="规格型号" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
<a-tree-select style="width:100%" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" allow-clear
|
<a-input ref="material" placeholder="请输入规格、型号" v-model="queryParam.standardOrModel"></a-input>
|
||||||
:treeData="categoryTree" v-model="queryParam.categoryId" placeholder="请选择类别">
|
|
||||||
</a-tree-select>
|
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :md="6" :sm="8">
|
<a-col :md="6" :sm="8">
|
||||||
@@ -39,7 +37,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="8">
|
||||||
<a-button type="primary" @click="loadMaterialData(1)">查询</a-button>
|
<a-button type="primary" @click="loadMaterialData(1)">查询</a-button>
|
||||||
<a-button style="margin-left: 8px" @click="searchReset(1)">重置</a-button>
|
<a-button style="margin-left: 8px" @click="searchReset(1)">重置</a-button>
|
||||||
<a-tooltip title="没查询到,决定新增商品!">
|
<a-tooltip title="没查询到,决定新增商品!">
|
||||||
@@ -52,6 +50,28 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
</span>
|
</span>
|
||||||
<template v-if="toggleSearchStatus">
|
<template v-if="toggleSearchStatus">
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<a-form-item label="颜色" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
|
<a-input ref="material" placeholder="请输入颜色" v-model="queryParam.color"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<a-form-item label="品牌" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
|
<a-input ref="material" placeholder="请输入品牌" v-model="queryParam.brand"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="类别">
|
||||||
|
<a-tree-select style="width:100%" :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" allow-clear
|
||||||
|
:treeData="categoryTree" v-model="queryParam.categoryId" placeholder="请选择类别">
|
||||||
|
</a-tree-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="6" :sm="8">
|
||||||
|
<a-form-item label="制造商" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
|
||||||
|
<a-input ref="material" placeholder="请输入制造商" v-model="queryParam.mfrs"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
<a-col :md="6" :sm="24">
|
<a-col :md="6" :sm="24">
|
||||||
<a-form-item label="序列号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="序列号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-select placeholder="有无序列号" v-model="queryParam.enableSerialNumber">
|
<a-select placeholder="有无序列号" v-model="queryParam.enableSerialNumber">
|
||||||
@@ -127,10 +147,14 @@
|
|||||||
modalWidth: 1450,
|
modalWidth: 1450,
|
||||||
queryParam: {
|
queryParam: {
|
||||||
q: '',
|
q: '',
|
||||||
categoryId: '',
|
standardOrModel: '',
|
||||||
depotId: '',
|
depotId: undefined,
|
||||||
enableSerialNumber: '',
|
color: '',
|
||||||
enableBatchNumber: ''
|
brand: '',
|
||||||
|
categoryId: undefined,
|
||||||
|
mfrs: '',
|
||||||
|
enableSerialNumber: undefined,
|
||||||
|
enableBatchNumber: undefined
|
||||||
},
|
},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -148,6 +172,8 @@
|
|||||||
{dataIndex: 'standard', title: '规格'},
|
{dataIndex: 'standard', title: '规格'},
|
||||||
{dataIndex: 'model', title: '型号'},
|
{dataIndex: 'model', title: '型号'},
|
||||||
{dataIndex: 'color', title: '颜色'},
|
{dataIndex: 'color', title: '颜色'},
|
||||||
|
{dataIndex: 'brand', title: '品牌'},
|
||||||
|
{dataIndex: 'mfrs', title: '制造商'},
|
||||||
{dataIndex: 'unit', title: '单位'},
|
{dataIndex: 'unit', title: '单位'},
|
||||||
{dataIndex: 'sku', title: '多属性'},
|
{dataIndex: 'sku', title: '多属性'},
|
||||||
{dataIndex: 'stock', title: '库存'},
|
{dataIndex: 'stock', title: '库存'},
|
||||||
@@ -223,9 +249,7 @@
|
|||||||
if(res.total ===1) {
|
if(res.total ===1) {
|
||||||
if(this.queryParam.q === this.dataSource[0].mBarCode||
|
if(this.queryParam.q === this.dataSource[0].mBarCode||
|
||||||
this.queryParam.q === this.dataSource[0].name||
|
this.queryParam.q === this.dataSource[0].name||
|
||||||
this.queryParam.q === this.dataSource[0].standard||
|
this.queryParam.q === this.dataSource[0].mnemonic) {
|
||||||
this.queryParam.q === this.dataSource[0].model||
|
|
||||||
this.queryParam.q === this.dataSource[0].color) {
|
|
||||||
this.title = '选择商品【再次回车可以直接选中】'
|
this.title = '选择商品【再次回车可以直接选中】'
|
||||||
this.$nextTick(() => this.$refs.material.focus());
|
this.$nextTick(() => this.$refs.material.focus());
|
||||||
} else {
|
} else {
|
||||||
@@ -235,8 +259,8 @@
|
|||||||
this.title = '选择商品'
|
this.title = '选择商品'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
this.onClearSelected()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadTreeData(){
|
loadTreeData(){
|
||||||
@@ -256,7 +280,7 @@
|
|||||||
// 触发屏幕自适应
|
// 触发屏幕自适应
|
||||||
resetScreenSize() {
|
resetScreenSize() {
|
||||||
let realScreenWidth = window.screen.width
|
let realScreenWidth = window.screen.width
|
||||||
this.modalWidth = realScreenWidth<1600?'1200px':'1450px'
|
this.modalWidth = realScreenWidth<1600?'1300px':'1550px'
|
||||||
let screenWidth = document.body.clientWidth;
|
let screenWidth = document.body.clientWidth;
|
||||||
if (screenWidth < 500) {
|
if (screenWidth < 500) {
|
||||||
this.scrollTrigger = {x: 800};
|
this.scrollTrigger = {x: 800};
|
||||||
@@ -368,9 +392,7 @@
|
|||||||
if(this.dataSource && this.dataSource.length===1) {
|
if(this.dataSource && this.dataSource.length===1) {
|
||||||
if(this.queryParam.q === this.dataSource[0].mBarCode||
|
if(this.queryParam.q === this.dataSource[0].mBarCode||
|
||||||
this.queryParam.q === this.dataSource[0].name||
|
this.queryParam.q === this.dataSource[0].name||
|
||||||
this.queryParam.q === this.dataSource[0].standard||
|
this.queryParam.q === this.dataSource[0].mnemonic) {
|
||||||
this.queryParam.q === this.dataSource[0].model||
|
|
||||||
this.queryParam.q === this.dataSource[0].color) {
|
|
||||||
let arr = []
|
let arr = []
|
||||||
arr.push(this.dataSource[0].id)
|
arr.push(this.dataSource[0].id)
|
||||||
this.selectedRowKeys = arr
|
this.selectedRowKeys = arr
|
||||||
|
|||||||
@@ -240,7 +240,7 @@
|
|||||||
},
|
},
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {
|
queryParam: {
|
||||||
categoryId:'',
|
categoryId: undefined,
|
||||||
materialParam:'',
|
materialParam:'',
|
||||||
standard:'',
|
standard:'',
|
||||||
model:'',
|
model:'',
|
||||||
@@ -250,9 +250,9 @@
|
|||||||
materialOther:'',
|
materialOther:'',
|
||||||
weight:'',
|
weight:'',
|
||||||
expiryNum:'',
|
expiryNum:'',
|
||||||
enabled: '',
|
enabled: undefined,
|
||||||
enableSerialNumber:'',
|
enableSerialNumber: undefined,
|
||||||
enableBatchNumber:'',
|
enableBatchNumber: undefined,
|
||||||
position: '',
|
position: '',
|
||||||
remark:'',
|
remark:'',
|
||||||
mpList: getMpListShort(Vue.ls.get('materialPropertyList')) //扩展属性
|
mpList: getMpListShort(Vue.ls.get('materialPropertyList')) //扩展属性
|
||||||
|
|||||||
Reference in New Issue
Block a user