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,6 +12,7 @@ export const statusMap = {
12 '生产中': '#2BA471', 12 '生产中': '#2BA471',
13 '审核通过': '#2BA471', 13 '审核通过': '#2BA471',
14 '审核中': '#3D48A3', 14 '审核中': '#3D48A3',
  15 + '审批中': '#3D48A3',
15 '已签收': '#E7E7E7', 16 '已签收': '#E7E7E7',
16 '已取消': '#000', 17 '已取消': '#000',
17 '已发货': '#D54941', 18 '已发货': '#D54941',
@@ -144,7 +144,7 @@ @@ -144,7 +144,7 @@
144 </uni-list-item> 144 </uni-list-item>
145 <uni-list-item title="备注"> 145 <uni-list-item title="备注">
146 <template v-slot:footer> 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 </template> 148 </template>
149 </uni-list-item> 149 </uni-list-item>
150 <view class="quality"> 150 <view class="quality">
@@ -260,10 +260,10 @@ export default { @@ -260,10 +260,10 @@ export default {
260 executionStandardName: '', 260 executionStandardName: '',
261 executionStandardRemarks: '', 261 executionStandardRemarks: '',
262 includesPackagingFee: false, 262 includesPackagingFee: false,
263 - includesPackagingFeeName: '', 263 + includesPackagingFeeName: '',
264 includesTransportFee: false, 264 includesTransportFee: false,
265 - includesTransportFeeName: '',  
266 - unit: '美元、公斤、元美/公斤', 265 + includesTransportFeeName: '否',
  266 + unit: '美元、公斤、美元/公斤',
267 totalAmountCapital: '', 267 totalAmountCapital: '',
268 destinationId: [], 268 destinationId: [],
269 destinationLabel: '', 269 destinationLabel: '',
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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="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 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-' 9 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 }}</text></view> 10 }}</text></view>
10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' 11 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
@@ -112,11 +113,13 @@ @@ -112,11 +113,13 @@
112 </template> 113 </template>
113 114
114 <script> 115 <script>
115 -import { getContractApi, deleteContractApi, uploadStandardContract, uploadSignedContractFile, statusStyle} from '@/api/contract' 116 +import { getContractApi, deleteContractApi, uploadStandardContract, uploadSignedContractFile, statusStyle, statusMap } from '@/api/contract'
116 import ProductRel from './productRel.vue' 117 import ProductRel from './productRel.vue'
117 import DetailButtons from '@/components/detail-buttons/index.vue' 118 import DetailButtons from '@/components/detail-buttons/index.vue'
118 import FileUpload from '@/components/file-upload/index.vue' 119 import FileUpload from '@/components/file-upload/index.vue'
119 import SingleSelectSheet from '@/components/single-select/index.vue' 120 import SingleSelectSheet from '@/components/single-select/index.vue'
  121 +import { fillStandardApprovedName } from '@/utils/dic.js'
  122 +
120 export default { 123 export default {
121 name: 'ContractForeignStdDetail', 124 name: 'ContractForeignStdDetail',
122 components: { ProductRel, DetailButtons, FileUpload, SingleSelectSheet }, 125 components: { ProductRel, DetailButtons, FileUpload, SingleSelectSheet },
@@ -172,6 +175,7 @@ export default { @@ -172,6 +175,7 @@ export default {
172 packaging: '' 175 packaging: ''
173 }, 176 },
174 statusStyle: statusStyle, 177 statusStyle: statusStyle,
  178 + statusMap: statusMap,
175 productList: [], 179 productList: [],
176 buttons: [{ 180 buttons: [{
177 text: '编辑', 181 text: '编辑',
@@ -237,6 +241,13 @@ export default { @@ -237,6 +241,13 @@ export default {
237 this.loadDetail() 241 this.loadDetail()
238 }, 242 },
239 methods: { 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 getStatusCss(name) { 251 getStatusCss(name) {
241 const list = Array.isArray(this.statusStyle) ? this.statusStyle : [] 252 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
242 const found = list.find(it => it && it.text === name) || {} 253 const found = list.find(it => it && it.text === name) || {}
@@ -387,6 +398,7 @@ export default { @@ -387,6 +398,7 @@ export default {
387 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '', 398 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
388 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '', 399 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
389 } 400 }
  401 + this.detail = await fillStandardApprovedName(this.detail)
390 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : [] 402 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
391 this.productList = lines 403 this.productList = lines
392 } catch (e) { 404 } catch (e) {
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> 61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text>
62 </view> 62 </view>
63 <view class="info-row" v-if="item.status === 'STANDARD'"> 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 </view> 65 </view>
66 <view class="info-row"> 66 <view class="info-row">
67 <text>订货日期</text><text>{{ item.orderDate }}</text> 67 <text>订货日期</text><text>{{ item.orderDate }}</text>
@@ -104,11 +104,7 @@ export default { @@ -104,11 +104,7 @@ export default {
104 searchKeyword: '', 104 searchKeyword: '',
105 searchKeywordDebounced: '', 105 searchKeywordDebounced: '',
106 106
107 - tabs: [  
108 - { label: '草稿合同', value: 'DRAFT' },  
109 - { label: '标准合同', value: 'STANDARD' },  
110 - { label: '已删除合同', value: 'DELETED' }  
111 - ], 107 +
112 status: 'DRAFT', 108 status: 'DRAFT',
113 109
114 query: { deptId: '', deptName: '', dateRange: [] }, 110 query: { deptId: '', deptName: '', dateRange: [] },
@@ -126,6 +122,23 @@ export default { @@ -126,6 +122,23 @@ export default {
126 } 122 }
127 }, 123 },
128 computed: { 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 extraCombined() { 142 extraCombined() {
130 return { 143 return {
131 keyword: this.searchKeywordDebounced || undefined, 144 keyword: this.searchKeywordDebounced || undefined,
@@ -344,10 +357,10 @@ export default { @@ -344,10 +357,10 @@ export default {
344 margin-bottom: 0; 357 margin-bottom: 0;
345 } 358 }
346 text { 359 text {
347 - width: 60%; 360 + width: 50%;
348 &:last-child { 361 &:last-child {
349 color: rgba(0,0,0,0.9); 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,7 +143,7 @@
143 </uni-list-item> 143 </uni-list-item>
144 <uni-list-item title="备注"> 144 <uni-list-item title="备注">
145 <template v-slot:footer> 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 </template> 147 </template>
148 </uni-list-item> 148 </uni-list-item>
149 149
@@ -249,9 +249,9 @@ export default { @@ -249,9 +249,9 @@ export default {
249 executionStandardName: '', 249 executionStandardName: '',
250 executionStandardRemarks: '', 250 executionStandardRemarks: '',
251 includesPackagingFee: false, 251 includesPackagingFee: false,
252 - includesPackagingFeeName: '', 252 + includesPackagingFeeName: '',
253 includesTransportFee: false, 253 includesTransportFee: false,
254 - includesTransportFeeName: '', 254 + includesTransportFeeName: '',
255 unit: '美元、公斤、美元/公斤', 255 unit: '美元、公斤、美元/公斤',
256 totalAmountCapital: '', 256 totalAmountCapital: '',
257 depositInfo: '', 257 depositInfo: '',
@@ -147,7 +147,7 @@ @@ -147,7 +147,7 @@
147 </uni-list-item> 147 </uni-list-item>
148 <uni-list-item title="备注"> 148 <uni-list-item title="备注">
149 <template v-slot:footer> 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 </template> 151 </template>
152 </uni-list-item> 152 </uni-list-item>
153 <view class="quality"> 153 <view class="quality">
@@ -260,9 +260,9 @@ export default { @@ -260,9 +260,9 @@ export default {
260 executionStandardName: '', 260 executionStandardName: '',
261 executionStandardRemarks: '', 261 executionStandardRemarks: '',
262 includesPackagingFee: false, 262 includesPackagingFee: false,
263 - includesPackagingFeeName: '', 263 + includesPackagingFeeName: '',
264 includesTransportFee: false, 264 includesTransportFee: false,
265 - includesTransportFeeName: '', 265 + includesTransportFeeName: '',
266 unit: '美元、公斤、美元/公斤', 266 unit: '美元、公斤、美元/公斤',
267 totalAmountCapital: '', 267 totalAmountCapital: '',
268 destinationId: [], 268 destinationId: [],
@@ -4,7 +4,13 @@ @@ -4,7 +4,13 @@
4 <view class="detail-page"> 4 <view class="detail-page">
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-' 14 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 }}</text></view> 15 }}</text></view>
10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' 16 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
@@ -119,11 +125,12 @@ @@ -119,11 +125,12 @@
119 </template> 125 </template>
120 126
121 <script> 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 import ProductRel from './productRel.vue' 129 import ProductRel from './productRel.vue'
124 import DetailButtons from '@/components/detail-buttons/index.vue' 130 import DetailButtons from '@/components/detail-buttons/index.vue'
125 import FileUpload from '@/components/file-upload/index.vue' 131 import FileUpload from '@/components/file-upload/index.vue'
126 import SingleSelectSheet from '@/components/single-select/index.vue' 132 import SingleSelectSheet from '@/components/single-select/index.vue'
  133 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
127 134
128 export default { 135 export default {
129 name: 'ContractForeignStockDetail', 136 name: 'ContractForeignStockDetail',
@@ -139,6 +146,7 @@ export default { @@ -139,6 +146,7 @@ export default {
139 standardStandardizedName: '', 146 standardStandardizedName: '',
140 sheet: { visible: false, title: '请选择', options: [], value: '' }, 147 sheet: { visible: false, title: '请选择', options: [], value: '' },
141 statusStyle: statusStyle, 148 statusStyle: statusStyle,
  149 + statusMap: statusMap,
142 detail: { 150 detail: {
143 code: '', 151 code: '',
144 supplier: '', 152 supplier: '',
@@ -298,6 +306,13 @@ export default { @@ -298,6 +306,13 @@ export default {
298 this.loadDetail() 306 this.loadDetail()
299 }, 307 },
300 methods: { 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 getStatusCss(name) { 316 getStatusCss(name) {
302 const list = Array.isArray(this.statusStyle) ? this.statusStyle : [] 317 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
303 const found = list.find(it => it && it.text === name) || {} 318 const found = list.find(it => it && it.text === name) || {}
@@ -469,6 +484,8 @@ export default { @@ -469,6 +484,8 @@ export default {
469 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '', 484 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
470 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '', 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 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : [] 489 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
473 this.productList = lines 490 this.productList = lines
474 } catch (e) { 491 } catch (e) {
@@ -105,13 +105,6 @@ export default { @@ -105,13 +105,6 @@ export default {
105 return { 105 return {
106 searchKeyword: '', 106 searchKeyword: '',
107 searchKeywordDebounced: '', 107 searchKeywordDebounced: '',
108 -  
109 - tabs: [  
110 - { label: '草稿合同', value: 'DRAFT' },  
111 - { label: '正式合同', value: 'FORMAL' },  
112 - { label: '标准合同', value: 'STANDARD' },  
113 - { label: '已删除合同', value: 'DELETED' }  
114 - ],  
115 status: 'DRAFT', 108 status: 'DRAFT',
116 109
117 query: { deptId: '', deptName: '', dateRange: [] }, 110 query: { deptId: '', deptName: '', dateRange: [] },
@@ -129,6 +122,25 @@ export default { @@ -129,6 +122,25 @@ export default {
129 } 122 }
130 }, 123 },
131 computed: { 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 extraCombined() { 144 extraCombined() {
133 return { 145 return {
134 keyword: this.searchKeywordDebounced || undefined, 146 keyword: this.searchKeywordDebounced || undefined,
@@ -359,10 +371,10 @@ export default { @@ -359,10 +371,10 @@ export default {
359 margin-bottom: 0; 371 margin-bottom: 0;
360 } 372 }
361 text { 373 text {
362 - width: 60%; 374 + width: 50%;
363 &:last-child { 375 &:last-child {
364 color: rgba(0,0,0,0.9); 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,9 +40,30 @@
40 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled /> 40 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
41 </template> 41 </template>
42 </uni-list-item> 42 </uni-list-item>
43 - <uni-list-item title="规格"> 43 + <uni-list-item title="规格(mm)">
44 <template v-slot:footer> 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 </template> 67 </template>
47 </uni-list-item> 68 </uni-list-item>
48 <uni-list-item title="状态"> 69 <uni-list-item title="状态">
@@ -699,4 +720,42 @@ export default { @@ -699,4 +720,42 @@ export default {
699 background: $theme-primary; 720 background: $theme-primary;
700 color: #fff; 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 </style> 761 </style>
@@ -147,7 +147,7 @@ @@ -147,7 +147,7 @@
147 </uni-list-item> 147 </uni-list-item>
148 <uni-list-item title="备注"> 148 <uni-list-item title="备注">
149 <template v-slot:footer> 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 </template> 151 </template>
152 </uni-list-item> 152 </uni-list-item>
153 153
@@ -254,9 +254,9 @@ export default { @@ -254,9 +254,9 @@ export default {
254 executionStandardName: '', 254 executionStandardName: '',
255 executionStandardRemarks: '', 255 executionStandardRemarks: '',
256 includesPackagingFee: false, 256 includesPackagingFee: false,
257 - includesPackagingFeeName: '', 257 + includesPackagingFeeName: '',
258 includesTransportFee: false, 258 includesTransportFee: false,
259 - includesTransportFeeName: '', 259 + includesTransportFeeName: '',
260 unit: '美元、公斤、美元/公斤', 260 unit: '美元、公斤、美元/公斤',
261 totalAmountCapital: '', 261 totalAmountCapital: '',
262 depositInfo: '', 262 depositInfo: '',
@@ -145,7 +145,7 @@ @@ -145,7 +145,7 @@
145 </uni-list-item> 145 </uni-list-item>
146 <uni-list-item title="备注"> 146 <uni-list-item title="备注">
147 <template v-slot:footer> 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 </template> 149 </template>
150 </uni-list-item> 150 </uni-list-item>
151 <view class="quality"> 151 <view class="quality">
@@ -258,9 +258,9 @@ export default { @@ -258,9 +258,9 @@ export default {
258 executionStandardName: '', 258 executionStandardName: '',
259 executionStandardRemarks: '', 259 executionStandardRemarks: '',
260 includesPackagingFee: false, 260 includesPackagingFee: false,
261 - includesPackagingFeeName: '', 261 + includesPackagingFeeName: '',
262 includesTransportFee: false, 262 includesTransportFee: false,
263 - includesTransportFeeName: '', 263 + includesTransportFeeName: '',
264 unit: '美元、公斤、美元/公斤', 264 unit: '美元、公斤、美元/公斤',
265 totalAmountCapital: '', 265 totalAmountCapital: '',
266 destinationId: [], 266 destinationId: [],
@@ -4,7 +4,15 @@ @@ -4,7 +4,15 @@
4 <view class="detail-page"> 4 <view class="detail-page">
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-' 16 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 }}</text></view> 17 }}</text></view>
10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' 18 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
@@ -120,11 +128,12 @@ @@ -120,11 +128,12 @@
120 </template> 128 </template>
121 129
122 <script> 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 import ProductRel from './productRel.vue' 132 import ProductRel from './productRel.vue'
125 import DetailButtons from '@/components/detail-buttons/index.vue' 133 import DetailButtons from '@/components/detail-buttons/index.vue'
126 import FileUpload from '@/components/file-upload/index.vue' 134 import FileUpload from '@/components/file-upload/index.vue'
127 import SingleSelectSheet from '@/components/single-select/index.vue' 135 import SingleSelectSheet from '@/components/single-select/index.vue'
  136 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
128 137
129 export default { 138 export default {
130 name: 'ContractForeignUnplanDetail', 139 name: 'ContractForeignUnplanDetail',
@@ -182,6 +191,7 @@ export default { @@ -182,6 +191,7 @@ export default {
182 }, 191 },
183 productList: [], 192 productList: [],
184 statusStyle: statusStyle, 193 statusStyle: statusStyle,
  194 + statusMap: statusMap,
185 buttons: [{ 195 buttons: [{
186 text: '编辑', 196 text: '编辑',
187 visible: true, 197 visible: true,
@@ -305,6 +315,13 @@ export default { @@ -305,6 +315,13 @@ export default {
305 this.loadDetail() 315 this.loadDetail()
306 }, 316 },
307 methods: { 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 getStatusCss(name) { 325 getStatusCss(name) {
309 const list = Array.isArray(this.statusStyle) ? this.statusStyle : [] 326 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
310 const found = list.find(it => it && it.text === name) || {} 327 const found = list.find(it => it && it.text === name) || {}
@@ -345,8 +362,10 @@ export default { @@ -345,8 +362,10 @@ export default {
345 }) 362 })
346 }, 363 },
347 onLockApply() { 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 onEdit() { 371 onEdit() {
@@ -479,6 +498,8 @@ export default { @@ -479,6 +498,8 @@ export default {
479 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '', 498 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
480 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '', 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 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : [] 503 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
483 this.productList = lines 504 this.productList = lines
484 } catch (e) { 505 } catch (e) {
@@ -105,13 +105,6 @@ export default { @@ -105,13 +105,6 @@ export default {
105 return { 105 return {
106 searchKeyword: '', 106 searchKeyword: '',
107 searchKeywordDebounced: '', 107 searchKeywordDebounced: '',
108 -  
109 - tabs: [  
110 - { label: '草稿合同', value: 'DRAFT' },  
111 - { label: '正式合同', value: 'FORMAL' },  
112 - { label: '标准合同', value: 'STANDARD' },  
113 - { label: '已删除合同', value: 'DELETED' }  
114 - ],  
115 status: 'DRAFT', 108 status: 'DRAFT',
116 109
117 query: { deptId: '', deptName: '', dateRange: [] }, 110 query: { deptId: '', deptName: '', dateRange: [] },
@@ -129,6 +122,25 @@ export default { @@ -129,6 +122,25 @@ export default {
129 } 122 }
130 }, 123 },
131 computed: { 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 extraCombined() { 144 extraCombined() {
133 return { 145 return {
134 keyword: this.searchKeywordDebounced || undefined, 146 keyword: this.searchKeywordDebounced || undefined,
@@ -361,10 +373,10 @@ export default { @@ -361,10 +373,10 @@ export default {
361 margin-bottom: 0; 373 margin-bottom: 0;
362 } 374 }
363 text { 375 text {
364 - width: 60%; 376 + width: 50%;
365 &:last-child { 377 &:last-child {
366 color: rgba(0,0,0,0.9); 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,9 +39,30 @@
39 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled /> 39 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
40 </template> 40 </template>
41 </uni-list-item> 41 </uni-list-item>
42 - <uni-list-item title="规格"> 42 + <uni-list-item title="规格(mm)">
43 <template v-slot:footer> 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 </template> 66 </template>
46 </uni-list-item> 67 </uni-list-item>
47 <uni-list-item title="状态"> 68 <uni-list-item title="状态">
@@ -699,4 +720,42 @@ export default { @@ -699,4 +720,42 @@ export default {
699 background: $theme-primary; 720 background: $theme-primary;
700 color: #fff; 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 </style> 761 </style>
@@ -108,11 +108,13 @@ export default { @@ -108,11 +108,13 @@ export default {
108 const res = await showContract(this.id) 108 const res = await showContract(this.id)
109 const data = res && res.data ? res.data : {} 109 const data = res && res.data ? res.data : {}
110 this.detail = { 110 this.detail = {
  111 + contractId: data.contractId || '',
111 contractCode: data.contractCode || '', 112 contractCode: data.contractCode || '',
112 customerName: data.customerName || '', 113 customerName: data.customerName || '',
113 deptName: data.deptName || '', 114 deptName: data.deptName || '',
114 workshopName: data.workshopName || '', 115 workshopName: data.workshopName || '',
115 orderType: data.orderType || '', 116 orderType: data.orderType || '',
  117 + contractTypeCode: data.contractType || '',
116 contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单', 118 contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单',
117 orderDate: (data.orderDate || '').slice(0, 10), 119 orderDate: (data.orderDate || '').slice(0, 10),
118 applicationCount: data.applicationCount || '', 120 applicationCount: data.applicationCount || '',
@@ -139,6 +141,7 @@ export default { @@ -139,6 +141,7 @@ export default {
139 if (res.confirm) { 141 if (res.confirm) {
140 specLockDelayApplication({ 142 specLockDelayApplication({
141 ...this.detail, 143 ...this.detail,
  144 + contractType: this.detail.contractTypeCode || '',
142 specLockDate: date, 145 specLockDate: date,
143 delayReason: reason 146 delayReason: reason
144 }).then(res => { 147 }).then(res => {
@@ -146,7 +146,7 @@ @@ -146,7 +146,7 @@
146 </uni-list-item> 146 </uni-list-item>
147 <uni-list-item title="备注"> 147 <uni-list-item title="备注">
148 <template v-slot:footer> 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 </template> 150 </template>
151 </uni-list-item> 151 </uni-list-item>
152 152
@@ -253,9 +253,9 @@ export default { @@ -253,9 +253,9 @@ export default {
253 executionStandardName: '', 253 executionStandardName: '',
254 executionStandardRemarks: '', 254 executionStandardRemarks: '',
255 includesPackagingFee: false, 255 includesPackagingFee: false,
256 - includesPackagingFeeName: '', 256 + includesPackagingFeeName: '',
257 includesTransportFee: false, 257 includesTransportFee: false,
258 - includesTransportFeeName: '', 258 + includesTransportFeeName: '',
259 unit: '美元、公斤、美元/公斤', 259 unit: '美元、公斤、美元/公斤',
260 totalAmountCapital: '', 260 totalAmountCapital: '',
261 depositInfo: '', 261 depositInfo: '',
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 </template> 36 </template>
37 </uni-list-item> 37 </uni-list-item>
38 38
39 - <uni-list-item title="授截止日期"> 39 + <uni-list-item title="授截止日期">
40 <template v-slot:footer> 40 <template v-slot:footer>
41 <uni-datetime-picker type="date" v-model="form.validityTime" /> 41 <uni-datetime-picker type="date" v-model="form.validityTime" />
42 </template> 42 </template>
@@ -211,7 +211,7 @@ export default { @@ -211,7 +211,7 @@ export default {
211 { key: 'company', label: '所属单位' }, 211 { key: 'company', label: '所属单位' },
212 { key: 'materialTypeId', label: '品种' }, 212 { key: 'materialTypeId', label: '品种' },
213 { key: 'hasFrameworkAgreement', label: '是否签订框架合同' }, 213 { key: 'hasFrameworkAgreement', label: '是否签订框架合同' },
214 - { key: 'validityTime', label: '授截止日期' } 214 + { key: 'validityTime', label: '授截止日期' }
215 ] 215 ]
216 for (const it of checks) { 216 for (const it of checks) {
217 const val = this.form[it.key] 217 const val = this.form[it.key]
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <view class="row"><text class="label">品种</text><text class="value">{{ form.materialTypeName }}</text></view> 9 <view class="row"><text class="label">品种</text><text class="value">{{ form.materialTypeName }}</text></view>
10 <view class="row"><text class="label">是否签订</text><text class="value">{{ form.hasFrameworkAgreementName 10 <view class="row"><text class="label">是否签订</text><text class="value">{{ form.hasFrameworkAgreementName
11 }}</text></view> 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 </view> 13 </view>
14 </view> 14 </view>
15 </scroll-view> 15 </scroll-view>
@@ -317,11 +317,11 @@ export default { @@ -317,11 +317,11 @@ export default {
317 } 317 }
318 318
319 text { 319 text {
320 - width: 60%; 320 + width: 50%;
321 321
322 &:last-child { 322 &:last-child {
323 color: rgba(0, 0, 0, 0.9); 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,7 +36,7 @@
36 </template> 36 </template>
37 </uni-list-item> 37 </uni-list-item>
38 38
39 - <uni-list-item title="授截止日期"> 39 + <uni-list-item title="授截止日期">
40 <template v-slot:footer> 40 <template v-slot:footer>
41 <uni-datetime-picker type="date" v-model="form.validityTime" /> 41 <uni-datetime-picker type="date" v-model="form.validityTime" />
42 </template> 42 </template>
@@ -160,7 +160,7 @@ export default { @@ -160,7 +160,7 @@ export default {
160 { key: 'company', label: '所属单位' }, 160 { key: 'company', label: '所属单位' },
161 { key: 'materialTypeId', label: '品种' }, 161 { key: 'materialTypeId', label: '品种' },
162 { key: 'hasFrameworkAgreement', label: '是否签订框架合同' }, 162 { key: 'hasFrameworkAgreement', label: '是否签订框架合同' },
163 - { key: 'validityTime', label: '授截止日期' } 163 + { key: 'validityTime', label: '授截止日期' }
164 ] 164 ]
165 for (const it of checks) { 165 for (const it of checks) {
166 const val = this.form[it.key] 166 const val = this.form[it.key]
@@ -145,7 +145,7 @@ @@ -145,7 +145,7 @@
145 </uni-list-item> 145 </uni-list-item>
146 <uni-list-item title="备注"> 146 <uni-list-item title="备注">
147 <template v-slot:footer> 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 </template> 149 </template>
150 </uni-list-item> 150 </uni-list-item>
151 <view class="quality"> 151 <view class="quality">
@@ -258,9 +258,9 @@ export default { @@ -258,9 +258,9 @@ export default {
258 executionStandardName: '', 258 executionStandardName: '',
259 executionStandardRemarks: '', 259 executionStandardRemarks: '',
260 includesPackagingFee: false, 260 includesPackagingFee: false,
261 - includesPackagingFeeName: '', 261 + includesPackagingFeeName: '',
262 includesTransportFee: false, 262 includesTransportFee: false,
263 - includesTransportFeeName: '', 263 + includesTransportFeeName: '',
264 unit: '元、公斤、元/公斤', 264 unit: '元、公斤、元/公斤',
265 totalAmountCapital: '', 265 totalAmountCapital: '',
266 destinationId: [], 266 destinationId: [],
@@ -5,6 +5,7 @@ statusStyl<template> @@ -5,6 +5,7 @@ statusStyl<template>
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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="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 <view class="row"><text class="label">承揽方</text><text class="value">{{ detail.supplierName || '-' 9 <view class="row"><text class="label">承揽方</text><text class="value">{{ detail.supplierName || '-'
9 }}</text></view> 10 }}</text></view>
10 <view class="row"><text class="label">定作方</text><text class="value">{{ detail.buyerName || '-' 11 <view class="row"><text class="label">定作方</text><text class="value">{{ detail.buyerName || '-'
@@ -110,12 +111,12 @@ statusStyl<template> @@ -110,12 +111,12 @@ statusStyl<template>
110 </template> 111 </template>
111 112
112 <script> 113 <script>
113 -import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle } from '@/api/contract' 114 +import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle, statusMap } from '@/api/contract'
114 import ProductRel from './productRel.vue' 115 import ProductRel from './productRel.vue'
115 import DetailButtons from '@/components/detail-buttons/index.vue' 116 import DetailButtons from '@/components/detail-buttons/index.vue'
116 import FileUpload from '@/components/file-upload/index.vue' 117 import FileUpload from '@/components/file-upload/index.vue'
117 import SingleSelectSheet from '@/components/single-select/index.vue' 118 import SingleSelectSheet from '@/components/single-select/index.vue'
118 - 119 +import { fillStandardApprovedName } from '@/utils/dic.js'
119 120
120 export default { 121 export default {
121 name: 'ContractProcessDetail', 122 name: 'ContractProcessDetail',
@@ -172,6 +173,7 @@ export default { @@ -172,6 +173,7 @@ export default {
172 }, 173 },
173 productList: [], 174 productList: [],
174 statusStyle: statusStyle, 175 statusStyle: statusStyle,
  176 + statusMap: statusMap,
175 buttons: [{ 177 buttons: [{
176 text: '编辑', 178 text: '编辑',
177 visible: true, 179 visible: true,
@@ -229,6 +231,13 @@ export default { @@ -229,6 +231,13 @@ export default {
229 this.loadDetail() 231 this.loadDetail()
230 }, 232 },
231 methods: { 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 getStatusCss(name) { 241 getStatusCss(name) {
233 const list = Array.isArray(this.statusStyle) ? this.statusStyle : [] 242 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
234 const found = list.find(it => it && it.text === name) || {} 243 const found = list.find(it => it && it.text === name) || {}
@@ -373,6 +382,7 @@ export default { @@ -373,6 +382,7 @@ export default {
373 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '', 382 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
374 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '', 383 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '',
375 } 384 }
  385 + this.detail = await fillStandardApprovedName(this.detail)
376 const lines = Array.isArray(data.contractStdProcessingLineList) ? data.contractStdProcessingLineList : [] 386 const lines = Array.isArray(data.contractStdProcessingLineList) ? data.contractStdProcessingLineList : []
377 this.productList = lines 387 this.productList = lines
378 } catch (e) { 388 } catch (e) {
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> 61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text>
62 </view> 62 </view>
63 <view class="info-row" v-if="item.status === 'STANDARD'"> 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 </view> 65 </view>
66 <view class="info-row"> 66 <view class="info-row">
67 <text>订货日期</text><text>{{ item.orderDate }}</text> 67 <text>订货日期</text><text>{{ item.orderDate }}</text>
@@ -103,12 +103,6 @@ export default { @@ -103,12 +103,6 @@ export default {
103 return { 103 return {
104 searchKeyword: '', 104 searchKeyword: '',
105 searchKeywordDebounced: '', 105 searchKeywordDebounced: '',
106 -  
107 - tabs: [  
108 - { label: '草稿合同', value: 'DRAFT' },  
109 - { label: '标准合同', value: 'STANDARD' },  
110 - { label: '已删除合同', value: 'DELETED' }  
111 - ],  
112 status: 'DRAFT', 106 status: 'DRAFT',
113 107
114 query: { deptId: '', deptName: '', dateRange: [] }, 108 query: { deptId: '', deptName: '', dateRange: [] },
@@ -126,6 +120,23 @@ export default { @@ -126,6 +120,23 @@ export default {
126 } 120 }
127 }, 121 },
128 computed: { 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 extraCombined() { 140 extraCombined() {
130 return { 141 return {
131 keyword: this.searchKeywordDebounced || undefined, 142 keyword: this.searchKeywordDebounced || undefined,
@@ -359,10 +370,10 @@ export default { @@ -359,10 +370,10 @@ export default {
359 margin-bottom: 0; 370 margin-bottom: 0;
360 } 371 }
361 text { 372 text {
362 - width: 60%; 373 + width: 50%;
363 &:last-child { 374 &:last-child {
364 color: rgba(0,0,0,0.9); 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,7 +124,7 @@
124 </uni-list-item> 124 </uni-list-item>
125 <uni-list-item title="备注"> 125 <uni-list-item title="备注">
126 <template v-slot:footer> 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 </template> 128 </template>
129 </uni-list-item> 129 </uni-list-item>
130 130
@@ -231,9 +231,9 @@ export default { @@ -231,9 +231,9 @@ export default {
231 executionStandardName: '', 231 executionStandardName: '',
232 executionStandardRemarks: '', 232 executionStandardRemarks: '',
233 includesPackagingFee: false, 233 includesPackagingFee: false,
234 - includesPackagingFeeName: '', 234 + includesPackagingFeeName: '',
235 includesTransportFee: false, 235 includesTransportFee: false,
236 - includesTransportFeeName: '', 236 + includesTransportFeeName: '',
237 unit: '元、公斤、元/公斤', 237 unit: '元、公斤、元/公斤',
238 totalAmountCapital: '', 238 totalAmountCapital: '',
239 depositInfo: '', 239 depositInfo: '',
@@ -141,7 +141,7 @@ @@ -141,7 +141,7 @@
141 </uni-list-item> 141 </uni-list-item>
142 <uni-list-item title="备注"> 142 <uni-list-item title="备注">
143 <template v-slot:footer> 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 </template> 145 </template>
146 </uni-list-item> 146 </uni-list-item>
147 <view class="quality"> 147 <view class="quality">
@@ -254,9 +254,9 @@ export default { @@ -254,9 +254,9 @@ export default {
254 executionStandardName: '', 254 executionStandardName: '',
255 executionStandardRemarks: '', 255 executionStandardRemarks: '',
256 includesPackagingFee: false, 256 includesPackagingFee: false,
257 - includesPackagingFeeName: '', 257 + includesPackagingFeeName: '',
258 includesTransportFee: false, 258 includesTransportFee: false,
259 - includesTransportFeeName: '', 259 + includesTransportFeeName: '',
260 unit: '元、公斤、元/公斤', 260 unit: '元、公斤、元/公斤',
261 totalAmountCapital: '', 261 totalAmountCapital: '',
262 destinationId: [], 262 destinationId: [],
@@ -4,7 +4,8 @@ @@ -4,7 +4,8 @@
4 <view class="detail-page"> 4 <view class="detail-page">
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || 9 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName ||
9 '-'}}</text></view> 10 '-'}}</text></view>
10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || 11 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName ||
@@ -114,11 +115,12 @@ @@ -114,11 +115,12 @@
114 </template> 115 </template>
115 116
116 <script> 117 <script>
117 -import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle } from '@/api/contract' 118 +import { getContractApi, deleteContractApi, uploadStandardContract, statusStyle, statusMap } from '@/api/contract'
118 import ProductRel from './productRel.vue' 119 import ProductRel from './productRel.vue'
119 import DetailButtons from '@/components/detail-buttons/index.vue' 120 import DetailButtons from '@/components/detail-buttons/index.vue'
120 import FileUpload from '@/components/file-upload/index.vue' 121 import FileUpload from '@/components/file-upload/index.vue'
121 import SingleSelectSheet from '@/components/single-select/index.vue' 122 import SingleSelectSheet from '@/components/single-select/index.vue'
  123 +import { getDicByCodes, getDicName } from '@/utils/dic.js'
122 124
123 export default { 125 export default {
124 name: 'ContractRetailDetail', 126 name: 'ContractRetailDetail',
@@ -208,6 +210,8 @@ export default { @@ -208,6 +210,8 @@ export default {
208 }, 210 },
209 ], 211 ],
210 statusStyle: statusStyle, 212 statusStyle: statusStyle,
  213 + statusMap: statusMap,
  214 + dicOptions: { AUDIT_STATUS: [] }
211 } 215 }
212 }, 216 },
213 computed: { 217 computed: {
@@ -229,6 +233,7 @@ export default { @@ -229,6 +233,7 @@ export default {
229 const status = options && options.status ? options.status : '' 233 const status = options && options.status ? options.status : ''
230 this.id = id 234 this.id = id
231 this.status = status 235 this.status = status
  236 + this.loadAuditStatusDic()
232 this.loadDetail() 237 this.loadDetail()
233 }, 238 },
234 methods: { 239 methods: {
@@ -240,6 +245,27 @@ export default { @@ -240,6 +245,27 @@ export default {
240 backgroundColor: found.bgColor || '#000' 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 onUploadSubmit() { 269 onUploadSubmit() {
244 if (!this.fileInfo.id) { 270 if (!this.fileInfo.id) {
245 uni.showToast({ 271 uni.showToast({
@@ -372,6 +398,7 @@ export default { @@ -372,6 +398,7 @@ export default {
372 } 398 }
373 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : [] 399 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
374 this.productList = lines 400 this.productList = lines
  401 + this.refreshStandardApprovedName()
375 } catch (e) { 402 } catch (e) {
376 this.detail = { ...this.detail } 403 this.detail = { ...this.detail }
377 this.productList = [] 404 this.productList = []
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text> 61 <text>订单总额</text><text class="amount" :style="{ color: '#b67a76' }">{{ item.totalAmountIncludingTax ? '¥' : '' }}{{ formatAmount(item.totalAmountIncludingTax) || '-' }}</text>
62 </view> 62 </view>
63 <view class="info-row" v-if="item.status === 'STANDARD'"> 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 </view> 65 </view>
66 <view class="info-row"> 66 <view class="info-row">
67 <text>订货日期</text><text>{{ item.orderDate }}</text> 67 <text>订货日期</text><text>{{ item.orderDate }}</text>
@@ -103,21 +103,12 @@ export default { @@ -103,21 +103,12 @@ export default {
103 return { 103 return {
104 searchKeyword: '', 104 searchKeyword: '',
105 searchKeywordDebounced: '', 105 searchKeywordDebounced: '',
106 -  
107 - tabs: [  
108 - { label: '草稿合同', value: 'DRAFT' },  
109 - { label: '标准合同', value: 'STANDARD' },  
110 - { label: '已删除合同', value: 'DELETED' }  
111 - ],  
112 status: 'DRAFT', 106 status: 'DRAFT',
113 -  
114 query: { deptId: '', deptName: '', dateRange: [] }, 107 query: { deptId: '', deptName: '', dateRange: [] },
115 extraParams: {}, 108 extraParams: {},
116 -  
117 batchMode: false, 109 batchMode: false,
118 selectedKeys: [], 110 selectedKeys: [],
119 currentItems: [], 111 currentItems: [],
120 -  
121 filterVisible: false, 112 filterVisible: false,
122 filterForm: { deptId: '', deptName: '', dateRange: [] }, 113 filterForm: { deptId: '', deptName: '', dateRange: [] },
123 deptSelectVisible: false, 114 deptSelectVisible: false,
@@ -126,6 +117,23 @@ export default { @@ -126,6 +117,23 @@ export default {
126 } 117 }
127 }, 118 },
128 computed: { 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 extraCombined() { 137 extraCombined() {
130 return { 138 return {
131 keyword: this.searchKeywordDebounced || undefined, 139 keyword: this.searchKeywordDebounced || undefined,
@@ -359,10 +367,10 @@ export default { @@ -359,10 +367,10 @@ export default {
359 margin-bottom: 0; 367 margin-bottom: 0;
360 } 368 }
361 text { 369 text {
362 - width: 60%; 370 + width: 50%;
363 &:last-child { 371 &:last-child {
364 color: rgba(0,0,0,0.9); 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,7 +139,7 @@
139 </uni-list-item> 139 </uni-list-item>
140 <uni-list-item title="备注"> 140 <uni-list-item title="备注">
141 <template v-slot:footer> 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 </template> 143 </template>
144 </uni-list-item> 144 </uni-list-item>
145 145
@@ -246,9 +246,9 @@ export default { @@ -246,9 +246,9 @@ export default {
246 executionStandardName: '', 246 executionStandardName: '',
247 executionStandardRemarks: '', 247 executionStandardRemarks: '',
248 includesPackagingFee: false, 248 includesPackagingFee: false,
249 - includesPackagingFeeName: '', 249 + includesPackagingFeeName: '',
250 includesTransportFee: false, 250 includesTransportFee: false,
251 - includesTransportFeeName: '', 251 + includesTransportFeeName: '',
252 unit: '元、公斤、元/公斤', 252 unit: '元、公斤、元/公斤',
253 totalAmountCapital: '', 253 totalAmountCapital: '',
254 depositInfo: '', 254 depositInfo: '',
@@ -139,7 +139,7 @@ @@ -139,7 +139,7 @@
139 </uni-list-item> 139 </uni-list-item>
140 <uni-list-item title="备注"> 140 <uni-list-item title="备注">
141 <template v-slot:footer> 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 </template> 143 </template>
144 </uni-list-item> 144 </uni-list-item>
145 <view class="quality"> 145 <view class="quality">
@@ -252,9 +252,9 @@ export default { @@ -252,9 +252,9 @@ export default {
252 executionStandardName: '', 252 executionStandardName: '',
253 executionStandardRemarks: '', 253 executionStandardRemarks: '',
254 includesPackagingFee: false, 254 includesPackagingFee: false,
255 - includesPackagingFeeName: '', 255 + includesPackagingFeeName: '',
256 includesTransportFee: false, 256 includesTransportFee: false,
257 - includesTransportFeeName: '', 257 + includesTransportFeeName: '',
258 unit: '元、公斤、元/公斤', 258 unit: '元、公斤、元/公斤',
259 totalAmountCapital: '', 259 totalAmountCapital: '',
260 destinationId: [], 260 destinationId: [],
@@ -4,7 +4,15 @@ @@ -4,7 +4,15 @@
4 <view class="detail-page"> 4 <view class="detail-page">
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-' 16 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 }}</text></view> 17 }}</text></view>
10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' 18 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
@@ -115,7 +123,8 @@ @@ -115,7 +123,8 @@
115 </template> 123 </template>
116 124
117 <script> 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 import ProductRel from './productRel.vue' 128 import ProductRel from './productRel.vue'
120 import DetailButtons from '@/components/detail-buttons/index.vue' 129 import DetailButtons from '@/components/detail-buttons/index.vue'
121 import FileUpload from '@/components/file-upload/index.vue' 130 import FileUpload from '@/components/file-upload/index.vue'
@@ -174,6 +183,7 @@ export default { @@ -174,6 +183,7 @@ export default {
174 }, 183 },
175 productList: [], 184 productList: [],
176 statusStyle: statusStyle, 185 statusStyle: statusStyle,
  186 + statusMap: statusMap,
177 buttons: [{ 187 buttons: [{
178 text: '编辑', 188 text: '编辑',
179 visible: true, 189 visible: true,
@@ -272,7 +282,7 @@ export default { @@ -272,7 +282,7 @@ export default {
272 { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-upload')) }, 282 { ...this.buttons[5], visible: (s === 'STANDARD' && a !== 'AUDIT' && a !== 'PASS' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-upload')) },
273 { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) }, 283 { ...this.buttons[6], visible: (s === 'FORMAL' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) },
274 { ...this.buttons[7], visible: (s === 'STANDARD' && e && t === 'AUDIT' && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:approve')) }, 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 { ...this.buttons[9], visible: (s === 'FORMAL' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) }, 286 { ...this.buttons[9], visible: (s === 'FORMAL' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) },
277 { ...this.buttons[10], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) }, 287 { ...this.buttons[10], visible: (s === 'STANDARD' && t && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:review')) },
278 { ...this.buttons[11], visible: (s === 'STANDARD' && a && this.$auth.hasPermi('contract-manage:distribution-inventory-contract:standard-review')) }, 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,6 +295,13 @@ export default {
285 this.loadDetail() 295 this.loadDetail()
286 }, 296 },
287 methods: { 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 onDelete() { 305 onDelete() {
289 uni.showModal({ 306 uni.showModal({
290 title: '确认删除', 307 title: '确认删除',
@@ -437,6 +454,8 @@ export default { @@ -437,6 +454,8 @@ export default {
437 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '', 454 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
438 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '', 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 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : [] 459 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
441 this.productList = lines 460 this.productList = lines
442 } catch (e) { 461 } catch (e) {
@@ -559,4 +578,4 @@ export default { @@ -559,4 +578,4 @@ export default {
559 color: rgba(0, 0, 0, 0.6); 578 color: rgba(0, 0, 0, 0.6);
560 font-size: 32rpx; 579 font-size: 32rpx;
561 } 580 }
562 -</style>  
  581 +</style>
@@ -105,13 +105,6 @@ export default { @@ -105,13 +105,6 @@ export default {
105 return { 105 return {
106 searchKeyword: '', 106 searchKeyword: '',
107 searchKeywordDebounced: '', 107 searchKeywordDebounced: '',
108 -  
109 - tabs: [  
110 - { label: '草稿合同', value: 'DRAFT' },  
111 - { label: '正式合同', value: 'FORMAL' },  
112 - { label: '标准合同', value: 'STANDARD' },  
113 - { label: '已删除合同', value: 'DELETED' }  
114 - ],  
115 status: 'DRAFT', 108 status: 'DRAFT',
116 109
117 query: { deptId: '', deptName: '', dateRange: [] }, 110 query: { deptId: '', deptName: '', dateRange: [] },
@@ -129,6 +122,25 @@ export default { @@ -129,6 +122,25 @@ export default {
129 } 122 }
130 }, 123 },
131 computed: { 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 extraCombined() { 144 extraCombined() {
133 return { 145 return {
134 keyword: this.searchKeywordDebounced || undefined, 146 keyword: this.searchKeywordDebounced || undefined,
@@ -361,10 +373,10 @@ export default { @@ -361,10 +373,10 @@ export default {
361 margin-bottom: 0; 373 margin-bottom: 0;
362 } 374 }
363 text { 375 text {
364 - width: 60%; 376 + width: 50%;
365 &:last-child { 377 &:last-child {
366 color: rgba(0,0,0,0.9); 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,9 +40,30 @@
40 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled /> 40 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
41 </template> 41 </template>
42 </uni-list-item> 42 </uni-list-item>
43 - <uni-list-item title="规格"> 43 + <uni-list-item title="规格(mm)">
44 <template v-slot:footer> 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 </template> 67 </template>
47 </uni-list-item> 68 </uni-list-item>
48 <uni-list-item title="状态"> 69 <uni-list-item title="状态">
@@ -699,4 +720,42 @@ export default { @@ -699,4 +720,42 @@ export default {
699 background: $theme-primary; 720 background: $theme-primary;
700 color: #fff; 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 </style> 761 </style>
@@ -142,7 +142,7 @@ @@ -142,7 +142,7 @@
142 </uni-list-item> 142 </uni-list-item>
143 <uni-list-item title="备注"> 143 <uni-list-item title="备注">
144 <template v-slot:footer> 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 </template> 146 </template>
147 </uni-list-item> 147 </uni-list-item>
148 148
@@ -248,9 +248,9 @@ export default { @@ -248,9 +248,9 @@ export default {
248 executionStandardName: '', 248 executionStandardName: '',
249 executionStandardRemarks: '', 249 executionStandardRemarks: '',
250 includesPackagingFee: false, 250 includesPackagingFee: false,
251 - includesPackagingFeeName: '', 251 + includesPackagingFeeName: '',
252 includesTransportFee: false, 252 includesTransportFee: false,
253 - includesTransportFeeName: '', 253 + includesTransportFeeName: '',
254 unit: '元、公斤、元/公斤', 254 unit: '元、公斤、元/公斤',
255 totalAmountCapital: '', 255 totalAmountCapital: '',
256 depositInfo: '', 256 depositInfo: '',
@@ -339,11 +339,11 @@ export default { @@ -339,11 +339,11 @@ export default {
339 } 339 }
340 340
341 text { 341 text {
342 - width: 60%; 342 + width: 50%;
343 343
344 &:last-child { 344 &:last-child {
345 color: rgba(0, 0, 0, 0.9); 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,7 +141,7 @@
141 </uni-list-item> 141 </uni-list-item>
142 <uni-list-item title="备注"> 142 <uni-list-item title="备注">
143 <template v-slot:footer> 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 </template> 145 </template>
146 </uni-list-item> 146 </uni-list-item>
147 <view class="quality"> 147 <view class="quality">
@@ -254,9 +254,9 @@ export default { @@ -254,9 +254,9 @@ export default {
254 executionStandardName: '', 254 executionStandardName: '',
255 executionStandardRemarks: '', 255 executionStandardRemarks: '',
256 includesPackagingFee: false, 256 includesPackagingFee: false,
257 - includesPackagingFeeName: '', 257 + includesPackagingFeeName: '',
258 includesTransportFee: false, 258 includesTransportFee: false,
259 - includesTransportFeeName: '', 259 + includesTransportFeeName: '',
260 unit: '元、公斤、元/公斤', 260 unit: '元、公斤、元/公斤',
261 totalAmountCapital: '', 261 totalAmountCapital: '',
262 destinationId: [], 262 destinationId: [],
@@ -4,7 +4,16 @@ @@ -4,7 +4,16 @@
4 <view class="detail-page"> 4 <view class="detail-page">
5 <view class="section"> 5 <view class="section">
6 <text class="row customer">{{ detail.code }}</text> 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 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-' 17 <view class="row"><text class="label">供方</text><text class="value">{{ detail.supplierName || '-'
9 }}</text></view> 18 }}</text></view>
10 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-' 19 <view class="row"><text class="label">需方</text><text class="value">{{ detail.buyerName || '-'
@@ -118,11 +127,12 @@ @@ -118,11 +127,12 @@
118 </template> 127 </template>
119 128
120 <script> 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 import ProductRel from './productRel.vue' 131 import ProductRel from './productRel.vue'
123 import DetailButtons from '@/components/detail-buttons/index.vue' 132 import DetailButtons from '@/components/detail-buttons/index.vue'
124 import FileUpload from '@/components/file-upload/index.vue' 133 import FileUpload from '@/components/file-upload/index.vue'
125 import SingleSelectSheet from '@/components/single-select/index.vue' 134 import SingleSelectSheet from '@/components/single-select/index.vue'
  135 +import { fillStandardApprovedName, fillFormalApprovedName } from '@/utils/dic.js'
126 136
127 export default { 137 export default {
128 name: 'ContractUnplanDetail', 138 name: 'ContractUnplanDetail',
@@ -174,6 +184,7 @@ export default { @@ -174,6 +184,7 @@ export default {
174 packaging: '' 184 packaging: ''
175 }, 185 },
176 statusStyle: statusStyle, 186 statusStyle: statusStyle,
  187 + statusMap: statusMap,
177 productList: [], 188 productList: [],
178 buttons: [{ 189 buttons: [{
179 text: '编辑', 190 text: '编辑',
@@ -291,6 +302,14 @@ export default { @@ -291,6 +302,14 @@ export default {
291 this.loadDetail() 302 this.loadDetail()
292 }, 303 },
293 methods: { 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 getStatusCss(name) { 313 getStatusCss(name) {
295 const list = Array.isArray(this.statusStyle) ? this.statusStyle : [] 314 const list = Array.isArray(this.statusStyle) ? this.statusStyle : []
296 const found = list.find(it => it && it.text === name) || {} 315 const found = list.find(it => it && it.text === name) || {}
@@ -333,8 +352,10 @@ export default { @@ -333,8 +352,10 @@ export default {
333 }) 352 })
334 }, 353 },
335 onLockApply() { 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 uploadContract(id, type = 'formal') { 361 uploadContract(id, type = 'formal') {
@@ -462,6 +483,8 @@ export default { @@ -462,6 +483,8 @@ export default {
462 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '', 483 destinationId: data.provinceId && data.cityId && data.districtId ? [data.provinceId, data.cityId, data.districtId] : '',
463 destinationLabel: data.provinceName && data.cityName && data.districtName ? `${data.provinceName} / ${data.cityName} / ${data.districtName}` : '', 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 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : [] 488 const lines = Array.isArray(data.contractDistributorLineList) ? data.contractDistributorLineList : []
466 this.productList = lines 489 this.productList = lines
467 } catch (e) { 490 } catch (e) {
@@ -105,18 +105,9 @@ export default { @@ -105,18 +105,9 @@ export default {
105 return { 105 return {
106 searchKeyword: '', 106 searchKeyword: '',
107 searchKeywordDebounced: '', 107 searchKeywordDebounced: '',
108 -  
109 - tabs: [  
110 - { label: '草稿合同', value: 'DRAFT' },  
111 - { label: '正式合同', value: 'FORMAL' },  
112 - { label: '标准合同', value: 'STANDARD' },  
113 - { label: '已删除合同', value: 'DELETED' }  
114 - ],  
115 status: 'DRAFT', 108 status: 'DRAFT',
116 -  
117 query: { deptId: '', deptName: '', dateRange: [] }, 109 query: { deptId: '', deptName: '', dateRange: [] },
118 extraParams: {}, 110 extraParams: {},
119 -  
120 batchMode: false, 111 batchMode: false,
121 selectedKeys: [], 112 selectedKeys: [],
122 currentItems: [], 113 currentItems: [],
@@ -129,6 +120,25 @@ export default { @@ -129,6 +120,25 @@ export default {
129 } 120 }
130 }, 121 },
131 computed: { 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 extraCombined() { 142 extraCombined() {
133 return { 143 return {
134 keyword: this.searchKeywordDebounced || undefined, 144 keyword: this.searchKeywordDebounced || undefined,
@@ -363,10 +373,10 @@ export default { @@ -363,10 +373,10 @@ export default {
363 margin-bottom: 0; 373 margin-bottom: 0;
364 } 374 }
365 text { 375 text {
366 - width: 60%; 376 + width: 50%;
367 &:last-child { 377 &:last-child {
368 color: rgba(0,0,0,0.9); 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,9 +39,30 @@
39 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled /> 39 <uni-easyinput v-model="item.quality" placeholder="请输入品质" :clearable="false" disabled />
40 </template> 40 </template>
41 </uni-list-item> 41 </uni-list-item>
42 - <uni-list-item title="规格"> 42 + <uni-list-item title="规格(mm)">
43 <template v-slot:footer> 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 </template> 66 </template>
46 </uni-list-item> 67 </uni-list-item>
47 <uni-list-item title="状态"> 68 <uni-list-item title="状态">
@@ -699,4 +720,42 @@ export default { @@ -699,4 +720,42 @@ export default {
699 background: $theme-primary; 720 background: $theme-primary;
700 color: #fff; 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 </style> 761 </style>
@@ -108,11 +108,13 @@ export default { @@ -108,11 +108,13 @@ export default {
108 const res = await showContract(this.id) 108 const res = await showContract(this.id)
109 const data = res && res.data ? res.data : {} 109 const data = res && res.data ? res.data : {}
110 this.detail = { 110 this.detail = {
  111 + contractId: data.contractId || '',
111 contractCode: data.contractCode || '', 112 contractCode: data.contractCode || '',
112 customerName: data.customerName || '', 113 customerName: data.customerName || '',
113 deptName: data.deptName || '', 114 deptName: data.deptName || '',
114 workshopName: data.workshopName || '', 115 workshopName: data.workshopName || '',
115 orderType: data.orderType || '', 116 orderType: data.orderType || '',
  117 + contractTypeCode: data.contractType || '',
116 contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单', 118 contractType: data.contractType === 'DRAFT_DIST_AGMT' ? '经销订单' : '外贸订单',
117 orderDate: (data.orderDate || '').slice(0, 10), 119 orderDate: (data.orderDate || '').slice(0, 10),
118 applicationCount: data.applicationCount || '', 120 applicationCount: data.applicationCount || '',
@@ -139,6 +141,7 @@ export default { @@ -139,6 +141,7 @@ export default {
139 if (res.confirm) { 141 if (res.confirm) {
140 specLockDelayApplication({ 142 specLockDelayApplication({
141 ...this.detail, 143 ...this.detail,
  144 + contractType: this.detail.contractTypeCode || '',
142 specLockDate: date, 145 specLockDate: date,
143 delayReason: reason 146 delayReason: reason
144 }).then(res => { 147 }).then(res => {
@@ -139,7 +139,7 @@ @@ -139,7 +139,7 @@
139 </uni-list-item> 139 </uni-list-item>
140 <uni-list-item title="备注"> 140 <uni-list-item title="备注">
141 <template v-slot:footer> 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 </template> 143 </template>
144 </uni-list-item> 144 </uni-list-item>
145 145
@@ -245,9 +245,9 @@ export default { @@ -245,9 +245,9 @@ export default {
245 executionStandardName: '', 245 executionStandardName: '',
246 executionStandardRemarks: '', 246 executionStandardRemarks: '',
247 includesPackagingFee: false, 247 includesPackagingFee: false,
248 - includesPackagingFeeName: '', 248 + includesPackagingFeeName: '',
249 includesTransportFee: false, 249 includesTransportFee: false,
250 - includesTransportFeeName: '', 250 + includesTransportFeeName: '',
251 unit: '元、公斤、元/公斤', 251 unit: '元、公斤、元/公斤',
252 totalAmountCapital: '', 252 totalAmountCapital: '',
253 depositInfo: '', 253 depositInfo: '',
@@ -38,3 +38,24 @@ export function getDicName(code, value, items = []) { @@ -38,3 +38,24 @@ export function getDicName(code, value, items = []) {
38 const item = list.find(it => it && it.code === value); 38 const item = list.find(it => it && it.code === value);
39 return item ? item.name : value; 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 +}