Commit a3b8ca2d305aa39f119863e0b599810031a2c35d

Authored by 史婷婷
1 parent cd4c94b5

feat: 草稿要车单-审核&审核详情

  1 +<template>
  2 + <view class="detail-page">
  3 + <view class="section">
  4 + <text class="row company">{{ form.orderingUnitName }}</text>
  5 + <view class="row"><text class="label">订单编号</text><text class="value">{{ form.orderNo }}</text></view>
  6 + <view class="row"><text class="label">办事处</text><text class="value">{{ form.deptName }}</text></view>
  7 + <view class="row"><text class="label">生产厂</text><text class="value">{{ form.workshopName }}</text></view>
  8 + <view class="row"><text class="label">计划吨位(kg)</text><text class="value">{{ form.quantity }}</text></view>
  9 + <view class="row"><text class="label">计划装货日期</text><text class="value">{{ form.deliveryDate }}</text></view>
  10 + <view class="row"><text class="label">卸货地点</text><text class="value">{{ form.destination }}</text></view>
  11 + <view class="row"><text class="label">接货人/联络人</text><text class="value">{{ form.consignee }}</text></view>
  12 + <view class="row"><text class="label">联系电话</text><text class="value">{{ form.phone }}</text></view>
  13 + <view class="row"><text class="label">回货计划安排</text><text class="value">{{ form.returnPlanArrangement }}</text></view>
  14 + <view class="row"><text class="label">特殊需求、其他等</text><text class="value">{{ form.other }}</text></view>
  15 + <view class="row"><text class="label">装货特别要求/需求</text><text class="value">{{ form.specialLoadingRequirement }}</text></view>
  16 + </view>
  17 + </view>
  18 +</template>
  19 +
  20 +<script>
  21 +import {
  22 + getDetailApi
  23 +} from '@/api/draft_order.js'
  24 +
  25 +
  26 +export default {
  27 + name: 'DraftOrderViewer',
  28 + props: { id: { type: [String, Number], default: '' } },
  29 + components: {
  30 + },
  31 + data() {
  32 + return {
  33 + form: {},
  34 + }
  35 + },
  36 + computed: {
  37 + },
  38 + created() {
  39 + },
  40 + watch: {
  41 + id: {
  42 + immediate: true,
  43 + handler(val) {
  44 + const v = (val !== undefined && val !== null) ? String(val) : ''
  45 + if (v) this.loadDetail(v)
  46 + }
  47 + }
  48 + },
  49 +
  50 + methods: {
  51 + async loadDetail(id) {
  52 + try {
  53 + const res = await getDetailApi(id)
  54 + console.log('getDetailApi res', res)
  55 + const data = res.data || {};
  56 + this.form = {
  57 + ...data
  58 + }
  59 + } catch (e) {
  60 + console.error('loadDetail error', e)
  61 + }
  62 + },
  63 + getFormValues() {
  64 + const m = this.form || {}
  65 + return JSON.parse(JSON.stringify(m))
  66 + }
  67 + }
  68 +}
  69 +</script>
  70 +
  71 +<style lang="scss" scoped>
  72 +.detail-page {
  73 + padding-bottom: 144rpx;
  74 +}
  75 +
  76 +.section {
  77 + padding: 32rpx;
  78 + background: #fff;
  79 + margin-bottom: 20rpx;
  80 + position: relative;
  81 +}
  82 +
  83 +.row {
  84 + display: flex;
  85 + margin-bottom: 28rpx;
  86 +
  87 + &:last-child {
  88 + margin-bottom: 0;
  89 + }
  90 +
  91 + &.company {
  92 + font-size: 36rpx;
  93 + font-weight: 600;
  94 + color: rgba(0, 0, 0, 0.9);
  95 + padding-top: 10rpx;
  96 + margin-bottom: 32rpx;
  97 + line-height: 50rpx;
  98 + }
  99 +
  100 + .label {
  101 + width: 240rpx;
  102 + line-height: 32rpx;
  103 + font-size: 28rpx;
  104 + color: rgba(0, 0, 0, 0.6);
  105 + }
  106 +
  107 + .value {
  108 + flex: 1;
  109 + line-height: 32rpx;
  110 + font-size: 28rpx;
  111 + color: rgba(0, 0, 0, 0.9);
  112 + text-align: right;
  113 + word-break: break-all;
  114 + }
  115 +}
  116 +
  117 +.title-header {
  118 + background-color: #fff;
  119 + display: flex;
  120 + align-items: center;
  121 + padding: 32rpx 32rpx 22rpx;
  122 + border-bottom: 1rpx dashed #f0f0f0;
  123 +
  124 + &_icon {
  125 + width: 32rpx;
  126 + height: 28rpx;
  127 + margin-right: 16rpx;
  128 + }
  129 +
  130 + span {
  131 + color: rgba(0, 0, 0, 0.9);
  132 + font-size: 32rpx;
  133 + line-height: 44rpx;
  134 + font-weight: 600;
  135 + }
  136 +}
  137 +</style>
\ No newline at end of file
... ...
... ... @@ -10,6 +10,7 @@ import ChangeListViewer from '@/pages/change_list/viewer.vue'
10 10 import RevokeListViewer from '@/pages/revoke_list/viewer.vue'
11 11 import RestockApprovalViewer from '@/pages/replenishment_order/viewer.vue'
12 12 import RestockApprovalApprove from '@/pages/replenishment_order/approve.vue'
  13 +import DraftOrderViewer from '@/pages/draft_order/viewer.vue'
13 14
14 15 export default function registerComponents(Vue) {
15 16 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
... ... @@ -24,4 +25,5 @@ export default function registerComponents(Vue) {
24 25 Vue.component('RevokeListViewer', RevokeListViewer)
25 26 Vue.component('RestockApprovalViewer', RestockApprovalViewer)
26 27 Vue.component('RestockApprovalApprove', RestockApprovalApprove)
  28 + Vue.component('DraftOrderViewer', DraftOrderViewer)
27 29 }
\ No newline at end of file
... ...
... ... @@ -68,6 +68,11 @@ export const getSysFlowComponentPath = (bizFlag) => {
68 68 case 'RESTOCK_APPROVAL_EDIT': // 补货单
69 69 componentPath = 'RestockApprovalApprove'; // 补货单-审批
70 70 break;
  71 + case 'DRAFT_REQUEST_CAR': // 草稿要车单
  72 + componentPath = 'DraftOrderViewer'; // 草稿要车单-审批详情
  73 + break;
  74 + case 'DRAFT_REQUEST_CAR_EDIT': // 草稿要车单
  75 + componentPath = 'DraftOrderViewer'; // 草稿要车单-审批
71 76 }
72 77 return componentPath;
73 78 };
\ No newline at end of file
... ...