|
|
@@ -3,7 +3,7 @@
|
|
|
<div style="height:5%">
|
|
|
<van-sticky>
|
|
|
<van-nav-bar
|
|
|
- :title="'调班 ' + (typeValue == '4'? '修改':typeValue == '3'? '申请': typeValue == '2'? '审批': typeValue == '1'? '详情': '')"
|
|
|
+ :title="'调班 ' + (typeValue == '5'? '审核':typeValue == '4'? '修改':typeValue == '3'? '申请': typeValue == '2'? '审批': typeValue == '1'? '详情': '')"
|
|
|
:right-text="typeValue == '4' ? '退回原因' : ''"
|
|
|
@click-left="closePop()"
|
|
|
@click-right="getBack()"
|
|
|
@@ -45,10 +45,13 @@
|
|
|
:readonly="typeValue != 3 && typeValue != 4 ? true : false"
|
|
|
/>
|
|
|
</van-form>
|
|
|
- <div v-if="Object.keys(showDateArr).length>0&&showDateArr[userInfo.user.id].dateKeyArr.length>0&&tabChildShow" class="tabChildClass">
|
|
|
- <div class="tabAdd"><van-button plain hairline round size="mini" icon="plus" type="primary" @click="addEvent">添加</van-button></div>
|
|
|
+ <div v-if="(typeValue==1||typeValue==2||typeValue == '5')||(typeof showDateArr == 'object'&&Object.keys(showDateArr).length>0&&showDateArr[userInfo.user.id].dateKeyArr.length>0&&tabChildShow)" class="tabChildClass">
|
|
|
+ <div v-if="typeValue == 3 || typeValue == 4 " class="tabAdd"><van-button plain hairline round size="mini" icon="plus" type="primary" @click="addEvent">添加</van-button></div>
|
|
|
<van-collapse v-if="tabChildActiveArr.length>0" v-model="tabChildActive">
|
|
|
- <van-collapse-item v-for="(item, index) in tabChildActiveArr" :key="index" :title="'序号'+ (index+1)" :name="index+''" >
|
|
|
+ <van-collapse-item v-for="(item, index) in tabChildActiveArr" :key="index" :name="index+''" >
|
|
|
+ <template #title>
|
|
|
+ <div>{{'序号'+ (index+1)}} <van-icon name="question-o" /></div>
|
|
|
+ </template>
|
|
|
<van-field
|
|
|
required
|
|
|
label="调班日期:"
|
|
|
@@ -58,7 +61,7 @@
|
|
|
readonly
|
|
|
@click="typeValue == 3 || typeValue == 4 ? tbbrrqShow = true:''"
|
|
|
/>
|
|
|
- <van-popup v-if="Object.keys(showDateArr[userInfo.user.id]).length>0 && (typeValue == 3 || typeValue == 4 )" v-model="tbbrrqShow" position="bottom">
|
|
|
+ <van-popup v-if="(typeValue == 3 || typeValue == 4 )&&Object.keys(showDateArr[userInfo.user.id]).length>0" v-model="tbbrrqShow" position="bottom">
|
|
|
<van-picker
|
|
|
:ref="'tbrq'+index"
|
|
|
show-toolbar
|
|
|
@@ -190,6 +193,7 @@
|
|
|
import random from '@/mixins/random'
|
|
|
import bpmnStatus from '@/mixins/bpmnStatus'
|
|
|
import IbpsUploader from '@/business/platform/file/uploader'
|
|
|
+import { saveAdjustment } from '@/api/platform/bpmn/bpmCommonStatment'
|
|
|
|
|
|
import {
|
|
|
getNextIdByAlias,
|
|
|
@@ -438,6 +442,7 @@ export default {
|
|
|
},
|
|
|
// 获取排班人员
|
|
|
getAllPer(val) {
|
|
|
+ // console.log(val)
|
|
|
const data = Object.keys(val)
|
|
|
const returnArr = []
|
|
|
data.forEach((item, i) => {
|
|
|
@@ -504,21 +509,28 @@ export default {
|
|
|
bianZhiShiJian: data[0].bian_zhi_shi_jian,
|
|
|
gouTongRiQi: data[0].gou_tong_ri_qi_
|
|
|
}
|
|
|
+ this.tabChildActive = []
|
|
|
data.forEach((item, i) => {
|
|
|
+ const midI = this.userList.findIndex(t => t.userId === item.party_)
|
|
|
+ let mid = ''
|
|
|
+ if (midI !== -1) {
|
|
|
+ mid = this.userList[midI].userName
|
|
|
+ }
|
|
|
+ this.tabChildActive.push(i + '')
|
|
|
this.tabChildActiveArr.push(
|
|
|
{
|
|
|
tiaobanBenRenRiQi: item.before_date_,
|
|
|
tiaobanBenRenBanCi: item.before_adjust_,
|
|
|
- tiaobanMuBiaoRenYuan: '',
|
|
|
- tiaobanMuBiaoRenYuanId: '',
|
|
|
+ tiaobanMuBiaoRenYuan: mid,
|
|
|
+ tiaobanMuBiaoRenYuanId: item.party_,
|
|
|
tiaobanMuBiaoRiQi: item.after_date_,
|
|
|
tiaobanMuBiaoBanCi: item.after_adjust_
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
- if (this.typeValue === '2' || this.typeValue === '4') {
|
|
|
- this.getTaskId(data.id_)
|
|
|
- }
|
|
|
+ // if (this.typeValue === '2' || this.typeValue === '4') {
|
|
|
+ // this.getTaskId(data.id_)
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -531,38 +543,41 @@ export default {
|
|
|
// tmpArray.push(item.id)
|
|
|
// })
|
|
|
|
|
|
- const info = this.$store.getters.userInfo
|
|
|
- const useId = info.user.id
|
|
|
- const detpId = info.employee.positions
|
|
|
+ // const info = this.$store.getters.userInfo
|
|
|
+ const { second = '' } = this.$store.getters.level || {}
|
|
|
+ // const useId = info.user.id
|
|
|
+ // const detpId = info.employee.positions
|
|
|
+ const midArr = []
|
|
|
+ let midStr = ''
|
|
|
+ this.tabChildActiveArr.forEach((item, i) => {
|
|
|
+ const str = `${this.userInfo.user.name}${item.tiaobanBenRenRiQi}班次【${item.tiaobanBenRenBanCi}】与${item.tiaobanMuBiaoRenYuan}${item.tiaobanMuBiaoRiQi}班次【${item.tiaobanMuBiaoBanCi}】调换`
|
|
|
+ if (i === 0) {
|
|
|
+ midStr = str
|
|
|
+ } else {
|
|
|
+ midStr = midStr + ';' + str
|
|
|
+ }
|
|
|
+
|
|
|
+ midArr.push({
|
|
|
+ afterAdjust: item.tiaobanMuBiaoBanCi,
|
|
|
+ afterDate: item.tiaobanMuBiaoRiQi,
|
|
|
+ beforeAdjust: item.tiaobanBenRenBanCi,
|
|
|
+ beforeDate: item.tiaobanBenRenRiQi,
|
|
|
+ party: item.tiaobanMuBiaoRenYuanId,
|
|
|
+ status: '待审核'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ console.log(midArr)
|
|
|
const para = {
|
|
|
- parameters: [
|
|
|
- {
|
|
|
- key: 'defId',
|
|
|
- value: '1056942070293331968'
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'version',
|
|
|
- value: '0'
|
|
|
- },
|
|
|
- {
|
|
|
- key: 'data',
|
|
|
- value: ''
|
|
|
- }
|
|
|
- ]
|
|
|
+ adjustmentDetailPoList: midArr,
|
|
|
+ diDian: second,
|
|
|
+ overview: midStr,
|
|
|
+ reason: this.form.tiaoBanYuanYin,
|
|
|
+ scheduleId: this.form.paiBanId,
|
|
|
+ status: '待审核'
|
|
|
}
|
|
|
- // this.form.fuJian = tmpArray.join(',')
|
|
|
- this.form.bianZhiRen = useId
|
|
|
- this.form.bianZhiShiJian = this.$methCommon.time(16)
|
|
|
- this.form.bianZhiBuMen = this.mainPosition === null ? detpId : this.mainPosition.id
|
|
|
- // this.form.bianZhiBuMen = detpId
|
|
|
-
|
|
|
- this.form.shiFouGuoShen = '已编制'
|
|
|
- this.form.diDian = this.level.second
|
|
|
- // this.form.xuanZeKeHu = useId
|
|
|
- para.parameters[2].value = JSON.stringify(this.form)
|
|
|
const that = this
|
|
|
|
|
|
- findFormJsonByBo(para)
|
|
|
+ saveAdjustment(para)
|
|
|
.then(res => {
|
|
|
if (res.state === 200) {
|
|
|
that.$toast.success('提交成功!')
|
|
|
@@ -657,20 +672,12 @@ export default {
|
|
|
},
|
|
|
getYanZheng() {
|
|
|
const suList = [
|
|
|
- // 'keHuLianXiRen',
|
|
|
- // 'keHuDanWeiMin',
|
|
|
- // 'lianXiDianHua',
|
|
|
- // 'yongHuYouXiang',
|
|
|
'tiaoBanYuanYin'
|
|
|
- // 'gouTongNeiRong'
|
|
|
+ // 'paiBan'
|
|
|
]
|
|
|
const suListName = [
|
|
|
- '用户姓名',
|
|
|
- '用户单位',
|
|
|
- '联系电话',
|
|
|
- '用户邮箱',
|
|
|
- '沟通事项',
|
|
|
- '沟通内容'
|
|
|
+ '调班原因'
|
|
|
+ // '排班'
|
|
|
]
|
|
|
for (const item in suList) {
|
|
|
if (!this.form[suList[item]]) {
|
|
|
@@ -694,22 +701,23 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // if (!this.form.keHu) {
|
|
|
- // this.$toast({
|
|
|
- // duration: 2000, // 持续展示 toast
|
|
|
- // message: '请填写签名'
|
|
|
- // })
|
|
|
- // return false
|
|
|
- // }
|
|
|
-
|
|
|
if (this.form.paiBan === '') {
|
|
|
this.$toast({
|
|
|
duration: 2000, // 持续展示 toast
|
|
|
- message: '请填写其他类型'
|
|
|
+ message: '请选择排班'
|
|
|
+ })
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.tabChildActiveArr.length <= 0) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ if (this.tabChildActiveArr.some(i => i.tiaobanBenRenRiQ === '' || i.tiaobanBenRenBanCi === '' || i.tiaobanMuBiaoRenYuan === '' || i.tiaobanMuBiaoRenYuanId === '' || i.tiaobanMuBiaoRiQi === '' || i.tiaobanMuBiaoBanCi === '')) {
|
|
|
+ this.$toast({
|
|
|
+ duration: 2000, // 持续展示 toast
|
|
|
+ message: '请填写具体调班信息'
|
|
|
})
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
return true
|
|
|
},
|
|
|
// 根据委托单id查询 taskId
|