index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  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="cancel">关闭
  15. </a-button>
  16. <a-button key="submit"
  17. type="primary"
  18. :loading="loading"
  19. @click="pass">审核通过
  20. </a-button>
  21. <a-button key="submit"
  22. type="primary"
  23. :loading="loading"
  24. @click="refuse">审核拒绝
  25. </a-button>
  26. </template>
  27. <a-form class="inlineForm"
  28. :form="form"
  29. @submit="handleSearch">
  30. <fieldset class="formFieldSet" v-if="isShowContractInfo(selectedRow.inouttype)">
  31. <legend>合同基本信息</legend>
  32. <a-row :gutter="24">
  33. <a-col :span="12">
  34. <a-form-item label="合同编号">
  35. <span class="white">{{
  36. getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno)
  37. }}</span>
  38. </a-form-item>
  39. </a-col>
  40. <a-col :span="12">
  41. <a-form-item label="定价类型">
  42. <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</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.deliverygoodsname) }}</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="white">{{ formatValue(selectedRow.buyusername) }}</span>
  62. </a-form-item>
  63. </a-col>
  64. <a-col :span="12">
  65. <a-form-item label="合同签署量">
  66. <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
  67. </a-form-item>
  68. </a-col>
  69. </a-row>
  70. </fieldset>
  71. <fieldset class="formFieldSet">
  72. <legend>登记信息</legend>
  73. <a-row :gutter="24">
  74. <a-col :span="12">
  75. <a-form-item label="出库类型">
  76. <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
  77. </a-form-item>
  78. </a-col>
  79. <a-col :span="12">
  80. <a-form-item label="品类">
  81. <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
  82. </a-form-item>
  83. </a-col>
  84. </a-row>
  85. <a-row :gutter="24">
  86. <a-col :span="12">
  87. <a-form-item label="品牌">
  88. <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
  89. </a-form-item>
  90. </a-col>
  91. <a-col :span="12">
  92. <a-form-item label="入库仓库">
  93. <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
  94. </a-form-item>
  95. </a-col>
  96. </a-row>
  97. <a-row :gutter="24">
  98. <a-col :span="12">
  99. <a-form-item label="入库数量">
  100. <span class="white">{{
  101. formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid)
  102. }}</span>
  103. </a-form-item>
  104. </a-col>
  105. <a-col :span="12">
  106. <a-form-item label="登记时间">
  107. <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
  108. </a-form-item>
  109. </a-col>
  110. </a-row>
  111. <a-row :gutter="24">
  112. <a-col :span="12">
  113. <a-form-item label="登记人">
  114. <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
  115. </a-form-item>
  116. </a-col>
  117. <a-col :span="12">
  118. <a-form-item label="状态">
  119. <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
  120. </a-form-item>
  121. </a-col>
  122. </a-row>
  123. </fieldset>
  124. <fieldset class="formFieldSet">
  125. <legend>审核信息</legend>
  126. <a-row :gutter="24">
  127. <a-col :span="12">
  128. <a-form-item label="审核时间">
  129. <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
  130. </a-form-item>
  131. </a-col>
  132. <a-col :span="12">
  133. <a-form-item label="审核人">
  134. <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
  135. </a-form-item>
  136. </a-col>
  137. </a-row>
  138. <a-row :gutter="24">
  139. <a-col :span="12">
  140. <a-form-item label="审核意见">
  141. <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
  142. </a-form-item>
  143. </a-col>
  144. </a-row>
  145. </fieldset>
  146. </a-form>
  147. </a-modal>
  148. </template>
  149. <script lang="ts">
  150. import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
  151. import { closeModal } from '@/common/setup/modal/index';
  152. import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
  153. import { mergeObj } from '@/utils/objHandle';
  154. import { getStatusName } from '@/views/information/custom/setup';
  155. import { formatValue, formatTime } from '@/common/methods';
  156. import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
  157. import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
  158. import {getContractTypeName} from "@/views/information/spot-contract/setup";
  159. import {getPriceTypeName} from "@/views/business/purchase/setup";
  160. import {getGoodsUnit} from "@/views/information/goods/setup";
  161. import {getApplyStatusName} from "@/views/manage/business-review/setup";
  162. import {Modal} from "ant-design-vue";
  163. import {AreaInOutApplyAuditPassReq, AuditERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
  164. import Long from "long";
  165. import {getLongTypeLoginID} from "@/services/bus/login";
  166. import {LongType} from "@/services/socket/login/interface";
  167. import {passStockControl, refuseStockControl} from "@/views/manage/inventory-review/components/setup";
  168. import moment from "moment";
  169. export default defineComponent({
  170. name: 'inventory_review_checkin_audit',
  171. components: {},
  172. props: {
  173. selectedRow: {
  174. type: Object as PropType<Ermcp3AreaStockApply>,
  175. default: {},
  176. },
  177. },
  178. setup(props, context) {
  179. const { visible, cancel } = closeModal('inventory_review_checkin_audit');
  180. const loading = ref<boolean>(false);
  181. const maskClosableFlag = ref<boolean>(false);
  182. function submit() {
  183. loading.value = true;
  184. setTimeout(() => {
  185. loading.value = false;
  186. cancel();
  187. }, 200);
  188. }
  189. // 审核通过
  190. function pass() {
  191. Modal.confirm({
  192. title: '是否确认审核通过',
  193. okText: '确认审核通过',
  194. cancelText: '取消',
  195. onOk() {
  196. const param: AreaInOutApplyAuditPassReq = {
  197. InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid),
  198. AuditID: Long.fromString( (getLongTypeLoginID() as LongType).toString()),
  199. Remark: '',
  200. }
  201. passStockControl(param, loading)
  202. .then(res => {
  203. context.emit('refresh');
  204. cancel()
  205. })
  206. .catch(err => {
  207. })
  208. },
  209. onCancel() {
  210. console.log('Cancel');
  211. },
  212. });
  213. }
  214. // 审核拒绝
  215. function refuse(){
  216. Modal.confirm({
  217. title: '是否确认审核拒绝',
  218. okText: '确认审核拒绝',
  219. cancelText: '取消',
  220. onOk() {
  221. const param: AuditERMCPAreaInOutStockApplyReq = {
  222. InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid), // uint64 申请ID
  223. AuditID: Long.fromString( (getLongTypeLoginID() as LongType).toString()), // uint64 审核人
  224. AuditRemark: '', // string 审核备注
  225. AuditTradeDate: moment().format('YYYYMMDD'), // string 审核交易日(yyyyMMdd)
  226. ApplyStatus: 3, // int32 审核状态:3-审核拒绝 5-已撤回
  227. }
  228. refuseStockControl(param, loading)
  229. .then(res => {
  230. context.emit('refresh');
  231. cancel()
  232. })
  233. .catch(err => {
  234. })
  235. },
  236. onCancel() {
  237. console.log('Cancel');
  238. },
  239. });
  240. }
  241. return {
  242. visible,
  243. cancel,
  244. submit,
  245. loading,
  246. formatValue,
  247. getStatusName,
  248. maskClosableFlag,
  249. isShowContractInfo,
  250. getContractTypeName,
  251. getPriceTypeName,
  252. InOutTypeName,
  253. getGoodsUnit,
  254. getApplyStatusName,
  255. refuse,
  256. pass,
  257. };
  258. },
  259. });
  260. </script>
  261. <style lang="less">
  262. .inventory_review_checkin_audit {
  263. .ant-form.inlineForm {
  264. margin-top: 20px;
  265. }
  266. }
  267. </style>;