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
e0e645b0
authored
May 13, 2021
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
47f349da
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
95 deletions
src/components/menu.vue
src/main.js
src/router/index.js
src/views/Store/enter.vue
src/views/Store/list.vue
src/components/menu.vue
View file @
e0e645b0
...
...
@@ -8,7 +8,7 @@
<font
class=
"fl"
>
概况
</font>
</a>
<a
class=
"item fl"
:class=
"
{'act':
item.path==$route.path
}" @click="tabUrl(item)" v-for="item in tabs">
<a
class=
"item fl"
:class=
"
{'act':
(JSON.stringify(item)==JSON.stringify({path: $route.path,title: $route.meta.title,query:$route.query}))
}" @click="tabUrl(item)" v-for="item in tabs">
<font
class=
"fl"
>
{{
item
.
title
}}
</font>
<span
class=
"icon iconfont fl"
@
click
.
stop=
"closetab(item.path)"
>
</span>
</a>
...
...
@@ -187,6 +187,7 @@
if
(
tab_arr
)
{
this
.
tabs
=
JSON
.
parse
(
tab_arr
);
}
let
app_
=
document
.
getElementById
(
'app'
);
this
.
collapse
=
false
if
(
this
.
collapse
)
{
...
...
src/main.js
View file @
e0e645b0
...
...
@@ -50,7 +50,8 @@ router.afterEach((to, from, next) => {
tabOldJson
=
[
{
path
:
to
.
path
,
title
:
to
.
meta
.
title
title
:
to
.
meta
.
title
,
query
:
to
.
query
}
]
...
...
src/router/index.js
View file @
e0e645b0
...
...
@@ -52,7 +52,7 @@ const routes = [
path
:
'/listDetail'
,
name
:
'ListDetail'
,
meta
:
{
title
:
'库存
列表
详情'
title
:
'库存
导入
详情'
},
component
:
()
=>
import
(
'../views/Store/listDetail.vue'
)
...
...
src/views/Store/enter.vue
View file @
e0e645b0
...
...
@@ -145,7 +145,7 @@
})
},
downwj
()
{
this
.
$http
(
'
ge
t'
,
"/api/uploadSku/downUploadCsv"
,
{}).
then
(
res
=>
{
this
.
$http
(
'
pos
t'
,
"/api/uploadSku/downUploadCsv"
,
{}).
then
(
res
=>
{
})
},
...
...
src/views/Store/list.vue
View file @
e0e645b0
...
...
@@ -40,9 +40,9 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div
class=
"fl dcg"
>
导出
</div>
<div
class=
"fl dcg heti"
>
上架
</div>
<div
class=
"fl dcg heti xjk"
@
click=
"
handleClose
"
>
下架
</div>
<div
class=
"fl dcg"
@
click=
"downOut"
>
导出
</div>
<div
class=
"fl dcg heti"
@
click=
"changeStatus(1)"
>
上架
</div>
<div
class=
"fl dcg heti xjk"
@
click=
"
changeStatus(3)
"
>
下架
</div>
</div>
<div
class=
"data-box"
>
<el-table
:data=
"tableData"
border
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
...
...
@@ -85,13 +85,13 @@
</
template
>
</el-table-column>
<el-table-column
prop=
"hk_
delivery_tim
e"
label=
"香港交货价($)"
width=
"150"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.hk_
delivery_time&&scope.row.hk_delivery_tim
e.length>0"
>
<el-table-column
prop=
"hk_
ladder_pric
e"
label=
"香港交货价($)"
width=
"150"
>
<
template
slot-scope=
"scope"
v-if=
"scope.row.hk_
ladder_price&&scope.row.hk_ladder_pric
e.length>0"
>
<div
class=
"price-more"
>
<el-tooltip
placement=
"bottom"
effect=
"light"
>
<div
slot=
"content"
>
<div
class=
"boxxrth2021"
>
<p
class=
"clr"
v-for=
"item in scope.row.hk_
delivery_tim
e"
>
<p
class=
"clr"
v-for=
"item in scope.row.hk_
ladder_pric
e"
>
<span
class=
"fl"
>
{{
item
.
purchases
}}
+
</span>
<span
class=
"fl"
>
¥
{{
item
.
price
}}
</span>
</p>
...
...
@@ -132,11 +132,12 @@
</el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"25%"
>
</el-table-column>
<el-table-column
prop=
"
inquiry_number
"
label=
"库存数量"
min-width=
"25%"
>
<el-table-column
prop=
"
stock
"
label=
"库存数量"
min-width=
"25%"
>
</el-table-column>
<el-table-column
label=
"修改库存"
min-width=
"25%"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"updateKc"
placeholder=
"点击修改"
<el-input
v-model=
"scope.row.updateStock"
placeholder=
"点击修改"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
</el-input>
</
template
>
...
...
@@ -146,7 +147,7 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogVisible = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
submitKc
"
>
确 定
</el-button>
</span>
</el-dialog>
<!--修改交期弹窗-->
...
...
@@ -159,16 +160,15 @@
</el-table-column>
<el-table-column
prop=
"brand_name"
label=
"品牌"
min-width=
"20%"
>
</el-table-column>
<el-table-column
prop=
"
inquiry_number
"
label=
"库存数量"
min-width=
"20%"
>
<el-table-column
prop=
"
stock
"
label=
"库存数量"
min-width=
"20%"
>
</el-table-column>
<el-table-column
label=
"修改大陆交期"
min-width=
"20%"
>
<
template
slot-scope=
"scope"
>
<div
class=
"updatebox"
>
<el-input
v-model=
"updateHqdl"
placeholder=
"点击修改"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
<el-input
v-model=
"updateHqdl"
placeholder=
"如:2-5"
@
change=
"changedl(scope.row)"
>
</el-input>
<div
class=
"selectdw"
>
<el-select
v-model=
"updateHqdldw"
>
<el-select
v-model=
"updateHqdldw"
@
change=
"changedl(scope.row)"
>
<el-option
label=
"天"
value=
"天"
></el-option>
<el-option
label=
"周"
value=
"周"
></el-option>
</el-select>
...
...
@@ -180,8 +180,7 @@
<el-table-column
label=
"修改香港交期"
min-width=
"20%"
>
<
template
slot-scope=
"scope"
>
<div
class=
"updatebox"
>
<el-input
v-model=
"updateHqhk"
placeholder=
"点击修改"
onkeyup=
"if(event.keyCode !=37 && event.keyCode != 39)
{if (!/^[\d]+$/ig.test(this.value)){this.value='';}}">
<el-input
v-model=
"updateHqhk"
placeholder=
"如:2-5"
>
</el-input>
<div
class=
"selectdw"
>
<el-select
v-model=
"updateHqhkdw"
>
...
...
@@ -238,7 +237,7 @@
data
()
{
return
{
total
:
0
,
limit
:
1
,
limit
:
1
0
,
page
:
1
,
dialogVisible
:
false
,
dialogVisible2
:
false
,
...
...
@@ -251,77 +250,16 @@
},
multipleSelection
:
[],
selectData
:
[],
updateKc
:
""
,
updateHq
:
""
,
updateHqdl
:
""
,
updateHqdldw
:
"天"
,
updateHqhk
:
""
,
updateHqhkdw
:
"天"
,
huoqidata
:
[{
"id"
:
318
,
"inquiry_sn"
:
"X2021050609556"
,
"goods_name"
:
"M4"
,
"brand_name"
:
"TR FASTENINGS"
,
"inquiry_number"
:
1
,
"batch"
:
"1"
,
"delivery_time"
:
"1天"
,
"status_val"
:
"已报价(1)"
,
"quote_count"
:
1
,
"currency"
:
1
,
"status_a"
:
1
,
"user_name"
:
"admin"
,
"create_name"
:
"admin@ichunt.com"
,
"create_time"
:
"2021-05-08 09:41:42"
},
],
kucundata
:
[{
"id"
:
318
,
"inquiry_sn"
:
"X2021050609556"
,
"goods_name"
:
"M4"
,
"brand_name"
:
"TR FASTENINGS"
,
"inquiry_number"
:
1
,
"batch"
:
"1"
,
"delivery_time"
:
"1天"
,
"status_val"
:
"已报价(1)"
,
"quote_count"
:
1
,
"currency"
:
1
,
"status_a"
:
1
,
"user_name"
:
"admin"
,
"create_name"
:
"admin@ichunt.com"
,
"create_time"
:
"2021-05-08 09:41:42"
},
],
tableData
:
[{
"id"
:
318
,
"inquiry_sn"
:
"X2021050609556"
,
"goods_name"
:
"M4"
,
"brand_name"
:
"TR FASTENINGS"
,
"inquiry_number"
:
1
,
"batch"
:
"1"
,
"delivery_time"
:
"1天"
,
"status_val"
:
"已报价(1)"
,
"quote_count"
:
1
,
"currency"
:
1
,
"status_a"
:
1
,
"user_name"
:
"admin"
,
"create_name"
:
"admin@ichunt.com"
,
"create_time"
:
"2021-05-08 09:41:42"
},
{
"id"
:
318
,
"inquiry_sn"
:
"X2021050609556"
,
"goods_name"
:
"M4"
,
"brand_name"
:
"TR FASTENINGS"
,
"inquiry_number"
:
1
,
"batch"
:
"1"
,
"delivery_time"
:
"1天"
,
"status_val"
:
"已报价(1)"
,
"quote_count"
:
1
,
"currency"
:
1
,
"status_a"
:
1
,
"user_name"
:
"admin"
,
"create_name"
:
"admin@ichunt.com"
,
"create_time"
:
"2021-05-08 09:41:42"
}
]
huoqidata
:
[],
kucundata
:
[],
tableData
:
[]
};
},
...
...
@@ -350,6 +288,38 @@
}
})
},
submitKc
()
{
var
arr_
=
{}
var
self
=
this
;
for
(
var
i
=
0
;
i
<
self
.
kucundata
.
length
;
i
++
){
arr_
[
self
.
kucundata
[
i
][
'goods_id'
]]
=
{
stock
:
self
.
kucundata
[
i
][
'updateStock'
]}
console
.
log
(
self
.
kucundata
[
i
][
'goods_id'
])
}
console
.
log
(
arr_
)
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
Message
(
"修改成功"
);
this
.
getData
()
this
.
dialogVisible
=
false
}
else
{
Message
(
res
.
err_msg
);
}
})
},
changedl
(
item
)
{
console
.
log
(
item
)
},
downOut
()
{
this
.
$http
(
'get'
,
"/api/sku/exportSku"
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
status
:
this
.
formInline
.
status
,
brand_id
:
this
.
formInline
.
brand_id
,
action_time
:
this
.
formInline
.
date
[
0
],
end_time
:
this
.
formInline
.
date
[
1
]
}).
then
(
res
=>
{})
},
onSubmit
()
{
this
.
page
=
1
;
this
.
getData
();
...
...
@@ -360,28 +330,44 @@
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
console
.
log
(
this
.
multipleSelection
)
},
handleCommand
(
command
)
{
console
.
log
(
command
)
if
(
this
.
multipleSelection
.
length
==
0
)
{
Message
(
"请至少选择一条数据"
)
return
}
this
.
selectData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
if
(
command
==
1
)
{
//修改库存弹窗
this
.
dialogVisible
=
true
this
.
kucundata
=
this
.
selectData
}
else
{
//修改货期弹窗
this
.
dialogVisible2
=
true
this
.
kucundata
=
this
.
selectData
}
},
handleClose
(
done
)
{
changeStatus
(
status
)
{
MessageBox
.
confirm
(
'确认关闭?'
,
{
type
:
'error'
})
.
then
(()
=>
{
done
();
if
(
this
.
multipleSelection
.
length
==
0
)
{
Message
(
"请至少选择一条数据"
)
return
}
var
arr
=
[];
for
(
var
i
=
0
;
i
<
this
.
multipleSelection
.
length
;
i
++
)
{
arr
.
push
(
this
.
multipleSelection
[
i
][
'goods_id'
])
}
this
.
$http
(
'post'
,
"/api/sku/updateSkuStatus"
,
{
sku_ids
:
arr
.
join
(
","
),
status
:
status
==
1
?
'passed'
:
'offshelf'
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
Message
(
"操作成功"
);
this
.
getData
()
}
else
{
Message
(
res
.
err_msg
);
}
})
.
catch
(()
=>
{});
}
},
...
...
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