123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- const _Http = getApp().globalData.http;
- Page({
- data: {
- ownerid: null,
- ownertable: null,
- sys_datafollowupid: 0,
- type: "",
- content: "",
- actions: [{
- name: "上门拜访"
- }, {
- name: "电话拜访"
- }, {
- name: "微信联系"
- }, {
- name: "QQ联系"
- }],
- show: false
- },
- onLoad(options) {
- if (options.ownertable) {
- this.setData({
- ...options
- })
- }
- },
- openSelect() {
- this.setData({
- show: true
- })
- },
- onCancel() {
- this.setData({
- show: false
- })
- },
- onSelect({
- detail
- }) {
- this.setData({
- type: detail.name
- })
- this.onCancel();
- },
- onInput(e) {
- this.setData({
- content: e.detail.value
- })
- },
- selectUser() {
- wx.navigateTo({
- url: `/packageA/group/index?ownertable=${this.data.ownertable}&ownerid=${this.data.ownerid}&radio`,
- })
- },
- submit() {
- const content = {
- type: this.data.type,
- content: this.data.content,
- ownerid: this.data.ownerid,
- ownertable: this.data.ownertable,
- sys_datafollowupid: this.data.sys_datafollowupid
- };
- if (!content.content) return;
- _Http.basic({
- "id": 20220930121601,
- content
- }).then(res => {
- console.log(res)
- if (res.msg != '成功') return wx.showToast({
- title: res.data,
- icon: "none"
- });
- wx.showToast({
- title: '保存成功',
- icon: "none"
- });
- setTimeout(() => {
- wx.navigateBack();
- return;
- const detail = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/modules/trace/detail/index');
- if (detail) wx.navigateBack();
- const list = getCurrentPages().find(v => v.__route__ == 'packageA/setclient/detail');
- if (list) list.selectComponent("#Trace").getList(this.data.sys_datafollowupid)
- }, 500)
- })
- },
- })
|