Commit a423cdc9f800a1154853bfb2d49b85a2db6fb229

Authored by 史婷婷
1 parent 77e1c7c6

feat: 延期发货单-审核详情&审核-暂存

  1 +<template>
  2 + <view class="page">
  3 + <view class="section">
  4 + <text class="row company">{{ form.deptName }}</text>
  5 + <view class="row"><text class="label">要车日期</text><text class="value">{{ form.applyDate }}</text></view>
  6 + </view>
  7 +
  8 + <!-- 产品 -->
  9 + <view class="section2">
  10 + <Product mode="view" :list="form.delayedShipmentDetailList" />
  11 + </view>
  12 + </view>
  13 +</template>
  14 +
  15 +<script>
  16 +import { getDetailApi } from '@/api/delay_invoice.js'
  17 +import Product from './product.vue'
  18 +
  19 +export default {
  20 + name: 'DelayInvoiceViewer',
  21 + components: { Product },
  22 + props: { id: { type: [String, Number], default: '' } },
  23 + data() {
  24 + return {
  25 + form: {},
  26 + }
  27 + },
  28 + computed: {
  29 + },
  30 + watch: {
  31 + id: {
  32 + immediate: true,
  33 + handler(val) {
  34 + const v = (val !== undefined && val !== null) ? String(val) : ''
  35 + if (v) this.loadDetail(v)
  36 + }
  37 + }
  38 + },
  39 + onLoad(query) {
  40 + },
  41 + methods: {
  42 + async loadDetail(id) {
  43 + try {
  44 + const res = await getDetailApi(id)
  45 + this.form = res.data || {}
  46 + } catch (e) {
  47 + this.form = {}
  48 + }
  49 + },
  50 + getFormValues() {
  51 + const m = this.form || {}
  52 + return JSON.parse(JSON.stringify(m))
  53 + },
  54 + }
  55 +}
  56 +</script>
  57 +
  58 +<style lang="scss" scoped>
  59 +
  60 +.section {
  61 + padding: 32rpx;
  62 + background: #fff;
  63 + margin-bottom: 20rpx;
  64 + position: relative;
  65 +
  66 +}
  67 +
  68 +.row {
  69 + display: flex;
  70 + margin-bottom: 28rpx;
  71 +
  72 + &:last-child {
  73 + margin-bottom: 0;
  74 + }
  75 +
  76 + &.company {
  77 + font-size: 36rpx;
  78 + font-weight: 600;
  79 + color: rgba(0, 0, 0, 0.9);
  80 + padding-top: 10rpx;
  81 + margin-bottom: 32rpx;
  82 + line-height: 50rpx;
  83 + }
  84 +
  85 + .label {
  86 + width: 240rpx;
  87 + line-height: 32rpx;
  88 + font-size: 28rpx;
  89 + color: rgba(0, 0, 0, 0.6);
  90 + }
  91 +
  92 + .value {
  93 + flex: 1;
  94 + line-height: 32rpx;
  95 + font-size: 28rpx;
  96 + color: rgba(0, 0, 0, 0.9);
  97 + text-align: right;
  98 + word-break: break-all;
  99 + }
  100 +}
  101 +
  102 +.title-header {
  103 + background-color: #fff;
  104 + display: flex;
  105 + align-items: center;
  106 + padding: 32rpx 32rpx 22rpx;
  107 + border-bottom: 1rpx dashed #f0f0f0;
  108 +
  109 + &_icon {
  110 + width: 32rpx;
  111 + height: 28rpx;
  112 + margin-right: 16rpx;
  113 + }
  114 +
  115 + span {
  116 + color: rgba(0, 0, 0, 0.9);
  117 + font-size: 32rpx;
  118 + line-height: 44rpx;
  119 + font-weight: 600;
  120 + }
  121 +}
  122 +</style>
... ...
... ... @@ -11,6 +11,7 @@ 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 13 import DraftOrderViewer from '@/pages/draft_order/viewer.vue'
  14 +import DelayedShipmentViewer from '@/pages/delay_invoice/viewer.vue'
14 15
15 16 export default function registerComponents(Vue) {
16 17 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
... ... @@ -26,4 +27,5 @@ export default function registerComponents(Vue) {
26 27 Vue.component('RestockApprovalViewer', RestockApprovalViewer)
27 28 Vue.component('RestockApprovalApprove', RestockApprovalApprove)
28 29 Vue.component('DraftOrderViewer', DraftOrderViewer)
  30 + Vue.component('DelayedShipmentViewer', DelayedShipmentViewer)
29 31 }
\ No newline at end of file
... ...
... ... @@ -73,6 +73,13 @@ export const getSysFlowComponentPath = (bizFlag) => {
73 73 break;
74 74 case 'DRAFT_REQUEST_CAR_EDIT': // 草稿要车单
75 75 componentPath = 'DraftOrderViewer'; // 草稿要车单-审批
  76 + break;
  77 + case 'DELAYED_SHIPMENT': // 延期发货单
  78 + componentPath = 'DelayedShipmentViewer'; // 延期发货单-审批详情
  79 + break;
  80 + case 'DELAYED_SHIPMENT_EDIT': // 延期发货单
  81 + componentPath = 'DelayedShipmentViewer'; // 延期发货单-审批
  82 + break;
76 83 }
77 84 return componentPath;
78 85 };
\ No newline at end of file
... ...