Browse Source

修改发料申请页面

wms3.0_pda
李俊城 2 years ago
parent
commit
9a8ee46f43
  1. 2
      pages/deliver/job/deliverDetail.vue
  2. 103
      pages/issue/coms/comIssueRequestPopup.vue

2
pages/deliver/job/deliverDetail.vue

@ -375,7 +375,7 @@
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
uni.navigateTo({ uni.navigateTo({
url: './issueJob' url: './deliverJob'
}) })
}) })
}, },

103
pages/issue/coms/comIssueRequestPopup.vue

@ -26,17 +26,21 @@
</view> </view>
<u-line /> <u-line />
<view class="uni-flex uni-row padding title u-col-center">
<text>零件 : </text> <view class="title padding" style="display: flex;">
<view class="uni-flex u-col-center uni-row"> <text style=" flex-shrink: 0;">物料</text>
<u-input v-model="itemCode" :focus="itemCodeFocus" :border="true" <view class="" style="width: 100% ;">
placeholder="请输入需求零件" @confirm="itemCodeConfirm" /> {{itemCode}}
</view>
<view class="">
<image src="/static/search.svg" mode="" <image src="/static/search.svg" mode=""
style=" width: 40rpx;height: 40rpx;margin-left: 10rpx;" @click="itemCodeClick"> style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;"
@click="itemCodeClick">
</image> </image>
</view> </view>
</view> </view>
<u-line /> <u-line />
<view class="uni-flex uni-row padding title u-col-center"> <view class="uni-flex uni-row padding title u-col-center">
@ -60,9 +64,9 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'>
</win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<selectList ref='selectList' @selectedItem="selectedItem"></selectList>
</view> </view>
</template> </template>
@ -81,7 +85,7 @@
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import selectList from '@/mycomponents/popup/selectList.vue' import winScanItem from '@/mycomponents/scan/winScanItem.vue'
export default { export default {
@ -89,18 +93,18 @@
uom, uom,
balanceStatus, balanceStatus,
comMessage, comMessage,
selectList winScanItem
}, },
data() { data() {
return { return {
// itemCode: 'CE115F11161AG', // itemCode: 'CE115F11161AG',
workshopCode: "", // workshopCode: "", //
workShopName: "", workShopName: "",
productionLineCode: "",//线 productionLineCode: "", //线
productionLineName:"", productionLineName: "",
workStationCode: "",// workStationCode: "", //
workStationName:"", workStationName: "",
itemCode: '', itemCode: '请扫描物料信息',
itemName: "", itemName: "",
qty: 0, qty: 0,
itemCodeFocus: false, itemCodeFocus: false,
@ -114,7 +118,7 @@
positionInfo: "请选择位置", positionInfo: "请选择位置",
show: false, show: false,
isModifiedPosition: true, isModifiedPosition: true,
positionList:[], positionList: [],
list: [{ list: [{
value: 1, value: 1,
label: '车间1', label: '车间1',
@ -189,14 +193,14 @@
}, },
methods: { methods: {
openRequestPopup(editPosition) { openRequestPopup(editPosition) {
if(this.positionList.length==0){ if (this.positionList.length == 0) {
getWorkShopLineStation().then(res=>{ getWorkShopLineStation().then(res => {
this.positionList = res.data this.positionList = res.data
}).catch(error=>{ }).catch(error => {
}) })
} }
this.editPosition = editPosition; this.editPosition = editPosition;
if (this.isModifiedPosition) { if (this.isModifiedPosition) {
this.isModifiedPosition = false this.isModifiedPosition = false
@ -217,12 +221,7 @@
this.checkLocatioCode(); this.checkLocatioCode();
}, },
itemCodeClick() { itemCodeClick() {
if (this.positionInfo == "请选择位置") { this.$refs.scanPopup.openScanPopup();
this.showErrorMessage("请先选择位置")
return
}
this.$refs.selectList.queryList(this.productionLineCode)
}, },
itemCodeGetFocus() { itemCodeGetFocus() {
@ -238,7 +237,7 @@
confirm() { confirm() {
if (this.itemCode == "" || !this.isCheckItemCode) { if (this.itemCode == "" || !this.isCheckItemCode) {
this.showErrorMessage("请输入零件", "itemCode") this.showErrorMessage("请输入物料", "itemCode")
return return
} }
if (this.qty == 0) { if (this.qty == 0) {
@ -250,10 +249,11 @@
}, },
checkItemCode() { checkItemCode(itemCode) {
// //
getBasicItemByCode(this.itemCode).then(res => { getBasicItemByCode(itemCode).then(res => {
uni.hideLoading(); uni.hideLoading();
this.$refs.scanPopup.closeScanPopup();
if (res.data != null && res.data.list.length > 0) { if (res.data != null && res.data.list.length > 0) {
this.itemCode = res.data.list[0].code; this.itemCode = res.data.list[0].code;
this.itemName = res.data.list[0].name this.itemName = res.data.list[0].name
@ -261,7 +261,7 @@
this.numberFocus = true this.numberFocus = true
this.uom = res.data.list[0].uom this.uom = res.data.list[0].uom
} else { } else {
this.showErrorMessage('未查找到零件【' + this.itemCode + '】', "itemCode"); this.showErrorMessage('未查找到物料【' + this.itemCode + '】', "itemCode");
} }
}).catch(error => { }).catch(error => {
@ -274,12 +274,12 @@
callback(action) { callback(action) {
let item = { let item = {
positionInfo: this.positionInfo, positionInfo: this.positionInfo,
workshopCode: this.workshopCode,// workshopCode: this.workshopCode, //
workShopName: this.workShopName, workShopName: this.workShopName,
productionLineCode: this.productionLineCode,//线 productionLineCode: this.productionLineCode, //线
productionLineName:this.productionLineName, productionLineName: this.productionLineName,
workStationCode: this.workStationCode,// workStationCode: this.workStationCode, //
workStationName:this.workStationName, workStationName: this.workStationName,
itemCode: this.itemCode, itemCode: this.itemCode,
itemName: this.itemName, itemName: this.itemName,
uom: this.uom, uom: this.uom,
@ -304,9 +304,6 @@
} }
}) })
}, },
itemCodeConfirm() {
this.checkItemCode();
},
change(value) { change(value) {
this.qty = value; this.qty = value;
}, },
@ -321,28 +318,24 @@
}, },
confirmSelect(e) { confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
console.log("位置",this.positionInfo) console.log("位置", this.positionInfo)
this.workshopCode = e[0].value this.workshopCode = e[0].value
this.productionLineCode = e[1].value this.productionLineCode = e[1].value
this.workStationCode = e[2].value this.workStationCode = e[2].value
this.workShopName= e[0].label this.workShopName = e[0].label
this.productionLineName = e[1].label this.productionLineName = e[1].label
this.workStationName = e[2].label this.workStationName = e[2].label
}, },
getItemCodeListByProLine(lineCode) {
getProductionlineItem(lineCode).then(res => {
if (res.data != null && res.data.list.length > 0) {
this.$refs.selectList.openPopup(res.data.list)
} else {
//线
this.showErrorMessage('未查找到生产线【' + lineCode + '】对应的零件', "itemCode");
}
}).catch(error => {
this.showErrorMessage(error, "itemCode");
})
}
getScanCode(code) {
if (code == "") {
this.showMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
},
} }
} }

Loading…
Cancel
Save