Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
cf420c34
提交
cf420c34
authored
12月 21, 2019
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改商品功能
上级
6d90217b
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
319 行增加
和
239 行删除
+319
-239
TbCfStationItemController.java
...va/com/platform/controller/TbCfStationItemController.java
+5
-7
TbCfStationItemDao.java
...in/src/main/java/com/platform/dao/TbCfStationItemDao.java
+2
-1
TbCfDescripitonService.java
...ain/java/com/platform/service/TbCfDescripitonService.java
+3
-0
TbCfStationItemService.java
...ain/java/com/platform/service/TbCfStationItemService.java
+9
-0
TbCfDescripitonServiceImpl.java
...com/platform/service/impl/TbCfDescripitonServiceImpl.java
+2
-0
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+5
-0
TbCfStationItemDao.xml
...rc/main/resources/com/platform/dao/TbCfStationItemDao.xml
+16
-4
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+51
-30
common.js
platform-admin/src/main/webapp/js/common.js
+12
-0
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+214
-197
没有找到文件。
platform-admin/src/main/java/com/platform/controller/TbCfStationItemController.java
浏览文件 @
cf420c34
...
@@ -156,13 +156,11 @@ public class TbCfStationItemController extends ApiBaseAction {
...
@@ -156,13 +156,11 @@ public class TbCfStationItemController extends ApiBaseAction {
return
R
.
ok
().
put
(
"descripiton"
,
descripiton
);
return
R
.
ok
().
put
(
"descripiton"
,
descripiton
);
}
}
/* @RequestMapping("/updateItemNum")
@RequestMapping
(
"/changeItemStatus"
)
@RequiresPermissions
(
"tbcfstationitem:changeItemStatus"
)
@ResponseBody
@ResponseBody
public R updateItemNum(@RequestParam("itemId") String itemId) {
public
R
changeItemStatus
(
@RequestParam
(
"status"
)
Integer
status
,
@RequestBody
String
[]
itemIds
)
{
TbCfStationItemEntity item = tbCfStationItemService.queryObject(itemId);
tbCfStationItemService
.
changeItemStatus
(
status
,
itemIds
);
Long num = item.getItemNum() + COUNT_NUM;
item.setItemNum(num);
tbCfStationItemService.update(item);
return
R
.
ok
();
return
R
.
ok
();
}
*/
}
}
}
platform-admin/src/main/java/com/platform/dao/TbCfStationItemDao.java
浏览文件 @
cf420c34
package
com
.
platform
.
dao
;
package
com
.
platform
.
dao
;
import
com.platform.entity.TbCfStationItemEntity
;
import
com.platform.entity.TbCfStationItemEntity
;
import
org.apache.ibatis.annotations.Param
;
/**
/**
* 站点商品Dao
* 站点商品Dao
...
@@ -9,5 +10,5 @@ import com.platform.entity.TbCfStationItemEntity;
...
@@ -9,5 +10,5 @@ import com.platform.entity.TbCfStationItemEntity;
* @date 2019-09-20 11:03:38
* @date 2019-09-20 11:03:38
*/
*/
public
interface
TbCfStationItemDao
extends
BaseDao
<
TbCfStationItemEntity
>
{
public
interface
TbCfStationItemDao
extends
BaseDao
<
TbCfStationItemEntity
>
{
int
changeItemStatus
(
@Param
(
"status"
)
Integer
status
,
@Param
(
"itemIds"
)
String
[]
itemIds
);
}
}
platform-admin/src/main/java/com/platform/service/TbCfDescripitonService.java
浏览文件 @
cf420c34
package
com
.
platform
.
service
;
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfDescripitonEntity
;
import
com.platform.entity.TbCfDescripitonEntity
;
import
com.platform.utils.R
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -69,4 +71,5 @@ public interface TbCfDescripitonService {
...
@@ -69,4 +71,5 @@ public interface TbCfDescripitonService {
* @return 删除条数
* @return 删除条数
*/
*/
int
deleteBatch
(
String
[]
descripitionIds
);
int
deleteBatch
(
String
[]
descripitionIds
);
}
}
platform-admin/src/main/java/com/platform/service/TbCfStationItemService.java
浏览文件 @
cf420c34
package
com
.
platform
.
service
;
package
com
.
platform
.
service
;
import
com.platform.entity.TbCfStationItemEntity
;
import
com.platform.entity.TbCfStationItemEntity
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -68,4 +69,12 @@ public interface TbCfStationItemService {
...
@@ -68,4 +69,12 @@ public interface TbCfStationItemService {
* @return 删除条数
* @return 删除条数
*/
*/
int
deleteBatch
(
String
[]
itemIds
);
int
deleteBatch
(
String
[]
itemIds
);
/**
* 修改商品状态
* @param status
* @param itemIds
* @return
*/
int
changeItemStatus
(
Integer
status
,
String
[]
itemIds
);
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfDescripitonServiceImpl.java
浏览文件 @
cf420c34
...
@@ -61,4 +61,6 @@ public class TbCfDescripitonServiceImpl implements TbCfDescripitonService {
...
@@ -61,4 +61,6 @@ public class TbCfDescripitonServiceImpl implements TbCfDescripitonService {
public
int
deleteBatch
(
String
[]
descripitionIds
)
{
public
int
deleteBatch
(
String
[]
descripitionIds
)
{
return
tbCfDescripitonDao
.
deleteBatch
(
descripitionIds
);
return
tbCfDescripitonDao
.
deleteBatch
(
descripitionIds
);
}
}
}
}
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
cf420c34
...
@@ -59,4 +59,9 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
...
@@ -59,4 +59,9 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
public
int
deleteBatch
(
String
[]
itemIds
)
{
public
int
deleteBatch
(
String
[]
itemIds
)
{
return
tbCfStationItemDao
.
deleteBatch
(
itemIds
);
return
tbCfStationItemDao
.
deleteBatch
(
itemIds
);
}
}
@Override
public
int
changeItemStatus
(
Integer
status
,
String
[]
itemIds
)
{
return
tbCfStationItemDao
.
changeItemStatus
(
status
,
itemIds
);
}
}
}
platform-admin/src/main/resources/com/platform/dao/TbCfStationItemDao.xml
浏览文件 @
cf420c34
...
@@ -59,17 +59,21 @@
...
@@ -59,17 +59,21 @@
i.create_time,
i.create_time,
i.item_categorytwo,
i.item_categorytwo,
i.item_descrition_id,
i.item_descrition_id,
e.template_titl
e dname,
d.descripition_nam
e dname,
t.goodstwotype_title title,
t.goodstwotype_title title,
o.goodstype_title goodtype
o.goodstype_title goodtype
FROM
FROM
tb_cf_station_item i
tb_cf_station_item i
left JOIN tb_cf_goodstype o ON o.goodstype_id = i.item_category
left JOIN tb_cf_goodstype o ON o.goodstype_id = i.item_category
left JOIN tb_cf_goodstwotype t ON i.item_categorytwo=t.goodstwotype_id
left JOIN tb_cf_goodstwotype t ON i.item_categorytwo=t.goodstwotype_id
left JOIN tb_cf_descripiton d ON i.item_descrition_id=d.descripition_id
left JOIN tb_cf_express_template e ON i.item_descrition_id = e.template_id
left JOIN tb_cf_express_template e ON i.item_descrition_id = e.template_id
WHERE 1=1
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
AND item_name LIKE concat('%',#{name},'%')
</if>
<if
test=
"code != null and code.trim() != ''"
>
AND item_code=#{code}
</if>
</if>
<choose>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
<when
test=
"sidx != null and sidx.trim() != ''"
>
...
@@ -89,7 +93,10 @@
...
@@ -89,7 +93,10 @@
select count(*) from tb_cf_station_item
select count(*) from tb_cf_station_item
WHERE 1=1
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
AND item_name LIKE concat('%',#{name},'%')
</if>
<if
test=
"code != null and code.trim() != ''"
>
AND item_code=#{code}
</if>
</if>
</select>
</select>
...
@@ -161,5 +168,10 @@
...
@@ -161,5 +168,10 @@
</foreach>
</foreach>
</delete>
</delete>
<update
id=
"changeItemStatus"
>
update tb_cf_station_item set enable_flag=#{status} where item_id in
<foreach
item=
"itemId"
collection=
"itemIds"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</update>
</mapper>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
cf420c34
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
<title>
站点商品
</title>
<title>
站点商品
</title>
#parse("sys/header.html")
#parse("sys/header.html")
<style>
<style>
.ui-jqgrid
.ui-jqgrid-bdiv
{
.ui-jqgrid
.ui-jqgrid-bdiv
{
height
:
auto
!important
;
height
:
auto
!important
;
}
}
</style>
</style>
</head>
</head>
...
@@ -15,10 +15,17 @@
...
@@ -15,10 +15,17 @@
<Row
:gutter=
"16"
>
<Row
:gutter=
"16"
>
<div
class=
"search-group"
>
<div
class=
"search-group"
>
<i-col
span=
"4"
>
<i-col
span=
"4"
>
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"名称"
/>
<i-input
v-model=
"q.code"
@
on-enter=
"query"
placeholder=
"商品编号"
>
<span
slot=
"prepend"
>
商品编号:
</span>
</i-input>
</i-col>
</i-col>
<i-button
@
click=
"query"
>
查询
</i-button>
<i-col
span=
"4"
>
<i-button
@
click=
"reloadSearch"
>
重置
</i-button>
<i-input
v-model=
"q.name"
@
on-enter=
"query"
placeholder=
"商品名称"
>
<span
slot=
"prepend"
>
商品名称:
</span>
</i-input>
</i-col>
<i-button
@
click=
"query"
type=
"primary"
><i
class=
"fa fa-search"
></i>
查询
</i-button>
<i-button
@
click=
"reloadSearch"
type=
"primary"
><i
class=
"fa fa-refresh"
></i>
重置
</i-button>
</div>
</div>
<div
class=
"buttons-group"
>
<div
class=
"buttons-group"
>
#if($shiro.hasPermission("tbcfstationitem:save"))
#if($shiro.hasPermission("tbcfstationitem:save"))
...
@@ -27,8 +34,16 @@
...
@@ -27,8 +34,16 @@
#if($shiro.hasPermission("tbcfstationitem:update"))
#if($shiro.hasPermission("tbcfstationitem:update"))
<i-button
type=
"warning"
@
click=
"update"
><i
class=
"fa fa-pencil-square-o"
></i>
修改
</i-button>
<i-button
type=
"warning"
@
click=
"update"
><i
class=
"fa fa-pencil-square-o"
></i>
修改
</i-button>
#end
#end
#if($shiro.hasPermission("tbcfstationitem:changeItemStatus"))
<i-button
type=
"success"
@
click=
"changeItemStatus(1)"
><i
class=
"fa fa-chevron-up"
></i>
上架
</i-button>
#end
#if($shiro.hasPermission("tbcfstationitem:changeItemStatus"))
<i-button
type=
"warning"
@
click=
"changeItemStatus(2)"
><i
class=
"fa fa-chevron-down"
></i>
下架
</i-button>
#end
#if($shiro.hasPermission("tbcfstationitem:delete"))
#if($shiro.hasPermission("tbcfstationitem:delete"))
<i-button
type=
"error"
@
click=
"
del
"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
<i-button
type=
"error"
@
click=
"
changeItemStatus(0)
"
><i
class=
"fa fa-trash-o"
></i>
删除
</i-button>
#end
#end
</div>
</div>
</Row>
</Row>
...
@@ -41,15 +56,15 @@
...
@@ -41,15 +56,15 @@
<Form-item
label=
"商品编号"
prop=
"itemCode"
>
<Form-item
label=
"商品编号"
prop=
"itemCode"
>
<i-input
v-model=
"tbCfStationItem.itemCode"
placeholder=
"商品编号"
/>
<i-input
v-model=
"tbCfStationItem.itemCode"
placeholder=
"商品编号"
/>
</Form-item>
</Form-item>
<Form-item
label=
"商品名
字
"
prop=
"itemName"
>
<Form-item
label=
"商品名
称
"
prop=
"itemName"
>
<i-input
v-model=
"tbCfStationItem.itemName"
placeholder=
"商品名字"
/>
<i-input
v-model=
"tbCfStationItem.itemName"
placeholder=
"商品名字"
/>
</Form-item>
</Form-item>
<Form-item
label=
"商品标题
简介
"
prop=
"itemBrief"
>
<Form-item
label=
"商品标题"
prop=
"itemBrief"
>
<i-input
v-model=
"tbCfStationItem.itemBrief"
placeholder=
"商品标题简介"
/>
<i-input
v-model=
"tbCfStationItem.itemBrief"
placeholder=
"商品标题简介"
/>
</Form-item>
</Form-item>
<Form-item
label=
"商品链接"
prop=
"itemUrl"
>
<
!-- <
Form-item label="商品链接" prop="itemUrl">
<i-input v-model="tbCfStationItem.itemUrl" placeholder="商品链接"/>
<i-input v-model="tbCfStationItem.itemUrl" placeholder="商品链接"/>
</Form-item
>
</Form-item>--
>
<Form-item
label=
"商品价格"
prop=
"itemPrice"
>
<Form-item
label=
"商品价格"
prop=
"itemPrice"
>
<i-input
v-model=
"tbCfStationItem.itemPrice"
placeholder=
"商品价格"
/>
<i-input
v-model=
"tbCfStationItem.itemPrice"
placeholder=
"商品价格"
/>
</Form-item>
</Form-item>
...
@@ -66,7 +81,9 @@
...
@@ -66,7 +81,9 @@
<div
style=
"display: flex;position: relative;"
>
<div
style=
"display: flex;position: relative;"
>
<div
v-for=
"item in uploadList"
style=
"margin-left: 5px;"
>
<div
v-for=
"item in uploadList"
style=
"margin-left: 5px;"
>
<img
:src=
"item"
width=
"100"
height=
"100"
id=
"itemImg"
>
<img
:src=
"item"
width=
"100"
height=
"100"
id=
"itemImg"
>
<i
class=
"ivu-icon ivu-icon-ios-trash-outline"
style=
"cursor:pointer;display: flex;font-size: 24px;position: relative;left:11"
@
click=
"delImg1(item)"
></i>
<i
class=
"ivu-icon ivu-icon-ios-trash-outline"
style=
"cursor:pointer;display: flex;font-size: 24px;position: relative;left:11"
@
click=
"delImg1(item)"
></i>
</div>
</div>
</div>
</div>
</Form-item>
</Form-item>
...
@@ -76,37 +93,41 @@
...
@@ -76,37 +93,41 @@
<input type="file" placeholder="商品图片" @change="tirggerFile($event)"/>
<input type="file" placeholder="商品图片" @change="tirggerFile($event)"/>
</Form-item>
</Form-item>
-->
-->
<Form-item
label=
"所属平台"
prop=
"platformCode"
>
<
!--<
Form-item label="所属平台" prop="platformCode">
<i-input v-model="tbCfStationItem.platformCode" placeholder="所属平台"/>
<i-input v-model="tbCfStationItem.platformCode" placeholder="所属平台"/>
</Form-item>
</Form-item>
<Form-item label="平台名" prop="platformName">
<Form-item label="平台名" prop="platformName">
<i-input v-model="tbCfStationItem.platformName" placeholder="平台名"/>
<i-input v-model="tbCfStationItem.platformName" placeholder="平台名"/>
</Form-item>
</Form-item>
-->
<Form-item
label=
"
启用
状态"
prop=
"enableFlag"
>
<Form-item
label=
"状态"
prop=
"enableFlag"
>
<i-input
v-model=
"tbCfStationItem.enableFlag"
placeholder=
"
启用
状态"
/>
<i-input
v-model=
"tbCfStationItem.enableFlag"
placeholder=
"状态"
/>
</Form-item>
</Form-item>
<Form-item
label=
"商品一级分类"
prop=
"itemCategory"
>
<Form-item
label=
"商品一级分类"
prop=
"itemCategory"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategory"
@
on-change=
"changeGoodstype"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategory"
@
on-change=
"changeGoodstype"
>
<i-option
v-for=
"(el,i) in Goodstype"
:key =
'i'
<i-option
v-for=
"(el,i) in Goodstype"
:key=
'i'
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
</i-select>
</i-select>
</Form-item>
</Form-item>
<Form-item
label=
"商品二级分类"
prop=
"itemCategorytwo"
>
<Form-item
label=
"商品二级分类"
prop=
"itemCategorytwo"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategorytwo"
@
on-change=
"changeGoodstype2"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemCategorytwo"
@
on-change=
"changeGoodstype2"
>
<i-option
v-for=
"(el,i) in Goodstype2"
:key =
'i'
<i-option
v-for=
"(el,i) in Goodstype2"
:key=
'i'
:value=
"el.goodstwotypeId"
>
{{el.goodstwotypeTitle}}
</i-option>
:value=
"el.goodstwotypeId"
>
{{el.goodstwotypeTitle}}
</i-option>
</i-select>
</i-select>
</Form-item>
</Form-item>
<Form-item
label=
"商品品名"
prop=
"itemDescritionId"
>
<Form-item
label=
"商品品名"
prop=
"itemDescritionId"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemDescritionId"
>
<i-select
placeholder=
"请选择"
v-model=
"tbCfStationItem.itemDescritionId"
>
<i-option
v-for=
"(el,i) in Goodstype3"
:key =
'i'
<i-option
v-for=
"(el,i) in Goodstype3"
:key=
'i'
:value=
"el.descripitionId"
>
{{el.descripitionName}}
</i-option>
:value=
"el.descripitionId"
>
{{el.descripitionName}}
</i-option>
</i-select>
</i-select>
</Form-item>
</Form-item>
<Form-item>
<Form-item>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"primary"
@
click=
"handleSubmit('formValidate')"
>
提交
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"warning"
@
click=
"reload"
style=
"margin-left: 8px"
/>
返回
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
<i-button
type=
"ghost"
@
click=
"handleReset('formValidate')"
style=
"margin-left: 8px"
>
重置
</i-button>
</Form-item>
</Form-item>
</i-form>
</i-form>
...
...
platform-admin/src/main/webapp/js/common.js
浏览文件 @
cf420c34
...
@@ -709,6 +709,18 @@ yesOrNoFormat = function (cellvalue) {
...
@@ -709,6 +709,18 @@ yesOrNoFormat = function (cellvalue) {
return
returnStr
;
return
returnStr
;
};
};
itemStatusFormat
=
function
(
cellvalue
)
{
var
returnStr
;
if
(
cellvalue
==
'1'
)
{
returnStr
=
"已上架"
;
}
else
if
(
cellvalue
==
'2'
)
{
returnStr
=
"已下架"
;
}
else
if
(
cellvalue
==
'0'
)
{
returnStr
=
"已删除"
;
}
return
returnStr
;
}
/**
/**
* 跳转页面
* 跳转页面
* @param cellvalue
* @param cellvalue
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
cf420c34
...
@@ -3,20 +3,20 @@ $(function () {
...
@@ -3,20 +3,20 @@ $(function () {
url
:
'../tbcfstationitem/list'
,
url
:
'../tbcfstationitem/list'
,
colModel
:
[
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
80
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
35
,
formatter
:
imageFormat
},
{
label
:
'商品名字'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
8
0
},
{
label
:
'商品编号'
,
name
:
'itemCode'
,
index
:
'item_code'
,
width
:
6
0
},
{
label
:
'商品标题简介'
,
name
:
'itemBrief'
,
index
:
'item_brief'
,
width
:
8
0
},
{
label
:
'商品名字'
,
name
:
'itemName'
,
index
:
'item_name'
,
width
:
12
0
},
{
label
:
'商品链接'
,
name
:
'itemUrl'
,
index
:
'item_url'
,
width
:
80
,
formatter
:
linkFormat
},
{
label
:
'商品标题'
,
name
:
'itemBrief'
,
index
:
'item_brief'
,
width
:
120
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
80
,
formatter
:
imageFormat
},
/*{label: '商品链接', name: 'itemUrl', index: 'item_url', width: 80,formatter:linkFormat},*/
{
label
:
'商品价格'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
8
0
},
{
label
:
'商品价格'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
6
0
},
{
label
:
'点击量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
8
0
},
{
label
:
'点击量'
,
name
:
'itemNum'
,
index
:
'item_num'
,
width
:
6
0
},
{
label
:
'所属平台'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
/*
{label: '所属平台', name: 'platformCode', index: 'platform_code', width: 80},
{
label
:
'平台名'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{label: '平台名', name: 'platformName', index: 'platform_name', width: 80},*/
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
60
,
formatter
:
itemStatusFormat
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
80
},
{
label
:
'商品一级分类'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
80
},
{
label
:
'商品一级分类'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
80
},
{
label
:
'商品二级分类'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'商品二级分类'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'商品品名'
,
name
:
'dname'
,
index
:
'dname
'
,
width
:
80
}]
{
label
:
'商品品名'
,
name
:
'dname'
,
index
:
'itemDescritionId
'
,
width
:
80
}]
});
});
});
});
...
@@ -26,10 +26,10 @@ let vm = new Vue({
...
@@ -26,10 +26,10 @@ let vm = new Vue({
showList
:
true
,
showList
:
true
,
title
:
null
,
title
:
null
,
tbCfStationItem
:
{},
tbCfStationItem
:
{},
Goodstype
:
null
,
Goodstype
:
null
,
Goodstype2
:
null
,
Goodstype2
:
null
,
uploadList
:
[],
uploadList
:
[],
Goodstype3
:
null
,
Goodstype3
:
null
,
ruleValidate
:
{
ruleValidate
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
...
@@ -41,9 +41,9 @@ let vm = new Vue({
...
@@ -41,9 +41,9 @@ let vm = new Vue({
},
},
methods
:
{
methods
:
{
//获取一级分类
//获取一级分类
changeGoodstype
()
{
changeGoodstype
()
{
// console.log(this.tbCfStationItem.itemCategory);
// console.log(this.tbCfStationItem.itemCategory);
let
url
=
"../tbcfstationitem/queryByItemType?typeId="
+
this
.
tbCfStationItem
.
itemCategory
;
let
url
=
"../tbcfstationitem/queryByItemType?typeId="
+
this
.
tbCfStationItem
.
itemCategory
;
// console.log('url',url)
// console.log('url',url)
let
that
=
this
;
let
that
=
this
;
Ajax
.
request
({
Ajax
.
request
({
...
@@ -51,14 +51,14 @@ let vm = new Vue({
...
@@ -51,14 +51,14 @@ let vm = new Vue({
type
:
"get"
,
type
:
"get"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
successCallback
:
function
(
r
)
{
if
(
r
.
code
===
0
)
{
if
(
r
.
code
===
0
)
{
that
.
Goodstype2
=
r
.
list
that
.
Goodstype2
=
r
.
list
}
}
}
}
});
});
},
},
changeGoodstype2
()
{
changeGoodstype2
()
{
let
url
=
"../tbcfstationitem/queryByItemTypeTwo?typeTwoId="
+
this
.
tbCfStationItem
.
itemCategorytwo
;
let
url
=
"../tbcfstationitem/queryByItemTypeTwo?typeTwoId="
+
this
.
tbCfStationItem
.
itemCategorytwo
;
let
that
=
this
;
let
that
=
this
;
Ajax
.
request
({
Ajax
.
request
({
url
:
url
,
url
:
url
,
...
@@ -66,7 +66,7 @@ let vm = new Vue({
...
@@ -66,7 +66,7 @@ let vm = new Vue({
contentType
:
"application/json"
,
contentType
:
"application/json"
,
successCallback
:
function
(
r
)
{
successCallback
:
function
(
r
)
{
if
(
r
.
code
===
0
)
{
if
(
r
.
code
===
0
)
{
that
.
Goodstype3
=
r
.
descripiton
that
.
Goodstype3
=
r
.
descripiton
}
}
}
}
...
@@ -107,7 +107,7 @@ let vm = new Vue({
...
@@ -107,7 +107,7 @@ let vm = new Vue({
},
},
del
:
function
(
event
)
{
del
:
function
(
event
)
{
let
itemIds
=
getSelectedRows
(
"#jqGrid"
);
let
itemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
itemIds
==
null
)
{
if
(
itemIds
==
null
)
{
return
;
return
;
}
}
...
@@ -125,9 +125,26 @@ let vm = new Vue({
...
@@ -125,9 +125,26 @@ let vm = new Vue({
});
});
});
});
},
},
getInfo
:
function
(
itemId
){
changeItemStatus
:
function
(
status
)
{
let
itemIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
itemIds
==
null
)
{
return
;
}
Ajax
.
request
({
url
:
"../tbcfstationitem/changeItemStatus?status="
+
status
,
params
:
JSON
.
stringify
(
itemIds
),
type
:
"POST"
,
contentType
:
"application/json"
,
successCallback
:
function
()
{
alert
(
'操作成功'
,
function
(
index
)
{
vm
.
reload
();
});
}
});
},
getInfo
:
function
(
itemId
)
{
Ajax
.
request
({
Ajax
.
request
({
url
:
"../tbcfstationitem/info/"
+
itemId
,
url
:
"../tbcfstationitem/info/"
+
itemId
,
async
:
true
,
async
:
true
,
successCallback
:
function
(
r
)
{
successCallback
:
function
(
r
)
{
vm
.
tbCfStationItem
=
r
.
tbCfStationItem
;
vm
.
tbCfStationItem
=
r
.
tbCfStationItem
;
...
@@ -139,12 +156,12 @@ let vm = new Vue({
...
@@ -139,12 +156,12 @@ let vm = new Vue({
vm
.
showList
=
true
;
vm
.
showList
=
true
;
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
let
page
=
$
(
"#jqGrid"
).
jqGrid
(
'getGridParam'
,
'page'
);
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
$
(
"#jqGrid"
).
jqGrid
(
'setGridParam'
,
{
postData
:
{
'name'
:
vm
.
q
.
name
},
postData
:
{
'name'
:
vm
.
q
.
name
,
'code'
:
vm
.
q
.
code
},
page
:
page
page
:
page
}).
trigger
(
"reloadGrid"
);
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
vm
.
handleReset
(
'formValidate'
);
},
},
reloadSearch
:
function
()
{
reloadSearch
:
function
()
{
vm
.
q
=
{
vm
.
q
=
{
name
:
''
name
:
''
};
};
...
@@ -185,14 +202,14 @@ let vm = new Vue({
...
@@ -185,14 +202,14 @@ let vm = new Vue({
}*/
}*/
/** ******************************************************************************************** */
/** ******************************************************************************************** */
handleSuccess
(
response
,
file
,
fileList
)
{
handleSuccess
(
response
,
file
,
fileList
)
{
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
vm
.
uploadList
.
push
(
response
);
vm
.
uploadList
.
push
(
response
);
$
(
"#itemImg"
).
show
();
$
(
"#itemImg"
).
show
();
},
},
handleBeforeUpload
(
file
)
{
handleBeforeUpload
(
file
)
{
// 上传图片大小不超过5M
// 上传图片大小不超过5M
if
(
file
.
size
>
5
*
1024
*
1024
)
{
if
(
file
.
size
>
5
*
1024
*
1024
)
{
alert
(
'请上传不超过5M的图片'
);
alert
(
'请上传不超过5M的图片'
);
return
false
;
return
false
;
}
}
...
@@ -207,7 +224,7 @@ let vm = new Vue({
...
@@ -207,7 +224,7 @@ let vm = new Vue({
// return this.checkImageWH(file,750,320);
// return this.checkImageWH(file,750,320);
},
},
// 限制上传图片的宽高
// 限制上传图片的宽高
checkImageWH
:
function
(
file
,
width
,
height
)
{
checkImageWH
:
function
(
file
,
width
,
height
)
{
let
self
=
this
;
let
self
=
this
;
return
new
Promise
(
function
(
resolve
,
reject
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
let
filereader
=
new
FileReader
();
let
filereader
=
new
FileReader
();
...
@@ -237,12 +254,12 @@ let vm = new Vue({
...
@@ -237,12 +254,12 @@ let vm = new Vue({
});
});
},
},
// 删除上传图片
// 删除上传图片
delImg1
:
function
(
url
)
{
delImg1
:
function
(
url
)
{
if
(
vm
.
title
!=
"详情"
)
{
if
(
vm
.
title
!=
"详情"
)
{
vm
.
uploadList
.
remove
(
url
);
vm
.
uploadList
.
remove
(
url
);
console
.
log
(
url
);
console
.
log
(
url
);
Ajax
.
request
({
Ajax
.
request
({
url
:
"../api/osstest/deletetest?url="
+
url
,
url
:
"../api/osstest/deletetest?url="
+
url
,
async
:
false
,
async
:
false
,
type
:
"POST"
,
type
:
"POST"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
...
@@ -257,9 +274,9 @@ let vm = new Vue({
...
@@ -257,9 +274,9 @@ let vm = new Vue({
/** ******************************************************************************************** */
/** ******************************************************************************************** */
},
},
created
()
{
created
()
{
var
that
=
this
var
that
=
this
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
//console.log("成功");
//console.log("成功");
that
.
Goodstype
=
res
.
list
;
that
.
Goodstype
=
res
.
list
;
})
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论