Browse Source

bug 修复

lilei 3 năm trước cách đây
mục cha
commit
826fc01880

+ 2 - 2
src/views/productManagement/newProduct/detailModal.vue

@@ -61,7 +61,7 @@
 </template>
 
 <script>
-import { dealerProductDetail } from '@/api/dealerProduct'
+import { productDetail } from '@/api/product.js'
 export default {
   name: 'ProductInfoDetailModal',
   props: {
@@ -91,7 +91,7 @@ export default {
   methods: {
     //  获取详情
     getDetail () {
-      dealerProductDetail({ id: this.itemId }).then(res => {
+      productDetail({ sn: this.itemId }).then(res => {
         if (res.status == 200) {
           this.detailsData = res.data
         } else {

+ 2 - 2
src/views/productManagement/newProduct/list.vue

@@ -170,7 +170,7 @@ export default {
         })
       },
       openModal: false, //  查看客户详情  弹框
-      itemId: '', //  当前产品id
+      itemId: '', //  当前产品productSn
       productBrandList: [], //  品牌下拉数据
       productTypeList: [] //  分类下拉数据
     }
@@ -202,7 +202,7 @@ export default {
     },
     //  详情
     handleDetail (row) {
-      this.itemId = row.id
+      this.itemId = row.productSn
       this.openModal = true
     },
     //  关闭弹框

+ 7 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -13,7 +13,7 @@
           <a-col :md="7" :sm="24">
             <a-form-model-item label="车架号(VIN)" prop="vinCode">
               <a-input id="productInfoList-vinCode" v-model.trim="queryParam.vinCode" allowClear placeholder="请输入车架号(VIN)">
-                <a-icon @click="uploadFun" type="camera" slot="addonAfter" :style="{ fontSize: '18px', verticalAlign: 'bottom' }" />
+                <a-icon @click="uploadFun" :type="vinLoading?'loading':'camera'" slot="addonAfter" :style="{ fontSize: '18px', verticalAlign: 'bottom' }" />
               </a-input>
               <input type="file" id="filed" hidden="" @change="filePreview">
             </a-form-model-item>
@@ -196,6 +196,7 @@ export default {
     return {
       advanced: false, // 高级搜索 展开/关闭
       showSetting: false, // 设置弹框
+      vinLoading: false,
       tableWidth: 0,
       settingColVal: ['productOrigCode', 'brandName', 'warehouseName', 'warehouseLocationName', 'currentQty', 'unit'],
       settingColList: [
@@ -396,6 +397,7 @@ export default {
       const formData = new FormData()
       formData.append('savePathType', 'local')
       formData.append('file', files)
+      this.vinLoading = true
       vinCodeParse(formData).then(res => {
         if (res.type == 'application/json') {
           var reader = new FileReader()
@@ -411,8 +413,12 @@ export default {
                 description: obj.message
               })
             }
+            _this.vinLoading = false
+            document.getElementById('filed').value = ''
           })
           reader.readAsText(res)
+        } else {
+          _this.vinLoading = false
         }
       })
     },