在新發布上線的Pro多店版2.4.0版本中,門店操作端(store)的財務-財務設置功能。
官方對【提現銀行開戶行】、【銀行卡號】、【支付寶賬號】、【微信賬號】等字段進行了限制??奢斎氲淖址L度為20個。
這里對于使用郵箱作為支付寶賬號的用戶不是很友好。建議解除該限制。
這里需要特別注意的是,在數據庫中,官方對數據表eb_system_store的字符做出了varchar限定。
在store的代碼文件中,文件路徑為view/store/src/pages/capital/setting/index.vue的文件,代碼中對input限制了maxlength為“20”。源代碼如下:
<Form :model="formItem" :label-width="120" :rules="rules">
<FormItem label="提現銀行開戶行:">
<Input maxlength="20" show-word-limit type="text" v-model="formItem.bank_address" placeholder="不超過20字" class="input"></Input>
</FormItem>
<FormItem label="銀行卡號:" prop="bank_code">
<Input maxlength="20" show-word-limit v-model="formItem.bank_code" type="text" placeholder="不超過20字" class="input"></Input>
</FormItem>
<FormItem label="支付寶賬號:">
<Input maxlength="20" show-word-limit v-model="formItem.alipay_account" placeholder="不超過20字" class="input"></Input>
</FormItem>
<FormItem label="支付寶收款碼:" class="imgbox">
<div class="pictrueBox" @click="modalPicTap('dan', 'alipay')">
<div class="pictrue" v-if="formItem.alipay_qrcode_url">
<img v-lazy="formItem.alipay_qrcode_url" />
<Input
v-model="formItem.alipay_qrcode_url"
style="display: none"
></Input>
</div>
<div class="upLoad acea-row row-center-wrapper" v-else>
<Input
v-model="formItem.alipay_qrcode_url"
style="display: none"
></Input>
<Icon type="ios-camera-outline" size="26" />
</div>
</div>
</FormItem>
<FormItem label="微信賬號:">
<Input maxlength="20" show-word-limit v-model="formItem.wechat" placeholder="不超過20字" class="input"></Input>
</FormItem>
<FormItem label="微信收款碼:" class="imgbox">
<div class="pictrueBox" @click="modalPicTap('dan', 'weixin')">
<div class="pictrue" v-if="formItem.wechat_qrcode_url">
<img v-lazy="formItem.wechat_qrcode_url" />
<Input
v-model="formItem.wechat_qrcode_url"
style="display: none"
></Input>
</div>
<div class="upLoad acea-row row-center-wrapper" v-else>
<Input
v-model="formItem.wechat_qrcode_url"
style="display: none"
></Input>
<Icon type="ios-camera-outline" size="26" />
</div>
</div>
</FormItem>
</Form>
可將input的maxlength中的值修改成需要限定的字節長度即可。
如以下全部修改為32個字節:
<Form :model="formItem" :label-width="120" :rules="rules">
<FormItem label="提現銀行開戶行:">
<Input maxlength="32" show-word-limit type="text" v-model="formItem.bank_address" placeholder="不超過32字" class="input"></Input>
</FormItem>
<FormItem label="銀行卡號:" prop="bank_code">
<Input maxlength="32" show-word-limit v-model="formItem.bank_code" type="text" placeholder="不超過32字" class="input"></Input>
</FormItem>
<FormItem label="支付寶賬號:">
<Input maxlength="32" show-word-limit v-model="formItem.alipay_account" placeholder="不超過32字" class="input"></Input>
</FormItem>
<FormItem label="支付寶收款碼:" class="imgbox">
<div class="pictrueBox" @click="modalPicTap('dan', 'alipay')">
<div class="pictrue" v-if="formItem.alipay_qrcode_url">
<img v-lazy="formItem.alipay_qrcode_url" />
<Input
v-model="formItem.alipay_qrcode_url"
style="display: none"
></Input>
</div>
<div class="upLoad acea-row row-center-wrapper" v-else>
<Input
v-model="formItem.alipay_qrcode_url"
style="display: none"
></Input>
<Icon type="ios-camera-outline" size="26" />
</div>
</div>
</FormItem>
<FormItem label="微信賬號:">
<Input maxlength="32" show-word-limit v-model="formItem.wechat" placeholder="不超過32字" class="input"></Input>
</FormItem>
<FormItem label="微信收款碼:" class="imgbox">
<div class="pictrueBox" @click="modalPicTap('dan', 'weixin')">
<div class="pictrue" v-if="formItem.wechat_qrcode_url">
<img v-lazy="formItem.wechat_qrcode_url" />
<Input
v-model="formItem.wechat_qrcode_url"
style="display: none"
></Input>
</div>
<div class="upLoad acea-row row-center-wrapper" v-else>
<Input
v-model="formItem.wechat_qrcode_url"
style="display: none"
></Input>
<Icon type="ios-camera-outline" size="26" />
</div>
</div>
</FormItem>
</Form>
在修改完input的限定后,把數據庫中的varchar()修改成相應的長度。通常,在實例中,varchar()長度應當等于input中maxlength的2倍。即32*2,varchar的長度應為varchar(64)。
=================================================
在官方數據庫字典中,eb_system_store表下的字段wechat限定了varchar(15),而input中maxlength限定為20,這種方式容易導致數據保存時出錯。
以上內容是在實際操作中存在的問題,可以參照此方式進行修改。建議官方在下一次版本更新時,優化此部分內容。
=================================================
【產品名稱】:CRMEB_Pro_M
【產品版本】:v2.4.0
【部署方式】:Linux寶塔面板
【部署環境】:線上環境
【php版本】:7.4
【Mysql版本】:5.7
【使用終端】:后臺