Browse Source

修改盘点 三方库收货显示数量

pda_nev
李俊城 12 months ago
parent
commit
c4a5b00527
  1. 42
      fe/PDA/common/mock.js
  2. 7
      fe/PDA/mycomponents/comjob/comJobScanDetail.vue
  3. 2
      fe/PDA/mycomponents/coms/task/comCount.vue
  4. 4
      fe/PDA/pages/return/returnBeforPutaway.vue
  5. 24
      fe/PDA/pages/task/assembleIssueJobDetail.vue
  6. 25
      fe/PDA/pages/task/coatingIssuleJobDetail.vue
  7. 21
      fe/PDA/pages/task/countFgDetail.vue
  8. 54
      fe/PDA/pages/task/countRawDetail.vue
  9. 26
      fe/PDA/pages/task/injectionIssueJobDetail.vue
  10. 25
      fe/PDA/pages/task/kittingIssueJobDetail.vue
  11. 27
      fe/PDA/pages/task/sparePartIssueJobDetail.vue
  12. 18
      fe/PDA/pages/task/thirdLocationDetail.vue
  13. 15
      fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue
  14. 40
      fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue

42
fe/PDA/common/mock.js

@ -0,0 +1,42 @@
const defaultData = {
pageIndex: 1,
pageSize: 20,
name: ''
}
/**模拟后端请求*/
export const simulationReqGetList = function(data = defaultData) {
return new Promise((resolve, reject) => {
let list = []
if (data.pageIndex > 3) {
return resolve(list)
}
const startIndex = data.pageIndex * data.pageSize - data.pageSize
for (let i = startIndex; i < data.pageIndex * data.pageSize; i++) {
if (data.name) {
list.push({
name: `${data.name}${i + 1}条数据`,
code: `${i}-${i + 1}`
})
} else {
list.push({
name: `${i + 1}条数据`,
code: `${i}-${i + 1}`
})
}
}
setTimeout(() => {
return resolve(list)
}, 1000)
})
}
export const getDataList = function() {
let list = []
for (let i = 0; i < 200; i++) {
list.push({
name: `${i + 1}条数据`,
code: `${i}-${i + 1}`
})
}
return list
}

7
fe/PDA/mycomponents/comjob/comJobScanDetail.vue

@ -17,8 +17,9 @@
<view class="text_lightblue">{{scanHint}}</view>
<view class="text_black text_bold">{{ scanCount}}</view>
</view>
<view class="cell_info" v-if="isShowOther">
<view class="text_lightblue">未发数量</view>
<view class="text_lightblue">{{showOther}}</view>
<view class="text_black text_bold">{{ allCount-scanCount}}</view>
</view>
<view class="cell_info" v-if="isShowShouRong">
@ -75,6 +76,10 @@
type: Boolean,
default: false
},
showOther:{
type: String,
default: "未发数量"
},
isShowShouRong:{
type: Boolean,
default: false

2
fe/PDA/mycomponents/coms/task/comCount.vue

@ -6,7 +6,7 @@
</view>
<view class="margin_xs_bottom">
<view class="count_list">
<text>{{datacontent.countStage|countStageDesc}}</text> |
<!-- <text>{{datacontent.countStage|countStageDesc}}</text> | -->
<!-- <text>{{datacontent.type | checkTypeDesc}}</text> | -->
<text>{{datacontent.countMethod |countMethodDesc}}</text> |
<text>{{datacontent.locationCode }}</text>

4
fe/PDA/pages/return/returnBeforPutaway.vue

@ -28,7 +28,7 @@
<script>
import {
getBalancesByFilter,
getBalanceRemoveInAndOutAsync,
returnBeforePutaway,
getDictByCode
} from '@/api/index.js';
@ -143,7 +143,7 @@
packingCode: code,
locationTypes: [6] //
};
getBalancesByFilter(params).then(res => {
getBalanceRemoveInAndOutAsync(params).then(res => {
if (res.totalCount == 0) {
that.showScanMessage('箱码【' + code + '】在【隔离库】未查询到库存信息');
} else if (res.totalCount == 1) {

24
fe/PDA/pages/task/assembleIssueJobDetail.vue

@ -379,6 +379,27 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -431,11 +452,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

25
fe/PDA/pages/task/coatingIssuleJobDetail.vue

@ -379,6 +379,27 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -431,12 +452,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

21
fe/PDA/pages/task/countFgDetail.vue

@ -130,13 +130,14 @@
</view>
<!-- <com-count-items ref='comcountItems' @selectedItem='selectedCountItem'> </com-count-items> -->
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<winScanByCode ref="scanPopup" title="物料号" @getScanCode='getScanResult' @close='closeScanPopup()'></winScanByCode>
<winScanByProductCode ref="scanPopup" title="单件码" @getScanResult='getScanResult' ></winScanByProductCode>
<com-easy-input ref="descPopup" @confirm='closeEditCountDesc'></com-easy-input>
<com-easy-input-count ref="countPopup" @confirm='closeEditCount'></com-easy-input-count>
<win-inventory-status ref="statusPopup"></win-inventory-status>
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></com-message>
<!-- <uni-load-more :status="loadingType" v-if="details.length>0"></uni-load-more> -->
</view>
</template>
@ -187,7 +188,7 @@
import comEasyInput from '@/mycomponents/common/comEasyInput.vue';
import comEasyInputCount from '@/mycomponents/common/comEasyInputCount.vue';
import winInventoryStatus from '@/mycomponents/wincom/winInventoryStatus.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
export default {
components: {
@ -199,7 +200,8 @@
comNumberBox,
comEasyInput,
comEasyInputCount,
winInventoryStatus
winInventoryStatus,
winScanByProductCode
},
data() {
return {
@ -384,7 +386,8 @@
return list.slice(start, end)
},
getScanResult(itemCode){
getScanResult(result){
var itemCode =result.itemCode;
this.getitem(itemCode,res=>{
var result = res;
var itemScan = this.scanAllDetails.filter(r =>
@ -407,6 +410,7 @@
this.addNewDetail(result)
} else if (items.length == 1) {
var item = items[0];
item.isNew =true;
this.setQty(item, item.inventoryQty, true);
} else {
this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据');
@ -549,10 +553,12 @@
detail.inventoryQty = 0;
detail.countQty = 1;
detail.status = 2;
detail.uom =result.basicUom
return detail;
},
setQty(item, qty, isAdd) {
item.countQty = Number(qty);
item.countTime = new Date();
item.IsDelete =false;
@ -574,8 +580,13 @@
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
if(item.isNew){
this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1)
}else {
item.IsDelete = true;
item.modified = true;
}
this.initList();
this.scanPopupGetfocus();
this.calcScanCount();
@ -670,7 +681,7 @@
calcScanCount() {
this.scanCount = this.scanAllDetails.length;
this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length;
},
bindPickerChange(e, item) {

54
fe/PDA/pages/task/countRawDetail.vue

@ -7,6 +7,7 @@
:newCount="newCount" :location="location" :countOrder="datacontent.inventoryStage">
</com-count-scan-detail>
</view>
<!-- <button @click="open">打开</button> -->
<scroll-view scroll-y="true" style="margin-bottom: 50rpx;">
<view v-for="(item ,index) in showList" :key="index">
<view class="detail-content common_card">
@ -144,6 +145,7 @@
<!-- com-message必须放在最下层 -->
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'></com-message>
<!-- <uni-load-more :status="loadingType" v-if="details.length>0"></uni-load-more> -->
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" />
</view>
</template>
@ -242,7 +244,12 @@
pageSize: 20,
jobStatus: "",
index: 0,
showList: []
showList: [],
userForm: {
names: [],
values: [],
origin: []
}
}
},
props: {},
@ -338,6 +345,43 @@
})
},
methods: {
open() {
this.$refs.wzSelectPopup.open({
mode: 'radio', //radio checkbox
// dataList:[], //dataList使proxyConfig
selected: this.userForm.values, //
proxyConfig: { //
reqFun: this.reqGetList, //,Promise.resolve([])
localPaging: false //
},
search: {
type: 'remote', //local | remote
},
fields: {
label: 'name',
value: 'code'
}
})
},
selectCheckbox(mode, data) {
console.log(mode, data)
},
reqGetList(data) {
let params = {
pageSize: data.pageSize,
pageIndex: data.pageIndex,
itemCode:data.searchValue
};
return getBalancesByFilterAsync(params);
// return simulationReqGetList({
// pageIndex: data.pageIndex,
// pageSize: data.pageSize,
// name: data.searchValue
// })
},
initList() {
this.index = 1;
this.showList = []
@ -419,6 +463,7 @@
this.addNewDetail(result)
} else if (items.length == 1) {
var item = items[0];
item.isNew =true;
this.setQty(item, item.inventoryQty, true);
} else {
this.showMessage('盘点数量异常,箱码【' + packingCode + '】的出现多条数据');
@ -573,8 +618,13 @@
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
if(item.isNew){
this.showList.splice(index, 1)
this.scanAllDetails.splice(index, 1)
}else {
item.IsDelete = true;
item.modified = true;
}
// this.scanAllDetails.splice(index, 1);
this.initList();
this.scanPopupGetfocus();
@ -673,7 +723,7 @@
calcScanCount() {
this.scanCount = this.scanAllDetails.length;
this.scanCount = this.scanAllDetails.filter(r=>r.IsDelete==false).length;
},
bindPickerChange(e, item) {

26
fe/PDA/pages/task/injectionIssueJobDetail.vue

@ -379,6 +379,28 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -431,12 +453,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup();
});
},

25
fe/PDA/pages/task/kittingIssueJobDetail.vue

@ -379,6 +379,28 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -431,11 +453,10 @@
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

27
fe/PDA/pages/task/sparePartIssueJobDetail.vue

@ -379,6 +379,28 @@
this.showMessage("扫描的箱码[" + fromData.code + "]的物品不在列表中")
return;
}
if (this.jobStatus == 30) {
if (fromData.code == this.details[0].recommendFromPackingCode) {
this.showMessage("请先完成库移后在扫描箱码")
} else {
setTimeout(res => {
showConfirmMsg("扫描的箱码[" + fromData.code + "]与推荐的箱码[" + this.details[0]
.recommendFromPackingCode +
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data)
}
})
})
}
} else {
this.setData(result,data)
}
},
setData(result,data) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -430,14 +452,11 @@
item.handleToPackingCodeLocationCode = balancesItem.locationCode
}
})
}
this.closeScanPopup()
this.$forceUpdate()
}
this.closeScanPopup()
});
},

18
fe/PDA/pages/task/thirdLocationDetail.vue

@ -2,7 +2,8 @@
<page-meta root-font-size="18px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount" scanHint="已收数量"
:isShowOther="true" showOther="未发数量">
</com-job-scan-detail>
</view>
@ -243,11 +244,13 @@
that.datacontent = item;
that.jobStatus = item.jobStatus
that.details = item.details;
that.allCount = 0;
that.details.forEach(res => {
res.scaned = false;
that.allCount = that.allCount + res.recommendQty
})
that.ispending = item.jobStatus === 2;
that.allCount = item.details.length;
// that.toLocation = item.details[0].recommendLocationCode;
})
.catch(err => {
@ -282,13 +285,18 @@
getScanCount() {
this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
this.scanCount=0;
this.datacontent.details.forEach(res=>{
if(res.scaned){
this.scanCount=this.scanCount+res.handledQty
}
})
// this.scanCount = this.datacontent.details.filter(r => r.scaned).length;
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPopup.closeScanPopup();
}
},
cancel() {

15
fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-list.vue

@ -2,9 +2,18 @@
<view class="wz-list">
<view :class="item.check?'check-item':'list-item'" v-for="(item,index) in list" :key="index"
@click="$emit('checkList',item)">
<view class="" v-if="isShowIcon">
<uni-icons v-if="item.check" type="checkbox-filled" color="#007aff" size="24"></uni-icons>
<uni-icons v-else type="circle" color="#999" size="24"></uni-icons>
<view class="list-item-text">{{item[fields.label]}}</view>
</view>
({{index+1}})
<view class="uni-flex" style="flex-direction: column; font-size: 32rpx;">
<view class="list-item-text">代码 : {{item.itemCode}}</view>
<view class="list-item-text">名称 : {{item.itemName}}</view>
<view class="list-item-text">描述 : {{item.itemDesc1}}</view>
</view>
</view>
<view class="loadmore" @click="$emit('loadmore')">
<view v-if="page.loading == 'loading'" class="icon">
@ -23,6 +32,10 @@
type: Array,
default: () => []
},
isShowIcon: {
type: Boolean,
default: true
},
page: {
type: Object,
default: () => {

40
fe/PDA/uni_modules/wz-select-popup/components/wz-select-popup/wz-select-popup.vue

@ -2,13 +2,20 @@
<view>
<u-popup ref="popup" v-model="showPopup" border-radius="15" mode="center">
<view class="select-popup-content">
<view class="uni-flex" style="display: flex; width: 100%;justify-content: center; ">
<view class="" style=" font-size: 35rpx; margin: 20rpx; font-weight: bold;">
{{title}}
</view>
</view>
<u-line></u-line>
<view class="popup-search">
<wz-search v-model="searchValue" @search="searchData('search')" @clear="searchData('clear')" />
<wz-search v-model="searchValue" @search="searchData('search')" @clear="searchData('clear')" @input="change"/>
</view>
<scroll-view class="popup-scroll-y" :scroll-top="scroll.newTop" scroll-y
:style="{'--popup-scroll-height': scrollH}" @scrolltolower="scrolltolower" @scroll="viewScroll">
<wz-list :list="dataList" :fields="popConfig.fields" :page="pageStatus" @checkList="checkList"
@loadmore="scrolltolower" />
@loadmore="scrolltolower" :isShowIcon="false" />
</scroll-view>
<view v-if="popConfig.mode =='checkbox'" class="footer-button">
<view class="button-item">
@ -54,6 +61,12 @@
type: String,
default: 'bottom'
},
title: {
type: String,
default: '物料查询'
},
},
data() {
return {
@ -90,6 +103,10 @@
this.scroll.oldTop = e.detail.scrollTop
}, 100)
},
change(data){
console.log("输入",data)
this.searchData("search")
},
searchData(type) {
const {
search,
@ -178,20 +195,29 @@
...page,
searchValue: this.searchValue
}).then(list => {
list.items.forEach(res=>{
res.code =res.itemCode
res.name =res.itemName;
})
if (proxyConfig.localPaging) { //
allDataList = list
allDataList = list.items
this.getLocalPagingData()
return
}
this.pageStatus.loading = 'loadmore'
if (!list || list.length != page.pageSize) {
// if (!list.items || list.items.length != page.pageSize) {
// this.pageStatus.loading = 'nomore'
// this.pageStatus.isEmpty = true
// }
if (!list.items || list.items.length ==0) {
this.pageStatus.loading = 'nomore'
this.pageStatus.isEmpty = true
}
this.handleSelected(list)
this.dataList = this.dataList.concat(list)
this.handleSelected(list.items)
this.dataList = this.dataList.concat(list.items)
})
},
close() {
@ -275,7 +301,7 @@
fields
} = this.popConfig
list?.forEach(item => {
const valueCode = item[fields.value]
const valueCode = item.itemCode
const isChecked = selected instanceof Array ? selected.includes(valueCode) : selected ==
valueCode
item.check = isChecked ? true : false

Loading…
Cancel
Save