|
@ -19,11 +19,15 @@ |
|
|
<view class="label">包装号</view> |
|
|
<view class="label">包装号</view> |
|
|
<view class="value">{{ item.packageCode }}</view> |
|
|
<view class="value">{{ item.packageCode }}</view> |
|
|
</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="label">父包装号</view> |
|
|
<view class="value">{{item.parentNumber}}</view> |
|
|
<view class="value">{{item.parentNumber}}</view> |
|
|
</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="label">ASN</view> |
|
|
<view class="value">{{item.asnNumber}}</view> |
|
|
<view class="value">{{item.asnNumber}}</view> |
|
|
</view> |
|
|
</view> |
|
@ -44,7 +48,7 @@ |
|
|
<view class="label">物料类型</view> |
|
|
<view class="label">物料类型</view> |
|
|
<view class="value">{{item.itemType}}</view> |
|
|
<view class="value">{{item.itemType}}</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="left-item"> |
|
|
<view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)"> |
|
|
<view class="label">供应商</view> |
|
|
<view class="label">供应商</view> |
|
|
<view class="value">{{item.supplierCode}}</view> |
|
|
<view class="value">{{item.supplierCode}}</view> |
|
|
</view> |
|
|
</view> |
|
@ -114,7 +118,8 @@ |
|
|
readFile(htmlFileUrl, (htmlContent) => { |
|
|
readFile(htmlFileUrl, (htmlContent) => { |
|
|
newHtmlContent.value = htmlContent |
|
|
newHtmlContent.value = htmlContent |
|
|
data.value.forEach((item) => { |
|
|
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"> |
|
|
<div class="left-item"> |
|
|
<div class="left-item"> |
|
|
<div class="label">物品代码</div> |
|
|
<div class="label">物品代码</div> |
|
@ -132,6 +137,16 @@ |
|
|
<div class="label">包装号</div> |
|
|
<div class="label">包装号</div> |
|
|
<div class="value">${item.packageCode}</div> |
|
|
<div class="value">${item.packageCode}</div> |
|
|
</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="left-item"> |
|
|
<div class="label">父包装号</div> |
|
|
<div class="label">父包装号</div> |
|
|
<div class="value">${item.parentNumber}</div> |
|
|
<div class="value">${item.parentNumber}</div> |
|
@ -140,6 +155,9 @@ |
|
|
<div class="label">ASN</div> |
|
|
<div class="label">ASN</div> |
|
|
<div class="value">${item.asnNumber}</div> |
|
|
<div class="value">${item.asnNumber}</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
` |
|
|
|
|
|
} |
|
|
|
|
|
str += ` |
|
|
<div class="left-item"> |
|
|
<div class="left-item"> |
|
|
<div class="label">数量</div> |
|
|
<div class="label">数量</div> |
|
|
<div class="value bold-font">${item.qty}</div> |
|
|
<div class="value bold-font">${item.qty}</div> |
|
@ -157,16 +175,23 @@ |
|
|
<div class="label">物料类型</div> |
|
|
<div class="label">物料类型</div> |
|
|
<div class="value">${item.itemType}</div> |
|
|
<div class="value">${item.itemType}</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
` |
|
|
|
|
|
if (!(item.productionLineCode && item.productionLineCode.length > 0)) { |
|
|
|
|
|
str += ` |
|
|
<div class="left-item"> |
|
|
<div class="left-item"> |
|
|
<div class="label">供应商</div> |
|
|
<div class="label">供应商</div> |
|
|
<div class="value">${item.supplierCode}</div> |
|
|
<div class="value">${item.supplierCode}</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
` |
|
|
|
|
|
} |
|
|
|
|
|
str += ` |
|
|
<div class="left-item"> |
|
|
<div class="left-item"> |
|
|
<div class="label">打印时间</div> |
|
|
<div class="label">打印时间</div> |
|
|
<div class="value">${item.printTimes}</div> |
|
|
<div class="value">${item.printTimes}</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div>` |
|
|
</div> |
|
|
|
|
|
` |
|
|
}) |
|
|
}) |
|
|
newHtmlContent.value = newHtmlContent.value.replace('mainBody', str) // 替换物品代码 |
|
|
newHtmlContent.value = newHtmlContent.value.replace('mainBody', str) // 替换物品代码 |
|
|
}) |
|
|
}) |
|
@ -258,10 +283,12 @@ |
|
|
.left-item { |
|
|
.left-item { |
|
|
display: flex; |
|
|
display: flex; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.bold-font { |
|
|
.bold-font { |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
font-size: 28rpx; |
|
|
font-size: 28rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.label { |
|
|
.label { |
|
|
border-bottom: 1px solid #b1b1b1; |
|
|
border-bottom: 1px solid #b1b1b1; |
|
|
border-right: 1px solid #b1b1b1; |
|
|
border-right: 1px solid #b1b1b1; |
|
|