Compare commits

...

2 Commits

@ -1,6 +1,6 @@
{
"name" : "合力机械小程序",
"appid" : "__UNI__F93316F",
"name" : "高效生产",
"appid" : "__UNI__C3D5591",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",

@ -42,6 +42,12 @@
"navigationBarTitleText": "生产报工"
}
},
{
"path": "pages/assembleReport/assembleReport",
"style": {
"navigationBarTitleText": "包装报工"
}
},
{
"path": "pages/my/my",
"style": {

@ -0,0 +1,187 @@
<script setup lang="ts">
import { getAssembleReportByCodeApi, postSubmitAssembleReportApi } from '@/services/assembleReport'
import { ref } from 'vue'
//
const isLoading = ref(false)
//
const onSubmit = async () => {
if (isLoading.value) {
return
}
isLoading.value = true
try {
//
const params = {
list: listReport.value,
}
const res = await postSubmitAssembleReportApi(params)
isLoading.value = false
} catch (error) {
isLoading.value = false
}
}
const onClear = async () => {
listReport.value.splice(0, listReport.value.length)
}
const onDel = async (idx) => {
uni.showModal({
content: '是否删除该包装条形码,是否确定继续?',
confirmColor: '#3775F6',
success: async (res) => {
if (res.confirm) {
listReport.value.splice(idx, 1)
}
},
})
}
const listReport = ref([])
const onScan = async () => {
//
uni.scanCode({
success: async function (res) {
console.log('条码类型:' + res.scanType);
console.log('条码内容:' + res.result);
const assembleCode = res.result
if (assembleCode) {
const params = {
assembleCode
}
const res = await getAssembleReportByCodeApi(params)
console.log('data' + res.data);
listReport.value.push(res.data)
}
}
});
}
</script>
<template>
<view class="viewport">
<view class="hd" @tap="onScan">
<image src="/static/images/scan-report.png" class="img" mode="'aspectFit'"></image>
</view>
<view class="md listReport">
<view class="list-item" v-for="(item, index) in listReport" :key="item.dispatchId">
<view class="item-hd">
<view class="index">{{ index + 1 }}</view>
<view class="assembleCode">包装条形码{{ item.assembleCode}}</view>
<view class="del" @tap="onDel(index)"><uni-icons type="trash" size="26"></uni-icons></view>
</view>
<view class="code label">产品编码: {{ item.projectSubCode }}</view>
<view class="name label">产品名称: {{ item.projectSubName }}</view>
<view class="procedureName label">报工工序: {{ item.procedureName }}</view>
<view class="code label">报工数量: {{ item.amount }}</view>
<view class="ownerName label">报工人: {{ item.ownerName }}</view>
</view>
</view>
<view class="foot">
<view class="clear" @tap="onClear"> </view>
<view class="login" @tap="onSubmit"> </view>
</view>
</view>
</template>
<style lang="scss">
page {
height: 100%;
}
.viewport {
display: flex;
flex-direction: column;
height: 100%;
justify-content: space-between;
background: #F0F6FC;
.hd {
width: 100%;
background: #fff;
text-align: center;
.img {
width: 316rpx;
height: 72rpx;
margin: 30rpx auto;
}
}
.md {
flex: 1;
padding: 20rpx 0rpx;
max-height: 75vh;
overflow: auto;
.list-item {
background-color: #fff;
margin: 20rpx 0;
color: #737D88;
font-size: 32rpx;
padding: 10rpx 20rpx;
.item-hd {
display: flex;
margin: 20rpx 0;
padding: 10rpx 0;
padding-right: 40rpx;
justify-content: space-between;
align-items: center;
border-bottom: 2rpx solid #F2F2F2;
background: #F6F9F3;
.index {
width: 40rpx;
background: #3AC33D;
color: #015C03;
display: flex;
align-items: center;
justify-content: center;
}
.assembleCode {
flex: 1;
text-align: left;
color: #0D0D26;
font-size: 30rpx;
padding-left: 10rpx;
}
.del {
width: 40rpx;
}
}
.label {
line-height: 60rpx;
font-size: 28rpx;
}
}
}
.foot {
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-around;
height: 156rpx;
padding: 0 80rpx;
box-shadow: 0px -4px 10px 0px rgba(121, 153, 183, 0.2);
.clear {
border-radius: 10rpx;
font-size: 32rpx;
font-weight: 600;
padding: 20rpx 40rpx;
display: flex;
align-items: center;
justify-content: center;
color: #356899;
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
}
.login {
border-radius: 10rpx;
font-size: 32rpx;
font-weight: 600;
background: #356899;
padding: 20rpx 120rpx;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
}
}
}
</style>

@ -2,18 +2,26 @@
* @Author: 王文杰
* @Date: 2024-03-04 14:13:16
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-04-18 14:48:48
* @LastEditTime: 2024-05-10 14:47:12
* @FilePath: /app-nx-personal/src/pages/index/components/CategoryPanel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script setup lang="ts">
import type { CategoryItem } from '@/types/home'
import { computed } from 'vue'
// props
defineProps<{
const props = defineProps<{
list: Object[]
}>()
const listZL = computed(() => {
const res = props.list.filter(e => e.path == 'unqualifiedNotification')
return res
})
const listSC = computed(() => {
const res = props.list.filter(e => e.path == 'productionReport' || e.path == 'assembleReport')
return res
})
const handleToBooking = (item: Object) => {
if (item.auth) {
const path = item.path
@ -28,11 +36,21 @@ const handleToBooking = (item: Object) => {
<template>
<view class="category">
<template v-if="list.length">
<view class="category-item" hover-class="none" v-for="item in list" :key="item.path"
<view class="module" v-if="listZL.length">
<view class="module-title">质量模块</view>
<view class="category-item" hover-class="none" v-for="item in listZL" :key="item.path"
@click="handleToBooking(item)">
<image v-if="item.auth" class="icon" :src="item.imgUrl" mode="scaleToFill"></image>
</view>
</view>
<view class="module" v-if="listSC.length">
<view class="module-title">生产模块</view>
<view class="category-item" hover-class="none" v-for="item in listSC" :key="item.path"
@click="handleToBooking(item)">
<image v-if="item.auth" class="icon" :src="item.imgUrl" mode="scaleToFill"></image>
<image v-else class="icon" :src="item.defaultImgUrl" mode="scaleToFill"></image>
<image v-if="item.auth" class="icon" :src="item.imgUrl" mode="scaleToFill"></image>
</view>
</view>
</template>
<view v-else class="empty-data">
<image class="icon" src="/static/images/home-empty.png" mode="aspectFit"></image>
@ -42,4 +60,5 @@ const handleToBooking = (item: Object) => {
<style lang="scss">
@import '../styles/category.scss';
</style>
</style>import type { computed } from 'vue';

@ -16,16 +16,7 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
<!-- logo文字 -->
<view class="logo">
<image class="logo-image" src="/static/images/logo.png" mode="'aspectFit'"></image>
<!-- <view class="logo-text">
<view class="logo-title">杭州合立</view>
<view class="logo-desc">HANGZHOU HRLI</view>
</view> -->
</view>
<!-- 搜索条 -->
<!-- <view class="search">
<text class="icon-search">搜索商品</text>
<text class="icon-scan"></text>
</view> -->
</view>
</template>
@ -42,11 +33,11 @@ const { safeAreaInsets } = uni.getSystemInfoSync()
display: flex;
align-items: center;
height: 64rpx;
padding-left: 30rpx;
padding-bottom: 10rpx;
.logo-image {
width: 214rpx;
height: 80rpx;
margin: 0 auto;
}
.logo-text {
flex: 1;

@ -22,6 +22,13 @@ const categoryList = ref([
auth: false,
imgUrl: '/static/images/productionReport.png',
defaultImgUrl: '/static/images/productionReport-default.png',
},
{
path: 'assembleReport',
name: '包装报工',
auth: false,
imgUrl: '/static/images/assembleReport.png',
defaultImgUrl: '/static/images/assembleReport-default.png',
}
])
const loginStore = useLoginStore()

@ -1,24 +1,32 @@
.category {
padding: 32rpx 0rpx;
padding: 32rpx 10rpx;
margin: 16rpx;
border-radius: 4rpx;
display: flex;
flex-wrap: wrap;
.category-item {
.module {
width: 100%;
margin: 10rpx 0;
.module-title {
font-size: 32rpx;
color: #1D2129;
}
.category-item {
border-radius: 16rpx;
margin: 12rpx;
margin: 40rpx 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
width: 45%;
width: 100%;
.icon {
width: 330rpx;
height: 240rpx;
}
}
}
.empty-data {
position: absolute;
left: 50%;

@ -1,25 +1,34 @@
.category {
padding: 32rpx 0rpx;
padding: 32rpx 10rpx;
margin: 16rpx;
border-radius: 4rpx;
display: flex;
flex-wrap: wrap;
}
.category .category-item {
.category .module {
width: 100%;
margin: 10rpx 0;
}
.category .module .module-title {
font-size: 32rpx;
color: #1D2129;
}
.category .module .category-item {
border-radius: 16rpx;
margin: 12rpx;
margin: 40rpx 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
width: 45%;
width: 100%;
}
.category .category-item .icon {
width: 330rpx;
.category .module .category-item .icon {
height: 240rpx;
}

@ -0,0 +1,25 @@
/*
* @Author:
* @Date: 2024-01-04 12:54:56
* @LastEditors: jevononlie 728254585@qq.com
* @LastEditTime: 2024-05-10 16:59:03
* @FilePath: /app-nx-personal/src/services/home.ts
* @Description: ,`customMade`, koroFileHeader : https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { http } from '@/utils/http'
export const getAssembleReportByCodeApi = (data: Object) => {
return http<any[]>({
method: 'GET',
url: '/biz/task-report/generateAssembleReportByCode',
data,
})
}
// 批量提交包装报工
export const postSubmitAssembleReportApi = (data: Object) => {
return http<any[]>({
method: 'POST',
url: '/biz/task-report/submitAssembleReport',
data,
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 119 KiB

@ -36,34 +36,34 @@ export const formatDate = (datePramas: Date, format = 'YYYY-MM-DD HH:mm:ss') =>
* @return {[type]} [return description]
*/
export const updateManager = () => {
const updateManager = uni.getUpdateManager() // 小程序版本更新管理器
updateManager.onCheckForUpdate((res) => {
// 检测新版本后的回调
if (res.hasUpdate) {
// 如果有新版本提醒并进行强制升级
uni.showModal({
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
confirmText: '确定',
success: (res) => {
if (res.confirm) {
updateManager.onUpdateReady((res) => {
// 新版本下载完成的回调
updateManager.applyUpdate() // 强制当前小程序应用上新版本并重启
})
// const updateManager = uni.getUpdateManager() // 小程序版本更新管理器
// updateManager.onCheckForUpdate((res) => {
// // 检测新版本后的回调
// if (res.hasUpdate) {
// // 如果有新版本提醒并进行强制升级
// uni.showModal({
// content: '新版本已经准备好,是否重启应用?',
// showCancel: false,
// confirmText: '确定',
// success: (res) => {
// if (res.confirm) {
// updateManager.onUpdateReady((res) => {
// // 新版本下载完成的回调
// updateManager.applyUpdate() // 强制当前小程序应用上新版本并重启
// })
updateManager.onUpdateFailed((res) => {
// 新版本下载失败的回调
// 新版本下载失败,提示用户删除后通过冷启动重新打开
uni.showModal({
content: '下载失败,请删除当前小程序后重新打开',
showCancel: false,
confirmText: '知道了',
})
})
}
},
})
}
})
// updateManager.onUpdateFailed((res) => {
// // 新版本下载失败的回调
// // 新版本下载失败,提示用户删除后通过冷启动重新打开
// uni.showModal({
// content: '下载失败,请删除当前小程序后重新打开',
// showCancel: false,
// confirmText: '知道了',
// })
// })
// }
// },
// })
// }
// })
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Loading…
Cancel
Save