|
@ -1,50 +1,42 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="container"> |
|
|
<view class="container"> |
|
|
<view class="list"> |
|
|
|
|
|
<view> |
|
|
<view> |
|
|
<u-search :show-action="true" v-model="data.searchValue" action-text="搜索" input-align="left" height="65" border-color="#ff9900" @search="alert()"></u-search> |
|
|
<form @submit="formSubmit"> |
|
|
</view> |
|
|
|
|
|
<scroll-view scroll-y="true" class="scroll-Y"> |
|
|
<scroll-view scroll-y="true" class="scroll-Y"> |
|
|
<u-checkbox-group class="item" @change="checkChange"> |
|
|
<view v-for="item in list" class="list"> |
|
|
<u-checkbox class="dec" v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.personName">{{ item.personName }}</u-checkbox> |
|
|
<view class="item"> |
|
|
</u-checkbox-group> |
|
|
<view class="dec"> |
|
|
|
|
|
<view> 员工姓名:</view> |
|
|
|
|
|
<view> {{ item.personName }}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="dec"> |
|
|
|
|
|
<view><span style="color: red">*</span>报工数量:</view> |
|
|
|
|
|
<view><input class="uni-input" placeholder="请输入报工数量" v-model="item.reportCount" /></view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</view> |
|
|
</scroll-view> |
|
|
</scroll-view> |
|
|
|
|
|
<u-button size="default" type="default" form-type="submit" |
|
|
|
|
|
style="color:#3C9CFF;backgroundColor:#1AAD19;borderColor:#1AAD19" |
|
|
<!-- <view class="item" v-for="(item, index) in list" :key="index" @click="openDetail(item)">--> |
|
|
hover-class="is-hover">提交 |
|
|
<!-- <view class="dec">--> |
|
|
</u-button> |
|
|
<!-- <view>{{ item.workerName }}</view>--> |
|
|
</form> |
|
|
<!-- <view>1</view>--> |
|
|
|
|
|
<!-- </view>--> |
|
|
|
|
|
<!-- </view>--> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<u-alert-tips type="error" :title="系统提示" close-text="close" :description="请选择人员" :close-able="true" :show="show"></u-alert-tips> |
|
|
|
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
|
/* 初始化 */ |
|
|
/* 初始化 */ |
|
|
import { onShow } from '@dcloudio/uni-app' |
|
|
import { onShow } from "@dcloudio/uni-app" |
|
|
import { getCurrentInstance, ref } from 'vue' |
|
|
import { getCurrentInstance, ref } from "vue" |
|
|
/* 引入API */ |
|
|
/* 引入API */ |
|
|
import tags from '@components/tags/index.vue' |
|
|
import * as workSchedulingApi from "@/api/mes/workScheduling" |
|
|
import * as workSchedulingApi from '@/api/mes/workScheduling' |
|
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
|
|
|
|
tags.data = ref([ |
|
|
|
|
|
{ |
|
|
|
|
|
text: '1', |
|
|
|
|
|
value: '2' |
|
|
|
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
const data = ref({ |
|
|
|
|
|
searchValue: '' |
|
|
|
|
|
}) |
|
|
|
|
|
let show = false |
|
|
let show = false |
|
|
|
|
|
|
|
|
/* 是否显示"没有更多了" */ |
|
|
/* 是否显示"没有更多了" */ |
|
|
const status = ref('loadmore') |
|
|
const status = ref("loadmore") |
|
|
/* 列表数据集 */ |
|
|
/* 列表数据集 */ |
|
|
const list = ref([]) |
|
|
const list = ref([]) |
|
|
function checkChange(checkedArray: string | any[]) { |
|
|
function checkChange(checkedArray: string | any[]) { |
|
@ -53,27 +45,19 @@ function checkChange(checkedArray: string | any[]) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
/* 列表调用API方法 */ |
|
|
/* 列表调用API方法 */ |
|
|
async function getList() { |
|
|
async function formSubmit() { |
|
|
if (status.value === 'nomore') return |
|
|
if (status.value === "nomore") return |
|
|
status.value = 'loading' |
|
|
status.value = "loading" |
|
|
proxy.$modal.loading('加载中') |
|
|
proxy.$modal.loading("提交中") |
|
|
await workSchedulingApi |
|
|
await workSchedulingApi |
|
|
.getConfigProcessWorker({ |
|
|
.reportWorkByProcess(list) |
|
|
planDayCode: 'PO20240426-0022', |
|
|
|
|
|
processCode: 'FF-CY-002', |
|
|
|
|
|
teamCode: 'T01' |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
if (res.data.length > 0) { |
|
|
|
|
|
list.value = res.data |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}) |
|
|
.catch(() => { |
|
|
.catch(() => { |
|
|
proxy.$modal.closeLoading() |
|
|
proxy.$modal.closeLoading() |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 打开详情页 */ |
|
|
/* 打开详情页 */ |
|
|
function openDetail(item: any) { |
|
|
function openDetail(item: any) { |
|
|
console.log(item) |
|
|
console.log(item) |
|
@ -82,8 +66,8 @@ function openDetail(item: any) { |
|
|
|
|
|
|
|
|
/* 通用方法 */ |
|
|
/* 通用方法 */ |
|
|
onShow(() => { |
|
|
onShow(() => { |
|
|
list.value = [] |
|
|
list.value = uni.getStorageSync("processReportList") |
|
|
getList() |
|
|
debugger |
|
|
}) |
|
|
}) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
@ -155,7 +139,14 @@ onShow(() => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
::v-deep .u-checkbox-group { |
|
|
::v-deep .u-checkbox-group { |
|
|
display: grid !important; |
|
|
display: grid !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.is-hover { |
|
|
|
|
|
color: rgba(255, 255, 255, 0.6); |
|
|
|
|
|
background-color: #179b16; |
|
|
|
|
|
border-color: #179b16; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|