orderInfo.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <div v-if="info" class="flex1 ov-hd d-flex flex-cln pd-16">
  3. <div class="info-title f-w-5 mb-15">订单信息</div>
  4. <vxe-table ref="vxeTableRef" border :data="info?.testOrderDetailList" :merge-cells="mergeCells">
  5. <vxe-column title="订单号" fixed="left" width="120">
  6. <template #default>{{ info?.orderNo }}</template>
  7. </vxe-column>
  8. <vxe-column title="企业名称" min-width="100">
  9. <template #default>
  10. <div>{{ info?.cpyName }}</div>
  11. <div class="c-999 f-s-12">{{ info?.creditCode }}</div>
  12. </template>
  13. </vxe-column>
  14. <vxe-column title="会员级别" width="100">
  15. <template #default>
  16. {{ info?.vipLevelName }}
  17. </template>
  18. </vxe-column>
  19. <vxe-column title="套餐详情" min-width="100">
  20. <template #default="{ row }">
  21. {{ row?.packageName }}
  22. </template>
  23. </vxe-column>
  24. <vxe-column title="购买数量" width="90">
  25. <template #default="{ row }">
  26. {{ row?.quantity }}
  27. </template>
  28. </vxe-column>
  29. <vxe-column title="实收款" width="100">
  30. <template #default="{ row }">{{ row?.amount }}元</template>
  31. </vxe-column>
  32. <vxe-column title="支付方式" width="100">
  33. <template #default="{ row }">{{ row?.payType === '2' ? '微信支付' : '对公转账' }}</template>
  34. </vxe-column>
  35. <vxe-column title="下单人" min-width="100">
  36. <template #default>
  37. <div>{{ info?.createName }}</div>
  38. </template>
  39. </vxe-column>
  40. <vxe-column title="下单时间" min-width="100">
  41. <template #default>
  42. <div>{{ info?.createTime }}</div>
  43. </template>
  44. </vxe-column>
  45. <vxe-column title="订单状态" width="100">
  46. <template #default>
  47. <div>{{ selectDictLabel(test_order_status_bg, info?.status) }}</div>
  48. </template>
  49. </vxe-column>
  50. </vxe-table>
  51. <div class="pd-8"></div>
  52. <div class="d-flex flex1 ov-hd">
  53. <div class="left-step-box over-auto" style="width: 230px">
  54. <div class="steps-box">
  55. <template v-for="(item, index) in test_order_process" :key="index">
  56. <div class="steps-item d-flex" :class="{ 'checked': mapStatus(item.value)?.checked, 'active': mapStatus(item.value)?.active }">
  57. <div class="pr-16 steps-icon-box p-rtv">
  58. <div class="steps-line"></div>
  59. <div v-if="mapStatus(item.value)?.active" class="steps-ball-active">
  60. <el-icon><MoreFilled /></el-icon>
  61. </div>
  62. <el-icon v-else class="steps-icon"><CircleCheckFilled /></el-icon>
  63. </div>
  64. <div class="steps-content d-flex flex-cln flex1 ov-hd">
  65. <view class="f-s-16 mb-5">{{ mapStatus(item.value)?.operationDescription || item.label }}</view>
  66. <view class="steps-desc">{{ mapStatus(item.value)?.operationTime }}</view>
  67. </div>
  68. </div>
  69. </template>
  70. </div>
  71. </div>
  72. <div class="flex1 over-auto">
  73. <div class="pd-16 ov-hd" style="box-sizing: border-box;">
  74. <template v-if="+info.status >= 6 && info?.status !== '90'">
  75. <el-descriptions title="发票信息" :column="3">
  76. <el-descriptions-item label="上传人:">{{ info?.invoiceLog?.operator }}</el-descriptions-item>
  77. <el-descriptions-item label="上传时间:">{{ info?.invoiceLog?.operationTime }}</el-descriptions-item>
  78. <el-descriptions-item v-if="info?.invoice" label="发票:">
  79. <FileLook v-model="info.invoice" isObject></FileLook>
  80. </el-descriptions-item>
  81. </el-descriptions>
  82. <el-divider />
  83. </template>
  84. <template v-if="+info.status >= 5 && info?.status !== '90'">
  85. <el-descriptions title="检测报告" :column="4">
  86. <el-descriptions-item label="上传人:">{{ info?.reportLog?.operator}}</el-descriptions-item>
  87. <el-descriptions-item label="上传时间:">{{ info?.reportLog?.operationTime }}</el-descriptions-item>
  88. <el-descriptions-item label="检测单位:">{{ info?.testOrg }}</el-descriptions-item>
  89. <el-descriptions-item v-if="info?.report" class-name="zy-desc" label="检测报告:">
  90. <FileLook v-model="info.report" isObject></FileLook>
  91. </el-descriptions-item>
  92. </el-descriptions>
  93. <el-divider />
  94. </template>
  95. <template v-if="+info.status >= 2 && info?.status !== '90' && info?.postInfo?.length">
  96. <div class="f-s-16 c-333 f-w-6 mb-16">物流信息</div>
  97. <div class="d-flex a-c mb-10">
  98. <img class="mr-10" style="width: 30px; height: 30px;" src="@/assets/images/sf_icon.png" />
  99. <div>
  100. <span class="f-s-14 mr-16">顺丰快递</span>
  101. <span class="c-999 f-s-12">{{ info?.postInfo[0]?.mailno }}</span>
  102. </div>
  103. </div>
  104. <el-steps direction="vertical" :active="1">
  105. <template v-for="(item, index) in info?.postInfo" :key="index">
  106. <el-step>
  107. <template #icon>
  108. <el-button v-if="item.opCode === '80'" type="primary" circle size="small">收</el-button>
  109. <div class="dot" :class="{ ['active' + index]: true }"></div>
  110. </template>
  111. <template #title>
  112. <span>{{ selectDictLabel(sf_router_code, item?.opCode) }}</span>
  113. <span>{{ item?.acceptTime }}</span>
  114. </template>
  115. <template #description>
  116. <div class="pt-10 pb-10">
  117. <span class="f-s-14 c-666">[{{ item.acceptAddress }}]</span>
  118. <span class="f-s-14 c-666">{{ item?.remark }}</span>
  119. </div>
  120. </template>
  121. </el-step>
  122. </template>
  123. </el-steps>
  124. <el-divider />
  125. </template>
  126. <template v-if="+info.status >= 2 && +info?.originStatus >= 2 && info?.sendAddress">
  127. <div class="f-s-16 c-333 f-w-6 mb-16">寄样信息</div>
  128. <div class="d-flex a-c">
  129. <div class="card-blcok pd-16 d-flex flex1">
  130. <div class="mr-16">
  131. <el-button type="danger" circle>取</el-button>
  132. </div>
  133. <div class="flex1 ov-hd">
  134. <div class="f-s-14 c-333 f-w-5 mb-5">{{ info?.sendAddress?.province + info?.sendAddress?.city + info?.sendAddress?.district + info?.sendAddress?.address }}</div>
  135. <div class="f-s-14 c-999">
  136. <span class="mr-30">{{ info?.sendAddress?.contactName }}</span>
  137. <span>{{ info?.sendAddress?.contactPhone }}</span>
  138. </div>
  139. </div>
  140. </div>
  141. <div class="c-primary f-w-6 pd-20" style="font-size: 30px;">
  142. <el-icon><Right /></el-icon>
  143. </div>
  144. <div class="card-blcok pd-16 d-flex flex1">
  145. <div class="mr-16">
  146. <el-button type="primary" circle>收</el-button>
  147. </div>
  148. <div class="flex1 ov-hd">
  149. <div class="f-s-14 c-333 f-w-5 mb-5">{{ info?.orgAddress?.province + info?.orgAddress?.city + info?.orgAddress?.district + info?.orgAddress?.address }}</div>
  150. <div class="f-s-14 c-999">
  151. <span class="mr-30">{{ info?.orgAddress?.contactName }}</span>
  152. <span>{{ info?.orgAddress?.contactPhone }}</span>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="pd-8"></div>
  158. <el-descriptions :column="4">
  159. <el-descriptions-item label="取件时间:">{{ info?.reservationTime}}</el-descriptions-item>
  160. </el-descriptions>
  161. <el-divider />
  162. </template>
  163. <el-descriptions title="订单信息" :column="4">
  164. <el-descriptions-item label="订单号:">{{ info?.orderNo }}</el-descriptions-item>
  165. <el-descriptions-item label="下单人:">{{ info?.createName }}</el-descriptions-item>
  166. <el-descriptions-item label="下单时间:">{{ info?.createTime }}</el-descriptions-item>
  167. <el-descriptions-item label="收货地址:">{{ info?.reciveAddress?.province + info?.reciveAddress?.city + info?.reciveAddress?.district + info?.reciveAddress?.address }}</el-descriptions-item>
  168. <el-descriptions-item label="收件人:">{{ info?.reciveAddress?.contactName }}</el-descriptions-item>
  169. <el-descriptions-item label="联系电话:">{{ info?.reciveAddress?.contactPhone }}</el-descriptions-item>
  170. </el-descriptions>
  171. <el-descriptions v-if="+info?.hasInvoice" title="发票信息" :column="4">
  172. <el-descriptions-item label="发票抬头:">{{ info?.invoiceInfo?.headTitle }}</el-descriptions-item>
  173. <el-descriptions-item label="税号:">{{ info?.invoiceInfo?.taxSn }}</el-descriptions-item>
  174. <el-descriptions-item label="收票邮箱:">{{ info?.invoiceInfo?.email || '-' }}</el-descriptions-item>
  175. <el-descriptions-item label="单位地址:">{{ info?.invoiceInfo?.address || '-' }}</el-descriptions-item>
  176. <el-descriptions-item label="电话号码:">{{ info?.invoiceInfo?.contactPhone || '-' }}</el-descriptions-item>
  177. <el-descriptions-item label="开户银行:">{{ info?.invoiceInfo?.bankName || '-' }}</el-descriptions-item>
  178. <el-descriptions-item label="银行账户:">{{ info?.invoiceInfo?.bankAccount || '-' }}</el-descriptions-item>
  179. </el-descriptions>
  180. </div>
  181. </div>
  182. </div>
  183. </div>
  184. </template>
  185. <script setup lang="ts">
  186. import { propTypes } from '@/utils/propTypes';
  187. import { VxeTablePropTypes } from 'vxe-table';
  188. import { colNoData } from '@/utils/noData';
  189. import { FileLook } from '@/views/models';
  190. const { proxy } = getCurrentInstance() as ComponentInternalInstance;
  191. const { test_order_status_bg, sf_router_code, test_order_process } = toRefs<any>(proxy?.useDict('test_order_status_bg', 'sf_router_code', 'test_order_process'));
  192. const vxeTableRef = ref<any>(null);
  193. const list = ref<any[]>([]);
  194. const props = defineProps({
  195. info: propTypes.any.def(null)
  196. });
  197. const mapStatus = (value) => {
  198. const logoIndex = props?.info?.logList.findIndex(({ operationType }) => operationType === value)
  199. if (logoIndex !== -1) {
  200. return {
  201. ...props?.info?.logList[logoIndex],
  202. checked: logoIndex < props?.info?.logList.length - 1,
  203. active: logoIndex === props?.info?.logList.length - 1
  204. }
  205. } else {
  206. return {
  207. checked: false,
  208. active: false
  209. }
  210. }
  211. // return
  212. }
  213. // 合并表格
  214. const mergeCells = ref<VxeTablePropTypes.MergeCells>([
  215. { row: 0, col: 0, rowspan: 3, colspan: 0 },
  216. { row: 0, col: 1, rowspan: 3, colspan: 0 },
  217. { row: 0, col: 2, rowspan: 3, colspan: 0 },
  218. { row: 0, col: 6, rowspan: 3, colspan: 0 },
  219. { row: 0, col: 7, rowspan: 3, colspan: 0 },
  220. { row: 0, col: 8, rowspan: 3, colspan: 0 }
  221. ]);
  222. const steps = ref([
  223. { label: '付款信息', name: '待寄样', value: '1' },
  224. { label: '寄样信息', name: '待寄样', value: '2' },
  225. { label: '物流信息', name: '已在途', value: '3' },
  226. { label: '检测报告', name: '待开票', value: '4' },
  227. { label: '发票信息', name: '已完成', value: '5' }
  228. ]);
  229. </script>
  230. <style lang="scss" scoped>
  231. .card-blcok {
  232. border: 1px solid #f2f2f2;
  233. border-radius: 4px;
  234. }
  235. .dot {
  236. width: 20px;
  237. height: 20px;
  238. background-color: #d7d7d7;
  239. border-radius: 50%;
  240. &.active0 {
  241. background-color: #2A6D52;
  242. }
  243. &.active1 {
  244. background-color: #333;
  245. }
  246. }
  247. .zy-desc {
  248. display: inline-block;
  249. }
  250. .left-step-box {
  251. box-sizing: border-box;
  252. padding: 16px;
  253. border-right: 1px solid #d7d7d7;
  254. }
  255. .steps-box {
  256. .steps-item {
  257. cursor: pointer;
  258. &:last-child {
  259. .steps-line {
  260. border-color: transparent;
  261. }
  262. }
  263. &.checked {
  264. .steps-icon {
  265. color: var(--el-color-primary);
  266. }
  267. .steps-content {
  268. color: #000;
  269. }
  270. }
  271. &.active {
  272. .steps-icon {
  273. color: var(--el-color-primary);
  274. }
  275. .steps-content {
  276. color: #000;
  277. }
  278. }
  279. }
  280. .steps-content {
  281. color: #ebebeb;
  282. }
  283. .steps-desc {
  284. margin-bottom: 20px;
  285. color: #bbb;
  286. font-size: 14px;
  287. }
  288. .steps-icon {
  289. font-size: 22px;
  290. color: #cbcbcb;
  291. }
  292. .steps-line {
  293. position: absolute;
  294. top: 22px;
  295. left: 10px;
  296. bottom: 0;
  297. width: 1px;
  298. border: 1px dashed #f4f4f4;
  299. }
  300. .steps-ball-active {
  301. display: inline-flex;
  302. align-items: center;
  303. justify-content: center;
  304. width: 22px;
  305. height: 22px;
  306. border-radius: 50%;
  307. font-size: 14px;
  308. color: #fff;
  309. background-color: #edb72f;
  310. }
  311. }
  312. </style>