Commit cf0ea64e836777b340199e95c88e1276a18e50d9

Authored by gesilong
1 parent a454aed8

commit: 优化审核详情状态

... ... @@ -4,6 +4,7 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
  7 + <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
7 8 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8 9 }}</text></view>
9 10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -105,7 +106,7 @@
105 106 </template>
106 107
107 108 <script>
108   -import { getContractApi, deleteContractApi, uploadStandardContract, uploadSignedContractFile } from '@/api/contract'
  109 +import { getContractApi, deleteContractApi, uploadStandardContract, uploadSignedContractFile, statusStyle} from '@/api/contract'
109 110 import ProductRel from './productRel.vue'
110 111 import DetailButtons from '@/components/detail-buttons/index.vue'
111 112 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -159,6 +160,7 @@ export default {
159 160 component: '',
160 161 packaging: ''
161 162 },
  163 + statusStyle: statusStyle,
162 164 productList: [],
163 165 buttons: [{
164 166 text: '编辑',
... ... @@ -224,6 +226,14 @@ export default {
224 226 this.loadDetail()
225 227 },
226 228 methods: {
  229 + getStatusCss(name) {
  230 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  231 + const found = list.find(it => it && it.text === name) || {}
  232 + return {
  233 + color: found.color || '#000',
  234 + backgroundColor: found.bgColor || '#000'
  235 + }
  236 + },
227 237 onDelete() {
228 238 uni.showModal({
229 239 title: '确认删除',
... ... @@ -380,7 +390,13 @@ export default {
380 390 flex-direction: column;
381 391 height: 100%;
382 392 }
383   -
  393 +.info-status {
  394 + padding: 4rpx 12rpx;
  395 + border-radius: 6rpx;
  396 + font-size: 24rpx;
  397 + color: #fff;
  398 + line-height: 40rpx;
  399 +}
384 400 .scroll {
385 401 flex: 1;
386 402 padding: 8rpx 0 144rpx;
... ...
... ... @@ -4,6 +4,7 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
  7 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'"><text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
7 8 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8 9 }}</text></view>
9 10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -112,7 +113,7 @@
112 113 </template>
113 114
114 115 <script>
115   -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile } from '@/api/contract'
  116 +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile, statusStyle } from '@/api/contract'
116 117 import ProductRel from './productRel.vue'
117 118 import DetailButtons from '@/components/detail-buttons/index.vue'
118 119 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -131,6 +132,7 @@ export default {
131 132 standardStandardized: '',
132 133 standardStandardizedName: '',
133 134 sheet: { visible: false, title: '请选择', options: [], value: '' },
  135 + statusStyle: statusStyle,
134 136 detail: {
135 137 code: '',
136 138 supplier: '',
... ... @@ -285,6 +287,14 @@ export default {
285 287 this.loadDetail()
286 288 },
287 289 methods: {
  290 + getStatusCss(name) {
  291 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  292 + const found = list.find(it => it && it.text === name) || {}
  293 + return {
  294 + color: found.color || '#000',
  295 + backgroundColor: found.bgColor || '#000'
  296 + }
  297 + },
288 298 onDelete() {
289 299 uni.showModal({
290 300 title: '确认删除',
... ... @@ -462,7 +472,13 @@ export default {
462 472 flex-direction: column;
463 473 height: 100%;
464 474 }
465   -
  475 +.info-status {
  476 + padding: 4rpx 12rpx;
  477 + border-radius: 6rpx;
  478 + font-size: 24rpx;
  479 + color: #fff;
  480 + line-height: 40rpx;
  481 +}
466 482 .scroll {
467 483 flex: 1;
468 484 padding: 8rpx 0 144rpx;
... ...
... ... @@ -4,6 +4,7 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
  7 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'"><text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
7 8 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8 9 }}</text></view>
9 10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -113,7 +114,7 @@
113 114 </template>
114 115
115 116 <script>
116   -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile } from '@/api/contract'
  117 +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile, statusStyle } from '@/api/contract'
117 118 import ProductRel from './productRel.vue'
118 119 import DetailButtons from '@/components/detail-buttons/index.vue'
119 120 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -169,6 +170,7 @@ export default {
169 170 packaging: ''
170 171 },
171 172 productList: [],
  173 + statusStyle: statusStyle,
172 174 buttons: [{
173 175 text: '编辑',
174 176 visible: true,
... ... @@ -292,6 +294,14 @@ export default {
292 294 this.loadDetail()
293 295 },
294 296 methods: {
  297 + getStatusCss(name) {
  298 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  299 + const found = list.find(it => it && it.text === name) || {}
  300 + return {
  301 + color: found.color || '#000',
  302 + backgroundColor: found.bgColor || '#000'
  303 + }
  304 + },
295 305 onDelete() {
296 306 uni.showModal({
297 307 title: '确认删除',
... ... @@ -472,7 +482,13 @@ export default {
472 482 flex-direction: column;
473 483 height: 100%;
474 484 }
475   -
  485 +.info-status {
  486 + padding: 4rpx 12rpx;
  487 + border-radius: 6rpx;
  488 + font-size: 24rpx;
  489 + color: #fff;
  490 + line-height: 40rpx;
  491 +}
476 492 .scroll {
477 493 flex: 1;
478 494 padding: 8rpx 0 144rpx;
... ...
1   -<template>
  1 +statusStyl<template>
2 2 <view class="page">
3 3 <scroll-view class="scroll" scroll-y>
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
  7 + <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
7 8 <view class="row"><text class="label">承揽方</text><text class="value">{{ detail.supplierName || '-'
8 9 }}</text></view>
9 10 <view class="row"><text class="label">定作方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -103,7 +104,7 @@
103 104 </template>
104 105
105 106 <script>
106   -import { getContractApi, deleteContractApi, uploadStandardContract } from '@/api/contract'
  107 +import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle } from '@/api/contract'
107 108 import ProductRel from './productRel.vue'
108 109 import DetailButtons from '@/components/detail-buttons/index.vue'
109 110 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -159,6 +160,7 @@ export default {
159 160 packaging: ''
160 161 },
161 162 productList: [],
  163 + statusStyle: statusStyle,
162 164 buttons: [{
163 165 text: '编辑',
164 166 visible: true,
... ... @@ -216,6 +218,14 @@ export default {
216 218 this.loadDetail()
217 219 },
218 220 methods: {
  221 + getStatusCss(name) {
  222 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  223 + const found = list.find(it => it && it.text === name) || {}
  224 + return {
  225 + color: found.color || '#000',
  226 + backgroundColor: found.bgColor || '#000'
  227 + }
  228 + },
219 229 onDelete() {
220 230 uni.showModal({
221 231 title: '确认删除',
... ... @@ -366,7 +376,13 @@ export default {
366 376 flex-direction: column;
367 377 height: 100%;
368 378 }
369   -
  379 +.info-status {
  380 + padding: 4rpx 12rpx;
  381 + border-radius: 6rpx;
  382 + font-size: 24rpx;
  383 + color: #fff;
  384 + line-height: 40rpx;
  385 +}
370 386 .scroll {
371 387 flex: 1;
372 388 padding: 8rpx 0 144rpx;
... ...
... ... @@ -4,8 +4,7 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7   - <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核状态</text><text
8   - class="value">{{ detail.standardApprovedName || '-' }}</text></view>
  7 + <view class="row" v-if="status === 'STANDARD'"><text class="label">正式合同规范性审核</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
9 8 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName ||
10 9 '-'}}</text></view>
11 10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName ||
... ... @@ -109,7 +108,7 @@
109 108 </template>
110 109
111 110 <script>
112   -import { getContractApi, deleteContractApi, uploadStandardContract } from '@/api/contract'
  111 +import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle } from '@/api/contract'
113 112 import ProductRel from './productRel.vue'
114 113 import DetailButtons from '@/components/detail-buttons/index.vue'
115 114 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -198,6 +197,7 @@ export default {
198 197 event: 'auditDetail'
199 198 },
200 199 ],
  200 + statusStyle: statusStyle,
201 201 }
202 202 },
203 203 computed: {
... ... @@ -222,6 +222,14 @@ export default {
222 222 this.loadDetail()
223 223 },
224 224 methods: {
  225 + getStatusCss(name) {
  226 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  227 + const found = list.find(it => it && it.text === name) || {}
  228 + return {
  229 + color: found.color || '#000',
  230 + backgroundColor: found.bgColor || '#000'
  231 + }
  232 + },
225 233 onUploadSubmit() {
226 234 if (!this.fileInfo.id) {
227 235 uni.showToast({
... ... @@ -395,7 +403,13 @@ export default {
395 403 margin-bottom: 20rpx;
396 404 align-items: center;
397 405 }
398   -
  406 +.info-status {
  407 + padding: 4rpx 12rpx;
  408 + border-radius: 6rpx;
  409 + font-size: 24rpx;
  410 + color: #fff;
  411 + line-height: 40rpx;
  412 +}
399 413 .row:last-child {
400 414 margin-bottom: 0;
401 415 }
... ...
... ... @@ -4,6 +4,7 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
  7 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'"><text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
7 8 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8 9 }}</text></view>
9 10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -107,7 +108,7 @@
107 108 </template>
108 109
109 110 <script>
110   -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract } from '@/api/contract'
  111 +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, statusStyle } from '@/api/contract'
111 112 import ProductRel from './productRel.vue'
112 113 import DetailButtons from '@/components/detail-buttons/index.vue'
113 114 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -160,6 +161,7 @@ export default {
160 161 packaging: ''
161 162 },
162 163 productList: [],
  164 + statusStyle: statusStyle,
163 165 buttons: [{
164 166 text: '编辑',
165 167 visible: true,
... ... @@ -429,6 +431,14 @@ export default {
429 431 this.detail = { ...this.detail }
430 432 this.productList = []
431 433 }
  434 + },
  435 + getStatusCss(name) {
  436 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  437 + const found = list.find(it => it && it.text === name) || {}
  438 + return {
  439 + color: found.color || '#000',
  440 + backgroundColor: found.bgColor || '#000'
  441 + }
432 442 }
433 443 }
434 444 }
... ... @@ -440,7 +450,13 @@ export default {
440 450 flex-direction: column;
441 451 height: 100%;
442 452 }
443   -
  453 +.info-status {
  454 + padding: 4rpx 12rpx;
  455 + border-radius: 6rpx;
  456 + font-size: 24rpx;
  457 + color: #fff;
  458 + line-height: 40rpx;
  459 +}
444 460 .scroll {
445 461 flex: 1;
446 462 padding: 8rpx 0 144rpx;
... ...
... ... @@ -4,6 +4,7 @@
4 4 <view class="detail-page">
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
  7 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'"><text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
7 8 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
8 9 }}</text></view>
9 10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -113,7 +114,7 @@
113 114 </template>
114 115
115 116 <script>
116   -import { getContractApi, deleteContractApi, uploadFormalContract } from '@/api/contract'
  117 +import { getContractApi, deleteContractApi, uploadFormalContract, statusStyle } from '@/api/contract'
117 118 import ProductRel from './productRel.vue'
118 119 import DetailButtons from '@/components/detail-buttons/index.vue'
119 120 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -168,6 +169,7 @@ export default {
168 169 component: '',
169 170 packaging: ''
170 171 },
  172 + statusStyle: statusStyle,
171 173 productList: [],
172 174 buttons: [{
173 175 text: '编辑',
... ... @@ -285,6 +287,14 @@ export default {
285 287 this.loadDetail()
286 288 },
287 289 methods: {
  290 + getStatusCss(name) {
  291 + const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
  292 + const found = list.find(it => it && it.text === name) || {}
  293 + return {
  294 + color: found.color || '#000',
  295 + backgroundColor: found.bgColor || '#000'
  296 + }
  297 + },
288 298 onDelete() {
289 299 uni.showModal({
290 300 title: '确认删除',
... ... @@ -465,7 +475,13 @@ export default {
465 475 flex: 1;
466 476 padding: 8rpx 0 144rpx;
467 477 }
468   -
  478 +.info-status {
  479 + padding: 4rpx 12rpx;
  480 + border-radius: 6rpx;
  481 + font-size: 24rpx;
  482 + color: #fff;
  483 + line-height: 40rpx;
  484 +}
469 485 .detail-page {
470 486 background: #f3f3f3;
471 487 }
... ...