index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  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="0px" :form-data="formData" :form-items="items2">
  24. <div
  25. slot="header"
  26. v-if="!adminWebsitIds.includes(formData.parentId) && formData.status == 'WAIT_SIGN'"
  27. style="width: 100%; text-align: right"
  28. >
  29. <el-button type="primary" size="mini" @click="qianyueanniu">签约</el-button>
  30. </div>
  31. </zj-form-module>
  32. </zj-form-container>
  33. </zj-page-fill>
  34. <div
  35. style="box-sizing: border-box; padding: 20px; text-align: right"
  36. v-if="formData.status == 'WAIT' && adminWebsitIds.includes(formData.parentId)"
  37. >
  38. <el-button
  39. @click="
  40. () => {
  41. shenheBool = true
  42. }
  43. "
  44. >
  45. 审核
  46. </el-button>
  47. </div>
  48. </zj-page-container>
  49. </el-dialog>
  50. </div>
  51. <el-dialog title="审核" width="700px" :modal="false" :visible.sync="shenheBool" :before-close="shenheClose">
  52. <el-form ref="form" :model="form" label-width="120px" size="mini">
  53. <el-form-item label="网点名称">
  54. <span>{{ `(${formData.websitId})${formData.websitName}` }}</span>
  55. </el-form-item>
  56. <el-form-item label="合同名称">
  57. <span>{{ form.contractName }}</span>
  58. </el-form-item>
  59. <el-form-item label="签约成功时间">
  60. <span>{{ form.validDate }}</span>
  61. </el-form-item>
  62. <el-form-item label="签约过期时间">
  63. <span>{{ form.expireDate }}</span>
  64. </el-form-item>
  65. <el-form-item label="审核结果">
  66. <el-radio-group v-model="form.status">
  67. <el-radio label="OK">审核通过</el-radio>
  68. <el-radio label="REJECT">审核驳回</el-radio>
  69. </el-radio-group>
  70. </el-form-item>
  71. <el-form-item label="审核备注">
  72. <el-input type="textarea" v-model="form.remark"></el-input>
  73. </el-form-item>
  74. <el-form-item>
  75. <div style="text-align: right">
  76. <el-button @click="shenheClose">取消</el-button>
  77. <el-button type="primary" @click="shenhequeding">确定</el-button>
  78. </div>
  79. </el-form-item>
  80. </el-form>
  81. </el-dialog>
  82. </template-page>
  83. </template>
  84. <script>
  85. import TemplatePage from '@/components/template/template-page-1.vue'
  86. import import_mixin from '@/components/template/import_mixin.js'
  87. import {
  88. websitContractSignList,
  89. websitContractSignListExport,
  90. websitContractSignCancel,
  91. websitContractSignSign,
  92. websitContractSignDetail,
  93. fddCommonViewContract,
  94. fddCommonViewTemplate,
  95. fddCommonDownloadContract,
  96. websitContractSignConfirm
  97. } from '@/api/networkContractSigning'
  98. import operation_mixin from '@/components/template/operation_mixin.js'
  99. export default {
  100. components: { TemplatePage },
  101. mixins: [import_mixin, operation_mixin],
  102. data() {
  103. return {
  104. // 表格属性
  105. tableAttributes: {
  106. selectColumn: false
  107. },
  108. // 表格事件
  109. tableEvents: {
  110. 'selection-change': this.selectionChange
  111. },
  112. recordSelected: [],
  113. formBool: false,
  114. formType: 0,
  115. formData: {},
  116. formRules: {},
  117. shenheBool: false,
  118. form: {}
  119. }
  120. },
  121. computed: {
  122. userData() {
  123. return JSON.parse(localStorage.getItem('greemall_user'))
  124. },
  125. adminWebsitIds() {
  126. return this?.userData?.adminWebsitIds || []
  127. },
  128. optionsEvensGroup() {
  129. return []
  130. },
  131. items() {
  132. return [
  133. {
  134. name: 'el-input',
  135. md: 12,
  136. attributes: {
  137. disabled: true,
  138. placeholder: '请输入'
  139. },
  140. formItemAttributes: {
  141. label: '一级网点编号',
  142. prop: 'parentId'
  143. }
  144. },
  145. {
  146. name: 'el-input',
  147. md: 12,
  148. attributes: {
  149. disabled: true,
  150. placeholder: '请输入'
  151. },
  152. formItemAttributes: {
  153. label: '一级网点名称',
  154. prop: 'parentName'
  155. }
  156. },
  157. {
  158. name: 'el-input',
  159. md: 12,
  160. attributes: {
  161. disabled: true,
  162. placeholder: '请输入'
  163. },
  164. formItemAttributes: {
  165. label: '网点编号',
  166. prop: 'websitId'
  167. }
  168. },
  169. {
  170. name: 'el-input',
  171. md: 12,
  172. attributes: {
  173. disabled: true,
  174. placeholder: '请输入'
  175. },
  176. formItemAttributes: {
  177. label: '网点名称',
  178. prop: 'websitName'
  179. }
  180. },
  181. {
  182. name: 'el-input',
  183. md: 6,
  184. attributes: {
  185. disabled: true,
  186. placeholder: '请输入'
  187. },
  188. formItemAttributes: {
  189. label: '法大大法人id',
  190. prop: 'fadadaCustomerId'
  191. }
  192. },
  193. {
  194. name: 'el-input',
  195. md: 6,
  196. attributes: {
  197. disabled: true,
  198. placeholder: '请输入'
  199. },
  200. formItemAttributes: {
  201. label: '法人实名流水号',
  202. prop: 'fadadaWebsitNo'
  203. }
  204. },
  205. {
  206. name: 'el-input',
  207. md: 6,
  208. attributes: {
  209. disabled: true,
  210. placeholder: '请输入'
  211. },
  212. formItemAttributes: {
  213. label: '个人实名状态',
  214. prop: 'authStatusText'
  215. }
  216. },
  217. {
  218. name: 'el-input',
  219. md: 6,
  220. attributes: {
  221. disabled: true,
  222. placeholder: '请输入'
  223. },
  224. formItemAttributes: {
  225. label: '法大大网点id',
  226. prop: 'fadadaWebsitNo'
  227. }
  228. },
  229. {
  230. name: 'el-input',
  231. md: 6,
  232. attributes: {
  233. disabled: true,
  234. placeholder: '请输入'
  235. },
  236. formItemAttributes: {
  237. label: '网点实名流水号',
  238. prop: 'fadadaWebsitNo'
  239. }
  240. },
  241. {
  242. name: 'el-input',
  243. md: 6,
  244. attributes: {
  245. disabled: true,
  246. placeholder: '请输入'
  247. },
  248. formItemAttributes: {
  249. label: '创建时间',
  250. prop: 'createTime'
  251. }
  252. }
  253. ]
  254. },
  255. items2() {
  256. return [
  257. {
  258. name: 'slot-component',
  259. md: 24,
  260. formItemAttributes: {
  261. label: '',
  262. prop: 'items'
  263. },
  264. render: (h, { props }) => {
  265. var { formData } = props
  266. return (
  267. <div>
  268. <zj-table
  269. columns={[
  270. {
  271. columnAttributes: {
  272. label: '序号',
  273. prop: ''
  274. },
  275. render: (h, { row, column, index }) => {
  276. return <div style="padding-left:10px">{index + 1}</div>
  277. }
  278. },
  279. {
  280. columnAttributes: {
  281. label: '附件名称',
  282. prop: 'contractName'
  283. }
  284. },
  285. {
  286. columnAttributes: {
  287. label: '附件状态',
  288. prop: 'contractStatus'
  289. },
  290. render: (h, { row, column, index }) => {
  291. return (
  292. <div style="padding-left:10px">
  293. {
  294. { WAIT_SIGN: '待签约', WAIT: '待审核', OK: '审核通过', REJECT: '驳回' }[
  295. row.contractStatus
  296. ]
  297. }
  298. </div>
  299. )
  300. }
  301. },
  302. {
  303. columnAttributes: {
  304. label: '签约成功时间',
  305. prop: 'validDate'
  306. }
  307. },
  308. {
  309. columnAttributes: {
  310. label: '签约过期时间',
  311. prop: 'expireDate'
  312. }
  313. },
  314. {
  315. columnAttributes: {
  316. label: '审核人',
  317. prop: 'confirmBy'
  318. }
  319. },
  320. {
  321. columnAttributes: {
  322. label: '操作'
  323. },
  324. render: (h, { row, column, index }) => {
  325. return (
  326. <div style="padding-left:10px">
  327. {!row.fadadaContractId && row.fadadaTemplateId ? (
  328. <el-button
  329. type="text"
  330. onClick={() => {
  331. fddCommonViewTemplate({ templateId: row.fadadaTemplateId }).then(res => {
  332. window.open(res.data, '_blank')
  333. })
  334. }}
  335. >
  336. 查看模板
  337. </el-button>
  338. ) : null}
  339. {row.fadadaContractId ? (
  340. <el-button
  341. type="text"
  342. onClick={() => {
  343. fddCommonViewContract({
  344. contractId: row.fadadaContractId
  345. }).then(res => {
  346. window.open(res.data, '_blank')
  347. })
  348. }}
  349. >
  350. 查看合同
  351. </el-button>
  352. ) : null}
  353. {row.contractStatus == 'OK' && this.adminWebsitIds.includes(this.formData?.parentId) ? (
  354. <el-button
  355. type="text"
  356. onClick={() => {
  357. fddCommonDownloadContract({
  358. contractId: row.fadadaContractId
  359. }).then(res => {
  360. window.open(res.data, '_blank')
  361. })
  362. }}
  363. >
  364. 下载合同
  365. </el-button>
  366. ) : null}
  367. </div>
  368. )
  369. }
  370. }
  371. ]}
  372. tableData={this.formData.items}
  373. ></zj-table>
  374. </div>
  375. )
  376. }
  377. }
  378. ]
  379. }
  380. },
  381. created() {
  382. if (this.$route?.query?.id) {
  383. this.openWindow(() => {
  384. websitContractSignDetail({
  385. id: this.$route?.query?.id
  386. }).then(res => {
  387. this.formData = {
  388. ...res.data,
  389. authStatusText: { YES: '是', NO: '否' }[res.data.authStatus] || ''
  390. }
  391. this.$nextTick(() => {
  392. this.formType = 1
  393. this.formBool = true
  394. })
  395. })
  396. })
  397. }
  398. },
  399. methods: {
  400. // 列表请求函数
  401. getList: websitContractSignList,
  402. // 导出
  403. exportList: websitContractSignListExport,
  404. // 表格列解析渲染数据更改
  405. columnParsing(item, defaultData) {
  406. return defaultData
  407. },
  408. // 获取勾选框数据
  409. selectionChange(data) {
  410. this.recordSelected = data
  411. },
  412. openWindow(cb) {
  413. this.$nextTick(() => {
  414. cb?.()
  415. })
  416. },
  417. handleClose() {
  418. this.$refs?.pageRef?.refreshList()
  419. this.$data.formData = this.$options.data().formData
  420. this.formType = 0
  421. this.formBool = false
  422. },
  423. operation() {
  424. return this.operationBtn({
  425. viewContract: {
  426. click: ({ row, index, column }) => {
  427. this.openWindow(() => {
  428. websitContractSignDetail({
  429. id: row.id
  430. }).then(res => {
  431. this.formData = {
  432. ...res.data,
  433. authStatusText: { YES: '是', NO: '否' }[res.data.authStatus] || ''
  434. }
  435. this.$nextTick(() => {
  436. this.formType = 1
  437. this.formBool = true
  438. })
  439. })
  440. })
  441. }
  442. },
  443. loseEfficacy: {
  444. prompt: '是否确定设为失效?',
  445. conditions: ({ row, index, column }) => {
  446. return row.status !== 'CANCEL'
  447. },
  448. click: ({ row, index, column }) => {
  449. websitContractSignCancel({
  450. id: row.id
  451. }).then(res => {
  452. this.$message({ type: 'success', message: '设置成功!' })
  453. this.$refs?.pageRef?.refreshList()
  454. })
  455. }
  456. }
  457. })
  458. },
  459. shenheClose() {
  460. this.shenheBool = false
  461. },
  462. shenhequeding() {
  463. websitContractSignConfirm({
  464. id: this.formData.id,
  465. remark: this.form.remark,
  466. status: this.form.status
  467. }).then(res => {
  468. this.$message({ type: 'success', message: '审核成功!' })
  469. this.shenheClose()
  470. this.openWindow(() => {
  471. websitContractSignDetail({
  472. id: this.formData.id
  473. }).then(res => {
  474. this.formData = {
  475. ...res.data,
  476. authStatusText: { YES: '是', NO: '否' }[res.data.authStatus] || ''
  477. }
  478. })
  479. })
  480. })
  481. },
  482. qianyueanniu() {
  483. websitContractSignSign({
  484. id: this.formData.id,
  485. returnUrl: `${window.location.href.split('#')?.[0]}#/networkSigning?id=${this.formData.id}`
  486. }).then(res => {
  487. if (res.data.jump) {
  488. window.open(res.data.url, '_blank')
  489. }
  490. })
  491. }
  492. }
  493. }
  494. </script>
  495. <style lang="scss" scoped>
  496. .neibuview {
  497. box-sizing: border-box;
  498. padding-left: 16px;
  499. ::v-deep & > .zj-page-fill-scroll {
  500. box-sizing: border-box;
  501. padding-right: 16px;
  502. & > div:nth-child(1) {
  503. margin-top: 20px;
  504. }
  505. }
  506. }
  507. </style>