cube-connected-transaction.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <template>
  2. <div :class="$style.searchdiv">
  3. <a-card :class="$style.searchWrap">
  4. <a-form-model
  5. ref="advancedSearchForm"
  6. :class="$style.antAdvancedSearchForm"
  7. :model="form"
  8. v-bind="formItemLayout"
  9. layout="horizontal"
  10. >
  11. <a-row :gutter="24">
  12. <a-col :span="8">
  13. <a-form-model-item label="关联方名称">
  14. <a-input v-model="form.relatedPartyName"></a-input>
  15. </a-form-model-item>
  16. </a-col>
  17. <a-col :span="8">
  18. <a-form-model-item label="关联方类型">
  19. <a-select v-model="form.relatedPartyType" :allow-clear="true" :placeholder="'请选择'">
  20. <a-select-option value="0">
  21. 金融产品
  22. </a-select-option>
  23. <a-select-option value="1">
  24. 自然人
  25. </a-select-option>
  26. <a-select-option value="2">
  27. 法人
  28. </a-select-option>
  29. </a-select>
  30. </a-form-model-item>
  31. </a-col>
  32. <a-col :span="8">
  33. <a-form-model-item label="前一层关联方名称">
  34. <a-input v-model="form.afterRelatedPartyTypeName"></a-input>
  35. </a-form-model-item>
  36. </a-col>
  37. </a-row>
  38. <a-row :gutter="24">
  39. <a-col :span="8">
  40. <a-form-model-item :class="$style.titleLabel" :label="'与前一层关联方的关系'">
  41. <a-select
  42. v-model="form.afterRelatedPartyType"
  43. :allow-clear="true"
  44. :placeholder="'请选择'"
  45. >
  46. <a-select-option value="0">
  47. 总经理
  48. </a-select-option>
  49. <a-select-option value="1">
  50. 监事
  51. </a-select-option>
  52. <a-select-option value="2">
  53. 高级管理
  54. </a-select-option>
  55. <a-select-option value="4">
  56. 控制
  57. </a-select-option>
  58. <a-select-option value="5">
  59. 法人代表
  60. </a-select-option>
  61. <a-select-option value="6">
  62. 父亲
  63. </a-select-option>
  64. <a-select-option value="7">
  65. 董事
  66. </a-select-option>
  67. <a-select-option value="8">
  68. 夫妻关系
  69. </a-select-option>
  70. <a-select-option value="9">
  71. 妹妹
  72. </a-select-option>
  73. <a-select-option value="10">
  74. 持有
  75. </a-select-option>
  76. </a-select>
  77. </a-form-model-item>
  78. </a-col>
  79. <a-col :span="8">
  80. <a-form-model-item label="关联方状态">
  81. <a-select
  82. v-model="form.relatedPartyStatus"
  83. :allow-clear="true"
  84. :placeholder="'请选择'"
  85. >
  86. <a-select-option value="0">
  87. 有效
  88. </a-select-option>
  89. <a-select-option value="1">
  90. 无效
  91. </a-select-option>
  92. </a-select>
  93. </a-form-model-item>
  94. </a-col>
  95. </a-row>
  96. <a-row>
  97. <a-col :span="16"> </a-col>
  98. <a-col :class="$style.searchbutton" :span="8">
  99. <div class="reportbuttonContent" style="margin-right:15%">
  100. <a-button @click="handleReset">
  101. 重置
  102. </a-button>
  103. <a-button type="primary" @click="handleSearch">
  104. 查询
  105. </a-button>
  106. <a-button type="primary" @click="exportForm">知识图谱</a-button>
  107. <audit-advanced-export
  108. ref="export"
  109. :class-style="[$style.buttonSpacing]"
  110. :v-if="false"
  111. :config-id="91"
  112. :exclebxh="false"
  113. :expressions="expressions"
  114. ></audit-advanced-export>
  115. </div>
  116. </a-col>
  117. </a-row>
  118. </a-form-model>
  119. <!-- <findReportSearch :search="search" :expressions="expressions"> </findReportSearch> -->
  120. </a-card>
  121. <a-card class="reporttablecardxm">
  122. <span class="header_sd-header_common"
  123. ><span :class="['toptitle', $style.toptitle]">关联交易查询</span></span
  124. >
  125. <sd-data-table
  126. ref="sjzlTable"
  127. :row-key="(record, index) => index"
  128. :filter-expressions="expressions"
  129. :projectlist="true"
  130. :columns="columns"
  131. :data-url="'api/xcoa-mobile/v1/audit-report-find/find-report'"
  132. :show-advance-query="false"
  133. :scroll="{ x: 1500, y: 300 }"
  134. :defultpagination-pagesize="50"
  135. @searchbtnClick="searchbtnClick"
  136. >
  137. <template slot="findType" slot-scope="text, record">
  138. {{ JSON.parse(text).text }}
  139. </template>
  140. <template slot="whetherOrderDuty" slot-scope="text, record">
  141. {{ text === 0 ? '是' : '否' }}
  142. </template>
  143. </sd-data-table>
  144. </a-card>
  145. </div>
  146. </template>
  147. <script>
  148. import { message } from '@/common/one-ui'
  149. import axios from '@/common/services/axios-instance'
  150. import { getUserInfo } from '@/common/store-mixin'
  151. import auditAdvancedExport from '@product/iam/components/audit-advanced-export'
  152. import auditAdvancedQueryMixins from '@product/iam/components/audit-advanced-query-mixins'
  153. import components from './_import-components/cube-audit-find-report-import'
  154. export default {
  155. name: 'CubeConnectedTransaction',
  156. components: {
  157. ...components,
  158. auditAdvancedExport,
  159. },
  160. metaInfo: {
  161. title: '关联交易',
  162. },
  163. mixins: [auditAdvancedQueryMixins],
  164. data() {
  165. return {
  166. expressions: [],
  167. columns: [
  168. {
  169. title: '序号',
  170. customRender: (text, record, index) => `${index + 1}`,
  171. width: '80px',
  172. },
  173. {
  174. title: '关联方名称',
  175. dataIndex: 'unitName',
  176. width: '120px',
  177. },
  178. {
  179. title: '关联方证件号码',
  180. dataIndex: 'projectTitle',
  181. width: '170px',
  182. },
  183. {
  184. title: '关联方类型',
  185. dataIndex: 'projectCode',
  186. width: '170px',
  187. },
  188. {
  189. title: '前一层关联方名称',
  190. dataIndex: 'groupLeaderName',
  191. width: '170px',
  192. },
  193. {
  194. title: '前一层关联方证件号码',
  195. dataIndex: 'auditedUnitName',
  196. width: '170px',
  197. },
  198. {
  199. title: '前一层关联方类型',
  200. dataIndex: 'creatFindOr',
  201. width: '180px',
  202. },
  203. {
  204. title: '与前一层之间是否有权益份额',
  205. dataIndex: 'findTitle',
  206. width: '170px',
  207. },
  208. {
  209. title: '持有比例',
  210. dataIndex: 'findType',
  211. scopedSlots: { customRender: 'findType' },
  212. width: '170px',
  213. },
  214. {
  215. title: '关联关系说明',
  216. dataIndex: 'findDesc',
  217. width: '170px',
  218. },
  219. {
  220. title: '关联方状态',
  221. dataIndex: 'suggestionType',
  222. scopedSlots: { customRender: 'suggestionType' },
  223. width: '170px',
  224. },
  225. {
  226. title: '生效日期',
  227. dataIndex: 'problemType',
  228. scopedSlots: { customRender: 'problemType' },
  229. width: '170px',
  230. },
  231. ],
  232. formItemLayout: {
  233. labelCol: { span: 6 },
  234. wrapperCol: { span: 14 },
  235. },
  236. form: {},
  237. riskOptions: [],
  238. problemOptions: [],
  239. auditModeOptions: [],
  240. rootNode: {},
  241. }
  242. },
  243. created() {
  244. let userInfo = getUserInfo()
  245. const params = {
  246. orgId: userInfo.deptId,
  247. }
  248. axios({
  249. url: 'api/xcoa-mobile/v1/iamorg/getCurrentUserGroup',
  250. method: 'get',
  251. }).then((res) => {
  252. userInfo = res.data
  253. params.orgId = res.data.id
  254. axios({
  255. url: 'api/xcoa-mobile/v1/iamorg/findIamOrgId',
  256. method: 'post',
  257. params,
  258. }).then((res) => {
  259. this.id = res.data
  260. const deptCode = userInfo.id.toString()
  261. const deptName = userInfo.name
  262. this.rootNode = { code: deptCode, name: deptName, id: this.id }
  263. })
  264. })
  265. },
  266. mounted() {
  267. // 初始化数据字典信息
  268. this.initDictionaryInfo()
  269. },
  270. methods: {
  271. handleReset() {
  272. this.$refs.advancedSearchForm.resetFields()
  273. this.form = {}
  274. },
  275. initDictionaryInfo() {
  276. // 风险等级
  277. axios({
  278. url: 'api/xcoa-mobile/v1/iam-law/dictionary?key=RISK_RATE',
  279. method: 'get',
  280. }).then((res) => {
  281. if (res.status === 200) {
  282. this.riskOptions = res.data
  283. }
  284. })
  285. // 问题类型
  286. axios({
  287. url: 'api/xcoa-mobile/v1/iam-law/dictionary?key=PROBLEM_TYPE',
  288. method: 'get',
  289. }).then((res) => {
  290. if (res.status === 200) {
  291. this.problemOptions = res.data
  292. }
  293. })
  294. },
  295. exportForm() {
  296. if (!this.$refs.sjzlTable.data || this.$refs.sjzlTable.data.length === 0) {
  297. message.warning('未查询出可展示图谱的数据', 1)
  298. return
  299. }
  300. this.$refs.advancedSearchForm.validate((valid, values) => {
  301. if (valid) {
  302. // 此处直接打开知识图谱地址
  303. window.open('http://kg.smartdot.com:3001/schema/3/knowledge-atlas')
  304. }
  305. })
  306. },
  307. handleSearch() {
  308. this.$refs.advancedSearchForm.validate((valid, values) => {
  309. if (valid) {
  310. const units = this.form.units
  311. if (units && units.length > 0) {
  312. var unitsIds = []
  313. for (var i = 0; i < units.length; i++) {
  314. unitsIds.push(units[i].id.toString())
  315. }
  316. this.form.unitIds = unitsIds
  317. }
  318. const auditedUnits = this.form.auditedUnits
  319. if (auditedUnits && auditedUnits.length > 0) {
  320. var auditedUnitIds = []
  321. for (var j = 0; j < auditedUnits.length; j++) {
  322. auditedUnitIds.push(auditedUnits[j].id.toString())
  323. }
  324. this.form.auditedUnitIds = auditedUnitIds
  325. }
  326. this.search(this.form)
  327. }
  328. })
  329. },
  330. // 查询
  331. search(form) {
  332. // 默认查询条件
  333. this.expressions = []
  334. // 审计发现标题
  335. if (form.year[0]) {
  336. var startYear = new Date(form.year[0])
  337. this.expressions.push({
  338. dataType: 'str',
  339. name: 'planYear',
  340. op: 'ge',
  341. stringValue: startYear.getFullYear(),
  342. })
  343. }
  344. if (form.year[1]) {
  345. var endYear = new Date(form.year[1])
  346. this.expressions.push({
  347. dataType: 'str',
  348. name: 'planYear',
  349. op: 'le',
  350. stringValue: endYear.getFullYear(),
  351. })
  352. }
  353. if (form.unitIds) {
  354. this.expressions.push({
  355. dataType: 'str',
  356. name: 'unitIds',
  357. op: 'in',
  358. stringValue: form.unitIds
  359. .map((item) => {
  360. return "'" + item + "'"
  361. })
  362. .join(','),
  363. })
  364. }
  365. if (form.projectName) {
  366. this.expressions.push({
  367. dataType: 'str',
  368. name: 'projectName',
  369. op: 'like',
  370. stringValue: form.projectName,
  371. })
  372. }
  373. if (form.auditedUnitIds) {
  374. this.expressions.push({
  375. dataType: 'str',
  376. name: 'auditedUnitIds',
  377. op: 'in',
  378. stringValue: form.auditedUnitIds
  379. .map((item) => {
  380. return "'" + item + "'"
  381. })
  382. .join(','),
  383. })
  384. }
  385. if (form.whetherOrderDuty) {
  386. this.expressions.push({
  387. dataType: 'str',
  388. name: 'whetherOrderDuty',
  389. op: 'ne',
  390. stringValue: form.whetherOrderDuty,
  391. })
  392. }
  393. if (form.findTitle) {
  394. this.expressions.push({
  395. dataType: 'str',
  396. name: 'findTitle',
  397. op: 'like',
  398. stringValue: form.findTitle,
  399. })
  400. }
  401. if (form.findType) {
  402. this.expressions.push({
  403. dataType: 'str',
  404. name: 'findType',
  405. op: 'like',
  406. stringValue: form.findType,
  407. })
  408. }
  409. if (form.problemType) {
  410. this.expressions.push({
  411. dataType: 'str',
  412. name: 'problemType',
  413. op: 'ne',
  414. stringValue: form.problemType,
  415. })
  416. }
  417. if (form.riskLevel) {
  418. this.expressions.push({
  419. dataType: 'str',
  420. name: 'riskLevel',
  421. op: 'ne',
  422. stringValue: form.riskLevel,
  423. })
  424. }
  425. },
  426. },
  427. }
  428. </script>
  429. <style module lang="scss">
  430. @use '@/common/design' as *;
  431. // .statistics {
  432. // :global(.ant-table-body) {
  433. // overflow-x: auto;
  434. // }
  435. // }
  436. .toptitle {
  437. color: #404040;
  438. font-weight: bold;
  439. font-size: 22px;
  440. margin-left: calc(50% - 150px);
  441. }
  442. .search-wrap {
  443. margin-bottom: $padding-lg;
  444. :global(.ant-advanced-search-form) {
  445. padding: 0;
  446. background: transparent;
  447. border: none;
  448. }
  449. :global .ant-divider-horizontal {
  450. margin: 10px 0;
  451. }
  452. }
  453. .searchdiv {
  454. height: 100%;
  455. :global(.sd-has-table.ant-card) {
  456. min-height: 50%;
  457. }
  458. :global(.reporttablecardxm) {
  459. :global(.ant-table-body) {
  460. height: auto !important;
  461. overflow: auto;
  462. min-height: auto !important;
  463. }
  464. }
  465. :global(.ant-table-placeholder) {
  466. height: auto !important;
  467. }
  468. }
  469. .title-label {
  470. label {
  471. width: 6em !important;
  472. white-space: normal;
  473. display: inline-flex;
  474. }
  475. }
  476. </style>