Bläddra i källkod

打款驳回-状态修改

jiayubo 3 månader sedan
förälder
incheckning
00690f3545

+ 9 - 0
src/api/finance/settlement.js

@@ -72,3 +72,12 @@ export function sendCode(phone) {
 }
 
 
+// 打款驳回
+export function volunTeerKepTReject(data) {
+  return request({
+    url: `/core/volunteer/take/paymentReject`,
+    method: 'post',
+    data,
+  })
+}
+

+ 25 - 4
src/views/finance/withdrawal/index.vue

@@ -45,6 +45,27 @@
             </template>
         </el-dialog>
 
+        <el-dialog
+            title="打款驳回"
+            v-model="rejectDialog"
+            width="400px"
+            @close="rejectReason = ''"
+        >
+            <el-form>
+                <el-form-item label="驳回原因" required>
+                    <el-input
+                        type="textarea"
+                        v-model="rejectReason"
+                        placeholder="请输入驳回原因"
+                        rows="4"
+                    />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <el-button @click="rejectDialog = false">取消</el-button>
+                <el-button type="primary" @click="submitReject">确定</el-button>
+            </template>
+        </el-dialog>
 
     </div>
 </template>
@@ -82,14 +103,14 @@ const {
     verifyClose,
     getVerList,
     verifyCancel,
-    getCode
+    getCode,
+    rejectDialog,
+    rejectReason,
+    submitReject
 } = useData({ proxy, jlzj_area_type });
 console.log('tableColumn', dialogData);
 
 
-
-
-
 </script>
 
 <style lang='scss' scoped>

+ 70 - 11
src/views/finance/withdrawal/useData.js

@@ -1,5 +1,9 @@
 import { ref, computed, watch } from 'vue'
-import { auditorOrderSettlement, sendCode } from '@/api/finance/settlement.js'
+import {
+  auditorOrderSettlement,
+  sendCode,
+  volunTeerKepTReject,
+} from '@/api/finance/settlement.js'
 import useUserStore from '@/store/modules/user'
 import {
   takeList,
@@ -21,13 +25,13 @@ export default ({ proxy, jlzj_area_type }) => {
   const {
     pay_type,
     is_pay,
-    volunteer_app_status,
+    jlzj_volunteer_take_app_status,
     is_verified,
     payment_status,
   } = proxy.useDict(
     'pay_type',
     'is_pay',
-    'volunteer_app_status',
+    'jlzj_volunteer_take_app_status',
     'payment_status',
     'is_verified'
   )
@@ -35,6 +39,8 @@ export default ({ proxy, jlzj_area_type }) => {
   const dialogPlay = ref(false) //打款单详情
   const dialogRow = ref({})
   const dialogVerify = ref(false)
+  const rejectDialog = ref(false) // 打款驳回弹框
+  const rejectReason = ref('') // 驳回原因
 
   //打开弹窗
   const openDialog = (data, type) => {
@@ -230,6 +236,27 @@ export default ({ proxy, jlzj_area_type }) => {
     }
   }
 
+  // 打款驳回提交
+  const submitReject = async () => {
+    try {
+      const params = {
+        volunteerTakeRecordId: dialogRow.value.volunteerTakeRecordId,
+        rejectReason: rejectReason.value
+      }
+      const res = await volunTeerKepTReject(params)
+      if (res.code === 200) {
+        proxy.$modal.msgSuccess('驳回成功')
+        rejectDialog.value = false
+        rejectReason.value = ''
+        userTableRef.value.resetForm()
+        return
+      }
+      proxy.$modal.msgError(res.msg)
+    } catch (error) {
+      console.log('error', error)
+    }
+  }
+
   return {
     dialogFormRef,
     userTableRef,
@@ -240,6 +267,8 @@ export default ({ proxy, jlzj_area_type }) => {
     dialogVerify,
     verifyCode,
     code,
+    rejectDialog,
+    rejectReason,
     openDialog,
     exportFile,
     submitForm,
@@ -249,6 +278,7 @@ export default ({ proxy, jlzj_area_type }) => {
     getVerList,
     verifyCancel,
     getCode,
+    submitReject,
     isSelect: true,
     tabList: [
       // {
@@ -323,7 +353,7 @@ export default ({ proxy, jlzj_area_type }) => {
         label: '审核状态',
         prop: 'appStatus',
         type: 'dict',
-        dict: volunteer_app_status,
+        dict: jlzj_volunteer_take_app_status,
         isSearch: true,
       },
     ]),
@@ -396,20 +426,20 @@ export default ({ proxy, jlzj_area_type }) => {
         type: 'input',
       },
       {
-        label: '提现金额',
+        label: '提现实发金额',
         prop: 'receiveAmount',
       },
       {
-        label: '扣除的税额',
-        prop: 'taxAmount',
+        label: '提现应发金额(扣除税款)',
+        prop: 'shoudAmount',
       },
       {
-        label: '应打款金额',
-        prop: 'shoudAmount',
+        label: '提现申请金额',
+        prop: 'takeAmount',
       },
       {
-        label: '实际打款金额',
-        prop: 'shoudAmount',
+        label: '扣除的税额',
+        prop: 'taxAmount',
       },
     ]),
     dialogData: {
@@ -565,11 +595,27 @@ export default ({ proxy, jlzj_area_type }) => {
           console.log('TCL: exportFile -> row', row)
           dialogPlay.value = true
           dialogRow.value = row
+          if (userTableRef.value) {
+            userTableRef.value.resetForm()
+          }
         },
         show: (row) => {
           return tabkey.value === '4'
         },
       },
+      {
+        label: '打款驳回',
+        type: 'danger',
+        key: 'reject',
+        func: (row) => {
+          dialogRow.value = row
+          rejectDialog.value = true
+          rejectReason.value = ''
+        },
+        show: (row) => {
+          return true
+        },
+      },
     ],
     dialogVerifyData: ref({
       title: '结算申请',
@@ -601,5 +647,18 @@ export default ({ proxy, jlzj_area_type }) => {
         },
       ],
     }),
+    rejectDialogData: {
+      title: '打款驳回',
+      column: [
+        {
+          label: '驳回原因',
+          prop: 'rejectReason',
+          type: 'textarea',
+          rules: [
+            { required: true, message: '请输入驳回原因', trigger: 'blur' },
+          ],
+        },
+      ],
+    },
   }
 }