|
@@ -0,0 +1,424 @@
|
|
|
+//备用金
|
|
|
+<template>
|
|
|
+ <div class="container">
|
|
|
+ <el-row class="row_top">
|
|
|
+ <el-col :span="12">
|
|
|
+ <h2 class="bg-left title">备用金</h2>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12" class="bg-right">
|
|
|
+ <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
|
|
|
+ style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
|
|
|
+ </el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="center">
|
|
|
+ <el-row style="margin-bottom: 10px">
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-date-picker value-format="yyyy-MM-dd" v-model="value" type="daterange" align="right" unlink-panels
|
|
|
+ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions"
|
|
|
+ class="data_css" @change="changeDate">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="18">
|
|
|
+ <div class="datascreen">
|
|
|
+ <el-input style="width: 255px;" class="options_css" v-model="searchKeyWord" placeholder="可按编号进行查找" clearable maxlength="500" type="input"
|
|
|
+ @keyup.enter.native="find()"></el-input>
|
|
|
+ <el-select v-model="agent" multiple filterable allow-create default-first-option placeholder="按经办人筛选"
|
|
|
+ clearable @change="getList1" class="options_css">
|
|
|
+ <el-option v-for="item in personList" :key="item.id" :label="item.agent" :value="item.agent">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px"
|
|
|
+ src="../../../public/img/sousuo.png" alt="" /></el-button>
|
|
|
+ <el-button style="text-align: right;" type="primary" @click="pettyCash()">备用金账户</el-button>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="fromdata">
|
|
|
+ <el-table :data="tableData" stripe style="width: 100%">
|
|
|
+ <el-table-column type="index" label="序号">
|
|
|
+ <template scope="scope">
|
|
|
+ <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
|
+ <span v-else>{{ scope.$index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="costNo" label="编号" width="180px">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="feeType" label="类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.expensesType == 1">收入</div>
|
|
|
+ <div v-if="scope.row.expensesType == 2">支出</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="purpose" label="用途" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.expensesPurpose == 7">备用金</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="purpose" label="流向" width="100px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if="scope.row.expensesPurpose == 7 ">中天昊元</div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="expenseName" label="费用名称"></el-table-column>
|
|
|
+ <el-table-column prop="amountMoney" width="120" label="费用金额(元)"></el-table-column>
|
|
|
+ <el-table-column prop="expenseRemarks" label="附件">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
|
|
|
+ src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
|
|
|
+ <span v-if="scope.row.addressUrlArray != null">
|
|
|
+ {{
|
|
|
+ scope.row.addressUrlArray.length == 0
|
|
|
+ ? ''
|
|
|
+ : scope.row.addressUrlArray.length
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="creater" label="发起人"></el-table-column>
|
|
|
+ <el-table-column prop="createDate" label="发起日期" width="150"></el-table-column>
|
|
|
+ <el-table-column prop="status" label="费用状态" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if="scope.row.approveStatus">{{
|
|
|
+ scope.row.approveStatus
|
|
|
+ }}</span><span v-else>{{ scope.row.status }}</span>
|
|
|
+ <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ style="text-align: center" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="deptBudgetTotal">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <el-dialog width="50%" :visible.sync="dialogVisible1" :title="title1">
|
|
|
+ <div style="padding: 20px" v-for="(item, index) in recordList" :style="{
|
|
|
+ 'border-bottom':
|
|
|
+ index != recordList.length - 1 ? '1px solid #ccc' : 'none',
|
|
|
+ }" :key="index">
|
|
|
+ <div style="width: 100%; justify-content: space-between" class="flex">
|
|
|
+ <div style="width: 33.333%; text-align: left">
|
|
|
+ {{ item.operateUser }}
|
|
|
+ </div>
|
|
|
+ <div style="width: 33.333%; text-align: center">
|
|
|
+ {{
|
|
|
+ statusdata.expensesType != 1
|
|
|
+ ? item.approveResult == 1
|
|
|
+ ? '通过'
|
|
|
+ : item.approveResult == 0 ? '驳回' : item.dealMsg
|
|
|
+ : item.dealMsg
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ <div style="width: 33.333%; text-align: right">
|
|
|
+ {{ item.operateDate }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="index < recordList.length - 1" style="width: 100%; text-align: left">
|
|
|
+ 审核意见:{{item.verifyRemark?item.verifyRemark.split('##')[0]:""}}
|
|
|
+ </div>
|
|
|
+ <div v-else style="width: 100%; text-align: left">
|
|
|
+ 审核意见:{{item.verifyRemark?item.verifyRemark.split('##')[0]:""}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <WinseaContentModal v-model="fujianshow" :title="title" @on-cancel="handleClose">
|
|
|
+ <ws-upload ref="upload" @onChange="onChange1" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx"
|
|
|
+ :comp-id="compId" :appendix-ids="appendixIdss" :size-limit="size" />
|
|
|
+ </WinseaContentModal>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import WsUpload from '@/components/WsUpload'
|
|
|
+import {
|
|
|
+ pettCashList,
|
|
|
+ getAuditRecord,
|
|
|
+ getXialaList,
|
|
|
+} from '@/model/profitable/index'
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ WsUpload,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ value: '',
|
|
|
+ tableData: [],
|
|
|
+ tableData1: [],
|
|
|
+ deptBudgetTotal: 0,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ showFlag: false,
|
|
|
+ size: 100,
|
|
|
+ expensesPurpose: '',
|
|
|
+ recordList: [],
|
|
|
+ dialogVisible: false,
|
|
|
+ toExamineType: '',
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ dialogVisible1: false,
|
|
|
+ deptCircularPage: {},
|
|
|
+ searchType: '',
|
|
|
+ searchKeyWord: '',
|
|
|
+ expenseName: '',//费用名称
|
|
|
+ costNo: [],//编号
|
|
|
+ purpose: [],//用途
|
|
|
+ // flowTo: [],//流向
|
|
|
+ unallocatedAmount:'',//未分配金额(元)
|
|
|
+ agent: [],//经办人
|
|
|
+ startDate: '',
|
|
|
+ endDate: '',
|
|
|
+ title: '附件',
|
|
|
+ title1: '',
|
|
|
+ outtotal: 0,
|
|
|
+ intotal: 0,
|
|
|
+ fujianshow: false,
|
|
|
+ statusdata: {},
|
|
|
+ appendixIdss: [],
|
|
|
+ appendixIdss1: '',
|
|
|
+ approveStatus: false,
|
|
|
+ currectdata: {},
|
|
|
+ addressUrl: '',
|
|
|
+ personList: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ this.getPassYearFormatDate()
|
|
|
+ this.getList()
|
|
|
+ this.xiala()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ xiala() {
|
|
|
+ //经办人
|
|
|
+ getXialaList({
|
|
|
+ removeRepeatFlag: 4,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.personList = response
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ getList1() {
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handlerecord(row) {
|
|
|
+ if (row.expensesType == 1) {
|
|
|
+ this.title1 = '收款审核记录'
|
|
|
+ } else {
|
|
|
+ this.title1 = '请款审核记录'
|
|
|
+ }
|
|
|
+ this.statusdata = row
|
|
|
+ getAuditRecord({ id: row.id, workflowId: row.workflowId })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.recordList = response
|
|
|
+ this.dialogVisible1 = true
|
|
|
+ })
|
|
|
+ .catch((response) => { })
|
|
|
+ },
|
|
|
+ returnsales() {
|
|
|
+ this.$router.go(-1)
|
|
|
+ },
|
|
|
+ handleClose() {
|
|
|
+ this.fujianshow = false
|
|
|
+ },
|
|
|
+ fujian(row) {
|
|
|
+ this.id = row.id
|
|
|
+
|
|
|
+ // if (row.addressUrl) {
|
|
|
+ this.appendixIdss = row.addressUrl
|
|
|
+ this.fujianshow = true
|
|
|
+ // } else {
|
|
|
+ // this.$message({
|
|
|
+ // message: '暂无附件查看!',
|
|
|
+ // type: 'warning',
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ pettyCash(){
|
|
|
+ this.$router.push({ name: 'pettyAccount' })
|
|
|
+ },
|
|
|
+ getPassYearFormatDate() {
|
|
|
+ if (!localStorage.getItem('startDate') && !localStorage.getItem('endDate')) {
|
|
|
+ var nowDate = new Date()
|
|
|
+ var _date = new Date()
|
|
|
+ nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
|
|
|
+ var year = nowDate.getFullYear()
|
|
|
+ var year1 = _date.getFullYear()
|
|
|
+ var month = nowDate.getMonth() + 1
|
|
|
+ var month1 = _date.getMonth() + 1
|
|
|
+ var strDate = nowDate.getDate()
|
|
|
+ var strDate1 = _date.getDate()
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
+ month = '0' + month
|
|
|
+ }
|
|
|
+ if (month1 >= 1 && month1 <= 9) {
|
|
|
+ month1 = '0' + month1
|
|
|
+ }
|
|
|
+
|
|
|
+ if (strDate >= 0 && strDate <= 9) {
|
|
|
+ strDate = '0' + strDate
|
|
|
+ }
|
|
|
+ if (strDate1 >= 0 && strDate1 <= 9) {
|
|
|
+ strDate1 = '0' + strDate1
|
|
|
+ }
|
|
|
+ this.startDate = year + '-' + month + '-' + strDate
|
|
|
+ this.endDate = year1 + '-' + month1 + '-' + strDate1
|
|
|
+ } else {
|
|
|
+ this.startDate = localStorage.getItem('startDate')
|
|
|
+ this.endDate = localStorage.getItem('endDate')
|
|
|
+ }
|
|
|
+ this.value = [this.startDate, this.endDate]
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ pettCashList({
|
|
|
+ compId: localStorage.getItem('ws-pf_compId'),
|
|
|
+ startDate: localStorage.getItem('startDate'),
|
|
|
+ endDate: localStorage.getItem('endDate'),
|
|
|
+ searchKeyWord: this.searchKeyWord,
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize: this.pageSize,
|
|
|
+ agent: this.agent.length > 0 ? this.agent.toString() : '',
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ if (response.records.length > 0) {
|
|
|
+ for (let i = 0; i < response.records.length; i++) {
|
|
|
+ if (response.records[i].addressUrl) {
|
|
|
+ response.records[i].addressUrlArray =
|
|
|
+ response.records[i].addressUrl.split(',')
|
|
|
+ }
|
|
|
+ if (response.records[i].agent == localStorage.getItem('ws-pf_staffName')) {
|
|
|
+ response.records[i].showFlag = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableData = response.records
|
|
|
+
|
|
|
+ if (this.tableData.length > 0) {
|
|
|
+ this.intotal =
|
|
|
+ Number(this.tableData[0].inContractMoney) +
|
|
|
+ Number(this.tableData[0].inWarehouseMoney) +
|
|
|
+ Number(this.tableData[0].inManageMoney)
|
|
|
+ this.outtotal =
|
|
|
+ Number(this.tableData[0].outContractMoney) +
|
|
|
+ Number(this.tableData[0].outWarehouseMoney) +
|
|
|
+ Number(this.tableData[0].outManageMoney)
|
|
|
+ }
|
|
|
+ this.deptBudgetTotal = response.total
|
|
|
+ })
|
|
|
+ },
|
|
|
+ changeDate() {
|
|
|
+ if (this.value) {
|
|
|
+ this.startDate = this.value[0]
|
|
|
+ this.endDate = this.value[1]
|
|
|
+ localStorage.setItem('startDate', this.startDate)
|
|
|
+ localStorage.setItem('endDate', this.endDate)
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ pickerOptions() { },
|
|
|
+ find() {
|
|
|
+ this.currentPage = 1
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.pageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ },
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.container {
|
|
|
+ background: #e8ecf6;
|
|
|
+}
|
|
|
+
|
|
|
+.center {
|
|
|
+ margin: 0 auto;
|
|
|
+ background: #ffffff;
|
|
|
+ // height: calc(100vh - 13vh);
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 20px 0;
|
|
|
+
|
|
|
+ /deep/.el-table td,
|
|
|
+ /deep/.el-table th {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.row_top {
|
|
|
+ background: #f6f7fc;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+
|
|
|
+ .bg-left {
|
|
|
+ padding-left: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-right {
|
|
|
+ padding-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.datascreen {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .data_css {
|
|
|
+ width: 40%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input_css {
|
|
|
+ width: 50%;
|
|
|
+ margin: 0 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .find {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.fromdata {
|
|
|
+ margin: 20px 0;
|
|
|
+ overflow-y: scroll;
|
|
|
+ height: 546px;
|
|
|
+}
|
|
|
+
|
|
|
+.top_info {
|
|
|
+ margin: 10px 0 0 10px;
|
|
|
+ min-width: 712px;
|
|
|
+
|
|
|
+ .info_css {
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.bg-right {
|
|
|
+ padding-top: 15px;
|
|
|
+}
|
|
|
+
|
|
|
+.options_css {
|
|
|
+ margin: 0 5px;
|
|
|
+}
|
|
|
+</style>
|