niexiting 10 months ago
parent
commit
278b218452
  1. 13
      api/request2.js
  2. 49
      common/directory.js
  3. 4
      common/record.js
  4. 4
      mycomponents/item/itemQty.vue
  5. 16
      mycomponents/popup/selectList.vue
  6. 4
      mycomponents/record/recordComDetailCard.vue
  7. 8
      mycomponents/scan/winComScan.vue
  8. 95
      mycomponents/scan/winScanItem.vue
  9. 66
      mycomponents/scan/winScanPackAndLocation.vue
  10. 10
      mycomponents/workStation/workStation.vue
  11. 2
      pages/container/coms/comPalletRecord.vue
  12. 4
      pages/count/coms/comCountDetailCard.vue
  13. 2
      pages/customerReturn/coms/comReturnRecord.vue
  14. 75
      pages/customerReturn/request/customerReturnRequestCreate.vue
  15. 11
      pages/deliver/coms/comDeliverRequestPopup.vue
  16. 11
      pages/deliver/coms/comScanDeliverPack.vue
  17. 5
      pages/deliver/job/deliverDetail.vue
  18. 2
      pages/index/index.vue
  19. 2
      pages/inventoryMove/coms/comMoveRecordCard.vue
  20. 21
      pages/issue/coms/comIssueDetailCard.vue
  21. 2
      pages/issue/coms/comIssueRequestCreator.vue
  22. 166
      pages/issue/coms/comIssueRequestPopup.vue
  23. 11
      pages/issue/coms/comScanIssuePack.vue
  24. 13
      pages/issue/job/issueDetail.vue
  25. 58
      pages/issue/record/issueRecord.vue
  26. 48
      pages/issue/request/issueRequestCreate.vue
  27. 4
      pages/productPutaway/coms/comPutawayRequestCard.vue
  28. 4
      pages/productPutaway/request/putawayRequestDetail.vue
  29. 12
      pages/productionReturn/coms/comReturnCommonRequest.vue
  30. 2
      pages/productionReturn/coms/comReturnRecord.vue
  31. 64
      pages/productionReturn/coms/comReturnRequestPopup.vue
  32. 11
      pages/productionReturn/record/returnToStore.vue
  33. 22
      pages/productionReturn/request/returnRequestCreate.vue
  34. 2
      pages/purchaseReturn/record/returnRecord.vue
  35. 3
      pages/purchaseReturn/request/returnRequestCreate.vue
  36. 2
      pages/query/container.vue
  37. 2
      pages/query/item.vue
  38. 2
      pages/query/item_copy.vue
  39. 41
      pages/repleinsh/coms/comRepleinshRequestPopup.vue
  40. 2
      pages/repleinsh/coms/comRepleishDetailCard.vue
  41. 13
      pages/repleinsh/coms/comScanReplishPack.vue
  42. 33
      pages/repleinsh/job/repleinshDetail.vue
  43. 12
      pages/repleinsh/record/repleinshRecord.vue
  44. 2
      pages/unPlanned/coms/comReceiptRecord.vue
  45. 62
      pages/unPlanned/coms/comReceiptRequestPopup.vue
  46. 18
      pages/unPlanned/request/receiptRequestCreate.vue
  47. 4
      router/index.js

13
api/request2.js

@ -96,6 +96,19 @@ export function updateUserPwd(oldPassword, newPassword) {
}) })
} }
/**
* 获取仓库代码
* @param {*}
*
*/
export function getWarehouseCodeList(pageNo,pageSize) {
return request({
url: baseApi + "/wms/warehouse/page?pageNo="+pageNo+"&pageSize="+pageSize,
method: "get",
data: {},
});
}
/** /**
* 获取消息列表 * 获取消息列表
* @param {*} * @param {*}

49
common/directory.js

@ -1,5 +1,6 @@
let jobStatusList = []; let jobStatusList = [];
let itemStatusList = []; let itemStatusList = [];
let itemTypeList =[];
let locationTypeList = []; let locationTypeList = [];
let uomList = []; let uomList = [];
let inventoryStatusList = []; let inventoryStatusList = [];
@ -39,6 +40,7 @@ export function getBusinessTypeDesc(type) {
export function clearCacheData() { export function clearCacheData() {
jobStatusList = []; jobStatusList = [];
itemStatusList = []; itemStatusList = [];
itemTypeList =[];
locationTypeList = []; locationTypeList = [];
uomList = []; uomList = [];
inventoryStatusList = []; inventoryStatusList = [];
@ -143,16 +145,57 @@ export function getJobStateStyle(value) {
} }
} }
//获取库位描述 //获取库位描述(多个库位)
export function getListLocationTypeDesc(lst) { export function getListLocationTypeDesc(list) {
let desc = ''; let desc = '';
lst.forEach(res => { list.forEach(res => {
desc += getLocationTypeInfo(res).label + "," desc += getLocationTypeInfo(res).label + ","
}) })
desc = desc.slice(0, -1); desc = desc.slice(0, -1);
return desc; return desc;
} }
//获取物品状态(多个状态)
export function getListItemStateDesc(list) {
let desc = '';
list.forEach(res => {
desc += getItemStateInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品类型(多个)
export function getListItemTypeDesc(list) {
let desc = '';
list.forEach(res => {
desc += getItemTypeInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品类型
export function getItemTypeInfo(value) {
var resultInfo = "";
if (itemTypeList.length == 0) {
itemTypeList = getDirectoryInfo("item_type")
}
if (itemTypeList.length > 0) {
for (let item of itemTypeList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取物品状态 //获取物品状态
export function getItemStateInfo(value) { export function getItemStateInfo(value) {
var resultInfo = ""; var resultInfo = "";

4
common/record.js

@ -58,6 +58,8 @@ export function getBusinessType(typeCode, callback) {
businessType: '', businessType: '',
fromlocationTypeList: '', fromlocationTypeList: '',
tolocationTypeList: '', tolocationTypeList: '',
itemCodeTypeList:"",
useOnTheWay:"FALSE",
fromInventoryStatuses: '', fromInventoryStatuses: '',
toInventoryStatuses: '', toInventoryStatuses: '',
message: '' message: ''
@ -67,8 +69,10 @@ export function getBusinessType(typeCode, callback) {
result.businessType = res.data.list[0]; result.businessType = res.data.list[0];
result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes) result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes)
result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes) result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes)
result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses; result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses; result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;
result.useOnTheWay =res.data.list[0].useOnTheWay
callback(result) callback(result)
} else { } else {
result.success = false; result.success = false;

4
mycomponents/item/itemQty.vue

@ -6,7 +6,7 @@
<view> <view>
<!-- showBalanceQty --> <!-- showBalanceQty -->
<balanceQty v-if="showItemQty" :dataContent="dataContent"></balanceQty> <balanceQty v-if="isShowBalanceQty" :dataContent="dataContent"></balanceQty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack"> :handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack">
</compare-qty> </compare-qty>
@ -45,7 +45,7 @@
type: Number, type: Number,
default: 0 default: 0
}, },
showItemQty: { isShowBalanceQty: {
type: Boolean, type: Boolean,
default: true default: true
}, },

16
mycomponents/popup/selectList.vue

@ -1,18 +1,20 @@
<template> <template>
<uni-popup ref="popupItems"> <uni-popup ref="popupItems">
<com-popup @onClose="closePopup"> <com-popup @onClose="closePopup">
<view class=""> <view class="uni-center" style="position: relative;height:900rpx ;">
<view class="uni-center" style="font-size: 40rpx;margin-top: 10rpx;margin-bottom: 10rpx;"> <view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;">
选择物料 选择物料
</view> </view>
<u-line/> <u-line/>
<view style="margin: 20rpx;" v-for="(item, index) in showList" :key="index" > <view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;">
<view class="" style="padding: 10rpx;" @click="selectItem(item)"> <view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" >
物料: {{item.itemCode}} <view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)">
({{index+1}}) 物料: {{item.itemCode}}
</view> </view>
<u-line/> <u-line/>
</view> </view>
</view> </view>
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;">
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" > <view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" >
<view class=""> <view class="">
当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }} 当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }}
@ -22,7 +24,8 @@
<view class=""> <view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" /> <uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view> </view>
</view>
</view>
</com-popup> </com-popup>
</uni-popup> </uni-popup>
@ -31,7 +34,6 @@
<script> <script>
import { import {
getProductionlineItem,
getCustomerItemList getCustomerItemList
} from '@/api/request2.js'; } from '@/api/request2.js';
import comPopup from '@/mycomponents/common/comPopup.vue' import comPopup from '@/mycomponents/common/comPopup.vue'

4
mycomponents/record/recordComDetailCard.vue

@ -6,7 +6,7 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true" :showBalanceQty="isShowItemQty"></item-qty> :isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</template> </template>
@ -86,7 +86,7 @@
default: true default: true
}, },
isShowItemQty: { isShowBalanceQty: {
type: Boolean, type: Boolean,
default: false default: false
}, },

8
mycomponents/scan/winComScan.vue

@ -141,13 +141,19 @@
// }) // })
let that = this; let that = this;
let index = that.scanMsg.indexOf('\n'); let index = that.scanMsg.indexOf('\n');
if (index > 0) { if (index >= 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
if (content == "") { if (content == "") {
that.getfocus(); that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) {
that.scanMsg=""
that.getfocus();
}
})
return; return;
} }

95
mycomponents/scan/winScanItem.vue

@ -13,9 +13,7 @@
</view> </view>
<view class=""> <view class="">
<view class=""> <view class="">
<win-com-scan ref="scan" @getResult="getScanResult" <win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false"
:placeholder='title'
:clearResult="false"
headerType="HMQ,HPQ"> headerType="HMQ,HPQ">
</win-com-scan> </win-com-scan>
</view> </view>
@ -23,17 +21,30 @@
</view> </view>
</uni-popup> </uni-popup>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import {
getBasicItemByCode
} from '@/api/request2.js';
import {
checkDirectoryItemExist,
getListItemTypeDesc,
getItemTypeInfo
} from '@/common/directory.js';
import winComScan from '@/mycomponents/scan/winComScan.vue' import winComScan from '@/mycomponents/scan/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
export default { export default {
name: 'winScanItem', name: 'winScanItem',
components: { components: {
winComScan winComScan,
comMessage
}, },
emits: ["getScanCode", 'getScanResult'], emits: ["getScanCode", 'getScanResult'],
props: { props: {
@ -44,7 +55,11 @@
isShowRecord: { isShowRecord: {
type: Boolean, type: Boolean,
default: true default: true
} },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
data() { data() {
return { return {
@ -80,22 +95,76 @@
this.$refs.scan.clearScanValue(); this.$refs.scan.clearScanValue();
}, },
getScanResult(result) { getScanResult(result) {
uni.showLoading({
title: '扫描中...',
mask: true
});
var scanResult = result;
if (scanResult.label.barType == "QRCode") {
this.code = scanResult.label.itemCode;
} else if (scanResult.label.barType == "BarCode") {
this.code = scanResult.label.code;
}
if (this.code == undefined) {
uni.hideLoading();
this.showErrorMessage("扫描物料[" + this.code + "]为空,请输入正确的物料")
return
}
getBasicItemByCode(this.code).then(res => {
uni.hideLoading();
if (res.data != null && res.data.list.length > 0) {
var result =res.data.list[0];
var status =result.status;
var type = result.type;
var itemCode = result.code
var itemName =result.name
var uom = result.uom
var std = result.uom
result.package = scanResult.package
if(status=="ENABLE"){
if(checkDirectoryItemExist(this.itemCodeTypeList,type)){
this.result =result; this.result =result;
if (result.label.barType == "QRCode") { this.callBack()
this.code = result.label.itemCode; }else {
} else if (result.label.barType == "BarCode") { var hint = getListItemTypeDesc(this.itemCodeTypeList);
this.code = result.label.code; this.showErrorMessage("扫描物料[" + this.code + "]是[" +
getItemTypeInfo(type).label + "],需要的物料类型是[" + hint + "]")
} }
this.callBack(); }else {
this.showErrorMessage('物料【' + this.code + '】不可用');
}
} else {
this.showErrorMessage('未查找到物料【' + this.code + '】');
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
}, },
callBack() { callBack() {
this.closeScanPopup();
this.$refs.scan.clear(); this.$refs.scan.clear();
this.$emit("getScanCode", this.code); // this.$emit("getScanCode", this.code);
this.$emit("getScanResult", this.code, this.result); this.$emit("getScanResult", this.code, this.result);
}, },
change(e) { change(e) {
this.isShow = e.show this.isShow = e.show
} },
showErrorMessage(message) {
this.losefocus();
this.$refs.comMessage.showErrorMessage(message, res => {
this.code = '';
this.getfocus();
})
},
getfocus() {
this.$refs.scan.getfocus();
},
losefocus() {
this.$refs.scan.losefocus();
},
} }
} }
</script> </script>

66
mycomponents/scan/winScanPackAndLocation.vue

@ -28,7 +28,7 @@
<view v-if='allowModifyLocation'> <view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" <uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
@confirm="scanLocation" style='height: 30rpx;border:1px solid #fff ;'></uni-combox> @confirm="" style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view> </view>
<view v-else> <view v-else>
<text style="padding: 5px"> <text style="padding: 5px">
@ -121,7 +121,8 @@
businessType: {}, businessType: {},
inventoryStatus: [], inventoryStatus: [],
managementPrecision: '', managementPrecision: '',
fromInventoryStatuses: "" fromInventoryStatuses: "",
isCheck:false
} }
}, },
created() { created() {
@ -167,20 +168,30 @@
this.$emit("close", ''); this.$emit("close", '');
}, },
scanLocation() {
scanLocation(scanResult) {
var isCheck = false;
if (this.fromLocationCode == '') { if (this.fromLocationCode == '') {
this.showMessage('来源库位不能为空', callback => { this.showErrorMessage('来源库位不能为空', callback => {
this.locationGetFocus();
})
return;
}
if(this.fromLocationList.length>0){
if(!this.isInLocationList(this.fromLocationCode)){
this.showErrorMessage("扫描库位【"+this.fromLocationCode+'】不在任务来源库位中', callback => {
this.locationGetFocus(); this.locationGetFocus();
}) })
return; return;
} }
}
uni.showLoading({ uni.showLoading({
title: '扫描中...', title: '扫描中...',
mask: true mask: true
}); });
getBasicLocationByCode(this.fromLocationCode).then(res => { getBasicLocationByCode(this.fromLocationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) { if (res.data.total > 0) {
let result = res.data.list[0]; let result = res.data.list[0];
var type = result.type; var type = result.type;
@ -188,8 +199,10 @@
if (available == "TRUE") { if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) { if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) {
this.location = result; this.location = result;
this.packGetFocus(); // this.packGetFocus();
this.checkPackage(scanResult);
} else { } else {
uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray); var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" + this.showErrorMessage("库位[" + this.fromLocationCode + "]是" +
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => { getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => {
@ -197,11 +210,13 @@
}) })
} }
} else { } else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => { this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus(); this.locationGetFocus();
}) })
} }
} else { } else {
uni.hideLoading();
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => { this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => {
this.locationGetFocus(); this.locationGetFocus();
}) })
@ -215,13 +230,21 @@
}, },
getScanResult(result) { getScanResult(result) {
console.log("扫描", result) // console.log("", result)
if (this.fromLocationCode == '' || this.fromLocationCode == null) { // if (this.fromLocationCode == '' || this.fromLocationCode == null) {
this.showMessage('请先扫描来源库位', callback => { // this.showMessage('', callback => {
this.locationGetFocus(); // this.locationGetFocus();
}) // })
return; // return;
} else { // } else
this.scanLocation(result);
// debugger
// if(this.isCheck){
// this.checkPackage(result);
// }
},
checkPackage(result){
if (result.label != null) { if (result.label != null) {
this.scanResult = result; this.scanResult = result;
// uni.showLoading({ // uni.showLoading({
@ -230,6 +253,7 @@
// }) // })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses, getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => { res => {
uni.hideLoading();
if (res.success) { if (res.success) {
this.managementPrecision = res.managementPrecision this.managementPrecision = res.managementPrecision
this.afterQueryBalance(res.data.list); this.afterQueryBalance(res.data.list);
@ -241,9 +265,9 @@
// uni.hideLoading(); // uni.hideLoading();
}); });
} }
}
}, },
afterQueryBalance(datas) { afterQueryBalance(datas) {
if (this.allowNullBalance) { if (this.allowNullBalance) {
this.allowNoneBalance(datas); this.allowNoneBalance(datas);
@ -400,6 +424,20 @@
change(e) { change(e) {
this.show = e.show this.show = e.show
}, },
isInLocationList(location) {
var item = this.fromLocationList.find(res => res == location)
if (item = undefined) {
return false
}
return true
},
addLocationCode(code) {
if (!this.isInLocationList(code)) {
this.fromLocationList.push(code)
}
}
} }
} }
</script> </script>

10
mycomponents/workStation/workStation.vue

@ -2,6 +2,11 @@
<view class="header_job_top"> <view class="header_job_top">
<view class="cen_card"> <view class="cen_card">
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
<view class="cell_info" v-if="fromWarehouseCode!=''">
<view class="text_lightblue">仓库</view>
<view>{{fromWarehouseCode}}</view>
</view>
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">车间</view> <view class="text_lightblue">车间</view>
<view>{{workshopCode}}</view> <view>{{workshopCode}}</view>
@ -37,6 +42,11 @@
watch: {}, watch: {},
props: { props: {
fromWarehouseCode:{
type: String,
default: ""
},
workshopCode: { workshopCode: {
type: String, type: String,
default: "" default: ""

2
pages/container/coms/comPalletRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title> <template v-slot:title>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" <item-qty :dataContent="dataContent"
:isShowBalance="true"></item-qty> :isShowBalance="true"></item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>

4
pages/count/coms/comCountDetailCard.vue

@ -6,10 +6,10 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty v-if="settingParam.isOpenCount=='TRUE'" :dataContent="dataContent" <item-qty v-if="settingParam.isOpenCount=='TRUE'" :dataContent="dataContent"
:handleQty="dataContent.handleQty" :showBalanceQty="true"> :handleQty="dataContent.handleQty" :isShowBalanceQty="true">
</item-qty> </item-qty>
<item-qty v-else :dataContent="dataContent" :handleQty="dataContent.handleQty" <item-qty v-else :dataContent="dataContent" :handleQty="dataContent.handleQty"
:showBalanceQty="false" :showRecommendQty="false" :showStdPack="true"> :isShowBalanceQty="false" :showRecommendQty="false" :showStdPack="true">
</item-qty> </item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>

2
pages/customerReturn/coms/comReturnRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title> <template v-slot:title>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" <item-qty :dataContent="dataContent"
:isShowBalance="true"></item-qty> :isShowBalance="true"></item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>

75
pages/customerReturn/request/customerReturnRequestCreate.vue

@ -1,13 +1,13 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='getLocation' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<view class="page-wraper" v-if="detailSource.length>0"> <view class="page-wraper" v-if="detailSource.length>0">
<view class="uni-flex uni-row padding title u-col-center" @click="showSelect"> <view class="uni-flex uni-row padding title u-col-center" @click="showSelect" style="font-size: 35rpx;">
<text>客户 : </text> <text style="font-size: 32rpx;">客户 : </text>
<view class="uni-flex u-col-center uni-row" @click="showSelect"> <view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx;"> <view class="" style="margin-left: 20rpx;font-size: 32rpx;">
{{customerName}} {{customerName}}
</view> </view>
<u-select v-model="showCustomer" mode="single-column" :list="customerList" @confirm="confirmSelect"> <u-select v-model="showCustomer" mode="single-column" :list="customerList" @confirm="confirmSelect">
@ -17,13 +17,12 @@
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<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="">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true" <record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
:isShowToLocation="false" @removeItem="removeItem(index,item)" @updateData="updateData" :isShowBalanceQty="false" :isShowToLocation="false" @removeItem="removeItem(index,item)"
@removePack="removePack"> @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
</view> </view>
@ -56,7 +55,9 @@
</template> </template>
<script> <script>
import { calc } from '@/common/calc' import {
calc
} from '@/common/calc'
import { import {
customerReturnRequestSubmit, customerReturnRequestSubmit,
getBasicCustomerList getBasicCustomerList
@ -72,6 +73,7 @@
import { import {
goHome, goHome,
updateTitle, updateTitle,
deepCopyData,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -270,10 +272,10 @@
}, },
commit() { commit() {
// if (this.toLocationCode == "") { if (this.customerName == ""||this.customerName == "请选择退货客户") {
// this.showMessage("") this.showErrorMessage("请选择退货客户")
// return; return;
// } }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
// //
uni.showLoading({ uni.showLoading({
@ -329,40 +331,47 @@
setParams() { setParams() {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.customerCode = 'CF';
this.dataContent.fromWarehouseCode = this.fromLocation.warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
detail.itemCode = detail.itemCode; var submitItem = deepCopyData(detail)
detail.itemName = detail.package.itemName; submitItem.itemCode = detail.itemCode;
detail.itemDesc1 = detail.package.itemDesc1; submitItem.itemName = detail.package.itemName;
detail.itemDesc2 = detail.package.itemDesc2; submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus; submitItem.inventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = 'HOLD'; submitItem.toInventoryStatus = 'HOLD';
detail.fromPackingNumber = detail.packingNumber; submitItem.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = detail.packingNumber; submitItem.toPackingNumber = detail.packingNumber;
detail.fromContainerNumber = detail.containerNumber; submitItem.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = detail.batch; submitItem.fromBatch = detail.batch;
detail.toBatch = detail.batch; submitItem.toBatch = detail.batch;
detail.fromLocationCode = detail.locationCode; submitItem.qty = detail.handleQty;
detail.toLocationCode = 'HOLD';
subList.push(detail) submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = 'HOLD';
submitItem.package = ""
subList.push(submitItem)
} }
}) })
}) })
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.customerCode = this.customerCode;
this.dataContent.fromWarehouseCode = this.fromLocation.warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent; return this.dataContent;
}, },
@ -415,6 +424,8 @@
this.toLocationCode = ''; this.toLocationCode = '';
this.dataContent = {} this.dataContent = {}
this.toWarehouseCode = "" this.toWarehouseCode = ""
this.customerName ="请选择退货客户"
this.customerCode =""
}, },
updateData() { updateData() {

11
pages/deliver/coms/comDeliverRequestPopup.vue

@ -42,7 +42,7 @@
<text>数量 : </text> <text>数量 : </text>
<view class="uni-flex uni-row uni-center" <view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;"> style="align-items: center;margin-left: 20rpx;">
<input style="text-align: center;" class="qty_input" v-model="qty" type="number" <input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" /> @confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
<uom :uom="uom"></uom> <uom :uom="uom"></uom>
@ -104,7 +104,7 @@
requestInfo: null, requestInfo: null,
itemCodeList: [], itemCodeList: [],
isCheckItemCode: false, isCheckItemCode: false,
counQty: 0, counQty: undefined,
editPosition: true, editPosition: true,
numberFocus: false, numberFocus: false,
uom: "", uom: "",
@ -162,7 +162,7 @@
this.itemCode = ""; this.itemCode = "";
this.uom = "" this.uom = ""
this.qty = 0 this.qty = 0
this.counQty =0; this.counQty =undefined;
this.itemCodeGetFocus(); this.itemCodeGetFocus();
} }
@ -200,6 +200,11 @@
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) { if (this.qty == 0) {
this.showErrorMessage("数量必须大于0") this.showErrorMessage("数量必须大于0")
return return

11
pages/deliver/coms/comScanDeliverPack.vue

@ -3,10 +3,17 @@
<uni-popup ref="popup" :maskClick='false'> <uni-popup ref="popup" :maskClick='false'>
<view class=""> <view class="">
<view class="popup_box"> <view class="popup_box">
<view class="pop_title"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描箱码 扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view> </view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center; <!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff; background-color: #fff;
margin-left: 20rpx; margin-left: 20rpx;

5
pages/deliver/job/deliverDetail.vue

@ -224,7 +224,7 @@
}) })
//使 //使
if (this.jobContent.useOnTheWayLocation == 'TRUE') { if (locationCode == null) {
this.submitJob(); this.submitJob();
} else { } else {
// //
@ -280,8 +280,7 @@
record.supplierCode = r.supplierCode; record.supplierCode = r.supplierCode;
//使 //使
if (this.jobContent.useOnTheWayLocation == if (this.toLocationCode ==null) {
'TRUE') {
record.toPackingNumber = r record.toPackingNumber = r
.packingNumber; .packingNumber;
record.toBatch = r.batch; record.toBatch = r.batch;

2
pages/index/index.vue

@ -317,7 +317,7 @@
}, },
getDictory() { getDictory() {
var params = { var params = {
types: ["job_status", "location_type", "item_status", "uom", types: ["job_status", "location_type", "item_status","item_type","uom",
"inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason", "inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason",
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason", "unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode", "request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",

2
pages/inventoryMove/coms/comMoveRecordCard.vue

@ -6,7 +6,7 @@
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" <item-qty :dataContent="dataContent"
:showBalanceQty="false" :isShowBalanceQty="false"
:isShowBalance="true"></item-qty> :isShowBalance="true"></item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>

21
pages/issue/coms/comIssueDetailCard.vue

@ -8,7 +8,12 @@
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<!-- 物品 --> <!-- 物品 -->
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty> <item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent"> <!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> --> </com-issue-request-info> -->
</template> </template>
@ -68,11 +73,12 @@
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import { import {
getDetailOption, getDetailOption,
getEditRemoveOption getEditRemoveOption,
getRemoveOption
} from '@/common/array.js'; } from '@/common/array.js';
export default { export default {
emits: ['updateData'], emits: ['updateData',"removeItemCode"],
components: { components: {
itemQty, itemQty,
recommend, recommend,
@ -107,13 +113,15 @@
editItem: {}, editItem: {},
batchItem: {}, batchItem: {},
detailOptions: [], detailOptions: [],
scanOptions: [] scanOptions: [],
removeOptions:[]
} }
}, },
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption(); this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
}, },
methods: { methods: {
@ -136,6 +144,13 @@
} }
}, },
itemCoceClick(e,item,index){
if (e.content.text == "移除") {
this.dataContent.Items.splice(index, 1);
this.$emit('removeItemCode')
}
},
edit(batch, item) { edit(batch, item) {
let that = this; let that = this;
that.editItem = item; that.editItem = item;

2
pages/issue/coms/comIssueRequestCreator.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-column"> <view class="uni-flex uni-column">
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent"> <!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</com-issue-request-info> --> </com-issue-request-info> -->
<work-station :workshopCode="dataContent.workShopCode" :productionLineCode="dataContent.productionLineCode" <work-station :fromWarehouseCode="dataContent.fromWarehouseCode" :workshopCode="dataContent.workshopCode" :productionLineCode="dataContent.productionLineCode"
:workStationCode="dataContent.workStationCode" :rawLocationCode="dataContent.toLocationCode"></work-station> :workStationCode="dataContent.workStationCode" :rawLocationCode="dataContent.toLocationCode"></work-station>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">

166
pages/issue/coms/comIssueRequestPopup.vue

@ -13,6 +13,18 @@
<u-line /> <u-line />
<view class="uni-flex uni-column" style="background-color: white; "> <view class="uni-flex uni-column" style="background-color: white; ">
<view class="uni-flex uni-column "> <view class="uni-flex uni-column ">
<view class="uni-flex uni-row padding title u-col-center">
<text>从仓库代码</text>
<view class="uni-flex u-col-center uni-row" @click="showWarseHouseSelect">
<view class="" style="margin-left: 20rpx;width: 100% ">
{{fromWarehouseCode}}
</view>
<u-select v-model="showWareHouse" mode="single-column" :list="wareHouseList"
@confirm="confirmWareHouse"></u-select>
</view>
</view>
<u-line />
<view class="uni-flex uni-row padding title u-col-center"> <view class="uni-flex uni-row padding title u-col-center">
<text>位置</text> <text>位置</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect"> <view class="uni-flex u-col-center uni-row" @click="showSelect">
@ -36,18 +48,20 @@
</image> </image>
</view> </view>
</view> </view>
<u-line />
<u-line />
<view class="uni-flex uni-row padding title u-col-center"> <view class="uni-flex uni-row padding title u-col-center">
<text>数量 </text> <text>数量 </text>
<view class="uni-flex uni-row uni-center" <view class="uni-flex uni-row uni-center"
style="display: flex; align-items: center;margin-left: 20rpx;justify-content: center;"> style="display: flex; align-items: center;margin-left: 20rpx;justify-content: center;">
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number" <input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" /> @confirm="confirm()" :focus="numberFocus" @input="checkNum"
:maxlength="maxlength" />
<uom :uom="uom"></uom> <uom :uom="uom"></uom>
<view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;"> <view class="" v-if="stdPackInfo!=undefined"
style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>) (<stdPackQty :dataContent="stdPackInfo"></stdPackQty>)
</view> </view>
</view> </view>
@ -62,7 +76,8 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult'
:itemCodeTypeList="itemCodeTypeList">
</win-scan-item> </win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -73,7 +88,8 @@
getBasicLocationByCode, getBasicLocationByCode,
getBasicItemByCode, getBasicItemByCode,
getProductionlineItem, getProductionlineItem,
getWorkShopLineStation getWorkShopLineStation,
getWarehouseCodeList
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getLocationTypeName, getLocationTypeName,
@ -86,18 +102,16 @@
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue' import winScanItem from '@/mycomponents/scan/winScanItem.vue'
export default { export default {
components: { components: {
uom, uom,
balanceStatus, balanceStatus,
comMessage, comMessage,
winScanItem, winScanItem,
stdPackQty stdPackQty,
}, },
data() { data() {
return { return {
// itemCode: 'CE115F11161AG',
workshopCode: "", // workshopCode: "", //
workShopName: "", workShopName: "",
productionLineCode: "", //线 productionLineCode: "", //线
@ -105,6 +119,7 @@
workStationCode: "", // workStationCode: "", //
workStationName: "", workStationName: "",
itemCode: '请扫描物料信息', itemCode: '请扫描物料信息',
fromWarehouseCode: "请选择仓库代码",
itemName: "", itemName: "",
qty: 0, qty: 0,
rawLocationCode: "", rawLocationCode: "",
@ -112,7 +127,6 @@
itemCodeFocus: false, itemCodeFocus: false,
requestInfo: null, requestInfo: null,
itemCodeList: [], itemCodeList: [],
isCheckItemCode: false,
counQty: undefined, counQty: undefined,
editPosition: true, editPosition: true,
numberFocus: false, numberFocus: false,
@ -123,7 +137,9 @@
positionList: [], positionList: [],
stdQty: 0, // stdQty: 0, //
maxlength: 10, maxlength: 10,
stdPackInfo:undefined stdPackInfo: undefined,
wareHouseList: [],
showWareHouse: false
} }
}, },
props: { props: {
@ -131,6 +147,10 @@
type: String, type: String,
default: '需求信息' default: '需求信息'
}, },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
methods: { methods: {
checkNum(e) { checkNum(e) {
@ -151,19 +171,28 @@
openRequestPopup(editPosition) { openRequestPopup(editPosition) {
if (this.positionList.length == 0) { if (this.positionList.length == 0) {
getWorkShopLineStation().then(res => { getWorkShopLineStation().then(res => {
if (res.data != null && res.data.length > 0) {
this.positionList = res.data this.positionList = res.data
}).catch(error => { } else {
this.showErrorMessage('未查找到位置信息');
}
}).catch(error => {
this.showErrorMessage(error);
}) })
} }
this.editPosition = editPosition; this.editPosition = editPosition;
if (this.isModifiedPosition) { if (this.isModifiedPosition) {
this.isModifiedPosition = false this.isModifiedPosition = false
} else { } else {
this.itemCode = ""; this.itemCode = "请扫描物料信息";
this.show = false
this.showWareHouse = false
this.uom = "" this.uom = ""
this.qty = 0; this.qty = 0;
this.stdPackInfo = undefined;
this.counQty = undefined; this.counQty = undefined;
this.numberFocus = false this.numberFocus = false
this.itemCodeGetFocus(); this.itemCodeGetFocus();
@ -171,6 +200,29 @@
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, },
initData() {
this.positionList = [];
this.wareHouseList= [],
this.showWareHouse = false
this.editPosition =true;
this.itemCode = "请扫描物料信息";
this.rawLocationCode = ""
this.positionInfo = "请选择位置"
this.fromWarehouseCode = "请选择仓库代码"
this.workshopCode = "" //
this.workShopName = ""
this.productionLineCode = "" //线
this.productionLineName = ""
this.workStationCode = "" //
this.workStationName = ""
this.show = false
this.uom = ""
this.qty = 0;
this.stdPackInfo = undefined;
this.counQty = undefined;
this.numberFocus = false
},
closeRequestPopup() { closeRequestPopup() {
this.$refs.popup.close() this.$refs.popup.close()
}, },
@ -188,13 +240,20 @@
itemCodeLoseFocus() { itemCodeLoseFocus() {
this.itemCodeFocus = false; this.itemCodeFocus = false;
}, },
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() { confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.positionInfo == "请选择位置") {
this.showErrorMessage("请选择位置")
return
}
if (this.fromWarehouseCode == "请选择仓库代码") {
this.showErrorMessage("请选择仓库代码")
return
}
if (this.itemCode == "请扫描物料信息") {
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
@ -215,28 +274,6 @@
this.callback('add'); this.callback('add');
}, },
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.scanPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) { callback(action) {
let item = { let item = {
positionInfo: this.positionInfo, positionInfo: this.positionInfo,
@ -248,6 +285,8 @@
workStationName: this.workStationName, workStationName: this.workStationName,
rawLocationCode: this.rawLocationCode, rawLocationCode: this.rawLocationCode,
fgLocationCode: this.fgLocationCode, fgLocationCode: this.fgLocationCode,
fromWarehouseCode: this.fromWarehouseCode,
toWarehouseCode: this.fromWarehouseCode,
itemCode: this.itemCode, itemCode: this.itemCode,
itemName: this.itemName, itemName: this.itemName,
uom: this.uom, uom: this.uom,
@ -267,8 +306,7 @@
} }
}) })
if (type == "itemCode") { if (type == "itemCode") {
this.itemCode = "" this.itemCode = "请扫描物料信息"
this.isCheckItemCode = false;
} }
}) })
}, },
@ -282,8 +320,14 @@
if (this.editPosition) { if (this.editPosition) {
this.show = true this.show = true
} }
},
showWarseHouseSelect() {
if (this.editPosition) {
this.wareHouseClick();
}
}, },
confirmSelect(e) { confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo) console.log("位置", this.positionInfo)
@ -315,14 +359,42 @@
}, },
getItemScanResult(code, scanResult) { getItemScanResult(code, scanResult) {
if (code == "") { this.itemCode = code;
this.showErrorMessage('物料号不能为空') this.itemName = scanResult.name
return; this.uom = scanResult.uom
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package; this.stdPackInfo = scanResult.package;
this.numberFocus = true
},
wareHouseClick() {
uni.showLoading({
title: "查询中....",
mask: true
});
getWarehouseCodeList(1, 100).then(res => {
uni.hideLoading()
if (res.data != null && res.data.list.length > 0) {
res.data.list.forEach(item => {
item.value = item.code;
item.label = item.name;
})
this.wareHouseList = res.data.list
this.showWareHouse = true
} else {
this.showErrorMessage('未查找到仓库代码');
} }
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error);
})
},
confirmWareHouse(e) {
this.fromWarehouseCode = e[0].value;
},
} }
} }
</script> </script>

11
pages/issue/coms/comScanIssuePack.vue

@ -3,9 +3,16 @@
<uni-popup ref="popup" :maskClick='false'> <uni-popup ref="popup" :maskClick='false'>
<view class=""> <view class="">
<view class="popup_box"> <view class="popup_box">
<view class="pop_title">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描箱码 扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text> </view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view> </view>
<!-- <view class="uni-flex uni-row" style="align-items: center; <!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff; background-color: #fff;

13
pages/issue/job/issueDetail.vue

@ -21,14 +21,17 @@
</scroll-view> </scroll-view>
</view> </view>
<div class="btn_bottom"> <view class="page-footer">
<view class="" style="display: flex;flex-direction: row;"> <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<!-- <button class="btn_commit" hover-class="btn_commit_after" @click="resizeCollapse()">刷新UI</button> -->
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view> </view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view> </view>
</div> </view>
</view>
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button> <win-scan-button @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> <com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
</com-scan-issue-pack> </com-scan-issue-pack>

58
pages/issue/record/issueRecord.vue

@ -16,27 +16,36 @@
:rawLocationCode="toLocation.toLocationCode"></work-station> :rawLocationCode="toLocation.toLocationCode"></work-station>
</view> </view>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" <com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'> @updateData='updateData'
@removeItemCode ="removeItemCode"
>
</com-issue-detail-card> </com-issue-detail-card>
</view> </view>
</scroll-view> </scroll-view>
<button class="btn_add" @click="goScan(true)">+去添加</button> <button class="btn_add" @click="goScan(false)">+去添加</button>
</view> </view>
<div class="btn_bottom"> <view class="page-footer">
<view class="" style="display: flex;flex-direction: row;"> <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view> </view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view> </view>
</div>
</view> </view>
</view> </view>
<com-message ref="comMessage"></com-message>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup> </view>
</view>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList"></com-issue-request-popup>
<win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button> <win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> <com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
</com-scan-issue-pack> </com-scan-issue-pack>
<comMessage ref="comMessage"></comMessage>
</template> </template>
<script> <script>
@ -104,7 +113,8 @@
toInventoryStatuses: "", toInventoryStatuses: "",
requestList: [], requestList: [],
dataContent: {}, dataContent: {},
managementList: [] managementList: [],
itemCodeTypeList: []
} }
}, },
mounted() { mounted() {
@ -120,7 +130,7 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.fromInventoryStatuses = res.fromInventoryStatuses this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses this.toInventoryStatuses = res.toInventoryStatuses
@ -143,6 +153,7 @@
}); });
}, },
goScan(editPosition) { goScan(editPosition) {
this.$refs.comIssueRequestPopup.openRequestPopup(editPosition); this.$refs.comIssueRequestPopup.openRequestPopup(editPosition);
}, },
@ -182,7 +193,6 @@
if (res.data == null) { if (res.data == null) {
that.showMessage('未获取到推荐信息'); that.showMessage('未获取到推荐信息');
} else { } else {
if (res.data.length > 0) { if (res.data.length > 0) {
that.workShopCode = item.workshopCode; that.workShopCode = item.workshopCode;
res.data.forEach(r => { res.data.forEach(r => {
@ -190,7 +200,8 @@
r.productionLineCode = item.productionLineCode; r.productionLineCode = item.productionLineCode;
r.workStationCode = item.workStationCode; r.workStationCode = item.workStationCode;
// r.itemCode = item.itemCode; // r.itemCode = item.itemCode;
// r.uom = item.uom; r.itemName = item.itemName
r.uom = item.uom;
that.subList.push(r); that.subList.push(r);
}) })
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
@ -262,6 +273,14 @@
// item.handleQty=itemHandleQty; // item.handleQty=itemHandleQty;
// this.closeScan(); // this.closeScan();
}, },
removeItemCode(){
var isClear =this.detailSource[0].Items.length==0
if(isClear){
this.clearData();
this.$refs.comIssueRequestPopup.initData()
}
},
setParams() { setParams() {
var subList = [] var subList = []
@ -355,13 +374,12 @@
submitJob() { submitJob() {
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data)
} else { } else {
this.showErrorMessage("提交失败:" + res.msg) this.showErrorMessage("提交失败:" + res.msg+"】")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
@ -372,14 +390,20 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData(); this.clearData();
this.$refs.comIssueRequestPopup.initData()
}) })
}, },
clearData() { clearData() {
this.detailSource = []; this.subList= [], //subList
this.requestList = []; this.detailSource=[], //
this.dataContent = {} this.detailOptions=[],
this.scanOptions= [],
this.workShopCode="",
this.requestList= [],
this.dataContent= {},
this.managementList= [] this.managementList= []
}, },
showMessage(message) { showMessage(message) {

48
pages/issue/request/issueRequestCreate.vue

@ -9,21 +9,23 @@
</comIssueRequestCreator> </comIssueRequestCreator>
<button class="btn_add" @click="goScan(false)">+去添加</button> <button class="btn_add" @click="goScan(false)">+去添加</button>
</view> </view>
<view class="page-footer">
<div class="btn_bottom"> <view class="uni-flex u-col-center space-between padding_10"
<view class="" style="display: flex;flex-direction: row;"> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<button class="btn_commit" hover-class="btn_commit_after" @click="submit()">提交</button> </view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view> </view>
</view> </view>
</div>
<com-scan-issue-pack ref="comScanIssuePack"> <com-scan-issue-pack ref="comScanIssuePack">
</com-scan-issue-pack> </com-scan-issue-pack>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</view> </view>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup> <com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList" ></com-issue-request-popup>
</template> </template>
<script> <script>
@ -35,10 +37,15 @@
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
goHome, goHome,
updateTitle, updateTitle,
getRemoveOption, getRemoveOption,
navigateBack,
getCurrDateOneMonthsTimes getCurrDateOneMonthsTimes
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -73,14 +80,27 @@
detailOptions: [], detailOptions: [],
scanOptions: [], scanOptions: [],
requestList: [], // requestList: [], //
itemCodeTypeList:[],
useOnTheWay:"FALSE"
} }
}, },
mounted() { mounted() {
this.goScan(true)
}, },
onLoad(option) { onLoad(option) {
var typeCode = "Issue"
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.useOnTheWay = res.useOnTheWay;
this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
}, },
methods: { methods: {
@ -93,13 +113,15 @@
if (this.detailSource.subList.length == 0) { if (this.detailSource.subList.length == 0) {
this.detailSource = { this.detailSource = {
workShopCode: item.workshopCode, workshopCode: item.workshopCode,
workShopName: item.workShopName, workShopName: item.workShopName,
productionLineCode: item.productionLineCode, productionLineCode: item.productionLineCode,
productionLineName: item.productionLineName, productionLineName: item.productionLineName,
workStationCode: item.workStationCode, workStationCode: item.workStationCode,
workStationName: item.workStationName, // workStationName: item.workStationName, //
toLocationCode: item.rawLocationCode, toLocationCode: item.rawLocationCode,
fromWarehouseCode:item.fromWarehouseCode,
useOnTheWay:this.useOnTheWay,
totalQty: 0, totalQty: 0,
subList: [] subList: []
} }
@ -109,6 +131,8 @@
workStationCode: item.workStationCode, workStationCode: item.workStationCode,
itemCode: item.itemCode, itemCode: item.itemCode,
itemName: item.itemName, itemName: item.itemName,
toWarehouseCode:item.toWarehouseCode,
fromWarehouseCode:item.fromWarehouseCode,
qty: item.qty, qty: item.qty,
uom: item.uom uom: item.uom
} }
@ -127,6 +151,8 @@
workStationCode: item.workStationCode, workStationCode: item.workStationCode,
itemCode: item.itemCode, itemCode: item.itemCode,
itemName: item.itemName, itemName: item.itemName,
toWarehouseCode:item.toWarehouseCode,
fromWarehouseCode:item.fromWarehouseCode,
qty: item.qty, qty: item.qty,
uom: item.uom uom: item.uom
} }
@ -176,9 +202,7 @@
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({ navigateBack(1)
url: './issueRequest'
})
}) })
}, },
showErrorMessage(message) { showErrorMessage(message) {

4
pages/productPutaway/coms/comPutawayRequestCard.vue

@ -1,9 +1,9 @@
<template> <template>
<request-com-main-card :dataContent="dataContent"> <request-com-main-card :dataContent="dataContent">
<view class="task_item"> <view class="task_item">
<view class="task_text"> <!-- <view class="task_text">
供应商代码 : {{dataContent.supplierCode}} 供应商代码 : {{dataContent.supplierCode}}
</view> </view> -->
</view> </view>
</request-com-main-card> </request-com-main-card>
</template> </template>

4
pages/productPutaway/request/putawayRequestDetail.vue

@ -4,9 +4,9 @@
<view class="header_job_top"> <view class="header_job_top">
<request-top :dataContent="requestContent"></request-top> <request-top :dataContent="requestContent"></request-top>
</view> </view>
<view class="header_item"> <!-- <view class="header_item">
供应商 : {{requestContent.supplierCode}} 供应商 : {{requestContent.supplierCode}}
</view> </view> -->
<u-line color="#D8D8D8" /> <u-line color="#D8D8D8" />
</view> </view>
<view class="page-main"> <view class="page-main">

12
pages/productionReturn/coms/comReturnCommonRequest.vue

@ -241,25 +241,25 @@
swipeClick(e, dataContent) { swipeClick(e, dataContent) {
var text = clearTirmAndWrap(e.content.text) var text = clearTirmAndWrap(e.content.text)
if (e.content.text == "详情") { if (text == "详情") {
this.openRequestInfoPopup(dataContent); this.openRequestInfoPopup(dataContent);
} else if (e.content.text == "处理") { } else if (text == "处理") {
this.showQuestionMessage("确定要处理当前申请吗?", res => { this.showQuestionMessage("确定要处理当前申请吗?", res => {
this.productionReturnRequestHandle(dataContent.id) this.productionReturnRequestHandle(dataContent.id)
}) })
} else if (e.content.text == "审批") { } else if (text == "提交审批") {
this.showQuestionMessage("确定要审批当前申请吗?", res => { this.showQuestionMessage("确定要审批当前申请吗?", res => {
this.productionReturnRequestSubmitApprove(dataContent.id) this.productionReturnRequestSubmitApprove(dataContent.id)
}) })
} else if (e.content.text == "审批通过") { } else if (text == "审批通过") {
this.showQuestionMessage("确定要审批通过当前申请吗?", res => { this.showQuestionMessage("确定要审批通过当前申请吗?", res => {
this.productionReturnRequestSubmitApproveAgree(dataContent.id) this.productionReturnRequestSubmitApproveAgree(dataContent.id)
}) })
} else if (e.content.text == "审批驳回") { } else if (text == "审批驳回") {
this.showQuestionMessage("确定要审批驳回当前申请吗?", res => { this.showQuestionMessage("确定要审批驳回当前申请吗?", res => {
this.productionReturnRequestSubmitApproveRefused(dataContent.id) this.productionReturnRequestSubmitApproveRefused(dataContent.id)
}) })
} else if (e.content.text == "关闭") { } else if (text == "关闭") {
this.showQuestionMessage("确定要关闭当前申请吗?", res => { this.showQuestionMessage("确定要关闭当前申请吗?", res => {
this.productionReturnRequestClose(dataContent.id) this.productionReturnRequestClose(dataContent.id)
}) })

2
pages/productionReturn/coms/comReturnRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title> <template v-slot:title>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :showBalanceQty="false" :isShowBalance="true"></item-qty> <item-qty :dataContent="dataContent" :isShowBalanceQty="false" :isShowBalance="true"></item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>

64
pages/productionReturn/coms/comReturnRequestPopup.vue

@ -66,7 +66,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item> </win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -116,8 +116,7 @@
itemCodeFocus: false, itemCodeFocus: false,
requestInfo: null, requestInfo: null,
itemCodeList: [], itemCodeList: [],
isCheckItemCode: false, counQty: undefined,
counQty: 0,
editPosition: true, editPosition: true,
numberFocus: false, numberFocus: false,
uom: "", uom: "",
@ -198,6 +197,10 @@
type: String, type: String,
default: '需求信息' default: '需求信息'
}, },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
methods: { methods: {
checkNum(e) { checkNum(e) {
@ -228,9 +231,11 @@
if (this.isModifiedPosition) { if (this.isModifiedPosition) {
this.isModifiedPosition = false this.isModifiedPosition = false
} else { } else {
this.itemCode = ""; this.itemCode = "请扫描物料信息";
this.uom = "" this.uom = ""
this.qty = 0 this.qty = 0;
this.counQty = undefined
this.numberFocus = false
this.itemCodeGetFocus(); this.itemCodeGetFocus();
} }
@ -253,16 +258,18 @@
itemCodeLoseFocus() { itemCodeLoseFocus() {
this.itemCodeFocus = false; this.itemCodeFocus = false;
}, },
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() { confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.itemCode == "请扫描物料信息" ) {
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) { if (this.qty == 0) {
this.showErrorMessage("数量必须大于0") this.showErrorMessage("数量必须大于0")
return return
@ -275,28 +282,6 @@
this.callback('add'); this.callback('add');
}, },
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.scanPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + this.itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) { callback(action) {
let item = { let item = {
positionInfo: this.positionInfo, positionInfo: this.positionInfo,
@ -327,8 +312,7 @@
} }
}) })
if (type == "itemCode") { if (type == "itemCode") {
this.itemCode = "" this.itemCode = "请扫描物料信息"
this.isCheckItemCode = false;
} }
}) })
}, },
@ -374,14 +358,12 @@
} }
}, },
getScanCode(code, scanResult) { getItemScanResult(code, scanResult) {
if (code == "") { this.itemCode = code;
this.showErrorMessage('物料号不能为空') this.itemName = scanResult.name
return; this.uom =scanResult.uom
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package; this.stdPackInfo = scanResult.package;
this.numberFocus = true
}, },
} }

11
pages/productionReturn/record/returnToStore.vue

@ -176,6 +176,15 @@
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
if(label.batch==""){
this.showErrorMessage("扫描标签批次为空")
return;
}
if(label.packingNumber==""){
this.showErrorMessage("扫描标签箱码为空")
return;
}
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) { if (res.itemCode == label.itemCode) {
@ -223,6 +232,7 @@
}) })
} else { } else {
debugger
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber && if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) { r.batch == label.batch) {
@ -235,6 +245,7 @@
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = toLocation.code; newDetail.toLocationCode = toLocation.code;
newDetail.fromLocationCode = this.rawLocationCode; newDetail.fromLocationCode = this.rawLocationCode;
newDetail.locationCode = this.rawLocationCode;
newDetail.toWarehouseCode = toLocation.warehouseCode; newDetail.toWarehouseCode = toLocation.warehouseCode;
item.subList.push(newDetail); item.subList.push(newDetail);
this.calcHandleQty(); this.calcHandleQty();

22
pages/productionReturn/request/returnRequestCreate.vue

@ -23,7 +23,7 @@
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</view> </view>
<comReturnRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' title="申请信息"></comReturnRequestPopup> <comReturnRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' title="申请信息" :itemCodeTypeList="itemCodeTypeList"></comReturnRequestPopup>
</template> </template>
<script> <script>
@ -31,6 +31,10 @@
productionReturnRequestCreate, productionReturnRequestCreate,
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
@ -61,7 +65,6 @@
}, },
data() { data() {
return { return {
jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: { detailSource: {
subList: [] subList: []
@ -70,13 +73,14 @@
scanOptions: [], scanOptions: [],
requestList: [], // requestList: [], //
fromType: '', fromType: '',
title: "" title: "",
itemCodeTypeList: []
} }
}, },
mounted() { mounted() {
this.goScan(true)
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
@ -87,6 +91,16 @@
} }
updateTitle(this.title) updateTitle(this.title)
var typeCode = this.fromType
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
}, },
methods: { methods: {
goScan(editPosition) { goScan(editPosition) {

2
pages/purchaseReturn/record/returnRecord.vue

@ -286,7 +286,7 @@
submitItem.fromBatch = detail.batch; submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch; submitItem.toBatch = detail.batch;
submitItem.fromLocationCode = this.fromLocationCode; submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = ''; //退 submitItem.toLocationCode = ''; //退
submitItem.qty = detail.handleQty; submitItem.qty = detail.handleQty;

3
pages/purchaseReturn/request/returnRequestCreate.vue

@ -10,7 +10,8 @@
<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="">
<record-com-detail-card :dataContent="item" @removeItem="removeItem(index,item)" <record-com-detail-card :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack"> @updateData="updateData" @removePack="removePack"
:isShowToLocation="false">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
</view> </view>

2
pages/query/container.vue

@ -27,7 +27,7 @@
<win-scan-button @goScan='openScanPopup' v-if="containerNumber!=''"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="containerNumber!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='器具代码' @getScanCode='getScanCode'> <win-scan-item ref="scanPopup" title='器具代码' @getScanResult='getScanCode'>
</win-scan-item> </win-scan-item>
<show-modal ref="modal"></show-modal> <show-modal ref="modal"></show-modal>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>

2
pages/query/item.vue

@ -27,7 +27,7 @@
</my-paging> </my-paging>
<win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
</win-scan-item> </win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>

2
pages/query/item_copy.vue

@ -42,7 +42,7 @@
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="itemCode!=''"></win-scan-button>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'>
</win-scan-item> </win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>

41
pages/repleinsh/coms/comRepleinshRequestPopup.vue

@ -64,7 +64,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item> </win-scan-item>
<win-scan-location ref="scanLocationPopup" title='目标库位' @getLocation='getLocationCode' <win-scan-location ref="scanLocationPopup" title='目标库位' @getLocation='getLocationCode'
@ -115,12 +115,10 @@
rawLocationCode: "", rawLocationCode: "",
fgLocationCode: "", fgLocationCode: "",
itemCodeFocus: false, itemCodeFocus: false,
isCheckItemCode: false, counQty: undefined,
counQty: 0,
editPosition: true, editPosition: true,
numberFocus: false, numberFocus: false,
uom: "", uom: "",
positionInfo: "请选择位置",
show: false, show: false,
isModifiedPosition: true, isModifiedPosition: true,
positionList: [], positionList: [],
@ -167,7 +165,11 @@
// this.qty = 0 // this.qty = 0
// this.itemCodeGetFocus(); // this.itemCodeGetFocus();
// } // }
this.qty = 0;
this.itemCode = '请扫描物料信息'
this.toLocationCode = '请扫目标库位'
this.counQty =undefined;
this.numberFocus = false
this.$refs.popup.open('bottom'); this.$refs.popup.open('bottom');
// this.showScanLocation(); // this.showScanLocation();
}, },
@ -207,10 +209,21 @@
}, },
confirm() { confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.toLocationCode == "请扫目标库位") {
this.showErrorMessage("请输入目标库位")
return
}
if (this.itemCode == "请扫描物料信息") {
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) { if (this.qty == 0) {
this.showErrorMessage("数量必须大于0") this.showErrorMessage("数量必须大于0")
return return
@ -227,7 +240,6 @@
if (res.data != null && res.data.list.length > 0) { if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code; this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true this.numberFocus = true
this.uom = res.data.list[0].uom this.uom = res.data.list[0].uom
} else { } else {
@ -261,14 +273,12 @@
this.closeRequestPopup(); this.closeRequestPopup();
}, },
getScanCode(code, scanResult) { getItemScanResult(code, scanResult) {
if (code == "") { this.itemCode = code;
this.showErrorMessage('物料号不能为空') this.itemName = scanResult.name
return; this.uom =scanResult.uom
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package; this.stdPackInfo = scanResult.package;
this.numberFocus = true
}, },
getLocationCode(location, code) { getLocationCode(location, code) {
@ -289,8 +299,7 @@
} }
}) })
if (type == "itemCode") { if (type == "itemCode") {
this.itemCode = "" this.itemCode = "请扫描物料信息"
this.isCheckItemCode = false;
} }
}) })
}, },

2
pages/repleinsh/coms/comRepleishDetailCard.vue

@ -8,7 +8,7 @@
<uni-collapse-item :open="true" :show-animation="true"> <uni-collapse-item :open="true" :show-animation="true">
<template v-slot:title> <template v-slot:title>
<!-- 物品 --> <!-- 物品 -->
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty> <item-qty :dataContent="item" :handleQty="item.handleQty" :isShowBalanceQty="false" ></item-qty>
</template> </template>
<u-line /> <u-line />
<view v-for="(loacation,index) in item.Locations"> <view v-for="(loacation,index) in item.Locations">

13
pages/repleinsh/coms/comScanReplishPack.vue

@ -393,6 +393,19 @@
handleQty = calc.add(handleQty,res.qty) handleQty = calc.add(handleQty,res.qty)
}) })
batch.handleQty = handleQty; batch.handleQty = handleQty;
this.dataContent.forEach(toLocationCode=>{
toLocationCode.Items.forEach(item=>{
var itemCodeHandleQty =0;
item.Locations.forEach(batch=>{
batch.Batchs.forEach(batchHandleQty=>{
itemCodeHandleQty=calc.add(itemCodeHandleQty,batchHandleQty.handleQty)
})
})
item.handleQty=itemCodeHandleQty;
})
})
}, },
addRecord(batch, label, balance, packageInfo) { addRecord(batch, label, balance, packageInfo) {

33
pages/repleinsh/job/repleinshDetail.vue

@ -11,7 +11,7 @@
</view> </view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource"> <view v-for="(toLocation, index) in detailSource">
<com-repleish-detail-card ref='comIssueDetailCard' :dataContent="toLocation" <com-repleish-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'> @updateData='updateData'>
@ -213,15 +213,30 @@
submit() { submit() {
var scanCount = this.getScanCount(this.subList); var scanCount = this.getScanCount(this.subList);
//
if(this.jobContent.allowPartialComplete=="TRUE"){
// 00
if(scanCount == 0){ if(scanCount == 0){
this.showErrorMessage("扫描数为0,请先扫描") this.$refs.comMessage.showQuestionMessage("扫描数为0,是否提交?",res=>{
return; if(res){
this.setSubmitParamsAndSubmit();
} }
uni.showLoading({ })
title: "提交中....", }else {
mask: true this.setSubmitParamsAndSubmit();
}); }
}else {
//
if(scanCount == 0){
this.showErrorMessage("扫描数为0,当前补料任务不允许部分提交,请先扫描")
}else {
this.setSubmitParamsAndSubmit();
}
}
},
setSubmitParamsAndSubmit(){
// //
var itemCodes = [] var itemCodes = []
let locationCode = this.toLocationCode let locationCode = this.toLocationCode
@ -249,6 +264,10 @@
}, },
submitJob() { submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));

12
pages/repleinsh/record/repleinshRecord.vue

@ -33,7 +33,8 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<com-repleinsh-request-popup ref="comRepleinshRequestPopup" :toLocationTypeList="tolocationTypeList" <com-repleinsh-request-popup ref="comRepleinshRequestPopup" :toLocationTypeList="tolocationTypeList"
@confirm='requestConfirm'> @confirm='requestConfirm'
:itemCodeTypeList="itemCodeTypeList">
</com-repleinsh-request-popup> </com-repleinsh-request-popup>
<win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button> <win-scan-button v-if='detailSource.length>0' @goScan='openScanDetailPopup'></win-scan-button>
<com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'> <com-scan-issue-pack ref="comScanIssuePack" @closeScan='closeScan' @updateData='updateData'>
@ -125,7 +126,8 @@
businessType: {}, businessType: {},
requestList: [], requestList: [],
managementList: [], managementList: [],
dataContent: {} dataContent: {},
itemCodeTypeList:[]
}; };
}, },
onLoad(option) { onLoad(option) {
@ -133,6 +135,7 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.itemCodeTypeList = res.itemCodeTypeList;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showRequestPopup(); this.showRequestPopup();
@ -206,6 +209,8 @@
if (res.data.length > 0) { if (res.data.length > 0) {
res.data.forEach(r => { res.data.forEach(r => {
r.toLocationCode = item.toLocation.code; r.toLocationCode = item.toLocation.code;
r.itemName = item.itemName
r.uom = item.uom;
that.subList.push(r); that.subList.push(r);
}) })
@ -367,13 +372,12 @@
submitJob() { submitJob() {
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
repleinshRecordSubmit(params).then(res => { repleinshRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成补料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功<br>生成补料记录<br>" + res.data)
} else { } else {
this.showErrorMessage("提交失败:" + res.msg) this.showErrorMessage("提交失败[" + res.msg+"]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()

2
pages/unPlanned/coms/comReceiptRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title> <template v-slot:title>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions"> <uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :showBalanceQty="false" <item-qty :dataContent="dataContent" :isShowBalanceQty="false"
:isShowBalance="true"></item-qty> :isShowBalance="true"></item-qty>
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>

62
pages/unPlanned/coms/comReceiptRequestPopup.vue

@ -68,7 +68,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemCode'> <win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item> </win-scan-item>
<winScanLocation ref="locationPopup" title="库位代码" @getLocation='getLocationCode'></winScanLocation> <winScanLocation ref="locationPopup" title="库位代码" @getLocation='getLocationCode'></winScanLocation>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -108,7 +108,7 @@
itemCodeFocus: false, itemCodeFocus: false,
requestInfo: null, requestInfo: null,
isCheckItemCode: false, isCheckItemCode: false,
counQty: 0, counQty: undefined,
numberFocus: false, numberFocus: false,
uom: "", uom: "",
show: false, show: false,
@ -126,6 +126,10 @@
type: String, type: String,
default: '申请信息' default: '申请信息'
}, },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
methods: { methods: {
checkNum(e) { checkNum(e) {
@ -146,10 +150,10 @@
openRequestPopup(editPosition) { openRequestPopup(editPosition) {
this.editPosition = editPosition; this.editPosition = editPosition;
if (!editPosition) { if (!editPosition) {
this.itemCode = ""; this.itemCode = "请扫描物料信息";
this.uom = "" this.uom = ""
this.qty = 0 this.qty = 0
this.count = 0; this.counQty = undefined;
this.itemCodeGetFocus(); this.itemCodeGetFocus();
} }
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
@ -175,10 +179,6 @@
itemCodeLoseFocus() { itemCodeLoseFocus() {
this.itemCodeFocus = false; this.itemCodeFocus = false;
}, },
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() { confirm() {
if (this.toLocationCode == "") { if (this.toLocationCode == "") {
@ -186,10 +186,15 @@
return return
} }
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.itemCode == "请扫描物料信息" ) {
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
if (this.counQty == undefined) {
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) { if (this.qty == 0) {
this.showErrorMessage("数量必须大于0") this.showErrorMessage("数量必须大于0")
return return
@ -198,28 +203,6 @@
this.callback('add'); this.callback('add');
}, },
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.itemPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) { callback(action) {
let item = { let item = {
toLocationCode: this.toLocationCode, toLocationCode: this.toLocationCode,
@ -254,19 +237,18 @@
this.closeRequestPopup(); this.closeRequestPopup();
}, },
getItemCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package;
},
getLocationCode(location, code) { getLocationCode(location, code) {
this.toLocationCode = code; this.toLocationCode = code;
}, },
getItemScanResult(code, scanResult) {
this.itemCode = code;
this.itemName = scanResult.name
this.uom =scanResult.uom
this.stdPackInfo = scanResult.package;
this.numberFocus = true
}
} }
} }
</script> </script>

18
pages/unPlanned/request/receiptRequestCreate.vue

@ -39,7 +39,7 @@
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</view> </view>
<comReceiptRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm'></comReceiptRequestPopup> <comReceiptRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList"></comReceiptRequestPopup>
</template> </template>
<script> <script>
@ -50,6 +50,9 @@
import { import {
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
goHome, goHome,
@ -84,7 +87,6 @@
}, },
data() { data() {
return { return {
jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: { detailSource: {
subList: [] subList: []
@ -92,14 +94,24 @@
reasonList: [], // reasonList: [], //
reasonText: "", reasonText: "",
reasonCode: "", reasonCode: "",
itemCodeTypeList:[]
} }
}, },
mounted() { mounted() {
this.goScan(true)
}, },
onLoad(option) { onLoad(option) {
this.reasonList = getUnPlannedReceiptReasonList() this.reasonList = getUnPlannedReceiptReasonList()
var typeCode = "UnplannedReceipt"
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
}, },
methods: { methods: {
goScan(editPosition) { goScan(editPosition) {

4
router/index.js

@ -10,7 +10,9 @@ console.log("getCurrentPages",apages)
function hasPermission (url) { function hasPermission (url) {
console.log('url',url); console.log('url',url);
// let islogin = sessionStorage.getItem("isLogin"); // let islogin = sessionStorage.getItem("isLogin");
let islogin = this.$store.state.hasLogin
let islogin = sessionStorage.getItem("hasLogin")
// let islogin = this.$store.state.hasLogin
islogin = Boolean(Number(islogin));//返回布尔值 islogin = Boolean(Number(islogin));//返回布尔值
// 在白名单中或有登录判断条件可以直接跳转 // 在白名单中或有登录判断条件可以直接跳转
if(whiteList.indexOf(url) !== -1 || islogin) { if(whiteList.indexOf(url) !== -1 || islogin) {

Loading…
Cancel
Save