dialog.approve.letter.detail.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <template>
  2. <DialogCom
  3. :title="title"
  4. @close="onHide"
  5. :visible.sync="isShow"
  6. width="1000px"
  7. >
  8. <div class="page-body">
  9. <el-form
  10. ref="form"
  11. :model="formData"
  12. label-width="120px"
  13. label-suffix=":">
  14. <el-row>
  15. <el-col :span="24">
  16. <el-form-item label="介绍信类型">
  17. <dict-tag :options="dict.type.out_in_type" :value="formData.type"/>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :span="12">
  21. <el-form-item label="介绍信编号">
  22. {{formData.letterNo}}
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="12">
  26. <el-form-item label="接待机构" prop="receptionOrgIds">
  27. {{formData.receptionOrgNames}}
  28. <!-- <org-tree-select v-model="formData.receptionOrgIds" ref="orgTreeSelect">
  29. </org-tree-select> -->
  30. </el-form-item>
  31. </el-col>
  32. <el-col :span="24">
  33. <el-form-item label="来访事由">
  34. {{formData.reasons}}
  35. </el-form-item>
  36. </el-col>
  37. <el-col :span="12">
  38. <el-form-item label="开具日期">
  39. {{formData.startTimeStr}}
  40. </el-form-item>
  41. </el-col>
  42. <el-col :span="12">
  43. <el-form-item label="有效天数">
  44. {{ formData.effectiveDays}}
  45. </el-form-item>
  46. </el-col>
  47. <el-col :span="12">
  48. <!-- <el-form-item label="介绍信" prop="letterNo">
  49. </el-form-item> -->
  50. <el-form-item label="介绍信附件">
  51. <K-file-upload ref="upload" :isShowUploadBtn="false"
  52. :defaultValue="formFileListDefualtValue"
  53. v-model="formData.letterFile"/>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item label="备注" prop="letterNo">
  58. {{formData.description}}
  59. </el-form-item>
  60. </el-col>
  61. </el-row>
  62. <el-row :gutter="10">
  63. <el-col :span="12">
  64. <h3>
  65. <i class="el-icon-collection-tag"></i>
  66. 人员信息
  67. </h3>
  68. </el-col>
  69. </el-row>
  70. <el-table border :data="formData.userInfos" height="300">
  71. <el-table-column label="序号" align="center" type="index" width="70" />
  72. <el-table-column label="来访单位" width="100" align="center" prop="companyName" />
  73. <el-table-column label="来访人员" width="100" align="center" prop="userName" />
  74. <el-table-column label="证件类型" width="100" align="center" prop="idType">
  75. <template slot-scope="scope">
  76. <dict-tag :options="dict.type.letter_id_type" :value="scope.row.idType"/>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="证件号码" width="200" align="center" prop="idCard">
  80. </el-table-column>
  81. <el-table-column label="证件图片" align="center" prop="imgFile">
  82. <template slot-scope="scope">
  83. <ImageListPreview v-model="scope.row.imgFile"></ImageListPreview>
  84. </template>
  85. </el-table-column>
  86. </el-table>
  87. <el-row :gutter="10">
  88. <el-col :span="12">
  89. <h3>
  90. <i class="el-icon-collection-tag"></i>
  91. 审批信息
  92. </h3>
  93. </el-col>
  94. </el-row>
  95. <el-row>
  96. <el-col :span="12">
  97. <el-form-item label="审批状态">
  98. <dict-tag :options="dict.type.out_in_approve_status" :value="formData.approveLog.approveStatus"/>
  99. <!-- <el-radio v-model="formData.approveStatus" label="1">同意</el-radio>
  100. <el-radio v-model="formData.approveStatus" label="2">不同意</el-radio> -->
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="12">
  104. <el-form-item label="审批说明">
  105. {{formData.approveLog.approveRemark}}
  106. </el-form-item>
  107. </el-col>
  108. <el-col :span="12">
  109. <el-form-item label="审批时间">
  110. {{formData.approveLog.approveTime}}
  111. </el-form-item>
  112. </el-col>
  113. </el-row>
  114. </el-form>
  115. </div>
  116. <div slot="footer" class="dialog-footer">
  117. <!-- <el-button type="primary" @click="submitForm">确 定</el-button> -->
  118. <el-button @click="onHide">关 闭</el-button>
  119. </div>
  120. </DialogCom>
  121. </template>
  122. <script>
  123. import { mapState, mapMutations } from "vuex";
  124. import {
  125. getLetter,
  126. approveLetter,
  127. } from "@/api/core/letter";
  128. import KFileUpload from "@/components/K-FileUpload/index.vue";
  129. import dayjs from "dayjs";
  130. import imgUpload from "@/components/ImageUpload";
  131. import DataRangePicker from "@/components/dateTime/daterange.picker.vue";
  132. export default {
  133. components: { KFileUpload, imgUpload,DataRangePicker },
  134. data() {
  135. const params = this.$route.params;
  136. return {
  137. id: params ? params.id : null,
  138. isShow: false,
  139. title: "来访事项审批详情",
  140. formData: this.reset(),
  141. formFileListDefualtValue: [],
  142. };
  143. },
  144. dicts: ['out_in_type','out_in_approve_status','letter_id_type'],
  145. props: {},
  146. watch: {},
  147. created() {},
  148. computed: {
  149. ...mapState(["loginUser", "org"]),
  150. },
  151. methods: {
  152. ...mapMutations([]),
  153. reset(other = {}) {
  154. return {
  155. reasons: null,
  156. letterNo:null,
  157. receptionOrgIds: [],
  158. range:[],
  159. description: null,
  160. letterFile: [],
  161. userInfos: [],
  162. type:null,
  163. approveLog:{
  164. approveStatus:null,
  165. approveRemark:null
  166. },
  167. ...other,
  168. };
  169. },
  170. async show(id) {
  171. this.title = "来访事项审批详情";
  172. this.isShow = true;
  173. getLetter(id).then((response) => {
  174. this.formData = response.data;
  175. this.formFileListDefualtValue=this.formData.letterFile;
  176. });
  177. },
  178. onHide() {
  179. this.isShow = false;
  180. this.formData = this.reset();
  181. // this.$refs["upload"].clearFiles();
  182. },
  183. },
  184. mounted() {},
  185. };
  186. </script>