Commit 89cef6cc25d3a1f38c2cadc06cce5bb9808ecb86

Authored by gesilong
2 parents 36ef8e02 97943624

Merge branch 'cjerp-3.0-fix' into test_cjerp

@@ -221,7 +221,8 @@ export default { @@ -221,7 +221,8 @@ export default {
221 generate: !!f.showGenerateBuyoutApply && inStatus([SC.TO_SUBMIT_REVIEW, SC.AUDIT, SC.COMPLETED]) && perms.generate, 221 generate: !!f.showGenerateBuyoutApply && inStatus([SC.TO_SUBMIT_REVIEW, SC.AUDIT, SC.COMPLETED]) && perms.generate,
222 cancel: !!f.showAbolishBuyoutApply && inStatus([SC.TO_SUBMIT_REVIEW, SC.AUDIT, SC.COMPLETED]) && perms.cancel, 222 cancel: !!f.showAbolishBuyoutApply && inStatus([SC.TO_SUBMIT_REVIEW, SC.AUDIT, SC.COMPLETED]) && perms.cancel,
223 look: inStatus([SC.TO_SUBMIT_REVIEW, SC.AUDIT, SC.COMPLETED, SC.REFUSE, SC.ABORTED]) && perms.look, 223 look: inStatus([SC.TO_SUBMIT_REVIEW, SC.AUDIT, SC.COMPLETED, SC.REFUSE, SC.ABORTED]) && perms.look,
224 - change: inStatus(diffQuantityExceeded) && perms.change, 224 + // 更改差值状态:按差值超量标识显示(布尔值,不走状态匹配)
  225 + change: !!diffQuantityExceeded && perms.change,
225 // // uploadAttachment: inStatus([SC.COMPLETED]) && !!this.planRoleFlags.isPlanner && perms.uploadAttachment 226 // // uploadAttachment: inStatus([SC.COMPLETED]) && !!this.planRoleFlags.isPlanner && perms.uploadAttachment
226 } 227 }
227 var out = [] 228 var out = []
@@ -64,7 +64,7 @@ @@ -64,7 +64,7 @@
64 </view> 64 </view>
65 <view class="info-row"> 65 <view class="info-row">
66 <text>计划编号</text> 66 <text>计划编号</text>
67 - <text>{{ item.planCode.join(',') || '-' }}</text> 67 + <text>{{ formatPlanCodes(item.planCode) }}</text>
68 </view> 68 </view>
69 <view class="info-row"> 69 <view class="info-row">
70 <text>分厂</text> 70 <text>分厂</text>
@@ -275,6 +275,13 @@ export default { @@ -275,6 +275,13 @@ export default {
275 if (s.length >= 10) return s.slice(0, 10) 275 if (s.length >= 10) return s.slice(0, 10)
276 return s 276 return s
277 }, 277 },
  278 + // 计划编号(接口返回数组,兼容 undefined/null/单个字符串)
  279 + formatPlanCodes(v) {
  280 + if (v == null) return '-'
  281 + const list = Array.isArray(v) ? v : [v]
  282 + const s = list.filter(it => it != null && it !== '').join(',')
  283 + return s || '-'
  284 + },
278 onCardLoaded({ items }) { 285 onCardLoaded({ items }) {
279 this.currentItems = items 286 this.currentItems = items
280 }, 287 },