Commit db8a37971fb46382f7c5a732583a82aa9f77a259

Authored by 史婷婷
2 parents 4a07016a 952d74a9

Merge remote-tracking branch 'origin/cjerp-1.0' into cjerp-1.0_20251220

... ... @@ -12,6 +12,7 @@ export const statusMap = {
12 12 '生产中': '#2BA471',
13 13 '审核通过': '#2BA471',
14 14 '审核中': '#3D48A3',
  15 + '审批中': '#3D48A3',
15 16 '已签收': '#E7E7E7',
16 17 '已取消': '#000',
17 18 '已发货': '#D54941',
... ...
... ... @@ -144,7 +144,7 @@
144 144 </uni-list-item>
145 145 <uni-list-item title="备注">
146 146 <template v-slot:footer>
147   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  147 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000"/>
148 148 </template>
149 149 </uni-list-item>
150 150 <view class="quality">
... ... @@ -260,10 +260,10 @@ export default {
260 260 executionStandardName: '',
261 261 executionStandardRemarks: '',
262 262 includesPackagingFee: false,
263   - includesPackagingFeeName: '',
  263 + includesPackagingFeeName: '',
264 264 includesTransportFee: false,
265   - includesTransportFeeName: '',
266   - unit: '美元、公斤、元美/公斤',
  265 + includesTransportFeeName: '否',
  266 + unit: '美元、公斤、美元/公斤',
267 267 totalAmountCapital: '',
268 268 destinationId: [],
269 269 destinationLabel: '',
... ...
... ... @@ -5,6 +5,7 @@
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7 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>
  8 + <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) : { color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 9 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 10 }}</text></view>
10 11 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -112,11 +113,13 @@
112 113 </template>
113 114
114 115 <script>
115   -import { getContractApi, deleteContractApi, uploadStandardContract, uploadSignedContractFile, statusStyle} from '@/api/contract'
  116 +import { getContractApi, deleteContractApi, uploadStandardContract, uploadSignedContractFile, statusStyle, statusMap } 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'
119 120 import SingleSelectSheet from '@/components/single-select/index.vue'
  121 +import { fillStandardApprovedName } from '@/utils/dic.js'
  122 +
120 123 export default {
121 124 name: 'ContractForeignStdDetail',
122 125 components: { ProductRel, DetailButtons, FileUpload, SingleSelectSheet },
... ... @@ -172,6 +175,7 @@ export default {
172 175 packaging: ''
173 176 },
174 177 statusStyle: statusStyle,
  178 + statusMap: statusMap,
175 179 productList: [],
176 180 buttons: [{
177 181 text: '编辑',
... ... @@ -237,6 +241,13 @@ export default {
237 241 this.loadDetail()
238 242 },
239 243 methods: {
  244 + getShippingStatusName(name) {
  245 + const found = this.statusMap[name] || ''
  246 + return {
  247 + backgroundColor: found || '#000',
  248 + color: found ? '#fff' : '#000'
  249 + }
  250 + },
240 251 getStatusCss(name) {
241 252 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
242 253 const found = list.find(it => it && it.text === name) || {}
... ... @@ -387,6 +398,7 @@ export default {
387 398 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
388 399 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
389 400 }
  401 + this.detail = await fillStandardApprovedName(this.detail)
390 402 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
391 403 this.productList = lines
392 404 } catch (e) {
... ...
... ... @@ -61,7 +61,7 @@
61 61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text>
62 62 </view>
63 63 <view class="info-row" v-if="item.status === 'STANDARD'">
64   - <text>正式合同规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span>
  64 + <text>标准合同规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span>
65 65 </view>
66 66 <view class="info-row">
67 67 <text>订货日期</text><text>{{ item.orderDate }}</text>
... ... @@ -104,11 +104,7 @@ export default {
104 104 searchKeyword: '',
105 105 searchKeywordDebounced: '',
106 106
107   - tabs: [
108   - { label: '草稿合同', value: 'DRAFT' },
109   - { label: '标准合同', value: 'STANDARD' },
110   - { label: '已删除合同', value: 'DELETED' }
111   - ],
  107 +
112 108 status: 'DRAFT',
113 109
114 110 query: { deptId: '', deptName: '', dateRange: [] },
... ... @@ -126,6 +122,23 @@ export default {
126 122 }
127 123 },
128 124 computed: {
  125 + roleCodes() {
  126 + const g = this.$store && this.$store.getters
  127 + return (g && g.roleCodes) || []
  128 + },
  129 + tabs() {
  130 + if (this.roleCodes.includes('constract_admin')) {
  131 + return [
  132 + { label: '草稿合同', value: 'DRAFT' },
  133 + { label: '标准合同', value: 'STANDARD' },
  134 + { label: '已删除合同', value: 'DELETED' }
  135 + ]
  136 + }
  137 + return [
  138 + { label: '草稿合同', value: 'DRAFT' },
  139 + { label: '标准合同', value: 'STANDARD' }
  140 + ]
  141 + },
129 142 extraCombined() {
130 143 return {
131 144 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -344,10 +357,10 @@ export default {
344 357 margin-bottom: 0;
345 358 }
346 359 text {
347   - width: 60%;
  360 + width: 50%;
348 361 &:last-child {
349 362 color: rgba(0,0,0,0.9);
350   - width: 40%;
  363 + width: 50%;
351 364 }
352 365 }
353 366 }
... ...
... ... @@ -143,7 +143,7 @@
143 143 </uni-list-item>
144 144 <uni-list-item title="备注">
145 145 <template v-slot:footer>
146   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  146 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
147 147 </template>
148 148 </uni-list-item>
149 149
... ... @@ -249,9 +249,9 @@ export default {
249 249 executionStandardName: '',
250 250 executionStandardRemarks: '',
251 251 includesPackagingFee: false,
252   - includesPackagingFeeName: '',
  252 + includesPackagingFeeName: '',
253 253 includesTransportFee: false,
254   - includesTransportFeeName: '',
  254 + includesTransportFeeName: '',
255 255 unit: '美元、公斤、美元/公斤',
256 256 totalAmountCapital: '',
257 257 depositInfo: '',
... ...
... ... @@ -147,7 +147,7 @@
147 147 </uni-list-item>
148 148 <uni-list-item title="备注">
149 149 <template v-slot:footer>
150   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  150 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
151 151 </template>
152 152 </uni-list-item>
153 153 <view class="quality">
... ... @@ -260,9 +260,9 @@ export default {
260 260 executionStandardName: '',
261 261 executionStandardRemarks: '',
262 262 includesPackagingFee: false,
263   - includesPackagingFeeName: '',
  263 + includesPackagingFeeName: '',
264 264 includesTransportFee: false,
265   - includesTransportFeeName: '',
  265 + includesTransportFeeName: '',
266 266 unit: '美元、公斤、美元/公斤',
267 267 totalAmountCapital: '',
268 268 destinationId: [],
... ...
... ... @@ -4,7 +4,13 @@
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 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'">
  8 + <text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text>
  9 + <text class="value">
  10 + <span v-if="detail.status === 'STANDARD'" class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span>
  11 + <span v-if="detail.status === 'FORMAL'" class="info-status" :style="detail.formalApprovedName ? getStatusCss(detail.formalApprovedName) : ''" >{{ detail.formalApprovedName || '-' }}</span>
  12 + </text>
  13 + </view> <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) : { color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 14 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 15 }}</text></view>
10 16 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -119,11 +125,12 @@
119 125 </template>
120 126
121 127 <script>
122   -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile, statusStyle } from '@/api/contract'
  128 +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile, statusStyle, statusMap } from '@/api/contract'
123 129 import ProductRel from './productRel.vue'
124 130 import DetailButtons from '@/components/detail-buttons/index.vue'
125 131 import FileUpload from '@/components/file-upload/index.vue'
126 132 import SingleSelectSheet from '@/components/single-select/index.vue'
  133 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
127 134
128 135 export default {
129 136 name: 'ContractForeignStockDetail',
... ... @@ -139,6 +146,7 @@ export default {
139 146 standardStandardizedName: '',
140 147 sheet: { visible: false, title: '请选择', options: [], value: '' },
141 148 statusStyle: statusStyle,
  149 + statusMap: statusMap,
142 150 detail: {
143 151 code: '',
144 152 supplier: '',
... ... @@ -298,6 +306,13 @@ export default {
298 306 this.loadDetail()
299 307 },
300 308 methods: {
  309 + getShippingStatusName(name) {
  310 + const found = this.statusMap[name] || ''
  311 + return {
  312 + backgroundColor: found || '#000',
  313 + color: found ? '#fff' : '#000'
  314 + }
  315 + },
301 316 getStatusCss(name) {
302 317 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
303 318 const found = list.find(it => it && it.text === name) || {}
... ... @@ -469,6 +484,8 @@ export default {
469 484 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
470 485 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
471 486 }
  487 + this.detail = await fillStandardApprovedName(this.detail)
  488 + this.detail = await fillFormalApprovedName(this.detail)
472 489 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
473 490 this.productList = lines
474 491 } catch (e) {
... ...
... ... @@ -105,13 +105,6 @@ export default {
105 105 return {
106 106 searchKeyword: '',
107 107 searchKeywordDebounced: '',
108   -
109   - tabs: [
110   - { label: '草稿合同', value: 'DRAFT' },
111   - { label: '正式合同', value: 'FORMAL' },
112   - { label: '标准合同', value: 'STANDARD' },
113   - { label: '已删除合同', value: 'DELETED' }
114   - ],
115 108 status: 'DRAFT',
116 109
117 110 query: { deptId: '', deptName: '', dateRange: [] },
... ... @@ -129,6 +122,25 @@ export default {
129 122 }
130 123 },
131 124 computed: {
  125 + roleCodes() {
  126 + const g = this.$store && this.$store.getters
  127 + return (g && g.roleCodes) || []
  128 + },
  129 + tabs() {
  130 + if (this.roleCodes.includes('constract_admin')) {
  131 + return [
  132 + { label: '草稿合同', value: 'DRAFT' },
  133 + { label: '正式合同', value: 'FORMAL' },
  134 + { label: '标准合同', value: 'STANDARD' },
  135 + { label: '已删除合同', value: 'DELETED' }
  136 + ]
  137 + }
  138 + return [
  139 + { label: '草稿合同', value: 'DRAFT' },
  140 + { label: '正式合同', value: 'FORMAL' },
  141 + { label: '标准合同', value: 'STANDARD' }
  142 + ]
  143 + },
132 144 extraCombined() {
133 145 return {
134 146 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -359,10 +371,10 @@ export default {
359 371 margin-bottom: 0;
360 372 }
361 373 text {
362   - width: 60%;
  374 + width: 50%;
363 375 &:last-child {
364 376 color: rgba(0,0,0,0.9);
365   - width: 40%;
  377 + width: 50%;
366 378 }
367 379 }
368 380 }
... ...
... ... @@ -40,9 +40,30 @@
40 40 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
41 41 </template>
42 42 </uni-list-item>
43   - <uni-list-item title="规格">
  43 + <uni-list-item title="规格(mm)">
44 44 <template v-slot:footer>
45   - <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled />
  45 + <!-- <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled /> -->
  46 + <view class="value value-spec">
  47 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  48 + <view v-if="item.thickness" class="value-spec_box">
  49 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
  50 + </view>
  51 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
  52 + </view>
  53 + </view>
  54 + <view v-if="item.width" class="value-spec_val p12">*</view>
  55 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  56 + <view v-if="item.width" class="value-spec_box">
  57 + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
  58 + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view>
  59 + </view>
  60 + <view v-if="item.length" class="value-spec_val p12">*</view>
  61 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  62 + <view v-if="item.length" class="value-spec_box">
  63 + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
  64 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view>
  65 + </view>
  66 + </view>
46 67 </template>
47 68 </uni-list-item>
48 69 <uni-list-item title="状态">
... ... @@ -699,4 +720,42 @@ export default {
699 720 background: $theme-primary;
700 721 color: #fff;
701 722 }
  723 + .value-spec {
  724 + height: 48rpx;
  725 + display: flex;
  726 + align-items: center;
  727 + color: #000000;
  728 + // justify-content: end;
  729 + &_box {
  730 + position: relative;
  731 + width: 60rpx;
  732 + height: 48rpx;
  733 +
  734 + &_1 {
  735 + font-size: 16rpx;
  736 + position: absolute;
  737 + top: -10rpx;
  738 + left: 0;
  739 + }
  740 +
  741 + &_2 {
  742 + font-size: 16rpx;
  743 + position: absolute;
  744 + bottom: -10rpx;
  745 + left: 0;
  746 + }
  747 + }
  748 +
  749 + &_val {
  750 + font-size: 28rpx;
  751 +
  752 + &.p12 {
  753 + padding-right: 12rpx;
  754 + }
  755 + }
  756 + }
  757 + .row-spec {
  758 + height: 60rpx;
  759 + align-items: center;
  760 + }
702 761 </style>
\ No newline at end of file
... ...
... ... @@ -147,7 +147,7 @@
147 147 </uni-list-item>
148 148 <uni-list-item title="备注">
149 149 <template v-slot:footer>
150   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  150 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
151 151 </template>
152 152 </uni-list-item>
153 153
... ... @@ -254,9 +254,9 @@ export default {
254 254 executionStandardName: '',
255 255 executionStandardRemarks: '',
256 256 includesPackagingFee: false,
257   - includesPackagingFeeName: '',
  257 + includesPackagingFeeName: '',
258 258 includesTransportFee: false,
259   - includesTransportFeeName: '',
  259 + includesTransportFeeName: '',
260 260 unit: '美元、公斤、美元/公斤',
261 261 totalAmountCapital: '',
262 262 depositInfo: '',
... ...
... ... @@ -145,7 +145,7 @@
145 145 </uni-list-item>
146 146 <uni-list-item title="备注">
147 147 <template v-slot:footer>
148   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  148 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
149 149 </template>
150 150 </uni-list-item>
151 151 <view class="quality">
... ... @@ -258,9 +258,9 @@ export default {
258 258 executionStandardName: '',
259 259 executionStandardRemarks: '',
260 260 includesPackagingFee: false,
261   - includesPackagingFeeName: '',
  261 + includesPackagingFeeName: '',
262 262 includesTransportFee: false,
263   - includesTransportFeeName: '',
  263 + includesTransportFeeName: '',
264 264 unit: '美元、公斤、美元/公斤',
265 265 totalAmountCapital: '',
266 266 destinationId: [],
... ...
... ... @@ -4,7 +4,15 @@
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 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'">
  8 + <text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text>
  9 + <text class="value">
  10 +
  11 + <span v-if="detail.status === 'STANDARD'" class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span>
  12 + <span v-if="detail.status === 'FORMAL'" class="info-status" :style="detail.formalApprovedName ? getStatusCss(detail.formalApprovedName) : ''" >{{ detail.formalApprovedName || '-' }}</span>
  13 +
  14 + </text>
  15 + </view> <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) : { color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 16 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 17 }}</text></view>
10 18 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -120,11 +128,12 @@
120 128 </template>
121 129
122 130 <script>
123   -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile, statusStyle } from '@/api/contract'
  131 +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, uploadSignedContractFile, statusStyle, statusMap,showContract } from '@/api/contract'
124 132 import ProductRel from './productRel.vue'
125 133 import DetailButtons from '@/components/detail-buttons/index.vue'
126 134 import FileUpload from '@/components/file-upload/index.vue'
127 135 import SingleSelectSheet from '@/components/single-select/index.vue'
  136 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
128 137
129 138 export default {
130 139 name: 'ContractForeignUnplanDetail',
... ... @@ -182,6 +191,7 @@ export default {
182 191 },
183 192 productList: [],
184 193 statusStyle: statusStyle,
  194 + statusMap: statusMap,
185 195 buttons: [{
186 196 text: '编辑',
187 197 visible: true,
... ... @@ -305,6 +315,13 @@ export default {
305 315 this.loadDetail()
306 316 },
307 317 methods: {
  318 + getShippingStatusName(name) {
  319 + const found = this.statusMap[name] || ''
  320 + return {
  321 + backgroundColor: found || '#000',
  322 + color: found ? '#fff' : '#000'
  323 + }
  324 + },
308 325 getStatusCss(name) {
309 326 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
310 327 const found = list.find(it => it && it.text === name) || {}
... ... @@ -345,8 +362,10 @@ export default {
345 362 })
346 363 },
347 364 onLockApply() {
348   - uni.navigateTo({
349   - url: '/pages/contract_foreign_unplan/lock_apply?id=' + this.detail.id || ''
  365 + showContract(this.detail.id).then(res => {
  366 + uni.navigateTo({
  367 + url: '/pages/contract_foreign_unplan/lock_apply?id=' + this.detail.id || ''
  368 + })
350 369 })
351 370 },
352 371 onEdit() {
... ... @@ -479,6 +498,8 @@ export default {
479 498 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
480 499 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
481 500 }
  501 + this.detail = await fillStandardApprovedName(this.detail)
  502 + this.detail = await fillFormalApprovedName(this.detail)
482 503 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
483 504 this.productList = lines
484 505 } catch (e) {
... ...
... ... @@ -105,13 +105,6 @@ export default {
105 105 return {
106 106 searchKeyword: '',
107 107 searchKeywordDebounced: '',
108   -
109   - tabs: [
110   - { label: '草稿合同', value: 'DRAFT' },
111   - { label: '正式合同', value: 'FORMAL' },
112   - { label: '标准合同', value: 'STANDARD' },
113   - { label: '已删除合同', value: 'DELETED' }
114   - ],
115 108 status: 'DRAFT',
116 109
117 110 query: { deptId: '', deptName: '', dateRange: [] },
... ... @@ -129,6 +122,25 @@ export default {
129 122 }
130 123 },
131 124 computed: {
  125 + roleCodes() {
  126 + const g = this.$store && this.$store.getters
  127 + return (g && g.roleCodes) || []
  128 + },
  129 + tabs() {
  130 + if (this.roleCodes.includes('constract_admin')) {
  131 + return [
  132 + { label: '草稿合同', value: 'DRAFT' },
  133 + { label: '正式合同', value: 'FORMAL' },
  134 + { label: '标准合同', value: 'STANDARD' },
  135 + { label: '已删除合同', value: 'DELETED' }
  136 + ]
  137 + }
  138 + return [
  139 + { label: '草稿合同', value: 'DRAFT' },
  140 + { label: '正式合同', value: 'FORMAL' },
  141 + { label: '标准合同', value: 'STANDARD' }
  142 + ]
  143 + },
132 144 extraCombined() {
133 145 return {
134 146 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -361,10 +373,10 @@ export default {
361 373 margin-bottom: 0;
362 374 }
363 375 text {
364   - width: 60%;
  376 + width: 50%;
365 377 &:last-child {
366 378 color: rgba(0,0,0,0.9);
367   - width: 40%;
  379 + width: 50%;
368 380 }
369 381 }
370 382 }
... ...
... ... @@ -39,9 +39,30 @@
39 39 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
40 40 </template>
41 41 </uni-list-item>
42   - <uni-list-item title="规格">
  42 + <uni-list-item title="规格(mm)">
43 43 <template v-slot:footer>
44   - <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled />
  44 + <!-- <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled /> -->
  45 + <view class="value value-spec">
  46 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  47 + <view v-if="item.thickness" class="value-spec_box">
  48 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
  49 + </view>
  50 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
  51 + </view>
  52 + </view>
  53 + <view v-if="item.width" class="value-spec_val p12">*</view>
  54 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  55 + <view v-if="item.width" class="value-spec_box">
  56 + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
  57 + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view>
  58 + </view>
  59 + <view v-if="item.length" class="value-spec_val p12">*</view>
  60 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  61 + <view v-if="item.length" class="value-spec_box">
  62 + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
  63 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view>
  64 + </view>
  65 + </view>
45 66 </template>
46 67 </uni-list-item>
47 68 <uni-list-item title="状态">
... ... @@ -699,4 +720,42 @@ export default {
699 720 background: $theme-primary;
700 721 color: #fff;
701 722 }
  723 +.value-spec {
  724 + height: 48rpx;
  725 + display: flex;
  726 + align-items: center;
  727 + color: #000000;
  728 + // justify-content: end;
  729 + &_box {
  730 + position: relative;
  731 + width: 60rpx;
  732 + height: 48rpx;
  733 +
  734 + &_1 {
  735 + font-size: 16rpx;
  736 + position: absolute;
  737 + top: -10rpx;
  738 + left: 0;
  739 + }
  740 +
  741 + &_2 {
  742 + font-size: 16rpx;
  743 + position: absolute;
  744 + bottom: -10rpx;
  745 + left: 0;
  746 + }
  747 + }
  748 +
  749 + &_val {
  750 + font-size: 28rpx;
  751 +
  752 + &.p12 {
  753 + padding-right: 12rpx;
  754 + }
  755 + }
  756 + }
  757 + .row-spec {
  758 + height: 60rpx;
  759 + align-items: center;
  760 + }
702 761 </style>
\ No newline at end of file
... ...
... ... @@ -108,11 +108,13 @@ export default {
108 108 const res = await showContract(this.id)
109 109 const data = res && res.data ? res.data : {}
110 110 this.detail = {
  111 + contractId: data.contractId || '',
111 112 contractCode: data.contractCode || '',
112 113 customerName: data.customerName || '',
113 114 deptName: data.deptName || '',
114 115 workshopName: data.workshopName || '',
115 116 orderType: data.orderType || '',
  117 + contractTypeCode: data.contractType || '',
116 118 contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单',
117 119 orderDate: (data.orderDate || '').slice(0, 10),
118 120 applicationCount: data.applicationCount || '',
... ... @@ -139,6 +141,7 @@ export default {
139 141 if (res.confirm) {
140 142 specLockDelayApplication({
141 143 ...this.detail,
  144 + contractType: this.detail.contractTypeCode || '',
142 145 specLockDate: date,
143 146 delayReason: reason
144 147 }).then(res => {
... ...
... ... @@ -146,7 +146,7 @@
146 146 </uni-list-item>
147 147 <uni-list-item title="备注">
148 148 <template v-slot:footer>
149   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  149 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
150 150 </template>
151 151 </uni-list-item>
152 152
... ... @@ -253,9 +253,9 @@ export default {
253 253 executionStandardName: '',
254 254 executionStandardRemarks: '',
255 255 includesPackagingFee: false,
256   - includesPackagingFeeName: '',
  256 + includesPackagingFeeName: '',
257 257 includesTransportFee: false,
258   - includesTransportFeeName: '',
  258 + includesTransportFeeName: '',
259 259 unit: '美元、公斤、美元/公斤',
260 260 totalAmountCapital: '',
261 261 depositInfo: '',
... ...
... ... @@ -36,7 +36,7 @@
36 36 </template>
37 37 </uni-list-item>
38 38
39   - <uni-list-item title="授截止日期">
  39 + <uni-list-item title="授截止日期">
40 40 <template v-slot:footer>
41 41 <uni-datetime-picker type="date" v-model="form.validityTime" />
42 42 </template>
... ... @@ -211,7 +211,7 @@ export default {
211 211 { key: 'company', label: '所属单位' },
212 212 { key: 'materialTypeId', label: '品种' },
213 213 { key: 'hasFrameworkAgreement', label: '是否签订框架合同' },
214   - { key: 'validityTime', label: '授截止日期' }
  214 + { key: 'validityTime', label: '授截止日期' }
215 215 ]
216 216 for (const it of checks) {
217 217 const val = this.form[it.key]
... ...
... ... @@ -9,7 +9,7 @@
9 9 <view class="row"><text class="label">品种</text><text class="value">{{ form.materialTypeName }}</text></view>
10 10 <view class="row"><text class="label">是否签订</text><text class="value">{{ form.hasFrameworkAgreementName
11 11 }}</text></view>
12   - <view class="row"><text class="label">授截止日期</text><text class="value">{{ form.validityTime }}</text></view>
  12 + <view class="row"><text class="label">授截止日期</text><text class="value">{{ form.validityTime }}</text></view>
13 13 </view>
14 14 </view>
15 15 </scroll-view>
... ...
... ... @@ -317,11 +317,11 @@ export default {
317 317 }
318 318
319 319 text {
320   - width: 60%;
  320 + width: 50%;
321 321
322 322 &:last-child {
323 323 color: rgba(0, 0, 0, 0.9);
324   - width: 40%;
  324 + width: 50%;
325 325 }
326 326 }
327 327 }
... ...
... ... @@ -36,7 +36,7 @@
36 36 </template>
37 37 </uni-list-item>
38 38
39   - <uni-list-item title="授截止日期">
  39 + <uni-list-item title="授截止日期">
40 40 <template v-slot:footer>
41 41 <uni-datetime-picker type="date" v-model="form.validityTime" />
42 42 </template>
... ... @@ -160,7 +160,7 @@ export default {
160 160 { key: 'company', label: '所属单位' },
161 161 { key: 'materialTypeId', label: '品种' },
162 162 { key: 'hasFrameworkAgreement', label: '是否签订框架合同' },
163   - { key: 'validityTime', label: '授截止日期' }
  163 + { key: 'validityTime', label: '授截止日期' }
164 164 ]
165 165 for (const it of checks) {
166 166 const val = this.form[it.key]
... ...
... ... @@ -145,7 +145,7 @@
145 145 </uni-list-item>
146 146 <uni-list-item title="备注">
147 147 <template v-slot:footer>
148   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  148 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
149 149 </template>
150 150 </uni-list-item>
151 151 <view class="quality">
... ... @@ -258,9 +258,9 @@ export default {
258 258 executionStandardName: '',
259 259 executionStandardRemarks: '',
260 260 includesPackagingFee: false,
261   - includesPackagingFeeName: '',
  261 + includesPackagingFeeName: '',
262 262 includesTransportFee: false,
263   - includesTransportFeeName: '',
  263 + includesTransportFeeName: '',
264 264 unit: '元、公斤、元/公斤',
265 265 totalAmountCapital: '',
266 266 destinationId: [],
... ...
... ... @@ -5,6 +5,7 @@ statusStyl<template>
5 5 <view class="section">
6 6 <text class="row customer">{{ detail.code }}</text>
7 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>
  8 + <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) : { color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 9 <view class="row"><text class="label">承揽方</text><text class="value">{{ detail.supplierName || '-'
9 10 }}</text></view>
10 11 <view class="row"><text class="label">定作方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -110,12 +111,12 @@ statusStyl<template>
110 111 </template>
111 112
112 113 <script>
113   -import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle } from '@/api/contract'
  114 +import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle, statusMap } from '@/api/contract'
114 115 import ProductRel from './productRel.vue'
115 116 import DetailButtons from '@/components/detail-buttons/index.vue'
116 117 import FileUpload from '@/components/file-upload/index.vue'
117 118 import SingleSelectSheet from '@/components/single-select/index.vue'
118   -
  119 +import { fillStandardApprovedName } from '@/utils/dic.js'
119 120
120 121 export default {
121 122 name: 'ContractProcessDetail',
... ... @@ -172,6 +173,7 @@ export default {
172 173 },
173 174 productList: [],
174 175 statusStyle: statusStyle,
  176 + statusMap: statusMap,
175 177 buttons: [{
176 178 text: '编辑',
177 179 visible: true,
... ... @@ -229,6 +231,13 @@ export default {
229 231 this.loadDetail()
230 232 },
231 233 methods: {
  234 + getShippingStatusName(name) {
  235 + const found = this.statusMap[name] || ''
  236 + return {
  237 + backgroundColor: found || '#000',
  238 + color: found ? '#fff' : '#000'
  239 + }
  240 + },
232 241 getStatusCss(name) {
233 242 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
234 243 const found = list.find(it => it && it.text === name) || {}
... ... @@ -373,6 +382,7 @@ export default {
373 382 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
374 383 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
375 384 }
  385 + this.detail = await fillStandardApprovedName(this.detail)
376 386 const lines = Array.isArray(data.contractStdProcessingLineList) ? data.contractStdProcessingLineList : []
377 387 this.productList = lines
378 388 } catch (e) {
... ...
... ... @@ -61,7 +61,7 @@
61 61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text>
62 62 </view>
63 63 <view class="info-row" v-if="item.status === 'STANDARD'">
64   - <text>正式合同规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span>
  64 + <text>标准合同规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span>
65 65 </view>
66 66 <view class="info-row">
67 67 <text>订货日期</text><text>{{ item.orderDate }}</text>
... ... @@ -103,12 +103,6 @@ export default {
103 103 return {
104 104 searchKeyword: '',
105 105 searchKeywordDebounced: '',
106   -
107   - tabs: [
108   - { label: '草稿合同', value: 'DRAFT' },
109   - { label: '标准合同', value: 'STANDARD' },
110   - { label: '已删除合同', value: 'DELETED' }
111   - ],
112 106 status: 'DRAFT',
113 107
114 108 query: { deptId: '', deptName: '', dateRange: [] },
... ... @@ -126,6 +120,23 @@ export default {
126 120 }
127 121 },
128 122 computed: {
  123 + roleCodes() {
  124 + const g = this.$store && this.$store.getters
  125 + return (g && g.roleCodes) || []
  126 + },
  127 + tabs() {
  128 + if (this.roleCodes.includes('constract_admin')) {
  129 + return [
  130 + { label: '草稿合同', value: 'DRAFT' },
  131 + { label: '标准合同', value: 'STANDARD' },
  132 + { label: '已删除合同', value: 'DELETED' }
  133 + ]
  134 + }
  135 + return [
  136 + { label: '草稿合同', value: 'DRAFT' },
  137 + { label: '标准合同', value: 'STANDARD' }
  138 + ]
  139 + },
129 140 extraCombined() {
130 141 return {
131 142 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -359,10 +370,10 @@ export default {
359 370 margin-bottom: 0;
360 371 }
361 372 text {
362   - width: 60%;
  373 + width: 50%;
363 374 &:last-child {
364 375 color: rgba(0,0,0,0.9);
365   - width: 40%;
  376 + width: 50%;
366 377 }
367 378 }
368 379 }
... ...
... ... @@ -124,7 +124,7 @@
124 124 </uni-list-item>
125 125 <uni-list-item title="备注">
126 126 <template v-slot:footer>
127   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  127 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
128 128 </template>
129 129 </uni-list-item>
130 130
... ... @@ -231,9 +231,9 @@ export default {
231 231 executionStandardName: '',
232 232 executionStandardRemarks: '',
233 233 includesPackagingFee: false,
234   - includesPackagingFeeName: '',
  234 + includesPackagingFeeName: '',
235 235 includesTransportFee: false,
236   - includesTransportFeeName: '',
  236 + includesTransportFeeName: '',
237 237 unit: '元、公斤、元/公斤',
238 238 totalAmountCapital: '',
239 239 depositInfo: '',
... ...
... ... @@ -141,7 +141,7 @@
141 141 </uni-list-item>
142 142 <uni-list-item title="备注">
143 143 <template v-slot:footer>
144   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  144 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
145 145 </template>
146 146 </uni-list-item>
147 147 <view class="quality">
... ... @@ -254,9 +254,9 @@ export default {
254 254 executionStandardName: '',
255 255 executionStandardRemarks: '',
256 256 includesPackagingFee: false,
257   - includesPackagingFeeName: '',
  257 + includesPackagingFeeName: '',
258 258 includesTransportFee: false,
259   - includesTransportFeeName: '',
  259 + includesTransportFeeName: '',
260 260 unit: '元、公斤、元/公斤',
261 261 totalAmountCapital: '',
262 262 destinationId: [],
... ...
... ... @@ -4,7 +4,8 @@
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 + <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">正式合同规范性审核</text><text class="value"><span class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span></text></view>
  8 + <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) : { color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 9 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName ||
9 10 '-'}}</text></view>
10 11 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName ||
... ... @@ -114,11 +115,12 @@
114 115 </template>
115 116
116 117 <script>
117   -import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle } from '@/api/contract'
  118 +import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle, statusMap } from '@/api/contract'
118 119 import ProductRel from './productRel.vue'
119 120 import DetailButtons from '@/components/detail-buttons/index.vue'
120 121 import FileUpload from '@/components/file-upload/index.vue'
121 122 import SingleSelectSheet from '@/components/single-select/index.vue'
  123 +import { getDicByCodes, getDicName } from '@/utils/dic.js'
122 124
123 125 export default {
124 126 name: 'ContractRetailDetail',
... ... @@ -208,6 +210,8 @@ export default {
208 210 },
209 211 ],
210 212 statusStyle: statusStyle,
  213 + statusMap: statusMap,
  214 + dicOptions: { AUDIT_STATUS: [] }
211 215 }
212 216 },
213 217 computed: {
... ... @@ -229,6 +233,7 @@ export default {
229 233 const status = options && options.status ? options.status : ''
230 234 this.id = id
231 235 this.status = status
  236 + this.loadAuditStatusDic()
232 237 this.loadDetail()
233 238 },
234 239 methods: {
... ... @@ -240,6 +245,27 @@ export default {
240 245 backgroundColor: found.bgColor || '#000'
241 246 }
242 247 },
  248 + async loadAuditStatusDic() {
  249 + try {
  250 + const results = await getDicByCodes(['AUDIT_STATUS'])
  251 + this.dicOptions.AUDIT_STATUS = (results.AUDIT_STATUS && results.AUDIT_STATUS.data) || []
  252 + this.refreshStandardApprovedName()
  253 + } catch (e) {
  254 + this.dicOptions.AUDIT_STATUS = []
  255 + }
  256 + },
  257 + refreshStandardApprovedName() {
  258 + const code = this.detail && this.detail.standardApproved
  259 + const name = getDicName('AUDIT_STATUS', code, this.dicOptions.AUDIT_STATUS)
  260 + this.detail = { ...this.detail, standardApprovedName: name }
  261 + },
  262 + getShippingStatusName(name) {
  263 + const found = this.statusMap[name] || ''
  264 + return {
  265 + backgroundColor: found || '#000',
  266 + color: found ? '#fff' : '#000'
  267 + }
  268 + },
243 269 onUploadSubmit() {
244 270 if (!this.fileInfo.id) {
245 271 uni.showToast({
... ... @@ -372,6 +398,7 @@ export default {
372 398 }
373 399 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
374 400 this.productList = lines
  401 + this.refreshStandardApprovedName()
375 402 } catch (e) {
376 403 this.detail = { ...this.detail }
377 404 this.productList = []
... ...
... ... @@ -61,7 +61,7 @@
61 61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text>
62 62 </view>
63 63 <view class="info-row" v-if="item.status === 'STANDARD'">
64   - <text>正式合同规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span>
  64 + <text>标准合同规范性审核状态</text><span class="info-status" :style="item.standardApprovedName ? getStatusCss(item.standardApprovedName) : ''">{{ item.standardApprovedName || '-' }}</span>
65 65 </view>
66 66 <view class="info-row">
67 67 <text>订货日期</text><text>{{ item.orderDate }}</text>
... ... @@ -103,21 +103,12 @@ export default {
103 103 return {
104 104 searchKeyword: '',
105 105 searchKeywordDebounced: '',
106   -
107   - tabs: [
108   - { label: '草稿合同', value: 'DRAFT' },
109   - { label: '标准合同', value: 'STANDARD' },
110   - { label: '已删除合同', value: 'DELETED' }
111   - ],
112 106 status: 'DRAFT',
113   -
114 107 query: { deptId: '', deptName: '', dateRange: [] },
115 108 extraParams: {},
116   -
117 109 batchMode: false,
118 110 selectedKeys: [],
119 111 currentItems: [],
120   -
121 112 filterVisible: false,
122 113 filterForm: { deptId: '', deptName: '', dateRange: [] },
123 114 deptSelectVisible: false,
... ... @@ -126,6 +117,23 @@ export default {
126 117 }
127 118 },
128 119 computed: {
  120 + roleCodes() {
  121 + const g = this.$store && this.$store.getters
  122 + return (g && g.roleCodes) || []
  123 + },
  124 + tabs() {
  125 + if (this.roleCodes.includes('constract_admin')) {
  126 + return [
  127 + { label: '草稿合同', value: 'DRAFT' },
  128 + { label: '标准合同', value: 'STANDARD' },
  129 + { label: '已删除合同', value: 'DELETED' }
  130 + ]
  131 + }
  132 + return [
  133 + { label: '草稿合同', value: 'DRAFT' },
  134 + { label: '标准合同', value: 'STANDARD' }
  135 + ]
  136 + },
129 137 extraCombined() {
130 138 return {
131 139 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -359,10 +367,10 @@ export default {
359 367 margin-bottom: 0;
360 368 }
361 369 text {
362   - width: 60%;
  370 + width: 50%;
363 371 &:last-child {
364 372 color: rgba(0,0,0,0.9);
365   - width: 40%;
  373 + width: 50%;
366 374 }
367 375 }
368 376 }
... ...
... ... @@ -139,7 +139,7 @@
139 139 </uni-list-item>
140 140 <uni-list-item title="备注">
141 141 <template v-slot:footer>
142   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  142 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
143 143 </template>
144 144 </uni-list-item>
145 145
... ... @@ -246,9 +246,9 @@ export default {
246 246 executionStandardName: '',
247 247 executionStandardRemarks: '',
248 248 includesPackagingFee: false,
249   - includesPackagingFeeName: '',
  249 + includesPackagingFeeName: '',
250 250 includesTransportFee: false,
251   - includesTransportFeeName: '',
  251 + includesTransportFeeName: '',
252 252 unit: '元、公斤、元/公斤',
253 253 totalAmountCapital: '',
254 254 depositInfo: '',
... ...
... ... @@ -139,7 +139,7 @@
139 139 </uni-list-item>
140 140 <uni-list-item title="备注">
141 141 <template v-slot:footer>
142   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  142 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
143 143 </template>
144 144 </uni-list-item>
145 145 <view class="quality">
... ... @@ -252,9 +252,9 @@ export default {
252 252 executionStandardName: '',
253 253 executionStandardRemarks: '',
254 254 includesPackagingFee: false,
255   - includesPackagingFeeName: '',
  255 + includesPackagingFeeName: '',
256 256 includesTransportFee: false,
257   - includesTransportFeeName: '',
  257 + includesTransportFeeName: '',
258 258 unit: '元、公斤、元/公斤',
259 259 totalAmountCapital: '',
260 260 destinationId: [],
... ...
... ... @@ -4,7 +4,15 @@
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 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'">
  8 + <text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text>
  9 + <text class="value">
  10 +
  11 + <span v-if="detail.status === 'STANDARD'" class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span>
  12 + <span v-if="detail.status === 'FORMAL'" class="info-status" :style="detail.formalApprovedName ? getStatusCss(detail.formalApprovedName) : ''" >{{ detail.formalApprovedName || '-' }}</span>
  13 +
  14 + </text>
  15 + </view> <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) : { color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 16 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 17 }}</text></view>
10 18 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -115,7 +123,8 @@
115 123 </template>
116 124
117 125 <script>
118   -import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, statusStyle } from '@/api/contract'
  126 +import { getContractApi, deleteContractApi, uploadFormalContract, uploadStandardContract, statusStyle, statusMap } from '@/api/contract'
  127 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
119 128 import ProductRel from './productRel.vue'
120 129 import DetailButtons from '@/components/detail-buttons/index.vue'
121 130 import FileUpload from '@/components/file-upload/index.vue'
... ... @@ -174,6 +183,7 @@ export default {
174 183 },
175 184 productList: [],
176 185 statusStyle: statusStyle,
  186 + statusMap: statusMap,
177 187 buttons: [{
178 188 text: '编辑',
179 189 visible: true,
... ... @@ -272,7 +282,7 @@ export default {
272 282 { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-upload')) },
273 283 { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) },
274 284 { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) },
275   - { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:restandard-approveview')) },
  285 + { ...this.buttons[8], visible: (s === 'STANDARD' && f && a === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-approve')) },
276 286 { ...this.buttons[9], visible: (s === 'FORMAL' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) },
277 287 { ...this.buttons[10], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) },
278 288 { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-review')) },
... ... @@ -285,6 +295,13 @@ export default {
285 295 this.loadDetail()
286 296 },
287 297 methods: {
  298 + getShippingStatusName(name) {
  299 + const found = this.statusMap[name] || ''
  300 + return {
  301 + backgroundColor: found || '#000',
  302 + color: found ? '#fff' : '#000'
  303 + }
  304 + },
288 305 onDelete() {
289 306 uni.showModal({
290 307 title: '确认删除',
... ... @@ -437,6 +454,8 @@ export default {
437 454 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
438 455 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
439 456 }
  457 + this.detail = await fillStandardApprovedName(this.detail)
  458 + this.detail = await fillFormalApprovedName(this.detail)
440 459 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
441 460 this.productList = lines
442 461 } catch (e) {
... ... @@ -559,4 +578,4 @@ export default {
559 578 color: rgba(0, 0, 0, 0.6);
560 579 font-size: 32rpx;
561 580 }
562   -</style>
\ No newline at end of file
  581 +</style>
... ...
... ... @@ -105,13 +105,6 @@ export default {
105 105 return {
106 106 searchKeyword: '',
107 107 searchKeywordDebounced: '',
108   -
109   - tabs: [
110   - { label: '草稿合同', value: 'DRAFT' },
111   - { label: '正式合同', value: 'FORMAL' },
112   - { label: '标准合同', value: 'STANDARD' },
113   - { label: '已删除合同', value: 'DELETED' }
114   - ],
115 108 status: 'DRAFT',
116 109
117 110 query: { deptId: '', deptName: '', dateRange: [] },
... ... @@ -129,6 +122,25 @@ export default {
129 122 }
130 123 },
131 124 computed: {
  125 + roleCodes() {
  126 + const g = this.$store && this.$store.getters
  127 + return (g && g.roleCodes) || []
  128 + },
  129 + tabs() {
  130 + if (this.roleCodes.includes('constract_admin')) {
  131 + return [
  132 + { label: '草稿合同', value: 'DRAFT' },
  133 + { label: '正式合同', value: 'FORMAL' },
  134 + { label: '标准合同', value: 'STANDARD' },
  135 + { label: '已删除合同', value: 'DELETED' }
  136 + ]
  137 + }
  138 + return [
  139 + { label: '草稿合同', value: 'DRAFT' },
  140 + { label: '正式合同', value: 'FORMAL' },
  141 + { label: '标准合同', value: 'STANDARD' }
  142 + ]
  143 + },
132 144 extraCombined() {
133 145 return {
134 146 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -361,10 +373,10 @@ export default {
361 373 margin-bottom: 0;
362 374 }
363 375 text {
364   - width: 60%;
  376 + width: 50%;
365 377 &:last-child {
366 378 color: rgba(0,0,0,0.9);
367   - width: 40%;
  379 + width: 50%;
368 380 }
369 381 }
370 382 }
... ...
... ... @@ -40,9 +40,30 @@
40 40 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
41 41 </template>
42 42 </uni-list-item>
43   - <uni-list-item title="规格">
  43 + <uni-list-item title="规格(mm)">
44 44 <template v-slot:footer>
45   - <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled />
  45 + <!-- <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled /> -->
  46 + <view class="value value-spec">
  47 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  48 + <view v-if="item.thickness" class="value-spec_box">
  49 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
  50 + </view>
  51 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
  52 + </view>
  53 + </view>
  54 + <view v-if="item.width" class="value-spec_val p12">*</view>
  55 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  56 + <view v-if="item.width" class="value-spec_box">
  57 + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
  58 + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view>
  59 + </view>
  60 + <view v-if="item.length" class="value-spec_val p12">*</view>
  61 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  62 + <view v-if="item.length" class="value-spec_box">
  63 + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
  64 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view>
  65 + </view>
  66 + </view>
46 67 </template>
47 68 </uni-list-item>
48 69 <uni-list-item title="状态">
... ... @@ -699,4 +720,42 @@ export default {
699 720 background: $theme-primary;
700 721 color: #fff;
701 722 }
  723 +.value-spec {
  724 + height: 48rpx;
  725 + display: flex;
  726 + align-items: center;
  727 + color: #000000;
  728 + // justify-content: end;
  729 + &_box {
  730 + position: relative;
  731 + width: 60rpx;
  732 + height: 48rpx;
  733 +
  734 + &_1 {
  735 + font-size: 16rpx;
  736 + position: absolute;
  737 + top: -10rpx;
  738 + left: 0;
  739 + }
  740 +
  741 + &_2 {
  742 + font-size: 16rpx;
  743 + position: absolute;
  744 + bottom: -10rpx;
  745 + left: 0;
  746 + }
  747 + }
  748 +
  749 + &_val {
  750 + font-size: 28rpx;
  751 +
  752 + &.p12 {
  753 + padding-right: 12rpx;
  754 + }
  755 + }
  756 + }
  757 + .row-spec {
  758 + height: 60rpx;
  759 + align-items: center;
  760 + }
702 761 </style>
\ No newline at end of file
... ...
... ... @@ -142,7 +142,7 @@
142 142 </uni-list-item>
143 143 <uni-list-item title="备注">
144 144 <template v-slot:footer>
145   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  145 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
146 146 </template>
147 147 </uni-list-item>
148 148
... ... @@ -248,9 +248,9 @@ export default {
248 248 executionStandardName: '',
249 249 executionStandardRemarks: '',
250 250 includesPackagingFee: false,
251   - includesPackagingFeeName: '',
  251 + includesPackagingFeeName: '',
252 252 includesTransportFee: false,
253   - includesTransportFeeName: '',
  253 + includesTransportFeeName: '',
254 254 unit: '元、公斤、元/公斤',
255 255 totalAmountCapital: '',
256 256 depositInfo: '',
... ...
... ... @@ -339,11 +339,11 @@ export default {
339 339 }
340 340
341 341 text {
342   - width: 60%;
  342 + width: 50%;
343 343
344 344 &:last-child {
345 345 color: rgba(0, 0, 0, 0.9);
346   - width: 40%;
  346 + width: 50%;
347 347 }
348 348 }
349 349 }
... ...
... ... @@ -141,7 +141,7 @@
141 141 </uni-list-item>
142 142 <uni-list-item title="备注">
143 143 <template v-slot:footer>
144   - <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  144 + <uni-easyinput type="textarea" v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
145 145 </template>
146 146 </uni-list-item>
147 147 <view class="quality">
... ... @@ -254,9 +254,9 @@ export default {
254 254 executionStandardName: '',
255 255 executionStandardRemarks: '',
256 256 includesPackagingFee: false,
257   - includesPackagingFeeName: '',
  257 + includesPackagingFeeName: '',
258 258 includesTransportFee: false,
259   - includesTransportFeeName: '',
  259 + includesTransportFeeName: '',
260 260 unit: '元、公斤、元/公斤',
261 261 totalAmountCapital: '',
262 262 destinationId: [],
... ...
... ... @@ -4,7 +4,16 @@
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 + <view class="row" v-if="detail.status === 'STANDARD' || detail.status === 'FORMAL'">
  8 + <text class="label">{{ detail.status === 'STANDARD' ? '标准合同' : '正式合同' }}规范性审核状态</text>
  9 + <text class="value">
  10 +
  11 + <span v-if="detail.status === 'STANDARD'" class="info-status" :style="detail.standardApprovedName ? getStatusCss(detail.standardApprovedName) : ''" >{{ detail.standardApprovedName || '-' }}</span>
  12 + <span v-if="detail.status === 'FORMAL'" class="info-status" :style="detail.formalApprovedName ? getStatusCss(detail.formalApprovedName) : ''" >{{ detail.formalApprovedName || '-' }}</span>
  13 +
  14 + </text>
  15 + </view>
  16 + <view class="row" v-if="detail.status === 'STANDARD'"><text class="label">合同状态</text><text class="value"><span class="info-status" :style="detail.shippingStatusName ? getShippingStatusName(detail.shippingStatusName) :{ color: '#000'}" >{{ detail.shippingStatusName || '-' }}</span></text></view>
8 17 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 18 }}</text></view>
10 19 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
... ... @@ -118,11 +127,12 @@
118 127 </template>
119 128
120 129 <script>
121   -import { getContractApi, deleteContractApi, uploadFormalContract, statusStyle, uploadStandardContract } from '@/api/contract'
  130 +import { getContractApi, deleteContractApi, uploadFormalContract, statusStyle, uploadStandardContract, statusMap, showContract } from '@/api/contract'
122 131 import ProductRel from './productRel.vue'
123 132 import DetailButtons from '@/components/detail-buttons/index.vue'
124 133 import FileUpload from '@/components/file-upload/index.vue'
125 134 import SingleSelectSheet from '@/components/single-select/index.vue'
  135 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
126 136
127 137 export default {
128 138 name: 'ContractUnplanDetail',
... ... @@ -174,6 +184,7 @@ export default {
174 184 packaging: ''
175 185 },
176 186 statusStyle: statusStyle,
  187 + statusMap: statusMap,
177 188 productList: [],
178 189 buttons: [{
179 190 text: '编辑',
... ... @@ -291,6 +302,14 @@ export default {
291 302 this.loadDetail()
292 303 },
293 304 methods: {
  305 + getShippingStatusName(name) {
  306 + const found = this.statusMap[name] || ''
  307 + console.log(found,'found')
  308 + return {
  309 + backgroundColor: found || '#000',
  310 + color: found ? '#fff' : '#000'
  311 + }
  312 + },
294 313 getStatusCss(name) {
295 314 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
296 315 const found = list.find(it => it && it.text === name) || {}
... ... @@ -333,8 +352,10 @@ export default {
333 352 })
334 353 },
335 354 onLockApply() {
336   - uni.navigateTo({
337   - url: '/pages/contract_unplan/lock_apply?id=' + this.detail.id || ''
  355 + showContract(this.detail.id).then(res => {
  356 + uni.navigateTo({
  357 + url: '/pages/contract_unplan/lock_apply?id=' + this.detail.id || ''
  358 + })
338 359 })
339 360 },
340 361 uploadContract(id, type = 'formal') {
... ... @@ -462,6 +483,8 @@ export default {
462 483 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
463 484 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
464 485 }
  486 + this.detail = await fillStandardApprovedName(this.detail)
  487 + this.detail = await fillFormalApprovedName(this.detail)
465 488 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
466 489 this.productList = lines
467 490 } catch (e) {
... ...
... ... @@ -105,18 +105,9 @@ export default {
105 105 return {
106 106 searchKeyword: '',
107 107 searchKeywordDebounced: '',
108   -
109   - tabs: [
110   - { label: '草稿合同', value: 'DRAFT' },
111   - { label: '正式合同', value: 'FORMAL' },
112   - { label: '标准合同', value: 'STANDARD' },
113   - { label: '已删除合同', value: 'DELETED' }
114   - ],
115 108 status: 'DRAFT',
116   -
117 109 query: { deptId: '', deptName: '', dateRange: [] },
118 110 extraParams: {},
119   -
120 111 batchMode: false,
121 112 selectedKeys: [],
122 113 currentItems: [],
... ... @@ -129,6 +120,25 @@ export default {
129 120 }
130 121 },
131 122 computed: {
  123 + roleCodes() {
  124 + const g = this.$store && this.$store.getters
  125 + return (g && g.roleCodes) || []
  126 + },
  127 + tabs() {
  128 + if (this.roleCodes.includes('constract_admin')) {
  129 + return [
  130 + { label: '草稿合同', value: 'DRAFT' },
  131 + { label: '正式合同', value: 'FORMAL' },
  132 + { label: '标准合同', value: 'STANDARD' },
  133 + { label: '已删除合同', value: 'DELETED' }
  134 + ]
  135 + }
  136 + return [
  137 + { label: '草稿合同', value: 'DRAFT' },
  138 + { label: '正式合同', value: 'FORMAL' },
  139 + { label: '标准合同', value: 'STANDARD' }
  140 + ]
  141 + },
132 142 extraCombined() {
133 143 return {
134 144 keyword: this.searchKeywordDebounced || undefined,
... ... @@ -363,10 +373,10 @@ export default {
363 373 margin-bottom: 0;
364 374 }
365 375 text {
366   - width: 60%;
  376 + width: 50%;
367 377 &:last-child {
368 378 color: rgba(0,0,0,0.9);
369   - width: 40%;
  379 + width: 50%;
370 380 }
371 381 }
372 382 }
... ...
... ... @@ -39,9 +39,30 @@
39 39 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
40 40 </template>
41 41 </uni-list-item>
42   - <uni-list-item title="规格">
  42 + <uni-list-item title="规格(mm)">
43 43 <template v-slot:footer>
44   - <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled />
  44 + <!-- <uni-easyinput v-model="item.specDisplay" placeholder="自动拼接规格" :clearable="false" disabled /> -->
  45 + <view class="value value-spec">
  46 + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view>
  47 + <view v-if="item.thickness" class="value-spec_box">
  48 + <view v-if="item.thicknessTolPos" class="value-spec_box_1">+{{ item.thicknessTolPos }}
  49 + </view>
  50 + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">-{{ item.thicknessTolNeg }}
  51 + </view>
  52 + </view>
  53 + <view v-if="item.width" class="value-spec_val p12">*</view>
  54 + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view>
  55 + <view v-if="item.width" class="value-spec_box">
  56 + <view v-if="item.widthTolPos" class="value-spec_box_1">+{{ item.widthTolPos }}</view>
  57 + <view v-if="item.widthTolNeg" class="value-spec_box_2">-{{ item.widthTolNeg }}</view>
  58 + </view>
  59 + <view v-if="item.length" class="value-spec_val p12">*</view>
  60 + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view>
  61 + <view v-if="item.length" class="value-spec_box">
  62 + <view v-if="item.lengthTolPos" class="value-spec_box_1">+{{ item.lengthTolPos }}</view>
  63 + <view v-if="item.lengthTolNeg" class="value-spec_box_2">-{{ item.lengthTolNeg }}</view>
  64 + </view>
  65 + </view>
45 66 </template>
46 67 </uni-list-item>
47 68 <uni-list-item title="状态">
... ... @@ -699,4 +720,42 @@ export default {
699 720 background: $theme-primary;
700 721 color: #fff;
701 722 }
  723 +.value-spec {
  724 + height: 48rpx;
  725 + display: flex;
  726 + align-items: center;
  727 + color: #000000;
  728 + // justify-content: end;
  729 + &_box {
  730 + position: relative;
  731 + width: 60rpx;
  732 + height: 48rpx;
  733 +
  734 + &_1 {
  735 + font-size: 16rpx;
  736 + position: absolute;
  737 + top: -10rpx;
  738 + left: 0;
  739 + }
  740 +
  741 + &_2 {
  742 + font-size: 16rpx;
  743 + position: absolute;
  744 + bottom: -10rpx;
  745 + left: 0;
  746 + }
  747 + }
  748 +
  749 + &_val {
  750 + font-size: 28rpx;
  751 +
  752 + &.p12 {
  753 + padding-right: 12rpx;
  754 + }
  755 + }
  756 + }
  757 + .row-spec {
  758 + height: 60rpx;
  759 + align-items: center;
  760 + }
702 761 </style>
\ No newline at end of file
... ...
... ... @@ -108,11 +108,13 @@ export default {
108 108 const res = await showContract(this.id)
109 109 const data = res && res.data ? res.data : {}
110 110 this.detail = {
  111 + contractId: data.contractId || '',
111 112 contractCode: data.contractCode || '',
112 113 customerName: data.customerName || '',
113 114 deptName: data.deptName || '',
114 115 workshopName: data.workshopName || '',
115 116 orderType: data.orderType || '',
  117 + contractTypeCode: data.contractType || '',
116 118 contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单',
117 119 orderDate: (data.orderDate || '').slice(0, 10),
118 120 applicationCount: data.applicationCount || '',
... ... @@ -139,6 +141,7 @@ export default {
139 141 if (res.confirm) {
140 142 specLockDelayApplication({
141 143 ...this.detail,
  144 + contractType: this.detail.contractTypeCode || '',
142 145 specLockDate: date,
143 146 delayReason: reason
144 147 }).then(res => {
... ...
... ... @@ -139,7 +139,7 @@
139 139 </uni-list-item>
140 140 <uni-list-item title="备注">
141 141 <template v-slot:footer>
142   - <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" />
  142 + <uni-easyinput v-model="form.remarks" placeholder="请输入备注" :inputBorder="false" maxlength="2000" />
143 143 </template>
144 144 </uni-list-item>
145 145
... ... @@ -245,9 +245,9 @@ export default {
245 245 executionStandardName: '',
246 246 executionStandardRemarks: '',
247 247 includesPackagingFee: false,
248   - includesPackagingFeeName: '',
  248 + includesPackagingFeeName: '',
249 249 includesTransportFee: false,
250   - includesTransportFeeName: '',
  250 + includesTransportFeeName: '',
251 251 unit: '元、公斤、元/公斤',
252 252 totalAmountCapital: '',
253 253 depositInfo: '',
... ...
... ... @@ -38,3 +38,24 @@ export function getDicName(code, value, items = []) {
38 38 const item = list.find(it => it && it.code === value);
39 39 return item ? item.name : value;
40 40 }
  41 +
  42 +export function getAuditStatusName(value, items = []) {
  43 + return getDicName('AUDIT_STATUS', value, items);
  44 +}
  45 +
  46 +export async function getAuditStatusOptions() {
  47 + const results = await getDicByCodes(['AUDIT_STATUS']);
  48 + return (results.AUDIT_STATUS && results.AUDIT_STATUS.data) || [];
  49 +}
  50 +
  51 +export async function fillStandardApprovedName(detail = {}) {
  52 + const items = await getAuditStatusOptions();
  53 + const name = getAuditStatusName(detail && detail.standardApproved, items);
  54 + return { ...detail, standardApprovedName: name };
  55 +}
  56 +
  57 +export async function fillFormalApprovedName(detail = {}) {
  58 + const items = await getAuditStatusOptions();
  59 + const name = getAuditStatusName(detail && detail.formalApproved, items);
  60 + return { ...detail, formalApprovedName: name };
  61 +}
... ...