index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <template>
  2. <!-- 现货合同详情-->
  3. <a-modal class="add-custom custom-detail"
  4. title="现货合同详情"
  5. v-model:visible="visible"
  6. @cancel="cancel"
  7. width="890px">
  8. <template #footer>
  9. <a-button key="submit"
  10. type="primary"
  11. :loading="loading"
  12. @click="submit">关闭</a-button>
  13. </template>
  14. <a class="white">
  15. 基本信息
  16. </a>
  17. <a-form class="inlineForm"
  18. :form="form"
  19. @submit="handleSearch">
  20. <a-row :gutter="24">
  21. <a-col :span="12">
  22. <a-form-item label="合同编号">
  23. <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
  24. </a-form-item>
  25. </a-col>
  26. <a-col :span="12">
  27. <a-form-item label="合同类型">
  28. <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
  29. </a-form-item>
  30. </a-col>
  31. </a-row>
  32. <a-row :gutter="24">
  33. <a-col :span="12">
  34. <a-form-item label="业务类型">
  35. <span class="white">{{ formatValue(selectedRow.biztype) }}</span>
  36. </a-form-item>
  37. </a-col>
  38. <a-col :span="12">
  39. <a-form-item label="采购方">
  40. <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
  41. </a-form-item>
  42. </a-col>
  43. </a-row>
  44. <a-row :gutter="24">
  45. <a-col :span="12">
  46. <a-form-item label="销售方">
  47. <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
  48. </a-form-item>
  49. </a-col>
  50. <a-col :span="12">
  51. <a-form-item label="合同附件">
  52. <span class="white">{{ formatValue(selectedRow.contracctstatus) }}</span>
  53. </a-form-item>
  54. </a-col>
  55. </a-row>
  56. <a-row :gutter="24">
  57. <a-col :span="12">
  58. <a-form-item label="状态">
  59. <span class="white">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
  60. </a-form-item>
  61. </a-col>
  62. </a-row>
  63. </a-form>
  64. <a class="white">
  65. 现货信息
  66. </a>
  67. <a-form class="inlineForm"
  68. :form="form"
  69. @submit="handleSearch">
  70. <a-row :gutter="24">
  71. <a-col :span="12">
  72. <a-form-item label="现货品种">
  73. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  74. </a-form-item>
  75. </a-col>
  76. <a-col :span="12">
  77. <a-form-item label="品类">
  78. <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</span>
  79. </a-form-item>
  80. </a-col>
  81. </a-row>
  82. <a-row :gutter="24">
  83. <a-col :span="12">
  84. <a-form-item label="品牌">
  85. <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
  86. </a-form-item>
  87. </a-col>
  88. <a-col :span="12">
  89. <a-form-item label="标仓系数">
  90. <span class="white">{{ formatValue(selectedRow.convertfactor) }}</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.spotgoodsdesc) }}</span>
  98. </a-form-item>
  99. </a-col>
  100. </a-row>
  101. </a-form>
  102. <a class="white">
  103. 价格信息
  104. </a>
  105. <a-form class="inlineForm"
  106. :form="form"
  107. @submit="handleSearch">
  108. <a-row :gutter="24">
  109. <a-col :span="12">
  110. <a-form-item label="定价类型">
  111. <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
  112. </a-form-item>
  113. </a-col>
  114. <a-col :span="12">
  115. <a-form-item label="数量">
  116. <span class="white">{{ formatValue(selectedRow.qty) }}</span>
  117. </a-form-item>
  118. </a-col>
  119. </a-row>
  120. <a-row :gutter="24">
  121. <a-col :span="12">
  122. <a-form-item label="点价合约">
  123. <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
  124. </a-form-item>
  125. </a-col>
  126. <a-col :span="12">
  127. <a-form-item label="升贴水">
  128. <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
  129. </a-form-item>
  130. </a-col>
  131. </a-row>
  132. <a-row :gutter="24">
  133. <a-col :span="12">
  134. <a-form-item label="点价期">
  135. <span class="white">{{ formatValue(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
  136. </a-form-item>
  137. </a-col>
  138. <a-col :span="12">
  139. <a-form-item label="交收期">
  140. <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate, "d"))}}</span>
  141. </a-form-item>
  142. </a-col>
  143. </a-row>
  144. </a-form>
  145. <a class="white">
  146. 其它信息
  147. </a>
  148. <a-form class="inlineForm"
  149. :form="form"
  150. @submit="handleSearch">
  151. <a-row :gutter="24">
  152. <a-col :span="12">
  153. <a-form-item label="保证金">
  154. <span class="white">{{ formatValue(selectedRow.contractmargin) }}</span>
  155. </a-form-item>
  156. </a-col>
  157. <a-col :span="12">
  158. <a-form-item label="业务员">
  159. <span class="white">{{ formatValue(selectedRow.saleuserlogincode) }}</span>
  160. </a-form-item>
  161. </a-col>
  162. </a-row>
  163. <a-row :gutter="24">
  164. <a-col :span="12">
  165. <a-form-item label="跟单员">
  166. <span class="white">{{ formatValue(selectedRow.meruserlogincode) }}</span>
  167. </a-form-item>
  168. </a-col>
  169. <a-col :span="12">
  170. <a-form-item label="期货账户">
  171. <span class="white">{{ formatValue(selectedRow.accountid) }}</span>
  172. </a-form-item>
  173. </a-col>
  174. </a-row>
  175. <a-row :gutter="24">
  176. <a-col :span="12">
  177. <a-form-item label="备注">
  178. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  179. </a-form-item>
  180. </a-col>
  181. </a-row>
  182. </a-form>
  183. </a-modal>
  184. </template>
  185. <script lang="ts">
  186. import { defineComponent, PropType, reactive, ref } from 'vue';
  187. import { closeModal } from '@/common/setup/modal/index';
  188. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  189. import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
  190. import { getStatusName } from '@/views/information/custom/setup';
  191. import { getContractStatusName, getPriceTypeName } from '@/views/information/spot-contract/setup';
  192. import { formatValue, formatTime } from '@/common/methods/format';
  193. export default defineComponent({
  194. name: 'spot-contract-detail',
  195. components: {},
  196. props: {
  197. selectedRow: {
  198. type: Object as PropType<Ermcp3ContractRsp>,
  199. default: {},
  200. },
  201. },
  202. setup() {
  203. const { visible, cancel } = closeModal('detail');
  204. const loading = ref<boolean>(false);
  205. function submit() {
  206. loading.value = true;
  207. setTimeout(() => {
  208. loading.value = false;
  209. cancel();
  210. }, 2000);
  211. }
  212. return {
  213. visible,
  214. cancel,
  215. submit,
  216. loading,
  217. formatValue,
  218. getContractStatusName,
  219. getPriceTypeName,
  220. formatTime,
  221. };
  222. },
  223. });
  224. </script>
  225. <style lang="less">
  226. .custom-detail {
  227. }
  228. .ant-form.inlineForm {
  229. margin-top: 20px;
  230. }
  231. .white {
  232. color: @m-white0;
  233. }
  234. .blue {
  235. color: @m-blue0;
  236. }
  237. .green {
  238. color: @m-green0;
  239. }
  240. </style
  241. >;