Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

436 righe
14 KiB

  1. <template>
  2. <view class="welcome">
  3. <view class="welT">基本信息</view>
  4. <view class="welBox">
  5. <!-- <input type="hidden" name="ID" value="" id="ID" /> -->
  6. <l-input title="学号" placeholder="请填写" :value="StuInfoFreshEntity.StuNo" disabled right />
  7. <l-input title="准考证号" placeholder="请填写" :value="StuInfoFreshEntity.zkzh" disabled right />
  8. <l-input title="考生号" placeholder="请填写" :value="StuInfoFreshEntity.ksh" disabled right />
  9. <l-input title="姓名" placeholder="请填写" :value="StuInfoFreshEntity.StuName" disabled right />
  10. <l-input title="性别" placeholder="请填写" :value="displayListItem(StuInfoFreshEntity, 'GenderNo')" disabled
  11. right />
  12. <l-input title="系别" placeholder="请填写" :value="StuInfoFreshEntity.DeptNo" disabled right />
  13. <l-input title="专业" placeholder="请填写" :value="StuInfoFreshEntity.MajorNo" disabled right />
  14. <l-input title="班级" placeholder="请填写" :value="StuInfoFreshEntity.ClassNo" disabled right />
  15. <l-input title="身份证号" placeholder="请填写" :value="StuInfoFreshEntity.IdentityCardNo" disabled right />
  16. <l-input title="出生日期" placeholder="请填写" :value="StuInfoFreshEntity.Birthday" disabled right />
  17. <l-input title="户口类别" placeholder="请填写" :value="StuInfoFreshEntity.ResidenceNo" disabled right />
  18. <l-input title="政治面貌" placeholder="请填写" :value="displayListItem(StuInfoFreshEntity, 'PartyFaceNo')" disabled
  19. right />
  20. </view>
  21. <!-- {{ StuInfoFreshEntity.GenderNo }} -->
  22. <!-- <view class="welLine"></view> -->
  23. <view class="welT" style="padding-top: 10px;">采集照片信息</view>
  24. <l-upload v-if="uploadVisiable" ref="upload" :number="1" :size="100" type="image/jpeg,image/jpg"
  25. :value.sync="photo" />
  26. <view class="passwordDes">
  27. <text>照片要求:1 . 单色背景,正面,免冠近期证件照 2 . 文件格式JPG 3 . 文件大小165320KB以下</text>
  28. </view>
  29. <view class="welLine"></view>
  30. <view class="welT" style="padding-top: 10px;">自然信息</view>
  31. <view class="welLine"></view>
  32. <view class="welBox">
  33. <l-input v-model="queryData.RegionNo" title="籍贯" placeholder="请填写" right />
  34. </view>
  35. <view class="welT" style="padding-top: 10px;">通讯信息</view>
  36. <view class="welLine"></view>
  37. <view class="welBox">
  38. <l-input v-model="queryData.FamilyAddress" title="家庭住址" placeholder="请填写" right />
  39. <l-input v-model="queryData.telephone" title="联系电话" placeholder="请填写" right />
  40. </view>
  41. <view class="welT" style="padding-top: 10px;">
  42. 家庭成员(直系家属)
  43. <text class="text-xxl cuIcon cuIcon-add" @click="add('StuInfoFreshFamilyEntities')"></text>
  44. </view>
  45. <view class="welBox" id="StuInfoFreshFamily" v-show="queryData.StuInfoFreshFamilyEntities.length != 0">
  46. <view class="welCon" v-for="(item, i) in queryData.StuInfoFreshFamilyEntities" :key='i'>
  47. <l-input v-model="item.Name" title="姓名" placeholder="请填写" right />
  48. <!-- <l-input v-model="item.Relation" title="" placeholder="请填写" right /> -->
  49. <l-select v-model="item.Relation" :range="dataSource.FamilyRelation" title="与本人关系" placeholder="请选择" />
  50. <l-select v-model="item.Sex" :range="dataSource.GenderNo" title="性别" placeholder="请选择" />
  51. <l-input v-model="item.Age" title="年龄" placeholder="请填写" right />
  52. <!-- <l-input v-model="item.Politicy" title="政治面貌" placeholder="请填写" right /> -->
  53. <l-select v-model="item.Politicy" :range="dataSource.PartyFaceNo" title="政治面貌" placeholder="请选择" />
  54. <view class="welDel" @click="del('StuInfoFreshFamilyEntities', i)"><text
  55. class="text-xxl cuIcon cuIcon-move"></text></view>
  56. </view>
  57. </view>
  58. <view class="welT" style="padding-top: 10px;">
  59. 紧急联系人
  60. <text class="text-xxl cuIcon cuIcon-add" @click="add('StuInfoFreshEmergePeopleEntities')"></text>
  61. </view>
  62. <view class="welBox" id="StuInfoFreshEmergePeople"
  63. v-show="queryData.StuInfoFreshEmergePeopleEntities.length != 0">
  64. <view class="welCon" v-for="(item, i) in queryData.StuInfoFreshEmergePeopleEntities" :key='i'>
  65. <l-input v-model="item.Name" title="姓名" placeholder="请填写" right />
  66. <l-input v-model="item.Relation" title="与本人关系" placeholder="请填写" right />
  67. <l-input v-model="item.Telephone" title="手机号码" placeholder="请填写" right />
  68. <l-input v-model="item.Mobile" title="座机号码" placeholder="请填写" right />
  69. <l-input v-model="item.Address" title="联系地址" placeholder="请填写" right />
  70. <view class="welDel" @click="del('StuInfoFreshEmergePeopleEntities', i)"><text
  71. class="text-xxl cuIcon cuIcon-move"></text></view>
  72. </view>
  73. </view>
  74. <view class="welLine"></view>
  75. <view class="welBox">
  76. <l-select v-model="StuInfoFreshEntity.IsPoor" :range="dataSource.YesOrNoInt" title="是否精准贫困户" placeholder="请选择" />
  77. <l-select v-model="StuInfoFreshEntity.GetKeyStatus" :range="dataSource.YesOrNoInt" title="钥匙发放" placeholder="请选择" />
  78. <l-select v-model="StuInfoFreshEntity.GetCardStatus" :range="dataSource.YesOrNoInt" title="校园卡发放" placeholder="请选择" />
  79. <l-select v-model="StuInfoFreshEntity.OtherPayFeeStatus" :range="dataSource.YesOrNoInt" title="其他费用收取" placeholder="请选择" />
  80. <l-select v-model="StuInfoFreshEntity.CollectFileStatus" :range="dataSource.YesOrNoInt" title="档案收取" placeholder="请选择" />
  81. </view>
  82. <view class="btn" @click="tapBtn">报到</view>
  83. </view>
  84. </template>
  85. <script>
  86. import moment from 'moment';
  87. import get from 'lodash/get';
  88. import set from 'lodash/set';
  89. import todayTime from '@/common/js/todayTime.js';
  90. import uploadFile from '@/components/upload-file.vue'
  91. export default {
  92. components: {
  93. uploadFile,
  94. },
  95. data() {
  96. return {
  97. photo: [],
  98. uploadVisiable: false,
  99. pageInfo: '',
  100. imgSrc: '',
  101. scheme: {
  102. PartyFaceNo: {
  103. type: 'sourceData',
  104. dataSource: '1',
  105. dataSourceId: 'BCdPartyFace,partyface,partyfaceno'
  106. },
  107. GenderNo: {
  108. type: 'dataItem',
  109. dataType: 'dataDictionary'
  110. }
  111. },
  112. userInfo: {},
  113. dataSource: {
  114. GenderNo: Object.values(this.GET_GLOBAL('dataDictionary').usersex).map(t => ({
  115. value: t.value,
  116. text: t.text
  117. })),
  118. YesOrNoInt: Object.values(this.GET_GLOBAL('dataDictionary').YesOrNoInt).map(t => ({
  119. value: t.value,
  120. text: t.text
  121. })),
  122. FamilyRelation: Object.values(this.GET_GLOBAL('dataDictionary').FamilyRelation).map(t => ({
  123. value: t.value,
  124. text: t.text
  125. })),
  126. PartyFaceNo: []
  127. },
  128. StuInfoFreshFamilyEntities: {
  129. Name: '',
  130. Age: '',
  131. Sex: '1',
  132. Politicy: '01',
  133. Relation: '01'
  134. },
  135. StuInfoFreshEmergePeopleEntities: {
  136. Name: '',
  137. Relation: '',
  138. Telephone: '',
  139. Mobile: '',
  140. Address: ''
  141. },
  142. ID: '',
  143. queryData: {
  144. RegisterStatus: '1',
  145. ArriveDate: '',
  146. RegionNo: '',
  147. FamilyAddress: '',
  148. telephone: '',
  149. Photo: '',
  150. StuInfoFreshFamilyEntities: [],
  151. StuInfoFreshEmergePeopleEntities: []
  152. },
  153. StuInfoFreshEntity: {
  154. }
  155. };
  156. },
  157. methods: {
  158. async init() {
  159. // console.log(this.API)
  160. let _this = this;
  161. Promise.all([
  162. this.FETCH_DATASOURCE('BCdPartyFace').then(data => {
  163. // console.log(data)
  164. this.dataSource.PartyFaceNo = data.data.map(t => ({
  165. text: t.partyface,
  166. value: t.partyfaceno
  167. }));
  168. }),
  169. () => {}
  170. ]);
  171. _this.LOADING('加载数据…');
  172. _this.pageInfo = _this.GET_PARAM(); //获取页面传递参数
  173. _this.HTTP_GET('StuInfoFresh/stuInfoFreshEntity', _this.pageInfo.StuNo, '加载数据时出错').then(async res => {
  174. this.HIDE_LOADING();
  175. if (res.StuInfoFreshEntity.RegisterStatus&&res.StuInfoFreshEntity.RegisterStatus==1) {
  176. this.TOAST('该学生已经报过到了。');
  177. // setTimeout(() => {
  178. // this.NAV_BACK()
  179. // }, 1000)
  180. // return;
  181. }
  182. _this.StuInfoFreshEntity = _this.COPY(res.StuInfoFreshEntity);
  183. _this.queryData.StuInfoFreshFamilyEntities = _this.COPY(res.StuInfoFreshFamilyList);
  184. _this.queryData.StuInfoFreshEmergePeopleEntities = _this.COPY(res
  185. .StuInfoFreshEmergePeopleList);
  186. _this.ID = res.StuInfoFreshEntity.ID;
  187. _this.queryData.Photo = res.StuInfoFreshEntity.Photo;
  188. let resFile = await this.FETCH_FILEINFO(res.StuInfoFreshEntity.Photo)
  189. let url = ""
  190. if (resFile && resFile.F_FolderId) {
  191. url = this.API + '/learun/adms/annexes/wxdown?' + this.URL_QUERY(resFile
  192. .F_FolderId, true)
  193. }
  194. _this.photo = (res.StuInfoFreshEntity.Photo && url) ? [{
  195. url,
  196. id: res.StuInfoFreshEntity.Photo
  197. }] : [];
  198. _this.refreshComponent()
  199. _this.queryData.telephone = res.StuInfoFreshEntity.telephone;
  200. _this.queryData.FamilyAddress = res.StuInfoFreshEntity.FamilyAddress;
  201. _this.queryData.RegionNo = res.StuInfoFreshEntity.RegionNo;
  202. });
  203. },
  204. async tapBtn() {
  205. var postqueryData = {};
  206. postqueryData.ArriveDate = todayTime.fmtDate().ymdhMins;
  207. postqueryData.RegisterStatus = '1';
  208. postqueryData.IsPoor =this.StuInfoFreshEntity.IsPoor;
  209. postqueryData.GetKeyStatus =this.StuInfoFreshEntity.GetKeyStatus;
  210. postqueryData.GetCardStatus =this.StuInfoFreshEntity.GetCardStatus;
  211. postqueryData.OtherPayFeeStatus =this.StuInfoFreshEntity.OtherPayFeeStatus;
  212. postqueryData.CollectFileStatus =this.StuInfoFreshEntity.CollectFileStatus;
  213. let _postData = {
  214. keyValue: this.ID,
  215. strEntity: JSON.stringify(postqueryData)
  216. }
  217. this.LOADING('正在提交数据…');
  218. this.HTTP_POST('StuInfoFresh/save', _postData, '加载数据时出错').then(res => {
  219. this.HIDE_LOADING();
  220. if (res) {
  221. this.TOAST('报到成功');
  222. setTimeout(() => {
  223. this.NAV_BACK()
  224. }, 1000)
  225. }
  226. });
  227. },
  228. add(str) {
  229. let jsons = this.COPY(this[str]);
  230. this.queryData[str].push(jsons)
  231. // console.log(this.queryData[str])
  232. },
  233. del(str, num) {
  234. this.queryData[str].splice(num, 1)
  235. },
  236. refreshComponent() {
  237. // this.uploadVisiable = false
  238. this.$nextTick(() => {
  239. this.uploadVisiable = true
  240. })
  241. },
  242. // 显示列表中的标题项
  243. displayListItem(item, field) {
  244. const fieldItem = this.scheme[field];
  245. const value = item[field];
  246. // console.log(Object.values(this.GET_GLOBAL('dataDictionary').usersex));
  247. switch (fieldItem.type) {
  248. case 'currentInfo':
  249. case 'organize':
  250. return fieldItem.dataType === 'time' ? value : get(this.GET_GLOBAL(fieldItem.dataType),
  251. `${value}.name`, '');
  252. case 'dataItem':
  253. const sex = this.dataSource[field].find(t => t.value === String(value));
  254. return get(sex, 'text', '');
  255. case 'sourceData':
  256. const BCdPartyFace = this.dataSource[field].find(t => t.value === String(value));
  257. return get(BCdPartyFace, 'text', '');
  258. case 'radio':
  259. case 'select':
  260. const selectItem = this.dataSource[field].find(t => t.value === String(value));
  261. return get(selectItem, 'text', '');
  262. case 'checkbox':
  263. if (!value || value.split(',').length <= 0) {
  264. return '';
  265. }
  266. const checkboxItems = value.split(',');
  267. return this.dataSource[field]
  268. .filter(t => checkboxItems.includes(t.value))
  269. .map(t => t.text)
  270. .join(',');
  271. case 'datetime':
  272. if (!value) {
  273. return '';
  274. }
  275. return moment(value).format(Number(fieldItem.dateformat) === 0 ? 'YYYY年 M月 D日' :
  276. 'YYYY-MM-DD HH:mm');
  277. default:
  278. return value === null || value === undefined ? '' : value;
  279. }
  280. }
  281. },
  282. created() {
  283. this.userInfo = this.GET_GLOBAL('loginUser'); //获取登录信息
  284. this.init();
  285. }
  286. };
  287. </script>
  288. <style lang="less" scoped>
  289. /deep/ .cu-form-group {
  290. min-height: 40px;
  291. }
  292. .welcome {
  293. padding: 1px 0px 20px;
  294. background: #fff;
  295. }
  296. .welT {
  297. font-size: 16px;
  298. margin-bottom: 10px;
  299. line-height: 26px;
  300. padding: 0 12px;
  301. }
  302. .welT text {
  303. width: 26px;
  304. height: 26px;
  305. line-height: 24px;
  306. border: 1px solid #efefef;
  307. border-radius: 4px;
  308. float: right;
  309. text-align: center;
  310. color: #999;
  311. }
  312. .welLine {
  313. height: 1px;
  314. background: #efefef;
  315. // margin: 10px -12px;
  316. }
  317. .welInput {
  318. overflow: hidden;
  319. font-size: 14px;
  320. margin-top: 10px;
  321. }
  322. .welInput span {
  323. float: left;
  324. width: 26%;
  325. text-align: right;
  326. line-height: 30px;
  327. }
  328. .welInput input {
  329. display: block;
  330. margin-left: 28%;
  331. width: 72%;
  332. border: 1px solid #efefef;
  333. border-radius: 4px;
  334. height: 30px;
  335. line-height: 28px;
  336. padding: 0 10px;
  337. margin-bottom: 0;
  338. }
  339. .welCon {
  340. padding: 10px;
  341. border: 1px solid #efefef;
  342. margin-top: 18px;
  343. border-radius: 4px;
  344. position: relative;
  345. }
  346. .welDel {
  347. position: absolute;
  348. top: -8px;
  349. left: -8px;
  350. background: #fff;
  351. }
  352. .welDel text {
  353. text-align: center;
  354. width: 26px;
  355. height: 26px;
  356. display: block;
  357. line-height: 24px;
  358. border: 1px solid #efefef;
  359. border-radius: 50%;
  360. }
  361. .welImgAdd {
  362. text-align: center;
  363. line-height: 0;
  364. }
  365. #files {
  366. opacity: 0;
  367. -webkit-opacity: 0;
  368. z-index: 9;
  369. display: none;
  370. }
  371. #welImgBtn {
  372. display: block;
  373. width: 110px;
  374. height: 30px;
  375. text-align: center;
  376. line-height: 26px;
  377. border: 2px solid #efefef;
  378. border-radius: 4px;
  379. font-size: 14px;
  380. color: #999;
  381. margin: 10px auto;
  382. cursor: pointer;
  383. }
  384. .welImgAdd {
  385. min-height: 110px;
  386. }
  387. #PhotoImg {
  388. width: 110px;
  389. height: 110px;
  390. }
  391. .btnBox {
  392. margin-top: 20px;
  393. text-align: center;
  394. }
  395. #saveBtn {
  396. margin: auto;
  397. margin-top: 25px;
  398. width: 92%;
  399. }
  400. #StuInfoFreshFamily,
  401. #StuInfoFreshEmergePeople {
  402. padding: 0 15px;
  403. }
  404. </style>