lijuncheng 2 weeks ago
parent
commit
46a1288489
  1. 16
      src/common/record.js
  2. 2
      src/mycomponents/package/packageCard.vue
  3. 2
      src/mycomponents/qty/balanceQtyEdit.vue
  4. 2
      src/mycomponents/qty/packUnit.vue
  5. 9
      src/mycomponents/record/recordComDetailCard.vue
  6. 2
      src/mycomponents/scan/winComScan.vue
  7. 56
      src/pages.json
  8. 110
      src/pages/customerReturn/job/returnDetail.vue
  9. 9
      src/pages/customerReturn/record/returnRecord.vue
  10. 12
      src/pages/deliver/record/deliverRecord.vue
  11. 108
      src/pages/inventoryMove/coms/comMoveRecord.vue
  12. 4
      src/pages/inventoryMove/coms/comMoveRecordCard.vue
  13. 78
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue
  14. 2
      src/pages/inventoryMove/record/holdToOkRecord.vue
  15. 5
      src/pages/issue/record/directIssueByBatch.vue
  16. 2
      src/pages/purchaseReceipt/job/purchaseReceipt.vue
  17. 52
      src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue
  18. 52
      src/pages/purchaseReceipt/job/purchaseReceiptTool.vue
  19. 15
      src/pages/purchaseReceipt/job/receiptDetail.vue
  20. 14
      src/pages/purchaseReceipt/job/receiptJob.vue
  21. 189
      src/pages/scrap/job/scrapJobDetail.vue

16
src/common/record.js

@ -48,7 +48,23 @@ export function createDetailInfo(balance, pack) {
return detail;
}
export function createDetailInfoForLabel(balance, pack,label) {
balance.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
console.log(988,label.qty)
detail.handleQty = new Decimal(label.qty).toNumber();
detail.package = pack;
detail.productionlineCode = pack.productionLineCode; // 制品回收记录需要加的
detail.toInventoryStatus = balance.inventoryStatus; // 制品回收记录需要加的
return detail;
}
export function createDetailByPackInfo(pack) {

2
src/mycomponents/package/packageCard.vue

@ -6,7 +6,7 @@
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> -->
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<pack :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>

2
src/mycomponents/qty/balanceQtyEdit.vue

@ -44,7 +44,7 @@
<view class="uni-flex uni-row space-between padding title u-col-center" v-if="queryBalance">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<text class="text_recommend" v-if="dataContent.balanceQty">{{Number(dataContent.balanceQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>

2
src/mycomponents/qty/packUnit.vue

@ -1,5 +1,5 @@
<template>
<view class="std_pack" v-if="dataContent.packQty!=undefined">
<view class="std_pack" v-if="dataContent.packQty">
<text>
<!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} -->
<!-- {{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}) -->

9
src/mycomponents/record/recordComDetailCard.vue

@ -4,7 +4,7 @@
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action>
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="scanOptions">
<item-qty :dataContent="dataContent" :isShowBalance="true"
:isShowBalanceQty="isShowBalanceQty"
:isShowRecommendQty="false"
@ -109,14 +109,17 @@
type: Boolean,
default: true
},
isShowHandleQty: {
type: Boolean,
default: true
},
isShowModifedLocation: {
type: Boolean,
default: false
},
allowModifyQty: {
type: Boolean,
default: false
default: true
},
allowModifyLocation: {
type: Boolean,

2
src/mycomponents/scan/winComScan.vue

@ -155,11 +155,9 @@
// title: '...',
// mask: true
// })
console.log(222)
let that = this;
// if(index==-1){
// that.sc
console.log(that.scanMsg.includes('\n'))
if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {

56
src/pages.json

@ -254,6 +254,62 @@
}
}
},
{
"path": "pages/purchaseReceipt/job/purchaseReceiptTool",
"style": {
"navigationBarTitleText": "协定品收货",
"enablePullDownRefresh": true,
"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/purchaseReceipt/job/purchaseReceiptDevelop",
"style": {
"navigationBarTitleText": "号试品收货",
"enablePullDownRefresh": true,
"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/purchaseReceipt/job/purchaseReject",
"style": {

110
src/pages/customerReturn/job/returnDetail.vue

@ -80,6 +80,10 @@
getScanCount
} from '@/common/detail.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
@ -246,7 +250,7 @@
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
this.$refs.scanPopup.openScanPopup( this.fromLocationCode );
},
closeScanPopup() {
@ -254,6 +258,52 @@
},
getScanResult(result) {
console.log(result)
this.managementType ==result.managementType
if(result.managementType == "BY_BATCH" || result.managementType == "BY_QUANTITY" ){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setDataBatch(result){
try {
var packingNumber = result.package.number;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
console.log(366,batch)
console.log(366,detail.subList)
var itemDetail = detail.subList.find(r => {
return r.batch == batch
})
if (itemDetail == undefined) {
this.showErrorMessage( "批次[" + batch + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showErrorMessage("[" + packingNumber + "]" + "[" + batch + "]")
itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty)
itemDetail.packQty = Number(result.package.packQty)
itemDetail.packUnit = result.package.packUnit
this.calcHandleQty();
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
setData(result){
try {
var packingNumber = result.package.number;
var batch = result.label.batch;
@ -287,7 +337,6 @@
this.showMessage(e.message)
}
},
scanLocationCode(location, code) {
this.toLocationCode = code
this.detailSource.forEach(item => {
@ -310,12 +359,20 @@
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
this.checkCountBatch()
}else{
this.checkCount();
}
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
if(this.managementType == "BY_BATCH" || this.managementType == "BY_QUANTITY" ){
this.checkCountBatch()
}else{
this.checkCount();
}
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@ -354,7 +411,51 @@
this.submitJob()
}
},
checkCountBatch(){
//
let str = ''
let str1 = ''
let str2 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
}
if(cur.handleQty > cur.qty){
str1 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以大于推荐数量【${cur.qty}`
}
if(cur.handleQty < cur.qty){
str2 = `批次【${cur.batch}】提交数量【${ cur.handleQty}】不可以小于推荐数量【${cur.qty}`
}
})
})
this.jobContent.allowBiggerQty = 'FALSE'
if(this.jobContent.allowBiggerQty == 'FALSE' &&str1){
this.$refs.comMessage.showConfirmWarningModal(str1)
return
}
if(this.jobContent.allowSmallerQty == 'FALSE' && str2){
this.$refs.comMessage.showConfirmWarningModal(str2)
return
}
if (str) {
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.submitJob()
}
});
} else {
this.submitJob()
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
@ -370,6 +471,7 @@
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
customerReturnJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

9
src/pages/customerReturn/record/returnRecord.vue

@ -211,6 +211,7 @@
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.packingNumber =pack.number
newDetail.handleQty =result.label.qty
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@ -314,7 +315,13 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
console.log("提交" ,params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
customerReturnRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

12
src/pages/deliver/record/deliverRecord.vue

@ -175,10 +175,6 @@
} else {
this.setData(result)
}
},
setData(result){
@ -343,7 +339,13 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
console.log("提交",params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
deliverRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

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

@ -12,7 +12,7 @@
<com-move-record-card :dataContent="item" :index="index" @removeData="removeData"
:isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack'
:allowEditQty="true"
:allowEditStatus="allowEditStatus">
:allowEditStatus="allowEditStatus" >
</com-move-record-card>
</view>
</view>
@ -35,7 +35,7 @@
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button>
</view>
<!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' :isClearFromLocationCode='isClearFromLocationCode' :isClearItemCode='isClearItemCode' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack>
<okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg' @clickBtnClearFromLocation='clearFromLocation' @clickBtnClearItemCode='clearItemCode'></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :title="'箱码'" >
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -147,10 +147,6 @@
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
isShowEditLocation: false,
itemCode:'',
batch:'',
isClearFromLocationCode:false,//
isClearItemCode:false,//
}
},
@ -160,7 +156,7 @@
this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup()
} else {
this.showErrorMessage(res.message)
}
@ -245,13 +241,18 @@
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
setTimeout(()=>{
if(this.showOnePop){
this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
this.$refs.okToHoldRecordPackRef.itemCode = ''
this.$refs.okToHoldRecordPackRef.batch = ''
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = true
}else{
this.$refs.scanFromLocationCode.openScanPopup();
}
})
},200)
},
getFromLocation(location) {
this.fromLocationCode = location.code;
@ -267,20 +268,19 @@
this.toLocationCode = code;
this.toLocationInfo = location;
},
getScanResult(result,managementType) {
getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
if(this.showOnePop){
this.itemCode= result.balance.itemCode
this.batch = result.balance.batch
this.isClearItemCode = false
debugger
this.$refs.okToHoldRecordPackRef.itemCode= result.balance.itemCode
this.$refs.okToHoldRecordPackRef.batch = result.balance.batch
this.getResult = result//
this.$refs.scanPopup.closeScanPopup()
}else{
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result)
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result,managementTypeParams)
}else{
this.getScanResultAfter(result)
this.getScanResultAfter(result,managementTypeParams)
}
}
@ -302,7 +302,7 @@
// this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty
this.getScanResultAfterBatch(this.getResult)
this.getScanResultAfterBatch(this.getResult,this.managementType)
},
getScanResultAfter(result){
var balance = result.balance;
@ -364,7 +364,7 @@
}
calcHandleQty(this.detailSource);
},
getScanResultAfterBatch(result){
getScanResultAfterBatch(result,managementTypeParams){
var balance = result.balance;
this.balanceInfo = result.balance;
var pack = result.package;
@ -387,18 +387,35 @@
newDetail.toInventoryStatus = this.toInventoryStatus;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.clearFromLocation()
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = false
} else {
var detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
var detail = ''
console.log(9988,managementTypeParams)
if(managementTypeParams == 'BY_QUANTITY'){
detail = item.subList.find(r => {
if (r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}else if(managementTypeParams == 'BY_BATCH'){
detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}
console.log(detail)
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
@ -412,10 +429,24 @@
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
this.clearFromLocation()
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = false
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
// console.log(999,detail.handleQty)
// detail.handleQty =calc.add(detail.handleQty, result.label.qty)
if(managementTypeParams == 'BY_QUANTITY'){
this.showErrorMessage(
"批次[]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}else if(managementTypeParams == 'BY_BATCH'){
this.showErrorMessage(
"批次[" + detail.batch + "]\n" + "库位[" + detail.fromLocationCode + "]\n" +
"已经存在")
}
}
}
calcHandleQty(this.detailSource);
@ -426,17 +457,17 @@
},
//
clearFromLocation(fromLocationCodeParams){
this.fromLocationCode = fromLocationCodeParams
this.itemCode =''
this.batch =''
this.isClearFromLocationCode = true
this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
this.$refs.okToHoldRecordPackRef.itemCode =''
this.$refs.okToHoldRecordPackRef.batch =''
// this.isClearFromLocationCode = true
},
//
//
clearItemCode(label){
this.itemCode = label.itemCode
this.batch =''
this.isClearItemCode = true
this.$refs.okToHoldRecordPackRef.itemCode =''
this.$refs.okToHoldRecordPackRef.batch =''
},
showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
@ -547,7 +578,12 @@
}
// if(this.balanceInfo)
console.log("提交" ,params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

4
src/pages/inventoryMove/coms/comMoveRecordCard.vue

@ -16,9 +16,9 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<comMovebalance :dataContent="item" :isShowStdPack="false" :isShowPack="true"
<comMovebalance :dataContent="item" :isShowStdPack="false"
:fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="true" :allowEditStatus='allowEditStatus'></comMovebalance>
:isShowLocation="true" :allowEditStatus='allowEditStatus' :isShowPack='item.managementTypeParams == "BY_PACKAGING"' ></comMovebalance>
</uni-swipe-action-item>
</uni-swipe-action>
<view class='split_line'></view>

78
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -9,14 +9,20 @@
</view>
<view class="item">
<view class="label">来源库位</view>
<view class="value"><u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg" clearable></u-input></view>
<view class="value">
<u-input v-model="fromLocationCode" @blur="fromLocationScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearFromLocation"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/>
</view>
</view>
<view class="item">
<view class="label">零件</view>
<view class="value"><u-input v-model="itemCode" @confirm="itemCodeScanMsg" clearable></u-input></view>
<view class="value">
<u-input v-model="itemCode" @blur="itemCodeScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearItemCode"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/>
</view>
@ -25,6 +31,7 @@
<view class="label">批次</view>
<view class="value">
<u-input v-model='batch'></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="batch = ''"></u-icon>
</view>
<view class="searchIcon"></view>
</view>
@ -62,7 +69,7 @@
components: {
winScanLocation
},
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'],
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'],
data() {
return {
handleQty:0,
@ -73,31 +80,11 @@
}
},
props: {
fromLocationCodeProps:{
type: String,
default: ''
},
//
showOnePop: {
type: Boolean,
default: false
},
itemCodeProps:{
type: String,
default: ''
},
batchProps:{
type: String,
default: ''
},
isClearFromLocationCode:{
type: Boolean,
default: false
},
isClearItemCode:{
type: Boolean,
default: false
},
},
mounted() {
},
@ -128,12 +115,15 @@
this.$emit("confirm",obj);
},
fromLocationScanMsg(){
if (this.fromLocationCode) {
console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg'
this.handelScanMsg()
}
},
itemCodeScanMsg(){
if (this.itemCode) {
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
@ -141,6 +131,7 @@
this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode
this.handelScanMsg()
}
},
handelScanMsg() {
//
@ -154,7 +145,7 @@
// that.scanMsg =that.scanMsg + "\n";
// }
console.log(that.scanMsg.includes('\n'))
// if (that.scanMsg.includes('\n')) {
if (that.scanMsg) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
@ -192,7 +183,7 @@
}
});
}, 200);
// }
}
},
losefocus() {
let that = this;
@ -200,38 +191,15 @@
that.boxfocus = false;
});
},
onClear(){
console.log(111)
}
},
watch: {
fromLocationCodeProps:{
handler(newVal, oldVal) {
if(this.isClearFromLocationCode){
this.fromLocationCode=''
}else{
this.fromLocationCode = newVal
}
},
// deep: true,
// immediate: true
},
itemCodeProps: {
handler(newVal, oldVal) {
if(this.isClearItemCode){
this.itemCode=''
}else{
this.itemCode = newVal
}
},
clickBtnClearFromLocation(){
this.$emit("clickBtnClearFromLocation");
},
batchProps(newVal) {
if(this.isClearItemCode){
this.batch=''
}else{
this.batch = newVal
}
clickBtnClearItemCode(){
this.$emit("clickBtnClearItemCode");
},
},
watch: {
}
}
</script>

2
src/pages/inventoryMove/record/holdToOkRecord.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comMoveRecord :myTitle="title" businessTypeCode='HoldToOk' > </comMoveRecord>
<comMoveRecord :myTitle="title" businessTypeCode='HoldToOk' :showOnePop='true'> </comMoveRecord>
</view>
</template>

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

@ -81,6 +81,7 @@
createItemInfo,
createDetailInfo,
calcHandleQty,
createDetailInfoForLabel
} from '@/common/record.js';
import {
@ -251,7 +252,7 @@
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
let newDetail = createDetailInfoForLabel(balance, pack,label);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@ -263,7 +264,7 @@
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
let newDetail = createDetailInfoForLabel(balance, pack,label);
item.subList.push(newDetail);
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)

2
src/pages/purchaseReceipt/job/purchaseReceipt.vue

@ -1,6 +1,6 @@
<template>
<view class="">
<receipt-job :title="title" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
<receipt-job source_type="ASN" :title="title" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view>
</template>

52
src/pages/purchaseReceipt/job/purchaseReceiptDevelop.vue

@ -0,0 +1,52 @@
<template>
<view class="">
<receipt-job :title="title" source_type="Develop" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view>
</template>
<script>
import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
export default {
name: 'purchaseReceiptTool',
components: {
receiptJob
},
data() {
return {
title:''
};
},
onShow() {
if(this.$refs.receiptjob!=undefined){
this.$refs.receiptjob.refresh();
}
},
onLoad(option) {
this.title = option.title
},
onPullDownRefresh() {
this.$refs.receiptjob.refresh();
},
onReachBottom() {
this.$refs.receiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.receiptjob.goHome();
// this.$refs.receiptjob.refresh();
} else if (e.index == 1) {
this.$refs.receiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

52
src/pages/purchaseReceipt/job/purchaseReceiptTool.vue

@ -0,0 +1,52 @@
<template>
<view class="">
<receipt-job :title="title" source_type="TOOL" scanTitle="箱标签/ASN单号" :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view>
</template>
<script>
import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
export default {
name: 'purchaseReceiptTool',
components: {
receiptJob
},
data() {
return {
title:''
};
},
onShow() {
if(this.$refs.receiptjob!=undefined){
this.$refs.receiptjob.refresh();
}
},
onLoad(option) {
this.title = option.title
},
onPullDownRefresh() {
this.$refs.receiptjob.refresh();
},
onReachBottom() {
this.$refs.receiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
this.$refs.receiptjob.goHome();
// this.$refs.receiptjob.refresh();
} else if (e.index == 1) {
this.$refs.receiptjob.openFilter();
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>

15
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -177,6 +177,7 @@
isCheckLocation: 'purchaseReceiptLocationCodeValidate', //
reasonText: "",
packingNumberList:[],
source_type:'',
// printDeafult: {}, //
// templateDeafult: {} //
};
@ -188,6 +189,7 @@
this.scanMessage = option.scanMessage;
this.operation = option.operation;
this.status = option.status;
this.source_type = option.source_type;
this.switchCode = "purchasereceiptPrintPDA" //PDA
this.switchCode1 = "EnableQms" //QMSTRUEFALSE
},
@ -467,6 +469,7 @@
}
}
} else if (result.label.labelType == "PurchaseLabel") {
debugger
var packingNumber = result.package.number;
var parentpackingNumber = result.package.parentNumber;
var batch = result.label.batch;
@ -492,7 +495,7 @@
} else {
let isScan = false
if(packingNumber){
isScan = this.packingNumberList.some(item=>item == packingNumber)
isScan = this.packList.some(item=>item == packingNumber)
}else{
isScan = false
}
@ -502,7 +505,8 @@
pack.handleQty = calc.add(pack.handleQty,result.label.qty)
} else {
this.packingNumberList.push(packingNumber)
this.packList.push(packingNumber)
pack.packList.push(packingNumber)
pack.scaned = true
pack.scanDate = new Date();
pack.handleQty = Number(result.label.qty);
@ -852,6 +856,7 @@
console.log(877,params)
// return;
purchaseReceiptJobSubmit(params).then(res => {
if (res.data) {
let isCheckPrint = getSwitchInfoByCode(this.switchCode)//
let isCheckPrint1 = getSwitchInfoByCode(this.switchCode1)//
@ -863,7 +868,7 @@
})
}else if(!isCheckPrint1 && !isCheckPrint){
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
}else {
}else if(that.source_type!='TOOL'&&that.source_type!='Develop'){
// if (res.data == '') {
// this.showCommitSuccessMessage(res.data)
// const purchaseReceiptDetailPointParams = {
@ -874,6 +879,7 @@
// } else {
// this.showErrorMessage(res.data)
// }
uni.showLoading({
title: "提交成功,将跳转到打印页面",
mask: true
@ -936,6 +942,9 @@
})
}, 2000)
}else if(that.source_type=='TOOL'||that.source_type=='Develop'){
uni.hideLoading()
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data.number)
}
} else {

14
src/pages/purchaseReceipt/job/receiptJob.vue

@ -102,6 +102,10 @@
type: String,
default: ''
},
source_type: {
type: String,
default: ''
},
},
// onShow() {
@ -199,6 +203,14 @@
action: "==",
value: this.$store.state.user.id
})
if(this.source_type){
filters.push({
column: "source_type",
action: "==",
value: this.source_type
})
}
var params = {
filters: filters,
@ -298,7 +310,7 @@
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scanMessage=' + scanMessage
.operation + '&scanMessage=' + scanMessage + '&source_type=' + this.source_type
});
this.scanMessage = ""
},

189
src/pages/scrap/job/scrapJobDetail.vue

@ -1,13 +1,14 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<view class="header-view">
<view class="header_job_top" >
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
<view class="header_item" >
申请单号 : {{jobContent.requestNumber}}
</view>
<view class='split_line'></view>
</view>
</view>
<view class="page-main">
@ -68,6 +69,10 @@
getScanCount
} from '@/common/detail.js';
import {
calc
} from '@/common/calc.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comScrapDetailCard from '@/pages/scrap/coms/comScrapDetailCard.vue'
@ -208,7 +213,131 @@
},
getScanResult(result) {
getScanResult(result,managementPrecisionParams) {
this.managementPrecision = managementPrecisionParams
if(managementPrecisionParams == 'BY_QUANTITY' || managementPrecisionParams == 'BY_BATCH'){
this.setDataBatch(result,managementPrecisionParams)
}else{
this.setData(result,managementPrecisionParams)
}
},
setDataBatch(result,managementPrecisionParams){
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var qty = result.balance.qty;
var itemCode = result.balance.itemCode;
var locationCode = result.balance.locationCode;
var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail =''
if(managementPrecisionParams == 'BY_QUANTITY'){
itemDetail = detail.subList.find(r => {
return r.fromlocationCode == result.fromlocationCode
})
}else if(managementPrecisionParams == 'BY_BATCH'){
itemDetail = detail.subList.find(r => {
return r.batch == batch&& r.fromlocationCode == result.fromlocationCode
})
}
if (itemDetail == undefined) {
this.showErrorMessage("批次[" + (batch ? batch: '') + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showErrorMessage("[" + packingNumber + "]" + "[" + batch + "]")
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续出库?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
} else {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = calc.add(itemDetail.handleQty, Number(result.label.qty));
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
}
} else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续出库?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
} else {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
}
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
setData(result){
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
@ -278,7 +407,6 @@
}
},
//
continueScan() {
this.scanCount = getScanCount(this.subList);
@ -302,7 +430,6 @@
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
@ -311,12 +438,20 @@
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
if(this.managementPrecision == 'BY_QUANTITY' || this.managementPrecision == 'BY_BATCH'){
this.checkCountBatch();
}else{
this.checkCount();
}
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
if(this.managementPrecision == 'BY_QUANTITY' || this.managementPrecision == 'BY_BATCH'){
this.checkCountBatch();
}else{
this.checkCount();
}
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
@ -355,6 +490,42 @@
this.submitJob()
}
},
checkCountBatch(){
//
let str = ''
let str1 = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `批次【${cur.batch}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
}
if(cur.handleQty > cur.balance.balanceQty){
str1 += `批次【${cur.batch}】提交数量【${ cur.balance.balanceQty}】不允许大于库存数量【${ cur.balance.balanceQty}`
}
})
})
if(str1){
this.$refs.comMessage.showConfirmWarningModal(str1)
return
}
if (str) {
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.submitJob()
}
});
} else {
this.submitJob()
}
},
async submitJob() {
uni.showLoading({
@ -372,7 +543,7 @@
this.managementList = res.list;
//
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
console.log("提交参数",params);
scrapJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

Loading…
Cancel
Save