华西海圻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.

261 lines
8.3 KiB

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