|
@@ -63,7 +63,7 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col flex="2" v-if="$hasPermissions('B_salerVinFindProduct')&&sourceType !== 'TRANSFER_ORDER'">
|
|
<a-col flex="2" v-if="$hasPermissions('B_salerVinFindProduct')&&sourceType !== 'TRANSFER_ORDER'">
|
|
<a-form-model-item label="车架号(VIN)" prop="vinCode" class="vininputs">
|
|
<a-form-model-item label="车架号(VIN)" prop="vinCode" class="vininputs">
|
|
- <a-input id="productInfoList-vinCode" v-model.trim="queryParam.vinCode" allowClear placeholder="请输入车架号(VIN)">
|
|
|
|
|
|
+ <a-input id="productInfoList-vinCode" v-model.trim="queryParam.vinCode" @change="vinCodeChange" allowClear placeholder="请输入车架号(VIN)">
|
|
<a-icon slot="addonAfter" @click="openUploadVin" :type="vinLoading?'loading':'camera'" :style="{ fontSize: '18px', verticalAlign: 'bottom',cursor:'pointer',padding:'0 10px' }" title="点击拖动图片识别VIN" />
|
|
<a-icon slot="addonAfter" @click="openUploadVin" :type="vinLoading?'loading':'camera'" :style="{ fontSize: '18px', verticalAlign: 'bottom',cursor:'pointer',padding:'0 10px' }" title="点击拖动图片识别VIN" />
|
|
</a-input>
|
|
</a-input>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -425,7 +425,7 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
hasVaild () {
|
|
hasVaild () {
|
|
- return this.queryParam.productCode || this.queryParam.productName || this.queryParam.brandSn || this.queryParam.productTypeSn1 || this.queryParam.warehouseSn || this.queryParam.existStockFlag || this.queryParam.vinCode
|
|
|
|
|
|
+ return !!(this.queryParam.productCode || this.queryParam.productName || this.queryParam.brandSn || this.queryParam.productTypeSn1 || this.queryParam.warehouseSn || this.queryParam.existStockFlag || this.queryParam.vinCode)
|
|
},
|
|
},
|
|
columns () {
|
|
columns () {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -482,6 +482,10 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 查询
|
|
// 查询
|
|
searchForm () {
|
|
searchForm () {
|
|
|
|
+ if (this.queryParam.vinCode.length != 17) {
|
|
|
|
+ this.$message.info('请输入正确的VIN码')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (this.hasVaild) {
|
|
if (this.hasVaild) {
|
|
this.showTable = true
|
|
this.showTable = true
|
|
if (this.$refs.table) {
|
|
if (this.$refs.table) {
|
|
@@ -562,14 +566,13 @@ export default {
|
|
// vin change
|
|
// vin change
|
|
vinCodeChange (e) {
|
|
vinCodeChange (e) {
|
|
if (e.target.value.length == 17) {
|
|
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 = undefined
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.resetSearchForm()
|
|
|
|
+ this.queryParam.vinCode = e.target.value
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.searchForm()
|
|
|
|
+ }, 200)
|
|
} else {
|
|
} else {
|
|
|
|
+ // this.$message.info('请输入正确的VIN码')
|
|
this.queryParam.productCodeList = undefined
|
|
this.queryParam.productCodeList = undefined
|
|
}
|
|
}
|
|
},
|
|
},
|