华西海圻ELN前端工程
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

257 lines
8.8 KiB

  1. <template>
  2. <div>
  3. <div class="edit-container" v-if="open">
  4. <div class="edit-top">
  5. <div class="left-top">
  6. <img src="@/assets/images/back.png" @click="cancel()" />
  7. <div class="left-title"></div>
  8. </div>
  9. <div class="center-top">
  10. </div>
  11. <div class="right-top">
  12. <el-button @click="cancel()">{{ $t('form.close') }}</el-button>
  13. <el-button type="primary" v-if="form.bdzt === 5 && form.tbzt === 1" @click="openApprove = true">{{
  14. $t('page.business.study.studyFormApply.tb') }}</el-button>
  15. </div>
  16. </div>
  17. <div class="edit-content ">
  18. <div class="content">
  19. <div>
  20. <!-- 1:流程3编辑5人员7修改9补充说明 -->
  21. <el-button type="primary" @click="exportExcel(-1)">{{ $t('page.business.study.studyFormApply.dcqbjcgj') }}
  22. </el-button>
  23. <el-button type="primary" @click="exportExcel(1)">{{ $t('page.business.study.studyFormApply.dclcjcgj') }}
  24. </el-button>
  25. <el-button type="primary" @click="exportExcel(3)">{{ $t('page.business.study.studyFormApply.dcbjjcgj') }}
  26. </el-button>
  27. <el-button type="primary" @click="exportExcel(7)">{{ $t('page.business.study.studyFormApply.dcxgjcgj') }}
  28. </el-button>
  29. <el-button type="primary" @click="exportExcel(999)">{{ $t('page.business.study.studyFormApply.dcbhsjgj') }}
  30. </el-button>
  31. </div>
  32. <TemplateTable ref="templateTable" :sn="form.templateSn" :templateData="form" fillType="audit" />
  33. <div class="content-title">
  34. <div class="line"></div>
  35. <div class="subtitle"> {{ $t('page.business.study.studyFormApply.qmxx') }}</div>
  36. </div>
  37. <div class="pal">
  38. <el-table :data="qmxxList" v-loading="loadingQmxx">
  39. <el-table-column :label="$t('page.business.study.studyFormApply.qmr')" align="center" prop="qmrMc"
  40. width="150px" />
  41. <el-table-column :label="$t('page.business.study.studyFormApply.qmyy')" align="center"
  42. :prop="$i18n.locale === 'zh_CN' ? 'qmyy' : 'qmyyEn'" width="150px" />
  43. <el-table-column :label="$t('page.business.study.studyFormApply.qmsj')" align="center" prop="createTime"
  44. width="150px" />
  45. <el-table-column :label="$t('page.business.study.studyFormApply.bzyy')" align="center" prop="remark"
  46. :show-overflow-tooltip="true" />
  47. </el-table>
  48. </div>
  49. <div class="pal">
  50. <pagination v-show="totalQmxx > 0" :total="totalQmxx" :page.sync="queryParamsQmxx.pageNum"
  51. :limit.sync="queryParamsQmxx.pageSize" @pagination="getQmxxList" />
  52. </div>
  53. <div class="content-title">
  54. <div class="line"></div>
  55. <div class="subtitle"> {{ $t('page.business.study.studyFormApply.jcgj') }}</div>
  56. </div>
  57. <JcgjList ref="jcgjList" @handleQuery="getJjcgjList" :showXg="true" />
  58. <pagination v-show="jcgjTotal > 0" small layout="prev, pager, next" :total="jcgjTotal"
  59. @pagination="getJjcgjList" />
  60. </div>
  61. </div>
  62. </div>
  63. <!-- 填报 -->
  64. <el-dialog :title="$t('page.business.study.studyFormApply.cjjl')" :visible.sync="openApprove" width="500px"
  65. append-to-body :close-on-click-modal="false">
  66. <el-form ref="formApprove" :model="formApprove" :rules="rulesApprove" label-width="120px" v-if="openApprove">
  67. <el-alert :title="$t('page.business.study.studyFormApply.ts')" :closable="false" type="success">
  68. </el-alert>
  69. <el-row>
  70. <el-col :span="24">
  71. <el-form-item :label="$t('form.qmyy')" prop="qmyy">
  72. <el-input type="text" :value="formApprove.qmyy" maxlength="50" disabled
  73. :placeholder="$t('form.placeholderInput')" />
  74. </el-form-item>
  75. </el-col>
  76. </el-row>
  77. <el-row>
  78. <el-col :span="24">
  79. <el-form-item :label="$t('form.remark')" prop="remark">
  80. <el-input type="textarea" v-model="formApprove.remark" :rows="5" maxlength="500"
  81. :placeholder="$t('form.placeholderInput')">
  82. </el-input>
  83. </el-form-item>
  84. </el-col>
  85. </el-row>
  86. <el-row>
  87. <el-col :span="24">
  88. <el-form-item :label="$t('form.signer')">
  89. <el-input type="text" v-model="nickName" maxlength="50" disabled
  90. :placeholder="$t('form.placeholderInput')" />
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <el-row>
  95. <el-col :span="24">
  96. <el-form-item :label="$t('form.password')" prop="qmrmm">
  97. <el-input type="password" show-password v-model="formApprove.qmrmm" maxlength="20"
  98. :placeholder="$t('form.placeholderInput')" />
  99. </el-form-item>
  100. </el-col>
  101. </el-row>
  102. </el-form>
  103. <div slot="footer" class="dialog-footer">
  104. <el-button type="primary" @click="approve">{{ $t('form.confirm') }}</el-button>
  105. <el-button @click="openApprove = false">{{ $t('form.cancel') }}</el-button>
  106. </div>
  107. </el-dialog>
  108. </div>
  109. </template>
  110. <script>
  111. import { studyFormApply_tb, studyFormApply_info, studyFormApply_jcgj, studyFormApply_qmxx, studyFormApply_exportDetail } from "@/api/business/study/studyFormApply"
  112. import { mapGetters } from 'vuex'
  113. import JcgjList from "@/views/business/comps/common/JcgjList";
  114. import TemplateTable from '@/views/business/comps/template/TemplateTable';
  115. export default {
  116. name: "Xq",
  117. components: { JcgjList, TemplateTable },
  118. data() {
  119. return {
  120. openApprove: false,
  121. open: false,
  122. formApprove: {
  123. id: null,
  124. qmyy: this.$t('page.business.study.studyFormApply.cjjl'),
  125. remark: '',
  126. qmrmm: '',
  127. },
  128. rulesApprove: {
  129. qmrmm: [{
  130. required: true,
  131. message: ' ',
  132. trigger: 'blur'
  133. }]
  134. },
  135. qmxxList: [],
  136. totalQmxx: 0,
  137. loadingQmxx: true,
  138. queryParamsQmxx: {
  139. formId: null,
  140. pageNum: 1,
  141. pageSize: 9999
  142. },
  143. open: false,
  144. showIndex: 1,
  145. form: {},
  146. rules: {
  147. bdmc: [{
  148. required: true,
  149. message: ' ',
  150. trigger: 'blur'
  151. }],
  152. templateId: [{
  153. required: true,
  154. message: ' ',
  155. trigger: 'blur'
  156. }]
  157. },
  158. jcgjTotal: 0,
  159. jcgjList: [],
  160. queryParamsJcgj: {
  161. pageNum: 1,
  162. formId: null,
  163. pageSize: 9999,
  164. }
  165. }
  166. },
  167. computed: {
  168. ...mapGetters([
  169. 'nickName', 'name'
  170. ]),
  171. },
  172. created() {
  173. },
  174. methods: {
  175. exportExcel(jcgjlx) {
  176. this.$modal.loading()
  177. studyFormApply_exportDetail(_.merge({}, this.queryParamsJcgj, { jcgjlx: jcgjlx, lang: this.$store.getters.language.split("_")[0] })).then(response => {
  178. window.open(process.env.VUE_APP_FILE_DOMAIN + response.msg)
  179. this.$modal.closeLoading()
  180. }).finally(() => {
  181. this.$modal.closeLoading()
  182. })
  183. },
  184. getJjcgjList(val) {
  185. this.$modal.loading()
  186. studyFormApply_jcgj(_.merge({}, this.queryParamsJcgj, val)).then(response => {
  187. this.jcgjList = response.rows
  188. this.jcgjTotal = response.total
  189. this.$refs.jcgjList.init(this.jcgjList)
  190. this.$modal.closeLoading()
  191. }).finally(() => {
  192. this.$modal.closeLoading()
  193. })
  194. },
  195. getQmxxList() {
  196. this.loadingQmxx = true
  197. studyFormApply_qmxx(this.queryParamsQmxx).then(response => {
  198. this.qmxxList = response.rows
  199. this.totalQmxx = response.total
  200. this.loadingQmxx = false
  201. })
  202. },
  203. cancel() {
  204. this.$emit('close')
  205. this.open = false
  206. },
  207. reset() {
  208. this.form = {
  209. id: null,
  210. studyId: null,
  211. bdbh: null,
  212. bdmc: null,
  213. bdsm: null,
  214. templateId: null,
  215. templateMc: null,
  216. bdnr: null
  217. }
  218. this.resetForm("form")
  219. },
  220. show(row) {
  221. this.reset()
  222. this.$modal.loading()
  223. this.formApprove.id = row.id
  224. this.queryParamsJcgj.formId = row.id
  225. this.queryParamsQmxx.formId = row.id
  226. studyFormApply_info({ id: row.id }).then(response => {
  227. this.form = response.data
  228. this.getQmxxList()
  229. this.getJjcgjList()
  230. this.open = true
  231. }).finally(() => {
  232. this.$modal.closeLoading()
  233. })
  234. },
  235. approve() {
  236. this.$refs["formApprove"].validate(valid => {
  237. if (valid) {
  238. this.$modal.loading()
  239. studyFormApply_tb(this.formApprove).then(response => {
  240. this.openApprove = false
  241. this.$emit('close')
  242. this.open = false
  243. }).finally(() => {
  244. this.$modal.closeLoading()
  245. })
  246. }
  247. })
  248. }
  249. }
  250. }
  251. </script>