|
@@ -10,50 +10,25 @@
|
|
|
append-to-body
|
|
append-to-body
|
|
|
@close="handleClose"
|
|
@close="handleClose"
|
|
|
>
|
|
>
|
|
|
- <div v-loading="loading" class="db-qrcode-body pound-slip-capture-inline">
|
|
|
|
|
- <template v-if="captureRow">
|
|
|
|
|
- <div class="capture-card">
|
|
|
|
|
- <div class="capture-row capture-row-plate">
|
|
|
|
|
- <div class="vehicle-plate">
|
|
|
|
|
- <span class="vehicle-plate-dot vehicle-plate-dot-lt"></span>
|
|
|
|
|
- <span class="vehicle-plate-dot vehicle-plate-dot-lb"></span>
|
|
|
|
|
- <span class="vehicle-plate-text">{{ captureRow.vehicleNo }}</span>
|
|
|
|
|
- <span class="vehicle-plate-dot vehicle-plate-dot-rt"></span>
|
|
|
|
|
- <span class="vehicle-plate-dot vehicle-plate-dot-rb"></span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="capture-row capture-row-large">
|
|
|
|
|
- <span class="label">往来单位:</span>
|
|
|
|
|
- <span class="value">{{ captureRow.partnerCompany }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="capture-row capture-row-large">
|
|
|
|
|
- <span class="label">物料名称:</span>
|
|
|
|
|
- <span class="value">
|
|
|
|
|
- {{ formatQrcodeProductLabel(captureRow) }}({{ captureRow.quantity }} {{ quantityUnitLabel }})
|
|
|
|
|
- </span>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-if="captureRow.remarks" class="capture-row">
|
|
|
|
|
- <span class="label">备注:</span>
|
|
|
|
|
- <span class="value">{{ captureRow.remarks }}</span>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="capture-card capture-qrcode">
|
|
|
|
|
- <div class="capture-id">
|
|
|
|
|
- {{ captureRow.date }}
|
|
|
|
|
- {{ captureRow.businessType === '出库' ? '出库单ID:' : '入库单ID:' }}{{ captureRow.id }}
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="capture-qr-wrap">
|
|
|
|
|
- <img v-if="captureQrObjectUrl" :src="captureQrObjectUrl" alt="二维码" class="capture-qr-img" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="capture-desc">出入库单标识(扫码核验)</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <div v-loading="loading" class="db-qrcode-body">
|
|
|
|
|
+ <PoundSlipQrcodeView
|
|
|
|
|
+ v-if="captureRow && captureQrObjectUrl"
|
|
|
|
|
+ :vehicle-no="captureRow.vehicleNo"
|
|
|
|
|
+ :partner-company="captureRow.partnerCompany"
|
|
|
|
|
+ :product-line="formatProductLine(captureRow)"
|
|
|
|
|
+ :remarks="captureRow.remarks || ''"
|
|
|
|
|
+ :date-text="captureRow.date"
|
|
|
|
|
+ :business-type="captureRow.businessType"
|
|
|
|
|
+ :inventory-id="captureRow.id"
|
|
|
|
|
+ :qr-object-url="captureQrObjectUrl"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { inventoryApi, type InventoryRecord } from '@/api/db/inventory'
|
|
import { inventoryApi, type InventoryRecord } from '@/api/db/inventory'
|
|
|
|
|
+import PoundSlipQrcodeView from '@/components/business/db/PoundSlipQrcodeView.vue'
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
visible: boolean
|
|
visible: boolean
|
|
@@ -92,6 +67,10 @@ function formatQrcodeProductLabel(row: InventoryRecord) {
|
|
|
return `${product} ${specification}`
|
|
return `${product} ${specification}`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function formatProductLine(row: InventoryRecord) {
|
|
|
|
|
+ return `${formatQrcodeProductLabel(row)}(${row.quantity} ${quantityUnitLabel.value})`
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function getQrImageUrl(inventoryId: string) {
|
|
function getQrImageUrl(inventoryId: string) {
|
|
|
return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(inventoryId)}`
|
|
return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(inventoryId)}`
|
|
|
}
|
|
}
|