|
@@ -78,6 +78,12 @@ Page({
|
|
|
content
|
|
|
}).then(res => {
|
|
|
console.log("列表", res)
|
|
|
+
|
|
|
+ let deleteList = [],
|
|
|
+ initID = '9999' + wx.getStorageSync('userMsg').userid;
|
|
|
+ res.data.forEach(v => (initID == v.sat_sharematerial_classid && v.title == '') ? deleteList.push(v.sat_sharematerialid) : '');
|
|
|
+ if (deleteList.length != 0) return this.handleDelete(deleteList);
|
|
|
+
|
|
|
this.selectComponent('#ListBox').RefreshToComplete();
|
|
|
if (res.msg != '成功') return wx.showToast({
|
|
|
title: res.data,
|
|
@@ -101,6 +107,20 @@ Page({
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ /* 处理批量删除 */
|
|
|
+ handleDelete(list) {
|
|
|
+ _Http.basic({
|
|
|
+ "classname": "webmanage.saletool.sharematerial.sharematerial",
|
|
|
+ "method": "delete",
|
|
|
+ "content": {
|
|
|
+ "sat_sharematerialid": list
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log("处理删除", res);
|
|
|
+ if (res.msg == '成功') this.getList();
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
/* 清除搜索输入 */
|
|
|
searchClear() {
|
|
|
this.setData({
|