chenrui 3 yıl önce
ebeveyn
işleme
a69dfcae22

+ 2 - 1
src/components/UploadFile/index.vue

@@ -16,7 +16,8 @@
         <div class="ant-upload-text"> {{ upText }}</div>
       </div>
       <div v-if="fileList.length < maxNums && listType!='picture-card'">
-        <a-button> <a-icon type="upload" /> {{ upText }} </a-button>
+        <a-icon type="camera" :style="{ fontSize: '18px', verticalAlign: 'bottom' }" />
+        <!-- <a-button> <a-icon type="upload" /> {{ upText }} </a-button> -->
       </div>
     </a-upload>
     <a-modal :visible="previewVisible" :footer="null" @cancel="handleCancel">

+ 32 - 27
src/views/salesManagement/salesQuery/queryPart.vue

@@ -10,25 +10,41 @@
         :model="queryParam"
         @keyup.enter.native="$refs.table.refresh(true)" >
         <a-row :gutter="15">
+          <a-col :md="7" :sm="24">
+            <a-form-model-item label="车架号(VIN)" prop="vinNo">
+              <a-input id="productInfoList-vinNo" v-model.trim="queryParam.vinNo" @change="vinNoChange" allowClear placeholder="请输入车架号(VIN)">
+                <Upload slot="addonAfter" class="upload" v-model="queryParam.vinNoMsg" ref="vinNoMsg" @change="handleCamera"></Upload>
+              </a-input>
+            </a-form-model-item>
+          </a-col>
           <a-col :md="6" :sm="24">
             <a-form-model-item label="产品编码">
               <a-input id="productInfoList-code" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="6" :sm="24">
+          <a-col :md="5" :sm="24">
             <a-form-model-item label="产品名称">
               <a-input id="productInfoList-name" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
             </a-form-model-item>
           </a-col>
-          <a-col :md="5" :sm="24">
-            <a-form-model-item label="原厂编码">
-              <a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
-            </a-form-model-item>
-          </a-col>
           <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="原厂编码">
+                <a-input id="productInfoList-origCode" v-model.trim="queryParam.productOrigCode" allowClear placeholder="请输入原厂编码"/>
+              </a-form-model-item>
+            </a-col>
             <a-col :md="7" :sm="24">
-              <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 label="产品分类">
+                <a-cascader
+                  @change="changeProductType"
+                  change-on-select
+                  v-model="productType"
+                  expand-trigger="hover"
+                  :options="productTypeList"
+                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
+                  id="productInfoList-productType"
+                  placeholder="请选择产品分类"
+                  allowClear />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -45,20 +61,6 @@
                 </a-select>
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="产品分类">
-                <a-cascader
-                  @change="changeProductType"
-                  change-on-select
-                  v-model="productType"
-                  expand-trigger="hover"
-                  :options="productTypeList"
-                  :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
-                  id="productInfoList-productType"
-                  placeholder="请选择产品分类"
-                  allowClear />
-              </a-form-model-item>
-            </a-col>
             <!-- <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>
@@ -79,7 +81,7 @@
               </a-form-model-item>
             </a-col>
           </template>
-          <a-col :md="7" :sm="24" style="margin-bottom: 10px;">
+          <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" id="productInfoList-reset">重置</a-button>
             <a @click="advanced=!advanced" style="margin:0 15px 0 8px">
@@ -159,8 +161,7 @@
       title="设置要显示的列"
       centered
       :footer="null"
-      @ok="() => (showSetting = false)"
-    >
+      @ok="() => (showSetting = false)">
       <a-checkbox-group v-model="settingColVal" @change="onSettingChange">
         <a-row>
           <a-col :span="8" v-for="item in settingColList" :key="item.value">
@@ -180,11 +181,11 @@ import { dealerProductTypeList } from '@/api/dealerProductType'
 import { querySumByProductLocation } from '@/api/stock'
 import { warehouseAllList } from '@/api/warehouse'
 import productSalesRecordModal from './productSalesRecordModal.vue'
-import { STable, VSelect } from '@/components'
+import { STable, VSelect, Upload } from '@/components'
 import { supperCodeByVin } from '@/api/sales'
 export default {
   name: 'QueryPart',
-  components: { STable, VSelect, productSalesRecordModal },
+  components: { STable, VSelect, Upload, productSalesRecordModal },
   props: {
     buyerSn: {
       type: [Number, String],
@@ -391,6 +392,10 @@ export default {
     closeModal () {
       this.openModal = false
     },
+    // VIN码上传图片
+    handleCamera (file) {
+      console.log(file)
+    },
     // 仓库
     getWarehouse () {
       warehouseAllList({}).then(res => {