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

Merge remote-tracking branch 'origin/master'

......@@ -14,6 +14,91 @@
margin: 0 auto;
width: 500px;
}
#app {
box-sizing: border-box;
min-width: 1200px;
/*min-height: 600px;*/
margin: 0 auto;
position: fixed;
z-index: 99;
top: 0;
}
.ui-jqgrid-bdiv{
height: 500px !important;
}
.edit-container{
height: 600px !important;
}
.category-container {
min-height: 600px;
padding-bottom: 80px;
}
.edit-container {
position: relative;
height: 500px;
}
.btn-container {
position: absolute;
bottom: 0;
right: 0;
}
.productList {
padding-bottom: 10px;
}
.productList, .search {
display: flex;
justify-content: start;
}
.productList-style-start {
display: flex;
justify-content: start;
}
.vRadio {
display: inline-block;
width: 20px;
height: 20px;
background: #eeeeee;
border-radius: 4px;
transition: all 0.4s;
}
.ui-jqgrid-bdiv{
height: 500px !important;
}
.edit-container{
height: 600px !important;
}
.vradio-wrapper {
cursor: pointer;
}
.vRadio-active {
background: #000;
opacity: 0.6;
}
.vradio-wrapper > i {
vertical-align: top;
}
#searchjqGrid {
width: 100%;
margin-top: 10px;
}
#adItemjqGrid {
width: 100%;
margin-top: 10px;
}
#showItems {
margin-top: 20px;
}
</style>
</head>
<body>
......@@ -80,7 +165,9 @@
</div>
</Form-item>
<Form-item label="选择商品" prop="itemId" style="width: 500px">
<i-input v-model="tbCfItemComment.itemId" placeholder="选择商品"/>
<div v-model="tbCfItemComment.itemId" @click="openbtn">
<i-input v-model="tbCfItemComment.itemId" placeholder="选择商品" @click="openbtn"/>
</div>
</Form-item>
<Form-item label="商品评分" prop="itemScore" style="width: 500px">
<i-input v-model="tbCfItemComment.itemScore" placeholder="商品评分"/>
......@@ -105,6 +192,39 @@
</Form-item>
</i-form>
</Card>
<!-- //用户选择-->
<div id="app" v-show="isapp">
<Card class="category-container">
<section class="edit-container">
<!-- 商品 -->
<div>
<div class="search" style="margin-top:20px;">
<div>
<i-Input v-model="search"
placeholder="请输入搜索内容(可选)"
style="width:500px;"/>
</div>
<i-Button
type="primary"
style="width:100px;"
@click='handleSearch()'
>搜索
</i-Button>
</div>
</div>
<section id="showItems">
<table id="searchjqGrid"></table>
</section>
<i-button type="info" @click="addItems">添加商品</i-button>
<i-button type="warning" @click="closebtn" style="margin-left: 8px"/>
关闭</i-button>
</section>
</Card>
</div>
</div>
<script src="${rc.contextPath}/js/sys/tbcfitemcomment.js?_${date.systemTime}"></script>
......
......@@ -24,7 +24,7 @@
}
.container {
width: 800px;
/*width: 800px;*/
color: #515a6e;
margin-left: 0;
}
......
......@@ -71,7 +71,11 @@ let vm = new Vue({
endTime: '',
orderNo: '',
itemName: ''
}
},
search: null,// 搜索
isapp: false,//是否显示商品选择
tempId: '',
advertisement: {},
},
methods: {
vhandleSuccess(response, file, fileList) {
......@@ -169,6 +173,7 @@ let vm = new Vue({
vm.getInfo(id);
},
// 新增或修改接口
saveOrUpdate: function (event) {
let url = vm.tbCfItemComment.id == null ? "../tbcfitemcomment/save" : "../tbcfitemcomment/update";
console.log("this.uploadList", this.uploadList)
......@@ -249,8 +254,102 @@ let vm = new Vue({
},
handleReset: function (name) {
handleResetForm(this, name);
}
},
/* 搜索 */
handleSearch(e) {
1 == 1 ? (() => {
$('#showItems').children().remove();
$('#showItems').append(`<table id="searchjqGrid"></table>`);
function beforeSelectRow() {
$("#searchjqGrid").jqGrid('resetSelection');
return (true);
}
let _this = this;
$(function () {
$("#searchjqGrid").Grid({
url: `../tbcfstationitem/list?itemCategory=${_this.commoditycategoryListsActive1 || ''}&typeTwo=${_this.commoditycategoryListsActive2 || ''}&typeThree=${_this.commoditycategoryListsActive3 || ''}&name=${vm.search || e || ''}`,
colModel: [
{label: 'itemId', name: 'itemId', index: 'item_id', key: true, hidden: true},
{label: '商品图片', name: 'itemImg', index: 'item_img', width: 50, formatter: imageFormat},
{label: '商品编号', name: 'itemCode', index: 'item_code', width: 160},
{label: '商品名称', name: 'itemName', index: 'item_name', width: 160},
/* {label: '商品标题', name: 'itemBrief', index: 'item_brief', width: 120},*/
/*{label: '商品链接', name: 'itemUrl', index: 'item_url', width: 80,formatter:linkFormat},*/
{label: '商品原价', name: 'itemPrice', index: 'item_price', width: 65},
{label: '商品现价', name: 'discountPrice', index: 'discount_price', width: 55},
{label: '库存', name: 'itemCount', index: 'item_count', width: 55},
{label: '点击量', name: 'itemNum', index: 'item_num', width: 55},
/*{label: '所属平台', name: 'platformCode', index: 'platform_code', width: 80},
{label: '平台名', name: 'platformName', index: 'platform_name', width: 80},*/
{label: '供应商', name: 'supplier', index: 'supplier', width: 80},
{label: '商品一级分类', name: 'goodtype', index: 'goodtype', width: 80},
{label: '商品二级分类', name: 'title', index: 'title', width: 80},
{label: '商品品名', name: 'dname', index: 'itemDescritionId', width: 120},
{
label: '状态',
name: 'enableFlag',
index: 'enable_flag',
width: 120,
formatter: itemStatusFormat
},
{label: '创建日期', name: 'createTime', index: 'create_time', width: 160}
],
multiselect: true,
multiboxonly:true,
beforeSelectRow: beforeSelectRow,
});
});
})() : alert('未输入搜索内容~');
},
//打开商品选择
openbtn(){
vm.isapp = true
vm.tempId = this.guid();
},
//关闭商品选择
closebtn(){
vm.isapp = false
},
// 添加商品
addItems() {
$("#adItemjqGrid").jqGrid("clearGridData");
let ids = getSelectedRow("#searchjqGrid");
if (ids == null) {
return;
}
let id = vm.advertisement.id;
if (id == null || id == '' || id == 'undefined') {
id = vm.tempId;
}
vm.tbCfItemComment.itemId = ids
alert('操作成功', function (index) {
console.log(index)
vm.closebtn()
});
console.log(ids)
// Ajax.request({
// url: "../advertisementitem/saveBatch?aId=" + id + '&itemIds=' + ids,
// type: "POST",
// contentType: "application/json",
// successCallback: function () {
// alert('操作成功', function (index) {
// console.log(index)
// });
// }
// });
},
guid() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 32 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(32);
});
},
}, created() {
vm.tbCfItemComment.type = vm.commentList[0].value;
// vm.tbCfItemComment.type = vm.commentList[0].value;
}
});
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论