Browse Source

Merge branch 'intex' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into intex

intex_online20250327
王宇飞 3 weeks ago
parent
commit
4fb3bb4c2f
  1. 8
      src/mycomponents/status/statusEdit.vue
  2. 170
      src/pages/count/job/countLightDetail.vue

8
src/mycomponents/status/statusEdit.vue

@ -12,8 +12,7 @@
<!-- u-button自带点击变换颜色 -->
<u-button class="button" @tap="tagClick(item)" :key="index"
:class="[mIndex==index ? 'active' : '']">
<text :class="statusStyle(item.value)">{{item.text}}</text>
<text :class="statusStyle(item.value)">{{item.label}}</text>
</u-button>
</view>
</view>
@ -25,7 +24,8 @@
<script>
import {
getInventoryStatusStyle
getInventoryStatusStyle,
getInventoryStatusList
} from '@/common/directory.js';
import {
@ -49,7 +49,7 @@
watch: {
status: {
handler(newName, oldName) {
this.list = getInventoryStatusArray();
this.list = getInventoryStatusList();
for (var i = 0; i < this.list.length; i++) {
if (this.list[i].value == this.status) {
this.mIndex = i;

170
src/pages/count/job/countLightDetail.vue

@ -19,8 +19,7 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item>
<view class="uni-flex uni-row "
style="align-items: center; margin: 10rpx; border-radius: 10rpx ;"
>
style="align-items: center; margin: 10rpx; border-radius: 10rpx ;">
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index"
@editItem="editItem" :settingParam="jobContent" @remove="updateData"
@summCount="summCount" @currentCount="currentCount" @updateData="updateData">
@ -46,8 +45,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location :allowModifyLocation="false" ref="scanPopup" :noShowBalanceMessage="true"
:isShowHistory="false"
@getCountScanResult='getCountScanResult'>
:isShowHistory="false" @getCountScanResult='getCountScanResult'>
</win-scan-pack-and-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true"
@ -131,8 +129,8 @@
dataList: [],
managementList: [],
managementType: '',
isOpen:false
isOpen: false
};
},
onLoad(option) {
@ -201,56 +199,52 @@
refreshData(recordList) {
//
var addList = []
recordList.forEach(subItem => {
let mainItem = this.dataList.find(r =>
r.itemCode == subItem.itemCode &&
r.batch == subItem.batch &&
r.inventoryStatus == subItem.inventoryStatus)
//
if (mainItem) {
mainItem.scaned = true;
if (!mainItem.recordList) {
mainItem.recordList = []
}
mainItem.recordList.push(subItem)
} else {
//
var detail = this.createBackAddDetailInfo(subItem)
if (!detail.recordList) {
detail.recordList = []
}
var recordItem = {
scaned: true,
isNewJobDetail: "true",
itemCode: subItem.itemCode,
itemName: subItem.itemName,
itemDesc1: subItem.itemDesc1,
itemDesc2: subItem.itemDesc2,
packingNumber: subItem.packingNumber,
toPackingNumber:subItem.toPackingNumber,
toBatch:subItem.toBatch,
batch: subItem.batch,
inventoryStatus: subItem.inventoryStatus,
qty: subItem.qty,
handleQty: subItem.handleQty,
uom: subItem.uom,
packUnit: subItem.packUnit,
packQty: subItem.packQty,
balanceQty: subItem.balanceQty,
locationCode: subItem.locationCode
this.dataList.forEach(mainItem => {
mainItem.recordList = [];
recordList.forEach(subItem => {
//recordList
if (mainItem.itemCode == subItem.itemCode &&
mainItem.batch == subItem.batch &&
mainItem.inventoryStatus == subItem.inventoryStatus)
{
mainItem.recordList.push(subItem)
}else {
//
var detail = this.createBackAddDetailInfo(subItem)
var recordItem = {
scaned: true,
isNewJobDetail: "true",
itemCode: subItem.itemCode,
itemName: subItem.itemName,
itemDesc1: subItem.itemDesc1,
itemDesc2: subItem.itemDesc2,
packingNumber: subItem.packingNumber,
toPackingNumber: subItem.toPackingNumber,
toBatch: subItem.toBatch,
batch: subItem.batch,
inventoryStatus: subItem.inventoryStatus,
qty: subItem.qty,
handleQty: subItem.handleQty,
uom: subItem.uom,
packUnit: subItem.packUnit,
packQty: subItem.packQty,
balanceQty: subItem.balanceQty,
locationCode: subItem.locationCode
}
detail.recordList=[];
detail.recordList.push(recordItem)
addList.push(detail)
}
detail.recordList.push(recordItem)
addList.push(detail)
}
})
})
if (addList.length > 0) {
this.dataList = this.dataList.concat(addList)
}
this.updateList(false);
},
@ -306,18 +300,20 @@
this.$refs.scanPopup.packLoseFocus();
}
},
getCountScanResult(result, managementPrecision) {
var itemCode = result.label.itemCode
var packingNumber = result.label.packingNumber
var pack = result.package
var batch = result.label.batch
var inventoryStatus = result.balance ? result.balance.inventoryStatus : "OK"
var qty = result.balance ? result.balance.qty : result.label.qty;
var qty = result.balance ? result.balance.qty : 0;
var handleQty =qty!=0?qty:result.label.qty
var uom = pack.uom
var locationCode = this.locationCode
this.managementType = managementPrecision;
var recordItem = {
scaned: true,
isNewJobDetail: "false",
@ -327,11 +323,11 @@
itemDesc2: pack.itemDesc2,
packingNumber: packingNumber,
batch: batch,
toPackingNumber:packingNumber,
toPackingNumber: packingNumber,
toBatch: batch,
inventoryStatus: inventoryStatus,
qty: qty,
handleQty: qty,
handleQty: handleQty,
uom: uom,
packUnit: pack.packUnit,
packQty: pack.packQty,
@ -339,15 +335,15 @@
locationCode: locationCode
}
this.currentEditItem = recordItem;
this.isOpen=true
this.isOpen = true
this.$refs.countQtyEdit.openEditPopupShowSeconds(recordItem,
null);
},
setData(scanItem){
if(this.isOpen){
this.isOpen=false
setData(scanItem) {
if (this.isOpen) {
this.isOpen = false
//
if (this.managementType == 'BY_BATCH') {
//
@ -356,13 +352,13 @@
r.locationCode == scanItem.locationCode &&
r.batch == scanItem.batch &&
r.inventoryStatus == scanItem.inventoryStatus)
//,recordList
if (mainItem) {
if (!mainItem.recordList) {
mainItem.recordList = []
}
mainItem.scaned=true;
mainItem.scaned = true;
var subItem = mainItem.recordList.find(res =>
res.itemCode == scanItem.itemCode &&
res.locationCode == scanItem.locationCode &&
@ -370,8 +366,8 @@
res.batch == scanItem.batch &&
res.inventoryStatus == scanItem.inventoryStatus
)
scanItem.toPackingNumber=""
scanItem.toPackingNumber = ""
//
if (subItem) {
subItem.handleQty = calc.add(Number(subItem.handleQty), Number(subItem.handleQty))
@ -381,12 +377,12 @@
} else {
//,
var detail = this.createAddDetailInfo(scanItem)
scanItem.isNewJobDetail="true"
scanItem.isNewJobDetail = "true"
if (!detail.recordList) {
detail.recordList = []
}
var subItem = detail.recordList.find(res =>
res.itemCode == scanItem.itemCode &&
res.locationCode == scanItem.locationCode &&
@ -394,19 +390,19 @@
res.batch == scanItem.batch &&
res.inventoryStatus == scanItem.inventoryStatus
)
scanItem.toPackingNumber=""
scanItem.toPackingNumber = ""
//
if (subItem) {
subItem.handleQty = calc.add(Number(subItem.handleQty), Number(scanItem.handleQty))
} else {
detail.recordList.unshift(scanItem)
}
this.dataList.unshift(detail)
}
} else if (this.managementType == 'BY_QUANTITY') {
let item = this.dataList.find(r =>
r.itemCode == scanItem.itemCode &&
@ -417,7 +413,7 @@
if (!item.recordList) {
item.recordList = []
}
item.scaned=true;
item.scaned = true;
var subItem = item.recordList.find(res =>
res.itemCode == scanItem.itemCode &&
res.packingNumber == scanItem.packingNumber &&
@ -425,20 +421,20 @@
res.locatioCode == scanItem.locatioCode &&
res.inventoryStatus == scanItem.inventoryStatus
)
subItem.toPackingNumber="",
subItem.toBatch=""
subItem.toPackingNumber = "",
subItem.toBatch = ""
//
if (subItem) {
subItem.handleQty = calc.add(Number(subItem.handleQty), Number(scanItem.handleQty))
} else {
item.recordList.unshift(scanItem)
}
} else {
//,
var detail = this.createAddDetailInfo(scanItem)
if (!detail.recordList) {
detail.recordList = []
}
@ -448,32 +444,32 @@
res.batch == scanItem.batch &&
res.inventoryStatus == scanItem.inventoryStatus
)
subItem.toPackingNumber="",
subItem.toBatch=""
subItem.toPackingNumber = "",
subItem.toBatch = ""
//
if (subItem) {
subItem.handleQty = calc.add(Number(subItem.handleQty), Number(scanItem.handleQty))
} else {
detail.recordList.unshift(scanItem)
}
this.currentEditItem = scanItem;
}
}
this.updateList(true);
}
},
updateList(isGetFocus) {
this.calcScanCount()
this.calcQtyAndUpdateSatus()
this.sortList();
this.$forceUpdate()
if(isGetFocus){
if (isGetFocus) {
this.scanPopupLoseFocus()
}
},
editConfirm(qty, inventoryStatus, mode) {
//
@ -533,7 +529,7 @@
//
createAddDetailInfo(scanImte) {
var detail = {
scaned:true,
scaned: true,
isNewJobDetail: "true",
batch: scanImte.batch,
countAllRecordList: [],
@ -557,7 +553,7 @@
//
createBackAddDetailInfo(subItem) {
var detail = {
scaned:true,
scaned: true,
isNewJobDetail: "true",
batch: subItem.batch,
countAllRecordList: [],
@ -613,7 +609,7 @@
this.dataList.forEach(item => {
if (item.scaned && item.recordList && item.recordList.length > 0) {
submitData.recordList = submitData.recordList.concat(item.recordList)
}
})

Loading…
Cancel
Save