123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835 |
- <template>
- <div class="app-container zap-main">
- <el-form ref="form" :model="form" :rules="rules" label-width="auto">
- <div class="zap-title">资产信息</div>
- <el-row class="zap-form">
- <el-row type="flex" justify="end" align="middle">
- <el-col :span="12" style="margin-bottom: 22px;">
- <el-button type="success" @click="openTicket">选择</el-button>
- <el-button type="primary" @click="addPay">新增应付账款</el-button>
- <el-button @click="deleteTicekt">清空全部</el-button>
- </el-col>
- <el-col :span="12">
- <el-row type="flex" justify="end" align="middle">
- <el-form-item label="合计金额:" style="margin-right: 40px;">
- <span>{{checkTotalAmt}}</span>
- </el-form-item>
- <el-form-item label="金额大写:">
- <span>{{checkTotalBigAmt}}</span>
- </el-form-item>
- </el-row>
- </el-col>
- </el-row>
- <el-table :data="ticketList" style="width: 100%;" stripe="">
- <el-table-column label="账款名称" align="center" prop="zbiName" show-overflow-tooltip />
- <el-table-column label="应收企业" align="center" prop="receiveName" />
- <el-table-column label="应付企业" align="center" prop="payName" />
- <el-table-column label="预计还款期" align="center" prop="zbiPayDate" show-overflow-tooltip />
- <el-table-column label="金额" align="center" :formatter="moneyFormat" prop="zbiAmount" />
- <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, ticketList)">删除</el-button>
- <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetail(scope.$index, ticketList)">详情</el-button>
- <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.$index, ticketList)">修改</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-row class="zap-margin-top">
- <el-col :span="8">
- <el-form-item label="签发金额" prop="zfiAmount" size="large">
- <el-input v-model="form.zfiAmount" @input="getBigSmall" @input.native="changeRate($event,form.zfiAmount)" />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="开立方" prop="openName" size="large">
- <el-input v-model="form.openName" disabled />
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="金额大写" prop="issuedAmount">
- {{issuedAmount}}
- </el-form-item>
- </el-col>
- </el-row>
- <p>请知悉,资产信息仅能接受指定的销售方与购买方的往来账款(含账款基本信息、贸易合同与贸易发票等);如须使用系统尚未维护的往来账款,请点击新增应付账款
- </p>
- </el-row>
- </el-form>
- <div class="contain">
- <p>友情提醒:
- </p>
- <p>
- 1. 申请金额:须小于或等于选中资产的总额;
- </p>
- <p>
- 2. 选择账款:如需选择多笔账款同时提交,须满足预计还款日期一致;
- </p>
- <p>
- 3. 融信有效期:融信有效期非已核心企业最终确认还款时间为准,而非资产
- 中预计还款时间;
- </p>
- <p>
- 4. 请勿一笔账款,重复作为资产抵押;其中一笔融信抵押生效后,重复业务
- 将立即失效,因此引发的业务责任,将由申请发起人自行承担;
- </p>
- </div>
- <el-row type="flex" justify="center" align="middle" style="height: 96px;">
- <el-button type="primary" @click="submitForm">确 定</el-button>
- <el-button type="primary" plain @click="cancel">取 消</el-button>
- </el-row>
- <!-- 应收账款信息 -->
- <el-dialog :title="payTitle" :visible.sync="open" width="1120px" append-to-body destroy-on-close>
- <el-form :model="queryParamsPay" ref="formQuery" :inline="true" label-width="68px" style="margin-bottom: -21px">
- <el-form-item label="账款名称" prop="zbiName">
- <el-input v-model="queryParamsPay.zbiName" placeholder="请输入账款名称" clearable size="small" maxlength="11" @keyup.enter.native="handleQuerys" />
- </el-form-item>
- <el-form-item label="应付企业" prop="payName">
- <el-input v-model="queryParamsPay.payName" placeholder="请输入应付企业" clearable size="small" maxlength="11" @keyup.enter.native="handleQuerys" />
- </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="payList" ref="tablePay" 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>{{ (queryParamsPay.pageNum - 1) * queryParamsPay.pageSize + scope.$index + 1}}</span>
- </template>
- </el-table-column>
- <el-table-column label="账款名称" align="center" prop="zbiName" show-overflow-tooltip />
- <el-table-column label="应收企业" align="center" prop="receiveName" />
- <el-table-column label="应付企业" align="center" prop="payName" />
- <el-table-column label="预计还款期" align="center" prop="zbiPayDate" show-overflow-tooltip />
- <el-table-column label="金额" align="center" prop="zbiAmount" />
- </el-table>
- <pagination v-show="total > 0" :total="total" :page.sync="queryParamsPay.pageNum" :limit.sync="queryParamsPay.pageSize" @pagination="getAccountsCollection" />
- <span slot="footer" class="dialog-footer">
- <el-button size="mini" @click="cancelTicket">取消</el-button>
- <el-button size="mini" type="primary" @click="closeTicket">确认</el-button>
- </span>
- </el-dialog>
- <!-- 新增往来账款 -->
- <el-dialog title="新增往来账款" :visible.sync="openAddBill" width="1120px" append-to-body>
- <add-bill :companyId="form.zfiCoreId" companyType="01" :payDate="payDate" @addClick="emitAddClick" v-if="openAddBill"></add-bill>
- </el-dialog>
- <!-- 附件详情 -->
- <el-dialog title="详情" :visible.sync="openDetailBill" width="1120px" append-to-body>
- <detail-bill :zbiId="this.zbiId" v-if="openDetailBill"></detail-bill>
- </el-dialog>
- <!-- 修改往来账款 -->
- <el-dialog title="修改往来账款" :visible.sync="openEditBill" width="1120px" append-to-body>
- <edit-bill :zbiId="this.zbiId" @editClick="emitEditClick" v-if="openEditBill"></edit-bill>
- </el-dialog>
- <!--预览-->
- <el-dialog :visible.sync="openFile" width="1000px" append-to-body>
- <img :src="wordUrl" v-if="show" width='450px' height='500px' />
- <iframe :src="wordUrl" width='800px' height='600px' frameborder='1' v-if="heid" />
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- getAccountsCollection,
- addCredit,
- getFile
- } from "@/api/service/credit/credit";
- import {
- isOpenApproval
- } from "@/api/service/credit/approvalRelatedCredit";
- import {
- accAdd
- } from "@/utils/calculation";
- import {
- getToken
- } from "@/utils/auth";
- import { getBill} from "@/api/service/bill/bill";
- import AddBill from "@/views/service/bill/addBill";
- import DetailBill from "@/views/service/credit/billDetail";
- import EditBill from "@/views/service/bill/editBill";
- export default {
- name: "creditApply",
- components: {
- AddBill,
- DetailBill,
- EditBill
- },
- data() {
- return {
- //往来账款id
- zbiId: '',
- // 总条数
- total: 0,
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 10,
- },
- creditParams: {
- zfsqId: null
- },
- queryParamsPay: {
- pageNum: 1,
- pageSize: 10,
- payName: null,
- zbiName: null
- },
- // 表单参数
- form: {
- },
- // 表单校验
- rules: {
- //签发金额
- zfiAmount: [{
- required: true,
- message: "请输入签发金额",
- trigger: ["blur", "change"],
- },
- {
- pattern: /^(?:0|[1-9]\d{0,8})(?:\.\d{1,2})?$/,
- message: "请输入正确的签发金额",
- trigger: ["blur", "change"],
- },
- ]
- },
- // 是否显示弹出层
- open: false,
- openAddBill: false,
- openDetailBill: false,
- openEditBill: false,
- //应付账款
- payList: [],
- //应付账款表格数据
- ticketList: [],
- //应付标题
- payTitle: "",
- //合计选中的应付账款的金额
- checkTotalAmt: "0.00",
- //合计选中的应付账款的大写金额
- checkTotalBigAmt: "零元整",
- //签发金额大写
- issuedAmount: "零元整",
- //合同附件
- contractFileList: [],
- //发票附件
- invoiceFileList: [],
- //其他文件
- otherFileList: [],
- openFile: false,
- wordUrl: "",
- show: false,
- heid: false,
- chooseTicket: [],
- payDate: null
- };
- },
- created() {
- //签发金额
- this.$set(this.form, "zfiAmount", "0.00");
- },
- 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(/\.$/, "");
- },
- // 取消按钮
- cancel() {
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.go(-1);
- },
- //应收账款查询列表
- getAccountsCollection() {
- return getAccountsCollection(this.queryParamsPay).then((response) => {
- this.payList = response.data.records;
- this.selectChecked();
- this.total = response.data.total;
- return Promise.resolve(response)
- });
- },
- resetQuerys() {
- this.resetForm("formQuery");
- this.handleQuerys();
- },
- handleQuerys() {
- this.queryParamsPay.pageNum = 1;
- this.getAccountsCollection();
- },
- //打开应付账款选择列表
- openTicket() {
- //清空搜索条件
- this.queryParamsPay.zbiName = "";
- this.queryParamsPay.payName = "";
- this.queryParamsPay.pageNum = 1;
- this.chooseTicket = eval("(" + JSON.stringify(this.ticketList) + ")");
- this.getAccountsCollection();
- this.open = true;
- this.payTitle = "应收账款";
- },
- //获取附件信息
- getFile(datas) {
- var queryParamsFile = {};
- queryParamsFile.ticketList = datas;
- getFile(queryParamsFile).then((response) => {
- if (response.data) {
- //获取发票文件
- this.invoiceFileList = response.data.invoiceFileList;
- //获取合同文件
- this.contractFileList = response.data.contractFileList;
- //获取其他文件
- this.otherFileList = response.data.otherFileList;
- }
- });
- },
- //获取签发金额大写
- getBigSmall() {
- this.issuedAmount = this.smallToBig(this.form.zfiAmount);
- },
- selectChecked() {
- //清空选择
- // this.$refs.tablePay && this.$refs.tablePay.clearSelection();
- var changeSelectionTemp = eval("(" + JSON.stringify(this.chooseTicket) + ")")
- this.$nextTick(() => {
- this.$refs.tablePay.clearSelection();
- changeSelectionTemp.forEach((item) => {
- var f = true;
- for (var i=0; i < this.payList.length; i++) {
- var row = this.payList[i];
- if (row.zbiId == item.zbiId) {
- this.$refs.tablePay && this.$refs.tablePay.toggleRowSelection(row, true);
- f = false;
- break;
- }
- };
- if (f) {
- this.$refs.tablePay && this.$refs.tablePay.toggleRowSelection(item, true);
- }
- });
- })
- //合计
- // this.getReTotal(this.ticketList);
- //附件
- // this.getFile(this.ticketList);
- },
- /* 多选框跨页 */
- rowkey(row) {
- return row.zbiId;
- },
- // 多选框选中数据
- handleSelectionChange(val) {
- this.chooseTicket = val
- },
- //文件下载
- handleDownload(row) {
- const pfiUrl = row.pfiUrl;
- if (pfiUrl != null && pfiUrl != '') {
- window.open(pfiUrl + "/" + getToken());
- } else {
- this.$message({
- message: '该附件不存在!',
- type: 'warning'
- });
- return;
- }
- },
- // 确认选择
- closeTicket() {
- if (this.chooseTicket.length > 0) {
- var flag = true;
- //获取选中第一个的应付企业
- var payName = this.chooseTicket[0].payName;
- //获取选中第一个的预计还款日期
- var zbiPayDate = this.chooseTicket[0].zbiPayDate;
- for (var i = 0; i < this.chooseTicket.length; i++) {
- if (payName != this.chooseTicket[i].payName) {
- flag = false;
- this.$message({
- message: '请选择应付企业相同的应付账款',
- type: 'warning'
- });
- break;
- } else if (zbiPayDate != this.chooseTicket[i].zbiPayDate) {
- flag = false;
- this.$message({
- message: '请选择预计还款日期相同的应付账款',
- type: 'warning'
- });
- break;
- }
- }
- if (flag) {
- //合计
- this.getReTotal(this.chooseTicket);
- this.ticketList = this.chooseTicket;
- //更新附件信息
- this.getFile(this.ticketList);
- this.open = false;
- //开立方赋值
- this.$set(this.form, "openName", this.chooseTicket[0].payName);
- }
- } else {
- this.$message({
- message: '请选择应收账款',
- type: 'warning'
- });
- }
- },
- //重新合计
- getReTotal(chooseTicket) {
- //合计
- this.checkTotalAmt = "0.00";
- for (var i = 0; i < chooseTicket.length; i++) {
- this.checkTotalAmt = accAdd(this.checkTotalAmt, chooseTicket[i].zbiAmount, 2);
- }
- //签发金额
- this.$set(this.form, "zfiAmount", this.checkTotalAmt);
- //签发金额大写
- this.issuedAmount = this.smallToBig(this.checkTotalAmt);
- this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
- this.checkTotalAmt = this.amtFormat(this.checkTotalAmt);
- },
- //取消选择按钮
- cancelTicket() {
- /* this.ticketList = [];
- if(this.$refs.tablePay){
- this.$refs.tablePay.clearSelection();
- } */
- this.open = false;
- },
- /** 清空选择信息 */
- deleteTicekt() {
- this.ticketList = [];
- this.checkTotalAmt = "0.00";
- this.checkTotalBigAmt = this.smallToBig(this.checkTotalAmt);
- //签发金额
- this.$set(this.form, "zfiAmount", "0.00");
- this.issuedAmount = this.smallToBig(this.checkTotalAmt);
- //开立方清空
- this.$set(this.form, "openName", "");
- //附件
- this.getFile(this.ticketList);
- if (this.$refs.tablePay) {
- this.$refs.tablePay.clearSelection();
- }
- },
- /* 删除按钮 */
- handleDelete(index, rows) {
- rows.splice(index, 1);
- if (this.$refs.tablePay) {
- this.$refs.tablePay.clearSelection();
- }
- this.selectChecked();
- },
- //详情按钮
- handleDetail(index, rows) {
- this.zbiId = rows[index].zbiId
- this.openDetailBill = true
- },
- /* 修改按钮 */
- handleUpdate(index, rows) {
- this.zbiId = rows[index].zbiId;
- this.openEditBill = true
- },
- onSelectAll() {
- if (this.$refs.tablePay) {
- this.$refs.tablePay.clearSelection();
- }
- },
- //格式化金额
- amtFormat(cellValue) {
- if (cellValue == null || cellValue == undefined || cellValue == '') {
- cellValue = '0.00'
- }
- cellValue += '';
- if (!cellValue.includes('.')) {
- cellValue += '.00';
- }
- console.log(cellValue);
- return cellValue.replace(/(\d)(?=(\d{3})+\.)/g, function ($0, $1) {
- return $1 + ',';
- }).replace(/\.$/, '');
- },
- /* // 将数字金额转换为大写金额 */
- smallToBig(money) {
- // 将数字金额转换为大写金额
- var cnNums = new Array(
- "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"); //汉字的数字
- var cnIntRadice = new Array("", "拾", "佰", "仟"); //基本单位
- var cnIntUnits = new Array("", "万", "亿", "兆"); //对应整数部分扩展单位
- var cnDecUnits = new Array("角", "分", "毫", "厘"); //对应小数部分单位
- var cnInteger = "整"; //整数金额时后面跟的字符
- var cnIntLast = "元"; //整数完以后的单位
- //最大处理的数字
- var maxNum = 999999999999999.9999;
- var integerNum; //金额整数部分
- var decimalNum; //金额小数部分
- //输出的中文金额字符串
- var chineseStr = "";
- var parts; //分离金额后用的数组,预定义
- if (money == "" || money == null || money == undefined) {
- return "零元零角零分";
- }
- money = parseFloat(money);
- if (money >= maxNum) {
- //超出最大处理数字
- return "超出最大处理数字";
- }
- if (money == 0) {
- chineseStr = cnNums[0] + cnIntLast + cnInteger;
- return chineseStr;
- }
- //四舍五入保留两位小数,转换为字符串
- money = Math.round(money * 100).toString();
- integerNum = money.substr(0, money.length - 2);
- decimalNum = money.substr(money.length - 2);
- //获取整型部分转换
- if (parseInt(integerNum, 10) > 0) {
- var zeroCount = 0;
- var IntLen = integerNum.length;
- for (var i = 0; i < IntLen; i++) {
- var n = integerNum.substr(i, 1);
- var p = IntLen - i - 1;
- var q = p / 4;
- var m = p % 4;
- if (n == "0") {
- zeroCount++;
- } else {
- if (zeroCount > 0) {
- chineseStr += cnNums[0];
- }
- //归零
- zeroCount = 0;
- chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
- }
- if (m == 0 && zeroCount < 4) {
- chineseStr += cnIntUnits[q];
- }
- }
- chineseStr += cnIntLast;
- }
- //小数部分
- if (decimalNum != "") {
- var decLen = decimalNum.length;
- for (var i = 0; i < decLen; i++) {
- var n = decimalNum.substr(i, 1);
- if (n != "0") {
- chineseStr += cnNums[Number(n)] + cnDecUnits[i];
- }
- }
- }
- if (chineseStr == "") {
- chineseStr += cnNums[0] + cnIntLast + cnInteger;
- } else if (decimalNum == "" || /^0*$/.test(decimalNum)) {
- chineseStr += cnInteger;
- }
- return chineseStr;
- },
- //新增
- submitForm() {
- if (this.ticketList.length < 1) {
- this.$message({
- message: '请选择应收账款',
- type: 'warning'
- });
- return;
- }
- if (parseFloat(this.form.zfiAmount) > parseFloat(this.moneyDelete(this.checkTotalAmt))) {
- this.$message({
- message: '签发金额不可大于合计金额',
- type: 'warning'
- });
- return;
- }
- this.$refs["form"].validate(valid => {
- if (valid) {
- const loading = this.$loading({
- lock: true,
- text: 'Loading',
- background: 'rgba(0, 0, 0,0)'
- });
- //如果签发金额小于合计金额
- if ((parseFloat(this.form.zfiAmount)) < (parseFloat(this.moneyDelete(this.checkTotalAmt)))) {
- var _this = this;
- this.$confirm('签发金额小于应付金额合计,是否确认提交', "警告", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(function () {
- //应收账款
- _this.form.ticketList = _this.ticketList;
- //融信类型
- _this.form.type = "0";
- //合计金额
- _this.form.checkTotalAmt = _this.moneyDelete(_this.checkTotalAmt);
- addCredit(_this.form).then(response => {
- loading.close();
- //判断是否开启内部审批
- var params = {};
- params.menuId = "1000000002";
- isOpenApproval(params).then((response) => {
- var result = response.data.isOpen;
- //开启内部审批
- if (result == true) {
- _this.msgSuccess("申请融信资料已提交企业内部审批");
- _this.$store.dispatch("tagsView/delView", _this.$route);
- _this.$router.go(-1);
- } else {
- //没有开启内部审批
- //判断有没有开启平台审批
- var platParam = {};
- platParam.menuId = "1000000004";
- isOpenApproval(platParam).then((response) => {
- var platResult = response.data.isOpen;
- //开启平台审批
- if (platResult) {
- _this.msgSuccess("融信资料已提交平台审核,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,预计2小时内完成,请留意站内信息");
- _this.$store.dispatch("tagsView/delView", _this.$route);
- _this.$router.go(-1);
- } else {
- //未开启平台审批
- _this.msgSuccess("融信资料已提交,待:" + _this.form.openName + "确权;确权结果请留意待办事项与站内消息");
- _this.$store.dispatch("tagsView/delView", _this.$route);
- _this.$router.go(-1);
- }
- });
- }
- })
- }).catch((response) => {
- loading.close();
- });
- }).catch((e) => {
- loading.close();
- });
- } else {
- //应收账款
- this.form.ticketList = this.ticketList;
- //融信类型
- this.form.type = "0";
- //合计金额
- this.form.checkTotalAmt = this.moneyDelete(this.checkTotalAmt);
- addCredit(this.form).then(response => {
- loading.close();
- //判断是否开启内部审批
- var params = {};
- params.menuId = "1000000002";
- isOpenApproval(params).then((response) => {
- var result = response.data.isOpen;
- //开启内部审批
- if (result == true) {
- this.msgSuccess("申请融信资料已提交企业内部审批");
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.go(-1);
- } else {
- //没有开启内部审批
- //判断有没有开启平台审批
- var platParam = {};
- platParam.menuId = "1000000004";
- isOpenApproval(platParam).then((response) => {
- var platResult = response.data.isOpen;
- //开启平台审批
- if (platResult) {
- this.msgSuccess("融信资料已提交平台审核,平台审核时间为工作日:9:00—18:00;单日16:00之前提交资料,预计2小时内完成,请留意站内信息");
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.go(-1);
- } else {
- //未开启平台审批
- this.msgSuccess("融信资料已提交,待:" + this.form.openName + "确权;确权结果请留意待办事项与站内消息");
- this.$store.dispatch("tagsView/delView", this.$route);
- this.$router.go(-1);
- }
- });
- }
- })
- }).catch((response) => {
- loading.close();
- });
- }
- }
- });
- },
- //金额去掉千分位
- moneyDelete(num) {
- if (num && num != undefined && num != null) {
- let _num = num;
- _num = _num.toString();
- _num = _num.replace(/,/gi, '');
- return _num;
- } else {
- return num;
- }
- },
- //预览
- handlePreview(row) {
- const pfiUrl = row.pfiUrl;
- const pfiFileName = row.pfiFileName;
- if (row.pfiUrl) {
- console.log(pfiFileName.substr(-3));
- if (pfiFileName.substr(-3) == "pdf") {
- this.wordUrl = pfiUrl + "/" + getToken();
- this.show = false;
- this.heid = true;
- } else if (
- pfiFileName.substr(-3) == "jpg" ||
- pfiFileName.substr(-3) == "png" ||
- pfiFileName.substr(-3) == "JPG" ||
- pfiFileName.substr(-3) == "PNG" ||
- pfiFileName.substr(-4) == "jpeg" ||
- pfiFileName.substr(-3) == "JPEG"
- ) {
- this.wordUrl =
- pfiUrl +
- "/" +
- getToken();
- this.show = true;
- this.heid = false;
- console.log("====>", this.wordUrl);
- } else if (
- pfiFileName.substr(-3) == "doc" ||
- pfiFileName.substr(-3) == "DOC" ||
- pfiFileName.substr(-4) == "docx" ||
- pfiFileName.substr(-3) == "DOCX"
- ) {
- this.wordUrl =
- "https://view.officeapps.live.com/op/view.aspx?src=" +
- pfiUrl +
- "/" +
- getToken() +
- "/" +
- pfiFileName;
- this.show = false;
- this.heid = true;
- console.log("====>", this.wordUrl);
- } else {
- this.$message({
- message: "暂不支持该类型文件预览",
- type: "warning",
- });
- return;
- }
- }
- this.openFile = true;
- },
- changeRate(e, input) {
- e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
- this.input = e.target.value
- this.form.zfiAmount = this.input
- },
- //新增应付
- addPay() {
- //获取选中第一个的预计还款日期
- if (this.chooseTicket[0]) {
- var zbiPayDate = this.chooseTicket[0].zbiPayDate;
- this.payDate = zbiPayDate;
- }
- this.openAddBill = true
- },
- //新增账款回调
- emitAddClick(val) {
- var self = this
- this.getAccountsCollection().then((response) => {
- //新增付款返回id直接选中
- if (val) {
- self.payList.forEach(element => {
- if (element.zbiId == val) {
- // 将当前点击项选中
- self.chooseTicket.push(element)
- self.closeTicket()
- }
- });
- }
- })
- self.openAddBill = false
- },
- //修改账款回调
- emitEditClick(val) {
- var self = this
- getBill(val).then((response) => {
- for (var i = 0; i < this.ticketList.length; i ++) {
- if (response.data.zbiId == this.ticketList[i].zbiId) {
- this.$set(this.ticketList, i, response.data)
- break;
- }
- }
- for (var i = 0; i < this.ticketList.length; i ++) {
- if (response.data.zbiId == this.ticketList[i].zbiId) {
- this.$set(this.chooseTicket, i, response.data)
- break;
- }
- }
- self.closeTicket();
- })
- self.openEditBill = false
- },
- }
- };
- </script>
- <style lang="scss">
- .contain p {
- color: #696969;
- }
- .uoloadfj .el-upload--picture-card {
- width: 110px;
- height: 110px;
- line-height: 110px;
- }
- .fjUoloadSty .el-upload--picture-card {
- display: none;
- }
- table th.star div::before {
- content: '*';
- color: red;
- }
- </style><style lang="scss" scoped>
- .zap-available-credit {
- height: 40px;
- margin-bottom: 22px;
- }
- .zap-title {
- padding: 20px 25px;
- font-size: 16px;
- color: #333333;
- background-color: #ffffff;
- }
- .zap-form {
- padding: 10px 25px 8px;
- background-color: #ffffff;
- box-sizing: border-box;
- }
- .zap-form--clear {
- padding-left: 0;
- padding-right: 0;
- }
- </style>
|