|
@@ -1,374 +1,559 @@
|
|
|
<template>
|
|
|
-<div class="app-container zap-main">
|
|
|
- <search-bar :checkList="checkList" :tableList="tableList" :selfDom="selfDom" :tableId="tableId" @query="handleQuery" @reset="resetQuery">
|
|
|
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="120px">
|
|
|
- <el-form-item prop="value" size="large">
|
|
|
- <el-select v-model="queryParams.value" placeholder="请选择" clearable v-if="companyType !='00'" @change="change">
|
|
|
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-model="queryParams.value" placeholder="请选择" clearable v-if="companyType =='00'" @change="change">
|
|
|
- <el-option v-for="item in optionsPlus" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="queryValue" v-if="queryParams.value !='02'" size="large">
|
|
|
- <el-input v-model="queryParams.queryValue" placeholder="请输入关键字模糊查询" clearable @keyup.enter.native="handleQuery" maxlength="30" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item prop="queryValue" v-if="queryParams.value =='02'" size="large">
|
|
|
- <el-select v-model="queryParams.queryValue" placeholder="请选择账款类型" clearable>
|
|
|
- <el-option v-for="item in newOptions" :key="item.value" :label="item.label" :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="预计还款日" prop="expireDate" size="large">
|
|
|
- <el-date-picker clearable unlink-panels v-model="queryParams.expireDate" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期">
|
|
|
- </el-date-picker>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-form>
|
|
|
+ <div class="app-container zap-main">
|
|
|
+ <search-bar
|
|
|
+ :checkList="checkList"
|
|
|
+ :tableList="tableList"
|
|
|
+ :selfDom="selfDom"
|
|
|
+ :tableId="tableId"
|
|
|
+ @query="handleQuery"
|
|
|
+ @reset="resetQuery"
|
|
|
+ >
|
|
|
+ <el-form :model="queryParams" ref="queryForm" v-show="showSearch" label-width="80px">
|
|
|
+ <el-row type="flex" style="flex-wrap:wrap;">
|
|
|
+ <el-form-item class="zap-flex-1" prop="value" label="类型">
|
|
|
+ <el-select
|
|
|
+ class="zap-form-input--small"
|
|
|
+ v-model="queryParams.value"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ v-if="companyType !='00'"
|
|
|
+ @change="change"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in options"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.value"
|
|
|
+ placeholder="请选择"
|
|
|
+ clearable
|
|
|
+ v-if="companyType =='00'"
|
|
|
+ @change="change"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in optionsPlus"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ class="zap-flex-1"
|
|
|
+ prop="queryValue"
|
|
|
+ v-if="queryParams.value =='02'"
|
|
|
+ label="类型"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ class="zap-form-input--small"
|
|
|
+ v-model="queryParams.queryValue"
|
|
|
+ placeholder="请选择账款类型"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in newOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ class="zap-flex-1"
|
|
|
+ prop="queryValue"
|
|
|
+ v-if="queryParams.value !='02'"
|
|
|
+ label-width="0"
|
|
|
+ >
|
|
|
+ <el-input
|
|
|
+ class="zap-form-input--medium ml24"
|
|
|
+ v-model="queryParams.queryValue"
|
|
|
+ placeholder="请输入关键字模糊查询"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ maxlength="30"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item class="zap-flex-1" label="到期日期" prop="expireDate">
|
|
|
+ <el-date-picker
|
|
|
+ class="zap-form-input--default"
|
|
|
+ clearable
|
|
|
+ unlink-panels
|
|
|
+ v-model="queryParams.expireDate"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
</search-bar>
|
|
|
<div class="zap-content zap-margin-top">
|
|
|
- <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['service:bill:add']">新增</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['service:bill:add']"
|
|
|
+ >新增</el-button>
|
|
|
</div>
|
|
|
|
|
|
<el-row class="zap-content">
|
|
|
- <el-table stripe v-loading="loading" :data="billList" row-key="categoryId" border default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
|
- <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="账款编号" align="center" prop="zbiNumber" v-if="uncheckList.zbiNumber" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="账款名称" align="center" prop="zbiName" v-if="uncheckList.zbiName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="账款类型" align="center" prop="zbiType" v-if="uncheckList.zbiType&&company.scyType!='00'" :show-overflow-tooltip="true" :formatter="typeFormat" />
|
|
|
- <el-table-column label="关联融信" align="center" prop="zfiNumber" v-if="uncheckList.zfiNumber" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="应付方" align="center" prop="payerName" v-if="uncheckList.payerName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="应收方" align="center" prop="payeeName" v-if="uncheckList.payeeName" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="账款金额" align="center" :formatter="moneyFormat" prop="zbiAmount" v-if="uncheckList.zbiAmount" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="贸易日期" align="center" prop="zbiDate" v-if="uncheckList.zbiDate" :show-overflow-tooltip="true">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ parseTime(new Date(scope.row.zbiDate),'{y}-{m}-{d}') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="预计还款日" align="center" prop="zbiPayDate" v-if="uncheckList.zbiPayDate" :show-overflow-tooltip="true">
|
|
|
- <template slot-scope="scope">
|
|
|
- <span>{{ parseTime(new Date(scope.row.zbiPayDate),'{y}-{m}-{d}') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="账款状态" align="center" prop="zbiStatus" v-if="uncheckList.zbiStatus" :show-overflow-tooltip="true" :formatter="statusFormat" />
|
|
|
- <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button class="zap-button-plain" size="mini" type="text" @click="handleDetail(scope.row)" v-show="scope.row.zfiNumber" v-hasPermi="['service:bill:detail']">详情</el-button>
|
|
|
- <el-button class="zap-button-primary" size="mini" type="text" @click="handleUpdate(scope.row)" v-show="!scope.row.zfiNumber" v-hasPermi="['service:bill:edit']">修改</el-button>
|
|
|
- <el-button class="zap-button-confirmation" size="mini" type="text" @click="handleDelete(scope.row)" v-show="!scope.row.zfiNumber" v-hasPermi="['service:bill:del']">删除</el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <el-table
|
|
|
+ stripe
|
|
|
+ v-loading="loading"
|
|
|
+ :data="billList"
|
|
|
+ row-key="categoryId"
|
|
|
+ border
|
|
|
+ default-expand-all
|
|
|
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="账款编号"
|
|
|
+ align="center"
|
|
|
+ prop="zbiNumber"
|
|
|
+ v-if="uncheckList.zbiNumber"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="账款名称"
|
|
|
+ align="center"
|
|
|
+ prop="zbiName"
|
|
|
+ v-if="uncheckList.zbiName"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="账款类型"
|
|
|
+ align="center"
|
|
|
+ prop="zbiType"
|
|
|
+ v-if="uncheckList.zbiType&&company.scyType!='00'"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ :formatter="typeFormat"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="关联融信"
|
|
|
+ align="center"
|
|
|
+ prop="zfiNumber"
|
|
|
+ v-if="uncheckList.zfiNumber"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="应付方"
|
|
|
+ align="center"
|
|
|
+ prop="payerName"
|
|
|
+ v-if="uncheckList.payerName"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="应收方"
|
|
|
+ align="center"
|
|
|
+ prop="payeeName"
|
|
|
+ v-if="uncheckList.payeeName"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="账款金额"
|
|
|
+ align="center"
|
|
|
+ :formatter="moneyFormat"
|
|
|
+ prop="zbiAmount"
|
|
|
+ v-if="uncheckList.zbiAmount"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="贸易日期"
|
|
|
+ align="center"
|
|
|
+ prop="zbiDate"
|
|
|
+ v-if="uncheckList.zbiDate"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(new Date(scope.row.zbiDate),'{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="预计还款日"
|
|
|
+ align="center"
|
|
|
+ prop="zbiPayDate"
|
|
|
+ v-if="uncheckList.zbiPayDate"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ parseTime(new Date(scope.row.zbiPayDate),'{y}-{m}-{d}') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="账款状态"
|
|
|
+ align="center"
|
|
|
+ prop="zbiStatus"
|
|
|
+ v-if="uncheckList.zbiStatus"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ :formatter="statusFormat"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ fixed="right"
|
|
|
+ width="200"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ class="zap-button-plain"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleDetail(scope.row)"
|
|
|
+ v-show="scope.row.zfiNumber"
|
|
|
+ v-hasPermi="['service:bill:detail']"
|
|
|
+ >详情</el-button>
|
|
|
+ <el-button
|
|
|
+ class="zap-button-primary"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-show="!scope.row.zfiNumber"
|
|
|
+ v-hasPermi="['service:bill:edit']"
|
|
|
+ >修改</el-button>
|
|
|
+ <el-button
|
|
|
+ class="zap-button-confirmation"
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-show="!scope.row.zfiNumber"
|
|
|
+ v-hasPermi="['service:bill:del']"
|
|
|
+ >删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
</el-row>
|
|
|
|
|
|
- <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
|
-
|
|
|
-</div>
|
|
|
+ <pagination
|
|
|
+ v-show="total>0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {
|
|
|
- listBill,
|
|
|
- deleteBill
|
|
|
-} from "@/api/service/bill/bill";
|
|
|
-import {
|
|
|
- getOwnCompany
|
|
|
-} from "@/api/common/company";
|
|
|
-import {
|
|
|
- getUserProfile
|
|
|
-} from "@/api/system/user";
|
|
|
-import {
|
|
|
- columnQuery,
|
|
|
- columnfilter
|
|
|
-} from "@/api/common/columnSetting";
|
|
|
-import ColumnSetting from '../../../components/Table/columnSetting.vue';
|
|
|
-import Cookies from 'js-cookie'
|
|
|
-import SearchBar from '@/components/SearchBar/index.vue'
|
|
|
+import { listBill, deleteBill } from "@/api/service/bill/bill";
|
|
|
+import { getOwnCompany } from "@/api/common/company";
|
|
|
+import { getUserProfile } from "@/api/system/user";
|
|
|
+import { columnQuery, columnfilter } from "@/api/common/columnSetting";
|
|
|
+import ColumnSetting from "../../../components/Table/columnSetting.vue";
|
|
|
+import Cookies from "js-cookie";
|
|
|
+import SearchBar from "@/components/SearchBar/index.vue";
|
|
|
export default {
|
|
|
- name: "Bill",
|
|
|
- components: {
|
|
|
- ColumnSetting,
|
|
|
- SearchBar
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- options: [{
|
|
|
- value: '00',
|
|
|
- label: '按账款名称查询'
|
|
|
- }, {
|
|
|
- value: '01',
|
|
|
- label: '按账款编号查询'
|
|
|
- }, {
|
|
|
- value: '02',
|
|
|
- label: '按账款类型查询'
|
|
|
- }, {
|
|
|
- value: '03',
|
|
|
- label: '按应收企业名称查询'
|
|
|
- }, {
|
|
|
- value: '04',
|
|
|
- label: '按应付企业名称查询'
|
|
|
- }],
|
|
|
- optionsPlus: [{
|
|
|
- value: '00',
|
|
|
- label: '按账款名称查询'
|
|
|
- }, {
|
|
|
- value: '01',
|
|
|
- label: '按账款编号查询'
|
|
|
- }, {
|
|
|
- value: '03',
|
|
|
- label: '按应收企业名称查询'
|
|
|
- }, {
|
|
|
- value: '04',
|
|
|
- label: '按应付企业名称查询'
|
|
|
- }],
|
|
|
- newOptions: [{
|
|
|
- value: '00',
|
|
|
- label: '应收账款'
|
|
|
- }, {
|
|
|
- value: '01',
|
|
|
- label: '应付账款'
|
|
|
- }],
|
|
|
- value: null,
|
|
|
- // 遮罩层
|
|
|
- loading: false,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- //企业类型
|
|
|
- companyType: null,
|
|
|
- // 资料目录表格数据
|
|
|
- billList: [],
|
|
|
- //账款类型
|
|
|
- typeOptions: [],
|
|
|
- //账款状态
|
|
|
- statusOptions: [],
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- // zbiNumber: null,
|
|
|
- // zbiName: null,
|
|
|
- // zbiType: null,
|
|
|
- // payeeName: null,
|
|
|
- // payerName: null,
|
|
|
- // zbiStatus:null,
|
|
|
- value: null,
|
|
|
- // queryType:null,
|
|
|
- queryValue: null,
|
|
|
- expireDate: null,
|
|
|
- },
|
|
|
- company: {},
|
|
|
- //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
|
|
|
- tableList: [{
|
|
|
- label: 'zbiNumber',
|
|
|
- value: '账款编号'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zbiName',
|
|
|
- value: '账款名称'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zbiType',
|
|
|
- value: '账款类型'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zfiNumber',
|
|
|
- value: '关联融信'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'payerName',
|
|
|
- value: '应付方'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'payeeName',
|
|
|
- value: '应收方'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zbiAmount',
|
|
|
- value: '账款金额'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zbiDate',
|
|
|
- value: '贸易日期'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zbiPayDate',
|
|
|
- value: '预计收/付款日期'
|
|
|
- },
|
|
|
- {
|
|
|
- label: 'zbiStatus',
|
|
|
- value: '账款状态'
|
|
|
- }
|
|
|
- ],
|
|
|
- checkList: [], //筛选列选中的数据列表--显示隐藏列用
|
|
|
- uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
|
|
|
- selfDom: this,
|
|
|
- tableId: "/sc-service/ownBill/billList",
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- getUserProfile().then((response) => {
|
|
|
- this.companyType = response.data.companyType
|
|
|
- if ("00" == response.data.companyType) {
|
|
|
- this.queryParams.value = "01"
|
|
|
- } else if ("01" == response.data.companyType) {
|
|
|
- this.queryParams.value = "03"
|
|
|
- } else if ("02" == response.data.companyType) {
|
|
|
- this.queryParams.value = "04"
|
|
|
- }
|
|
|
- });
|
|
|
- getOwnCompany().then((response) => {
|
|
|
- this.company = response.data;
|
|
|
- });
|
|
|
- this.getList();
|
|
|
- this.getDicts("zc_bill_type").then(response => {
|
|
|
- this.typeOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("zc_bill_status").then(response => {
|
|
|
- this.statusOptions = response.data;
|
|
|
- });
|
|
|
- },
|
|
|
- activated() {
|
|
|
- this.getList();
|
|
|
- this.getDicts("zc_bill_type").then(response => {
|
|
|
- this.typeOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("zc_bill_status").then(response => {
|
|
|
- this.statusOptions = response.data;
|
|
|
- });
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.columnQuery();
|
|
|
- },
|
|
|
- methods: {
|
|
|
- //列表格式化金额
|
|
|
- moneyFormat(row, column, cellValue) {
|
|
|
- if (cellValue == null || cellValue == undefined || cellValue == "") {
|
|
|
- cellValue = "0.00";
|
|
|
- }
|
|
|
- cellValue += "";
|
|
|
- if (!cellValue.includes(".")) {
|
|
|
- cellValue += ".00";
|
|
|
+ name: "Bill",
|
|
|
+ components: {
|
|
|
+ ColumnSetting,
|
|
|
+ SearchBar
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ options: [
|
|
|
+ {
|
|
|
+ value: "00",
|
|
|
+ label: "按账款名称查询"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "01",
|
|
|
+ label: "按账款编号查询"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "02",
|
|
|
+ label: "按账款类型查询"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "03",
|
|
|
+ label: "按应收企业名称查询"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: "04",
|
|
|
+ label: "按应付企业名称查询"
|
|
|
}
|
|
|
- return cellValue
|
|
|
- .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
|
|
|
- return $1 + ",";
|
|
|
- })
|
|
|
- .replace(/\.$/, "");
|
|
|
+ ],
|
|
|
+ optionsPlus: [
|
|
|
+ {
|
|
|
+ value: "00",
|
|
|
+ label: "按账款名称查询"
|
|
|
},
|
|
|
- //获取当前客户是否之前设置过列展示隐藏
|
|
|
- columnQuery() {
|
|
|
- //获取页面路径
|
|
|
- var psfPagePath = window.location.pathname;
|
|
|
- //用请求后台的url作为唯一标识
|
|
|
- var psfTableName = this.tableId;
|
|
|
- var columnForm = {};
|
|
|
- columnForm.psfPagePath = psfPagePath;
|
|
|
- columnForm.psfTableName = psfTableName;
|
|
|
- columnQuery(columnForm).then(response => {
|
|
|
- if (response.data && response.data.psfShowData) {
|
|
|
- this.checkList = response.data.psfShowData;
|
|
|
- }
|
|
|
- this.filter();
|
|
|
- })
|
|
|
+ {
|
|
|
+ value: "01",
|
|
|
+ label: "按账款编号查询"
|
|
|
},
|
|
|
- //控制隐藏显示的函数
|
|
|
- filter(checkList) {
|
|
|
- if (!!checkList) {
|
|
|
- this.checkList = checkList;
|
|
|
- }
|
|
|
- columnfilter(this.selfDom);
|
|
|
+ {
|
|
|
+ value: "03",
|
|
|
+ label: "按应收企业名称查询"
|
|
|
},
|
|
|
- /** 查询往来账款列表 */
|
|
|
- getList() {
|
|
|
- this.loading = true;
|
|
|
- listBill(this.queryParams).then(response => {
|
|
|
- this.billList = response.data.records;
|
|
|
- this.total = response.data.total
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ {
|
|
|
+ value: "04",
|
|
|
+ label: "按应付企业名称查询"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ newOptions: [
|
|
|
+ {
|
|
|
+ value: "00",
|
|
|
+ label: "应收账款"
|
|
|
},
|
|
|
- // 账款类型字典翻译
|
|
|
- typeFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.typeOptions, row.zbiType);
|
|
|
+ {
|
|
|
+ value: "01",
|
|
|
+ label: "应付账款"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ value: null,
|
|
|
+ // 遮罩层
|
|
|
+ loading: false,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ //企业类型
|
|
|
+ companyType: null,
|
|
|
+ // 资料目录表格数据
|
|
|
+ billList: [],
|
|
|
+ //账款类型
|
|
|
+ typeOptions: [],
|
|
|
+ //账款状态
|
|
|
+ statusOptions: [],
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ // zbiNumber: null,
|
|
|
+ // zbiName: null,
|
|
|
+ // zbiType: null,
|
|
|
+ // payeeName: null,
|
|
|
+ // payerName: null,
|
|
|
+ // zbiStatus:null,
|
|
|
+ value: null,
|
|
|
+ // queryType:null,
|
|
|
+ queryValue: null,
|
|
|
+ expireDate: null
|
|
|
+ },
|
|
|
+ company: {},
|
|
|
+ //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
|
|
|
+ tableList: [
|
|
|
+ {
|
|
|
+ label: "zbiNumber",
|
|
|
+ value: "账款编号"
|
|
|
},
|
|
|
- //账款状态字典翻译
|
|
|
- statusFormat(row, column) {
|
|
|
- return this.selectDictLabel(this.statusOptions, row.zbiStatus);
|
|
|
+ {
|
|
|
+ label: "zbiName",
|
|
|
+ value: "账款名称"
|
|
|
},
|
|
|
- change() {
|
|
|
- this.queryParams.queryValue = null
|
|
|
+ {
|
|
|
+ label: "zbiType",
|
|
|
+ value: "账款类型"
|
|
|
},
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {
|
|
|
- dciDeptName: undefined
|
|
|
- };
|
|
|
- this.resetForm("form");
|
|
|
+ {
|
|
|
+ label: "zfiNumber",
|
|
|
+ value: "关联融信"
|
|
|
},
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
- this.getList();
|
|
|
+ {
|
|
|
+ label: "payerName",
|
|
|
+ value: "应付方"
|
|
|
},
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
+ {
|
|
|
+ label: "payeeName",
|
|
|
+ value: "应收方"
|
|
|
},
|
|
|
- /** 新增按钮操作 */
|
|
|
- handleAdd(row) {
|
|
|
- this.resetForm("queryForm");
|
|
|
- Cookies.set("/bill/billAdd", this.$route.fullPath)
|
|
|
- this.$router.push({
|
|
|
- path: "/bill/billAdd"
|
|
|
- });
|
|
|
+ {
|
|
|
+ label: "zbiAmount",
|
|
|
+ value: "账款金额"
|
|
|
},
|
|
|
- /** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.resetForm("queryForm");
|
|
|
- Cookies.set("/bill/billEdit/" + row.zbiId, this.$route.fullPath)
|
|
|
- this.$router.push({
|
|
|
- path: "/bill/billEdit/" + row.zbiId
|
|
|
- });
|
|
|
+ {
|
|
|
+ label: "zbiDate",
|
|
|
+ value: "贸易日期"
|
|
|
},
|
|
|
- /** 详情按钮操作 */
|
|
|
- handleDetail(row) {
|
|
|
- this.resetForm("queryForm");
|
|
|
- Cookies.set("/bill/billDetail/" + row.zbiId, this.$route.fullPath)
|
|
|
- this.$router.push({
|
|
|
- path: "/bill/billDetail/" + row.zbiId
|
|
|
- });
|
|
|
+ {
|
|
|
+ label: "zbiPayDate",
|
|
|
+ value: "预计收/付款日期"
|
|
|
},
|
|
|
- /** 删除按钮操作 */
|
|
|
- handleDelete(row) {
|
|
|
- var self = this
|
|
|
- const zbiName = row.zbiName;
|
|
|
- const zbiIds = row.zbiId;
|
|
|
- this.$confirm('是否确认删除往来账款名称为"' + zbiName + '"的数据项?', "警告", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(function () {
|
|
|
- self.loading = true
|
|
|
- return deleteBill(zbiIds);
|
|
|
- }).then(() => {
|
|
|
- this.getList();
|
|
|
- this.msgSuccess("删除成功");
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "已取消删除",
|
|
|
- });
|
|
|
- });
|
|
|
+ {
|
|
|
+ label: "zbiStatus",
|
|
|
+ value: "账款状态"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ checkList: [], //筛选列选中的数据列表--显示隐藏列用
|
|
|
+ uncheckList: {}, //控制筛选列显示隐藏--显示隐藏列用
|
|
|
+ selfDom: this,
|
|
|
+ tableId: "/sc-service/ownBill/billList"
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ getUserProfile().then(response => {
|
|
|
+ this.companyType = response.data.companyType;
|
|
|
+ if ("00" == response.data.companyType) {
|
|
|
+ this.queryParams.value = "01";
|
|
|
+ } else if ("01" == response.data.companyType) {
|
|
|
+ this.queryParams.value = "03";
|
|
|
+ } else if ("02" == response.data.companyType) {
|
|
|
+ this.queryParams.value = "04";
|
|
|
+ }
|
|
|
+ });
|
|
|
+ getOwnCompany().then(response => {
|
|
|
+ this.company = response.data;
|
|
|
+ });
|
|
|
+ this.getList();
|
|
|
+ this.getDicts("zc_bill_type").then(response => {
|
|
|
+ this.typeOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("zc_bill_status").then(response => {
|
|
|
+ this.statusOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.getList();
|
|
|
+ this.getDicts("zc_bill_type").then(response => {
|
|
|
+ this.typeOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("zc_bill_status").then(response => {
|
|
|
+ this.statusOptions = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.columnQuery();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ //列表格式化金额
|
|
|
+ moneyFormat(row, column, cellValue) {
|
|
|
+ if (cellValue == null || cellValue == undefined || cellValue == "") {
|
|
|
+ cellValue = "0.00";
|
|
|
+ }
|
|
|
+ cellValue += "";
|
|
|
+ if (!cellValue.includes(".")) {
|
|
|
+ cellValue += ".00";
|
|
|
+ }
|
|
|
+ return cellValue
|
|
|
+ .replace(/(\d)(?=(\d{3})+\.)/g, function($0, $1) {
|
|
|
+ return $1 + ",";
|
|
|
+ })
|
|
|
+ .replace(/\.$/, "");
|
|
|
+ },
|
|
|
+ //获取当前客户是否之前设置过列展示隐藏
|
|
|
+ columnQuery() {
|
|
|
+ //获取页面路径
|
|
|
+ var psfPagePath = window.location.pathname;
|
|
|
+ //用请求后台的url作为唯一标识
|
|
|
+ var psfTableName = this.tableId;
|
|
|
+ var columnForm = {};
|
|
|
+ columnForm.psfPagePath = psfPagePath;
|
|
|
+ columnForm.psfTableName = psfTableName;
|
|
|
+ columnQuery(columnForm).then(response => {
|
|
|
+ if (response.data && response.data.psfShowData) {
|
|
|
+ this.checkList = response.data.psfShowData;
|
|
|
+ }
|
|
|
+ this.filter();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //控制隐藏显示的函数
|
|
|
+ filter(checkList) {
|
|
|
+ if (!!checkList) {
|
|
|
+ this.checkList = checkList;
|
|
|
+ }
|
|
|
+ columnfilter(this.selfDom);
|
|
|
+ },
|
|
|
+ /** 查询往来账款列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listBill(this.queryParams).then(response => {
|
|
|
+ this.billList = response.data.records;
|
|
|
+ this.total = response.data.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 账款类型字典翻译
|
|
|
+ typeFormat(row, column) {
|
|
|
+ return this.selectDictLabel(this.typeOptions, row.zbiType);
|
|
|
+ },
|
|
|
+ //账款状态字典翻译
|
|
|
+ statusFormat(row, column) {
|
|
|
+ return this.selectDictLabel(this.statusOptions, row.zbiStatus);
|
|
|
+ },
|
|
|
+ change() {
|
|
|
+ this.queryParams.queryValue = null;
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ dciDeptName: undefined
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd(row) {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ Cookies.set("/bill/billAdd", this.$route.fullPath);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/bill/billAdd"
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ Cookies.set("/bill/billEdit/" + row.zbiId, this.$route.fullPath);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/bill/billEdit/" + row.zbiId
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 详情按钮操作 */
|
|
|
+ handleDetail(row) {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ Cookies.set("/bill/billDetail/" + row.zbiId, this.$route.fullPath);
|
|
|
+ this.$router.push({
|
|
|
+ path: "/bill/billDetail/" + row.zbiId
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ var self = this;
|
|
|
+ const zbiName = row.zbiName;
|
|
|
+ const zbiIds = row.zbiId;
|
|
|
+ this.$confirm(
|
|
|
+ '是否确认删除往来账款名称为"' + zbiName + '"的数据项?',
|
|
|
+ "警告",
|
|
|
+ {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
}
|
|
|
+ )
|
|
|
+ .then(function() {
|
|
|
+ self.loading = true;
|
|
|
+ return deleteBill(zbiIds);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "已取消删除"
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|