From f26f29d84e0a68831a6af14dab3eec5500496d2e Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 28 五月 2025 16:48:52 +0800
Subject: [PATCH] 初始化项目

---
 pages/product/produce/workstationList/unSubmitDutyRecord.vue |  369 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 369 insertions(+), 0 deletions(-)

diff --git a/pages/product/produce/workstationList/unSubmitDutyRecord.vue b/pages/product/produce/workstationList/unSubmitDutyRecord.vue
new file mode 100644
index 0000000..24db420
--- /dev/null
+++ b/pages/product/produce/workstationList/unSubmitDutyRecord.vue
@@ -0,0 +1,369 @@
+<template>
+	<view class="page">
+		<view class="workstation-index-bg" />
+		<u-navbar title="鐝閫夋嫨" :background="background" :border-bottom="false" :title-bold="true" title-color="#000"
+			back-icon-color="#000" />
+
+		<view class="wrap">
+			<scroll-view class="operation-task-scroll-list" scroll-y="true">
+				<u-cell-group class="duty-record-scroll-list-group" :border="false">
+					<view class="content" v-for="(item, index) in list" :key="item.id" :index="index">
+						<view class="content-header">
+							<radio :value="item.id" :checked="item.isChecked" style="transform:scale(0.6)"
+								@click="choose(item)" />
+							<view class="content-header-title">鐝缂栧彿锛歿{ item.dutyNo }}</view>
+						</view>
+						<view class="content-body" @click="choose(item)">
+							<view class="row-list">
+								<view class="_label">
+									<view class="content-body-icon-one"></view>
+									宸ヤ綔绔欑紪鍙凤細
+								</view>
+								<view class="_content">
+									{{ item.workstationNo }}
+								</view>
+							</view>
+
+							<view class="row-list">
+								<view class="_label">
+									<view class="content-body-icon-one"></view>
+									宸ヤ綔绔欙細
+								</view>
+								<view class="_content">
+									{{ item.workstationName }}
+								</view>
+							</view>
+
+							<view class="row-list">
+								<view class="_label">
+									<view class="content-body-icon-one"></view>
+									鐢熶骇鐝锛�
+								</view>
+								<view class="_content">
+									{{ item.shiftName }}
+								</view>
+							</view>
+
+							<view class="row-list">
+								<view class="_label">
+									<view class="content-body-icon-one"></view>
+									鐢熶骇鐝粍锛�
+								</view>
+								<view class="_content">
+									{{ item.crewName }}
+								</view>
+							</view>
+
+							<view class="row-list">
+								<view class="_label">
+									<view class="content-body-icon-one"></view>
+									寮�濮嬫椂闂达細
+								</view>
+								<view class="_content">
+									{{ item.startTime }}
+								</view>
+							</view>
+
+							<view class="row-list">
+								<view class="_label">
+									<view class="content-body-icon-one"></view>
+									缁撴潫鏃堕棿锛�
+								</view>
+								<view class="_content">
+									{{ item.endTime }}
+								</view>
+							</view>
+						</view>
+					</view>
+				</u-cell-group>
+			</scroll-view>
+			<view class="bottom">
+				<view class="bottom-btn">
+					<wu-button :custom-style="customStyleOne" size="normal" @click="onCancel"
+						style="padding-left: 15rpx;">
+						鍙栨秷
+					</wu-button>
+				</view>
+				<view class="bottom-btn">
+					<wu-button :custom-style="customStyleTwo" size="normal" @click="onSubmit"
+						style="padding-right: 15rpx;">
+						纭畾
+					</wu-button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import content_bg from '@/static/custom/product/productBg.png'
+	export default {
+		data() {
+			return {
+				background: {
+					backgroundImage: `url(${content_bg})`,
+					backgroundAttachment: 'fixed',
+					backgroundSize: '100% auto',
+					backgroundRepeat: 'no-repeat',
+				},
+				workCenter: null,
+				list: [],
+				current: 0,
+			}
+		},
+		computed: {
+			customStyleOne() {
+				return {
+					color: '#666666',
+					background: '#FFFFFF',
+					width: '350rpx'
+				}
+			},
+			customStyleTwo() {
+				return {
+					color: '#FFFFFF',
+					background: '#234EED',
+					width: '350rpx'
+				}
+			},
+		},
+		onLoad(option) {
+			if (option.workCenter) {
+				this.workCenter = option.workCenter;
+				this.loadList();
+			}
+		},
+		methods: {
+			loadList() {
+				this.$u.api.operationTask.getUnsubmitDutyRecord({
+					workCenter: this.workCenter
+				}).then(res => {
+					if (res.code == 0 && res.data.length > 0) {
+						this.list = res.data;
+						this.list.forEach(el => {
+							this.$set(el, 'isChecked', true);
+						})
+					}
+				});
+			},
+			choose(item) {
+				if (item.isChecked) {
+					item.isChecked = false
+				} else {
+					item.isChecked = true
+				}
+			},
+			onCancel() {
+				// 杩斿洖涓婁竴椤�
+				uni.navigateBack({
+					delta: 1
+				})
+			},
+			onSubmit() {
+				const initList = this.list.filter(item => item.isChecked == true);
+
+				const ids = initList.map((item) => {
+					return item.id
+				})
+
+				this.$u.api.operationTask.batchSubmitDutyRecord(ids).then(res => {
+					if (res.code == 0) {
+						this.$u.toast('鎻愪氦鎴愬姛');
+						// 杩斿洖涓婁竴椤�
+						setTimeout(() => {
+							uni.navigateBack({
+								delta: 1
+							});
+						}, 1000)
+					} else {
+						this.$u.toast('鎻愪氦澶辫触锛�' + res.msg);
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.workstation-index-bg {
+		background-color: #F6F9FF;
+		background-image: url('~@/static/custom/product/productBg.png');
+		// background: linear-gradient(180deg,rgba(206,227,254,1),rgba(206,227,254,1) 20%,rgba(206,227,254,0.5) 40%,rgba(206,227,254,0.25) 60%,rgba(206,227,254,0.08) 80%,rgba(206,227,254,0));
+		padding: 0 20rpx;
+		background-attachment: fixed;
+		background-size: 100% auto;
+		background-repeat: no-repeat;
+		position: fixed;
+		top: 0;
+		bottom: 0;
+		width: 100%;
+		z-index: -1;
+	}
+
+	.wrap {}
+
+	.wrap .operation-task-scroll-list {
+		height: calc(100vh - var(--window-top) - var(--window-bottom) - 254rpx);
+		width: 100%;
+	}
+
+	.bottom {
+		display: flex;
+		justify-content: space-between;
+		height: 100rpx;
+		margin-top: 20rpx;
+	}
+
+	.duty-record-scroll-list-group {
+		::v-deep .u-cell-item-box {
+			background-color: rgba(250, 252, 255, 0.36) !important;
+			padding: 0rpx 30rpx;
+		}
+
+		.content {
+			font-size: 12px;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			border-radius: 10rpx;
+			margin: 0rpx 0rpx 24rpx;
+			height: 392rpx;
+			padding: 10rpx 20rpx;
+			box-shadow: 0rpx 6rpx 12rpx 2rpx rgba(127, 127, 127, 0.1) !important;
+			position: relative;
+
+			.content-header {
+				display: flex;
+				align-items: center;
+
+				.header-item-bottom {
+					height: 50rpx;
+					display: flex;
+					align-items: center;
+
+					.content-header-icon-two {
+						background-image: url('~@/static/custom/materialReturn/label-icon-2.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height: 28rpx;
+						width: 28rpx;
+					}
+
+					.content-header-title-ne {
+						margin-left: 11rpx;
+						font-size: 26rpx;
+						color: #333333;
+					}
+				}
+			}
+
+			.content-body {
+				height: 320rpx;
+				background: #F5F9FF;
+				border-radius: 10rpx;
+				padding: 10rpx 23rpx;
+
+				.row-list {
+					height: 50rpx;
+					display: flex;
+					flex-direction: row;
+					padding: 0px;
+					align-items: center;
+					justify-content: space-between;
+				}
+
+				.row-list ._label {
+					display: flex;
+					color: #666666;
+					font-size: 26rpx;
+					align-items: center;
+					width: 190rpx;
+
+					.content-body-icon-one {
+						background-image: url('~@/static/custom/operationTask/label-icon-1.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height: 18rpx;
+						width: 18rpx;
+						margin-right: 10rpx;
+					}
+				}
+
+				.row-list ._content {
+					text-align: right;
+					color: #909399;
+					font-size: 24rpx;
+
+					._content-text {
+						color: #214ded;
+					}
+				}
+
+				.row-list ._input {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					border-bottom: 1px solid #4FA0FF;
+					height: 56rpx;
+
+					.edit_icon {
+						background-image: url('~@/static/custom/materialReturn/icon_edit.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height: 26rpx;
+						width: 26rpx;
+					}
+
+					::v-deep .uni-input-input {
+						color: #D35651;
+					}
+				}
+
+				.row-list .s1 {
+					display: flex;
+					color: #214DED;
+					font-size: 26rpx;
+					align-items: center;
+					width: 170rpx;
+				}
+			}
+
+			.content-footer {
+				.row-list {
+					height: 50rpx;
+					display: flex;
+					flex-direction: row;
+					padding: 0px;
+					align-items: center;
+					// justify-content: space-between;
+
+					.content-footer-time-icon {
+						background-image: url('~@/static/custom/operationTask/time-icon.png');
+						background-size: 100% auto;
+						background-repeat: no-repeat;
+						height: 28rpx;
+						width: 28rpx;
+						margin-right: 3px;
+					}
+				}
+
+				.row-list ._label {
+					display: flex;
+					color: #666666;
+					font-size: 26rpx;
+					align-items: center;
+					width: 200rpx;
+				}
+
+				.row-list ._content {
+					text-align: right;
+					color: #909399;
+					font-size: 24rpx;
+
+					._content-text {
+						color: #214ded;
+					}
+				}
+			}
+		}
+	}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3