|
@@ -75,6 +75,7 @@
|
|
|
@cancel="item.showPickerCostId = false;$forceUpdate();" />
|
|
|
</van-popup>
|
|
|
<!-- 审核人 -->
|
|
|
+ <template v-if="user.timeType.reportAuditType != 3">
|
|
|
<van-field readonly name="projectAuditorId" v-if="item.auditUserList != null && item.auditUserList.length > 0" clickable
|
|
|
:value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人"
|
|
|
@click="clickPickAuditor(index, item)">
|
|
@@ -92,6 +93,51 @@
|
|
|
</template>
|
|
|
</van-picker>
|
|
|
</van-popup>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- 自选审批人 -->
|
|
|
+ <template v-if="user.timeType.reportAuditType == 3">
|
|
|
+ <van-field readonly clickable label="第一审核人" @click="auditorClick(index,'auditorFirst')">
|
|
|
+ <template #input>
|
|
|
+ <span v-if="!item.auditorFirst"></span>
|
|
|
+ <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorFirst.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{item.auditorFirst.name}}</span>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-field readonly clickable label="第二审核人" @click="auditorClick(index,'auditorSec')" v-if="user.timeType.auditLevel > 1">
|
|
|
+ <template #input>
|
|
|
+ <span v-if="!item.auditorSec"></span>
|
|
|
+ <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorSec.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{item.auditorSec.name}}</span>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-field readonly clickable label="第三审核人" @click="auditorClick(index,'auditorThird')" v-if="user.timeType.auditLevel > 2">
|
|
|
+ <template #input>
|
|
|
+ <span v-if="!item.auditorThird"></span>
|
|
|
+ <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorThird.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{item.auditorThird.name}}</span>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-field readonly clickable label="抄送人" @click="auditorClick(index,'ccUserid')">
|
|
|
+ <template #input>
|
|
|
+ <span v-if="!item.ccUserid"></span>
|
|
|
+ <span v-else-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.ccUserid.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{item.ccUserid.name}}</span>
|
|
|
+ </template>
|
|
|
+ </van-field>
|
|
|
+ <van-popup v-model="auditorShow" position="bottom">
|
|
|
+ <van-search v-model="auditor.searchText" placeholder="输入员工姓名搜索" @search="onSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
|
|
|
+ <div style="minHeight:300px;">
|
|
|
+ <van-radio-group v-model="auditor.item">
|
|
|
+ <van-radio v-for="uitem in auditor.searchList" :key="uitem.id" :name="uitem" style="padding:10px">
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='uitem.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{uitem.name ? uitem.name : ''}}</span>
|
|
|
+ </van-radio>
|
|
|
+ </van-radio-group>
|
|
|
+ <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="searchAuditor()">确定</van-button>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ </template>
|
|
|
|
|
|
|
|
|
<!-- 相关维度 -->
|
|
@@ -410,7 +456,17 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
|
userName: '',
|
|
|
flgLg: true,
|
|
|
reportBasecostList: [],
|
|
|
- isWeekend: false
|
|
|
+ isWeekend: false,
|
|
|
+
|
|
|
+ auditorShow: false,
|
|
|
+ auditor: {
|
|
|
+ index: 0,
|
|
|
+ auditorIndex: 'auditorFirst',
|
|
|
+ searchText: '',
|
|
|
+ item: {},
|
|
|
+ list: [],
|
|
|
+ searchList: []
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
|
|
@@ -419,6 +475,46 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ auditorClick(domainIndex,auditorIndex){
|
|
|
+ this.auditor.index = domainIndex
|
|
|
+ this.auditor.auditorIndex = auditorIndex
|
|
|
+ this.auditor.searchList.forEach(u=>{
|
|
|
+ if(u.id == this.form.domains[domainIndex][auditorIndex].id){
|
|
|
+ this.auditor.item = u
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.auditorShow = true
|
|
|
+
|
|
|
+ },
|
|
|
+ onSearch(val){
|
|
|
+ console.log(val);
|
|
|
+ this.auditor.searchList = [];
|
|
|
+ this.auditor.list.forEach(u=>{if (u.name.startsWith(val)) {
|
|
|
+ this.auditor.searchList.push(u);
|
|
|
+ }})
|
|
|
+ },
|
|
|
+ searchAuditor(){
|
|
|
+ this.form.domains[this.auditor.index][this.auditor.auditorIndex] = this.auditor.item
|
|
|
+ this.auditorShow = false
|
|
|
+ console.log('searchAuditor');
|
|
|
+ },
|
|
|
+ getAllUsersList(){
|
|
|
+ this.$axios.post('/user/getSimpleActiveUserList',{})
|
|
|
+ .then(res => {
|
|
|
+ if(res.code == 'ok'){
|
|
|
+ this.auditor.list = res.data
|
|
|
+ this.auditor.searchList = res.data
|
|
|
+ }else{
|
|
|
+ this.$toast.fail('获取失败:'+res.msg);
|
|
|
+ }
|
|
|
+ }).catch(err => {this.$toast.clear();})
|
|
|
+ },
|
|
|
+ requiredRule(val){
|
|
|
+ console.log('requiredRule',val);
|
|
|
+ return false
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
// 获取预算来源
|
|
|
getReportBasecostList(){
|
|
|
this.$axios.post('/project-basecost-setting/getReportBasecostList',{
|
|
@@ -979,7 +1075,12 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
|
auditUserList: list[i].auditUserList,
|
|
|
overtimeHours: list[i].overtimeHours,
|
|
|
customText: list[i].customText,
|
|
|
- canEdit: list[i].state >= 2 ? true : false
|
|
|
+ canEdit: list[i].state >= 2 ? true : false,
|
|
|
+
|
|
|
+ auditorFirst: list[i].auditorSetting && list[i].auditorSetting.auditorFirst ? list[i].auditorSetting.auditorFirst : {name:'',id:''},
|
|
|
+ auditorSec: list[i].auditorSetting && list[i].auditorSetting.auditorSec ? list[i].auditorSetting.auditorSec : {name:'',id:''},
|
|
|
+ auditorThird: list[i].auditorSetting && list[i].auditorSetting.auditorThird ? list[i].auditorSetting.auditorThird : {name:'',id:''},
|
|
|
+ ccUserid: list[i].auditorSetting && list[i].auditorSetting.ccUserid ? list[i].auditorSetting.ccUserid : {name:'',id:''},
|
|
|
})
|
|
|
if (list[i].state >= 2) {
|
|
|
this.canEdit = true;
|
|
@@ -1010,7 +1111,12 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
|
professionProgress:[],
|
|
|
multiWorktime:t.multiWorktime,
|
|
|
worktimeList:[{}],
|
|
|
- canEdit: true
|
|
|
+ canEdit: true,
|
|
|
+
|
|
|
+ auditorFirst: {name:'',id:''},
|
|
|
+ auditorSec: {name:'',id:''},
|
|
|
+ auditorThird: {name:'',id:''},
|
|
|
+ ccUserid: {name:'',id:''}
|
|
|
}]
|
|
|
if(this.isWeekend && this.user.timeType.lockWorktime != 1){
|
|
|
this.$set(this.form.domains[0],'isOvertime',true)
|
|
@@ -1425,6 +1531,37 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
|
}
|
|
|
//填字段
|
|
|
for(var i in this.form.domains) {
|
|
|
+ if(this.user.timeType.reportAuditType == 3){
|
|
|
+ let audItem = {}
|
|
|
+ let auditRule = ''
|
|
|
+ if(this.form.domains[i].id){
|
|
|
+ audItem.reportId = this.form.domains[i].id
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 0){
|
|
|
+ if(!this.form.domains[i].auditorFirst.id){ auditRule += '第一、' }
|
|
|
+ audItem.auditorFirst = this.form.domains[i].auditorFirst.id
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 1){
|
|
|
+ if(!this.form.domains[i].auditorSec.id){ auditRule += '第二、' }
|
|
|
+ audItem.auditorSec = this.form.domains[i].auditorSec.id
|
|
|
+ }
|
|
|
+ if(this.user.timeType.auditLevel > 2){
|
|
|
+ if(!this.form.domains[i].auditorThird.id){ auditRule += '第三、' }
|
|
|
+ audItem.auditorThird = this.form.domains[i].auditorThird.id
|
|
|
+ }
|
|
|
+ if(this.form.domains[i].ccUserid.id){
|
|
|
+ audItem.ccUserid = this.form.domains[i].ccUserid.id
|
|
|
+ }
|
|
|
+ if(auditRule){
|
|
|
+ auditRule = auditRule.substring(0,auditRule.length - 1)
|
|
|
+ this.$toast.fail('请指定[' + auditRule + ']审核人')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (this.user.timeType.customDegreeActive == 1) {
|
|
|
if(this.form.domains[i].degreeId) {
|
|
|
formData.append("degreeId", this.form.domains[i].degreeId);
|
|
@@ -1695,6 +1832,7 @@ import timetoolVue from '../timetool/timetool.vue';
|
|
|
|
|
|
// this.getProject();
|
|
|
this.getReport();
|
|
|
+ this.getAllUsersList()
|
|
|
this.getTimeType();
|
|
|
|
|
|
//初始化微信js-sdk参数
|