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
f344339f
authored
May 14, 2021
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
1282d0a7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
54 deletions
src/ajax/index.js
src/assets/css/store/listDetail.less
src/assets/css/store/listDetail.min.css
src/views/Store/list.vue
src/ajax/index.js
View file @
f344339f
...
...
@@ -15,7 +15,7 @@ let NODE_ENVS = "/";
switch
(
envs
)
{
case
'development'
:
//开发环境
NODE_ENVS
=
'http://192.168.2.1
42
:8080'
;
NODE_ENVS
=
'http://192.168.2.1
64
:8080'
;
break
;
case
'test'
:
//测试环境
...
...
src/assets/css/store/listDetail.less
View file @
f344339f
...
...
@@ -7,5 +7,11 @@
span{
margin-right: 45px;
}
padding-top:28px;
}
.data-box{
padding:20px;
padding-top: 5px;
background: #fff;
}
}
\ No newline at end of file
src/assets/css/store/listDetail.min.css
View file @
f344339f
.listDetail
.detail-nav
{
background
:
#fff
;
padding
:
20px
;
font-size
:
14px
;
color
:
#333
;
}
.listDetail
.detail-nav
span
{
margin-right
:
45px
;
}
/*# sourceMappingURL=listDetail.min.css.map */
\ No newline at end of file
.listDetail
.detail-nav
{
background
:
#fff
;
padding
:
20px
;
font-size
:
14px
;
color
:
#333
;
padding-top
:
28px
}
.listDetail
.detail-nav
span
{
margin-right
:
45px
}
.listDetail
.data-box
{
padding
:
20px
;
padding-top
:
5px
;
background
:
#fff
}
\ No newline at end of file
src/views/Store/list.vue
View file @
f344339f
...
...
@@ -3,14 +3,12 @@
<div
class=
"store-con"
>
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form-item
label=
"型号"
>
<el-input
v-model=
"formInline.goods_name"
placeholder=
"请输入型号"
></el-input>
<el-autocomplete
v-model=
"formInline.goods_name"
:trigger-on-focus=
"false"
:fetch-suggestions=
"querySearchAsync"
placeholder=
"请输入型号"
@
select=
"handleSelectGoodsName"
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"品牌"
>
<el-select
v-model=
"formInline.brand_id"
placeholder=
"请选择"
>
<el-option
label=
"全部"
value=
""
></el-option>
<el-option
label=
"品牌一"
value=
"1"
></el-option>
<el-option
label=
"品牌二"
value=
"2"
></el-option>
</el-select>
<el-autocomplete
v-model=
"formInline.brand_name"
:trigger-on-focus=
"false"
:fetch-suggestions=
"querySearchAsync2"
placeholder=
"请输入品牌"
@
select=
"handleSelectBrandName"
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"状态"
>
<el-select
v-model=
"formInline.status"
placeholder=
"请选择"
>
...
...
@@ -165,10 +163,10 @@
<el-table-column
label=
"修改大陆交期"
min-width=
"20%"
>
<
template
slot-scope=
"scope"
>
<div
class=
"updatebox"
>
<el-input
v-model=
"
updateHqdl"
placeholder=
"如:2-5"
@
change=
"changedl(scope.row)
"
>
<el-input
v-model=
"
scope.row.dlhq"
placeholder=
"如:2-5
"
>
</el-input>
<div
class=
"selectdw"
>
<el-select
v-model=
"
updateHqdldw"
@
change=
"changedl(scope.row)
"
>
<el-select
v-model=
"
scope.row.dlhqdw
"
>
<el-option
label=
"天"
value=
"天"
></el-option>
<el-option
label=
"周"
value=
"周"
></el-option>
</el-select>
...
...
@@ -180,10 +178,10 @@
<el-table-column
label=
"修改香港交期"
min-width=
"20%"
>
<
template
slot-scope=
"scope"
>
<div
class=
"updatebox"
>
<el-input
v-model=
"
updateHqhk
"
placeholder=
"如:2-5"
>
<el-input
v-model=
"
scope.row.hkhq
"
placeholder=
"如:2-5"
>
</el-input>
<div
class=
"selectdw"
>
<el-select
v-model=
"
updateHqhk
dw"
>
<el-select
v-model=
"
scope.row.hkhq
dw"
>
<el-option
label=
"天"
value=
"天"
></el-option>
<el-option
label=
"周"
value=
"周"
></el-option>
</el-select>
...
...
@@ -196,7 +194,7 @@
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible2 = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
dialogVisible2 = false
"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
submitHq
"
>
确 定
</el-button>
</span>
</el-dialog>
...
...
@@ -226,10 +224,11 @@
MessageBox
,
Dialog
,
Pagination
,
Tooltip
Tooltip
,
Autocomplete
}
from
'element-ui'
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
)
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
)
.
use
(
Autocomplete
)
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
)
export
default
{
name
:
"list"
,
...
...
@@ -241,29 +240,26 @@
page
:
1
,
dialogVisible
:
false
,
dialogVisible2
:
false
,
formInline
:
{
goods_name
:
''
,
status
:
''
,
brand_id
:
''
,
brand_name
:
''
,
date
:
''
,
},
multipleSelection
:
[],
selectData
:
[],
updateKc
:
""
,
updateHq
:
""
,
updateHqdl
:
""
,
updateHqdldw
:
"天"
,
updateHqhk
:
""
,
updateHqhkdw
:
"天"
,
huoqidata
:
[],
kucundata
:
[],
tableData
:
[]
tableData
:
[]
,
brandList
:[],
};
},
watch
:
{},
watch
:
{
},
created
()
{
this
.
getData
()
},
...
...
@@ -273,10 +269,11 @@
this
.
$http
(
'get'
,
"/api/sku/list"
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
goods_name
:
this
.
formInline
.
goods_name
,
status
:
this
.
formInline
.
status
,
brand_id
:
this
.
formInline
.
brand_id
,
brand_name
:
this
.
formInline
.
brand_name
,
action_time
:
this
.
formInline
.
date
[
0
],
end_time
:
this
.
formInline
.
date
[
1
]
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
...
...
@@ -288,27 +285,41 @@
}
})
},
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'
])
handleSelectGoodsName
(
item
)
{
this
.
formInline
.
goods_name
=
item
.
value
},
handleSelectBrandName
(
item
){
this
.
formInline
.
brand_name
=
item
.
value
;
this
.
formInline
.
brand_id
=
item
.
brand_id
;
},
querySearchAsync
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/search/getsku"
,
{
spu_name
:
this
.
formInline
.
goods_name
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
var
arrlist_
=
res
.
data
||
[];
var
arr_
=
[]
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
){
arr_
.
push
({
value
:
arrlist_
[
i
][
'spu_name'
]})
}
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
);
cb
(
arr_
);
}
})
},
changedl
(
item
)
{
console
.
log
(
item
)
querySearchAsync2
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/search/getbrand"
,
{
brand_name
:
this
.
formInline
.
brand_name
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
var
arrlist_
=
res
.
data
||
[];
this
.
brandList
=
[]
this
.
formInline
.
brand_id
=
""
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
){
this
.
brandList
.
push
({
value
:
arrlist_
[
i
][
'brand_name'
],
brand_id
:
arrlist_
[
i
][
'brand_id'
]})
}
cb
(
this
.
brandList
);
}
})
},
downOut
()
{
this
.
$http
(
'get'
,
"/api/sku/exportSku"
,
{
...
...
@@ -344,9 +355,51 @@
}
else
{
//修改货期弹窗
this
.
dialogVisible2
=
true
this
.
kucun
data
=
this
.
selectData
this
.
huoqi
data
=
this
.
selectData
}
},
submitHq
()
{
var
arr_
=
{}
var
self
=
this
;
for
(
var
i
=
0
;
i
<
self
.
huoqidata
.
length
;
i
++
)
{
arr_
[
self
.
huoqidata
[
i
][
'goods_id'
]]
=
{
cn_delivery_time
:
self
.
huoqidata
[
i
][
'dlhq'
]
+
(
self
.
huoqidata
[
i
][
'dlhqdw'
]
||
'天'
),
hk_delivery_time
:
self
.
huoqidata
[
i
][
'hkhq'
]
+
(
self
.
huoqidata
[
i
][
'hkhqdw'
]
||
'天'
)
}
}
console
.
log
(
arr_
)
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
Message
(
"修改成功"
);
this
.
getData
()
this
.
dialogVisible2
=
false
}
else
{
Message
(
res
.
err_msg
);
}
})
},
submitKc
()
{
var
arr_
=
{}
var
self
=
this
;
for
(
var
i
=
0
;
i
<
self
.
kucundata
.
length
;
i
++
)
{
arr_
[
self
.
kucundata
[
i
][
'goods_id'
]]
=
{
cn_delivery_time
:
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
);
}
})
},
changeStatus
(
status
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
...
...
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