Showing
20 changed files
with
526 additions
and
27 deletions
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project version="4"> | 2 | <project version="4"> |
| 3 | <component name="ChangeListManager"> | 3 | <component name="ChangeListManager"> |
| 4 | - <list default="true" id="22e3db16-f3f9-44cc-b7ca-0b5f75df2820" name="Changes" comment="" /> | 4 | + <list default="true" id="22e3db16-f3f9-44cc-b7ca-0b5f75df2820" name="Changes" comment=""> |
| 5 | + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> | ||
| 6 | + <change beforePath="$PROJECT_DIR$/pages/replenishment_order/detail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/pages/replenishment_order/detail.vue" afterDir="false" /> | ||
| 7 | + <change beforePath="$PROJECT_DIR$/plugins/components.js" beforeDir="false" afterPath="$PROJECT_DIR$/plugins/components.js" afterDir="false" /> | ||
| 8 | + <change beforePath="$PROJECT_DIR$/utils/flow-components.js" beforeDir="false" afterPath="$PROJECT_DIR$/utils/flow-components.js" afterDir="false" /> | ||
| 9 | + </list> | ||
| 5 | <option name="SHOW_DIALOG" value="false" /> | 10 | <option name="SHOW_DIALOG" value="false" /> |
| 6 | <option name="HIGHLIGHT_CONFLICTS" value="true" /> | 11 | <option name="HIGHLIGHT_CONFLICTS" value="true" /> |
| 7 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | 12 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
| @@ -623,7 +623,6 @@ export default { | @@ -623,7 +623,6 @@ export default { | ||
| 623 | color: rgba(0, 0, 0, 0.9); | 623 | color: rgba(0, 0, 0, 0.9); |
| 624 | padding-bottom: 16rpx; | 624 | padding-bottom: 16rpx; |
| 625 | margin-bottom: 24rpx; | 625 | margin-bottom: 24rpx; |
| 626 | - ; | ||
| 627 | border-bottom: 1px dashed #E7E7E7; | 626 | border-bottom: 1px dashed #E7E7E7; |
| 628 | } | 627 | } |
| 629 | 628 |
| @@ -542,7 +542,6 @@ export default { | @@ -542,7 +542,6 @@ export default { | ||
| 542 | color: rgba(0, 0, 0, 0.9); | 542 | color: rgba(0, 0, 0, 0.9); |
| 543 | padding-bottom: 16rpx; | 543 | padding-bottom: 16rpx; |
| 544 | margin-bottom: 24rpx; | 544 | margin-bottom: 24rpx; |
| 545 | - ; | ||
| 546 | border-bottom: 1px dashed #E7E7E7; | 545 | border-bottom: 1px dashed #E7E7E7; |
| 547 | } | 546 | } |
| 548 | 547 |
| @@ -729,7 +729,6 @@ export default { | @@ -729,7 +729,6 @@ export default { | ||
| 729 | color: rgba(0, 0, 0, 0.9); | 729 | color: rgba(0, 0, 0, 0.9); |
| 730 | padding-bottom: 16rpx; | 730 | padding-bottom: 16rpx; |
| 731 | margin-bottom: 24rpx; | 731 | margin-bottom: 24rpx; |
| 732 | - ; | ||
| 733 | border-bottom: 1px dashed #E7E7E7; | 732 | border-bottom: 1px dashed #E7E7E7; |
| 734 | } | 733 | } |
| 735 | 734 | ||
| @@ -846,7 +845,6 @@ export default { | @@ -846,7 +845,6 @@ export default { | ||
| 846 | color: rgba(0, 0, 0, 0.9); | 845 | color: rgba(0, 0, 0, 0.9); |
| 847 | padding-bottom: 16rpx; | 846 | padding-bottom: 16rpx; |
| 848 | margin-bottom: 24rpx; | 847 | margin-bottom: 24rpx; |
| 849 | - ; | ||
| 850 | border-bottom: 1px dashed #E7E7E7; | 848 | border-bottom: 1px dashed #E7E7E7; |
| 851 | } | 849 | } |
| 852 | 850 |
| @@ -399,7 +399,6 @@ export default { | @@ -399,7 +399,6 @@ export default { | ||
| 399 | color: rgba(0, 0, 0, 0.9); | 399 | color: rgba(0, 0, 0, 0.9); |
| 400 | padding-bottom: 16rpx; | 400 | padding-bottom: 16rpx; |
| 401 | margin-bottom: 24rpx; | 401 | margin-bottom: 24rpx; |
| 402 | - ; | ||
| 403 | border-bottom: 1px dashed #E7E7E7; | 402 | border-bottom: 1px dashed #E7E7E7; |
| 404 | } | 403 | } |
| 405 | 404 | ||
| @@ -516,7 +515,6 @@ export default { | @@ -516,7 +515,6 @@ export default { | ||
| 516 | color: rgba(0, 0, 0, 0.9); | 515 | color: rgba(0, 0, 0, 0.9); |
| 517 | padding-bottom: 16rpx; | 516 | padding-bottom: 16rpx; |
| 518 | margin-bottom: 24rpx; | 517 | margin-bottom: 24rpx; |
| 519 | - ; | ||
| 520 | border-bottom: 1px dashed #E7E7E7; | 518 | border-bottom: 1px dashed #E7E7E7; |
| 521 | } | 519 | } |
| 522 | 520 |
| @@ -585,7 +585,6 @@ export default { | @@ -585,7 +585,6 @@ export default { | ||
| 585 | color: rgba(0, 0, 0, 0.9); | 585 | color: rgba(0, 0, 0, 0.9); |
| 586 | padding-bottom: 16rpx; | 586 | padding-bottom: 16rpx; |
| 587 | margin-bottom: 24rpx; | 587 | margin-bottom: 24rpx; |
| 588 | - ; | ||
| 589 | border-bottom: 1px dashed #E7E7E7; | 588 | border-bottom: 1px dashed #E7E7E7; |
| 590 | } | 589 | } |
| 591 | 590 |
| @@ -511,7 +511,6 @@ export default { | @@ -511,7 +511,6 @@ export default { | ||
| 511 | color: rgba(0, 0, 0, 0.9); | 511 | color: rgba(0, 0, 0, 0.9); |
| 512 | padding-bottom: 16rpx; | 512 | padding-bottom: 16rpx; |
| 513 | margin-bottom: 24rpx; | 513 | margin-bottom: 24rpx; |
| 514 | - ; | ||
| 515 | border-bottom: 1px dashed #E7E7E7; | 514 | border-bottom: 1px dashed #E7E7E7; |
| 516 | } | 515 | } |
| 517 | 516 |
| @@ -586,7 +586,6 @@ export default { | @@ -586,7 +586,6 @@ export default { | ||
| 586 | color: rgba(0, 0, 0, 0.9); | 586 | color: rgba(0, 0, 0, 0.9); |
| 587 | padding-bottom: 16rpx; | 587 | padding-bottom: 16rpx; |
| 588 | margin-bottom: 24rpx; | 588 | margin-bottom: 24rpx; |
| 589 | - ; | ||
| 590 | border-bottom: 1px dashed #E7E7E7; | 589 | border-bottom: 1px dashed #E7E7E7; |
| 591 | } | 590 | } |
| 592 | 591 | ||
| @@ -703,7 +702,6 @@ export default { | @@ -703,7 +702,6 @@ export default { | ||
| 703 | color: rgba(0, 0, 0, 0.9); | 702 | color: rgba(0, 0, 0, 0.9); |
| 704 | padding-bottom: 16rpx; | 703 | padding-bottom: 16rpx; |
| 705 | margin-bottom: 24rpx; | 704 | margin-bottom: 24rpx; |
| 706 | - ; | ||
| 707 | border-bottom: 1px dashed #E7E7E7; | 705 | border-bottom: 1px dashed #E7E7E7; |
| 708 | } | 706 | } |
| 709 | 707 |
| @@ -512,7 +512,6 @@ export default { | @@ -512,7 +512,6 @@ export default { | ||
| 512 | color: rgba(0, 0, 0, 0.9); | 512 | color: rgba(0, 0, 0, 0.9); |
| 513 | padding-bottom: 16rpx; | 513 | padding-bottom: 16rpx; |
| 514 | margin-bottom: 24rpx; | 514 | margin-bottom: 24rpx; |
| 515 | - ; | ||
| 516 | border-bottom: 1px dashed #E7E7E7; | 515 | border-bottom: 1px dashed #E7E7E7; |
| 517 | } | 516 | } |
| 518 | 517 |
pages/replenishment_order/approve.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <scroll-view class="scroll" scroll-y> | ||
| 4 | + <view class="detail-page"> | ||
| 5 | + <view class="section"> | ||
| 6 | + <text class="row company">{{ form.purchaseOrderName }}</text> | ||
| 7 | + <view class="row"><text class="label">补货单编号</text><text class="value">{{ form.code }}</text></view> | ||
| 8 | + <view class="row"><text class="label">分厂</text><text class="value">{{ form.workshopName }}</text> | ||
| 9 | + </view> | ||
| 10 | + <view class="row"><text class="label">办事处</text><text class="value">{{ form.deptName }}</text> | ||
| 11 | + </view> | ||
| 12 | + <view class="row"><text class="label">区域</text><text class="value">{{ form.regionName }}</text> | ||
| 13 | + </view> | ||
| 14 | + <view class="row"><text class="label">购货单位</text><text class="value">{{ form.customerName }}</text> | ||
| 15 | + </view> | ||
| 16 | + <view class="row"><text class="label">原计划发货日期</text><text class="value">{{ form.originPlanShipDate | ||
| 17 | + }}</text></view> | ||
| 18 | + </view> | ||
| 19 | + | ||
| 20 | + <!-- 产品 --> | ||
| 21 | + <view class="section2"> | ||
| 22 | + <Product mode="approve" :list="initPurchaseOrderLineList" @change="purchaseOrderLineListChange"/> | ||
| 23 | + </view> | ||
| 24 | + <view class="section3"> | ||
| 25 | + <view class="view-total"> | ||
| 26 | + <view class="head">合计</view> | ||
| 27 | + <view class="row"> | ||
| 28 | + <view class="row2"> | ||
| 29 | + <text class="label">需发</text><text class="value">{{ form.totalQuantity }}</text> | ||
| 30 | + </view> | ||
| 31 | + <view class="row2"> | ||
| 32 | + <text class="label">实发</text><text class="value">{{ form.totalShippedQuantity }}</text> | ||
| 33 | + </view> | ||
| 34 | + </view> | ||
| 35 | + <view class="row"> | ||
| 36 | + <view class="row2"> | ||
| 37 | + <text class="label">需求补货</text><text class="value">{{ form.totalSupplementaryQuantity | ||
| 38 | + }}</text> | ||
| 39 | + </view> | ||
| 40 | + </view> | ||
| 41 | + </view> | ||
| 42 | + </view> | ||
| 43 | + | ||
| 44 | + </view> | ||
| 45 | + </scroll-view> | ||
| 46 | + </view> | ||
| 47 | +</template> | ||
| 48 | + | ||
| 49 | +<script> | ||
| 50 | +import { getDetailApi } from '@/api/replenishment_order.js' | ||
| 51 | +import Product from './product.vue' | ||
| 52 | + | ||
| 53 | +export default { | ||
| 54 | + name: 'ReplenishmentOrderApprove', | ||
| 55 | + components: { Product }, | ||
| 56 | + props: { id: { type: [String, Number], default: '' } }, | ||
| 57 | + data() { | ||
| 58 | + return { | ||
| 59 | + form: {}, | ||
| 60 | + initPurchaseOrderLineList: [], | ||
| 61 | + } | ||
| 62 | + }, | ||
| 63 | + computed: { | ||
| 64 | + }, | ||
| 65 | + watch: { | ||
| 66 | + id: { | ||
| 67 | + immediate: true, | ||
| 68 | + handler(val) { | ||
| 69 | + const v = (val !== undefined && val !== null) ? String(val) : '' | ||
| 70 | + if (v) this.loadDetail(v) | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + }, | ||
| 74 | + onLoad(query) { | ||
| 75 | + }, | ||
| 76 | + methods: { | ||
| 77 | + async loadDetail(id) { | ||
| 78 | + try { | ||
| 79 | + const res = await getDetailApi(id) | ||
| 80 | + const m = res.data || {} | ||
| 81 | + const next = { ...this.form, ...m } | ||
| 82 | + // 确保ID存在 | ||
| 83 | + next.id = m.id || id | ||
| 84 | + // 映射列表 | ||
| 85 | + // 注意:详情返回的是 replenishmentOrderLineList,需要赋值给 initPurchaseOrderLineList 以便 Product 组件初始化 | ||
| 86 | + // 且需要处理字段兼容性,确保 Product 组件能正确显示和编辑 | ||
| 87 | + const lines = Array.isArray(m.replenishmentOrderLineList) ? m.replenishmentOrderLineList.map(x => ({ | ||
| 88 | + ...x, | ||
| 89 | + // 确保 Product 组件需要的字段存在 | ||
| 90 | + // Product组件使用: quantity(需发), shippedQuantity(实发), supplementaryQuantity(需求补货), salesPrice(单价) | ||
| 91 | + // 详情接口返回的字段应该已经包含了这些,如果有差异需要在此处转换 | ||
| 92 | + // 注意:add.vue中 onRelateConfirm 做了映射,这里是回显,通常直接使用即可 | ||
| 93 | + })) : [] | ||
| 94 | + | ||
| 95 | + this.form = next; | ||
| 96 | + this.initPurchaseOrderLineList = lines; | ||
| 97 | + // 初始计算合计 | ||
| 98 | + this.calculateSummary(lines) | ||
| 99 | + } catch (e) { | ||
| 100 | + this.form = {} | ||
| 101 | + } | ||
| 102 | + }, | ||
| 103 | + calculateSummary(list) { | ||
| 104 | + const summary = (list || []).reduce((acc, it) => { | ||
| 105 | + const qty = Number(it.supplementaryQuantity) || 0 | ||
| 106 | + const shipped = Number(it.shippedQuantity) || 0 | ||
| 107 | + const orderQty = Number(it.quantity) || 0 | ||
| 108 | + acc.totalSupplementaryQuantity += qty | ||
| 109 | + acc.totalShippedQuantity += shipped | ||
| 110 | + acc.totalQuantity += orderQty | ||
| 111 | + return acc | ||
| 112 | + }, { totalQuantity: 0, totalShippedQuantity: 0, totalSupplementaryQuantity: 0 }) | ||
| 113 | + this.form.totalQuantity = summary.totalQuantity | ||
| 114 | + this.form.totalShippedQuantity = summary.totalShippedQuantity | ||
| 115 | + this.form.totalSupplementaryQuantity = summary.totalSupplementaryQuantity | ||
| 116 | + }, | ||
| 117 | + purchaseOrderLineListChange(data) { | ||
| 118 | + const list = Array.isArray(data) ? data : [] | ||
| 119 | + this.form.purchaseOrderLineList = list | ||
| 120 | + this.calculateSummary(list) | ||
| 121 | + }, | ||
| 122 | + } | ||
| 123 | +} | ||
| 124 | +</script> | ||
| 125 | + | ||
| 126 | +<style lang="scss" scoped> | ||
| 127 | +.page { | ||
| 128 | + display: flex; | ||
| 129 | + flex-direction: column; | ||
| 130 | + height: 100vh; | ||
| 131 | +} | ||
| 132 | + | ||
| 133 | +.scroll { | ||
| 134 | + flex: 1; | ||
| 135 | + background: #f3f3f3; | ||
| 136 | +} | ||
| 137 | + | ||
| 138 | +.detail-page { | ||
| 139 | + padding-bottom: 150rpx; | ||
| 140 | +} | ||
| 141 | + | ||
| 142 | +.section { | ||
| 143 | + padding: 32rpx; | ||
| 144 | + background: #fff; | ||
| 145 | + margin-bottom: 20rpx; | ||
| 146 | + position: relative; | ||
| 147 | + | ||
| 148 | +} | ||
| 149 | + | ||
| 150 | +.row { | ||
| 151 | + display: flex; | ||
| 152 | + margin-bottom: 28rpx; | ||
| 153 | + | ||
| 154 | + &:last-child { | ||
| 155 | + margin-bottom: 0; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + &.company { | ||
| 159 | + font-size: 36rpx; | ||
| 160 | + font-weight: 600; | ||
| 161 | + color: rgba(0, 0, 0, 0.9); | ||
| 162 | + padding-top: 10rpx; | ||
| 163 | + margin-bottom: 32rpx; | ||
| 164 | + line-height: 50rpx; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + .label { | ||
| 168 | + width: 240rpx; | ||
| 169 | + line-height: 32rpx; | ||
| 170 | + font-size: 28rpx; | ||
| 171 | + color: rgba(0, 0, 0, 0.6); | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + .value { | ||
| 175 | + flex: 1; | ||
| 176 | + line-height: 32rpx; | ||
| 177 | + font-size: 28rpx; | ||
| 178 | + color: rgba(0, 0, 0, 0.9); | ||
| 179 | + text-align: right; | ||
| 180 | + word-break: break-all; | ||
| 181 | + } | ||
| 182 | +} | ||
| 183 | + | ||
| 184 | +.title-header { | ||
| 185 | + background-color: #fff; | ||
| 186 | + display: flex; | ||
| 187 | + align-items: center; | ||
| 188 | + padding: 32rpx 32rpx 22rpx; | ||
| 189 | + border-bottom: 1rpx dashed #f0f0f0; | ||
| 190 | + | ||
| 191 | + &_icon { | ||
| 192 | + width: 32rpx; | ||
| 193 | + height: 28rpx; | ||
| 194 | + margin-right: 16rpx; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + span { | ||
| 198 | + color: rgba(0, 0, 0, 0.9); | ||
| 199 | + font-size: 32rpx; | ||
| 200 | + line-height: 44rpx; | ||
| 201 | + font-weight: 600; | ||
| 202 | + } | ||
| 203 | +} | ||
| 204 | +.section3 { | ||
| 205 | + padding: 0 32rpx; | ||
| 206 | + background-color: #fff; | ||
| 207 | + margin-top: 20rpx; | ||
| 208 | +} | ||
| 209 | +.view-total { | ||
| 210 | + padding: 20rpx 0; | ||
| 211 | + | ||
| 212 | + .head { | ||
| 213 | + font-size: 32rpx; | ||
| 214 | + font-weight: 600; | ||
| 215 | + line-height: 50rpx; | ||
| 216 | + color: rgba(0, 0, 0, 0.9); | ||
| 217 | + padding-bottom: 16rpx; | ||
| 218 | + margin-bottom: 24rpx; | ||
| 219 | + border-bottom: 1px dashed #E7E7E7; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + .row { | ||
| 223 | + display: flex; | ||
| 224 | + margin-bottom: 24rpx; | ||
| 225 | + line-height: 32rpx; | ||
| 226 | + | ||
| 227 | + .row2 { | ||
| 228 | + width: 50%; | ||
| 229 | + } | ||
| 230 | + | ||
| 231 | + .label { | ||
| 232 | + width: 180rpx; | ||
| 233 | + margin-right: 14rpx; | ||
| 234 | + color: rgba(0, 0, 0, 0.6); | ||
| 235 | + font-size: 28rpx; | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + .value { | ||
| 239 | + flex: 1; | ||
| 240 | + color: rgba(0, 0, 0, 0.9); | ||
| 241 | + font-size: 28rpx; | ||
| 242 | + white-space: pre-wrap; | ||
| 243 | + word-break: break-all; | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | +} | ||
| 247 | +</style> |
| @@ -15,7 +15,7 @@ | @@ -15,7 +15,7 @@ | ||
| 15 | 15 | ||
| 16 | <!-- 产品 --> | 16 | <!-- 产品 --> |
| 17 | <view class="section2"> | 17 | <view class="section2"> |
| 18 | - <Product mode="view" :list="form.replenishmentOrderLineList" @change="purchaseOrderLineListChange" | 18 | + <Product mode="view" :list="form.replenishmentOrderLineList" |
| 19 | :orderDate="form.orderDate" | 19 | :orderDate="form.orderDate" |
| 20 | :totalQuantity="form.totalQuantity" | 20 | :totalQuantity="form.totalQuantity" |
| 21 | :totalShippedQuantity="form.totalShippedQuantity" | 21 | :totalShippedQuantity="form.totalShippedQuantity" |
| @@ -52,8 +52,6 @@ export default { | @@ -52,8 +52,6 @@ export default { | ||
| 52 | statusFlags() { | 52 | statusFlags() { |
| 53 | const m = this.form || {} | 53 | const m = this.form || {} |
| 54 | const e = String(m.status || '') | 54 | const e = String(m.status || '') |
| 55 | - console.log('___m', m) | ||
| 56 | - console.log('___e', e) | ||
| 57 | return { | 55 | return { |
| 58 | isRefuse: e === 'REFUSE' || false, | 56 | isRefuse: e === 'REFUSE' || false, |
| 59 | isAudit: e === 'AUDIT' || false, | 57 | isAudit: e === 'AUDIT' || false, |
| @@ -104,12 +102,12 @@ export default { | @@ -104,12 +102,12 @@ export default { | ||
| 104 | if (id) uni.navigateTo({ url: `/pages/replenishment_order/modify?id=${id}` }) | 102 | if (id) uni.navigateTo({ url: `/pages/replenishment_order/modify?id=${id}` }) |
| 105 | }, | 103 | }, |
| 106 | onAuditDetail() { | 104 | onAuditDetail() { |
| 107 | - const id = this.form.id || this.form.code | ||
| 108 | - if (id) uni.navigateTo({ url: `/pages/approve/index?id=${id}&type=REPLENISHMENT_ORDER` }) | 105 | + uni.setStorageSync('sourceBusinessId', this.form.id) |
| 106 | + uni.navigateTo({ url: '/pages/flow/audit_detail' }) | ||
| 109 | }, | 107 | }, |
| 110 | onAudit() { | 108 | onAudit() { |
| 111 | - const id = this.form.id || this.form.code | ||
| 112 | - if (id) uni.navigateTo({ url: `/pages/approve/audit?id=${id}&type=REPLENISHMENT_ORDER` }) | 109 | + uni.setStorageSync('sourceBusinessId', this.form.id) |
| 110 | + uni.navigateTo({ url: '/pages/flow/audit' }) | ||
| 113 | }, | 111 | }, |
| 114 | onFill() { | 112 | onFill() { |
| 115 | const id = this.form.id || this.form.code | 113 | const id = this.form.id || this.form.code |
| @@ -437,7 +437,6 @@ export default { | @@ -437,7 +437,6 @@ export default { | ||
| 437 | color: rgba(0, 0, 0, 0.9); | 437 | color: rgba(0, 0, 0, 0.9); |
| 438 | padding-bottom: 16rpx; | 438 | padding-bottom: 16rpx; |
| 439 | margin-bottom: 24rpx; | 439 | margin-bottom: 24rpx; |
| 440 | - ; | ||
| 441 | border-bottom: 1px dashed #E7E7E7; | 440 | border-bottom: 1px dashed #E7E7E7; |
| 442 | } | 441 | } |
| 443 | 442 |
| @@ -464,7 +464,6 @@ export default { | @@ -464,7 +464,6 @@ export default { | ||
| 464 | color: rgba(0, 0, 0, 0.9); | 464 | color: rgba(0, 0, 0, 0.9); |
| 465 | padding-bottom: 16rpx; | 465 | padding-bottom: 16rpx; |
| 466 | margin-bottom: 24rpx; | 466 | margin-bottom: 24rpx; |
| 467 | - ; | ||
| 468 | border-bottom: 1px dashed #E7E7E7; | 467 | border-bottom: 1px dashed #E7E7E7; |
| 469 | } | 468 | } |
| 470 | 469 |
| @@ -278,6 +278,118 @@ | @@ -278,6 +278,118 @@ | ||
| 278 | </view> | 278 | </view> |
| 279 | </view> | 279 | </view> |
| 280 | 280 | ||
| 281 | + <view v-else-if="mode === 'approve'" class="section"> | ||
| 282 | + <view v-for="(item, idx) in items" :key="'a-' + idx" class="block"> | ||
| 283 | + <uni-list class="edit-list"> | ||
| 284 | + <uni-list-item title="牌号"> | ||
| 285 | + <template v-slot:footer> | ||
| 286 | + <text class="value">{{ item.brand }}</text> | ||
| 287 | + </template> | ||
| 288 | + </uni-list-item> | ||
| 289 | + <!-- 厚(公差) * 宽(公差) * 长(公差) --> | ||
| 290 | + <uni-list-item title="规格(mm)"> | ||
| 291 | + <template v-slot:footer> | ||
| 292 | + <view class="value value-spec"> | ||
| 293 | + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view> | ||
| 294 | + <view v-if="item.thickness" class="value-spec_box"> | ||
| 295 | + <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{ item.thicknessTolPos > | ||
| 296 | + 0 ? '+' | ||
| 297 | + + | ||
| 298 | + item.thicknessTolPos : item.thicknessTolPos }} | ||
| 299 | + </view> | ||
| 300 | + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg > | ||
| 301 | + 0 ? '+' | ||
| 302 | + + | ||
| 303 | + item.thicknessTolNeg : item.thicknessTolNeg }} | ||
| 304 | + </view> | ||
| 305 | + </view> | ||
| 306 | + <view v-if="item.width" class="value-spec_val p12">*</view> | ||
| 307 | + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view> | ||
| 308 | + <view v-if="item.width" class="value-spec_box"> | ||
| 309 | + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+' | ||
| 310 | + + | ||
| 311 | + item.widthTolPos : item.widthTolPos }} | ||
| 312 | + </view> | ||
| 313 | + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' | ||
| 314 | + + | ||
| 315 | + item.widthTolNeg : item.widthTolNeg }} | ||
| 316 | + </view> | ||
| 317 | + </view> | ||
| 318 | + <view v-if="item.length" class="value-spec_val p12">*</view> | ||
| 319 | + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view> | ||
| 320 | + <view v-if="item.length" class="value-spec_box"> | ||
| 321 | + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? | ||
| 322 | + '+' + | ||
| 323 | + item.lengthTolPos : item.lengthTolPos }} | ||
| 324 | + </view> | ||
| 325 | + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? | ||
| 326 | + '+' + | ||
| 327 | + item.lengthTolNeg : item.lengthTolNeg }} | ||
| 328 | + </view> | ||
| 329 | + </view> | ||
| 330 | + </view> | ||
| 331 | + </template> | ||
| 332 | + </uni-list-item> | ||
| 333 | + <view v-show="!item.collapsed"> | ||
| 334 | + <uni-list-item title="状态"> | ||
| 335 | + <template v-slot:footer> | ||
| 336 | + <text class="value">{{ item.status }}</text> | ||
| 337 | + </template> | ||
| 338 | + </uni-list-item> | ||
| 339 | + <uni-list-item title="需发数量(kg)"> | ||
| 340 | + <template v-slot:footer> | ||
| 341 | + <text class="value">{{ item.quantity }}</text> | ||
| 342 | + </template> | ||
| 343 | + </uni-list-item> | ||
| 344 | + <uni-list-item title="实发数量(kg)"> | ||
| 345 | + <template v-slot:footer> | ||
| 346 | + <text class="value">{{ item.shippedQuantity }}</text> | ||
| 347 | + </template> | ||
| 348 | + </uni-list-item> | ||
| 349 | + <uni-list-item title="需求补货数量(kg)"> | ||
| 350 | + <!-- <template v-slot:footer> | ||
| 351 | + <text class="value">{{ item.supplementaryQuantity }}</text> | ||
| 352 | + </template> --> | ||
| 353 | + <template v-slot:footer> | ||
| 354 | + <uni-easyinput type="digit" v-model="item.supplementaryQuantity" | ||
| 355 | + placeholder="请输入需求补货数量kg" :inputBorder="false" | ||
| 356 | + @input="onNonNegativeNumberInput($event, item, idx, 'supplementaryQuantity')" | ||
| 357 | + @blur="onNonNegativeNumberBlur(item, idx, 'supplementaryQuantity')" /> | ||
| 358 | + </template> | ||
| 359 | + </uni-list-item> | ||
| 360 | + <uni-list-item class="amount-item" title="单价(元/kg)"> | ||
| 361 | + <template v-slot:footer> | ||
| 362 | + <text class="value">{{ item.salesPrice }}</text> | ||
| 363 | + </template> | ||
| 364 | + </uni-list-item> | ||
| 365 | + <uni-list-item class="amount-item" title="包装费(元/kg)"> | ||
| 366 | + <template v-slot:footer> | ||
| 367 | + <text class="value">{{ item.packagingFee }}</text> | ||
| 368 | + </template> | ||
| 369 | + </uni-list-item> | ||
| 370 | + <uni-list-item title="生产科(车间)确认交付时间"> | ||
| 371 | + <template v-slot:footer> | ||
| 372 | + <text class="value">{{ item.confirmedDeliveryDate }}</text> | ||
| 373 | + </template> | ||
| 374 | + </uni-list-item> | ||
| 375 | + <uni-list-item title="备注"> | ||
| 376 | + <template v-slot:footer> | ||
| 377 | + <text class="value">{{ item.remarks }}元</text> | ||
| 378 | + </template> | ||
| 379 | + </uni-list-item> | ||
| 380 | + </view> | ||
| 381 | + </uni-list> | ||
| 382 | + | ||
| 383 | + <view class="block-ops"> | ||
| 384 | + <div class="toggle" @click="toggleItem(idx)"> | ||
| 385 | + <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" | ||
| 386 | + class="icon" /> | ||
| 387 | + {{ item.collapsed ? '展开' : '收起' }} | ||
| 388 | + </div> | ||
| 389 | + </view> | ||
| 390 | + </view> | ||
| 391 | + </view> | ||
| 392 | + | ||
| 281 | <view v-else-if="mode === 'view'" class="view-list" v-show="!collapsedView"> | 393 | <view v-else-if="mode === 'view'" class="view-list" v-show="!collapsedView"> |
| 282 | <view v-for="(item, idx) in items" :key="'v-' + idx" class="card"> | 394 | <view v-for="(item, idx) in items" :key="'v-' + idx" class="card"> |
| 283 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> | 395 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| @@ -863,7 +975,6 @@ export default { | @@ -863,7 +975,6 @@ export default { | ||
| 863 | color: rgba(0, 0, 0, 0.9); | 975 | color: rgba(0, 0, 0, 0.9); |
| 864 | padding-bottom: 16rpx; | 976 | padding-bottom: 16rpx; |
| 865 | margin-bottom: 24rpx; | 977 | margin-bottom: 24rpx; |
| 866 | - ; | ||
| 867 | border-bottom: 1px dashed #E7E7E7; | 978 | border-bottom: 1px dashed #E7E7E7; |
| 868 | } | 979 | } |
| 869 | 980 | ||
| @@ -981,7 +1092,6 @@ export default { | @@ -981,7 +1092,6 @@ export default { | ||
| 981 | color: rgba(0, 0, 0, 0.9); | 1092 | color: rgba(0, 0, 0, 0.9); |
| 982 | padding-bottom: 16rpx; | 1093 | padding-bottom: 16rpx; |
| 983 | margin-bottom: 24rpx; | 1094 | margin-bottom: 24rpx; |
| 984 | - ; | ||
| 985 | border-bottom: 1px dashed #E7E7E7; | 1095 | border-bottom: 1px dashed #E7E7E7; |
| 986 | } | 1096 | } |
| 987 | 1097 |
pages/replenishment_order/viewer.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <scroll-view class="scroll" scroll-y> | ||
| 4 | + <view class="detail-page"> | ||
| 5 | + <view class="section"> | ||
| 6 | + <text class="row company">{{ form.purchaseOrderName }}</text> | ||
| 7 | + <view class="row"><text class="label">补货单编号</text><text class="value">{{ form.code }}</text></view> | ||
| 8 | + <view class="row"><text class="label">分厂</text><text class="value">{{ form.workshopName }}</text></view> | ||
| 9 | + <view class="row"><text class="label">办事处</text><text class="value">{{ form.deptName }}</text></view> | ||
| 10 | + <view class="row"><text class="label">区域</text><text class="value">{{ form.regionName }}</text></view> | ||
| 11 | + <view class="row"><text class="label">购货单位</text><text class="value">{{ form.customerName }}</text></view> | ||
| 12 | + <view class="row"><text class="label">原计划发货日期</text><text class="value">{{ form.originPlanShipDate }}</text></view> | ||
| 13 | + </view> | ||
| 14 | + | ||
| 15 | + <!-- 产品 --> | ||
| 16 | + <view class="section2"> | ||
| 17 | + <Product mode="view" :list="form.replenishmentOrderLineList" | ||
| 18 | + :orderDate="form.orderDate" | ||
| 19 | + :totalQuantity="form.totalQuantity" | ||
| 20 | + :totalShippedQuantity="form.totalShippedQuantity" | ||
| 21 | + :totalSupplementaryQuantity="form.totalSupplementaryQuantity" | ||
| 22 | + /> | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 25 | + </scroll-view> | ||
| 26 | + </view> | ||
| 27 | +</template> | ||
| 28 | + | ||
| 29 | +<script> | ||
| 30 | +import { getDetailApi } from '@/api/replenishment_order.js' | ||
| 31 | +import Product from './product.vue' | ||
| 32 | + | ||
| 33 | +export default { | ||
| 34 | + name: 'ReplenishmentOrderViewer', | ||
| 35 | + components: { Product }, | ||
| 36 | + props: { id: { type: [String, Number], default: '' } }, | ||
| 37 | + data() { | ||
| 38 | + return { | ||
| 39 | + form: {}, | ||
| 40 | + } | ||
| 41 | + }, | ||
| 42 | + computed: { | ||
| 43 | + }, | ||
| 44 | + watch: { | ||
| 45 | + id: { | ||
| 46 | + immediate: true, | ||
| 47 | + handler(val) { | ||
| 48 | + const v = (val !== undefined && val !== null) ? String(val) : '' | ||
| 49 | + if (v) this.loadDetail(v) | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + }, | ||
| 53 | + onLoad(query) { | ||
| 54 | + }, | ||
| 55 | + methods: { | ||
| 56 | + async loadDetail(id) { | ||
| 57 | + try { | ||
| 58 | + const res = await getDetailApi(id) | ||
| 59 | + this.form = res.data || {} | ||
| 60 | + } catch (e) { | ||
| 61 | + this.form = {} | ||
| 62 | + } | ||
| 63 | + }, | ||
| 64 | + } | ||
| 65 | +} | ||
| 66 | +</script> | ||
| 67 | + | ||
| 68 | +<style lang="scss" scoped> | ||
| 69 | +.page { | ||
| 70 | + display: flex; | ||
| 71 | + flex-direction: column; | ||
| 72 | + height: 100vh; | ||
| 73 | +} | ||
| 74 | + | ||
| 75 | +.scroll { | ||
| 76 | + flex: 1; | ||
| 77 | + background: #f3f3f3; | ||
| 78 | +} | ||
| 79 | + | ||
| 80 | +.detail-page { | ||
| 81 | + padding-bottom: 20rpx; | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +.section { | ||
| 85 | + padding: 32rpx; | ||
| 86 | + background: #fff; | ||
| 87 | + margin-bottom: 20rpx; | ||
| 88 | + position: relative; | ||
| 89 | + | ||
| 90 | +} | ||
| 91 | + | ||
| 92 | +.row { | ||
| 93 | + display: flex; | ||
| 94 | + margin-bottom: 28rpx; | ||
| 95 | + | ||
| 96 | + &:last-child { | ||
| 97 | + margin-bottom: 0; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + &.company { | ||
| 101 | + font-size: 36rpx; | ||
| 102 | + font-weight: 600; | ||
| 103 | + color: rgba(0, 0, 0, 0.9); | ||
| 104 | + padding-top: 10rpx; | ||
| 105 | + margin-bottom: 32rpx; | ||
| 106 | + line-height: 50rpx; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + .label { | ||
| 110 | + width: 240rpx; | ||
| 111 | + line-height: 32rpx; | ||
| 112 | + font-size: 28rpx; | ||
| 113 | + color: rgba(0, 0, 0, 0.6); | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + .value { | ||
| 117 | + flex: 1; | ||
| 118 | + line-height: 32rpx; | ||
| 119 | + font-size: 28rpx; | ||
| 120 | + color: rgba(0, 0, 0, 0.9); | ||
| 121 | + text-align: right; | ||
| 122 | + word-break: break-all; | ||
| 123 | + } | ||
| 124 | +} | ||
| 125 | + | ||
| 126 | +.title-header { | ||
| 127 | + background-color: #fff; | ||
| 128 | + display: flex; | ||
| 129 | + align-items: center; | ||
| 130 | + padding: 32rpx 32rpx 22rpx; | ||
| 131 | + border-bottom: 1rpx dashed #f0f0f0; | ||
| 132 | + | ||
| 133 | + &_icon { | ||
| 134 | + width: 32rpx; | ||
| 135 | + height: 28rpx; | ||
| 136 | + margin-right: 16rpx; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + span { | ||
| 140 | + color: rgba(0, 0, 0, 0.9); | ||
| 141 | + font-size: 32rpx; | ||
| 142 | + line-height: 44rpx; | ||
| 143 | + font-weight: 600; | ||
| 144 | + } | ||
| 145 | +} | ||
| 146 | +</style> |
| @@ -501,7 +501,6 @@ export default { | @@ -501,7 +501,6 @@ export default { | ||
| 501 | color: rgba(0, 0, 0, 0.9); | 501 | color: rgba(0, 0, 0, 0.9); |
| 502 | padding-bottom: 16rpx; | 502 | padding-bottom: 16rpx; |
| 503 | margin-bottom: 24rpx; | 503 | margin-bottom: 24rpx; |
| 504 | - ; | ||
| 505 | border-bottom: 1px dashed #E7E7E7; | 504 | border-bottom: 1px dashed #E7E7E7; |
| 506 | } | 505 | } |
| 507 | 506 |
| @@ -424,7 +424,6 @@ export default { | @@ -424,7 +424,6 @@ export default { | ||
| 424 | color: rgba(0, 0, 0, 0.9); | 424 | color: rgba(0, 0, 0, 0.9); |
| 425 | padding-bottom: 16rpx; | 425 | padding-bottom: 16rpx; |
| 426 | margin-bottom: 24rpx; | 426 | margin-bottom: 24rpx; |
| 427 | - ; | ||
| 428 | border-bottom: 1px dashed #E7E7E7; | 427 | border-bottom: 1px dashed #E7E7E7; |
| 429 | } | 428 | } |
| 430 | 429 |
| @@ -544,7 +544,6 @@ export default { | @@ -544,7 +544,6 @@ export default { | ||
| 544 | color: rgba(0, 0, 0, 0.9); | 544 | color: rgba(0, 0, 0, 0.9); |
| 545 | padding-bottom: 16rpx; | 545 | padding-bottom: 16rpx; |
| 546 | margin-bottom: 24rpx; | 546 | margin-bottom: 24rpx; |
| 547 | - ; | ||
| 548 | border-bottom: 1px dashed #E7E7E7; | 547 | border-bottom: 1px dashed #E7E7E7; |
| 549 | } | 548 | } |
| 550 | 549 | ||
| @@ -661,7 +660,6 @@ export default { | @@ -661,7 +660,6 @@ export default { | ||
| 661 | color: rgba(0, 0, 0, 0.9); | 660 | color: rgba(0, 0, 0, 0.9); |
| 662 | padding-bottom: 16rpx; | 661 | padding-bottom: 16rpx; |
| 663 | margin-bottom: 24rpx; | 662 | margin-bottom: 24rpx; |
| 664 | - ; | ||
| 665 | border-bottom: 1px dashed #E7E7E7; | 663 | border-bottom: 1px dashed #E7E7E7; |
| 666 | } | 664 | } |
| 667 | 665 |
| @@ -8,6 +8,8 @@ import OrderListApprove from '@/pages/order_list/approve.vue' | @@ -8,6 +8,8 @@ import OrderListApprove from '@/pages/order_list/approve.vue' | ||
| 8 | import OrderListViewer from '@/pages/order_list/viewer.vue' | 8 | import OrderListViewer from '@/pages/order_list/viewer.vue' |
| 9 | import ChangeListViewer from '@/pages/change_list/viewer.vue' | 9 | import ChangeListViewer from '@/pages/change_list/viewer.vue' |
| 10 | import RevokeListViewer from '@/pages/revoke_list/viewer.vue' | 10 | import RevokeListViewer from '@/pages/revoke_list/viewer.vue' |
| 11 | +import RestockApprovalViewer from '@/pages/replenishment_order/viewer.vue' | ||
| 12 | +import RestockApprovalApprove from '@/pages/replenishment_order/approve.vue' | ||
| 11 | 13 | ||
| 12 | export default function registerComponents(Vue) { | 14 | export default function registerComponents(Vue) { |
| 13 | Vue.component('CustomerDevelopViewer', CustomerDevelopViewer) | 15 | Vue.component('CustomerDevelopViewer', CustomerDevelopViewer) |
| @@ -20,4 +22,6 @@ export default function registerComponents(Vue) { | @@ -20,4 +22,6 @@ export default function registerComponents(Vue) { | ||
| 20 | Vue.component('OrderListViewer', OrderListViewer) | 22 | Vue.component('OrderListViewer', OrderListViewer) |
| 21 | Vue.component('ChangeListViewer', ChangeListViewer) | 23 | Vue.component('ChangeListViewer', ChangeListViewer) |
| 22 | Vue.component('RevokeListViewer', RevokeListViewer) | 24 | Vue.component('RevokeListViewer', RevokeListViewer) |
| 25 | + Vue.component('RestockApprovalViewer', RestockApprovalViewer) | ||
| 26 | + Vue.component('RestockApprovalApprove', RestockApprovalApprove) | ||
| 23 | } | 27 | } |
| @@ -62,6 +62,12 @@ export const getSysFlowComponentPath = (bizFlag) => { | @@ -62,6 +62,12 @@ export const getSysFlowComponentPath = (bizFlag) => { | ||
| 62 | case 'ORDER_CANCELLATION_EDIT': // 订单撤销 | 62 | case 'ORDER_CANCELLATION_EDIT': // 订单撤销 |
| 63 | componentPath = 'RevokeListViewer'; // 订单撤销-审批 | 63 | componentPath = 'RevokeListViewer'; // 订单撤销-审批 |
| 64 | break; | 64 | break; |
| 65 | + case 'RESTOCK_APPROVAL': // 补货单 | ||
| 66 | + componentPath = 'RestockApprovalViewer'; // 补货单-审批详情 | ||
| 67 | + break; | ||
| 68 | + case 'RESTOCK_APPROVAL_EDIT': // 补货单 | ||
| 69 | + componentPath = 'RestockApprovalApprove'; // 补货单-审批 | ||
| 70 | + break; | ||
| 65 | } | 71 | } |
| 66 | return componentPath; | 72 | return componentPath; |
| 67 | }; | 73 | }; |