DisposalStep3.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <div>
  3. <CommonTable
  4. :is-select="!isOperation" :is-checkbox="false" :is-disabled="isReadonly" :have-page="false"
  5. :columns="quoteColumns" :data-source="quoteDatas" @get-selected="getSelectedInfo"
  6. >
  7. <template #title>
  8. <div><span>买受方报价</span></div>
  9. <a-divider style="margin: 8px 0;" />
  10. <span>处置形式:{{ disposalForm ? disposalForm.label : disposalFormData }}</span>
  11. </template>
  12. <template #bodyCell="{ column, record }">
  13. <template v-if="column.dataIndex === 'quotation' && !isOperation">
  14. <a-input-number v-model:value="record.quotation" :controls="false" :step="0.01" style="width: 100%;" />
  15. </template>
  16. <template v-if="column.dataIndex === 'operation'">
  17. <a-button type="link">评价</a-button>
  18. </template>
  19. </template>
  20. </CommonTable>
  21. </div>
  22. </template>
  23. <script setup>
  24. import { quoteColumn } from './assetConfig.js';
  25. import CommonTable from '../assetsDisposal/AssetCommonTable.vue';
  26. import { ref, defineProps, watch, computed, defineEmits } from 'vue';
  27. const emits = defineEmits(['getAcceptor']);
  28. const props = defineProps({
  29. acceptorInfo: {
  30. type: Object,
  31. default: null,
  32. },
  33. disposalForm: {
  34. type: Object,
  35. default: null,
  36. },
  37. isOperation: {
  38. type: Boolean,
  39. default: true,
  40. },
  41. isReadonly: {
  42. type: Boolean,
  43. default: false,
  44. },
  45. readDatas: {
  46. type: Object,
  47. default: null,
  48. },
  49. });
  50. const quoteDatas = ref([]);
  51. // const quoteColumns = ref(quoteColumn);
  52. const disposalFormData = ref('');
  53. const quoteColumns = computed(() => {
  54. if (!props.isOperation) {
  55. return quoteColumn.filter(item => item.dataIndex != 'operation');
  56. } else {
  57. return quoteColumn;
  58. }
  59. });
  60. const getSelectedInfo = info => {
  61. emits('getAcceptor', info.selectedRows[0]);
  62. };
  63. watch(() => props.acceptorInfo, newValue => {
  64. if (newValue) {
  65. quoteDatas.value = [newValue];
  66. }
  67. }, { immediate: true });
  68. watch(() => props.readDatas, newValue => {
  69. if (newValue) {
  70. quoteDatas.value = [newValue.innerBuyerVo];
  71. if(!props.disposalForm){
  72. disposalFormData.value = newValue.assetDetailsVo.disposalWay;
  73. }
  74. }
  75. }, { immediate: true });
  76. </script>
  77. <style scoped></style>