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

评论管理

上级 77c9e820
...@@ -66,10 +66,12 @@ public class TbCfItemCommentController { ...@@ -66,10 +66,12 @@ public class TbCfItemCommentController {
@RequiresPermissions("tbcfitemcomment:save") @RequiresPermissions("tbcfitemcomment:save")
@ResponseBody @ResponseBody
public R save(@RequestBody TbCfItemCommentEntity tbCfItemComment) { public R save(@RequestBody TbCfItemCommentEntity tbCfItemComment) {
tbCfItemCommentService.save(tbCfItemComment); int res = tbCfItemCommentService.save(tbCfItemComment);
if (res > 0) {
return R.ok(); return R.ok();
} }
return R.error("操作失败");
}
/** /**
* 修改 * 修改
...@@ -78,10 +80,13 @@ public class TbCfItemCommentController { ...@@ -78,10 +80,13 @@ public class TbCfItemCommentController {
@RequiresPermissions("tbcfitemcomment:update") @RequiresPermissions("tbcfitemcomment:update")
@ResponseBody @ResponseBody
public R update(@RequestBody TbCfItemCommentEntity tbCfItemComment) { public R update(@RequestBody TbCfItemCommentEntity tbCfItemComment) {
tbCfItemCommentService.update(tbCfItemComment); int res = tbCfItemCommentService.update(tbCfItemComment);
if (res > 0) {
return R.ok(); return R.ok();
} }
return R.error("操作失败");
}
/** /**
* 删除 * 删除
......
...@@ -57,10 +57,10 @@ public class TbCfItemCommentEntity implements Serializable { ...@@ -57,10 +57,10 @@ public class TbCfItemCommentEntity implements Serializable {
* 商品评论 * 商品评论
*/ */
private String itemReview; private String itemReview;
/** // /**
* 点赞人数 // * 点赞人数
*/ // */
private Long likeNum; // private Long likeNum;
/** /**
* 删除标志 0:正常 1:已删除 * 删除标志 0:正常 1:已删除
*/ */
...@@ -78,6 +78,24 @@ public class TbCfItemCommentEntity implements Serializable { ...@@ -78,6 +78,24 @@ public class TbCfItemCommentEntity implements Serializable {
private String orderNo; private String orderNo;
private String itemName; private String itemName;
private boolean real;
private String itemImg;
public String getItemImg() {
return itemImg;
}
public void setItemImg(String itemImg) {
this.itemImg = itemImg;
}
public boolean isReal() {
return real;
}
public void setReal(boolean real) {
this.real = real;
}
public String getUserName() { public String getUserName() {
return userName; return userName;
...@@ -250,19 +268,19 @@ public class TbCfItemCommentEntity implements Serializable { ...@@ -250,19 +268,19 @@ public class TbCfItemCommentEntity implements Serializable {
public String getItemReview() { public String getItemReview() {
return itemReview; return itemReview;
} }
/** // /**
* 设置:点赞人数 // * 设置:点赞人数
*/ // */
public void setLikeNum(Long likeNum) { // public void setLikeNum(Long likeNum) {
this.likeNum = likeNum; // this.likeNum = likeNum;
} // }
//
/** // /**
* 获取:点赞人数 // * 获取:点赞人数
*/ // */
public Long getLikeNum() { // public Long getLikeNum() {
return likeNum; // return likeNum;
} // }
/** /**
* 设置:删除标志 0:正常 1:已删除 * 设置:删除标志 0:正常 1:已删除
*/ */
......
package com.platform.service.impl; package com.platform.service.impl;
import com.platform.dao.TbCfItemCommentDao; import com.platform.dao.TbCfItemCommentDao;
import com.platform.dao.TbCfUserInfoDao;
import com.platform.entity.TbCfItemCommentEntity; import com.platform.entity.TbCfItemCommentEntity;
import com.platform.service.TbCfItemCommentService; import com.platform.service.TbCfItemCommentService;
import com.platform.utils.IdUtil; import com.platform.utils.IdUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -21,6 +24,9 @@ public class TbCfItemCommentServiceImpl implements TbCfItemCommentService { ...@@ -21,6 +24,9 @@ public class TbCfItemCommentServiceImpl implements TbCfItemCommentService {
@Autowired @Autowired
private TbCfItemCommentDao tbCfItemCommentDao; private TbCfItemCommentDao tbCfItemCommentDao;
@Autowired
private TbCfUserInfoDao tbCfUserInfoDao;
@Override @Override
public TbCfItemCommentEntity queryObject(String id) { public TbCfItemCommentEntity queryObject(String id) {
return tbCfItemCommentDao.queryObject(id); return tbCfItemCommentDao.queryObject(id);
...@@ -38,12 +44,28 @@ public class TbCfItemCommentServiceImpl implements TbCfItemCommentService { ...@@ -38,12 +44,28 @@ public class TbCfItemCommentServiceImpl implements TbCfItemCommentService {
@Override @Override
public int save(TbCfItemCommentEntity tbCfItemComment) { public int save(TbCfItemCommentEntity tbCfItemComment) {
// String account = tbCfItemComment.getUserId();
// String userId = tbCfUserInfoDao.queryById(account);
// if (StringUtils.isBlank(userId)) {
// return 0;
// }
// tbCfItemComment.setUserId(userId);
tbCfItemComment.setId(IdUtil.createIdbyUUID()); tbCfItemComment.setId(IdUtil.createIdbyUUID());
tbCfItemComment.setReal(true);
tbCfItemComment.setCreateTime(new Date());
tbCfItemComment.setUpdateTime(new Date());
tbCfItemComment.setDelFlag(0);
return tbCfItemCommentDao.save(tbCfItemComment); return tbCfItemCommentDao.save(tbCfItemComment);
} }
@Override @Override
public int update(TbCfItemCommentEntity tbCfItemComment) { public int update(TbCfItemCommentEntity tbCfItemComment) {
// String account = tbCfItemComment.getUserId();
// String userId = tbCfUserInfoDao.queryById(account);
// if (StringUtils.isBlank(userId)) {
// return 0;
// }
tbCfItemComment.setUpdateTime(new Date());
return tbCfItemCommentDao.update(tbCfItemComment); return tbCfItemCommentDao.update(tbCfItemComment);
} }
......
...@@ -15,13 +15,15 @@ ...@@ -15,13 +15,15 @@
<result property="logisticsScore" column="logistics_score"/> <result property="logisticsScore" column="logistics_score"/>
<result property="priceScore" column="price_score"/> <result property="priceScore" column="price_score"/>
<result property="itemReview" column="item_review"/> <result property="itemReview" column="item_review"/>
<result property="likeNum" column="like_num"/> <!-- <result property="likeNum" column="like_num"/>-->
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="username" column="nick"></result> <result property="real" column="real"/>
<result property="orderNo" column="order_no"></result> <result property="itemImg" column="item_img"/>
<result property="itemName" column="item_name"></result> <!-- <result property="username" column="nick"></result>-->
<!-- <result property="orderNo" column="order_no"></result>-->
<!-- <result property="itemName" column="item_name"></result>-->
</resultMap> </resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfItemCommentEntity"> <select id="queryObject" resultType="com.platform.entity.TbCfItemCommentEntity">
...@@ -37,7 +39,7 @@ ...@@ -37,7 +39,7 @@
`logistics_score`, `logistics_score`,
`price_score`, `price_score`,
`item_review`, `item_review`,
`like_num`, `real`,
`del_flag`, `del_flag`,
`create_time`, `create_time`,
`update_time` `update_time`
...@@ -58,13 +60,14 @@ ...@@ -58,13 +60,14 @@
c.logistics_score, c.logistics_score,
c.price_score, c.price_score,
c.item_review, c.item_review,
c.like_num, c.real,
c.del_flag, c.del_flag,
c.create_time, c.create_time,
c.update_time, c.update_time,
u.nick userName, u.nick userName,
o.order_no orderNo, o.order_no,
i.item_name itemName i.item_name,
i.item_img
FROM FROM
tb_cf_item_comment c tb_cf_item_comment c
LEFT JOIN tb_cf_user_info u ON c.user_id = u.user_id LEFT JOIN tb_cf_user_info u ON c.user_id = u.user_id
...@@ -75,12 +78,24 @@ ...@@ -75,12 +78,24 @@
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND u.nick LIKE concat('%',#{name},'%') AND u.nick LIKE concat('%',#{name},'%')
</if> </if>
<if test="real != null and real.trim()!=''">
AND c.real=#{real}
</if>
<if test="startTime != null and startTime.trim() != '' and endTime!=null and endTime!=''">
AND c.create_time between #{startTime} and #{endTime}
</if>
<if test="orderNo != null and orderNo.trim() != ''">
AND o.order_no =#{orderNo}
</if>
<if test="itemName != null and itemName.trim() != ''">
AND i.item_name LIKE concat('%',#{itemName},'%')
</if>
<choose> <choose>
<when test="sidx != null and sidx.trim() != ''"> <when test="sidx != null and sidx.trim() != ''">
order by ${sidx} ${order} order by ${sidx} ${order}
</when> </when>
<otherwise> <otherwise>
order by item_id desc,create_time desc order by create_time desc
</otherwise> </otherwise>
</choose> </choose>
<if test="offset != null and limit != null"> <if test="offset != null and limit != null">
...@@ -89,11 +104,29 @@ ...@@ -89,11 +104,29 @@
</select> </select>
<select id="queryTotal" resultType="int"> <select id="queryTotal" resultType="int">
select count(*) from tb_cf_item_comment c left join tb_cf_user_info u on c.user_id=u.user_id SELECT
count(1)
FROM
tb_cf_item_comment c
LEFT JOIN tb_cf_user_info u ON c.user_id = u.user_id
left join tb_cf_order o on c.order_id=o.order_id
left join tb_cf_station_item i on c.item_id=i.item_id
WHERE 1=1 WHERE 1=1
<if test="name != null and name.trim() != ''"> <if test="name != null and name.trim() != ''">
AND u.nick LIKE concat('%',#{name},'%') AND u.nick LIKE concat('%',#{name},'%')
</if> </if>
<if test="real != null and real.trim()!=''">
AND c.real=#{real}
</if>
<if test="startTime != null and startTime.trim() != '' and endTime!=null and endTime!=''">
AND c.create_time between #{startTime} and #{endTime}
</if>
<if test="orderNo != null and orderNo.trim() != ''">
AND o.order_no =#{orderNo}
</if>
<if test="itemName != null and itemName.trim() != ''">
AND i.item_name LIKE concat('%',#{itemName},'%')
</if>
</select> </select>
<insert id="save" parameterType="com.platform.entity.TbCfItemCommentEntity"> <insert id="save" parameterType="com.platform.entity.TbCfItemCommentEntity">
...@@ -109,7 +142,7 @@ ...@@ -109,7 +142,7 @@
`logistics_score`, `logistics_score`,
`price_score`, `price_score`,
`item_review`, `item_review`,
`like_num`, `real`,
`del_flag`, `del_flag`,
`create_time`, `create_time`,
`update_time`) `update_time`)
...@@ -125,7 +158,7 @@ ...@@ -125,7 +158,7 @@
#{logisticsScore}, #{logisticsScore},
#{priceScore}, #{priceScore},
#{itemReview}, #{itemReview},
#{likeNum}, #{real},
#{delFlag}, #{delFlag},
#{createTime}, #{createTime},
#{updateTime}) #{updateTime})
...@@ -144,7 +177,7 @@ ...@@ -144,7 +177,7 @@
<if test="logisticsScore != null">`logistics_score` = #{logisticsScore},</if> <if test="logisticsScore != null">`logistics_score` = #{logisticsScore},</if>
<if test="priceScore != null">`price_score` = #{priceScore},</if> <if test="priceScore != null">`price_score` = #{priceScore},</if>
<if test="itemReview != null">`item_review` = #{itemReview},</if> <if test="itemReview != null">`item_review` = #{itemReview},</if>
<if test="likeNum != null">`like_num` = #{likeNum},</if> <!-- <if test="real != null">`like_num` = #{real},</if>-->
<if test="delFlag != null">`del_flag` = #{delFlag},</if> <if test="delFlag != null">`del_flag` = #{delFlag},</if>
<if test="createTime != null">`create_time` = #{createTime},</if> <if test="createTime != null">`create_time` = #{createTime},</if>
<if test="updateTime != null">`update_time` = #{updateTime}</if> <if test="updateTime != null">`update_time` = #{updateTime}</if>
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
padding: 13px; padding: 13px;
vertical-align: middle; vertical-align: middle;
} }
.ivu-card-body>form>div{
margin: 0 auto;
width: 500px;
}
</style> </style>
</head> </head>
<body> <body>
...@@ -42,41 +46,56 @@ ...@@ -42,41 +46,56 @@
<Card v-show="!showList"> <Card v-show="!showList">
<p slot="title">{{title}}</p> <p slot="title">{{title}}</p>
<i-form ref="formValidate" :model="tbCfItemComment" :rules="ruleValidate" :label-width="80"> <i-form ref="formValidate" :model="tbCfItemComment" :rules="ruleValidate" :label-width="80">
<Form-item label="评论人" prop="userId"> <Form-item label="选择用户" prop="userId" style="width: 500px">
<i-input v-model="tbCfItemComment.userId" placeholder="评论人"/> <i-input v-model="tbCfItemComment.userId" placeholder="选择用户"/>
</Form-item>
<!-- <Form-item label="订单ID" prop="orderId">-->
<!-- <i-input v-model="tbCfItemComment.orderId" placeholder="订单ID"/>-->
<!-- </Form-item>-->
<Form-item label="评论时间" prop="createTime" style="width: 500px">
<Date-picker v-model="tbCfItemComment.createTime" type="datetime" placeholder="评论时间"
></Date-picker>
</Form-item>
<Form-item label="类型" prop="type" style="width: 500px">
<i-select v-model="tbCfItemComment.type" placeholder="请选择"/>
<i-option v-for="v in commentList" :value="v.value">{{v.label}}</i-option>
</i-select>
</Form-item> </Form-item>
<Form-item label="订单ID" prop="orderId"> <Form-item label="图片/视频" prop="urls">
<i-input v-model="tbCfItemComment.orderId" placeholder="订单ID"/> <!-- <i-input v-model="xPicture.pictureUrl" placeholder="图片地址"/> -->
<upload
multiple
action="../api/osstest/uploadtest"
:before-upload="handleBeforeUpload"
:on-success="vhandleSuccess" :show-upload-list="false" accept="image/jpeg, image/png">
<i-button icon="ios-cloud-upload-outline">请选择图片</i-button>
</upload>
<div id="imgWrapper" style="display: flex;position: relative;">
<div v-for="item in uploadList" style="margin-left: 5px;" :data-img-path="item">
<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:11px"
@click="delImg1(item)"></i>
</div>
</div>
</Form-item> </Form-item>
<Form-item label="商品ID" prop="itemId"> <Form-item label="选择商品" prop="itemId" style="width: 500px">
<i-input v-model="tbCfItemComment.itemId" placeholder="商品ID"/> <i-input v-model="tbCfItemComment.itemId" placeholder="选择商品"/>
</Form-item> </Form-item>
<Form-item label="商品评分" prop="itemScore"> <Form-item label="商品评分" prop="itemScore" style="width: 500px">
<i-input v-model="tbCfItemComment.itemScore" placeholder="商品评分"/> <i-input v-model="tbCfItemComment.itemScore" placeholder="商品评分"/>
</Form-item> </Form-item>
<Form-item label="服务评分" prop="serviceScore"> <Form-item label="服务评分" prop="serviceScore" style="width: 500px">
<i-input v-model="tbCfItemComment.serviceScore" placeholder="服务评分"/> <i-input v-model="tbCfItemComment.serviceScore" placeholder="服务评分"/>
</Form-item> </Form-item>
<Form-item label="物流评分" prop="logisticsScore"> <Form-item label="物流评分" prop="logisticsScore" style="width: 500px">
<i-input v-model="tbCfItemComment.logisticsScore" placeholder="物流评分"/> <i-input v-model="tbCfItemComment.logisticsScore" placeholder="物流评分"/>
</Form-item> </Form-item>
<Form-item label="价格评分" prop="priceScore"> <Form-item label="价格评分" prop="priceScore" style="width: 500px">
<i-input v-model="tbCfItemComment.priceScore" placeholder="价格评分"/> <i-input v-model="tbCfItemComment.priceScore" placeholder="价格评分"/>
</Form-item> </Form-item>
<Form-item label="商品评论" prop="itemReview"> <Form-item label="商品评论" prop="itemReview" >
<i-input v-model="tbCfItemComment.itemReview" placeholder="商品评论"/> <textarea v-model="tbCfItemComment.itemReview" style="width: 400px;height: 300px;"></textarea>
</Form-item>
<Form-item label="点赞人数" prop="likeNum">
<i-input v-model="tbCfItemComment.likeNum" placeholder="点赞人数"/>
</Form-item>
<Form-item label="删除标志 0:正常 1:已删除" prop="delFlag">
<i-input v-model="tbCfItemComment.delFlag" placeholder="删除标志 0:正常 1:已删除"/>
</Form-item>
<Form-item label="创建时间" prop="createTime">
<i-input v-model="tbCfItemComment.createTime" placeholder="创建时间"/>
</Form-item>
<Form-item label="回复时间" prop="replyTime">
<i-input v-model="tbCfItemComment.replyTime" placeholder="回复时间"/>
</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>
......
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
position: relative !important; position: relative !important;
top: 0 !important; top: 0 !important;
} }
.ui-jqgrid .ui-jqgrid-bdiv{
overflow: revert !important;
}
</style> </style>
<body> <body>
<div id="rrapp" v-cloak style="height: calc(100% - 15px);"> <div id="rrapp" v-cloak style="height: calc(100% - 15px);">
......
...@@ -11,14 +11,23 @@ $(function () { ...@@ -11,14 +11,23 @@ $(function () {
{label: '物流评分', name: 'logisticsScore', index: 'logistics_score', width: 80}, {label: '物流评分', name: 'logisticsScore', index: 'logistics_score', width: 80},
{label: '价格评分', name: 'priceScore', index: 'price_score', width: 80}, {label: '价格评分', name: 'priceScore', index: 'price_score', width: 80},
{label: '商品评论', name: 'itemReview', index: 'item_review', width: 80}, {label: '商品评论', name: 'itemReview', index: 'item_review', width: 80},
{label: '点赞人数', name: 'likeNum', index: 'like_num', width: 80}, // {label: '点赞人数', name: 'likeNum', index: 'like_num', width: 80},
{label: '状态', name: 'delFlag', index: 'del_flag', width: 80, formatter: statusFormat}, {label: '状态', name: 'delFlag', index: 'del_flag', width: 80, formatter: statusFormat},
{label: '创建时间', name: 'createTime', index: 'create_time', width: 80} {label: '创建时间', name: 'createTime', index: 'create_time', width: 80},
{
label: '评论类型', name: 'real', index: 'real', width: 80, formatter: function (value, options, row) {
if (value) {
return '<span class="label label-primary">真实评论</span>'
}
return '<span class="label label-warning">虚拟评论</span>'
}
}
], ],
shrinkToFit: true, shrinkToFit: true,
datatype : "json", datatype: "json",
rowNum:15, rowNum: 10,
rowList:[15,30,45], rowList: [10, 30, 45],
mtype: "POST", mtype: "POST",
rownumbers: true, rownumbers: true,
rownumWidth: 40, rownumWidth: 40,
...@@ -33,6 +42,20 @@ $(function () { ...@@ -33,6 +42,20 @@ $(function () {
let vm = new Vue({ let vm = new Vue({
el: '#rrapp', el: '#rrapp',
data: { data: {
uploadList: [],
commentList: [
{
label: '纯文本',
value: 0
}, {
label: '带图片',
value: 1
}, {
label: '带视频',
value: 2
}
],
showList: true, showList: true,
title: null, title: null,
tbCfItemComment: {}, tbCfItemComment: {},
...@@ -42,19 +65,101 @@ let vm = new Vue({ ...@@ -42,19 +65,101 @@ let vm = new Vue({
] ]
}, },
q: { q: {
name: '' name: '',
real: '',
startTime: '',
endTime: '',
orderNo: '',
itemName: ''
} }
}, },
methods: { methods: {
vhandleSuccess(response, file, fileList) {
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
console.log('shangchuan', response)
vm.uploadList.push(response);
$("#itemImg").show();
},
handleSuccess(response, file, fileList) {
// "http://diaosaas-prod.oss-cn-shenzhen.aliyuncs.com/education/155728894307110106.jpg"
vm.uploadList1.push(response);
$("#skuImg").show();
},
handleBeforeUpload(file) {
// 上传图片大小不超过5M
if (file.size > 5 * 1024 * 1024) {
alert('请上传不超过5M的图片');
return false;
}
const check = this.uploadList.length < 6;
if (!check) {
this.$Notice.warning({
title: '最多只能上传6张图片'
});
return false;
}
// 限制上传文件的宽高
// return this.checkImageWH(file,750,320);
},
// 限制上传图片的宽高
checkImageWH: function (file, width, height) {
let self = this;
return new Promise(function (resolve, reject) {
let filereader = new FileReader();
filereader.onload = e => {
let src = e.target.result;
const image = new Image();
image.onload = function () {
if (width && image.width != width) {
self.$Notice.error({
title: '请上传宽为' + width + "的图片",
});
reject();
} else if (height && image.height != height) {
self.$Notice.error({
title: '请上传高为' + height + "的图片",
});
reject();
} else {
resolve();
}
};
image.onerror = reject;
image.src = src;
};
filereader.readAsDataURL(file);
});
},
// 删除上传图片
delImg1: function (url) {
if (vm.title != "详情") {
vm.uploadList.remove(url);
console.log(url);
Ajax.request({
url: "../api/upload/delFile?url=" + url,
async: false,
type: "POST",
contentType: "application/json",
successCallback: function (resultData) {
// console.log(resultData);
iview.Message.success(resultData.success);
}
});
}
},
query: function () { query: function () {
vm.reload(); vm.reload();
}, },
add: function () { add: function () {
vm.uploadList = [];
vm.showList = false; vm.showList = false;
vm.title = "新增"; vm.title = "新增";
vm.tbCfItemComment = {}; vm.tbCfItemComment = {};
}, },
update: function (event) { update: function (event) {
vm.uploadList = [];
let id = getSelectedRow("#jqGrid"); let id = getSelectedRow("#jqGrid");
if (id == null) { if (id == null) {
return; return;
...@@ -66,6 +171,8 @@ let vm = new Vue({ ...@@ -66,6 +171,8 @@ let vm = new Vue({
}, },
saveOrUpdate: function (event) { saveOrUpdate: function (event) {
let url = vm.tbCfItemComment.id == null ? "../tbcfitemcomment/save" : "../tbcfitemcomment/update"; let url = vm.tbCfItemComment.id == null ? "../tbcfitemcomment/save" : "../tbcfitemcomment/update";
console.log("this.uploadList", this.uploadList)
vm.tbCfItemComment.urls = this.uploadList.map(res => res).join(';');
Ajax.request({ Ajax.request({
url: url, url: url,
params: JSON.stringify(vm.tbCfItemComment), params: JSON.stringify(vm.tbCfItemComment),
...@@ -104,6 +211,7 @@ let vm = new Vue({ ...@@ -104,6 +211,7 @@ let vm = new Vue({
async: true, async: true,
successCallback: function (r) { successCallback: function (r) {
vm.tbCfItemComment = r.tbCfItemComment; vm.tbCfItemComment = r.tbCfItemComment;
vm.uploadList = vm.tbCfItemComment.urls.split(";");
} }
}); });
}, },
...@@ -111,14 +219,26 @@ let vm = new Vue({ ...@@ -111,14 +219,26 @@ 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,
'real': vm.q.real,
'startTime': vm.q.startTime,
'endTime': vm.q.endTime,
'orderNo': vm.q.orderNo,
'itemName': vm.q.itemName
},
page: page page: page
}).trigger("reloadGrid"); }).trigger("reloadGrid");
vm.handleReset('formValidate'); vm.handleReset('formValidate');
}, },
reloadSearch: function () { reloadSearch: function () {
vm.q = { vm.q = {
name: '' name: '',
real: '',
startTime: '',
endTime: '',
orderNo: '',
itemName: ''
}; };
vm.reload(); vm.reload();
}, },
...@@ -130,5 +250,7 @@ let vm = new Vue({ ...@@ -130,5 +250,7 @@ let vm = new Vue({
handleReset: function (name) { handleReset: function (name) {
handleResetForm(this, name); handleResetForm(this, name);
} }
}, created() {
vm.tbCfItemComment.type = vm.commentList[0].value;
} }
}); });
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论