gaojs
7 months ago
4 changed files with 184 additions and 1 deletions
@ -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> |
Loading…
Reference in new issue