|
@@ -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
|
|
|
}
|
|
|
})
|
|
|
},
|