Browse Source

MES——> PDA 叫料BOM查询

master
gaojs 7 months ago
parent
commit
a564d00469
  1. 2
      src/api/mes/workScheduling/index.ts
  2. 6
      src/pages.json
  3. 176
      src/pages/mes/workScheduling/callMaterial.vue
  4. 1
      src/pages/mes/workScheduling/workScheduling.vue

2
src/api/mes/workScheduling/index.ts

@ -85,7 +85,7 @@ export function completeHandle(data) {
//叫料 //叫料
export function callBasicItem(data) { export function callBasicItem(data) {
return http.post('/mes/', data) return http.get('/mes/orderDayBom/page', {data})
} }
//领料 //领料

6
src/pages.json

@ -1955,6 +1955,12 @@
"navigationBarTitleText": "报工质检", "navigationBarTitleText": "报工质检",
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
},{
"path": "pages/mes/workScheduling/callMaterial",
"style": {
"navigationBarTitleText": "叫料",
"enablePullDownRefresh": true
}
},{ },{
"path": "pages/mes/workScheduling/processReportPeopleCheck", "path": "pages/mes/workScheduling/processReportPeopleCheck",
"style": { "style": {

176
src/pages/mes/workScheduling/callMaterial.vue

@ -0,0 +1,176 @@
<template>
<view class="container">
<view class="list">
<view class="item" v-for="(item, index) in list" :key="index" >
<view class="dec">
<view>日计划编码</view><view>{{ item.planDayCode }}</view>
</view>
<view class="dec">
<view>日任务编码</view><view>{{ schedulingCodeStr }}</view>
</view>
<view class="dec">
<view>工序编码</view><view>{{ item.processCode }}</view>
</view>
<view class="dec">
<view>物料号</view><view>{{ item.repMaterialCode }}</view>
</view>
<view class="dec">
<view>数量</view><view>{{ item.srcMaterialCounts * planCountStr }}</view>
</view>
<view>
<u-form-item label="叫料数量" prop="callMaterialCounts">
<u-input v-model="item.totalMaterialCounts" placeholder="请输入叫料数量"/>
</u-form-item>
</view>
</view>
<view >
<u-button type="primary" @click="submitCMForm()">提交</u-button>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" />
</view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
</template>
<script setup lang="ts">
import {
onLoad,
onShow,
onReachBottom
} from '@dcloudio/uni-app'
import {
ref,
getCurrentInstance
} from 'vue'
import * as workSchedulingListApi from '@/api/mes/workScheduling/index.ts'
const {proxy} = getCurrentInstance()
const loading = ref(false)
const status = ref('loadmore') //
const workingNodeStr = ref('')
const planMasterCodeStr = ref('')
const schedulingCodeStr = ref('')
const planCountStr = ref('')
const list = ref([])
const form = ref({
callMaterialCounts: '',
})
const params = ref({
pageNo: 1,
pageSize: 10,
planDayCode: '',
processCode: ''
})
function getBomInspectList() {
if (status.value == 'nomore') return
status.value = 'loading'
proxy.$modal.loading('加载中')
params.value.planDayCode = planMasterCodeStr.value
params.value.processCode = workingNodeStr.value
workSchedulingListApi.callBasicItem(params.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list)
params.value.pageNo++
status.value = 'loadmore'
} else {
status.value = 'nomore'
}
}).catch(() => {
proxy.$modal.closeLoading()
})
}
function submitCMForm () {
console.log(list)
}
//
onReachBottom(() => {
status.value = 'loadmore'
getBomInspectList()
})
onLoad((option) => {
console.log(JSON.parse(option.obj))
if (option.obj) {
schedulingCodeStr.value = JSON.parse(option.obj).schedulingCode
workingNodeStr.value = JSON.parse(option.obj).workingNode
planMasterCodeStr.value = JSON.parse(option.obj).planMasterCode
planCountStr.value = JSON.parse(option.obj).planCount
}
})
onShow(() => {
getBomInspectList()
})
</script>
<style lang="scss" scoped>
.container{
background: #f5f5f5;
min-height: 100vh;
}
.list {
background: #f5f5f5;
margin-top: 20rpx;
.item {
padding: 30rpx 30rpx 0px 30rpx;
margin-top: 20rpx;
background: white;
position: relative;
.title {
display: flex;
align-items: center;
padding-bottom: 20rpx;
.title-txt {
color: #409eff;
font-weight: bold;
font-size: 36rpx;
width: 0px;
flex: 1;
word-wrap: break-word;
}
.time {
color: #919191;
}
}
.dec {
padding-bottom: 20rpx;
display: flex;
align-items: center;
view {
&:nth-child(1){
width: 200rpx;;
}
&:nth-child(2){
color: #999999;
flex: 1;
width: 0px;
word-wrap: break-word;
}
}
}
.last {
padding-bottom: 30rpx;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #E4E4E4;
padding: 20rpx 0px;
height: 90rpx;
}
}
}
</style>

1
src/pages/mes/workScheduling/workScheduling.vue

@ -298,6 +298,7 @@ function reportHandle(item) {
// //
function callBasicItem(item){ function callBasicItem(item){
console.log(item) console.log(item)
proxy.$tab.navigateTo(`/pages/mes/workScheduling/callMaterial?obj=${JSON.stringify(item)}`)
} }
// //
function receiveBasicItem(item){ function receiveBasicItem(item){

Loading…
Cancel
Save