Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-dj-oss-equity
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 7a347964
authored
Jul 21, 2021
by
liwk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
e7918d9a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
20 deletions
src/components/d2-table/index.vue
src/mixins/searchMixin.js
src/views/tao/goods/addGoods/index.vue
src/views/tao/goods/index/index.vue
src/components/d2-table/index.vue
View file @
7a34796
...
@@ -253,7 +253,7 @@ export default {
...
@@ -253,7 +253,7 @@ export default {
this
.
refreshTable
(
true
,
true
)
this
.
refreshTable
(
true
,
true
)
},
},
refreshTable
(
clearMuti
=
true
,
resetCurrentPage
=
false
)
{
refreshTable
(
clearMuti
=
true
,
resetCurrentPage
=
false
,
callBack
)
{
this
.
beforeSearchFn
().
then
(
res
=>
{
this
.
beforeSearchFn
().
then
(
res
=>
{
// console.log(res)
// console.log(res)
// 清空多选
// 清空多选
...
@@ -279,6 +279,7 @@ export default {
...
@@ -279,6 +279,7 @@ export default {
this
.
data
=
data
[
this
.
tableParams
.
listName
]
this
.
data
=
data
[
this
.
tableParams
.
listName
]
this
.
total
=
data
.
total
this
.
total
=
data
.
total
this
.
loading
=
false
this
.
loading
=
false
if
(
callBack
&&
typeof
callBack
==
'function'
)
callBack
()
}).
catch
(()
=>
{
}).
catch
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
...
...
src/mixins/searchMixin.js
View file @
7a34796
...
@@ -23,8 +23,8 @@ export default {
...
@@ -23,8 +23,8 @@ export default {
this
.
brandList
=
data
this
.
brandList
=
data
})
})
},
},
search
()
{
search
(
callBack
)
{
this
.
$refs
.
table
.
refreshTable
()
this
.
$refs
.
table
.
refreshTable
(
true
,
false
,
callBack
)
},
},
reset
()
{
reset
()
{
this
.
date
=
''
this
.
date
=
''
...
...
src/views/tao/goods/addGoods/index.vue
View file @
7a34796
...
@@ -48,6 +48,18 @@
...
@@ -48,6 +48,18 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"商品编码"
prop=
"productId"
>
<el-input
v-model=
"ruleForm.productId"
:disabled=
"isEdit"
placeholder=
"365淘券所对应的商品编码"
maxlength=
"20"
@
blur=
"getEquityOutGoodsBySupplierProductId"
></el-input>
</el-form-item>
<el-form-item
label=
"品牌名称"
label=
"品牌名称"
prop=
"brandName"
prop=
"brandName"
>
>
...
@@ -75,18 +87,7 @@
...
@@ -75,18 +87,7 @@
maxlength=
"30"
maxlength=
"30"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品编码"
prop=
"productId"
>
<el-input
v-model=
"ruleForm.productId"
:disabled=
"isEdit"
placeholder=
"365淘券所对应的商品编码"
maxlength=
"20"
@
blur=
"getEquityOutGoodsBySupplierProductId"
></el-input>
</el-form-item>
<el-form-item
<el-form-item
label=
"商品图片"
label=
"商品图片"
:required=
"ruleForm.appearance == 1"
:required=
"ruleForm.appearance == 1"
...
...
src/views/tao/goods/index/index.vue
View file @
7a34796
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
>
>
<el-button
<el-button
type=
"text"
type=
"text"
@
click=
"jump(scope.scope
,true
)"
@
click=
"jump(scope.scope)"
>
编辑
</el-button>
>
编辑
</el-button>
<el-button
<el-button
type=
"text"
type=
"text"
...
@@ -184,7 +184,6 @@ export default {
...
@@ -184,7 +184,6 @@ export default {
label
:
'商品SKU'
,
label
:
'商品SKU'
,
minWidth
:
'200'
,
minWidth
:
'200'
,
formatter
:
(
cell
)
=>
{
formatter
:
(
cell
)
=>
{
if
(
cell
.
appearance
!=
1
)
console
.
log
(
cell
)
return
cell
.
appearance
==
1
?
`
${
cell
.
brandName
}${
cell
.
productName
}
`
:
`<div>
${
cell
.
brandName
}${
cell
.
productName
}
</div><div>
${
cell
.
denomination
}
元</div>`
return
cell
.
appearance
==
1
?
`
${
cell
.
brandName
}${
cell
.
productName
}
`
:
`<div>
${
cell
.
brandName
}${
cell
.
productName
}
</div><div>
${
cell
.
denomination
}
元</div>`
}
}
},
},
...
@@ -239,22 +238,26 @@ export default {
...
@@ -239,22 +238,26 @@ export default {
}
}
})
})
},
},
jump
({
id
},
edit
)
{
jump
({
id
,
status
}
)
{
let
url
=
'./addGoods.html'
let
url
=
'./addGoods.html'
if
(
id
)
url
=
`
${
url
}
?id=
${
id
}
`
if
(
id
)
url
=
`
${
url
}
?id=
${
id
}
`
if
(
edit
)
url
=
`
${
url
}
&edit=true`
if
(
status
==
0
)
url
=
`
${
url
}
&edit=true`
window
.
location
.
href
=
url
window
.
location
.
href
=
url
},
},
copy
({
id
})
{
copy
({
id
})
{
orderApi
.
getEquityGoodsById
({
id
}).
then
(({
code
,
data
,
message
})
=>
{
orderApi
.
getEquityGoodsById
({
id
}).
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
0
)
{
if
(
code
==
0
)
{
orderApi
.
createGoods
(
data
).
then
(
res
=>
{
orderApi
.
createGoods
(
data
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
this
.
$message
({
this
.
$message
({
message
:
'复制成功!'
,
message
:
'复制成功!'
,
type
:
'success'
type
:
'success'
})
})
this
.
search
()
this
.
search
(()
=>
{
let
[
target
]
=
this
.
$refs
.
table
.
data
this
.
jump
(
target
)
})
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
message
)
this
.
$message
.
error
(
res
.
message
)
}
}
...
...
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