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. 23
      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. 22
      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; return array;
} }

19
fe/PDA/common/basic.js

@ -244,6 +244,25 @@ export function getContainerTypeName(val) {
let item = array.find(r => r.value == val); let item = array.find(r => r.value == val);
return item.name; 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) { export function showConfirmMsg(content, callback) {

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

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

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

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

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

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

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

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

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

@ -86,7 +86,7 @@
</div> </div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> --> <!-- <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' <com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'> @afterCloseCommitMessage='closeCommitMessage'>
</com-message> </com-message>
@ -152,7 +152,8 @@
getScanResult(result) { getScanResult(result) {
this.dataContent = result; this.dataContent = result;
result.qty =result.stdPackQty; result.qty = result.stdPackQty;
result.defaultHandleQty = result.qty
this.itemList.push(result) this.itemList.push(result)
this.$forceUpdate() this.$forceUpdate()
@ -206,13 +207,13 @@
this.itemList.forEach(res => { this.itemList.forEach(res => {
var data = { var data = {
remark: "", remark: "",
qty:res.qty, qty: res.qty,
itemCode: res.partCode, itemCode: res.partCode,
itemName: res.partName, itemName: res.partName,
itemDesc1: res.itemDesc2, itemDesc1: res.itemDesc2,
uom: res.basicUom, uom: res.basicUom,
stdPackQty: res.stdPackQty, stdPackQty: res.stdPackQty,
toLocationCode: res.locationCode, toLocationCode: res.locationCode,
prodLine: null, prodLine: null,
requestStatus: 1, requestStatus: 1,
issuedQty: res.qty, issuedQty: res.qty,
@ -220,7 +221,7 @@
status: 1, status: 1,
positionCode: this.dataContent.code, positionCode: this.dataContent.code,
recommendType: 0, recommendType: 0,
boxQty: res.qty boxQty: res.qty
} }
param.details.push(data) param.details.push(data)
@ -231,16 +232,11 @@
qtyChanged(value, item, index) { qtyChanged(value, item, index) {
if (value <= 0) { if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0') this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return; return;
} }
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message); this.$refs.comMessage.showMessage(message);

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

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

Loading…
Cancel
Save