|
|
@ -19,11 +19,15 @@ |
|
|
|
<view class="label">包装号</view> |
|
|
|
<view class="value">{{ item.packageCode }}</view> |
|
|
|
</view> |
|
|
|
<view class="left-item"> |
|
|
|
<view class="left-item" v-if="item.productionLineCode&&item.productionLineCode.length>0"> |
|
|
|
<view class="label">生产线</view> |
|
|
|
<view class="value">{{item.productionLineCode}}</view> |
|
|
|
</view> |
|
|
|
<view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)"> |
|
|
|
<view class="label">父包装号</view> |
|
|
|
<view class="value">{{item.parentNumber}}</view> |
|
|
|
</view> |
|
|
|
<view class="left-item"> |
|
|
|
<view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)"> |
|
|
|
<view class="label">ASN</view> |
|
|
|
<view class="value">{{item.asnNumber}}</view> |
|
|
|
</view> |
|
|
@ -44,7 +48,7 @@ |
|
|
|
<view class="label">物料类型</view> |
|
|
|
<view class="value">{{item.itemType}}</view> |
|
|
|
</view> |
|
|
|
<view class="left-item"> |
|
|
|
<view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)"> |
|
|
|
<view class="label">供应商</view> |
|
|
|
<view class="value">{{item.supplierCode}}</view> |
|
|
|
</view> |
|
|
@ -74,7 +78,7 @@ |
|
|
|
const data = ref([]) |
|
|
|
const newHtmlContent = ref('') // 打印传入的html |
|
|
|
const isLoadFinish = ref(false) |
|
|
|
const qrcodeRef =ref() |
|
|
|
const qrcodeRef = ref() |
|
|
|
// #ifdef APP |
|
|
|
// 打印 |
|
|
|
const printImage = () => { |
|
|
@ -114,7 +118,8 @@ |
|
|
|
readFile(htmlFileUrl, (htmlContent) => { |
|
|
|
newHtmlContent.value = htmlContent |
|
|
|
data.value.forEach((item) => { |
|
|
|
str += `<div class="box" style="page-break-before:always;"><br /> |
|
|
|
str += ` |
|
|
|
<div class="box" style="page-break-before:always;"><br /> |
|
|
|
<div class="left"> |
|
|
|
<div class="left-item"> |
|
|
|
<div class="label">物品代码</div> |
|
|
@ -132,6 +137,16 @@ |
|
|
|
<div class="label">包装号</div> |
|
|
|
<div class="value">${item.packageCode}</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
if (item.productionLineCode && item.productionLineCode.length > 0) { |
|
|
|
str += ` |
|
|
|
<div class="left-item"> |
|
|
|
<div class="label">生产线</div> |
|
|
|
<div class="value">${item.productionLineCode}</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
} else { |
|
|
|
str += ` |
|
|
|
<div class="left-item"> |
|
|
|
<div class="label">父包装号</div> |
|
|
|
<div class="value">${item.parentNumber}</div> |
|
|
@ -140,6 +155,9 @@ |
|
|
|
<div class="label">ASN</div> |
|
|
|
<div class="value">${item.asnNumber}</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
} |
|
|
|
str += ` |
|
|
|
<div class="left-item"> |
|
|
|
<div class="label">数量</div> |
|
|
|
<div class="value bold-font">${item.qty}</div> |
|
|
@ -157,16 +175,23 @@ |
|
|
|
<div class="label">物料类型</div> |
|
|
|
<div class="value">${item.itemType}</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
if (!(item.productionLineCode && item.productionLineCode.length > 0)) { |
|
|
|
str += ` |
|
|
|
<div class="left-item"> |
|
|
|
<div class="label">供应商</div> |
|
|
|
<div class="value">${item.supplierCode}</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
} |
|
|
|
str += ` |
|
|
|
<div class="left-item"> |
|
|
|
<div class="label">打印时间</div> |
|
|
|
<div class="value">${item.printTimes}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div>` |
|
|
|
</div> |
|
|
|
` |
|
|
|
}) |
|
|
|
newHtmlContent.value = newHtmlContent.value.replace('mainBody', str) // 替换物品代码 |
|
|
|
}) |
|
|
@ -258,10 +283,12 @@ |
|
|
|
.left-item { |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
.bold-font{ |
|
|
|
|
|
|
|
.bold-font { |
|
|
|
font-weight: bold; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.label { |
|
|
|
border-bottom: 1px solid #b1b1b1; |
|
|
|
border-right: 1px solid #b1b1b1; |
|
|
|