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

4
mycomponents/qty/compareQty.vue

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

8
mycomponents/scan/winScanPackAndLocation.vue

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

19
pages/inspect/job/inspectDetail.vue

@ -45,7 +45,7 @@
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
getInventoryStatusName, getInventoryStatusName,
getDirectoryItemArray
} from '@/common/directory.js'; } from '@/common/directory.js';
import { import {
@ -84,14 +84,13 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
locationTypeList: [], fromInventoryStatuses :"",
managementList: [], managementList: [],
selectedItem: {}, selectedItem: {},
failedQty: 0, failedQty: 0,
crackQty: 0, crackQty: 0,
inspectType: "" inspectType: "",
}; };
}, },
onLoad(option) { onLoad(option) {
@ -195,6 +194,9 @@
res.photos = "" res.photos = ""
res.inspectResult = "" res.inspectResult = ""
}) })
// that.jobContent.outInventoryStatuses='INSP,OK'
that.jobContent.outInventoryStatuses='HOLD'
that.fromInventoryStatuses = that.jobContent.outInventoryStatuses
that.detailSource = getDataSource(that.subList); that.detailSource = getDataSource(that.subList);
} else { } else {
that.showMessage('列表数据为0'); 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) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (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="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <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> </com-receipt-detail-card>
</view> </view>
<u-line /> <u-line />
@ -19,7 +19,7 @@
<view class=""> <view class="">
<required-location ref="requiredLocation" title="默认收货库位" :locationCode="toLocationCode" <required-location ref="requiredLocation" title="默认收货库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="locationTypeList"></required-location> :locationTypeList="toLocationTypeList"></required-location>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -89,7 +89,7 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], toLocationTypeList: [],
toLocationCode: '', toLocationCode: '',
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
@ -173,8 +173,8 @@
} else { } else {
if (res.data.subList.length > 0) { if (res.data.subList.length > 0) {
that.jobContent = res.data; that.jobContent = res.data;
that.locationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes); that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes);
// that.jobContent.locationTypeList = that.locationTypeList; // that.jobContent.toLocationTypeList = that.toLocationTypeList;
that.subList = res.data.subList; that.subList = res.data.subList;
this.toLocationCode = that.subList[0].toLocationCode this.toLocationCode = that.subList[0].toLocationCode
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)

Loading…
Cancel
Save