index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <!-- 交收审核-->
  3. <a-modal class="add-custom custom-detail" title="交收审核" v-model:visible="visible" centered :maskClosable="false" @cancel="cancel" width="890px">
  4. <template #footer>
  5. <a-button type="primary" :loading="loading" @click="cancel">关闭</a-button>
  6. <a-button v-if="isShowContractCheck(selectedRow.applystatus)" type="primary" :loading="loading" @click="pass">审核通过
  7. </a-button>
  8. <a-button v-if="isShowContractCheck(selectedRow.applystatus)" type="primary" :loading="loading" @click="refuse">审核拒绝
  9. </a-button>
  10. </template>
  11. <a-form class="inlineForm">
  12. <fieldset class="formFieldSet">
  13. <legend>合同基本信息</legend>
  14. <a-row :gutter="24">
  15. <a-col :span="12">
  16. <a-form-item label="合同编号">
  17. <span class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
  18. </a-form-item>
  19. </a-col>
  20. <a-col :span="12">
  21. <a-form-item label="点价类型">
  22. <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
  23. </a-form-item>
  24. </a-col>
  25. </a-row>
  26. <a-row :gutter="24">
  27. <a-col :span="12">
  28. <a-form-item label="销售方">
  29. <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
  30. </a-form-item>
  31. </a-col>
  32. <a-col :span="12">
  33. <a-form-item label="现货品种">
  34. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  35. </a-form-item>
  36. </a-col>
  37. </a-row>
  38. </fieldset>
  39. <fieldset class="formFieldSet">
  40. <legend>待审核登记信息</legend>
  41. <a-row :gutter="24">
  42. <a-col :span="12">
  43. <a-form-item label="交收量">
  44. <span class="white">{{ formatValue(selectedRow.reckonrealqty) }}</span>
  45. </a-form-item>
  46. </a-col>
  47. <a-col :span="12">
  48. <a-form-item label="其它费用">
  49. <span class="white">{{ formatValue(selectedRow.reckonotheramount) }}</span>
  50. </a-form-item>
  51. </a-col>
  52. </a-row>
  53. <a-row :gutter="24">
  54. <a-col :span="12">
  55. <a-form-item label="调整保证金">
  56. <span class="white">{{
  57. formatValue(selectedRow.addmargin !== 0 && selectedRow.addmargin !== undefined ?
  58. "+" + formatValue(selectedRow.addmargin) : (selectedRow.decmargin === 0 ? 0.0 : "-" + formatValue(selectedRow.decmargin)))
  59. }}</span>
  60. </a-form-item>
  61. </a-col>
  62. <a-col :span="12">
  63. <a-form-item label="调整金额">
  64. <span class="white">{{ formatValue(selectedRow.reckonadjustamount) }}</span>
  65. </a-form-item>
  66. </a-col>
  67. </a-row>
  68. <a-row :gutter="24">
  69. <a-col :span="12">
  70. <a-form-item label="登记时间">
  71. <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
  72. </a-form-item>
  73. </a-col>
  74. <a-col :span="12">
  75. <a-form-item label="登记人">
  76. <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
  77. </a-form-item>
  78. </a-col>
  79. </a-row>
  80. </fieldset>
  81. </a-form>
  82. </a-modal>
  83. </template>
  84. <script lang="ts">
  85. import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
  86. import { closeModal } from '@/common/setup/modal/index';
  87. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  88. import { mergeObj } from '@/utils/objHandle';
  89. import { getStatusName } from '@/common/constants/enumsName';
  90. import { formatValue, formatTime } from '@/common/methods';
  91. import { QryBussinessJsRsp } from '@/services/go/ermcp/business-review/interface';
  92. import { Modal } from 'ant-design-vue';
  93. import { ContractOperateApplyReq } from '@/services/proto/contract/interface';
  94. import Long from 'long';
  95. import { somePriceControl } from '@/views/manage/business-review/components/setup';
  96. import { getContractTypeName, getPriceTypeName } from '@/common/constants/enumsName';
  97. import { isShowContractCheck } from '@/views/manage/inventory-review/setup';
  98. import { _closeModal } from '@/common/setup/modal/modal';
  99. export default defineComponent({
  100. name: 'business_review_settlement_audit',
  101. emits: ['cancel', 'update'],
  102. props: {
  103. selectedRow: {
  104. type: Object as PropType<QryBussinessJsRsp>,
  105. default: {},
  106. },
  107. },
  108. setup(props, context) {
  109. const { visible, cancel } = _closeModal(context);
  110. const loading = ref<boolean>(false);
  111. const maskClosableFlag = ref<boolean>(false);
  112. // 审核通过
  113. function pass() {
  114. Modal.confirm({
  115. title: '是否确认审核通过',
  116. okText: '审核通过',
  117. cancelText: '取消',
  118. onOk() {
  119. const param: ContractOperateApplyReq = {
  120. OperateApplyID: Long.fromString(props.selectedRow.operateapplyid),
  121. OperateType: 2,
  122. };
  123. somePriceControl(param, loading)
  124. .then((res) => {
  125. cancel(true);
  126. })
  127. .catch((err) => { });
  128. },
  129. onCancel() { },
  130. });
  131. }
  132. // 审核拒绝
  133. function refuse() {
  134. Modal.confirm({
  135. title: '是否确认审核拒绝',
  136. okText: '审核拒绝',
  137. cancelText: '取消',
  138. onOk() {
  139. const param: ContractOperateApplyReq = {
  140. OperateApplyID: Long.fromString(props.selectedRow.operateapplyid),
  141. OperateType: 3,
  142. };
  143. somePriceControl(param, loading)
  144. .then((res) => {
  145. cancel(true);
  146. })
  147. .catch((err) => { });
  148. },
  149. onCancel() { },
  150. });
  151. }
  152. return {
  153. visible,
  154. cancel,
  155. loading,
  156. formatValue,
  157. getStatusName,
  158. maskClosableFlag,
  159. pass,
  160. refuse,
  161. getPriceTypeName,
  162. getContractTypeName,
  163. isShowContractCheck,
  164. };
  165. },
  166. });
  167. </script>
  168. <style lang="less">
  169. .business_review_settlement_audit {
  170. .ant-form.inlineForm {
  171. margin-top: 20px;
  172. }
  173. }
  174. </style>