Browse Source

打印 2024/7/31 08:28:45

hella_vue3
zhang_li 3 months ago
parent
commit
ccaad1ca3c
  1. 13
      src/api/request2.js
  2. 56
      src/pages/fg/coms/comNoReceiptPopup.vue
  3. 2
      src/pages/fg/receiptByPlan.vue
  4. 16
      src/pages/fg/receiptNoPlan.vue
  5. 1
      src/pages/productRecycle/job/productRecycleJobDetail.vue

13
src/api/request2.js

@ -2704,4 +2704,17 @@ export function getPlanByNumber(data) {
//查询生产线
export function getProductionlineAndWorkStation() {
return http.get("/wms/production-main/getProductionlineAndWorkStation")
}
/**
* 打印机列表
*/
export function getPrintList(params) {
return http.post("/wms/print/printerList")
}
/**
* 打印模板列表
*/
export function getPrintTemplateList(params) {
return http.post("/wms/print/modelList")
}

56
src/pages/fg/coms/comNoReceiptPopup.vue

@ -41,8 +41,15 @@
<view class="customerBorder">
{{ itemCode }}
</view>
<view v-if="planQty > 0">{{ planQty }}({{ getUomInfo(uom) }})</view>
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" @confirm="confirmSelectItem"></u-select>
<view class="">
<image src="/static/icons/down.svg" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectItemCode"> </image>
</view>
</view>
<view class="title" style="display: flex; align-items: center; padding: 10rpx">
<text style="flex-shrink: 0; width: 25%">数量</text>
<uni-easyinput v-model="planQty"></uni-easyinput><view v-if="uom">({{ getUomInfo(uom) }})</view>
<view class="">
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx"> </image>
</view>
@ -65,11 +72,9 @@
<text style="flex-shrink: 0; width: 25%">批次</text>
<uni-easyinput v-model="batch"></uni-easyinput>
<view class="">
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx" @click="showSelectLine"> </image>
<image src="" mode="" style="width: 40rpx; height: 40rpx; margin-left: 20rpx"> </image>
</view>
</view>
<view class="split_line"></view>
</view>
</view>
</view>
@ -84,7 +89,7 @@
</template>
<script>
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation } from '@/api/request2.js'
import { getIssueJobByProductionline, getPlaneInfoByproductLine, getPackUnitByItemCode, getProductionlineAndWorkStation, getProductionlineItem } from '@/api/request2.js'
import { getPackUnitName, getUomInfo } from '@/common/directory.js'
import { getCurrDate, getBatch8, dateFormatData, lastThreeDays } from '@/common/basic.js'
@ -205,6 +210,11 @@ export default {
return
}
if (this.planQty <= 0) {
this.showErrorMessage('请输入完工数量')
return
}
if (this.packUnitName == '请选择包装规格') {
this.showErrorMessage('请选择包装规格')
return
@ -215,9 +225,10 @@ export default {
callback() {
const item = {
productionLineName: this.productionLineName,
productionLineCode: this.productionLineCode, // 线
productionLineName: '',
productionLineCode: '', // 线
itemCode: this.itemCode,
itemName: this.itemName,
uom: this.getUomInfo(this.uom),
batch: this.batch,
packUnitName: this.packUnitName,
@ -226,7 +237,7 @@ export default {
packQty: this.packQty,
planQty: this.planQty,
goodQty: this.goodQty,
planNumber: this.planNumber,
planNumber: '',
workStationCode: this.workStationCode,
fgLocationCode: this.fgLocationCode,
rawLocationCode: this.rawLocationCode
@ -308,23 +319,25 @@ export default {
this.showErrorMessage('请先选择计划日期')
return
}
if (!this.productionLineCode) {
this.showErrorMessage('请先选择生产线')
return
}
uni.showLoading({
title: '加载中',
mask: true
})
getPlaneInfoByproductLine(this.productionLineCode, this.planDate)
const param = {
pageSize: 20,
pageNo: 1,
productionLineCode: this.productionLineCode
}
getProductionlineItem(param)
.then((res) => {
uni.hideLoading()
if (res.data && res.data.length > 0) {
res.data.forEach((item) => {
item.label = `${item.itemCode}${item.planQty}${this.getUomInfo(item.uom)})`
if (res.data.list && res.data.list.length > 0) {
res.data.list.forEach((item) => {
item.label = item.itemCode
item.value = item
})
this.itemCodeList = res.data
this.itemCodeList = res.data.list
this.showItemCodeSelect = true
} else {
this.showErrorMessage('未查找到物料信息')
@ -336,12 +349,9 @@ export default {
})
},
confirmSelectItem(data) {
const productionPlan = data[0].value
this.itemCode = productionPlan.itemCode
this.uom = productionPlan.uom
this.planQty = productionPlan.planQty
this.goodQty = productionPlan.goodQty
this.planNumber = productionPlan.number
const itemInfo = data[0].value
this.itemCode = itemInfo.itemCode
this.uom = itemInfo.uom
//
this.clearPackUnit()

2
src/pages/fg/receiptByPlan.vue

@ -319,7 +319,7 @@ const getScanResult = (result) => {
.then((res) => {
if (res.data) {
if (that.dataContent) {
const itemIndex = allList.value.findIndex((r) => r.itemCode == result.itemCode && r.order == result.order)
const itemIndex = this.allList.findIndex((r) => r.content == result.content)
//
if (itemIndex == -1) {
// if (this.allList.length > this.dataContent.packQty) {

16
src/pages/fg/receiptNoPlan.vue

@ -5,9 +5,6 @@
<com-blank-view @goScan="openFg" v-if="!dataContent"></com-blank-view>
</view>
<view class="" v-if="dataContent">
<view class="" style="font-size: 35rpx; padding: 10rpx; padding-left: 15rpx"> 生产计划{{ dataContent.planNumber }} </view>
<view class="split_line"></view>
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">完工库位</view>
@ -17,14 +14,6 @@
<view class="text_lightblue">计划数</view>
<view>{{ dataContent.planQty }}{{ dataContent.uom }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">已完工</view>
<view>{{ dataContent.goodQty }}{{ dataContent.uom }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">未完工</view>
<view>{{ dataContent.noGoodQty }}{{ dataContent.uom }}</view>
</view>
</view>
<view class="split_line"></view>
@ -45,11 +34,10 @@
{{ dataContent.packQtyHint }}
</view>
</view>
<view class="split_line" v-if="dataContent"></view>
</view>
</view>
<view style="margin-top: 480rpx; padding-bottom: 160rpx" v-if="dataContent">
<view style="margin-top: 350rpx; padding-bottom: 160rpx" v-if="dataContent">
<scroll-view scroll-y="true" class="">
<view class="scan_view" v-for="(item, index) in showList" :key="index">
<uni-swipe-action>
@ -339,7 +327,7 @@ export default {
.then((res) => {
if (res.data) {
if (that.dataContent) {
const itemIndex = this.allList.findIndex((r) => r.itemCode == result.itemCode && r.order == result.order)
const itemIndex = this.allList.findIndex((r) => r.content == result.content)
//
if (itemIndex == -1) {
// if (this.allList.length > this.dataContent.packQty) {

1
src/pages/productRecycle/job/productRecycleJobDetail.vue

@ -196,6 +196,7 @@ const getScanResult = (result) => {
return r.packingNumber == packingNumber && r.batch == batch && r.fromLocationCode == result.fromLocationCode && r.inventoryStatus == result.balance.inventoryStatus
})
if (itemDetail) {
const itemStatus = getInventoryStatusName(itemDetail.inventoryStatus)
//
if (itemDetail.scaned) {
showErrorMessage(`箱码【${packingNumber}】<br>批次【${batch}】<br>库位【${result.fromLocationCode}】<br>状态【${balanceStatus}】<br>已经扫描`)

Loading…
Cancel
Save