Browse Source

1、工序报工-人员报工项列表

master
bjang03 7 months ago
parent
commit
a5ab070162
  1. 13
      src/api/mes/workScheduling/index.ts
  2. 87
      src/components/tags/index.vue
  3. 2
      src/pages.json
  4. 14
      src/pages/mes/workOrder/processReport.vue
  5. 161
      src/pages/mes/workScheduling/processReport.vue

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

@ -56,3 +56,16 @@ export function getEquipmentInfoList(params) {
export function updateWorkSchedulingInfo(params) {
return http.post('/mes/complete-inspect/update', params)
}
export interface getConfigProcessWorkerVO {
planDayCode: string
processCode: string
teamCode: string
}
// 查询已经配置工序人员
export const getConfigProcessWorker = async (params: any) => {
return http.get('/mes/work-scheduling-detail/getPeopleReportList', {params})
}
// 工序报工
export const reportWorkByProcess = async (params: any) => {
return http.post('/mes/work-scheduling-detail/reportWorkByProcess', params)
}

87
src/components/tags/index.vue

@ -0,0 +1,87 @@
<template>
<view class="container" v-for="item in data">
<u-tag key="{{item.value}}">{{ item.text }}</u-tag>
</view>
</template>
<script setup lang="ts">
/* 初始化 */
import { onShow } from '@dcloudio/uni-app'
import { getCurrentInstance, ref, defineExpose } from 'vue'
const { proxy } = getCurrentInstance()
const data = ref([])
defineExpose({ data })
</script>
<style scoped lang="scss">
.container {
background: #f5f5f5;
min-height: 100vh;
margin: 10rpx;
}
.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: 160rpx;
}
&: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>

2
src/pages.json

@ -1950,7 +1950,7 @@
"enablePullDownRefresh": true
}
},{
"path": "pages/mes/workOrder/processReport",
"path": "pages/mes/workScheduling/processReport",
"style": {
"navigationBarTitleText": "工序报工",
"enablePullDownRefresh": true

14
src/pages/mes/workOrder/processReport.vue

@ -1,14 +0,0 @@
<template>
<view>
</view>
</template>
<script setup lang="ts">
</script>
<style scoped lang="scss">
</style>

161
src/pages/mes/workScheduling/processReport.vue

@ -0,0 +1,161 @@
<template>
<view class="container">
<view class="list">
<view>
<u-search :show-action="true" v-model="data.searchValue" action-text="搜索" input-align="left" height="65" border-color="#ff9900" @search="alert()"></u-search>
</view>
<scroll-view scroll-y="true" class="scroll-Y">
<u-checkbox-group class="item" @change="checkChange">
<u-checkbox class="dec" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.personName">{{ item.personName }}</u-checkbox>
</u-checkbox-group>
</scroll-view>
<!-- <view class="item" v-for="(item, index) in list" :key="index" @click="openDetail(item)">-->
<!-- <view class="dec">-->
<!-- <view>{{ item.workerName }}</view>-->
<!-- <view>1</view>-->
<!-- </view>-->
<!-- </view>-->
</view>
</view>
<u-alert-tips type="error" :title="系统提示" close-text="close" :description="请选择人员" :close-able="true" :show="show"></u-alert-tips>
</template>
<script setup lang="ts">
/* 初始化 */
import { onShow } from '@dcloudio/uni-app'
import { getCurrentInstance, ref } from 'vue'
/* 引入API */
import tags from '@components/tags/index.vue'
import * as workSchedulingApi from '@/api/mes/workScheduling'
const { proxy } = getCurrentInstance()
tags.data = ref([
{
text: '1',
value: '2'
}
])
const data = ref({
searchValue: ''
})
let show = false
/* 是否显示"没有更多了" */
const status = ref('loadmore')
/* 列表数据集 */
const list = ref([])
function checkChange(checkedArray: string | any[]) {
if (checkedArray.length == 0){
show = true
}
}
/* 列表调用API方法 */
async function getList() {
if (status.value === 'nomore') return
status.value = 'loading'
proxy.$modal.loading('加载中')
await workSchedulingApi
.getConfigProcessWorker({
planDayCode: 'PO20240426-0022',
processCode: 'FF-CY-002',
teamCode: 'T01'
})
.then((res) => {
proxy.$modal.closeLoading()
if (res.data.length > 0) {
list.value = res.data
}
})
.catch(() => {
proxy.$modal.closeLoading()
})
}
/* 打开详情页 */
function openDetail(item: any) {
console.log(item)
// proxy.$tab.navigateTo(`/pages/mes/orderDapPlan/detail?obj=${item}`)
}
/* 通用方法 */
onShow(() => {
list.value = []
getList()
})
</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: 160rpx;
}
&: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;
}
}
}
::v-deep .u-checkbox-group {
display: grid !important;
}
</style>
Loading…
Cancel
Save