Browse Source

位置码类型校验

pda_nev
李俊城 11 months ago
parent
commit
c286acdd11
  1. 1
      fe/PDA/common/array.js
  2. 19
      fe/PDA/common/basic.js
  3. 15
      fe/PDA/mycomponents/wincom/winScanByPosition.vue
  4. 12
      fe/PDA/pages/request/assembleIssueRequest.vue
  5. 12
      fe/PDA/pages/request/coatingIssueRequest.vue
  6. 12
      fe/PDA/pages/request/injectionIssueRequest.vue
  7. 16
      fe/PDA/pages/request/kittingIssueRequest.vue
  8. 10
      fe/PDA/pages/request/sparePartIssueRequest.vue

1
fe/PDA/common/array.js

@ -132,3 +132,4 @@ export function getReturnReasonArray() {
}]
return array;
}

19
fe/PDA/common/basic.js

@ -244,6 +244,25 @@ export function getContainerTypeName(val) {
let item = array.find(r => r.value == val);
return item.name;
}
//位置码类型
export function getPositionCodeName(type) {
let array = [{
name: '注塑区',
type: 1,
},{
name: '喷涂区',
type: 2,
},{
name: '装配区',
type: 3,
}, {
name: 'kitting区',
type: 4,
}];
let item = array.find(r => r.type == type);
return item.name;
}
//提示是否消息
export function showConfirmMsg(content, callback) {

15
fe/PDA/mycomponents/wincom/winScanByPosition.vue

@ -28,6 +28,10 @@
import {
getPositionCodeInfo
} from '@/api/index.js';
import {
getPositionCodeName
} from '@/common/basic.js';
export default {
name: 'winScanByPack',
@ -40,6 +44,10 @@
type: String,
default: ''
},
codeType: {
type: String,
default: ""
}
},
data() {
return {
@ -103,10 +111,17 @@
getPositionCodeInfo(result.data.code).then(res=>{
uni.hideLoading()
if(res){
console.log("类型"+this.codeType)
if(res.type==this.codeType){
this.scanResult = res;
this.scanResult.qty =1;
this.callBack()
this.closeScanPopup()
}else {
var type =
this.showMessage("位置码【"+res.code+"】的类型是["+getPositionCodeName(res.type) + "不是["+getPositionCodeName(this.codeType)+"]类型")
}
}else {
this.showMessage("未查找到位置码【"+result.data.code+"】")
}

12
fe/PDA/pages/request/assembleIssueRequest.vue

@ -85,7 +85,7 @@
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult' codeType="3"></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
@ -152,6 +152,7 @@
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
result.defaultHandleQty=result.qty
this.itemList.push(result)
this.$forceUpdate()
@ -230,16 +231,11 @@
qtyChanged(value, item, index) {
if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);

12
fe/PDA/pages/request/coatingIssueRequest.vue

@ -85,7 +85,7 @@
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult' codeType="2"></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
@ -152,6 +152,7 @@
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
result.defaultHandleQty=result.qty
this.itemList.push(result)
this.$forceUpdate()
@ -230,16 +231,11 @@
qtyChanged(value, item, index) {
if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);

12
fe/PDA/pages/request/injectionIssueRequest.vue

@ -85,7 +85,7 @@
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult' codeType="1"></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
@ -152,6 +152,7 @@
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
result.defaultHandleQty=result.qty
this.itemList.push(result)
this.$forceUpdate()
@ -230,16 +231,11 @@
qtyChanged(value, item, index) {
if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);

16
fe/PDA/pages/request/kittingIssueRequest.vue

@ -86,7 +86,7 @@
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult' codeType="4"></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
@ -152,7 +152,8 @@
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
result.qty = result.stdPackQty;
result.defaultHandleQty = result.qty
this.itemList.push(result)
this.$forceUpdate()
@ -206,7 +207,7 @@
this.itemList.forEach(res => {
var data = {
remark: "",
qty:res.qty,
qty: res.qty,
itemCode: res.partCode,
itemName: res.partName,
itemDesc1: res.itemDesc2,
@ -231,16 +232,11 @@
qtyChanged(value, item, index) {
if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);

10
fe/PDA/pages/request/sparePartIssueRequest.vue

@ -152,6 +152,7 @@
getScanResult(result) {
this.dataContent = result;
result.qty =result.stdPackQty;
result.defaultHandleQty=result.qty
this.itemList.push(result)
this.$forceUpdate()
@ -230,16 +231,11 @@
qtyChanged(value, item, index) {
if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);

Loading…
Cancel
Save