|
@@ -0,0 +1,706 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryForm"
|
|
|
+ size="small"
|
|
|
+ :inline="true"
|
|
|
+ v-show="showSearch"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
+ <el-form-item label="流水号" prop="serialNumber">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.serialNumber"
|
|
|
+ placeholder="请输入流水号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="日期范围" prop="otherCollectionDate">
|
|
|
+ <!-- <el-date-picker
|
|
|
+ clearable
|
|
|
+ v-model="queryParams.otherCollectionDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请选择日期"
|
|
|
+ >
|
|
|
+ </el-date-picker> -->
|
|
|
+ <el-date-picker
|
|
|
+ v-model="timeRange"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ @change="timeRangeChange"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="客户" prop="customerId">
|
|
|
+ <!-- <el-input
|
|
|
+ v-model="queryParams.customerId"
|
|
|
+ placeholder="请输入客户编号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ /> -->
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.customerId"
|
|
|
+ placeholder="请选择客户"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ @change="handleQuery"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in customSelectData"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.customName"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="部门编号" prop="deptId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.deptId"
|
|
|
+ placeholder="请输入部门编号"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuery"
|
|
|
+ >搜索</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
+ >重置</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['system:SaleOtherCollection:add']"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+ v-hasPermi="['system:SaleOtherCollection:edit']"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+ v-hasPermi="['system:SaleOtherCollection:remove']"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+ v-hasPermi="['system:SaleOtherCollection:export']"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
+ </el-col> -->
|
|
|
+ <right-toolbar
|
|
|
+ :showSearch.sync="showSearch"
|
|
|
+ @queryTable="getList"
|
|
|
+ ></right-toolbar>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="SaleOtherCollectionList"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="流水号" align="center" prop="serialNumber" />
|
|
|
+ <el-table-column
|
|
|
+ label="收款日期"
|
|
|
+ align="center"
|
|
|
+ prop="otherCollectionDate"
|
|
|
+ width="180"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ parseTime(scope.row.otherCollectionDate, "{y}-{m}-{d}")
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="客户" align="center" prop="customerName" />
|
|
|
+ <el-table-column
|
|
|
+ label="经办人编号"
|
|
|
+ align="center"
|
|
|
+ prop="personInCharge"
|
|
|
+ />
|
|
|
+ <el-table-column label="付款方式" align="center" prop="paymentMethod">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{
|
|
|
+ getDictLabel(
|
|
|
+ scope.row.paymentMethod,
|
|
|
+ "collection_registration_payment_method"
|
|
|
+ )
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="出门证号"
|
|
|
+ align="center"
|
|
|
+ prop="travelCertificateNumber"
|
|
|
+ />
|
|
|
+ <el-table-column label="部门" align="center" prop="deptName" />
|
|
|
+ <!-- <el-table-column
|
|
|
+ label="收款明细"
|
|
|
+ align="center"
|
|
|
+ prop="collectionDetails"
|
|
|
+ /> -->
|
|
|
+ <el-table-column label="应收项目" align="center" prop="itemReceivable">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getDictLabel(scope.row.itemReceivable, "item_receivable") }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="金额" align="center" prop="amount" />
|
|
|
+ <!-- <el-table-column label="记账标志" align="center" prop="bookkeepingFlag" /> -->
|
|
|
+ <el-table-column label="状态" align="center" prop="status">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ getDictLabel(scope.row.status, "registration_collection_status") }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" align="center" prop="collectionDetails" />
|
|
|
+ <el-table-column
|
|
|
+ label="操作"
|
|
|
+ align="center"
|
|
|
+ class-name="small-padding fixed-width"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-dropdown>
|
|
|
+ <el-button type="warning" plain size="small">
|
|
|
+ 操作<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item
|
|
|
+ ><el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-circle-check"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+ v-hasPermi="['system:SaleOtherCollection:edit']"
|
|
|
+ >审批</el-button
|
|
|
+ ></el-dropdown-item
|
|
|
+ >
|
|
|
+ <!-- <el-dropdown-item
|
|
|
+ ><el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+ v-hasPermi="['system:SaleOtherCollection:remove']"
|
|
|
+ >删除</el-button
|
|
|
+ ></el-dropdown-item
|
|
|
+ > -->
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParams.pageNum"
|
|
|
+ :limit.sync="queryParams.pageSize"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
+
|
|
|
+ <!-- 添加或修改其他收款对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <!-- <el-form-item label="流水号" prop="serialNumber">
|
|
|
+ <el-input v-model="form.serialNumber" placeholder="请输入流水号" />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="日期" prop="otherCollectionDate">
|
|
|
+ <el-date-picker
|
|
|
+ disabled
|
|
|
+ clearable
|
|
|
+ v-model="form.otherCollectionDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请选择日期"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="客户" prop="customerId">
|
|
|
+ <el-select
|
|
|
+ disabled
|
|
|
+ v-model="form.customerId"
|
|
|
+ placeholder="请选择客户"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in customSelectData"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.customName"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="经办人" prop="personInChargeId">
|
|
|
+ <el-select
|
|
|
+ disabled
|
|
|
+ v-model="form.personInChargeId"
|
|
|
+ placeholder="请选择经办人"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in financeSelectData"
|
|
|
+ :key="item.userId"
|
|
|
+ :label="item.nickName"
|
|
|
+ :value="item.userId"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="付款方式" prop="paymentMethod">
|
|
|
+ <el-select
|
|
|
+ disabled
|
|
|
+ v-model="form.paymentMethod"
|
|
|
+ placeholder="请选择付款方式"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type
|
|
|
+ .collection_registration_payment_method"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="出门证号" prop="travelCertificateNumber">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="form.travelCertificateNumber"
|
|
|
+ placeholder="请输入出门证号"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="部门" prop="deptId">
|
|
|
+ <!-- <el-input v-model="form.deptId" placeholder="请输入部门编号" /> -->
|
|
|
+ <el-select
|
|
|
+ disabled
|
|
|
+ v-model="form.deptId"
|
|
|
+ placeholder="请选择部门"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in deptSelectData"
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-form-item label="收款明细" prop="collectionDetails">
|
|
|
+ <el-input
|
|
|
+ v-model="form.collectionDetails"
|
|
|
+ placeholder="请输入收款明细"
|
|
|
+ />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="应收项目" prop="itemReceivable">
|
|
|
+ <!-- <el-input
|
|
|
+ v-model="form.itemReceivable"
|
|
|
+ placeholder="请输入应收项目"
|
|
|
+ /> -->
|
|
|
+ <el-select
|
|
|
+ disabled
|
|
|
+ v-model="form.itemReceivable"
|
|
|
+ placeholder="请选择应收项目"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in dict.type.item_receivable"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="金额" prop="amount">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="form.amount"
|
|
|
+ placeholder="请输入金额"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="备注" prop="collectionDetails">
|
|
|
+ <el-input
|
|
|
+ disabled
|
|
|
+ v-model="form.collectionDetails"
|
|
|
+ placeholder="请输入备注"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
+ <el-divider direction="horizontal" content-position="center"
|
|
|
+ >审批</el-divider
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ :model="approveForm"
|
|
|
+ ref="approveForm"
|
|
|
+ label-width="80px"
|
|
|
+ :inline="false"
|
|
|
+ size="normal"
|
|
|
+ >
|
|
|
+ <el-form-item label="是否通过">
|
|
|
+ <el-radio-group v-model="approveForm.status">
|
|
|
+ <el-radio :label="'3'">未通过</el-radio>
|
|
|
+ <el-radio :label="'4'">通过</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <!-- 应收表格 -->
|
|
|
+ <!-- <el-table
|
|
|
+ :data="receiveTableData"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" width="50" />
|
|
|
+ <el-table-column label="应收项目" prop="itemReceivable" />
|
|
|
+ <el-table-column label="金额" prop="amount" />
|
|
|
+ <el-table-column label="操作">
|
|
|
+ <template slot-scope="scope"> </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table> -->
|
|
|
+
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ listSaleOtherCollection,
|
|
|
+ getSaleOtherCollection,
|
|
|
+ delSaleOtherCollection,
|
|
|
+ addSaleOtherCollection,
|
|
|
+ updateSaleOtherCollection,
|
|
|
+ getDeptList,
|
|
|
+ getFinanceList,
|
|
|
+ saleOtherCollectionPass,
|
|
|
+} from "@/api/system/SaleOtherCollection";
|
|
|
+import { getCustomList } from "@/api/system/SaleRegistrationCollection";
|
|
|
+import moment from "moment";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "SaleOtherCollection",
|
|
|
+ dicts: [
|
|
|
+ "collection_registration_payment_method",
|
|
|
+ "item_receivable",
|
|
|
+ "registration_collection_status",
|
|
|
+ ],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ approveForm: {
|
|
|
+ status: "3",
|
|
|
+ },
|
|
|
+ currentRow: {},
|
|
|
+ timeRange: [],
|
|
|
+ financeSelectData: [], //经办人选择数据
|
|
|
+ deptSelectData: [], //部门选择数据
|
|
|
+ customSelectData: [], //客户选择数据
|
|
|
+ receiveTableData: [], //应收款表格数据
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 其他收款表格数据
|
|
|
+ SaleOtherCollectionList: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ serialNumber: null,
|
|
|
+ otherCollectionDate: null,
|
|
|
+ customerId: null,
|
|
|
+ personInChargeId: null,
|
|
|
+ paymentMethod: null,
|
|
|
+ travelCertificateNumber: null,
|
|
|
+ deptId: null,
|
|
|
+ collectionDetails: null,
|
|
|
+ itemReceivable: null,
|
|
|
+ amount: null,
|
|
|
+ bookkeepingFlag: null,
|
|
|
+ status: 2,
|
|
|
+ startTime: null,
|
|
|
+ endTime: null,
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {},
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ async mounted() {
|
|
|
+ await this.initSelectData();
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 日期范围改变回调
|
|
|
+ timeRangeChange(val) {
|
|
|
+ this.queryParams.startTime = moment(val[0]).format("YYYY-MM-DD");
|
|
|
+ this.queryParams.endTime = moment(val[1]).format("YYYY-MM-DD");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 根据字典value获取字典label
|
|
|
+ getDictLabel(value, dict) {
|
|
|
+ return (
|
|
|
+ this.dict.type[dict].find((item) => {
|
|
|
+ return item.value === value;
|
|
|
+ })?.label || ""
|
|
|
+ );
|
|
|
+ },
|
|
|
+ // 初始化下拉框选择数据
|
|
|
+ async initSelectData() {
|
|
|
+ try {
|
|
|
+ // 客户数据
|
|
|
+ let res1 = await getCustomList({ isEnablePaging: false });
|
|
|
+ if (res1.code == 200) {
|
|
|
+ this.customSelectData = res1.rows;
|
|
|
+ } else {
|
|
|
+ throw new Error(res1.msg);
|
|
|
+ }
|
|
|
+ // 部门数据
|
|
|
+ let res2 = await getDeptList({ isEnablePaging: false });
|
|
|
+ if (res2.code == 200) {
|
|
|
+ this.deptSelectData = res2.data;
|
|
|
+ } else {
|
|
|
+ throw new Error(res2.msg);
|
|
|
+ }
|
|
|
+ // 经办人数据
|
|
|
+ let res3 = await getFinanceList({ isEnablePaging: false });
|
|
|
+ if (res3.code == 200) {
|
|
|
+ this.financeSelectData = res3.data;
|
|
|
+ } else {
|
|
|
+ throw new Error(res3.msg);
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ this.$message.error(error);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 查询其他收款列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listSaleOtherCollection(this.queryParams).then((response) => {
|
|
|
+ this.SaleOtherCollectionList = response.rows.map((item) => {
|
|
|
+ item.customerName =
|
|
|
+ this.customSelectData.find((item2) => item2.id == item.customerId)
|
|
|
+ ?.customName || "";
|
|
|
+ item.deptName =
|
|
|
+ this.deptSelectData.find((item2) => item2.deptId == item.deptId)
|
|
|
+ ?.deptName || "";
|
|
|
+ item.personInCharge =
|
|
|
+ this.financeSelectData.find(
|
|
|
+ (item2) => item2.userId == item.personInChargeId
|
|
|
+ )?.nickName || "";
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ id: null,
|
|
|
+ serialNumber: null,
|
|
|
+ otherCollectionDate: new Date(),
|
|
|
+ customerId: null,
|
|
|
+ personInChargeId: null,
|
|
|
+ paymentMethod: null,
|
|
|
+ travelCertificateNumber: null,
|
|
|
+ deptId: null,
|
|
|
+ collectionDetails: null,
|
|
|
+ itemReceivable: null,
|
|
|
+ amount: null,
|
|
|
+ bookkeepingFlag: null,
|
|
|
+ status: null,
|
|
|
+ remark: null,
|
|
|
+ createBy: null,
|
|
|
+ createById: null,
|
|
|
+ createTime: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateById: null,
|
|
|
+ updateTime: null,
|
|
|
+ delFlag: null,
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加其他收款";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ this.currentRow = row;
|
|
|
+ console.log("this.currentRow", this.currentRow);
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getSaleOtherCollection(id).then((response) => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "审批收款";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.approveForm.status == 3) {
|
|
|
+ let payLoad = {
|
|
|
+ id: this.currentRow.id,
|
|
|
+ status: "3",
|
|
|
+ };
|
|
|
+ updateSaleOtherCollection(payLoad).then((response) => {
|
|
|
+ this.$modal.msgSuccess("审批完成!");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ let payLoad = {
|
|
|
+ id: this.currentRow.id,
|
|
|
+ status: "4",
|
|
|
+ customerId: this.currentRow.customerId,
|
|
|
+ amount: this.currentRow.amount,
|
|
|
+ paymentMethod: this.currentRow.paymentMethod,
|
|
|
+ collectionDetails: this.currentRow.collectionDetails,
|
|
|
+ };
|
|
|
+ // this.form.serialNumber = new Date().getTime();
|
|
|
+ saleOtherCollectionPass(payLoad).then((response) => {
|
|
|
+ this.$modal.msgSuccess("审批完成!");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$modal
|
|
|
+ .confirm('是否确认删除其他收款编号为"' + ids + '"的数据项?')
|
|
|
+ .then(function () {
|
|
|
+ return delSaleOtherCollection(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ this.download(
|
|
|
+ "system/SaleOtherCollection/export",
|
|
|
+ {
|
|
|
+ ...this.queryParams,
|
|
|
+ },
|
|
|
+ `SaleOtherCollection_${new Date().getTime()}.xlsx`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|