初始提交
This commit is contained in:
103
pages/workFlow/operate/components/CommonList.vue
Normal file
103
pages/workFlow/operate/components/CommonList.vue
Normal file
@@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<view class="common-list-v" v-if="show">
|
||||
<view class="common-list-contain">
|
||||
<view class="common-list-main u-p-20 u-flex-col">
|
||||
<view class="common-list-search" style=" ">
|
||||
<uni-search-bar radius="100" placeholder="请输入" clearButton="always" cancelButton="always"
|
||||
@cancel="cancel" v-model="searchValue" focus />
|
||||
</view>
|
||||
<view class="" style="flex: 1;margin-top: 10rpx; overflow-y: scroll;" v-if="columnList.length">
|
||||
<view class="u-line-1" style="width: 100%;height:68rpx;line-height: 68rpx;"
|
||||
v-for="(item,index) in columnList" :key="index" @click.stop="selectConfirm(item)">
|
||||
{{item.commonWordsText}}
|
||||
</view>
|
||||
</view>
|
||||
<JnpfEmpty v-else />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getSelector
|
||||
} from "@/api/commonWords.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
commonWordsList: [],
|
||||
searchValue: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
columnList() {
|
||||
return this.commonWordsList.filter((o) => (o.commonWordsText && o.commonWordsText.match(this.searchValue)))
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.show = true
|
||||
this.getCommonList()
|
||||
},
|
||||
cancel() {
|
||||
this.close()
|
||||
},
|
||||
close() {
|
||||
this.searchValue = ""
|
||||
this.show = false
|
||||
},
|
||||
selectConfirm(item) {
|
||||
this.$emit('confirm', item)
|
||||
|
||||
this.close()
|
||||
},
|
||||
getCommonList() {
|
||||
getSelector().then((res) => {
|
||||
let list = JSON.parse(JSON.stringify(res.data.list)) || []
|
||||
this.commonWordsList = list
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.common-list-v {
|
||||
z-index: 9000;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100vh !important;
|
||||
|
||||
|
||||
|
||||
|
||||
.common-list-contain {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.common-list-main {
|
||||
background: white;
|
||||
|
||||
height: 100%;
|
||||
|
||||
|
||||
.common-list-search {
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
|
||||
.uni-searchbar {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
|
||||
.uni-searchbar__box {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
130
pages/workFlow/operate/components/HandleOpinion.vue
Normal file
130
pages/workFlow/operate/components/HandleOpinion.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<view class="opinion">
|
||||
<view class="opinion-box">
|
||||
<u-input type="textarea" v-model="handleOpinion" placeholder="请输入" :inputBorder='false' @input="onInput"
|
||||
class="easyinput" :clearable="true" focus></u-input>
|
||||
<view class="u-m-t-10 u-flex opinion-inner" v-if="showCommon">
|
||||
<view class="u-flex opinion-l" v-if="commonList.length">
|
||||
<text class="u-line-1 common-txt" v-if="commonList[0]"
|
||||
@click.stop="addTextareaValue(0)">{{commonList[0].commonWordsText}}</text>
|
||||
<text class="common-txt u-m-l-10 u-line-1" v-if="commonList[1]"
|
||||
@click.stop="addTextareaValue(1)">{{commonList[1].commonWordsText}}</text>
|
||||
</view>
|
||||
<view class="u-flex opinion-r">
|
||||
<text class="txt" @click.stop="addCommonWords">设为常用语</text>
|
||||
<view class="icon-box" @click="showCommonList">
|
||||
<u-icon name="search" color="#565656" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<CommonList ref="CommonList" @confirm="confirmCommonWord"></CommonList>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CommonList from './CommonList'
|
||||
export default {
|
||||
emits: ['addCommonWords', 'update:modelValue'],
|
||||
name: 'handle-opinion',
|
||||
components: {
|
||||
CommonList
|
||||
},
|
||||
props: {
|
||||
modelValue: {
|
||||
type: [String, Number]
|
||||
},
|
||||
commonList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
showCommon: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
modelValue: {
|
||||
handler(val) {
|
||||
this.handleOpinion = val
|
||||
},
|
||||
immediate: true,
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
handleOpinion: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
confirmCommonWord(e) {
|
||||
this.handleOpinion = e.commonWordsText
|
||||
this.$emit('update:modelValue', this.handleOpinion)
|
||||
},
|
||||
addCommonWords() {
|
||||
if (!this.handleOpinion) return this.$u.toast('请输入意见');
|
||||
this.$emit('addCommonWords')
|
||||
},
|
||||
onInput(e) {
|
||||
this.$emit('update:modelValue', e)
|
||||
},
|
||||
addTextareaValue(i) {
|
||||
this.handleOpinion += this.commonList[i].commonWordsText
|
||||
this.$emit('update:modelValue', this.handleOpinion)
|
||||
},
|
||||
showCommonList() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.CommonList.open();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.opinion {
|
||||
width: 100%;
|
||||
|
||||
.opinion-box {
|
||||
border-radius: 8rpx;
|
||||
padding: 0 20rpx 10rpx 20rpx;
|
||||
background: #f5f5f5 !important;
|
||||
|
||||
.opinion-inner {
|
||||
|
||||
|
||||
.opinion-l {
|
||||
max-width: 62%;
|
||||
|
||||
.common-txt {
|
||||
max-width: 240rpx;
|
||||
display: inline-block;
|
||||
border: 1rpx dashed #dcdfe6;
|
||||
padding: 0 10rpx;
|
||||
background-color: #fff;
|
||||
color: #303133;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.opinion-r {
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
|
||||
.txt {
|
||||
padding: 0 10rpx;
|
||||
color: #0177FF;
|
||||
}
|
||||
|
||||
.icon-box {
|
||||
width: 60rpx;
|
||||
text-align: center;
|
||||
margin-left: 12rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
635
pages/workFlow/operate/index.vue
Normal file
635
pages/workFlow/operate/index.vue
Normal file
@@ -0,0 +1,635 @@
|
||||
<template>
|
||||
<view class="flow-popup-content">
|
||||
<u-form ref="dataForm" :model="dataForm" :label-width="200" :errorType="['toast']">
|
||||
<view class="content">
|
||||
<u-form-item label="分支选择" prop="branchList" required v-if="isBranch">
|
||||
<JnpfSelect v-model="dataForm.branchList" @change="branchChange" placeholder="请选择审批分支"
|
||||
:options="branchList" multiple :props="props" />
|
||||
</u-form-item>
|
||||
<u-form-item class="back-item" label="退回节点" v-if="config.type === 'back' && config.backType"
|
||||
prop="backNodeCode" required>
|
||||
<view class="u-flex-col back-item-inner">
|
||||
<JnpfSelect v-model="dataForm.backNodeCode" :options="config.backNodeList" :props="props"
|
||||
:disabled="config.backNodeCode != 2" />
|
||||
<view class="u-m-t-20 selectNode u-flex" v-if="config.backType == 3">
|
||||
<u-radio-group v-model="dataForm.backType">
|
||||
<u-radio @change="radioChange(item)" v-for="(item, index) in list" :key="index"
|
||||
:name="item.name" :disabled="item.disabled">
|
||||
{{ item.fullName }}
|
||||
</u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<u-form-item label="转审给谁" prop="handleIds"
|
||||
v-if="['transfer'].includes(config.type) && propertiesType !== 'processing'" required>
|
||||
<JnpfUserSelect v-model=" dataForm.handleIds" />
|
||||
</u-form-item>
|
||||
<u-form-item label="转办给谁" prop="handleIds"
|
||||
v-if="['transfer'].includes(config.type) && propertiesType === 'processing'" required>
|
||||
<JnpfUserSelect v-model=" dataForm.handleIds" />
|
||||
</u-form-item>
|
||||
<u-form-item label="协办给谁" prop="handleVal" v-if="['assist'].includes(config.type)" required>
|
||||
<JnpfUserSelect v-model=" dataForm.handleVal" multiple @change="changeUserSelect" />
|
||||
</u-form-item>
|
||||
<view v-if="config.type === 'freeApprover'">
|
||||
<u-form-item label="加签人员" prop="addSignUserIdList" required>
|
||||
<JnpfUserSelect v-model="dataForm.addSignUserIdList" multiple />
|
||||
</u-form-item>
|
||||
<u-form-item label="加签类型">
|
||||
<JnpfSelect :options="typeList" v-model="dataForm.addSignType" @change="freeApproverChange" />
|
||||
</u-form-item>
|
||||
<u-form-item label="审批方式">
|
||||
<JnpfRadio v-model="dataForm.counterSign" :options="options" />
|
||||
</u-form-item>
|
||||
<u-form-item label="会签比例" v-if="dataForm.counterSign == 1">
|
||||
<view class="u-flex-col free-box">
|
||||
<JnpfSelect :options="ratioList" v-model="dataForm.auditRatio" />
|
||||
<text class="u-m-l-10 free-box-txt">达到会签比例则通过</text>
|
||||
</view>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<template v-for="(item, index) in candidateList" :key="index" v-if="showCandidate">
|
||||
<u-form-item :label="item.nodeName+ '审批人'" :required="!item.selected" :border-bottom="false">
|
||||
<u-input type="select" v-model="item.fullName" placeholder="请选择审批候选人" input-align="right"
|
||||
@click="openSelect(item)" />
|
||||
</u-form-item>
|
||||
<u-form-item label="已选审批人" v-if="item.selected">
|
||||
<u-input type="textarea" v-model="item.selected" class="textarea" border disabled
|
||||
placeholder="" />
|
||||
</u-form-item>
|
||||
</template>
|
||||
<u-form-item v-if="showOpinion" :label="opinionTitle">
|
||||
<HandleOpinion :commonList="commonList" v-model="dataForm.handleOpinion"
|
||||
@addCommonWords="addCommonWords" :showCommon="false"></HandleOpinion>
|
||||
</u-form-item>
|
||||
<u-form-item prop="handleOpinion" required label-position="top" :label="opinionTitle"
|
||||
v-if="showApproval">
|
||||
<HandleOpinion :commonList="commonList" v-model="dataForm.handleOpinion"
|
||||
@addCommonWords="addCommonWords"></HandleOpinion>
|
||||
</u-form-item>
|
||||
<template v-if="config.approvalField.length">
|
||||
<u-form-item label-position="left" :label="item.fieldName"
|
||||
v-for="(item,index) in config.approvalField" :key="index">
|
||||
<JnpfInput v-if="item.jnpfKey=='input'" v-model="item.value" />
|
||||
<JnpfTextarea v-if="item.jnpfKey=='textarea'" v-model="item.value" />
|
||||
<JnpfInputNumber v-if="item.jnpfKey=='inputNumber'" v-model="item.value" />
|
||||
</u-form-item>
|
||||
</template>
|
||||
<u-form-item :prop="signRule ? 'signImg' : '' " :required="signRule" v-if="config.hasSign">
|
||||
<JnpfSign v-model="dataForm.signImg" signType="ApprovalSign" />
|
||||
</u-form-item>
|
||||
<!-- #ifndef APP-HARMONY -->
|
||||
<u-form-item v-if="config.hasFile">
|
||||
<view class="uploadFile">
|
||||
<JnpfUploadFile v-model="dataForm.fileList" :limit="3" align="left" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-HARMONY -->
|
||||
<u-form-item v-if="config.hasFile">
|
||||
<view class="uploadFile">
|
||||
<JnpfUploadFileH v-model="dataForm.fileList" :limit="3" align="left" />
|
||||
</view>
|
||||
</u-form-item>
|
||||
<!-- #endif -->
|
||||
<u-form-item label="抄送人员" v-if="showCustomCopy">
|
||||
<JnpfUserSelect v-model="copyIds" multiple />
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
<view class="flowBefore-actions">
|
||||
<CustomButton class="u-flex buttom-btn-left-inner" :btnText="$t('common.cancelText')"
|
||||
btnIcon="icon-ym icon-ym-add-cancel" customIcon />
|
||||
<u-button class="buttom-btn" type="primary" @click="confirm('confirm')">{{$t('common.okText')}}
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CustomButton from '@/components/CustomButton'
|
||||
import HandleOpinion from './components/HandleOpinion.vue'
|
||||
import {
|
||||
getSelector,
|
||||
Create
|
||||
} from '@/api/commonWords'
|
||||
export default {
|
||||
components: {
|
||||
HandleOpinion,
|
||||
CustomButton
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
copyIds: [],
|
||||
selectList: [],
|
||||
candidateList: [],
|
||||
commonList: [],
|
||||
title: '',
|
||||
label: '',
|
||||
name: {
|
||||
'reject': '拒绝',
|
||||
'launchRecall': '撤回',
|
||||
'auditRecall': '撤回',
|
||||
'audit': '同意',
|
||||
'back': '退回',
|
||||
'freeApprover': '加签',
|
||||
'transfer': '转审'
|
||||
},
|
||||
ratioList: [{
|
||||
fullName: '10%',
|
||||
id: 10
|
||||
}, {
|
||||
fullName: '20%',
|
||||
id: 20
|
||||
}, {
|
||||
fullName: '30%',
|
||||
id: 30
|
||||
}, {
|
||||
fullName: '40%',
|
||||
id: 40
|
||||
}, {
|
||||
fullName: '50%',
|
||||
id: 50
|
||||
}, {
|
||||
fullName: '60%',
|
||||
id: 60
|
||||
}, {
|
||||
fullName: '70%',
|
||||
id: 70
|
||||
}, {
|
||||
fullName: '80%',
|
||||
id: 80
|
||||
}, {
|
||||
fullName: '90%',
|
||||
id: 90
|
||||
}, {
|
||||
fullName: '100%',
|
||||
id: 100
|
||||
}],
|
||||
typeList: [{
|
||||
fullName: '审批前',
|
||||
id: 1
|
||||
}, {
|
||||
fullName: '审批后',
|
||||
id: 2
|
||||
}],
|
||||
options: [{
|
||||
fullName: '或签',
|
||||
id: 0
|
||||
}, {
|
||||
fullName: '会签',
|
||||
id: 1
|
||||
},
|
||||
{
|
||||
fullName: "依次审批",
|
||||
id: 2,
|
||||
}
|
||||
],
|
||||
list: [{
|
||||
fullName: "重新审批",
|
||||
disabled: false,
|
||||
name: 1,
|
||||
},
|
||||
{
|
||||
fullName: "直接提交给我",
|
||||
disabled: false,
|
||||
name: 2,
|
||||
},
|
||||
],
|
||||
props: {
|
||||
label: 'nodeName',
|
||||
value: 'nodeCode'
|
||||
},
|
||||
showCommonWords: false,
|
||||
dataForm: {
|
||||
auditRatio: 100,
|
||||
counterSign: 0,
|
||||
addSignType: 1,
|
||||
handleIds: '',
|
||||
handleVal: [],
|
||||
addSignUserIdList: '',
|
||||
fileList: [],
|
||||
handleOpinion: "",
|
||||
signImg: "",
|
||||
copyIds: "",
|
||||
branchList: [],
|
||||
candidateList: {},
|
||||
backNodeCode: "",
|
||||
backType: 1
|
||||
},
|
||||
config: {},
|
||||
show: false,
|
||||
selectVal: {},
|
||||
isCandidates: false,
|
||||
rules: {
|
||||
branchList: [{
|
||||
required: true,
|
||||
message: '请选择分支',
|
||||
type: 'array',
|
||||
trigger: 'blur,change'
|
||||
}],
|
||||
backNodeCode: [{
|
||||
required: true,
|
||||
message: '请选择退回节点',
|
||||
trigger: 'blur,change'
|
||||
}],
|
||||
signImg: [{
|
||||
required: true,
|
||||
message: '请签名',
|
||||
trigger: 'blur,change'
|
||||
}],
|
||||
addSignUserIdList: [{
|
||||
required: true,
|
||||
message: '请选择加签人员',
|
||||
type: 'array',
|
||||
trigger: 'blur,change'
|
||||
}],
|
||||
handleIds: [{
|
||||
required: true,
|
||||
message: '请选择人员',
|
||||
trigger: 'blur,change'
|
||||
}],
|
||||
handleVal: [{
|
||||
required: true,
|
||||
message: '请选择协办人员',
|
||||
trigger: 'blur,change',
|
||||
type: 'array'
|
||||
}],
|
||||
handleOpinion: [{
|
||||
required: true,
|
||||
message: '请输入意见',
|
||||
trigger: 'blur,change'
|
||||
}]
|
||||
},
|
||||
isCandidate: false,
|
||||
propertiesType: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isBranch() {
|
||||
let show = false
|
||||
if (this.candidateType !== 3) show = true;
|
||||
this.branchList = this.config.branchList || [];
|
||||
if (!this.branchList.length) show = false;
|
||||
if (this.config.type === 'freeApprover' && this.dataForm.addSignType === 1) show = false;
|
||||
return show
|
||||
},
|
||||
showApproval() {
|
||||
return ['audit', 'reject', 'approvalButton'].includes(this.config.type)
|
||||
},
|
||||
showCustomCopy() {
|
||||
return this.config.isCustomCopy && ['audit', 'reject'].includes(this.config.type)
|
||||
},
|
||||
showCandidate() {
|
||||
return !['transfer', 'revoke', 'recall', 'back', 'assist'].includes(this.config.type) && this.isCandidate
|
||||
},
|
||||
showOpinion() {
|
||||
const list = ['transfer', 'assist', 'revoke', 'auditRecall', 'launchRecall', 'back', 'freeApprover']
|
||||
return list.includes(this.config.type)
|
||||
},
|
||||
opinionTitle() {
|
||||
const typeMap = {
|
||||
'transfer': '转审原因',
|
||||
'revoke': '撤销原因',
|
||||
'assist': '协办原因',
|
||||
'back': '退回意见',
|
||||
'freeApprover': '加签意见',
|
||||
'launchRecall': '撤回原因',
|
||||
'auditRecall': '撤回原因',
|
||||
'audit': '审批意见',
|
||||
'reject': '审批意见'
|
||||
};
|
||||
const specialTypeMap = {
|
||||
'transfer': {
|
||||
label: '转办原因'
|
||||
},
|
||||
'audit': {
|
||||
label: '办理意见'
|
||||
}
|
||||
};
|
||||
const setFormRules = (rules) => {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataForm.setRules(rules);
|
||||
});
|
||||
};
|
||||
const type = this.config.type;
|
||||
let resultLabel = typeMap[type] || '';
|
||||
if (specialTypeMap[type] && this.propertiesType === 'processing') resultLabel = specialTypeMap[type].label;
|
||||
return resultLabel;
|
||||
},
|
||||
fileLabel() {
|
||||
const type = this.config.type;
|
||||
const typeMap = {
|
||||
'auditRecall': '撤回附件',
|
||||
'freeApprover': '加签附件',
|
||||
'back': '退回附件',
|
||||
'transfer': '转审附件',
|
||||
'audit': '审批附件',
|
||||
'reject': '审批附件'
|
||||
};
|
||||
if (type === 'transfer' && this.propertiesType === 'processing') return '转办附件';
|
||||
if (type === 'audit' && this.propertiesType === 'processing') return '办理附件';
|
||||
const result = typeMap[type] || '';
|
||||
return result;
|
||||
},
|
||||
signRule() {
|
||||
return this.config.hasSign && (['audit', 'reject'].includes(this.config.type))
|
||||
}
|
||||
},
|
||||
onLoad(data) {
|
||||
try {
|
||||
this.config = JSON.parse(decodeURIComponent(data.config));
|
||||
} catch {
|
||||
this.config = JSON.parse(data.config);
|
||||
}
|
||||
uni.$on("confirm", (data, nodeCode) => {
|
||||
this.selectConfirm(data, nodeCode);
|
||||
});
|
||||
this.init()
|
||||
},
|
||||
onReady() {
|
||||
this.$refs.dataForm.setRules(this.rules);
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.candidateType = this.config.candidateType; /* 1==分支 2==候选人 3==直接通过*/
|
||||
this.candidateList = this.config.candidateList || [];
|
||||
this.propertiesType = this.config?.propertiesType
|
||||
this.getSelector()
|
||||
this.handleLabel()
|
||||
this.config.candidateList.map(o => {
|
||||
this.isCandidates = o.isCandidates
|
||||
})
|
||||
this.copyIds = this.config?.circulateUser || ''
|
||||
this.dataForm.backNodeCode = this.config?.backNodeList?.length ? this.config.backNodeList[0].nodeCode : '';
|
||||
if (this.candidateType != 3) this.isCandidate = true;
|
||||
this.branchList = this.config.branchList || [];
|
||||
if (this.candidateType == 1) {
|
||||
let list = [];
|
||||
this.isCandidate = false;
|
||||
const defaultList = this.candidateList;
|
||||
for (let i = 0; i < this.dataForm.branchList.length; i++) {
|
||||
inner: for (let j = 0; j < this.branchList.length; j++) {
|
||||
let o = this.branchList[j];
|
||||
if (this.dataForm.branchList[i] === o.nodeCode && o.isCandidates) {
|
||||
this.isCandidate = true;
|
||||
list.push({
|
||||
...o,
|
||||
label: o.nodeName + "审批人",
|
||||
});
|
||||
break inner;
|
||||
}
|
||||
}
|
||||
this.candidateList = [...defaultList, ...list];
|
||||
}
|
||||
}
|
||||
this.userInfo = uni.getStorageSync("userInfo") || {};
|
||||
this.dataForm.signImg = this.userInfo.signImg;
|
||||
if (this.config.type === 'freeApprover' && this.dataForm.addSignType == '1') this.isCandidates = false
|
||||
},
|
||||
handleLabel() {
|
||||
const config = this.config;
|
||||
const {
|
||||
type,
|
||||
propertiesType
|
||||
} = config;
|
||||
const typeMapping = {
|
||||
'transfer': {
|
||||
title: propertiesType === 'processing' ? '转办' : '转审',
|
||||
label: '转审'
|
||||
},
|
||||
'assist': {
|
||||
title: '协办',
|
||||
label: '协办'
|
||||
},
|
||||
'revoke': {
|
||||
title: '撤销流程',
|
||||
label: '撤销'
|
||||
},
|
||||
'launchRecall': {
|
||||
title: '撤回流程',
|
||||
label: '撤回'
|
||||
},
|
||||
'reject': {
|
||||
title: '审批拒绝',
|
||||
label: '拒绝'
|
||||
},
|
||||
'audit': (propertiesType) => ({
|
||||
title: propertiesType === 'processing' ? '办理' : '审批',
|
||||
label: '审批'
|
||||
}),
|
||||
'auditRecall': {
|
||||
title: '撤回审核',
|
||||
label: '撤回'
|
||||
},
|
||||
'freeApprover': {
|
||||
title: '加签',
|
||||
label: '加签'
|
||||
},
|
||||
'back': {
|
||||
title: '退回',
|
||||
label: '退回'
|
||||
},
|
||||
'submit': {
|
||||
title: '提交审核',
|
||||
label: '提交审核'
|
||||
}
|
||||
};
|
||||
const getTitleAndLabel = (typeKey, propertiesType) => {
|
||||
const mapping = typeMapping[typeKey];
|
||||
if (typeof mapping === 'function') return mapping(propertiesType);
|
||||
return mapping || {
|
||||
title: '',
|
||||
label: ''
|
||||
};
|
||||
};
|
||||
const {
|
||||
title,
|
||||
label
|
||||
} = getTitleAndLabel(type, propertiesType);
|
||||
this.title = title;
|
||||
this.label = label;
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.title
|
||||
});
|
||||
},
|
||||
changeUserSelect(e) {
|
||||
this.dataForm.handleIds = e.join()
|
||||
},
|
||||
branchChange(e, list) {
|
||||
this.dataForm.branchList = e;
|
||||
this.candidateList = []
|
||||
this.init();
|
||||
},
|
||||
openSelect(item) {
|
||||
item.formData = this.config.formData;
|
||||
item.taskId = this.config.operatorId;
|
||||
item.selectList = item.selectList || [];
|
||||
item.candidateList = JSON.stringify(this.candidateList);
|
||||
item.delegateUser = this.config.delegateUser
|
||||
uni.navigateTo({
|
||||
url: "/pages/workFlow/candiDateUserSelect/index?data=" +
|
||||
encodeURIComponent(JSON.stringify(item)),
|
||||
});
|
||||
},
|
||||
selectConfirm(data, nodeCode) {
|
||||
let users = [];
|
||||
const item = this.candidateList.filter(o => o.nodeCode == nodeCode)[0] || {}
|
||||
item.value = data.map(o => o.id) || []
|
||||
item.fullName = (data.map(o => o.fullName) || []).join(',') || ''
|
||||
item.selectList = data || []
|
||||
for (let i = 0; i < this.candidateList.length; i++) {
|
||||
for (let j = 0; j < data.length; j++) {
|
||||
if (data[j].nodeCode === this.candidateList[i].nodeCode) {
|
||||
users.push(data[j].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$set(this.dataForm.candidateList, nodeCode, users);
|
||||
},
|
||||
getSelector() {
|
||||
getSelector().then(res => {
|
||||
this.commonList = res.data.list || []
|
||||
})
|
||||
},
|
||||
confirmCommonWord(e) {
|
||||
this.dataForm.handleOpinion = e.commonWordsText
|
||||
},
|
||||
handlePress(e) {
|
||||
this.$emit('handlePress')
|
||||
},
|
||||
addCommonWords() {
|
||||
let data = {
|
||||
commonWordsText: this.dataForm.handleOpinion,
|
||||
commonWordsType: 1
|
||||
}
|
||||
Create(data).then(res => {
|
||||
this.$u.toast(res.msg);
|
||||
})
|
||||
},
|
||||
freeApproverChange(e) {
|
||||
this.isCandidates = false;
|
||||
if (this.config.hasFreeApprover && e == 2 && this.candidateList.length) this.isCandidates = true;
|
||||
},
|
||||
confirm() {
|
||||
if (this.config.type === 'freeApprover') {
|
||||
this.dataForm.addSignParameter = {
|
||||
'addSignUserIdList': this.dataForm.addSignUserIdList,
|
||||
'auditRatio': this.dataForm.auditRatio,
|
||||
'counterSign': this.dataForm.counterSign,
|
||||
'addSignType': this.dataForm.addSignType
|
||||
}
|
||||
}
|
||||
if (!this.config.hasSign) delete this.dataForm.signImg
|
||||
this.dataForm.copyIds = Array.isArray(this.copyIds) && this.copyIds.length && this.copyIds.join()
|
||||
if (this.config.backType !== 3) this.dataForm.backType = this.config.backType
|
||||
let data = {
|
||||
...this.dataForm,
|
||||
eventType: ['auditRecall', 'launchRecall'].includes(this.config.type) ? 'recall' : this.config
|
||||
.type,
|
||||
approvalField: this.config.approvalField
|
||||
}
|
||||
if (this.isCandidates || this.isCandidate) {
|
||||
let candidateList = {};
|
||||
for (let i = 0; i < this.candidateList.length; i++) {
|
||||
let item = this.candidateList[i]
|
||||
if (!item.selected && !item.value?.length) return this.$u.toast('候选人不能为空')
|
||||
candidateList[item.nodeCode] = item.value || [];
|
||||
}
|
||||
data.candidateList = candidateList;
|
||||
}
|
||||
this.$refs.dataForm.validate(valid => {
|
||||
if (valid) {
|
||||
uni.$emit('operate', data)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .u-form-item--left {
|
||||
align-items: flex-start !important;
|
||||
}
|
||||
|
||||
::v-deep .u-form-item {
|
||||
line-height: 1.5rem !important;
|
||||
}
|
||||
|
||||
.textarea {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
::v-deep .u-input--border {
|
||||
border: 1rpx solid #f5f5f5 !important;
|
||||
}
|
||||
|
||||
.buttom-btn-left-inner {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.free-box {
|
||||
width: 100%;
|
||||
|
||||
.free-box-txt {
|
||||
text-align: end;
|
||||
}
|
||||
}
|
||||
|
||||
.flow-popup-content {
|
||||
padding-bottom: 88rpx;
|
||||
|
||||
::v-deep .u-form {
|
||||
.content {
|
||||
.u-form-item {
|
||||
.u-form-item__body {
|
||||
.u-form-item--left {
|
||||
// align-items: center !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.signature-box {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 20rpx;
|
||||
|
||||
.back-item {
|
||||
.back-item-inner {
|
||||
justify-content: end;
|
||||
width: 100%;
|
||||
|
||||
.selectNode {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.head-title {
|
||||
height: 80rpx;
|
||||
justify-content: space-between;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.uploadFile {
|
||||
width: 100%;
|
||||
padding-bottom: 8rpx;
|
||||
border-top: 1rpx solid #fbfbfc;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
84
pages/workFlow/operate/revoke.vue
Normal file
84
pages/workFlow/operate/revoke.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view class="flow-popup-content">
|
||||
<u-form ref="dataForm" :model="dataForm" :label-width="150" :errorType="['toast']">
|
||||
<view class="content">
|
||||
<u-form-item label="撤销原因">
|
||||
<HandleOpinion v-model="dataForm.handleOpinion" :showCommon="false"></HandleOpinion>
|
||||
</u-form-item>
|
||||
</view>
|
||||
</u-form>
|
||||
<view class="flowBefore-actions">
|
||||
<view class="u-flex-col buttom-btn-left-inner" @click.stop="jnpf.goBack()">
|
||||
<u-icon name="icon-ym" size="24" custom-prefix="icon-ym icon-ym-add-cancel"></u-icon>
|
||||
<text>取消</text>
|
||||
</view>
|
||||
<u-button class="buttom-btn" type="primary" @click="confirm('confirm')">确定
|
||||
</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import HandleOpinion from './components/HandleOpinion.vue'
|
||||
import {
|
||||
getSelector,
|
||||
Create
|
||||
} from '@/api/commonWords'
|
||||
export default {
|
||||
components: {
|
||||
HandleOpinion
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
handleOpinion: ""
|
||||
},
|
||||
config: {}
|
||||
};
|
||||
},
|
||||
onLoad(data) {
|
||||
try {
|
||||
this.config = JSON.parse(decodeURIComponent(data.config));
|
||||
} catch {
|
||||
this.config = JSON.parse(data.config);
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
confirm() {
|
||||
let data = {
|
||||
...this.dataForm,
|
||||
eventType: this.config.type
|
||||
}
|
||||
uni.$emit('operate', data)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 500)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
height: 100%;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
::v-deep .u-form-item--left {
|
||||
align-items: flex-start !important;
|
||||
}
|
||||
|
||||
.buttom-btn-left-inner {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.flow-popup-content {
|
||||
.signature-box {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user