lilei 2 سال پیش
والد
کامیت
9f4f4035d4

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.1.48",
+    "version": "2.1.49",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 5 - 1
src/views/common/productBrand.js

@@ -2,7 +2,7 @@ import { productBrandQuery } from '@/api/productBrand'
 const ProductBrand = {
   template: `
       <a-select
-        placeholder="请选择产品品牌"
+        :placeholder="placeholder"
         :id="id"
         allowClear
         :value="defaultVal"
@@ -23,6 +23,10 @@ const ProductBrand = {
       type: String,
       default: ''
     },
+    placeholder:{
+      type: String,
+      default: '请选择产品品牌'
+    },
     sysFlag: {
       type: String,
       default: ''

+ 5 - 1
src/views/common/productTypeAll.js

@@ -11,7 +11,7 @@ const ProductType = {
         :show-search="{ filter }"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
         :id="id"
-        placeholder="请选择产品分类"
+        :placeholder="placeholder"
         allowClear />
     `,
   props: {
@@ -21,6 +21,10 @@ const ProductType = {
         return []
       }
     },
+    placeholder:{
+      type: String,
+      default: '请选择产品分类'
+    },
     id: {
       type: String,
       default: ''

+ 24 - 12
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -298,6 +298,14 @@ export default {
     },
     accountTypeChange (v) {
       this.$refs.ruleForm.clearValidate()
+      // 已选经销商
+      if (this.form.dealerSn) {
+        // 查询账户信息
+        this.getLastPayerAccount()
+      } else {
+        this.form.licenseName = ''
+        this.form.payerAccountInfo = ''
+      }
     },
     handleChange (v) {
       console.log(v)
@@ -305,26 +313,28 @@ export default {
       this.bankNameList = row.bankName
       this.form.bankName = undefined
     },
+    getLastPayerAccount () {
+      this.spinning = true
+      this.confirmLoading = true
+      lastPayerAccountInfo({
+        payerAccountType: this.form.payerAccountType,
+        dealerSn: this.form.dealerSn
+      }).then(res => {
+        this.spinning = false
+        this.confirmLoading = false
+        this.form.payerAccountInfo = res.data || ''
+      })
+    },
     // 客户
     custChange (v) {
       console.log(v)
       if (v && v.key) {
         this.form.dealerSn = v.key
-        this.form.payerName = v.name
+        this.form.payerName = v.row ? v.row.dealerName : ''
         this.form.dealerCode = v.row ? v.row.kdMidCustomerFnumber : ''
         this.form.licenseName = v.row ? v.row.licenseName : ''
-
         // 查询账户信息
-        this.spinning = true
-        this.confirmLoading = true
-        lastPayerAccountInfo({
-          payerAccountType: this.form.payerAccountType,
-          dealerSn: this.form.dealerSn
-        }).then(res => {
-          this.spinning = false
-          this.confirmLoading = false
-          this.form.payerAccountInfo = res.data || ''
-        })
+        this.getLastPayerAccount()
       } else {
         this.form.dealerSn = ''
         this.form.payerName = ''
@@ -370,9 +380,11 @@ export default {
       console.log(form)
       if ((form.useCreditFlag && form.detailItemUseList.length == 0) || this.validItem(form.detailItemUseList)) {
         this.$message.info('使用授信项目不能为空')
+        return
       }
       if ((form.payCreditFlag && form.detailItemPayList.length == 0) || this.validItem(form.detailItemPayList)) {
         this.$message.info('授信还款项目不能为空')
+        return
       }
       _this.spinning = true
       financeBookDetailSave(form).then(res => {

+ 1 - 1
src/views/productManagement/shelfNoManage/editHwModal.vue

@@ -85,7 +85,7 @@ export default {
         if (valid) {
           const form = JSON.parse(JSON.stringify(_this.form))
           const params = {
-            'stackPlaceCode': form.stackPlaceCode,
+            'stackPlaceCode': form.stackPlaceCode.toUpperCase(),
             'product': {
               'productSn': _this.nowData.productVO.productSn
             }

+ 17 - 4
src/views/reportData/expenseAccountReport/bearerList.vue

@@ -13,7 +13,11 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="统计月份" prop="months">
-                <months v-model="queryParam.months" placeholder="请选择月份(多选)" mode="multiple" style="width: 100%;"/>
+                <a-input :value="queryParam.months?queryParam.months.join(','):''" placeholder="请选择月份(多选)" style="width: 100%;">
+                  <span style="cursor: pointer;" slot="addonAfter" @click="openMonth">
+                    点击选择
+                  </span>
+                </a-input>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -82,13 +86,14 @@
     </a-spin>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <selectMonth ref="months" @ok="getDateValue"></selectMonth>
   </a-card>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import months from '@/views/common/months'
+import selectMonth from './selectMonth.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import department from '@/views/expenseManagement/expenseReimbursement/department.js'
@@ -97,7 +102,7 @@ import { expenseCollectReportQueryPageByTarget, expenseCollectReportQueryCountBy
 export default {
   name: 'AllCountryCostReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, months, department, custList, reportModal },
+  components: { STable, VSelect, selectMonth, department, custList, reportModal },
   data () {
     return {
       spinning: false,
@@ -196,7 +201,7 @@ export default {
       if (this.queryParam.months) {
         // 月份排序
         this.queryParam.months.sort((a, b) => {
-          return a.split('-')[1] - b.split('-')[1]
+          return a.replace('-', '') - b.replace('-', '')
         })
         for (let i = 0; i < this.queryParam.months.length; i++) {
           const item = this.queryParam.months[i]
@@ -222,6 +227,14 @@ export default {
       })
       this.columns = arr
     },
+    // 选择月份
+    openMonth () {
+      this.$refs.months.showModal(this.queryParam.months, 'm1')
+    },
+    getDateValue (data) {
+      console.log(data)
+      this.queryParam.months = data
+    },
     targetChange (v) {
       // 清空费用承担方名称
       this.queryParam.targetSn = undefined

+ 17 - 5
src/views/reportData/expenseAccountReport/categoryList.vue

@@ -11,9 +11,13 @@
           :model="queryParam"
           @keyup.enter.native="handleSearch">
           <a-row :gutter="15">
-            <a-col :md="8" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-model-item label="统计月份" prop="months">
-                <months v-model="queryParam.months" placeholder="请选择月份(多选)" mode="multiple" style="width: 100%;"/>
+                <a-input :value="queryParam.months?queryParam.months.join(','):''" placeholder="请选择月份(多选)" style="width: 100%;">
+                  <span style="cursor: pointer;" slot="addonAfter" @click="openMonth">
+                    点击选择
+                  </span>
+                </a-input>
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -62,13 +66,14 @@
     </a-spin>
     <!-- 导出提示框 -->
     <reportModal :visible="showExport" @close="showExport=false"></reportModal>
+    <selectMonth ref="months" @ok="getDateValue"></selectMonth>
   </a-card>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
-import months from '@/views/common/months'
+import selectMonth from './selectMonth.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import reportModal from '@/views/common/reportModal.vue'
 import ProductType from '@/views/common/productType.js'
@@ -76,7 +81,7 @@ import { expenseCollectReportQueryPageByProductType, expenseCollectReportQueryCo
 export default {
   name: 'AllCountryCostReportList',
   mixins: [commonMixin],
-  components: { STable, VSelect, months, ProductType, reportModal },
+  components: { STable, VSelect, selectMonth, ProductType, reportModal },
   data () {
     return {
       spinning: false,
@@ -174,7 +179,7 @@ export default {
       if (this.queryParam.months) {
         // 月份排序
         this.queryParam.months.sort((a, b) => {
-          return a.split('-')[1] - b.split('-')[1]
+          return a.replace('-', '') - b.replace('-', '')
         })
         for (let i = 0; i < this.queryParam.months.length; i++) {
           const item = this.queryParam.months[i]
@@ -200,6 +205,13 @@ export default {
       })
       this.columns = arr
     },
+    // 选择月份
+    openMonth () {
+      this.$refs.months.showModal(this.queryParam.months, 'm1')
+    },
+    getDateValue (data) {
+      this.queryParam.months = data
+    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''

+ 192 - 0
src/views/reportData/expenseAccountReport/selectMonth.vue

@@ -0,0 +1,192 @@
+<template>
+  <a-modal
+    :title="title"
+    style="top: 20px;"
+    v-model="visible"
+    :width="'900px'"
+    :zIndex="12000"
+    :footer="null"
+    @cancel="cancel"
+    centered
+  >
+    <a-row>
+      <a-col :span="5">
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="年份"
+        >
+          <a-select
+            style="width:80px"
+            :getPopupContainer="triggerNode=>triggerNode.parentNode"
+            @change="selectTime"
+            placeholder="请选择"
+            v-model="OneY" >
+            <a-select-option v-for="(i,j) in DateList" :key="j" :value="i.TimeYear">{{ i.TimeYear }}</a-select-option>
+          </a-select>
+        </a-form-item>
+      </a-col>
+      <a-col :span="19">
+        <div class="conterList">
+          <a-checkbox-group v-model="optTime[curIndex].queryTime" @change="onChange" >
+            <a-checkbox
+              v-for="(item,index) in DateList[curIndex].queryTime"
+              :key="index"
+              :value="`${DateList[curIndex].TimeYear}-${(item<=9)?`0${item}`:item}`"
+              class="onSelect">
+              {{ item }}月
+            </a-checkbox>
+          </a-checkbox-group>
+        </div>
+      </a-col>
+    </a-row>
+    <!-- <a-row style="margin-top:5px;">
+      <a-col :span="24">
+        <div><label style="margin: 5px 5px 0 0;display:inline-block;"><span style="color:#f00">*</span>已选择:</label>
+          <a-tag
+            color="#40a9ff"
+            style="margin-bottom: 3px;"
+            closable
+            @close="()=>closeTime(curIndex,v)"
+            v-for="v in optTimes"
+            :key="v + '-1'">{{ v }}</a-tag>
+        </div>
+      </a-col>
+    </a-row> -->
+    <div class="btn-cont">
+      <a-button @click="cancel" style="margin-right: 15px;">取消</a-button>
+      <a-button type="primary" @click="handleSubmit">确定</a-button>
+    </div>
+  </a-modal>
+</template>
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      title: '月份选择',
+      DateList: [],
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 10 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 13 }
+      },
+      optTime: [],
+      OneY: null,
+      curIndex: 0,
+      optTimes: null,
+      ctype: null
+
+    }
+  },
+  created () {
+    this.init()
+  },
+  methods: {
+    cancel () {
+      this.visible = false
+    },
+    // info 选中的数据 type 可传可不传 主要做区分
+    showModal (info, type) {
+      this.visible = true
+      this.ctype = type
+      this.optTimes = info || null
+      if (info) this.editTime(info)
+    },
+    init () {
+      const _this = this
+      const _opt = {}
+      const _optTime = {}
+      const arr = new Array(12)
+      const optDate = this.getDateList()
+      optDate.map((item, index) => {
+        _opt[index] = { TimeYear: item, queryTime: [] }
+        _optTime[index] = { TimeYear: item, queryTime: [] }
+        for (let i = 1; i <= arr.length; i++) {
+          _opt[index].queryTime.push(i)
+        }
+      })
+      _this.optTime = _optTime
+      _this.DateList = _opt
+    },
+    getDateList () {
+      const Dates = new Date()
+      const year = Dates.getFullYear()
+      this.OneY = year
+      const optDate = []
+      for (let i = 2022; i <= year; i++) {
+        optDate.push(i)
+      }
+      return optDate.reverse()
+    },
+    editTime (info) {
+      const _optTime = this.optTime
+      const _opt = this.optTimes.map(v => { return v.substring(0, 4) })
+      for (const item in _optTime) {
+        _opt.map((items, indexs) => {
+          if (items == _optTime[item].TimeYear) {
+            _optTime[item].queryTime.push(this.optTimes[indexs])
+          }
+        })
+      }
+      // console.log(_optTime,'_optTime_optTime')
+    },
+    handleSubmit () {
+      const _this = this
+      _this.visible = false
+      _this.$emit('ok', _this.optTimes, _this.ctype)
+      _this.optTimes = []
+      for (const i in _this.optTime) {
+        _this.optTime[i].queryTime = []
+      }
+    },
+    selectTime (info, Node) {
+      const _this = this
+      _this.OneY = info
+      _this.curIndex = parseInt(Node.key)
+    },
+    onChange (info) {
+      const _this = this
+      const _opt = _this.optTime
+      const arr = []
+      for (const item in _opt) {
+        if (_opt[item].queryTime.length > 0) _opt[item].queryTime.filter(v => { arr.push(v) })
+      }
+      _this.optTimes = arr
+    },
+    closeTime (index, time) {
+      this.optTime[index].queryTime = this.optTime[index].queryTime.filter(v => {
+        return v !== time
+      })
+      // let _opt = this.optTime;
+      // let s = {};
+      // for ( let i in _opt ){
+      //  if(_opt[i].queryTime.length > 0) _opt[i].queryTime.filter(v=>{
+      //         return v !== time
+      //     })
+      // }
+      this.optTimes = this.optTimes.filter(v => {
+        return v !== time
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+.conterList{
+    display: block;
+    width: 100%;
+    border-radius: 6px;
+    .onSelect{
+        width: 110px;
+        margin: 0 0 10px 0;
+    }
+}
+.btn-cont {
+    text-align: center;
+    margin: 35px 0 10px;
+  }
+</style>