Commit 910c487d122bcfd765ae7aa4953f3be271f3e4b6

Authored by 史婷婷
1 parent d46e60e3

feat: 订货单详情-完成

@@ -77,7 +77,7 @@ export default { @@ -77,7 +77,7 @@ export default {
77 { text: '编辑', visible: true, variant: 'outline', event: 'edit' }, 77 { text: '编辑', visible: true, variant: 'outline', event: 'edit' },
78 { text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' }, 78 { text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' },
79 { text: '审核', visible: true, variant: 'primary', event: 'audit' }, 79 { text: '审核', visible: true, variant: 'primary', event: 'audit' },
80 - { text: '申请变更', visible: true, variant: 'outline', event: 'changeApply' }, 80 + { text: '申请发货', visible: true, variant: 'outline', event: 'shipmentApply' },
81 { text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } }, 81 { text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } },
82 ], 82 ],
83 dicOptions: { 83 dicOptions: {
@@ -90,20 +90,22 @@ export default { @@ -90,20 +90,22 @@ export default {
90 computed: { 90 computed: {
91 statusFlags() { 91 statusFlags() {
92 const s = String((this.form && this.form.status) || '') 92 const s = String((this.form && this.form.status) || '')
  93 + const e = String((this.form && this.form.examineStatus) || '')
93 return { 94 return {
94 - isRefuse: s === 'REFUSE',  
95 - isPass: s === 'PASS',  
96 - isAudit: s === 'AUDIT', 95 + isRefuse: e === 'REFUSE',
  96 + isAudit: e === 'AUDIT',
97 canExamine: !!this.showExamine, 97 canExamine: !!this.showExamine,
  98 + canDeliveryApply: s === 'ISSUED',
  99 + contractCreateBy: !!(this.form && this.form.contractCreateBy)
98 } 100 }
99 }, 101 },
100 displayButtons() { 102 displayButtons() {
101 const f = this.statusFlags 103 const f = this.statusFlags
102 return [ 104 return [
103 - { ...this.buttons[0], visible: f.isRefuse },  
104 - { ...this.buttons[1], visible: true }, 105 + { ...this.buttons[0], visible: f.isRefuse && f.contractCreateBy },
  106 + { ...this.buttons[1], visible: !f.isRefuse },
105 { ...this.buttons[2], visible: f.isAudit && f.canExamine }, 107 { ...this.buttons[2], visible: f.isAudit && f.canExamine },
106 - { ...this.buttons[3], visible: f.isPass }, 108 + { ...this.buttons[3], visible: f.canDeliveryApply },
107 { ...this.buttons[4], visible: f.isRefuse }, 109 { ...this.buttons[4], visible: f.isRefuse },
108 ] 110 ]
109 } 111 }
@@ -127,19 +129,13 @@ export default { @@ -127,19 +129,13 @@ export default {
127 this.form = {} 129 this.form = {}
128 } 130 }
129 }, 131 },
130 - onViewHistory(item) {  
131 - const id = item && (item.id)  
132 - if (!id) return  
133 - const query = '?id=' + encodeURIComponent(id)  
134 - uni.navigateTo({ url: '/pages/credit_manage/history_detail' + query })  
135 - },  
136 handleButtonClick(btn) { 132 handleButtonClick(btn) {
137 if (!btn || btn.disabled) return 133 if (!btn || btn.disabled) return
138 const map = { 134 const map = {
139 edit: () => this.onEdit(), 135 edit: () => this.onEdit(),
140 auditDetail: () => this.onAuditDetail(), 136 auditDetail: () => this.onAuditDetail(),
141 audit: () => this.onAudit(), 137 audit: () => this.onAudit(),
142 - changeApply: () => this.onChangeApply(), 138 + shipmentApply: () => this.onShipmentApply(),
143 cancel: () => this.onCancel(), 139 cancel: () => this.onCancel(),
144 } 140 }
145 const fn = map[btn.event] 141 const fn = map[btn.event]
@@ -151,7 +147,7 @@ export default { @@ -151,7 +147,7 @@ export default {
151 onEdit() { 147 onEdit() {
152 const id = this.getBusinessId() 148 const id = this.getBusinessId()
153 const query = id ? ('?id=' + encodeURIComponent(id)) : '' 149 const query = id ? ('?id=' + encodeURIComponent(id)) : ''
154 - uni.navigateTo({ url: '/pages/credit_manage/modify' + query }) 150 + uni.navigateTo({ url: '/pages/order_list/modify' + query })
155 }, 151 },
156 onAuditDetail() { 152 onAuditDetail() {
157 const CACHE_KEY = 'sourceBusinessId' 153 const CACHE_KEY = 'sourceBusinessId'
@@ -163,10 +159,10 @@ export default { @@ -163,10 +159,10 @@ export default {
163 uni.setStorageSync(CACHE_KEY, this.getBusinessId()) 159 uni.setStorageSync(CACHE_KEY, this.getBusinessId())
164 uni.navigateTo({ url: '/pages/flow/audit' }) 160 uni.navigateTo({ url: '/pages/flow/audit' })
165 }, 161 },
166 - onChangeApply() { 162 + onShipmentApply() {
167 const id = this.getBusinessId() 163 const id = this.getBusinessId()
168 const query = id ? ('?id=' + encodeURIComponent(id)) : '' 164 const query = id ? ('?id=' + encodeURIComponent(id)) : ''
169 - uni.navigateTo({ url: '/pages/credit_manage/change' + query }) 165 + uni.navigateTo({ url: '/pages/order_list/shipment_apply' + query })
170 }, 166 },
171 onCancel() { 167 onCancel() {
172 const id = this.getBusinessId() 168 const id = this.getBusinessId()
@@ -180,7 +176,7 @@ export default { @@ -180,7 +176,7 @@ export default {
180 if (res && res.confirm) { 176 if (res && res.confirm) {
181 cancelApi(id).then(() => { 177 cancelApi(id).then(() => {
182 uni.showToast({ title: '已取消', icon: 'none' }) 178 uni.showToast({ title: '已取消', icon: 'none' })
183 - setTimeout(() => { uni.redirectTo({ url: '/pages/credit_manage/index' }) }, 300) 179 + setTimeout(() => { uni.redirectTo({ url: '/pages/order_list/index' }) }, 300)
184 }).catch(() => { 180 }).catch(() => {
185 uni.showToast({ title: '取消失败', icon: 'none' }) 181 uni.showToast({ title: '取消失败', icon: 'none' })
186 }) 182 })
@@ -428,4 +424,4 @@ export default { @@ -428,4 +424,4 @@ export default {
428 font-weight: 600; 424 font-weight: 600;
429 } 425 }
430 } 426 }
431 -</style>  
  427 +</style>
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view> 98 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
99 <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> 99 <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view>
100 <!-- 厚(公差) * 宽(公差) * 长(公差) --> 100 <!-- 厚(公差) * 宽(公差) * 长(公差) -->
101 - <view class="row row-spec"><text class="label">规格</text> 101 + <view class="row row-spec"><text class="label">规格(mm)</text>
102 <view class="value value-spec"> 102 <view class="value value-spec">
103 <view class="value-spec_val">{{ item.thickness }}</view> 103 <view class="value-spec_val">{{ item.thickness }}</view>
104 <view class="value-spec_box"> 104 <view class="value-spec_box">
@@ -451,7 +451,7 @@ export default { @@ -451,7 +451,7 @@ export default {
451 } 451 }
452 452
453 .label { 453 .label {
454 - width: 180rpx; 454 + width: 140rpx;
455 margin-right: 14rpx; 455 margin-right: 14rpx;
456 color: rgba(0, 0, 0, 0.6); 456 color: rgba(0, 0, 0, 0.6);
457 font-size: 28rpx; 457 font-size: 28rpx;