Browse Source

生产合格退料申请校验物料信息

wms3.0_pda
lijuncheng 10 months ago
parent
commit
0ecca875ca
  1. 2
      mycomponents/scan/winScanItem.vue
  2. 52
      pages/productionReturn/coms/comReturnRequestPopup.vue
  3. 22
      pages/productionReturn/request/returnRequestCreate.vue

2
mycomponents/scan/winScanItem.vue

@ -32,8 +32,6 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getLocationTypeName,
getListLocationTypeDesc,
checkDirectoryItemExist, checkDirectoryItemExist,
getListItemTypeDesc, getListItemTypeDesc,
getItemTypeInfo getItemTypeInfo

52
pages/productionReturn/coms/comReturnRequestPopup.vue

@ -66,7 +66,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getScanCode'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult' :itemCodeTypeList="itemCodeTypeList">
</win-scan-item> </win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -116,7 +116,6 @@
itemCodeFocus: false, itemCodeFocus: false,
requestInfo: null, requestInfo: null,
itemCodeList: [], itemCodeList: [],
isCheckItemCode: false,
counQty: undefined, counQty: undefined,
editPosition: true, editPosition: true,
numberFocus: false, numberFocus: false,
@ -198,6 +197,10 @@
type: String, type: String,
default: '需求信息' default: '需求信息'
}, },
itemCodeTypeList: {
type: Array,
default: []
},
}, },
methods: { methods: {
checkNum(e) { checkNum(e) {
@ -228,7 +231,7 @@
if (this.isModifiedPosition) { if (this.isModifiedPosition) {
this.isModifiedPosition = false this.isModifiedPosition = false
} else { } else {
this.itemCode = ""; this.itemCode = "请扫描物料信息";
this.uom = "" this.uom = ""
this.qty = 0; this.qty = 0;
this.counQty = undefined this.counQty = undefined
@ -255,13 +258,9 @@
itemCodeLoseFocus() { itemCodeLoseFocus() {
this.itemCodeFocus = false; this.itemCodeFocus = false;
}, },
selectedItem(item) {
this.itemCode = item.itemCode;
this.checkItemCode();
},
confirm() { confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.itemCode == "请扫描物料信息" ) {
this.showErrorMessage("请输入物料", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
@ -283,28 +282,6 @@
this.callback('add'); this.callback('add');
}, },
checkItemCode(itemCode) {
//
getBasicItemByCode(itemCode).then(res => {
uni.hideLoading();
this.$refs.scanPopup.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('未查找到物料【' + this.itemCode + '】', "itemCode");
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, "itemCode");
})
},
callback(action) { callback(action) {
let item = { let item = {
positionInfo: this.positionInfo, positionInfo: this.positionInfo,
@ -335,8 +312,7 @@
} }
}) })
if (type == "itemCode") { if (type == "itemCode") {
this.itemCode = "" this.itemCode = "请扫描物料信息"
this.isCheckItemCode = false;
} }
}) })
}, },
@ -382,14 +358,12 @@
} }
}, },
getScanCode(code, scanResult) { getItemScanResult(code, scanResult) {
if (code == "") { this.itemCode = code;
this.showErrorMessage('物料号不能为空') this.itemName = scanResult.name
return; this.uom =scanResult.uom
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package; this.stdPackInfo = scanResult.package;
this.numberFocus = true
}, },
} }

22
pages/productionReturn/request/returnRequestCreate.vue

@ -23,13 +23,17 @@
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</view> </view>
<comReturnRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' title="申请信息"></comReturnRequestPopup> <comReturnRequestPopup ref="comIssueRequestPopup" @confirm='requestConfirm' title="申请信息" :itemCodeTypeList="itemCodeTypeList"></comReturnRequestPopup>
</template> </template>
<script> <script>
import { import {
productionReturnRequestCreate, productionReturnRequestCreate,
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getBusinessType,
} from '@/common/record.js';
import { import {
calc calc
@ -61,7 +65,6 @@
}, },
data() { data() {
return { return {
jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: { detailSource: {
subList: [] subList: []
@ -70,13 +73,14 @@
scanOptions: [], scanOptions: [],
requestList: [], // requestList: [], //
fromType: '', fromType: '',
title: "" title: "",
itemCodeTypeList: []
} }
}, },
mounted() { mounted() {
this.goScan(true)
}, },
onLoad(option) { onLoad(option) {
this.fromType = option.fromType this.fromType = option.fromType
@ -86,6 +90,16 @@
this.title = "生产隔离退料申请" this.title = "生产隔离退料申请"
} }
updateTitle(this.title) updateTitle(this.title)
var typeCode = this.fromType
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.goScan(true)
} else {
this.showErrorMessage(res.message)
}
});
}, },
methods: { methods: {

Loading…
Cancel
Save