Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
01b28486
authored
Mar 16, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
库存导入-新增字段
parent
ebd8a0cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
6 deletions
src/views/Store/enter.vue
src/views/Store/listDetail.vue
src/views/Store/enter.vue
View file @
01b28486
...
@@ -48,7 +48,8 @@
...
@@ -48,7 +48,8 @@
</el-tooltip>
</el-tooltip>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"latest_notice"
label=
"最新上传状态"
min-width=
"20%"
align=
"center"
></el-table-column>
<el-table-column
prop=
"count_success"
label=
"导入成功"
width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"count_pass"
label=
"导入失败"
width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"create_time"
label=
"上传时间"
width=
"160"
align=
"center"
></el-table-column>
<el-table-column
prop=
"create_time"
label=
"上传时间"
width=
"160"
align=
"center"
></el-table-column>
</el-table>
</el-table>
<el-pagination
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[10, 20, 50, 100, 200]"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page"
></el-pagination>
<el-pagination
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[10, 20, 50, 100, 200]"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page"
></el-pagination>
...
...
src/views/Store/listDetail.vue
View file @
01b28486
...
@@ -12,6 +12,9 @@
...
@@ -12,6 +12,9 @@
<el-button
type=
"primary"
@
click=
"changeStatus(1)"
>
上架
</el-button>
<el-button
type=
"primary"
@
click=
"changeStatus(1)"
>
上架
</el-button>
<el-button
type=
"primary"
@
click=
"changeStatus(3)"
>
下架
</el-button>
<el-button
type=
"primary"
@
click=
"changeStatus(3)"
>
下架
</el-button>
<a
class=
"downTemplateExport"
@
click=
"exportChange"
>
导出失败文件
</a>
<a
class=
"downTemplateExport"
@
click=
"exportChange"
>
导出失败文件
</a>
<el-upload
:data=
"fileData"
:action=
"uploadUrl"
:on-success=
"uploadChange"
:show-file-list=
"false"
>
<el-button
type=
"primary"
>
导入
</el-button>
</el-upload>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top-start"
>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"top-start"
>
<i
class=
"el-icon-question"
style=
"color:#ff7e11;margin-left:5px;cursor:pointer;font-size:16px;"
></i>
<i
class=
"el-icon-question"
style=
"color:#ff7e11;margin-left:5px;cursor:pointer;font-size:16px;"
></i>
<div
slot=
"content"
>
导出失败数据:本次导入的数据,导入结果为成功,先上传提交审核,导入结果为失败,进行导出重新上传
</div>
<div
slot=
"content"
>
导出失败数据:本次导入的数据,导入结果为成功,先上传提交审核,导入结果为失败,进行导出重新上传
</div>
...
@@ -49,13 +52,13 @@
...
@@ -49,13 +52,13 @@
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
Menu
from
"@/components/menu.vue"
;
import
{
Descriptions
,
DescriptionsItem
,
Message
,
Pagination
,
Table
,
TableColumn
,
Tag
,
Tooltip
}
from
'element-ui'
import
{
Descriptions
,
DescriptionsItem
,
Message
,
Pagination
,
Table
,
TableColumn
,
Tag
,
Tooltip
,
Upload
}
from
'element-ui'
import
{
NODE_ENVS
}
from
"@/ajax"
;
import
{
NODE_ENVS
}
from
"@/ajax"
;
import
Tool
from
"@/tool"
;
import
Tool
from
"@/tool"
;
Vue
.
prototype
.
$message
=
Message
;
Vue
.
prototype
.
$message
=
Message
;
Vue
.
use
(
Pagination
).
use
(
TableColumn
).
use
(
Table
).
use
(
Tag
).
use
(
Descriptions
).
use
(
DescriptionsItem
).
use
(
Tooltip
);
Vue
.
use
(
Pagination
).
use
(
TableColumn
).
use
(
Table
).
use
(
Tag
).
use
(
Descriptions
).
use
(
DescriptionsItem
).
use
(
Tooltip
)
.
use
(
Upload
)
;
export
default
{
export
default
{
name
:
"ListDetail"
,
name
:
"ListDetail"
,
data
()
{
data
()
{
...
@@ -67,7 +70,12 @@ export default {
...
@@ -67,7 +70,12 @@ export default {
page
:
1
,
page
:
1
,
tableData
:
""
,
tableData
:
""
,
maxPrice
:
[],
maxPrice
:
[],
multipleSelection
:
[]
multipleSelection
:
[],
uploadUrl
:
NODE_ENVS
+
'/api/uploadSku/import'
,
fileData
:
{
token
:
Tool
.
getCookie
(
'token'
),
type
:
2
//1覆盖 2新增
},
};
};
},
},
watch
:
{
watch
:
{
...
@@ -130,14 +138,34 @@ export default {
...
@@ -130,14 +138,34 @@ export default {
})
})
},
},
/**
/**
* 导入
*/
uploadChange
(
file
,
fileList
)
{
var
that
=
this
;
if
(
file
.
code
===
0
)
{
this
.
$message
({
message
:
'导入成功'
,
type
:
'success'
,
onClose
()
{
}
});
}
else
{
this
.
$message
({
message
:
file
.
msg
,
type
:
'error'
});
}
},
/**
* 导出文件
* 导出文件
*/
*/
exportChange
(){
exportChange
()
{
var
url
=
NODE_ENVS
+
'/api/uploadSku/exportErrorItemList?up_sn='
+
this
.
$route
.
query
.
sn
+
'&token='
+
Tool
.
getCookie
(
'token'
);
var
url
=
NODE_ENVS
+
'/api/uploadSku/exportErrorItemList?up_sn='
+
this
.
$route
.
query
.
sn
+
'&token='
+
Tool
.
getCookie
(
'token'
);
const
newsUrl
=
this
.
$router
.
resolve
(
url
);
const
newsUrl
=
this
.
$router
.
resolve
(
url
);
window
.
open
(
url
);
window
.
open
(
url
);
},
},
toUrl
(
url
){
toUrl
(
url
)
{
var
htmlArr
=
[];
var
htmlArr
=
[];
htmlArr
.
push
(
'
<
form
action
=
"' + url + '"
method
=
"post"
id
=
"form"
style
=
"display: none"
>
' +
htmlArr
.
push
(
'
<
form
action
=
"' + url + '"
method
=
"post"
id
=
"form"
style
=
"display: none"
>
' +
'
<
input
type
=
"submit"
value
=
"提交"
>
' +
'
<
input
type
=
"submit"
value
=
"提交"
>
' +
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment