发短信

This commit is contained in:
Paidax
2025-03-13 08:47:48 +08:00
parent 645e8002aa
commit 5927a814e9
29 changed files with 697 additions and 457 deletions
@@ -1,224 +1,225 @@
<template>
<div>
<div ref="editorDom"></div>
<input type="file" style="display: none;" />
</div>
<div>
<div ref="editorDom"></div>
<input type="file" style="display: none;" />
</div>
</template>
<script src="/assets/platform/plugins/jquery/jquery-1.11.1.min.js"></script>
<script>
const {$, BtnMenu, DropListMenu, PanelMenu, DropList, Panel, Tooltip} = wangEditor
const { $, BtnMenu, DropListMenu, PanelMenu, DropList, Panel, Tooltip } = wangEditor
class AlertMenu extends BtnMenu {
constructor(editor) {
const $elem = wangEditor.$(
`<div class="w-e-menu" data-title="上传word">
constructor(editor) {
const $elem = wangEditor.$(
`<div class="w-e-menu" data-title="上传word">
<i class="fa fa-file-word-o" aria-hidden="true" /></i>
</div>`
)
super($elem, editor)
}
)
super($elem, editor)
}
clickHandler() {
const _this = this
const inputFileElement = document.querySelector('#'+this.editor.textElemId).parentElement.parentElement.nextElementSibling
inputFileElement.click()
inputFileElement.addEventListener('change', function () {
const loading = ELEMENT.Loading.service({
lock: true,
text: '解析中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
clickHandler() {
const _this = this
const inputFileElement = document.querySelector("#" + this.editor.textElemId).parentElement.parentElement.nextElementSibling
inputFileElement.click()
inputFileElement.addEventListener("change", function() {
const loading = ELEMENT.Loading.service({
lock: true,
text: "解析中",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)"
})
})
const file = this.files[0];
const fileName = file.name
const file = this.files[0]
const fileName = file.name
if (!fileName.toLowerCase().endsWith('.doc') && !fileName.toLowerCase().endsWith('.docx')) {
alert('请上传doc或者docx的文件')
_this.clearInputFile()
loading.close()
return
}
if (!fileName.toLowerCase().endsWith(".doc") && !fileName.toLowerCase().endsWith(".docx")) {
alert("请上传doc或者docx的文件")
_this.clearInputFile()
loading.close()
return
}
const formData = new FormData()
formData.append('file', file, file.name)
axios.post('/file_server/word2Html', formData, {}).then(response => {
console.log(response.data)
loading.close()
if (response.data.code === 0) {
_this.editor.txt.html(response.data.data)
} else {
alert(response.data.msg + ',上传word失败,请联系管理员!')
_this.clearInputFile()
}
}).catch(error => {
loading.close()
console.log(error)
_this.clearInputFile()
alert('上传word失败,请联系管理员!')
});
});
}
const formData = new FormData()
formData.append("file", file, file.name)
axios.post("/file_server/word2Html", formData, {}).then(response => {
console.log(response.data)
loading.close()
if (response.data.code === 0) {
_this.editor.txt.html(response.data.data)
} else {
alert(response.data.msg + ",上传word失败,请联系管理员!")
_this.clearInputFile()
}
}).catch(error => {
loading.close()
console.log(error)
_this.clearInputFile()
alert("上传word失败,请联系管理员!")
})
})
}
clearInputFile() {
const obj = document.getElementById('fileInput');
obj.outerHTML = obj.outerHTML
}
clearInputFile() {
const obj = document.getElementById("fileInput")
obj.outerHTML = obj.outerHTML
}
tryChangeActive() {
this.active()
}
tryChangeActive() {
this.active()
}
}
wangEditor.registerMenu('alertMenuKey', AlertMenu)
wangEditor.registerMenu("alertMenuKey", AlertMenu)
module.exports = {
name: "textEditor",
props: {
// 定义值属性,用于接收父组件传递的值
value: {
type: String,
default: ''
},
height: {
type: Number,
default: 300
},
placeholder: {
type: String,
default: '请输入正文'
},
menus: {
type: Array,
default: () => {
return [
'head',//标题
'bold',//加粗
'fontSize',//字号
'fontName',//字体
'italic',//斜体
'underline',//下划线
'strikeThrough',//删除线
'indent',//缩进
'lineHeight',//行高
'foreColor',//文字颜色
'backColor',//背景颜色
//'link',//链接
'list',//序列
'todo',//待办
'justify',//对齐
'quote',//引用
// 'emoticon',//表情
'image',
//'video',
'table',
//'code',
'splitLine',//分割线
'undo',
'redo',
]
}
}
},
data() {
return {
editor: null
}
},
mounted() {
this.initEditor()
},
watch: {
value: {
handler: function (newValue) {
this.$nextTick(() => {
if (newValue !== this.editor.txt.html()) {
this.editor.txt.html(newValue)
} else {
// this.editor.selection.moveCursor(this.editor.$textElem.elems[0], 1)
}
})
},
immediate: true
}
},
methods: {
initEditor() {
let _this = this
this.editor = new wangEditor(this.$refs.editorDom)
this.editor.config.focus = false
//内容change回调
this.editor.config.onchange = (newHtml) => {
this.cursorPos = this.editor.selection.getCursorPos()
const range = this.editor.selection.getRange()
range.setStart(range.startContainer, Math.max(this.cursorPos, range.endOffset))
this.$emit("input", newHtml)
}
//配置图片上传
this.editor.config.customUploadImg = function (resultFiles, insertImgFn) {
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
Promise.all(_this.uploadFiles(resultFiles)).then(res => {
res.forEach(v => {
if (v.code === 0) {
insertImgFn(APP_DOMAIN + CREATE_PREVIEW_URL(v.data.filepath))
} else {
ELEMENT.message.warning('图片上传失败')
name: "textEditor",
props: {
// 定义值属性,用于接收父组件传递的值
value: {
type: String,
default: ""
},
height: {
type: Number,
default: 300
},
placeholder: {
type: String,
default: "请输入正文"
},
menus: {
type: Array,
default: () => {
return [
"head",//标题
"bold",//加粗
"fontSize",//字号
"fontName",//字体
"italic",//斜体
"underline",//下划线
"strikeThrough",//删除线
"indent",//缩进
"lineHeight",//行高
"foreColor",//文字颜色
"backColor",//背景颜色
//'link',//链接
"list",//序列
"todo",//待办
"justify",//对齐
"quote",//引用
// 'emoticon',//表情
"image",
//'video',
"table",
//'code',
"splitLine",//分割线
"undo",
"redo"
]
}
})
})
}
},
data() {
return {
editor: null
}
},
mounted() {
this.initEditor()
},
}
//粘贴过滤
this.editor.config.pasteFilterStyle = false
//高度
this.editor.config.height = this.height
//菜单
this.editor.config.menus = this.menus
this.editor.config.placeholder = this.placeholder
this.editor.create()
},
isEmptyEditor() {
const children = this.editor.$textElem.children()
for (let i = 0; i < children.elems.length; i++) {
const node = children.elems[i]
if (node && node.nodeType === Node.TEXT_NODE && node.textContent.trim().length !== '') {
return false
watch: {
value: {
handler: function(newValue) {
this.$nextTick(() => {
if (newValue !== this.editor.txt.html()) {
this.editor.txt.html(newValue)
} else {
// this.editor.selection.moveCursor(this.editor.$textElem.elems[0], 1)
}
})
},
immediate: true
}
if (node && node.nodeType === Node.ELEMENT_NODE && node.tagName.toLowerCase() === 'p' && node.innerText.trim() !== '') {
return false
}
}
return true
},
uploadFiles(resultFiles) {
return resultFiles.map(async file => {
const formData = new FormData()
formData.append('file', file, file.name)
formData.append("folderPath", "/wangEditorImg/")
return jQuery.ajax({
url: '/file_server/uploadFile',
type: 'post',
data: formData,
processData: false,
contentType: false
})
})
methods: {
initEditor() {
let _this = this
this.editor = new wangEditor(this.$refs.editorDom)
this.editor.config.focus = false
this.editor.config.uploadImgMaxSize = 10 * 1024 * 1024
//内容change回调
this.editor.config.onchange = (newHtml) => {
this.cursorPos = this.editor.selection.getCursorPos()
const range = this.editor.selection.getRange()
range.setStart(range.startContainer, Math.max(this.cursorPos, range.endOffset))
this.$emit("input", newHtml)
}
//配置图片上传
this.editor.config.customUploadImg = function(resultFiles, insertImgFn) {
// resultFiles 是 input 中选中的文件列表
// insertImgFn 是获取图片 url 后,插入到编辑器的方法
Promise.all(_this.uploadFiles(resultFiles)).then(res => {
res.forEach(v => {
if (v.code === 0) {
insertImgFn(APP_DOMAIN + CREATE_PREVIEW_URL(v.data.filepath))
} else {
ELEMENT.message.warning("图片上传失败")
}
})
})
}
//粘贴过滤
this.editor.config.pasteFilterStyle = false
//高度
this.editor.config.height = this.height
//菜单
this.editor.config.menus = this.menus
this.editor.config.placeholder = this.placeholder
this.editor.create()
},
isEmptyEditor() {
const children = this.editor.$textElem.children()
for (let i = 0; i < children.elems.length; i++) {
const node = children.elems[i]
if (node && node.nodeType === Node.TEXT_NODE && node.textContent.trim().length !== "") {
return false
}
if (node && node.nodeType === Node.ELEMENT_NODE && node.tagName.toLowerCase() === "p" && node.innerText.trim() !== "") {
return false
}
}
return true
},
uploadFiles(resultFiles) {
return resultFiles.map(async file => {
const formData = new FormData()
formData.append("file", file, file.name)
formData.append("folderPath", "/wangEditorImg/")
return jQuery.ajax({
url: "/file_server/uploadFile",
type: "post",
data: formData,
processData: false,
contentType: false
})
})
}
},
created() {
}
},
created() {
}
}
</script>
@@ -81,8 +81,8 @@ module.exports = {
clearInterval(signatureInterval)
const ts = new Date().getTime() + (Math.floor(Math.random() * (1000 - 1 + 1)) + 1).toString()
console.log(ts)
// this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
this.postAddress = 'https://zhgh.hmc.edu.cn/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
this.postAddress = location.protocol + '//' + location.host + '/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
// this.postAddress = 'https://zhgh.hmc.edu.cn/signature?prefix=' + this.prefix + '&id=' + ts + "&is_value_base64=" + this.is_value_base64
this.showQrCode = true
@@ -149,11 +149,13 @@ layout("/mobile/platform.html"){
<van-form>
<van-field label="审核人员" readonly name="username" v-model="formData.username" required></van-field>
<van-field label="审核时间" readonly name="auditTime" v-model="formData.auditTime" required></van-field>
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
<van-field label="审核意见" name="auditOpinion"
type="textarea" maxlength="200" show-word-limit
v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="default" block @click="infoShow=false">取消</van-button>
<van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>
<!-- <van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>-->
<van-button type="danger" block @click.submit="doApproval(0)">拒绝接收</van-button>
<van-button type="primary" block @click.submit="doApproval(1)">同意接收</van-button>
</div>
@@ -234,7 +236,7 @@ layout("/mobile/platform.html"){
}
let msg = '确定要通过此条申请吗?'
if (approvalType === 0) {
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
msg = '确定要拒绝接收该教工的工会关系吗?'
} else if (approvalType === 2) {
msg = '确定要退回此条申请吗?'
}
@@ -41,8 +41,8 @@ const MEMBER_APPLY_AUDIT_INFO = {
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<van-cell title="会员状态">{{ viewData.member ? '会员' : '非会员' }}</van-cell>
<van-cell title="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</van-cell>
<!-- <van-cell title="会员状态">{{ viewData.member ? '会员' : '非会员' }}</van-cell>-->
<!-- <van-cell title="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</van-cell>-->
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
@@ -67,11 +67,20 @@ const MEMBER_APPLY_AUDIT_INFO = {
</table>
</van-cell>
<van-cell title="个人简历">
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span v-else>无数据</span>
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
<van-cell title="签字">
<template #label>
<van-image width="200" height="100" :src="CREATE_PREVIEW_URL(viewData.sign)"
v-if="viewData.sign"></van-image>
<span style="font-size: 14px" v-else>暂无</span>
</template>
</van-cell>
</template>
</van-cell-group>
</van-tab>
@@ -125,7 +125,7 @@ layout("/mobile/platform.html"){
<van-button size="small" type="primary"
v-if="[20, 70].includes(item.applyStateId)"
@click="openApproval(item)"
style="margin-right: 4px">审核
style="margin-right: 4px">{{ item.applyStateId === 70 ? '重新审核' : '审核' }}
</van-button>
<van-button size="small" type="danger"
v-if="[30, 50].includes(item.applyStateId)"
@@ -155,7 +155,9 @@ layout("/mobile/platform.html"){
<van-field label="分配工会" v-model="formData.unionName" readonly clickable required
@click="unionPicker = true" placeholder="请选择分配工会"
:rules="[{ required:true, message: '请选择分配工会' }]"></van-field>
<van-popup v-model="unionPicker" position="bottom">
<van-popup v-model="unionPicker" position="bottom"
get-container="body"
safe-area-inset-bottom>
<van-picker
show-toolbar
:columns="unions"
@@ -163,11 +165,13 @@ layout("/mobile/platform.html"){
@cancel="unionPicker = false"
></van-picker>
</van-popup>
<van-field label="审核意见" name="auditOpinion" v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
<van-field label="审核意见" name="auditOpinion"
type="textarea" maxlength="200" show-word-limit
v-model="formData.auditOpinion" placeholder="请输入审核意见" required></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="default" block @click="infoShow=false">取消</van-button>
<van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>
<!-- <van-button type="danger" block @click.submit="doApproval(2)">退回申请</van-button>-->
<van-button type="danger" block @click.submit="doApproval(0)">拒绝申请</van-button>
<van-button type="primary" block @click.submit="doApproval(1)">同意申请</van-button>
</div>
@@ -143,9 +143,9 @@ layout("/mobile/platform.html"){
<van-field label="在职状态" :value="formData.userState" readonly></van-field>
<van-field label="人员类型" :value="formData.personType" readonly></van-field>
<van-field label="身份证号码" v-model="formData.idCard" placeholder="请输入身份证号码"
<van-field label="身份证号码" disabled v-model="formData.idCard" placeholder="请输入身份证号码"
:rules="[{ pattern :/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '身份证号码格式错误' }]"></van-field>
<van-field label="联系电话" v-model="formData.mobile" type="tel" placeholder="请输入联系电话"
<van-field label="联系电话" disabled v-model="formData.mobile" type="tel" placeholder="请输入联系电话"
:rules="[{ pattern :/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/, message: '联系电话格式错误' }]"></van-field>
<van-field label="电子邮箱" v-model="formData.email" placeholder="请输入电子邮箱"
:rules="[{ pattern :/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, message: '邮箱格式错误' }]"></van-field>
@@ -204,6 +204,22 @@ layout("/mobile/platform.html"){
<text-editor style="z-index: 1" v-model="formData.vita"></text-editor>
</template>
</van-field>
<van-cell title="入会意愿">
<template #label>
<van-checkbox style="font-size: 16px;color: #F56C6C" icon-size="24px"
v-model="formData.isVoluntary" shape="square">
我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为全面建成小康社会、把我国建设成为富强民主文明和谐的社会主义现代化国家、实现中华民族伟大复兴的中国梦而奋斗。
</van-checkbox>
</template>
</van-cell>
<van-cell title="签字">
<template #label>
<mobile-sign :is_value_base64="false" v-model="formData.sign" prefix="MEMBER_APPLY"
ref="signature"></mobile-sign>
</template>
</van-cell>
</van-form>
<div v-if="!user.member" style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button block v-if="formData.id" type="default" @click.submit="pjaxReplace('/platform/member/apply/mine/h5')">返 回</van-button>
@@ -256,6 +272,16 @@ layout("/mobile/platform.html"){
})
},
doSubmit(){
if (!this.formData.isVoluntary) {
this.$toast.fail('请同意入会意愿')
return
}
if (!this.formData.sign) {
this.$toast.fail('请签字')
return
}
this.$dialog.confirm({
title: "保存",
message: "提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?",
@@ -35,6 +35,12 @@ layout("/layouts/platform.html"){
<el-tag v-if="row.allocationUnionName">{{ row.allocationUnionName }}</el-tag>
<el-tag v-else type="danger">未分配</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image :src="CREATE_PREVIEW_URL(row.sign)"
fit="cover"
style="height: 60px" v-if="row.sign"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="220">
<template slot-scope="{row}">
@@ -82,7 +88,7 @@ layout("/layouts/platform.html"){
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval(2)">退回申请</el-button>
<!-- <el-button type="danger" @click="doApproval(2)">退回申请</el-button>-->
<el-button type="danger" @click="doApproval(0)">拒绝接收</el-button>
<el-button type="primary" @click="doApproval(1)">同意接收</el-button>
</el-row>
@@ -111,6 +117,7 @@ layout("/layouts/platform.html"){
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "allocationUnionName", label: "分配工会", sortable: true },
{ prop: "sign", label: "签字" },
{ prop: "stateName", label: "当前节点", sortable: true }
],
@@ -145,7 +152,7 @@ layout("/layouts/platform.html"){
doApproval(approvalType){
let msg = '确定要通过此条申请吗?'
if (approvalType === 0) {
msg = '拒绝后不可撤回,确定要拒绝此条申请吗?'
msg = '确定要拒绝接收此教工的工会关系吗?'
} else if (approvalType === 2) {
msg = '确定要退回此条申请吗?'
}
@@ -28,9 +28,9 @@ const MEMBER_APPLY_AUDIT_INFO = {
<el-descriptions-item label="人员类型">{{ viewData.personType }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>
<el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>
<el-descriptions-item></el-descriptions-item>
<!-- <el-descriptions-item label="会员状态">{{ viewData.member ? '会员' : '非会员' }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="福利会员状态">{{ viewData.welfareMember ? '福利会员' : '非福利会员' }}</el-descriptions-item>-->
<!-- <el-descriptions-item></el-descriptions-item>-->
<el-descriptions-item label="家庭主要成员" :span="3">
<el-table v-if="viewData.families&&viewData.families.length"
@@ -49,9 +49,16 @@ const MEMBER_APPLY_AUDIT_INFO = {
<el-empty v-else :image-size="50" description="暂无家庭成员信息"></el-empty>
</el-descriptions-item>
<el-descriptions-item label="个人简况" :span="3">
<template slot="label">个人简况</template>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span v-else>无数据</span>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
<el-descriptions-item label="签字信息" :span="3">
<el-image v-if="viewData.sign"
:src="CREATE_PREVIEW_URL(viewData.sign)"
fit="contain"
style="width: 300px; height: 100px"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
@@ -63,7 +70,8 @@ const MEMBER_APPLY_AUDIT_INFO = {
<el-descriptions-item label="审核时间">{{ viewData.schoolAudit.auditTime }}
</el-descriptions-item>
<el-descriptions-item label="分配工会" :span="2">
<el-tag>{{ viewData.allocationUnionName }}</el-tag>
<el-tag v-if="viewData.allocationUnionName">{{ viewData.allocationUnionName }}</el-tag>
<el-tag v-else type="warning">{{ '无数据' }}</el-tag>
</el-descriptions-item>
<el-descriptions-item label="审核意见" :span="2">{{ viewData.schoolAudit.auditOpinion }}
</el-descriptions-item>
@@ -25,6 +25,12 @@ layout("/layouts/platform.html"){
<template scope="{row}" v-if="column.prop=='loginname'">
<el-link @click="openView(row)" type="primary">{{row.loginname}}</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image :src="CREATE_PREVIEW_URL(row.sign)"
fit="cover"
style="height: 60px" v-if="row.sign"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="220">
<template slot-scope="{row}">
@@ -63,6 +69,7 @@ layout("/layouts/platform.html"){
{ prop: "personType", label: "人员类型", sortable: true },
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "sign", label: "签字" },
{ prop: "stateName", label: "当前节点", sortable: true }
],
}
@@ -35,11 +35,19 @@ layout("/layouts/platform.html"){
<el-tag v-if="row.allocationUnionName">{{ row.allocationUnionName }}</el-tag>
<el-tag v-else type="danger">未分配</el-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='sign'">
<el-image :src="CREATE_PREVIEW_URL(row.sign)"
fit="cover"
style="height: 60px" v-if="row.sign"></el-image>
<el-tag type="warning" v-else>暂无</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="220">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="[20, 70].includes(row.applyStateId)" @click="openAudit(row)" size="mini" type="primary">审核</el-button>
<el-button v-if="[20, 70].includes(row.applyStateId)" @click="openAudit(row)" size="mini" type="primary">
{{ (row.applyStateId === 70) ? '重新审核' : '审核' }}
</el-button>
<el-button v-if="[30, 50].includes(row.applyStateId)" @click="doRevoke(row)" size="mini" type="danger">撤回</el-button>
</template>
</el-table-column>
@@ -99,7 +107,7 @@ layout("/layouts/platform.html"){
</el-form>
<el-row type="flex" justify="end">
<el-button plain @click="$refs.guava.index()">取消</el-button>
<el-button type="danger" @click="doApproval(2)">退回申请</el-button>
<!-- <el-button type="danger" @click="doApproval(2)">退回申请</el-button>-->
<el-button type="danger" @click="doApproval(0)">拒绝申请</el-button>
<el-button type="primary" @click="doApproval(1)">同意申请</el-button>
</el-row>
@@ -130,6 +138,7 @@ layout("/layouts/platform.html"){
{ prop: "unionName", label: "所属工会", sortable: true },
{ prop: "unitName", label: "所属单位", sortable: true },
{ prop: "allocationUnionName", label: "分配工会", sortable: true },
{ prop: "sign", label: "签字" },
{ prop: "stateName", label: "当前节点", sortable: true }
],
@@ -106,12 +106,12 @@ layout("/layouts/platform.html"){
<el-descriptions-item label="身份证号码">
<el-form-item prop="idCard">
<el-input v-model="formData.idCard" placeholder="请输入身份证号码" maxlength="18"></el-input>
<el-input v-model="formData.idCard" disabled placeholder="请输入身份证号码" maxlength="18"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="联系电话">
<el-form-item prop="mobile">
<el-input v-model="formData.mobile" placeholder="请输入联系电话" maxlength="32"></el-input>
<el-input v-model="formData.mobile" disabled placeholder="请输入联系电话" maxlength="32"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="电子邮箱">
@@ -171,6 +171,25 @@ layout("/layouts/platform.html"){
<text-editor v-model="formData.vita"></text-editor>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="入会意愿" :span="3">
<el-form-item prop="isVoluntary">
<el-checkbox
size="medium"
style="width: 70%;color: #F56C6C;white-space: nowrap"
v-model="formData.isVoluntary">
我自愿加入中华全国总工会,遵守工会章程,执行工会决议,积极参加工会活动,为全面建成小康社会、把我国建设成为富强民主文明和谐的社会主义现代化国家、实现中华民族伟大复兴的中国梦而奋斗。
</el-checkbox>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="签字" :span="3">
<el-form-item prop="sign">
<sign :is_value_base64="false" :qz.sync="formData.sign"
prefix="MEMBER_APPLY"
ref="sign"></sign>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
<el-row v-if="!member" justify="end" type="flex" class="mt10">
@@ -196,6 +215,15 @@ layout("/layouts/platform.html"){
formRules: {
username: [{required: false, message: "必填", trigger: ["change", "blur"]}],
sex: [{required: false, message: "必填", trigger: ["change", "blur"]}],
isVoluntary: [{required: true, message: "必填", trigger: ["change", "blur"]}],
sign: [{required: true, message: "必填", trigger: ["change", "blur"]}],
phone: [
{
validator: (rule, value, callback) => {
},
trigger: ["change", "blur"]
}
],
email: [
{
validator: (rule, value, callback) => {
@@ -280,6 +308,16 @@ layout("/layouts/platform.html"){
.catch()
},
doSubmit() {
if (!this.formData.isVoluntary) {
this.$message.error("请勾选入会意愿")
return
}
if (!this.formData.sign) {
this.$message.error("请使用手机钉钉扫描二维码签字")
return
}
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("提交后将进入审核流程,无法再进行编辑,您确定要提交申请吗?", "提示", { type: "warning" })
@@ -152,23 +152,25 @@ layout("/layouts/platform.html"){
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
const url = "/platform/sourcechange/manage/doBatchChange"
let isSendMsg = false
const isHasNewTeacher = this.checkUsers.some(v=> v.changeInfosStr === '新入职')
const ids = this.checkUsers.map(item => item.id)
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const resp = await $.post('/platform/sourcechange/manage/doBatchChange', {
data: JSON.stringify(ids)
})
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$refs.table.clearSelection()
await this.pageData()
if (isHasNewTeacher) {
this.$confirm('勾选用户中有新入职教工,是否对新入职教职工发送入会邀请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
isSendMsg = true
this.doOperate(url, ids, isSendMsg)
}).catch(() => {
isSendMsg = false
this.doOperate(url, ids, isSendMsg)
})
} else {
this.$message.warning(resp.msg)
await this.doOperate(url, ids, isSendMsg)
}
})
},
@@ -176,10 +178,41 @@ layout("/layouts/platform.html"){
this.checkUsers = val
},
async doSubmit(formData){
const resp = await $.post('/platform/sourcechange/manage/doSubmit', formData)
const url = "/platform/sourcechange/manage/doSubmit"
let isSendMsg = false;
if (formData.changeInfosStr === '新入职') {
this.$confirm('该职工是新入职职工,是否发送入会邀请?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
isSendMsg = true
await this.doOperate(url, formData, isSendMsg)
}).catch(async () => {
isSendMsg = false
await this.doOperate(url, formData, isSendMsg)
})
} else {
await this.doOperate(url, formData, isSendMsg)
}
},
async doOperate(url, data, isSendMsg) {
const loading = this.$loading({
lock: true,
text: '数据保存中请稍后...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
const resp = await $.post(url, {
data: JSON.stringify(data),
isSendMsg: isSendMsg
})
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$refs.guava.index()
this.$refs.table.clearSelection()
await this.pageData()
} else {
this.$message.warning(resp.msg)