index.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <!-- 删除现货合同--->
  3. <a-modal class="recover-custom commonModal addSpotVariety"
  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. class="cancelBtn"
  13. @click="cancel">取消</a-button>
  14. <a-button key="submit"
  15. type="primary"
  16. :loading="loading"
  17. @click="submit">确认删除</a-button>
  18. </template>
  19. <a-form class="inlineForm">
  20. <fieldset class="formFieldSet">
  21. <legend>基本信息</legend>
  22. <a-row :gutter="24">
  23. <a-col :span="12">
  24. <a-form-item label="合同编号">
  25. <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :span="12">
  29. <a-form-item label="合同类型">
  30. <span class="white">{{ getContractTypeName(selectedRow.contracttype) }}</span>
  31. </a-form-item>
  32. </a-col>
  33. </a-row>
  34. <a-row :gutter="24">
  35. <a-col :span="12">
  36. <a-form-item label="业务类型">
  37. <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
  38. </a-form-item>
  39. </a-col>
  40. <a-col :span="12">
  41. <a-form-item label="采购方">
  42. <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
  43. </a-form-item>
  44. </a-col>
  45. </a-row>
  46. <a-row :gutter="24">
  47. <a-col :span="12">
  48. <a-form-item label="销售方">
  49. <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
  50. </a-form-item>
  51. </a-col>
  52. <a-col :span="12">
  53. <a-form-item label="合同附件">
  54. <span class="white">{{ formatValue(selectedRow.contracctstatus) }}</span>
  55. </a-form-item>
  56. </a-col>
  57. </a-row>
  58. <a-row :gutter="24">
  59. <a-col :span="12">
  60. <a-form-item label="状态">
  61. <span class="yellow">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
  62. </a-form-item>
  63. </a-col>
  64. </a-row>
  65. </fieldset>
  66. <fieldset class="formFieldSet">
  67. <legend>现货信息</legend>
  68. <a-row :gutter="24">
  69. <a-col :span="12">
  70. <a-form-item label="现货品种">
  71. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  72. </a-form-item>
  73. </a-col>
  74. <a-col :span="12">
  75. <a-form-item label="品类">
  76. <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</span>
  77. </a-form-item>
  78. </a-col>
  79. </a-row>
  80. <a-row :gutter="24">
  81. <a-col :span="12">
  82. <a-form-item label="品牌">
  83. <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
  84. </a-form-item>
  85. </a-col>
  86. <a-col :span="12">
  87. <a-form-item label="标仓系数">
  88. <span class="white">{{ formatValue(selectedRow.convertfactor) }}</span>
  89. </a-form-item>
  90. </a-col>
  91. </a-row>
  92. <a-row :gutter="24">
  93. <a-col :span="12">
  94. <a-form-item label="商品规格">
  95. <span class="white">{{ formatValue(selectedRow.spotgoodsdesc) }}</span>
  96. </a-form-item>
  97. </a-col>
  98. </a-row>
  99. </fieldset>
  100. <fieldset class="formFieldSet">
  101. <legend>价格信息</legend>
  102. <a-row :gutter="24">
  103. <a-col :span="12">
  104. <a-form-item label="定价类型">
  105. <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
  106. </a-form-item>
  107. </a-col>
  108. <a-col :span="12">
  109. <a-form-item label="数量">
  110. <span class="white">{{ formatValue(selectedRow.qty) }}</span>
  111. </a-form-item>
  112. </a-col>
  113. </a-row>
  114. <a-row :gutter="24">
  115. <a-col :span="12">
  116. <a-form-item label="点价合约">
  117. <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
  118. </a-form-item>
  119. </a-col>
  120. <a-col :span="12">
  121. <a-form-item label="升贴水">
  122. <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
  123. </a-form-item>
  124. </a-col>
  125. </a-row>
  126. <a-row :gutter="24">
  127. <a-col :span="12">
  128. <a-form-item label="点价期">
  129. <span class="white">{{ formatValue(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
  130. </a-form-item>
  131. </a-col>
  132. <a-col :span="12">
  133. <a-form-item label="交收期">
  134. <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate, "d"))}}</span>
  135. </a-form-item>
  136. </a-col>
  137. </a-row>
  138. </fieldset>
  139. <fieldset class="formFieldSet">
  140. <legend>其它信息</legend>
  141. <a-row :gutter="24">
  142. <a-col :span="12">
  143. <a-form-item label="保证金">
  144. <span class="white">{{ formatValue(selectedRow.contractmargin) }}</span>
  145. </a-form-item>
  146. </a-col>
  147. <a-col :span="12">
  148. <a-form-item label="业务员">
  149. <span class="white">{{ formatValue(selectedRow.saleuserlogincode) }}</span>
  150. </a-form-item>
  151. </a-col>
  152. </a-row>
  153. <a-row :gutter="24">
  154. <a-col :span="12">
  155. <a-form-item label="跟单员">
  156. <span class="white">{{ formatValue(selectedRow.meruserlogincode) }}</span>
  157. </a-form-item>
  158. </a-col>
  159. <a-col :span="12">
  160. <a-form-item label="期货账户">
  161. <span class="white">{{ formatValue(selectedRow.accountid) }}</span>
  162. </a-form-item>
  163. </a-col>
  164. </a-row>
  165. <a-row :gutter="24">
  166. <a-col :span="12">
  167. <a-form-item label="备注">
  168. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  169. </a-form-item>
  170. </a-col>
  171. </a-row>
  172. </fieldset>
  173. </a-form>
  174. </a-modal>
  175. </template>
  176. <script lang="ts">
  177. import { defineComponent, PropType, ref } from 'vue';
  178. import { closeModal } from '@/common/setup/modal/index';
  179. import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
  180. import { formatTime, formatValue } from '@/common/methods';
  181. import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
  182. import { message, Modal } from 'ant-design-vue';
  183. import { orderContractControl } from '@/views/information/spot-contract/components/setup';
  184. import { GldErmcpSpotContractOperateReq } from '@/services/proto/spotcontract/interface';
  185. import Long from 'long';
  186. export default defineComponent({
  187. name: 'delete-spot-contract',
  188. components: {},
  189. props: {
  190. selectedRow: {
  191. type: Object as PropType<Ermcp3ContractRsp>,
  192. default: {},
  193. },
  194. },
  195. setup(props, context) {
  196. const { visible, cancel } = closeModal('spot_contract_btn_delete');
  197. const loading = ref<boolean>(false);
  198. const maskClosableFlag = ref<boolean>(false);
  199. function submit() {
  200. Modal.confirm({
  201. title: '是否确认删除',
  202. okText: '确认删除',
  203. cancelText: '取消',
  204. onOk() {
  205. let params: GldErmcpSpotContractOperateReq = {
  206. SpotContractID: props.selectedRow.spotcontractid,
  207. OperateType: 3,
  208. Remark: '',
  209. };
  210. // 删除客户资料
  211. orderContractControl(params, loading)
  212. .then((res) => {
  213. // 通知上层 刷新数据
  214. context.emit('refresh');
  215. cancel();
  216. })
  217. .catch((err) => {});
  218. },
  219. onCancel() {
  220. console.log('Cancel');
  221. },
  222. });
  223. }
  224. return {
  225. visible,
  226. cancel,
  227. submit,
  228. loading,
  229. maskClosableFlag,
  230. formatValue,
  231. getPriceTypeName,
  232. getContractStatusName,
  233. formatTime,
  234. getContractTypeName,
  235. getBizTypeName,
  236. };
  237. },
  238. });
  239. </script>
  240. <style lang="less">
  241. .recover-custom {
  242. }
  243. </style
  244. >;