diff --git a/src/project/saas/AppCooperationPropaganda/addPropaganda.vue b/src/project/saas/AppCooperationPropaganda/addPropaganda.vue index a1f74369..679382d6 100644 --- a/src/project/saas/AppCooperationPropaganda/addPropaganda.vue +++ b/src/project/saas/AppCooperationPropaganda/addPropaganda.vue @@ -41,7 +41,7 @@
*审批人
- 请选择人员 + 请选择人员
@@ -54,7 +54,7 @@
*发送时间
- 请选择 + 请选择 {{ form.choiceTime }}
@@ -95,6 +95,8 @@
+ +
发送
@@ -127,6 +129,7 @@ export default { files: [], showTaskTime: false, userList: [], + userListIds: [], showPopup: false, params: { year: true, @@ -199,33 +202,42 @@ export default { // if(this.getExtension(item.name)==) }) + if(!this.form.taskTitle) { + return this.$u.toast('请输入任务名称') + } + + if(!this.form.sendScope) { + return this.$u.toast('请选择发送范围') + } + if(!this.form.contents.length) { return this.$u.toast("请输入发送内容") } - // if(!this.enableExamine) { - // if(!this.form.examines.length) { - // return this.$u.toast("请选择审批人") - // } else { - // this.form.enableExamine = '1' - // } - // } + if(this.enableExamine) { + if(!this.form.examines.length) { + return this.$u.toast("请选择审批人") + } else { + this.form.enableExamine = '1' + } + } - if(!this.isTimedTask) { + if(this.isTimedTask) { if(!this.form.choiceTime.length) { return this.$u.toast("请选择发送时间") } } - + this.flag = true this.$http.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form }).then(res=>{ - this.flag = false if(res?.code ==0) { - - // uni.navigateBack() + this.flag = false this.$u.toast("新增成功") - } - }) + } + }).catch((err)=>{ + this.flag = false + this.$u.toast(err) + }) }, @@ -234,12 +246,11 @@ export default { fromDepartmentId: 0, mode: "multi", type: ["user"], - // selectedDepartmentIds: this.departList?.map(e => e.id) selectedUserIds: this.userList?.map(e => e.id) }).then((res)=>{ - // if(res?.departmentList) { - // this.departmentId = res.departmentList[0].id - // } + if(res?.userList) { + this.userListIds = res.userList.map(e => e.id) + } } ).catch((err) => { console.log(err); @@ -331,6 +342,9 @@ export default { .color_red { color: #FF4466; } + .color_gray { + color: #CCD0D3; + } .inpt { margin-left: 14px; } diff --git a/src/project/saas/AppCooperationPropaganda/scopedSelect.vue b/src/project/saas/AppCooperationPropaganda/scopedSelect.vue index 1a3472aa..b9c1d1c8 100644 --- a/src/project/saas/AppCooperationPropaganda/scopedSelect.vue +++ b/src/project/saas/AppCooperationPropaganda/scopedSelect.vue @@ -38,9 +38,9 @@
- +
确定
@@ -79,10 +79,8 @@ export default { fromDepartmentId: 0, mode: "multi", type: ["user"], - // selectedDepartmentIds: this.departList?.map(e => e.id) selectedUserIds: this.userList?.map(e => e.id) }).then((res)=>{ - console.log(res); if(res?.userList) { this.userListIds = res.userList.map(e => e.id) } diff --git a/src/project/saas/AppCooperationPropaganda/sendScoped.vue b/src/project/saas/AppCooperationPropaganda/sendScoped.vue index 459952e1..82821ae5 100644 --- a/src/project/saas/AppCooperationPropaganda/sendScoped.vue +++ b/src/project/saas/AppCooperationPropaganda/sendScoped.vue @@ -15,6 +15,8 @@
+ +
确定