From d044dc871c16f05c9a1fb1489621020c91ec9d59 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期三, 16 八月 2023 18:30:56 +0800
Subject: [PATCH] Merge branch 'master' of ssh://139.186.142.91:29418/productDev/dmMes
---
h5_standard/src/views/workOrder/processPlan.vue | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 232 insertions(+), 0 deletions(-)
diff --git a/h5_standard/src/views/workOrder/processPlan.vue b/h5_standard/src/views/workOrder/processPlan.vue
new file mode 100644
index 0000000..d23877b
--- /dev/null
+++ b/h5_standard/src/views/workOrder/processPlan.vue
@@ -0,0 +1,232 @@
+<template>
+ <div class="content">
+ <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+ <van-list
+ v-model:loading="loading"
+ :finished="finished"
+ finished-text="娌℃湁鏇村浜唦"
+ @load="onLoad">
+ <div class="content_list">
+ <van-swipe-cell v-for="(item, i) in listData" :key="i">
+ <div class="content_list_item" @click="clickItem(item)">
+ <div class="content_list_item_title">
+ <span>{{item.materialName}}锝渰{item.produceName}}</span>
+ <div class="content_list_item_title_tips" v-if="item.urgent">浼樺厛{{ item.urgent }}</div>
+ </div>
+ <div class="content_list_item_nr">
+ <div class="content_list_item_nr_box">
+ <div class="label">鐗╂枡缂栫爜锛�</div>
+ <div class="cr">{{item.materialName}}涓▄{item.materialCode}}</div>
+ </div>
+ <div class="content_list_item_nr_box">
+ <div class="label">璁″垝鏁伴噺锛�</div>
+ <div class="cr">{{item.num}}{{item.umodel.name}}</div>
+ </div>
+ <div class="content_list_item_nr_box">
+ <div class="label">璁″垝鏃ユ湡锛�</div>
+ <div class="cr">{{item.workPlanStartDate}} ~ {{item.workPlanEndDate}}</div>
+ </div>
+ <div class="content_list_item_nr_box">
+ <div class="label">璁″垝鍛橈細</div>
+ <div class="cr">{{item.planUserName}}</div>
+ </div>
+ <div class="content_list_item_nr_box">
+ <div class="label">鐢熶骇鎵规锛�</div>
+ <div class="cr">{{item.batch}}</div>
+ </div>
+ <div class="content_list_item_nr_box" v-if="item.salesOrder">
+ <div class="label">閿�鍞鍗曪細</div>
+ <div class="cr">{{ item.salesOrder }}</div>
+ </div>
+ </div>
+ </div>
+ </van-swipe-cell>
+ </div>
+ </van-list>
+ </van-pull-refresh>
+ </div>
+</template>
+
+<script setup lang="ts">
+ import { reactive, ref, onBeforeUnmount, getCurrentInstance } from "vue"
+ import { useRouter, useRoute } from "vue-router"
+ import { getList } from "@/apis/PlanningAPI"
+
+ const route = useRoute()
+ const router = useRouter()
+
+ const { $Bus } = getCurrentInstance().appContext.config.globalProperties
+
+ // 鍒嗛〉鏌ヨ鏁版嵁
+ const pageData = reactive({
+ capacity: 10,
+ page: 0,
+ total: 0
+ })
+
+ // 鍒楄〃鏁版嵁
+ let listData: any = ref([])
+ const loading = ref(false)
+ const finished = ref(false)
+ const refreshing = ref(false)
+
+ const clickItem = (obj: any) => {
+ $Bus.emit('callback', obj)
+ router.go(-1)
+ }
+
+ // 鍒楄〃
+ const onLoad = () => {
+ if (!finished.value) {
+ pageData.page = pageData.page + 1
+ loading.value = true
+ getList({
+ capacity: pageData.capacity,
+ page: pageData.page,
+ model: {
+ statusList: [1, 4],
+ paused: 0
+ },
+ sorts: [
+ { direction: 'DESC', property: 'CREATE_TIME' }
+ ]
+ }).then(res => {
+ if (refreshing.value) {
+ listData.value = []
+ refreshing.value = false;
+ }
+ loading.value = false
+ if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
+ pageData.total = res.data.total
+ listData.value.push(...res.data.records)
+ } else {
+ finished.value = true
+ }
+ }).catch(err => {
+ loading.value = false
+ finished.value = true
+ if (refreshing.value) {
+ listData.value = []
+ refreshing.value = false;
+ }
+ })
+ }
+ }
+
+ // 涓嬫媺鍒锋柊浼樺寲椤甸潰
+ const onRefresh = () => {
+ finished.value = false;
+ pageData.page = 0
+ loading.value = true;
+ onLoad();
+ }
+
+ onBeforeUnmount(() => {
+ $Bus.all.delete("changeOdr")
+ })
+</script>
+
+<style lang="scss" scoped>
+ .content {
+ width: 100%;
+ // height: 100%;
+ position: absolute;
+ background: #F7F7F7;
+ .content_list {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ .content_list_item {
+ padding: 30px;
+ background: #ffffff;
+ margin-bottom: 20px;
+ .content_list_item_title {
+ display: flex;
+ align-items: center;
+ .content_list_item_title_tips {
+ padding: 4px 8px;
+ box-sizing: border-box;
+ background: #DE5243;
+ border-radius: 8px;
+ font-size: 22px;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #FFFFFF;
+ margin-left: 16px;
+ }
+ .warning {
+ color: $nav-stateColor1 !important;
+ }
+ .green {
+ color: $nav-stateColor6 !important;
+ }
+ span {
+ font-size: 32px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #333333;
+ }
+ }
+ .content_list_item_nr {
+ padding: 24px 30px;
+ background: #F7F7F7;
+ border-radius: 16px;
+ margin-top: 30px;
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ .content_list_item_nr_boxs {
+ width: 45%;
+ display: flex;
+ margin-top: 24px;
+ &:nth-child(1) {
+ margin-top: 0;
+ }
+ &:nth-child(2) {
+ margin-top: 0;
+ }
+ .warning {
+ color: $nav-stateColor4 !important;
+ }
+ .label {
+ flex-shrink: 0;
+ font-size: 24px;
+ font-weight: 400;
+ color: #666666;
+ }
+ .cr {
+ flex: 1;
+ font-size: 24px;
+ font-weight: 400;
+ color: #222222;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ -o-text-overflow:ellipsis;
+ }
+ }
+ .content_list_item_nr_box {
+ width: 100%;
+ display: flex;
+ margin-top: 24px;
+ &:nth-child(1) {
+ margin-top: 0;
+ }
+ .label {
+ font-size: 24px;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+ .cr {
+ font-size: 24px;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+ }
+</style>
--
Gitblit v1.9.3