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
bdf52313
authored
Jan 02, 2025
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
寄售库存导入详情
parent
c71b2add
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
210 additions
and
26 deletions
src/App.vue
src/views/consignmentManagement/consignmentImport.vue
src/views/consignmentManagement/consignmentImportDetail.vue
src/App.vue
View file @
bdf52313
<
template
>
<div
id=
"app"
>
<keep-alive
exclude=
"InquireDetail,ListDetail,orderTrackGoodsDetail,orderTrackPurAdd,enter,list,inquire,quote,orderTrackInvoice,subAccount,subAccountAdd,subAccountEdit
"
>
<keep-alive
:exclude=
"excludeComponents
"
>
<router-view
class=
"router-view"
></router-view>
</keep-alive>
</div>
</
template
>
<
script
>
export
default
{
name
:
'app'
name
:
'app'
,
data
()
{
return
{
excludeComponents
:
[
// 详情页面
'InquireDetail'
,
'ListDetail'
,
'consignmentImportDetail'
,
'consignmentApplicationDetail'
,
'consignmentRecallDetail'
,
'reconciledBillDetail'
,
// 订单相关
'orderTrackGoodsDetail'
,
'orderTrackPurAdd'
,
'orderTrackInvoice'
,
// 账户相关
'subAccount'
,
'subAccountAdd'
,
'subAccountEdit'
,
// 其他页面
'enter'
,
'list'
,
'inquire'
,
'quote'
]
}
}
}
</
script
>
\ No newline at end of file
src/views/consignmentManagement/consignmentImport.vue
View file @
bdf52313
...
...
@@ -35,7 +35,7 @@
<el-table-column
fixed
type=
"selection"
width=
"40"
align=
"center"
></el-table-column>
<el-table-column
label=
"单号"
min-width=
"20%"
align=
"center"
>
<template
slot-scope=
"scope"
>
<
a
:href=
"'/#/listDetail?sn='+scope.row.up_sn+'&id='+scope.row.id"
class=
"alink"
>
{{
scope
.
row
.
up_sn
}}
</a
>
<
el-link
type=
"primary"
:underline=
"false"
@
click=
"$router.push(
{path: '/consignmentImportDetail', query: {up_sn: scope.row.up_sn,id:scope.row.id}})" style="font-size: 12px;">
{{
scope
.
row
.
up_sn
}}
</el-link
>
</
template
>
</el-table-column>
<el-table-column
prop=
"file_name"
label=
"文件名字"
min-width=
"20%"
:show-overflow-tooltip=
"true"
align=
"center"
></el-table-column>
...
...
@@ -108,10 +108,10 @@ import Vue from 'vue';
import
Menu
from
"@/components/menu.vue"
;
import
Tool
from
'@/tool'
import
{
NODE_ENVS
}
from
"@/ajax"
;
import
{
Button
,
DatePicker
,
Dialog
,
Dropdown
,
DropdownItem
,
DropdownMenu
,
Form
,
FormItem
,
Input
,
Message
,
Option
,
Pagination
,
Progress
,
Radio
,
Select
,
Table
,
TableColumn
,
Tag
,
Tooltip
,
Upload
}
from
'element-ui'
import
{
Button
,
DatePicker
,
Dialog
,
Dropdown
,
DropdownItem
,
DropdownMenu
,
Form
,
FormItem
,
Input
,
Link
,
Message
,
Option
,
Pagination
,
Progress
,
Radio
,
Select
,
Table
,
TableColumn
,
Tag
,
Tooltip
,
Upload
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
).
use
(
Tag
).
use
(
Tooltip
);
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
).
use
(
Tag
).
use
(
Tooltip
)
.
use
(
Link
)
;
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Upload
).
use
(
Radio
).
use
(
Progress
);
export
default
{
name
:
"consignmentImport"
,
...
...
@@ -121,6 +121,7 @@ export default {
futures_cp_time_day
:
localStorage
.
getItem
(
'futures_cp_time_day'
)
||
''
,
//期货最高天数
uploadUrl
:
NODE_ENVS
+
'/api/uploadSku/import'
,
//上传接口
fileData
:
{
source
:
12
,
token
:
Tool
.
getCookie
(
'token'
),
type
:
"1"
//1覆盖 2新增
},
...
...
@@ -187,19 +188,17 @@ export default {
* @returns {boolean}
*/
handleChange
(
file
,
fileList
)
{
var
that
=
this
;
// 文件上传成功处理
if
(
file
.
code
===
0
)
{
th
at
.
dialogVisible
=
false
;
th
at
.
page
=
1
;
th
at
.
getData
();
th
is
.
dialogVisible
=
false
;
th
is
.
page
=
1
;
th
is
.
getData
();
this
.
$message
({
message
:
'导入成功'
,
type
:
'success'
,
onClose
()
{
}
type
:
'success'
});
}
else
{
// 上传失败重置状态
this
.
progress
=
0
;
this
.
uploading
=
false
;
this
.
$message
({
...
...
src/views/consignmentManagement/consignmentImportDetail.vue
View file @
bdf52313
<
template
>
<div
class=
"pagex"
>
<div
class=
"section-page"
>
这是管理的详情页
<!-- 详情信息区 -->
<el-descriptions
:column=
"3"
border
style=
"margin-bottom: 15px;width: 1200px"
>
<el-descriptions-item
label=
"导入总数"
>
{{
itemListObj
.
total
}}
</el-descriptions-item>
<el-descriptions-item
label=
"导入成功"
><span
class=
"alink"
>
{{
itemListObj
.
suss_count
}}
</span></el-descriptions-item>
<el-descriptions-item
label=
"导入失败"
><span
style=
"color: red"
>
{{
itemListObj
.
error_count
}}
</span></el-descriptions-item>
<el-descriptions-item
label=
"导入时间"
>
{{
detailData
.
create_time
}}
</el-descriptions-item>
</el-descriptions>
<!--操作区-->
<div
class=
"operation-area row"
style=
"margin-top: 10px;"
>
<div
class=
"operation-button row verCenter"
>
<el-button
type=
"primary"
@
click=
"popupEvent(1)"
>
提交寄售审核
</el-button>
<el-button
type=
"primary"
@
click=
"exportErrorItemList"
>
导出失败文件
</el-button>
</div>
</div>
<!--列表区-->
<div
class=
"data-box"
>
<el-table
:data=
"list"
border
max-height=
"600"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
fixed
type=
"selection"
width=
"40"
></el-table-column>
<el-table-column
prop=
"status"
fixed
label=
"状态"
width=
"100"
align=
"center"
>
<template
slot-scope=
"scope"
>
<el-tag
v-if=
"scope.row.status==1"
type=
"danger"
>
审核前失败
</el-tag>
<el-tag
v-else-if=
"scope.row.status==2"
type=
"info"
>
待审核
</el-tag>
<el-tag
v-else-if=
"scope.row.status==3"
type=
"success"
>
审核通过
</el-tag>
<el-tag
v-else-if=
"scope.row.status==4"
type=
"warning"
>
审核未通过
</el-tag>
</
template
>
</el-table-column>
<el-table-column
prop=
"error_msg"
label=
"失败原因"
min-width=
"150"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"reject_msg"
label=
"审核不通过原因"
min-width=
"150"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"型号"
min-width=
"200"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"200"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"stock"
label=
"库存数量"
width=
"100"
></el-table-column>
<el-table-column
prop=
"moq"
label=
"最小起订量"
width=
"120"
></el-table-column>
<el-table-column
prop=
"mpq"
label=
"标准包装量"
width=
"120"
></el-table-column>
<el-table-column
prop=
"batch_sn"
label=
"批次"
width=
"100"
></el-table-column>
<el-table-column
prop=
"cn_delivery_time"
label=
"大陆交期"
width=
"120"
></el-table-column>
<el-table-column
prop=
"hk_delivery_time"
label=
"香港交期"
width=
"120"
></el-table-column>
</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>
</div>
</div>
<!--提交审核-->
<el-dialog
title=
"提交审核"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisible_1"
width=
"500px"
>
<p
style=
"margin-bottom: 15px;margin-left: 80px;"
>
请确定是否将选择的商品提交寄售审核?
</p>
<el-form
ref=
"form"
label-width=
"80px"
>
<el-form-item
label=
"附加说明"
>
<el-input
type=
"textarea"
v-model=
"remark"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible_1 = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitConsignmentAudit"
>
确 定
</el-button>
</div>
</el-dialog>
<Menu></Menu>
</div>
</template>
<
script
>
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
{
Autocomplete
,
Button
,
DatePicker
,
Descriptions
,
DescriptionsItem
,
Dialog
,
Divider
,
Dropdown
,
DropdownItem
,
DropdownMenu
,
Form
,
FormItem
,
Input
,
Message
,
MessageBox
,
Option
,
Pagination
,
Popover
,
Select
,
Table
,
TableColumn
,
Tag
,
Tooltip
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
prototype
.
$confirm
=
MessageBox
.
confirm
;
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
).
use
(
Autocomplete
).
use
(
Popover
).
use
(
Tag
).
use
(
Divider
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
).
use
(
Descriptions
).
use
(
DescriptionsItem
);
import
{
Descriptions
,
DescriptionsItem
,
Message
,
Pagination
,
Table
,
TableColumn
,
Tag
,
Tooltip
,
Upload
}
from
'element-ui'
import
{
NODE_ENVS
}
from
"@/ajax"
;
import
Tool
from
"@/tool"
;
Vue
.
prototype
.
$message
=
Message
;
Vue
.
use
(
Pagination
).
use
(
TableColumn
).
use
(
Table
).
use
(
Tag
).
use
(
Descriptions
).
use
(
DescriptionsItem
).
use
(
Tooltip
).
use
(
Upload
);
export
default
{
name
:
"consignmentImportDetail"
,
data
()
{
return
{
formParam
:{}
detailData
:
{},
itemListObj
:
{},
//明细数据
dialogVisible_1
:
false
,
total
:
0
,
limit
:
10
,
page
:
1
,
list
:
[],
maxPrice
:
[],
id
:
''
,
up_sn
:
''
,
multipleSelection
:
[],
uploadUrl
:
NODE_ENVS
+
'/api/uploadSku/import'
,
remark
:
''
,
sku_ids
:
''
,
fileData
:
{
token
:
Tool
.
getCookie
(
'token'
),
type
:
2
//1覆盖 2新增
}
};
},
created
()
{
this
.
getData
()
this
.
id
=
this
.
$route
.
query
.
id
;
this
.
up_sn
=
this
.
$route
.
query
.
up_sn
;
this
.
getInfo
()
this
.
getList
()
},
methods
:
{
getData
()
{
var
params
=
Object
.
assign
({},
this
.
formParam
);
this
.
$http
(
'GET'
,
"/api/message/getMsgList"
,
params
).
then
(
res
=>
{
/**
* 获取详情
*/
getInfo
()
{
this
.
$http
(
'GET'
,
"/api/uploadSku/info"
,
{
id
:
this
.
id
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
this
.
detailData
=
res
.
data
}
else
{
this
.
$message
({
message
:
res
.
msg
,
...
...
@@ -39,6 +112,91 @@ export default {
});
}
})
},
/**
* 获取列表数据
*/
getList
()
{
this
.
$http
(
'GET'
,
"/api/uploadSku/itemList"
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
up_sn
:
this
.
up_sn
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
list
=
res
.
data
.
list
||
[];
this
.
total
=
res
.
data
.
total
||
0
;
this
.
itemListObj
=
res
.
data
;
//明细数据
}
else
{
this
.
$message
(
res
.
msg
);
}
})
},
/**
* 导出失败文件
*/
exportErrorItemList
()
{
let
url
=
NODE_ENVS
+
'/api/uploadSku/exportErrorItemList?up_sn='
+
this
.
up_sn
+
'&token='
+
Tool
.
getCookie
(
'token'
)
+
'&source=12'
;
Tool
.
openNewWindow
(
url
);
},
/**
* 弹窗事件
*/
popupEvent
(
type
)
{
if
(
!
this
.
multipleSelection
.
length
)
{
this
.
$message
.
warning
(
'请选择数据'
);
return
;
}
switch
(
type
)
{
case
1
:
// 提交审核:校验待提审状态
const
invalidVerify
=
this
.
multipleSelection
.
filter
(
item
=>
item
.
status
!=
2
);
if
(
invalidVerify
.
length
)
{
this
.
$message
.
warning
(
'只能选择待审核状态的数据'
);
return
;
}
this
.
sku_ids
=
this
.
multipleSelection
.
map
(
item
=>
item
.
sku_id
).
join
(
','
);
this
.
dialogVisible_1
=
true
;
break
;
}
},
/**
* 提交寄售审核
*/
submitConsignmentAudit
()
{
this
.
$http
(
'POST'
,
"/api/sku/submitConsignmentAudit"
,
{
sku_ids
:
this
.
sku_ids
,
remark
:
this
.
remark
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
onClose
:
()
=>
{
this
.
dialogVisible_1
=
false
;
this
.
remark
=
''
;
this
.
getList
();
}
});
}
else
{
this
.
$message
.
error
(
res
.
msg
||
'操作失败'
);
}
})
},
/**
* 列表分页条数筛选监听
* @param val
*/
handleSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
getList
();
},
/**
* 列表分页输入页码监听
* @param val
*/
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getList
();
},
/**
* chebox 选择监听
* @param val
*/
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
}
},
components
:
{
...
...
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