فهرست منبع

Merge branch 'v20' of http://192.168.31.240:3000/MTP2.0_New/MTP20_WEB_GLOBAL into v20

li.shaoyi 3 ماه پیش
والد
کامیت
c0248f157b

+ 3 - 2
src/packages/mobile/views/mall/trade/Index.vue

@@ -33,7 +33,8 @@
                     </div>
                 </template>
             </Field>
-            <Field name="Region" v-model="formData.AddrInfo" type="textarea" autosize clearable :rules="formRules.AddrInfo" maxlength="50" label="地址" :placeholder="$t('common.required')">
+            <Field name="AddrInfo" v-model="formData.AddrInfo" type="textarea" autosize clearable maxlength="50" 
+                label="地址" :placeholder="$t('common.required')" :rules="formRules.AddrInfo">
                 <template #right-icon>
                     <Icon name="add-o" @click="showContact = true" />
                 </template>
@@ -49,7 +50,7 @@
         <app-contact v-model:show="showContact" @change="contactChange" />
         <template #footer v-if="goods">
             <div class="g-form__footer inset">
-                <Button type="danger" block :disabled="orderQty === 0" @click="onSubmit">
+                <Button type="danger" block :disabled="orderQty === 0" @click="formRef?.submit()">
                     {{ $t('operation.buynow') }}
                 </Button>
             </div>

+ 1 - 1
src/packages/mobile/views/score/trade/Index.vue

@@ -49,7 +49,7 @@
         <app-contact v-model:show="showContact" @change="contactChange" />
         <template #footer v-if="goods">
             <div class="g-form__footer inset">
-                <Button type="danger" block :disabled="orderQty === 0" @click="onSubmit">
+                <Button type="danger" block :disabled="orderQty === 0" @click="formRef?.submit()">
                     {{ $t('operation.buynow') }}
                 </Button>
             </div>

+ 11 - 2
src/packages/pc/views/market/trade/pricing/list/listing/index.vue

@@ -49,8 +49,7 @@
                 </el-form-item>
                 <el-form-item v-if="selectedGoods?.trademode === 53 || selectedGoods?.trademode === 54" class="el-form-item--row" prop="AddrInfo" :label="t('quote.pricing.address')">
                     <div class="el-form-item--col">
-                        <el-input type="textarea" :placeholder="t('performance.pleaseentertheaddress')"
-                            :rows="3" v-model="formData.AddrInfo" />
+                        <el-input type="textarea" :placeholder="t('performance.pleaseentertheaddress')" :rows="3" v-model="formData.AddrInfo" />
                         <el-icon :size="20" style="cursor: pointer;" @click="showAddress = true" >
                             <CirclePlusFilled />
                         </el-icon>
@@ -233,6 +232,16 @@ const formRules: FormRules = {
             }
         }
     }],
+    AddrInfo: [{
+        required: true,
+        validator: (rule, value, callback) => {
+            if (value) {
+                callback()
+            } else {
+                callback(new Error('请输入地址信息'))
+            }
+        }
+    }]
     // SlPrice: [{
     //     required: true,
     //     type: 'number',