Browse Source

修改盘点

intex_online20250327
lijuncheng 4 weeks ago
parent
commit
87b11e9105
  1. 8
      src/mycomponents/status/statusEdit.vue
  2. 42
      src/pages/count/job/countLightDetail.vue

8
src/mycomponents/status/statusEdit.vue

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

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

@ -19,8 +19,7 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item> <uni-swipe-action-item>
<view class="uni-flex uni-row " <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" <comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index"
@editItem="editItem" :settingParam="jobContent" @remove="updateData" @editItem="editItem" :settingParam="jobContent" @remove="updateData"
@summCount="summCount" @currentCount="currentCount" @updateData="updateData"> @summCount="summCount" @currentCount="currentCount" @updateData="updateData">
@ -46,8 +45,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location :allowModifyLocation="false" ref="scanPopup" :noShowBalanceMessage="true" <win-scan-pack-and-location :allowModifyLocation="false" ref="scanPopup" :noShowBalanceMessage="true"
:isShowHistory="false" :isShowHistory="false" @getCountScanResult='getCountScanResult'>
@getCountScanResult='getCountScanResult'>
</win-scan-pack-and-location> </win-scan-pack-and-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> <detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true" <count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true"
@ -201,25 +199,19 @@
refreshData(recordList) { refreshData(recordList) {
// //
var addList = [] var addList = []
this.dataList.forEach(mainItem => {
mainItem.recordList = [];
recordList.forEach(subItem => { recordList.forEach(subItem => {
let mainItem = this.dataList.find(r => //recordList
r.itemCode == subItem.itemCode && if (mainItem.itemCode == subItem.itemCode &&
r.batch == subItem.batch && mainItem.batch == subItem.batch &&
r.inventoryStatus == subItem.inventoryStatus) mainItem.inventoryStatus == subItem.inventoryStatus)
// {
if (mainItem) {
mainItem.scaned = true;
if (!mainItem.recordList) {
mainItem.recordList = []
}
mainItem.recordList.push(subItem) mainItem.recordList.push(subItem)
}else { }else {
// //
var detail = this.createBackAddDetailInfo(subItem) var detail = this.createBackAddDetailInfo(subItem)
if (!detail.recordList) {
detail.recordList = []
}
var recordItem = { var recordItem = {
scaned: true, scaned: true,
isNewJobDetail: "true", isNewJobDetail: "true",
@ -240,17 +232,19 @@
balanceQty: subItem.balanceQty, balanceQty: subItem.balanceQty,
locationCode: subItem.locationCode locationCode: subItem.locationCode
} }
detail.recordList=[];
detail.recordList.push(recordItem) detail.recordList.push(recordItem)
addList.push(detail) addList.push(detail)
} }
}) })
})
if (addList.length > 0) { if (addList.length > 0) {
this.dataList = this.dataList.concat(addList) this.dataList = this.dataList.concat(addList)
} }
this.updateList(false); this.updateList(false);
}, },
@ -313,7 +307,9 @@
var pack = result.package var pack = result.package
var batch = result.label.batch var batch = result.label.batch
var inventoryStatus = result.balance ? result.balance.inventoryStatus : "OK" 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 uom = pack.uom
var locationCode = this.locationCode var locationCode = this.locationCode
this.managementType = managementPrecision; this.managementType = managementPrecision;
@ -331,7 +327,7 @@
toBatch: batch, toBatch: batch,
inventoryStatus: inventoryStatus, inventoryStatus: inventoryStatus,
qty: qty, qty: qty,
handleQty: qty, handleQty: handleQty,
uom: uom, uom: uom,
packUnit: pack.packUnit, packUnit: pack.packUnit,
packQty: pack.packQty, packQty: pack.packQty,

Loading…
Cancel
Save