Commit 910c487d122bcfd765ae7aa4953f3be271f3e4b6

Authored by 史婷婷
1 parent d46e60e3

feat: 订货单详情-完成

... ... @@ -77,7 +77,7 @@ export default {
77 77 { text: '编辑', visible: true, variant: 'outline', event: 'edit' },
78 78 { text: '审核详情', visible: true, variant: 'outline', event: 'auditDetail' },
79 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 81 { text: '取消', visible: true, variant: 'outline', event: 'cancel', style: { color: 'rgba(0,0,0,0.9)', border: '1px solid #DCDCDC' } },
82 82 ],
83 83 dicOptions: {
... ... @@ -90,20 +90,22 @@ export default {
90 90 computed: {
91 91 statusFlags() {
92 92 const s = String((this.form && this.form.status) || '')
  93 + const e = String((this.form && this.form.examineStatus) || '')
93 94 return {
94   - isRefuse: s === 'REFUSE',
95   - isPass: s === 'PASS',
96   - isAudit: s === 'AUDIT',
  95 + isRefuse: e === 'REFUSE',
  96 + isAudit: e === 'AUDIT',
97 97 canExamine: !!this.showExamine,
  98 + canDeliveryApply: s === 'ISSUED',
  99 + contractCreateBy: !!(this.form && this.form.contractCreateBy)
98 100 }
99 101 },
100 102 displayButtons() {
101 103 const f = this.statusFlags
102 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 107 { ...this.buttons[2], visible: f.isAudit && f.canExamine },
106   - { ...this.buttons[3], visible: f.isPass },
  108 + { ...this.buttons[3], visible: f.canDeliveryApply },
107 109 { ...this.buttons[4], visible: f.isRefuse },
108 110 ]
109 111 }
... ... @@ -127,19 +129,13 @@ export default {
127 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 132 handleButtonClick(btn) {
137 133 if (!btn || btn.disabled) return
138 134 const map = {
139 135 edit: () => this.onEdit(),
140 136 auditDetail: () => this.onAuditDetail(),
141 137 audit: () => this.onAudit(),
142   - changeApply: () => this.onChangeApply(),
  138 + shipmentApply: () => this.onShipmentApply(),
143 139 cancel: () => this.onCancel(),
144 140 }
145 141 const fn = map[btn.event]
... ... @@ -151,7 +147,7 @@ export default {
151 147 onEdit() {
152 148 const id = this.getBusinessId()
153 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 152 onAuditDetail() {
157 153 const CACHE_KEY = 'sourceBusinessId'
... ... @@ -163,10 +159,10 @@ export default {
163 159 uni.setStorageSync(CACHE_KEY, this.getBusinessId())
164 160 uni.navigateTo({ url: '/pages/flow/audit' })
165 161 },
166   - onChangeApply() {
  162 + onShipmentApply() {
167 163 const id = this.getBusinessId()
168 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 167 onCancel() {
172 168 const id = this.getBusinessId()
... ... @@ -180,7 +176,7 @@ export default {
180 176 if (res && res.confirm) {
181 177 cancelApi(id).then(() => {
182 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 180 }).catch(() => {
185 181 uni.showToast({ title: '取消失败', icon: 'none' })
186 182 })
... ... @@ -428,4 +424,4 @@ export default {
428 424 font-weight: 600;
429 425 }
430 426 }
431   -</style>
\ No newline at end of file
  427 +</style>
... ...
... ... @@ -98,7 +98,7 @@
98 98 <view class="row"><text class="label">品质</text><text class="value">{{ item.quality }}</text></view>
99 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 102 <view class="value value-spec">
103 103 <view class="value-spec_val">{{ item.thickness }}</view>
104 104 <view class="value-spec_box">
... ... @@ -451,7 +451,7 @@ export default {
451 451 }
452 452
453 453 .label {
454   - width: 180rpx;
  454 + width: 140rpx;
455 455 margin-right: 14rpx;
456 456 color: rgba(0, 0, 0, 0.6);
457 457 font-size: 28rpx;
... ...