chenrui hace 1 año
padre
commit
c05872379b

+ 7 - 1
src/api/reportData.js

@@ -997,7 +997,13 @@ export const excelOnlineList = (params) => {
     responseType: 'blob'
   })
 }
-
+// 质保信息
+export const getWarrantyInfo = (params) => {
+  return axios({
+    url: `/report/warranty/queryById/${params.id}`,
+    method: 'post'
+  })
+}
 /*
 *   轮胎销售统计报表
 */

BIN
src/assets/img/finishImg.png


+ 34 - 11
src/views/productManagement/productSourcePath/list.vue

@@ -77,13 +77,24 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="质保状态">
-                  <v-select
+                  <!-- <v-select
                     v-model="queryParam.dealerLevel"
                     ref="dealerLevel"
                     id="productSourceList-dealerLevel"
                     code="DEALER_LEVEL"
-                    placeholder="请选择业务状态"
-                    allowClear></v-select>
+                    placeholder="请选择质保状态"
+                    allowClear></v-select> -->
+                  <a-select v-model="queryParam.warrantyState" placeholder="请选择质保状态" allowClear>
+                    <a-select-option value="NOTSTART">
+                      未开始
+                    </a-select-option>
+                    <a-select-option value="RUN">
+                      进行中
+                    </a-select-option>
+                    <a-select-option value="END">
+                      已过期
+                    </a-select-option>
+                  </a-select>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -136,7 +147,7 @@
           class="sTable fixPagination"
           ref="table"
           size="small"
-          :rowKey="(record) => record.salesBillNo"
+          :rowKey="(record) => record.id"
           :style="{ height: tableHeight+70+'px' }"
           rowKeyName="salesBillNo"
           :columns="columns"
@@ -144,14 +155,18 @@
           :scroll="{ y: tableHeight-10 }"
           :defaultLoadData="false"
           bordered>
+          <!-- 质保时间 -->
+          <template slot="warrantyTime" slot-scope="text, record">
+            {{ record.warrantyStartDate }}{{ record.warrantyEndDate?'-'+record.warrantyEndDate:'' }}
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-warning" @click="openInfoModal = true">质保信息</a-button>
+            <a-button size="small" type="link" class="button-warning" @click="handleInfoModal(record)">质保信息</a-button>
           </template>
         </s-table>
       </a-spin>
       <!-- 质保信息-->
-      <warranty-info-modal v-drag :openModal="openInfoModal" @close="openInfoModal = false" />
+      <warranty-info-modal v-drag :openModal="openInfoModal" :itemSn="warrantyInfoId" @close="warrantyInfoId=null;openInfoModal = false" />
       <!-- 导入轮胎唯一码 -->
       <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="handleGuideOk" />
     </a-card>
@@ -189,7 +204,8 @@ export default {
         bizCode: undefined,
         traceCode: undefined,
         buyerName: undefined,
-        bizStatus: undefined
+        bizStatus: undefined,
+        warrantyState: undefined
       },
       openInfoModal: false, // 质保信息弹窗
       columns: [{ title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
@@ -200,8 +216,8 @@ export default {
         { title: '唯一码', dataIndex: 'traceCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'buyerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '质保状态', dataIndex: 'giftQty4', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '质保时间', dataIndex: 'giftQty3', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '质保状态', dataIndex: 'warrantyStateValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '质保时间', scopedSlots: { customRender: 'warrantyTime' }, width: '10%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ],
       disabled: false, //  查询、重置按钮是否可操作
@@ -227,7 +243,8 @@ export default {
         })
       },
       totalData: null,
-      openGuideModal: false // 导入弹窗
+      openGuideModal: false, // 导入弹窗
+      warrantyInfoId: null
     }
   },
   watch: {
@@ -264,7 +281,7 @@ export default {
         }
       })
     },
-    //  创建时间  change
+    //  审核时间  change
     dateChange (date) {
       if (date[0] && date[1]) {
         this.queryParam.time = date
@@ -274,6 +291,11 @@ export default {
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
     },
+    // 质保信息
+    handleInfoModal (row) {
+      this.warrantyInfoId = row.warrantyid
+      this.openInfoModal = true
+    },
     //  重置
     resetSearchForm () {
       this.time = [
@@ -290,6 +312,7 @@ export default {
       this.queryParam.traceCode = undefined
       this.queryParam.buyerName = undefined
       this.queryParam.bizStatus = undefined
+      this.queryParam.warrantyState = undefined
       this.$refs.table.refresh(true)
     },
     //  导出

+ 95 - 65
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -9,71 +9,84 @@
     @cancel="isShow=false"
     :width="600">
     <a-spin :spinning="spinning" tip="Loading...">
-      <div class="infoList">
-        <div class="infoTopList">
-          <a-descriptions :column="1">
-            <a-descriptions-item label="轮胎名称">
-              Zhou Maomao
-            </a-descriptions-item >
-            <a-descriptions-item label="轮胎唯一码">
-              1810000000
+      <div v-if="detailsData">
+        <div class="infoList">
+          <div class="infoTopList">
+            <div class="uniqueStyle">
+              <div>轮胎名称:</div>
+              <a-tooltip placement="topLeft">
+                <template slot="title">
+                  <span>{{ detailsData.productName || '--' }}</span>
+                </template>
+                <div class="text-overflow">{{ detailsData.productName || '--' }}</div>
+              </a-tooltip>
+            </div>
+            <a-descriptions :column="1">
+              <a-descriptions-item label="轮胎唯一码">
+                {{ detailsData.traceCode || '--' }}
+              </a-descriptions-item>
+              <a-descriptions-item label="质保时间" v-if="detailsData.warrantyStartDate">
+                {{ detailsData.warrantyStartDate }}{{ detailsData.warrantyEndDate?'-'+detailsData.warrantyEndDate:'' }}
+              </a-descriptions-item>
+              <a-descriptions-item label="质保时间" v-else>
+                --
+              </a-descriptions-item>
+            </a-descriptions>
+          </div>
+          <div class="imgBox">
+            <img
+              v-if="detailsData.productMsg"
+              style="margin-bottom:6px;"
+              :src="detailsData.productMsg"
+              alt=""
+              width="86"
+              height="55"
+              align="middle" />
+            <div style="text-align:right;">
+              <img v-if="detailsData.state ==='RUN'" src="@/assets/img/finishImg.png" alt="" width="50" height="50">
+              <img v-if="detailsData.state ==='END'" src="@/assets/img/ongoing.png" alt="" width="50" height="50">
+            </div>
+          </div>
+        </div>
+        <div class="infoList">
+          <a-descriptions title="门店信息" :column="1">
+            <a-descriptions-item label="门店名称">
+              {{ detailsData.buyername|| '--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="汽配经销商">
+              {{ detailsData.buyername ||'--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="姓名">
+              {{ detailsData.name ||'--' }}
             </a-descriptions-item>
-            <a-descriptions-item label="质保时间">
-              Hangzhou, Zhejiang
+            <a-descriptions-item label="电话">
+              {{ detailsData.phone ||'--' }}
             </a-descriptions-item>
           </a-descriptions>
         </div>
-        <div class="imgBox">
-          <img
-            style="margin-bottom:6px;"
-            src="https://img2.baidu.com/it/u=2868393532,862853407&fm=253&fmt=auto&app=120&f=JPEG?w=1280&h=800"
-            alt=""
-            width="86"
-            height="55"
-            align="middle" />
-          <div style="text-align:center;">
-            <img src="@/assets/img/ongoing.png" alt="" width="50" height="50">
-          </div>
+        <div class="infoList">
+          <a-descriptions title="车辆信息" :column="1">
+            <a-descriptions-item label="车辆品牌">
+              {{ detailsData.name ||'--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="车型">
+              {{ detailsData.name ||'--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="里程数">
+              {{ detailsData.name ||'--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="车牌号">
+              {{ detailsData.name ||'--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="客户姓名">
+              {{ detailsData.name ||'--' }}
+            </a-descriptions-item>
+            <a-descriptions-item label="手机号码">
+              {{ detailsData.name ||'--' }}
+            </a-descriptions-item>
+          </a-descriptions>
         </div>
       </div>
-      <div class="infoList">
-        <a-descriptions title="门店信息" :column="1">
-          <a-descriptions-item label="门店名称">
-            Zhou Maomao
-          </a-descriptions-item>
-          <a-descriptions-item label="汽配经销商">
-            1810000000
-          </a-descriptions-item>
-          <a-descriptions-item label="姓名">
-            Hangzhou, Zhejiang
-          </a-descriptions-item>
-          <a-descriptions-item label="电话">
-            empty
-          </a-descriptions-item>
-        </a-descriptions>
-      </div>
-      <div class="infoList">
-        <a-descriptions title="车辆信息" :column="1">
-          <a-descriptions-item label="车辆品牌">
-            Zhou Maomao
-          </a-descriptions-item>
-          <a-descriptions-item label="车型">
-            1810000000
-          </a-descriptions-item>
-          <a-descriptions-item label="里程数">
-            Hangzhou, Zhejiang
-          </a-descriptions-item>
-          <a-descriptions-item label="车牌号">
-            empty
-          </a-descriptions-item>
-          <a-descriptions-item label="客户姓名">
-            empty
-          </a-descriptions-item>
-          <a-descriptions-item label="手机号码">
-            empty
-          </a-descriptions-item>
-        </a-descriptions>
-      </div>
       <div class="btn-cont">
         <a-button id="warrantyInfo-back" @click="isShow = false">关闭</a-button>
       </div>
@@ -82,13 +95,17 @@
 </template>
 
 <script>
-import { productPricingSnDetail } from '@/api/product'
+import { getWarrantyInfo } from '@/api/reportData'
 export default {
   name: 'ProductPricingAuditModal',
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
       default: false
+    },
+    itemSn: {
+      type: String,
+      default: ''
     }
   },
   data () {
@@ -101,7 +118,7 @@ export default {
   methods: {
     //  获取详情
     getDetail () {
-      productPricingSnDetail({ sn: this.itemSn }).then(res => {
+      getWarrantyInfo({ id: this.itemSn }).then(res => {
         if (res.status == 200) {
           this.detailsData = res.data
         } else {
@@ -119,6 +136,8 @@ export default {
     isShow (newValue, oldValue) {
       if (!newValue) {
         this.$emit('close')
+      } else {
+        this.getDetail()
       }
     }
   }
@@ -132,6 +151,14 @@ export default {
     }
     .infoList {
       margin-bottom:26px;
+      .uniqueStyle{
+        display:flex;
+        algin-items:center;
+        margin-bottom:5px;
+        div:last-child{
+          width:78%;
+        }
+      }
       .ant-descriptions-title{
         margin-bottom:10px !important;
       }
@@ -139,19 +166,22 @@ export default {
         padding-bottom: 5px !important;
       }
       .infoTopList{
-        max-width:50%;
+        max-width:70%;
         position: relative;
-        .ant-descriptions-row:nth-child(2),.ant-descriptions-row:nth-child(3){
+       .ant-descriptions-row{
           font-weight: bold;
         }
-        .ant-descriptions-row:nth-child(2) .ant-descriptions-item > span,.ant-descriptions-row:nth-child(3) .ant-descriptions-item > span{
+        .ant-descriptions-row .ant-descriptions-item > span{
           font-weight: bold;
         }
       }
       .imgBox{
         position:absolute;
         top:0;
-        left:51%;
+        left:71%;
+        img:nth-child(1){
+          border:1px dashed #cccccc;
+        }
       }
     }
 

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

@@ -126,7 +126,7 @@ export default {
         getDate.getCurrMonthDays().endtime
       ],
       queryParam: { //  查询条件
-        beginDate: getDate.getCurrMonthDays().starttime,
+        beginDate: getDate.getThreeMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         provinceSn: undefined,
         citySn: undefined,