Showing
5 changed files
with
608 additions
and
8 deletions
| @@ -43,6 +43,7 @@ export function updateApi(params) { | @@ -43,6 +43,7 @@ export function updateApi(params) { | ||
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | // 检查发货计划是否可以填写实发数 | 45 | // 检查发货计划是否可以填写实发数 |
| 46 | +// [id1, id2, ...] | ||
| 46 | export function checkApi(ids) { | 47 | export function checkApi(ids) { |
| 47 | return request({ | 48 | return request({ |
| 48 | url: baseUrl + '/check', | 49 | url: baseUrl + '/check', |
| @@ -666,6 +666,14 @@ | @@ -666,6 +666,14 @@ | ||
| 666 | } | 666 | } |
| 667 | }, | 667 | }, |
| 668 | { | 668 | { |
| 669 | + "path": "pages/invoice/fill", | ||
| 670 | + "style": { | ||
| 671 | + "navigationBarTitleText": "发货单填写实发数", | ||
| 672 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 673 | + "navigationBarTextStyle": "black" | ||
| 674 | + } | ||
| 675 | + }, | ||
| 676 | + { | ||
| 669 | "path": "pages/delay_invoice/index", | 677 | "path": "pages/delay_invoice/index", |
| 670 | "style": { | 678 | "style": { |
| 671 | "navigationBarTitleText": "延期发货单", | 679 | "navigationBarTitleText": "延期发货单", |
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | </template> | 44 | </template> |
| 45 | 45 | ||
| 46 | <script> | 46 | <script> |
| 47 | -import { getDetailApi, saveSignInTicket } from '@/api/invoice.js' | 47 | +import { getDetailApi, saveSignInTicket, checkApi } from '@/api/invoice.js' |
| 48 | import Product from './product.vue' | 48 | import Product from './product.vue' |
| 49 | import DetailButtons from '@/components/detail-buttons/index.vue' | 49 | import DetailButtons from '@/components/detail-buttons/index.vue' |
| 50 | import FileUpload from '@/components/file-upload/index.vue' | 50 | import FileUpload from '@/components/file-upload/index.vue' |
| @@ -110,9 +110,15 @@ export default { | @@ -110,9 +110,15 @@ export default { | ||
| 110 | // const id = this.form.id || this.form.code | 110 | // const id = this.form.id || this.form.code |
| 111 | // if (id) uni.navigateTo({ url: `/pages/invoice/modify?id=${id}` }) | 111 | // if (id) uni.navigateTo({ url: `/pages/invoice/modify?id=${id}` }) |
| 112 | // }, | 112 | // }, |
| 113 | - onFill() { | ||
| 114 | - const id = this.form.id || this.form.code | ||
| 115 | - if (id) uni.navigateTo({ url: `/pages/invoice/fill?id=${id}` }) | 113 | + async onFill() { |
| 114 | + const id = this.form.id || this.form.code; | ||
| 115 | + try { | ||
| 116 | + await checkApi([id]) | ||
| 117 | + } catch (e) { | ||
| 118 | + uni.showToast({ title: (e && e.msg) || '检查失败', icon: 'none' }) | ||
| 119 | + return | ||
| 120 | + } | ||
| 121 | + if (id) uni.navigateTo({ url: `/pages/invoice/fill?id=${id}&customerName=${this.form.customerName}` }) | ||
| 116 | }, | 122 | }, |
| 117 | onUpload() { | 123 | onUpload() { |
| 118 | this.$refs.uploadPopup && this.$refs.uploadPopup.open() | 124 | this.$refs.uploadPopup && this.$refs.uploadPopup.open() |
pages/invoice/fill.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="page"> | ||
| 3 | + <scroll-view class="scroll" scroll-y> | ||
| 4 | + <uni-list> | ||
| 5 | + <!-- 产品 --> | ||
| 6 | + <view class="section2"> | ||
| 7 | + <!-- mode="add" 允许编辑 --> | ||
| 8 | + <Product mode="fill" :list="initDetailList" @change="detailListChange" /> | ||
| 9 | + </view> | ||
| 10 | + <view class="footer"> | ||
| 11 | + <button class="btn submit" type="primary" @click="onSubmit">保存</button> | ||
| 12 | + </view> | ||
| 13 | + </uni-list> | ||
| 14 | + </scroll-view> | ||
| 15 | + <uni-popup ref="confirmPopup" type="center" :mask-click="false"> | ||
| 16 | + <view class="action-modal"> | ||
| 17 | + <view class="action-modal_header">提示</view> | ||
| 18 | + <view class="action-modal_body"> | ||
| 19 | + <text class="tip">请确认:{{ customerName }} 的货物已发出?</text> | ||
| 20 | + </view> | ||
| 21 | + <view class="action-modal_footer"> | ||
| 22 | + <button class="btn cancel" @click="() => handleShipConfirm('ALL')">全部发货</button> | ||
| 23 | + <button class="btn confirm" type="primary" @click="() => handleShipConfirm('PART')">部分发货</button> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </uni-popup> | ||
| 27 | + </view> | ||
| 28 | +</template> | ||
| 29 | + | ||
| 30 | +<script> | ||
| 31 | +import { listByShipmentOrderId, dataReplenishInput } from '@/api/invoice.js' | ||
| 32 | +import Product from './product.vue' | ||
| 33 | + | ||
| 34 | +export default { | ||
| 35 | + name: 'InvoiceFill', | ||
| 36 | + components: { Product }, | ||
| 37 | + data() { | ||
| 38 | + return { | ||
| 39 | + form: { | ||
| 40 | + id: '', | ||
| 41 | + detailList: [] | ||
| 42 | + }, | ||
| 43 | + initDetailList: [], | ||
| 44 | + customerName: '' | ||
| 45 | + } | ||
| 46 | + }, | ||
| 47 | + onLoad(query) { | ||
| 48 | + const id = (query && (query.id || query.code)) || ''; | ||
| 49 | + const customerName = query && query.customerName || ''; | ||
| 50 | + this.form.id = id; | ||
| 51 | + this.customerName = customerName; | ||
| 52 | + if (id) { | ||
| 53 | + this.loadDetail(id) | ||
| 54 | + } | ||
| 55 | + }, | ||
| 56 | + methods: { | ||
| 57 | + async loadDetail(id) { | ||
| 58 | + try { | ||
| 59 | + const res = await listByShipmentOrderId(id) | ||
| 60 | + const m = res.data || {} | ||
| 61 | + // 映射列表 | ||
| 62 | + // 注意:详情返回的是 replenishmentOrderLineList,需要赋值给 initDelayedShipmentDetailList 以便 Product 组件初始化 | ||
| 63 | + // 且需要处理字段兼容性,确保 Product 组件能正确显示和编辑 | ||
| 64 | + const lines = Array.isArray(m) ? m.map(x => ({ | ||
| 65 | + ...x, | ||
| 66 | + // 确保 Product 组件需要的字段存在 | ||
| 67 | + // 注意:add.vue中 onRelateConfirm 做了映射,这里是回显,通常直接使用即可 | ||
| 68 | + })) : [] | ||
| 69 | + | ||
| 70 | + this.initDetailList = lines; | ||
| 71 | + } catch (e) { | ||
| 72 | + uni.showToast({ title: '加载失败', icon: 'none' }) | ||
| 73 | + } | ||
| 74 | + }, | ||
| 75 | + validateLineListRequired() { | ||
| 76 | + const list = Array.isArray(this.form.detailList) ? this.form.detailList : [] | ||
| 77 | + if (list.length === 0) { | ||
| 78 | + uni.showToast({ title: '请先添加发货单明细', icon: 'none' }) | ||
| 79 | + return false | ||
| 80 | + } | ||
| 81 | + const fields = [ | ||
| 82 | + { key: 'actualShipmentQuantity', label: '实发数量' }, | ||
| 83 | + { key: 'num', label: '件数' }, | ||
| 84 | + { key: 'yieldBatchNo', label: '生产批号' }, | ||
| 85 | + ] | ||
| 86 | + for (let i = 0; i < list.length; i++) { | ||
| 87 | + const it = list[i] || {} | ||
| 88 | + for (const f of fields) { | ||
| 89 | + const v = it && it[f.key] | ||
| 90 | + if (v === undefined || v === null || String(v).trim() === '') { | ||
| 91 | + uni.showToast({ title: `发货单明细第${i + 1}条:${f.label}不能为空!`, icon: 'none' }) | ||
| 92 | + return false | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + return true | ||
| 97 | + }, | ||
| 98 | + async onSubmit() { | ||
| 99 | + if (!this.validateLineListRequired()) return | ||
| 100 | + const payload = { ...this.form } | ||
| 101 | + | ||
| 102 | + console.log('onSubmit__payload', payload) | ||
| 103 | + this.$refs.confirmPopup && this.$refs.confirmPopup.open(); | ||
| 104 | + }, | ||
| 105 | + detailListChange(data) { | ||
| 106 | + const list = Array.isArray(data) ? data : [] | ||
| 107 | + this.form.detailList = list; | ||
| 108 | + }, | ||
| 109 | + handleShipConfirm(type) { | ||
| 110 | + this.$refs.confirmPopup && this.$refs.confirmPopup.close(); | ||
| 111 | + this.submitData(type); | ||
| 112 | + }, | ||
| 113 | + async submitData(type) { | ||
| 114 | + this.loading = true; | ||
| 115 | + const params = {}; | ||
| 116 | + const rows = this.form.detailList || []; | ||
| 117 | + const detailList = rows.map((r) => { | ||
| 118 | + return { | ||
| 119 | + id: r.id || '', | ||
| 120 | + actualShipmentQuantity: Number(r.actualShipmentQuantity) || '', | ||
| 121 | + num: r.num || '', | ||
| 122 | + orderId: r.orderId || '', | ||
| 123 | + quantity: Number(r.quantity) || '', | ||
| 124 | + yieldBatchNo: r.yieldBatchNo || '', | ||
| 125 | + }; | ||
| 126 | + }); | ||
| 127 | + params.id = this.form.id || ''; | ||
| 128 | + params.detailList = detailList; | ||
| 129 | + params.type = type || ''; | ||
| 130 | + console.log(params); | ||
| 131 | + | ||
| 132 | + try { | ||
| 133 | + await dataReplenishInput(params) | ||
| 134 | + uni.showToast({ title: '提交成功!', icon: 'success' }) | ||
| 135 | + setTimeout(() => { uni.redirectTo({ url: '/pages/invoice/index' }) }, 300) | ||
| 136 | + } catch (e) { | ||
| 137 | + uni.showToast({ title: (e && e.msg) || '提交失败!', icon: 'none' }) | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + }, | ||
| 141 | + } | ||
| 142 | +} | ||
| 143 | +</script> | ||
| 144 | + | ||
| 145 | +<style lang="scss" scoped> | ||
| 146 | +.page { | ||
| 147 | + display: flex; | ||
| 148 | + flex-direction: column; | ||
| 149 | + height: 100%; | ||
| 150 | +} | ||
| 151 | + | ||
| 152 | +.scroll { | ||
| 153 | + flex: 1; | ||
| 154 | + padding: 6rpx 0 144rpx; | ||
| 155 | +} | ||
| 156 | + | ||
| 157 | + | ||
| 158 | + | ||
| 159 | +.title-header { | ||
| 160 | + background-color: #fff; | ||
| 161 | + display: flex; | ||
| 162 | + align-items: center; | ||
| 163 | + padding: 32rpx 32rpx 22rpx; | ||
| 164 | + | ||
| 165 | + .title-header_icon { | ||
| 166 | + width: 32rpx; | ||
| 167 | + height: 28rpx; | ||
| 168 | + margin-right: 16rpx; | ||
| 169 | + } | ||
| 170 | + | ||
| 171 | + span { | ||
| 172 | + color: rgba(0, 0, 0, 0.9); | ||
| 173 | + font-size: 32rpx; | ||
| 174 | + line-height: 44rpx; | ||
| 175 | + font-weight: 600; | ||
| 176 | + } | ||
| 177 | +} | ||
| 178 | + | ||
| 179 | + | ||
| 180 | +.section { | ||
| 181 | + background: #fff; | ||
| 182 | + margin-bottom: 20rpx; | ||
| 183 | +} | ||
| 184 | + | ||
| 185 | +.section2 { | ||
| 186 | + background: #f1f1f1; | ||
| 187 | +} | ||
| 188 | + | ||
| 189 | +::v-deep .uni-list { | ||
| 190 | + background: transparent; | ||
| 191 | + | ||
| 192 | + &-item { | ||
| 193 | + &__extra-text { | ||
| 194 | + font-size: 32rpx; | ||
| 195 | + } | ||
| 196 | + | ||
| 197 | + &__content-title { | ||
| 198 | + font-size: 32rpx; | ||
| 199 | + color: rgba(0, 0, 0, 0.9); | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + &__container { | ||
| 203 | + padding: 32rpx; | ||
| 204 | + // align-items: center; | ||
| 205 | + | ||
| 206 | + .uni-easyinput { | ||
| 207 | + | ||
| 208 | + .is-disabled { | ||
| 209 | + background-color: transparent !important; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + &__placeholder-class { | ||
| 213 | + font-size: 32rpx; | ||
| 214 | + color: rgba(0, 0, 0, 0.4); | ||
| 215 | + } | ||
| 216 | + | ||
| 217 | + &__content { | ||
| 218 | + border: none; | ||
| 219 | + | ||
| 220 | + &-input { | ||
| 221 | + padding-left: 0 !important; | ||
| 222 | + height: 48rpx; | ||
| 223 | + line-height: 48rpx; | ||
| 224 | + font-size: 32rpx; | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + .content-clear-icon { | ||
| 228 | + font-size: 44rpx !important; | ||
| 229 | + } | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + | ||
| 233 | + .amount-row { | ||
| 234 | + flex: 1; | ||
| 235 | + display: flex; | ||
| 236 | + align-items: center; | ||
| 237 | + | ||
| 238 | + .uni-easyinput { | ||
| 239 | + flex: 1; | ||
| 240 | + } | ||
| 241 | + | ||
| 242 | + .unit { | ||
| 243 | + margin-left: 16rpx; | ||
| 244 | + color: rgba(0, 0, 0, 0.9); | ||
| 245 | + } | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + .item-title, | ||
| 249 | + .uni-list-item__content { | ||
| 250 | + flex: none; | ||
| 251 | + min-height: 48rpx; | ||
| 252 | + line-height: 48rpx; | ||
| 253 | + font-size: 32rpx; | ||
| 254 | + position: relative; | ||
| 255 | + width: 210rpx; | ||
| 256 | + margin-right: 32rpx; | ||
| 257 | + color: rgba(0, 0, 0, 0.9); | ||
| 258 | + padding-right: 0; | ||
| 259 | + | ||
| 260 | + | ||
| 261 | + .required { | ||
| 262 | + color: red; | ||
| 263 | + position: absolute; | ||
| 264 | + top: 50%; | ||
| 265 | + transform: translateY(-50%); | ||
| 266 | + left: -16rpx; | ||
| 267 | + } | ||
| 268 | + } | ||
| 269 | + | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + &.select-item { | ||
| 273 | + &.is-empty { | ||
| 274 | + .uni-list-item__extra-text { | ||
| 275 | + color: rgba(0, 0, 0, 0.4) !important; | ||
| 276 | + } | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + &.is-filled { | ||
| 280 | + .uni-list-item__extra-text { | ||
| 281 | + color: rgba(0, 0, 0, 0.9) !important; | ||
| 282 | + } | ||
| 283 | + } | ||
| 284 | + | ||
| 285 | + .serial-number-row { | ||
| 286 | + display: flex; | ||
| 287 | + align-items: center; | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + &.mgb10 { | ||
| 293 | + margin-bottom: 20rpx; | ||
| 294 | + } | ||
| 295 | + | ||
| 296 | + } | ||
| 297 | + | ||
| 298 | + .title-header { | ||
| 299 | + background-color: #fff; | ||
| 300 | + display: flex; | ||
| 301 | + align-items: center; | ||
| 302 | + padding: 32rpx 32rpx 22rpx; | ||
| 303 | + | ||
| 304 | + &_icon { | ||
| 305 | + width: 32rpx; | ||
| 306 | + height: 28rpx; | ||
| 307 | + margin-right: 16rpx; | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + span { | ||
| 311 | + color: rgba(0, 0, 0, 0.9); | ||
| 312 | + font-size: 32rpx; | ||
| 313 | + line-height: 44rpx; | ||
| 314 | + font-weight: 600; | ||
| 315 | + } | ||
| 316 | + } | ||
| 317 | +} | ||
| 318 | + | ||
| 319 | +/* 只读 easyinput 根据内容自适应高度 */ | ||
| 320 | +::v-deep .uni-list-item__container { | ||
| 321 | + align-items: flex-start; | ||
| 322 | +} | ||
| 323 | + | ||
| 324 | +/* 只读文本样式 */ | ||
| 325 | +.readonly-text { | ||
| 326 | + color: rgba(0, 0, 0, 0.9); | ||
| 327 | + font-size: 32rpx; | ||
| 328 | + line-height: 48rpx; | ||
| 329 | + text-align: right; | ||
| 330 | + white-space: pre-wrap; | ||
| 331 | + word-break: break-all; | ||
| 332 | +} | ||
| 333 | + | ||
| 334 | + | ||
| 335 | +.footer { | ||
| 336 | + position: fixed; | ||
| 337 | + left: 0; | ||
| 338 | + right: 0; | ||
| 339 | + bottom: 0; | ||
| 340 | + padding: 0 32rpx 32rpx; | ||
| 341 | + padding-bottom: calc(32rpx + env(safe-area-inset-bottom)); | ||
| 342 | + background: #fff; | ||
| 343 | + box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06); | ||
| 344 | + z-index: 10; | ||
| 345 | + | ||
| 346 | + .btn { | ||
| 347 | + height: 80rpx; | ||
| 348 | + line-height: 80rpx; | ||
| 349 | + border-radius: 12rpx; | ||
| 350 | + font-size: 32rpx; | ||
| 351 | + } | ||
| 352 | + | ||
| 353 | + .submit { | ||
| 354 | + background: $theme-primary; | ||
| 355 | + color: #fff; | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + .view-total { | ||
| 359 | + padding: 20rpx 0; | ||
| 360 | + | ||
| 361 | + .head { | ||
| 362 | + font-size: 32rpx; | ||
| 363 | + font-weight: 600; | ||
| 364 | + line-height: 50rpx; | ||
| 365 | + color: rgba(0, 0, 0, 0.9); | ||
| 366 | + padding-bottom: 16rpx; | ||
| 367 | + margin-bottom: 24rpx; | ||
| 368 | + border-bottom: 1px dashed #E7E7E7; | ||
| 369 | + } | ||
| 370 | + | ||
| 371 | + .row { | ||
| 372 | + display: flex; | ||
| 373 | + margin-bottom: 24rpx; | ||
| 374 | + line-height: 32rpx; | ||
| 375 | + | ||
| 376 | + .row2 { | ||
| 377 | + width: 50%; | ||
| 378 | + } | ||
| 379 | + | ||
| 380 | + .label { | ||
| 381 | + width: 180rpx; | ||
| 382 | + margin-right: 14rpx; | ||
| 383 | + color: rgba(0, 0, 0, 0.6); | ||
| 384 | + font-size: 28rpx; | ||
| 385 | + } | ||
| 386 | + | ||
| 387 | + .value { | ||
| 388 | + flex: 1; | ||
| 389 | + color: rgba(0, 0, 0, 0.9); | ||
| 390 | + font-size: 28rpx; | ||
| 391 | + white-space: pre-wrap; | ||
| 392 | + word-break: break-all; | ||
| 393 | + } | ||
| 394 | + } | ||
| 395 | + } | ||
| 396 | +} | ||
| 397 | + | ||
| 398 | +.action-modal { | ||
| 399 | + width: 560rpx; | ||
| 400 | + padding: 32rpx 28rpx 20rpx; | ||
| 401 | + background: #fff; | ||
| 402 | + border-radius: 20rpx; | ||
| 403 | + | ||
| 404 | + &_header { | ||
| 405 | + text-align: center; | ||
| 406 | + font-size: 34rpx; | ||
| 407 | + font-weight: 600; | ||
| 408 | + margin-bottom: 12rpx; | ||
| 409 | + color: rgba(0, 0, 0, 0.9); | ||
| 410 | + } | ||
| 411 | + | ||
| 412 | + &_body { | ||
| 413 | + padding: 12rpx 4rpx 24rpx; | ||
| 414 | + | ||
| 415 | + .tip { | ||
| 416 | + display: block; | ||
| 417 | + text-align: center; | ||
| 418 | + font-size: 32rpx; | ||
| 419 | + color: rgba(0, 0, 0, 0.6); | ||
| 420 | + margin-bottom: 32rpx; | ||
| 421 | + } | ||
| 422 | + | ||
| 423 | + ::v-deep .uni-easyinput { | ||
| 424 | + width: 100%; | ||
| 425 | + } | ||
| 426 | + } | ||
| 427 | + | ||
| 428 | + &_footer { | ||
| 429 | + display: flex; | ||
| 430 | + justify-content: space-between; | ||
| 431 | + gap: 16rpx; | ||
| 432 | + | ||
| 433 | + .btn { | ||
| 434 | + flex: 1; | ||
| 435 | + height: 80rpx; | ||
| 436 | + line-height: 80rpx; | ||
| 437 | + border-radius: 12rpx; | ||
| 438 | + font-size: 30rpx; | ||
| 439 | + font-size: 32rpx; | ||
| 440 | + | ||
| 441 | + &::after { | ||
| 442 | + border: none; | ||
| 443 | + } | ||
| 444 | + } | ||
| 445 | + | ||
| 446 | + .cancel { | ||
| 447 | + background: $theme-primary !important; | ||
| 448 | + color: #fff !important; | ||
| 449 | + } | ||
| 450 | + | ||
| 451 | + .confirm { | ||
| 452 | + background: #fff !important; | ||
| 453 | + color: rgba(0, 0, 0, 0.9) !important; | ||
| 454 | + } | ||
| 455 | + } | ||
| 456 | +} | ||
| 457 | + | ||
| 458 | +</style> |
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | <!-- 新增&详情-产品 --> | 4 | <!-- 新增&详情-产品 --> |
| 5 | <view class="header bp"> | 5 | <view class="header bp"> |
| 6 | <image class="opCollapse" src="/static/images/title.png" /> | 6 | <image class="opCollapse" src="/static/images/title.png" /> |
| 7 | - <text class="title">{{ title || '产品' }}</text> | 7 | + <text class="title">{{ title || '发货单明细' }}</text> |
| 8 | <view class="ops"> | 8 | <view class="ops"> |
| 9 | <!-- <image v-if="mode === 'add'" class="opAdd" @click="onAdd" src="/static/images/plus.png" /> --> | 9 | <!-- <image v-if="mode === 'add'" class="opAdd" @click="onAdd" src="/static/images/plus.png" /> --> |
| 10 | <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse"> | 10 | <view v-if="mode === 'view'" class="op1" @click="toggleViewCollapse"> |
| @@ -15,6 +15,8 @@ | @@ -15,6 +15,8 @@ | ||
| 15 | </view> | 15 | </view> |
| 16 | </view> | 16 | </view> |
| 17 | 17 | ||
| 18 | + <view v-if="status === 'UN_SHIPMENTS' && $auth.hasPermi('shipping-plan-manage:invoice:modify') && items.length > 8" class="tip" >提醒:当前待处理明细超过 8 条,请尽快进行延期操作!</view> | ||
| 19 | + | ||
| 18 | <view v-if="mode === 'add'" class="section"> | 20 | <view v-if="mode === 'add'" class="section"> |
| 19 | <view v-for="(item, idx) in items" :key="'a-' + idx" class="block"> | 21 | <view v-for="(item, idx) in items" :key="'a-' + idx" class="block"> |
| 20 | <uni-list class="edit-list"> | 22 | <uni-list class="edit-list"> |
| @@ -82,6 +84,7 @@ | @@ -82,6 +84,7 @@ | ||
| 82 | </view> | 84 | </view> |
| 83 | </view> | 85 | </view> |
| 84 | 86 | ||
| 87 | + | ||
| 85 | <view v-else-if="mode === 'view'" class="view-list" v-show="!collapsedView"> | 88 | <view v-else-if="mode === 'view'" class="view-list" v-show="!collapsedView"> |
| 86 | <view v-for="(item, idx) in items" :key="'v-' + idx" class="card"> | 89 | <view v-for="(item, idx) in items" :key="'v-' + idx" class="card"> |
| 87 | <view class="row"><text class="label">订单编号</text><text class="value">{{ item.orderNo }}</text></view> | 90 | <view class="row"><text class="label">订单编号</text><text class="value">{{ item.orderNo }}</text></view> |
| @@ -133,7 +136,7 @@ | @@ -133,7 +136,7 @@ | ||
| 133 | <view class="row"><text class="label">回程费</text><text class="value">{{ item.contractType === 'PROCESS_STD_AGMT' ? item.shippingCost : '' }}</text></view> | 136 | <view class="row"><text class="label">回程费</text><text class="value">{{ item.contractType === 'PROCESS_STD_AGMT' ? item.shippingCost : '' }}</text></view> |
| 134 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> | 137 | <view class="row"><text class="label">牌号</text><text class="value">{{ item.brand }}</text></view> |
| 135 | <view class="row"><text class="label">高新</text><text class="value">-</text></view> | 138 | <view class="row"><text class="label">高新</text><text class="value">-</text></view> |
| 136 | - <view v-if="status === 'UN_SHIPMENTS' && $auth.hasPermi('shipping-plan-manage:invoice:modify') " class="row row-opt"> | 139 | + <view v-if="status === 'UN_SHIPMENTS' && $auth.hasPermi('shipping-plan-manage:invoice:modify')" class="row row-opt"> |
| 137 | <text class="row-opt_btn">申请延期</text> | 140 | <text class="row-opt_btn">申请延期</text> |
| 138 | <text class="line"></text> | 141 | <text class="line"></text> |
| 139 | <text class="row-opt_btn">拆分</text> | 142 | <text class="row-opt_btn">拆分</text> |
| @@ -141,6 +144,122 @@ | @@ -141,6 +144,122 @@ | ||
| 141 | </view> | 144 | </view> |
| 142 | </view> | 145 | </view> |
| 143 | 146 | ||
| 147 | + <view v-else-if="mode === 'fill'" class="section" v-show="!collapsedView"> | ||
| 148 | + <view v-for="(item, idx) in items" :key="'v-' + idx" class="block"> | ||
| 149 | + <uni-list class="edit-list"> | ||
| 150 | + <uni-list-item title="订单编号"> | ||
| 151 | + <template v-slot:footer> | ||
| 152 | + <view class="value">{{ item.orderNo }}</view> | ||
| 153 | + </template> | ||
| 154 | + </uni-list-item> | ||
| 155 | + <uni-list-item title="品名牌号"> | ||
| 156 | + <template v-slot:footer> | ||
| 157 | + <view class="value">{{ item.brand }}</view> | ||
| 158 | + </template> | ||
| 159 | + </uni-list-item> | ||
| 160 | + <uni-list-item title="规格(mm)"> | ||
| 161 | + <template v-slot:footer> | ||
| 162 | + <view class="value value-spec"> | ||
| 163 | + <view v-if="item.thickness" class="value-spec_val">{{ item.thickness }}</view> | ||
| 164 | + <view v-if="item.thickness" class="value-spec_box"> | ||
| 165 | + <view v-if="item.thicknessTolPos" class="value-spec_box_1">{{ item.thicknessTolPos > 0 ? '+' + item.thicknessTolPos : item.thicknessTolPos }} | ||
| 166 | + </view> | ||
| 167 | + <view v-if="item.thicknessTolNeg" class="value-spec_box_2">{{ item.thicknessTolNeg > 0 ? '+' + item.thicknessTolNeg : item.thicknessTolNeg }} | ||
| 168 | + </view> | ||
| 169 | + </view> | ||
| 170 | + <view v-if="item.width" class="value-spec_val p12">*</view> | ||
| 171 | + <view v-if="item.width" class="value-spec_val">{{ item.width }}</view> | ||
| 172 | + <view v-if="item.width" class="value-spec_box"> | ||
| 173 | + <view v-if="item.widthTolPos" class="value-spec_box_1">{{ item.widthTolPos > 0 ? '+' + item.widthTolPos : item.widthTolPos }} | ||
| 174 | + </view> | ||
| 175 | + <view v-if="item.widthTolNeg" class="value-spec_box_2">{{ item.widthTolNeg > 0 ? '+' + item.widthTolNeg : item.widthTolNeg }} | ||
| 176 | + </view> | ||
| 177 | + </view> | ||
| 178 | + <view v-if="item.length" class="value-spec_val p12">*</view> | ||
| 179 | + <view v-if="item.length" class="value-spec_val">{{ item.length }}</view> | ||
| 180 | + <view v-if="item.length" class="value-spec_box"> | ||
| 181 | + <view v-if="item.lengthTolPos" class="value-spec_box_1">{{ item.lengthTolPos > 0 ? '+' + item.lengthTolPos : item.lengthTolPos }}</view> | ||
| 182 | + <view v-if="item.lengthTolNeg" class="value-spec_box_2">{{ item.lengthTolNeg > 0 ? '+' + item.lengthTolNeg : item.lengthTolNeg }}</view> | ||
| 183 | + </view> | ||
| 184 | + </view> | ||
| 185 | + </template> | ||
| 186 | + </uni-list-item> | ||
| 187 | + | ||
| 188 | + <view v-show="!item.collapsed"> | ||
| 189 | + <uni-list-item title="需发数量(kg)"> | ||
| 190 | + <template v-slot:footer> | ||
| 191 | + <view class="value">{{ item.quantity }}</view> | ||
| 192 | + </template> | ||
| 193 | + </uni-list-item> | ||
| 194 | + <uni-list-item title="实发数量(kg)"> | ||
| 195 | + <template v-slot:footer> | ||
| 196 | + <uni-easyinput type="digit" v-model="item.actualShipmentQuantity" | ||
| 197 | + placeholder="请输入实发数量kg" :inputBorder="false" | ||
| 198 | + @input="onNonNegativeNumberInput($event, item, idx, 'actualShipmentQuantity')" | ||
| 199 | + @blur="onNonNegativeNumberBlur(item, idx, 'actualShipmentQuantity')" /> | ||
| 200 | + </template> | ||
| 201 | + </uni-list-item> | ||
| 202 | + <uni-list-item title="件数"> | ||
| 203 | + <template v-slot:footer> | ||
| 204 | + <uni-easyinput type="digit" v-model="item.num" | ||
| 205 | + placeholder="请输入件数" :inputBorder="false" | ||
| 206 | + @input="onNonNegativeNumberInput($event, item, idx, 'num')" | ||
| 207 | + @blur="onNonNegativeNumberBlur(item, idx, 'num')" /> | ||
| 208 | + </template> | ||
| 209 | + </uni-list-item> | ||
| 210 | + <uni-list-item title="单价(元/kg)"> | ||
| 211 | + <template v-slot:footer> | ||
| 212 | + <view class="value">{{ item.salesPrice }}</view> | ||
| 213 | + </template> | ||
| 214 | + </uni-list-item> | ||
| 215 | + <uni-list-item title="包装费(元/kg)"> | ||
| 216 | + <template v-slot:footer> | ||
| 217 | + <view class="value">{{ item.packagingFee }}</view> | ||
| 218 | + </template> | ||
| 219 | + </uni-list-item> | ||
| 220 | + <uni-list-item title="生产批号"> | ||
| 221 | + <template v-slot:footer> | ||
| 222 | + <uni-easyinput v-model="item.yieldBatchNo" placeholder="请输入生产批号" :inputBorder="false" /> | ||
| 223 | + </template> | ||
| 224 | + </uni-list-item> | ||
| 225 | + <uni-list-item title="加工经销"> | ||
| 226 | + <template v-slot:footer> | ||
| 227 | + <view class="value">{{ item.orderType }}</view> | ||
| 228 | + </template> | ||
| 229 | + </uni-list-item> | ||
| 230 | + <uni-list-item title="运费"> | ||
| 231 | + <template v-slot:footer> | ||
| 232 | + <view class="value">{{ item.contractType !== 'PROCESS_STD_AGMT' ? item.shippingCost : '' }}</view> | ||
| 233 | + </template> | ||
| 234 | + </uni-list-item> | ||
| 235 | + <uni-list-item title="回程费"> | ||
| 236 | + <template v-slot:footer> | ||
| 237 | + <view class="value">{{ item.contractType === 'PROCESS_STD_AGMT' ? item.shippingCost : '' }}</view> | ||
| 238 | + </template> | ||
| 239 | + </uni-list-item> | ||
| 240 | + <uni-list-item title="牌号"> | ||
| 241 | + <template v-slot:footer> | ||
| 242 | + <view class="value">{{ item.brand }}</view> | ||
| 243 | + </template> | ||
| 244 | + </uni-list-item> | ||
| 245 | + <uni-list-item title="高新"> | ||
| 246 | + <template v-slot:footer> | ||
| 247 | + <view class="value">-</view> | ||
| 248 | + </template> | ||
| 249 | + </uni-list-item> | ||
| 250 | + </view> | ||
| 251 | + </uni-list> | ||
| 252 | + <view class="block-ops"> | ||
| 253 | + <div class="toggle" @click="toggleItem(idx)"> | ||
| 254 | + <image :src="item.collapsed ? '/static/images/up.png' : '/static/images/down.png'" | ||
| 255 | + class="icon" /> | ||
| 256 | + {{ item.collapsed ? '展开' : '收起' }} | ||
| 257 | + </div> | ||
| 258 | + </view> | ||
| 259 | + | ||
| 260 | + </view> | ||
| 261 | + </view> | ||
| 262 | + | ||
| 144 | </view> | 263 | </view> |
| 145 | </template> | 264 | </template> |
| 146 | <script> | 265 | <script> |
| @@ -427,7 +546,7 @@ export default { | @@ -427,7 +546,7 @@ export default { | ||
| 427 | line-height: 48rpx; | 546 | line-height: 48rpx; |
| 428 | font-size: 32rpx; | 547 | font-size: 32rpx; |
| 429 | position: relative; | 548 | position: relative; |
| 430 | - width: 210rpx; | 549 | + width: 200rpx; |
| 431 | margin-right: 32rpx; | 550 | margin-right: 32rpx; |
| 432 | color: rgba(0, 0, 0, 0.9); | 551 | color: rgba(0, 0, 0, 0.9); |
| 433 | padding-right: 0; | 552 | padding-right: 0; |
| @@ -563,7 +682,7 @@ export default { | @@ -563,7 +682,7 @@ export default { | ||
| 563 | } | 682 | } |
| 564 | 683 | ||
| 565 | .label { | 684 | .label { |
| 566 | - width: 210rpx; | 685 | + width: 200rpx; |
| 567 | margin-right: 32rpx; | 686 | margin-right: 32rpx; |
| 568 | color: rgba(0, 0, 0, 0.9); | 687 | color: rgba(0, 0, 0, 0.9); |
| 569 | font-size: 32rpx; | 688 | font-size: 32rpx; |
| @@ -793,4 +912,12 @@ export default { | @@ -793,4 +912,12 @@ export default { | ||
| 793 | } | 912 | } |
| 794 | } | 913 | } |
| 795 | } | 914 | } |
| 915 | + | ||
| 916 | +.tip { | ||
| 917 | + font-size: 24rpx; | ||
| 918 | + line-height: 60rpx; | ||
| 919 | + background: #fffbe6; | ||
| 920 | + color: #ad6800; | ||
| 921 | + text-align: center; | ||
| 922 | +} | ||
| 796 | </style> | 923 | </style> |