Authored by dongjunjie

多级联动sort

... ... @@ -47,7 +47,8 @@
productSkc:"",
productSku:"",
factoryCode:"",
sortId:""
sortId:"",
sortList:[]
},
cards:[
{name:"请退出库总数量",value:"0"},
... ... @@ -89,6 +90,9 @@
var submitParams = $.extend({}, this.params);
submitParams.beginTime = this.dateTransform(this.params.beginTime);
submitParams.endTime = this.dateTransform(this.params.endTime);
if(this.params.sortList.length > 0){
submitParams.sortId = this.params.sortList[0].id;
}
console.log(submitParams);
return submitParams;
},
... ...
... ... @@ -14,27 +14,26 @@
<div class="panel-col">
<input type="text" class="form-control" placeholder="厂家编号" v-model="params.factoryCode">
</div>
<div class="panel-col">
<select class="form-control" v-model="params.sortId">
<option value="">一级目录</option>
<option v-for="select in selects" value="{{select.id}}">{{select.sortName}}</option>
</select>
<div class="panel-col2">
<uc-sort :data-list.sync="params.sortList"></uc-sort>
</div>
</template>
<script>
import calendar from '../../../../components/calendar/index';
import sort from '../../../../components/sort/index';
export default {
components: {
calendar:calendar
calendar:calendar,
ucSort:sort
},
props:{
params:{type:Object, default:{sortId:"-1"}}
params:{type:Object, default:{}}
},
data() {
return{
selects: ViewModel.data
selects:ViewModel.data
}
}
}
... ...
... ... @@ -47,7 +47,8 @@
productSkc:"",
productSku:"",
factoryCode:"",
sortId:""
sortId:"",
sortList:[]
},
cards:[
{name:"发货入库总数量",value:"0"},
... ... @@ -89,6 +90,9 @@
var submitParams = $.extend({}, this.params);
submitParams.beginTime = this.dateTransform(this.params.beginTime);
submitParams.endTime = this.dateTransform(this.params.endTime);
if(this.params.sortList.length > 0){
submitParams.sortId = this.params.sortList[0].id;
}
console.log(submitParams);
return submitParams;
},
... ...
<style>
.multilevel{position: relative; font-family: 'microsoft yahei'; font-size:14px; color: #585858}
.multilevel a,.multilevel span{cursor: pointer; text-decoration: none; color:#585858; display: inline-block;}
.multilevel span.placeholder{font-size: 14px; color: #999999}
.picker-data{display: inline-block; height: 34px; border: 1px solid #ccd0d4; padding:6px 12px; position: relative; border-radius: 3px}
.placeholder,.data{display: inline-block; width: 200px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}
.placeholder{font-size: 14px; color: #9d9d9d}
.data a{font-size: 12px}
.select-item a{padding: 0 2px}
.select-item a:hover{background: #CCCCCC}
.clearData{display: inline-block; width: 30px; margin-left: 10px; text-overflow:ellipsis; white-space:nowrap; overflow:hidden;}
.clearData em{color: #999999; font-size: 12px; }
.clearData em{color: #999999; font-size: 12px; font-style: normal;}
.picker-dropdown{position: absolute; top: 34px; left: 1px;}
.picker-dropdown{position: absolute; top: 36px; left: 1px; z-index: 999;}
.select-wrap{box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5); border-radius: 4px; width: 350px}
.select-tab{background: #f0f0f0; border-bottom: 1px solid #ccc;}
.select-tab a{display: inline-block; font-size: 12px; padding: 8px 15px; border-left: 1px solid #ccc; border-bottom: 1px solid transparent; margin-bottom: -1px}
.select-tab a:first-child {border-left: none}
.select-tab a:last-child {border-right: 1px solid #ccc}
.select-tab a:last-child.active {border-right: 1px solid #ccc}
.select-tab a.active{background: #FFFFFF; border-bottom: 1px solid #FFFFFF;}
.select-content{background: #FFFFFF;}
... ... @@ -82,6 +82,7 @@
}
},
ready() {
console.log(this.dataList);
this.fetchAllSortList();
},
methods: {
... ...