浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
577a53c5bd

+ 52 - 5
src/views/financialManagement/financialCollection/baseModal.vue

@@ -22,6 +22,21 @@
         <a-form-model-item label="收款事由" prop="bookReason">
           <a-input :maxLength="100" placeholder="请输入收款事由(最多100个字符)" v-model="form.bookReason"></a-input>
         </a-form-model-item>
+        <a-form-model-item label="付款方类型" prop="payerType">
+          <v-select
+            v-model="form.payerType"
+            showType="radio"
+            code="PAYER_TYPE"
+            @change="payerTypeChange"
+            placeholder="请选择付款方类型"
+          ></v-select>
+        </a-form-model-item>
+        <a-form-model-item v-if="form.payerType=='DEALER'" label="付款方" prop="dealerSn">
+          <dealerSubareaScopeList ref="settleClientName" @change="custChange" />
+        </a-form-model-item>
+        <a-form-model-item v-if="form.payerType=='DEPT'" label="付款方" prop="payerName">
+          <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input>
+        </a-form-model-item>
         <a-form-model-item label="备注">
           <a-textarea :rows="4" :maxLength="500" placeholder="请输入备注(最多500个字符)" v-model="form.remarks"></a-textarea>
         </a-form-model-item>
@@ -51,11 +66,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 { financeBookSave, financeBookFindBySn } from '@/api/financeBook.js'
 export default {
   name: 'FcBaseModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, employee },
+  components: { VSelect, Upload, employee, dealerSubareaScopeList },
   props: {
     show: [Boolean],
     itemSn: {
@@ -80,12 +96,18 @@ export default {
       form: {
         applyPersonSn: undefined,
         bookReason: '',
+        payerType: 'DEALER',
+        dealerSn: undefined,
+        payerName: undefined,
         remarks: '',
         attachmentList: ''
       },
       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'] } ]
       }
     }
   },
@@ -96,6 +118,23 @@ export default {
         this.$refs.ruleForm.validateField(['applyPersonSn'])
       })
     },
+    payerTypeChange (v) {
+      this.$refs.ruleForm.clearValidate()
+      // 重置数据
+      this.form.dealerSn = ''
+      this.form.payerName = ''
+    },
+    // 客户
+    custChange (v) {
+      console.log(v)
+      if (v && v.key) {
+        this.form.dealerSn = v.key
+        this.form.payerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.form.dealerSn = ''
+        this.form.payerName = ''
+      }
+    },
     //  附件上传
     changeAttach (file) {
       this.attachList = JSON.parse(file)
@@ -149,9 +188,11 @@ export default {
           this.attachList = res.data.attachmentList
           this.$refs.attachList.setFileList(this.attachList)
           // 回显客户
-          // if (this.form.applyPersonSn) {
-          //   this.$refs.applyPerson.getDetail(this.form.applyPersonSn)
-          // }
+          if (this.form.dealerSn && this.form.payerType == 'DEALER') {
+            this.$nextTick(() => {
+              this.$refs.settleClientName.getDetail(this.form.dealerSn)
+            })
+          }
         } else {
           this.$refs.ruleForm.resetFields()
         }
@@ -169,9 +210,15 @@ export default {
         this.attachList = []
         this.$refs.attachList.setFileList('')
         this.$refs.ruleForm.resetFields()
+        if (this.$refs.settleClientName) {
+          this.$refs.settleClientName.resetForm()
+        }
         this.form = {
           applyPersonSn: undefined,
           bookReason: '',
+          payerType: 'DEALER',
+          dealerSn: undefined,
+          payerName: undefined,
           remarks: '',
           attachmentList: ''
         }

+ 2 - 0
src/views/financialManagement/financialCollection/detail.vue

@@ -15,6 +15,8 @@
             <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
             <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
             <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方类型">{{ detailData&&detailData.payerTypeDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方">{{ detailData&&detailData.payerName || '--' }}</a-descriptions-item>
             <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
             <a-descriptions-item label="附件" :span="3">
               <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">

+ 5 - 1
src/views/financialManagement/financialCollection/edit.vue

@@ -18,6 +18,8 @@
             <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
             <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
             <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方类型">{{ detailData&&detailData.payerTypeDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="付款方">{{ detailData&&detailData.payerName || '--' }}</a-descriptions-item>
             <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
             <a-descriptions-item label="附件" :span="3">
               <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
@@ -238,7 +240,9 @@ export default {
     handleEdit (row) {
       this.openFcDetailModal = true
       if (row && row.bookDetailSn) {
-        this.$refs.fcDetailModal.getDetail(row.bookDetailSn)
+        this.$refs.fcDetailModal.getDetail(row.bookDetailSn, this.detailData)
+      } else {
+        this.$refs.fcDetailModal.setDetail(this.detailData)
       }
     },
     // 删除明细

+ 18 - 11
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -23,13 +23,14 @@
           </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方类型" prop="payerType">
-              <v-select
+              <!-- <v-select
                 v-model="form.payerType"
                 showType="radio"
                 code="PAYER_TYPE"
                 placeholder="请选择付款方类型"
                 @change="payerTypeChange"
-              ></v-select>
+              ></v-select> -->
+              {{ form.payerTypeDictValue }}
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -37,7 +38,8 @@
         <a-row v-if="form.payerType=='DEALER'" >
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="dealerSn">
-              <dealerSubareaScopeList ref="settleClientName" @change="custChange" />
+              <!-- <dealerSubareaScopeList ref="settleClientName" @change="custChange" /> -->
+              {{ form.payerName }}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -75,7 +77,8 @@
         <a-row v-if="form.payerType=='DEPT'" >
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="payerName">
-              <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input>
+              <!-- <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input> -->
+              {{ form.payerName }}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -351,8 +354,6 @@ export default {
     },
     //  保存
     handleSubmit (e) {
-      
-      debugger
       e.preventDefault()
       const _this = this
       this.$refs.ruleForm.validate(valid => {
@@ -400,6 +401,12 @@ export default {
         }
       })
     },
+    setDetail (data) {
+      this.form = Object.assign(this.form, { payerTypeDictValue: data.payerTypeDictValue, payerType: data.payerType, dealerSn: data.dealerSn, payerName: data.payerName })
+      this.$nextTick(() => {
+        this.accountTypeChange()
+      })
+    },
     //  详情
     getDetail (bookDetailSn) {
       this.spinning = true
@@ -414,11 +421,11 @@ export default {
           this.form.payCreditFlag = this.form.payCreditFlag == 1
           this.form.useCreditFlag = this.form.useCreditFlag == 1
           // 回显客户
-          if (this.form.dealerSn && this.form.payerType == 'DEALER') {
-            this.$nextTick(() => {
-              this.$refs.settleClientName.getDetail(this.form.dealerSn)
-            })
-          }
+          // if (this.form.dealerSn && this.form.payerType == 'DEALER') {
+          //   this.$nextTick(() => {
+          //     this.$refs.settleClientName.getDetail(this.form.dealerSn)
+          //   })
+          // }
         }
         this.spinning = false
         this.confirmLoading = false

+ 2 - 2
src/views/financialManagement/financialCollection/list.vue

@@ -180,7 +180,7 @@ export default {
       baseModal: false,
       tableHeight: 0,
       queryParam: { //  查询条件
-        payerType:'',
+        payerType: '',
         beginDate: '',
         endDate: '',
         bookNo: '',
@@ -232,7 +232,7 @@ export default {
         { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '付款方', dataIndex: 'payerNames', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '付款方', dataIndex: 'payerName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },

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

@@ -41,8 +41,8 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="8" :sm="24">
-                <span class="table-page-search-submitButtons">
+              <a-col :offset="currentTab==2?8:0" :md="16" :sm="24">
+                <span style="float: right;" class="table-page-search-submitButtons">
                   <a-button type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
                 </span>
@@ -222,7 +222,7 @@ export default {
     },
     handlePlPrint () {
       const _this = this
-      const slen = _this.rowSelectionInfo.selectedRowKeys.length
+      const slen = _this.rowSelectionInfo && _this.rowSelectionInfo.selectedRowKeys.length
       if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
       }