niexiting 1 year ago
parent
commit
ecb027b9d2
  1. 16
      api/request2.js
  2. 93
      mycomponents/package/packageDetailPopup.vue
  3. 4
      pages.json
  4. 0
      pages/container/coms/comPalletRecord.vue
  5. 4
      pages/container/record/containerBindRecord.vue
  6. 6
      pages/container/record/containerUnBindRecord.vue
  7. 22
      pages/count/job/countDetail.vue
  8. 55
      pages/inspect/job/inspectResult.vue
  9. 2
      pages/inventoryMove/job/scrapToHoldMoveJob.vue
  10. 266
      pages/package/record/overPackageRecord.vue
  11. 3
      pages/package/record/splitPackageRecord.vue

16
api/request2.js

@ -2984,25 +2984,25 @@ export function repleinshRecordSubmit(params) {
}
/**
* 托盘绑定 提交
* 器具绑定 提交
* @param {*} params
*/
export function bindPalledtRecordSubmit(params) {
export function containerBindRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
url: baseApi + "/wms/container-main/containerBind",
method: "post",
data: params,
});
}
/**
* 托盘解绑 提交
* 器具解绑 提交
* @param {*} params
*/
export function unbindPalledtRecordSubmit(params) {
export function containerUnBindRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/putaway/jobSubmit",
method: "put",
url: baseApi + "/wms/container-main/containerUnBind",
method: "post",
data: params,
});
}

93
mycomponents/package/packageDetailPopup.vue

@ -7,7 +7,8 @@
<view v-for="(item, index) in dataList" style="width: 100%;">
<view class="item">
<text class="item_title">{{item.item_title}} </text>
<text class="text_wrap">{{item.text_wrap}}</text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}}</text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
</view>
</view>
</scroll-view>
@ -23,6 +24,7 @@
<script>
import comItem from '@/mycomponents/item/item.vue'
import { dateFormat } from '@/common/basic.js';
export default {
emits: ['onClose'],
components: {
@ -68,123 +70,128 @@
text_wrap: this.dataContent.itemName
}, {
item_title: '物品描述1',
text_wrap: this.dataContent.itemDesc1
content: this.dataContent.itemDesc1
}, {
item_title: '物品描述2',
text_wrap: this.dataContent.itemDesc2
content: this.dataContent.itemDesc2
}, {
item_title: '批次',
text_wrap: this.dataContent.batch
content: this.dataContent.batch
}, {
item_title: '替代批次',
text_wrap: this.dataContent.altBatch
content: this.dataContent.altBatch
}, {
item_title: '生产日期',
text_wrap: this.dataContent.produceDate
content: this.dataContent.produceDate,
type:"dateTime"
}, {
item_title: '有效期(日)',
text_wrap: this.dataContent.validityDays
item_title: '有效日期',
content: this.dataContent.validityDays,
type:"dateTime"
}, {
item_title: '失效日期',
text_wrap: this.dataContent.expireDate
content: this.dataContent.expireDate,
type:"dateTime"
}, {
item_title: '计量单位',
text_wrap: this.dataContent.uom,
content: this.dataContent.uom,
type:"uom"
}, {
item_title: '数量',
text_wrap: this.dataContent.qty
content: this.dataContent.qty
}, {
item_title: '替代计量单位',
text_wrap: this.dataContent.altUom
content: this.dataContent.altUom
}, {
item_title: '替代数量',
text_wrap: this.dataContent.altQty
content: this.dataContent.altQty
}, {
item_title: '转换率',
text_wrap: this.dataContent.convertRate
content: this.dataContent.convertRate
}, {
item_title: '标包数量',
text_wrap: this.dataContent.stdPackQty
content: this.dataContent.stdPackQty
}, {
item_title: '标包单位',
text_wrap: this.dataContent.stdPackUnit
content: this.dataContent.stdPackUnit
}, {
item_title: '仓库代码',
text_wrap: this.dataContent.toWarehouseCode
content: this.dataContent.toWarehouseCode
}, {
item_title: '月台代码',
text_wrap: this.dataContent.toDockCode
content: this.dataContent.toDockCode
}, {
item_title: '库位代码',
text_wrap: this.dataContent.toLocationCode
content: this.dataContent.toLocationCode
}, {
item_title: '供应商代码',
text_wrap: this.dataContent.supplierCode
content: this.dataContent.supplierCode
}, {
item_title: '供应商物品代码',
text_wrap: this.dataContent.supplierItemCode
content: this.dataContent.supplierItemCode
}, {
item_title: '采购订单号',
text_wrap: this.dataContent.poNumber
content: this.dataContent.poNumber
}, {
item_title: '采购订单行',
text_wrap: this.dataContent.poLine
content: this.dataContent.poLine
}, {
item_title: '采购计划单号',
text_wrap: this.dataContent.rpNumber
content: this.dataContent.rpNumber
}, {
item_title: '发货单号',
text_wrap: this.dataContent.asnNumber
content: this.dataContent.asnNumber
}, {
item_title: '生产订单号',
text_wrap: this.dataContent.woNumber
content: this.dataContent.woNumber
}, {
item_title: '生产订单行',
text_wrap: this.dataContent.woLine
content: this.dataContent.woLine
}, {
item_title: '生产线代码',
text_wrap: this.dataContent.productionLineCode
content: this.dataContent.productionLineCode
}, {
item_title: '班组代码',
text_wrap: this.dataContent.teamCode
content: this.dataContent.teamCode
}, {
item_title: '班次代码',
text_wrap: this.dataContent.shiftCode
content: this.dataContent.shiftCode
}, {
item_title: '客户代码',
text_wrap: this.dataContent.customerCode
content: this.dataContent.customerCode
}, {
item_title: '客户月台代码',
text_wrap: this.dataContent.customerDockCode
content: this.dataContent.customerDockCode
}, {
item_title: '客户物品代码',
text_wrap: this.dataContent.customerItemCode
content: this.dataContent.customerItemCode
}, {
item_title: '销售订单号',
text_wrap: this.dataContent.soNumber
content: this.dataContent.soNumber
}, {
item_title: '销售订单行',
text_wrap: this.dataContent.soLine
content: this.dataContent.soLine
}, {
item_title: '质量等级',
text_wrap: this.dataContent.eqLevel
content: this.dataContent.eqLevel
}, {
item_title: '货主代码',
text_wrap: this.dataContent.ownerCode
content: this.dataContent.ownerCode
}, {
item_title: '重量',
text_wrap: this.dataContent.weight
content: this.dataContent.weight
}, {
item_title: '面积',
text_wrap: this.dataContent.area
content: this.dataContent.area
}, {
item_title: '体积',
text_wrap: this.dataContent.volume
content: this.dataContent.volume
}]);
// console.log(JSON.stringify(this.dataList));
}
},
formatDate(val) {
return dateFormat(val)
},
}
}
</script>

4
pages.json

@ -1668,14 +1668,14 @@
},
{
"path": "pages/pallet/record/bindPalletRecord",
"path": "pages/container/record/containerBindRecord",
"style": {
"navigationBarTitleText": "器具绑定",
"enablePullDownRefresh": false
}
},
{
"path": "pages/pallet/record/unBindPalletRecord",
"path": "pages/container/record/containerUnBindRecord",
"style": {
"navigationBarTitleText": "器具解绑",
"enablePullDownRefresh": false

0
pages/pallet/coms/comPalletRecord.vue → pages/container/coms/comPalletRecord.vue

4
pages/pallet/record/bindPalletRecord.vue → pages/container/record/containerBindRecord.vue

@ -48,6 +48,10 @@
</template>
<script>
import {
containerBindRecordSubmit
} from '@/api/request2.js';
import {
goHome,
} from '@/common/basic.js';

6
pages/pallet/record/unBindPalletRecord.vue → pages/container/record/containerUnBindRecord.vue

@ -44,8 +44,8 @@
<script>
import {
getContainerDetailByNumber
} from '@/api/request.js';
containerUnBindRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
@ -68,7 +68,7 @@
import targetContainer from "@/mycomponents/container/targetContainer.vue"
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import comPalletRecord from '@/pages/pallet/coms/comPalletRecord.vue'
import comPalletRecord from '@/pages/container/coms/comPalletRecord.vue'
export default {
components: {

22
pages/count/job/countDetail.vue

@ -514,17 +514,17 @@
});
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
// countJobSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
countJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成盘点记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},

55
pages/inspect/job/inspectResult.vue

@ -338,7 +338,7 @@
},
commit() {
if (this.jobContent.failedQty == null) {
this.showMessage("请输入不合格数量")
return
@ -362,23 +362,41 @@
//==0()
if (failedQty == 0) {
if (crackQty == 0) {
//==0
this.jobContent.subList.forEach(res => {
res.handleQty = res.qty
res.failedQty = 0;
res.notPassedQty = res.failedQty;
res.crackQty = 0;
res.goodQty = res.qty;
res.failedReason = "";
res.photos = ""
res.inspectResult = ""
res.toInventoryStatus = "OK"
res.inspectUser = this.$store.state.user.id
})
this.jobContent.nextAction = "";
this.jobContent.goodQty = this.jobContent.receiveQty
this.submitJob(this.jobContent)
if (this.nextAction == "ALL_NOK") {
this.jobContent.subList.forEach(res => {
res.handleQty = res.qty
res.failedQty = res.qty;
res.notPassedQty = res.failedQty;
res.crackQty = 0;
res.goodQty = 0;
res.failedReason = "";
res.photos = ""
res.inspectResult = ""
res.toInventoryStatus = "NOK"
res.inspectUser = this.$store.state.user.id
})
this.jobContent.nextAction = this.nextAction;
this.jobContent.goodQty = 0
this.submitJob(this.jobContent)
}else {
//==0
this.jobContent.subList.forEach(res => {
res.handleQty = res.qty
res.failedQty = 0;
res.notPassedQty = res.failedQty;
res.crackQty = 0;
res.goodQty = res.qty;
res.failedReason = "";
res.photos = ""
res.inspectResult = ""
res.toInventoryStatus = "OK"
res.inspectUser = this.$store.state.user.id
})
this.jobContent.nextAction = "";
this.jobContent.goodQty = this.jobContent.receiveQty
this.submitJob(this.jobContent)
}
} else {
//0
@ -399,6 +417,7 @@
this.showMessage("请选择下一步动作")
return
}
//
if (this.nextAction == "ALL_NOK") {
//

2
pages/inventoryMove/job/scrapToHoldMoveJob.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comMoveJob ref="comMoveJob" businessTypeCode='ScrapToHoldJob'> </comMoveJob>
<comMoveJob ref="comMoveJob" businessTypeCode='ScrapToHold'> </comMoveJob>
</view>
</template>

266
pages/package/record/overPackageRecord.vue

@ -9,10 +9,11 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-package-record :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack='updateData'>
</com-package-record>
<record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
@ -21,26 +22,28 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</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>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' allowModifyLocation="false">
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-button @goScan='showScanPopupPack'></win-scan-button>
<win-scan-pack title="翻包标签" ref="scanPopupPack" @getResult='getScanPackResult'></win-scan-pack>
<com-message ref="comMessage"></com-message>
</view>
</template>
<script>
import {
overPackageRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
@ -60,13 +63,13 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import comPackageRecord from '@/pages/package/coms/comPackageRecord.vue'
import packageTarget from '@/mycomponents/package/packageTarget.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
@ -78,8 +81,8 @@
comMessage,
winScanPackAndLocation,
recommendBalance,
recordComDetailCard,
comPackageRecord
packageTarget,
recordComDetailCard
},
data() {
return {
@ -88,27 +91,27 @@
detailSource: [], //
locationTypeList: [],
fromLocationCode: "",
toLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}
businessType: {},
dataContent: {}
};
},
onLoad(option) {
// var typeCode = "SplitPackage"
// getBusinessType(typeCode, res => {
// if (res.success) {
// this.businessType = res.businessType;
// this.fromlocationTypeList = res.fromlocationTypeList;
// this.tolocationTypeList = res.tolocationTypeList;
// this.showFromLocationPopup();
// } else {
// this.$refs.comMessage.showBreakMessage(res.message);
// }
// });
var typeCode = "OverPackage"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
//
onNavigationBarButtonTap(e) {
@ -121,11 +124,10 @@
onPullDownRefresh() {},
mounted() {
this.showFromLocationPopup();
},
mounted() {},
methods: {
showScanPopupPack() {
scanPopupPack() {
this.$refs.scanPopupPack.openScanPopup();
},
@ -141,69 +143,35 @@
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.scaned = false;
newDetail.Records = [];
newDetail.handleQty = 0
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
this.$refs.scanPopup.closeScanPopup();
this.showScanPopupPack();
},
getScanPackResult(result) {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var uom = result.package.uom;
var item = this.detailSource.find(r => r.itemCode == itemCode);
if (item == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var temp = {
scaned: true,
packingNumber: packingNumber,
batch: batch,
qty: Number(qty),
LabelQty: Number(qty),
stdPackUnit: result.package.stdPackUnit,
stdPackQty: result.package.stdPackQty,
uom: uom
}
var sumQty = 0;
item.subList[0].Records.forEach(function(item1, index) {
sumQty += item1.qty;
});
if ((Number(qty) + sumQty) > item.subList[0].qty) {
this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" +
sumQty +
"】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!");
return;
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
item.subList[0].Records.push(temp)
this.$forceUpdate();
}
this.calcHandleQty();
},
calcHandleQty() {
for (let detail of this.detailSource[0].subList) {
let hQty = 0;
if (detail.Records.length > 0) {
detail.Records.forEach(r => {
hQty += Number(r.qty)
})
}
detail.handleQty = hQty;
}
calcHandleQty(this.detailSource)
this.$forceUpdate();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -212,15 +180,21 @@
});
},
updateData() {
this.calcHandleQty();
},
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.fromLocationCode == "") {
@ -248,32 +222,58 @@
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
overPackageRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
this.showErrorMessage("没有要扫描的数据")
}
//
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// (this.id, params).then(res => {
// uni.hideLoading()
// if (res.data) {
// var hint = res.data.Number;
// this.showCommitSuccessMessage("" + hint, )
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var subItem = {};
Object.assign(subItem, detail)
subItem.itemCode = detail.itemCode;
subItem.itemName = detail.package.itemName;
subItem.itemDesc1 = detail.package.itemDesc1;
subItem.itemDesc2 = detail.package.itemDesc2;
subItem.fromInventoryStatus = detail.inventoryStatus;
subItem.fromQty = detail.qty
subItem.fromPackingNumber = detail.packingNumber;
subItem.fromBatch = detail.batch;
subItem.fromLocationCode = detail.locationCode;
subItem.package =""
subList.push(subItem)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
return this.dataContent;
},
showMessage(message) {
@ -307,32 +307,62 @@
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: "来源库位[" + this.fromLocationCode + "]不能与目标库位[" + code + "]一致",
duration: 2000
})
return
}
this.ToLocationCodeInfo = location;
this.toLocationCode = code;
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = []
this.fromLocationCode = '';
this.dataContent ={}
})
},
updateData() {
this.calcHandleQty();
}
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
},
}
}
</script>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>

3
pages/package/record/splitPackageRecord.vue

@ -295,7 +295,10 @@
subItem.fromInventoryStatus = subItem.inventoryStatus;
subItem.toInventoryStatus = subItem.inventoryStatus;
subItem.fromQty = subItem.qty
subItem.toQty = record.qty
subItem.fromPackingNumber = subItem.packingNumber;
subItem.toPackingNumber = record.packingNumber;

Loading…
Cancel
Save