lilei 3 месяцев назад
Родитель
Сommit
09536ce2d5

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1744708300173
+  "version": 1744710532103
 }

+ 12 - 9
src/views/salesManagement/salesQueryNew/chooseProductModal.vue

@@ -63,7 +63,7 @@
             </a-col>
             <a-col flex="2" v-if="$hasPermissions('B_salerVinFindProduct')&&sourceType !== 'TRANSFER_ORDER'">
               <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-input>
               </a-form-model-item>
@@ -425,7 +425,7 @@ export default {
   },
   computed: {
     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 () {
       const _this = this
@@ -482,6 +482,10 @@ export default {
   methods: {
     // 查询
     searchForm () {
+      if (this.queryParam.vinCode.length != 17) {
+        this.$message.info('请输入正确的VIN码')
+        return
+      }
       if (this.hasVaild) {
         this.showTable = true
         if (this.$refs.table) {
@@ -562,14 +566,13 @@ export default {
     // vin  change
     vinCodeChange (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 = undefined
-          }
-        })
+        this.resetSearchForm()
+        this.queryParam.vinCode = e.target.value
+        setTimeout(() => {
+          this.searchForm()
+        }, 200)
       } else {
+        // this.$message.info('请输入正确的VIN码')
         this.queryParam.productCodeList = undefined
       }
     },

+ 2 - 0
src/views/salesManagement/salesQueryNew/productSalesRecordModal.vue

@@ -146,6 +146,8 @@ export default {
         this.$emit('close')
         // 重置数据
         this.curTab = '1'
+      } else {
+        this.setTableH()
       }
     }
   }