LAPTOP-FO2T5SIU\35838 4 months ago
parent
commit
edb55d302c
3 changed files with 106 additions and 36 deletions
  1. 1 1
      src/router/index.js
  2. 100 34
      src/views/paymentApplication/index.vue
  3. 5 1
      src/views/singleLogin/ssoLogin.vue

+ 1 - 1
src/router/index.js

@@ -402,7 +402,7 @@ export const constantRoutes = [
         path: '/mapEcharts',//h5设备详情
         component: () => import('@/views/life-line/components/mapCharts/mapEchartsNew.vue'),
         hidden: false
-    },,
+    },
     {
         path: '/paymentApplication',//h5付款申请
         component: () => import('@/views/paymentApplication/index.vue'),

+ 100 - 34
src/views/paymentApplication/index.vue

@@ -4,40 +4,40 @@
     <div class="processCode">流程编号:</div>
     <div class="paymentRowBox">
       <div>标题:</div>
-      <input v-model="postData.title" readonly class="paymentInput" type="text">
+      <input v-model="formData.title" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>创建人:</div>
-      <input v-model="postData.create" readonly class="paymentInput" type="text">
+      <input v-model="userinfo.truename" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>创建部门:</div>
-      <input v-model="postData.createDepartment" readonly class="paymentInput" type="text">
+      <input v-model="userinfo.deptName" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>是否为无合同付款:</div>
-      <input v-model="postData.isPay" readonly class="paymentInput" type="text">
+      <input v-model="formData.isNoContractStr" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>付款单位:</div>
-      <input v-model="postData.payUnit" readonly class="paymentInput" type="text">
+      <input v-model="formData.payerName" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>收款单位:</div>
-      <input v-model="postData.payeeUnit" readonly class="paymentInput" type="text">
+      <input v-model="formData.payeeName" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>资金用途:</div>
-      <input v-model="postData.useFor" readonly class="paymentInput" type="text">
+      <input v-model="formData.moneyPurpose" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>合同总价:</div>
-      <input v-model="postData.totalPrice" readonly class="paymentInput" type="text">
+      <input v-model="formData.contractPrice" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>付款说明:</div>
       <el-input
-        v-model="postData.describe"
+        v-model="formData.payRemark"
         type="textarea"
         autosize
         rows="5"
@@ -47,15 +47,15 @@
     </div>
     <div class="paymentRowBox">
       <div>申请金额(小写)</div>
-      <input v-model="postData.priceSmall" readonly class="paymentInput" type="text">
+      <input v-model="formData.applyPayMoney" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>申请金额(大写)</div>
-      <input v-model="postData.priceBig" readonly class="paymentInput" type="text">
+      <input v-model="formData.applyPayMoneyUppercase" readonly class="paymentInput" type="text">
     </div>
     <div class="paymentRowBox">
       <div>相关附件</div>
-      <van-uploader v-model="fileList" :deletable="false" :show-upload="false" @click-preview="clickPre3">
+      <van-uploader v-model="formData.fileUrlList" :deletable="false" :show-upload="false" @click-preview="clickPre3">
         <!--        <img src="../../assets/image/upload.png">-->
       </van-uploader>
     </div>
@@ -92,7 +92,7 @@
     </div>
     <div class="paymentRowBox">
       <div class="handleTit">处理结果</div>
-      <van-radio-group v-model="radio" direction="horizontal" checked-color="rgba(41, 64, 150, 1)" icon-size="4vw">
+      <van-radio-group v-model="confirmForm.confirmResult" direction="horizontal" checked-color="rgba(41, 64, 150, 1)" icon-size="4vw">
         <van-radio name="1">通过,转下一步</van-radio>
         <van-radio name="2">退回发起人</van-radio>
       </van-radio-group>
@@ -100,7 +100,7 @@
     <div class="paymentRowBox">
       <div class="handleTit">处理意见</div>
       <el-input
-        v-model="postData.opinion"
+        v-model="confirmForm.confirmContent"
         type="textarea"
         autosize
         rows="5"
@@ -122,40 +122,29 @@
       />
     </div>
     <div class="paymentRowBox" style="margin-top: 0">
-      <div class="handleTit">处理人   &nbsp;&nbsp;&nbsp;&nbsp;<span>王一博</span></div>
+      <div class="handleTit">处理人   &nbsp;&nbsp;&nbsp;&nbsp;<span>{{ username }}</span></div>
     </div>
     <div class="paymentBtnBox">
-      <button class="closeBtn">关闭</button>
-      <button class="submitBtn">提交</button>
+      <button class="closeBtn" @click="cancel">关闭</button>
+      <button class="submitBtn" @click="handelConfirm">提交</button>
     </div>
   </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'],
-            postData: {
-                title: '付款领用单20250116-004',
-                create: '万妮娅',
-                createDepartment: '商管中心',
-                isPay: '是',
-                payUnit: '无锡市安居投资发展有限公司',
-                payeeUnit: '欧阳小峰',
-                useFor: '买保健品',
-                totalPrice: '5000',
-                describe: '我不知道我不知道我不知道我不知道我不知道我不知道我不知道我不知道我不知道我不知道我不知道我不知道',
-                priceSmall: '5000',
-                priceBig: '五千',
-                opinion: '',
-                cs: ''
-            },
+            userinfo: {},
             radio: '1',
             fileList: [{ url: 'https://img01.yzcdn.cn/vant/leaf.jpg' }],
             dtList: [
@@ -215,10 +204,31 @@ export default {
                 }
             ],
             radiusOn: require('@/assets/image/radiusOn.png'),
-            radiusOff: require('@/assets/image/radiusOff.png')
+            radiusOff: require('@/assets/image/radiusOff.png'),
+            confirmForm: {
+                confirmContent: '',
+                confirmResult: '1'
+            },
+            formData: {
+                proId: '',
+                totalAddTime: 0,
+                applyReasons: '',
+                position: '',
+                applyAddWorkTime: [
+                    {
+                        useTime: 0
+                    }
+                ]
+            },
+            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) {
@@ -329,6 +339,62 @@ export default {
             // 其他 文件类型
             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.activeName = 'first'
+            this.row = row
+            this.getUserInfo(row.applyUser)
+            this.confirmForm.flowMainPushId = row.flowMainPushId
+            const { data } = await this.baseRequest1('ApplyPaymentSettleController', '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.dtList = 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.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'
+            }
+        },
+        async handelConfirm() {
+            // console.log(this.confirmForm)
+            const { data } = await this.baseRequest1('ApplyPaymentSettleController', 'AddConfirmResult', { ...this.confirmForm })
+            if (data.code == 200) {
+                this.$message.success('处理成功')
+                this.cancel()
+            }
+        },
+        cancel() {
+            window.close()
+        },
+        baseRequest1(prefix, opUrl, postData) {
+            return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
         }
     }
 }

+ 5 - 1
src/views/singleLogin/ssoLogin.vue

@@ -48,7 +48,11 @@ export default {
                         console.log('res', res)
                         if (res.result) {
                             // this.$router.push({ path: '/backstage?menuIndex=1296067156231847936&subMenu=1296067784098185216' })
-                            this.$router.push({ path: res.url })
+                            if (token.type == 'pc') {
+                                this.$router.push({ path: res.url })
+                            } else {
+                                this.$router.push({ path: '/paymentApplication', query: this.$route.query })
+                            }
                         } else {
                             this.$message(res.msg)
                             this.$router.push({ path: '/login' }).catch(() => {})