Browse Source

修改发料任务匹配规则

dev_pda
李俊城 2 years ago
parent
commit
282cfef2ef
  1. 4
      fe/PDA/common/modelConfig.js
  2. 1
      fe/PDA/main.js
  3. 6
      fe/PDA/pages/login/index.vue
  4. 165
      fe/PDA/pages/task/issue_detail.vue

4
fe/PDA/common/modelConfig.js

@ -1,5 +1,7 @@
let maxPageSize = 10; let maxPageSize = 10;
let version ="1.0"
export default{ export default{
maxPageSize maxPageSize,
version
} }

1
fe/PDA/main.js

@ -47,6 +47,7 @@ Vue.use(VueAxios, axios)
Vue.prototype.$request = request Vue.prototype.$request = request
Vue.prototype.$url = url.url_config Vue.prototype.$url = url.url_config
Vue.prototype.modelConfig = modelConfig.maxPageSize Vue.prototype.modelConfig = modelConfig.maxPageSize
Vue.prototype.versionCode = modelConfig.version
Vue.prototype.utils = utils; Vue.prototype.utils = utils;
Vue.config.productionTip = false Vue.config.productionTip = false

6
fe/PDA/pages/login/index.vue

@ -2,6 +2,7 @@
<view class="content"> <view class="content">
<!-- <image mode="widthFix" class="loginimg" src="../../static/login.png"></image> --> <!-- <image mode="widthFix" class="loginimg" src="../../static/login.png"></image> -->
<image mode="widthFix" class="loginimg" src="../../static/icons_ui/login_bg.png"></image> <image mode="widthFix" class="loginimg" src="../../static/icons_ui/login_bg.png"></image>
<view class="login_title"> <view class="login_title">
<text>您好欢迎使用</text><br> <text>您好欢迎使用</text><br>
WMS仓库管理系统 WMS仓库管理系统
@ -57,6 +58,7 @@
</form> </form>
</view> </view>
</view> </view>
version : {{version}}
</view> </view>
</template> </template>
@ -82,7 +84,8 @@
password: "", password: "",
tapstyle: 2, tapstyle: 2,
loading: false, loading: false,
showPassword: true showPassword: true,
version:"0"
} }
}, },
computed: mapState(['forcedLogin', 'hasLogin']), computed: mapState(['forcedLogin', 'hasLogin']),
@ -96,6 +99,7 @@
frontColor: '#ffffff', frontColor: '#ffffff',
backgroundColor: "#476DF5 !important" backgroundColor: "#476DF5 !important"
}) })
this.version = this.versionCode;
}, },
onLoad() {}, onLoad() {},
methods: { methods: {

165
fe/PDA/pages/task/issue_detail.vue

@ -36,13 +36,14 @@
<text class="text_black">{{item.recommendQty}}({{item.uom}})</text> <text class="text_black">{{item.recommendQty}}({{item.uom}})</text>
</uni-th> </uni-th>
<uni-th width="120" align="center"> <uni-th width="120" align="center">
<view v-if="item.scaned" style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> <view v-if="item.scaned"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty" :max="99999" :min="0" <com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty"
style='width: 100px;' @change="qtyChanged($event,item,index)"> :max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box> </com-number-box>
<text <text class="text_black">({{item.uom}})</text>
class="text_black" >({{item.uom}})</text>
</view> </view>
</uni-th> </uni-th>
</uni-tr> </uni-tr>
@ -74,7 +75,8 @@
<view class="text_black">{{ item.recommendFromLocationCode }}</view> <view class="text_black">{{ item.recommendFromLocationCode }}</view>
</uni-th> </uni-th>
<uni-th width="100" align="center"> <uni-th width="100" align="center">
<view class="text_black" v-if="item.scaned">{{ item.handledFromLocationCode }} <view class="text_black" v-if="item.scaned">
{{ item.handledFromLocationCode }}
</view> </view>
</uni-th> </uni-th>
</uni-tr> </uni-tr>
@ -97,7 +99,8 @@
<win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack> <win-scan-by-pack ref="scanPopup" @getScanResult='getScanResult'></win-scan-by-pack>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance> <com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' @afterCloseScanMessage='closeScanMessage'></com-message> <com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage'></com-message>
</view> </view>
</template> </template>
@ -307,36 +310,32 @@
dyIssue(result, scaned) { dyIssue(result, scaned) {
let that = this; let that = this;
var itemCode = that.details.find(r => {
that.currentItem = that.details.find(r => {
return r.itemCode === result.data.itemCode&& return r.itemCode === result.data.itemCode&&
r.recommendPackingCode === result.data.code &&
r.recommendLot === result.data.lot &&
r.scaned === scaned r.scaned === scaned
});
//
if (that.currentItem === undefined) {
var itemCode = that.details.find(res=>{
return res.itemCode ===result.data.itemCode&&
res.scaned === scaned
})
//
if(itemCode!=undefined){
var lot = that.details.find(res=>{
return res.itemCode===result.data.itemCode&&
res.recommendLot ===result.data.lot&&
res.scaned === scaned
}) })
if(lot!=undefined){ if (itemCode == undefined) {
// that.showScanMessage('所扫描的箱码【' + result.data.code + '】对应的物料【' + result.data.itemCode + '】不在任务中');
that.currentItem =lot;
that.afterScanPackLabel(result);
}else { }else {
// //
// var itemCode1 = that.details.find(r => {
return r.itemCode === result.data.itemCode&&
r.recommendPackingCode === result.data.code
r.scaned === scaned
})
//
if(itemCode1 == undefined){
var itemCode2 = that.details.find(r => {
return r.itemCode === result.data.itemCode&&
r.recommendLot === result.data.lot
&&r.scaned === scaned
})
//
if(itemCode2==undefined){
//
console.log("零件号相同、箱码不相同、批次不相同")
setTimeout(res => { setTimeout(res => {
showConfirmMsg('未执行先进先出或不是最先批次,是否继续?', confirm => { showConfirmMsg(itemCode.recommendPackingCode+'未执行先进先出或不是最先批次,是否继续?', confirm => {
if (confirm) { if (confirm) {
that.currentItem = itemCode; that.currentItem = itemCode;
that.afterScanPackLabel(result); that.afterScanPackLabel(result);
@ -346,25 +345,105 @@
}); });
}, 100) }, 100)
}else {
console.log("零件号相同、箱码不相同、批次相同")
//
that.currentItem = itemCode2;
that.afterScanPackLabel(result);
} }
}else { }else {
// //
var lot = that.details.find(res=>{ var itemCode3 = that.details.find(r => {
return res.recommendLot ===result.data.lot&& return r.itemCode === result.data.itemCode&&
res.scaned === scaned r.recommendPackingCode === result.data.code&&
r.recommendLot === result.data.lot
&&r.scaned === scaned
}) })
// if(itemCode3==undefined){
if(lot!=undefined){ //
// console.log("零件号相同、箱码相同、批次不同")
that.showScanMessage('在该任务中未找到零件'); setTimeout(res => {
showConfirmMsg(itemCode1.recommendPackingCode+'未执行先进先出或不是最先批次,是否继续?', confirm => {
if (confirm) {
that.currentItem = itemCode1;
that.afterScanPackLabel(result);
} else { } else {
//, that.scanPopupGetFocus();
that.showScanMessage('所扫描的物料不在任务中');
}
} }
});
}, 100)
}else { }else {
console.log("零件号相同、箱码相同、批次相同")
//
that.currentItem = itemCode3;
that.afterScanPackLabel(result); that.afterScanPackLabel(result);
} }
}
}
// that.currentItem = that.details.find(r => {
// return r.itemCode === result.data.itemCode &&
// r.recommendPackingCode === result.data.code &&
// r.recommendLot === result.data.lot &&
// r.scaned === scaned
// });
// //
// if (that.currentItem === undefined) {
// var itemCode = that.details.find(res => {
// return res.itemCode === result.data.itemCode &&
// res.scaned === scaned
// })
// //
// if (itemCode != undefined) {
// var lot = that.details.find(res => {
// return res.itemCode === result.data.itemCode &&
// res.recommendLot === result.data.lot &&
// res.scaned === scaned
// })
// if (lot != undefined) {
// //
// that.currentItem = lot;
// that.afterScanPackLabel(result);
// } else {
// //
// //
// setTimeout(res => {
// showConfirmMsg(',?', confirm => {
// if (confirm) {
// that.currentItem = itemCode;
// that.afterScanPackLabel(result);
// } else {
// that.scanPopupGetFocus();
// }
// });
// }, 100)
// }
// } else {
// //
// var lot = that.details.find(res => {
// return res.recommendLot === result.data.lot &&
// res.scaned === scaned
// })
// //
// if (lot != undefined) {
// //
// that.showScanMessage('');
// } else {
// //,
// that.showScanMessage('');
// }
// }
// } else {
// that.afterScanPackLabel(result);
// }
}, },
afterScanPackLabel(result) { afterScanPackLabel(result) {

Loading…
Cancel
Save