detail.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <xn-form-container title="详情" :width="900" :visible="visible" :destroy-on-close="true" @close="onClose">
  3. <a-form ref="formRef" :model="formData" :label-col="labelCol4" :wrapper-col="wrapperCol20">
  4. <a-divider dashed style="border-color: gray">起卸预约</a-divider>
  5. <a-descriptions :column="4" size="middle" bordered class="mb-2" :label-style="labelStyle" :contentStyle="contentStyle">
  6. <a-descriptions-item label="预约单号" :span="2">{{ formData.loadNumber }}</a-descriptions-item>
  7. <a-descriptions-item label="订单类型" :span="2">
  8. <a-tag
  9. :color="
  10. formData.orderType === '1'
  11. ? 'orange'
  12. : formData.orderType === '2'
  13. ? 'green'
  14. : 'purple'
  15. "
  16. >
  17. {{ $TOOL.dictTypeData('load_appoint_type', formData.orderType) }}
  18. </a-tag>
  19. </a-descriptions-item>
  20. <a-descriptions-item label="客户名称" :span="2">{{ formData.customerName }}</a-descriptions-item>
  21. <a-descriptions-item label="联系人" :span="2">{{ formData.customerContact }}</a-descriptions-item>
  22. <a-descriptions-item label="手机号" :span="2">{{ formData.customerPhone }}</a-descriptions-item>
  23. <a-descriptions-item label="客户地址" :span="2">{{ formData.customerAddress }}</a-descriptions-item>
  24. <a-descriptions-item label="货品名称" :span="2">{{ formData.goodsName }}</a-descriptions-item>
  25. <a-descriptions-item label="货品编码" :span="2">{{ formData.goodsCode }}</a-descriptions-item>
  26. <a-descriptions-item label="订单重量" :span="2">{{ formData.orderWeight +'吨'}}</a-descriptions-item>
  27. <a-descriptions-item label="单价" :span="2">{{ formData.orderPrice +'元/吨'}}</a-descriptions-item>
  28. <a-descriptions-item label="订单总额" :span="2">{{ formData.orderAmount +'元'}}</a-descriptions-item>
  29. <a-descriptions-item label="运费单价" :span="2">{{ formData.freightPrice +'元/吨'}}</a-descriptions-item>
  30. <a-descriptions-item label="订单状态" :span="2">
  31. <a-tag
  32. :color="
  33. formData.status === '1'
  34. ? 'blue'
  35. : formData.status === '2'
  36. ? 'warning'
  37. : formData.status === '3'
  38. ? 'processing'
  39. : formData.status === '4'
  40. ? 'volcano'
  41. : formData.status === '5'
  42. ? 'purple'
  43. : formData.status === '6'
  44. ? 'error'
  45. : formData.status === '7'
  46. ? 'red'
  47. : '#f50'
  48. "
  49. >
  50. {{ $TOOL.dictTypeData('load_appoint_status', formData.status) }}
  51. </a-tag>
  52. </a-descriptions-item>
  53. <a-descriptions-item label="船运供应商" :span="2">{{ formData.supplierName}}</a-descriptions-item>
  54. <a-descriptions-item label="创建时间" :span="2">{{ formData.createTime}}</a-descriptions-item>
  55. <a-descriptions-item label="创建人" :span="2">{{ formData.createUserName}}</a-descriptions-item>
  56. <a-descriptions-item label="签名" :span="4">
  57. <a-image v-if="formData.customerSign != null" :width="200" :src="formData.customerSign" />
  58. </a-descriptions-item>
  59. <a-descriptions-item label="签名时间" :span="4">
  60. {{formData.signTime}}
  61. </a-descriptions-item>
  62. <!-- <a-descriptions-item label="结束备注" :span="4">{{ formData.endReason}}</a-descriptions-item>
  63. <a-descriptions-item label="审核备注" :span="4">{{ formData.orderReason}}</a-descriptions-item>-->
  64. </a-descriptions>
  65. <a-divider dashed style="border-color: gray" >汽运供应商</a-divider>
  66. <a-table
  67. :dataSource="supplierDataSource"
  68. :columns="supplierDataColumns"
  69. :pagination="false"
  70. :bordered="true"
  71. >
  72. <template #bodyCell="{ column, record }">
  73. <template v-if="column.dataIndex === 'status'">
  74. <a-tag :color="record.status === '1' ? 'green' : 'red'">{{
  75. $TOOL.dictTypeData('examine_status', record.status)
  76. }}</a-tag>
  77. </template>
  78. </template>
  79. </a-table>
  80. </a-form>
  81. </xn-form-container>
  82. </template>
  83. <script setup name="recordDoubleForm">
  84. import { cloneDeep } from 'lodash-es'
  85. import bizOrderSupplierApi from '@/api/biz/bizOrderSupplierApi'
  86. import bizLoadAppointSupplierApi from '@/api/biz/bizLoadAppointSupplierApi'
  87. // 默认是关闭状态
  88. const visible = ref(false)
  89. const formData = ref({})
  90. const table = ref()
  91. const resultJson = ref()
  92. const labelStyle = {
  93. width: '20%'
  94. }
  95. const contentStyle = {
  96. width: '30%'
  97. }
  98. const labelCol4 = ref({span: 4, style: 'width: 26%; line-height: 20px; white-space: normal',})
  99. const labelCol8 = ref({span: 8, style: 'width: 26%; line-height: 20px; white-space: normal',})
  100. const wrapperCol20 = ref({span: 20})
  101. const supplierDataSource = ref([])
  102. const supplierDataColumns = [
  103. {
  104. title: '供应商名称',
  105. dataIndex: 'supplierName',
  106. align: 'center'
  107. },
  108. {
  109. title: '过磅重量(吨)',
  110. dataIndex: 'netWeight',
  111. align: 'center'
  112. },
  113. {
  114. title: '卸货重量(吨)',
  115. dataIndex: 'shippingWeight',
  116. align: 'center'
  117. },
  118. ]
  119. // 打开抽屉
  120. const onOpen = (record) => {
  121. visible.value = true
  122. //getRecordDoubleDetail(record)
  123. if(record){
  124. let recordData = cloneDeep(record)
  125. formData.value = Object.assign({}, recordData)
  126. bizLoadAppointSupplierApi.getList({appointId:formData.value.id}).then((res)=>{
  127. supplierDataSource.value = res
  128. })
  129. }
  130. }
  131. const getRecordDoubleDetail = (record) => {
  132. const param = {
  133. id: record.id
  134. }
  135. tbRecordDoubleApi.recordDoubleDetailPic(param).then((data) => {
  136. Object.assign(record, data)
  137. formData.value = record
  138. })
  139. }
  140. // 关闭抽屉
  141. const onClose = () => {
  142. resultJson.value = ''
  143. visible.value = false
  144. }
  145. // 调用这个函数将子组件的一些数据和方法暴露出去
  146. defineExpose({
  147. onOpen
  148. })
  149. </script>
  150. <style scoped>
  151. .imgDiv ::v-deep .ant-image {
  152. margin-left: 20px;
  153. margin-top: 10px;
  154. }
  155. .imgDiv ::v-deep .ant-image-mask-info {
  156. margin-left: 20px;
  157. margin-top: 10px;
  158. }
  159. </style>