const _Http = getApp().globalData.http;

Component({
    options: {
        addGlobalClass: true
    },
    properties: {
        list: Array,
        ownertable: String,
        ownerid: String,
        changeTotal: Function
    },
    data: {

    },
    methods: {
        toDetail(e) {
            const {
                item
            } = e.currentTarget.dataset;
            wx.navigateTo({
                url: `/packageA/setclient/modules/trace/detail/index?data=` + JSON.stringify({
                    "sys_datafollowupid": item.sys_datafollowupid,
                    "ownertable": this.data.ownertable,
                    "ownerid": this.data.ownerid
                }),
            })
        },
        editItem(e) {
            const {
                item
            } = e.currentTarget.dataset;
            wx.navigateTo({
                url: `/packageA/setclient/modules/trace/add/index?ownertable=${this.data.ownertable}&ownerid=${this.data.ownerid}&sys_datafollowupid=${item.sys_datafollowupid}`
            });
        },
        deleteItem(e) {
            const {
                item
            } = e.currentTarget.dataset;
            wx.navigateTo({
                url: `/packageA/setclient/modules/trace/list/delete?item=${JSON.stringify({
                    "sys_datafollowupid": item.sys_datafollowupid,
                    "ownertable": this.data.ownertable,
                    "ownerid": this.data.ownerid
                })}`,
            })
        },
    }
})