Parcourir la source

费用管理,链属优化

sqg il y a 4 ans
Parent
commit
670934ea35

+ 61 - 0
front-vue/src/api/service/cost/costManage.js

@@ -0,0 +1,61 @@
+import request from '@/utils/request'
+
+// 查询费用列表
+export function listCost(query) {
+  return request({
+    url: '/sc-service/cost/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询发票列表
+export function selectInvoiceList(query) {
+  return request({
+    url: '/sc-service/cost/listInvoice',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询开票地址信息
+export function listInvoice(scyId,zciId) {
+  return request({
+    url: '/sc-service/cost/invoiceList/'+ scyId +'/' + zciId,
+    method: 'get'
+  })
+}
+
+// 申请开票
+export function applyInvoice(data) {
+  return request({
+    url: '/sc-service/cost/applyInvoice',
+    method: 'put',
+    data: data
+  })
+}
+
+// 开票或冲红或修改物流单号
+export function invoicing(data) {
+  return request({
+    url: '/sc-service/cost/invoicing',
+    method: 'put',
+    data: data
+  })
+}
+
+// 开票作废
+export function daleteInvoice(zciId) {
+  return request({
+    url: '/sc-service/cost/' + zciId,
+    method: 'delete'
+  })
+}
+
+// 查询当前操作员
+export function getUser() {
+  return request({
+    url: '/sc-service/rel/getUser',
+    method: 'get'
+  })
+}

+ 9 - 0
front-vue/src/api/service/rel/companyRel.js

@@ -66,6 +66,15 @@ export function updateRel(launchScrId,state) {
   })
 }
 
+// 重邀
+export function againInvite(row) {
+  return request({
+    url: '/sc-service/rel/againInvite',
+    method: 'put',
+    data: row
+  })
+}
+
 // 删除链属
 export function delRel(launchScrId) {
   return request({

+ 826 - 0
front-vue/src/views/service/cost/costManage.vue

@@ -0,0 +1,826 @@
+<template>
+  <!-- ________________________________________平台用________________________________________________ -->
+  <el-tabs type="border-card">
+    <el-tab-pane label="费用列表">
+      <el-card class="fiche">
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
+          <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
+         <div  style="float: right;margin-right:1%">
+            <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"  style="float: ;">重置</el-button>
+              <column-setting :checkList="checkList" :tableList="tableList" :selfDom="selfDom" :tableId="tableId" style="margin-left:5px"></column-setting>
+         </div>
+         <hr  style="margin-top: 16px;">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="融资编号" prop="zfrNumber">
+        <el-input
+          maxlength="30"
+          v-model="queryParams.zfrNumber"
+          placeholder="请输入融资编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="融资状态" prop="zfrStatus">
+            <el-select v-model="queryParams.zfrStatus"
+                placeholder="融资状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in zfrStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
+      <el-form-item label="费用状态" prop="zciStatus">
+          <el-select v-model="queryParams.zciStatus"
+              placeholder="费用状态"
+              clearable
+              size="small"
+              style="width: 215px">
+                  <el-option
+                  v-for="dict in zciStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                  ></el-option>
+          </el-select>
+      </el-form-item>
+        <el-form-item label="发票状态" prop="zciInvoiceStatus">
+            <el-select v-model="queryParams.zciInvoiceStatus"
+                placeholder="发票状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in zciInvoiceStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
+        <el-form-item label="创建时间">
+          <el-date-picker v-model="dateRange" size="small" style="width: 225px" 
+          value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" 
+          end-placeholder="结束日期"></el-date-picker>
+      </el-form-item>
+    </el-form>
+    </el-card>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['service:cost:export']"
+          :disabled="total == 0"
+        >导出</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table v-loading="loading" :data="costList" stripe border>
+      <el-table-column label="序号" type="index" width="55" align="center" />
+      <el-table-column label="融资编号" align="center" prop="zfrNumber" v-if="uncheckList.zfiNumber" />
+      <el-table-column label="融资企业" align="center" prop="supScyName" v-if="uncheckList.supScyName" />
+      <el-table-column label="开立企业" align="center" prop="coreScyName" v-if="uncheckList.coreScyName" show-overflow-tooltip />
+      <el-table-column label="融资产品" align="center" prop="zfpName" v-if="uncheckList.zfpName" show-overflow-tooltip />
+      <el-table-column label="融资金额" align="center" prop="zfrAmount" v-if="uncheckList.zfrAmount" show-overflow-tooltip />
+      <el-table-column label="融资状态" align="center" prop="zfrStatus" :formatter="zfrStatusFormat" v-if="uncheckList.zfrStatus" show-overflow-tooltip />
+      <el-table-column label="费用状态" align="center" prop="zciStatus" :formatter="zciStatusFormat" v-if="uncheckList.zciStatus" show-overflow-tooltip />
+      <el-table-column label="创建时间" align="center" prop="createTime" v-if="uncheckList.createTime" show-overflow-tooltip />
+      <el-table-column label="手续费" align="center" prop="zciAmount" v-if="uncheckList.zciAmount " show-overflow-tooltip />
+      <el-table-column label="发票状态" align="center" prop="zciInvoiceStatus" :formatter="zciInvoiceStatusFormat" v-if="uncheckList.zciInvoiceStatus" show-overflow-tooltip />
+      <el-table-column label="快递单号" align="center" prop="zciExpressNo" v-if="uncheckList.zciExpressNo" show-overflow-tooltip />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.zciInvoiceStatus != '0'"
+            size="mini"
+            type="text"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['service:cost:update']"
+          >编辑</el-button>
+          <el-button
+            v-if="scope.row.zciInvoiceStatus == '2' || scope.row.zciInvoiceStatus == '4'"
+            size="mini"
+            type="text"
+            @click="handleInvoiceDelete(scope.row)"
+            v-hasPermi="['service:cost:update']"
+          >作废</el-button>
+          <el-button
+            v-if="scope.row.zciInvoiceStatus == '2' || scope.row.zciInvoiceStatus == '3'"
+            size="mini"
+            type="text"
+            @click="handleInvoiceFlush(scope.row)"
+            v-hasPermi="['service:cost:update']"
+          >冲红</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </el-tab-pane>
+
+<el-tab-pane label="开票列表">
+    <!-- 未认证列表 -->
+    <el-card class="fiche">
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getInvoice">收起</right-toolbar>
+          <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
+         <div  style="float: right;margin-right:1%">
+            <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleInvoiceQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetInvoiceQuery"  style="float: ;">重置</el-button>
+              <column-setting :checkList="checkList" :tableList="tableList" :selfDom="selfDom" :tableId="tableId" style="margin-left:5px"></column-setting>
+         </div>
+         <hr  style="margin-top: 16px;">
+    <el-form :model="invoiceParams" ref="queryInvoiceForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="融资编号" prop="zfrNumber">
+        <el-input
+          maxlength="30"
+          v-model="invoiceParams.zfrNumber"
+          placeholder="请输入融资编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleInvoiceQuery"
+        />
+      </el-form-item>
+      <el-form-item label="融资状态" prop="zfrStatus">
+          <el-select v-model="invoiceParams.zfrStatus"
+              placeholder="融资状态"
+              clearable
+              size="small"
+              style="width: 215px">
+                  <el-option
+                  v-for="dict in zfrStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                  ></el-option>
+          </el-select>
+      </el-form-item>
+      <el-form-item label="费用状态" prop="zciStatus">
+          <el-select v-model="invoiceParams.zciStatus"
+              placeholder="费用状态"
+              clearable
+              size="small"
+              style="width: 215px">
+                  <el-option
+                  v-for="dict in zciStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                  ></el-option>
+          </el-select>
+      </el-form-item>
+        <el-form-item label="发票状态" prop="zciInvoiceStatus">
+            <el-select v-model="invoiceParams.zciInvoiceStatus"
+                placeholder="发票状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in zciInvoiceStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
+        <el-form-item label="创建时间">
+          <el-date-picker v-model="dateInvoiceRange" size="small" style="width: 225px" 
+          value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" 
+          end-placeholder="结束日期"></el-date-picker>
+      </el-form-item>
+    </el-form>
+    </el-card>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          size="mini"
+          @click="handleExportInvoice"
+          :disabled="invoiceTotal == 0"
+          v-hasPermi="['service:cost:export']"
+        >导出</el-button>
+      </el-col>
+    </el-row>
+
+    <!-- 开票列表 -->
+    <el-table v-loading="loading" :data="invoiceList" stripe border>
+      <el-table-column label="序号" type="index" width="55" align="center" />
+      <el-table-column label="融资编号" align="center" prop="zfrNumber" v-if="uncheckList.zfiNumber" />
+      <el-table-column label="融资企业" align="center" prop="supScyName" v-if="uncheckList.supScyName" />
+      <el-table-column label="开立企业" align="center" prop="coreScyName" v-if="uncheckList.coreScyName" show-overflow-tooltip />
+      <el-table-column label="融资产品" align="center" prop="zfpName" v-if="uncheckList.zfpName" show-overflow-tooltip />
+      <el-table-column label="融资金额" align="center" prop="zfrAmount" v-if="uncheckList.zfrAmount" show-overflow-tooltip />
+      <el-table-column label="融资状态" align="center" prop="zfrStatus" :formatter="zfrStatusFormat" v-if="uncheckList.zfrStatus" show-overflow-tooltip />
+      <el-table-column label="费用状态" align="center" prop="zciStatus" :formatter="zciStatusFormat" v-if="uncheckList.zciStatus" show-overflow-tooltip />
+      <el-table-column label="创建时间" align="center" prop="createTime" v-if="uncheckList.createTime" show-overflow-tooltip />
+      <el-table-column label="手续费" align="center" prop="zciAmount" v-if="uncheckList.zciAmount " show-overflow-tooltip />
+      <el-table-column label="发票状态" align="center" prop="zciInvoiceStatus" :formatter="zciInvoiceStatusFormat" v-if="uncheckList.zciInvoiceStatus" show-overflow-tooltip />
+      <el-table-column label="快递单号" align="center" prop="zciExpressNo" v-if="uncheckList.zciExpressNo" show-overflow-tooltip />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.zciInvoiceStatus == '1'"
+            size="mini"
+            type="text"
+            @click="handleInvoiceOpen(scope.row)"
+            v-hasPermi="['service:cost:update']"
+          >开票</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="invoiceTotal > 0"
+      :total="invoiceTotal"
+      :page.sync="invoiceParams.pageNum"
+      :limit.sync="invoiceParams.pageSize"
+      @pagination="getInvoice"
+    />
+  </el-tab-pane>
+
+    <!-- 发票框 -->
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="140px" :inline="true">
+        <el-form-item label="企业名称" prop="scyName">
+          <el-input v-model="form.scyName" disabled />
+        </el-form-item>
+        <el-form-item label="企业统一代码" prop="scySocialCode">
+          <el-input v-model="form.scySocialCode" disabled />
+        </el-form-item>
+        <el-form-item label="企业注册电话" prop="scyPhone">
+          <el-input v-model="form.scyPhone" disabled />
+        </el-form-item>
+        <el-form-item label="收件人" prop="ziaContacts">
+          <el-input v-model="form.ziaContacts"  disabled />
+        </el-form-item>
+        <el-form-item label="收件人电话" prop="ziaContactsPhone">
+          <el-input v-model="form.ziaContactsPhone" disabled />
+        </el-form-item>
+        <el-form-item label="邮寄地址" prop="ziaAddress">
+          <el-input v-model="form.ziaAddress" disabled />
+        </el-form-item>
+        <el-form-item label="快递单号" prop="zciExpressNo">
+          <el-input v-model="form.zciExpressNo" placeholder="请输入快递单号" maxlength="30" show-word-limit />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 发票列表开票框 -->
+    <el-dialog :title="openInvoiceTitle" :visible.sync="openInvoice" width="800px" append-to-body>
+      <el-form ref="formInvoice" :model="formInvoice" :rules="rules" label-width="140px" :inline="true">
+        <el-form-item label="企业名称" prop="scyName">
+          <el-input v-model="formInvoice.scyName" disabled />
+        </el-form-item>
+        <el-form-item label="企业统一代码" prop="scySocialCode">
+          <el-input v-model="formInvoice.scySocialCode" disabled />
+        </el-form-item>
+        <el-form-item label="企业注册电话" prop="scyPhone">
+          <el-input v-model="formInvoice.scyPhone" disabled />
+        </el-form-item>
+        <el-form-item label="收件人" prop="ziaContacts">
+          <el-input v-model="formInvoice.ziaContacts"  disabled />
+        </el-form-item>
+        <el-form-item label="收件人电话" prop="ziaContactsPhone">
+          <el-input v-model="formInvoice.ziaContactsPhone" disabled />
+        </el-form-item>
+        <el-form-item label="邮寄地址" prop="ziaAddress">
+          <el-input v-model="formInvoice.ziaAddress" disabled />
+        </el-form-item>
+        <el-form-item label="快递单号" prop="zciExpressNo">
+          <el-input v-model="formInvoice.zciExpressNo" placeholder="请输入快递单号" maxlength="30" show-word-limit />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormInvoice">确 定</el-button>
+        <el-button @click="cancelInvoice">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 发票列表冲红框 -->
+    <el-dialog :title="openFlushTitle" :visible.sync="openFlush" width="800px" append-to-body>
+      <el-form ref="formFlush" :model="formFlush" :rules="rules" label-width="140px" :inline="true">
+        <el-form-item label="企业名称" prop="scyName">
+          <el-input v-model="formFlush.scyName" disabled />
+        </el-form-item>
+        <el-form-item label="企业统一代码" prop="scySocialCode">
+          <el-input v-model="formFlush.scySocialCode" disabled />
+        </el-form-item>
+        <el-form-item label="企业注册电话" prop="scyPhone">
+          <el-input v-model="formFlush.scyPhone" disabled />
+        </el-form-item>
+        <el-form-item label="收件人" prop="ziaContacts">
+          <el-input v-model="formFlush.ziaContacts"  disabled />
+        </el-form-item>
+        <el-form-item label="收件人电话" prop="ziaContactsPhone">
+          <el-input v-model="formFlush.ziaContactsPhone" disabled />
+        </el-form-item>
+        <el-form-item label="邮寄地址" prop="ziaAddress">
+          <el-input v-model="formFlush.ziaAddress" disabled />
+        </el-form-item>
+        <el-form-item label="快递单号" prop="zciExpressNo">
+          <el-input v-model="formFlush.zciExpressNo" placeholder="请输入快递单号" maxlength="30" show-word-limit />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFormFlush">确 定</el-button>
+        <el-button @click="cancelFlush">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </el-tabs>
+</template>
+
+<script>
+import { listCost, listInvoice, selectInvoiceList, applyInvoice, invoicing, daleteInvoice, getUser } from "@/api/service/cost/costManage";
+import { uploadFileNew } from "@/api/common/file";
+import { getToken } from "@/utils/auth";
+import {columnQuery,columnfilter} from "@/api/common/columnSetting";
+import ColumnSetting from '../../../components/Table/columnSetting.vue';
+export default {
+  name: "costManage",
+  components: {
+     ColumnSetting 
+   },
+  data() {
+    return {
+      //费用列表
+      costList:[],
+      //开票列表
+      invoiceList:[],
+      //创建时间范围
+      dateRange: [],
+      dateInvoiceRange:[],
+      //费用状态
+      zciStatusOptions:[],
+      //发票状态
+      zciInvoiceStatusOptions:[],
+      //融资状态 
+      zfrStatusOptions:[],
+      //操作员Id
+      userId : "",
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      // 弹出层标题
+      title: "",
+      openInvoiceTitle:"",
+      openFlushTitle:"",
+      total: 0,
+      invoiceTotal: 0,
+      // 是否显示弹出层
+      open: false,
+      openInvoice:false,
+      openFlush:false,
+      // 链属查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        zfrNumber: null,
+        zciStatus: null,
+        zfrStatus:null,
+        zciInvoiceStatus: null
+      },
+      invoiceParams:{
+        pageNum: 1,
+        pageSize: 10,
+        zfrNumber: null,
+        zciStatus: null,
+        zfrStatus:null,
+        zciInvoiceStatus: null
+      },
+      //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
+      tableList: [
+        {
+              label: 'zfiNumber',
+              value: '融资编号'
+            },
+            {
+              label: 'supScyName',
+              value: '融资企业'
+            },
+            {
+              label: 'coreScyName',
+              value: '开立企业'
+            },
+            {
+              label: 'zfpName',
+              value: '融资产品'
+            },
+            {
+              label: 'zfrAmount',
+              value: '融资金额'
+            },
+            {
+              label: 'zciStatus',
+              value: '费用状态'
+            },
+            {
+              label: 'zfrStatus',
+              value: '融资状态'
+            },
+            {
+              label: 'createTime',
+              value: '创建时间'
+            },
+            {
+              label: 'zciAmount',
+              value: '手续费'
+            },
+            {
+              label: 'zciInvoiceStatus',
+              value: '发票状态'
+            },
+            {
+              label: 'zciExpressNo',
+              value: '快递单号'
+            },
+            ],
+      checkList: [],//筛选列选中的数据列表--显示隐藏列用
+      uncheckList: {},//控制筛选列显示隐藏--显示隐藏列用
+      selfDom : this,
+      tableId:"/sc-service/cost/list",
+      // 表单参数
+      form: {
+        zciId:null,
+        scyId:null,
+        scyName:null,
+        scySocialCode:null,
+        scyPhone:null,
+        ziaContacts:null,
+        ziaContactsPhone:null,
+        ziaAddress:null,
+        zciExpressNo:null,
+        zciInvoiceStatus:null
+      },
+      formInvoice: {
+        zciId:null,
+        scyId:null,
+        scyName:null,
+        scySocialCode:null,
+        scyPhone:null,
+        ziaContacts:null,
+        ziaContactsPhone:null,
+        ziaAddress:null,
+        zciExpressNo:null,
+        zciInvoiceStatus:null
+      },
+      formFlush:{
+        zciId:null,
+        scyId:null,
+        scyName:null,
+        scySocialCode:null,
+        scyPhone:null,
+        ziaContacts:null,
+        ziaContactsPhone:null,
+        ziaAddress:null,
+        zciExpressNo:null,
+        zciInvoiceStatus:null
+      },
+      // 表单校验
+      rules: {
+        zciExpressNo: [
+          { required: true, message: "快递单号不能为空", trigger: "blur" },
+        ]
+      },
+    };
+  },
+  created() {
+    this.getDicts("ser_zci_status").then(response => {
+      this.zciStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zci_invoice_status").then(response => {
+      this.zciInvoiceStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zfr_status").then(response => {
+      this.zfrStatusOptions = response.data;
+    });
+    this.getList();
+    this.getInvoice();
+    this.getUser();
+  },
+  activated() {
+    this.getDicts("ser_zci_status").then(response => {
+      this.zciStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zci_invoice_status").then(response => {
+      this.zciInvoiceStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zfr_status").then(response => {
+      this.zfrStatusOptions = response.data;
+    });
+    this.getList();
+    this.getInvoice();
+    this.getUser();
+  },
+  mounted() {
+    this.columnQuery();
+  },
+  methods: {
+    //获取当前客户是否之前设置过列展示隐藏
+    columnQuery(){
+        //获取页面路径
+        var psfPagePath = window.location.pathname;
+        //用请求后台的url作为唯一标识
+        var psfTableName = this.tableId;
+        var columnForm = {};
+        columnForm.psfPagePath = psfPagePath;
+        columnForm.psfTableName = psfTableName;
+        columnQuery(columnForm).then(response => {
+         if(response.data && response.data.psfShowData){
+                this.checkList = response.data.psfShowData;
+         }
+         this.filter();
+      })
+    },
+    //控制隐藏显示的函数
+    filter(checkList) {
+      if (!!checkList) {
+        this.checkList = checkList;
+      }
+      columnfilter(this.selfDom);
+    },
+
+    //菜单状态字典翻译
+    zciStatusFormat(row, column) {
+      return this.selectDictLabel(this.zciStatusOptions, row.zciStatus);
+    },
+    zciInvoiceStatusFormat(row, column) {
+      return this.selectDictLabel(this.zciInvoiceStatusOptions, row.zciInvoiceStatus);
+    },
+    zfrStatusFormat(row, column) {
+      return this.selectDictLabel(this.zfrStatusOptions, row.zfrStatus);
+    },
+    /** 查询链属列表 */
+    getList() {
+      this.loading = true;
+       listCost(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+          this.costList = response.data.records;
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    getInvoice() {
+      this.loading = true;
+       selectInvoiceList(this.addDateRange(this.invoiceParams, this.dateInvoiceRange)).then(response => {
+         this.invoiceList = response.data.records;
+          this.invoiceTotal = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.resetForm("form");
+      this.resetForm("formInvoice");
+      this.resetForm("formFlush");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.handleQuery();
+    },
+    //发票列表
+    handleInvoiceQuery() {
+      this.invoiceParams.pageNum = 1;
+      this.getInvoice();
+    },
+    resetInvoiceQuery(){
+      this.resetForm("queryInvoiceForm");
+      this.dateInvoiceRange = [];
+      this.handleInvoiceQuery();
+    },
+    /** 发票按钮操作 */
+    handleUpdate(row) {
+      const zciId  = row.zciId || this.ids;
+      const scyId = row.zfiSupplierId || this.ids;
+      listInvoice(scyId,zciId).then(response => {
+        this.form = response.data[0];
+        this.form.zciId  = zciId;
+      });
+      this.open = true;
+      this.title = "发票信息";
+    },
+      
+  /** 提交按钮 */
+  submitForm() {
+      var self = this;
+      this.$refs["form"].validate(valid => {
+        let fd = new FormData();
+        for(var key in self.form){
+          fd.append(key, self.form[key]);
+        }
+        if (valid) {
+          if (this.form.scyId != null) {
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)",
+            })
+            invoicing(self.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+              this.getInvoice();
+            });
+            loading.close();
+          }
+        }
+      });
+    },
+      
+    /* 开票作废 */
+    handleInvoiceDelete(row) {
+      const zciId = row.zciId || this.ids;
+      const zciInvoiceStatus = '3';
+      const data = {zciId,zciInvoiceStatus};
+      this.$confirm('确认作废此发票?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return invoicing(data);
+        }).then(() => {
+          this.getList();
+          this.getInvoice();
+          this.msgSuccess("作废成功");
+        })
+        .catch(() => {
+          this.$message({
+            type: "warning",
+            message: "已取消删除",
+          });
+        }); 
+    },
+
+    /* 发票列表开票按钮 */
+    handleInvoiceOpen(row) {
+      const zciId  = row.zciId || this.ids;
+      const scyId = row.zfiSupplierId || this.ids;
+      listInvoice(scyId,zciId).then(response => {
+        this.formInvoice = response.data[0];
+        this.formInvoice.zciId  = zciId;
+      });
+      this.openInvoice = true;
+      this.openInvoiceTitle = "开票";
+    },
+    //发票列表开票取消
+    cancelInvoice(){
+      this.openInvoice = false,
+      this.reset();
+    },
+    //发票列表开票提交
+    submitFormInvoice() {
+      var self = this;
+      this.$refs["formInvoice"].validate(valid => {
+        let fd = new FormData();
+        for(var key in self.formInvoice){
+          fd.append(key, self.formInvoice[key]);
+        }
+        if (valid) {
+          if (this.formInvoice.scyId != null) {
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)",
+            })
+            this.formInvoice.zciInvoiceStatus = '2';
+            invoicing(self.formInvoice).then(response => {
+              this.msgSuccess("开票成功");
+              this.openInvoice = false;
+              this.getList();
+              this.getInvoice();
+            });
+            loading.close();
+          }
+        }
+      });
+    },
+
+    //冲红按钮
+    handleInvoiceFlush(row) {
+      const zciId  = row.zciId || this.ids;
+      const scyId = row.zfiSupplierId || this.ids;
+      listInvoice(scyId,zciId).then(response => {
+        this.formFlush = response.data[0];
+        this.formFlush.zciId  = zciId;
+      });
+      this.openFlush = true;
+      this.openFlushTitle = "开票";
+    },
+    //发票列表冲红取消
+    cancelFlush(){
+      this.openFlush = false,
+      this.reset();
+    },
+    //发票列表冲红提交
+    submitFormFlush() {
+      var self = this;
+      this.$refs["formFlush"].validate(valid => {
+        let fd = new FormData();
+        for(var key in self.formFlush){
+          fd.append(key, self.formFlush[key]);
+        }
+        if (valid) {
+          if (this.formFlush.scyId != null) {
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)",
+            })
+            this.formFlush.zciInvoiceStatus = '4';
+            invoicing(self.formFlush).then(response => {
+              this.msgSuccess("冲红成功");
+              this.openFlush = false;
+              this.getList();
+              this.getInvoice();
+            });
+            loading.close();
+          }
+        }
+      });
+    },
+
+    
+    /** 导出按钮操作 */
+    handleExport() {
+      this.getList();
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      this.download('/sc-service/cost/export', {
+        ...this.queryParams, ...this.dateRange
+      },'费用信息.xlsx')
+      setTimeout(() => {
+            loading.close();
+          }, 2000);
+    },
+
+    /** 导出按钮操作 */
+    handleExportInvoice() {
+      this.getList();
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      this.download('/sc-service/cost/exportInvoice', {
+        ...this.invoiceParams, ...this.dateInvoiceRange
+      },'发票信息.xlsx')
+      setTimeout(() => {
+            loading.close();
+          }, 2000);
+    },
+
+    //获取操作员Id
+    getUser(){
+      getUser().then(response => {
+          this.userId = response.data;
+        })
+    }
+  }
+};
+</script>

+ 505 - 0
front-vue/src/views/service/cost/userCostManage.vue

@@ -0,0 +1,505 @@
+<template>
+  <!-- ________________________________________融资企业用________________________________________________ -->
+  <div class="app-container">
+      <el-card class="fiche">
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList">收起</right-toolbar>
+          <span style="margin-bottom: 10px;color:#333333;font:14px Helvetica Neue, Helvetica, PingFang SC, Tahoma, Arial,sans-serif">所选条件:</span>
+         <div  style="float: right;margin-right:1%">
+            <el-button type="cyan"  icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"  style="float: ;">重置</el-button>
+              <column-setting :checkList="checkList" :tableList="tableList" :selfDom="selfDom" :tableId="tableId" style="margin-left:5px"></column-setting>
+         </div>
+         <hr  style="margin-top: 16px;">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label="融信编号" prop="zfiNumber">
+        <el-input
+          maxlength="30"
+          v-model="queryParams.zfiNumber"
+          placeholder="请输入融信编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="融资状态" prop="zfrStatus">
+            <el-select v-model="queryParams.zfrStatus"
+                placeholder="发票状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in zfrStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
+      <el-form-item label="费用状态" prop="zciStatus">
+          <el-select v-model="queryParams.zciStatus"
+              placeholder="费用状态"
+              clearable
+              size="small"
+              style="width: 215px">
+                  <el-option
+                  v-for="dict in zciStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                  ></el-option>
+          </el-select>
+      </el-form-item>
+        <el-form-item label="发票状态" prop="zciInvoiceStatus">
+            <el-select v-model="queryParams.zciInvoiceStatus"
+                placeholder="发票状态"
+                clearable
+                size="small"
+                style="width: 215px">
+                    <el-option
+                    v-for="dict in zciInvoiceStatusOptions"
+                    :key="dict.dictValue"
+                    :label="dict.dictLabel"
+                    :value="dict.dictValue"
+                    ></el-option>
+            </el-select>
+        </el-form-item>
+        <el-form-item label="创建时间">
+          <el-date-picker v-model="dateRange" size="small" style="width: 225px" 
+          value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="开始日期" 
+          end-placeholder="结束日期"></el-date-picker>
+      </el-form-item>
+    </el-form>
+    </el-card>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['service:cost:export']"
+        >导出</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table v-loading="loading" :data="costList" stripe border>
+      <el-table-column label="序号" type="index" width="55" align="center" />
+      <el-table-column label="融资编号" align="center" prop="zfrNumber" v-if="uncheckList.zfiNumber" />
+      <el-table-column label="开立企业" align="center" prop="coreScyName" v-if="uncheckList.coreScyName" show-overflow-tooltip />
+      <el-table-column label="融资产品" align="center" prop="zfpName" v-if="uncheckList.zfpName" show-overflow-tooltip />
+      <el-table-column label="融资金额" align="center" prop="zfrAmount" v-if="uncheckList.zfrAmount" show-overflow-tooltip />
+      <el-table-column label="融资状态" align="center" prop="zfrStatus" :formatter="zfrStatusFormat" v-if="uncheckList.zfrStatus" show-overflow-tooltip />
+      <el-table-column label="费用状态" align="center" prop="zciStatus" :formatter="zciStatusFormat" v-if="uncheckList.zciStatus" show-overflow-tooltip />
+      <el-table-column label="创建时间" align="center" prop="createTime" v-if="uncheckList.createTime" show-overflow-tooltip />
+      <el-table-column label="手续费" align="center" prop="zciAmount" v-if="uncheckList.zciAmount " show-overflow-tooltip />
+      <el-table-column label="发票状态" align="center" prop="zciInvoiceStatus" :formatter="zciInvoiceStatusFormat" v-if="uncheckList.zciInvoiceStatus" show-overflow-tooltip />
+      <el-table-column label="快递单号" align="center" prop="zciExpressNo" v-if="uncheckList.zciExpressNo" show-overflow-tooltip />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.zciInvoiceStatus == '2' || scope.row.zciInvoiceStatus == '4'"
+            size="mini"
+            type="text"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['service:cost:update']"
+          >发票</el-button>
+          <el-button
+            v-if="scope.row.zciInvoiceStatus == '0' && scope.row.zciStatus == '02'"
+            size="mini"
+            type="text"
+            @click="handleApply(scope.row)"
+            v-hasPermi="['service:cost:update']"
+          >申请开票</el-button>
+        </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="800px" append-to-body>
+      <el-form ref="form" :model="form" label-width="140px" :inline="true">
+        <el-form-item label="企业名称" prop="scyName">
+          <el-input v-model="form.scyName" disabled />
+        </el-form-item>
+        <el-form-item label="企业统一代码" prop="scySocialCode">
+          <el-input v-model="form.scySocialCode" disabled />
+        </el-form-item>
+        <el-form-item label="企业注册电话" prop="scyPhone">
+          <el-input v-model="form.scyPhone" disabled />
+        </el-form-item>
+        <el-form-item label="收件人" prop="ziaContacts">
+          <el-input v-model="form.ziaContacts"  disabled />
+        </el-form-item>
+        <el-form-item label="收件人电话" prop="ziaContactsPhone">
+          <el-input v-model="form.ziaContactsPhone" disabled />
+        </el-form-item>
+        <el-form-item label="邮寄地址" prop="ziaAddress">
+          <el-input v-model="form.ziaAddress" disabled />
+        </el-form-item>
+        <el-form-item label="快递单号" prop="zciExpressNo">
+          <el-input v-model="form.zciExpressNo" disabled/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 申请开票框 -->
+    <el-dialog :title="titleApply" :visible.sync="openApply" width="800px" append-to-body>
+      <el-form ref="formApply" :model="formApply" :rules="rulesApply" label-width="140px" :inline="true">
+        <el-form-item label="企业名称" prop="scyName">
+          <el-input v-model="formApply.scyName" disabled />
+        </el-form-item>
+        <el-form-item label="企业统一代码" prop="scySocialCode">
+          <el-input v-model="formApply.scySocialCode" disabled />
+        </el-form-item>
+        <el-form-item label="企业注册电话" prop="scyPhone">
+          <el-input v-model="formApply.scyPhone" disabled />
+        </el-form-item>
+        <el-form-item label="收件人" prop="ziaContacts">
+          <el-input v-model="formApply.ziaContacts" placeholder="请输入收件人" maxlength="20" show-word-limit />
+        </el-form-item>
+        <el-form-item label="收件人电话" prop="ziaContactsPhone">
+          <el-input v-model="formApply.ziaContactsPhone" placeholder="请输入收件人电话" maxlength="11" show-word-limit />
+        </el-form-item>
+        <el-form-item label="邮寄地址" prop="ziaAddress">
+          <el-input v-model="formApply.ziaAddress" placeholder="请输入邮寄地址" maxlength="30" show-word-limit />
+        </el-form-item>
+      </el-form>
+      <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 { listCost, listInvoice, selectInvoiceList, applyInvoice, invoicing, daleteInvoice, getUser } from "@/api/service/cost/costManage";
+import { uploadFileNew } from "@/api/common/file";
+import { getToken } from "@/utils/auth";
+import {columnQuery,columnfilter} from "@/api/common/columnSetting";
+import ColumnSetting from '../../../components/Table/columnSetting.vue';
+export default {
+  name: "userCostManage",
+  components: {
+     ColumnSetting 
+   },
+  data() {
+    return {
+      //费用列表
+      costList:[],
+      //创建时间范围
+      dateRange: [],
+      //费用状态
+      zciStatusOptions:[],
+      //发票状态
+      zciInvoiceStatusOptions:[],
+      //融资状态 
+      zfrStatusOptions:[],
+      //操作员Id
+      userId : "",
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      // 弹出层标题
+      title: "",
+      openInvoiceTitle:"",
+      titleApply:"",
+      total: 0,
+      // 是否显示弹出层
+      open: false,
+      openInvoice:false,
+      openApply:false,
+      // 链属查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        zfiNumber: null,
+        zciStatus: null,
+        zfrStatus:null,
+        zciInvoiceStatus: null
+      },
+      //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
+      tableList: [
+        {
+              label: 'zfiNumber',
+              value: '融资编号'
+            },
+            {
+              label: 'supScyName',
+              value: '融资企业'
+            },
+            {
+              label: 'coreScyName',
+              value: '开立企业'
+            },
+            {
+              label: 'zfpName',
+              value: '融资产品'
+            },
+            {
+              label: 'zfrAmount',
+              value: '融资金额'
+            },
+            {
+              label: 'zciStatus',
+              value: '费用状态'
+            },
+            {
+              label: 'zfrStatus',
+              value: '融资状态'
+            },
+            {
+              label: 'createTime',
+              value: '创建时间'
+            },
+            {
+              label: 'zciAmount',
+              value: '手续费'
+            },
+            {
+              label: 'zciInvoiceStatus',
+              value: '发票状态'
+            },
+            {
+              label: 'zciExpressNo',
+              value: '快递单号'
+            },
+            ],
+      checkList: [],//筛选列选中的数据列表--显示隐藏列用
+      uncheckList: {},//控制筛选列显示隐藏--显示隐藏列用
+      selfDom : this,
+      tableId:"/sc-service/cost/list",
+      // 表单参数
+      form: {
+        zciId:null,
+        scyId:null,
+        scyName:null,
+        scySocialCode:null,
+        scyPhone:null,
+        ziaContacts:null,
+        ziaContactsPhone:null,
+        ziaAddress:null,
+        zciExpressNo:null,
+        zciInvoiceStatus:null
+      },
+      formApply:{
+        zciId:null,
+        scyId:null,
+        scyName:null,
+        scySocialCode:null,
+        scyPhone:null,
+        ziaContacts:null,
+        ziaContactsPhone:null,
+        ziaAddress:null,
+        zciExpressNo:null,
+        zciInvoiceStatus:null
+      },
+      // 表单校验
+      rulesApply: {
+        ziaContacts: [
+          { required: true, message: "收件人不能为空", trigger: "blur" },
+        ],
+        ziaContactsPhone: [
+          { required: true, message: "收件人电话不能为空", trigger: "blur" },
+          {
+            pattern: /^((\d{3}-\d{7,8}|\d{4}-\d{7,8})|(1[3465789]\d{9}))$/,
+            message: "电话格式不正确",
+            trigger: "blur",
+          }
+        ],
+        ziaAddress: [
+          { required: true, message: "邮寄地址不能为空", trigger: "blur" },
+        ]
+      },
+    };
+  },
+  created() {
+    this.getDicts("ser_zci_status").then(response => {
+      this.zciStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zci_invoice_status").then(response => {
+      this.zciInvoiceStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zfr_status").then(response => {
+      this.zfrStatusOptions = response.data;
+    });
+    this.getList();
+    this.getUser();
+  },
+  activated() {
+    this.getDicts("ser_zci_status").then(response => {
+      this.zciStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zci_invoice_status").then(response => {
+      this.zciInvoiceStatusOptions = response.data;
+    });
+    this.getDicts("	ser_zfr_status").then(response => {
+      this.zfrStatusOptions = response.data;
+    });
+    this.getList();
+    this.getUser();
+  },
+  mounted() {
+    this.columnQuery();
+  },
+  methods: {
+    //获取当前客户是否之前设置过列展示隐藏
+    columnQuery(){
+        //获取页面路径
+        var psfPagePath = window.location.pathname;
+        //用请求后台的url作为唯一标识
+        var psfTableName = this.tableId;
+        var columnForm = {};
+        columnForm.psfPagePath = psfPagePath;
+        columnForm.psfTableName = psfTableName;
+        columnQuery(columnForm).then(response => {
+         if(response.data && response.data.psfShowData){
+                this.checkList = response.data.psfShowData;
+         }
+         this.filter();
+      })
+    },
+    //控制隐藏显示的函数
+    filter(checkList) {
+      if (!!checkList) {
+        this.checkList = checkList;
+      }
+      columnfilter(this.selfDom);
+    },
+
+    //菜单状态字典翻译
+    zciStatusFormat(row, column) {
+      return this.selectDictLabel(this.zciStatusOptions, row.zciStatus);
+    },
+    zciInvoiceStatusFormat(row, column) {
+      return this.selectDictLabel(this.zciInvoiceStatusOptions, row.zciInvoiceStatus);
+    },
+    zfrStatusFormat(row, column) {
+      return this.selectDictLabel(this.zfrStatusOptions, row.zfrStatus);
+    },
+    /** 查询链属列表 */
+    getList() {
+      this.loading = true;
+       listCost(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+          this.costList = response.data.records;
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.dateRange = [];
+      this.handleQuery();
+    },
+    /** 发票按钮操作 */
+    handleUpdate(row) {
+      const zciId  = row.zciId || this.ids;
+      const scyId = row.zfiSupplierId || this.ids;
+      listInvoice(scyId,zciId).then(response => {
+        this.form = response.data[0];
+        this.form.zciId  = zciId;
+      });
+      this.open = true;
+      this.title = "发票信息";
+    },
+
+    /** 发票按钮操作 */
+    handleApply(row) {
+      const zciId  = row.zciId || this.ids;
+      const scyId = row.zfiSupplierId || this.ids;
+      listInvoice(scyId,zciId).then(response => {
+        this.formApply = response.data[0];
+        this.formApply.zciId  = zciId;
+      });
+      this.openApply = true;
+      this.titleApply = "申请开票信息";
+    },
+      
+  /** 提交按钮 */
+  submitForm() {
+      var self = this;
+      this.$refs["formApply"].validate(valid => {
+        let fd = new FormData();
+        for(var key in self.formApply){
+          fd.append(key, self.formApply[key]);
+        }
+        if (valid) {
+          if (this.formApply.scyId != null) {
+            const loading = this.$loading({
+              lock: true,
+              text: "Loading",
+              spinner: "el-icon-loading",
+              background: "rgba(0, 0, 0, 0.7)",
+            })
+            applyInvoice(self.formApply).then(response => {
+              this.msgSuccess("申请成功");
+              this.openApply = false;
+              this.getList();
+            });
+            loading.close();
+          }
+        }
+      });
+    },
+
+    
+    /** 导出按钮操作 */
+    handleExport() {
+      this.getList();
+      const loading = this.$loading({
+        lock: true,
+        text: 'Loading',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      this.download('/sc-service/cost/export', {
+        ...this.queryParams, ...this.dateRange
+      },'费用信息.xlsx')
+      setTimeout(() => {
+            loading.close();
+          }, 2000);
+    },
+
+    //获取操作员Id
+    getUser(){
+      getUser().then(response => {
+          this.userId = response.data;
+        })
+    }
+  }
+};
+</script>

+ 66 - 63
front-vue/src/views/service/rel/companyRel.vue

@@ -122,11 +122,13 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
         <template slot-scope="scope">
           <el-button
+            v-if="scope.row.launch && scope.row.launchScrReceiveType == '00' && scope.row.launchScrStatus =='01'"
+            v-else="scope.row.launchScrLaunchType == '00' && scope.row.launchScrStatus =='01'"
             size="mini"
             type="text"
             @click="handleDelete(scope.row)"
             v-hasPermi="['service:rel:delete']"
-          >删除</el-button>
+          >解绑</el-button>
           <el-button
             v-if="scope.row.launch && scope.row.launchScrReceiveType == '00' && scope.row.launchScrStatus =='00'"
             v-else="scope.row.launchScrLaunchType == '00' && scope.row.launchScrStatus =='00'"
@@ -240,20 +242,19 @@
       <el-table-column label="状态" align="center" width="80" prop="scpStatus" :formatter="scpStatusFormat" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
         <template slot-scope="scope">
-          <!-- <el-button
+          <el-button
+            v-if="scope.row.scpInvite == '1'"
             size="mini"
             type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['system:company:edit']"
-          >重邀</el-button> -->
+            @click="handleInvite(scope.row)"
+            v-hasPermi="['service:spare:update']"
+          >重邀</el-button>
           <el-button
             size="mini"
             type="text"
-            icon="el-icon-delete"
             @click="handleSpareDelete(scope.row)"
             v-hasPermi="['service:spare:removeSpare']"
-          >删除</el-button>
+          >解绑</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -288,26 +289,6 @@
             </el-select>
         </el-form-item>
         <el-form-item label="企业名称" prop="scyName">
-            <!-- <el-select
-                v-model="form.scyName"
-                filterable
-                remote
-                clearable
-                allow-create
-                reserve-keyword
-                @clear="clearBoth"
-                placeholder="请选择企业名称"
-                :remote-method="getCompanyList"
-                @change="choice"
-                >
-                <el-option
-                    v-for="(item,index) in companyList"
-                    :key="index"
-                    :label="item.scyName"
-                    :value="item.scyName"
-                    >
-                </el-option>
-            </el-select> -->
             <el-select
               v-model="form.scyName"
               filterable
@@ -415,7 +396,7 @@
 <script>
 import { 
   listRel, sparelist, listCompany, addRel, updateRel, listAllCompany, 
-  delRel, removeSpare, listCompanyQuery, getUser
+  delRel, removeSpare, listCompanyQuery, getUser, againInvite
 } from "@/api/service/rel/companyRel";
 import { uploadFileNew } from "@/api/common/file";
 import { getToken } from "@/utils/auth";
@@ -889,30 +870,30 @@ export default {
     },
       
     /** 提交按钮 */
-    submitForm() {
-        var self = this;
-        this.$refs["form"].validate(valid => {
-          let fd = new FormData();
-          for(var key in self.form){
-            fd.append(key, self.form[key]);
+submitForm() {
+    var self = this;
+    this.$refs["form"].validate(valid => {
+      let fd = new FormData();
+      for(var key in self.form){
+        fd.append(key, self.form[key]);
+      }
+      if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: "Loading",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)",
+          })
+          addRel(self.form).then(response => {
+            this.msgSuccess("新增成功");
+            this.open = false;
+            this.getList();
+            this.getSpare();
+          });
+          loading.close();
           }
-          if (valid) {
-              const loading = this.$loading({
-                lock: true,
-                text: "Loading",
-                spinner: "el-icon-loading",
-                background: "rgba(0, 0, 0, 0.7)",
-              })
-              addRel(self.form).then(response => {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-                this.getSpare();
-              });
-              loading.close();
-              }
-            });
-          },
+        });
+      },
     /* 同意链属 */
     handleSuccess(row){
       const launchScrId = row.launchScrId || this.ids;
@@ -1002,12 +983,12 @@ export default {
         }); 
       }
     },
-    /** 删除按钮操作 */
+    /** 解绑按钮操作 */
     handleDelete(row) {
       const launchScrId = row.launchScrId || this.ids;
       if (row.launchCompanyId == this.loginId) {
         const scyName = row.receiveScyName;
-      this.$confirm('是否确认删除与"' + scyName + '"的链属关系?', "警告", {
+      this.$confirm('是否确认解绑与"' + scyName + '"的链属关系?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -1015,18 +996,18 @@ export default {
           return delRel(launchScrId);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.msgSuccess("解绑成功");
         })
         .catch(() => {
           this.$message({
             type: "warning",
-            message: "已取消删除",
+            message: "已取消解绑",
            
           });
         });
         }else if(row.launchReceiveScrCompanyId == this.loginId){
           const scyName = row.launchScyName;
-          this.$confirm('是否确认删除与"' + scyName + '"的链属关系?', "警告", {
+          this.$confirm('是否确认解绑与"' + scyName + '"的链属关系?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -1034,22 +1015,22 @@ export default {
           return delRel(launchScrId);
         }).then(() => {
           this.getList();
-          this.msgSuccess("删除成功");
+          this.msgSuccess("解绑成功");
         })
         .catch(() => {
           this.$message({
             type: "warning",
-            message: "已取消删除",
+            message: "已取消解绑",
            
           });
         });
         } 
     },
-    /* 删除链属企业信息数据 */
+    /* 解绑链属企业信息数据 */
     handleSpareDelete(row) {
       const scpId = row.scpId || this.ids;
       const scpName = row.scpName;
-      this.$confirm('是否确认删除"' + scpName + '"的信息?', "警告", {
+      this.$confirm('是否确认解绑"' + scpName + '"的信息?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
@@ -1057,16 +1038,38 @@ export default {
           return removeSpare(scpId);
         }).then(() => {
           this.getSpare();
-          this.msgSuccess("删除成功");
+          this.msgSuccess("解绑成功");
         })
         .catch(() => {
           this.$message({
             type: "warning",
-            message: "已取消删除",
+            message: "已取消解绑",
            
           });
         }); 
     },
+
+    //重邀操作
+    handleInvite(row){
+      const loading = this.$loading({
+            lock: true,
+            text: "Loading",
+            spinner: "el-icon-loading",
+            background: "rgba(0, 0, 0, 0.7)",
+          })
+      againInvite(row).then(response => {
+            this.getList();
+            this.getSpare();
+        }).then(() => {
+          this.getList();
+          this.getSpare();
+          this.msgSuccess("重邀成功");
+          loading.close();
+        }).catch((e) => {
+          loading.close();
+      });
+    },
+
     //获取操作员Id
     getUser(){
       getUser().then(response => {