ソースを参照

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

chenrui 1 年間 前
コミット
51e8d7fd86

+ 1 - 0
src/store/modules/app.js

@@ -36,6 +36,7 @@ const app = {
     employeeList: [], // 申请人列表
     defectiveReturnReason: [], // 不良品申请退货列表
     goodReturnReason: [], // 良品申请退货列表
+    bookReason:[], // 收款事由
     tempBillOfData: null, // 临时存储收货单数据
     authMenusList: [], // 权限菜单数据
     priceAuthOptions: [], // 价格权限选项

+ 11 - 0
src/views/Home.vue

@@ -118,6 +118,17 @@ export default {
         key: 'defectiveReturnReason',
         isEnable: 1
       })
+      // 收款事由
+      vm.$store.state.app.bookReason = [
+        { dispName: '品牌货款', code: '0' },
+        { dispName: '轮胎货款', code: '1' },
+        { dispName: '品牌+轮胎货款', code: '2' },
+        { dispName: '蓄电池直发货款', code: '3' },
+        { dispName: '品牌+授信款还款', code: '4' },
+        { dispName: '转置还款', code: '5' },
+        { dispName: '分期还款', code: '6' },
+        { dispName: '品牌+分期还款', code: '7' }
+      ]
       // 菜单数据
       vm.getYyMenuList()
       vm.$store.state.app.priceAuthOptions = [

+ 71 - 0
src/views/common/bookReason.js

@@ -0,0 +1,71 @@
+const BookReason = {
+  template: `
+      <a-select
+        :placeholder="placeholder"
+        style="width:100%"
+        :size="size"
+        :id="id"
+        allowClear
+        :value="defaultVal"
+        :showSearch="true"
+        @change="handleChange"
+        option-filter-prop="children"
+        :dropdownMatchSelectWidth="false"
+        :filter-option="filterOption">
+        <a-select-option v-for="item in list" :key="item.code" :value="item.code">
+          {{item.dispName}}
+        </a-select-option>
+      </a-select>
+    `,
+  props: {
+    value: {
+      type: String,
+      default: undefined
+    },
+    id: {
+      type: String,
+      default: ''
+    },
+    placeholder: {
+      type: String,
+      default: '请选择收款事由'
+    },
+    size: {
+      type: String,
+      default: 'default'
+    }
+  },
+  data() {
+    return {
+      defaultVal: this.value,
+      list: []
+    };
+  },
+  created() {
+    this.list = this.$store.state.app.bookReason
+  },
+  watch: {
+    value(newValue, oldValue) {
+      this.defaultVal = newValue || undefined
+    }
+  },
+  methods: {
+    filterOption(input, option) {
+      return (
+        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+      );
+    },
+    handleChange(value) {
+      this.defaultVal = value;
+      const row = this.list.find(item => item.code == value)
+      this.$emit('change', value, row);
+      this.$emit('input', value);
+    },
+    getCodeByName(value){
+      const row = this.list.find(item => item.dispName == value)
+      return row? row.code : ''
+    }
+  },
+};
+
+export default BookReason

+ 17 - 9
src/views/financialManagement/financialCollection/baseModal.vue

@@ -20,7 +20,7 @@
           <employee style="width: 100%;" @change="employeeChange" ref="applyPerson" v-model="form.applyPersonSn"></employee>
         </a-form-model-item>
         <a-form-model-item label="收款事由" prop="bookReason">
-          <a-input :maxLength="100" placeholder="请输入收款事由(最多100个字符)" v-model="form.bookReason"></a-input>
+          <bookReason ref="bookReason" v-model="bookReasonCode" @change="updateReason"></bookReason>
         </a-form-model-item>
         <a-form-model-item label="付款方类型" prop="payerType">
           <v-select
@@ -68,11 +68,12 @@ import { commonMixin } from '@/utils/mixin'
 import { VSelect, Upload } from '@/components'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import bookReason from '@/views/common/bookReason'
 import { financeBookSave, financeBookFindBySn, queryLastFinishDingUser } from '@/api/financeBook.js'
 export default {
   name: 'FcBaseModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, employee, dealerSubareaScopeList },
+  components: { VSelect, Upload, employee, dealerSubareaScopeList, bookReason },
   props: {
     show: [Boolean],
     bookSn: {
@@ -95,16 +96,17 @@ export default {
       attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
       form: {
         applyPersonSn: undefined,
-        bookReason: '',
+        bookReason: undefined,
         payerType: 'DEALER',
         dealerSn: undefined,
         payerName: undefined,
         remarks: '',
         attachmentList: ''
       },
+      bookReasonCode: undefined,
       rules: {
         applyPersonSn: [ { required: true, message: '请选择申请人', trigger: ['change', 'blur'] } ],
-        bookReason: [ { required: true, message: '请输入收款事由', trigger: ['change', 'blur'] } ],
+        bookReason: [ { required: true, message: '请选择收款事由', trigger: ['change', 'blur'] } ],
         payerType: [ { required: true, message: '请选择付款方类型', trigger: ['change', 'blur'] } ],
         dealerSn: [ { required: true, message: '请选择付款方', trigger: ['change', 'blur'] } ],
         payerName: [ { required: true, message: '请输入付款方名称', trigger: ['change', 'blur'] } ]
@@ -124,9 +126,11 @@ export default {
       this.form.dealerSn = ''
       this.form.payerName = ''
     },
+    updateReason (val, record) {
+      this.form.bookReason = record.dispName
+    },
     // 客户
     custChange (v) {
-      console.log(v)
       if (v && v.key) {
         this.form.dealerSn = v.key
         this.form.payerName = v.row ? v.row.dealerName : ''
@@ -194,6 +198,10 @@ export default {
               this.$refs.settleClientName.getDetail(this.form.dealerSn)
             })
           }
+          // 回显收款事由
+          this.$nextTick(() => {
+            this.bookReasonCode = this.$refs.bookReason.getCodeByName(this.form.bookReason)
+          })
         } else {
           this.$refs.ruleForm.resetFields()
         }
@@ -206,7 +214,7 @@ export default {
       this.$emit('cancel')
       this.$refs.ruleForm.resetFields()
     },
-   async pageInit () {
+    async pageInit () {
       this.$nextTick(() => {
         this.attachList = []
         this.$refs.attachList.setFileList('')
@@ -215,10 +223,10 @@ export default {
           this.$refs.settleClientName.resetForm()
         }
       })
-
+      this.bookReasonCode = undefined
       this.form = {
         applyPersonSn: undefined,
-        bookReason: '',
+        bookReason: undefined,
         payerType: 'DEALER',
         dealerSn: undefined,
         payerName: undefined,
@@ -228,7 +236,7 @@ export default {
 
       if (this.bookSn) { //  编辑页
         this.getDetail()
-      }else{
+      } else {
         // 最近一次审核人
         const lastAuditInfo = await queryLastFinishDingUser().then(res => res.data)
         this.form.applyPersonSn = lastAuditInfo ? lastAuditInfo.applyPersonSn : undefined

+ 2 - 3
src/views/salesManagement/receiptPrint/list.vue

@@ -321,14 +321,13 @@ export default {
         const auditStr = auditInfo ? this.getAuditInfo(auditInfo[item]) : ''
         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 ? '' : ',')
+        ret = ret + k.itemName + '(' + k.itemAmount + ')' + (i == list.length - 1 ? '' : ',')
       })
       return ret
     },
@@ -338,7 +337,7 @@ export default {
       if (auditList && auditList.taskVOList) {
         const auditLists = auditList.taskVOList.filter(item => item.userType == '审批人')
         auditLists.map((a, i) => {
-          auditStr = auditStr + a.userName + '(' + a.state + ')' + (i == auditLists.length - 1 ? '' : ',')
+          auditStr = auditStr + a.userName + '(' + a.state + ')' + (i == auditLists.length - 1 ? '' : ',')
         })
       }
       return auditStr

+ 33 - 29
src/views/salesManagement/receiptPrint/printModel.vue

@@ -11,63 +11,65 @@
           ref="printBox"
           cellspacing="0"
           cellpadding="0"
-          style="border-collapse: collapse;width: 564pt;font-size:14px;">
+          style="border-collapse: collapse;width: 564pt;font-size:14px;line-height: normal;">
           <tr>
             <td>
               <div class="print-box" style="width: 564pt;margin-left:1.5pt;">
-                <div style="text-align:center;margin:5pt 0;font-size:22px;font-weight: bold;">收款通知单</div>
+                <div style="text-align:center;margin:5pt 0;font-size:20px;font-weight: bold;">收款通知单</div>
                 <div>
                   <div>
                     <table border="1" style="width: 564pt;border-collapse: collapse;text-align: center;">
                       <tr>
-                        <th style="width: 56pt;background:#f6f6f6;">日期</th>
-                        <th style="width: 62pt;background:#f6f6f6;">客户名称</th>
-                        <th style="width: 62pt;background:#f6f6f6;">营业执照名称</th>
-                        <th style="width: 54pt;background:#f6f6f6;">订单金额</th>
-                        <th style="width: 54pt;background:#f6f6f6;">收款金额</th>
-                        <th style="width: 54pt;background:#f6f6f6;">使用授信</th>
-                        <th style="width: 54pt;background:#f6f6f6;">余款抵扣</th>
-                        <th style="width: 54pt;background:#f6f6f6;">汇入银行</th>
-                        <th style="width: 54pt;background:#f6f6f6;">足额打款</th>
-                        <th style="width: 60pt;background:#f6f6f6;">说明</th>
+                        <th style="width: 36pt;background:#f6f6f6;">日期</th>
+                        <th style="background:#f6f6f6;" :style="{width:!hideBookReson?'60pt':'90pt'}">客户名称</th>
+                        <th style="background:#f6f6f6;" :style="{width:!hideBookReson?'60pt':'90pt'}">营业执照<br>名称</th>
+                        <th style="width: 52pt;background:#f6f6f6;">订单金额</th>
+                        <th style="width: 52pt;background:#f6f6f6;">收款金额</th>
+                        <th style="width: 52pt;background:#f6f6f6;">使用授信</th>
+                        <th style="width: 52pt;background:#f6f6f6;">余款抵扣</th>
+                        <th style="width: 52pt;background:#f6f6f6;">汇入银行</th>
+                        <th style="width: 36pt;background:#f6f6f6;">足额<br>打款</th>
+                        <th style="width: 52pt;background:#f6f6f6;">说明</th>
+                        <th style="width: 60pt;background:#f6f6f6;" v-if="!hideBookReson">收款事由</th>
                       </tr>
                       <tr v-for="item in fcItem.subList" :key="item.bookDetailSn">
-                        <td style="padding:3pt 1pt;width: 50pt;">{{ moment(item.receiptDate).format('YYYY/MM/DD') }}</td>
-                        <td style="padding:3pt 1pt;width: 56pt;text-align:left;">
+                        <td style="padding:3pt 1pt;width: 34pt;">{{ item.receiptDate.split('-')[0] }}<br>{{ item.receiptDate.split('-')[1]+'/'+item.receiptDate.split('-')[2] }}</td>
+                        <td style="padding:3pt 1pt;word-break:break-all;" :style="{width:!hideBookReson?'58pt':'88pt'}">
                           {{ item.payerName }}
                           <div>
                             {{ item.dealerEntity ? item.dealerEntity.kdMidCustomerFnumber : '' }}
                           </div>
                         </td>
-                        <td style="padding:3pt 1pt;width: 56pt;text-align:left;word-break:break-all;">
+                        <td style="padding:3pt 1pt;word-break:break-all;" :style="{width:!hideBookReson?'58pt':'88pt'}">
                           {{ item.payerAccountInfo }}
                         </td>
-                        <td style="padding:3pt 1pt;width: 48pt;text-align:center;">
+                        <td style="padding:3pt 1pt;width: 50pt;text-align:center;">
                           {{ item.orderAmount?item.orderAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt 1pt;width: 48pt;text-align:center;">
+                        <td style="padding:3pt 1pt;width: 50pt;text-align:center;">
                           {{ item.receiptAmount?item.receiptAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt 1pt;width: 48pt;text-align:center;">
+                        <td style="padding:3pt 1pt;width: 50pt;text-align:center;">
                           {{ getTotal(item.detailItemUseList||[]) }}
                         </td>
-                        <td style="padding:3pt 1pt;width: 48pt;text-align:center;">
+                        <td style="padding:3pt 1pt;width: 50pt;text-align:center;">
                           {{ item.balanceAmount?item.balanceAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt 1pt;width: 48pt;">
+                        <td style="padding:3pt 1pt;width: 50pt;">
                           {{ item.bankAccount }}<br>
                           {{ item.bankName }}
                         </td>
-                        <td style="padding:3pt 1pt;width: 48pt;">{{ item.fullPaymentFlagDictValue }}</td>
-                        <td style="padding:3pt 1pt;width: 54pt;word-break:break-all;">{{ item.explainInfo }}</td>
+                        <td style="padding:3pt 1pt;width: 34pt;">{{ item.fullPaymentFlagDictValue }}</td>
+                        <td style="padding:3pt 1pt;width: 50pt;word-break:break-all;">{{ item.explainInfo }}</td>
+                        <td style="padding:3pt 1pt;width: 58pt;word-break:break-all;" v-if="!hideBookReson">{{ item.bookReason }}</td>
                       </tr>
                     </table>
-                    <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 style="padding:5pt 0;border-bottom: 1px solid #333;overflow:hidden;">
+                      <div style="width:49%;display:flex;float:left;">使用授信明细:<div>{{ fcItem.detail||'暂无' }}</div></div>
+                      <div style="width:49%;display:flex;float:right;">授信还款明细:<div>{{ fcItem.payDetail||'暂无' }}</div></div>
                     </div>
                     <div style="padding:5pt 0;">
-                      审批人员:{{ fcItem.audit||'暂无' }}
+                      审批人员:{{ fcItem.audit||'暂无' }}
                     </div>
                   </div>
                 </div>
@@ -93,7 +95,8 @@ export default {
       spinning: false,
       detail: null,
       financeBookList: [],
-      printNums: []
+      printNums: [],
+      hideBookReson: false
     }
   },
   methods: {
@@ -114,15 +117,16 @@ export default {
       // html, type, callback, printLogParams
       this.spinning = true
       jGPlPrint(result, 'print', function (res) {
-        if(res){
+        if (res) {
           _this.handleCommonCancel()
         }
         _this.$emit('printOk', res)
         _this.spinning = false
       }, this.printNums, '收款单')
     },
-    getData (data, list) {
+    getData (data, list, hideBookReson) {
       console.log(data, list)
+      this.hideBookReson = hideBookReson
       this.financeBookList = data
       list.map(item => {
         this.printNums.push({

+ 4 - 4
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -232,10 +232,10 @@ export default {
         retArr.push({ audit: auditStr, detail: detailItemUseStr, subList: rs })
       })
       console.log(retArr, '------------')
-      if(retArr.length){
+      if (retArr.length) {
         this.handlePrint(retArr, rows)
-      }else{
-        this.$message.info("此收款单明细为空或没有相关数据权限")
+      } else {
+        this.$message.info('此收款单明细为空或没有相关数据权限')
         this.spinning = false
       }
     },
@@ -245,7 +245,7 @@ export default {
       this.showTipModal = true
       this.$nextTick(() => {
         // 审核信息
-        this.$refs.printModel.getData(row, list)
+        this.$refs.printModel.getData(row, list, true)
       })
     },
     canselPrintView () {

+ 12 - 12
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -57,7 +57,7 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="户类型">
+                <a-form-item label="户类型">
                   <dealerType
                     id="shortageStatisticsCList-dealerType"
                     changeOnSelect
@@ -241,23 +241,23 @@ export default {
       const arr = [
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 110, align: 'center' },
-        { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 100, align: 'center' },
+        { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 60, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: 140, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '仓库', dataIndex: 'warehouseName', width: 100, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户类型', dataIndex: 'dealerTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '创建时间', dataIndex: 'createDate', width: 130, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '二级分类', dataIndex: 'productEntity.productTypeName2', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '仓库', dataIndex: 'warehouseName', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        // { title: '客户类型', dataIndex: 'dealerTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '二级分类', dataIndex: 'productEntity.productTypeName2', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: 180, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'left', scopedSlots: { customRender: 'productCode' } },
+        { title: '产品编码', dataIndex: 'productCode', width: 120, align: 'left', scopedSlots: { customRender: 'productCode' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品状态', dataIndex: 'productEntity.stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '缺货数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品状态', dataIndex: 'productEntity.stateDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '缺货数量', dataIndex: 'qty', width: 60, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '缺货成本金额', dataIndex: 'totalCostAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '缺货实售金额', dataIndex: 'totalSalesAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '缺货开单金额', dataIndex: 'totalAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '操作员', dataIndex: 'operatorName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作员', dataIndex: 'operatorName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '缺货说明', dataIndex: 'productEntity.offlineReasonType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
         { title: '通用编码', dataIndex: 'productEntity.commonCode', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
       ]

+ 11 - 2
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -120,8 +120,8 @@
             <a-col :span="16">
               <a-form-model-item style="margin-bottom:10px" label="附件" :label-col="{span:2}" :wrapper-col="{span:22}">
                 <div style="line-height:26px;">
-                  <div v-for="item in form.attachmentList" :key="item.id">
-                    <a :href="item.filePath">{{ item.fileName }}</a>
+                  <div v-for="item in form.attachmentList" :key="item.id" @click="dowloadExcel(item.filePath)">
+                    <a href="#">{{ item.fileName }}</a>
                   </div>
                 </div>
               </a-form-model-item>
@@ -242,6 +242,15 @@ export default {
     }
   },
   methods: {
+    dowloadExcel (url) {
+      const elt = document.createElement('a')
+      elt.setAttribute('href', url)
+      elt.setAttribute('download', '')
+      elt.style.display = 'none'
+      document.body.appendChild(elt)
+      elt.click()
+      document.body.removeChild(elt)
+    },
     // 打印预览/快捷打印
     handlePrint (type) {
       const _this = this