Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 06c5b256
authored
Nov 17, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
2decde1d
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
32 deletions
src/components/d2-form/index.vue
src/layout/header-aside/components/header-user/index.vue
src/views/goods/commodity.vue
src/views/goods/editCommodity.vue
src/views/goods/editProduct.vue
src/views/goods/product.vue
src/views/system/login/index.vue
src/views/systemConfig/personalInfo.vue
src/views/systemConfig/serviceStore.vue
src/components/d2-form/index.vue
View file @
06c5b25
...
...
@@ -4,7 +4,7 @@
<el-form
:model=
"formData"
:rules=
"rules"
ref=
"d2FormRuleForm
"
:ref=
"formRef + 'd2FormRuleForm'
"
>
<div
v-for=
"(i, idx) in formList"
...
...
@@ -356,6 +356,10 @@ export default {
type
:
Object
,
default
:
()
=>
{
}
},
formRef
:
{
type
:
String
,
default
:
''
},
originData
:
{
type
:
Object
,
default
:
()
=>
{
...
...
@@ -527,24 +531,37 @@ export default {
},
handleUp
()
{
// console.log(this.formData)
let
flag
=
true
if
(
this
.
formData
.
hasOwnProperty
(
'upgradeGoods'
))
{
this
.
formData
.
upgradeGoods
.
forEach
(
item
=>
{
if
(
!
item
.
profitValue
)
{
flag
=
false
// const flag = true
// if (this.formData.hasOwnProperty('upgradeGoods')) {
// this.formData.upgradeGoods.forEach(item => {
// if (!item.profitValue) {
// flag = false
// }
// })
// if (!this.formData.linkMerchantIds.length) {
// flag = false
// }
// }
// if (flag) {
this
.
$refs
[
this
.
formRef
+
'd2FormRuleForm'
].
validate
(
valid
=>
{
if
(
valid
)
{
// const flag = true
if
(
this
.
formData
.
hasOwnProperty
(
'upgradeGoods'
))
{
this
.
formData
.
upgradeGoods
.
forEach
(
item
=>
{
if
(
!
item
.
profitValue
)
{
// flag = false
return
true
}
})
if
(
!
this
.
formData
.
linkMerchantIds
.
length
)
{
// flag = false
return
true
}
}
})
if
(
!
this
.
formData
.
linkMerchantIds
.
length
)
{
flag
=
false
this
.
$emit
(
'handleAddConfirm'
,
this
.
formData
)
}
}
if
(
flag
)
{
this
.
$refs
.
d2FormRuleForm
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$emit
(
'handleAddConfirm'
,
this
.
formData
)
}
})
}
})
// }
}
}
}
...
...
src/layout/header-aside/components/header-user/index.vue
View file @
06c5b25
...
...
@@ -35,14 +35,14 @@ export default {
this
.
show
=
false
this
.
$event
.
$on
(
'e-password-dialog'
,
res
=>
(
this
.
passVisible
=
res
))
this
.
getInfo
()
this
.
$nextTick
(()
=>
{
this
.
show
=
true
}
)
}
,
methods
:
{
...
mapActions
(
'd2admin/user'
,
[
'load'
]),
async
getInfo
()
{
this
.
info
=
await
this
.
load
()
this
.
$nextTick
(()
=>
{
this
.
show
=
true
}
)
}
}
}
...
...
src/views/goods/commodity.vue
View file @
06c5b25
...
...
@@ -95,7 +95,8 @@
title=
"关联门店信息"
:className=
"storeDetail"
:isVisible
.
sync=
"detailVisible"
@
closeDialog=
"handleDetailClose"
noCancel=
"true"
@
confirmDialog=
"handleDetailClose"
>
<store-detail
v-if=
"detailVisible"
...
...
@@ -133,6 +134,9 @@ export default {
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'序号'
,
prop
:
'index'
},
{
label
:
'商品ID'
,
prop
:
'goodsCode'
},
{
...
...
src/views/goods/editCommodity.vue
View file @
06c5b25
...
...
@@ -10,6 +10,7 @@
:addOrEdit=
"addOrEdit"
:originData=
"editData"
:formList=
"editForm"
:formRef=
"comFormRef"
:headImg=
"headImg"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
...
...
@@ -40,7 +41,7 @@ export default {
},
formItemWidth
:
'200px'
,
rules
:
{
goodsCode
:
[{
required
:
true
,
message
:
'请选择商品名称'
,
trigger
:
'
blur
'
}],
goodsCode
:
[{
required
:
true
,
message
:
'请选择商品名称'
,
trigger
:
'
change
'
}],
shopPrice
:
[{
required
:
true
,
message
:
'请输入到店价'
,
trigger
:
'blur'
}],
linkMerchantIds
:
[{
required
:
true
,
message
:
'请选择关联门店'
,
trigger
:
'change'
}]
},
...
...
@@ -48,6 +49,7 @@ export default {
isHas
:
true
,
attr
:
'thumbUrl'
},
comFormRef
:
'com'
,
editForm
:
[{
title
:
'商品基本信息'
,
formBlock
:
[{
...
...
@@ -142,6 +144,7 @@ export default {
shopPrice
:
res
.
shopPrice
,
maxRetailDiscount
:
res
.
maxRetailDiscount
,
upgradeGoods
:
res
.
upgradeGoodsList
.
map
(
item
=>
{
item
[
'goodsName'
]
=
item
.
goodsInfo
.
goodsName
item
[
'thumbUrl'
]
=
item
.
goodsInfo
.
thumbUrl
return
item
}),
...
...
src/views/goods/editProduct.vue
View file @
06c5b25
...
...
@@ -9,6 +9,7 @@
addOrEdit=
"add"
:originData=
"editData"
:formList=
"editForm"
:formRef=
"proFormRef"
@
handleAddConfirm=
"handleAddConfirm"
@
handleClose=
"handleAddClose"
></d2-form>
...
...
@@ -49,6 +50,7 @@ export default {
content
:
''
}]
},
proFormRef
:
'pro'
,
editForm
:
[{
title
:
'产品基本信息'
,
formBlock
:
[{
...
...
src/views/goods/product.vue
View file @
06c5b25
...
...
@@ -10,6 +10,7 @@
<el-form-item
label=
"产品名称"
>
<el-input
v-model=
"searchForm.goodsName"
placeholder=
"请输入产品名称"
clearable
></el-input>
</el-form-item>
...
...
@@ -163,11 +164,12 @@ export default {
resolve
()
})
},
handleSearch
()
{
console
.
log
(
this
.
searchForm
)
},
handleReset
()
{
this
.
$refs
.
productTable
.
refreshTable
()
this
.
searchForm
=
{
goodsName
:
''
,
goodsType
:
''
,
brandMerchantCode
:
''
}
},
handleAdd
(
form
)
{
// console.log(form)
...
...
src/views/system/login/index.vue
View file @
06c5b25
...
...
@@ -50,7 +50,6 @@
v-model=
"formLogin.userName"
placeholder=
"用户名"
clearable
maxlength=
"10"
v-focus
>
<!--
<d2-el-icon
...
...
@@ -65,7 +64,6 @@
v-model=
"formLogin.password"
v-on:keyup
.
native
.
13=
"submit"
clearable
maxlength=
"12"
placeholder=
"密码"
>
<!--
<d2-el-icon
...
...
@@ -141,8 +139,7 @@ export default {
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'submit'
}
]
}]
})
}
},
...
...
src/views/systemConfig/personalInfo.vue
View file @
06c5b25
...
...
@@ -57,7 +57,7 @@ export default {
label
:
'登录账户'
},
{
name
:
'loginPhone'
,
label
:
'登
陆
手机号'
label
:
'登
录
手机号'
},
{
name
:
'merchantId'
,
label
:
'商户号'
...
...
src/views/systemConfig/serviceStore.vue
View file @
06c5b25
...
...
@@ -7,9 +7,10 @@
label-width=
"85px"
slot=
"header"
>
<el-form-item
label=
"商
品
名称"
>
<el-form-item
label=
"商
户
名称"
>
<el-input
v-model=
"searchForm.merchantName"
placeholder=
"请输入商户名称"
clearable
></el-input>
</el-form-item>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment