Browse Source

打印:制造件标签2024/7/1 14:18:25

hella_vue3
zhang_li 3 months ago
parent
commit
4a414161a8
  1. 1
      src/pages/package/job/overPackageJobDetail.vue
  2. 1
      src/pages/package/record/overPackageRecord.vue
  3. 189
      src/pages/point/index.vue
  4. 5
      src/pages/repleinsh/record/directRepleinshRecord.vue

1
src/pages/package/job/overPackageJobDetail.vue

@ -241,6 +241,7 @@ const submitJob = () => {
supplierCode: item.supplierCode, // supplierCode: item.supplierCode, //
qty: item.qty, // qty: item.qty, //
printTimes: getCurrDateTime(), // printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, // 线
barcodeString: item.barcodeString, // barcodeString: item.barcodeString, //
barcodeBase64: '' barcodeBase64: ''
}) })

1
src/pages/package/record/overPackageRecord.vue

@ -310,6 +310,7 @@ const submitJob = () => {
supplierCode: item.supplierCode, // supplierCode: item.supplierCode, //
qty: item.qty, // qty: item.qty, //
printTimes: getCurrDateTime(), // printTimes: getCurrDateTime(), //
productionLineCode: item.productionLineCode, // 线
barcodeString: item.barcodeString, // barcodeString: item.barcodeString, //
barcodeBase64: '' barcodeBase64: ''
}) })

189
src/pages/point/index.vue

@ -19,39 +19,43 @@
<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" 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" v-if="!(item.productionLineCode&&item.productionLineCode.length>0)">
<view class="label">ASN</view>
<view class="value">{{item.asnNumber}}</view>
</view>
<view class="left-item"> <view class="left-item">
<view class="label">父包装号</view> <view class="label">数量</view>
<view class="value">{{item.parentNumber}}</view> <view class="value bold-font">{{item.qty}}</view>
</view> </view>
<view class="left-item">
<view class="label">ASN</view>
<view class="value">{{item.asnNumber}}</view>
</view>
<view class="left-item">
<view class="label">数量</view>
<view class="value bold-font">{{item.qty}}</view>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="image"> <view class="image">
<l-qrcode ref="qrcodeRef" :value="item.barcodeString" size="300rpx"></l-qrcode> <l-qrcode ref="qrcodeRef" :value="item.barcodeString" size="300rpx"></l-qrcode>
</view> </view>
<view class="left-item"> <view class="left-item">
<view class="label">批次</view> <view class="label">批次</view>
<view class="value">{{item.batch}}</view> <view class="value">{{item.batch}}</view>
</view> </view>
<view class="left-item"> <view class="left-item">
<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>
<view class="left-item"> <view class="left-item">
<view class="label">打印时间</view> <view class="label">打印时间</view>
<view class="value">{{item.printTimes}}</view> <view class="value">{{item.printTimes}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="" style="position: fixed; width: 100%; bottom: 0rpx; left: 0px"> <view class="" style="position: fixed; width: 100%; bottom: 0rpx; left: 0px">
@ -74,7 +78,7 @@
const data = ref([]) const data = ref([])
const newHtmlContent = ref('') // html const newHtmlContent = ref('') // html
const isLoadFinish = ref(false) const isLoadFinish = ref(false)
const qrcodeRef =ref() const qrcodeRef = ref()
// #ifdef APP // #ifdef APP
// //
const printImage = () => { const printImage = () => {
@ -114,59 +118,80 @@
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="left"> <div class="box" style="page-break-before:always;"><br />
<div class="left-item"> <div class="left">
<div class="label">物品代码</div> <div class="left-item">
<div class="value bold-font" id="name1">${item.itemCode}</div> <div class="label">物品代码</div>
</div> <div class="value bold-font" id="name1">${item.itemCode}</div>
<div class="left-item"> </div>
<div class="label">物品名称</div> <div class="left-item">
<div class="value" id="name2">${item.itemName}</div> <div class="label">物品名称</div>
</div> <div class="value" id="name2">${item.itemName}</div>
<div class="left-item"> </div>
<div class="label">包装名称</div> <div class="left-item">
<div class="value">${item.packName}</div> <div class="label">包装名称</div>
</div> <div class="value">${item.packName}</div>
<div class="left-item"> </div>
<div class="label">包装号</div> <div class="left-item">
<div class="value">${item.packageCode}</div> <div class="label">包装号</div>
</div> <div class="value">${item.packageCode}</div>
<div class="left-item"> </div>
<div class="label">父包装号</div> `
<div class="value">${item.parentNumber}</div> if (item.productionLineCode && item.productionLineCode.length > 0) {
</div> str += `
<div class="left-item"> <div class="left-item">
<div class="label">ASN</div> <div class="label">生产线</div>
<div class="value">${item.asnNumber}</div> <div class="value">${item.productionLineCode}</div>
</div> </div>
<div class="left-item"> `
<div class="label">数量</div> } else {
<div class="value bold-font">${item.qty}</div> str += `
</div> <div class="left-item">
</div> <div class="label">父包装号</div>
<div class="right"> <div class="value">${item.parentNumber}</div>
<div class="image"> </div>
<img id='image1' src="${item.barcodeBase64}" alt="" /> <div class="left-item">
</div> <div class="label">ASN</div>
<div class="left-item"> <div class="value">${item.asnNumber}</div>
<div class="label">批次</div> </div>
<div class="value">${item.batch}</div> `
</div> }
<div class="left-item"> str += `
<div class="label">物料类型</div> <div class="left-item">
<div class="value">${item.itemType}</div> <div class="label">数量</div>
</div> <div class="value bold-font">${item.qty}</div>
<div class="left-item"> </div>
<div class="label">供应商</div> </div>
<div class="value">${item.supplierCode}</div> <div class="right">
</div> <div class="image">
<div class="left-item"> <img id='image1' src="${item.barcodeBase64}" alt="" />
<div class="label">打印时间</div> </div>
<div class="value">${item.printTimes}</div> <div class="left-item">
</div> <div class="label">批次</div>
</div> <div class="value">${item.batch}</div>
</div>` </div>
<div class="left-item">
<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>
`
}) })
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;

5
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -96,6 +96,7 @@ onLoad((option) => {
getBusinessType(businessTypeCode.value, (res) => { getBusinessType(businessTypeCode.value, (res) => {
if (res.success) { if (res.success) {
businessType.value = res.businessType businessType.value = res.businessType
res.fromLocationAreaTypeList.push('INSPECT', 'SUPPER')
fromLocationAreaTypeList.value = res.fromLocationAreaTypeList fromLocationAreaTypeList.value = res.fromLocationAreaTypeList
toLocationAreaTypeList.value = res.toLocationAreaTypeList toLocationAreaTypeList.value = res.toLocationAreaTypeList
showFromLocationPopup() showFromLocationPopup()
@ -257,7 +258,7 @@ const afterGetBalance = (result) => {
calcHandleQty(detailSource.value) calcHandleQty(detailSource.value)
} else { } else {
const detail = item.subList.find((r) => { const detail = item.subList.find((r) => {
if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) { if (r.packingNumber == pack.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) {
return r return r
} }
}) })
@ -272,7 +273,7 @@ const afterGetBalance = (result) => {
item.subList.push(newDetail) item.subList.push(newDetail)
calcHandleQty(detailSource.value) calcHandleQty(detailSource.value)
} else if (detail.scaned == true) { } else if (detail.scaned == true) {
showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) showErrorMessage(`箱码[${detail.packingNumber}]批次[${balance.batch}]已经在列表中`)
} }
} }
} }

Loading…
Cancel
Save