在新發(fā)布上線的Pro多店版2.4.0版本中,門店操作端(store)的財(cái)務(wù)-財(cái)務(wù)設(shè)置功能。
官方對(duì)【提現(xiàn)銀行開戶行】、【銀行卡號(hào)】、【支付寶賬號(hào)】、【微信賬號(hào)】等字段進(jìn)行了限制??奢斎氲淖址L(zhǎng)度為20個(gè)。
這里對(duì)于使用郵箱作為支付寶賬號(hào)的用戶不是很友好。建議解除該限制。
這里需要特別注意的是,在數(shù)據(jù)庫中,官方對(duì)數(shù)據(jù)表eb_system_store的字符做出了varchar限定。
在store的代碼文件中,文件路徑為view/store/src/pages/capital/setting/index.vue的文件,代碼中對(duì)input限制了maxlength為“20”。源代碼如下:
<Form :model="formItem" :label-width="120" :rules="rules">
<FormItem label="提現(xiàn)銀行開戶行:">
<Input maxlength="20" show-word-limit type="text" v-model="formItem.bank_address" placeholder="不超過20字" class="input"></Input>
</FormItem>
<FormItem label="銀行卡號(hào):" prop="bank_code">
<Input maxlength="20" show-word-limit v-model="formItem.bank_code" type="text" placeholder="不超過20字" class="input"></Input>
</FormItem>
<FormItem label="支付寶賬號(hào):">
<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="微信賬號(hào):">
<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中的值修改成需要限定的字節(jié)長(zhǎng)度即可。
如以下全部修改為32個(gè)字節(jié):
<Form :model="formItem" :label-width="120" :rules="rules">
<FormItem label="提現(xiàn)銀行開戶行:">
<Input maxlength="32" show-word-limit type="text" v-model="formItem.bank_address" placeholder="不超過32字" class="input"></Input>
</FormItem>
<FormItem label="銀行卡號(hào):" prop="bank_code">
<Input maxlength="32" show-word-limit v-model="formItem.bank_code" type="text" placeholder="不超過32字" class="input"></Input>
</FormItem>
<FormItem label="支付寶賬號(hào):">
<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="微信賬號(hào):">
<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的限定后,把數(shù)據(jù)庫中的varchar()修改成相應(yīng)的長(zhǎng)度。通常,在實(shí)例中,varchar()長(zhǎng)度應(yīng)當(dāng)?shù)扔趇nput中maxlength的2倍。即32*2,varchar的長(zhǎng)度應(yīng)為varchar(64)。
=================================================
在官方數(shù)據(jù)庫字典中,eb_system_store表下的字段wechat限定了varchar(15),而input中maxlength限定為20,這種方式容易導(dǎo)致數(shù)據(jù)保存時(shí)出錯(cuò)。
以上內(nèi)容是在實(shí)際操作中存在的問題,可以參照此方式進(jìn)行修改。建議官方在下一次版本更新時(shí),優(yōu)化此部分內(nèi)容。
=================================================
【產(chǎn)品名稱】:CRMEB_Pro_M
【產(chǎn)品版本】:v2.4.0
【部署方式】:Linux寶塔面板
【部署環(huán)境】:線上環(huán)境
【php版本】:7.4
【Mysql版本】:5.7
【使用終端】:后臺(tái)