Browse Source

YT-2355PDA《直接发料》改为扫描目标库位,扫描目标库位后,需要根据目标库位代码到《工位管理》中查找这个库位作为原料库位的生产线。 版本1.0.9

intex_online20250418
张立 1 month ago
parent
commit
7e7cef43c2
  1. 11
      src/api/request2.js
  2. 4
      src/manifest.json
  3. 80
      src/pages/issue/record/directIssueByBatch.vue

11
src/api/request2.js

@ -4982,5 +4982,14 @@ export function printPurchaseLabel(requestNumber) {
method: "get", method: "get",
}); });
} }
/**
* 根据库位获取工位管理信息
*/
export async function workstationByLocation(data) {
return await request({
url: baseApi + `/wms/workstation/senior`,
method: "post",
data: data,
});
}

4
src/manifest.json

@ -3,8 +3,8 @@
"package" : "com.yingtai.pda", "package" : "com.yingtai.pda",
"appid" : "__UNI__F36DDCF", "appid" : "__UNI__F36DDCF",
"description" : "", "description" : "",
"versionName" : "1.0.8", "versionName" : "1.0.9",
"versionCode" : 8, "versionCode" : 9,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

80
src/pages/issue/record/directIssueByBatch.vue

@ -23,15 +23,19 @@
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class="uni-row uni-flex"> <view class="">
<text>生产线:</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect"> <requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
<view class="" style="margin-left: 20rpx;"> @getLocation='scanLocationCode' :isShowEdit="true"
{{positionInfo}} :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
<view class="uni-row uni-flex u-p-l-10" style="font-size: 32rpx;" v-if="positionInfo">
<text>&nbsp;&nbsp;&nbsp;&nbsp;线</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx;">
{{positionInfo}}
</view>
</view>
</view> </view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList"
@confirm="confirmSelect"></u-select>
</view>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -58,7 +62,8 @@
issueRecordSubmit, issueRecordSubmit,
getWorkShopLineStation, getWorkShopLineStation,
getBalanceByFilter, getBalanceByFilter,
issueCheck issueCheck,
workstationByLocation
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -139,11 +144,12 @@
businessTypeCode: "Issue", businessTypeCode: "Issue",
positionList: [], positionList: [],
show: false, show: false,
positionInfo: "请选择生产线", positionInfo: "",
resultData: {}, resultData: {},
itemCode: "", itemCode: "",
managementType: '', managementType: '',
fifoSwitch: false fifoSwitch: false,
toLocationCode:'',
}; };
}, },
onLoad(option) { onLoad(option) {
@ -191,6 +197,7 @@
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses); this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses);
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.toLocationAreaTypeList = res?.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
@ -416,15 +423,47 @@
} }
}, },
// scanLocationCode(location, code) { async scanLocationCode(location, code) {
// this.toLocationCode = code const params = {
// this.toLocationCode = location; pageNo: 1,
pageSize: 100,
filters:[{action: "==",
column: "rawLocationCode",
value:code,
}]
}
// 线
const res = await workstationByLocation(params)
if(res.code == 0){
if(res.data&&res.data.list&&res.data.list.length>0){
this.positionInfo = res.data.list[0].productionLineCode
this.workStationCode = res.data.list[0].workshopCode
}else{
this.showErrorMessage("未查询到库位对应的生产线,请重新扫描。")
this.positionInfo = ''
this.workStationCode = ''
return
}
}else{
this.positionInfo = ''
this.workStationCode = ''
this.showErrorMessage(res.mag)
return
}
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
detail.productionLineCode = this.positionInfo
detail.workStationCode = this.workStationCode
})
})
// }, },
commit() { commit() {
if (this.positionInfo == '请选择生产线' || !this.positionInfo) { if (!this.toLocationCode) {
this.showErrorMessage("请选择生产线") this.showErrorMessage("请选择目标库位")
return return
} }
var commitHint = "" var commitHint = ""
@ -502,6 +541,9 @@
submitItem.fromLocationCode = detail.locationCode; submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode; submitItem.toLocationCode = detail.toLocationCode;
submitItem.productionLineCode = detail.productionLineCode;
submitItem.workStationCode = detail.workStationCode
// detail.toInventoryStatus = detail.inventoryStatus // detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = detail.toLocationCode // detail.toLocationCode = detail.toLocationCode
@ -517,6 +559,8 @@
toBatch: info.batch, toBatch: info.batch,
fromLocationCode: detail.locationCode, fromLocationCode: detail.locationCode,
toLocationCode: detail.toLocationCode, toLocationCode: detail.toLocationCode,
productionLineCode : detail.productionLineCode,
workStationCode : detail.workshopCode,
handleQty: detail.handleQty, handleQty: detail.handleQty,
fromPackUnit: detail.packUnit, fromPackUnit: detail.packUnit,
toPackUnit: detail.packUnit, toPackUnit: detail.packUnit,
@ -592,7 +636,7 @@
this.fromWarehouseCode = ''; this.fromWarehouseCode = '';
this.toWarehouseCode = ''; this.toWarehouseCode = '';
this.detailSource = []; this.detailSource = [];
this.positionInfo = "请选择生产线"; this.positionInfo = "";
this.itemCode = "" this.itemCode = ""
} }
} }

Loading…
Cancel
Save