li.shaoyi 2 年之前
父節點
當前提交
8a40bc54e5

+ 2 - 1
oem/gcszt/config/appconfig.json

@@ -6,7 +6,8 @@
   "apiUrl": "http://192.168.31.204:8080/cfg?key=test_204",
   "tradeChannel": "ws",
   "modules": [
-    "register"
+    "register",
+    "delivery"
   ],
   "quotationPropertys": [
     "holdvolume"

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

@@ -12,17 +12,16 @@
                                 :optionProps="{ label: 'bankname', value: 'bankid' }" />
                         </template>
                     </Field>
-                    <Field type="number" name="BankNo" label="银行卡号" maxlength="30" v-model.trim="formData.BankAccountNo" placeholder="请输入银行卡账号"
-                        :rules="formRules.BankAccountNo" />
+                    <Field type="number" name="BankNo" label="银行卡号" maxlength="30" v-model.trim="formData.BankAccountNo"
+                        placeholder="请输入银行卡账号" :rules="formRules.BankAccountNo" />
                     <Field name="AccountName" label="姓名" readonly v-model="formData.AccountName" placeholder="请输入银行卡账户名"
                         :rules="formRules.AccountName" />
                     <Field name="MobilePhone" label="手机号码" :readonly="userStore.userInfo?.mobile2 != ''" maxlength="50"
-                        v-model="formData.MobilePhone" placeholder="请输入手机号码" :rules="formRules.MobilePhone"/>
+                        v-model="formData.MobilePhone" placeholder="请输入手机号码" :rules="formRules.MobilePhone" />
                     <template v-for="(item, index) in configs" :key="index">
                         <template v-if="(item.fieldcode === 'verify_code')">
-                            <Field v-if="(bankInfo === undefined) && showExtendInfo(item)"
-                                v-model="item.value" type="digit" name="vcode" :label="item.fieldname" placeholder="必填"
-                                autocomplete="off">
+                            <Field v-if="(bankInfo === undefined) && showExtendInfo(item)" v-model="item.value" type="digit"
+                                name="vcode" :label="item.fieldname" placeholder="必填" autocomplete="off">
                                 <template #button>
                                     <Button size="small" type="danger" :disabled="isCountdown" @click="sendVerifyCode">
                                         <span v-if="isCountdown">重新发送({{ currentTime.seconds }})</span>
@@ -32,20 +31,19 @@
                             </Field>
                         </template>
                         <template v-else-if="(item.fieldcode === 'bank_branch_name')">
-                            <Field v-if="showExtendInfo(item)" name="OpenBankName"
-                                :label="item.fieldname"
-                                v-model="item.value" maxlength="50" :placeholder="`请输入${item.fieldname}`" :rules="formRules.OpenBankName"/>
+                            <Field v-if="showExtendInfo(item)" name="OpenBankName" :label="item.fieldname"
+                                v-model="item.value" maxlength="50" :placeholder="`请输入${item.fieldname}`"
+                                :rules="formRules.OpenBankName" @click-right-icon="showSearch = true" />
                         </template>
                         <template v-else-if="(item.fieldcode === '100')">
-                            <Field v-if="showExtendInfo(item)" name="OpenBankNo"
-                                :label="item.fieldname"
-                                v-model="item.value" maxlength="50" :placeholder="`请输入${item.fieldname}`" :rules="formRules.OpenBankNo"/>
+                            <Field v-if="showExtendInfo(item)" name="OpenBankNo" :label="item.fieldname"
+                                v-model="item.value" maxlength="50" :placeholder="`请输入${item.fieldname}`"
+                                :rules="formRules.OpenBankNo" />
                         </template>
                         <template v-else>
-                            <Field v-if="showExtendInfo(item)" :name="item.fieldcode"
-                                :label="item.fieldname"
+                            <Field v-if="showExtendInfo(item)" :name="item.fieldcode" :label="item.fieldname"
                                 :readonly="item.fieldcode === 'legal_name' && userStore.userInfo?.legalpersonname != ''"
-                                v-model="item.value" maxlength="50" :placeholder="`请输入${item.fieldname}`"/>
+                                v-model="item.value" maxlength="50" :placeholder="`请输入${item.fieldname}`" />
                         </template>
                     </template>
                 </CellGroup>
@@ -55,13 +53,14 @@
                     <Button type="danger" round block @click="formRef?.submit()">{{ bankInfo ? '修改' : '提交' }}</Button>
                 </div>
             </template>
+            <Search v-model:show="showSearch" @change="onBankChange" />
         </app-view>
     </app-modal>
 </template>
 
 <script lang="ts" setup>
 
-import { shallowRef, ref, computed } from 'vue'
+import { shallowRef, ref, computed, defineAsyncComponent } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, FieldRule, showFailToast } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { useDoBankSign, useDoCusBankExtendConfigs, useT2bSMSVerificationCode } from '@/business/bank'
@@ -71,8 +70,12 @@ import { useUserStore } from '@/stores'
 import AppModal from '@/components/base/modal/index.vue'
 import AppSelect from '@mobile/components/base/select/index.vue'
 
+// 搜索支行
+const Search = defineAsyncComponent(() => import('./search/index.vue'))
+
 const { formData, onSubmit, banklist, bankInfo } = useDoBankSign()
 const showModal = shallowRef(true)
+const showSearch = shallowRef(false) // 弹出客户搜索界面
 const refresh = shallowRef(false) // 是否刷新父组件数据
 const formRef = shallowRef<FormInstance>()
 const { configs } = useDoCusBankExtendConfigs(1)
@@ -102,9 +105,9 @@ const props = defineProps({
 
 /// 是否显示拓展信息
 const showExtendInfo = (item: Model.BankCusBankExtendConfigRsp) => {
-    return (item.usabletype === 1) || 
-           (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) || 
-           (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)
+    return (item.usabletype === 1) ||
+        (item.usabletype === 2 && userStore.userInfo?.userinfotype === 2) ||
+        (item.usabletype === 3 && userStore.userInfo?.userinfotype === 1)
 }
 
 // 发送手机验证码
@@ -122,8 +125,12 @@ const sendVerifyCode = () => {
     })
 }
 
+const onBankChange = (value: string) => {
+    console.log(value)
+}
+
 // 表单验证规则
-const formRules: { [key in keyof Proto.t2bBankSignReq ]?: FieldRule[] } = {
+const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
     OpenBankAccId: [{
         message: '请选择银行信息',
         validator: () => {
@@ -198,7 +205,12 @@ const formSubmit = () => {
 // 关闭弹窗
 const closed = (isRefresh = false) => {
     refresh.value = isRefresh
-    showModal.value = false
+    if (showSearch.value) {
+        showSearch.value = false
+    } else {
+        refresh.value = isRefresh
+        showModal.value = false
+    }
 }
 
 // 暴露组件属性给父组件调用

+ 1 - 1
src/packages/mobile/views/order/inout/components/add/index.vue

@@ -66,7 +66,7 @@ import AppModal from '@/components/base/modal/index.vue'
 import AppSelect from '@mobile/components/base/select/index.vue'
 
 // 搜索客户
-const Search = defineAsyncComponent(() => import('./serach/index.vue'))
+const Search = defineAsyncComponent(() => import('./search/index.vue'))
 
 const showModal = shallowRef(true)
 const showSearch = shallowRef(false) // 弹出客户搜索界面