li.shaoyi 3 năm trước cách đây
mục cha
commit
6afb6a8c61

+ 2 - 2
public/config/appconfig.json

@@ -1,5 +1,5 @@
 {
-  "version": "1.0.4",
-  "versionCode": "100004",
+  "version": "1.0.5",
+  "versionCode": "100005",
   "apiUrl": "http://218.17.158.45:16021/cfg?key=test_thj"
 }

+ 22 - 20
src/business/bank/index.ts

@@ -322,17 +322,17 @@ export function useDoBankSign() {
 
     const { getBankAccountList, bankInfo } = useBankAccountSign()
     /// 判断是否有签约信息 有就做修改
-    getBankAccountList().then(()=>{
+    getBankAccountList().then(() => {
         if (bankInfo.value) {
             ({
-                currency:formData.Currency,
-                 cusbankid:formData.CusBankID,
-                 accountcode:formData.AccountCode,
-                 accountname:formData.BankAccountName,
-                 branchbankname: formData.OpenBankName,
-                 bankaccountno: formData.BankAccountNo,
-                 bankid:formData.OpenBankAccId,
-                }=bankInfo.value)
+                currency: formData.Currency,
+                cusbankid: formData.CusBankID,
+                accountcode: formData.AccountCode,
+                accountname: formData.BankAccountName,
+                branchbankname: formData.OpenBankName,
+                bankaccountno: formData.BankAccountNo,
+                bankid: formData.OpenBankAccId,
+            } = bankInfo.value)
         }
     })
 
@@ -341,7 +341,6 @@ export function useDoBankSign() {
         AccountType: 1,
         IsForce: 0,
         AgentCertType: 0,
-        OperateType: bankInfo.value ? 1 : 2,
         BankCardType: 0,
         BankAccountType: 1,
         extend_info: JSON.stringify({ "sex": 1 }),
@@ -360,6 +359,7 @@ export function useDoBankSign() {
         return t2bBankSign({
             data: {
                 ...formData,
+                OperateType: bankInfo.value ? 2 : 1,
                 ExtOperatorID: new Date().getTime(),
                 AccountName: formData.BankAccountName,
                 ExBankName: banklist.value.find(obj => obj.bankid === formData.OpenBankAccId)?.bankname
@@ -382,7 +382,7 @@ export function useDoBankSign() {
 /// 银行解约请求
 export function useDoCancelBankSign() {
     const { getBankAccountList, bankInfo } = useBankAccountSign()
-    
+
     /// 获取UserId
     const loading = shallowRef(false)
 
@@ -393,14 +393,15 @@ export function useDoCancelBankSign() {
     /// 获取当前是否已签约
     const sign = shallowRef<Model.BankAccountSignRsp[]>([])
 
-    getBankAccountList().then(()=>{
-        ({
-            currency:formData.Currency,
-             cusbankid:formData.CusBankID,
-             accountcode:formData.AccountCode,
-            }=bankInfo.value ?? {})
-        
-    })
+    const formRefresh = () => {
+        getBankAccountList().then(() => {
+            ({
+                currency: formData.Currency,
+                cusbankid: formData.CusBankID,
+                accountcode: formData.AccountCode,
+            } = bankInfo.value ?? {})
+        })
+    }
 
     const cancelSubmit = async () => {
         // await request
@@ -422,7 +423,8 @@ export function useDoCancelBankSign() {
         cancelSubmit,
         formData,
         sign,
-        bankInfo
+        bankInfo,
+        formRefresh
     }
 }
 

+ 3 - 1
src/packages/mobile/views/bank/sign/index.vue

@@ -26,13 +26,14 @@
 </template>
 
 <script lang="ts" setup>
+import { onActivated } from 'vue'
 import { CellGroup, Cell, Button, Empty, Toast } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { getSignStatusName } from '@/constants/bank'
 import { useDoCancelBankSign } from '@/business/bank'
 import { useNavigation } from '@/hooks/navigation'
 
-const { cancelSubmit, bankInfo } = useDoCancelBankSign()
+const { cancelSubmit, formRefresh, bankInfo } = useDoCancelBankSign()
 const { router, routerTo } = useNavigation()
 
 const formSubmit = () => {
@@ -52,6 +53,7 @@ const formSubmit = () => {
     })
 }
 
+onActivated(() => formRefresh())
 </script>
 
 <style lang="less">

+ 3 - 2
src/packages/mobile/views/goods/details/index.vue

@@ -21,7 +21,8 @@
                     :options="presaleApplyDeposits" v-if="presaleApplyId" />
                 <Field v-model="formData.Qty" name="Qty" type="digit" label="采购数量" placeholder="必填"
                     :rules="formRules.Qty" />
-                <Field label="收货信息" placeholder="请输入" @click="openComponent('address')" is-link v-if="showAddress" />
+                <Field label="收货信息" placeholder="请输入" @click="openComponent('address')" is-link
+                    v-if="showReceiptInfo" />
             </CellGroup>
         </Form>
         <Button type="primary" @click="formRef?.submit" round block>采购下单</Button>
@@ -64,7 +65,7 @@ const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq]?: FieldRule[]
 }
 
 // 是否显示收货信息
-const showAddress = computed(() => {
+const showReceiptInfo = computed(() => {
     return formData.THJDeliveryMode === 2 || formData.THJDeliveryMode === 3
 })
 

+ 3 - 3
src/packages/mobile/views/home/components/mine/index.vue

@@ -25,15 +25,15 @@
         <div class="bank" v-if="accountInfo">
           <div class="bank-item">
             <span>余额</span>
-            <span>{{ accountInfo.currentbalance }}</span>
+            <span>{{ accountInfo.currentbalance.toFixed(2) }}</span>
           </div>
           <div class="bank-item">
             <span>冻结</span>
-            <span>{{ freezeMargin }}</span>
+            <span>{{ freezeMargin.toFixed(2) }}</span>
           </div>
           <div class="bank-item">
             <span>可用</span>
-            <span>{{ avaiableMoney }}</span>
+            <span>{{ avaiableMoney.toFixed(2) }}</span>
           </div>
           <div class="bank-item">
             <span>

+ 1 - 1
src/packages/mobile/views/home/index.vue

@@ -59,7 +59,7 @@ const tabList: Tabbar[] = [
 ]
 
 const onChange = (index: number) => {
-  if (![2].includes(index)) {
+  if (![1, 2].includes(index)) {
     componentId.value = tabList[index].name
   }
 }