Browse Source

修改发料任务的显示

wms3.0_pda
niexiting 1 year ago
parent
commit
7be2c93794
  1. 12
      mycomponents/balance/recommendBalance.vue
  2. 2
      mycomponents/job/jobBottom.vue
  3. 7
      pages/issue/coms/comIssueDetailCard.vue
  4. 8
      pages/issue/coms/comIssueJobCard.vue
  5. 33
      pages/issue/coms/comScanIssuePack.vue
  6. 15
      pages/issue/job/issueDetail.vue
  7. 21
      pages/issue/js/issue.js
  8. 2
      static/config.json

12
mycomponents/balance/recommendBalance.vue

@ -1,14 +1,14 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between uni-inline-item">
<view class="uni-flex uni-row uni-inline-item">
<view style=" width: 20px;display: flex;justify-content: center;align-items: center; color: #32C1E8;">
<view class="uni-flex uni-row space-between ">
<view class="uni-flex uni-row ">
<view class="center" style=" width: 20px;color: #32C1E8;">
推荐
</view>
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<view class="center">
<!-- <pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack> -->
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
<!-- <location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location> -->
</view>
</view>
<view>

2
mycomponents/job/jobBottom.vue

@ -8,7 +8,7 @@
</view>
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{formatDate(dataContent.createTime)}}</text>
<text class="center">{{formatDate(dataContent.createTime)}}</text>
</view>
</view>
</view>

7
pages/issue/coms/comIssueDetailCard.vue

@ -24,7 +24,7 @@
</view>
<view v-for="(batch,index) in loacation.Batchs">
<view>
<recommend-balance style='margin-left: 20px;' :detail="batch"
<recommend-balance style='margin-left: 20px;' :detail="batch"
:isShowLocation="false" :isShowPack="false">
</recommend-balance>
</view>
@ -34,13 +34,12 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions">
<handle-balance style='margin-left: 40px;' :detail="record"
:isShowLocation="false" :isShowBatch="batch.packingNumber!=''">
<handle-balance style='margin-left: 40px;' :detail="record"
:isShowLocation="false" :isShowBatch="batch.packingNumber!=null">
</handle-balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<u-line />
</view>
</view>
</view>

8
pages/issue/coms/comIssueJobCard.vue

@ -1,11 +1,11 @@
<template>
<job-com-main-card :dataContent="dataContent">
<view class="task_item">
<view class="task_text">
申请单号 {{dataContent.requestNumber}}
</view>
<view class="task_text">
物品代码 : {{dataContent.itemCode}}
</view>
<view class="task_text">
需求库位 : {{dataContent.toLocationCode}}
车间 {{dataContent.workShopCode}}
</view>
</view>
</job-com-main-card>

33
pages/issue/coms/comScanIssuePack.vue

@ -13,8 +13,8 @@
margin-right: 20rpx;
padding:20rpx;
border-radius: 8rpx;">
<view class="uni-center" style="width: 25%; ">
位置 :
<view class="uni-center">
位置 :
</view>
<view class="" style="width: 75%;padding: 0rpx">
<view class="uni-flex u-col-center uni-row" @click="showSelect">
@ -140,8 +140,8 @@
scanOptions: {},
editItem: {},
positionInfo: "请选择位置",
positionList:[],
defaultValueList:[]
positionList: [],
defaultValueList: []
}
},
created() {
@ -154,12 +154,12 @@
},
methods: {
openScanPopup(content, jobcontent) {
debugger
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
this.positionInfo =this.jobContent.workShopCode+"-"+this.jobContent.subList[0].productionLineCode+"-"+this.jobContent.subList[0].workStationCode
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom');
},
@ -171,7 +171,6 @@
},
initData() {
debugger
let that = this;
that.fromLocationList = [];
if (that.dataContent != null) {
@ -210,7 +209,7 @@
onScan(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
@ -237,19 +236,19 @@
getBalanceByManagementPrecision(result.label, that.fromLocationCode, balanceRes => {
if (balanceRes.success) {
if (balanceRes.Data.length == 0) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.Data.length == 1) {
let balance = balanceRes.Data[0];
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance);
} else {
this.showBalanceSelect(balanceRes.Data);
this.showBalanceSelect(balanceRes.data.list);
}
} else {
this.showErrorMessage(balanceRes.message);
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
@ -274,16 +273,18 @@
if (batch.Records == undefined) {
batch.Records = [];
}
let record = batch.Records.find(r => r.packingNumber == packingCode);
if (record == undefined) {
//
if (batch.Recommends != undefined) {
//
if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance)
} else {
//
if (this.jobContent.AllowModifyPackingNumber) {
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',

15
pages/issue/job/issueDetail.vue

@ -176,12 +176,15 @@
submit() {
//3.
//:XXX
var isOutIn = getApp().globalData.feed_configList.filter(
res => {
if (res.name == 'feed_isOutIn') {
return res;
}
});
// var isOutIn = getApp().globalData.feed_configList.filter(
// res => {
// if (res.name == 'feed_isOutIn') {
// return res;
// }
// });
this.dataContent.itemCodeList.forEach(res => {
if (res.handleQty > res.recommendQty) {

21
pages/issue/js/issue.js

@ -1,9 +1,9 @@
export function getDataSource(list,subList) {
export function getDataSource(list, subList) {
for (var i = 0; i < subList.length; i++) {
let detail = subList[i];
var location = list.find(r =>
r.toLocationCode == detail.toLocationCode)
if (location == undefined) {
location = {
toLocationCode: detail.toLocationCode,
@ -15,7 +15,7 @@ export function getDataSource(list,subList) {
}
return list;
}
//树形结构:需求库位 -> 零件Items -> 库位 Locations-> 批次Batchs -> 记录Records
export function createDetailInfo(location, detail) {
var item = location.Items.find(r =>
@ -37,7 +37,7 @@ export function createDetailInfo(location, detail) {
let batch = createBatchInfo(detail);
location.Batchs.push(batch);
} else {
batch.recommends.push(detail);
batch.Recommends.push(detail);
}
}
}
@ -47,8 +47,8 @@ export function createItemInfo(detail) {
let item = {
itemCode: detail.itemCode,
itemName: detail.itemName,
productionLineCode:detail.productionLineCode,
workStationCode:detail.workStationCode,
productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode,
stdPackQty: detail.stdPackQty,
stdPackUnit: detail.stdPackUnit,
qty: detail.qty,
@ -81,15 +81,14 @@ export function createBatchInfo(detail) {
qty: detail.qty,
uom: detail.uom,
handleQty: 0,
// Recommends: [detail],
// Records: []
Recommends: [],
Records: []
}
//推荐到了箱码和批次
if (detail.packingNumber != '') {
batch.Recommends = [detail];
if (detail.packingNumber != '' && detail.packingNumber != null) {
batch.Recommends.push(detail);
}
return batch;
}

2
static/config.json

@ -18,7 +18,7 @@
"request_url": {
"name": "request_url",
"value": "http://192.168.0.157:12080/admin-api",
"value": "http://192.168.0.230:12080/admin-api",
"dev2":"http://192.168.0.157:12080/admin-api",
"dev":"http://dev.ccwin-in.com:25100/api/admin-api",
"local":"http://localhost:12080",

Loading…
Cancel
Save