123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594 |
- <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="4" class="col-txt txtc"><span>费用类型</span></el-col>
- <el-col :span="4" class="col-txt txtc">
- 金额(元)
- </el-col>
- <el-col :span="4" class="col-txt txtc">发票号</el-col>
- <el-col :span="12" class="col-txt txtc">
- 单据
- </el-col>
- </el-row>
- <el-row
- v-for="(item,index) in form.applyUseMoneyDetailListString"
- :gutter="10" class="eltype"
- >
- <el-col :span="4">
- <el-select
- size="small"
- v-model="item.feeType"
- disabled
- filterable placeholder="请选择"
- 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="4">
- <el-input
- v-model="item.feeMoney"
- filterable
- size="small"
- placeholder="请选择"
- readonly
- style="width: 100%"
- />
- </el-col>
- <el-col :span="4">
- <el-input
- v-model="item.fileNumber"
- :controls="false"
- size="small"
- readonly
- :disabled="item.fileList==0"
- controls-position="right"
- placeholder="无"
- style="width: 100%"
- />
- </el-col>
- <el-col :span="12" class="col-input">
- <el-upload
- :action="$constant.BASE_URI+'/FileController/upload'"
- :file-list="item.fileList"
- :http-request="(params)=>{uploadFile(params,index)}"
- :limit="5"
- :multiple="false"
- disabled
- :show-file-list="false"
- class="upload-demo"
- style="width: 30%;float: left;margin-left: 42px"
- >
- <el-button size="small" disabled style="font-size: 14px" type="text">
- 上传发票
- <img
- src="./fapiaoicon.png"
- style="margin-left: 5px;position: absolute;top: 13.5px;"
- width="24px"
- />
- </el-button>
- </el-upload>
- <el-radio-group
- disabled
- v-model="item.fileType"
- 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="13"> </el-col>
- <el-col :span="11">
- <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">
- </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" disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item
- label="发起时间"
- prop="field119"
- >
- <el-input v-model="form.createdAt"></el-input>
- </el-form-item>
- </el-col>
- <el-card style="margin-bottom: 10px;">
- <h3 style="margin:0">制单 </h3>
- <el-row :gutter="10">
- <el-col :span="24">
- <el-form-item disabled label="支付方式" style="margin-bottom: 15px">
- <el-select v-model="confirmForm.payType" disabled>
- <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
- disabled
- 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 v-model="confirmForm.makeNum"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-card>
- <el-card 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
- readonly
- 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 readonly v-model="confirmForm.payRemark" style="margin-top:10px" type="textarea"/>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </el-card>
- </el-row>
- </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>
- </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="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: {
- UserSelect, costCanvas
- },
- data() {
- return {
- row: {},
- canVasStatus: false,
- confirmForm: {},
- selectList: [],
- tableData: [],
- confirmList: [],
- loading: false,
- dc_key: ['ORDER_STATUS', 'PAY_TYPE', 'BUDGET_FY'],
- 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
- if (this.activeName == 'second') {
- this.canVasStatus = true
- this.$nextTick(() => {
- this.$refs.costCanvas.createNodeCanvas(this.row)
- })
- }
- },
- beforeClose() {
- this.canVasStatus = false
- this.form = {
- applyUseMoneyDetailListString: []
- }
- this.dialogVisible = false
- this.activeName = 'first'
- this.$forceUpdate()
- },
- 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() {
- this.dialogVisible = false
- this.form = {}
- },
- async setVisible(status, row) {
- this.loading = false
- this.row = row
- this.loading = false
- try {
- const { data } = await this.baseRequest1('ApplyUseMoneyController', 'getInfoByFlowMainId', { flowMainId: row.id })
- const { data: flowHistroy } = await this.baseRequest1('FlowMainController', 'getFlowHistroyByFlowMainId', { flowMainId: row.id })
- this.confirmForm.flowMainPushId = row.flowMainPushId
- this.tableData = flowHistroy
- this.form = data
- this.confirmForm.confirmResult = data.confirmResult
- this.confirmForm.payType = data.payType
- this.confirmForm.payTime = this.$common.transDate(data.payTime)
- this.confirmForm.payRemark = data.payRemark
- this.confirmList = data.ccList
- console.log(this.$common.transDate(data.makeDate))
- this.confirmForm.makeDate = this.$common.transDate(data.makeDate)
- this.confirmForm.makeNum = data.makeNum
- this.form.createdAt = data.createdAt ? this.$common.transDate(data.createdAt) : null
- this.form.applyUseMoneyDetailListString = data.applyUseMoneyDetailList
- for (const e of this.form.applyUseMoneyDetailListString) {
- if (e.fileDataIds && e.fileDataIds.length > 0) {
- // e.fileList = e.fileDataIds.split(',')
- 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 = []
- }
- }
- this.getFeeMoneyTotal()
- if (data.flowMainCcList) {
- this.form.flowMainCcList = data.flowMainCcList.map((e) => {
- return (e.name)
- }).join()
- }
- if (data.applyUseMoneyDetailList) {
- this.form.applyUseMoneyDetailListString = data.applyUseMoneyDetailList
- }
- } catch (e) {
- console.error(e)
- }
- this.dialogVisible = status
- this.row = row
- },
- 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>
|