优化
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
<template><view class="work-card"><text>本地合箱接口验收</text><textarea aria-label="验收请求 JSON" v-model="request" style="height:160px;width:100%;border:1px solid #aaa"/><button @tap="run">执行 PDA 验收请求</button><text id="acceptance-result" style="white-space:pre-wrap;user-select:text">{{ result }}</text></view></template>
|
||||
<script>
|
||||
import { overseasRequest } from '@/api/overseas.js'
|
||||
export default {data(){return {request:'',result:''}},methods:{async run(){this.result='执行中';try{const input=JSON.parse(this.request);const results=[];for(const item of Array.isArray(input)?input:[input])results.push(await overseasRequest(item.method||'GET',item.path,item.data));this.result=JSON.stringify(results,null,2)}catch(e){this.result=JSON.stringify({error:e.message,code:e.code},null,2)}}}}
|
||||
</script>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<text class="business-code">{{ box.cartonMark }} · {{ box.participation === 'FULL' ? '整箱' : box.participation === 'PARTIAL' ? '部分' : '计划来源' }}</text>
|
||||
<text class="meta-line">来源退货单:{{ box.sourceReturnNo || '—' }}</text>
|
||||
<text v-for="item in box.items || []" :key="item.skuCode" class="meta-line">{{ item.skuCode }} · {{ item.quantity }} 件</text>
|
||||
<text v-for="item in box.originalItems || []" :key="'original-' + item.skuCode" class="meta-line">{{ item.skuCode }} · 原有 {{ item.quantity }} 件 · 计划后剩余 {{ target?.cartonMark === box.cartonMark ? item.quantity : Math.max(0, item.quantity - (box.items || []).filter(row => row.skuCode === item.skuCode).reduce((sum, row) => sum + row.quantity, 0)) }} 件</text>
|
||||
<text v-for="item in box.originalItems || []" :key="'original-' + item.skuCode" class="meta-line">{{ item.skuCode }} · 原有 {{ item.quantity }} 件 · 计划后剩余 {{ target?.cartonMark === box.cartonMark ? item.quantity : Math.max(0, item.quantity - (box.items || []).filter(row => row.skuCode === item.skuCode).reduce((sum, row) => sum + Number(row.quantity), 0)) }} 件</text>
|
||||
<text class="hint">{{ target?.cartonMark === box.cartonMark ? '目标箱 · 保留原有库存' : sources.some(source => source.cartonMark === box.cartonMark) ? '已扫描确认' : '待扫描' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<view v-if="user" class="page-shell portal-page work-page">
|
||||
<PortalHeader title="退货入库" :user="user" fallback-url="/pages/module/module?key=inbound" />
|
||||
<scroll-view class="work-scroll" scroll-y><view class="portal-content work-content">
|
||||
<LocalPackingAcceptance />
|
||||
<view v-if="!current && !result && !receiptBatch" class="work-card">
|
||||
<text class="card-title">扫描 SKU 69 码</text>
|
||||
<ScanTargetInput name="lookup" v-model="lookupCode" label="SKU 69 码" placeholder="扫描商品 69 码,自动带出退货单号" :active="activeTarget === 'lookup'" @activate="activeTarget = 'lookup'" @submit="lookup" />
|
||||
@@ -63,7 +62,6 @@
|
||||
|
||||
<script>
|
||||
import PortalHeader from '@/components/PortalHeader.vue'
|
||||
import LocalPackingAcceptance from '@/components/LocalPackingAcceptance.vue'
|
||||
import ScanTargetInput from '@/components/ScanTargetInput.vue'
|
||||
import { checkReturnPallet, confirmReturnReceipt, createReturnPallet, downloadReturnPalletPhoto, findReturnSkuCandidates, manuallyCompleteReturnReceipt, startReturnReceipt, uploadReturnPalletPhoto } from '@/api/return-receipt.js'
|
||||
import { session, requireSession } from '@/stores/session.js'
|
||||
@@ -72,7 +70,7 @@
|
||||
import { playErrorSound, playSuccessSound } from '@/utils/audio-feedback.js'
|
||||
|
||||
export default {
|
||||
components: { PortalHeader, ScanTargetInput, LocalPackingAcceptance },
|
||||
components: { PortalHeader, ScanTargetInput },
|
||||
data() { return { user: session.currentUser, current: null, candidates: null, result: null, selectedSku: '', palletCheck: null, newPalletHtml: '', unitType: 'PALLET', unitCode: '', boxRows: [{ items: {}, length: '', width: '', height: '', weight: '', originalPackaging: true, confirmed: false }], palletLength: '', palletWidth: '', palletHeight: '', palletWeight: '', unitOptions: [{ value: 'PALLET', label: '托盘' }, { value: 'BOX', label: '箱子' }, { value: 'PARCEL', label: '包裹' }], photoFileIds: [], photoNames: [], photoUrls: {}, activeTarget: 'lookup', busy: false, error: null } },
|
||||
computed: {
|
||||
receiptBatch() { return warehouseWork.returnReceipt.pendingBatch },
|
||||
|
||||
Reference in New Issue
Block a user