Browse Source

修改发料申请页面

wms3.0_pda
李俊城 2 years ago
parent
commit
9a8ee46f43
  1. 2
      pages/deliver/job/deliverDetail.vue
  2. 69
      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'
}) })
}) })
}, },

69
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,7 +93,7 @@
uom, uom,
balanceStatus, balanceStatus,
comMessage, comMessage,
selectList winScanItem
}, },
data() { data() {
return { return {
@ -100,7 +104,7 @@
productionLineName: "", productionLineName: "",
workStationCode: "", // workStationCode: "", //
workStationName: "", workStationName: "",
itemCode: '', itemCode: '请扫描物料信息',
itemName: "", itemName: "",
qty: 0, qty: 0,
itemCodeFocus: false, itemCodeFocus: 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 => {
@ -304,9 +304,6 @@
} }
}) })
}, },
itemCodeConfirm() {
this.checkItemCode();
},
change(value) { change(value) {
this.qty = value; this.qty = value;
}, },
@ -330,19 +327,15 @@
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