Browse Source

HL-5869翻包标签模板字号加大加粗

hella_online_20240906
wangyufei 3 months ago
parent
commit
42fd347bcc
  1. 15
      src/hybrid/html/point.html
  2. 70
      src/pages/point/index.vue

15
src/hybrid/html/point.html

@ -30,9 +30,19 @@
.left-item { .left-item {
display: flex; display: flex;
} }
.bold-font{
.bold-font {
font-weight: bold;
}
.font-30 {
font-size: 30px;
}
.font-20 {
font-size: 20px;
}
.bold-label {
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 15px;
} }
.label { .label {
@ -54,6 +64,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
word-break: break-all; word-break: break-all;
justify-content: center;
} }
.right { .right {

70
src/pages/point/index.vue

@ -4,8 +4,8 @@
<view class="box" v-for="(item,index) in data" :key='index' style="margin-bottom: 20rpx;"> <view class="box" v-for="(item,index) in data" :key='index' style="margin-bottom: 20rpx;">
<view class="left"> <view class="left">
<view class="left-item"> <view class="left-item">
<view class="label">物品代码</view> <view class="label bold-label">物品代码</view>
<view class="value bold-font" id="name1">{{item.itemCode}}</view> <view class="value bold-font font-20" id="name1">{{item.itemCode}}</view>
</view> </view>
<view class="left-item"> <view class="left-item">
<view class="label">物品名称</view> <view class="label">物品名称</view>
@ -24,16 +24,16 @@
<view class="value">{{item.productionLineCode}}</view> <view class="value">{{item.productionLineCode}}</view>
</view> </view>
<view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)"> <view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)">
<view class="label">父包装号</view> <view class="label bold-label">父包装号</view>
<view class="value">{{item.parentNumber}}</view> <view class="value bold-font font-20">{{item.parentNumber}}</view>
</view> </view>
<view class="left-item" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)"> <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>
<view class="left-item"> <view class="left-item">
<view class="label">数量</view> <view class="label bold-label">数量</view>
<view class="value bold-font">{{item.qty}}</view> <view class="value bold-font font-20">{{item.qty}}</view>
</view> </view>
</view> </view>
@ -121,44 +121,44 @@
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 bold-label">物品代码</div>
<div class="value bold-font" id="name1">${item.itemCode}</div> <div class="value bold-font font-30" id="name1">${item.itemCode}</div>
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">物品名称</div> <div class="label">物品名称</div>
<div class="value" id="name2">${item.itemName}</div> <div class="value font-30" id="name2">${item.itemName}</div>
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">包装名称</div> <div class="label">包装名称</div>
<div class="value">${item.packName}</div> <div class="value font-20">${item.packName}</div>
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">包装号</div> <div class="label">包装号</div>
<div class="value">${item.packageCode}</div> <div class="value font-20">${item.packageCode}</div>
</div>` </div>`
if (item.productionLineCode && item.productionLineCode.length > 0) { if (item.productionLineCode && item.productionLineCode.length > 0) {
str += ` str += `
<div class="left-item"> <div class="left-item">
<div class="label">生产线</div> <div class="label">生产线</div>
<div class="value">${item.productionLineCode}</div> <div class="value font-20">${item.productionLineCode}</div>
</div> </div>
` `
} else { } else {
str += ` str += `
<div class="left-item"> <div class="left-item">
<div class="label">父包装号</div> <div class="label bold-label">父包装号</div>
<div class="value">${item.parentNumber}</div> <div class="value bold-font font-20">${item.parentNumber}</div>
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">ASN</div> <div class="label">ASN</div>
<div class="value">${item.asnNumber}</div> <div class="value font-20">${item.asnNumber}</div>
</div> </div>
` `
} }
str += ` 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 font-30">${item.qty}</div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -167,17 +167,17 @@
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">批次</div> <div class="label">批次</div>
<div class="value">${item.batch}</div> <div class="value font-20">${item.batch}</div>
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">物料类型</div> <div class="label">物料类型</div>
<div class="value">${item.itemType}</div> <div class="value font-20">${item.itemType}</div>
</div>` </div>`
if (!(item.productionLineCode && item.productionLineCode.length > 0)) { if (!(item.productionLineCode && item.productionLineCode.length > 0)) {
str += ` 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 font-20">${item.supplierCode}</div>
</div> </div>
` `
} }
@ -185,7 +185,7 @@
<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 font-20">${item.printTimes}</div>
</div> </div>
</div> </div>
</div>` </div>`
@ -240,6 +240,25 @@
this.originData = JSON.parse(option.points); this.originData = JSON.parse(option.points);
} }
this.data = this.originData this.data = this.originData
// this.data = [
// {
// "itemCode": "250.832-02",
// "itemName": "线1ZH",
// "packName": "",
// "packageCode": "PN20240906-0000000001",
// "batch": "20240719",
// "parentNumber": null,
// "itemType": "",
// "asnNumber": "ASNS20240731-0002",
// "supplierCode": "49000599",
// "qty": 90,
// "printTimes": "2024-09-06+09:29:37",
// "productionLineCode": null,
// "barcodeString": "HPQ;V1.0;B20240719;AASNS20240731-0002;Q90.000000;I250.832-02;L;PPN20240906-0000000001;S49000599;O49000599;L12;E;UPC;",
// "barcodeBase64": ""
// }
// ]
}, },
} }
</script> </script>
@ -272,9 +291,18 @@
.bold-font { .bold-font {
font-weight: bold; font-weight: bold;
font-size: 28rpx; }
.font-30 {
font-size: 30px;
}
.font-20 {
font-size: 20px;
} }
.bold-label {
font-weight: bold;
/* font-size: 15px; */
}
.value { .value {
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;

Loading…
Cancel
Save