提交 fcb0525c authored 作者: 吴德鹏's avatar 吴德鹏

完成商品三级分类排序

上级 879beaac
......@@ -66,11 +66,18 @@
t.count count
from tb_cf_descripiton d left join tb_cf_goodstype o on d.goodstype_id=o.goodstype_id left join
tb_cf_goodstwotype t on d.goodstwotype_id=t.goodstwotype_id
left join (select count(*) count,c.item_descrition_id from tb_cf_station_item c GROUP BY item_descrition_id ) t on d.descripition_id=t.item_descrition_id
left join (select count(*) count,c.item_descrition_id from tb_cf_station_item c GROUP BY item_descrition_id ) t
on d.descripition_id=t.item_descrition_id
WHERE 1=1
<if test="name != null and name.trim() != ''">
AND descripition_name LIKE concat('%',#{name},'%')
</if>
<if test="category != null and category.trim() != ''">
AND d.goodstype_id =#{category}
</if>
<if test="categorytwo != null and categorytwo.trim() != ''">
AND d.goodstwotype_id =#{categorytwo}
</if>
<choose>
<when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order}
......@@ -124,7 +131,7 @@
<if test="goodstwotypeId != null">`goodstwotype_id` = #{goodstwotypeId},</if>
<if test="image != null">`image` = #{image},</if>
<if test="postage != null">`postage` = #{postage},</if>
<if test="morePostage != null">`more_postage` = #{morePostage}</if>
<if test="morePostage != null">`more_postage` = #{morePostage},</if>
<if test="sort != null">`sort` = #{sort}</if>
</set>
where descripition_id = #{descripitionId}
......
......@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root
#jdbc.password=diaoyun666
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=diaoyun666
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username: root
jdbc.password: Diaoyunnuli.8
#jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#jdbc.username: root
#jdbc.password: Diaoyunnuli.8
jdbc.initialSize=5
jdbc.maxActive=30
......
......@@ -2,13 +2,13 @@
#jdbc.username=root
#jdbc.password=root
#jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
#jdbc.username=root
#jdbc.password=diaoyun666
jdbc.url=jdbc:mysql://47.106.242.175:3306/chinafrica?allowMultiQueries=true&useSSL=false&useUnicode=true&characterEncoding=UTF-8
jdbc.username=root
jdbc.password=diaoyun666
jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username: root
jdbc.password: Diaoyunnuli.8
#jdbc.url: jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
#jdbc.username: root
#jdbc.password: Diaoyunnuli.8
jdbc.initialSize=5
jdbc.maxActive=30
......
......@@ -9,9 +9,32 @@
<div v-show="showList" style="height: 100%;">
<Row :gutter="16">
<div class="search-group">
<i-col span="4">
<i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
</i-col>
<span>
三级分类名称:
<i-input v-model="q.name" @on-enter="query" placeholder="名称" style="width:160px"/>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span>
一级分类:
<i-select v-model="q.category" @on-enter="query"
placeholder="一级分类" style="width:160px" @on-change="changeGoodstype">
<i-option v-for="(el,i) in Goodstype" :key='i'
:value="el.goodstypeId">{{el.goodstypeTitle}}
</i-option>
</i-select>
</span>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<span>
二级分类:
<i-select placeholder="二级分类" style="width:160px" v-model="q.categorytwo"
@on-enter="query"
@on-change="changeGoodstype2">
<i-option v-for="(el,i) in Goodstype2" :key='i'
:value="el.goodstwotypeId">{{el.goodstwotypeTitle}}
</i-option>
</i-select>
</span>
<i-button @click="query">查询</i-button>
<i-button @click="reloadSearch">重置</i-button>
</div>
......@@ -45,7 +68,7 @@
<Form-item label="二级分类" prop="goodstwotypeId">
<i-input v-model="tbCfDescripiton.goodstwotypeId" placeholder="二级分类"/>
</Form-item>-->
<Form-item label="商品一级分类" prop="goodstypeId" >
<Form-item label="商品一级分类" prop="goodstypeId">
<i-select placeholder="请选择" v-model="tbCfDescripiton.goodstypeId" @on-change="changeGoodstype">
<i-option v-for="(el,i) in Goodstype" :key='i'
:value="el.goodstypeId">{{el.goodstypeTitle}}
......@@ -67,12 +90,10 @@
<img v-bind:src="tbCfDescripiton.image" v-show="!!tbCfDescripiton.image"/>
<input type="file" placeholder="图片" @change="tirggerFile($event)"/>
</Form-item>
<Form-item label="单件邮费" prop="postage">
<i-input v-model="tbCfDescripiton.postage" placeholder="单件邮费"/>
</Form-item>
<Form-item label="续件邮费" prop="morePostage">
<i-input v-model="tbCfDescripiton.morePostage" placeholder="续件邮费"/>
<Form-item label="排序" prop="sort">
<i-input v-model="tbCfDescripiton.sort" placeholder="排序"/>
</Form-item>
<Form-item>
<i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
<i-button type="warning" @click="reload" style="margin-left: 8px"/>
......@@ -85,4 +106,4 @@
<script src="${rc.contextPath}/js/sys/tbcfdescripiton.js?_${date.systemTime}"></script>
</body>
</html>
\ No newline at end of file
</html>
......@@ -4,21 +4,21 @@ $(function () {
colModel: [
{label: 'ID', name: 'descripitionId', index: 'descripition_id', key: true},
{label: '三级分类图片', name: 'image', index: 'image', width: 80, formatter: imageFormat},
{label: '商品三级分类', name: 'descripitionName', index: 'descripition_name', width: 80},
/*{label: '海关编码', name: 'descripitionCode', index: 'descripition_code', width: 80},*/
{label: '商品一级分类', name: 'type', index: 'type', width: 80},
{label: '商品二级分类', name: 'twoType', index: 'twoType', width: 80},
{label: '单件邮费', name: 'postage', index: 'postage', width: 80},
{label: '续件邮费', name: 'morePostage', index: 'more_postage', width: 80},
{label: '商品数量', name: 'count', index: 'count', width: 80}]
{label: '商品三级分类', name: 'descripitionName', index: 'descripition_name', width: 80},
{label: '商品数量', name: 'count', index: 'count', width: 80},
{label: '排序', name: 'sort', index: 'sort', width: 80}
]
});
});
let vm = new Vue({
el: '#rrapp',
data: {
Goodstype: null,
Goodstype2: null,
Goodstype: [],
Goodstype2: [],
showList: true,
title: null,
changeGoodstype2: null,
......@@ -29,13 +29,15 @@ let vm = new Vue({
]
},
q: {
name: ''
name: '',
category: '',
categorytwo: ''
}
},
methods: {
//获取二级分类
changeGoodstype() {
let url = "../tbcfstationitem/queryByItemType?typeId=" + this.tbCfDescripiton.goodstypeId;
changeGoodstype(id) {
let url = "../tbcfstationitem/queryByItemType?typeId=" + id;
// console.log('url',url)
let that = this;
Ajax.request({
......@@ -117,14 +119,20 @@ let vm = new Vue({
vm.showList = true;
let page = $("#jqGrid").jqGrid('getGridParam', 'page');
$("#jqGrid").jqGrid('setGridParam', {
postData: {'name': vm.q.name},
postData: {
'name': vm.q.name,
"category": vm.q.category,
"categorytwo": vm.q.categorytwo
},
page: page
}).trigger("reloadGrid");
vm.handleReset('formValidate');
},
reloadSearch: function () {
vm.q = {
name: ''
name: '',
category: '',
categorytwo: ''
};
vm.reload();
},
......@@ -166,4 +174,4 @@ let vm = new Vue({
console.log('一级分类', this.Goodstype)
})
}
});
\ No newline at end of file
});
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论