add 代报工列表

main
chenshuichuan 2 years ago
parent 6446210c93
commit 3c00e5ec30

12172
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -41,20 +41,20 @@
"clean:windows": "rd /s /q dist || rd /s /q node_modules"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-4000820240401001",
"@dcloudio/uni-app-plus": "3.0.0-4000820240401001",
"@dcloudio/uni-components": "3.0.0-4000820240401001",
"@dcloudio/uni-h5": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-alipay": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-baidu": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-jd": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-lark": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-qq": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-weixin": "3.0.0-4000820240401001",
"@dcloudio/uni-mp-xhs": "3.0.0-4000820240401001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4000820240401001",
"@dcloudio/uni-app": "3.0.0-4020320240708001",
"@dcloudio/uni-app-plus": "3.0.0-4020320240708001",
"@dcloudio/uni-components": "3.0.0-4020320240708001",
"@dcloudio/uni-h5": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-alipay": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-baidu": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-jd": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-kuaishou": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-lark": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-qq": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-toutiao": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-weixin": "3.0.0-4020320240708001",
"@dcloudio/uni-mp-xhs": "3.0.0-4020320240708001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4020320240708001",
"@dcloudio/uni-ui": "^1.5.6",
"@element-plus/icons-vue": "^2.3.1",
"@jridgewell/sourcemap-codec": "^1.4.15",
@ -68,21 +68,21 @@
"tslib": "^2.6.2",
"uview-plus": "^3.1.45",
"vue": "3.4.23",
"vue-i18n": "^9.10.2"
"vue-i18n": "9.10.2"
},
"devDependencies": {
"@dcloudio/types": "^3.4.8",
"@dcloudio/uni-automator": "3.0.0-4000820240401001",
"@dcloudio/uni-cli-shared": "3.0.0-4000820240401001",
"@dcloudio/uni-stacktracey": "3.0.0-4000820240401001",
"@dcloudio/vite-plugin-uni": "3.0.0-4000820240401001",
"@vue/runtime-core": "^3.3.11",
"@dcloudio/uni-automator": "3.0.0-4020320240708001",
"@dcloudio/uni-cli-shared": "3.0.0-4020320240708001",
"@dcloudio/uni-stacktracey": "3.0.0-4020320240708001",
"@dcloudio/vite-plugin-uni": "3.0.0-4020320240708001",
"@vue/runtime-core": "^3.4.23",
"@vue/tsconfig": "^0.1.3",
"less": "^4.2.0",
"sass": "^1.77.7",
"sass-loader": "^10.1.1",
"typescript": "^4.9.5",
"vite": "4.3.5",
"vite": "5.2.8",
"vue-tsc": "^1.8.8"
}
}

File diff suppressed because it is too large Load Diff

@ -8,11 +8,13 @@ export function getMyList() {
})
}
// 查询分页
export function getOtherList() {
export function getOtherList(data) {
return request({
url: '/admin-api/mes/produce-report/getOtherList',
method: 'get'
method: 'get',
params: data
})
}
// 查询详情
export function getById(id) {

@ -50,9 +50,9 @@ export function delData(dictCode) {
method: 'delete'
})
}
//{text: '制浆', value: 'zhijiang'},
//
export const processTypes = [
{text: '成型', value: 'chengxing'},
{text: '制浆', value: 'zhijiang'}, {text: '成型', value: 'chengxing'},
{text: '烘干', value: 'honggan'}, {text: '转移', value: 'zhuanyi'},
{text: '加湿', value: 'jiashi'}, {text: '热压', value: 'reya'},
{text: '切边', value: 'qiebian'}, {text: '品检', value: 'pinjian'},

@ -1,6 +1,6 @@
// 应用全局配置
const config = {
// baseUrl: 'http://47.106.185.127:48080',
// baseUrl: 'http://47.106.185.127:48080',127.0.0.1
baseUrl: 'http://127.0.0.1:48080',
// 应用信息
appInfo: {

@ -43,7 +43,8 @@
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
/* ios */
"ios" : {
@ -109,5 +110,8 @@
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "3"
"vueVersion" : "3",
"h5" : {
"title" : "必硕生管系统"
}
}

@ -1,173 +0,0 @@
<template>
<view class="wrap">
<view class="top">
<view class="item">
<view class="left">收货人</view>
<input type="text" placeholder-class="line" placeholder="请填写收货人姓名" />
</view>
<view class="item">
<view class="left">手机号码</view>
<input type="text" placeholder-class="line" placeholder="请填写收货人手机号" />
</view>
<view class="item" @tap="showRegionPicker">
<view class="left">所在地区</view>
<input disabled type="text" placeholder-class="line" placeholder="省市区县、乡镇等" />
</view>
<view class="item address">
<view class="left">详细地址</view>
<textarea type="text" placeholder-class="line" placeholder="街道、楼牌等" />
</view>
<!-- <view class="site-clipboard">
<textarea placeholder-class="line" value="" placeholder="粘贴文本,可自动识别姓名和地址等" />
<view class="clipboard">
地址粘贴板
<u-icon name="arrow-down" class="icon" :size="20"></u-icon>
</view>
</view> -->
</view>
<view class="bottom">
<view class="tag">
<view class="left">标签</view>
<view class="right">
<text class="tags"></text>
<text class="tags">公司</text>
<text class="tags">学校</text>
<view class="tags plus"><u-icon size="22" name="plus"></u-icon></view>
</view>
</view>
<view class="default">
<view class="left">
<view class="set">设置默认地址</view>
<view class="tips">提醒每次下单会默认推荐该地址</view>
</view>
<view class="right"><switch color="red" @change="setDefault" /></view>
</view>
</view>
<u-picker mode="region" ref="uPicker" v-model="show" />
</view>
</template>
<script>
export default {
data() {
return {
show: false
};
},
methods: {
setDefault() {},
showRegionPicker() {
this.show = true;
}
}
};
</script>
<style lang="scss" scoped>
:v-deep(.line) {
color: $u-light-color;
font-size: 28rpx;
}
.wrap {
background-color: #f2f2f2;
.top {
background-color: #ffffff;
border-top: solid 2rpx $u-border-color;
padding: 22rpx;
.item {
display: flex;
font-size: 32rpx;
line-height: 100rpx;
align-items: center;
border-bottom: solid 2rpx $u-border-color;
.left {
width: 180rpx;
}
input {
text-align: left;
}
}
.address {
padding: 20rpx 0;
textarea {
// width: 100%;
height: 150rpx;
background-color: #f7f7f7;
line-height: 60rpx;
margin: 40rpx auto;
padding: 20rpx;
}
}
.site-clipboard {
padding-right: 40rpx;
textarea {
// width: 100%;
height: 150rpx;
background-color: #f7f7f7;
line-height: 60rpx;
margin: 40rpx auto;
padding: 20rpx;
}
.clipboard {
display: flex;
justify-content: center;
align-items: center;
font-size: 26rpx;
color: $u-tips-color;
height: 80rpx;
.icon {
margin-top: 6rpx;
margin-left: 10rpx;
}
}
}
}
.bottom {
margin-top: 20rpx;
padding: 40rpx;
padding-right: 0;
background-color: #ffffff;
font-size: 28rpx;
.tag {
display: flex;
.left {
width: 160rpx;
}
.right {
display: flex;
flex-wrap: wrap;
.tags {
width: 140rpx;
padding: 16rpx 8rpx;
border: solid 2rpx $u-border-color;
text-align: center;
border-radius: 50rpx;
margin: 0 10rpx 20rpx;
display: flex;
font-size: 28rpx;
align-items: center;
justify-content: center;
color: $u-content-color;
line-height: 1;
}
.plus {
//padding: 10rpx 0;
}
}
}
.default {
margin-top: 50rpx;
display: flex;
justify-content: space-between;
border-bottom: solid 2rpx $u-border-color;
line-height: 64rpx;
.tips {
font-size: 24rpx;
}
.right {
}
}
}
}
</style>

@ -1,139 +0,0 @@
<template>
<view>
<view class="item" v-for="(res, index) in siteList" :key="res.id">
<view class="top">
<view class="name">{{ res.name }}</view>
<view class="phone">{{ res.phone }}</view>
<view class="tag">
<text v-for="(item, index) in res.tag" :key="index" :class="{red:item.tagText=='默认'}">{{ item.tagText }}</text>
</view>
</view>
<view class="bottom">
广东省深圳市宝安区 自由路66号
<u-icon name="edit-pen" :size="40" color="#999999"></u-icon>
</view>
</view>
<view class="addSite" @tap="toAddSite">
<view class="add">
<u-icon name="plus" color="#ffffff" class="icon" :size="30"></u-icon>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
siteList: []
};
},
onLoad() {
this.getData();
},
methods: {
getData() {
this.siteList = [
{
id: 1,
name: '游X',
phone: '183****5523',
tag: [
{
tagText: '默认'
},
{
tagText: '家'
}
],
site: '广东省深圳市宝安区 自由路66号'
},
{
id: 2,
name: '李XX',
phone: '183****5555',
tag: [
{
tagText: '公司'
}
],
site: '广东省深圳市宝安区 翻身路xx号'
},
{
id: 3,
name: '王YY',
phone: '153****5555',
tag: [],
site: '广东省深圳市宝安区 平安路13号'
}
];
},
toAddSite(){
uni.navigateTo({
url: '/pages_template/pages/address/addSite'
});
}
}
};
</script>
<style lang="scss" scoped>
.item {
padding: 40rpx 20rpx;
.top {
display: flex;
font-weight: bold;
font-size: 34rpx;
.phone {
margin-left: 60rpx;
}
.tag {
display: flex;
font-weight: normal;
align-items: center;
text {
display: block;
width: 60rpx;
height: 34rpx;
line-height: 34rpx;
color: #ffffff;
font-size: 20rpx;
border-radius: 6rpx;
text-align: center;
margin-left: 30rpx;
background-color:rgb(49, 145, 253);
}
.red{
background-color:red
}
}
}
.bottom {
display: flex;
margin-top: 20rpx;
font-size: 28rpx;
justify-content: space-between;
color: #999999;
}
}
.addSite {
display: flex;
justify-content: space-around;
width: 600rpx;
line-height: 100rpx;
position: absolute;
bottom: 30rpx;
left: 80rpx;
background-color: red;
border-radius: 60rpx;
font-size: 30rpx;
.add{
display: flex;
align-items: center;
color: #ffffff;
.icon{
margin-right: 10rpx;
}
}
}
</style>

@ -1,7 +1,7 @@
<template>
<view class="container">
<uni-card :is-shadow="false" is-full>
<text class="uni-h6">如个人无法填报请寻找主管或组长代为报工</text>
<text class="uni-h6">如个人无法填报请寻找主管代为报工</text>
</uni-card>
<view class="example">
<!-- 自定义表单校验 -->
@ -12,31 +12,18 @@
<uni-forms-item label="班别" required name="groupType">
<uni-data-checkbox v-model="customFormData.groupType" :localdata="groupTypes()" />
</uni-forms-item>
<uni-row>
<uni-col :span="12">
<uni-forms-item label="日期" required name="reportDateString">
<uni-datetime-picker v-model="customFormData.reportDateString" type="date" :clear-icon="true" @change="maskClick" />
</uni-forms-item>
</uni-col>
<uni-col :span="12">
<uni-forms-item label="工位" required name="orgId">
<uni-data-select v-model="customFormData.orgId" :localdata="orgIdList"></uni-data-select>
</uni-forms-item>
</uni-col>
</uni-row>
<uni-row>
<uni-col :span="12">
<uni-forms-item label="计件时段" name="reportTime">
<uni-easyinput type="text" v-model="customFormData.reportTime" placeholder="如:8:00-12:00" />
</uni-forms-item>
</uni-col>
<uni-col :span="12">
<uni-forms-item label="计件时间/h" required name="totalTime">
<uni-easyinput type="number" v-model="customFormData.totalTime" placeholder="" />
</uni-forms-item>
</uni-col>
</uni-row>
<uni-group title="card 模式" mode="card" v-for="(item,index) in customFormData.productList" :key="item.id"
:name="['productList',index,'value']">
<template v-slot:title>
@ -91,7 +78,6 @@
</uni-col>
</uni-row>
</uni-group>
</uni-forms>
<view class="button-group">
<button type="primary" size="mini" @click="add">

@ -1,6 +1,6 @@
<template>
<view>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleTabClick">
<el-tabs v-loading="loading" v-model="activeName" class="demo-tabs" @tab-click="handleTabClick">
<el-tab-pane label="个人报工" name="first">
<uni-list :border="true">
<uni-list-item v-for="(item, index) in reportList">
@ -29,9 +29,96 @@
</el-tab-pane>
<el-tab-pane label="代报工" name="second" v-if="auth.hasPermi('mes:produce-report-detail:replace')">
<uni-fab :pattern="pattern" ref="fabReplace" @fabClick="addReplaceReport" />
<uni-forms ref="valiReplaceForm" :model="valiFormData">
<uni-forms-item label="工序" name="orgType">
<uni-data-checkbox v-model="valiFormData.orgType" :localdata="processTypes()" @change="handleReplaceReportChange()"/>
</uni-forms-item>
<uni-row>
<uni-col :xs="14" :sm="12" :md="6" :lg="3" :xl="1">
<uni-forms-item label-width="50px" label-align="left" label="日期" name="reportDateString">
<uni-datetime-picker v-model="valiFormData.reportDateString" type="date" :clear-icon="true" @change="maskClick" />
</uni-forms-item>
</uni-col>
<uni-col :xs="10" :sm="8" :md="6" :lg="3" :xl="1">
<uni-forms-item label-width="50px" label-align="left" label="工人" name="userId">
<uni-data-select v-model="valiFormData.userId" :localdata="userList" placement="top" @change="handleReplaceReportChange()">
</uni-data-select>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
<uni-list :border="true">
<uni-list-item v-for="(item, index) in replaceReportList">
<!-- 自定义 header -->
<template v-slot:header>
<div onclick="">
<text class="u-success"> {{timestampToTime(item.reportDate)}}</text>
<text class="u-primary">/</text>
{{item.userName}}
<text class="u-primary">/</text>
{{item.orgName}}
</div>
</template>
<!-- 自定义 body -->
<template v-slot:body>
</template>
<!-- 自定义 footer-->
<template v-slot:footer>
<el-button v-if="item.reportStatus === 0" type="primary" size="small" :icon="Edit" circle @click="editOrAddReport(item.id)"/>
<el-button v-if="item.reportStatus === 0" type="success" size="small" :icon="Promotion" circle @click="updateReport(item.id,1)"/>
<el-button v-if="item.reportStatus < 2" type="danger" size="small" :icon="Delete" circle @click="deleteReport(item.id)"/>
</template>
</uni-list-item>
</uni-list>
</el-tab-pane>
<el-tab-pane label="报工审核" name="third" v-if="auth.hasPermi('mes:produce-report-detail:replace')">
<el-tab-pane label="个人报工审核" name="third" v-if="auth.hasPermi('mes:produce-report-detail:replace')">
<uni-forms ref="valiForm" :model="valiFormData">
<uni-forms-item label="工序" name="orgType">
<uni-data-checkbox v-model="valiFormData.orgType" :localdata="processTypes()" @change="handleOtherReportChange()"/>
</uni-forms-item>
<uni-row>
<uni-col :xs="14" :sm="12" :md="6" :lg="3" :xl="1">
<uni-forms-item label-width="50px" label-align="left" label="日期" name="reportDateString">
<uni-datetime-picker v-model="valiFormData.reportDateString" type="date" :clear-icon="true" @change="maskClick" />
</uni-forms-item>
</uni-col>
<uni-col :xs="10" :sm="8" :md="6" :lg="3" :xl="1">
<uni-forms-item label-width="50px" label-align="left" label="工人" name="userId">
<uni-data-select v-model="valiFormData.userId" :localdata="userList" placement="top" @change="handleOtherReportChange()">
</uni-data-select>
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
<uni-list :border="true">
<uni-list-item v-for="(item, index) in otherReportList">
<!-- 自定义 header -->
<template v-slot:header>
<div onclick="">
<text class="u-success"> {{timestampToTime(item.reportDate)}}</text>
<text class="u-primary">/</text>
{{item.userName}}
<text class="u-primary">/</text>
{{item.orgName}}
</div>
</template>
<!-- 自定义 body -->
<template v-slot:body>
</template>
<!-- 自定义 footer-->
<template v-slot:footer>
<el-button v-if="item.reportStatus === 0" type="primary" size="small" :icon="Edit" circle @click="editOrAddReport(item.id)"/>
<el-button v-if="item.reportStatus === 0" type="success" size="small" :icon="Promotion" circle @click="updateReport(item.id,1,'提交')"/>
<el-button v-if="item.reportStatus === 1" type="success" size="small" :icon="Check" circle @click="updateReport(item.id,2,'通过')"/>
<el-button v-if="item.reportStatus === 1" type="warning" size="small" :icon="Close" circle @click="updateReport(item.id,3,'驳回')"/>
<el-button v-if="item.reportStatus < 2" type="danger" size="small" :icon="Delete" circle @click="deleteReport(item.id)"/>
</template>
</uni-list-item>
</uni-list>
<view>
<div></div>
</view>
</el-tab-pane>
<el-tab-pane label="报工报表" name="four">报工报表</el-tab-pane>
</el-tabs>
@ -40,24 +127,30 @@
<script>
import {getMyList, getOtherList, getById, updateStatus,deleteByReportId } from "@/api/mes/report";
import {Check, Delete, Edit} from '@element-plus/icons-vue'
import {Check, Delete, Edit,Promotion,Close} from '@element-plus/icons-vue'
import tab from "@/plugins/tab";
import modal from "@/plugins/modal";
import auth from "@/plugins/auth";
import {showConfirm} from "@/utils/common";
import {timestampToTime} from "@/utils/dateUtil";
import {getCurrentDate, timestampToTime} from "@/utils/dateUtil";
import {processTypes} from "@/api/system/dict/data";
import {getOtherPersonalUser} from "@/api/mes/organization";
export default {
computed: {
auth() {
return auth
},
auth() {return auth},
Delete() {return Delete},
Promotion() {return Promotion},
Close() {return Close},
Edit() {return Edit},
Check() {return Check}
},
data() {
return {
loading: false,
reportList: [],
otherReportList: [],
replaceReportList: [],
userList: [],
pattern: {
color: '#7A7E83',
backgroundColor: '#fff',
@ -65,26 +158,65 @@ export default {
buttonColor: '#e66126',
iconColor: '#fff'
},
activeName: 'first'
activeName: 'first',
valiFormData: {
reportDate: [],
reportDateString: getCurrentDate(),
userId: '',
orgType: 'chengxing',
reportType: '个人',
},
};
},
onLoad() {
this.loading = true
this.getList();
this.getUserList()
this.loading = false
},
methods: {
processTypes() {
return processTypes
},
handleTabClick(tab) {
this.loading = true
console.log(tab.paneName)
//
if(tab.paneName==='third'){
this.getOtherReportList()
}
//
else if(tab.paneName==='second'){
this.getList();
this.getReplaceReportList();
}
else {
//
this.getList();
}
this.loading = false
},
timestampToTime,
getOtherReportList(){
let date = this.valiFormData.reportDateString
this.valiFormData.reportDate = [date+' 00:00:00', date+' 23:59:59']
this.valiFormData.reportType = '个人'
getOtherList(this.valiFormData).then(response => {
this.otherReportList = response.data
})
},
getReplaceReportList(){
let date = this.valiFormData.reportDateString
this.valiFormData.reportDate = [date+' 00:00:00', date+' 23:59:59']
this.valiFormData.reportType = '代报工'
getOtherList(this.valiFormData).then(response => {
this.replaceReportList = response.data
})
},
getUserList() {
getOtherPersonalUser().then(response => {
this.userList = response.data
})
},
getList() {
getMyList().then(response => {
this.reportList = response.data
@ -92,22 +224,30 @@ export default {
},
deleteReport(id) {
showConfirm("确认删除该报工信息吗?").then(res => {
this.loading = true
if (res.confirm) {
deleteByReportId(id).then(response => {
modal.msgSuccess("操作成功")
this.getList()
if(this.activeName==='first')this.getList()
if(this.activeName==='third')this.getOtherReportList()
if(this.activeName==='second')this.getReplaceReportList()
})
}
this.loading = false
})
},
updateReport(id) {
showConfirm("确认提交该报工信息吗?").then(res => {
updateReport(id,status,type) {
showConfirm("确认"+type+"该报工信息吗?").then(res => {
this.loading = true
if (res.confirm) {
updateStatus(id,1).then(response => {
updateStatus(id,status).then(response => {
modal.msgSuccess("操作成功")
this.getList()
if(this.activeName==='first')this.getList()
if(this.activeName==='third')this.getOtherReportList()
if(this.activeName==='second')this.getReplaceReportList()
})
}
this.loading = false
})
},
editOrAddReport(id){
@ -117,7 +257,26 @@ export default {
addReplaceReport(id){
if(id===null || id===undefined)tab.navigateTo('/page_report/reportForm')
else tab.navigateTo("",id)
},
maskClick(e){
this.valiFormData.reportDateString = e
if(this.activeName==='first')this.getList()
if(this.activeName==='third')this.getOtherReportList()
if(this.activeName==='second')this.getReplaceReportList()
},
handleOtherReportChange(){
this.loading = true
//
this.getOtherReportList()
this.loading = false
},
handleReplaceReportChange(){
this.loading = true
//
this.getReplaceReportList()
this.loading = false
}
}
};

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save