index.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :getList="getList"
  5. :exportList="exportList"
  6. :columnParsing="columnParsing"
  7. :optionsEvensGroup="optionsEvensGroup"
  8. :tableAttributes="tableAttributes"
  9. :tableEvents="tableEvents"
  10. :operation="operation()"
  11. >
  12. <div class="cartographer_big">
  13. <el-dialog title="签约信息" width="100%" :modal="false" :visible.sync="formBool" :before-close="handleClose">
  14. <zj-page-container v-if="formBool">
  15. <zj-page-fill class="neibuview">
  16. <zj-form-container
  17. ref="formRef"
  18. :form-data="formData"
  19. :form-rules="formRules"
  20. :form-attributes="{ size: 'mini' }"
  21. >
  22. <zj-form-module title="基础信息" label-width="110px" :form-data="formData" :form-items="items" />
  23. <zj-form-module title="附件信息" label-width="110px" :form-data="formData" :form-items="items2" />
  24. </zj-form-container>
  25. </zj-page-fill>
  26. </zj-page-container>
  27. </el-dialog>
  28. </div>
  29. </template-page>
  30. </template>
  31. <script>
  32. import TemplatePage from '@/components/template/template-page-1.vue'
  33. import import_mixin from '@/components/template/import_mixin.js'
  34. import {
  35. websitContractSignList,
  36. websitContractSignListExport,
  37. websitContractSignCancel,
  38. websitContractSignSign,
  39. websitContractSignDetail
  40. } from '@/api/networkContractSigning'
  41. import { commonTemplateDownload } from '@/api/common.js'
  42. import { required, requiredValueMin } from '@/components/template/rules_verify.js'
  43. import operation_mixin from '@/components/template/operation_mixin.js'
  44. export default {
  45. components: { TemplatePage },
  46. mixins: [import_mixin, operation_mixin],
  47. data() {
  48. return {
  49. // 表格属性
  50. tableAttributes: {
  51. selectColumn: false
  52. },
  53. // 表格事件
  54. tableEvents: {
  55. 'selection-change': this.selectionChange
  56. },
  57. recordSelected: [],
  58. formBool: false,
  59. formType: 0,
  60. formData: {},
  61. formRules: {}
  62. }
  63. },
  64. computed: {
  65. optionsEvensGroup() {
  66. return []
  67. },
  68. items() {
  69. return [
  70. {
  71. name: 'el-input',
  72. md: 12,
  73. attributes: {
  74. disabled: true,
  75. placeholder: '请输入'
  76. },
  77. formItemAttributes: {
  78. label: '上级网点编号',
  79. prop: 'parentId'
  80. }
  81. },
  82. {
  83. name: 'el-input',
  84. md: 12,
  85. attributes: {
  86. disabled: true,
  87. placeholder: '请输入'
  88. },
  89. formItemAttributes: {
  90. label: '上级网点名称',
  91. prop: 'parentName'
  92. }
  93. },
  94. {
  95. name: 'el-input',
  96. md: 12,
  97. attributes: {
  98. disabled: true,
  99. placeholder: '请输入'
  100. },
  101. formItemAttributes: {
  102. label: '网点编号',
  103. prop: 'websitId'
  104. }
  105. },
  106. {
  107. name: 'el-input',
  108. md: 12,
  109. attributes: {
  110. disabled: true,
  111. placeholder: '请输入'
  112. },
  113. formItemAttributes: {
  114. label: '网点名称',
  115. prop: 'websitName'
  116. }
  117. },
  118. {
  119. name: 'el-input',
  120. md: 6,
  121. attributes: {
  122. disabled: true,
  123. placeholder: '请输入'
  124. },
  125. formItemAttributes: {
  126. label: '法大大法人id',
  127. prop: 'fadadaCustomerId'
  128. }
  129. },
  130. {
  131. name: 'el-input',
  132. md: 6,
  133. attributes: {
  134. disabled: true,
  135. placeholder: '请输入'
  136. },
  137. formItemAttributes: {
  138. label: '法人实名流水号',
  139. prop: 'fadadaWebsitNo'
  140. }
  141. },
  142. {
  143. name: 'el-input',
  144. md: 6,
  145. attributes: {
  146. disabled: true,
  147. placeholder: '请输入'
  148. },
  149. formItemAttributes: {
  150. label: '个人实名状态',
  151. prop: 'authStatus'
  152. }
  153. },
  154. {
  155. name: 'el-input',
  156. md: 6,
  157. attributes: {
  158. disabled: true,
  159. placeholder: '请输入'
  160. },
  161. formItemAttributes: {
  162. label: '法大大网点id',
  163. prop: 'fadadaWebsitNo'
  164. }
  165. },
  166. {
  167. name: 'el-input',
  168. md: 6,
  169. attributes: {
  170. disabled: true,
  171. placeholder: '请输入'
  172. },
  173. formItemAttributes: {
  174. label: '网点实名流水号',
  175. prop: 'fadadaWebsitNo'
  176. }
  177. },
  178. {
  179. name: 'el-input',
  180. md: 6,
  181. attributes: {
  182. disabled: true,
  183. placeholder: '请输入'
  184. },
  185. formItemAttributes: {
  186. label: '创建时间',
  187. prop: 'createTime'
  188. }
  189. }
  190. ]
  191. },
  192. items2() {
  193. return [
  194. {
  195. name: 'slot-component',
  196. md: 24,
  197. formItemAttributes: {
  198. label: '已选工程师',
  199. prop: 'items'
  200. },
  201. render: (h, { props }) => {
  202. var { formData } = props
  203. return (
  204. <div>
  205. <zj-table
  206. columns={[
  207. {
  208. columnAttributes: {
  209. label: '序号',
  210. prop: ''
  211. },
  212. render: (h, { row, column, index }) => {
  213. return <div style="padding-left:10px">{index + 1}</div>
  214. }
  215. },
  216. {
  217. columnAttributes: {
  218. label: '附件名称',
  219. prop: 'contractName'
  220. }
  221. },
  222. {
  223. columnAttributes: {
  224. label: '附件状态',
  225. prop: 'contractStatus'
  226. },
  227. render: (h, { row, column, index }) => {
  228. return (
  229. <div style="padding-left:10px">
  230. {{ WAIT_SIGN: '待签约', WAIT: '待审核', OK: '审核通过' }[row.contractStatus]}
  231. </div>
  232. )
  233. }
  234. },
  235. {
  236. columnAttributes: {
  237. label: '签约成功时间',
  238. prop: 'validDate'
  239. }
  240. },
  241. {
  242. columnAttributes: {
  243. label: '签约过期时间',
  244. prop: 'expireDate'
  245. }
  246. },
  247. {
  248. columnAttributes: {
  249. label: '审核人',
  250. prop: 'confirmBy'
  251. }
  252. },
  253. {
  254. columnAttributes: {
  255. label: '操作'
  256. },
  257. render: (h, { row, column, index }) => {
  258. return (
  259. <div style="padding-left:10px">
  260. <el-button type="text" onClick={() => {}}>
  261. 查看合同
  262. </el-button>
  263. </div>
  264. )
  265. }
  266. }
  267. ]}
  268. tableData={this.formData.items}
  269. ></zj-table>
  270. </div>
  271. )
  272. }
  273. }
  274. ]
  275. }
  276. },
  277. methods: {
  278. // 列表请求函数
  279. getList: websitContractSignList,
  280. // 导出
  281. exportList: websitContractSignListExport,
  282. // 表格列解析渲染数据更改
  283. columnParsing(item, defaultData) {
  284. return defaultData
  285. },
  286. // 获取勾选框数据
  287. selectionChange(data) {
  288. this.recordSelected = data
  289. },
  290. openWindow(cb) {
  291. this.$nextTick(() => {
  292. cb?.()
  293. })
  294. },
  295. handleClose() {
  296. this.$refs?.pageRef?.refreshList()
  297. this.$data.formData = this.$options.data().formData
  298. this.formType = 0
  299. this.formBool = false
  300. },
  301. operation() {
  302. return this.operationBtn({
  303. viewContract: {
  304. click: ({ row, index, column }) => {
  305. this.openWindow(() => {
  306. websitContractSignDetail({
  307. id: row.id
  308. }).then(res => {
  309. this.formData = {
  310. ...res.data
  311. }
  312. this.$nextTick(() => {
  313. this.formType = 1
  314. this.formBool = true
  315. })
  316. })
  317. })
  318. }
  319. },
  320. loseEfficacy: {
  321. prompt: '是否确定设为失效?',
  322. conditions: ({ row, index, column }) => {
  323. return true
  324. },
  325. click: ({ row, index, column }) => {
  326. websitContractSignCancel({
  327. id: row.id
  328. }).then(res => {
  329. this.$message({ type: 'success', message: '设置成功!' })
  330. this.$refs?.pageRef?.refreshList()
  331. })
  332. }
  333. }
  334. })
  335. }
  336. }
  337. }
  338. </script>
  339. <style lang="scss" scoped>
  340. .neibuview {
  341. box-sizing: border-box;
  342. padding-left: 16px;
  343. ::v-deep & > .zj-page-fill-scroll {
  344. box-sizing: border-box;
  345. padding-right: 16px;
  346. & > div:nth-child(1) {
  347. margin-top: 20px;
  348. }
  349. }
  350. }
  351. </style>