Commit 75f1c35bf5c0475cee6950c47b0cd8546784f362

Authored by 史婷婷
1 parent b9007541

feat: 规格变更单-审核&审核详情

  1 +<template>
  2 + <view class="detail-page">
  3 + <view class="section">
  4 + <text class="row company">{{ form.orderNo }}</text>
  5 + <view class="row"><text class="label">供货单位</text><text class="value">{{ getDicName('SUPPLIER',
  6 + form.supplyUnit, dicOptions.SUPPLIER) }}</text></view>
  7 + <view class="row"><text class="label">订货单位</text><text class="value">{{ form.orderingUnitName }}</text>
  8 + </view>
  9 + <view class="row"><text class="label">订货日期</text><text class="value">{{ form.orderDate }}</text></view>
  10 + <view class="row"><text class="label">生产厂</text><text class="value">{{ form.workshopName }}</text></view>
  11 + <view class="row"><text class="label">结算方式或期限</text><text class="value">{{ form.settlementTerms }}</text>
  12 + </view>
  13 + <view class="row"><text class="label">交货方式</text><text class="value">{{ form.deliveryMethod }}</text></view>
  14 + </view>
  15 +
  16 + <!-- 产品-变更前 -->
  17 + <view class="mgb10">
  18 + <Product title="变更前" mode="view" :options="genderOptions" :list="form.beforeChangeSpecList"
  19 + :totalQuantity="form.totalQuantity || 0" />
  20 + </view>
  21 +
  22 + <!-- 产品-变更后 -->
  23 + <view class="mgb10">
  24 + <Product title="变更后" mode="view" :options="genderOptions" :list="form.afterChangeSpecList"
  25 + :totalQuantity="form.afterTotalQuantity || 0" />
  26 + </view>
  27 +
  28 + <view class="section">
  29 + <view class="row"><text class="label">价格表编号</text><text class="value">{{ form.priceListNo }}</text></view>
  30 + <view class="row"><text class="label">开票情况</text><text class="value">{{ form.invoicingStatus }}</text></view>
  31 + <view class="row"><text class="label">运费</text><text class="value">{{ form.shippingCost }}</text></view>
  32 + <view class="row"><text class="label">包装费</text><text class="value">{{ form.packagingFee }}</text></view>
  33 + <view class="row"><text class="label">执行标准</text><text class="value">{{ getDicName('APPLICABLE_STANDARD',
  34 + form.executionStandard, dicOptions.APPLICABLE_STANDARD) }}</text></view>
  35 + </view>
  36 +
  37 + <view class="title-header">
  38 + <image class="title-header_icon" src="/static/images/title.png" />
  39 + <span>具体质量要求</span>
  40 + </view>
  41 + <view class="section">
  42 + <view class="row"><text class="label">件重条头</text><text class="value">{{ form.pieceWeightHeader }}</text>
  43 + </view>
  44 + <view class="row"><text class="label">表面</text><text class="value">{{ form.surface }}</text></view>
  45 + <view class="row"><text class="label">公差</text><text class="value">{{ form.tolerance }}</text></view>
  46 + <view class="row"><text class="label">性能</text><text class="value">{{ form.performance }}</text></view>
  47 + <view class="row"><text class="label">成分</text><text class="value">{{ form.element }}</text></view>
  48 + <view class="row"><text class="label">包装</text><text class="value">{{ form.packaging }}</text></view>
  49 + <view class="row"><text class="label">备注</text><text class="value">{{ form.remarks }}</text></view>
  50 + </view>
  51 +
  52 + </view>
  53 +</template>
  54 +
  55 +<script>
  56 +import { getDetailApi } from '@/api/change_list.js'
  57 +import Product from './product.vue'
  58 +import {
  59 + getDicName
  60 +} from '@/utils/dic.js'
  61 +import {
  62 + getDicByCodes
  63 +} from '@/utils/dic'
  64 +
  65 +export default {
  66 + name: 'ChangeListViewer',
  67 + components: { Product },
  68 + props: { id: { type: [String, Number], default: '' } },
  69 + data() {
  70 + return {
  71 + form: {},
  72 + enterpriseTypeOptions: [],
  73 + genderOptions: [],
  74 + categoryOptions: [],
  75 + historyList: [],
  76 + dicOptions: {
  77 + AUDIT_STATUS: [],
  78 + SUPPLIER: [],
  79 + APPLICABLE_STANDARD: [],
  80 + },
  81 + }
  82 + },
  83 + watch: {
  84 + id: {
  85 + immediate: true,
  86 + handler(val) {
  87 + const v = (val !== undefined && val !== null) ? String(val) : ''
  88 + if (v) this.loadDetail(v)
  89 + }
  90 + }
  91 + },
  92 + created() {
  93 + this.loadAllDicData()
  94 + },
  95 + methods: {
  96 + async loadDetail(id) {
  97 + try {
  98 + const res = await getDetailApi(id)
  99 + const data = res.data || {}
  100 + this.form = { ...data }
  101 + } catch (e) {
  102 + this.form = {}
  103 + }
  104 + },
  105 + loadAllDicData() {
  106 + const dicCodes = ['AUDIT_STATUS', 'SUPPLIER', 'APPLICABLE_STANDARD']
  107 + return getDicByCodes(dicCodes).then(results => {
  108 + this.dicOptions.AUDIT_STATUS = results.AUDIT_STATUS.data || []
  109 + this.dicOptions.SUPPLIER = results.SUPPLIER.data || []
  110 + this.dicOptions.APPLICABLE_STANDARD = results.APPLICABLE_STANDARD.data || []
  111 + }).catch(() => {
  112 + this.dicOptions = {
  113 + AUDIT_STATUS: [],
  114 + SUPPLIER: [],
  115 + APPLICABLE_STANDARD: [],
  116 + }
  117 + })
  118 + },
  119 + getDicName: getDicName,
  120 + getFormValues() {
  121 + const m = this.form || {}
  122 + return JSON.parse(JSON.stringify(m))
  123 + }
  124 + }
  125 +}
  126 +</script>
  127 +
  128 +<style lang="scss" scoped>
  129 +.detail-page {
  130 + background: #f3f3f3;
  131 +}
  132 +
  133 +.section {
  134 + padding: 32rpx;
  135 + background: #fff;
  136 + margin-bottom: 20rpx;
  137 + position: relative;
  138 +
  139 +}
  140 +
  141 +.mgb10 {
  142 + margin-bottom: 20rpx;
  143 +}
  144 +
  145 +.row {
  146 + display: flex;
  147 + margin-bottom: 28rpx;
  148 +
  149 + &:last-child {
  150 + margin-bottom: 0;
  151 + }
  152 +
  153 + &.company {
  154 + font-size: 36rpx;
  155 + font-weight: 600;
  156 + color: rgba(0, 0, 0, 0.9);
  157 + padding-top: 32rpx;
  158 + line-height: 50rpx;
  159 + }
  160 +
  161 + .label {
  162 + max-width: 420rpx;
  163 + line-height: 32rpx;
  164 + font-size: 28rpx;
  165 + color: rgba(0, 0, 0, 0.6);
  166 + }
  167 +
  168 + .value {
  169 + flex: 1;
  170 + line-height: 32rpx;
  171 + font-size: 28rpx;
  172 + color: rgba(0, 0, 0, 0.9);
  173 + text-align: right;
  174 +
  175 + &.act {
  176 + color: $theme-primary;
  177 + }
  178 +
  179 + .category {
  180 + display: inline-block;
  181 + padding: 4rpx 12rpx;
  182 + border-radius: 6rpx;
  183 + font-size: 24rpx;
  184 + width: auto;
  185 +
  186 + &.category_A {
  187 + background: #FFF0ED;
  188 + color: #D54941;
  189 + }
  190 +
  191 + &.category_B {
  192 + background: #FFF1E9;
  193 + color: #E37318;
  194 + }
  195 +
  196 + &.category_C {
  197 + background: #F2F3FF;
  198 + color: $theme-primary;
  199 + }
  200 +
  201 + &.category_D {
  202 + background: #E3F9E9;
  203 + color: #2BA471;
  204 + }
  205 + }
  206 + }
  207 +}
  208 +
  209 +.card {
  210 + padding: 16rpx 0 8rpx;
  211 + border-top: 1rpx solid #f0f0f0;
  212 +}
  213 +
  214 +.history-header {
  215 + display: flex;
  216 + background: #F7F7F7;
  217 + padding: 20rpx 52rpx 20rpx 32rpx;
  218 +
  219 + .col {
  220 + font-size: 28rpx;
  221 + color: rgba(0, 0, 0, 0.9);
  222 + line-height: 40rpx;
  223 + }
  224 +
  225 + .col1 {
  226 + width: 20%;
  227 + }
  228 +
  229 + .col2 {
  230 + width: 50%;
  231 + text-align: center;
  232 + }
  233 +
  234 + .col3 {
  235 + width: 30%;
  236 + text-align: right;
  237 + }
  238 +}
  239 +
  240 +.history-row {
  241 + display: flex;
  242 + padding: 20rpx 52rpx 20rpx 32rpx;
  243 + border-bottom: 1rpx solid #f7f7f7;
  244 +
  245 + .col {
  246 + font-size: 28rpx;
  247 + color: rgba(0, 0, 0, 0.9);
  248 + line-height: 40rpx;
  249 + }
  250 +
  251 + .col1 {
  252 + width: 20%;
  253 + }
  254 +
  255 + .col2 {
  256 + width: 50%;
  257 + text-align: center;
  258 + }
  259 +
  260 + .col3 {
  261 + width: 30%;
  262 + text-align: right;
  263 + }
  264 +
  265 + .link {
  266 + color: $theme-primary;
  267 + }
  268 +}
  269 +
  270 +.title-header {
  271 + background-color: #fff;
  272 + display: flex;
  273 + align-items: center;
  274 + padding: 32rpx 32rpx 22rpx;
  275 + border-bottom: 1rpx dashed #f0f0f0;
  276 +
  277 + &_icon {
  278 + width: 32rpx;
  279 + height: 28rpx;
  280 + margin-right: 16rpx;
  281 + }
  282 +
  283 + span {
  284 + color: rgba(0, 0, 0, 0.9);
  285 + font-size: 32rpx;
  286 + line-height: 44rpx;
  287 + font-weight: 600;
  288 + }
  289 +}
  290 +</style>
... ...
... ... @@ -5,6 +5,7 @@ import FormalContractViewer from '@/components/contract-view/formalContractViewe
5 5 import ProcessStdAgmtViewer from '@/pages/contract_process/processStdAgmtViewer.vue'
6 6 import OrderListApprove from '@/pages/order_list/approve.vue'
7 7 import OrderListViewer from '@/pages/order_list/viewer.vue'
  8 +import ChangeListViewer from '@/pages/change_list/viewer.vue'
8 9
9 10 export default function registerComponents(Vue) {
10 11 Vue.component('CustomerDevelopViewer', CustomerDevelopViewer)
... ... @@ -14,4 +15,5 @@ export default function registerComponents(Vue) {
14 15 Vue.component('ProcessStdAgmtViewer', ProcessStdAgmtViewer)
15 16 Vue.component('OrderListApprove', OrderListApprove)
16 17 Vue.component('OrderListViewer', OrderListViewer)
  18 + Vue.component('ChangeListViewer', ChangeListViewer)
17 19 }
\ No newline at end of file
... ...
... ... @@ -44,6 +44,18 @@ export const getSysFlowComponentPath = (bizFlag) => {
44 44 case 'PURCHASE_ORDER': // 订货单
45 45 componentPath = 'OrderListViewer'; // 订货单-审批详情
46 46 break;
  47 + case 'SPEC_CHANGE_SUBMIT': // 规格变更单提交
  48 + componentPath = 'ChangeListViewer'; // 规格变更单-审批详情
  49 + break;
  50 + case 'SPEC_CHANGE_CONFIRM': // 规格变更单确认
  51 + componentPath = 'ChangeListViewer'; // 规格变更单-审批详情
  52 + break;
  53 + case 'SPEC_CHANGE_SUBMIT_EDIT': // 规格变更单提交
  54 + componentPath = 'ChangeListViewer'; // 规格变更单-审批
  55 + break;
  56 + case 'SPEC_CHANGE_CONFIRM_EDIT': // 规格变更单确认
  57 + componentPath = 'ChangeListViewer'; // 规格变更单-审批
  58 + break;
47 59 }
48 60 return componentPath;
49 61 };
\ No newline at end of file
... ...