Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
6fb7e418
提交
6fb7e418
authored
7月 14, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加商品优化
上级
1f1201d7
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
220 行增加
和
125 行删除
+220
-125
index.vue
src/views/system/asset/withdraw/index.vue
+36
-31
goodsparameter.vue
src/views/system/goods/add/components/goodsparameter.vue
+89
-55
goodsspecifications.vue
...views/system/goods/add/components/goodsspecifications.vue
+93
-23
index.vue
src/views/system/goods/add/index.vue
+2
-16
没有找到文件。
src/views/system/asset/withdraw/index.vue
浏览文件 @
6fb7e418
...
...
@@ -21,20 +21,20 @@
<el-form-item
label=
"手续费"
>
当前手续费为
{{
newFee
}}
元
</el-form-item>
<el-form-item
label=
"银行卡"
prop=
"bank
I
d"
>
<el-select
v-model=
"form.bank
I
d"
placeholder=
"选择到账银行卡"
style=
"width:260px;"
>
<el-form-item
label=
"银行卡"
prop=
"bank
_i
d"
>
<el-select
v-model=
"form.bank
_i
d"
placeholder=
"选择到账银行卡"
style=
"width:260px;"
>
<el-option
v-for=
"item in banklist"
:key=
"item.Id"
:label=
"item.
BankAccountName?item.BankAccountName:item.ZfbAccountN
ame"
:value=
"item.
Id?item.Id:
item.Id"
></el-option>
:label=
"item.
bank_name ? item.bank_name : bank_account_n
ame"
:value=
"item.
id ? item.id :
item.Id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"提现金额"
prop=
"
money
"
>
<el-input
v-model=
"form.
money
"
<el-form-item
label=
"提现金额"
prop=
"
amount
"
>
<el-input
v-model=
"form.
amount
"
@
blur=
"onInputBlur($event)"
placeholder=
"提现金额大于等于100"
style=
"width:260px;"
/>
</el-form-item>
<el-form-item
label=
"短信验证码"
prop=
"verifycode"
>
<el-form-item
label=
"短信验证码"
prop=
"verifycode"
class=
"spe-code-con-item"
>
<el-input
v-model=
"form.verifycode"
placeholder=
"验证码"
style=
"width:260px;"
>
<template
slot=
"append"
>
<span
v-show=
"show"
@
click=
"getCheckCodeFn"
>
获取验证码
</span>
...
...
@@ -68,7 +68,7 @@
count
:
''
,
timer
:
null
,
//提现金额
money
:
0
,
amount
:
0
,
// 遮罩层
loading
:
true
,
// 选中数组
...
...
@@ -85,13 +85,13 @@
open
:
true
,
// 表单参数
form
:
{
bank
I
d
:
''
,
money
:
''
bank
_i
d
:
''
,
amount
:
''
},
// 表单校验
rules
:
{
bank
I
d
:
[{
required
:
true
,
message
:
"请选择要提现的银行卡"
,
trigger
:
"change"
}],
money
:
[{
required
:
true
,
message
:
"提现金额不能为空"
,
trigger
:
"blur"
}],
bank
_i
d
:
[{
required
:
true
,
message
:
"请选择要提现的银行卡"
,
trigger
:
"change"
}],
amount
:
[{
required
:
true
,
message
:
"提现金额不能为空"
,
trigger
:
"blur"
}],
verifycode
:
[{
required
:
true
,
message
:
"短信验证码不能为空"
,
trigger
:
"blur"
}],
pwd
:
[{
required
:
true
,
message
:
"支付密码必须填写"
,
trigger
:
"blur"
}]
}
...
...
@@ -144,19 +144,19 @@
},
getCheckCodeFn
()
{
let
numRegExp
=
/^
[
0-9
]
+
(
.
[
0-9
]{2})?
$/
;
let
numberMoney
=
Number
(
this
.
form
.
money
);
let
numberMoney
=
Number
(
this
.
form
.
amount
);
let
numberCash
=
Number
(
this
.
drawableCash
);
if
(
this
.
form
.
bank
I
d
===
''
)
{
this
.
$refs
.
form
.
validateField
(
"bank
I
d"
);
if
(
this
.
form
.
bank
_i
d
===
''
)
{
this
.
$refs
.
form
.
validateField
(
"bank
_i
d"
);
return
;
}
if
(
this
.
form
.
money
===
''
)
{
this
.
$refs
.
form
.
validateField
(
"
money
"
);
if
(
this
.
form
.
amount
===
''
)
{
this
.
$refs
.
form
.
validateField
(
"
amount
"
);
return
;
}
if
(
!
numRegExp
.
test
(
this
.
form
.
money
))
{
if
(
!
numRegExp
.
test
(
this
.
form
.
amount
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'提现金额只能输入大于 0 的数字'
});
return
;
}
...
...
@@ -186,27 +186,27 @@
onInputBlur
(
event
)
{
let
fee
=
0.006
;
this
.
form
.
money
=
event
.
target
.
value
;
this
.
form
.
amount
=
event
.
target
.
value
;
let
numRegExp
=
/^
[
0-9
]
+
(
.
[
0-9
]{2})?
$/
;
let
numberMoney
=
Number
(
this
.
form
.
money
);
let
numberMoney
=
Number
(
this
.
form
.
amount
);
//debugger
let
numberCash
=
Number
(
this
.
drawableCash
);
if
(
this
.
form
.
money
!==
''
)
{
if
(
!
numRegExp
.
test
(
this
.
form
.
money
))
{
if
(
this
.
form
.
amount
!==
''
)
{
if
(
!
numRegExp
.
test
(
this
.
form
.
amount
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'提现金额只能输入大于 0 的数字'
});
return
;
}
if
(
Number
(
this
.
form
.
money
)
>
Number
(
this
.
drawableCash
))
{
if
(
Number
(
this
.
form
.
amount
)
>
Number
(
this
.
drawableCash
))
{
this
.
$message
({
type
:
'warning'
,
message
:
'提现金额不足!'
});
return
;
}
if
(
Number
(
this
.
form
.
money
)
<
100
)
{
if
(
Number
(
this
.
form
.
amount
)
<
100
)
{
this
.
$message
({
type
:
'warning'
,
message
:
'提现金额需大于或者等于 100'
});
return
;
}
this
.
newFee
=
(
this
.
form
.
money
*
fee
+
1
).
toFixed
(
2
);
this
.
newFee
=
(
this
.
form
.
amount
*
fee
+
1
).
toFixed
(
2
);
}
},
//获取商户的信息
...
...
@@ -246,7 +246,7 @@
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
let
numberMoney
=
Number
(
this
.
form
.
money
);
let
numberMoney
=
Number
(
this
.
form
.
amount
);
let
numberCash
=
Number
(
this
.
drawableCash
);
this
.
form
.
sellerId
=
this
.
sellerId
;
// 再次校验 提现信息
...
...
@@ -263,13 +263,14 @@
return
;
}
// this.form.verifycode = Number(this.form.verifycode
);
this
.
form
.
amount
=
Number
(
this
.
form
.
amount
);
addWithdrawlog
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
msgSuccess
(
response
.
m
sg
);
if
(
response
.
code
==
=
1
)
{
this
.
msgSuccess
(
response
.
m
essage
);
this
.
getList
();
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
response
.
msg
});
}
else
{
this
.
$message
({
type
:
'error'
,
message
:
response
.
message
});
}
});
}
...
...
@@ -283,4 +284,8 @@
width
:
500px
;
margin
:
20px
0
0
120px
;
}
/
deep
/
.spe-code-con-item
.el-input-group__append
{
cursor
:
pointer
;
}
</
style
>
src/views/system/goods/add/components/goodsparameter.vue
浏览文件 @
6fb7e418
...
...
@@ -4,49 +4,62 @@
<el-link
class=
"edit-type-span el-icon-search"
type=
"primary"
:underline=
"false"
>
查看各类价格说明
</el-link>
<span
class=
"tip-span"
>
所有商品价格均为含税价,必须开具发票
</span>
</p>
<div
v-for=
"(item,index) in
goodsPamPr
eList"
:key=
"index"
class=
"single-spe-con"
>
<div
v-for=
"(item,index) in
orgGoodsPam.pamTabl
eList"
:key=
"index"
class=
"single-spe-con"
>
<p
style=
"margin: 10px 0;color: #333;font-size: 14px;font-weight: 400;"
>
<span
style=
"font-size: 12px;color: #909399;margin: 0 8px 0 0"
>
第
{{
index
+
1
}}
个规格
</span>
<span
style=
"margin-right: 20px;"
v-for=
"(itemGS,indexGS) in item"
:key=
"itemGS"
>
<span>
{{
goodsSpecNameList
[
indexGS
]
}}
:
</span>
<span>
{{
itemGS
}}
</span>
<!--
<span
v-html=
"preTableTitle[index]"
>
-->
<!--
{{
preTableTitle
[
index
]
}}
-->
<!--
</span>
-->
<span
v-for=
"(itemv,indexv) in orgGoodsPam.pamDataList[index]"
style=
"margin-right:20px;"
>
{{
orgGoodsPam
.
pamNameList
[
indexv
][
'specName'
]
}}
<span>
:
</span>
{{
itemv
[
0
]
}}
</span>
</p>
<el-table
border
size=
"small"
:data=
"
goodsPamPreTable
"
:data=
"
item
"
style=
"width: 80%"
>
<el-table-column
align=
"center"
prop=
"hh1"
label=
"协议价"
>
<!--
<template
slot-scope=
"scope"
>
--
>
<!--
<span>
{{
scope
.
row
.
agreementPrice
/
100
}}
</span>
--
>
<!--
</
template
>
--
>
<template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh1"
placeholder=
"请输入协议价"
></el-input
>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh2"
label=
"结算价"
>
<!-- <template slot-scope="scope">--
>
<!-- <span>{{ scope.row.guidePrice/100 }}</span>--
>
<!-- </template>--
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh2"
:disabled=
"true"
placeholder=
"根据结算价自动计算"
></el-input
>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh3"
label=
"指导价"
>
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.salePrice" size="mini"/>-->
<!-- </template>-->
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh3"
placeholder=
"请输入指导价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh4"
label=
"市场价"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh4"
placeholder=
"请输入市场价"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh
7"
label=
"市场价
"
>
<
!-- <template slot-scope="scope">--
>
<!-- <el-input v-model="scope.row.salePrice" size="mini"/>--
>
<
!-- </template>--
>
<el-table-column
align=
"center"
prop=
"hh
5"
label=
"库存量
"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh5"
placeholder=
"请输入库存量"
></el-input
>
<
/
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh4"
label=
"库存量"
>
<!-- <template slot-scope="scope">-->
<!-- <span>{{ (scope.row.salePrice*100 + scope.row.freight - scope.row.agreementPrice)/100 }}</span>-->
<!-- </template>-->
<el-table-column
align=
"center"
prop=
"hh6"
label=
"库存预警"
>
<
template
slot-scope=
"scope"
>
<el-input
size=
"mini"
style=
"width:90%"
v-model=
"scope.row.hh6"
placeholder=
"请输入预警值"
></el-input>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hh7"
label=
"图片"
>
<
template
slot-scope=
"scope"
>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
prop=
"hhh5"
label=
"库存预警"
></el-table-column>
<el-table-column
align=
"center"
prop=
"hh6"
label=
"图片"
></el-table-column>
</el-table>
</div>
</div>
</template>
...
...
@@ -62,46 +75,67 @@ export default {
},
data
()
{
return
{
goodsPam
:
[],
orgGoodsPam
:
{},
preTableTitle
:
[],
// 规格名称数组
goodsSpecNameList
:
[],
// 每一个规格,都是一张表格
goodsPamPreList
:[],
goodsPamPreTable
:
[
{
hh1
:
''
,
hh2
:
''
,
hh3
:
''
,
hh4
:
''
,
hh5
:
''
,
hh6
:
''
,
}
],
// goodsSpecNameList: [],
// // 每一个规格,都是一张表格
// goodsPam:[
// {
// speNameList:[ '颜色','尺码' ],
// goodsParametersList: [],
// goodsPamPreTable: [{
// hh1: '',
// hh2: '',
// hh3: '',
// hh4: '',
// hh5: '',
// hh6: '',
// hh7: '',
// }],
// },
// {
// speNameList:[ '颜色','尺码' ],
// goodsParametersList: [],
// goodsPamPreTable: [ {
// hh1: '',
// hh2: '',
// hh3: '',
// hh4: '',
// hh5: '',
// hh6: '',
// hh7: '',
// } ]}
// ],
// goodsPamPreTable: [],
// goodsPamPreObj:
}
// return end
},
watch
:{
'parameterdata.hu1'
:
function
(
val
)
{
this
.
goodsSpecNameList
=
val
;
},
'parameterdata.hu2'
:
function
(
val
)
{
console
.
log
(
100000
,
val
)
this
.
goodsPamPreList
=
[];
this
.
goodsPamPreList
=
val
;
'parameterdata'
:
function
(
val
)
{
this
.
orgGoodsPam
=
val
;
this
.
preTableTitle
=
[];
this
.
orgGoodsPam
.
pamDataList
.
forEach
((
item
)
=>
{
let
preTitle
=
''
;
if
(
!
Array
.
isArray
(
item
))
{
preTitle
=
this
.
orgGoodsPam
.
pamNameList
[
0
].
specName
+
':'
+
item
;
}
else
{
item
.
forEach
((
itemI
,
indexI
)
=>
{
preTitle
+=
(
this
.
orgGoodsPam
.
pamNameList
[
indexI
].
specName
+
" "
+
itemI
)
+
" "
;
});
}
this
.
preTableTitle
.
push
(
preTitle
);
});
},
},
created
()
{
//this.goodsSpecNameList = this.parameterdata
// _this.$Bus.$on("calcSpeTable",function(val) {
// console.log(37,val);
// _this.goodsSpecNameList = val.hu1;
// _this.goodsPamPreList = val.hu2;
// this.$forceUpdate()
// });
//this.orgGoodsPam = this.parameterdata;
},
mounted
()
{
console
.
log
(
"9999"
,
this
.
goodsPamPreList
);
//
console.log("9999",this.goodsPamPreList);
},
methods
:
{
...
...
src/views/system/goods/add/components/goodsspecifications.vue
浏览文件 @
6fb7e418
...
...
@@ -113,7 +113,9 @@ export default {
type
:
'warning'
}).
then
(
async
()
=>
{
this
.
speData
.
splice
(
index
,
1
);
this
.
speNameListChange
();
//this.speNameListChange();
this
.
paramNameInputBlur
();
}).
catch
(()
=>
{})
},
// 规格名称,下拉选值时触发
...
...
@@ -123,9 +125,11 @@ export default {
// 规格名称,有变化时
speNameListChange
()
{
this
.
speNameList
=
[];
this
.
speData
.
forEach
((
item
)
=>
{
this
.
speData
.
forEach
((
item
,)
=>
{
let
obj
=
{
specName
:
''
};
if
(
item
.
specName
)
{
this
.
speNameList
.
push
(
item
.
specName
);
obj
.
specName
=
item
.
specName
;
this
.
speNameList
.
push
(
obj
);
}
});
},
...
...
@@ -138,6 +142,7 @@ export default {
deleteSpeParam
(
index
,
indexSV
)
{
this
.
speData
[
index
].
specValue
.
splice
(
indexSV
,
1
);
//console.log(119,this.speData[index].specValue);
this
.
paramNameInputBlur
();
},
/**
* 规格名称 下拉框 出现/隐藏 触发
...
...
@@ -190,22 +195,67 @@ export default {
paramNameInputBlur
()
{
// 商品规格原始数据
let
orgSpeData
=
this
.
deepClone
(
this
.
speData
);
//debugger
// 进行数据处理后的数据,
let
proSpeData
=
this
.
processData
(
orgSpeData
);
// 笛卡尔积 生成所有规格组合数据
if
(
proSpeData
.
length
>
0
)
{
let
goodsParametersList
=
this
.
cartesian
(
proSpeData
);
// 组织数据 结构
if
(
this
.
speNameList
.
length
>
0
&&
goodsParametersList
.
length
>
0
)
{
let
hufei
=
{
hu1
:
[],
hu2
:
[]
}
hufei
.
hu1
=
this
.
speNameList
;
hufei
.
hu2
=
goodsParametersList
;
this
.
$emit
(
'calcSpeTable'
,
hufei
);
// console.log("规格名称:",hufei);
// 所有数据
let
goodsPam
=
{
pamNameList
:
[],
pamDataList
:
[],
pamTableList
:
[],
};
goodsPam
.
pamNameList
=
this
.
speNameList
;
goodsPam
.
pamDataList
=
goodsParametersList
;
goodsParametersList
.
forEach
((
item
)
=>
{
let
prePamTable
=
[
{
hh1
:
''
,
hh2
:
''
,
hh3
:
''
,
hh4
:
''
,
hh5
:
''
,
hh6
:
''
,
hh7
:
''
}
];
goodsPam
.
pamTableList
.
push
(
prePamTable
)
});
//console.log("最终结果",goodsPam);
this
.
$emit
(
'calcSpeTable'
,
goodsPam
);
// goodsParametersList.forEach((item)=> {
// let goodsPrePam = {
// pamTitleList: [],
// pamTabList: []
// };
// let tableSingle = [{hh1: '', hh2: '', hh3: '', hh4: '', hh5: '', hh6: '', hh7: ''}];
// // let preTitle = '';
// // if (!Array.isArray(item)) {
// // preTitle = this.speNameList[0].specName + ':' + item;
// // }else {
// // item.forEach((itemI,indexI)=> {
// // preTitle += (this.speNameList[indexI].specName + itemI);
// // });
// // }
// // goodsPrePam.pamTitleList.push(preTitle);
// goodsPrePam.pamTabList.push(tableSingle);
//
// goodsPamList.push(goodsPrePam);
// });
//this.$emit('calcSpeTable',goodsPamList);
// console.log("规格名称:",goodsPamList);
}
}
},
/** 数据处理为,二维数组,供笛卡尔积算法方法使用,对空数据进行过滤 */
...
...
@@ -233,9 +283,28 @@ export default {
},
/** 笛卡尔积算法 */
cartesian
(
arr
)
{
// if(arr.length
<
2
)
{
// let res = [];
// arr.forEach((item) => {
// res.push(item);
// });
// return res
// }else {
// return [].reduce.call(arr, function(col, set) {
// let res = [];
// col.forEach( c => {
// set.forEach(s => {
// let t = [].concat(Array.isArray(c) ? c : [c]);
// t.push(s);
// res.push(t);
// });
// });
// return res
// });
// }
if
(
arr
.
length
<
2
)
{
return
arr
[
0
]
||
[];
}
}
else
{
return
[].
reduce
.
call
(
arr
,
function
(
col
,
set
)
{
let
res
=
[];
col
.
forEach
(
c
=>
{
...
...
@@ -248,6 +317,7 @@ export default {
return
res
});
}
}
},
// methods end
};
...
...
src/views/system/goods/add/index.vue
浏览文件 @
6fb7e418
...
...
@@ -148,22 +148,8 @@
methods
:
{
// 规格子组件,传给父组件的数据
calcSpeTable
(
data
)
{
let
data1
=
data
;
this
.
parameterdata
=
data1
;
console
.
log
(
153
,
this
.
parameterdata
);
this
.
parameterdata
[
''
]
let
obj
=
{
hh1
:
''
,
hh2
:
''
,
hh3
:
''
,
hh4
:
''
,
hh5
:
''
,
hh6
:
''
,
}
// for(let i = 0; i
<
this
.
data1
.
hu2
.
length
;
i
++
)
{
// this.data1.hu2[i]['obj'] = obj;
// }
this
.
parameterdata
=
data
;
//console.log(153,this.parameterdata);
},
// 只有点击完最后一级,才会有值
SSQChange
()
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论