Explorar el Código

Merge branch 'develop_yh29' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh29

lilei hace 1 año
padre
commit
8caefefe72

BIN
src/assets/img/ongoing.png


+ 2 - 2
src/views/productManagement/productSourcePath/chooseImportModal.vue

@@ -138,7 +138,7 @@ export default {
     // 确认导入
     handleSubmit () {
       if (this.loadData.length == 0) {
-        this.$message.warning('无可导入轮胎唯一码!')
+        this.$message.warning('无可导入数据!')
       } else {
         this.$emit('ok', this.loadData)
         this.isShow = false
@@ -152,7 +152,7 @@ export default {
         return
       }
       _this.spinning = true
-      hdExportExcel(codeExportImportError, _this.unLoadData, '轮胎唯一码错误项', function () {
+      hdExportExcel(codeExportImportError, _this.unLoadData, '唯一码错误项', function () {
         _this.spinning = false
       })
     }

+ 2 - 2
src/views/productManagement/productSourcePath/importGuideModal.vue

@@ -74,7 +74,7 @@ import ChooseImportModal from './chooseImportModal.vue'
 import { Upload } from '@/components'
 export default {
   name: 'ImportGuideModal',
-  components: { Upload,ChooseImportModal },
+  components: { Upload, ChooseImportModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -95,7 +95,7 @@ export default {
         savePathType: 'local'
       },
       exportLoading: false,
-      filePath: location.protocol + '//' + location.host + '/templ/轮胎唯一码导入模板.xlsx'
+      filePath: location.protocol + '//' + location.host + '/templ/唯一码导入模板.xlsx'
     }
   },
   methods: {

+ 14 - 5
src/views/productManagement/productSourcePath/list.vue

@@ -159,13 +159,13 @@
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='RUN'" size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
+            <a-button v-if="$hasPermissions('B_productSourceSeeInfo')&&record.warrantyState!='NOTSTART'" size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
             <span v-else>--</span>
           </template>
         </s-table>
       </a-spin>
       <!-- 质保信息-->
-      <warranty-info-modal v-drag :openModal="openInfoModal" :itemSn="warrantyInfoId" @close="warrantyInfoId=null;openInfoModal = false" />
+      <warranty-info-modal v-drag :openModal="openInfoModal" :productCode="productCodeInfo" :itemSn="warrantyInfoId" @close="closeWarranty" />
       <!-- 导入轮胎唯一码 -->
       <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="handleGuideOk" />
     </a-card>
@@ -245,7 +245,8 @@ export default {
       },
       totalData: null,
       openGuideModal: false, // 导入弹窗
-      warrantyInfoId: null
+      warrantyInfoId: null,
+      productCodeInfo: null
     }
   },
   watch: {
@@ -304,8 +305,16 @@ export default {
     // 质保信息
     handleInfoModal (row) {
       this.warrantyInfoId = row.warrantyid
+      this.productCodeInfo = row.productCode
       this.openInfoModal = true
     },
+    // 关闭质保信息弹窗
+    closeWarranty () {
+      this.warrantyInfoId = null
+      this.productCodeInfo = null
+      this.openInfoModal = false
+    },
+
     //  重置
     resetSearchForm () {
       this.time = [
@@ -333,7 +342,7 @@ export default {
       const params = _this.queryParam
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(excelOnlineList, params, '轮胎追溯列表', function () {
+      hdExportExcel(excelOnlineList, params, '唯一码追溯列表', function () {
         _this.exportLoading = false
         _this.spinning = false
       })
@@ -346,7 +355,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 247
     }
   },
   mounted () {

+ 31 - 8
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -22,11 +22,14 @@
               </a-tooltip>
             </div>
             <a-descriptions :column="1">
+              <a-descriptions-item label="产品编码">
+                {{ productCode || '--' }}
+              </a-descriptions-item>
               <a-descriptions-item label="轮胎唯一码">
                 {{ detailsData.traceCode || '--' }}
               </a-descriptions-item>
               <a-descriptions-item label="质保时间" v-if="detailsData.warrantyStartDate">
-                {{ detailsData.warrantyStartDate }}{{ detailsData.warrantyEndDate?'-'+detailsData.warrantyEndDate:'' }}
+                {{ detailsData.warrantyStartDate }}{{ detailsData.warrantyEndDate?''+detailsData.warrantyEndDate:'' }}
               </a-descriptions-item>
               <a-descriptions-item label="质保时间" v-else>
                 --
@@ -36,12 +39,12 @@
           <div class="imgBox">
             <img
               v-if="detailsData.productMsg"
-              style="margin-bottom:6px;object-fit: cover;"
+              style="margin-bottom:6px;object-fit: cover;border:1px dashed #ccc;"
               :src="detailsData.productMsg"
-              alt=""
+              alt="图片走丢啦"
               width="86"
               height="55"
-              align="middle" />
+              align="middle" @click="viewLargeImg"/>
             <div style="text-align:right;">
               <img v-if="detailsData.state ==='END'" src="@/assets/img/finishImg.png" alt="" width="50" height="50">
               <img v-if="detailsData.state ==='RUN'" src="@/assets/img/ongoing.png" alt="" width="50" height="50">
@@ -53,15 +56,15 @@
             <a-descriptions-item label="门店名称">
               {{ detailsData.storeName|| '--' }}
             </a-descriptions-item>
-            <a-descriptions-item label="汽配经销商">
-              {{ detailsData.dealerName ||'--' }}
-            </a-descriptions-item>
             <a-descriptions-item label="姓名">
               {{ detailsData.storeManager ||'--' }}
             </a-descriptions-item>
             <a-descriptions-item label="电话">
               {{ detailsData.storeMobile ||'--' }}
             </a-descriptions-item>
+            <a-descriptions-item label="汽配经销商">
+              {{ detailsData.dealerName ||'--' }}
+            </a-descriptions-item>
           </a-descriptions>
         </div>
         <div class="infoList">
@@ -91,6 +94,17 @@
         <a-button id="warrantyInfo-back" @click="isShow = false">关闭</a-button>
       </div>
     </a-spin>
+    <!-- 查看图片 -->
+    <a-modal v-model="openImgModal" :title="null" :footer="null" :width="600" centered>
+      <div class="viewImg">
+        <img
+          :src="detailsData.productMsg"
+          alt="图片走丢啦"
+          width="100%"
+          height="100%"
+          align="middle"/>
+      </div>
+    </a-modal>
   </a-modal>
 </template>
 
@@ -106,13 +120,18 @@ export default {
     itemSn: {
       type: String,
       default: ''
+    },
+    productCode:{
+      type: String,
+      default: ''
     }
   },
   data () {
     return {
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
-      detailsData: null //  详情数据
+      detailsData: null ,//  详情数据
+      openImgModal:false
     }
   },
   methods: {
@@ -125,6 +144,10 @@ export default {
           this.detailsData = null
         }
       })
+    },
+    // 查看图片
+    viewLargeImg(){
+      this.openImgModal = true
     }
   },
   watch: {

+ 27 - 77
src/views/reportData/tireSalesReport/dealerList.vue

@@ -10,11 +10,6 @@
           layout="inline"
           :model="queryParam">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="下推时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-              </a-form-model-item>
-            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="地区">
                 <AreaList id="tireSalesDealerList-areaList" changeOnSelect ref="areaList" @change="areaChange" defValKey="id"></AreaList>
@@ -25,23 +20,21 @@
                 <subarea id="tireSalesDealerList-subarea" ref="subarea" @change="subareaChange"></subarea>
               </a-form-item>
             </a-col>
-            <template v-if="advanced">
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="客户名称">
-                  <a-input
-                    id="tireSalesDealerList-buyerName"
-                    v-model.trim="queryParam.buyerName"
-                    allowClear
-                    placeholder="请输入客户名称" />
-                </a-form-model-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-model-item label="区域负责人">
-                  <BizUser v-model="queryParam.bizUserSn"></BizUser>
-                </a-form-model-item>
-              </a-col>
-            </template>
             <a-col :md="6" :sm="24">
+              <a-form-model-item label="客户名称">
+                <a-input
+                  id="tireSalesDealerList-dealerName"
+                  v-model.trim="queryParam.dealerName"
+                  allowClear
+                  placeholder="请输入客户名称" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="区域负责人">
+                <BizUser v-model="queryParam.bizUserSn"></BizUser>
+              </a-form-model-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="text-align:center;margin-bottom:10px;">
               <a-button
                 style="margin-left: 5px"
                 type="primary"
@@ -62,10 +55,6 @@
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_tireSalesDealerReportExport')"
                 id="tireSalesDealerList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
-                {{ advanced ? '收起' : '展开' }}
-                <a-icon :type="advanced ? 'up' : 'down'" />
-              </a>
             </a-col>
           </a-row>
         </a-form-model>
@@ -78,9 +67,9 @@
           class="sTable fixPagination"
           ref="table"
           size="small"
-          :rowKey="(record) => record.salesBillNo"
+          :rowKey="(record) => record.dealerSn"
           :style="{ height: tableHeight+70+'px' }"
-          rowKeyName="salesBillNo"
+          rowKeyName="dealerSn"
           :columns="columns"
           :data="loadData"
           :scroll="{ y: tableHeight-30 }"
@@ -93,7 +82,8 @@
             <a-row :gutter="15">
               <a-col :md="4" :sm="24">采购数量:{{ (totalData && (totalData.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
               <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ? totalData.totalstoreAmount: '--' }}</a-col>
-              <a-col :md="4" :sm="24">已售出数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">售出数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -104,7 +94,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
@@ -119,19 +108,12 @@ export default {
   data () {
     return {
       spinning: false,
-      advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
-      time: [
-        getDate.getThreeMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ],
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined,
-        buyerName: '',
+        dealerName: '',
         subareaSn: undefined,
         subareaAreaSn: undefined,
         bizUserSn: undefined
@@ -165,26 +147,16 @@ export default {
         { title: '区域', dataIndex: 'subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerLevelDictValue ', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '采购数量', dataIndex: 'buyAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'storeAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '已售出数量', dataIndex: 'sellAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '售出数量', dataIndex: 'sellAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
     }
   },
-  watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
-    }
-  },
   methods: {
     // 统计
     getCount (params) {
@@ -202,45 +174,23 @@ export default {
       this.queryParam.citySn = val[1] ? val[1] : ''
       this.queryParam.districtSn = val[2] ? val[2] : ''
     },
-    //  下推时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.time = date
-      } else {
-        this.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
-    },
-    custChange (val) {
-      this.queryParam.dealerSn = val.key
-    },
     subareaChange (val) {
       this.queryParam.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
     },
     //  重置
     resetSearchForm () {
-      this.time = [
-        getDate.getThreeMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.provinceSn = undefined
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
-      this.queryParam.buyerName = ''
+      this.queryParam.dealerName = ''
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
       this.totalData = null
-      if (this.advanced) {
-        this.$refs.subarea.clearData()
-        this.$refs.areaList.clearData()
-      }
-      this.$refs.table.clearTable()
+      this.$refs.subarea.clearData()
+      this.$refs.areaList.clearData()
+      this.$refs.table.refresh()
     },
     //  导出
     handleExport () {

+ 1 - 1
src/views/reportData/tireSalesReport/index.vue

@@ -2,7 +2,7 @@
   <div>
     <a-spin :spinning="spinning" tip="Loading...">
       <a-tabs default-active-key="1" @change="handleChange" :tabBarStyle="{'background':'#fff'}">
-        <a-tab-pane key="1" tab="轮胎销售报表(经销商)">
+        <a-tab-pane key="1" tab="轮胎销售报表(客户)">
           <dealerList></dealerList>
         </a-tab-pane>
         <a-tab-pane key="2" tab="轮胎销售报表(区域/分区)" force-render>

+ 6 - 33
src/views/reportData/tireSalesReport/subareaList.vue

@@ -11,11 +11,6 @@
           :model="queryParam"
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
-            <a-col :md="6" :sm="24">
-              <a-form-model-item label="下推时间" prop="time">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
-              </a-form-model-item>
-            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="区域/分区">
                 <subarea id="allocateBillList-subarea" ref="subarea" @change="subareaChange"></subarea>
@@ -71,8 +66,9 @@
           <template slot="footer">
             <a-row :gutter="15">
               <a-col :md="4" :sm="24">采购数量:{{ (totalData && (totalData.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
-              <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ? totalData.totalsellAmount: '--' }}</a-col>
-              <a-col :md="4" :sm="24">已售出数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ?totalData.totalstoreAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">库存数量:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ? totalData.totalstoreAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">售出数量:{{ (totalData && (totalData.totalsellAmount || totalData.totalsellAmount==0)) ?totalData.totalsellAmount: '--' }}</a-col>
+              <a-col :md="4" :sm="24">已绑质保单数量:{{ (totalData && (totalData.totalwarrantyAmount || totalData.totalwarrantyAmount==0)) ?totalData.totalwarrantyAmount: '--' }}</a-col>
             </a-row>
           </template>
         </s-table>
@@ -83,7 +79,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import getDate from '@/libs/getDate.js'
 import { STable } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
@@ -98,13 +93,7 @@ export default {
     return {
       spinning: false,
       tableHeight: 0,
-      time: [
-        getDate.getThreeMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ],
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
         subareaSn: undefined,
         subareaAreaSn: undefined,
         bizUserSn: undefined
@@ -139,7 +128,8 @@ export default {
         { title: '区域负责人', dataIndex: 'userNameQyfzrs', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '采购数量', dataIndex: 'buyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '库存数量', dataIndex: 'storeAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '已售出数量', dataIndex: 'sellAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '售出数量', dataIndex: 'sellAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
     }
   },
@@ -157,35 +147,18 @@ export default {
     handleSearch () {
       this.$refs.table.refresh(true)
     },
-    //  下推时间  change
-    dateChange (date) {
-      if (date[0] && date[1]) {
-        this.time = date
-      } else {
-        this.time = []
-      }
-      this.queryParam.beginDate = date[0] || ''
-      this.queryParam.endDate = date[1] || ''
-    },
     subareaChange (val) {
       this.queryParam.subareaSn = val[0] ? val[0] : undefined
       this.queryParam.subareaAreaSn = val[1] ? val[1] : undefined
     },
     //  重置
     resetSearchForm () {
-      this.time = [
-        getDate.getThreeMonthDays().starttime,
-        getDate.getCurrMonthDays().endtime
-      ]
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
       this.totalData = null
       this.$refs.subarea.clearData()
-      this.$refs.table.clearTable()
+      this.$refs.table.refresh()
     },
     //  导出
     handleExport () {