index.vue 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!-- 交易服务-出境检测-确认付款 -->
  2. <template>
  3. <app-drawer title="确认付款" :width="800" v-model:show="show" :loading="loading" :refresh="refresh">
  4. <el-descriptions :column="2" border v-if="details">
  5. <el-descriptions-item label="单据编号">{{ selectedRow.orderidstr }}</el-descriptions-item>
  6. <el-descriptions-item label="综合服务费">{{ details.servicefee }}</el-descriptions-item>
  7. <el-descriptions-item label="代缴物流保险费">{{ details.logisticsfee }}</el-descriptions-item>
  8. <el-descriptions-item label="GIA检测费">{{ details.giarmbfee }}</el-descriptions-item>
  9. <el-descriptions-item label="海关税费">{{ details.customsfee }}</el-descriptions-item>
  10. <el-descriptions-item label="汇款银行手续费">{{ details.bankfee }}</el-descriptions-item>
  11. <el-descriptions-item label="其它费用">{{ details.otherfee }}</el-descriptions-item>
  12. <el-descriptions-item label="总共">{{ details.settleamount }}</el-descriptions-item>
  13. <el-descriptions-item label="预收款">{{ details.advanceamount }}</el-descriptions-item>
  14. <el-descriptions-item label="应收\退款">{{ arrearage.toFixed(2) }}</el-descriptions-item>
  15. <el-descriptions-item label="结算费用详情文件">请下载文件“付款通知书(结算费用).pdf”</el-descriptions-item>
  16. <el-descriptions-item label="账户可用余额" v-if="arrearage >= 0">{{
  17. avaiableMoney.toFixed(2)
  18. }}</el-descriptions-item>
  19. </el-descriptions>
  20. <template #footer>
  21. <el-button @click="onCancel(false)" plain>取消</el-button>
  22. <el-button type="primary" :disabled="disabled" @click="onSubmit">确认</el-button>
  23. </template>
  24. </app-drawer>
  25. </template>
  26. <script lang="ts" setup>
  27. import { shallowRef, PropType, computed } from 'vue'
  28. import { ElMessage } from 'element-plus'
  29. import { useAccountStore } from '@/stores'
  30. import { useCJJCOrderOperate, useCJJCMemberOperate } from '@/business/customs/exit'
  31. import AppDrawer from '@pc/components/base/drawer/index.vue'
  32. const props = defineProps({
  33. selectedRow: {
  34. type: Object as PropType<Ermcp.GZCJJCOrderRsp>,
  35. required: true
  36. },
  37. })
  38. const { details, getGzcjjcorderoperate } = useCJJCOrderOperate(props.selectedRow)
  39. const { loading, formData, formSubmit } = useCJJCMemberOperate(props.selectedRow.orderidstr)
  40. const { avaiableMoney } = useAccountStore()
  41. const show = shallowRef(true)
  42. const refresh = shallowRef(false)
  43. // 应收\退款
  44. const arrearage = computed(() => {
  45. const { settleamount = 0, advanceamount = 0 } = details.value ?? {}
  46. return settleamount - advanceamount
  47. })
  48. const disabled = computed(() => {
  49. return arrearage.value > avaiableMoney.value
  50. })
  51. const onCancel = (isRefresh = false) => {
  52. show.value = false
  53. refresh.value = isRefresh
  54. }
  55. const onSubmit = () => {
  56. formData.OperateType = 5
  57. formSubmit().then(() => {
  58. ElMessage.success('提交成功')
  59. onCancel(true)
  60. }).catch((err) => {
  61. ElMessage.error('提交失败:' + err)
  62. })
  63. }
  64. getGzcjjcorderoperate()
  65. </script>