瀏覽代碼

对账余额明细

lilei 3 周之前
父節點
當前提交
504b57c90b

+ 27 - 0
src/api/verifyAccountChange.js

@@ -29,6 +29,33 @@ export const verifyAccountChangeDealerBalanceList = (params) => {
   })
 }
 
+//对账余额明细接口
+export const verifyfyAccountQueryDealerBalanceDetailPage = (params) => {
+  const url = `/verifyAccountChange/queryDealerBalanceDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账余额明细列表查询')
+    }
+  })
+}
+
+// 对账余额明细统计
+export const verifyfyAccountQueryDealerBalanceDetailCount = (params) => {
+  const url = `/verifyAccountChange/queryDealerBalanceDetailCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账余额明细统计')
+    }
+  })
+}
 // 调账保存
 export const verifyAccountChangeSave = params => {
   return axios({

+ 1 - 1
src/config/financialManagement.js

@@ -173,7 +173,7 @@ export default {
                 }
               },
               {
-                path: 'detail/:sn',
+                path: 'detail/:sn/:name',
                 name: 'accountStatementBillDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatementBill/detail.vue'),
                 meta: {

+ 94 - 13
src/views/financialManagement/accountStatement/confrontModal.vue

@@ -81,12 +81,12 @@
         </div>
         <div class="conFrontModal-flex" v-if="detailData">
           <div class="conFrontModal-subTitle">
-            <div><span>公司名称:</span> {{ detailData.signName }}</div>
+            <div><span>公司名称:</span> 东莞市箭冠汽配汽车配件制造有限公司</div>
             <div><span>签名:</span>{{ detailData.signName }}</div>
             <div><span>盖章</span></div>
           </div>
           <div class="conFrontModal-subTitle">
-            <div><span>公司名称:</span>{{ detailData.dealerName }}</div>
+            <div><span>公司名称:</span>{{ detailData.dealerAlias }}</div>
             <div><span>签名:</span></div>
             <div><span>盖章</span></div>
           </div>
@@ -102,6 +102,8 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import XLSX from 'xlsx-js-style'
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import {
@@ -157,11 +159,6 @@ export default {
                 data[i].creditorAmount = data[i].bizAmount
               }
             }
-            // data.push({ no: '备注:' + this.detailData.remarks })
-            // data.push({
-            //   no: '公司名称:东莞市箭冠汽车配件制造有限公司\n签名:' + (this.detailData.signName || '') + '\n盖章',
-            //   expenseAllocateType: '公司名称:' + this.dealear.dealerName + '\n签名:\n盖章'
-            // })
             this.total = data.length || 0 + 1
             this.disabled = false
           }
@@ -194,7 +191,7 @@ export default {
               title: '营业执照名称',
               children: [
                 {
-                  title: '财务编',
+                  title: '财务编',
                   children: [
                     { title: '序号',
                       dataIndex: 'no',
@@ -211,7 +208,7 @@ export default {
               ]
             },
             {
-              title: this.dealear ? this.dealear.dealerName : '--',
+              title: this.dealear ? this.dealear.dealerAlias : '--',
               children: [
                 {
                   title: this.dealear ? this.dealear.kdMidCustomerFnumber : '--',
@@ -241,7 +238,7 @@ export default {
               ]
             },
             {
-              title: this.dealear ? this.dealear.dealerAlias : '--',
+              title: this.dealear ? this.dealear.dealerName : '--',
               children: [
                 {
                   title: '',
@@ -291,9 +288,93 @@ export default {
       this.opened = false
       this.$emit('cancel')
     },
-    // 导出
-    handleExport () {
+    appendSplitMergedRow (ws, firstValue, secondValue) {
+      // 1. 获取当前数据范围
+      const range = XLSX.utils.decode_range(ws['!ref'])
+      const newRowNum = range.e.r + 1
+
+      // 2. 填充基础数据(仅设置有效单元格)
+      ws[XLSX.utils.encode_cell({ r: newRowNum, c: 0 })] = { v: firstValue, t: 's' } // 前7列合并值
+      ws[XLSX.utils.encode_cell({ r: newRowNum, c: 7 })] = { v: secondValue, t: 's' } // 后6列合并值
+
+      // 3. 设置合并区域
+      if (!ws['!merges']) ws['!merges'] = []
+      // 前7列合并(0-6列)
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: 0 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: 6 })}`
+      ))
+      // 后6列合并(7-12列)
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: 7 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: 12 })}`
+      ))
+
+      // 4. 更新数据范围
+      range.e.r = newRowNum
+      ws['!ref'] = XLSX.utils.encode_range(range)
+      return ws
+    },
+    // 导出表格excel,dom 表格对象,title 导出表格名称
+    exportTable (dom, title) {
+      var ws = XLSX.utils.table_to_sheet(dom)
+      // console.log(ws)
+
+      // 4. 设置列宽
+      ws['!cols'] = Array(13).fill().map((item, index) => ({ wch: index < 4 ? 6 : 20 }))
 
+      // 追加备注
+      const range = XLSX.utils.decode_range(ws['!ref'])
+      const newRowNum = range.e.r + 1
+
+      // 填充数据(首列填值,其余留空)
+      const mergedValue = '备注:' + this.detailData.remarks
+      for (let col = 0; col < 13; col++) {
+        const cellRef = XLSX.utils.encode_cell({ r: newRowNum, c: col })
+        ws[cellRef] = { v: col === 0 ? mergedValue : '', t: 's' }
+      }
+
+      // 设置全列合并(0-12列)
+      if (!ws['!merges']) ws['!merges'] = []
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: 0 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: 12 })}`
+      ))
+
+      // 4. 更新数据范围
+      range.e.r = newRowNum
+      ws['!ref'] = XLSX.utils.encode_range(range)
+      ws['!rows'][0] = { hpt: 30 }
+      ws['!rows'][newRowNum] = { hpt: 30 }
+
+      // 追加表尾
+      const newWs = this.appendSplitMergedRow(ws, '公司名称:东莞市箭冠汽车配件制造有限公司', '公司名称:' + (this.dealear.dealerName || ''))
+      const newWs1 = this.appendSplitMergedRow(newWs, '签名:' + (this.detailData.signName || ''), '签名:')
+      const newWs2 = this.appendSplitMergedRow(newWs1, '盖章:', '盖章:')
+      // 设置单元格样式
+      Object.keys(newWs2).forEach(cell => {
+        if (!cell.startsWith('!')) {
+          const rowNum = parseInt(cell.match(/\d+/)[0])
+          newWs2[cell].s = cell === 'A1' ? {
+            font: { bold: true, color: { rgb: '000000' } },
+            alignment: { horizontal: 'center', vertical: 'center' }
+          } : rowNum === 4 ? {
+            font: { bold: true },
+            fill: { fgColor: { rgb: 'ffdd8d' } },
+            alignment: { horizontal: rowNum < newRowNum + 1 ? 'center' : 'left', vertical: 'center' }
+          } : {
+            alignment: { horizontal: rowNum < newRowNum + 1 ? 'center' : 'left', vertical: 'center' }
+          }
+        }
+      })
+      // 创建工作簿并导出
+      var wb = XLSX.utils.book_new()
+      // 5. 写入文件
+      XLSX.utils.book_append_sheet(wb, newWs2, 'Sheet1')
+      const timeStr = moment().format('YYYYMMDDHHmmss')
+      XLSX.writeFile(wb, title + '-' + timeStr + '.xlsx')
+    },
+    //  点击导出
+    handleExport () {
+      const excelTitle = '(' + this.detailData.dealerName + ')应收账款明细表'
+      this.exportTable(this.$refs.table.$el.querySelector('table'), excelTitle)
     },
     // 对单
     async handleSubmit () {
@@ -328,7 +409,7 @@ export default {
       this.orderType = type
       this.verifyAccountBillSn = row.verifyAccountBillSn
       this.dealear = dealear
-      this.title = type ? '对单' : '单据详情'
+      this.title = type ? '对单' : '单据详情' + `(对账单号:${row.verifyAccountBillNo} 客户名称:${row.dealerName})`
       this.getDetail()
     }
   },

+ 115 - 0
src/views/financialManagement/accountStatementBill/baseModal.vue

@@ -0,0 +1,115 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :width="600"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="客户名称" prop="dealerSn">
+          {{ form.dealerName }}
+        </a-form-model-item>
+        <a-form-model-item label="备注">
+          <a-textarea :rows="4" :maxLength="300" placeholder="请输入备注(最多300个字符)" v-model="form.remarks"></a-textarea>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import { verifyAccountBillCreate } from '@/api/verifyAccount.js'
+export default {
+  name: 'ASBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect },
+  props: {
+    show: [Boolean],
+    itemSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '新增对账单',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        dealerSn: undefined,
+        dealerName: undefined,
+        remarks: ''
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建或编辑销售单
+    salesSaveFun () {
+      const _this = this
+      const form = JSON.parse(JSON.stringify(_this.form))
+      _this.spinning = true
+      verifyAccountBillCreate(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('refashData')
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    },
+    async pageInit (data) {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+      })
+      this.form = {
+        dealerSn: data.dealerSn,
+        dealerName: data.dealerName,
+        remarks: ''
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 92 - 43
src/views/financialManagement/accountStatementBill/detail.vue

@@ -7,7 +7,7 @@
           <a-icon type="left" />
           返回列表
         </a>
-        <span style="margin: 0 10px;color: #666;">客户名称:{{ detailsData && detailsData.supplier && detailsData.supplier.supplierName }}</span>
+        <span style="margin: 0 10px;color: #666;">客户名称:{{ $route.params.name }}</span>
       </template>
     </a-page-header>
     <a-card size="small" :bordered="false" class="searchBoxNormal">
@@ -22,21 +22,21 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="业务单号">
-                <a-input id="accountStateBillDetail-dealerName" v-model.trim="queryParam.dealerName" allowClear placeholder="请输入业务单号"/>
+                <a-input id="accountStateBillDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="对账单号">
-                <a-input id="accountStateBillDetail-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入对账单号"/>
+                <a-input id="accountStateBillDetail-verifyAccountBillNo" v-model.trim="queryParam.verifyAccountBillNo" allowClear placeholder="请输入对账单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="借贷类型">
                 <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStateBillDetail-status"
-                  code="FINANCE_BOOK_STATE"
+                  v-model="queryParam.changeType"
+                  ref="changeType"
+                  id="accountStateBillDetail-changeType"
+                  code="VERIFY_ACCOUNT_CHANGE_TYPE"
                   placeholder="请选择借贷类型"
                   allowClear></v-select>
               </a-form-item>
@@ -44,21 +44,33 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="业务类型">
                 <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStateBillDetail-status"
-                  code="FINANCE_BOOK_STATE"
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="accountStateBillDetail-bizType"
+                  code="VERIFY_ACCOUNT_BIZ_TYPE"
                   placeholder="请选择业务类型"
                   allowClear></v-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="待选状态">
+                <a-select v-model="queryParam.waitSelect" allowClear placeholder="请选择待选状态" style="width: 100%" id="accountStateBillDetail-waitSelect">
+                  <a-select-option value="1">
+                    待选
+                  </a-select-option>
+                  <a-select-option value="0">
+                    已选
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="对单状态">
                 <v-select
-                  v-model="queryParam.status"
-                  ref="status"
-                  id="accountStatement-status"
-                  code="FINANCE_BOOK_STATE"
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="accountStatement-billStatus"
+                  code="VERIFY_ACCOUNT_STATUS"
                   placeholder="请选择对单状态"
                   allowClear></v-select>
               </a-form-item>
@@ -81,11 +93,11 @@
       </div>
     </a-card>
     <a-card size="small" :bordered="false">
-      <a-alert type="info" style="margin-bottom:10px" v-if="totalData">
+      <a-alert type="info" style="margin-bottom:10px">
         <div slot="message">
-          余额:<strong>{{ totalData&&(totalData.totalCancelAmount || totalData.totalCancelAmount==0) ? toThousands(totalData.totalCancelAmount) : '--' }}</strong>;
-          借方:<strong>{{ totalData&&(totalData.totalUnpushedAmount || totalData.totalUnpushedAmount==0) ? toThousands(totalData.totalUnpushedAmount) : '--' }}</strong>;
-          贷方:<strong>{{ totalData&&(totalData.totalDispatchAmount || totalData.totalDispatchAmount==0) ? toThousands(totalData.totalDispatchAmount) : '--' }}</strong>;
+          余额:<strong>{{ totalData&&(totalData.bizAmount || totalData.bizAmount==0) ? toThousands(totalData.bizAmount) : '--' }}</strong>;
+          借方:<strong>{{ totalData&&(totalData.debitAmount || totalData.debitAmount==0) ? toThousands(totalData.debitAmount) : '--' }}</strong>;
+          贷方:<strong>{{ totalData&&(totalData.lenderAmount || totalData.lenderAmount==0) ? toThousands(totalData.lenderAmount) : '--' }}</strong>;
         </div>
       </a-alert>
       <a-spin :spinning="spinning" tip="Loading...">
@@ -110,7 +122,10 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { financeBookQueryPage, financeBookDeleteBySn } from '@/api/financeBook.js'
+import {
+  verifyfyAccountQueryDealerBalanceDetailPage,
+  verifyfyAccountQueryDealerBalanceDetailCount
+} from '@/api/verifyAccountChange'
 export default {
   name: 'AccountStatementBillDetail',
   mixins: [commonMixin],
@@ -123,9 +138,12 @@ export default {
       queryParam: { //  查询条件
         beginDate: '',
         endDate: '',
-        bookNo: '',
-        dealerName: '',
-        status: undefined
+        bizNo: '',
+        verifyAccountBillNo: '',
+        changeType: undefined,
+        bizType: undefined,
+        waitSelect: undefined,
+        billStatus: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       creatDate: [], //  创建时间
@@ -134,45 +152,62 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const params = Object.assign(parameter, this.queryParam)
-        return financeBookQueryPage(params).then(res => {
+        const params = {
+          ...parameter,
+          dealerSn: this.dealerSn,
+          ...this.queryParam
+        }
+        return verifyfyAccountQueryDealerBalanceDetailPage(params).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
+              const dates = data.list[i].bizDate.split('-')
+              data.list[i].year = dates[0]
+              data.list[i].month = dates[1]
+              data.list[i].day = dates[2].split(' ')[0]
+              // 正为借方, 负数为贷方
+              if (data.list[i].bizAmount > 0) {
+                data.list[i].debitAmount = data.list[i].bizAmount
+              } else {
+                data.list[i].creditorAmount = data.list[i].bizAmount
+              }
             }
             this.total = data.count || 0
             this.disabled = false
           }
           this.spinning = false
+          this.getCount(params)
           return data
         })
       },
       total: 0, // 合计
-      totalData: null
+      totalData: null,
+      dealerSn: null
     }
   },
   // 根据权限显示列表字段
   computed: {
     columns () {
+      const _this = this
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '年', dataIndex: 'sparePartsNo', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '月', dataIndex: 'sparePartsNo', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '日', dataIndex: 'sparePartsNo', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务单号', dataIndex: 'sparePartsNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账单号', dataIndex: 'sparePartsNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务类型', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'product.code', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '费用/调拨类型', dataIndex: 'product.unit', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '摘要', dataIndex: 'sparePartsBatchNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客诉索赔编码', dataIndex: 'currentStockQty', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
-        { title: '借方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
-        { title: '贷方', dataIndex: 'productCost', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
-        { title: '备注', dataIndex: 'remarks', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对单状态', dataIndex: 'remarks', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '年', dataIndex: 'year', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'month', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'day', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', dataIndex: 'verifyAccountBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'bizStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '费用/调拨类型', dataIndex: 'expenseAllocateType', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '备注', dataIndex: 'remarks', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '对单状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
       return arr
     }
@@ -190,6 +225,14 @@ export default {
     // 导出
     handleExport () {
 
+    },
+    // 统计
+    getCount (params) {
+      verifyfyAccountQueryDealerBalanceDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        }
+      })
     },
     //  重置
     resetSearchForm () {
@@ -197,13 +240,19 @@ export default {
       this.$refs.rangeDate.resetDate(this.creatDate)
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
-      this.queryParam.dealerName = ''
-      this.queryParam.bookNo = ''
-      this.queryParam.status = undefined
+
+      this.queryParam.bizNo = ''
+      this.queryParam.verifyAccountBillNo = ''
+      this.queryParam.changeType = undefined
+      this.queryParam.bizType = undefined
+      this.queryParam.waitSelect = undefined
+      this.queryParam.billStatus = undefined
+
       this.$refs.table.refresh(true)
     },
     pageInit () {
       const _this = this
+      this.dealerSn = this.$route.params.sn
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })

+ 34 - 13
src/views/financialManagement/accountStatementBill/list.vue

@@ -68,15 +68,29 @@
           :defaultLoadData="false"
           bordered>
           <template slot="totalAmount" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_fc_detail')&&record.totalAmount" class="link-bule" @click="handleDetail(record)">{{ record.totalAmount||'--' }}</span>
-            <span v-else>{{ record.totalAmount||'--' }}</span>
+            <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="handleDetail(record)">{{ record.totalAmount }}</span>
+            <span v-else>{{ record.totalAmount }}</span>
           </template>
           <template slot="dealerType" slot-scope="text, record">
             {{ record.dealerTypeName1 }}>{{ record.dealerTypeName2 }}
           </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                class="button-info"
+                @click="handleAdd(record)"
+              >
+                创建对账单
+              </a-button>
+            </div>
+          </template>
         </s-table>
       </a-spin>
     </a-card>
+    <baseModal v-drag ref="baseModal" :show="openModal" @cancel="openModal=false" @refashData="$refs.table.refresh()"></baseModal>
   </div>
 </template>
 
@@ -86,17 +100,18 @@ import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import dealerType from '@/views/common/dealerType.js'
 import customerService from '@/views/common/customerService.vue'
-
+import baseModal from './baseModal.vue'
 import { verifyAccountChangeDealerBalanceList } from '@/api/verifyAccountChange.js'
 export default {
   name: 'AccountStatementBillList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, dealerType, customerService },
+  components: { STable, VSelect, subarea, dealerType, customerService, baseModal },
   data () {
     return {
       spinning: false,
       exportLoading: false,
       tableHeight: 0,
+      openModal: false,
       dealerType: [], // 商户类型
       queryParam: { //  查询条件
         nameLike: '', // 经销商名称/别名
@@ -138,17 +153,18 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '财务编码', dataIndex: 'kdMidCustomerFnumber', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '财务编码', dataIndex: 'kdMidCustomerFnumber', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '经销商名称', dataIndex: 'dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户别名', dataIndex: 'dealerAlias', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总余额', scopedSlots: { customRender: 'totalAmount' }, width: '8%', align: 'center' },
-        { title: '待选余额', dataIndex: 'waitAmount', width: '8%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '待选单数', dataIndex: 'waitCount', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客服', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总余额', scopedSlots: { customRender: 'totalAmount' }, width: '6%', align: 'center' },
+        { title: '待选余额', dataIndex: 'waitAmount', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '待选单数', dataIndex: 'waitCount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客服', dataIndex: 'auditDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '区域', dataIndex: 'subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户类型', scopedSlots: { customRender: 'dealerType' }, width: '15%', align: 'center' }
+        { title: '商户类型', scopedSlots: { customRender: 'dealerType' }, width: '15%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       return arr
     }
@@ -181,10 +197,15 @@ export default {
     // 导出
     handleExport () {
 
+    },
+    // 新增
+    handleAdd (row) {
+      this.openModal = true
+      this.$refs.baseModal.pageInit(row)
     },
     // 详情
     handleDetail (row) {
-      this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.bookSn } })
+      this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.dealerSn, name: row.dealerName } })
     },
     pageInit () {
       const _this = this

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ 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.10/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,