Browse Source

修改计划外入库申请校验物料信息

wms3.0_pda
lijuncheng 1 year ago
parent
commit
90e73ae2eb
  1. 1
      pages/issue/record/issueRecord.vue
  2. 53
      pages/unPlanned/coms/comReceiptRequestPopup.vue
  3. 18
      pages/unPlanned/request/receiptRequestCreate.vue

1
pages/issue/record/issueRecord.vue

@ -136,7 +136,6 @@
this.toInventoryStatuses = res.toInventoryStatuses this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true) this.goScan(true)
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
}); });

53
pages/unPlanned/coms/comReceiptRequestPopup.vue

@ -68,7 +68,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemCode'> <win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemScanResult'>
</win-scan-item> </win-scan-item>
<winScanLocation ref="locationPopup" title="库位代码" @getLocation='getLocationCode'></winScanLocation> <winScanLocation ref="locationPopup" title="库位代码" @getLocation='getLocationCode'></winScanLocation>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -126,6 +126,10 @@
type: String, type: String,
default: '申请信息' default: '申请信息'
}, },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
methods: { methods: {
checkNum(e) { checkNum(e) {
@ -146,7 +150,7 @@
openRequestPopup(editPosition) { openRequestPopup(editPosition) {
this.editPosition = editPosition; this.editPosition = editPosition;
if (!editPosition) { if (!editPosition) {
this.itemCode = ""; this.itemCode = "请扫描物料信息";
this.uom = "" this.uom = ""
this.qty = 0 this.qty = 0
this.counQty = undefined; this.counQty = undefined;
@ -175,10 +179,6 @@
itemCodeLoseFocus() { itemCodeLoseFocus() {
this.itemCodeFocus = false; this.itemCodeFocus = false;
}, },
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() { confirm() {
if (this.toLocationCode == "") { if (this.toLocationCode == "") {
@ -186,7 +186,7 @@
return return
} }
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.itemCode == "请扫描物料信息" ) {
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
@ -203,28 +203,6 @@
this.callback('add'); this.callback('add');
}, },
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.itemPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name
this.isCheckItemCode = true;
this.numberFocus = true
this.uom = res.data.list[0].uom
} else {
this.showErrorMessage('未查找到物料【' + itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) { callback(action) {
let item = { let item = {
toLocationCode: this.toLocationCode, toLocationCode: this.toLocationCode,
@ -259,18 +237,17 @@
this.closeRequestPopup(); this.closeRequestPopup();
}, },
getItemCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package;
},
getLocationCode(location, code) { getLocationCode(location, code) {
this.toLocationCode = code; this.toLocationCode = code;
}, },
getItemScanResult(code, scanResult) {
this.itemCode = code;
this.itemName = scanResult.name
this.uom =scanResult.uom
this.stdPackInfo = scanResult.package;
this.numberFocus = true
}
} }
} }

18
pages/unPlanned/request/receiptRequestCreate.vue

@ -39,7 +39,7 @@
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</view> </view>
<comReceiptRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm'></comReceiptRequestPopup> <comReceiptRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' :itemCodeTypeList="itemCodeTypeList"></comReceiptRequestPopup>
</template> </template>
<script> <script>
@ -50,6 +50,9 @@
import { import {
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
goHome, goHome,
@ -84,7 +87,6 @@
}, },
data() { data() {
return { return {
jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: { detailSource: {
subList: [] subList: []
@ -92,14 +94,24 @@
reasonList: [], // reasonList: [], //
reasonText: "", reasonText: "",
reasonCode: "", reasonCode: "",
itemCodeTypeList:[]
} }
}, },
mounted() { mounted() {
this.goScan(true)
}, },
onLoad(option) { onLoad(option) {
this.reasonList = getUnPlannedReceiptReasonList() this.reasonList = getUnPlannedReceiptReasonList()
var typeCode = "UnplannedReceipt"
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
}, },
methods: { methods: {
goScan(editPosition) { goScan(editPosition) {

Loading…
Cancel
Save