|
@@ -38,7 +38,7 @@
|
|
|
<van-cell title="任务类型" required id="task_types">
|
|
|
<template slot="right-icon">
|
|
|
<van-radio-group v-model="data.pt_id" direction="horizontal" class="radio_button">
|
|
|
- <van-radio checked-color class="list" :name="item.id" v-for="(item, index) in point_types" v-if="item.code != 'JX'" :key="index">{{ item.name }}</van-radio>
|
|
|
+ <van-radio checked-color class="list" :name="item.id" v-for="(item, index) in point_types" v-if="item.code !== 'JX'" :key="index">{{ item.name }}</van-radio>
|
|
|
</van-radio-group>
|
|
|
<van-icon class="small_tip" @click="show_small_tip = true" name="question-o" />
|
|
|
</template>
|
|
@@ -302,6 +302,9 @@ export default {
|
|
|
NumberInput
|
|
|
},
|
|
|
data() {
|
|
|
+ let pts = this.$getTypes;
|
|
|
+ let ptB = pts.filter(pt => pt.code === 'BF');
|
|
|
+ ptB = ptB ? ptB[0] : null;
|
|
|
return {
|
|
|
point: 0,
|
|
|
exced: 0, // 超预期计算标准
|
|
@@ -394,9 +397,10 @@ export default {
|
|
|
executor_name: [],
|
|
|
reviewer: [], // 登录员工的信息,
|
|
|
manage_scope: this.$userInfo().employee_detail.manage_scope,
|
|
|
+ pts:pts,
|
|
|
data: {
|
|
|
targets: [],
|
|
|
- pt_id: 0,
|
|
|
+ pt_id: ptB ? ptB.id : 0,
|
|
|
task_name: '',
|
|
|
task_remark: '',
|
|
|
base_point: 0,
|
|
@@ -434,7 +438,7 @@ export default {
|
|
|
pointLevel: {},
|
|
|
employee_map: this.$getEmployeeMap(),
|
|
|
approver_manage_scope: [],
|
|
|
- point_types: this.$getTypes,
|
|
|
+ point_types: pts,
|
|
|
showScheduleExpireDate:false,
|
|
|
scheduleExpireDate:null
|
|
|
};
|
|
@@ -486,7 +490,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
scheduleExpireDate(val){
|
|
|
+ // console.log('任务 schedule expire Date',val);
|
|
|
this.data.schedule_expire_date = val ? moment(val).format('YYYY-MM-DD') : '';
|
|
|
+ // console.log('任务 ',this.data)
|
|
|
if (val) this.toast("重复任务将在" + this.data.schedule_expire_date + "停止自动发布")
|
|
|
}
|
|
|
},
|
|
@@ -757,6 +763,9 @@ export default {
|
|
|
}else if(this.data.task_cycle==3&&this.data.task_expire_day<=moment().format('D')){
|
|
|
is=false
|
|
|
}
|
|
|
+
|
|
|
+ if (!data.schedule_expire_date) delete data.schedule_expire_date;
|
|
|
+
|
|
|
this.$axiosUser('post', url, data).then(res => {
|
|
|
if(this.data.task_cycle&&is){
|
|
|
let str=this.data.task_cycle==1? '您发布的每日重复任务将于明天0点执行自动发布,是否需要立即发布一条任务?':this.data.task_cycle==2? '您发布的每周重复任务将于下周一执行自动发布,是否需要立即发布一条任务?':'您发布的每月重复任务将于下个月1号执行自动发布,是否需要立即发布一条任务?'
|
|
@@ -808,6 +817,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
sava_btn() {
|
|
|
+ // console.log('任务 save btn',this.data);return;
|
|
|
let self = this;
|
|
|
if (this.data.base_point === 0) {
|
|
|
self.$notify({ type: 'danger', message: '任务积分不能为0' });
|