|
|
@@ -18,7 +18,7 @@ Component({
|
|
|
type: Boolean,
|
|
|
value: false
|
|
|
},
|
|
|
- expenseBreakdown:{
|
|
|
+ expenseBreakdown: {
|
|
|
type: Boolean,
|
|
|
}
|
|
|
},
|
|
|
@@ -33,27 +33,48 @@ Component({
|
|
|
pageTotal: 1,
|
|
|
pageSize: 20,
|
|
|
total: null,
|
|
|
- where: {},
|
|
|
- sort: [{
|
|
|
- reversed: 0,
|
|
|
- sorted: 1,
|
|
|
- sortid: 84,
|
|
|
- sortname: "默认"
|
|
|
- }]
|
|
|
+ where: {
|
|
|
+ condition: ""
|
|
|
+ }
|
|
|
},
|
|
|
+ showSearch: false,
|
|
|
+ focus: false,
|
|
|
+ condition: "",
|
|
|
poputShow: false,
|
|
|
- showWhere: '所有日期',
|
|
|
followList: [],
|
|
|
- timeRangeShow: false,
|
|
|
- whereType: {
|
|
|
- value: "start",
|
|
|
- list: {
|
|
|
- "start": "",
|
|
|
- "end": ""
|
|
|
- }
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
+ toSearch() {
|
|
|
+ if (this.data.showSearch && this.data.content.where.condition) {
|
|
|
+ this.data.content.where.condition = '';
|
|
|
+ this.getList(this.data.sat_orderclueid, true);
|
|
|
+ } else if (this.data.condition) {
|
|
|
+ this.data.content.where.condition = this.data.condition;
|
|
|
+ this.setData({
|
|
|
+ condition: this.data.condition
|
|
|
+ })
|
|
|
+ this.getList(this.data.sat_orderclueid, true);
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ showSearch: !this.data.showSearch
|
|
|
+ })
|
|
|
+ setTimeout(() => {
|
|
|
+ this.setData({
|
|
|
+ focus: this.data.showSearch
|
|
|
+ })
|
|
|
+ }, 300)
|
|
|
+ },
|
|
|
+ onChange({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ this.data.condition = detail;
|
|
|
+ },
|
|
|
+ onSearch({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ this.data.content.where.condition = detail;
|
|
|
+ this.getList(this.data.sat_orderclueid, true)
|
|
|
+ },
|
|
|
getList(id, init = false) {
|
|
|
let content = this.data.content;
|
|
|
if (init) content.pageNumber = 1;
|
|
|
@@ -63,7 +84,6 @@ Component({
|
|
|
content
|
|
|
}).then(res => {
|
|
|
console.log('线索跟进', res);
|
|
|
-
|
|
|
if (this.data.isshowsalesfeesamount) res.data = res.data.map(v => {
|
|
|
v.showsalesfeesamount = CNY(v.salesfeesamount)
|
|
|
return v
|
|
|
@@ -75,18 +95,12 @@ Component({
|
|
|
"content.total": res.total,
|
|
|
sat_orderclueid: id
|
|
|
})
|
|
|
- setTimeout(() => {
|
|
|
- res.data.forEach(v => {
|
|
|
- if (v.attinfo.length) this.selectComponent(`#Yl_Files${v.rowindex}`).handleFiles(v.attinfo, true)
|
|
|
- })
|
|
|
- }, 50)
|
|
|
})
|
|
|
},
|
|
|
viewFiles(e) {
|
|
|
const {
|
|
|
item
|
|
|
} = e.currentTarget.dataset;
|
|
|
- console.log(item)
|
|
|
this.setData({
|
|
|
poputShow: true
|
|
|
})
|
|
|
@@ -98,67 +112,6 @@ Component({
|
|
|
})
|
|
|
this.selectComponent("#Yl_Files").initData()
|
|
|
},
|
|
|
- changeIsdesc() {
|
|
|
- this.setData({
|
|
|
- "content.sort[0].reversed": this.data.content.sort[0].reversed == 1 ? 0 : 1
|
|
|
- });
|
|
|
- this.getList(this.data.sat_orderclueid, true)
|
|
|
- },
|
|
|
- /* 打开选择时间 */
|
|
|
- openSelectDate() {
|
|
|
- this.setData({
|
|
|
- timeRangeShow: true
|
|
|
- })
|
|
|
- },
|
|
|
- /* 确定时间范围 */
|
|
|
- determineScope() {
|
|
|
- const {
|
|
|
- list
|
|
|
- } = this.data.whereType;
|
|
|
- this.setData({
|
|
|
- "content.where": list,
|
|
|
- showWhere: list.start + '~' + list.end,
|
|
|
- timeRangeShow: false
|
|
|
- });
|
|
|
- this.getList(this.data.sat_orderclueid, true);
|
|
|
- },
|
|
|
- /* 得到选择时间 */
|
|
|
- getDate({
|
|
|
- detail
|
|
|
- }) {
|
|
|
- let obj = this.data.whereType;
|
|
|
- obj.list[obj.value] = detail;
|
|
|
- this.setData({
|
|
|
- whereType: obj
|
|
|
- })
|
|
|
- },
|
|
|
- /* 选择日期类型 */
|
|
|
- selectDateType(e) {
|
|
|
- const {
|
|
|
- name
|
|
|
- } = e.target.dataset;
|
|
|
- this.setData({
|
|
|
- "whereType.value": name
|
|
|
- })
|
|
|
- },
|
|
|
- /* 查看所有日期 */
|
|
|
- toSeeAll() {
|
|
|
- this.setData({
|
|
|
- showWhere: "所有日期"
|
|
|
- })
|
|
|
- this.timeRangeClose();
|
|
|
- this.getList(this.data.sat_orderclueid, true);
|
|
|
- },
|
|
|
- /* 关闭时间范围选择 */
|
|
|
- timeRangeClose() {
|
|
|
- this.setData({
|
|
|
- timeRangeShow: false,
|
|
|
- "content.where": {
|
|
|
- "start": "",
|
|
|
- "end": ""
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
deleteItem(e) {
|
|
|
const {
|
|
|
item
|
|
|
@@ -198,11 +151,6 @@ Component({
|
|
|
this.setData({
|
|
|
followList: res.data,
|
|
|
});
|
|
|
- setTimeout(() => {
|
|
|
- res.data.forEach(v => {
|
|
|
- if (v.attinfo.length) this.selectComponent(`#Yl_Files${v.rowindex}`).handleFiles(v.attinfo, true)
|
|
|
- })
|
|
|
- }, 50)
|
|
|
delete(_Http.changeItem)
|
|
|
})
|
|
|
},
|
|
|
@@ -232,5 +180,35 @@ Component({
|
|
|
})
|
|
|
}.bind(this)
|
|
|
},
|
|
|
+ comment(e) {
|
|
|
+ let page = this.selectComponent('#' + e.currentTarget.id);
|
|
|
+ page.setData({
|
|
|
+ show: !page.data.show
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updateCommentList({
|
|
|
+ detail
|
|
|
+ }) {
|
|
|
+ console.log("detail", detail)
|
|
|
+ detail.pageSize = 99999;
|
|
|
+ _Http.basic({
|
|
|
+ "id": 20240920092204,
|
|
|
+ content: detail
|
|
|
+ }).then(res => {
|
|
|
+ console.log("更新评论列表", res)
|
|
|
+ if (res.code == 1) {
|
|
|
+ let idName = detail.ownertable + 'id';
|
|
|
+ const index = this.data.followList.findIndex(v => v[idName] == detail.ownerid)
|
|
|
+ if (index != -1) {
|
|
|
+ let item = this.data.followList[index];
|
|
|
+ item.commentqty = res.total == 0 ? 0 : res.data[0].totalqty;
|
|
|
+ item.comment = res.data;
|
|
|
+ this.setData({
|
|
|
+ [`followList[${index}]`]: item
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|