li.shaoyi 10 月之前
父节点
当前提交
4697cfad5e

+ 2 - 2
oem/tss/config/appconfig.json

@@ -1,8 +1,8 @@
 {
   "appId": "com.muchinfo.tss",
   "appName": "TCE",
-  "version": "1.0.40",
-  "versionCode": "100040",
+  "version": "1.0.41",
+  "versionCode": "100041",
   "apiUrl": "http://192.168.31.210:8080/cfg?key=test_210",
   "tradeChannel": "ws",
   "showLoginAlert": true,

+ 17 - 33
src/packages/mobile/views/bank/sign/components/edit/Index.vue

@@ -8,8 +8,15 @@
             <Form ref="formRef" class="g-form__container" @submit="formSubmit">
                 <CellGroup inset>
                     <!-- 错误 #6595 已签约状态的签约信息,修改时应限制修改银行渠道 -->
-                    <Field v-if="bankInfo?.signstatus === 4 && selectCusBank" :label="$t('banksign.bankchannel')" v-model="selectCusBank.cusbankname" name="cusBankName" :rules="formRules.CusBankID" readonly />
-                    <Field :label="$t('banksign.bankchannel')" v-model="cusBankName" :placeholder="$t('banksign.tips16')" name="cusBankName" :rules="formRules.CusBankID" @click-input="showCusBank = true" is-link v-else />
+                    <Field v-if="bankInfo?.signstatus === 4 && selectCusBank" :label="$t('banksign.bankchannel')"
+                        v-model="selectCusBank.cusbankname" readonly />
+                    <Field :label="$t('banksign.bankchannel')" :placeholder="$t('banksign.tips16')" name="CusBankID"
+                        :rules="formRules.CusBankID" is-link v-else>
+                        <template #input>
+                            <app-select v-model="formData.CusBankID" :options="cusBanks"
+                                :optionProps="{ label: 'cusbankname', value: 'cusbankid' }" @confirm="cusBankChange" />
+                        </template>
+                    </Field>
                     <!-- <Field name="OpenBankAccId" :label="$t('banksign.bankname')" v-model="formData.ExBankName" readonly
                         v-if="!isedit && userInfo.bankid" />
                     <Field name="OpenBankAccId" :label="$t('banksign.bankname')" v-model="formData.ExBankName"
@@ -68,16 +75,6 @@
                                 :placeholder="$t('common.pleaseenter') + `${item.fieldname}`" />
                         </template>
                     </template>
-                    <Popup v-model:show="showCusBank" position="bottom" teleport="body" round>
-                        <Picker :columns="datalist" @cancel="showCusBank = false" @confirm="cusBankChange"
-                            :confirm-button-text="$t('operation.confirm')" :cancel-button-text="$t('operation.cancel')">
-                            <template #option="{ text, index }">
-                                <slot name="option" :row="datalist[index]" :index="index">
-                                    <span>{{ text }}</span>
-                                </slot>
-                            </template>
-                        </Picker>
-                    </Popup>
                 </CellGroup>
             </Form>
             <template #footer>
@@ -101,6 +98,7 @@ import { validateRules } from '@/constants/regex'
 import { useCountDown } from '@vant/use'
 import { useUserStore, i18n } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
+import AppSelect from '@mobile/components/base/select/index.vue'
 
 const props = defineProps({
     isedit: {
@@ -120,33 +118,19 @@ const refresh = shallowRef(false) // 是否刷新父组件数据
 const formRef = shallowRef<FormInstance>()
 const showSelect = shallowRef(false) // 弹出客户选择界面
 const showSearch = shallowRef(false) // 弹出客户搜索界面
-const showCusBank = shallowRef(false) // 弹出银行渠道
 const { configs } = useDoCusBankExtendConfigs(1)
 const userStore = useUserStore()
 const { userInfo } = userStore.$toRefs()
-const cusBankName = shallowRef('')
 
 const { global: { t } } = i18n
 
-const datalist = computed(() => {
-    return cusBanks.value.map(e => {
-        return { text: e.cusbankname, value: e.cusbankid }
-    })
-})
+const cusBankChange = () => {
+    // 清空银行信息
+    formData.ExBankName = undefined
+    formData.OpenBankAccId = undefined
 
-const cusBankChange = ({ selectedOptions }) => {
-
-    if (selectedOptions[0].value != formData.CusBankID) {
-        // 清空银行信息
-        formData.ExBankName = undefined
-        formData.OpenBankAccId = undefined
-    }
-
-    showCusBank.value = false
-    formData.CusBankID = selectedOptions[0].value
     selectCusBank.value = cusBanks.value.find(e => e.cusbankid === formData.CusBankID)
-    const { tradedate, currency, cusbankid, cusbankname } = selectCusBank.value ?? {}
-    cusBankName.value = cusbankname ?? ''
+    const { tradedate, currency, cusbankid } = selectCusBank.value ?? {}
 
     formData.TradeDate = tradedate
     formData.Currency = currency
@@ -157,6 +141,8 @@ const cusBankChange = ({ selectedOptions }) => {
 
     swsFormData.CusBankID = cusbankid
     swsFormData.TradeDate = tradedate
+
+    formRef.value?.validate('CusBankID')
 }
 
 // 银行列表
@@ -230,7 +216,6 @@ const onSearchBankChange = (item: Model.BankBranChnumInfoRsp) => {
 const formRules: { [key: string]: FieldRule[] } = {
     CusBankID: [{
         message: t('banksign.tips16'),
-        required: true,
         validator: () => {
             return !!formData.CusBankID
         }
@@ -328,7 +313,6 @@ watch(configs, (data) => {
 onMounted(() => {
     // 任务 #6605
     if (formData.CusBankID) {
-        cusBankName.value = bankInfo.value?.cusbankname ?? ''
         formData.CusBankID = bankInfo.value?.cusbankid
     }
 })

+ 6 - 5
src/utils/h5plus/index.ts

@@ -530,7 +530,7 @@ export default new (class {
      * 请求APP权限
      */
     requestPermission(options: Partial<{
-        permissionId: string;
+        permissions: string[];
         errorMessage?: string;
         refuseMessage?: string;
         onSuccess?: () => void;
@@ -539,7 +539,7 @@ export default new (class {
         const { onSuccess, onError } = options
         if (this.hasPlus()) {
             this.onPlusReady((plus) => {
-                plus.android.requestPermissions([options.permissionId], (e: { granted: string[]; deniedPresent: string[]; deniedAlways: string[]; }) => {
+                plus.android.requestPermissions(options.permissions, (e: { granted: string[]; deniedPresent: string[]; deniedAlways: string[]; }) => {
                     if (e.deniedAlways.length > 0) {
                         onError && onError(options.refuseMessage ?? '')
                     }
@@ -562,8 +562,9 @@ export default new (class {
      * 请求存储权限
      */
     requestPermissionReadExternalStorage(options: Partial<{ onSuccess: () => void; onError: (message: string) => void; }> = {}) {
+        // https://ask.dcloud.net.cn/question/190261
         this.requestPermission({
-            permissionId: 'android.permission.READ_EXTERNAL_STORAGE',
+            permissions: ['android.permission.READ_EXTERNAL_STORAGE', 'android.permission.READ_MEDIA_IMAGES'],
             errorMessage: '请打开存储权限',
             refuseMessage: '访问存储被拒绝',
             onSuccess: options.onSuccess,
@@ -576,7 +577,7 @@ export default new (class {
      */
     requestPermissionCamera(options: Partial<{ onSuccess: () => void; onError: (message: string) => void; }> = {}) {
         this.requestPermission({
-            permissionId: 'android.permission.CAMERA',
+            permissions: ['android.permission.CAMERA', 'android.permission.READ_MEDIA_VIDEO'],
             errorMessage: '请打开摄像头权限',
             refuseMessage: '访问摄像头被拒绝',
             onSuccess: options.onSuccess,
@@ -589,7 +590,7 @@ export default new (class {
      */
     requestPermissionRecordAudio(options: Partial<{ onSuccess: () => void; onError: (message: string) => void; }> = {}) {
         this.requestPermission({
-            permissionId: 'android.permission.RECORD_AUDIO',
+            permissions: ['android.permission.RECORD_AUDIO', 'android.permission.READ_MEDIA_AUDIO'],
             errorMessage: '访问麦克风被拒绝',
             refuseMessage: '请打开麦克风权限',
             onSuccess: options.onSuccess,