|
@@ -0,0 +1,662 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :inline="true" ref="form" :model="form" :rules="rules" label-width="auto" style="margin-top: 20px;" disabled >
|
|
|
+ <el-form-item label="融资产品编号:" prop="zfpNumber" style="margin-left: 5%">
|
|
|
+ <el-input v-model="form.zfpNumber" placeholder="请输入融资产品名称" :disabled="disabled" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建人:" prop="userName" style="margin-left: 5%">
|
|
|
+ <el-input v-model="userName" placeholder="请输入融资产品名称" :disabled="disabled" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建时间:" prop="createTime" style="margin-left: 5.7%">
|
|
|
+ <el-input v-model="form.createTime" placeholder="请输入融资产品名称" :disabled="disabled" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-divider content-position="left">基本信息</el-divider>
|
|
|
+ <!-- <el-form-item label="融资产品编号" prop="zfpNumber">
|
|
|
+ <el-input v-model="form.zfpNumber" placeholder="请输入融资产品编号" />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="融资产品名称:" prop="zfpName" style="margin-left: 5%">
|
|
|
+ <el-input v-model="form.zfpName" placeholder="请输入融资产品名称" :disabled="disabled" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资金方:" prop="zfpManagementId" style="margin-left: 5%">
|
|
|
+ <el-select
|
|
|
+ style= "width: 95%;"
|
|
|
+ v-model="form.zfpManagementId"
|
|
|
+ placeholder="请选择资金方"
|
|
|
+ clearable
|
|
|
+ :disabled="disabled"
|
|
|
+ size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="(item,index) in companyList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.scyName"
|
|
|
+ :value="item.scyId"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否可拆转融:" style="margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpSplit" label="0" :disabled="disabled">否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpSplit" label="1" :disabled="disabled">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="产品类型:" style="margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpType" label="0" :disabled="disabled">正向</el-radio>
|
|
|
+ <el-radio v-model="form.zfpType" label="1" :disabled="disabled">反向</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-divider content-position="left">平台参数</el-divider>
|
|
|
+
|
|
|
+ <el-form-item label="最小融资金额:" prop="zfpMinimumAmount" style="margin-left: 5%">
|
|
|
+ <el-input v-model="form.zfpMinimumAmount" placeholder="请输入最小融资金额" :disabled="disabled" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="最短融资账期:" prop="zfpShortestPeriod" style="margin-left: 5%">
|
|
|
+ <el-input v-model="form.zfpShortestPeriod" placeholder="最短14天" @change="change" :disabled="disabled"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="服务费是否可退:" style="margin-left: 6%">
|
|
|
+ <el-radio v-model="form.zfpCharge" label="0" :disabled="disabled">否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpCharge" label="1" :disabled="disabled">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否有追索权:" style="margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpRecourse" label="0" :disabled="disabled">否</el-radio>
|
|
|
+ <el-radio style="margin-left: 50%;" v-model="form.zfpRecourse" label="1" :disabled="disabled">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="电子凭证类型:" prop="zfpVoucherType" style="margin-left: 5%">
|
|
|
+ <el-select
|
|
|
+ style= "width: 95%;"
|
|
|
+ v-model="form.zfpVoucherType"
|
|
|
+ placeholder="请选择电子凭证类型"
|
|
|
+ clearable
|
|
|
+ :disabled="disabled"
|
|
|
+ size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in voucherTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-divider content-position="left">资方参数</el-divider>
|
|
|
+
|
|
|
+ <el-form-item label="是否需核心企业开户:" style="margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpCoreAccount" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpCoreAccount" label="1">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否需融资企业开户:" style="margin-left: 11%">
|
|
|
+ <el-radio v-model="form.zfpSupplierAccount" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpSupplierAccount" label="1">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="记账簿托管方式:" prop="zfpBookkeeping" style="margin-left: 12%">
|
|
|
+ <el-select
|
|
|
+ style= "width: 95%;"
|
|
|
+ v-model="form.zfpBookkeeping"
|
|
|
+ placeholder="请选择记账簿托管方式"
|
|
|
+ clearable
|
|
|
+ size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in bookkeepingOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否支持部分融资:" style="float: left; margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpPart" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpPart" label="1">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资方融资费率:" prop="zfpRate" style="margin-left: 11%">
|
|
|
+ <el-input v-model="form.zfpRate" placeholder="请输入资方融资费率" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="融资到期方式:" prop="zfpExpire" style="margin-left: 6%">
|
|
|
+ <el-select
|
|
|
+ style="width: 95%;"
|
|
|
+ v-model="form.zfpExpire"
|
|
|
+ placeholder="请选择融资到期方式"
|
|
|
+ clearable
|
|
|
+ size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in expireOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资方是否支持返佣:" style="margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpProfit" label= "0" >否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpProfit" label= "1" >是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资方返佣方式:" prop="zfpProfitType" style="margin-left: 11.1%" v-if="form.zfpProfit== '1' ">
|
|
|
+ <el-select
|
|
|
+ style="width: 95%;"
|
|
|
+ v-model="form.zfpProfitType"
|
|
|
+ placeholder="请选择资方返佣方式"
|
|
|
+ clearable
|
|
|
+ size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in profitTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="资方返佣费率" prop="zfpProfitRate" style="margin-left: 5%" v-if="form.zfpProfit== '1' ">
|
|
|
+ <el-input v-model="form.zfpProfitRate" placeholder="请输入资方返佣费率" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="是否需平台审批:" style="margin-left: 5%">
|
|
|
+ <el-radio v-model="form.zfpPlatform" label="0">否</el-radio>
|
|
|
+ <el-radio v-model="form.zfpPlatform" label="1">是</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="签署意愿类型:" prop="zfpAuthType" style="margin-left: 11.1%" >
|
|
|
+ <el-select
|
|
|
+ style="width: 95%;"
|
|
|
+ v-model="form.zfpAuthType"
|
|
|
+ placeholder="请选择签署意愿类型"
|
|
|
+ clearable
|
|
|
+ size="small">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in authTypeOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-divider content-position="left">关联合同</el-divider>
|
|
|
+ <el-form-item prop="zfcId" style="margin-left: 100px" >
|
|
|
+ <el-button size="mini" type="primary" @click="openTicket">选择合同</el-button>
|
|
|
+ <el-button size="mini" @click="deleteTicekt">清空全部</el-button>
|
|
|
+ <el-table :data="contractList" style="width: 1100px">
|
|
|
+ <el-table-column label="合同模板编号" align="center" prop="pvfInvoiceTitle" show-overflow-tooltip />
|
|
|
+ <el-table-column label="合同模板名称" align="center" prop="zfcName" />
|
|
|
+ <el-table-column label="签署方" align="center" prop="pvfDate" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.$index, contractList)"
|
|
|
+ >删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <!-- 合同信息 -->
|
|
|
+ <el-dialog :title="invoiceTitle" :visible.sync="open" width="1120px" append-to-body>
|
|
|
+ <el-form :model="queryParamsInvoice" ref="formQuery" :inline="true" label-width="68px" style="margin-bottom: -21px">
|
|
|
+ <el-form-item label="发票标题" prop="pvfInvoiceTitle">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParamsInvoice.pvfInvoiceTitle"
|
|
|
+ placeholder="请输入发票标题"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ maxlength="11"
|
|
|
+ @keyup.enter.native="handleQuerys"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="开票日期" prop="dateTime">
|
|
|
+ <el-date-picker
|
|
|
+ size="small"
|
|
|
+ v-model="queryParamsInvoice.dateTime"
|
|
|
+ unlink-panels
|
|
|
+ style="width: 240px"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ type="daterange"
|
|
|
+ range-separator="-"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button
|
|
|
+ type="cyan"
|
|
|
+ icon="el-icon-search"
|
|
|
+ size="mini"
|
|
|
+ @click="handleQuerys"
|
|
|
+ >搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuerys"
|
|
|
+ >重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-table :data="InvoiceList"
|
|
|
+ ref="tableInvoice"
|
|
|
+ class="single-select-table"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ :row-key="rowkey">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ :reserve-selection="true"
|
|
|
+ width="50"
|
|
|
+ align="center"/>
|
|
|
+ <el-table-column label="序号" type="index" width="50" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ (queryParamsInvoice.pageNum - 1) * queryParamsInvoice.pageSize + scope.$index + 1}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="发票标题" align="center" prop="pvfInvoiceTitle" show-overflow-tooltip width="100" />
|
|
|
+ <el-table-column label="发票金额" align="center" prop="pvfTaxPrice" width="125" />
|
|
|
+ <el-table-column label="发票张数" align="center" prop="pvfInvoiceNum" show-overflow-tooltip width="100" />
|
|
|
+ <el-table-column label="开票日期" align="center" prop="pvfDate" width="95" />
|
|
|
+ <el-table-column label="客户名称" align="center" prop="cciName" width="120" show-overflow-tooltip />
|
|
|
+ <el-table-column label="合同名称" align="center" prop="cifName" width="120" show-overflow-tooltip />
|
|
|
+ <el-table-column label="项目名称" align="center" prop="pifName" width="120" show-overflow-tooltip />
|
|
|
+ <el-table-column label="发票类型" align="center" :formatter="pvfCategoryFormat" prop="pvfCategory" width="120" />
|
|
|
+ <el-table-column label="交付日期" align="center" prop="pvfDeliverTime" width="95" />
|
|
|
+ </el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ :total="total"
|
|
|
+ :page.sync="queryParamsInvoice.pageNum"
|
|
|
+ :limit.sync="queryParamsInvoice.pageSize"
|
|
|
+ @pagination="getInvoiceList" />
|
|
|
+ <!-- <el-button type="primary" @click="submitData()">关闭</el-button> -->
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" @click="cancelTicket">取消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
|
|
|
+ <!-- <el-button @click="cancelSelection">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="changeInvoice">确 定</el-button> -->
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 保存 -->
|
|
|
+ <div class="footer" style="margin-top: 260px; float: right">
|
|
|
+ <el-button type="info" @click="cancel">取消</el-button>
|
|
|
+ <el-button type="success" @click="submitForm"
|
|
|
+ >提交</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { getFinanceProduct,updateFinanceProduct } from "@/api/service/financeProduct/financeProduct";
|
|
|
+import { listCompany } from "@/api/common/company";
|
|
|
+export default {
|
|
|
+ name: "detailContract",
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ disabled: false,
|
|
|
+ //发票表格数据
|
|
|
+ contractList: [],
|
|
|
+ //选中发票数据
|
|
|
+ chooseTicket:[],
|
|
|
+ // 日期范围
|
|
|
+ dateRange: [],
|
|
|
+ pafCustomerId: "",
|
|
|
+ activeName: "1",
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ invoiceTitle:"",
|
|
|
+ openInvoice : false,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ totalCustomer: 0,
|
|
|
+ totalContract: 0,
|
|
|
+ totalProject: 0,
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ openCustomer: false,
|
|
|
+ openContract: false,
|
|
|
+ openProject: false,
|
|
|
+ customerName: "",
|
|
|
+ customerId: '',
|
|
|
+ fpId: "",
|
|
|
+ ctnId : '',
|
|
|
+ userName:'',
|
|
|
+ pafCollectionAmtFromat: "",
|
|
|
+ // 资方列表
|
|
|
+ companyList: [],
|
|
|
+ //余额
|
|
|
+ BalanceList: [],
|
|
|
+ multipleSelection: [],
|
|
|
+ //账户列表
|
|
|
+ AccList: [],
|
|
|
+ //项目列表
|
|
|
+ projectList: [],
|
|
|
+ pjtent: [],
|
|
|
+ proId: '',
|
|
|
+ pjtId: '',
|
|
|
+ //科目列表
|
|
|
+ subjectList:[],
|
|
|
+ current: [],
|
|
|
+ custent: [],
|
|
|
+ //合同列表
|
|
|
+ contractList: [],
|
|
|
+ content: [],
|
|
|
+ //发票列表
|
|
|
+ InvoiceList: [],
|
|
|
+ //数据字典
|
|
|
+ voucherTypeOptions: [],
|
|
|
+ bookkeepingOptions: [],
|
|
|
+ expireOptions: [],
|
|
|
+ profitTypeOptions: [],
|
|
|
+ authTypeOptions:[],
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ pifName: null,
|
|
|
+ pifId: null,
|
|
|
+ pifContractId: null,
|
|
|
+ },
|
|
|
+ queryParamsInvoice: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ dateTime: [],
|
|
|
+ pvfProjectId: null,
|
|
|
+ pvfContractId: null,
|
|
|
+ pidCode: null,
|
|
|
+ pvfTYPE: null,
|
|
|
+ pvfInvoiceTitle : null
|
|
|
+ },
|
|
|
+ options: [],
|
|
|
+ value: [],
|
|
|
+ loading: false,
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ zfpName: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "产品名称不能为空",
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ zfpManagementId: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "资金方不能为空",
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ zfpMinimumAmount: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ pattern: /^[0-9][0-9]{0,9}$|^[1-9][0-9]{0,9}[.]\d{1,2}$/,
|
|
|
+ message: "请输入正确的付款金额",
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ zfpShortestPeriod: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "最短融资账期不能为空",
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ zfpVoucherType: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "电子凭证类型不能为空",
|
|
|
+ trigger: ["blur", "change"],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ const zfpId = this.$route.params && this.$route.params.zfpId;
|
|
|
+ this.reset();
|
|
|
+ //this.getCompanyList();
|
|
|
+ //this.getList();
|
|
|
+ this.getDicts("zc_zfp_voucher_type").then((response) => {
|
|
|
+ this.voucherTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("zc_zfp_bookkeeping").then((response) => {
|
|
|
+ this.bookkeepingOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("zc_zfp_expire").then((response) => {
|
|
|
+ this.expireOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("zc_zfp_profit_type").then((response) => {
|
|
|
+ this.profitTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("zc_zfp_auth_type").then((response) => {
|
|
|
+ this.authTypeOptions = response.data;
|
|
|
+ });
|
|
|
+ getFinanceProduct(zfpId).then((response) =>{
|
|
|
+ this.form = response.data.zcFinanceProduct;
|
|
|
+ this.form.createTime = this.parseTime(new Date(response.data.zcFinanceProduct.createTime),'{y}-{m}-{d} {h}:{m}:{s}');
|
|
|
+ this.userName = response.data.nickName;
|
|
|
+ var state = this.form.zfpStatus;
|
|
|
+ if(state == '01'){
|
|
|
+ this.disabled = true ;
|
|
|
+ }
|
|
|
+ const type = "03";
|
|
|
+ const zfpManagementId = this.form.zfpManagementId;
|
|
|
+ listCompany(type,zfpManagementId).then(response =>{
|
|
|
+ this.companyList = response.data;
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.reset();
|
|
|
+ //this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询资方 */
|
|
|
+ getCompanyList(){
|
|
|
+ const type = "03";
|
|
|
+ listCompany(type).then(response =>{
|
|
|
+ this.companyList = response.data;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getList(){
|
|
|
+ const cifId = this.$route.params && this.$route.params.cifId;
|
|
|
+ //合同信息
|
|
|
+ getOwnContract(cifId).then((response) => {
|
|
|
+ this.$set(this.form, "pafContractId", cifId);
|
|
|
+ this.$set(this.form, "cifName", response.data.data.cifName);
|
|
|
+ if(response){
|
|
|
+ //客户信息
|
|
|
+ this.$set(this.form, "pafCustomerId", response.data.data.cifCustomerId);
|
|
|
+ this.$set(this.form, "cciName", response.data.data.cciName);
|
|
|
+ listContractNode(cifId).then((res) => {
|
|
|
+ this.contractNodeList = res.data;
|
|
|
+ });
|
|
|
+ this.queryParamsProject.pifCustomerName = response.data.data.cciName;
|
|
|
+ this.queryParamsAcc.ccaCustomerId = response.data.data.cifCustomerId;
|
|
|
+ this.queryParamsAcc.cccType = '00';
|
|
|
+ listAcc(this.queryParamsAcc).then((r) => {
|
|
|
+ this.AccList = r.data.records;
|
|
|
+ if(r.data.records[0].ccaId){
|
|
|
+ this.$set(this.form, "pafAccountId", r.data.records[0].ccaId);
|
|
|
+ }else{
|
|
|
+ this.queryParamsAcc.ccaCustomerId = '';
|
|
|
+ this.getAccList();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ change(val){
|
|
|
+ if(val<=14){
|
|
|
+ this.$set(this.form, "zfpShortestPeriod", "14");
|
|
|
+ }
|
|
|
+ return ;
|
|
|
+ },
|
|
|
+ /* -------------------------合同相关---------------------------- */
|
|
|
+ //合同列表
|
|
|
+ getInvoiceList() {
|
|
|
+ listInvoice(this.queryParamsInvoice).then((response) => {
|
|
|
+ this.InvoiceList = response.data.records;
|
|
|
+ this.selectChecked();
|
|
|
+ this.total = response.data.total;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //打开合同选择列表
|
|
|
+ openTicket() {
|
|
|
+ this.getInvoiceList();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "合同信息";
|
|
|
+ },
|
|
|
+ selectChecked() {
|
|
|
+ this.contractList.forEach((item) => {
|
|
|
+ this.InvoiceList.forEach((row) => {
|
|
|
+ if (row.pvfId == item.pvId) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.tableInvoice &&
|
|
|
+ this.$refs.tableInvoice.toggleRowSelection(row, true);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /* 多选框跨页 */
|
|
|
+ rowkey(row) {
|
|
|
+ return row.pvfId;
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.chooseTicket = val
|
|
|
+ },
|
|
|
+ // 确认选择
|
|
|
+ closeTicket() {
|
|
|
+ if(this.chooseTicket){
|
|
|
+ if(this.chooseTicket[0].pvfTYPE == '01'){
|
|
|
+ this.contractList = this.chooseTicket
|
|
|
+ this.$set(this.form, "pvfDate", this.parseTime(new Date(this.contractList[0].pvfDate)));
|
|
|
+ this.$set(this.form, "pvfInvoiceTitle", this.contractList[0].pvfInvoiceTitle);
|
|
|
+ this.$set(this.form, "pvfTaxPrice", this.contractList[0].pvfTaxPrice);
|
|
|
+ this.$set(this.form, "pvfInvoiceNum", this.contractList[0].pvfInvoiceNum);
|
|
|
+ this.open = false
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ message: '所选发票信息异常',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //取消选择发票按钮
|
|
|
+ cancelTicket(){
|
|
|
+ if(this.contractList.length > 0){
|
|
|
+ this.open = false;
|
|
|
+ }else{
|
|
|
+ this.contractList = [];
|
|
|
+ this.$refs.tableInvoice.clearSelection()
|
|
|
+ this.open = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 清空选择发票信息 */
|
|
|
+ deleteTicekt() {
|
|
|
+ this.contractList = [];
|
|
|
+ this.$refs.tableInvoice.clearSelection()
|
|
|
+ },
|
|
|
+ /* 删除按钮 */
|
|
|
+ handleDelete(index, rows) {
|
|
|
+ console.log(rows,"AAAAAAAAAAA")
|
|
|
+ rows.splice(index, 1);
|
|
|
+ this.$refs.tableInvoice.clearSelection()
|
|
|
+ this.selectChecked();
|
|
|
+ },
|
|
|
+ onSelectAll() {
|
|
|
+ this.$refs.tableInvoice.clearSelection();
|
|
|
+ },
|
|
|
+ handleQuerys() {
|
|
|
+ this.queryParamsInvoice.pageNum = 1;
|
|
|
+ this.getInvoiceList();
|
|
|
+ },
|
|
|
+ resetQuerys() {
|
|
|
+ this.resetForm("formQuery");
|
|
|
+ this.handleQuerys();
|
|
|
+ },
|
|
|
+ handleInput(str) {
|
|
|
+ this.pafCollectionAmtFromat = amtformat(str, 2, ".", ",");
|
|
|
+ },
|
|
|
+ //发票类型
|
|
|
+ pvfCategoryFormat(row, column) {
|
|
|
+ return this.selectDictLabel(this.pvfCategoryOptions, row.pvfCategory);
|
|
|
+ },
|
|
|
+ /* ---------------------------------------------------------------------- */
|
|
|
+ // 多选框选中数据
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // this.currentRow = val;
|
|
|
+ // this.open = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 清空 */
|
|
|
+ clearBoth() {
|
|
|
+ this.proId = '';
|
|
|
+ this.pjtId = '';
|
|
|
+ // this.getContractList();
|
|
|
+ this.getProjectList();
|
|
|
+ this.getSubjectList();
|
|
|
+ this.queryParamsAcc.ccaCustomerId = null;
|
|
|
+ this.getAccList();
|
|
|
+ },
|
|
|
+ reset(){
|
|
|
+ this.form = {
|
|
|
+ zfpId: null,
|
|
|
+ zfpNumber: null,
|
|
|
+ zfpName: null,
|
|
|
+ zfpManagementId: null,
|
|
|
+ zfpSplit: "0",
|
|
|
+ zfpType:"1",
|
|
|
+ zfpTransfer: "0",
|
|
|
+ zfpRecourse: "0",
|
|
|
+ zfpVoucherType: null,
|
|
|
+ zfpCoreAccount: "0",
|
|
|
+ zfpSupplierAccount: "0",
|
|
|
+ zfpCharge: "0",
|
|
|
+ zfpStatus: "0",
|
|
|
+ zfpMinimumAmount: null,
|
|
|
+ zfpShortestPeriod: null,
|
|
|
+ zfpBookkeeping: null,
|
|
|
+ zfpPart: "0",
|
|
|
+ zfpExpire: null,
|
|
|
+ zfpRate: null,
|
|
|
+ zfpProfit: "0",
|
|
|
+ zfpProfitType: null,
|
|
|
+ zfpProfitRate: null,
|
|
|
+ zfpPlatform: "0",
|
|
|
+ createBy: null,
|
|
|
+ createTime: null,
|
|
|
+ updateBy: null,
|
|
|
+ updateTime: null
|
|
|
+ };
|
|
|
+ this.resetForm("form");
|
|
|
+ },
|
|
|
+/* ---------------------------------------------------------------------- */
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.reset();
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ this.open = false;
|
|
|
+ },
|
|
|
+ /** 保存按钮 */
|
|
|
+ submitForm() {
|
|
|
+
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ this.form.contractList = this.contractList;
|
|
|
+ console.log(this.form)
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "Loading",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
+ });
|
|
|
+ updateFinanceProduct(this.form)
|
|
|
+ .then((response) => {
|
|
|
+ loading.close();
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.$store.dispatch("tagsView/delView", this.$route);
|
|
|
+ this.$router.go(-1);
|
|
|
+ })
|
|
|
+ .catch((response) => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // submitData() {
|
|
|
+ // this.open = false;
|
|
|
+ // },
|
|
|
+ /* // 将数字金额转换为大写金额 */
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.single-select-table thead .el-table-column--selection .cell {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+
|
|
|
+</style>
|