lilei 2 лет назад
Родитель
Сommit
361db7b7f2

+ 10 - 0
src/api/financeBook.js

@@ -81,6 +81,16 @@ export const financeBookSave = (params) => {
   })
 }
 
+// 查询账户信息
+export const lastPayerAccountInfo = (params) => {
+  const url = `/financeBook/detail/lastPayerAccountInfo`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
 // 提交
 export const financeBookSubmit = (params) => {
   const url = `/financeBook/submit`

+ 12 - 7
src/views/financialManagement/financialCollection/detail.vue

@@ -70,6 +70,10 @@
             </div>
             <div style="padding:10px;text-align:center;" v-else>暂无数据</div>
           </template>
+          <!-- 付款账户(营业执照) -->
+          <template slot="payerAccountInfo" slot-scope="record">
+            {{ record.payerAccountInfo || '--' }}
+          </template>
         </s-table>
       </a-card>
     </a-spin>
@@ -113,20 +117,21 @@ export default {
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '收款日期', dataIndex: 'receiptDate', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '营业执照名称', dataIndex: 'dealerEntity.licenseName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '收款日期', dataIndex: 'receiptDate', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '付款方类型', dataIndex: 'payerTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '付款方', dataIndex: 'payerName', align: 'center', width: '8%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '付款账户(营业执照)', scopedSlots: { customRender: 'payerAccountInfo' }, align: 'center', width: '8%' },
         { title: '订单金额', dataIndex: 'orderAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '收款金额', dataIndex: 'receiptAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '使用授信', dataIndex: 'useTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '授信还款', dataIndex: 'payTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '余款抵扣', dataIndex: 'balanceAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
-        { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '备注', dataIndex: 'remarks', align: 'center', width: '13%', customRender: function (text) { return text || '--' } }
+        { title: '备注', dataIndex: 'remarks', align: 'center', width: '10%', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       useCol: [
         { title: '使用授信项目', dataIndex: 'itemName', width: '50%', align: 'center' },

+ 13 - 8
src/views/financialManagement/financialCollection/edit.vue

@@ -77,6 +77,10 @@
             </div>
             <div style="padding:10px;text-align:center;" v-else>暂无数据</div>
           </template>
+          <!-- 付款账户(营业执照) -->
+          <template slot="payerAccountInfo" slot-scope="record">
+            {{ record.payerAccountInfo || '--' }}
+          </template>
           <template slot="action" slot-scope="text,record">
             <a-button
               size="small"
@@ -165,21 +169,22 @@ export default {
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '收款日期', dataIndex: 'receiptDate', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '营业执照名称', dataIndex: 'dealerEntity.licenseName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '收款日期', dataIndex: 'receiptDate', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '付款方类型', dataIndex: 'payerTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '付款方', dataIndex: 'payerName', align: 'center', width: '7%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '财务编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '付款账户(营业执照)', scopedSlots: { customRender: 'payerAccountInfo' }, align: 'center', width: '7%' },
         { title: '订单金额', dataIndex: 'orderAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '收款金额', dataIndex: 'receiptAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '使用授信', dataIndex: 'useTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '授信还款', dataIndex: 'payTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '余款抵扣', dataIndex: 'balanceAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
         { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
-        { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
+        { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
-        { title: '备注', dataIndex: 'remarks', align: 'center', width: '13%', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+        { title: '备注', dataIndex: 'remarks', align: 'center', width: '6%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       useCol: [
         { title: '使用授信项目', dataIndex: 'itemName', width: '50%', align: 'center' },

+ 86 - 16
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -22,24 +22,70 @@
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
-            <a-form-model-item style="margin-bottom:5px;" label="客户名称" prop="dealerSn">
+            <a-form-model-item style="margin-bottom:5px;" label="付款方类型" prop="payerType">
+              <v-select
+                v-model="form.payerType"
+                showType="radio"
+                code="PAYER_TYPE"
+                placeholder="请选择付款方类型"
+                @change="payerTypeChange"
+              ></v-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <!-- 经销售 -->
+        <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" />
             </a-form-model-item>
           </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="付款账户类型" prop="payerAccountType">
+              <v-select
+                v-model="form.payerAccountType"
+                showType="radio"
+                code="PAYER_ACCOUNT_TYPE"
+                placeholder="请选择付款账户类型"
+                @change="payerTypeChange"
+              ></v-select>
+            </a-form-model-item>
+          </a-col>
         </a-row>
-        <a-row>
+        <a-row v-if="form.payerType=='DEALER'" >
+          <!-- 公户 -->
+          <a-col :span="12" v-if="form.payerAccountType=='PUBLIC'">
+            <a-form-model-item style="margin-bottom:5px;" label="营业执照名称">
+              <a-input :maxLength="30" placeholder="请输入营业执照名称" v-model="form.payerAccountInfo"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <!-- 私户 -->
+          <a-col :span="12" v-if="form.payerAccountType=='PRIVATE'">
+            <a-form-model-item style="margin-bottom:5px;" label="付款账户">
+              <a-input :maxLength="30" placeholder="付款账户" v-model="form.payerAccountInfo"></a-input>
+            </a-form-model-item>
+          </a-col>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="财务编码">
               {{ form.dealerCode||'--' }}
-              <!-- <a-input :maxLength="100" placeholder="请输入财务编码" v-model="form.dealerCode"></a-input> -->
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <!-- 部门或其它 -->
+        <a-row v-if="form.payerType=='DEPT'" >
           <a-col :span="12">
-            <a-form-model-item style="margin-bottom:5px;" label="营业执照名称">
-              {{ form.licenseName||'--' }}
-              <!-- <a-input :maxLength="100" placeholder="请输入营业执照名称" v-model="form.licenseName"></a-input> -->
+            <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="payerName">
+              <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="付款账户">
+              <a-input :maxLength="30" placeholder="付款账户" v-model="form.payerAccountInfo"></a-input>
             </a-form-model-item>
           </a-col>
+        </a-row>
+        <a-divider />
+        <a-row>
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="订单金额">
               <a-input-number
@@ -156,7 +202,7 @@ import { commonMixin } from '@/utils/mixin'
 import { VSelect, Upload } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import fcDetailSxItem from './fcDetailSxItem.vue'
-import { financeBookDetailSave, financeBookDetailQueryBySn } from '@/api/financeBook.js'
+import { financeBookDetailSave, financeBookDetailQueryBySn, lastPayerAccountInfo } from '@/api/financeBook.js'
 export default {
   name: 'FcDetailModal',
   mixins: [commonMixin],
@@ -188,11 +234,14 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
+        payerType: 'DEALER',
+        payerAccountType: 'PUBLIC',
         dealerSn: undefined,
-        dealerName: '',
+        payerName: '',
+        payerAccountInfo: '',
+        licenseName: '',
         receiptDate: moment(),
         dealerCode: '',
-        licenseName: '',
         orderAmount: '',
         receiptAmount: '',
         useCreditFlag: false,
@@ -208,7 +257,10 @@ export default {
       },
       rules: {
         receiptDate: [ { required: true, message: '请选择收款日期', trigger: ['change', 'blur'] } ],
-        dealerSn: [ { 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'] } ],
+        payerAccountType: [ { required: true, message: '请选择付款账户类型', trigger: ['change', 'blur'] } ]
       },
       useTotalAmount: '',
       payTotalAmount: '',
@@ -234,6 +286,9 @@ export default {
     }
   },
   methods: {
+    payerTypeChange (v) {
+      this.$refs.ruleForm.clearValidate()
+    },
     handleChange (v) {
       console.log(v)
       const row = this.bankList.find(item => item.bankAccount == v)
@@ -243,9 +298,23 @@ export default {
     // 客户
     custChange (v) {
       this.form.dealerSn = v.key
-      this.form.dealerName = v.name
-      this.form.licenseName = v.row ? v.row.licenseName : ''
+      this.form.payerName = v.name
       this.form.dealerCode = v.row ? v.row.kdMidCustomerFnumber : ''
+      this.form.licenseName = v.row ? v.row.licenseName : ''
+
+      if (v && v.key) {
+        // 查询账户信息
+        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 || ''
+        })
+      }
     },
     updateUseAmount (v) {
       this.useTotalAmount = v
@@ -277,8 +346,6 @@ export default {
       form.useCreditFlag = form.useCreditFlag ? 1 : 0
       form.bookSn = this.bookSn
       form.bookNo = this.bookNo
-      delete form.dealerName
-      delete form.licenseName
       delete form.dealerCode
       console.log(form)
       if ((form.useCreditFlag && form.detailItemUseList.length == 0) || this.validItem(form.detailItemUseList)) {
@@ -335,11 +402,14 @@ export default {
         this.$refs.settleClientName.resetForm()
         this.bankNameList = []
         this.form = {
+          payerType: 'DEALER',
+          payerAccountType: 'PUBLIC',
           dealerSn: undefined,
-          dealerName: '',
+          payerName: '',
+          payerAccountInfo: '',
+          licenseName: '',
           receiptDate: moment(),
           dealerCode: '',
-          licenseName: '',
           orderAmount: '',
           receiptAmount: '',
           useCreditFlag: false,

+ 30 - 12
src/views/financialManagement/financialCollection/list.vue

@@ -21,22 +21,27 @@
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="申请人">
                   <employee style="width: 100%;" id="financialCollectionList-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="收款事由">
                   <a-input id="financialCollectionList-bookReason" v-model.trim="queryParam.bookReason" allowClear placeholder="请输入收款事由"/>
                 </a-form-item>
               </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="付款方">
+                  <a-input id="financialCollectionList-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入付款方"/>
+                </a-form-item>
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
                   <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="状态">
                   <v-select
                     v-model="queryParam.status"
@@ -58,10 +63,19 @@
             </a-col>
           </a-row>
         </a-form>
-      </div>
-      <!-- 操作按钮 -->
-      <div class="table-operator" v-if="$hasPermissions('B_fc_new')">
-        <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
+        <!-- 操作按钮 -->
+        <div class="table-operator" v-if="$hasPermissions('B_fc_new')">
+          <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
+        </div>
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            订单总金额:{{ countData&&countData.orderTotalAmount||0 }}元;
+            收款总金额:{{ countData&&countData.receiptTotalAmount||0 }}元;
+            使用授信总金额:{{ countData&&countData.useTotalAmount||0 }}元;
+            授信还款总金额:{{ countData&&countData.payTotalAmount||0 }}元;
+            余款抵扣总金额:{{ countData&&countData.balanceTotalAmount||0 }}元;
+          </div>
+        </a-alert>
       </div>
       <!-- 列表 -->
       <s-table
@@ -164,7 +178,8 @@ export default {
         auditEndDate: '',
         applyPersonSn: undefined,
         bookReason: '',
-        status: undefined
+        status: undefined,
+        dealerName: ''
       },
       disabled: false, //  查询、重置按钮是否可操作
       creatDate: [], //  创建时间
@@ -190,7 +205,8 @@ export default {
           return data
         })
       },
-      total: 0 // 合计
+      total: 0, // 合计
+      countData: null
     }
   },
   // 根据权限显示列表字段
@@ -202,7 +218,8 @@ export default {
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
         { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '6%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收款事由', dataIndex: 'bookReason', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '付款方', dataIndex: 'dealerName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { 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 : '--') } },
@@ -210,7 +227,7 @@ export default {
         { title: '余款抵扣总金额', dataIndex: 'balanceTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'statusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       return arr
     }
@@ -236,6 +253,7 @@ export default {
       if (this.advanced) {
         this.$refs.rangeAuditDate.resetDate(this.auditDate)
       }
+      this.queryParam.dealerName = ''
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''
       this.queryParam.bookNo = ''
@@ -320,7 +338,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 210
     }
   },
   watch: {

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.182:8602/ocs-admin',
+        target: 'http://192.168.0.215:8602/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  Á·Ï°
         // target: 'http://p.ocs.360arrow.com/ocs-admin', //  Ô¤·¢²¼
         ws: false,