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/components/newCom/user.vue | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 330 insertions(+), 0 deletions(-)
diff --git a/h5_standard/src/components/newCom/user.vue b/h5_standard/src/components/newCom/user.vue
new file mode 100644
index 0000000..55d4505
--- /dev/null
+++ b/h5_standard/src/components/newCom/user.vue
@@ -0,0 +1,330 @@
+<template>
+ <van-popup
+ v-model:show="props.show"
+ :close-on-click-overlay="false"
+ position="bottom"
+ round
+ :style="{ height: '80%' }">
+ <div class="content">
+ <div class="content_search content_top">
+ <div class="title">
+ <img class="close" src="@/assets/icon/ic_close@2x.png" alt="" style="opacity: 0;" />
+ <span>閫夋嫨鐢熶骇浜哄憳</span>
+ <img class="close" src="@/assets/icon/ic_close@2x.png" alt="" @click="close" />
+ </div>
+ <v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="鎼滅储濮撳悕"></v-Search>
+ </div>
+ <div class="content_total">鍏眥{form.total}}鏉℃暟鎹�</div>
+ <div class="content_list">
+ <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
+ <div class="content_list_item_name">{{item.name}} | {{item.dmodel.name}}</div>
+ </div>
+ </div>
+ </div>
+ </van-popup>
+</template>
+
+<script setup lang="ts">
+ import { defineProps, defineEmits, onMounted, ref, reactive } from 'vue'
+ import { materialDistributeExt } from '@/apis/ExWarehouse'
+ import { getFindAll, allUser } from '@/apis/PlanningAPI'
+ import { model } from '@/interface'
+ import { judgmentPlatform } from "@/utils/utils"
+ import vSearch from '@/components/common/Search.vue'
+
+ // 鎼滅储鏁版嵁鎺ュ彛
+ interface form extends model {
+ total: number,
+ name: string
+ }
+
+ const form = reactive<form>({
+ capacity: 50,
+ page: 0,
+ total: 0,
+ name: '',
+ })
+
+ // 鍒楄〃鏁版嵁
+ const list: any = ref([]);
+ const loading = ref(false);
+ const finished = ref(false);
+ const refreshing = ref(false)
+
+ // 鎼滅储妗�
+ const searchInput = (data: any) => {
+ form.page = 0
+ finished.value = false
+ list.value = []
+ form.name = data
+ onLoad()
+ }
+
+ // 鎼滅储鎻愪氦
+ const submit = (): void => {
+ form.page = 0
+ finished.value = false
+ list.value = []
+ onLoad()
+ }
+
+ // 杩斿洖涓婁竴椤靛甫鍙傛暟
+ const jump = (item: any) => {
+ emit('value', item)
+ }
+
+ // 鑾峰彇鐗╂枡鍒楄〃鏁版嵁
+ const onLoad = async () => {
+ loading.value = true;
+ allUser({ name: form.name })
+ .then(res => {
+ loading.value = false;
+ if (res.code === 200 && res.data && res.data.length !== 0) {
+ form.total = res.data.length
+ list.value = res.data
+ } else {
+ finished.value = true;
+ }
+ }).catch((err: any) => {
+ loading.value = false;
+ finished.value = true;
+ if (refreshing.value) {
+ list.value = []
+ refreshing.value = false;
+ }
+ })
+ }
+
+ const props = defineProps({
+ show: {
+ type: Boolean,
+ required: true
+ }
+ })
+
+ const emit = defineEmits(['close', 'value'])
+
+ // 鍏抽棴鍥炶皟
+ const close = () => {
+ emit('close')
+ }
+
+ onMounted(() => {
+ onLoad()
+ })
+</script>
+
+<style lang="scss" scoped>
+ .content {
+ .content_code {
+ position: fixed;
+ right: 30px;
+ bottom: 100px;
+ img {
+ width: 138px;
+ height: 138px;
+ }
+ }
+ .content_top {
+ top: 0 !important;
+ }
+ .content_search {
+ padding: 30px;
+ background: white;
+ position: sticky;
+ top: 88px;
+ z-index: 9;
+ .title {
+ width: 100%;
+ padding: 0 0 30px 0;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ span {
+ font-size: 30px;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ }
+ .close {
+ width: 28px;
+ height: 28px;
+ }
+ }
+ .content_search_x {
+ height: 24px;
+ }
+ }
+ .content_total {
+ padding: 24px 30px;
+ background: #F7F7F7;
+ font-size: 24px;
+ font-weight: 400;
+ color: #666666;
+ position: sticky;
+ z-index: 99;
+ top: 195px;
+ }
+ .content_list {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ .page_content {
+ margin-top: 36px;
+ padding: 0 30px;
+ box-sizing: border-box;
+ .page_content_title {
+ display: flex;
+ flex-direction: column;
+ margin-bottom: 10px;
+ .page_content_title_top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ span {
+ &:nth-child(1) {
+ font-size: 30px;
+ font-weight: 500;
+ color: #222222;
+ }
+ &:nth-child(2) {
+ flex-shrink: 0;
+ font-size: 24px;
+ font-weight: 400;
+ color: #333333;
+ span {
+ font-size: 24px;
+ color: $nav-color;
+ }
+ }
+ }
+ }
+ .page_content_title_bottom {
+ .green {
+ color: $nav-stateColor7 !important;
+ .black {
+ color: black !important;
+ }
+ }
+ .warning {
+ color: $nav-stateColor5 !important;
+ .black {
+ color: black !important;
+ }
+ }
+ .error {
+ color: $nav-stateColor4 !important;
+ .black {
+ color: black !important;
+ }
+ }
+ span {
+ font-size: 24px;
+ font-weight: 400;
+ color: #666666;
+ }
+ }
+ }
+ .lineBorder {
+ border: none !important;
+ padding-bottom: 0 !important;
+ margin-bottom: 24px;
+ }
+ .page_content_list {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ &:first-child {
+ margin: 0;
+ }
+ &:last-child {
+ border: none;
+ }
+ .page_content_list_nums {
+ width: 30%;
+ display: flex;
+ .page_content_list_num_label {
+ font-size: 26px;
+ font-weight: 400;
+ color: #666666;
+ }
+ .page_content_list_num_nr {
+ font-size: 26px;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ .page_content_list_num {
+ width: 70%;
+ display: flex;
+ .page_content_list_num_label {
+ font-size: 26px;
+ font-weight: 400;
+ color: #666666;
+ }
+ .page_content_list_num_nr {
+ font-size: 26px;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ .page_content_list_items {
+ width: 30%;
+ display: flex;
+ margin-top: 24px;
+ .page_content_list_item_label {
+ font-size: 26px;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+ .page_content_list_item_nr {
+ font-size: 26px;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ .page_content_list_item {
+ width: 70%;
+ display: flex;
+ .page_content_list_item_label {
+ font-size: 26px;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+ .page_content_list_item_nr {
+ font-size: 26px;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
+ .content_list_item {
+ padding: 30px;
+ display: flex;
+ border-bottom: 1px solid #ececec;
+ .serious {
+ color: $nav-stateColor4 !important;
+ }
+ .success {
+ color: $nav-stateColor2 !important;
+ }
+ .warning {
+ color: $nav-stateColor5 !important;
+ }
+ .content_list_item_status {
+ font-size: 28px;
+ margin-right: 10px;
+ }
+ .content_list_item_name {
+ font-size: 28px;
+ }
+ }
+ }
+ }
+</style>
--
Gitblit v1.9.3