lijuncheng 11 months ago
parent
commit
babf502aef
  1. 2
      common/record.js
  2. 1
      common/style/pdabasic.css
  3. 6
      mycomponents/balance/balance.vue
  4. 2
      mycomponents/balance/balanceLabel.vue
  5. 2
      mycomponents/balance/productionLabel.vue
  6. 2
      mycomponents/balance/purchaseLabel.vue
  7. 2
      mycomponents/label/label.vue
  8. 8
      mycomponents/record/recordComDetailCard.vue
  9. 4
      mycomponents/scan/winScanContainer.vue
  10. 26
      mycomponents/scan/winScanPackAndLocation.vue
  11. 182
      pages/container/coms/comContainerBindCard.vue
  12. 9
      pages/container/coms/comPalletRecord.vue
  13. 393
      pages/container/record/containerBindRecord.vue
  14. 140
      pages/container/record/containerUnBindRecord.vue
  15. 2
      pages/package/coms/comOverRecord.vue
  16. 2
      pages/package/coms/comPackageRecord.vue
  17. 2
      pages/productReceipt/coms/comProductRecord.vue
  18. 2
      pages/productionReturn/coms/comReturnRecord.vue
  19. 29
      pages/productionReturn/job/returnDetail.vue
  20. 2
      pages/purchaseReceipt/job/receiptDetail.vue
  21. 52
      pages/purchaseReturn/job/returnDetail.vue
  22. 19
      pages/putaway/record/putawayRecord.vue
  23. 2
      pages/query/coms/comLocationDetailCard.vue
  24. 2
      pages/repleinsh/coms/comScanReplishPack.vue
  25. 2
      static/config.json

2
common/record.js

@ -23,7 +23,7 @@ export function createItemInfo(balance, pack) {
export function createDetailInfo(data, pack) {
data.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
data.inventoryStatus = data.inventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = {};
Object.assign(detail, data)
detail.balanceQty = Number(detail.qty)

1
common/style/pdabasic.css

@ -714,6 +714,7 @@ page {
flex-direction: column;
width: 100%;
height: 100%;
background-color: #fff;
}
.page-header {

6
mycomponents/balance/balance.vue

@ -1,10 +1,10 @@
<template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;">
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 2px; ">
<view class="uni-flex uni-row space-between" style="align-items: center">
<view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"></location>
</view>
<view>
@ -61,7 +61,7 @@
type: Boolean,
default: true
},
isShowLocation: {
isShowFromLocation: {
type: Boolean,
default: true
},

2
mycomponents/balance/balanceLabel.vue

@ -1,6 +1,6 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowLocation="isShowLocation"></balance>
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance>
<purchase-info :dataContent="packageContent"></purchase-info>
</view>
</template>

2
mycomponents/balance/productionLabel.vue

@ -1,7 +1,7 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowLocation="isShowLocation"></balance>
:isShowFromLocation="isShowLocation"></balance>
<production-info :dataContent="packageContent"></production-info>
</view>
</template>

2
mycomponents/balance/purchaseLabel.vue

@ -1,7 +1,7 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowLocation="isShowLocation"></balance>
:isShowFromLocation="isShowLocation"></balance>
<!-- <purchase-info :dataContent="packageContent"></purchase-info> -->
</view>
</template>

2
mycomponents/label/label.vue

@ -1,6 +1,6 @@
<template>
<view>
<balance :dataContent="detail" :isShowStdPack="false" :isShowPack="true" :isShowLocation="true"></balance>
<balance :dataContent="detail" :isShowStdPack="false" :isShowPack="true" :isShowFromLocation="true"></balance>
<purchase-info :dataContent="labelContent"></purchase-info>
</view>
</template>

8
mycomponents/record/recordComDetailCard.vue

@ -10,16 +10,16 @@
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<u-line />
<!-- <u-line /> -->
<view class="" v-for="(detail,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowLocation="isShowLocation"></balance>
:isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="true"></balance>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line />
<!-- <u-line /> -->
</view>
</uni-collapse-item>
</uni-collapse>
@ -73,7 +73,7 @@
default: false
},
isShowLocation: {
isShowFromLocation: {
type: Boolean,
default: true
},

4
mycomponents/scan/winScanContainer.vue

@ -37,7 +37,7 @@
props: {
title: {
type: String,
default: ''
default: '器具'
},
isShowHistory: {
type: Boolean,
@ -78,7 +78,7 @@
uni.hideLoading();
if (res.data.list.length > 0) {
this.containerInfo = res.data.list[0];
if (this.containerInfo.status == 'USED') {
if (this.containerInfo.containerStatus == 'USED') {
this.callBack();
} else {
this.showErrorMessage("器具[" + this.code + "]状态是[" + this.containerInfo.status + "],不可以绑定")

26
mycomponents/scan/winScanPackAndLocation.vue

@ -21,7 +21,7 @@
<view class="uni-center" style="width: 25%; ">
来源库位
</view>
<!-- style="width: 75%;padding: 8rpx" -->
<!-- style="width: 75%;padding: 8rpx" -->
<view class="">
<!-- <input v-model="fromLocationCode" placeholder="请扫描来源库位" :focus="locationOnFocus"
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> -->
@ -41,7 +41,7 @@
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult"
:isShowHistory="isShowHistory" :clearResult="true" :headerType ="headerType"></win-com-scan>
:isShowHistory="isShowHistory" :clearResult="true" :headerType="headerType"></win-com-scan>
</view>
</view>
</view>
@ -264,14 +264,17 @@
})
} else if (datas.length == 1) {
let balance = datas[0];
if (balance.qty > 0) {
this.packCallBack(balance);
} else {
this.showErrorMessage(this.getQueryCondition() + '<br>查找到库存记录数量为[' + balance.qty + "],<br>不可以进行操作",
res => {
this.packGetFocus();
})
}
this.packCallBack(balance);
// 20231228
// if (balance.qty > 0) {
// this.packCallBack(balance);
// } else {
// this.showErrorMessage(this.getQueryCondition() + '<br>[' + balance.qty + "],<br>",
// res => {
// this.packGetFocus();
// })
// }
} else {
this.showBalanceSelect(datas);
}
@ -298,7 +301,8 @@
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
balance: item
balance: item,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
this.$emit("getResult", data);

182
pages/container/coms/comContainerBindCard.vue

@ -0,0 +1,182 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">
<balance :dataContent="item" :isShowStdPack="false" :isShowPack="true" :isShowStatus="false"
:isShowBatch="true" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="isShowLocation">
</balance>
</view>
<!-- <view class="" v-for="(item,index) in dataContent.bindList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowPack="true" :isShowStatus="false"
:isShowBatch="true" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="isShowLocation">
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view> -->
</uni-collapse-item>
</uni-collapse>
<recommendQtyEdit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam"
:handleQty="editItem.qty" @confirm="confirm">
</recommendQtyEdit>
<job-detail-popup ref="receiptHint" :dataContent="showItem"></job-detail-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
jobDetailPopup,
balance,
recommendQtyEdit,
comMessage
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
isShowStatus: {
type: Boolean,
default: false
},
isShowLocation: {
type: Boolean,
default: false
},
isShowPatch: {
type: Boolean,
default: true
}
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getClearOption();
},
methods: {
removeData(e, dataContent) {
if (e.content.text == "清空") {
this.$refs.comMessage.showQuestionMessage("确定清空零件及箱码信息?",
res => {
if (res) {
this.$emit('removeItem')
// this.$emit('removeItem', this.dataContent)
}
});
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openEditPopup();
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false;
// this.dataContent.subList.splice(index, 1)
// this.$emit('removePack')
}
});
},
confirm(qty) {
this.editItem.qty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

9
pages/container/coms/comPalletRecord.vue

@ -17,11 +17,11 @@
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowPack="true" :isShowStatus="false" :isShowBatch="true"
:toInventoryStatus="item.toInventoryStatus" :isShowLocation="isShowLocation" >
:toInventoryStatus="item.toInventoryStatus" :isShowFromLocation="isShowLocation" >
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
<!-- <u-line color="#D8D8D8"></u-line> -->
</view>
</uni-collapse-item>
</uni-collapse>
@ -43,7 +43,7 @@
import {
getDetailOption,
getDetailEditRemoveOption,
getEditOption,
getClearOption
} from '@/common/array.js';
export default {
@ -95,7 +95,6 @@
})
}
}
},
immediate: true,
deep: true
@ -117,7 +116,7 @@
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.scanOptions = getEditOption();
this.removeOptions = getClearOption();
},

393
pages/container/record/containerBindRecord.vue

@ -1,23 +1,24 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan='showContainerPopup' v-if="containerCode==''"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<view class="header_item">
来源库位{{fromLocationCode}}
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view>
<view class="page-wraper" v-if="containerCode!=''">
<view class="" style="margin-left: 20rpx;">
<targetContainer ref="targetContainer" title="托盘" :containerCode="containerCode" :isShowEdit="false"
@getContainer="getContainer"></targetContainer>
</view>
<u-line color="#D8D8D8"></u-line>
<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" :isShowLocation="false"
<!-- {{item.contentNumber}} -->
<comPalletRecord :dataContent="item" :index="index" :isShowPatch="false"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</comPalletRecord>
</view>
</view>
</scroll-view>
@ -27,33 +28,29 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<targetContainer ref="scanContainer" title="器具" :containerCode="containerCode"
@getContainer="getContainer">
</targetContainer>
</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='showScanPackagePopup'></win-scan-button>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-location ref="scanLocationPopup" title="库位" @getLocation="getFromLocation"
:locationTypeList="fromlocationTypeList"></win-scan-location>
<win-scan-container ref="scanContainer" title="器具" @getContainer='getContainer'></win-scan-container>
<win-scan-location ref="scanLocationPopup" title="来源库位" @getLocation="getFromLocation"></win-scan-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<!-- <win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack> -->
<com-message ref="comMessage"></com-message>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
containerBindRecordSubmit
containerBindRecordSubmit,
getContainerDetailByNumber
} from '@/api/request2.js';
import {
goHome,
goHome
} from '@/common/basic.js';
import {
@ -67,59 +64,55 @@
calcHandleQty
} from '@/common/record.js';
import {
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
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/container/coms/comPalletRecord.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
export default {
components: {
winScanButton,
winScanPack,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard,
requiredLocation,
comBlankView,
comMessage,
targetContainer,
recordComDetailCard,
winScanContainer,
comPalletRecord,
winScanPackAndLocation,
winScanLocation
},
data() {
return {
id: '',
settingParam: {},
jobContent: {}, //
subList: [], //subList
scanCount: 0,
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
fromLocationInfo: {},
toLocationInfo: {},
containerCode: "",
businessType: {},
fromlocationCode: '',
containerInfo: {},
fromlocationTypeList: [],
tolocationTypeList: []
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}
};
},
onLoad(option) {
var typeCode = "ContainerBind"
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) {
if (e.index === 0) {
@ -132,111 +125,115 @@
onPullDownRefresh() {},
mounted() {
getBusinessType('ContainerBind', res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showContainerPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
methods: {
showFromLocationPopup() {
this.$nextTick(r => {
this.$refs.scanLocationPopup.openScanPopup();
getContainer(containerInfo) {
this.containerInfo = containerInfo;
this.containerCode = containerInfo.number;
getContainerDetailByNumber(this.containerCode).then(res => {
if (res.data != null && res.data.subList.length > 0) {
this.detailSource = this.getDataSource(res.data.subList)
}
this.showScanLocation();
}).catch(error => {
this.showErrorMessage(error.message)
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
getFromLocation(location) {
if (location != null) {
this.fromLocationCode = location.code;
this.showScanPackagePopup();
}
showScanLocation() {
this.$nextTick(r => {
this.$refs.scanLocationPopup.openScanPopup();
})
},
showScanPackagePopup() {
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType)
getFromLocation(location, code) {
this.fromLocationInfo = location;
this.openScanPopup();
},
getScanResult(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) {
var itemInfo = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack);
itemInfo.subList.push(newDetail);
this.detailSource.push(itemInfo)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var item = this.detailSource.find(r => r.itemCode == itemCode);
if (item == undefined) {
if (this.detailSource.length == 0) {
item = this.createItemInfo(result.label);
let itemDetail = result.balance;
itemDetail.scaned = true;
item.subList.push(itemDetail);
this.detailSource.push(item);
} else {
this.showMessage("绑定物料【" + itemCode + "】与现有物料不一致,不可以绑定");
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
this.showErrorMessage('箱码[' + balance.packingNumber + "]已经在列表中")
var itemDetail = item.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
if (itemDetail == undefined) {
itemDetail = result.balance;
itemDetail.scaned = true;
item.subList.push(itemDetail);
} else {
if (itemDetail.scaned) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描")
} else {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经绑定到器具")
}
}
}
} catch (e) {
this.showErrorMessage(e.message)
}
calcHandleQty(this.detailSource);
// var packingNumber = result.label.packingNumber;
// var batch = result.label.batch;
// var qty = result.label.qty;
// var itemCode = result.label.itemCode;
// var pack = result.package;
// var item = this.detailSource.find(res => {
// if (res.itemCode == itemCode) {
// return res
// }
// })
// if (item == undefined) {
// var itemp = createItemInfo(result.label, pack);
// let newDetail = createDetailInfo(result.label, pack); //
// itemp.subList.push(newDetail);
// this.detailSource.push(itemp)
// } else {
// var detail = item.subList.find(r => {
// if (r.packingNumber == packingNumber) {
// return r;
// }
// })
// if (detail == undefined) {
// let newDetail = createDetailInfo(result.label, pack);
// item.subList.push(newDetail);
// } else {
// if (detail.scaned == true) {
// this.showErrorMessage("[" + packingNumber + "[" + batch + "]")
// }
// }
// }
// this.calcHandleQty();
// this.scanPopupGetFocus();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
createRecordInfo(detail, label) {
var record = {}
detail.scaned = true;
// let record = JSON.parse(JSON.stringify(detail));
//
Object.assign(record, detail)
record.qty = Number(label.qty);
return record;
},
calcHandleQty() {
calcHandleQty(this.detailSource)
calcHandleQty(this.detailSource);
this.scanPopupGetFocus();
this.$forceUpdate();
},
getDataSource(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
if (item == undefined) {
item = this.createItemInfo(detail);
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
})
return items;
},
updateData() {
this.calcHandleQty();
},
@ -245,6 +242,28 @@
this.detailSource.splice(index, 1)
},
createItemInfo(res) {
let item = {
itemCode: res.itemCode,
itemName: res.itemName,
stdPackQty: res.stdPackQty,
stdPackUnit: res.stdPackUnit,
qty: res.qty,
handleQty: 0,
uom: res.uom,
subList: []
}
return item;
},
createDetailInfo(data) {
data.scaned = false;
data.packingNumber = data.contentNumber
data.qty = Number(data.qty)
let detail = data;
return detail;
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
@ -255,25 +274,63 @@
this.updateData();
},
openScanPopup() {
if (this.fromLocationInfo.code != undefined) {
this.$refs.scanPopup.openScanPopupForType(this.fromLocationInfo.code, this.businessType);
} else {
this.showScanLocation();
}
},
showContainerPopup() {
this.$nextTick(() => {
this.$refs.scanContainer.openScanPopup();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.packGetFocus();
}
},
scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus();
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.packLoseFocus();
}
},
commit() {
if (this.containerCode == "") {
this.showMessage("请先选择托码")
return;
}
uni.showLoading({
title: '提交中...',
mask: true
})
if (this.detailSource.length == 0) {
this.scanCount = getScanCount(this.detailSource[0].subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描要解绑的箱码")
return;
}
let params = this.getParams();
console.log("提交" + JSON.stringify(params))
containerBindRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成器具绑定记录<br>" + res.data)
this.clear();
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getParams() {
@ -281,8 +338,9 @@
var creator = this.$store.state.user.id
let params = {
number: this.containerCode,
type: 'bind',
status: 'USED',
toLocationCode: this.fromLocationInfo.code,
containerType: this.containerInfo.type,
creator: creator
};
@ -291,11 +349,6 @@
if (detail.scaned) {
detail.containerContentType = 'PACKAGE';
detail.contentNumber = detail.packingNumber;
detail.itemCode = detail.itemCode;
detail.batch = detail.batch;
detail.inventoryStatus = detail.inventoryStatus;
detail.package = null;
subList.push(detail)
}
@ -328,13 +381,22 @@
})
},
getContainer(containerInfo) {
this.containerCode = containerInfo.number;
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.containerCode = '';
})
},
@ -353,38 +415,5 @@
</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>

140
pages/container/record/containerUnBindRecord.vue

@ -14,11 +14,12 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comPalletRecord :dataContent="item" :index="index" :settingParam="jobContent"
<!-- {{item.contentNumber}} -->
<comPalletRecord :dataContent="item" :index="index"
:isShowPatch="false" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</comPalletRecord>
<u-line></u-line>
</view>
</view>
</scroll-view>
@ -44,7 +45,8 @@
<script>
import {
containerUnBindRecordSubmit
containerUnBindRecordSubmit,
getContainerDetailByNumber
} from '@/api/request2.js';
import {
goHome
@ -61,6 +63,10 @@
calcHandleQty
} from '@/common/record.js';
import {
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
@ -84,26 +90,11 @@
data() {
return {
id: '',
receiptJob: {},
received: false,
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationInfo: {},
businessTypeInfo: {},
fromLocationInfo: {},
toLocationInfo: {},
containerCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false,
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {}
containerCode: "",
};
},
onLoad(option) {
@ -143,7 +134,7 @@
} else {
itemDetail.scaned = true;
itemDetail.record = this.createRecordInfo(itemDetail, result.label);
this.calcHandleQty();
// this.calcHandleQty();
}
}
}
@ -169,7 +160,6 @@
this.$forceUpdate();
},
getDataSource(subList) {
let items = [];
subList.forEach(detail => {
@ -192,6 +182,7 @@
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
@ -212,7 +203,7 @@
createDetailInfo(data) {
data.scaned = false;
data.packingNumber = data.ContentNumber
data.packingNumber = data.contentNumber
data.qty = Number(data.qty)
let detail = data;
return detail;
@ -242,7 +233,7 @@
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
this.$refs.scanPopup.closeScanPopup();
},
scanPopupGetFocus() {
@ -257,12 +248,62 @@
}
},
commit() {
if (this.containerCode == "") {
this.showMessage("请先选择目标库位")
uni.showLoading({
title: '提交中...',
mask: true
})
this.scanCount = getScanCount(this.detailSource[0].subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描要解绑的箱码")
return;
}
let params = this.getParams();
console.log("提交" + JSON.stringify(params))
containerUnBindRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成器具绑定记录<br>" + res.data)
this.clear();
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getParams() {
var subList = []
var creator = this.$store.state.user.id
let params = {
number: this.containerCode,
type: 'bind',
status: 'USED',
creator: creator
};
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.containerContentType = 'PACKAGE';
detail.contentNumber = detail.packingNumber;
detail.itemCode = detail.itemCode;
detail.batch = detail.batch;
detail.inventoryStatus = detail.inventoryStatus;
detail.package = null;
subList.push(detail)
}
})
})
params.subList = subList
return params;
},
@ -288,7 +329,6 @@
})
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
@ -300,14 +340,15 @@
closeScanMessage() {
this.scanPopupGetFocus();
},
getContainer(containerInfo) {
this.containerCode = containerInfo.number;
getContainerDetailByNumber(this.containerCode).then(res => {
if (res.data.length > 0) {
this.detailSource = this.getDataSource(res.data)
if (res.data != null && res.data.subList.length > 0) {
this.detailSource = this.getDataSource(res.data.subList)
}
}).catch(error => {
this.showErrorMessage(error.message)
})
},
@ -326,44 +367,15 @@
this.detailSource.splice(i, 1)
}
}
},
clear()
{
}
}
}
</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>

2
pages/package/coms/comOverRecord.vue

@ -17,7 +17,7 @@
<!-- <recommend :dataContent="record" :packageContent="record.package" :isShowStatus="false"
:isShowLocation="false"></recommend> -->
<balance :dataContent="record" :packageContent="record.package" :isShowStatus="false"
:isShowLocation="false"></balance>
:isShowFromLocation="false"></balance>
</view>
</view>
</uni-swipe-action-item>

2
pages/package/coms/comPackageRecord.vue

@ -18,7 +18,7 @@
<!-- <recommend :dataContent="record" :packageContent="record.package" :isShowStatus="false"
:isShowLocation="false"></recommend> -->
<balance :dataContent="record" :packageContent="record.package" :isShowStatus="false"
:isShowLocation="false"></balance>
:isShowFromLocation="false"></balance>
</view>
</view>
</uni-swipe-action-item>

2
pages/productReceipt/coms/comProductRecord.vue

@ -17,7 +17,7 @@
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowLocation="false"></balance>
:isShowPack="true" :isShowFromLocation="false"></balance>
<!-- <production-label :dataContent="item" :packageContent="item.package"
:isShowLocation="false">
</production-label> -->

2
pages/productionReturn/coms/comReturnRecord.vue

@ -17,7 +17,7 @@
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true"
:isShowLocation="true" :isShowToLocation="isShowToLocation"></balance>
:isShowFromLocation="true" :isShowToLocation="isShowToLocation"></balance>
<!-- <production-label :dataContent="item" :packageContent="item.package"
:isShowLocation="false">
</production-label> -->

29
pages/productionReturn/job/returnDetail.vue

@ -8,27 +8,9 @@
申请单号 : {{jobContent.requestNumber}}
</view>
<view class="cen_card" style="margin-top: 10rpx;">
<view class="cell_box uni-flex uni-row" style="margin-top: 10rpx;">
<view class="cell_info">
<view class="text_lightblue">车间</view>
<view>{{jobContent.workshopCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">生产线</view>
<view>{{titleInfo.productionLineCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">工位</view>
<view>{{ titleInfo.workStationCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">原材料库</view>
<view>{{ titleInfo.toLocationCode}}</view>
</view>
</view>
</view>
<u-line color="#D8D8D8" style="margin-bottom: 0rpx;margin-top: 10rpx;"></u-line>
<work-station :workshopCode="jobContent.workshopCode" :productionLineCode="titleInfo.productionLineCode"
:workStationCode="titleInfo.workStationCode" :rawLocationCode="titleInfo.fromLocationCode">
</work-station>
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
<view class="page-main">
@ -103,6 +85,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
export default {
name: 'receipt_detail',
@ -114,8 +97,8 @@
comReturnDetailCard,
detailInfoPopup,
comMessage,
jobTop
jobTop,
workStation
},
data() {
return {

2
pages/purchaseReceipt/job/receiptDetail.vue

@ -274,8 +274,6 @@
return
}
console.log("校验通过")
//
if (this.scanCount == this.subList.length) {
this.submitJob();

52
pages/purchaseReturn/job/returnDetail.vue

@ -2,9 +2,9 @@
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent" ></job-top>
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item" >
<view class="header_item">
发货单{{jobContent.asnNumber}}
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
@ -76,7 +76,7 @@
import returnDetailInfoPopup from '@/pages/purchaseReturn/coms/returnDetailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
name: 'returnDetail',
components: {
@ -236,7 +236,7 @@
} else {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch
r.batch == batch && r.fromLocationCode == result.fromLocationCode
})
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在列表中")
@ -247,38 +247,39 @@
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续退货?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ;
itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = result.balance.qty;
itemDetail.balance.stdPackQty =result.package.stdPackQty
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
itemDetail.balance.stdPackQty = result.package.stdPackQty
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
}else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
} else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.balance.qty) ;
itemDetail.handleQty = Number(result.balance.qty);
itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) ;
itemDetail.balance.stdPackQty =Number(result.package.stdPackQty)
itemDetail.balance.stdPackUnit =result.package.stdPackUnit
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty();
}
}
@ -323,15 +324,15 @@
title: "提交中....",
mask: true
});
var params =this.setParams()
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
purchaseReturnJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage(res.data)
} else {
this.showErrorMessage("提交失败["+res.msg+"]")
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
@ -343,14 +344,14 @@
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;
detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
@ -368,8 +369,8 @@
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.filter(res => res.fromLocationCode != l.fromLocationCode)
if (location.length == 0) {
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
@ -380,6 +381,7 @@
}
})
}
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
},
@ -428,7 +430,7 @@
showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成退货记录:' + number, res => {
navigateBack(1)
navigateBack(1)
})
}
}

19
pages/putaway/record/putawayRecord.vue

@ -1,24 +1,26 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_item">
需求零件 : {{jobContent.requestNumber}}
</view>
</view>
<view class="">
<com-blank-view @goScan='showFromLocationPopup' 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_item">
来源库位 : {{fromLocationCode}}
</view>
<u-line />
</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"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
:isShowFromLocation="false" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
@ -37,7 +39,8 @@
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation='false'>
</win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>

2
pages/query/coms/comLocationDetailCard.vue

@ -8,7 +8,7 @@
</template>
<u-line />
<view v-for="(item, index) in dataContent.list">
<balance :dataContent="item" :isShowLocation="false" :isShowPack="isShowPack"
<balance :dataContent="item" :isShowFromLocation="false" :isShowPack="isShowPack"
:isShowStdPack="false">
</balance>
<u-line />

2
pages/repleinsh/coms/comScanReplishPack.vue

@ -69,7 +69,7 @@
<uni-swipe-action-item @click="swipeClick($event,record,index)"
:right-options="scanOptions">
<view style="padding: 0px 10px">
<balance :dataContent="record" :isShowLocation="false"
<balance :dataContent="record" :isShowFromLocation="false"
:isShowStdPack="false"></balance>
</view>
</uni-swipe-action-item>

2
static/config.json

@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
"value": "http://192.168.0.176:12080/admin-api",
"value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save