Browse Source

修改半成品退库数量和发料承接

pda_nev
李俊城 11 months ago
parent
commit
b2d174e0c5
  1. 26
      fe/PDA/pages/return/productionReturnFg.vue
  2. 68
      fe/PDA/pages/task/assembleIssueJobDetail.vue
  3. 114
      fe/PDA/pages/task/assembleIssueJobDetailByQty.vue
  4. 47
      fe/PDA/pages/task/coatingIssuleJobDetail.vue
  5. 48
      fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue
  6. 78
      fe/PDA/pages/task/injectionIssueJobDetail.vue
  7. 107
      fe/PDA/pages/task/injectionIssueJobDetailByQty.vue
  8. 77
      fe/PDA/pages/task/kittingIssueJobDetail.vue
  9. 117
      fe/PDA/pages/task/kittingIssueJobDetailByQty.vue
  10. 71
      fe/PDA/pages/task/sparePartIssueJobDetail.vue
  11. 103
      fe/PDA/pages/task/sparePartIssueJobDetailByQty.vue

26
fe/PDA/pages/return/productionReturnFg.vue

@ -33,9 +33,9 @@
</view>
<view class="ljh_right">
<view class="uni-flex uni-row u-col-center">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="99999" :min="0"
@change="qtyChanged($event,item,index)">
<com-number-box :ref="label.itemCode+'comNumberBox_'+index"
v-model="item.qty" :max="99999" :min="0"
@change="qtyChanged($event,label,item,index)">
</com-number-box>
<text class="" style="margin-left: 8rpx;">{{item.uom}}</text>
</view>
@ -536,23 +536,29 @@
return item;
},
qtyChanged(value, item, index) {
qtyChanged(value, label, item, index) {
var test = label + 'comNumberBox_' + index
console.log(test);
if (value <= 0) {
this.showMessage('退数量必须大于0')
item.qty = item.totalQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
value=item.qty
this.$refs[label.itemCode + 'comNumberBox_' + index][0].setValue(item.qty);
} else {
if (value > item.totalQty) {
this.showMessage("退货数量[" + value + "]不能大于库存数量[" + item.totalQty + "]");
item.qty = item.totalQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
value=item.qty
this.$refs[label.itemCode + 'comNumberBox_' + index][0].setValue(item.qty);
}
}
this.itemList.forEach(res => {
res.scanQty = 0
res.labelList.forEach(item => {
res.scanQty = res.scanQty + value
})
if (res.itemCode == label.itemCode) {
res.scanQty = 0
res.labelList.forEach(item => {
res.scanQty = res.scanQty + value
})
}
})
this.$forceUpdate()
},

68
fe/PDA/pages/task/assembleIssueJobDetail.vue

@ -153,7 +153,7 @@
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -231,7 +231,8 @@
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
handleToPackingCodeLocationCode: "",
showBtn: true
}
},
props: {
@ -239,22 +240,14 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) {
//
cancelTakeAssembleIssueJob(this.id).then(res => {
}).catch(error => {
})
cancelTakeAssembleIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
@ -265,7 +258,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) {
//
cancelTakeAssembleIssueJob(this.id).then(res => {
uni.navigateBack();
@ -342,6 +335,7 @@
};
getAssembleIssueDetail(params)
.then(item => {
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
@ -369,15 +363,37 @@
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
this.setReceived();
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
this.showMessage('未查找到详细信息')
});
},
setReceived(){
//
//
if(this.datacontent.isClaims){
//
if(this.datacontent.claimsUserId==localStorage.getItem('userId')) {
this.showBtn=true
}else {
this.showBtn=false
}
}else {
//
this.receive((callback => {
if(callback){
this.showBtn=true
}else {
this.showBtn=false
}
}));
}
},
getScanResultTo(result) {
var fromData = result.data;
@ -396,17 +412,17 @@
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
})
})
}
} else {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
},
setData(result,data,fromData) {
setData(result, data, fromData) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -421,8 +437,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -446,8 +462,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -485,7 +501,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
if (this.details[0].recommendFromPackingCode == result.data.code) {
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -499,7 +515,7 @@
this.showScanMessage(err.message);
uni.hideLoading();
});
}else {
} else {
getBalanceRemoveInAndOut(params)
.then(res => {
if (res.totalCount === 0) {

114
fe/PDA/pages/task/assembleIssueJobDetailByQty.vue

@ -3,16 +3,8 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail
:jobContent="datacontent"
:allCount="allCount"
:isShowScanHint="true"
scanHint="已发数"
:scanCount="scanCount"
:isShowOther="true"
:isShowShouRong="true"
:shouRongCount="shouRongCount"
>
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="true" scanHint="已发数"
:scanCount="scanCount" :isShowOther="true" :isShowShouRong="true" :shouRongCount="shouRongCount">
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
@ -82,9 +74,9 @@
<uni-td width="120" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBoxRef" v-model="item.tempHandledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
<com-number-box ref="comNumberBoxRef"
v-model="item.tempHandledToQty" :max="999999" :min="0"
style='width: 100px;' @change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-td>
@ -100,7 +92,7 @@
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend">推荐库存</button>
</view>
</view>
</scroll-view>
@ -126,7 +118,7 @@
</view>
</view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -172,7 +164,7 @@
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
@ -198,13 +190,14 @@
scrollTop: 0
},
allCount: 0,
scanCount:0,
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
singCode: "",
shouRongCount:null
shouRongCount: null,
showBtn: true
}
},
props: {
@ -212,17 +205,14 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeAssembleIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
@ -232,7 +222,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeAssembleIssueJob(this.id).then(res => {
uni.navigateBack();
@ -319,16 +309,16 @@
r => {
r.scaned = false;
r.scanDate = new Date()
r.handledFromLocationCode=""
r.handledToLocationCode=""
r.handledFromLocationCode = ""
r.handledToLocationCode = ""
}
);
this.allCount = that.details[0].recommendFromQty;
this.scanCount = that.details[0].handledToQty;
that.details[0].defaultHandleQty = that.details[0].handledFromQty;
that.details[0].tempHandledToQty =0
that.details[0].tempHandledFromQty =0
that.details[0].tempHandledToQty = 0
that.details[0].tempHandledFromQty = 0
//
getCountByItemCode(that.details[0].itemCode).then(res => {
uni.hideLoading();
@ -345,15 +335,39 @@
uni.hideLoading();
this.showMessage(error)
})
this.setReceived();
}
})
.catch(err => {
uni.hideLoading();
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
@ -367,25 +381,25 @@
this.$refs.scanPackPopup.closeScanPopup();
},
recommend(){
var itemCode =this.details[0].itemCode
var productLine =this.details[0].prodLine
if(!itemCode){
recommend() {
var itemCode = this.details[0].itemCode
var productLine = this.details[0].prodLine
if (!itemCode) {
this.showMessage("物料为空")
return;
}
if(!productLine){
if (!productLine) {
this.showMessage("生产线为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode,productLine,false).then(res=>{
getRecommendBalance(itemCode, productLine, false).then(res => {
uni.hideLoading()
if (res.length > 0) {
var list = [];
@ -395,12 +409,10 @@
item.value = item.SHIFT_CODE
})
this.$refs.selectPopup.openScanPopup(list)
}
else {
} else {
this.showMessage("推荐列表为0")
}
}).catch(error=>{
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
@ -456,8 +468,8 @@
title: "提交中...",
mask: true
});
that.details[0].handledFromQty =that.details[0].tempHandledToQty
that.details[0].handledToQty =that.details[0].tempHandledToQty
that.details[0].handledFromQty = that.details[0].tempHandledToQty
that.details[0].handledToQty = that.details[0].tempHandledToQty
let params = that.details[0];
finshAssembleIssueJob(that.id, params.id, params)
.then(res => {
@ -512,11 +524,11 @@
}
if (value == 0) {
this.showMessage('发料数量必须大于0')
item.tempHandledToQty =item.tempHandledFromQty
item.tempHandledToQty = item.tempHandledFromQty
this.$refs.comNumberBoxRef[0].setValue(item.tempHandledToQty);
return;
}
item.tempHandledFromQty =value;
}
item.tempHandledFromQty = value;
console.log('item', item.tempHandledFromQty);
this.$forceUpdate();

47
fe/PDA/pages/task/coatingIssuleJobDetail.vue

@ -153,7 +153,7 @@
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -231,7 +231,8 @@
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
handleToPackingCodeLocationCode: "",
showBtn:true
}
},
props: {
@ -239,18 +240,12 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) {
//
cancelTakeCoatingIssueJob(this.id).then(res => {
}).catch(error => {
@ -265,7 +260,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) {
//
cancelTakeCoatingIssueJob(this.id).then(res => {
uni.navigateBack();
@ -342,6 +337,7 @@
};
getCoatingIssueDetail(params)
.then(item => {
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
@ -369,15 +365,38 @@
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
this.setReceived();
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
this.showMessage('未查找到详细信息')
});
},
setReceived(){
//
//
if(this.datacontent.isClaims){
//
if(this.datacontent.claimsUserId==localStorage.getItem('userId')) {
this.showBtn=true
}else {
this.showBtn=false
}
}else {
//
this.receive((callback => {
if(callback){
this.showBtn=true
}else {
this.showBtn=false
}
}));
}
},
getScanResultTo(result) {
var fromData = result.data;

48
fe/PDA/pages/task/coatingIssuleJobDetailByQty.vue

@ -126,7 +126,7 @@
</view>
</view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -207,7 +207,8 @@
jobStatus: "",
toLocationInfo: {},
singCode: "",
shouRongCount:null
shouRongCount:null,
showBtn:true
}
},
props: {
@ -215,17 +216,16 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if(this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')){
cancelTakeCoatingIssueJob(this.id).then(res => {
}).catch(error => {
})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
@ -235,7 +235,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims &&this.datacontent.claimsUserId==localStorage.getItem('userId')) {
//
cancelTakeCoatingIssueJob(this.id).then(res => {
uni.navigateBack();
@ -348,15 +348,39 @@
uni.hideLoading();
this.showMessage(error)
})
this.setReceived();
}
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
this.showMessage('未查找到详细信息')
});
},
setReceived(){
//
//
if(this.datacontent.isClaims){
//
if(this.datacontent.claimsUserId==localStorage.getItem('userId')) {
this.showBtn=true
}else {
this.showBtn=false
}
}else {
//
this.receive((callback => {
if(callback){
this.showBtn=true
}else {
this.showBtn=false
}
}));
}
},
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode

78
fe/PDA/pages/task/injectionIssueJobDetail.vue

@ -6,6 +6,10 @@
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="false"
allCountHint="箱数">
</com-job-scan-detail>
<view class="" style="background-color: #fff; padding: 20rpx; font-size: 32rpx;">
承接人 : {{datacontent.claimsUserName}}
</view>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
@ -153,7 +157,7 @@
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -231,7 +235,8 @@
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
handleToPackingCodeLocationCode: "",
showBtn: true
}
},
props: {
@ -239,20 +244,15 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
cancelTakeInjectionIssueJob(this.id).then(res => {
}).catch(error => {
})
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeInjectionIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
@ -262,7 +262,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeInjectionIssueJob(this.id).then(res => {
uni.navigateBack();
@ -339,6 +339,7 @@
};
getInjectionIssueDetail(params)
.then(item => {
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
@ -366,9 +367,9 @@
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
this.setReceived();
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
@ -376,6 +377,29 @@
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResultTo(result) {
var fromData = result.data;
var data = this.details.filter(r => r.itemCode == result.data.itemCode)
@ -393,18 +417,18 @@
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
})
})
}
} else {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
},
setData(result,data,fromData) {
setData(result, data, fromData) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -419,8 +443,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -444,7 +468,7 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -482,7 +506,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
if (this.details[0].recommendFromPackingCode == result.data.code) {
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -496,7 +520,7 @@
this.showScanMessage(err.message);
uni.hideLoading();
});
}else {
} else {
getBalanceRemoveInAndOut(params)
.then(res => {
if (res.totalCount === 0) {
@ -511,7 +535,7 @@
uni.hideLoading();
});
}
},
recommend() {
@ -589,7 +613,7 @@
mask: true
});
let params = that.details[0];
console.log("提交",JSON.stringify(params))
console.log("提交", JSON.stringify(params))
finshInjectionIssueJob(that.id, params.id, params)
.then(res => {
uni.hideLoading();
@ -632,7 +656,7 @@
},
scanPopupGetFocus() {
if(this.$refs.scanPopupTo){
if (this.$refs.scanPopupTo) {
this.$refs.scanPopupTo.getfocus();
}
},

107
fe/PDA/pages/task/injectionIssueJobDetailByQty.vue

@ -3,16 +3,8 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail
:jobContent="datacontent"
:allCount="allCount"
:isShowScanHint="true"
scanHint="已发数"
:scanCount="scanCount"
:isShowOther="true"
:isShowShouRong="true"
:shouRongCount="shouRongCount"
>
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="true" scanHint="已发数"
:scanCount="scanCount" :isShowOther="true" :isShowShouRong="true" :shouRongCount="shouRongCount">
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
@ -82,9 +74,9 @@
<uni-td width="120" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBoxRef" v-model="item.tempHandledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
<com-number-box ref="comNumberBoxRef"
v-model="item.tempHandledToQty" :max="999999" :min="0"
style='width: 100px;' @change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-td>
@ -100,7 +92,7 @@
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend"> 推荐</button>
</view>
</view>
</scroll-view>
@ -126,7 +118,7 @@
</view>
</view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -171,7 +163,7 @@
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
@ -195,13 +187,14 @@
toLocation: '',
ispending: false,
allCount: 0,
scanCount:0,
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
singCode: "",
shouRongCount:null
shouRongCount: null,
showBtn: true
}
},
props: {
@ -209,17 +202,14 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeKittingIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
@ -229,7 +219,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeKittingIssueJob(this.id).then(res => {
uni.navigateBack();
@ -316,8 +306,8 @@
r => {
r.scaned = false;
r.scanDate = new Date()
r.handledFromLocationCode=""
r.handledToLocationCode=""
r.handledFromLocationCode = ""
r.handledToLocationCode = ""
}
);
@ -325,8 +315,8 @@
this.allCount = that.details[0].recommendFromQty;
this.scanCount = that.details[0].handledToQty;
that.details[0].defaultHandleQty = that.details[0].handledFromQty;
that.details[0].tempHandledToQty =0
that.details[0].tempHandledFromQty =0
that.details[0].tempHandledToQty = 0
that.details[0].tempHandledFromQty = 0
//
getCountByItemCode(that.details[0].itemCode).then(res => {
uni.hideLoading();
@ -343,15 +333,36 @@
uni.hideLoading();
this.showMessage(error)
})
this.setReceived()
}
})
.catch(err => {
uni.hideLoading();
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
@ -366,24 +377,24 @@
},
recommend(){
var itemCode =this.details[0].itemCode
var productLine =this.details[0].prodLine
if(!itemCode){
recommend() {
var itemCode = this.details[0].itemCode
var productLine = this.details[0].prodLine
if (!itemCode) {
this.showMessage("物料为空")
return;
}
if(!productLine){
if (!productLine) {
this.showMessage("生产线为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode,productLine,false).then(res=>{
getRecommendBalance(itemCode, productLine, false).then(res => {
uni.hideLoading()
if (res.length > 0) {
var list = [];
@ -393,12 +404,10 @@
item.value = item.SHIFT_CODE
})
this.$refs.selectPopup.openScanPopup(list)
}
else {
} else {
this.showMessage("推荐列表为0")
}
}).catch(error=>{
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
@ -454,8 +463,8 @@
title: "提交中...",
mask: true
});
that.details[0].handledFromQty =that.details[0].tempHandledToQty
that.details[0].handledToQty =that.details[0].tempHandledToQty
that.details[0].handledFromQty = that.details[0].tempHandledToQty
that.details[0].handledToQty = that.details[0].tempHandledToQty
let params = that.details[0];
finshKittingIssueJob(that.id, params.id, params)
.then(res => {
@ -510,11 +519,11 @@
}
if (value == 0) {
this.showMessage('发料数量必须大于0')
item.tempHandledToQty =item.tempHandledFromQty
item.tempHandledToQty = item.tempHandledFromQty
this.$refs.comNumberBoxRef[0].setValue(item.tempHandledToQty);
return;
}
item.tempHandledFromQty =value;
}
item.tempHandledFromQty = value;
console.log('item', item.tempHandledFromQty);
this.$forceUpdate();

77
fe/PDA/pages/task/kittingIssueJobDetail.vue

@ -153,7 +153,7 @@
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -231,7 +231,8 @@
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
handleToPackingCodeLocationCode: "",
showBtn: true
}
},
props: {
@ -239,23 +240,14 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.jobStatus == 2) {
//
cancelTakeKittingIssueJob(this.id).then(res => {
}).catch(error => {
})
}
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeKittingIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
@ -265,7 +257,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeKittingIssueJob(this.id).then(res => {
uni.navigateBack();
@ -342,6 +334,7 @@
};
getKittingIssueDetail(params)
.then(item => {
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
@ -369,15 +362,37 @@
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
this.setReceived();
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResultTo(result) {
var fromData = result.data;
@ -396,18 +411,18 @@
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
})
},100)
}, 100)
}
} else {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
},
setData(result,data,fromData) {
setData(result, data, fromData) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -422,8 +437,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -435,7 +450,8 @@
item.handledFromQty = balancesItem.qty
item.handleToPackingCodeLocationCode = balancesItem.locationCode
} else {
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot + "]与推荐目标批次[" + item
showConfirmMsg("箱码[" + fromData.code + "]的批次[" + balancesItem.lot +
"]与推荐目标批次[" + item
.recommendToLot + "]不一致,是否继续发料", res => {
if (res) {
item.handledToContainerCode = balancesItem.containerCode
@ -447,8 +463,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -458,7 +474,8 @@
item.handledFromLot = balancesItem.lot
item.handledFromWarehouseCode = balancesItem.warehouseCode
item.handledFromQty = balancesItem.qty
item.handleToPackingCodeLocationCode = balancesItem.locationCode
item.handleToPackingCodeLocationCode = balancesItem
.locationCode
}
})
}
@ -486,7 +503,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
if (this.details[0].recommendFromPackingCode == result.data.code) {
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -500,7 +517,7 @@
this.showScanMessage(err.message);
uni.hideLoading();
});
}else {
} else {
getBalanceRemoveInAndOut(params)
.then(res => {
if (res.totalCount === 0) {

117
fe/PDA/pages/task/kittingIssueJobDetailByQty.vue

@ -3,16 +3,8 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail
:jobContent="datacontent"
:allCount="allCount"
:isShowScanHint="true"
scanHint="已发数"
:scanCount="scanCount"
:isShowOther="true"
:isShowShouRong="true"
:shouRongCount="shouRongCount"
>
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="true" scanHint="已发数"
:scanCount="scanCount" :isShowOther="true" :isShowShouRong="true" :shouRongCount="shouRongCount">
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
@ -82,9 +74,9 @@
<uni-td width="120" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBoxRef" v-model="item.tempHandledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
<com-number-box ref="comNumberBoxRef"
v-model="item.tempHandledToQty" :max="999999" :min="0"
style='width: 100px;' @change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-td>
@ -100,7 +92,7 @@
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend"> 推荐</button>
</view>
</view>
</scroll-view>
@ -126,7 +118,7 @@
</view>
</view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -171,7 +163,7 @@
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
@ -195,13 +187,14 @@
toLocation: '',
ispending: false,
allCount: 0,
scanCount:0,
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
singCode: "",
shouRongCount:null
shouRongCount: null,
showBtn: true
}
},
props: {
@ -209,25 +202,16 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.jobStatus == 2) {
//
cancelTakeKittingIssueJob(this.id).then(res => {
}).catch(error => {
})
}
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeKittingIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
}
@ -236,7 +220,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeKittingIssueJob(this.id).then(res => {
uni.navigateBack();
@ -248,6 +232,7 @@
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
@ -331,8 +316,8 @@
this.allCount = that.details[0].recommendFromQty;
this.scanCount = that.details[0].handledToQty;
that.details[0].defaultHandleQty = that.details[0].handledFromQty;
that.details[0].tempHandledToQty =0
that.details[0].tempHandledFromQty =0
that.details[0].tempHandledToQty = 0
that.details[0].tempHandledFromQty = 0
//
getCountByItemCode(that.details[0].itemCode).then(res => {
uni.hideLoading();
@ -349,15 +334,39 @@
uni.hideLoading();
this.showMessage(error)
})
this.setReceived();
}
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
this.showMessage('未查找到详细信息')
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
@ -372,24 +381,24 @@
},
recommend(){
var itemCode =this.details[0].itemCode
var productLine =this.details[0].prodLine
if(!itemCode){
recommend() {
var itemCode = this.details[0].itemCode
var productLine = this.details[0].prodLine
if (!itemCode) {
this.showMessage("物料为空")
return;
}
if(!productLine){
if (!productLine) {
this.showMessage("生产线为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode,productLine,false).then(res=>{
getRecommendBalance(itemCode, productLine, false).then(res => {
uni.hideLoading()
if (res.length > 0) {
var list = [];
@ -399,12 +408,10 @@
item.value = item.SHIFT_CODE
})
this.$refs.selectPopup.openScanPopup(list)
}
else {
} else {
this.showMessage("推荐列表为0")
}
}).catch(error=>{
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
@ -460,8 +467,8 @@
title: "提交中...",
mask: true
});
that.details[0].handledFromQty =that.details[0].tempHandledToQty
that.details[0].handledToQty =that.details[0].tempHandledToQty
that.details[0].handledFromQty = that.details[0].tempHandledToQty
that.details[0].handledToQty = that.details[0].tempHandledToQty
let params = that.details[0];
finshKittingIssueJob(that.id, params.id, params)
.then(res => {
@ -516,11 +523,11 @@
}
if (value == 0) {
this.showMessage('发料数量必须大于0')
item.tempHandledToQty =item.tempHandledFromQty
item.tempHandledToQty = item.tempHandledFromQty
this.$refs.comNumberBoxRef[0].setValue(item.tempHandledToQty);
return;
}
item.tempHandledFromQty =value;
}
item.tempHandledFromQty = value;
console.log('item', item.tempHandledFromQty);
this.$forceUpdate();

71
fe/PDA/pages/task/sparePartIssueJobDetail.vue

@ -153,7 +153,7 @@
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -231,7 +231,8 @@
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
handleToPackingCodeLocationCode: ""
handleToPackingCodeLocationCode: "",
showBtn: true
}
},
props: {
@ -239,22 +240,13 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.jobStatus == 2) {
//
cancelTakeSparePartIssueJob(this.id).then(res => {
}).catch(error => {
})
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeSparePartIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
@ -265,7 +257,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeSparePartIssueJob(this.id).then(res => {
uni.navigateBack();
@ -342,6 +334,7 @@
};
getSparePartIssueDetail(params)
.then(item => {
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.jobStatus = item.jobStatus;
@ -369,15 +362,37 @@
);
that.ispending = item.jobStatus === 2;
this.allCount = that.details.length;
this.setReceived();
}
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
this.showMessage('未查找到详细信息')
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResultTo(result) {
var fromData = result.data;
@ -396,18 +411,18 @@
"]不一致,是否继续发料?",
res => {
if (res) {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
})
})
}
} else {
this.setData(result,data,fromData)
this.setData(result, data, fromData)
}
},
setData(result,data,fromData) {
setData(result, data, fromData) {
this.getBalance(result, res => {
if (res.totalCount > 0) {
var balancesItem = res.items[0];
@ -422,8 +437,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -447,8 +462,8 @@
item.handledToLot = balancesItem.lot
item.handledToWarehouseCode = balancesItem.warehouseCode
item.handledToQty = balancesItem.qty
item.stdPackQty =balancesItem.stdPackQty
item.stdPackQty = balancesItem.stdPackQty
item.handledFromContainerCode = balancesItem.containerCode
item.handledFromPackingCode = balancesItem.packingCode
item.handledFromSupplierBatch = balancesItem.supplierBatch
@ -486,7 +501,7 @@
// sortBy: 'PackingCode asc'
};
if(this.details[0].recommendFromPackingCode==result.data.code){
if (this.details[0].recommendFromPackingCode == result.data.code) {
balances(params)
.then(res => {
if (res.totalCount === 0) {
@ -500,7 +515,7 @@
this.showScanMessage(err.message);
uni.hideLoading();
});
}else {
} else {
getBalanceRemoveInAndOut(params)
.then(res => {
if (res.totalCount === 0) {

103
fe/PDA/pages/task/sparePartIssueJobDetailByQty.vue

@ -3,16 +3,8 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail
:jobContent="datacontent"
:allCount="allCount"
:isShowScanHint="true"
scanHint="已发数"
:scanCount="scanCount"
:isShowOther="true"
:isShowShouRong="true"
:shouRongCount="shouRongCount"
>
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :isShowScanHint="true" scanHint="已发数"
:scanCount="scanCount" :isShowOther="true" :isShowShouRong="true" :shouRongCount="shouRongCount">
</com-job-scan-detail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
@ -82,9 +74,9 @@
<uni-td width="120" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box ref="comNumberBoxRef" v-model="item.tempHandledToQty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
<com-number-box ref="comNumberBoxRef"
v-model="item.tempHandledToQty" :max="999999" :min="0"
style='width: 100px;' @change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-td>
@ -100,7 +92,7 @@
<view class="" style="margin-left: 50rpx; margin-right: 50rpx;">
<button type="primary" size="default" @click="recommend"> 推荐</button>
</view>
</view>
</scroll-view>
@ -126,7 +118,7 @@
</view>
</view>
<view class="uni-flex uni-row new_btn_bot">
<view class="uni-flex uni-row new_btn_bot" v-if="showBtn">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
@ -171,7 +163,7 @@
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import selectClickList from "@/mycomponents/popup/selectClickList.vue"
export default {
components: {
comMessage,
@ -195,13 +187,14 @@
toLocation: '',
ispending: false,
allCount: 0,
scanCount:0,
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
jobStatus: "",
toLocationInfo: {},
singCode: "",
shouRongCount:null
shouRongCount: null,
showBtn: true
}
},
props: {
@ -209,17 +202,14 @@
},
onLoad(param) {
this.id = param.id;
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
this.getDetail();
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
cancelTakeSparePartIssueJob(this.id).then(res => {}).catch(error => {})
}
goHome();
} else if (e.index === 1) {
window.location.reload();
@ -229,7 +219,7 @@
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
if (this.datacontent.isClaims && this.datacontent.claimsUserId == localStorage.getItem('userId')) {
//
cancelTakeSparePartIssueJob(this.id).then(res => {
uni.navigateBack();
@ -325,8 +315,8 @@
this.allCount = that.details[0].recommendFromQty;
this.scanCount = that.details[0].handledToQty;
that.details[0].defaultHandleQty = that.details[0].handledFromQty;
that.details[0].tempHandledToQty =0
that.details[0].tempHandledFromQty =0
that.details[0].tempHandledToQty = 0
that.details[0].tempHandledFromQty = 0
//
getCountByItemCode(that.details[0].itemCode).then(res => {
uni.hideLoading();
@ -343,14 +333,37 @@
uni.hideLoading();
this.showMessage(error)
})
this.setReceived();
}
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
setReceived() {
//
//
if (this.datacontent.isClaims) {
//
if (this.datacontent.claimsUserId == localStorage.getItem('userId')) {
this.showBtn = true
} else {
this.showBtn = false
}
} else {
//
this.receive((callback => {
if (callback) {
this.showBtn = true
} else {
this.showBtn = false
}
}));
}
},
getScanResult(result) {
let item = this.details.find(r => {
return r.itemCode == result.itemCode
@ -365,24 +378,24 @@
},
recommend(){
var itemCode =this.details[0].itemCode
var productLine =this.details[0].prodLine
if(!itemCode){
recommend() {
var itemCode = this.details[0].itemCode
var productLine = this.details[0].prodLine
if (!itemCode) {
this.showMessage("物料为空")
return;
}
if(!productLine){
if (!productLine) {
this.showMessage("生产线为空")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getRecommendBalance(itemCode,productLine,false).then(res=>{
getRecommendBalance(itemCode, productLine, false).then(res => {
uni.hideLoading()
if (res.length > 0) {
var list = [];
@ -392,12 +405,10 @@
item.value = item.SHIFT_CODE
})
this.$refs.selectPopup.openScanPopup(list)
}
else {
} else {
this.showMessage("推荐列表为0")
}
}).catch(error=>{
}).catch(error => {
uni.hideLoading()
this.showMessage(error)
})
@ -453,8 +464,8 @@
title: "提交中...",
mask: true
});
that.details[0].handledFromQty =that.details[0].tempHandledToQty
that.details[0].handledToQty =that.details[0].tempHandledToQty
that.details[0].handledFromQty = that.details[0].tempHandledToQty
that.details[0].handledToQty = that.details[0].tempHandledToQty
let params = that.details[0];
finshSparePartIssueJob(that.id, params.id, params)
.then(res => {
@ -509,11 +520,11 @@
}
if (value == 0) {
this.showMessage('发料数量必须大于0')
item.tempHandledToQty =item.tempHandledFromQty
item.tempHandledToQty = item.tempHandledFromQty
this.$refs.comNumberBoxRef[0].setValue(item.tempHandledToQty);
return;
}
item.tempHandledFromQty =value;
}
item.tempHandledFromQty = value;
console.log('item', item.tempHandledFromQty);
this.$forceUpdate();

Loading…
Cancel
Save