Merge branch 'main' of http://47.112.118.149:10082/xgxt_sd/zhxg_pc
# Conflicts: # src/api/common/stamp.js
This commit is contained in:
@@ -36,6 +36,15 @@ export function addEnlistmentReserve(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 批量新增应征入伍保留学籍申请
|
||||||
|
export function batchInsert(data) {
|
||||||
|
return request({
|
||||||
|
url: '/routine/enlistmentReserve/batchInsert',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 修改应征入伍保留学籍申请
|
// 修改应征入伍保留学籍申请
|
||||||
export function updateEnlistmentReserve(data) {
|
export function updateEnlistmentReserve(data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -59,4 +68,4 @@ export function getOwnInfo(){
|
|||||||
url:'/comprehensive/stuInfoView/getOwnInfo',
|
url:'/comprehensive/stuInfoView/getOwnInfo',
|
||||||
method:'GET'
|
method:'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -661,7 +661,7 @@ export default {
|
|||||||
// 填写附件里面的申请编号
|
// 填写附件里面的申请编号
|
||||||
this.enlistmentReserveAttachList.forEach(element => {
|
this.enlistmentReserveAttachList.forEach(element => {
|
||||||
element.applyNo = this.formData.applyNo
|
element.applyNo = this.formData.applyNo
|
||||||
element.applyId = response.data.id
|
element.applyId = this.formData.id
|
||||||
})
|
})
|
||||||
// 批量新增材料附件
|
// 批量新增材料附件
|
||||||
if (this.enlistmentReserveAttachList && this.enlistmentReserveAttachList.length > 0) {
|
if (this.enlistmentReserveAttachList && this.enlistmentReserveAttachList.length > 0) {
|
||||||
@@ -743,7 +743,6 @@ export default {
|
|||||||
this.$message.warning('该文件已添加,请勿重复上传');
|
this.$message.warning('该文件已添加,请勿重复上传');
|
||||||
}
|
}
|
||||||
console.log(this.enlistmentReserveAttachList);
|
console.log(this.enlistmentReserveAttachList);
|
||||||
|
|
||||||
},
|
},
|
||||||
// 处理子组件传递的删除文件事件
|
// 处理子组件传递的删除文件事件
|
||||||
handleDeleteFile(fileName) {
|
handleDeleteFile(fileName) {
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
:disabled="single" @click="handleUpdate">修改</el-button>
|
:disabled="single" @click="handleUpdate">修改</el-button>
|
||||||
</el-col> -->
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-delete" size="mini" :disabled="multiple"
|
<el-button type="primary" plain icon="el-icon-folder-checked" size="mini" :disabled="multiple"
|
||||||
@click="handleAdd">批量申请</el-button>
|
@click="handleAdd">提交批量申请</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:stuent:import']" type="info" plain icon="el-icon-upload2" size="mini"
|
<el-button v-hasPermi="['system:stuent:import']" type="info" plain icon="el-icon-upload2" size="mini"
|
||||||
@@ -89,6 +89,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listOwnStu as listStudent } from '@/api/stuCQS/basedata/student'
|
import { listOwnStu as listStudent } from '@/api/stuCQS/basedata/student'
|
||||||
|
import { batchInsert } from "@/api/routine/enlistmentReserve/enlistmentReserve";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -113,6 +114,8 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
stuNo: null,
|
stuNo: null,
|
||||||
},
|
},
|
||||||
|
// 选中的要添加的学生
|
||||||
|
stuList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -150,8 +153,60 @@ export default {
|
|||||||
this.ids = selection.map(item => item.stuId)
|
this.ids = selection.map(item => item.stuId)
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
|
this.stuList = selection
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
|
this.$confirm('此操作会批量提交入伍申请,但是申请记录的民族、家长电话、家庭地址等材料需要手动去修改, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: 'Loading',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
});
|
||||||
|
let data = []
|
||||||
|
for (let index = 0; index < this.stuList.length; index++) {
|
||||||
|
const year = new Date().getFullYear();
|
||||||
|
const randomNo = Math.floor(Math.random() * 1000000).toString().padStart(6, '0');
|
||||||
|
data.push({
|
||||||
|
applyNo: `RY${year}${randomNo}`,
|
||||||
|
applyReason: '本人应征入伍,申请保留学籍从 2026-03-01 至退役后两年。',
|
||||||
|
className: this.stuList[index].srsClass.className,
|
||||||
|
deptName: this.stuList[index].deptName,
|
||||||
|
familyAddress: '',
|
||||||
|
gender: this.stuList[index].gender == '男' ? '1' : '0',
|
||||||
|
grade: this.stuList[index].gradeName,
|
||||||
|
major: this.stuList[index].srsMajors.majorName,
|
||||||
|
studentName: this.stuList[index].name,
|
||||||
|
studentNo: this.stuList[index].stuNo,
|
||||||
|
teacherName: this.stuList[index].cphName,
|
||||||
|
studentId: this.stuList[index].stuId,
|
||||||
|
nation: '无',
|
||||||
|
familyAddress: '请去修改填写家庭地址',
|
||||||
|
parentPhone: '请去填写家长联系电话',
|
||||||
|
createTime: Date.now()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
batchInsert(data).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
loading.close()
|
||||||
|
this.$modal.msgSuccess(`批量申请成功,共申请${res.data}条数据`)
|
||||||
|
this.$emit('refresh')
|
||||||
|
} else {
|
||||||
|
loading.close()
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消申请'
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="批量申请" :visible.sync="applicationDialogOpen" width="80%" append-to-body>
|
<el-dialog title="批量申请" :visible.sync="applicationDialogOpen" width="80%" append-to-body>
|
||||||
<applicationDialog></applicationDialog>
|
<applicationDialog @refresh="refreshForm"></applicationDialog>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="上传附件" :visible.sync="isOpenUpFlie" width="30%" append-to-body>
|
<el-dialog title="上传附件" :visible.sync="isOpenUpFlie" width="30%" append-to-body>
|
||||||
<Affix v-model="affixIdFlie" @input="handleAffix" @fileUploaded="handleAffix" @delete-file="handleDeleteFile" />
|
<Affix v-model="affixIdFlie" @input="handleAffix" @fileUploaded="handleAffix" @delete-file="handleDeleteFile" />
|
||||||
@@ -594,6 +594,11 @@ export default {
|
|||||||
this.$message.success(`成功删除文件:${fileName}`);
|
this.$message.success(`成功删除文件:${fileName}`);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// 批量申请成功后关闭对话框,刷新列表
|
||||||
|
refreshForm() {
|
||||||
|
this.applicationDialogOpen = false
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user