Ver Fonte

Merge commit '1d3d36a86d036c0bf6b9e8dc16e92d79f72f6228' into HEAD

gitadmin há 1 semana atrás
pai
commit
4676d12e27

+ 3 - 1
package.json

@@ -45,7 +45,9 @@
     "vue2.0-zoom": "^2.1.1",
     "vuescroll": "^4.17.3",
     "vuex": "^3.1.1",
-    "wangeditor": "^3.1.1"
+    "wangeditor": "^3.1.1",
+    "xlsx": "^0.18.5",
+    "xlsx-js-style": "^1.2.0"
   },
   "devDependencies": {
     "@ant-design/colors": "^3.2.1",

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1745477411009
+  "version": 1748399109081
 }

+ 74 - 0
src/api/verifyAccount.js

@@ -0,0 +1,74 @@
+import { axios } from '@/utils/request'
+
+//  对账单管理 列表  分页
+export const verifyAcountBillList = (params) => {
+  const url = `/verifyAccountBill/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+
+// 对账单修改
+export const verifyAccountBillModify = params => {
+  return axios({
+    url: '/verifyAccountBill/modify',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单修改')
+    }
+  })
+}
+// 对账单管理  删除
+export const verifyAcountBillDel = params => {
+  return axios({
+    url: `/verifyAccountBill/delete/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('删除对账单')
+    }
+  })
+}
+// 对账单管理  详情
+export const verifyAcountBillDetail = params => {
+  return axios({
+    url: `/verifyAccountBill/findBySn/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('查看对账单详情')
+    }
+  })
+}
+// 对账单管理  对账
+export const verifyAcountBillVerify = params => {
+  return axios({
+    url: `/verifyAccountBill/verifyBill/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('对账')
+    }
+  })
+}
+ 
+//  对账单管理  明细 列表  不分页
+export const verifyAcountBillDetailQueryList = (params) => {
+  const url = `/verifyAccountBill/queryDetailList`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单明细-列表')
+    }
+  })
+} 

+ 25 - 0
src/config/router.config.js

@@ -1713,6 +1713,31 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/financialManagement/accountStatement',
+            redirect: '/financialManagement/accountStatement/list',
+            name: 'accountStatement',
+            component: BlankLayout,
+            meta: {
+              title: '对账单管理',
+              icon: 'vertical-align-top',
+              permission: 'M_accountStatement_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'accountStatementList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatement/list.vue'),
+                meta: {
+                  title: '对账单列表',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_accountStatement_list'
+                }
+              },
+            ]
           }
         ]
       },

+ 111 - 0
src/views/financialManagement/accountStatement/baseModal.vue

@@ -0,0 +1,111 @@
+<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="备注">
+          <a-textarea :rows="4" :maxLength="100" placeholder="请输入备注(最多100个字符)" 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: 30px;">
+          <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 { verifyAccountBillModify, verifyAcountBillDetail } from '@/api/verifyAccount.js'
+export default {
+  name: 'ASBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '编辑对账单',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        remarks: ''
+      },
+      itemSn: null
+    }
+  },
+  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
+      verifyAccountBillModify(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          // 编辑
+          if (this.itemSn) {
+            _this.$emit('refashData')
+          }
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    },
+    pageInit (data) {
+      this.itemSn = data.verifyAccountBillSn
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+      })
+      //  编辑页
+      if (this.itemSn) {
+        this.form = Object.assign(this.form, data)
+      }
+      verifyAcountBillDetail({ sn: data.verifyAccountBillSn }).then(res => {})
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 462 - 0
src/views/financialManagement/accountStatement/confrontModal.vue

@@ -0,0 +1,462 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    width="80%"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="searchBoxNormal">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="时间">
+                  <rangeDate id="conFrontModal-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="业务单号">
+                  <a-input id="conFrontModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="借贷类型">
+                  <v-select
+                    v-model="queryParam.changeType"
+                    ref="changeType"
+                    id="conFrontModal-changeType"
+                    code="VERIFY_ACCOUNT_CHANGE_TYPE"
+                    placeholder="请选择状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="业务类型">
+                  <v-select
+                    v-model="queryParam.bizType"
+                    ref="bizType"
+                    id="conFrontModal-bizType"
+                    code="VERIFY_ACCOUNT_BIZ_TYPE"
+                    placeholder="请选择业务类型"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="conFrontModal-search">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="conFrontModal-reset">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  v-if="$hasPermissions('M_verifyAccountDetail_export')"
+                  id="conFrontModal-export"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                >导出</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+      </a-card>
+      <a-card size="small" :bordered="false" class="conFrontModal-wrap">
+        <div class="action-bar">
+          列显示
+          <a-popover title="勾选显示列" trigger="click">
+            <template slot="content">
+              <div style="width:150px;">
+                <a-checkbox-group v-model="showCols">
+                  <a-row>
+                    <a-col :span="24" v-for="item in showColsOptions" :key="item.value">
+                      <a-checkbox v-show="item.show" :value="item.value">{{ item.label }}</a-checkbox>
+                    </a-col>
+                  </a-row>
+                </a-checkbox-group>
+              </div>
+            </template>
+            <a-button type="link" size="small">
+              设置 <a-icon type="setting" />
+            </a-button>
+          </a-popover>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :showPagination="false"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+        <div class="conFrontModal-info" v-if="detailData">
+          备注:{{ detailData.remarks }}
+        </div>
+        <div class="conFrontModal-flex" v-if="detailData">
+          <div class="conFrontModal-subTitle">
+            <div><span>公司名称:</span> 东莞市箭冠汽车配件制造有限公司</div>
+            <div><span>签名:</span>{{ detailData.signName }}</div>
+            <div><span>盖章</span></div>
+          </div>
+          <div class="conFrontModal-subTitle">
+            <div><span>公司名称:</span>{{ dealear.dealerAlias }}</div>
+            <div><span>签名:</span></div>
+            <div><span>盖章</span></div>
+          </div>
+        </div>
+        <div class="conFrontModal-footer-bar" v-if="detailData">
+          <a-button @click="cancel" style="margin-right: 15px" id="conFrontModal-btn-back">关闭</a-button>
+        </div>
+      </a-card>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import XLSX from 'xlsx-js-style'
+import moment from 'moment'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { getCurrentDealer } from '@/api/product'
+import {
+  verifyAcountBillDetailQueryList,
+  verifyAcountBillDetail
+} from '@/api/verifyAccount'
+
+export default {
+  name: 'ConFrontModal',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      confirmLoading: false,
+      title: '',
+      exportLoading: false,
+      queryParam: {
+        beginDate: '',
+        endDate: '',
+        bizNo: '',
+        changeType: undefined,
+        bizType: undefined
+      },
+      creatDate: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        params.verifyAccountBillSn = this.verifyAccountBillSn
+        return verifyAcountBillDetailQueryList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            let prevTotalAmount = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              const dates = data[i].bizDate.split('-')
+              data[i].year = dates[0]
+              data[i].month = dates[1]
+              data[i].day = dates[2].split(' ')[0]
+              // 正为借方, 负数为贷方
+              if (data[i].bizAmount > 0) {
+                data[i].debitAmount = Number(data[i].bizAmount).toFixed(2)
+              } else {
+                data[i].creditorAmount = Number(data[i].bizAmount * -1).toFixed(2)
+              }
+              data[i].totalAmount = Number(Number(prevTotalAmount || 0) + Number(data[i].debitAmount || 0) - Number(data[i].creditorAmount || 0)).toFixed(2)
+              prevTotalAmount = data[i].totalAmount
+            }
+            this.total = data.length || 0 + 1
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0, // 合计
+      detailData: null,
+      dealear: null,
+      verifyAccountBillSn: undefined,
+      orderType: 0,
+      showCols: []
+    }
+  },
+  computed: {
+    showColsOptions () {
+      return [
+        { label: '序号', value: 'no', show: false },
+        { label: '年', value: 'year', show: false },
+        { label: '月', value: 'month', show: false },
+        { label: '日', value: 'day', show: false },
+        { label: '业务单号', value: 'bizNo', show: false },
+        { label: '业务类型', value: 'bizTypeDictValue', show: false },
+        { label: '费用/调拨类型', value: 'expenseAllocateType', show: true },
+        { label: '摘要', value: 'digestInfo', show: true },
+        { label: '客诉索赔编码', value: 'productCode', show: true },
+        { label: '借方金额', value: 'debitAmount', show: false },
+        { label: '贷方金额', value: 'creditorAmount', show: false },
+        { label: '余额', value: 'totalAmount', show: true },
+        { label: '备注', value: 'remarks', show: true }
+      ]
+    },
+    columns () {
+      const renderContent = (value, row, index) => {
+        const obj = {
+          children: value || '--',
+          attrs: {}
+        }
+        return obj
+      }
+      return [
+        {
+          title: '箭冠汽配 应收账款明细表',
+          children: [
+            {
+              title: '营业执照名称',
+              children: [
+                { title: '序号',
+                  dataIndex: 'no',
+                  width: '4%',
+                  align: 'center',
+                  customRender: renderContent
+                },
+                { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: renderContent },
+                { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: renderContent },
+                { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: renderContent },
+                { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: renderContent }
+              ].filter(item => this.showCols.includes(item.dataIndex))
+            },
+            {
+              title: this.dealear ? this.dealear.dealerAlias : '--',
+              children: [
+                { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: renderContent },
+                { title: '费用/调拨类型',
+                  dataIndex: 'expenseAllocateType',
+                  width: '8%',
+                  align: 'center',
+                  customRender: renderContent
+                }
+              ].filter(item => this.showCols.includes(item.dataIndex))
+            },
+            {
+              title: '系统名称',
+              children: [
+                { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: renderContent },
+                { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: renderContent },
+                { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: renderContent }
+              ].filter(item => this.showCols.includes(item.dataIndex))
+            },
+            {
+              title: this.dealear ? this.dealear.dealerName : '--',
+              children: [
+                { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: renderContent },
+                { title: '余额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: renderContent },
+                { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: renderContent }
+              ].filter(item => this.showCols.includes(item.dataIndex))
+            }
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      if (this.$refs.rangeDate) {
+        this.$refs.rangeDate.resetDate(this.creatDate)
+      }
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.bizNo = ''
+      this.queryParam.changeType = undefined
+      this.queryParam.bizType = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    getDetail () {
+      this.spinning = true
+      verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
+        this.detailData = res.data
+        this.spinning = false
+        this.resetSearchForm()
+      })
+    },
+    // 关闭弹框
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+    },
+    appendSplitMergedRow (ws, firstValue, secondValue) {
+      const colsLen = this.showCols.length
+      const s = Math.floor((colsLen % 2 == 0) ? (colsLen / 2) : ((colsLen - 1) / 2))
+      // 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: s + 1 })] = { 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: s })}`
+      ))
+      // 后6列合并(7-12列)
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: s + 1 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: colsLen - 1 })}`
+      ))
+
+      // 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)
+      const colsLen = this.showCols.length
+      // 4. 设置列宽
+      ws['!cols'] = Array(colsLen).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 < colsLen; 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: colsLen - 1 })}`
+      ))
+
+      // 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.dealerAlias || ''))
+      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 === 3 ? {
+            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.dealear.dealerName + ')应收账款明细表'
+      this.exportTable(this.$refs.table.$el.querySelector('table'), excelTitle)
+    },
+    // 初始化
+    async pageInit (row) {
+      this.orderType = 0
+      this.verifyAccountBillSn = row.verifyAccountBillSn
+      const dealearData = await getCurrentDealer().then(res => res.data)
+      this.dealear = dealearData
+      this.title = this.orderType ? '对单' : '单据明细(对账单号:' + row.verifyAccountBillNo + ')'
+      this.getDetail()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (newValue) {
+        this.showCols = ['no', 'year', 'month', 'day', 'bizNo', 'bizTypeDictValue', 'expenseAllocateType', 'digestInfo', 'productCode', 'debitAmount', 'creditorAmount', 'totalAmount', 'remarks']
+      }
+    }
+  }
+}
+</script>
+<style lang="less">
+  .conFrontModal-title{
+    font-size: 16px;
+    font-weight: bold;
+    text-align: center;
+    margin-bottom: 10px;
+  }
+  .action-bar{
+    text-align: right;
+  }
+  .conFrontModal-flex{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    flex-wrap: wrap;
+  }
+  .conFrontModal-subTitle{
+    width: 50%;
+    padding: 5px;
+    > span{
+      display: block;
+      font-size: 14px;
+      width: 100px;
+    }
+    > div{
+      display: block;
+      font-size: 14px;
+      width: 100%;
+      word-break: break-all;
+      margin: 5px 0;
+    }
+  }
+  .conFrontModal-info{
+    font-size: 14px;
+    padding: 15px 5px 10px;
+    line-height: 20px;
+    color: #333;
+  }
+  .conFrontModal-footer-bar{
+    text-align: center;
+    padding: 30px 0 20px;
+  }
+</style>

+ 264 - 0
src/views/financialManagement/accountStatement/list.vue

@@ -0,0 +1,264 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="时间">
+                <rangeDate id="accountStatement-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="对账单号">
+                <a-input id="accountStatement-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.billStatus"
+                  ref="status"
+                  id="accountStatement-status"
+                  code="VERIFY_ACCOUNT_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStatement-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStatement-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false" class="accountStatement-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+80+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :pageSize="30"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 单号 -->
+          <template slot="verifyAccountBillNo" slot-scope="text, record">
+            <span class="table-td-link" v-if="$hasPermissions('B_verifyAccount_detail')" @click="handleDetail(record,0)">{{ record.verifyAccountBillNo }}</span>
+            <span v-else>{{ record.verifyAccountBillNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              v-if="record.billStatus=='WAIT_VERIFY'&&$hasPermissions('B_verifyAccount_edit')"
+              @click="handleEdit(record)"
+            >
+              编辑
+            </a-button>
+            <a-button
+              v-if="record.billStatus=='WAIT_VERIFY'&&$hasPermissions('B_verifyAccount_check')"
+              size="small"
+              type="link"
+              class="button-info"
+              @click="checkAcount(record)"
+            >
+              对账
+            </a-button>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 基础信息 -->
+      <baseModal v-drag ref="baseModal" :show="baseModal" @cancel="baseModal=false" @refashData="$refs.table.refresh()"></baseModal>
+      <!-- 对单 -->
+      <confrontModal v-drag :show="openModal" ref="detailModal" @cancel="openModal=false"></confrontModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import confrontModal from './confrontModal.vue'
+import baseModal from './baseModal.vue'
+import { verifyAcountBillList, verifyAcountBillVerify } from '@/api/verifyAccount.js'
+export default {
+  name: 'AccountStatementList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, confrontModal, baseModal },
+  data () {
+    return {
+      spinning: false,
+      openModal: false,
+      baseModal: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        verifyAccountBillNo: '',
+        dealerName: undefined,
+        dealerSn: undefined,
+        billStatus: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      creatDate: [], //  创建时间
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return verifyAcountBillList(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
+            }
+            this.total = data.count || 0
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0, // 合计
+      countData: null,
+      detailType: null,
+      editRow: null
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', scopedSlots: { customRender: 'verifyAccountBillNo' }, width: '15%', align: 'center' },
+        { title: '余额', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '备注', dataIndex: 'remarks', width: '40%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '对账状态', dataIndex: 'billStatusDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    // 客户
+    custChange (v) {
+      if (v && v.key) {
+        this.queryParam.dealerSn = v.key
+        this.queryParam.dealerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.queryParam.dealerSn = ''
+        this.queryParam.dealerName = ''
+      }
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.verifyAccountBillNo = ''
+      this.queryParam.billStatus = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 编辑
+    handleEdit (row) {
+      this.baseModal = true
+      this.$refs.baseModal.pageInit(row)
+    },
+    // 详情
+    handleDetail (row) {
+      this.$refs.detailModal.pageInit(row)
+      this.openModal = true
+    },
+    // 对账
+    checkAcount (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: <div style="font-size:14px;"><div>对账单号:{row.verifyAccountBillNo}</div><div>余额:¥{Number(row.totalAmount).toFixed(2)},确定对账吗?</div></div>,
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          verifyAcountBillVerify({ sn: row.verifyAccountBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .accountStatement-wrap{
+    .active{
+      color: #ed1c24;
+      cursor: pointer;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 1 - 1
src/views/purchasingManagement/purchaseReturnApplyForm/list.vue

@@ -116,7 +116,7 @@
               size="small"
               type="link"
               :id="'purchaseReturnList-creatApply-'+record.id"
-              v-if="record.billStatus == 'FINISH'&&$hasPermissions('B_purchaseReturnApplyCreat')"
+              v-if="record.billStatus == 'FINISH'&&record.hasReturnBillFlag==0&&$hasPermissions('B_purchaseReturnApplyCreat')"
               @click="handleWarehouse(record)"
               class="button-primary"
             >生成采购退货单</a-button>

+ 11 - 3
src/views/purchasingManagement/purchaseReturnOutSync/list.vue

@@ -15,6 +15,11 @@
                 <a-input id="purchaseReturnList-purchaseReturnNo" v-model.trim="queryParam.purchaseReturnNo" allowClear placeholder="请输入采购退货单号"/>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="采购退货申请单号">
+                <a-input id="purchaseReturnList-purchaseReturnApplyNo" v-model.trim="queryParam.purchaseReturnApplyNo" allowClear placeholder="请输入采购退货申请单号"/>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="供应商">
                 <a-select id="purchaseReturnList-purchaseTarget" v-model="queryParam.returnTargetSn" placeholder="请选择供应商">
@@ -189,6 +194,7 @@ export default {
         beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
         endDate: getDate.getCurrMonthDays().endtime, // 结束时间
         purchaseReturnNo: '', //  退货单号
+        purchaseReturnApplyNo: '', // 退货申请单号
         state: undefined, //  业务状态
         settleState: undefined, // 结算状态
         returnTargetSn: undefined, // 供应商
@@ -198,9 +204,10 @@ export default {
       tableHeight: 0, // 表格高度
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '采退单号', scopedSlots: { customRender: 'purchaseReturnNo' }, width: '12%', align: 'center' },
-        { title: '供应商', dataIndex: 'returnTargetName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '采退单号', scopedSlots: { customRender: 'purchaseReturnNo' }, width: '10%', align: 'center' },
+        { title: '采退申请单号', dataIndex: 'purchaseReturnApplyNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '供应商', dataIndex: 'returnTargetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品款数', dataIndex: 'totalCategory', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总数量', dataIndex: 'totalQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总金额', dataIndex: 'totalAmount', width: '7%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
@@ -249,6 +256,7 @@ export default {
       this.queryParam.beginDate = flag ? '' : getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = flag ? '' : getDate.getCurrMonthDays().endtime
       this.queryParam.purchaseReturnNo = ''
+      this.queryParam.purchaseReturnApplyNo = ''
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
       this.queryParam.returnTargetSn = undefined

+ 1 - 1
vue.config.js

@@ -209,7 +209,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.103:8503/qpls-md',
+        // target: 'http://192.168.2.10:8503/qpls-md',
         target: 'https://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,