|
|
@@ -0,0 +1,844 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="customer-head">
|
|
|
+ <div class="customer-back">
|
|
|
+ <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
+ @click="goBack()">返回列表
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="add-customer-btn">
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editButton"
|
|
|
+ :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
|
|
|
+ @click="inEdit">编 辑
|
|
|
+ </el-button>
|
|
|
+ <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
+ :disabled="editDisabled" @click="submit">保 存
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success" size="small" v-if="form.status == 3 && form.settlementStatus != 1"
|
|
|
+ @click.stop="confirm">确认付费</el-button>
|
|
|
+ <el-button type="danger" size="small" v-if="form.settlementStatus == 1" @click.stop="revoke">撤销确认付费</el-button>
|
|
|
+ <el-button type="success" size="small" v-if="form.id && form.status == 0"
|
|
|
+ @click.stop="application">请核</el-button>
|
|
|
+ <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
+ size="small" @click="revokeApplication">撤销单据请核
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown style="line-height: 0">
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
|
|
|
+ size="small">
|
|
|
+ 审 批<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
|
|
|
+ </el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 50px">
|
|
|
+ <el-tabs type="border-card">
|
|
|
+ <el-tab-pane label="经办人信息">
|
|
|
+ <trade-card title="经办人信息">
|
|
|
+ <avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
+ <tempalte slot="branchName">
|
|
|
+ <dic-select v-model="form.branchName" placeholder="所属公司" key="id" label="deptName"
|
|
|
+ url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
|
|
|
+ :disabled="editDisabled || !(roleName.includes('admin') || roleName.includes('总部'))"
|
|
|
+ @selectChange="dicChange('branchName', $event)"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="applicantName">
|
|
|
+ <dic-select v-model="form.applicantName" placeholder="申请人" key="id" label="realName" res="records"
|
|
|
+ url="/blade-user/page?current=1&size=5" :filterable="true" :remote="true" dataName="realName"
|
|
|
+ @selectChange="dicChange('applicantName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ </avue-form>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="营业费用明细">
|
|
|
+ <avue-crud :option="option" :data="form.operatingExpensesItemList" id="out-table" ref="crud"
|
|
|
+ :header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
|
|
|
+ :cell-style="{ height: '20px', padding: '0px' }" @selection-change="selectionChange"
|
|
|
+ @select="selectHandle" @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumn('crud', 'option', 'optionBack', 531)"
|
|
|
+ @saveColumn="saveColumn('crud', 'option', 'optionBack', 531)">
|
|
|
+ <template slot="indexHeader" slot-scope="{row,index}">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus"
|
|
|
+ :disabled="editDisabled || form.buxStaus == '已确认'" circle @click="addRow()">
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="index" slot-scope="{row,index}">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="priceForm" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.price"
|
|
|
+ :controls="false" placeholder="请输入 成本价" size="small" style="width: 100%;" :precision="2"
|
|
|
+ @change="countChange(row)"></el-input-number>
|
|
|
+ <span v-else>{{ row.price }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="quantityForm" slot-scope="{ row }">
|
|
|
+ <el-input-number v-if="row.$cellEdit && !(row.automaticGenerated == 1)" v-model="row.quantity"
|
|
|
+ :controls="false" placeholder="请输入 成本价" size="small" style="width: 100%;" :precision="0"
|
|
|
+ @change="countChange(row)"></el-input-number>
|
|
|
+ <span v-else>{{ row.quantity }}</span>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button size="small" type="text" @click="rowEdit(row)" :disabled="editDisabled">
|
|
|
+ {{ row.$cellEdit ? '保存' : '编辑' }}
|
|
|
+ </el-button>
|
|
|
+ <el-button size="small" type="text" @click="rowDel(row, index)" :disabled="editDisabled">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="付款信息">
|
|
|
+ <avue-form :option="optionForm2" v-model="form" ref="form2">
|
|
|
+ </avue-form>
|
|
|
+ </trade-card>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="文件中心">
|
|
|
+ <containerTitle title="上传附件"></containerTitle>
|
|
|
+ <c-upload :data="form.filesCenterList" :enumerationValue="76"
|
|
|
+ deleteUrl="/api/blade-los/tradingBoxFiles/remove" display :disabled="editButton"></c-upload>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <business-reports :id="form.id" :itemIds="itemIds" ref="print" businessValue="MYDL" :type="true"></business-reports>
|
|
|
+ <business-reports :id="form.id" :itemIds="itemCIds" ref="printC" businessValue="MYDL" classifyCode="费用"
|
|
|
+ groupCode="应付" :selecList="selectionfeecList"></business-reports>
|
|
|
+ <reports :id="form.id" :assemblyForm="form" businessValue="MYDL" ref="report"></reports>
|
|
|
+ <!--审核弹窗-->
|
|
|
+ <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
+ <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="导入数据" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
|
|
|
+ :upload-after="onSuccess">
|
|
|
+ <template slot="excelTemplate">
|
|
|
+ <el-button type="primary" @click="handleGet">
|
|
|
+ 点击下载<i class="el-icon-download el-icon--right"></i>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
+ <p style="text-align: center;color: #DC0505">
|
|
|
+ 温馨提示 第一次导入时请先下载模板
|
|
|
+ </p>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ detail,
|
|
|
+ submit,
|
|
|
+ pleaseCheck,
|
|
|
+ repealCancel,
|
|
|
+ itemRemove,
|
|
|
+ copyAgent,
|
|
|
+ confirm,
|
|
|
+ revoke,
|
|
|
+} from "@/api/iosBasicData/reimbursement.js";
|
|
|
+import dicSelect from "@/components/dicSelect/main";
|
|
|
+import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
+import businessReports from "@/components/tradeAgency/businessReports.vue";
|
|
|
+import reports from "@/components/tradeAgency/reports.vue";
|
|
|
+import feeModify from "@/components/feeModify/boxMain.vue";
|
|
|
+import feeModifyView from "@/components/feeModify/view.vue";
|
|
|
+import { dateFormat } from "@/util/date";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import _ from "lodash";
|
|
|
+import { getUserInfo } from "@/api/system/user";
|
|
|
+import { Header } from "element-ui";
|
|
|
+export default {
|
|
|
+ name: "detailsPage",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ excelBox: false,
|
|
|
+ excelForm: {},
|
|
|
+ excelLoading: false,
|
|
|
+ excelOption: {
|
|
|
+ submitBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "模板下载",
|
|
|
+ prop: "excelTemplate",
|
|
|
+ formslot: true,
|
|
|
+ span: 24
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "模板上传",
|
|
|
+ prop: "excelFile",
|
|
|
+ type: "upload",
|
|
|
+ drag: true,
|
|
|
+ loadText: "模板上传中,请稍等",
|
|
|
+ span: 24,
|
|
|
+ propsHttp: {
|
|
|
+ res: "data"
|
|
|
+ },
|
|
|
+ tip: "请上传 .xls,.xlsx 标准格式文件",
|
|
|
+ action: "/api/blade-los/tradingBoxItem/importBoxItem"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ checkId: '', // 审核需要的id
|
|
|
+ batchNo: '',
|
|
|
+ checkScheduleDialog: false, // 审核弹窗
|
|
|
+ editButton: false,
|
|
|
+ editDisabled: false,
|
|
|
+ form: {
|
|
|
+ type: 'YYFY',
|
|
|
+ applicantDate: dateFormat(new Date(), "yyyy-MM-dd") + " 00:00:00",
|
|
|
+ // branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
|
|
|
+ // branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
|
|
|
+ settlementStatus: '0',
|
|
|
+ operatingExpensesItemList: [],
|
|
|
+ filesCenterLis: [],
|
|
|
+ },
|
|
|
+ oldForm: {},
|
|
|
+ optionForm: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: false,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "所属公司 ",
|
|
|
+ prop: 'branchName',
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '申请人',
|
|
|
+ prop: 'applicantName',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '申请日期',
|
|
|
+ prop: 'applicantDate',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '开户行',
|
|
|
+ prop: 'bankOfDeposit',
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '银行户头',
|
|
|
+ prop: 'bankAccount',
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '账号',
|
|
|
+ prop: 'account',
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '支付方式',
|
|
|
+ prop: 'paymentMethod',
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=payment_method",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '金额',
|
|
|
+ prop: 'amount',
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ minRows: 2,
|
|
|
+ span: 24
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ optionForm2: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: true,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '单据编号',
|
|
|
+ prop: 'billNo',
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结算人',
|
|
|
+ prop: 'settlementPersonName',
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结算日期',
|
|
|
+ prop: 'settlementDate',
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结算状态',
|
|
|
+ prop: 'settlementStatus',
|
|
|
+ disabled: true,
|
|
|
+ type: 'select',
|
|
|
+ dicData: [{
|
|
|
+ label: '未确认付费',
|
|
|
+ value: '0'
|
|
|
+ }, {
|
|
|
+ label: '已确认付费',
|
|
|
+ value: '1'
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '制单人',
|
|
|
+ prop: "createUserName",
|
|
|
+ disabled: true,
|
|
|
+ span: 4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '制单日期',
|
|
|
+ prop: "createTime",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '修改人',
|
|
|
+ prop: "updateUserName",
|
|
|
+ disabled: true,
|
|
|
+ span: 4,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '修改日期',
|
|
|
+ prop: "updateTime",
|
|
|
+ disabled: true,
|
|
|
+ span: 4,
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ option: {},
|
|
|
+ optionBack: {
|
|
|
+ // height: 'auto',
|
|
|
+ maxHeight: 340,
|
|
|
+ calcHeight: 30,
|
|
|
+ menuWidth: 120,
|
|
|
+ searchMenuSpan: 18,
|
|
|
+ tip: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ refreshBtn: false,
|
|
|
+ selection: true,
|
|
|
+ align: 'center',
|
|
|
+ menu: true,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "index",
|
|
|
+ prop: "index",
|
|
|
+ width: "55",
|
|
|
+ fixed: true,
|
|
|
+ headerslot: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '费用归属人',
|
|
|
+ prop: 'costOwner',
|
|
|
+ width: 140,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入箱号",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '摘要说明',
|
|
|
+ prop: 'summaryDescription',
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '单价',
|
|
|
+ prop: 'price',
|
|
|
+ width: 100,
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '数量',
|
|
|
+ prop: 'quantity',
|
|
|
+ width: 100,
|
|
|
+ cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '金额',
|
|
|
+ prop: 'amount',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单日期",
|
|
|
+ prop: "createTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改人",
|
|
|
+ prop: "updateUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改日期",
|
|
|
+ prop: "updateTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ cell: true,
|
|
|
+ width: 150,
|
|
|
+ overHidden: true,
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ roleName: localStorage.getItem('roleName').split(','),
|
|
|
+ updateSearchKey: new Date().getTime(),
|
|
|
+ updateFormKey: new Date().getTime(),
|
|
|
+ deptId: JSON.parse(localStorage.getItem('sysitemData')).deptId
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ dicSelect,
|
|
|
+ checkSchedule,
|
|
|
+ businessReports,
|
|
|
+ reports,
|
|
|
+ feeModify,
|
|
|
+ feeModifyView
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ detailData: Object
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(531), this.optionBack);
|
|
|
+ if (this.detailData && this.detailData.type == 'new') {
|
|
|
+ this.initData()
|
|
|
+ }
|
|
|
+ if (this.detailData && this.detailData.id) {
|
|
|
+ this.editButton = true
|
|
|
+ this.editDisabled = true
|
|
|
+ this.optionForm.disabled = true
|
|
|
+ this.getDetail(this.detailData.id)
|
|
|
+ }
|
|
|
+ if (this.$route.query.params) {
|
|
|
+ this.getDetail(this.$route.query.params)
|
|
|
+ }
|
|
|
+ if (this.detailData && this.detailData.copyId) {
|
|
|
+ this.getCopydate(this.detailData.copyId)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initData() {
|
|
|
+ getUserInfo().then(res => {
|
|
|
+ this.$set(this.form, 'applicantId', res.data.data.id);
|
|
|
+ this.$set(this.form, 'applicantName', res.data.data.realName);
|
|
|
+ this.$set(this.form, 'branchId', res.data.data.deptId);
|
|
|
+ this.$set(this.form, 'branchName', res.data.data.deptName);
|
|
|
+ this.$set(this.form, 'bankOfDeposit', res.data.data.bankDeposit);
|
|
|
+ this.$set(this.form, 'bankAccount', res.data.data.bankAccount);
|
|
|
+ this.$set(this.form, 'account', res.data.data.reimburseNumber);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ countChange(row) {
|
|
|
+ row.amount = _.round(_.multiply(Number(row.price ? row.price : 0), Number(row.quantity ? row.quantity : 0)), 2)
|
|
|
+ },
|
|
|
+ uploadBefore(file, done, loading) {
|
|
|
+ done();
|
|
|
+ loading = true;
|
|
|
+ },
|
|
|
+ // 上传成功
|
|
|
+ onSuccess(res, done, loading, column) {
|
|
|
+ if (res.length > 0) {
|
|
|
+ this.$message.success("上传成功!");
|
|
|
+ }
|
|
|
+ this.excelBox = false;
|
|
|
+ // this.$message.success("导入成功!");
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ loading = false;
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ // 下载模板
|
|
|
+ handleGet() {
|
|
|
+ window.open(
|
|
|
+ `/api/blade-los/tradingBoxItem/boxItemTemplate?${this.website.tokenHeader
|
|
|
+ }=${getToken()}&type=4`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ dicChange(name, row) {
|
|
|
+ if (name == 'branchName') {
|
|
|
+ if (row) {
|
|
|
+ this.form.branchId = row.id
|
|
|
+ } else {
|
|
|
+ this.form.branchId = null
|
|
|
+ this.form.branchName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'applicantName') {
|
|
|
+ if (row) {
|
|
|
+ this.form.applicantId = row.id
|
|
|
+ this.$set(this.form, 'bankOfDeposit', row.bankDeposit);
|
|
|
+ this.$set(this.form, 'bankAccount', row.bankAccount);
|
|
|
+ this.$set(this.form, 'account', row.reimburseNumber);
|
|
|
+ } else {
|
|
|
+ this.form.applicantId = null
|
|
|
+ this.form.applicantName = null
|
|
|
+ this.$set(this.form, 'bankOfDeposit', null);
|
|
|
+ this.$set(this.form, 'bankAccount', null);
|
|
|
+ this.$set(this.form, 'account', null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowDicChange(name, row, el, index) {
|
|
|
+ if (name == 'feeCnName') {
|
|
|
+ if (row) {
|
|
|
+ el.feeId = row.id
|
|
|
+ el.feeCode = row.code
|
|
|
+ } else {
|
|
|
+ el.feeId = null
|
|
|
+ el.feeCode = null
|
|
|
+ el.feeCnName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowEdit(row) {
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async addRow() {
|
|
|
+ this.form.operatingExpensesItemList.push({
|
|
|
+ costOwner: this.form.applicantName,
|
|
|
+ $cellEdit: true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectionChange(list) {
|
|
|
+ this.selectionList = list;
|
|
|
+ },
|
|
|
+ getDetail(id) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ detail({ id: id }).then(res => {
|
|
|
+ if (res.data.data.status != 0){
|
|
|
+ this.editButton=true
|
|
|
+ this.editDisabled = true
|
|
|
+ this.optionForm.disabled = true
|
|
|
+ }
|
|
|
+ this.form = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getCopydate(id) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ copyAgent({ id: id }).then(res => {
|
|
|
+ this.form = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ inEdit() {
|
|
|
+ this.editButton = false
|
|
|
+ if (this.form.status == 0) {
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowDel(row, index) {
|
|
|
+ this.$confirm("确定删除数据?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ itemRemove({ ids: row.id }).then(res => {
|
|
|
+ this.form.operatingExpensesItemList.splice(index, 1);
|
|
|
+ this.$message.success("成功删除");
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.form.operatingExpensesItemList.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ allClick(name) {
|
|
|
+ },
|
|
|
+ submit(type) {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ let obj = {
|
|
|
+ ...this.form
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submit(obj).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ confirm() {
|
|
|
+ this.$confirm("是否确认付费?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ confirm(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ revoke() {
|
|
|
+ this.$confirm("是否撤销付费?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revoke(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ application() {
|
|
|
+ this.$confirm("是否请核数据?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {}
|
|
|
+ obj = {
|
|
|
+ id: this.form.id,
|
|
|
+ url: '/iosBasicData/financialManagement/reimbursement/index',
|
|
|
+ pageStatus: '',
|
|
|
+ pageLabel: '营业费用(N)',
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ pleaseCheck(obj).then(res => {
|
|
|
+ this.$message.success("请核成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ revokeApplication() {
|
|
|
+ this.$confirm("是否撤销请核?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {}
|
|
|
+ obj = {
|
|
|
+ id: this.form.id,
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ repealCancel(obj).then(res => {
|
|
|
+ this.$message.success("撤销请核成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ this.editDisabled = false
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //请核关闭
|
|
|
+ choceScheduleFun() {
|
|
|
+ this.checkScheduleDialog = false
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ async saveColumn(ref, option, optionBack, code) {
|
|
|
+ const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ //关闭窗口
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //自定义列重置
|
|
|
+ async resetColumn(ref, option, optionBack, code) {
|
|
|
+ this[option] = this[optionBack];
|
|
|
+ const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
|
|
|
+ if (inSave) {
|
|
|
+ this.$message.success("重置成功");
|
|
|
+ this.$refs[ref].$refs.dialogColumn.columnBox = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 更改表格颜色
|
|
|
+ headerClassName(tab) {
|
|
|
+ //颜色间隔
|
|
|
+ let back = ""
|
|
|
+ if (tab.columnIndex >= 0 && tab.column.level === 1) {
|
|
|
+ if (tab.columnIndex % 2 === 0) {
|
|
|
+ back = "back-one"
|
|
|
+ } else if (tab.columnIndex % 2 === 1) {
|
|
|
+ back = "back-two"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return back;
|
|
|
+ },
|
|
|
+ goBack(type) {
|
|
|
+ this.$emit("goBack");
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+::v-deep .el-form-item__error {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-form-item {
|
|
|
+ margin-bottom: 8px !important;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-table .cell {
|
|
|
+ padding: 0 2px !important;
|
|
|
+
|
|
|
+ .el-form-item {
|
|
|
+ margin-bottom: 0px !important;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .avue-crud .el-table .el-form-item__label {
|
|
|
+ left: -1px;
|
|
|
+}
|
|
|
+
|
|
|
+// ::v-deep#out-table .back-one {
|
|
|
+// background: #ecf5ff !important;
|
|
|
+// }
|
|
|
+
|
|
|
+// ::v-deep#out-table .back-two {
|
|
|
+// background: #ecf5ff !important;
|
|
|
+// }
|
|
|
+
|
|
|
+::v-deep #out-table .back-one {
|
|
|
+ background: #ecf5ff !important;
|
|
|
+ text-align: center;
|
|
|
+ padding: 4px 0;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep #out-table .back-two {
|
|
|
+ background: #ecf5ff !important;
|
|
|
+ text-align: center;
|
|
|
+ padding: 4px 0;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+::v-deep .el-table--small td,
|
|
|
+.el-table--small th {
|
|
|
+ padding: 2px !important;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-card__body {
|
|
|
+ padding: 3px 10px;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .box-card .el-card__body {
|
|
|
+ padding: 4px !important;
|
|
|
+}
|
|
|
+
|
|
|
+.disabledBox {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.meetSize {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #54BCBD;
|
|
|
+}
|
|
|
+
|
|
|
+.fontSize {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #81B337;
|
|
|
+}
|
|
|
+</style>
|