index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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. class="cancelBtn"
  13. @click="refuse">审核拒绝</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. <div class="upload">
  55. <div class="look">{{ formatValue(selectedRow.contracctstatus) }}</div>
  56. </div>
  57. </a-form-item>
  58. </a-col>
  59. </a-row>
  60. <a-row :gutter="24">
  61. <a-col :span="24">
  62. <a-form-item label="状态">
  63. <span class="green">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
  64. </a-form-item>
  65. </a-col>
  66. </a-row>
  67. </fieldset>
  68. <fieldset class="formFieldSet">
  69. <legend>现货信息</legend>
  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="24">
  96. <a-form-item label="商品规格">
  97. <span class="white">{{ formatValue(selectedRow.spotgoodsdesc) }}</span>
  98. </a-form-item>
  99. </a-col>
  100. </a-row>
  101. </fieldset>
  102. <fieldset class="formFieldSet">
  103. <legend>价格信息</legend>
  104. <a-row :gutter="24">
  105. <a-col :span="12">
  106. <a-form-item label="定价类型">
  107. <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
  108. </a-form-item>
  109. </a-col>
  110. <a-col :span="12">
  111. <a-form-item label="数量">
  112. <span class="white">{{ formatValue(selectedRow.qty) }}</span>
  113. </a-form-item>
  114. </a-col>
  115. </a-row>
  116. <a-row :gutter="24">
  117. <a-col :span="12">
  118. <a-form-item label="点价合约">
  119. <span class="white">{{ formatValue(selectedRow.goodscode) }}</span>
  120. </a-form-item>
  121. </a-col>
  122. <a-col :span="12">
  123. <a-form-item label="升贴水">
  124. <span class="white">{{ formatValue(selectedRow.pricemove) }}</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(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
  132. </a-form-item>
  133. </a-col>
  134. <a-col :span="12">
  135. <a-form-item label="交收期">
  136. <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate, "d"))}}</span>
  137. </a-form-item>
  138. </a-col>
  139. </a-row>
  140. </fieldset>
  141. <fieldset class="formFieldSet">
  142. <legend>其他信息</legend>
  143. <a-row :gutter="24">
  144. <a-col :span="12">
  145. <a-form-item label="保证金">
  146. <span class="white">{{ formatValue(selectedRow.contractmargin) }}</span>
  147. </a-form-item>
  148. </a-col>
  149. <a-col :span="12">
  150. <a-form-item label="业务员">
  151. <a-select class="inlineFormSelect"
  152. style="width: 200px"
  153. placeholder="请选择业务员">
  154. <a-select-option value="1">
  155. 客户一
  156. </a-select-option>
  157. <a-select-option value="2">
  158. 客户二
  159. </a-select-option>
  160. </a-select>
  161. </a-form-item>
  162. </a-col>
  163. </a-row>
  164. <a-row :gutter="24">
  165. <a-col :span="12">
  166. <a-form-item label="跟单员">
  167. <a-select class="inlineFormSelect"
  168. style="width: 200px"
  169. placeholder="请选择跟单员">
  170. <a-select-option value="1">
  171. 客户一
  172. </a-select-option>
  173. <a-select-option value="2">
  174. 客户二
  175. </a-select-option>
  176. </a-select>
  177. </a-form-item>
  178. </a-col>
  179. <a-col :span="12">
  180. <a-form-item label="期货账户">
  181. <a-select class="inlineFormSelect"
  182. style="width: 200px"
  183. placeholder="请选择期货账户">
  184. <a-select-option value="1">
  185. 客户一
  186. </a-select-option>
  187. <a-select-option value="2">
  188. 客户二
  189. </a-select-option>
  190. </a-select>
  191. </a-form-item>
  192. </a-col>
  193. </a-row>
  194. <a-row :gutter="24">
  195. <a-col :span="24">
  196. <a-form-item label="备注">
  197. <span class="white">{{ formatValue(selectedRow.remark) }}</span>
  198. </a-form-item>
  199. </a-col>
  200. </a-row>
  201. </fieldset>
  202. <fieldset class="formFieldSet">
  203. <legend>审核信息</legend>
  204. <a-row :gutter="24">
  205. <a-col :span="24">
  206. <a-form-item label="审核意见">
  207. <a-input class="dialogInput"
  208. style="width: 620px"
  209. placeholder="请输入审核意见" />
  210. </a-form-item>
  211. </a-col>
  212. </a-row>
  213. </fieldset>
  214. </a-form>
  215. </a-modal>
  216. </template>
  217. <script lang="ts">
  218. import {defineComponent, PropType, ref} from 'vue';
  219. import { closeModal } from '@/common/setup/modal/index';
  220. import {
  221. getBizTypeName,
  222. getContractStatusName,
  223. getContractTypeName,
  224. getPriceTypeName
  225. } from "@/views/information/spot-contract/setup";
  226. import {Ermcp3ContractRsp} from "@/services/go/ermcp/spot-contract/interface";
  227. import {formatTime, formatValue} from "@/common/methods";
  228. import {changeOrderContract, OrderContractControl} from "@/views/information/spot-contract/components/setup";
  229. import {Modal} from "ant-design-vue";
  230. export default defineComponent({
  231. name: 'spot-contract-detail',
  232. components: {},
  233. props: {
  234. selectedRow: {
  235. type: Object as PropType<Ermcp3ContractRsp>,
  236. default: {},
  237. },
  238. },
  239. setup(props, context) {
  240. const { visible, cancel } = closeModal('spot_contract_btn_check');
  241. const { loading, orderContractState } = changeOrderContract()
  242. const maskClosableFlag = ref<boolean>(false);
  243. function submit() {
  244. Modal.confirm({
  245. title: '是否确认审核通过',
  246. okText: '确认审核通过',
  247. cancelText: '取消',
  248. onOk() {
  249. // 审核通过
  250. orderContractState(props.selectedRow.spotcontractid, 4)
  251. .then(res => {
  252. cancel()
  253. context.emit('refresh')
  254. })
  255. .catch(err => {
  256. })
  257. },
  258. onCancel() {
  259. console.log('Cancel');
  260. },
  261. });
  262. }
  263. function refuse(){
  264. Modal.confirm({
  265. title: '是否确认审核拒绝',
  266. okText: '确认审核拒绝',
  267. cancelText: '取消',
  268. onOk() {
  269. // 审核拒绝
  270. OrderContractControl().orderContractState(props.selectedRow.spotcontractid, 4)
  271. .then(res => {
  272. cancel()
  273. context.emit('refresh')
  274. })
  275. .catch(err => {
  276. })
  277. },
  278. onCancel() {
  279. console.log('Cancel');
  280. },
  281. });
  282. }
  283. return {
  284. visible,
  285. cancel,
  286. submit,
  287. loading,
  288. maskClosableFlag,
  289. getContractTypeName,
  290. getBizTypeName,
  291. formatValue,
  292. getContractStatusName,
  293. formatTime,
  294. getPriceTypeName,
  295. refuse,
  296. };
  297. },
  298. });
  299. </script>
  300. <style lang="less">
  301. .add-custom custom-detail {
  302. .upload {
  303. .look {
  304. margin-left: 0;
  305. }
  306. }
  307. }
  308. </style>;