Browse Source

修改查询库存余额

wms3.0_pda
lijuncheng 1 year ago
parent
commit
22ef9ca1cd
  1. 68
      common/balance.js
  2. 4
      mycomponents/qty/compareQty.vue
  3. 8
      mycomponents/scan/winScanPackAndLocation.vue
  4. 19
      pages/inspect/job/inspectDetail.vue
  5. 10
      pages/purchaseReceipt/job/receiptDetail.vue

68
common/balance.js

@ -38,7 +38,7 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) {
})
}
export function getBalanceByManagementPrecision(label, locationCode, callback) {
export function getBalanceByManagementPrecision(label, locationCode,fromInventoryStatuses, callback) {
let result = {
list: [],
success: true,
@ -53,25 +53,25 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) {
let managementPrecision = res.data[0].ManagementPrecision;
switch (managementPrecision) {
case 'BY_PACKAGING':
byPacking(label, locationCode, res => {
byPacking(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_BATCH':
byBatch(label, locationCode, res => {
byBatch(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_QUANTITY':
byQuantity(label, locationCode, res => {
byQuantity(label, locationCode,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
break;
case 'BY_UNIQUEID':
byUniqueId(label, res => {
byUniqueId(label,fromInventoryStatuses, res => {
res.managementPrecision = managementPrecision;
callback(res);
});
@ -90,7 +90,7 @@ export function getBalanceByManagementPrecision(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byPacking(label, locationCode, callback) {
export function byPacking(label, locationCode,fromInventoryStatuses, callback) {
let result = {
success: true,
message: '',
@ -98,12 +98,12 @@ export function byPacking(label, locationCode, callback) {
};
var filters = []
filters.push({
column: "packing_number",
column: "packingNumber",
action: "==",
value: label.packingNumber
})
filters.push({
column: "item_code",
column: "itemCode",
action: "==",
value: label.itemCode
})
@ -113,10 +113,18 @@ export function byPacking(label, locationCode, callback) {
value: label.batch
})
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
@ -149,10 +157,10 @@ export function byPacking(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byBatch(label, locationCode, callback) {
export function byBatch(label, locationCode,fromInventoryStatuses, callback) {
var filters = []
filters.push({
column: "item_code",
column: "itemCode",
action: "==",
value: label.itemCode
})
@ -162,10 +170,18 @@ export function byBatch(label, locationCode, callback) {
value: label.batch
})
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
@ -202,7 +218,7 @@ export function byBatch(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byQuantity(label, locationCode, callback) {
export function byQuantity(label, locationCode,fromInventoryStatuses, callback) {
let result = {
success: true,
message: '',
@ -211,15 +227,23 @@ export function byQuantity(label, locationCode, callback) {
var filters = []
filters.push({
column: "item_code",
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
@ -250,7 +274,7 @@ export function byQuantity(label, locationCode, callback) {
* @param {Object} locationCode
* @param {Object} callback
*/
export function byUniqueId(label, locationCode, callback) {
export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) {
let param = {
packingNumber: label.packingNumber
};
@ -262,10 +286,18 @@ export function byUniqueId(label, locationCode, callback) {
var filters = []
filters.push({
column: "packing_number",
column: "packingNumber",
action: "==",
value: label.packingNumber
})
if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){
filters.push({
column: "inventoryStatus",
action: "in",
value: fromInventoryStatuses
})
}
var params = {
filters: filters,
@ -305,7 +337,7 @@ export function balanceByLocation(locationCode, callback) {
var filters = []
filters.push({
column: "location_code",
column: "locationCode",
action: "==",
value: locationCode
})

4
mycomponents/qty/compareQty.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-row ">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view v-if="Number(handleQty)>0">
<view >
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
</view>
@ -14,7 +14,7 @@
{{Number(handleQty)}}
</view>
</view>
<view v-if="Number(handleQty)>0" class="std_split">/</view>
<view class="std_split">/</view>
<view class="text_recommend center">
{{Number(recommendQty)}}
</view>

8
mycomponents/scan/winScanPackAndLocation.vue

@ -96,7 +96,8 @@
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
managementPrecision: ''
managementPrecision: '',
fromInventoryStatuses:""
}
},
created() {
@ -135,7 +136,8 @@
}
}
this.$refs.popup.open('bottom');
this.inventoryStatus = []; //
this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
},
@ -201,7 +203,7 @@
} else {
if (result.label != null) {
this.scanResult = result;
getBalanceByManagementPrecision(result.label,this.fromLocationCode,res=>{
getBalanceByManagementPrecision(result.label,this.fromLocationCode,this.fromInventoryStatuses,res=>{
if(res.success){
this.managementPrecision =res.managementPrecision
this.afterQueryBalance(res.data.list);

19
pages/inspect/job/inspectDetail.vue

@ -45,7 +45,7 @@
} from '@/common/basic.js';
import {
getInventoryStatusName,
getDirectoryItemArray
} from '@/common/directory.js';
import {
@ -84,14 +84,13 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationInfo: {},
businessTypeInfo: {},
locationTypeList: [],
fromInventoryStatuses :"",
managementList: [],
selectedItem: {},
failedQty: 0,
crackQty: 0,
inspectType: ""
inspectType: "",
};
},
onLoad(option) {
@ -195,6 +194,9 @@
res.photos = ""
res.inspectResult = ""
})
// that.jobContent.outInventoryStatuses='INSP,OK'
that.jobContent.outInventoryStatuses='HOLD'
that.fromInventoryStatuses = that.jobContent.outInventoryStatuses
that.detailSource = getDataSource(that.subList);
} else {
that.showMessage('列表数据为0');
@ -380,15 +382,6 @@
})
},
getLocationInfo(locationCode) {
getBasicLocationByCode(locationCode).then(res => {
if (res.data.list.length > 0) {
this.toLocationInfo = res.data.list[0]
}
})
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {

10
pages/purchaseReceipt/job/receiptDetail.vue

@ -5,7 +5,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" :locationTypeList='locationTypeList'>
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
</com-receipt-detail-card>
</view>
<u-line />
@ -19,7 +19,7 @@
<view class="">
<required-location ref="requiredLocation" title="默认收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="locationTypeList"></required-location>
:locationTypeList="toLocationTypeList"></required-location>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -89,7 +89,7 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationTypeList: [],
toLocationCode: '',
toLocationInfo: {},
businessTypeInfo: {},
@ -173,8 +173,8 @@
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.locationTypeList = that.locationTypeList;
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.toLocationTypeList = that.toLocationTypeList;
that.subList = res.data.subList;
this.toLocationCode = that.subList[0].toLocationCode
that.detailSource = getDataSource(that.subList)

Loading…
Cancel
Save