Преглед изворни кода

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

# Conflicts:
#	src/views/reportData/tireSalesReport/list.vue
#	src/views/reportData/tireSalesReport/subareaList.vue
lilei пре 1 година
родитељ
комит
498ddfb059

+ 7 - 0
src/api/expenseManagement.js

@@ -16,6 +16,13 @@ export const employeeQueryList = (params) => {
     method: 'post'
   })
 }
+// 其它往来人员
+export const otherOrgQuery = (params) => {
+  return axios({
+    url: `/otherorg/queryAll`,
+    method: 'get'
+  })
+}
 
 // 费用报销单列表
 export const expenseAccountList = (params) => {

+ 5 - 5
src/config/router.config.js

@@ -1836,22 +1836,22 @@ export const asyncRouterMap = [
           },
           {
             path: '/reportData/tireSalesReport',
-            redirect: '/reportData/tireSalesReport/index',
+            redirect: '/reportData/tireSalesReport/list',
             name: 'tireSalesReport',
             component: BlankLayout,
             meta: {
-              title: '轮胎销售统计报表',
+              title: '轮胎统计报表',
               icon: 'profile',
               permission: 'M_tireSalesReportList'
             },
             hideChildrenInMenu: true,
             children: [
               {
-                path: 'index',
+                path: 'list',
                 name: 'tireSalesReportIndex',
-                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/tireSalesReport/index.vue'),
+                component: () => import(/* webpackChunkName: "reportData" */ '@/views/reportData/tireSalesReport/list.vue'),
                 meta: {
-                  title: '轮胎销售统计报表',
+                  title: '轮胎统计报表',
                   icon: 'profile',
                   hidden: true,
                   permission: 'M_tireSalesReportList'

+ 83 - 0
src/views/common/otherTransactions.js

@@ -0,0 +1,83 @@
+import { otherOrgQuery } from '@/api/expenseManagement.js'
+const Employee = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        :disabled="disabledFlag"
+        @change="handleChange"
+        option-filter-prop="children"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :key="item.otherOrgSn" :value="item.otherOrgSn">
+        {{ item.otherOrgName }}
+        </a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      defatut: ''
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择其它往来机构'
+    },
+    enableFlag: {
+      type: String,
+      default: ''
+    },
+    disabledFlag: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      defaultVal: this.value,
+      list: []
+    }
+  },
+  mounted () {
+    this.getList()
+  },
+  watch: {
+    value (newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
+  methods: {
+    filterOption (input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      )
+    },
+    handleChange (value) {
+      this.defaultVal = value
+      const item = this.list.find(item => item.supplierSn == value)
+      this.$emit('input', value)
+      this.$emit('change', value, item)
+    },
+    getList () {
+      otherOrgQuery().then(res => {
+        if (res.status == 200) {
+          if (this.enableFlag != '') {
+            this.list = res.data.filter(item => item.enableFlag == this.enableFlag)
+          } else {
+            this.list = res.data
+          }
+        } else {
+          this.list = []
+        }
+      })
+    }
+  }
+}
+
+export default Employee

+ 8 - 1
src/views/expenseManagement/expenseReimbursement/epenseCdfModal.vue

@@ -48,6 +48,12 @@
                 enableFlag="1"
                 v-model="record.splitObjSn"
                 placeholder="请选择(输入名称搜索)"></supplier>
+              <!-- 其它往来 -->
+              <otherTransactions 
+              style="width: 100%;"
+              v-show="record.splitObjType=='OTHER_ORG'" 
+              v-model="record.splitObjSn" 
+              placeholder="请选择(输入名称搜索)"></otherTransactions>
               <span v-if="!record.splitObjType">--</span>
             </template>
             <!-- 费用承担金额 -->
@@ -131,8 +137,9 @@ import department from './department.js'
 import employee from './employee.js'
 import custList from '@/views/common/custList.vue'
 import supplier from '@/views/common/supplier.js'
+import otherTransactions from '@/views/common/otherTransactions.js'
 export default {
-  components: { VSelect, department, employee, custList, supplier },
+  components: { VSelect, department, employee, custList, supplier, otherTransactions },
   name: 'EpenseCdfModal',
   props: {
     list: { //  弹框显示状态

+ 4 - 1
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -38,6 +38,8 @@
                   <custList v-show="form.accountType=='CUSTOMER'" cooperateFlag="1" ref="custList" @change="accountNameSnChange" placeholder="请选择记账名称(输入名称搜索)"></custList>
                   <!-- 供应商 -->
                   <supplier v-show="form.accountType=='OUT_ACCOUNT'" enableFlag="1" @change="accountNameSnChange" v-model="form.accountNameSn" placeholder="请选择记账名称(输入名称搜索)"></supplier>
+                  <!-- 其它往来 -->
+                  <otherTransactions v-show="form.accountType=='OTHER_ACCOUNT'" @change="accountNameSnChange" v-model="form.accountNameSn" placeholder="请选择记账名称(输入名称搜索)"></otherTransactions>
                   <span v-if="!form.accountType">
                     <a-select style="width: 100%" placeholder="请选择记账名称">
                       <a-select-option value="" :disabled="true">
@@ -118,11 +120,12 @@ import subarea from '@/views/common/subarea.js'
 import Area from '@/views/common/area.js'
 import custList from '@/views/common/custList.vue'
 import supplier from '@/views/common/supplier.js'
+import otherTransactions from '@/views/common/otherTransactions.js'
 import department from './department.js'
 import { expenseAcctDetailSave, expenseAcctDetailFindBySn } from '@/api/expenseManagement.js'
 export default {
   name: 'EpenseDetailModal',
-  components: { VSelect, subarea, Area, epenseCdfModal, custList, supplier, department },
+  components: { VSelect, subarea, Area, epenseCdfModal, custList, supplier, department, otherTransactions },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,

+ 30 - 6
src/views/productManagement/productSourcePath/chooseImportModal.vue

@@ -15,10 +15,10 @@
         <p>
           <a-tooltip placement="right">
             <template slot="title">
-              <span v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }}){{ con.productCode }} (<span class="red">{{ con.productNum }}</span>/{{ con.bizProductNum }});
-              </span></template>
+              <div v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }})<span v-for="(item,j) in con.info" :key="j">{{ item.productCode }}(<span class="red">{{ item.productNum }}</span>/{{ item.bizProductNum }});</span></div>
+            </template>
             <div class="text-overflows2" v-if="countData && countData.length>0">
-              可导入产品数量与实际销售数量有差异:<span v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }}){{ con.productCode }} (<span class="red">{{ con.productNum }}</span>/{{ con.bizProductNum }});</span>
+              可导入产品数量与实际销售数量有差异:<span v-for="(con,i) in countData" :key="i"><strong>业务单号</strong>({{ con.bizCode }})<span v-for="(item,j) in con.info" :key="j">{{ item.productCode }}(<span class="red">{{ item.productNum }}</span>/{{ item.bizProductNum }});</span></span>
             </div>
           </a-tooltip>
         </p>
@@ -27,7 +27,8 @@
         class="sTable"
         ref="table"
         size="small"
-        :rowKey="(record) => record.allocateSn"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="nowColumns"
         :dataSource="loadData"
         :loading="loading"
@@ -42,7 +43,8 @@
         class="unTable"
         ref="unTable"
         size="small"
-        :rowKey="(record) => record.errorDesc"
+        :rowKey="(record) => record.no"
+        rowKeyName="no"
         :columns="nowUnColumns"
         :dataSource="unLoadData"
         :loading="loading"
@@ -127,13 +129,35 @@ export default {
       const paramsData = JSON.parse(JSON.stringify(_this.paramsData))
       this.loadData = paramsData.rightList || []
       this.unLoadData = paramsData.errorList || []
-      this.countData = paramsData.billList || []
       this.loadData.map((item, index) => {
         item.no = index + 1
       })
       this.unLoadData.map((item, index) => {
         item.no = index + 1
       })
+      if (paramsData.billList && paramsData.billList.length > 0) {
+        const newCountData = paramsData.billList || []
+        newCountData.map(item => {
+          item.info = [{ productCode: item.productCode,
+            productNum: item.productNum,
+            bizProductNum: item.bizProductNum }]
+        })
+        const mergedObjects = newCountData.reduce((acc, obj) => {
+          const index = acc.findIndex(o => { return o.bizCode == obj.bizCode })
+          if (index != -1) {
+            acc[index].info.push({ productCode: obj.productCode,
+              productNum: obj.productNum,
+              bizProductNum: obj.bizProductNum })
+          } else {
+            acc.push(obj)
+          }
+          return acc
+        }, [])
+        this.countData = mergedObjects
+      }
+    },
+    compareObjects (obj1, obj2) {
+      return Object.keys(obj1).every(key => obj1[key] === obj2[key])
     },
     // 确认导入
     handleSubmit () {

+ 6 - 5
src/views/productManagement/productSourcePath/warrantyInfoModal.vue

@@ -44,7 +44,8 @@
               alt="图片走丢啦"
               width="86"
               height="55"
-              align="middle" @click="viewLargeImg"/>
+              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">
@@ -121,7 +122,7 @@ export default {
       type: String,
       default: ''
     },
-    productCode:{
+    productCode: {
       type: String,
       default: ''
     }
@@ -130,8 +131,8 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       spinning: false,
-      detailsData: null ,//  详情数据
-      openImgModal:false
+      detailsData: null, //  详情数据
+      openImgModal: false
     }
   },
   methods: {
@@ -146,7 +147,7 @@ export default {
       })
     },
     // 查看图片
-    viewLargeImg(){
+    viewLargeImg () {
       this.openImgModal = true
     }
   },

+ 0 - 303
src/views/reportData/tireSalesReport/index.vue

@@ -1,303 +0,0 @@
-<template>
-  <div>
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-tabs default-active-key="1" @change="handleChange" :tabBarStyle="{'background':'#fff'}">
-        <a-tab-pane key="1" tab="轮胎销售报表(客户)">
-          <dealerList></dealerList>
-        </a-tab-pane>
-        <a-tab-pane key="2" tab="轮胎销售报表(区域/分区)" force-render>
-          <subareaList></subareaList>
-        </a-tab-pane>
-      </a-tabs>
-      <!-- 导出提示框 -->
-      <reportModal :visible="showExport" @close="showExport=false"></reportModal>
-    </a-spin>
-  </div>
-</template>
-
-<script>
-import { commonMixin } from '@/utils/mixin'
-import { STable, VSelect } from '@/components'
-import reportModal from '@/views/common/reportModal.vue'
-import { salesPromoReportList, salesPromoReportQueryCount, exportSalesPromoReport } from '@/api/reportData'
-import { hdExportExcel } from '@/libs/exportExcel'
-import subareaList from './subareaList'
-import dealerList from './dealerList'
-import rangeDate from '@/views/common/rangeDate.vue'
-import getDate from '@/libs/getDate.js'
-import subarea from '@/views/common/subarea.js'
-import AreaList from '@/views/common/areaList.js'
-// import moment from 'moment'
-export default {
-  name: 'PriceDifferenceDetailReportList',
-  mixins: [commonMixin],
-  components: { STable, VSelect, subareaList, dealerList, reportModal, AreaList, rangeDate, subarea },
-  data () {
-    const _this = this
-    return {
-      advanced: true, // 高级搜索 展开/关闭
-      time: undefined,
-      spinning: false,
-      queryParam: {
-        salesDate: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginAuditDate: getDate.getCurrMonthDays().starttime, // 审核开始时间
-        endAuditDate: getDate.getCurrMonthDays().endtime, // 审核结束时间
-        promoRuleReport: {
-          promotionDateStart: undefined, // 促销时间-开始
-          promotionDateEnd: undefined, // 促销时间-结束
-          title: '', // 促销名称
-          promotionRuleType: undefined, // 促销类型
-          ruleInfo: ''// 规则
-        },
-        salesBillNo: '', // 销售单号
-        buyerLevel: undefined, // 客户级别
-        buyerName: '', // 客户名称
-        subareaArea: {
-          subareaSn: '',
-          subareaAreaSn: ''
-        },
-        dealerProvinceSn: undefined, // 省份编码
-        dealerCitySn: undefined, // 城市编码
-        dealerDistrictSn: undefined // 区域编码
-      },
-      rules: {
-        salesDate: [{ required: true, message: '请选择销售审核时间', trigger: 'change' }]
-      },
-      dateFormat: 'YYYY-MM-DD',
-      tabVal: 1,
-      disabled: false,
-      tableHeight: 0,
-      totalData: null, //  合计
-      exportLoading: false,
-      showExport: false,
-      columns: [
-        { title: '促销名称', dataIndex: 'promotion.title', width: '160px', align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left', ellipsis: true },
-        { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '130px', align: 'center', fixed: 'left' },
-        { title: '费用所属部门', dataIndex: 'departmentName', width: '160px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true, fixed: 'left' },
-        { title: '促销类型', dataIndex: 'promotionRule.promotionRuleTypeDictValue', width: '100px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
-        { title: '规则', dataIndex: 'promotionRule.ruleInfo', width: '180px', align: 'left', customRender: function (text) { return text || '--' }, fixed: 'left' },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: '120px', align: 'center', customRender: function (text) { return text || '--' }, fixed: 'left' },
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '地区', dataIndex: 'provinceName', width: '160px', align: 'center', scopedSlots: { customRender: 'addressInfo' } },
-        { title: '客户名称', dataIndex: 'buyerName', width: '140px', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户级别', dataIndex: 'buyerLevelDictValue', width: '80px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售审核时间', dataIndex: 'auditDate', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '数量(非促)', dataIndex: 'notGiftQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量(促)', dataIndex: 'giftQty', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '实售金额', dataIndex: 'totalRealAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '开单金额', dataIndex: 'totalAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '成本金额', dataIndex: 'totalRealCost', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '损失成本', dataIndex: 'lossCost', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '损失费用', dataIndex: 'lossAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '采购额结余', dataIndex: 'surplusPromoGiftsAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '采购额超出', dataIndex: 'outPromoGiftsAmount', width: '100px', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '促销品费用归属品牌', dataIndex: 'promoProductBrandName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '促销品费用归属分类', dataIndex: 'promoProductTypeName', width: '120px', align: 'center', customRender: function (text) { return text || '--' } }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        const params = Object.assign(parameter, this.queryParam)
-        const newParams = JSON.parse(JSON.stringify(params))
-        delete newParams.salesDate
-        this.spinning = true
-        return salesPromoReportList(newParams).then(res => {
-          let data
-          if (res.status == 200) {
-            data = res.data
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            this.disabled = false
-          }
-          this.spinning = false
-          return data
-        })
-      }
-    }
-  },
-  methods: {
-    salesDateChange (date) {
-      if (date[0] && date[1]) {
-        this.queryParam.salesDate = date
-      } else {
-        this.queryParam.salesDate = []
-      }
-      this.queryParam.beginAuditDate = date[0] || ''
-      this.queryParam.endAuditDate = date[1] || ''
-    },
-    dateChange (date, dateString) {
-      this.time = date
-      if (dateString[0] != '' && dateString[1] != '') {
-        this.queryParam.promoRuleReport.promotionDateStart = dateString[0] + ' 00:00:00'
-        this.queryParam.promoRuleReport.promotionDateEnd = dateString[1] + ' 23:59:59'
-      } else {
-        this.$set(this.queryParam.promoRuleReport, 'promotionDateStart', undefined)
-        this.$set(this.queryParam.promoRuleReport, 'promotionDateEnd', undefined)
-      }
-    },
-    // // 不可选日期
-    // disabledDate (date, dateStrings) {
-    //   return date && date.valueOf('day') < moment().subtract(1, 'day') // 今天以后,包含今天
-    // },
-    // 统计
-    getCount (params) {
-      salesPromoReportQueryCount(params).then(res => {
-        if (res.status == 200) {
-          this.totalData = res.data
-        } else {
-          this.totalData = null
-        }
-      })
-    },
-    subareaChange (val) {
-      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
-      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
-    },
-    // tab
-    handleChange (val) {
-      this.tabVal = val
-    },
-    // 导出
-    handleExport () {
-      const _this = this
-      const params = this.queryParam
-      _this.exportLoading = true
-      _this.spinning = true
-      const ajaxUrl = _this.tabVal == 1 ? exportSalesPromoReport : exportSalesPromoRealReport
-      const ajaxName = _this.tabVal == 1 ? '促销销售单报表导出' : '促销销售单实时报表导出'
-      hdExportExcel(ajaxUrl, params, ajaxName, function () {
-        _this.exportLoading = false
-        _this.spinning = false
-        _this.showExport = true
-      })
-    },
-    // 验证表单 type值  search查询 export导出
-    testForm (type) {
-      const _this = this
-      if (!_this.queryParam.salesDate[0] || !_this.queryParam.salesDate[1]) {
-        _this.$message.error('请选择销售审核时间')
-        return
-      }
-      _this.$refs.ruleForm.validate(valid => {
-        if (valid) {
-          if (type == 'search') {
-            _this.handleSearch()
-          } else {
-            _this.handleExport()
-          }
-        } else {
-          _this.$message.error('请选择销售审核时间')
-          return false
-        }
-      })
-    },
-    areaChange (val) {
-      this.queryParam.dealerProvinceSn = val[0] ? val[0] : ''
-      this.queryParam.dealerCitySn = val[1] ? val[1] : ''
-      this.queryParam.dealerDistrictSn = val[2] ? val[2] : ''
-    },
-    // 查询
-    handleSearch () {
-      const _this = this
-      // 总计
-      const paramData = JSON.parse(JSON.stringify(this.queryParam))
-      delete paramData.salesDate
-      _this.getCount(paramData)
-      _this.$refs.table.refresh(true)
-    },
-    // 重置
-    resetSearchForm () {
-      this.$refs.ruleForm.resetFields()
-      this.queryParam = {
-        salesDate: [
-          getDate.getCurrMonthDays().starttime,
-          getDate.getCurrMonthDays().endtime
-        ],
-        beginAuditDate: getDate.getCurrMonthDays().starttime, // 审核开始时间
-        endAuditDate: getDate.getCurrMonthDays().endtime, // 审核结束时间
-        promoRuleReport: {
-          promotionDateStart: undefined, // 促销时间-开始
-          promotionDateEnd: undefined, // 促销时间-结束
-          title: '', // 促销名称
-          promotionRuleType: undefined, // 促销类型
-          ruleInfo: ''// 规则
-        },
-        salesBillNo: '', // 销售单号
-        buyerLevel: undefined, // 客户级别
-        buyerName: '', // 客户名称
-        subareaArea: {
-          subareaSn: '',
-          subareaAreaSn: ''
-        },
-        dealerProvinceSn: undefined, // 省份编码
-        dealerCitySn: undefined, // 城市编码
-        dealerDistrictSn: undefined // 区域编码
-      }
-      this.time = undefined
-      this.$refs.subarea.clearData()
-      this.$refs.areaList.clearData()
-      this.$refs.rangeDate.resetDate(this.queryParam.salesDate)
-      this.$refs.table.clearTable()
-      this.totalData = null
-    },
-    pageInit () {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
-    setTableH () {
-      const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 260
-    }
-  },
-  watch: {
-    advanced (newValue, oldValue) {
-      const _this = this
-      this.$nextTick(() => { // 页面渲染完成后的回调
-        _this.setTableH()
-      })
-    },
-    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-      this.setTableH()
-    }
-  },
-  mounted () {
-    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.pageInit()
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.pageInit()
-    }
-  }
-}
-
-</script>
-
-<style lang="less" scoped>
-  .monthBox{
-    /deep/.ant-calendar-picker-icon{
-      display:none !important;
-    }
-    /deep/.ant-calendar-picker input{
-      text-align:center;
-    }
-  }
-  .promotionSalesRealTimeReport-wrap{
-    /deep/ .ant-card-body:first-child{
-      padding-bottom: 0;
-    }
-  }
-  .ant-tabs-tabpane.ant-tabs-tabpane-active{
-    margin-top:-11px !important;
-  }
-</style>

+ 55 - 29
src/views/reportData/tireSalesReport/dealerList.vue → src/views/reportData/tireSalesReport/list.vue

@@ -11,7 +11,7 @@
           :model="queryParam">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="下推时间">
+              <a-form-model-item label="出库时间">
                 <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
@@ -28,11 +28,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="客户名称">
-                  <a-input
-                    id="tireSalesDealerList-dealerName"
-                    v-model.trim="queryParam.dealerName"
-                    allowClear
-                    placeholder="请输入客户名称" />
+                  <dealerSubareaScopeList ref="dealerSubareaScopeList" id="tireSalesDealerList-dealerName" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -40,6 +36,16 @@
                   <BizUser v-model="queryParam.bizUserSn"></BizUser>
                 </a-form-model-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品编码/原厂编码">
+                  <a-input id="tireSalesDealerList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="产品名称">
+                  <a-input id="tireSalesDealerList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <a-button
@@ -53,6 +59,7 @@
                 @click="resetSearchForm"
                 :disabled="disabled"
                 id="tireSalesDealerList-reset">重置</a-button>
+              <!-- v-if="$hasPermissions('B_tireSalesReportExport')" -->
               <a-button
                 style="margin-left: 10px"
                 type="primary"
@@ -60,7 +67,7 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                v-if="$hasPermissions('B_tireSalesDealerReportExport')"
+
                 id="tireSalesDealerList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 5px">
                 {{ advanced ? '收起' : '展开' }}
@@ -78,9 +85,9 @@
           class="sTable fixPagination"
           ref="table"
           size="small"
-          :rowKey="(record) => record.salesBillNo"
+          :rowKey="(record) => record.no"
           :style="{ height: tableHeight+70+'px' }"
-          rowKeyName="salesBillNo"
+          rowKeyName="no"
           :columns="columns"
           :data="loadData"
           :scroll="{ y: tableHeight-30 }"
@@ -91,15 +98,17 @@
           </template>
           <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.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.totalbuyAmount || totalData.totalbuyAmount==0)) ? totalData.totalbuyAmount : '--' }}</a-col>
+              <a-col :md="4" :sm="24">订货金额:{{ (totalData && (totalData.totalstoreAmount || totalData.totalstoreAmount==0)) ? toThousands(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>
       </a-spin>
     </a-card>
+    <!-- 导出提示框 -->
+    <reportModal :visible="showExport" @close="showExport=false"></reportModal>
   </div>
 </template>
 
@@ -111,13 +120,16 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import BizUser from '@/views/common/bizUser.js'
+import reportModal from '@/views/common/reportModal.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
-import { querySaleDealercount, excelSaleOnlineExport, querybyDealerList } from '@/api/reportData'
+import { queryTireList, queryTireCount, celTireOnlineExport } from '@/api/reportData'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 export default {
   name: 'TireSalesDealerList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser },
+  components: { STable, VSelect, rangeDate, subarea, AreaList, BizUser, dealerSubareaScopeList, reportModal },
   data () {
+    const _this = this
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
@@ -133,18 +145,22 @@ export default {
         citySn: undefined,
         districtSn: undefined,
         dealerName: '',
+        dealerSn: '',
         subareaSn: undefined,
         subareaAreaSn: undefined,
-        bizUserSn: undefined
+        bizUserSn: undefined,
+        queryWord: '', // 产品编码
+        productName: ''// 产品名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      showExport: false,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return querybyDealerList(params).then(res => {
+        return queryTireList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -166,13 +182,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: '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: '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: 'warrantyAmount', width: '12%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
+        { title: '客户名称', dataIndex: 'dealerName', width: '12%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户类型', dataIndex: 'dealerTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productcode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '原厂编码', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'productname', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '订货数量', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '订货金额', dataIndex: 'storeAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '客户现有库存数量', dataIndex: 'sellAmount', width: '11%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '已绑质保单数量', dataIndex: 'warrantyAmount', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
     }
   },
@@ -188,9 +207,13 @@ export default {
     }
   },
   methods: {
+    custChange (val) {
+      this.queryParam.dealerName = val.name
+      this.queryParam.dealerSn = val.key
+    },
     // 统计
     getCount (params) {
-      querySaleDealercount(params).then(res => {
+      queryTireCount(params).then(res => {
         if (res.status == 200 && res.data) {
           this.totalData = res.data
         } else {
@@ -214,9 +237,6 @@ export default {
       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
@@ -234,13 +254,17 @@ export default {
       this.queryParam.citySn = undefined
       this.queryParam.districtSn = undefined
       this.queryParam.dealerName = ''
+      this.queryParam.dealerSn = ''
       this.queryParam.subareaSn = undefined
       this.queryParam.subareaAreaSn = undefined
       this.queryParam.bizUserSn = undefined
+      this.queryParam.queryWord = undefined
+      this.queryParam.productName = undefined
       this.totalData = null
+      this.$refs.areaList.clearData()
       if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
         this.$refs.subarea.clearData()
-        this.$refs.areaList.clearData()
       }
       this.$refs.table.clearTable()
     },
@@ -250,8 +274,10 @@ export default {
       const params = _this.queryParam
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(excelSaleOnlineExport, params, '轮胎销售报表(经销商)', function () {
+      _this.showExport = true
+      hdExportExcel(celTireOnlineExport, params, '轮胎统计报表', function () {
         _this.exportLoading = false
+        _this.showExport = false
         _this.spinning = false
       })
     },

+ 1 - 1
src/views/salesManagement/pushOrderManagement/uniqueCodeModal.vue

@@ -68,7 +68,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable } from '@/components'
 import { stockOutList } from '@/api/stockOut'
 export default {
-  name: 'SelectGlOrderModal',
+  name: 'UniqueCodeModal',
   mixins: [commonMixin],
   components: { STable },
   props: {

+ 22 - 10
src/views/salesManagement/receiptPrint/list.vue

@@ -298,23 +298,33 @@ export default {
       const auditInfo = await getBatchLastProcessInstance({ 'businessType': 'FINANCE_BOOK', 'businessSnList': bookSns }).then(res => res.data)
       console.log(auditInfo)
       bookSns.map(item => {
-        // 授信明细
+        // 授信明细,还款明细
         const rs = rows.filter(a => a.bookSn == item)
         let detailItemUseStr = ''
+        let detailPayUseStr = ''
         rs.map(b => {
           if (b.detailItemUseList) {
-            b.detailItemUseList.map((k, i) => {
-              detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ')' + (i == b.detailItemUseList.length - 1 ? '。' : ';')
-            })
+            detailItemUseStr = this.getUseDetailInfo(b.detailItemUseList)
+          }
+          if(b.detailItemPayList){
+            detailPayUseStr = this.getUseDetailInfo(b.detailItemPayList)
           }
         })
         // 审核信息
         const auditStr = auditInfo ? this.getAuditInfo(auditInfo[item]) : ''
-        retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
+        retArr.push({ audit: auditStr, detail: detailItemUseStr, payDetail:detailPayUseStr, subList: rs })
       })
       console.log(retArr, '------------')
       this.handlePrint(retArr, 1, rows, bookSns)
     },
+    // 获取授信西悉尼
+    getUseDetailInfo(list){
+      let ret = ''
+      list.map((k, i) => {
+        ret = ret + k.itemName + '(' + k.itemAmount + ')' + (i == list.length - 1 ? '。' : ';')
+      })
+      return ret
+    },
     // 获取审核信息
     getAuditInfo (auditList) {
       let auditStr = ''
@@ -353,16 +363,18 @@ export default {
       this.spinning = true
       this.showTipModal = true
       let detailItemUseStr = ''
-
+      let detailPayUseStr = ''
       this.$nextTick(() => {
+        // type == 0 单个打印时
         if (type == 0 && row.detailItemUseList) {
-          row.detailItemUseList.map(k => {
-            detailItemUseStr = detailItemUseStr + k.itemName + '(' + k.itemAmount + ');'
-          })
+          detailItemUseStr = this.getUseDetailInfo(row.detailItemUseList)
+        }
+        if (type == 0 && row.detailItemPayList) {
+          detailPayUseStr = this.getUseDetailInfo(row.detailItemPayList)
         }
         // 审核信息
         const auditStr = auditInfo ? this.getAuditInfo(auditInfo[list.bookSn]) : ''
-        this.$refs.printModel.getData(type ? row : [{ audit: auditStr, detail: detailItemUseStr, subList: [row] }], type ? list : [list])
+        this.$refs.printModel.getData(type ? row : [{ audit: auditStr, detail: detailItemUseStr, payDetail: detailPayUseStr, subList: [row] }], type ? list : [list])
       })
     },
     printOk (res) {

+ 4 - 1
src/views/salesManagement/receiptPrint/printModel.vue

@@ -62,7 +62,10 @@
                         <td style="padding:3pt 1pt;width: 54pt;word-break:break-all;">{{ item.explainInfo }}</td>
                       </tr>
                     </table>
-                    <div style="padding:5pt 0;border-bottom: 1px solid #333;">使用授信明细:{{ fcItem.detail||'暂无。' }}</div>
+                    <div style="padding:5pt 0;border-bottom: 1px solid #333;">
+                      <div style="width:48%;display:inline-block;">使用授信明细:{{ fcItem.detail||'暂无。' }}</div>
+                      <div style="width:48%;display:inline-block;marign-left:1%;">授信还款明细: {{ fcItem.payDetail||'暂无。' }}</div>
+                    </div>
                     <div style="padding:5pt 0;">
                       审批人员:{{ fcItem.audit||'暂无。' }}
                     </div>

+ 2 - 2
vue.config.js

@@ -108,9 +108,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.103:8602/ocs-admin',
+        target: 'http://192.168.2.103:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {