|
@@ -5,6 +5,12 @@ Component({
|
|
|
disabled: {
|
|
disabled: {
|
|
|
type: Boolean,
|
|
type: Boolean,
|
|
|
value: false
|
|
value: false
|
|
|
|
|
+ },
|
|
|
|
|
+ departmentid: {
|
|
|
|
|
+ type: [String, Number]
|
|
|
|
|
+ },
|
|
|
|
|
+ sa_service_improvementid: {
|
|
|
|
|
+ type: [String, Number]
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
options: {
|
|
options: {
|
|
@@ -13,13 +19,9 @@ Component({
|
|
|
lifetimes: {
|
|
lifetimes: {
|
|
|
attached: function () {
|
|
attached: function () {
|
|
|
getApp().globalData.Language.getLanguagePackage(this)
|
|
getApp().globalData.Language.getLanguagePackage(this)
|
|
|
- this.setData({
|
|
|
|
|
- siteid: wx.getStorageSync('userMsg').siteid
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
data: {
|
|
data: {
|
|
|
- sa_service_improvementid: 0,
|
|
|
|
|
content: {
|
|
content: {
|
|
|
nocache: true,
|
|
nocache: true,
|
|
|
pageNumber: 1,
|
|
pageNumber: 1,
|
|
@@ -31,9 +33,6 @@ Component({
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
list: [],
|
|
list: [],
|
|
|
- showSearch: false,
|
|
|
|
|
- focus: false,
|
|
|
|
|
- condition: ""
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
getList(id, init = false) {
|
|
getList(id, init = false) {
|
|
@@ -55,57 +54,48 @@ Component({
|
|
|
title: res.data,
|
|
title: res.data,
|
|
|
icon: "none"
|
|
icon: "none"
|
|
|
});
|
|
});
|
|
|
- let list = res.data.map(v => {
|
|
|
|
|
- try {
|
|
|
|
|
- v.cover = v.attinfos.length ? _Http.getSpecifiedImage(v.attinfos[0]) : ''
|
|
|
|
|
- } catch (error) {
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- return v
|
|
|
|
|
- })
|
|
|
|
|
this.setData({
|
|
this.setData({
|
|
|
"content.pageNumber": res.pageNumber + 1,
|
|
"content.pageNumber": res.pageNumber + 1,
|
|
|
"content.pageTotal": res.pageTotal,
|
|
"content.pageTotal": res.pageTotal,
|
|
|
"content.total": res.total,
|
|
"content.total": res.total,
|
|
|
- list: res.pageNumber == 1 ? list : this.data.list.concat(list),
|
|
|
|
|
|
|
+ list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
|
|
|
sa_service_improvementid: content.sa_service_improvementid
|
|
sa_service_improvementid: content.sa_service_improvementid
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- /* 去添加产品 */
|
|
|
|
|
- addProduct() {
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- toSearch() {
|
|
|
|
|
- if (this.data.showSearch && this.data.content.where.condition) {
|
|
|
|
|
- this.data.content.where.condition = '';
|
|
|
|
|
- this.getList("", true);
|
|
|
|
|
- } else if (this.data.condition) {
|
|
|
|
|
- this.data.content.where.condition = this.data.condition;
|
|
|
|
|
- this.setData({
|
|
|
|
|
- condition: this.data.condition
|
|
|
|
|
- })
|
|
|
|
|
- this.getList("", true);
|
|
|
|
|
- }
|
|
|
|
|
- this.setData({
|
|
|
|
|
- showSearch: !this.data.showSearch
|
|
|
|
|
|
|
+ deteleItem(e) {
|
|
|
|
|
+ const {
|
|
|
|
|
+ item
|
|
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
|
|
+ wx.showModal({
|
|
|
|
|
+ title: getApp().globalData.Language.getMapText('提示'),
|
|
|
|
|
+ content: getApp().globalData.Language.getMapText('是否确定删除该方案'),
|
|
|
|
|
+ cancelText: getApp().globalData.Language.getMapText('取消'),
|
|
|
|
|
+ confirmText: getApp().globalData.Language.getMapText('确定'),
|
|
|
|
|
+ complete: (res) => {
|
|
|
|
|
+ if (res.confirm) _Http.basic({
|
|
|
|
|
+ "id": 2026020210234702,
|
|
|
|
|
+ "content": {
|
|
|
|
|
+ "sa_service_improvement_planid": item.sa_service_improvement_planid
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ wx.showToast({
|
|
|
|
|
+ title: res.code != '1' ? res.msg : getApp().globalData.Language.getMapText('删除成功'),
|
|
|
|
|
+ icon: "none",
|
|
|
|
|
+ mask: true
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.code == '1') this.getList("", true)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- focus: this.data.showSearch
|
|
|
|
|
- })
|
|
|
|
|
- }, 300)
|
|
|
|
|
- },
|
|
|
|
|
- onChange({
|
|
|
|
|
- detail
|
|
|
|
|
- }) {
|
|
|
|
|
- this.data.condition = detail;
|
|
|
|
|
- },
|
|
|
|
|
- onSearch({
|
|
|
|
|
- detail
|
|
|
|
|
- }) {
|
|
|
|
|
- this.data.content.where.condition = detail;
|
|
|
|
|
- this.getList("", true)
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ editItem(e) {
|
|
|
|
|
+ const {
|
|
|
|
|
+ item
|
|
|
|
|
+ } = e.currentTarget.dataset;
|
|
|
|
|
+ wx.navigateTo({
|
|
|
|
|
+ url: `/E-service/serviceImprovement/scheme/insert?id=${item.sa_service_improvementid}&departmentid=${this.data.departmentid}&data=${JSON.stringify(item)}`
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|