Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui into dev-gl
commit
f4b7068cd6
|
@ -11,6 +11,16 @@
|
|||
<FormItem label="身份证号" prop="idNumber">
|
||||
<Input v-model="applyForm.idNumber"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="银行开户行" prop="settlementBankBranchName">
|
||||
<Input v-model="applyForm.settlementBankBranchName"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="银行开户名" prop="settlementBankAccountName">
|
||||
<Input v-model="applyForm.settlementBankAccountName"></Input>
|
||||
</FormItem>
|
||||
<FormItem label="银行账号" prop="settlementBankAccountNum">
|
||||
<Input v-model="applyForm.settlementBankAccountNum"></Input>
|
||||
</FormItem>
|
||||
|
||||
<FormItem>
|
||||
<Button type="primary" :loading="applyLoading" @click="apply">提交申请</Button>
|
||||
</FormItem>
|
||||
|
@ -161,6 +171,7 @@
|
|||
<script>
|
||||
import {distribution, applyDistribution, distCash, distCashHistory, getDistGoodsList, selectDistGoods} from '@/api/member.js'
|
||||
import { IDCard } from '@/plugins/RegExp.js';
|
||||
import {checkBankno} from '@/plugins/Foundation'
|
||||
import vueQr from 'vue-qr';
|
||||
export default {
|
||||
name: 'Distribution',
|
||||
|
@ -174,7 +185,41 @@ export default {
|
|||
idNumber: [
|
||||
{required: true, message: '请输入身份证号'},
|
||||
{pattern: IDCard, message: '请输入正确的身份证号'}
|
||||
]
|
||||
],
|
||||
settlementBankBranchName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入银行开户行",
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: "blur",
|
||||
},
|
||||
|
||||
],
|
||||
settlementBankAccountName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入银行开户名",
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
//银行账号
|
||||
settlementBankAccountNum: [
|
||||
{
|
||||
required: true,
|
||||
message: "银行账号不正确",
|
||||
// 可以单个或者同时写两个触发验证方式
|
||||
trigger: "blur",
|
||||
},
|
||||
{
|
||||
validator: (rule, value, callback) => {
|
||||
// 上面有说,返回true表示校验通过,返回false表示不通过
|
||||
// this.$u.test.mobile()就是返回true或者false的
|
||||
return checkBankno(value);
|
||||
},
|
||||
message: "银行账号不正确",
|
||||
},
|
||||
],
|
||||
},
|
||||
tabName: 'goodsChecked', // 当前所在tab
|
||||
result: {}, // 审核结果
|
||||
|
|
|
@ -8,6 +8,74 @@
|
|||
* randomString 随机生成指定长度的字符串
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 验证银行卡号
|
||||
*/
|
||||
export function checkBankno(bankno) {
|
||||
var lastNum = bankno.substr(bankno.length - 1, 1); //取出最后一位(与luhm进行比较)
|
||||
var first15Num = bankno.substr(0, bankno.length - 1); //前15或18位
|
||||
var newArr = [];
|
||||
|
||||
for (var i = first15Num.length - 1; i > -1; i--) {
|
||||
//前15或18位倒序存进数组
|
||||
newArr.push(first15Num.substr(i, 1));
|
||||
}
|
||||
|
||||
var arrJiShu = []; //奇数位*2的积 <9
|
||||
var arrJiShu2 = []; //奇数位*2的积 >9
|
||||
var arrOuShu = []; //偶数位数组
|
||||
for (var j = 0; j < newArr.length; j++) {
|
||||
if ((j + 1) % 2 == 1) {
|
||||
//奇数位
|
||||
if (parseInt(newArr[j]) * 2 < 9) arrJiShu.push(parseInt(newArr[j]) * 2);
|
||||
else arrJiShu2.push(parseInt(newArr[j]) * 2);
|
||||
} //偶数位
|
||||
else arrOuShu.push(newArr[j]);
|
||||
}
|
||||
|
||||
var jishu_child1 = []; //奇数位*2 >9 的分割之后的数组个位数
|
||||
var jishu_child2 = []; //奇数位*2 >9 的分割之后的数组十位数
|
||||
for (var h = 0; h < arrJiShu2.length; h++) {
|
||||
jishu_child1.push(parseInt(arrJiShu2[h]) % 10);
|
||||
jishu_child2.push(parseInt(arrJiShu2[h]) / 10);
|
||||
}
|
||||
|
||||
var sumJiShu = 0; //奇数位*2 < 9 的数组之和
|
||||
var sumOuShu = 0; //偶数位数组之和
|
||||
var sumJiShuChild1 = 0; //奇数位*2 >9 的分割之后的数组个位数之和
|
||||
var sumJiShuChild2 = 0; //奇数位*2 >9 的分割之后的数组十位数之和
|
||||
var sumTotal = 0;
|
||||
for (var m = 0; m < arrJiShu.length; m++) {
|
||||
sumJiShu = sumJiShu + parseInt(arrJiShu[m]);
|
||||
}
|
||||
for (var n = 0; n < arrOuShu.length; n++) {
|
||||
sumOuShu = sumOuShu + parseInt(arrOuShu[n]);
|
||||
}
|
||||
for (var p = 0; p < jishu_child1.length; p++) {
|
||||
sumJiShuChild1 = sumJiShuChild1 + parseInt(jishu_child1[p]);
|
||||
sumJiShuChild2 = sumJiShuChild2 + parseInt(jishu_child2[p]);
|
||||
}
|
||||
//计算总和
|
||||
sumTotal =
|
||||
parseInt(sumJiShu) +
|
||||
parseInt(sumOuShu) +
|
||||
parseInt(sumJiShuChild1) +
|
||||
parseInt(sumJiShuChild2);
|
||||
//计算Luhm值
|
||||
var k = parseInt(sumTotal) % 10 == 0 ? 10 : parseInt(sumTotal) % 10;
|
||||
var luhm = 10 - k;
|
||||
if (lastNum == luhm) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 将unix时间戳转换为指定格式
|
||||
* @param unix 时间戳【秒】
|
||||
|
|
|
@ -496,7 +496,7 @@ export default {
|
|||
|
||||
lastNum.push({
|
||||
date: item.date.substring(5),
|
||||
title: "上周记录",
|
||||
title: "上一周期",
|
||||
lastNum: item.lastNum || 0,
|
||||
res: item.lastNum || 0,
|
||||
});
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<div class="wap-content-desc">
|
||||
<div class="wap-content-desc-title">{{ item.goodsName }}</div>
|
||||
<div class="wap-sku">{{ item.goodsUnit }}</div>
|
||||
<div class="wap-sku"><Tag :color="item.salesModel === 'RETAIL' ? 'default' : 'geekblue'">{{item.salesModel === "RETAIL" ? "零售型" : "批发型"}}</Tag></div>
|
||||
<div class="wap-content-desc-bottom">
|
||||
<div>¥{{ item.price | unitPrice }}</div>
|
||||
</div>
|
||||
|
@ -54,6 +55,7 @@ export default {
|
|||
categoryPath: "",
|
||||
marketEnable: "UPPER",
|
||||
authFlag: "PASS",
|
||||
sort:"createTime"
|
||||
},
|
||||
category: [], // 分类
|
||||
goodsData: [], // 商品数据
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
cursor: pointer;
|
||||
|
||||
display: flex;
|
||||
height: 80px;
|
||||
height: 100px;
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
<div class="wap-content-desc">
|
||||
<div class="wap-content-desc-title">{{ item.goodsName }}</div>
|
||||
<div class="wap-sku">{{ item.goodsUnit }}</div>
|
||||
<div class="wap-sku"><Tag :color="item.salesModel === 'RETAIL' ? 'default' : 'geekblue'">{{item.salesModel === "RETAIL" ? "零售型" : "批发型"}}</Tag></div>
|
||||
<div class="wap-content-desc-bottom">
|
||||
<div>¥{{ item.price | unitPrice }}</div>
|
||||
</div>
|
||||
|
@ -65,6 +66,7 @@ export default {
|
|||
categoryPath: "",
|
||||
marketEnable: "UPPER",
|
||||
authFlag: "PASS",
|
||||
sort:"createTime"
|
||||
},
|
||||
category: [], // 选中的商品分类
|
||||
goodsData: [], // 商品列表
|
||||
|
@ -244,9 +246,7 @@ export default {
|
|||
margin: 10px 7px;
|
||||
padding: 6px 0;
|
||||
}
|
||||
// .wap-content-item{
|
||||
|
||||
// }
|
||||
.active {
|
||||
background: url("../../assets/selected.png") no-repeat;
|
||||
background-position: right;
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
cursor: pointer;
|
||||
|
||||
display: flex;
|
||||
height: 80px;
|
||||
height: 100px;
|
||||
padding: 2px;
|
||||
overflow: hidden;
|
||||
align-items: center;
|
||||
|
|
Loading…
Reference in New Issue