123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697 |
- <template>
- <el-dialog
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :title="dialogTitle"
- :visible.sync="dialogVisible"
- top="50px"
- width="75%"
- :before-close="beforeClose"
- >
- <div class="tabsdom">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="报支申请" name="first">
- <el-form
- ref="elformData"
- :model="form"
- class="cost_form"
- label-width="125px"
- style="width: 100%;padding: 5px"
- >
- <el-card shadow="always" style="padding: 15px 5px 5px 15px">
- <el-row :gutter="10">
- <el-col :span="24">
- <el-form-item label="关联项目">
- <el-input v-model="form.proMainName" readonly></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-card class="pdtopbottom16 mb25 pdtop16px">
- <span class="moneydetails">
- 费用明细
- </span>
- <el-row :gutter="10" class="eltype">
- <el-col :span="5" class="col-txt txtc"><span>费用类型</span></el-col>
- <el-col :span="5" class="col-txt txtc">
- 金额(元)
- </el-col>
- <el-col :span="4" class="col-txt txtc">发票号</el-col>
- <el-col :span="10" class="col-txt txtc">
- 单据
- </el-col>
- </el-row>
- <el-row
- v-for="(item,index) in form.applyUseMoneyDetailListString"
- :gutter="10" class="eltype"
- >
- <el-col :span="5">
- <el-select
- size="small"
- v-model="item.feeType"
- filterable
- placeholder="请选择"
- disabled
- style="width: 100%"
- >
- <el-option
- v-for="item in dc_data.BUDGET_FY"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-col>
- <el-col :span="5">
- <el-input
- size="small"
- v-model="item.feeMoney"
- filterable
- placeholder="请选择"
- readonly
- style="width: 100%"
- />
- </el-col>
- <el-col :span="4">
- <el-input
- readonly
- v-model="item.fileNumber"
- :controls="false"
- size="small"
- :disabled="item.fileList==0"
- controls-position="right"
- placeholder="无"
- style="width: 100%"
- />
- </el-col>
- <el-col :span="10" class="col-input">
- <el-upload
- disabled
- :action="$constant.BASE_URI+'/FileController/upload'"
- :file-list="item.fileList"
- :http-request="(params)=>{uploadFile(params,index)}"
- :limit="5"
- :multiple="false"
- :show-file-list="false"
- class="upload-demo"
- style="width: 30%;float: left;margin-left: 42px;display: block"
- >
- <el-button disabled size="small" style="font-size: 14px" type="text">
- 上传发票
- <img
- src="./fapiaoicon.png"
- style="margin-left: 5px;position: absolute;top: 13.5px;"
- width="24px"
- />
- </el-button>
- <!-- <div slot="file" slot-scope="{file}">-->
- <!-- <a :href="file.url">{{ file.name }}</a>-->
- <!-- <span class="el-upload-list__item-actions">-->
- <!-- <i class="el-icon-delete" @click="handlePictureRemove(index,file,item.fileList)"/>-->
- <!-- </span>-->
- <!-- </div>-->
- </el-upload>
- <el-radio-group
- v-model="item.fileType"
- disabled
- style="margin-left: 30px;"
- @input="changeFileType($event,index)"
- >
- <el-radio v-if="false" :label="1">上传发票</el-radio>
- <el-radio :label="2">发票后补</el-radio>
- <el-radio :label="3">无发票</el-radio>
- </el-radio-group>
- </el-col>
- <el-col :span="15"> </el-col>
- <el-col :span="9">
- <div v-for="(file,i) in item.fileList" v-if="item.fileList.length>0"
- style="margin: 0px 0px 0px 45px;"
- >
- <div>
- <a :href="file.url">{{ file.name }}</a>
- <span class="el-upload-list__item-actions">
- <!-- <i class="el-icon-delete" @click="handlePictureRemove(i,file,item.fileList)"/>-->
- </span>
- </div>
- </div>
- </el-col>
- </el-row>
- <div class="feeMoneyTotal">
- <div style="float: right">共计金额(元):{{ form.feeMoneyTotal }}</div>
- </div>
- </el-card>
- <el-row>
- <el-col :span="24">
- <el-form-item label="用途">
- <el-input
- v-model="form.useReasons"
- readonly
- type="textarea"
- />
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="收款单位(人)">
- <el-input v-model="form.payeeName" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="开户银行">
- <el-input v-model="form.bankName" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="银行账户" label-width="125px">
- <el-input v-model="form.bankAccountNum" placeholder="金额" readonly/>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="抄送">
- <el-input v-model="form.flowMainCcList" readonly/>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item
- label="发起人" prop="field119"
- >
- <el-input v-model="form.createdByString" readonly></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item
- label="发起时间"
- prop="field119"
- >
- <el-input v-model="form.createdAt" readonly></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-card v-if="zhidanStatus" style="margin-bottom: 10px;">
- <h3 style="margin:0">制单 </h3>
- <el-form
- ref="confirmForm"
- :model="confirmForm"
- class="cost_form"
- label-width="100px"
- style="width: 100%;padding: 5px"
- >
- <el-row :gutter="10">
- <el-col :span="24">
- <el-form-item label="支付方式" style="margin-bottom: 15px">
- <el-select :disabled="zffhStatus" v-model="confirmForm.payType">
- <el-option
- v-for="item in dc_data.PAY_TYPE"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="制单日期" style="margin-bottom: 0">
- <el-date-picker
- :readonly="zffhStatus"
- v-model="confirmForm.makeDate"
- placeholder="请填写制单日期"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd"
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="制单号" style="margin-bottom: 0">
- <el-input :readonly="zffhStatus" v-model="confirmForm.makeNum"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-card>
- <el-card v-if="zffhStatus" style="margin-bottom: 10px;">
- <h3 style="margin:0">支付复核 </h3>
- <el-form
- ref="confirmForm"
- :model="confirmForm"
- class="cost_form"
- label-width="100px"
- style="width: 100%;padding: 5px"
- >
- <el-row :gutter="10">
- <el-col :span="24">
- <el-form-item label="实际支付日期" style="margin-bottom: 15px">
- <el-date-picker
- v-model="confirmForm.payTime"
- placeholder="实际支付日期"
- style="width: 100%"
- type="date"
- value-format="yyyy-MM-dd"
- />
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="备注" style="margin-bottom: 0">
- <el-input v-model="confirmForm.payRemark" style="margin-top:10px" type="textarea"/>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-card>
- </el-card>
- </el-form>
- <h3>流程历史</h3>
- <el-card>
- <div class="tableDom">
- <el-table
- :data="tableData"
- :header-cell-style="{
- background:'#1890FF !important',
- color:'white'
- }"
- border
- style="width: 100%"
- >
- <el-table-column fixed label="序号" type="index" width="60"/>
- <el-table-column
- label="节点名称"
- prop="nodeName"
- width="180"
- />
- <el-table-column
- label="处理人"
- prop="auditUserName"
- width="180"
- />
- <el-table-column
- label="审核结果"
- prop="auditResultString"
- />
- <el-table-column
- label="审核意见"
- prop="auditContent"
- />
- <el-table-column
- label="发起/审核时间"
- prop="createdAt"
- >
- <template slot-scope="scope">
- {{ $common.transTime(scope.row.createdAt) }}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-card>
- <h3>处理</h3>
- <el-card shadow="always" style="padding: 0px 5px 5px 15px">
- <el-form
- ref="confirmForm"
- :model="confirmForm"
- class="cost_form"
- label-width="100px"
- style="width: 100%;padding: 5px"
- >
- <el-row :gutter="10">
- <el-col :span="24">
- <el-form-item label="处理结果" style="margin-bottom: 15px">
- <el-radio-group v-model="confirmForm.confirmResult">
- <el-radio :label="1">同意</el-radio>
- <el-radio v-if="argeeNoStatus" :label="2">退回发起人</el-radio>
- <el-radio v-if="argeeBackStatus" :label="3">退回上节点</el-radio>
- <!-- <el-radio :label="4">结束流程</el-radio>-->
- </el-radio-group>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="处理意见">
- <el-input v-model="confirmForm.confirmContent" style="margin-top:10px" type="textarea"/>
- <el-dropdown size="mini" split-button trigger="hover" type="primary">
- 常用语选择
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item
- v-for="item in dc_data.COMMON_PHRASES"
- @click.native="selectCommonPhrases(item.label)"
- >
- {{ item.label }}
- </el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="审核人抄送">
- <user-select
- :default-select="confirmList"
- :multiple="true"
- class="cclist"
- @selectValue="parentMethod"
- />
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-card>
- </el-tab-pane>
- <el-tab-pane label="流程图 " name="second">
- <cost-canvas v-if="canVasStatus" ref="costCanvas"/>
- </el-tab-pane>
- </el-tabs>
- </div>
- <div slot="footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="confirmSubmit()">确 定</el-button>
- </div>
- </el-dialog>
- </template>
- <script>
- import { upload } from '@/static/utils/channel'
- import Base from '@/views/base/base'
- import BaseData from '@/views/base/baseData'
- import UserSelect from '@/views/components/UserSelect'
- import costCanvas from '@/views/workflow/components/myProcess/costCanvas.vue'
- export default {
- name: 'ApplyPay',
- mixins: [Base, BaseData],
- components: {
- upload, UserSelect, costCanvas
- },
- data() {
- return {
- row: {},
- canVasStatus: false,
- zffhStatus: false,
- zhidanStatus: false,
- confirmForm: {
- confirmContent: '',
- confirmResult: 1
- },
- confirmList: [],
- selectList: [],
- tableData: [],
- loading: false,
- dc_key: ['ORDER_STATUS', 'PAY_TYPE', 'BUDGET_FY', 'COMMON_PHRASES'],
- argeeBackStatus: false,
- argeeNoStatus: false,
- ProjectData: [],
- dialogTitle: '费用报支申请-审核',
- dialogVisible: false,
- form: {
- applyUseMoneyDetailListString: [],
- feeMoneyTotal: 0
- },
- activeName: 'first'
- }
- },
- mounted() {
- const _this = this
- _this.initDict(this.dc_key).then((res) => {
- })
- },
- methods: {
- handleClick(tab, event) {
- this.canVasStatus = false
- console.log(this.activeName)
- if (this.activeName == 'second') {
- this.canVasStatus = true
- debugger
- this.$nextTick(() => {
- this.$refs.costCanvas.createNodeCanvas(this.row)
- })
- }
- },
- beforeClose() {
- this.canVasStatus = false
- this.form = {
- applyUseMoneyDetailListString: []
- }
- this.dialogVisible = false
- this.activeName = 'first'
- this.$forceUpdate()
- },
- selectCommonPhrases(e) {
- if (!this.confirmForm.confirmContent) this.confirmForm.confirmContent = ''
- this.confirmForm.confirmContent += e
- },
- getFeeMoneyTotal() {
- let feeMoneyTotal = 0
- for (let i = 0; i < this.form.applyUseMoneyDetailListString.length; i++) {
- feeMoneyTotal += this.form.applyUseMoneyDetailListString[i].feeMoney
- }
- this.form.feeMoneyTotal = feeMoneyTotal
- },
- changeFileType(e, i) {
- if (e != 1) {
- this.form.applyUseMoneyDetailListString[i].fileList = []
- }
- this.$forceUpdate()
- },
- parentMethod(val) {
- if (val.length > 0) {
- this.confirmForm.ccList = val.join(',')
- }
- },
- handlePictureRemove(i, file, fileList) {
- fileList.splice(i, 1)
- let copyFileList = [...fileList]
- fileList = copyFileList
- this.form.applyUseMoneyDetailListString = this.form.applyUseMoneyDetailListString.map((e) => {
- return e
- })
- },
- uploadFile(params, i) {
- upload(params, true).then((res) => {
- this.form.applyUseMoneyDetailListString[i].fileList.push(res)
- this.form.applyUseMoneyDetailListString[i].fileType = 1
- this.$message.success('上传成功')
- })
- },
- baseRequest1(prefix, opUrl, postData) {
- return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
- },
- async confirmSubmit() {
- console.log(this.confirmForm)
- for (let i = 0; i < this.form.applyUseMoneyDetailListString.length; i++) {
- if (this.form.applyUseMoneyDetailListString[i].fileType == 1
- &&
- (!this.form.applyUseMoneyDetailListString[i].fileList
- ||
- this.form.applyUseMoneyDetailListString[i].fileList.length == 0)) {
- this.$message.warning(`请上传费用明细中第${i + 1}行的发票文件`)
- return
- }
- }
- const { data } = await this.baseRequest1(
- 'ApplyUseMoneyController',
- 'AddConfirmResultUseMoney',
- { ...this.confirmForm, applyUseMoneyDetailListString: JSON.stringify(this.form.applyUseMoneyDetailListString) })
- if (data.code == 200) {
- this.$message.success('处理成功')
- this.form = {}
- this.confirmForm = { confirmContent: '' }
- this.dialogVisible = false
- this.$emit('getData')
- }
- },
- async setVisible(status, row) {
- this.loading = false
- this.row = row
- this.activeName = 'first'
- const { data: data } = await this.baseRequest1('ApplyUseMoneyController', 'getInfoByFlowMainPushId', { flowMainPushId: row.flowMainPushId })
- this.zffhStatus = data.pushUserKey.indexOf('flow_zffh') != -1 ? true : false
- this.zhidanStatus = (data.pushUserKey.indexOf('flow_cnzf') != -1 ? true : false) || this.zffhStatus
- const { data: flowHistroy } = await this.baseRequest1('FlowMainController', 'getFlowHistroyByFlowMainId', { flowMainId: row.id })
- const noAndbackstatus = await this.baseRequest1('FlowMainController', 'getOutgoingFlowsByFlowMainPushId', { flowMainPushId: row.flowMainPushId })
- for (let i = 0; i < noAndbackstatus.data.length; i++) {
- if (noAndbackstatus.data[i].conditionExpression == '${agree==\'no\'}') this.argeeNoStatus = true
- if (noAndbackstatus.data[i].conditionExpression == '${agree==\'back\'}') this.argeeBackStatus = true
- }
- this.confirmForm.flowMainPushId = row.flowMainPushId
- this.tableData = flowHistroy
- this.form = data
- this.form.confirmResult = 1
- if (data.makeNum) this.confirmForm.makeNum = data.makeNum
- if (data.makeDate) this.confirmForm.makeDate = this.$common.transDate(data.makeDate)
- if (data.payType) this.confirmForm.payType = data.payType
- this.form.createdAt = this.form.createdAt ? this.$common.transDate(data.createdAt) : null
- this.form.applyUseMoneyDetailListString = data.applyUseMoneyDetailList
- for (const e of this.form.applyUseMoneyDetailListString) {
- // e.fileList = e.fileDataIds.split(',')
- if (e.fileDataIds && e.fileDataIds.length > 0) {
- const { data: fileTaoTaoList } = await this.baseRequest1('FileZtController', 'findFileInfoByIds/' + e.fileDataIds, '')
- e.fileList = fileTaoTaoList.data.map((file) => {
- console.log(file)
- return {
- url: this.$constant.BASE_URI + '/FileController/download/' + file.id,
- name: file.fileName,
- data: e.id,
- uid: new Date().getTime()
- }
- })
- } else {
- e.fileList = []
- }
- }
- if (data.flowMainCcList) {
- this.form.flowMainCcList = data.flowMainCcList.map((e) => {
- return (e.name)
- }).join()
- }
- if (data.applyUseMoneyDetailList) {
- this.form.applyUseMoneyDetailListString = data.applyUseMoneyDetailList
- }
- console.log(this.form.applyUseMoneyDetailListString)
- this.dialogVisible = status
- },
- addListRow() {
- const _this = this
- _this.form.applyUseMoneyDetailListString.push({ type: '1', fileList: [] })
- },
- deleteRow(index) {
- this.form.applyUseMoneyDetailListString.splice(index, 1)
- }
- }
- }
- </script>
- <style lang="scss">
- .mb25 {
- margin-bottom: 25px;
- }
- .pdtopbottom16 {
- padding: 0px 16px;
- }
- .pdtop16px {
- padding-top: 16px;
- }
- .cost_form {
- .col-input {
- font-weight: 400;
- }
- .el-form-item__label {
- text-align: right;
- font-size: 16px;
- font-family: 微软雅黑;
- padding-right: 10px;
- line-height: 40px;
- word-break: keep-all;
- white-space: nowrap;
- color: #606266;
- text-rendering: optimizeLegibility;
- font-weight: 400;
- }
- }
- .txtc {
- text-align: center
- }
- .ml5 {
- margin-left: 5px;
- }
- .eltype {
- margin-bottom: 5px;
- }
- .moneydetails {
- text-align: right;
- font-size: 16px;
- font-family: 微软雅黑;
- padding-right: 10px;
- word-break: keep-all;
- white-space: nowrap;
- color: #606266;
- text-rendering: optimizeLegibility;
- font-weight: 400;
- }
- .moneydetails:before {
- content: "*";
- color: #ff4949;
- }
- .tabsdom {
- .el-tabs__header {
- text-align: center !important;
- width: 139px !important;
- text-align: center !important;
- display: block !important;
- margin: auto !important;
- margin-bottom: 15px !important;
- }
- .el-tabs__nav-wrap::after {
- display: none;
- }
- .el-upload {
- width: 100%;
- }
- }
- .feeMoneyTotal {
- width: 100%;
- height: 14px;
- font-size: 14px;
- font-weight: 400;
- color: #1890FF;
- margin-top: 31px;
- margin-bottom: 13px;
- }
- </style>
|