Commit 663c2738 by zhaopanyu

11.1 zpy

parent f7bc0052
......@@ -9,10 +9,10 @@ export function performanceList(query) {
});
}
//根据身份证号获取学生信息
export function getInfoByIdCard(query) {
//根据号获取学生信息
export function getInfoByschoolNo(query) {
return request({
url: `/curricula/studentScore/selectStudent?idCard=${query}`,
url: `/curricula/studentScore/selectStudent?schoolNo=${query}`,
method: "get",
});
}
......
......@@ -18,6 +18,7 @@ const whiteList = [
"/studentRegistra",
"/printBarcodes",
"/printLesson",
"/studentTable",
];
router.beforeEach((to, from, next) => {
......
......@@ -69,6 +69,14 @@ export const constantRoutes = [
),
hidden: true,
},
{
path: "/studentTable",
component: () =>
import(
"@/views/smartSchool/teachAffairAdministration/affairStudentManage/studentTable"
),
hidden: true,
},
//设备台账
{
path: "/printBarcodes",
......
......@@ -37,7 +37,7 @@
<el-table-column fixed="left" label="序号" type="index" width="55" align="center" />
<el-table-column fixed="left" label="学生姓名" align="center" prop="studentName" />
<el-table-column fixed="left" label="学号" align="center" prop="studentNumber" width="150" />
<el-table-column fixed="left" label="身份证号" align="center" prop="idCard" width="200" />
<!-- <el-table-column fixed="left" label="身份证号" align="center" prop="idCard" width="200" /> -->
<el-table-column fixed="left" label="班级" align="center" prop="className" />
<el-table-column fixed="left" label="考试类型" align="center" prop="examType">
<template slot-scope="{ row }">
......@@ -99,34 +99,28 @@
<el-form :model="achievementForm" :rules="achievementRules" ref="achievementForm" label-width="80px"
label-position="left">
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="achievementForm.idCard" placeholder="请输入身份证号" @change="searchStudentInfo"
:disabled="nowType == 1 ? true : false"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="学生姓名" prop="studentName">
<el-input v-model="achievementForm.studentName" placeholder="请输入学生姓名"
:disabled="nowType == 1 ? true : false"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="班级" prop="className">
<el-input v-model="achievementForm.className" placeholder="请输入班级"
:disabled="nowType == 1 ? true : false"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="学号" prop="studentNumber">
<el-input v-model="achievementForm.studentNumber" placeholder="请输入学号"
:disabled="nowType == 1 ? true : false"></el-input>
:disabled="nowType == 1 ? true : false" @change="searchStudentInfo"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="考试类型" prop="examType">
<el-select v-model="achievementForm.examType" filterable placeholder="请选择考试类型" class="selectWidth"
......@@ -137,6 +131,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="语文" prop="language">
......@@ -188,7 +183,7 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="化学" prop="chemistry">
<el-input v-model="achievementForm.chemistry" type="number" placeholder="请输入化学"></el-input>
<el-input v-model="achievementForm.chemistry" type="number" placeholder="请输入化学"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -206,7 +201,7 @@
import { getToken } from "@/utils/auth";
import {
addPerformance, deletePerformance, editPerformance,
getInfoByIdCard,
getInfoByschoolNo,
performanceList
} from "../../../../../api/smartSchool/gradeWork/courseSelection/performance";
import { classList } from "../../../../../api/smartSchool/gradeWork/courseSelection/taskPublishing";
......@@ -249,7 +244,7 @@ export default {
classId: '',
studentName: '',
studentNumber: '',
idCard: '',
// idCard: '',
className: '',
examType: '',
language: '',
......@@ -263,8 +258,8 @@ export default {
biology: '',
},
achievementRules: {
idCard: [
{ required: true, message: '请输入身份证号', trigger: 'blur' }
studentNumber: [
{ required: true, message: '请输入', trigger: 'blur' }
],
// studentName: [
// { required: true, message: '请输入学生姓名', trigger: 'blur' }
......@@ -362,7 +357,7 @@ export default {
classId: '',
studentName: '',
studentNumber: '',
idCard: '',
// idCard: '',
className: '',
examType: '',
language: '',
......@@ -447,10 +442,11 @@ export default {
})
},
//根据身份证号获取学生信息
//根据号获取学生信息
searchStudentInfo() {
const idCard = this.achievementForm.idCard
getInfoByIdCard(idCard).then(res => {
const schoolNo = this.achievementForm.studentNumber
console.log(schoolNo, 'schoolNo');
getInfoByschoolNo(schoolNo).then(res => {
if (res.code == 200) {
Object.keys(this.achievementForm).forEach(key => {
res.data[key] && (this.achievementForm[key] = res.data[key])
......
......@@ -478,13 +478,14 @@ export default {
handleUpdate(row) {
const id = row.id || this.ids;
this.title = "派单";
this.openpd = true;
getRepairs(id).then(response => {
this.formpd.id = response.data.id;
console.log('this.formpd.id', this.formpd.id);
}).catch(err => {
})
this.openpd = true;
},
/** 删除按钮操作 */
......@@ -500,33 +501,24 @@ export default {
// 派单按钮
submitFormpd() {
this.$refs.formpd.validate((valid) => {
if (valid) {
const newObj = {};
newObj.id = this.formpd.id;
newObj.maintainState = this.formpd.maintainState;
newObj.maintainName = this.formpd.maintainName;
newObj.maintainPhone = this.formpd.maintainPhone;
console.log('newObj', newObj);
console.log(newObj.maintainState);
dispatchRepairs(newObj)
.then((response) => {
this.$modal.closeLoading();
this.$modal.msgSuccess("派单成功");
this.getList();
this.openpd = false;
this.formpd.maintainResult = '';
})
.catch((error) => {
});
} else {
return false;
}
});
const newObj = {};
newObj.id = this.formpd.id;
newObj.maintainState = this.formpd.maintainState;
newObj.maintainName = this.formpd.maintainName;
newObj.maintainPhone = this.formpd.maintainPhone;
console.log('newObj', newObj);
console.log(newObj.maintainState);
dispatchRepairs(newObj)
.then((response) => {
// 派单成功,显示提示信息并刷新页面
this.$message.success("派单成功");
this.openpd = false;
this.formpd.maintainResult = '';
this.getList();
})
},
// 取消按钮
cancel() {
this.open = false;
......
......@@ -27,7 +27,11 @@
<el-table-column label="领用日期" align="center" prop="recipientTime" width="200" />
<el-table-column label="领用人" align="center" prop="recipientBy" />
<el-table-column label="退还日期" align="center" prop="returnTime" width="200" />
<el-table-column label="退还时设备情况" align="center" prop="returnEquipmentCondition" />
<el-table-column label="退还时设备情况" align="center" prop="returnEquipmentCondition">
<template slot-scope="{ row }">
<div>{{ selectDictLabel(dict.type.equipment_state, row.returnEquipmentCondition) }}</div>
</template>
</el-table-column>
<el-table-column label="接收人" align="center" prop="receivedBy" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" prop="orgname" width="150" fixed="right">
......@@ -70,9 +74,8 @@
<el-col :span="12">
<el-form-item label="领用人" prop="recipientById">
<el-select v-model="collectionForm.recipientById" filterable placeholder="请选择领用人" clearable
class="selectWidth" :disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in userListly" :key="index"
:label="item.userName" :value="item.userId">
class="selectWidth" :disabled="nowType == 2 ? true : false">
<el-option v-for="(item, index) in userListly" :key="index" :label="item.userName" :value="item.userId">
</el-option>
</el-select>
</el-form-item>
......@@ -108,8 +111,11 @@
</el-col>
<el-col :span="12">
<el-form-item label="退还时设备情况" prop="returnEquipmentCondition">
<el-input v-model="collectionForm.returnEquipmentCondition" placeholder="请输入退还时设备情况"
:disabled="nowType == 2 ? true : false"></el-input>
<el-select v-model="collectionForm.returnEquipmentCondition" placeholder="请输入退还时设备情况" clearable
style="width: 100%;" :disabled="nowType == 2 ? true : false">
<el-option v-for="dict in dict.type.equipment_state" :key="dict.value" :label="dict.label"
:value="dict.value" />
</el-select>
</el-form-item>
</el-col>
</el-row>
......@@ -161,6 +167,7 @@ import {
getRepairencode,//根据自编码获取设备信息
} from '@/api/smartSchool/schoolProperty/repairApplicant.js'
export default {
dicts: ['equipment_state',],
data() {
return {
queryParams: {
......@@ -178,6 +185,7 @@ export default {
adminUserListjs: [],
//新增
collectionForm: {
equipmentId: '',
encode: '',
equipmentName: '',
model: '',
......@@ -188,8 +196,6 @@ export default {
receivedById: '',
receivedBy: '',
returnEquipmentCondition: '',
yjuseTime: '',
sjuseTime: '',
remark: '',
},
dialogVisible: false,
......@@ -213,12 +219,7 @@ export default {
receivedById: [
{ required: true, message: "接收人不能为空", trigger: "blur" }
],
yjuseTime: [
{ required: true, message: "预计使用时间不能为空", trigger: "blur" }
],
sjuseTime: [
{ required: true, message: "实际使用时间不能为空", trigger: "blur" }
]
},
isEditable: true,
}
......@@ -244,6 +245,7 @@ export default {
// 0新增、1编辑、2查看
handleOption(type, item) {
this.collectionForm = {
equipmentId: '',
id: '',
encode: '',
equipmentName: '',
......@@ -255,8 +257,6 @@ export default {
receivedById: '',
receivedBy: '',
returnEquipmentCondition: '',
yjuseTime: '',
sjuseTime: '',
remark: '',
}
this.nowType = type;
......@@ -355,8 +355,6 @@ export default {
returnTime: null,
receivedBy: null,
returnEquipmentCondition: null,
yjuseTime: null,
sjuseTime: null,
remark: null,
};
......
......@@ -21,14 +21,18 @@
<el-table v-loading="loading" :data="lendReturnData" stripe>
<el-table-column label="序号" type="index" width="55" align="center" />
<el-table-column label="自编码" align="center" prop="encode" width="140" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="设备名称" align="center" prop="equipmentName" width="130" />
<el-table-column label="型号" align="center" prop="model" />
<el-table-column label="借用日期" align="center" prop="borrowTime" width="160" />
<el-table-column label="借用人" align="center" prop="borrowBy" />
<el-table-column label="用途" align="center" prop="purpose" />
<el-table-column label="借用期限(天)" align="center" prop="deadline" width="140" />
<el-table-column label="归还日期" align="center" prop="returnTime" width="160" />
<el-table-column label="归还时设备情况" align="center" prop="returnEquipmentCondition" width="160" />
<el-table-column label="归还时设备情况" align="center" prop="returnEquipmentCondition" width="160">
<template slot-scope="{ row }">
<dict-tag :options="dict.type.equipment_state" :value="row.returnEquipmentCondition" />
</template>
</el-table-column>
<el-table-column label="接收人" align="center" prop="receivedBy" />
<el-table-column label="预计使用时间" align="center" prop="yjuseTime" width="160" />
<el-table-column label="实际使用时间" align="center" prop="sjuseTime" width="160" />
......
......@@ -9,14 +9,16 @@
<el-button type="primary" plain size="mini" @click="printTable">打印
</el-button>
</div>
</div>
<el-card style="height: 100%;width: 900px;">
<br/> <br/>
<div style="width: 100%; margin: auto;" id="postFormContainer">
<br /> <br />
<div id="postFormContainer">
<div style="text-align: center; font-weight: 800; font-size: 35px">
学籍表
</div>
<br/>
<br />
<table border="1px solid black" cellspacing="0" style="width: 860px">
<tr>
<th rowspan="7" class="leftThree">
......@@ -26,15 +28,22 @@
学校
</th>
<td style="height: 40px" colspan="6">东营市第二中学</td>
<td rowspan="4" class="tdStyle"><img :src="baseUrl + studentInfo.avatar " width="130px" height="160px"
style="margin: 0 0 -3px 0;"></td>
<td rowspan="4" class="tdStyle">
<img v-if="studentInfo.avatar" :src="baseUrl + studentInfo.avatar" width="130px" height="160px"
style="margin: 0 0 -3px 0;">
<div v-else
style="width: 130px; height: 160px; border: 1px solid #ddd; display: flex; justify-content: center; align-items: center;"
:src="无照片">
</div>
</td>
</tr>
<tr>
<th>姓名</th>
<td colspan="2" class="tdStyle" width="220px" style="height: 40px">{{ studentInfo.studentName }}</td>
<th width="80px">性别</th>
<td width="100px" class="tdStyle">
<dict-tag :options="dict.type.sys_user_sex" :value="studentInfo.sex"/>
<dict-tag :options="dict.type.sys_user_sex" :value="studentInfo.sex" />
</td>
<th width="80px">民族</th>
<td class="tdStyle">{{ studentInfo.nation }}</td>
......@@ -97,44 +106,44 @@
</tr>
<tr>
<td class="tdStyle" style="height: 40px"><span
v-if="studentParents.length>0 && studentParents[0].parentName">{{ studentParents[0].parentName }}</span>
v-if="studentParents.length > 0 && studentParents[0].parentName">{{ studentParents[0].parentName }}</span>
</td>
<td class="tdStyle"><span v-if="studentParents.length>0 && studentParents[0].relationship ">
<dict-tag :options="dict.type.relationship" :value="studentParents[0].relationship"/>
<td class="tdStyle"><span v-if="studentParents.length > 0 && studentParents[0].relationship">
<dict-tag :options="dict.type.relationship" :value="studentParents[0].relationship" />
</span></td>
<td colspan="2"><span v-if="studentParents.length>0 && studentParents[0].workAddress ">{{
studentParents[0].workAddress
}}</span></td>
<td colspan="2"><span v-if="studentParents.length>0 && studentParents[0].contactAddress "> {{
studentParents[0].contactAddress
}}</span></td>
<td><span v-if="studentParents.length>0 && studentParents[0].telephone ">{{
studentParents[0].telephone
}}</span></td>
<td><span v-if="studentParents.length>0 && studentParents[0].postalCode "> {{
studentParents[0].postalCode
}}</span></td>
<td colspan="2"><span v-if="studentParents.length > 0 && studentParents[0].workAddress">{{
studentParents[0].workAddress
}}</span></td>
<td colspan="2"><span v-if="studentParents.length > 0 && studentParents[0].contactAddress"> {{
studentParents[0].contactAddress
}}</span></td>
<td><span v-if="studentParents.length > 0 && studentParents[0].telephone">{{
studentParents[0].telephone
}}</span></td>
<td><span v-if="studentParents.length > 0 && studentParents[0].postalCode"> {{
studentParents[0].postalCode
}}</span></td>
</tr>
<!-- 第二行-->
<tr>
<td class="tdStyle" style="height: 40px"><span
v-if="studentParents.length>1 && studentParents[1].parentName">{{ studentParents[1].parentName }}</span>
v-if="studentParents.length > 1 && studentParents[1].parentName">{{ studentParents[1].parentName }}</span>
</td>
<td class="tdStyle"><span v-if="studentParents.length>1 && studentParents[1].relationship ">
<dict-tag :options="dict.type.relationship" :value="studentParents[1].relationship"/>
<td class="tdStyle"><span v-if="studentParents.length > 1 && studentParents[1].relationship">
<dict-tag :options="dict.type.relationship" :value="studentParents[1].relationship" />
</span></td>
<td colspan="2"><span v-if="studentParents.length>1 && studentParents[1].workAddress ">{{
studentParents[1].workAddress
}}</span></td>
<td colspan="2"><span v-if="studentParents.length>1 && studentParents[1].contactAddress "> {{
studentParents[1].contactAddress
}}</span></td>
<td><span v-if="studentParents.length>1 && studentParents[1].telephone ">{{
studentParents[1].telephone
}}</span></td>
<td><span v-if="studentParents.length>1 && studentParents[1].postalCode "> {{
studentParents[1].postalCode
}}</span></td>
<td colspan="2"><span v-if="studentParents.length > 1 && studentParents[1].workAddress">{{
studentParents[1].workAddress
}}</span></td>
<td colspan="2"><span v-if="studentParents.length > 1 && studentParents[1].contactAddress"> {{
studentParents[1].contactAddress
}}</span></td>
<td><span v-if="studentParents.length > 1 && studentParents[1].telephone">{{
studentParents[1].telephone
}}</span></td>
<td><span v-if="studentParents.length > 1 && studentParents[1].postalCode"> {{
studentParents[1].postalCode
}}</span></td>
</tr>
<tr>
<th rowspan="7" class="leftThree">
......@@ -151,7 +160,7 @@
<tr>
<th style="height: 40px">政治面貌</th>
<td class="tdStyle" colspan="2">
<dict-tag :options="dict.type.politics_tatus" :value="studentInfo.appearance"/>
<dict-tag :options="dict.type.politics_tatus" :value="studentInfo.appearance" />
</td>
<th>血型</th>
<td class="tdStyle" colspan="4">{{ studentInfo.bloodType }}</td>
......@@ -166,7 +175,7 @@
<tr>
<th style="height: 40px">独生子女</th>
<td class="tdStyle" colspan="2">
<dict-tag :options="dict.type.only_child" :value="studentInfo.onlyChild"/>
<dict-tag :options="dict.type.only_child" :value="studentInfo.onlyChild" />
</td>
<th>流动人口状况</th>
<td class="tdStyle" colspan="4">{{ studentInfo.floatingPopulation }}</td>
......@@ -191,9 +200,9 @@
</template>
<script>
import printJS from "print-js";
import {closeCurrentTab} from "@/utils/utilLibrary/routerBatch/routerBatch.js";
import {getTableInfo} from '@/api/smartSchool/teachAffairAdministration/affairStudentManage'
import printJS from "print-js"
import { closeCurrentTab } from "@/utils/utilLibrary/routerBatch/routerBatch.js";
import { getTableInfo } from '@/api/smartSchool/teachAffairAdministration/affairStudentManage'
export default {
name: 'teachAffairStudentTable',
......@@ -214,7 +223,9 @@ export default {
let id = this.$route?.query?.id
getTableInfo(id).then((res) => {
this.studentInfo = res.data
console.log(this.studentInfo, 'this.studentInfo');
this.studentParents = res.studentParents
console.log(this.studentParents, 'this.studentParents');
})
},
closeCurrentTab,
......
......@@ -910,16 +910,35 @@ export default {
this.formDisabled = false;
},
// 学籍表
// studentTable(row) {
// this.$router.push({
// path: '/teachAffairAdministration/studentTable',
// query: {
// id: row.id,
// // name: row.studentName,
// // idCard: row.idCard,
// // schoolNo: row.schoolNo
// }
// })
// },
studentTable(row) {
this.$router.push({
path: '/teachAffairAdministration/studentTable',
query: {
id: row.id,
// name: row.studentName,
// idCard: row.idCard,
// schoolNo: row.schoolNo
console.log('准备跳转');
const baseUrl = window.location.origin; // 获取当前页面的协议、主机作为前缀URL
// const baseUrl = window.location.protocol + '//' + window.location.host; // 获取当前页面的协议、主机作为前缀URL
console.log('im_1_0', baseUrl);
// const url = `http://localhost:1024/studentRegistra?id=${row.id}&name=${row.studentName}&idCard=${row.idCard}&schoolNo=${row.schoolNo}`;
const newURL = `${baseUrl}/studentTable?id=${encodeURIComponent(row.id)}&name=${encodeURIComponent(row.studentName)}&idCard=${encodeURIComponent(row.idCard)}&schoolNo=${encodeURIComponent(row.schoolNo)}`;
dd.biz.util.openLink({
url: newURL,
// url: url,
onSuccess: () => {
console.log(newURL, 'newURL');
console.log('跳转成功,准备打印');
},
onFail: (err) => {
console.log('跳转失败', err);
}
})
});
},
// 学籍证明
// studentProve(row) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment