LAPTOP-FO2T5SIU\35838 4 maanden geleden
bovenliggende
commit
f8a1c8688b

+ 9 - 0
src/router/index.js

@@ -412,6 +412,15 @@ export const constantRoutes = [
             keepAlive: true
         }
     },
+    {
+        path: '/paymentApplicationDetail',//h5付款申请
+        component: () => import('@/views/paymentApplication/indexDetail.vue'),
+        hidden: false,
+        meta: {
+            name: '付款申请详情',
+            keepAlive: true
+        }
+    },
 
 
 ]

+ 3 - 2
src/views/paymentApplication/index.vue

@@ -1,7 +1,7 @@
 
 <template>
   <div class="payment-application">
-    <div class="processCode">流程编号:</div>
+    <div class="processCode">流程编号:{{ formData.flowNum }}</div>
     <div class="paymentRowBox">
       <div>标题:</div>
       <input v-model="formData.title" readonly class="paymentInput" type="text">
@@ -395,7 +395,8 @@ export default {
             }
         },
         cancel() {
-            window.close()
+            // window.close()
+            window.location.href = 'http://112.25.69.225:8088/workflow/workflow/WfRefreshList.jsp'
         },
         baseRequest1(prefix, opUrl, postData) {
             return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')

+ 412 - 0
src/views/paymentApplication/indexDetail.vue

@@ -0,0 +1,412 @@
+
+<template>
+  <div class="payment-application">
+    <div class="processCode">流程编号:{{ formData.flowNum }}</div>
+    <div class="paymentRowBox">
+      <div>标题:</div>
+      <input v-model="formData.title" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>创建人:</div>
+      <input v-model="userinfo.truename" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>创建部门:</div>
+      <input v-model="userinfo.deptName" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>是否为无合同付款:</div>
+      <input v-model="formData.isNoContractStr" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>付款单位:</div>
+      <input v-model="formData.payerName" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>收款单位:</div>
+      <input v-model="formData.payeeName" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>资金用途:</div>
+      <input v-model="formData.moneyPurpose" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>合同总价:</div>
+      <input v-model="formData.contractPrice" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>付款说明:</div>
+      <el-input
+        v-model="formData.payRemark"
+        type="textarea"
+        autosize
+        rows="5"
+        placeholder="请输入内容"
+        readonly
+      />
+    </div>
+    <div class="paymentRowBox">
+      <div>申请金额(小写)</div>
+      <input v-model="formData.applyPayMoney" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>申请金额(大写)</div>
+      <input v-model="formData.applyPayMoneyUppercase" readonly class="paymentInput" type="text">
+    </div>
+    <div class="paymentRowBox">
+      <div>相关附件</div>
+      <van-uploader v-model="formData.fileUrlList" :deletable="false" :show-upload="false" @click-preview="clickPre3">
+        <!--        <img src="../../assets/image/upload.png">-->
+      </van-uploader>
+    </div>
+    <van-collapse v-model="activeNames">
+      <van-collapse-item name="1">
+        <template #title>
+          <div style="display: flex;align-items: center;color: rgba(51, 51, 51, 1);font-weight: 600;font-size: 3.6vw">
+            <div class="blueBg" />流程历史
+          </div>
+        </template>
+        <div style="background: #FAFAFA" class="container">
+          <div v-for="(item, index) in dtList" :key="index" class="itemBox">
+            <div class="itemLeft">
+              <!--                             <div class="radius"></div>-->
+              <img :src="item.auditResult=='-1'?radiusOn:radiusOff" class="radius">
+              <div class="itemTitBox">
+                <div style="display: flex;margin: 1vw 0">
+                  <div style="color: rgba(51, 51, 51, 1)">{{ item.nodeName }}{{ item.auditResultString?':':'' }}</div>
+                  <div :style="{'color':item.auditResultString==='同意'?'#5ABF68':item.auditResultString==='处理中'?'#E08E42':'red'}">{{ item.auditResultString }}</div>
+                </div>
+                <div v-show="item.auditContent" style="padding: 2vw;background: #F2F2F2;margin: 1vw 0;border-radius: 1vw">{{ item.auditContent }}</div>
+                <div style="display: flex;justify-content: space-between;width: 100%;margin: 1vw 0">
+                  <div>{{ item.auditUserName }}</div>
+                  <div>{{ item.createdAt?$common.transTime(item.createdAt):'' }}</div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </van-collapse-item>
+    </van-collapse>
+  </div>
+</template>
+
+<script>
+import userSelectForH5 from '@/views/components/userSelectForH5.vue'
+import Base from '@/views/base/base'
+import BaseData from '@/views/base/baseData'
+export default {
+    name: 'Index',
+    components: { userSelectForH5 },
+    mixins: [Base, BaseData],
+    data() {
+        return {
+            dc_key: ['ANSWER_NEED'],
+            confirmList: [],
+            activeNames: ['1'],
+            userinfo: {},
+            radio: '1',
+            fileList: [{ url: 'https://img01.yzcdn.cn/vant/leaf.jpg' }],
+            dtList: [
+            ],
+            radiusOn: require('@/assets/image/radiusOn.png'),
+            radiusOff: require('@/assets/image/radiusOff.png'),
+            confirmForm: {
+                confirmContent: '',
+                confirmResult: '1'
+            },
+            formData: {
+                proId: '',
+                totalAddTime: 0,
+                applyReasons: '',
+                position: '',
+                applyAddWorkTime: [
+                    {
+                        useTime: 0
+                    }
+                ],
+                fileUrlList: []
+            },
+            username: '',
+            loadingFlag: false
+        }
+    },
+    mounted() {
+        this.initDict(this.dc_key).then((res) => {
+            this.setVisible(this.$route.query)
+        })
+        this.username = this.$common.currUser().username
+        const dayjs = require('dayjs')
+        this.dtList.forEach(item => {
+            if (item.createdAt) {
+                item.createdAt = dayjs(item.createdAt).format('YYYY-MM-DD HH:mm:ss')
+            }
+        })
+    },
+    methods: {
+        parentMethod(val) {
+            if (val.length > 0) {
+                this.confirmForm.ccList = val.join(',')
+            }
+        },
+        clickPre3(file) {
+            if (this.matchType(file.url) !== 'image') {
+                window.location.href = file.url
+            }
+        },
+        matchType(fileName) {
+            // 后缀获取
+            var suffix = ''
+            // 获取类型结果
+            var result = ''
+            try {
+                var flieArr = fileName.split('.')
+                suffix = flieArr[flieArr.length - 1]
+            } catch (err) {
+                suffix = ''
+            }
+            // fileName无后缀返回 false
+            if (!suffix) {
+                result = false
+                return result
+            }
+            // 图片格式
+            var imglist = ['png', 'jpg', 'jpeg', 'bmp', 'gif']
+            // 进行图片匹配
+            result = imglist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'image'
+                return result
+            }
+            // 匹配txt
+            var txtlist = ['txt']
+            result = txtlist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'txt'
+                return result
+            }
+            // 匹配 excel
+            var excelist = ['xls', 'xlsx']
+            result = excelist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'excel'
+                return result
+            }
+            // 匹配 word
+            var wordlist = ['doc', 'docx']
+            result = wordlist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'word'
+                return result
+            }
+            // 匹配 pdf
+            var pdflist = ['pdf']
+            result = pdflist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'pdf'
+                return result
+            }
+            // 匹配 ppt
+            var pptlist = ['ppt']
+            result = pptlist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'ppt'
+                return result
+            }
+            // 匹配 视频
+            var videolist = ['mp4', 'm2v', 'mkv']
+            result = videolist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'video'
+                return result
+            }
+            // 匹配 音频
+            var radiolist = ['mp3', 'wav', 'wmv']
+            result = radiolist.some(function(item) {
+                return item == suffix
+            })
+            if (result) {
+                result = 'radio'
+                return result
+            }
+            // 其他 文件类型
+            result = 'other'
+            return result
+        },
+        async getUserInfo(applyUser) {
+            const { data: userinfo } = await this.baseRequest1('ApplyPaymentSettleController', 'getUserInfoByUserId', { userId: applyUser })
+            this.userinfo = userinfo
+            console.log(this.userinfo)
+        },
+        async setVisible(row) {
+            this.row = row
+            this.activeName = 'first'
+            this.getUserInfo(row.applyUser)
+            this.confirmForm.flowMainPushId = row.flowMainPushId
+            const { data } = await this.baseRequest1('ApplyPaymentSettleController', 'getInfoByFlowMainId', { flowMainId: row.id })
+            const { data: flowHistroy } = await this.baseRequest1('FlowMainController', 'getFlowHistroyByFlowMainId', { flowMainId: row.id })
+            this.tableData = flowHistroy
+            this.formData = data
+            if (this.formData.isNoContract || this.formData.isNoContract == 0) {
+                this.formData.isNoContract = String(this.formData.isNoContract)
+                this.formData.isNoContractStr = this.dc_map.ANSWER_NEED[this.formData.isNoContract]
+            }
+            if (data.fileDataIds) {
+                const { data: fileTaoTaoList } = await this.baseRequest1('FileZtController', 'findFileInfoByIds/' + data.fileDataIds, '')
+                // console.log('fileTaoTaoList', fileTaoTaoList.data)
+                this.formData.fileUrlList = []
+                fileTaoTaoList.data.forEach((e) => {
+                    this.formData.fileUrlList.push({
+                        url: this.$constant.BASE_URI + '/FileController/download/' + e.id,
+                        file: new File([], e.fileName, {}),
+                        id: e.id
+                    })
+                })
+                this.$forceUpdate()
+            } else {
+                this.formData.fileUrlList = []
+            }
+        },
+        baseRequest1(prefix, opUrl, postData) {
+            return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
+        }
+    }
+}
+</script>
+
+<style lang="scss">
+.loading {
+    width: 15px;
+    height: 15px;
+    border: 4px solid rgba(0, 123, 255, 0.5);
+    border-top-color: #00bfff;
+    border-radius: 50%;
+    animation: spin 1s ease-in-out infinite;
+    -webkit-animation: spin 1s ease-in-out infinite;
+}
+/* 定义旋转动画 */
+@keyframes spin {
+    to {
+        transform: rotate(360deg);
+    }
+}
+    .payment-application{
+        padding: 2vw 3vw 10vw 3vw;
+        display: flex;
+        flex-direction: column;
+         .processCode{
+             color: rgba(119, 119, 119, 1);
+             font-size: 3.4vw;
+         }
+        .paymentRowBox{
+            font-size: 3.5vw;
+            color: rgba(51, 51, 51, 1);
+            margin-top: 2vw;
+            .paymentInput{
+                color: rgba(68, 68, 68, 1);
+                padding: 2.2vw 2vw;
+                width: 100% !important;
+                margin: 1vw 0;
+                border:1px solid rgba(230, 230, 230, 1);
+            }
+            .el-textarea__inner{
+                padding: 2.2vw 2vw;
+                margin: 1vw 0;
+            }
+            .handleTit{
+                font-size: 3.4vw;
+                color: rgba(51, 51, 51, 1);
+                margin-bottom: 1.5vw;
+                margin-top: 4.5vw;
+            }
+        }
+        .paymentBtnBox{
+            display: flex;
+            justify-content: space-evenly;
+            font-size: 3.4vw;
+            margin-top: 8vw;
+            .closeBtn{
+                width: 29.4vw;
+                height: 8vw;
+                background: rgba(87,106,201,0.15);
+                border-radius: 1vw;
+                border: 1px solid rgba(42,57,128,0.75);
+                color: #2A3980;
+            }
+            .submitBtn{
+                width: 29.4vw;
+                height: 8vw;
+                background: #2A3980;
+                border-radius: 1vw;
+                color: #FFFFFF;
+            }
+        }
+        .itemBox {
+            display: flex;
+            justify-content: space-between;
+            padding: 2vw 1vw 1vw 1vw;
+            position: relative;
+            z-index: 1;
+            .itemLeft {
+                display: flex;
+                align-items: center;
+                width: 100%;
+                margin: 0.5vw 2vw;
+                .itemTitBox {
+                    //height: 2.3vw;
+                    width: 100%;
+                    display: flex;
+                    flex-direction: column;
+                    justify-content: space-between;
+                }
+                .timeBox {
+                    display: flex;
+                    color: #999999;
+                    font-size: 16px;
+                }
+                .radius{
+                    width: 5vw;
+                    height: 5vw;
+                    margin-right: 3vw;
+                }
+            }
+            .itemRight {
+                display: flex;
+                height: 2.8vw;
+                flex-direction: column;
+                justify-content: space-between;
+                flex-direction: column;
+                .tagBox {
+                    text-align: right;
+
+                    // margin: 0.5vw 0;
+                }
+            }
+        }
+        .blueBg{
+            width: 0.6vw;
+            height: 4vw;
+            background: rgba(76, 92, 168, 1);
+            margin-right: 1vw;
+        }
+        .van-cell{
+            padding: 5vw 0 1vw 0;
+        }
+        .van-collapse-item__content{
+            padding: 1vw 0;
+        }
+    }
+</style>

+ 9 - 2
src/views/singleLogin/ssoLogin.vue

@@ -50,8 +50,15 @@ export default {
                             // this.$router.push({ path: '/backstage?menuIndex=1296067156231847936&subMenu=1296067784098185216' })
                             if (token.type == 'pc') {
                                 this.$router.push({ path: res.url })
-                            } else {
-                                this.$router.push({ path: '/paymentApplication', query: this.$route.query })
+                            }
+                            if (token.type == 'mobile') {
+                                // 详情页
+                                if (token.action && token.action == 'view') {
+                                    this.$router.push({ path: '/paymentApplicationDetail', query: this.$route.query })
+                                } else {
+                                    // 审批页
+                                    this.$router.push({ path: '/paymentApplication', query: this.$route.query })
+                                }
                             }
                         } else {
                             this.$message(res.msg)