Browse Source

创建申请添加仓库代码

wms3.0_pda
lijuncheng 10 months ago
parent
commit
0cb1023f16
  1. 13
      api/request2.js
  2. 3
      common/record.js
  3. 2
      mycomponents/popup/selectList.vue
  4. 10
      mycomponents/workStation/workStation.vue
  5. 2
      pages/issue/coms/comIssueRequestCreator.vue
  6. 135
      pages/issue/coms/comIssueRequestPopup.vue
  7. 29
      pages/issue/request/issueRequestCreate.vue

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 {*}

3
common/record.js

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

2
mycomponents/popup/selectList.vue

@ -27,7 +27,6 @@
</view>
</view>
</com-popup>
</uni-popup>
</template>
@ -35,7 +34,6 @@
<script>
import {
getProductionlineItem,
getCustomerItemList
} from '@/api/request2.js';
import comPopup from '@/mycomponents/common/comPopup.vue'

10
mycomponents/workStation/workStation.vue

@ -2,6 +2,11 @@
<view class="header_job_top">
<view class="cen_card">
<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="text_lightblue">车间</view>
<view>{{workshopCode}}</view>
@ -37,6 +42,11 @@
watch: {},
props: {
fromWarehouseCode:{
type: String,
default: ""
},
workshopCode: {
type: String,
default: ""

2
pages/issue/coms/comIssueRequestCreator.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-column">
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</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>
<uni-swipe-action ref="swipeAction">

135
pages/issue/coms/comIssueRequestPopup.vue

@ -13,6 +13,18 @@
<u-line />
<view class="uni-flex uni-column" style="background-color: white; ">
<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">
<text>位置</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
@ -36,18 +48,20 @@
</image>
</view>
</view>
<u-line />
<view class="uni-flex uni-row padding title u-col-center">
<text>数量 </text>
<view class="uni-flex uni-row uni-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"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
@confirm="confirm()" :focus="numberFocus" @input="checkNum"
:maxlength="maxlength" />
<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>)
</view>
</view>
@ -62,7 +76,8 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList" >
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult'
:itemCodeTypeList="itemCodeTypeList">
</win-scan-item>
<comMessage ref="comMessage"></comMessage>
</view>
@ -73,7 +88,8 @@
getBasicLocationByCode,
getBasicItemByCode,
getProductionlineItem,
getWorkShopLineStation
getWorkShopLineStation,
getWarehouseCodeList
} from '@/api/request2.js';
import {
getLocationTypeName,
@ -86,14 +102,13 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
export default {
components: {
uom,
balanceStatus,
comMessage,
winScanItem,
stdPackQty
stdPackQty,
},
data() {
return {
@ -104,6 +119,7 @@
workStationCode: "", //
workStationName: "",
itemCode: '请扫描物料信息',
fromWarehouseCode: "请选择仓库代码",
itemName: "",
qty: 0,
rawLocationCode: "",
@ -120,8 +136,10 @@
isModifiedPosition: true,
positionList: [],
stdQty: 0, //
maxlength:10,
stdPackInfo:undefined
maxlength: 10,
stdPackInfo: undefined,
wareHouseList: [],
showWareHouse: false
}
},
props: {
@ -142,7 +160,7 @@
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
@ -153,21 +171,28 @@
openRequestPopup(editPosition) {
if (this.positionList.length == 0) {
getWorkShopLineStation().then(res => {
this.positionList = res.data
}).catch(error => {
if (res.data != null && res.data.length > 0) {
this.positionList = res.data
} else {
this.showErrorMessage('未查找到位置信息');
}
}).catch(error => {
this.showErrorMessage(error);
})
}
this.editPosition = editPosition;
if (this.isModifiedPosition) {
this.isModifiedPosition = false
} else {
this.itemCode = "请扫描物料信息";
this.show = false
this.showWareHouse = false
this.uom = ""
this.qty = 0;
this.stdPackInfo =undefined;
this.stdPackInfo = undefined;
this.counQty = undefined;
this.numberFocus = false
this.itemCodeGetFocus();
@ -175,25 +200,29 @@
this.$refs.popup.open('bottom')
},
initData(){
initData() {
this.positionList = [];
this.wareHouseList= [],
this.showWareHouse = false
this.editPosition =true;
this.itemCode = "请扫描物料信息";
this.rawLocationCode =""
this.positionInfo ="请选择位置"
this.workshopCode= "" //
this.workShopName= ""
this.productionLineCode="" //线
this.productionLineName=""
this.workStationCode= "" //
this.workStationName= ""
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.stdPackInfo = undefined;
this.counQty = undefined;
this.numberFocus = false
},
closeRequestPopup() {
this.$refs.popup.close()
},
@ -213,11 +242,17 @@
},
confirm() {
if (this.positionInfo == "请选择位置" ) {
if (this.positionInfo == "请选择位置") {
this.showErrorMessage("请选择位置")
return
}
if (this.fromWarehouseCode == "请选择仓库代码") {
this.showErrorMessage("请选择仓库代码")
return
}
if (this.itemCode == "请扫描物料信息") {
this.showErrorMessage("请输入物料", "itemCode")
return
@ -226,7 +261,7 @@
this.showErrorMessage("请输入数量")
return
}
if (this.qty == 0) {
this.showErrorMessage("数量必须大于0")
return
@ -250,6 +285,8 @@
workStationName: this.workStationName,
rawLocationCode: this.rawLocationCode,
fgLocationCode: this.fgLocationCode,
fromWarehouseCode: this.fromWarehouseCode,
toWarehouseCode: this.fromWarehouseCode,
itemCode: this.itemCode,
itemName: this.itemName,
uom: this.uom,
@ -283,8 +320,14 @@
if (this.editPosition) {
this.show = true
}
},
showWarseHouseSelect() {
if (this.editPosition) {
this.wareHouseClick();
}
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置", this.positionInfo)
@ -318,10 +361,40 @@
getItemScanResult(code, scanResult) {
this.itemCode = code;
this.itemName = scanResult.name
this.uom =scanResult.uom
this.uom = scanResult.uom
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>

29
pages/issue/request/issueRequestCreate.vue

@ -25,7 +25,7 @@
<comMessage ref="comMessage"></comMessage>
</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>
<script>
@ -36,6 +36,10 @@
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
@ -76,14 +80,27 @@
detailOptions: [],
scanOptions: [],
requestList: [], //
itemCodeTypeList:[],
useOnTheWay:"FALSE"
}
},
mounted() {
this.goScan(true)
},
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: {
@ -103,6 +120,8 @@
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
toLocationCode: item.rawLocationCode,
fromWarehouseCode:item.fromWarehouseCode,
useOnTheWay:this.useOnTheWay,
totalQty: 0,
subList: []
}
@ -112,6 +131,8 @@
workStationCode: item.workStationCode,
itemCode: item.itemCode,
itemName: item.itemName,
toWarehouseCode:item.toWarehouseCode,
fromWarehouseCode:item.fromWarehouseCode,
qty: item.qty,
uom: item.uom
}
@ -130,6 +151,8 @@
workStationCode: item.workStationCode,
itemCode: item.itemCode,
itemName: item.itemName,
toWarehouseCode:item.toWarehouseCode,
fromWarehouseCode:item.fromWarehouseCode,
qty: item.qty,
uom: item.uom
}

Loading…
Cancel
Save