|
@@ -37,7 +37,7 @@
|
|
|
<div class="left ">申请时间:</div>
|
|
<div class="left ">申请时间:</div>
|
|
|
<div>{{ $common.getFormatDate('string', 16, item.createTime) }} </div>
|
|
<div>{{ $common.getFormatDate('string', 16, item.createTime) }} </div>
|
|
|
<!-- <div class="right">{{ item.status }} </div> -->
|
|
<!-- <div class="right">{{ item.status }} </div> -->
|
|
|
- <van-button class="right" size="mini" color="#ae514a" disabled plain hairline round type="info">{{ item.status }}</van-button>
|
|
|
|
|
|
|
+ <van-button class="right" size="mini" color="#ae514a" disabled plain hairline round type="info">{{ item.STATUS }}</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="sectionBox">
|
|
<div class="sectionBox">
|
|
|
<div class="left">概览:</div>
|
|
<div class="left">概览:</div>
|
|
@@ -49,12 +49,12 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div style=" width: 100%; text-align: right; padding-top: 5rpx;padding-bottom: 0rpx;">
|
|
<div style=" width: 100%; text-align: right; padding-top: 5rpx;padding-bottom: 0rpx;">
|
|
|
- <van-button v-if="active==='我发起的'&& item.status == '已暂存'" type="info" size="mini" class="btn-sty" @click="LiftUpPop(item.id,'6')">编辑</van-button>
|
|
|
|
|
- <van-button v-if="active==='我发起的'&& (item.status == '已取消' || item.status == '已拒绝')" type="info" size="mini" class="btn-sty" @click="LiftUpPop(item.id,'4')">再次申请</van-button>
|
|
|
|
|
|
|
+ <van-button v-if="active==='我发起的'&& item.STATUS == '已暂存'" type="info" size="mini" class="btn-sty" @click="LiftUpPop(item.id,'6')">编辑</van-button>
|
|
|
|
|
+ <van-button v-if="active==='我发起的'&& (item.STATUS == '已取消' || item.STATUS == '已拒绝')" type="info" size="mini" class="btn-sty" @click="LiftUpPop(item.id,'4')">再次申请</van-button>
|
|
|
<van-button v-if="active==='我发起的'" type="success" size="mini" class="u-m-l-15 btn-sty" @click="LiftUpPop(item.id,'1')">详情</van-button>
|
|
<van-button v-if="active==='我发起的'" type="success" size="mini" class="u-m-l-15 btn-sty" @click="LiftUpPop(item.id,'1')">详情</van-button>
|
|
|
- <van-button v-if="active==='我发起的'&& item.status == '待审核'" type="warning" size="mini" class="u-m-l-15 btn-sty" @click="LiftUpPop(item.id,'7')">取消</van-button>
|
|
|
|
|
- <van-button v-if="active==='待我处理'&& (item.status == '待审核'||item.partys.some(obj => obj.value === useId && item.createBy !== useId && obj.status === '待审核'))" type="warning" size="mini" class="btn-back-color btn-sty" @click="LiftUpPop(item.id,'5')">审核</van-button>
|
|
|
|
|
- <van-button v-if="active==='待我处理'&& item.status == '待审批'" type="warning" size="mini" class="btn-back-color btn-sty" @click="LiftUpPop(item.id,'2')">审批</van-button>
|
|
|
|
|
|
|
+ <van-button v-if="active==='我发起的'&& item.STATUS == '待审核'" type="warning" size="mini" class="u-m-l-15 btn-sty" @click="LiftUpPop(item.id,'7')">取消</van-button>
|
|
|
|
|
+ <van-button v-if="active==='待我处理'&& (item.STATUS == '待审核'||item.partys.some(obj => obj.value === useId && item.createBy !== useId && obj.status === '待审核'))" type="warning" size="mini" class="btn-back-color btn-sty" @click="LiftUpPop(item.id,'5')">审核</van-button>
|
|
|
|
|
+ <van-button v-if="active==='待我处理'&& item.STATUS == '待审批'" type="warning" size="mini" class="btn-back-color btn-sty" @click="LiftUpPop(item.id,'2')">审批</van-button>
|
|
|
</div>
|
|
</div>
|
|
|
</van-cell>
|
|
</van-cell>
|
|
|
</van-checkbox-group>
|
|
</van-checkbox-group>
|
|
@@ -100,6 +100,7 @@ import IbpsBpmnDefinition from '@/business/platform/bpmn/definition/field'
|
|
|
|
|
|
|
|
import staForm from './staForm.vue'
|
|
import staForm from './staForm.vue'
|
|
|
import { queryAdjustment } from '@/api/platform/feature/changeShift'
|
|
import { queryAdjustment } from '@/api/platform/feature/changeShift'
|
|
|
|
|
+import { adjustQueryData } from '@/api/platform/feature/sqlInject'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -185,7 +186,7 @@ export default {
|
|
|
if (j === 'search') {
|
|
if (j === 'search') {
|
|
|
this.page = 0
|
|
this.page = 0
|
|
|
}
|
|
}
|
|
|
- let itemSql = ``
|
|
|
|
|
|
|
+ const itemSql = ``
|
|
|
// const gtlx = params.parameters.find(i => i.key === 'gou_tong_lei_xing') || ''
|
|
// const gtlx = params.parameters.find(i => i.key === 'gou_tong_lei_xing') || ''
|
|
|
// if (gtlx && gtlx.value !== '全部') {
|
|
// if (gtlx && gtlx.value !== '全部') {
|
|
|
// itemSql = itemSql + `and gou_tong_lei_xing = '${gtlx.value}'`
|
|
// itemSql = itemSql + `and gou_tong_lei_xing = '${gtlx.value}'`
|
|
@@ -200,10 +201,10 @@ export default {
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
// v1
|
|
// v1
|
|
|
- const two = params.parameters.find(i => i.key === 'two') || ''
|
|
|
|
|
- if (two) {
|
|
|
|
|
- itemSql = itemSql + `and overview_ like '%${two.value}%'`
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // const two = params.parameters.find(i => i.key === 'two') || ''
|
|
|
|
|
+ // if (two) {
|
|
|
|
|
+ // itemSql = itemSql + `and overview_ like '%${two.value}%'`
|
|
|
|
|
+ // }
|
|
|
// const typeActive = this.active === '我发起的' ? `create_by_ = '${this.useId}' ` : `FIND_IN_SET('${this.useId}', executor_) and `
|
|
// const typeActive = this.active === '我发起的' ? `create_by_ = '${this.useId}' ` : `FIND_IN_SET('${this.useId}', executor_) and `
|
|
|
// const sql =
|
|
// const sql =
|
|
|
// `select * from t_adjustment where ${typeActive} ${itemSql} ORDER BY create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
|
|
// `select * from t_adjustment where ${typeActive} ${itemSql} ORDER BY create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
|
|
@@ -211,6 +212,9 @@ export default {
|
|
|
// 临时注释
|
|
// 临时注释
|
|
|
// const sql =
|
|
// const sql =
|
|
|
// `select a.id_ as id,a.tenant_id_ as tenantId,a.ip_ as ip,a.create_by_ as createBy,a.create_time_ as createTime,a.update_by_ as updateBy,a.update_time_ as updateTime,a.di_dian_ as diDian,a.reason_ as reason,a.status as status,a.executor_ as executor,a.execute_date_ as executeDate,a.overview_ as overview,a.schedule_id_ as scheduleId,a.type_ as type,a.reject_reason_ as rejectReason,a.partys from (select f.*,GROUP_CONCAT(z.party_) as partys from t_adjustment f left join t_adjustment_detail z on f.id_ = z.parent_id_ GROUP BY f.id_) a where create_by_ = '${this.useId}' ORDER BY a.create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
|
|
// `select a.id_ as id,a.tenant_id_ as tenantId,a.ip_ as ip,a.create_by_ as createBy,a.create_time_ as createTime,a.update_by_ as updateBy,a.update_time_ as updateTime,a.di_dian_ as diDian,a.reason_ as reason,a.status as status,a.executor_ as executor,a.execute_date_ as executeDate,a.overview_ as overview,a.schedule_id_ as scheduleId,a.type_ as type,a.reject_reason_ as rejectReason,a.partys from (select f.*,GROUP_CONCAT(z.party_) as partys from t_adjustment f left join t_adjustment_detail z on f.id_ = z.parent_id_ GROUP BY f.id_) a where create_by_ = '${this.useId}' ORDER BY a.create_time_ desc LIMIT ${this.page * params.requestPage.limit},${params.requestPage.limit}`
|
|
|
|
|
+ adjustQueryData(this.getSearcFormData()).then(res => {
|
|
|
|
|
+ ActionUtils.handleListData(this, res.data)
|
|
|
|
|
+ })
|
|
|
// this.$common.request('sql', sql).then(response => {
|
|
// this.$common.request('sql', sql).then(response => {
|
|
|
// // 处理数据
|
|
// // 处理数据
|
|
|
// ActionUtils.handleListDataCommon(this, response.variables)
|
|
// ActionUtils.handleListDataCommon(this, response.variables)
|
|
@@ -218,7 +222,6 @@ export default {
|
|
|
// ActionUtils.handleErrorData(this, e)
|
|
// ActionUtils.handleErrorData(this, e)
|
|
|
// })
|
|
// })
|
|
|
} else if (this.active === '待我处理') {
|
|
} else if (this.active === '待我处理') {
|
|
|
- console.log('221312312321312321')
|
|
|
|
|
queryAdjustment(this.getSearcFormData()).then(res => {
|
|
queryAdjustment(this.getSearcFormData()).then(res => {
|
|
|
res.data.dataResult.forEach((el) => { // 遍历子表提取审核人字段
|
|
res.data.dataResult.forEach((el) => { // 遍历子表提取审核人字段
|
|
|
el.partys = this.getPartysList(el.adjustmentDetailPoList)
|
|
el.partys = this.getPartysList(el.adjustmentDetailPoList)
|
|
@@ -240,7 +243,7 @@ export default {
|
|
|
const self = this
|
|
const self = this
|
|
|
const result = poList.map(item => ({
|
|
const result = poList.map(item => ({
|
|
|
value: item.party,
|
|
value: item.party,
|
|
|
- status: item.status,
|
|
|
|
|
|
|
+ STATUS: item.STATUS,
|
|
|
label: self.userOption.filter(o => o.value === item.party).length > 0 ? (self.userOption.filter(o => o.value === item.party))[0].label : '',
|
|
label: self.userOption.filter(o => o.value === item.party).length > 0 ? (self.userOption.filter(o => o.value === item.party))[0].label : '',
|
|
|
type: 'success'
|
|
type: 'success'
|
|
|
}))
|
|
}))
|
|
@@ -264,11 +267,11 @@ export default {
|
|
|
// acc.push(item)
|
|
// acc.push(item)
|
|
|
|
|
|
|
|
if (judge) {
|
|
if (judge) {
|
|
|
- if (userId && (item.partys.some(obj => obj.value === userId && item.createBy !== userId && obj.status === '待审核') || (item.executor && item.status === '待审批')) && (item.status === '待审核' || item.status === '待审批')) {
|
|
|
|
|
|
|
+ if (userId && (item.partys.some(obj => obj.value === userId && item.createBy !== userId && obj.STATUS === '待审核') || (item.executor && item.STATUS === '待审批')) && (item.STATUS === '待审核' || item.STATUS === '待审批')) {
|
|
|
acc.push(item)
|
|
acc.push(item)
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- if (userId && (item.partys.some(obj => obj.value === userId && item.createBy !== userId && obj.status === '待审核') || (item.executor && item.executor.includes(userId) && item.status === '待审批'))) {
|
|
|
|
|
|
|
+ if (userId && (item.partys.some(obj => obj.value === userId && item.createBy !== userId && obj.STATUS === '待审核') || (item.executor && item.executor.includes(userId) && item.STATUS === '待审批'))) {
|
|
|
acc.push(item)
|
|
acc.push(item)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -281,22 +284,16 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
getSearcFormData() {
|
|
getSearcFormData() {
|
|
|
const params = {}
|
|
const params = {}
|
|
|
|
|
+ let mid = {}
|
|
|
if (this.$utils.isNotEmpty(this.twoParam)) {
|
|
if (this.$utils.isNotEmpty(this.twoParam)) {
|
|
|
- params['two'] = this.twoParam
|
|
|
|
|
|
|
+ params['Q^overview_^S'] = this.twoParam
|
|
|
}
|
|
}
|
|
|
- // if (this.$utils.isNotEmpty(this.typeId)) {
|
|
|
|
|
- // params['Q^temp.TYPE_ID_^S'] = this.typeId
|
|
|
|
|
- // }
|
|
|
|
|
- // if (this.$utils.isNotEmpty(this.defKey)) {
|
|
|
|
|
- // params['Q^temp.proc_def_key_^S'] = this.defKey
|
|
|
|
|
- // }
|
|
|
|
|
- // if (this.$utils.isNotEmpty(this.moreParams)) {
|
|
|
|
|
- // params = Object.assign(params, this.moreParams)
|
|
|
|
|
- // }
|
|
|
|
|
- return ActionUtils.formatParams(
|
|
|
|
|
- params,
|
|
|
|
|
- { page: this.page },
|
|
|
|
|
- this.sorts)
|
|
|
|
|
|
|
+ if (this.active === '我发起的') {
|
|
|
|
|
+ params['userId'] = this.useId
|
|
|
|
|
+ mid = ActionUtils.formatParams(params, this.pagination, this.sorts)
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.active, ActionUtils.formatParams(params, this.pagination, this.sorts), 'sadsa')
|
|
|
|
|
+ return this.active === '待我处理' ? ActionUtils.formatParams(params, { page: this.page }, this.sorts) : { pageNo: mid.requestPage.pageNo, limit: mid.requestPage.limit, param: params }
|
|
|
},
|
|
},
|
|
|
LiftUpPop(id, typeValue) {
|
|
LiftUpPop(id, typeValue) {
|
|
|
this.scrollWhere = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop
|
|
this.scrollWhere = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop
|