|
@@ -59,6 +59,11 @@
|
|
@confirm="tasktypeChange"
|
|
@confirm="tasktypeChange"
|
|
@cancel="taskType.show = false;$forceUpdate();"/>
|
|
@cancel="taskType.show = false;$forceUpdate();"/>
|
|
</van-popup>
|
|
</van-popup>
|
|
|
|
+ <van-field label="任务完成校验" v-if="user.timeType.taskFileCharge" readonly clickable>
|
|
|
|
+ <template #input>
|
|
|
|
+ <van-checkbox v-model="taskform.attachFileRequired" >是否必须上传成果文件</van-checkbox>
|
|
|
|
+ </template>
|
|
|
|
+ </van-field>
|
|
<!-- 任务内容 -->
|
|
<!-- 任务内容 -->
|
|
<van-field v-model="taskform.name" label="任务内容" placeholder="请输入任务内容" :rules="[{ required: true, message: '请输入任务内容' }]" type="textarea" :disabled="!canEdit" :maxlength="40" show-word-limit></van-field>
|
|
<van-field v-model="taskform.name" label="任务内容" placeholder="请输入任务内容" :rules="[{ required: true, message: '请输入任务内容' }]" type="textarea" :disabled="!canEdit" :maxlength="40" show-word-limit></van-field>
|
|
<!-- 开始时间 -->
|
|
<!-- 开始时间 -->
|
|
@@ -126,6 +131,23 @@
|
|
</template>
|
|
</template>
|
|
</van-cell>
|
|
</van-cell>
|
|
</van-cell-group>
|
|
</van-cell-group>
|
|
|
|
+
|
|
|
|
+ <template v-if="user.timeType.taskFileCharge == 2">
|
|
|
|
+ <van-field v-model="item.fileChargeOneName" :label="'审核人1'" placeholder="请选择" @click="executorChange(item,index, 'fileChargeOneName')" readonly clickable>
|
|
|
|
+ <template #input>
|
|
|
|
+ <span v-if="!item.fileChargeOneName"></span>
|
|
|
|
+ <span v-else-if="user.userNameNeedTranslate != 1">{{item.fileChargeOneName}}</span>
|
|
|
|
+ <span v-else><TranslationOpenDataText type='userName' :openid='item.fileChargeOneName'></TranslationOpenDataText></span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-field>
|
|
|
|
+ <van-field v-model="item.fileChargeTwoName" :label="'审核人2'" placeholder="请选择" @click="executorChange(item,index, 'fileChargeTwoName')" readonly clickable>
|
|
|
|
+ <template #input>
|
|
|
|
+ <span v-if="!item.fileChargeTwoName"></span>
|
|
|
|
+ <span v-else-if="user.userNameNeedTranslate != 1">{{item.fileChargeTwoName}}</span>
|
|
|
|
+ <span v-else><TranslationOpenDataText type='userName' :openid='item.fileChargeTwoName'></TranslationOpenDataText></span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-field>
|
|
|
|
+ </template>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 选择项目服务 -->
|
|
<!-- 选择项目服务 -->
|
|
@@ -251,7 +273,8 @@ export default {
|
|
index: 0,
|
|
index: 0,
|
|
list: [],
|
|
list: [],
|
|
searchList: [],
|
|
searchList: [],
|
|
- searchText: ''
|
|
|
|
|
|
+ searchText: '',
|
|
|
|
+ type: ''
|
|
},
|
|
},
|
|
|
|
|
|
select_project_show: false,
|
|
select_project_show: false,
|
|
@@ -426,11 +449,12 @@ export default {
|
|
this.finishDateShow = false
|
|
this.finishDateShow = false
|
|
},
|
|
},
|
|
|
|
|
|
- executorChange(item,index){ // 选择执行人
|
|
|
|
|
|
+ executorChange(item, index, type){ // 选择执行人
|
|
this.executor.searchText = ''
|
|
this.executor.searchText = ''
|
|
this.getOnSearch('')
|
|
this.getOnSearch('')
|
|
this.executor.show = true
|
|
this.executor.show = true
|
|
this.executor.index = index
|
|
this.executor.index = index
|
|
|
|
+ this.executor.type = type
|
|
this.executor.searchList.forEach(u=>{if (u.id == item.executorId) {
|
|
this.executor.searchList.forEach(u=>{if (u.id == item.executorId) {
|
|
this.executor.item = u
|
|
this.executor.item = u
|
|
}})
|
|
}})
|
|
@@ -485,8 +509,20 @@ export default {
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
},
|
|
},
|
|
searchExecutor(){
|
|
searchExecutor(){
|
|
- this.taskform.executorList[this.executor.index].executorId = this.executor.item.id
|
|
|
|
- this.taskform.executorList[this.executor.index].executorName = this.executor.item.name
|
|
|
|
|
|
+ if(!this.executor.type) {
|
|
|
|
+ this.taskform.executorList[this.executor.index].executorId = this.executor.item.id
|
|
|
|
+ this.taskform.executorList[this.executor.index].executorName = this.executor.item.name
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(this.executor.type == 'fileChargeOneName') {
|
|
|
|
+ this.taskform.executorList[this.executor.index].fileChargeOneId = this.executor.item.id
|
|
|
|
+ this.taskform.executorList[this.executor.index].fileChargeOneName = this.executor.item.name
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(this.executor.type == 'fileChargeTwoName') {
|
|
|
|
+ this.taskform.executorList[this.executor.index].fileChargeTwoId = this.executor.item.id
|
|
|
|
+ this.taskform.executorList[this.executor.index].fileChargeTwoName = this.executor.item.name
|
|
|
|
+ }
|
|
this.executor.show = false
|
|
this.executor.show = false
|
|
console.log('searchExecutor',this.executor.item,this.executor.item.name);
|
|
console.log('searchExecutor',this.executor.item,this.executor.item.name);
|
|
},
|
|
},
|
|
@@ -524,7 +560,7 @@ export default {
|
|
|
|
|
|
submitTask(){
|
|
submitTask(){
|
|
console.log('submitTask');
|
|
console.log('submitTask');
|
|
- const { companyId } = this.user
|
|
|
|
|
|
+ const { companyId, timeType } = this.user
|
|
if(!this.taskform.name.replace(/^\s*|\s*$/g,"")){
|
|
if(!this.taskform.name.replace(/^\s*|\s*$/g,"")){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -543,6 +579,17 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if(timeType.taskFileCharge == 2) {
|
|
|
|
+ let arr = this.taskform.executorList
|
|
|
|
+ for(let i in arr) {
|
|
|
|
+ let item = arr[i]
|
|
|
|
+ if(item.executorId && (!item.fileChargeOneId || !item.fileChargeTwoId)) {
|
|
|
|
+ this.$toast.fail("审核人必填");
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
// 针对依斯倍排除执行人相同和项目服务相同的任务
|
|
// 针对依斯倍排除执行人相同和项目服务相同的任务
|
|
if(companyId == '3092') {
|
|
if(companyId == '3092') {
|
|
if(!this.executorProjectJudgment(this.taskform.executorList)) {
|
|
if(!this.executorProjectJudgment(this.taskform.executorList)) {
|