|
@@ -2,31 +2,31 @@
|
|
|
<div class="productInfoList-wrap">
|
|
|
<!-- 搜索条件 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-form-model ref="ruleForm" :model="queryParam" :rules="rules" layout="inline" @keyup.enter.native="$refs.table.refresh(true)" >
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品编码">
|
|
|
+ <a-form-model-item label="产品编码">
|
|
|
<a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品名称">
|
|
|
+ <a-form-model-item label="产品名称">
|
|
|
<a-input id="productInfoList-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="原厂编码">
|
|
|
+ <a-form-model-item label="原厂编码">
|
|
|
<a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<template v-if="advanced">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="车架号(VIN)">
|
|
|
- <a-input id="productInfoList-vinNo" v-model.trim="queryParam.vinNo" allowClear placeholder="请输入车架号(VIN)"/>
|
|
|
- </a-form-item>
|
|
|
+ <a-form-model-item label="车架号(VIN)" prop="vinNo">
|
|
|
+ <a-input id="productInfoList-vinNo" v-model.trim="queryParam.vinNo" @change="vinNoChange" allowClear placeholder="请输入车架号(VIN)"/>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品品牌">
|
|
|
+ <a-form-model-item label="产品品牌">
|
|
|
<a-select
|
|
|
placeholder="请选择产品品牌"
|
|
|
id="productInfoList-productBrandSn"
|
|
@@ -37,10 +37,10 @@
|
|
|
:filter-option="filterOption">
|
|
|
<a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品类别">
|
|
|
+ <a-form-model-item label="产品分类">
|
|
|
<a-cascader
|
|
|
@change="changeProductType"
|
|
|
change-on-select
|
|
@@ -51,15 +51,15 @@
|
|
|
id="productInfoList-productType"
|
|
|
placeholder="请选择产品分类"
|
|
|
allowClear />
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <!-- <a-col :md="6" :sm="24">
|
|
|
<a-form-item label="车型">
|
|
|
<v-select code="CHECK_ENABLE_STATE" id="productInfoList-state" v-model="queryParam.state" allowClear placeholder="请选择车型"></v-select>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col> -->
|
|
|
<a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="仓库">
|
|
|
+ <a-form-model-item label="仓库">
|
|
|
<a-select
|
|
|
placeholder="请选择仓库"
|
|
|
id="productInfoList-warehouseSn"
|
|
@@ -70,7 +70,7 @@
|
|
|
:filter-option="filterOption">
|
|
|
<a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
- </a-form-item>
|
|
|
+ </a-form-model-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
<a-col :md="6" :sm="24">
|
|
@@ -90,7 +90,7 @@
|
|
|
</a-popover>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
- </a-form>
|
|
|
+ </a-form-model>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
|
<s-table
|
|
@@ -177,6 +177,7 @@ import { querySumByProductLocation } from '@/api/stock'
|
|
|
import { warehouseAllList } from '@/api/warehouse'
|
|
|
import productSalesRecordModal from './productSalesRecordModal.vue'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import { supperCodeByVin } from '@/api/sales'
|
|
|
export default {
|
|
|
name: 'QueryPart',
|
|
|
components: { STable, VSelect, productSalesRecordModal },
|
|
@@ -213,16 +214,20 @@ export default {
|
|
|
productCode: '', // 产品编码
|
|
|
productName: '', // 产品名称
|
|
|
productOrigCode: '', // 原厂编码
|
|
|
+ vinNo: '',
|
|
|
+ productCodeList: '', // 车架号
|
|
|
brandSn: undefined, // 产品品牌
|
|
|
productTypeSn1: '', // 产品一级分类
|
|
|
productTypeSn2: '', // 产品二级分类
|
|
|
productTypeSn3: '', // 产品三级分类
|
|
|
warehouseSn: undefined // 仓库
|
|
|
},
|
|
|
+ rules: {
|
|
|
+ vinNo: [ { len: 17, message: '请输入正确的车架号(VIN)', trigger: 'change' } ]
|
|
|
+ },
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
- exportLoading: false, // 导出loading
|
|
|
productBrandList: [], // 下拉数据
|
|
|
- productTypeList: [], // 产品类别 下拉数据
|
|
|
+ productTypeList: [], // 产品分类 下拉数据
|
|
|
warehouseList: [], // 仓库列表
|
|
|
columnsBak: [
|
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
@@ -291,6 +296,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // vin change
|
|
|
+ vinNoChange (e) {
|
|
|
+ if (e.target.value.length == 17) {
|
|
|
+ supperCodeByVin({ vin: e.target.value }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.queryParam.productCodeList = res.data
|
|
|
+ } else {
|
|
|
+ this.queryParam.productCodeList = ''
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.queryParam.productCodeList = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
// 设置列
|
|
|
onSettingChange (v) {
|
|
|
const k = ['productOrigCode', 'brandName', 'warehouseName', 'warehouseLocationName', 'currentQty', 'unit', 'putCost', 'dealerProduct.cityPrice']
|
|
@@ -334,8 +353,11 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = ''
|
|
|
this.queryParam.productTypeSn3 = ''
|
|
|
this.queryParam.warehouseSn = undefined
|
|
|
+ this.queryParam.productCodeList = ''
|
|
|
+ this.queryParam.vinNo = ''
|
|
|
this.productType = []
|
|
|
this.$refs.table.refresh(true)
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
},
|
|
|
// 刷新当前页面
|
|
|
resetCurForm () {
|