index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. <template>
  2. <!-- 现货合同详情-->
  3. <a-modal class="add-custom custom-detail"
  4. title="现货合同详情"
  5. v-model:visible="visible"
  6. centered
  7. :maskClosable="maskClosableFlag"
  8. @cancel="cancel"
  9. width="890px">
  10. <template #footer>
  11. <a-button key="submit"
  12. type="primary"
  13. :loading="loading"
  14. @click="submit">关闭</a-button>
  15. </template>
  16. <a-tabs v-model:activeKey="activeKey">
  17. <a-tab-pane key="1"
  18. tab="合同详情"></a-tab-pane>
  19. <a-tab-pane key="2"
  20. tab="点价记录"></a-tab-pane>
  21. <a-tab-pane key="3"
  22. tab="交收记录"></a-tab-pane>
  23. <a-tab-pane key="4"
  24. tab="款项记录"></a-tab-pane>
  25. <a-tab-pane key="5"
  26. tab="发票记录"></a-tab-pane>
  27. <a-tab-pane key="6"
  28. tab="入库记录"></a-tab-pane>
  29. <a-tab-pane key="7"
  30. tab="变更记录"></a-tab-pane>
  31. </a-tabs>
  32. <a-form class="inlineForm"
  33. v-if="activeKey == 1">
  34. <fieldset class="formFieldSet">
  35. <legend>基本信息</legend>
  36. <a-row :gutter="24">
  37. <a-col :span="12">
  38. <a-form-item label="合同编号">
  39. <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
  40. </a-form-item>
  41. </a-col>
  42. <a-col :span="12">
  43. <a-form-item label="合同类型">
  44. <span class="white">{{ getContractTypeName(selectedRow.contracttype) }}</span>
  45. </a-form-item>
  46. </a-col>
  47. </a-row>
  48. <a-row :gutter="24">
  49. <a-col :span="12">
  50. <a-form-item label="业务类型">
  51. <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
  52. </a-form-item>
  53. </a-col>
  54. <a-col :span="12">
  55. <a-form-item label="采购方">
  56. <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
  57. </a-form-item>
  58. </a-col>
  59. </a-row>
  60. <a-row :gutter="24">
  61. <a-col :span="12">
  62. <a-form-item label="销售方">
  63. <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
  64. </a-form-item>
  65. </a-col>
  66. <a-col :span="12">
  67. <a-form-item label="合同附件">
  68. <span class="white">{{ formatValue(selectedRow.contracctstatus) }}</span>
  69. </a-form-item>
  70. </a-col>
  71. </a-row>
  72. <a-row :gutter="24">
  73. <a-col :span="12">
  74. <a-form-item label="状态">
  75. <span class="yellow">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
  76. </a-form-item>
  77. </a-col>
  78. </a-row>
  79. </fieldset>
  80. <fieldset class="formFieldSet">
  81. <legend>现货信息</legend>
  82. <a-row :gutter="24">
  83. <a-col :span="12">
  84. <a-form-item label="现货品种">
  85. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  86. </a-form-item>
  87. </a-col>
  88. <a-col :span="12">
  89. <a-form-item label="品类">
  90. <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</span>
  91. </a-form-item>
  92. </a-col>
  93. </a-row>
  94. <a-row :gutter="24">
  95. <a-col :span="12">
  96. <a-form-item label="品牌">
  97. <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
  98. </a-form-item>
  99. </a-col>
  100. <a-col :span="12">
  101. <a-form-item label="标仓系数">
  102. <span class="white">{{ formatValue(selectedRow.convertfactor) }}</span>
  103. </a-form-item>
  104. </a-col>
  105. </a-row>
  106. <a-row :gutter="24">
  107. <a-col :span="12">
  108. <a-form-item label="商品规格">
  109. <span class="white">{{ formatValue(selectedRow.spotgoodsdesc) }}</span>
  110. </a-form-item>
  111. </a-col>
  112. </a-row>
  113. </fieldset>
  114. <fieldset class="formFieldSet">
  115. <legend>价格信息</legend>
  116. <a-row :gutter="24">
  117. <a-col :span="12">
  118. <a-form-item label="定价类型">
  119. <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
  120. </a-form-item>
  121. </a-col>
  122. <a-col :span="12">
  123. <a-form-item label="数量">
  124. <span class="white">{{ formatValue(selectedRow.qty) }}</span>
  125. </a-form-item>
  126. </a-col>
  127. </a-row>
  128. <a-row :gutter="24">
  129. <a-col :span="12">
  130. <a-form-item label="点价合约">
  131. <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
  132. </a-form-item>
  133. </a-col>
  134. <a-col :span="12">
  135. <a-form-item label="升贴水">
  136. <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
  137. </a-form-item>
  138. </a-col>
  139. </a-row>
  140. <a-row :gutter="24">
  141. <a-col :span="12">
  142. <a-form-item label="点价期">
  143. <span class="white">{{ formatValue(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
  144. </a-form-item>
  145. </a-col>
  146. <a-col :span="12">
  147. <a-form-item label="交收期">
  148. <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate, "d"))}}</span>
  149. </a-form-item>
  150. </a-col>
  151. </a-row>
  152. </fieldset>
  153. <fieldset class="formFieldSet">
  154. <legend>其它信息</legend>
  155. <a-row :gutter="24">
  156. <a-col :span="12">
  157. <a-form-item label="保证金">
  158. <span class="white">{{ formatValue(selectedRow.contractmargin) }}</span>
  159. </a-form-item>
  160. </a-col>
  161. <a-col :span="12">
  162. <a-form-item label="业务员">
  163. <span class="white">{{ formatValue(selectedRow.saleuserlogincode) }}</span>
  164. </a-form-item>
  165. </a-col>
  166. </a-row>
  167. <a-row :gutter="24">
  168. <a-col :span="12">
  169. <a-form-item label="跟单员">
  170. <span class="white">{{ formatValue(selectedRow.meruserlogincode) }}</span>
  171. </a-form-item>
  172. </a-col>
  173. <a-col :span="12">
  174. <a-form-item label="期货账户">
  175. <span class="white">{{ formatValue(selectedRow.accountid) }}</span>
  176. </a-form-item>
  177. </a-col>
  178. </a-row>
  179. <a-row :gutter="24">
  180. <a-col :span="12">
  181. <a-form-item label="备注">
  182. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  183. </a-form-item>
  184. </a-col>
  185. </a-row>
  186. </fieldset>
  187. </a-form>
  188. <div class="tableDatas"
  189. v-if="activeKey == 2">
  190. <a-table class="dialogTable"
  191. :columns="columns"
  192. :data-source="data"
  193. :pagination="false">
  194. <template #status="{ text }">
  195. <span class="yellow">{{ text }}</span>
  196. <!-- 审核通过'green' 审核拒绝 'orange' 待审核'yellow' -->
  197. </template>
  198. </a-table>
  199. </div>
  200. </a-modal>
  201. </template>
  202. <script lang="ts">
  203. import { defineComponent, PropType, reactive, ref } from 'vue';
  204. import { closeModal } from '@/common/setup/modal/index';
  205. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  206. import {Ermcp3ContractRsp, QueryChangeLogReq} from '@/services/go/ermcp/spot-contract/interface';
  207. import { getStatusName } from '@/common/constants/enumsName';
  208. import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
  209. import { formatValue, formatTime } from '@/common/methods/format';
  210. import { v4 as uuidv4 } from 'uuid';
  211. import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
  212. import {QueryAddUserInfoApply} from "@/services/go/ermcp/customInfo";
  213. import {QueryBusinessFp, QueryBusinessKx} from "@/services/go/ermcp/finance-review";
  214. import {QueryBusinessFpReq, QueryBusinessKxReq} from "@/services/go/ermcp/finance-review/interface";
  215. import {QueryBusinessDj, QueryBusinessJs} from "@/services/go/ermcp/business-review";
  216. import {QueryBusinessDjReq, QueryBusinessJsReq} from "@/services/go/ermcp/business-review/interface";
  217. import {QueryAreaStockApply} from "@/services/go/ermcp/inventory-review";
  218. import {QueryAreaStockApplyReq} from "@/services/go/ermcp/inventory-review/interface";
  219. import {QueryChangeLog} from "@/services/go/ermcp/spot-contract";
  220. import * as Long from "long";
  221. export default defineComponent({
  222. name: 'spot-contract-detail',
  223. components: {},
  224. props: {
  225. selectedRow: {
  226. type: Object as PropType<Ermcp3ContractRsp>,
  227. default: {},
  228. },
  229. },
  230. setup: function (props, context) {
  231. const {visible, cancel} = closeModal('detail');
  232. const loading = ref<boolean>(false);
  233. const maskClosableFlag = ref<boolean>(false);
  234. function submit() {
  235. cancel();
  236. let kxParam: QueryBusinessKxReq = {
  237. relatedid: props.selectedRow.spotcontractid
  238. }
  239. requestResultLoadingAndInfo(QueryBusinessKx, kxParam, loading, ['款项记录请求成功', '款项记录请求失败:']).then((res) => {
  240. console.log("款项记录请求成功: \n")
  241. console.log(res)
  242. cancel();
  243. context.emit('refresh');
  244. });
  245. let jsParam: QueryBusinessJsReq = {
  246. relatedid: props.selectedRow.spotcontractid
  247. }
  248. requestResultLoadingAndInfo(QueryBusinessJs, jsParam, loading, ['交收记录请求成功', '交收记录请求失败:']).then((res) => {
  249. console.log("交收记录请求成功: \n")
  250. console.log(res)
  251. cancel();
  252. context.emit('refresh');
  253. });
  254. let fpParam: QueryBusinessFpReq = {
  255. relatedid: props.selectedRow.spotcontractid
  256. }
  257. requestResultLoadingAndInfo(QueryBusinessFp, fpParam, loading, ['发票记录请求成功', '发票记录请求失败:']).then((res) => {
  258. console.log("发票记录请求成功: \n")
  259. console.log(res)
  260. cancel();
  261. context.emit('refresh');
  262. });
  263. let djParam: QueryBusinessDjReq = {
  264. relatedid: props.selectedRow.spotcontractid
  265. }
  266. requestResultLoadingAndInfo(QueryBusinessDj, djParam, loading, ['点价记录请求成功', '点价记录请求失败:']).then((res) => {
  267. console.log("点价记录请求成功: \n")
  268. console.log(res)
  269. cancel();
  270. context.emit('refresh');
  271. });
  272. let StockParam: QueryAreaStockApplyReq = {
  273. spotcontractid: props.selectedRow.spotcontractid,
  274. inouttype: '1,3'
  275. }
  276. requestResultLoadingAndInfo(QueryAreaStockApply, StockParam, loading, ['入库记录请求成功', '入库记录请求失败:']).then((res) => {
  277. console.log("入库记录请求成功: \n")
  278. console.log(res)
  279. cancel();
  280. context.emit('refresh');
  281. });
  282. let changParam: QueryChangeLogReq = {
  283. RelatedId: props.selectedRow.spotcontractid
  284. }
  285. requestResultLoadingAndInfo(QueryChangeLog, changParam, loading, ['变更记录请求成功', '变更记录请求失败:']).then((res) => {
  286. console.log("变更记录请求成功: /n")
  287. console.log(res)
  288. cancel();
  289. context.emit('refresh');
  290. });
  291. }
  292. const columns = [
  293. {
  294. title: '序号',
  295. dataIndex: 'no',
  296. key: 'no',
  297. align: 'center',
  298. },
  299. {
  300. title: '点价登记时间',
  301. dataIndex: 'time',
  302. key: 'time',
  303. align: 'center',
  304. },
  305. {
  306. title: '点价审核时间',
  307. dataIndex: 'adutTime',
  308. key: 'adutTime',
  309. align: 'center',
  310. },
  311. {
  312. title: '点价价格',
  313. dataIndex: 'price',
  314. key: 'price',
  315. align: 'center',
  316. },
  317. {
  318. title: '升贴水',
  319. dataIndex: 'money',
  320. key: 'money',
  321. align: 'center',
  322. },
  323. {
  324. title: '点价数量',
  325. dataIndex: 'num',
  326. key: 'num',
  327. align: 'center',
  328. },
  329. {
  330. title: '点价金额',
  331. dataIndex: 'pointAmount',
  332. key: 'pointAmount',
  333. align: 'center',
  334. },
  335. {
  336. title: '申请人',
  337. dataIndex: 'apply',
  338. key: 'apply',
  339. align: 'center',
  340. },
  341. {
  342. title: '审核人',
  343. dataIndex: 'adutPerson',
  344. key: 'adutPerson',
  345. align: 'center',
  346. },
  347. {
  348. title: '状态',
  349. dataIndex: 'status',
  350. key: 'status',
  351. align: 'center',
  352. slots: {customRender: 'status'},
  353. },
  354. ];
  355. const data = [
  356. {
  357. key: '1',
  358. no: '1',
  359. time: '20-12-01 19:37',
  360. adutTime: '20-12-01 20:37',
  361. price: '1000.00',
  362. money: '100',
  363. num: '1',
  364. pointAmount: '10100.00',
  365. apply: 'lishunli',
  366. adutPerson: 'wamgping',
  367. status: '审核通过',
  368. },
  369. {
  370. key: '2',
  371. no: '2',
  372. time: '20-12-01 19:37',
  373. adutTime: '20-12-01 20:37',
  374. price: '1000.00',
  375. money: '100',
  376. num: '1',
  377. pointAmount: '10100.00',
  378. apply: 'lishunli',
  379. adutPerson: 'wamgping',
  380. status: '审核驳回',
  381. },
  382. ];
  383. return {
  384. visible,
  385. cancel,
  386. submit,
  387. loading,
  388. formatValue,
  389. getContractStatusName,
  390. getPriceTypeName,
  391. formatTime,
  392. maskClosableFlag,
  393. getContractTypeName,
  394. getBizTypeName,
  395. activeKey: ref('1'),
  396. columns,
  397. data,
  398. };
  399. },
  400. });
  401. </script>
  402. <style lang="less">
  403. .custom-detail {
  404. .ant-modal-content {
  405. .ant-modal-body {
  406. padding-top: 0;
  407. padding-left: 0;
  408. padding-right: 0;
  409. .ant-tabs {
  410. background: @m-black11;
  411. width: 100%;
  412. padding: 0 24px;
  413. .ant-tabs-bar {
  414. margin-bottom: 0;
  415. border-bottom: 0;
  416. }
  417. .ant-tabs-nav-container {
  418. .ant-tabs-nav-wrap {
  419. .ant-tabs-nav {
  420. .ant-tabs-tab {
  421. width: 70px;
  422. margin-right: 43px;
  423. text-align: center;
  424. font-size: 16px;
  425. color: #88a0ae;
  426. padding: 0;
  427. line-height: 45px;
  428. }
  429. .ant-tabs-tab-active.ant-tabs-tab {
  430. color: #3a87f7;
  431. }
  432. .ant-tabs-ink-bar {
  433. width: 70px !important;
  434. background: #3a87f7;
  435. .rounded-corners(1px);
  436. }
  437. }
  438. }
  439. }
  440. }
  441. }
  442. }
  443. .tableDatas {
  444. margin-top: 26px;
  445. padding: 0 24px;
  446. overflow: hidden;
  447. .dialogTable {
  448. width: 100%;
  449. overflow: overlay;
  450. }
  451. }
  452. .ant-form.inlineForm {
  453. margin-top: 20px;
  454. padding: 0 24px;
  455. }
  456. }
  457. </style
  458. >;