Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
99836aca1e
  1. 4
      src/common/record.js
  2. 28
      src/pages.json
  3. 43
      src/pages/inventoryMove/coms/comMoveRecord.vue
  4. 5
      src/pages/issue/record/directIssue.vue
  5. 611
      src/pages/issue/record/directIssue0816.vue
  6. 200
      src/pages/pointPutawayJob/index.vue

4
src/common/record.js

@ -28,7 +28,7 @@ export function createItemInfo(balance, pack) {
// packingNumber: pack.number,
// parentPackingNumber: pack.parentNumber,
}
item.containerNumber = pack.parentNumber != null ? pack.parentNumber : pack.number;
item.containerNumber = pack.parentNumber ? pack.parentNumber : pack.number;
return item;
}
@ -39,7 +39,7 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = new Decimal(pack.packQty).toNumber()
detail.packQty = pack.packQty?new Decimal(pack.packQty).toNumber():0
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber();
detail.package = pack;

28
src/pages.json

@ -667,6 +667,34 @@
}
}
},
{
"path": "pages/issue/record/directIssue0816",
"style": {
"navigationBarTitleText": "直接发料0816",
"enablePullDownRefresh": false,
"titleNView": {
"autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},
{
"path": "pages/productionReceipt/job/productionReceiptJob",
"style": {

43
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -49,7 +49,7 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import {
getInventoryStatusName
} from '@/common/directory.js';
@ -282,7 +282,7 @@
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
@ -290,17 +290,17 @@
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
this.showErrorMessage("包装["+detail.packingNumber+"]\n"+
"批次["+detail.batch+"]\n"+"库位["+detail.fromLocationCode+"]\n"+
"库存状态["+getInventoryStatusName(detail.toInventoryStatus)+"]\n"
+ "重复扫描")
this.showErrorMessage("包装[" + detail.packingNumber + "]\n" +
"批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"库存状态[" + getInventoryStatusName(detail.toInventoryStatus) + "]\n" +
"重复扫描")
}
}
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
if(this.$refs.scanPopup){
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
@ -359,7 +359,7 @@
// this.showErrorMessage("")
// return;
// }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
@ -372,7 +372,7 @@
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
this.submit()
this.submit()
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
@ -385,22 +385,23 @@
}
},
submit(){
submit() {
//
var params = this.setParams()
let hint=""
this.dataContent.subList.forEach(res=>{
if(res.fromLocationCode==res.toLocationCode&&
res.fromInventoryStatus==res.toInventoryStatus){
hint +=`包装号【${res.fromPackingNumber}】来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
let hint = ""
this.dataContent.subList.forEach(res => {
if (res.fromLocationCode == res.toLocationCode) {
if (res.fromInventoryStatus == res.toInventoryStatus) {
var resultHint = res.fromPackingNumber?`包装号【${res.fromPackingNumber}`:""
hint += resultHint+`来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
}
}
})
if(hint){
if (hint) {
uni.hideLoading()
this.$refs.comMessage.showQuestionMessage1(hint, 'red', res => {
if (res) {
}
if (res) {}
});
return;
}
@ -424,9 +425,7 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
if (detail.toLocationCode == '') {
detail.toLocationCode = this.toLocationCode;
}
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {

5
src/pages/issue/record/directIssue.vue

@ -390,6 +390,11 @@
// },
commit() {
if(this.positionInfo=='请选择生产线'||!this.positionInfo){
this.showErrorMessage("请选择生产线")
return
}
uni.showLoading({
title: "提交中....",
mask: true

611
src/pages/issue/record/directIssue0816.vue

@ -0,0 +1,611 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='getBusinessType' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<view class="header-view">
<view class="header_item">
来源库位 : {{fromLocationCode}}
</view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowToLocation="false" :isShowParentToLocation="false" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
</view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="uni-row uni-flex">
<text>生产线:</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList"
@confirm="confirmSelect"></u-select>
</view>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode">
</winComScanBalance>
<!-- <balanceQuery ref="refBalanceQuery"></balanceQuery> -->
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
issueRecordSubmit,
getWorkShopLineStation,
getBalanceByFilter
} from '@/api/request2.js';
import {
goHome,
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcTreeHandleQty,
calcHandleQty
} from '@/common/record.js';
import {
getManagementPrecisions,
getPrecisionStrategyList,
getPrecisionStrategyParams
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
// import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
export default {
components: {
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard,
recordDetailCard,
balanceSelect,
winComScanBalance,
// balanceQuery
},
data() {
return {
id: '',
dataContent: {}, //
detailSource: [], //
fromLocationInfo: {},
fromLocationCode: "",
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
showToLoaction: true,
recommendLocationList: [], //
fromWarehouseCode: '', //
businessTypeCode: "Issue",
positionList: [],
show: false,
positionInfo: "请选择生产线",
resultData: {},
itemCode: ""
};
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title
})
this.clearData();
this.getBusinessType()
// if (this.positionList.length == 0) {
getWorkShopLineStation().then(res => {
if (res.data != null && res.data.length > 0) {
this.positionList = res.data
} else {
this.showErrorMessage('未查找到位置信息');
}
}).catch(error => {
this.showErrorMessage(error);
})
// }
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
// this.$refs.refBalanceQuery.showDrawer();
// this.closeScanPopup();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
mounted() {},
methods: {
// showDrawer() {
// this.$refs.showRight.open();
// },
getBusinessType() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses);
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
getScanResult(result) {
let pack = result.package;
let balance = result.balance;
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
.fromLocationCode + "]没有库存余额")
return;
}
//
if (pack.parentNumber) {
this.setPackageData(result);
} else {
this.setContainerData(result);
}
},
setPackageData(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
if (this.itemCode != "" && this.itemCode != balance.itemCode) {
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码")
return;
}
if (this.fromWarehouseCode == '') {
this.fromWarehouseCode = balance.warehouseCode;
}
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.itemCode = balance.itemCode;
this.fromLocationCode = balance.locationCode
this.scanPopupGetFocus()
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
newDetail.parentNumber = pack.parentNumber;
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit;
newDetail.packQty = pack.packQty;
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail);
this.scanPopupGetFocus()
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描")
}
}
}
calcHandleQty(this.detailSource);
},
setContainerData(result) {
//1.
this.getBalance(result, resList => {
});
},
getBalance(result, callback) {
let packageInfo = result.package;
let filters = [{
column: "itemCode",
action: "==",
value: packageInfo.itemCode
}, {
column: "batch",
action: "==",
value: packageInfo.batch
}];
if (this.businessType.outInventoryStatuses != null) {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.businessType.outInventoryStatuses
})
}
if (this.businessType.outAreaTypes != null) {
filters.push({
column: "areaType",
action: "in",
value: this.businessType.outAreaTypes
})
}
let packingNumber = packageInfo.number;
packageInfo.subList.forEach(sub => {
packingNumber = packingNumber + ',' + sub.number
})
packingNumber = packingNumber.trimEnd(',');
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
if (res.data.list.length > 0) {
res.data.list.forEach(r => {
// if (packageInfo.parentNumber !== null) {
// r.parentPackingNumber = packageInfo.parentNumber
// } else {
// r.parentPackingNumber = packageInfo.number
// }
})
callback(res.data.list)
} else {
}
}).catch(err => {
this.showErrorMessage(err.message);
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.scanPopupGetFocus()
}
});
},
calcTreeHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty, detail.qty)
}
}
}
this.$forceUpdate();
},
showSelect() {
// if (this.editPosition) {
this.show = true
// }
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)
this.workshopCode = e[0].value
this.productionLineCode = e[1].value
this.workStationCode = e[2].value
this.workShopName = e[0].label
this.productionLineName = e[1].label
this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择")
return;
} else {
this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode;
}
} else {
this.showErrorMessage("生产线-工位基础信息维护错误")
}
} else {
this.showErrorMessage("车间-生产线基础信息维护错误")
}
//
let toLocationCode = ''
this.positionList.forEach(item => {
if (this.workshopCode == item.value) { //
item.children.find(child => {
if (this.productionLineCode == child.value) {
toLocationCode = child.children.find(subChild => this.workStationCode ==
subChild.value).rawLocationCode;
}
})
}
})
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = toLocationCode
detail.productionLineCode = this.productionLineCode
detail.workStationCode = this.workStationCode
})
})
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
if (this.businessType) {
this.$refs.scanPopup.openScanPopup(this.businessType);
} else {
this.getBusinessType()
}
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
},
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
// scanLocationCode(location, code) {
// this.toLocationCode = code
// this.toLocationCode = location;
// },
commit() {
uni.showLoading({
title: "提交中....",
mask: true
});
//
let precisionStrategyParams = getPrecisionStrategyParams(this.detailSource);
//2:
getPrecisionStrategyList(precisionStrategyParams, res => {
if (res.success) {
this.managementList = res.list;
var params = {
...this.setRecordParams()
}
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成直接发料记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
setRecordParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
var submitItem = deepCopyData(detail)
submitItem.toPackingNumber = info.packingNumber;
submitItem.toBatch = info.batch;
submitItem.toContainerNumber = detail.containerNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.fromBatch = info.batch;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
// detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = detail.toLocationCode
submitItem.qty = detail.handleQty;
submitItem.package = "";
submitItem.recordList = [{
toInventoryStatus: detail.inventoryStatus,
fromParentPackingNumber: detail.parentNumber,
fromPackingNumber: info.packingNumber,
fromBatch: info.batch,
toPackingNumber: info.packingNumber,
toBatch: info.batch,
fromLocationCode: detail.locationCode,
toLocationCode: detail.toLocationCode,
handleQty: detail.handleQty,
fromPackUnit: detail.packUnit,
toPackUnit: detail.packUnit,
fromPackQty: detail.packQty,
toPackQty: detail.packQty
}]
subList.push(submitItem)
}
})
})
if (subList.length > 0) {
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode;
}
this.dataContent.subList = subList
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.fromWarehouseCode;
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationInfo = location;
this.fromLocationCode = code;
this.openScanPopup();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
updateData() {
calcHandleQty(this.detailSource);
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
this.$forceUpdate();
},
clearData() {
this.fromLocationInfo = {};
this.fromLocationCode = '';
this.fromWarehouseCode = '';
this.toWarehouseCode = '';
this.detailSource = [];
this.positionInfo = "请选择生产线";
this.itemCode = ""
}
}
}
</script>
<style scoped lang="scss">
</style>

200
src/pages/pointPutawayJob/index.vue

@ -5,10 +5,11 @@
<view @click="tabIndex = 1" :class="tabIndex == 1?'active1' :''" style="padding: 10rpx 0px;">检验指引单</view>
<view @click="tabIndex = 2" :class="tabIndex == 2?'active1' :''" style="padding: 10rpx 0px;">上架指引单</view>
</view>
<view class="" :style="{'paddingTop':isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0?'100rpx': '30rpx'}">
<view class=""
:style="{'paddingTop':isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0?'100rpx': '30rpx'}">
<view class="box" style="page-break-before:always;" v-if="tabIndex == 1">
<view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<table border='1'>
<thead>
<tr class='top1'>
@ -35,8 +36,14 @@
<td>抽检数量</td>
<td>{{item.sampleQty}}</td>
</tr>
<tr v-if="!item.haveInspectionRequest">
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
<tr v-if="item.haveInspectionRequest==='0'">
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
<tr v-else-if="item.haveInspectionRequest==='2'">
<td colspan='4' style="color:#ffab01;font-weight: bold;font-size: 15px;">没有检验方案</td>
</tr>
<tr v-else-if="item.haveInspectionRequest==='3'">
<td colspan='4' style="color:#258eff;font-weight: bold;font-size: 15px;">检验阶段不存在</td>
</tr>
</tbody>
</table>
@ -123,7 +130,7 @@
currentPage1: 1,
pageSize1: 20,
number: '',
isHaveOn: false,//
isHaveOn: false, //
// isHaveInspect:false,//
}
},
@ -201,83 +208,52 @@
this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent
this.data1.inspectDTOList.forEach(item => {
if(!item.haveInspectionRequest){
str += `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
<tr>
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
</tbody>
</table>
</div>
</div>
`
}else{
str += `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
</tbody>
</table>
</div>
</div>
`
let str1 = `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
`
let str2 = ``
if(item.haveInspectionRequest==='0'){
str2 =`<tr><td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td></tr>`
}else if(item.haveInspectionRequest==='2'){
str2 =`<tr><td colspan='4' style="color:#ffab01;font-weight: bold;font-size: 15px;">没有检验方案</td></tr>`
}else if(item.haveInspectionRequest==='3'){
str2 =`<tr><td colspan='4' style="color:#258eff;font-weight: bold;font-size: 15px;">检验阶段不存在</td></tr>`
}
let str3 = `
</tbody>
</table>
</div>
</div>
`
str += str1 + str2+ str3
})
this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str); //
@ -318,7 +294,7 @@
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
}
});
},
@ -346,7 +322,7 @@
},
async onShow() {
//
if(this.data.ids){
if (this.data.ids) {
await getJimuPutawayJobDetail({
masterIds: this.data.ids
}).then(res => {
@ -355,27 +331,26 @@
})
}
//
if(this.number){
if (this.number) {
await queryInspectionFreeFlag({
number: this.number
}).then(async res1 => {
console.log(444,res1)
this.data1 = res1.data
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item=>item.sampleQty>0)
if(this.data1&&this.data1.inspectDTOList&&this.data1.inspectDTOList.length == 0){
this.tabIndex =2
}
this.getTableInspectDTOList()
})
.catch(error=>{
this.$refs.comMessage.showMessage(error, res => {
if (res) {
number: this.number
}).then(async res1 => {
this.data1 = res1.data
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item => item.sampleQty >0)
if (this.data1 && this.data1.inspectDTOList && this.data1.inspectDTOList.length == 0) {
this.tabIndex = 2
}
});
})
this.getTableInspectDTOList()
})
.catch(error => {
this.$refs.comMessage.showMessage(error, res => {
if (res) {
}
});
})
}
this.getPointPutawayJobHtml()
this.getPurchaseReceiptJobHtml()
},
@ -531,11 +506,13 @@
td {
padding: 10px;
&:nth-child(2n){
width:290rpx;
&:nth-child(2n) {
width: 290rpx;
}
&:nth-child(2n+1){
width:160rpx;
&:nth-child(2n+1) {
width: 160rpx;
}
}
@ -563,17 +540,18 @@
border-bottom: 4rpx solid rgb(60, 156, 255);
}
}
.relative{
.relative {
margin-bottom: 20rpx;
position: relative;
}
.q{
.q {
position: absolute;
left: 50%;
top:50%;
top: 50%;
font-size: 400rpx;
transform: translate(-50% ,-50%);
transform: translate(-50%, -50%);
color: rgba(0, 0, 0, 0.1);
}
</style>
Loading…
Cancel
Save