提交 96c0fe48 authored 作者: 陆's avatar

交给德鹏做测试

上级 e9f3383b
......@@ -280,6 +280,7 @@
</div>
<br/>
<i-button type="info" @click="addItems">添加商品</i-button>
<i-button type="info" @click="delAll">批量删除</i-button>
<br/>
<table id="adItemjqGrid"></table>
......
......@@ -177,7 +177,7 @@ let vm = new Vue({
},
sortItem(e) {
let id = $("#jqGrid").getGridParam("selrow");
if (id == '' || id == null) {
if (id == '' || id == null || vm.iscopy == 1) {
id = vm.tempId;
}
vm.modal1 = true;
......@@ -196,7 +196,7 @@ let vm = new Vue({
},
deal() {
let id = $("#jqGrid").getGridParam("selrow");
if (id == '' || id == null) {
if (id == '' || id == null || vm.iscopy == 1) {
id = vm.tempId;
}
console.log('deal-->adId', id)
......@@ -223,13 +223,39 @@ let vm = new Vue({
delItem(itemId) {
let id = $("#jqGrid").getGridParam("selrow");
if (id == '' || id == null) {
if (id == '' || id == null || vm.iscopy == 1) {
id = vm.tempId;
}
var data = []
data.push(itemId)
confirm('确定要删除选中的记录?', function () {
Ajax.request({
url: "../advertisementitem/deleteByItem?itemId=" + itemId + '&adId=' + id,
// url: "../advertisementitem/deleteByItem?itemId=" + itemId + '&adId=' + id,
url: "../advertisementitem/deleteByItem?adId=" + id ,
type: "POST",
data:data,
contentType: "application/json",
successCallback: function () {
alert('操作成功', function (index) {
vm.btn_Search(id);
});
}
});
});
},
// 批量删除
delAll() {
let id = $("#jqGrid").getGridParam("selrow");
if (id == '' || id == null || vm.iscopy == 1) {
id = vm.tempId;
}
let ids = getSelectedRows("#adItemjqGrid");
confirm('确定要删除选中的记录?', function () {
Ajax.request({
// url: "../advertisementitem/deleteByItem?itemId=" + itemId + '&adId=' + id,
url: "../advertisementitem/deleteByItem?adId=" + id ,
type: "POST",
params: JSON.stringify(ids),
contentType: "application/json",
successCallback: function () {
alert('操作成功', function (index) {
......@@ -246,7 +272,7 @@ let vm = new Vue({
return;
}
let id = vm.advertisement.id;
if (id == null || id == '' || id == 'undefined') {
if (id == null || id == '' || id == 'undefined' || vm.iscopy == 1) {
id = vm.tempId;
}
Ajax.request({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论