Handy_Cao 2 tahun lalu
induk
melakukan
8daad18a6d

+ 6 - 6
src/business/bank/index.ts

@@ -20,6 +20,12 @@ export function useDoWithdraw() {
         return {}
     })
 
+    const formData = reactive<Partial<Proto.t2bBankWithdrawReq>>({
+        AccountType: 0,
+        AppDateTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+        extend_info: JSON.stringify({ "sex": 1 })
+    })
+
     /// 查询签约信息
     const request = queryBankAccountSign().then((res) => {
         if (res.data.length) {
@@ -36,12 +42,6 @@ export function useDoWithdraw() {
         }
     })
 
-    const formData = reactive<Partial<Proto.t2bBankWithdrawReq>>({
-        AccountType: 0,
-        AppDateTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
-        extend_info: JSON.stringify({ "sex": 1 })
-    })
-
     const onSubmit = async () => {
         await request
         loading.value = true

+ 2 - 0
src/packages/pc/views/account/receipt/index.vue

@@ -49,6 +49,8 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'receipttype', label: '发票类型' },
     { prop: 'username', label: '发票抬头' },
     { prop: 'taxpayerid', label: '税号' },
+    { prop: 'receiptbank', label: '开户银行' },
+    { prop: 'receiptaccount', label: '银行账号' },
     { prop: 'contactinfo', label: '企业电话' },
     { prop: 'information', label: '企业信息' },
 ])

+ 1 - 1
src/packages/pc/views/account/sign/index.vue

@@ -19,7 +19,7 @@
                 <el-button v-if="row.signstatus === SignStatus.Signed" type="danger" size="small"
                     @click="showComponent('cancel', row)">解约</el-button>
                 <el-button v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(row.signstatus)"
-                    type="danger" size="small" @click="showComponent('cancel', row)">修改</el-button>
+                    type="danger" size="small" @click="showComponent('sign', row)">修改</el-button>
             </div>
         </template>
     </app-table>

+ 22 - 8
src/packages/pc/views/footer/capital/summary/withdraw/index.vue

@@ -39,7 +39,17 @@ const show = ref(true)
 const refresh = ref(false)
 
 const formRules: FormRules = {
-    Amount: [{ required: true, message: '请输入金额', trigger: 'blur' }],
+    Amount: [{ 
+        required: true, 
+        message: '请输入金额', 
+        validator: (rule, value, callback) => {
+            if (value<=(accountStore.accountInfo.currentbalance ?? 0.0)) {
+                callback()
+            } else {
+                callback(new Error('超出可出金额'))
+            }
+        }
+    }],
 }
 
 const onCancel = (isRefresh = false) => {
@@ -50,13 +60,17 @@ const onCancel = (isRefresh = false) => {
 const formSubmit = () => {
     formRef.value?.validate((valid) => {
         if (valid) {
-            onSubmit().then(() => {
-                ElMessage.success('提交成功')
-            }).catch((err) => {
-                ElMessage.warning(err)
-            }).finally(() => {
-                onCancel(true)
-            })
+            if (formData.CusBankID) {
+                onSubmit().then(() => {
+                    ElMessage.success('提交成功')
+                }).catch((err) => {
+                    ElMessage.warning(err)
+                }).finally(() => {
+                    onCancel(true)
+                })
+            } else {
+                ElMessage.error('未签约')
+            }
         }
     })
 }

+ 1 - 1
src/packages/pc/views/footer/performance/components/contracted/index.vue

@@ -47,7 +47,7 @@ const formRules: FormRules = {
     Attachment: [{
         required: true,
         validator: (rule, value, callback) => {
-            if (formData.Attachment) {
+            if (value) {
                 callback()
             } else {
                 callback(new Error('请上传附件'))