瀏覽代碼

feature(消息通知):省二院到款及经费报销提醒消息通知跳转时,"密码不能为空"问题修改

yanglingling 9 月之前
父節點
當前提交
671670aeab
共有 2 個文件被更改,包括 16 次插入14 次删除
  1. 12 8
      src/view/fund/claim/edit.vue
  2. 4 6
      src/view/fund/reimbursement/edit.vue

+ 12 - 8
src/view/fund/claim/edit.vue

@@ -24,6 +24,10 @@
           <template #input>{{ formatAmount(state.form.taxAmount) }}</template>
           <template #extra>元</template>
         </van-field>
+        <van-field v-model="state.form.unAmount" label="待认领金额" readonly>
+          <template #input>{{ formatAmount(state.form.unAmount) }}</template>
+          <template #extra>元</template>
+        </van-field>
         <van-field v-model="state.form.date" label="到款日期" readonly>
           <template #input>{{ formatDate(new Date(state.form.date), 'YYYY-mm-dd') }}</template>
         </van-field>
@@ -88,6 +92,7 @@
     form: {
       allotAmount: null,
       amount: null, //到款金额
+      unAmount: 0, // 待认领金额
       manageAmount: 0,
       taxAmount: 0,
       projectName: '',
@@ -124,6 +129,7 @@
     if (err) return
     state.fundDetail = res.data
     state.form = { ...state.form, ...res.data }
+    state.form.unAmount = state.form.amount - state.form.manageAmount - state.form.taxAmount
     // state.form.projectName = res.data.projectName
     // state.form.amount = res.data.amount
     // state.form.manageAmount = res.data.manageAmount
@@ -156,7 +162,7 @@
     params.amount = Number(params.amount)
     params.detail = params.detail.map((item: any) => ({
       ...item,
-      amount: Number(item.amount)
+      amount: Number(item.amount * 100)
     }))
     params.externalAmount = Number(params.externalAmount)
     params.internalAmount = Number(params.internalAmount)
@@ -177,17 +183,14 @@
   onMounted(async () => {
     // 进行openId登录
     const code: string = route.query.code ? route.query.code.toString() : ''
-    console.log('11111111111111111111111')
+    await storesUseUserInfo.setOpenId(code)
     let param = {
-      code: code,
+      code: openId.value,
       unionId: unionId.value,
-      user_name: userInfos.value?.userName,
-      tenant: Local.get('Tenant'),
     }
 
-    if (code) {
-      console.log('2222222222222222222222')
-      const [err, res]: ToResponse = await to(loginApi.weChatLogin(param))
+    if (openId.value) {
+      const [err, res]: ToResponse = await to(loginApi.weChatLoginUnionId(param))
       if (err) {
         // 跳转到登录页面
         Local.remove('token')
@@ -196,6 +199,7 @@
       }
       // 存储 token 到浏览器缓存
       Local.set('token', res?.data?.token)
+      Local.set('Tenant', res.data.tenant)
     }
 
     const id = route.query.id ? +route.query.id : 0

+ 4 - 6
src/view/fund/reimbursement/edit.vue

@@ -489,17 +489,14 @@
   onMounted(async () => {
     // 进行openId登录
     const code: string = route.query.code ? route.query.code.toString() : ''
-    console.log('11111111111111111111111')
+    await storesUseUserInfo.setOpenId(code)
     let param = {
       code: code,
       unionId: unionId.value,
-      user_name: userInfos.value?.userName,
-      tenant: Local.get('Tenant'),
     }
 
-    if (code) {
-      console.log('2222222222222222222222')
-      const [err, res]: ToResponse = await to(loginApi.weChatLogin(param))
+    if (openId.value) {
+      const [err, res]: ToResponse = await to(loginApi.weChatLoginUnionId(param))
       if (err) {
         // 跳转到登录页面
         Local.remove('token')
@@ -508,6 +505,7 @@
       }
       // 存储 token 到浏览器缓存
       Local.set('token', res?.data?.token)
+      Local.set('Tenant', res.data.tenant)
     }
 
     const id = route.query.id ? +route.query.id : 0