123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536 |
- <template>
- <el-dialog
- :close-on-click-modal="false"
- :close-on-press-escape="false"
- :visible.sync="dialogVisible"
- title="应收款调整申请单-审核"
- top="50px"
- width="75%"
- :append-to-body="true"
- class="statistic_base"
- :modal-append-to-body="true"
- custom-class="tagdialog"
- >
- <div class="tabsdom">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="应收款调整申请" name="first">
- <el-row type="flex" justify="end">
- <el-col :span="3" class="col-txt"><span>流程编号:</span></el-col>
- <el-col :span="6" class="col-input"><span style="font-size: 14px">{{ formData.flowNum }}</span></el-col>
- </el-row>
- <el-form
- ref="elForm"
- :model="formData"
- :rules="rules"
- label-width="150px"
- >
- <el-card shadow="always" style="padding: 15px 5px 5px 15px">
- <el-row :gutter="15">
- <el-col :span="24">
- <el-form-item label="标题" prop="title">
- <el-input v-model="formData.title" placeholder="应收款调整领用单-年月日" readonly />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="创建人">
- <el-input v-model="userinfo.truename" placeholder="创建人" readonly />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="创建部门">
- <el-input v-model="userinfo.deptName" placeholder="创建部门" readonly />
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="房屋">
- <el-input v-model="formData.houseName" placeholder="创建部门" readonly />
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="说明">
- <el-input
- v-model="formData.remark"
- :autosize="{minRows: 4, maxRows: 4}"
- :style="{width: '100%'}"
- placeholder="请填写"
- type="textarea"
- maxlength="2000"
- show-word-limit
- />
- </el-form-item>
- </el-col>
- <el-col :span="24">
- <el-form-item label="相关附件">
- <el-upload
- :disabled="true"
- :action="$constant.BASE_URI+'/FileController/upload'"
- :file-list="formData.fileUrlList"
- :http-request="uploadFile"
- class="upload-demo"
- multiple
- :limit="6"
- :before-upload="$common.beforeUploadJustWordExcel"
- >
- <el-button size="small" type="primary">上传附件</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(file,formData.fileUrlList)" />
- </span>
- </div>
- </el-upload>
- </el-form-item>
- </el-col>
- </el-row>
- <h3>流程历史</h3>
- <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>
- <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" prop="confirmResult">
- <el-radio-group v-model="confirmForm.confirmResult">
- <el-radio :label="1">同意</el-radio>
- <el-radio :label="2">退回发起人</el-radio>
- <el-radio :label="3">退回上节点</el-radio>
- <!-- c<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-form-item>
- </el-col>
- </el-row>
- <el-col :span="24">
- <el-form-item label="审核人抄送">
- <user-select
- :default-select="confirmList"
- :multiple="true"
- class="cclist,statistic_base"
- :append-to-body="true"
- :modal-append-to-body="true"
- custom-class="tagdialog"
- @selectValue="parentMethod"
- />
- </el-form-item>
- </el-col>
- </el-form>
- </el-card>
- </el-card>
- </el-form>
- </el-tab-pane>
- <el-tab-pane label="流程图 " name="second">
- <payment-canvas id="paymentConfirm" ref="PaymentCanvas" />
- </el-tab-pane>
- </el-tabs>
- </div>
- <div slot="footer">
- <el-button @click="dialogVisible=false">取消</el-button>
- <el-button :loading="loading" type="primary" @click="handelConfirm">确定</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 PaymentCanvas from '@/views/workflow/components/myProcess/paymentCanvas.vue'
- const applyAddWorkTime = { useTime: 0 }
- export default {
- name: 'ApplyContractConfirm',
- components: {
- upload,
- UserSelect,
- PaymentCanvas
- },
- mixins: [Base, BaseData],
- data() {
- return {
- loading: false,
- row: {},
- confirmList: [],
- selectList: [],
- argeeBackStatus: false,
- argeeNoStatus: false,
- tableData: [],
- flowHistroy: [],
- confirmForm: {
- confirmContent: '',
- confirmResult: 1
- },
- dc_key: ['ANSWER_NEED'],
- ProjectData: [],
- dialogVisible: false,
- applyAddWorkTime: [{ ...applyAddWorkTime }],
- formData: {
- proId: '',
- totalAddTime: 0,
- applyReasons: '',
- position: '',
- applyAddWorkTime: [
- {
- useTime: 0
- }
- ]
- },
- userinfo: {},
- activeName: 'first',
- rules: {
- confirmResult: [{
- required: true,
- message: '请选择处理意见',
- trigger: 'change'
- }],
- title: [{
- required: true,
- message: '请输入标题',
- trigger: 'change'
- }],
- applyPayMoney: [{
- required: true,
- message: '请输入申请金额(小写)',
- trigger: 'change'
- }
- ],
- applyPayMoneyUppercase: [{
- required: true,
- message: '请输入申请金额(大写)',
- trigger: 'change'
- }]
- },
- positionOptions: [
- {
- 'label': '公司',
- 'value': 1
- },
- {
- 'label': '客户处',
- 'value': 2
- }, {
- 'label': '居家',
- 'value': 3
- }],
- TreeData: []
- }
- },
- computed: {},
- watch: {
- 'applyAddWorkTime': {
- deep: true,
- handler(newValue, oldValue) {
- let totalAddTime = 0
- for (let i = 0; i < this.applyAddWorkTime.length; i++) {
- if (this.applyAddWorkTime[i].useTime === 0 || this.applyAddWorkTime[i].useTime) {
- totalAddTime = totalAddTime + Number(this.applyAddWorkTime[i].useTime)
- }
- }
- console.log(totalAddTime)
- this.changeAddWorkTime(totalAddTime.toFixed(1))
- }
- }
- },
- created() {
- },
- mounted() {
- this.initDict(this.dc_key).then((res) => {
- // this.initProject({ /* signstatus: '2,3'*/ })
- })
- },
- methods: {
- handlePictureRemove(file, fileUrlList) {
- var index = fileUrlList.indexOf(file)
- fileUrlList.splice(index, 1)
- },
- uploadFile: function(param) {
- const _this = this
- upload(param, true).then((res) => {
- _this.formData.fileUrlList.push(res)
- })
- },
- swapper(n) {
- // console.log('ddd',n)
- if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n)) { return '数据非法' }
- var unit = '千百拾亿千百拾万千百拾元角分'; var str = ''
- n += '00'
- var p = n.indexOf('.')
- if (p >= 0) { n = n.substring(0, p) + n.substr(p + 1, 2) }
- unit = unit.substr(unit.length - n.length)
- for (var i = 0; i < n.length; i++) { str += '零壹贰叁肆伍陆柒捌玖'.charAt(n.charAt(i)) + unit.charAt(i) }
- // console.log('end',str.replace(/零(千|百|拾|角)/g, '零').replace(/(零)+/g, '零').replace(/零(万|亿|元)/g, '$1').replace(/(亿)万|壹(拾)/g, '$1$2').replace(/^元零?|零分/g, '').replace(/元$/g, '元整'))
- this.formData.applyPayMoneyUppercase = str.replace(/零(千|百|拾|角)/g, '零').replace(/(零)+/g, '零').replace(/零(万|亿|元)/g, '$1').replace(/(亿)万|壹(拾)/g, '$1$2').replace(/^元零?|零分/g, '').replace(/元$/g, '元整')
- // console.log('end',this.formData.applyPayMoneyUppercase)
- this.$forceUpdate()
- },
- handleClick(tab, event) {
- this.canVasStatus = false
- if (this.activeName == 'second') {
- this.canVasStatus = true
- this.$nextTick(() => {
- this.$refs.PaymentCanvas.createNodeCanvas(this.row)
- })
- }
- },
- parentMethod(val) {
- if (val.length > 0) {
- this.confirmForm.ccList = val.join(',')
- }
- },
- selectCommonPhrases(e) {
- if (!this.confirmForm.confirmContent) this.confirmForm.confirmContent = ''
- },
- changeAddWorkTime(totalAddTime) {
- this.formData.totalAddTime = totalAddTime
- },
- async getUserInfo(applyUser) {
- const { data: userinfo } = await this.baseRequest1('ApplyReceivablesAdjustController', 'getUserInfoByUserId', { userId: applyUser })
- this.userinfo = userinfo
- console.log(this.userinfo)
- },
- spliceListRow(index) {
- this.formData.workTimeList.splice(index, 1)
- },
- async setVisible(status, row) {
- this.activeName = 'first'
- this.row = row
- this.getUserInfo(row.applyUser)
- this.confirmForm.flowMainPushId = row.flowMainPushId
- const { data } = await this.baseRequest1('ApplyReceivablesAdjustController', 'getInfoByFlowMainPushId', { flowMainPushId: row.flowMainPushId })
- 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.tableData = flowHistroy
- this.formData = data
- if (this.formData.isNoContract || this.formData.isNoContract == 0) {
- this.formData.isNoContract = String(this.formData.isNoContract)
- }
- if (data.fileDataIds) {
- const { data: fileTaoTaoList } = await this.baseRequest1('FileZtController', 'findFileInfoByIds/' + data.fileDataIds, '')
- console.log(fileTaoTaoList.data)
- this.formData.fileUrlList = fileTaoTaoList.data.map((e) => {
- return {
- url: this.$constant.BASE_URI + '/FileController/download/' + e.id,
- name: e.fileName,
- data: e.id,
- uid: new Date().getTime()
- }
- })
- console.log(this.formData.fileUrlList)
- } else {
- this.formData.fileUrlList = []
- }
- if (!this.confirmForm.confirmResult) {
- this.confirmForm.confirmResult = '1'
- }
- // this.applyAddWorkTime = data.applyAddWorkTimeList.map((e) => {
- // return {
- // useTime: e.useTime,
- // startDay: this.$common.transDate(e.startDay),
- // startTime: this.$common.transMinute(e.startTime),
- // endTime: this.$common.transMinute(e.endTime)
- // }
- // })
- // console.log(this.applyAddWorkTime)
- // flowMainPushId
- this.dialogVisible = status
- },
- baseRequest1(prefix, opUrl, postData) {
- return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
- },
- async handelConfirm() {
- this.$refs['elForm'].validate(async valid => {
- // if (!valid) return
- // ApplyAddWorkController/AddConfirmResultAddWork
- console.log(this.confirmForm)
- this.loading = true
- const { data } = await this.baseRequest1('ApplyReceivablesAdjustController', 'AddConfirmResult', { ...this.confirmForm })
- if (data.code == 200) {
- this.loading = false
- this.$message.success('处理成功')
- this.form = {}
- this.confirmForm = { confirmContent: '' }
- this.dialogVisible = false
- this.$emit('getData')
- }
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .cclist {
- .col-input {
- padding: 0;
- }
- }
- .pdr10px {
- padding-right: 10px;
- }
- .mgb10px {
- margin-bottom: 10px;
- }
- .mb25 {
- margin-bottom: 25px;
- }
- .pdtopbottom16 {
- padding: 0px 16px;
- }
- .pdtop16px {
- padding-top: 16px;
- }
- .cost_form {
- .col-input {
- font-weight: 400;
- }
- .el-form-item__label .moneydetails {
- 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;
- }
- .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;
- }
- }
- .txtc {
- text-align: center
- }
- .ml5 {
- margin-left: 5px;
- }
- .eltype {
- margin-bottom: 15px;
- }
- .tabsdom {
- .el-input {
- width: 100%;
- }
- .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>
|