Browse Source

单位收付款记录

chenrui 4 năm trước cách đây
mục cha
commit
9046bba58c

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

@@ -1319,6 +1319,42 @@ export const asyncRouterMap = [
                 }
               }
             ]
+          },
+          {
+            path: '/financialManagement/unitCollectionPayment',
+            redirect: '/financialManagement/unitCollectionPayment/list',
+            name: 'unitCollectionPayment',
+            component: RouteView,
+            meta: {
+              title: '单位收付款记录',
+              icon: 'gold'
+              // permission: 'M_goodsManage_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: '/financialManagement/unitCollectionPayment/list',
+                name: 'unitCollectionPaymentList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/unitCollectionPayment/list.vue'),
+                meta: {
+                  title: '单位收付款记录列表',
+                  icon: 'gold',
+                  hidden: true
+                  // permission: 'M_goodsManage_list'
+                }
+              },
+              {
+                path: '/financialManagement/unitCollectionPayment/detail/:id',
+                name: 'unitCollectionPaymentDetail',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/unitCollectionPayment/detail.vue'),
+                meta: {
+                  title: '单位收付款记录详情',
+                  icon: 'gold',
+                  hidden: true
+                  // permission: 'B_goodsManage_edit'
+                }
+              }
+            ]
           }
         ]
       },

+ 133 - 0
src/views/financialManagement/unitCollectionPayment/detail.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="unitCollectionPaymentDetail-wrap">
+    <a-page-header :ghost="false" @back="handleBack" >
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="unitCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
+      </template>
+      <!-- 操作区,位于 title 行的行尾 -->
+      <template slot="extra">
+        <a-button key="2" id="unitCollectionPaymentDetail-preview-btn">打印预览</a-button>
+        <a-button key="1" type="primary" id="unitCollectionPaymentDetail-print-btn">快速打印</a-button>
+      </template>
+    </a-page-header>
+    <!-- 内容 -->
+    <a-page-header title="单号:CG2021010100001" ></a-page-header>
+    <!-- 基础信息 -->
+    <a-card :bordered="false" class="unitCollectionPaymentDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="3">
+            <a-descriptions-item label="单位名称">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="单位类型">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="结算类型">箭冠营销中心</a-descriptions-item>
+            <a-descriptions-item label="收款金额">2</a-descriptions-item>
+            <a-descriptions-item label="折让金额">20</a-descriptions-item>
+            <a-descriptions-item label="结算金额">¥120.36</a-descriptions-item>
+            <a-descriptions-item label="结算时间">3</a-descriptions-item>
+            <a-descriptions-item label="操作人">4</a-descriptions-item>
+            <a-descriptions-item label="结算方式">¥11.2</a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+    <!-- 收款明细 -->
+    <a-card :bordered="false" class="unitCollectionPaymentDetail-cont">
+      <a-collapse :activeKey="['1']">
+        <a-collapse-panel key="1" header="收款明细">
+          <!-- alert -->
+          <a-alert type="info" showIcon style="margin-bottom:15px">
+            <div slot="message">共 <strong>6</strong> 条明细,金额合计 <strong>¥14</strong> ,余额合计 <strong>¥14</strong> ,结算金额合计 <strong>¥14</strong> </div>
+          </a-alert>
+          <!-- 列表 -->
+          <s-table
+            class="sTable"
+            ref="table"
+            size="default"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            bordered>
+            <!-- 采购数量 -->
+            <template slot="purchaseNum" slot-scope="text, record">
+              <span>{{record.purchaseNum}}</span>
+            </template>
+            <!-- 缺货数量 -->
+            <template slot="outOfStockNum" slot-scope="text, record">
+              <span>{{record.outOfStockNum}}</span>
+            </template>
+          </s-table>
+        </a-collapse-panel>
+      </a-collapse>
+    </a-card>
+  </div>
+</template>
+
+<script>
+  import { STable, VSelect } from '@/components'
+  export default{
+    components: { STable, VSelect },
+    data(){
+      return{
+        // 表头
+        columns: [
+          { title: '序号', dataIndex: 'no', align: 'center' },
+          { title: '单据号', dataIndex: 'creatDate', align: 'center' },
+          { title: '类型', dataIndex: 'custName', align: 'center' },
+          { title: '审核时间', dataIndex: 'totalP', align: 'center' },
+          { title: '金额', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
+          { title: '余额', scopedSlots: { customRender: 'purchasesNum' }, align: 'center' },
+          { title: '结算金额', dataIndex: 'totalNums', align: 'center' }
+        ],
+        // 加载数据方法 必须为 Promise 对象
+        loadData: parameter => {
+          this.disabled = true
+          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
+          //   const 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.disabled = false
+          //   return data
+          // })
+          const _this = this
+          return new Promise(function(resolve, reject){
+            const data = {
+              pageNo: 1,
+              pageSize: 10,
+              list: [
+                { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
+              ],
+              count: 10
+            }
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+            }
+            _this.disabled = false
+            resolve(data)
+          })
+        },
+      }
+    },
+    methods: {
+      //  返回列表
+      handleBack(){
+        this.$router.push({ path: '/financialManagement/unitCollectionPayment/list'})
+      },
+    }
+  }
+</script>
+
+<style lang="less">
+  .unitCollectionPaymentDetail-cont{
+    margin-bottom: 15px;
+    .timeline-box{
+      margin-top: 30px;
+      .auxiliary-txt{
+        color: #808695;
+      }
+    }
+  }
+</style>

+ 196 - 0
src/views/financialManagement/unitCollectionPayment/list.vue

@@ -0,0 +1,196 @@
+<template>
+  <a-card :bordered="false" class="unitCollectionPaymentList-wrap">
+    <!-- 搜索条件 -->
+    <div 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="单位名称">
+              <a-input id="unitCollectionPaymentList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入单位名称"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="单位类型">
+              <v-select
+                v-model="queryParam.billStatus"
+                ref="billStatus"
+                id="unitCollectionPaymentList-billStatus"
+                code="PAYMENT_TYPE"
+                placeholder="请选择单位类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="结算类型">
+              <v-select
+                v-model="queryParam.billStatus"
+                ref="billStatus"
+                id="unitCollectionPaymentList-billStatus"
+                code="PAYMENT_TYPE"
+                placeholder="请选择结算类型"
+                allowClear></v-select>
+            </a-form-item>
+          </a-col>
+          <template v-if="advanced">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="结算单号">
+                <a-input id="unitCollectionPaymentList-purchaseNo" v-model.trim="queryParam.purchaseNo" allowClear placeholder="请输入结算单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="结算时间">
+                <a-range-picker v-model="queryParam.creatDate" id="unitCollectionPaymentList-creatDate"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="结算方式">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="unitCollectionPaymentList-billStatus"
+                  code="PAYMENT_TYPE"
+                  placeholder="请选择结算方式"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :md="6" :sm="24">
+            <span class="table-page-search-submitButtons">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="unitCollectionPaymentList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="unitCollectionPaymentList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 8px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- alert -->
+    <a-alert type="info" showIcon style="margin-bottom:15px">
+      <div slot="message">共 <strong>6</strong> 条记录,其中收款单 <strong>14</strong> 条,收款金额合计 <strong>¥14</strong> ,付款单 <strong>14</strong> 条,付款金额合计 <strong>¥14</strong> </div>
+    </a-alert>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 结算单号 -->
+      <template slot="purchaseNo" slot-scope="text, record">
+        <span style="color: #ed1c24;cursor: pointer;" @click="handleDetail(record)">{{record.purchaseNo}}</span>
+      </template>
+      <!-- 结算方式 -->
+      <template slot="action" slot-scope="text, record">
+        <span>{{record.state == 1 ? '现金' : '微信'}}</span>
+      </template>
+    </s-table>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+// import { getRoleList, getServiceList } from '@/api/manage'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      advanced: false,  //  高级搜索 展开/关闭
+      disabled: false, //  查询、重置按钮是否可操作
+      // 查询参数
+      queryParam: {},
+      // 表头
+      columns: [
+        { title: '序号', dataIndex: 'no', align: 'center' },
+        { title: '单位名称', dataIndex: 'name', align: 'center' },
+        { title: '单位类型', dataIndex: 'pssayType', align: 'center' },
+        { title: '结算类型', dataIndex: 'paddyType', align: 'center' },
+        { title: '结算单号', scopedSlots: { customRender: 'purchaseNo' }, align: 'center' },
+        { title: '结算金额', dataIndex: 'totalP', align: 'center' },
+        { title: '结算时间', dataIndex: 'creatDate', align: 'center' },
+        { title: '操作人', dataIndex: 'payType', align: 'center' },
+        { title: '结算方式', scopedSlots: { customRender: 'action' }, width: 270, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
+        //   const 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.disabled = false
+        //   return data
+        // })
+        const _this = this
+        return new Promise(function(resolve, reject){
+          const data = {
+            pageNo: 1,
+            pageSize: 10,
+            list: [
+              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
+            ],
+            count: 10
+          }
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            data.list[i].no = no + i + 1
+          }
+          _this.disabled = false
+          resolve(data)
+        })
+      },
+    }
+  },
+  methods: {
+    //  详情
+    handleDetail(row){
+      this.$router.push({ path: `/financialManagement/unitCollectionPayment/detail/${row.id}`})
+    },
+    //  审核
+    handleExamine(row, type){
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '操作后不可恢复,确定要进行'+ (type==1 ? ' 通过 ' : ' 不通过 ') +'操作吗?',
+        okText: '确定',
+        cancelText: '取消',
+        centered: true,
+        onOk () {
+          // delectRolePower({
+          //   id: row.id
+          // }).then(res => {
+          //   console.log(res, 'res1111')
+          //   if (res.status == 200) {
+          //     _this.$message.success(res.message)
+          //     _this.$refs.table.refresh()
+          //   }
+          // })
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.orderBundleNo = ''
+      this.queryParam.orderBundle.custMobile = ''
+      this.queryParam.bundleName = ''
+      this.queryParam.itemName = ''
+      this.oldTime = undefined
+      this.newTime = undefined
+      this.$refs.table.refresh(true)
+    },
+  }
+}
+</script>
+<style lang="less">
+  .unitCollectionPaymentList-wrap{
+    .sTable{
+      margin-top: 15px;
+    }
+  }
+</style>