From faf1d3cc35a3a5f83558946c8056537a4d77fa1f Mon Sep 17 00:00:00 2001
From: liuleilei <234@qq.com>
Date: 星期一, 11 九月 2023 09:34:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
minipro_standard/pages_adjust/pages/transferList/transferList.vue | 706 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 706 insertions(+), 0 deletions(-)
diff --git a/minipro_standard/pages_adjust/pages/transferList/transferList.vue b/minipro_standard/pages_adjust/pages/transferList/transferList.vue
new file mode 100644
index 0000000..e2903f8
--- /dev/null
+++ b/minipro_standard/pages_adjust/pages/transferList/transferList.vue
@@ -0,0 +1,706 @@
+<template>
+ <view class="content">
+ <view class="content_search">
+ <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true" placeholder="鎼滅储杞簱鍗曞彿">
+ <template v-slot:content>
+ <view class="Search_item">
+ <view class="Search_item_label">璁″垝鏃ユ湡</view>
+ <view class="Search_item_content" @click="openDate">
+ <view class="Search_item_content_a" :style="listData.outPlanDateStart ? 'color: #000' : ''">
+ {{ listData.outPlanDateStart ? listData.outPlanDateStart : '寮�濮嬫棩鏈�'}}
+ </view>
+ <text>-</text>
+ <view class="Search_item_content_a" :style="listData.outPlanDateEnd ? 'color: #000' : ''">
+ {{ listData.outPlanDateEnd ? listData.outPlanDateEnd : '缁撴潫鏃ユ湡'}}
+ </view>
+ </view>
+ </view>
+ <view class="Search_item">
+ <view class="Search_item_label">鍗曟嵁绫诲瀷</view>
+ <view class="Search_item_content">
+ <view class="tag">
+ <view class="tag_item" :class="{'tag_active': item.isActive}" v-for="(item, i) in types"
+ :key="item.id" @click="changeTags(i)">{{item.name}}</view>
+ </view>
+ </view>
+ </view>
+ </template>
+ </Search>
+ <view class="content_search_x"></view>
+ <LabelSelection :TagList="tagList" :isShow="true" @change="clickTag" />
+ </view>
+ <view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
+ <view class="content_list">
+ <scroll-view
+ :refresher-enabled="true"
+ :refresher-triggered="isLoading"
+ @refresherrefresh="onRefresh"
+ refresher-background="#fff"
+ @scrolltolower="getLists"
+ scroll-y
+ :style="{height: height}">
+ <view class="content_list_item" v-for="(item, i) in lists" :key="i" @click="jump(item)">
+ <!-- item澶撮儴瑙嗗浘 -->
+ <view class="content_list_item_top">
+ <view class="content_list_item_top_left">
+ <!-- <text>杞簱鍗曞彿锛�</text>-->
+ <text>{{ item.code }}</text>
+ </view>
+ <view class="content_list_item_top_right">
+ <text class="created" v-if="item.status === 0">寰呭嚭搴�</text>
+ <text class="warning" v-else-if="item.status === 1">宸插嚭搴�</text>
+ <text class="green" v-else-if="item.status === 2">宸插叆搴�</text>
+ <text class="info" v-else-if="item.status === 3">宸插彇娑�</text>
+ <text class="info" v-else-if="item.status === 4">宸查��鍥�</text>
+ </view>
+ </view>
+ <!-- item涓婚淇℃伅閮ㄥ垎 -->
+ <view class="content_list_item_content">
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">鍗曟嵁绫诲瀷锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ tyepToStr(item.type) }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">杞嚭浠撳簱锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.outWarehouseName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">杞嚭浠撶鍛橈細</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.outUserName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">杞叆浠撳簱锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.inWarehouseName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">杞叆浠撶鍛橈細</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.inUserName }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">璁″垝杞嚭鏃ユ湡锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.outPlandate }}
+ </view>
+ </view>
+ <view class="content_list_item_content_item">
+ <view class="content_list_item_content_item_label">璁″垝杞叆鏃ユ湡锛�</view>
+ <view class="content_list_item_content_item_nr">
+ {{ item.inPlandate }}
+ </view>
+ </view>
+ </view>
+ </view>
+ </scroll-view>
+ </view>
+ <!-- 閫夋嫨鏃ユ湡 -->
+ <u-calendar
+ :show="timeShow"
+ mode="range"
+ @close="timeShow = false"
+ :minDate="minDate"
+ :maxDate="maxDate"
+ @confirm="timeConfirm"></u-calendar>
+ </view>
+</template>
+
+<script>
+ import Search from '@/components/Search.vue'
+ import LabelSelection from '@/components/LabelSelection.vue'
+ import { getTransferList, ZKPageCount } from "@/util/api/materialStorage";
+ export default {
+ components: {
+ Search,
+ LabelSelection
+ },
+ data() {
+ return {
+ height: '',
+ top: '',
+ isLoading: false,
+ listData: {
+ capacity: 10,
+ page: 0,
+ total: 0,
+ outPlanDateEnd: "",
+ outPlanDateStart: "",
+ code: "",
+ type: "",
+ status: ""
+ },
+ minDate: new Date('2021-01-31'),
+ maxDate: new Date(),
+ types: [{
+ name: '杞﹂棿棰嗘枡',
+ id: '1',
+ isActive: false
+ },
+ {
+ name: '璁″垝棰嗘枡',
+ id: '2',
+ isActive: false
+ },
+ {
+ name: '鏈哄彴澶囨枡',
+ id: '3',
+ isActive: false
+ },
+ {
+ name: '瀹屽伐鍏ュ簱',
+ id: '4',
+ isActive: false
+ },
+ {
+ name: '杞﹂棿杞簱',
+ id: '5',
+ isActive: false
+ },
+ {
+ name: '澶栧崗棰嗘枡杞簱',
+ id: '6',
+ isActive: false
+ },
+ {
+ name: '澶栧崗瀹屽伐杞簱',
+ id: '7',
+ isActive: false
+ },
+ {
+ name: '浜у搧鍏ュ簱',
+ id: '8',
+ isActive: false
+ },
+ {
+ name: '浜у搧杞簱',
+ id: '9',
+ isActive: false
+ },
+ {
+ name: '璁╂鏀捐鍏ュ簱',
+ id: '10',
+ isActive: false
+ },
+ {
+ name: '璁╂鏀捐杞簱',
+ id: '11',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑杩斾慨棰嗘枡',
+ id: '12',
+ isActive: false
+ },
+ {
+ name: '瀹㈣繑杩斾慨鍏ュ簱',
+ id: '13',
+ isActive: false
+ },
+ {
+ name: '璺ㄧ粍缁囪浆搴�',
+ id: '14',
+ isActive: false
+ },
+ {
+ name: '宸ュ簭鎶ュ簾',
+ id: '15',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��杩斾慨棰嗘枡',
+ id: '16',
+ isActive: false
+ },
+ {
+ name: '瀹㈤��杩斾慨鍏ュ簱',
+ id: '17',
+ isActive: false
+ },
+ {
+ name: '搴熷搧鍏ュ簱',
+ id: '30',
+ isActive: false
+ }
+ ],
+ orderType: [{
+ name: '杞﹂棿棰嗘枡',
+ id: 1
+ },
+ {
+ name: '璁″垝棰嗘枡',
+ id: 2
+ },
+ {
+ name: '鏈哄彴澶囨枡',
+ id: 3
+ },
+ {
+ name: '瀹屽伐鍏ュ簱',
+ id: 4
+ },
+ {
+ name: '杞﹂棿杞簱',
+ id: 5
+ },
+ {
+ name: '澶栧崗棰嗘枡杞簱',
+ id: 6
+ },
+ {
+ name: '澶栧崗瀹屽伐杞簱',
+ id: 7
+ },
+ {
+ name: '浜у搧鍏ュ簱',
+ id: 8
+ },
+ {
+ name: '浜у搧杞簱',
+ id: 9
+ },
+ {
+ name: '璁╂鏀捐鍏ュ簱',
+ id: 10
+ },
+ {
+ name: '璁╂鏀捐杞簱',
+ id: 11
+ },
+ {
+ name: '瀹㈣繑杩斾慨棰嗘枡',
+ id: 12
+ },
+ {
+ name: '瀹㈣繑杩斾慨鍏ュ簱',
+ id: 13
+ },
+ {
+ name: '璺ㄧ粍缁囪浆搴�',
+ id: 14
+ },
+ {
+ name: '宸ュ簭鎶ュ簾',
+ id: 15
+ },
+ {
+ name: '瀹㈤��杩斾慨棰嗘枡',
+ id: 16
+ },
+ {
+ name: '瀹㈤��杩斾慨鍏ュ簱',
+ id: 17
+ },
+ {
+ name: '搴熷搧鍏ュ簱',
+ id: 30
+ }
+ ],
+ tagList: [{
+ id: "",
+ name: "鍏ㄩ儴",
+ num: "10",
+ },
+ {
+ id: "0",
+ name: "宸茶鍒�",
+ num: "132",
+ },
+ {
+ id: "1",
+ name: "宸茶浆鍑�",
+ num: "3",
+ },
+ {
+ id: "2",
+ name: "宸茶浆鍏�",
+ num: "12",
+ },
+ {
+ id: "3",
+ name: "宸插彇娑�",
+ num: "12",
+ },
+ ],
+ finished: false,
+ loading: false,
+ refreshing: false,
+ timeShow: false,
+ lists: []
+ };
+ },
+ onReady() {
+ var that = this
+ this.$nextTick(() => {
+ uni.createSelectorQuery().in(this).select('.content_search').boundingClientRect((rect) => {
+ that.height = `calc(100vh - ${rect.height + 80}px)`
+ that.top = `${rect.height}px`
+ }).exec()
+ })
+ },
+ onLoad() {
+ this.getLists();
+ this.getZKPageCount()
+ },
+ methods: {
+ tyepToStr(type) {
+ // <!-- 1銆佽溅闂撮鏂欙紱2銆佽溅闂村鏂欙紱3銆佸叾浠栵紱4銆佸畬宸ュ叆搴� -->
+ for (const item of this.orderType) {
+ if (item.id == type) {
+ return item.name
+ }
+ }
+ return '-'
+ },
+ // 璺宠浆
+ jump(item) {
+ uni.navigateTo({
+ url: `/pages_adjust/pages/warehousingDetails/warehousingDetails?id=${item.id}`
+ })
+ },
+ // 涓嬫媺鍒锋柊浼樺寲椤甸潰
+ onRefresh() {
+ this.isLoading = true
+ this.finished = false;
+ this.listData.page = 0
+ this.loading = true;
+ this.getLists();
+ this.getZKPageCount()
+ },
+ // 鑾峰彇澶撮儴缁勪欢楂樺害
+ getHeight(height) {
+ this.height = height
+ },
+ // 閲嶇疆
+ reset() {
+ this.listData.code = '';
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.listData.type = ''
+ this.listData.outPlanDateEnd = ''
+ this.listData.outPlanDateStart = ''
+ this.types.forEach((item) => {
+ item.isActive = false
+ })
+ this.getLists()
+ this.getZKPageCount()
+ },
+ // 缁熻鎬绘暟
+ getZKPageCount() {
+ ZKPageCount({
+ code: this.listData.code,
+ outPlanDateEnd: this.listData.outPlanDateEnd,
+ outPlanDateStart: this.listData.outPlanDateStart,
+ type: this.listData.type
+ }).then(res => {
+ if (res.code === 200) {
+ this.tagList[0].num = res.data.allNum
+ this.tagList[1].num = res.data.startNum
+ this.tagList[2].num = res.data.outNum
+ this.tagList[3].num = res.data.inNum
+ this.tagList[4].num = res.data.cancelNum
+ }
+ })
+ },
+ loadData() {
+ this.getLists()
+ },
+
+ // 鏃ユ湡纭畾
+ timeConfirm(val) {
+ this.listData.outPlanDateStart = val[0]
+ this.listData.outPlanDateEnd = val[val.length - 1]
+ this.timeShow = false
+ },
+ // 鍒囨崲宸ュ巶
+ changeTags(i) {
+ this.types[i].isActive = !this.types[i].isActive;
+ this.listData.type = this.types[i].id
+ for (const index in this.types) {
+ if (index != i) {
+ const item = this.types[index]
+ item.isActive = false
+ }
+ }
+ },
+ // 鎵撳紑鏃ユ湡鎻掍欢
+ openDate() {
+ this.timeShow = true
+ },
+ // 鎼滅储
+ searchInput(val) {
+ this.listData.code = val
+ this.listData.page = 0
+ this.finished = false
+ this.lists = []
+ this.getLists()
+ this.getZKPageCount()
+ },
+ // 鐐瑰嚮鏍囩鎼滅储
+ clickTag(ids) {
+ this.listData.status = ids
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists()
+ },
+ // 鎼滅储寮规鎻愪氦
+ submit() {
+ this.listData.page = 0;
+ this.finished = false;
+ this.lists = [];
+ this.getLists();
+ this.getZKPageCount()
+ },
+ // 鑾峰彇璁″垝鍒楄〃鏁版嵁
+ getLists() {
+ if (!this.finished) {
+ this.loading = true;
+ this.listData.page = this.listData.page += 1;
+ getTransferList({
+ capacity: this.listData.capacity,
+ model: {
+ code: this.listData.code,
+ outPlanDateEnd: this.listData.outPlanDateEnd,
+ outPlanDateStart: this.listData.outPlanDateStart,
+ type: this.listData.type,
+ status: this.listData.status
+ },
+ page: this.listData.page,
+ sorts: [{
+ direction: "ASC",
+ property: "publishDate",
+ }, ],
+ })
+ .then((res) => {
+ this.isLoading = false
+ if (this.refreshing) {
+ this.lists = []
+ this.refreshing = false;
+ }
+ this.loading = false;
+ this.listData.total = res.data.total;
+ if (res.code === 200) {
+ if (res.data.records.length < this.listData.capacity) {
+ this.finished = true;
+ }
+ if (this.listData.page === 1) {
+ this.lists = res.data.records;
+ } else {
+ this.lists.push(...res.data.records);
+ }
+ }
+ })
+ .catch((err) => {
+ this.isLoading = false
+ this.loading = false;
+ this.finished = true;
+ if (this.refreshing) {
+ this.lists = []
+ this.refreshing = false;
+ }
+ })
+ } else {
+ this.isLoading = false
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .content {
+ .content_search {
+ width: 100%;
+ padding: 30rpx;
+ background: white;
+ position: sticky;
+ top: 0;
+ z-index: 999;
+ box-sizing: border-box;
+
+ .Search_item {
+ margin-bottom: 40rpx;
+
+ .Search_item_label {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+
+ .Search_item_content {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-top: 30rpx;
+
+ .tag {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+
+ .tag_active {
+ background: $nav-color !important;
+ color: #ffffff !important;
+ }
+
+ .tag_item {
+ padding: 22rpx 26rpx;
+ box-sizing: border-box;
+ background: #F2F2F2;
+ border-radius: 8rpx;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin-right: 22rpx;
+ margin-bottom: 22rpx;
+ }
+ }
+
+ text {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ margin: 0 30rpx;
+ }
+
+ .Search_item_content_a {
+ padding: 20rpx 0;
+ flex: 1;
+ background: #F7F7F7;
+ border-radius: 8rpx;
+ border: 1rpx solid #EEEEEE;
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #B2B2B2;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ }
+
+ .content_search_x {
+ height: 24rpx;
+ }
+ }
+
+ .content_list {
+ width: 100%;
+ display: flex;
+ flex-direction: column;
+
+ .content_list_item {
+ width: 100%;
+ box-sizing: border-box;
+ padding: 30rpx;
+ display: flex;
+ flex-direction: column;
+ border-bottom: 1rpx solid #ececec;
+ background: white;
+
+ .content_list_item_top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ .content_list_item_top_left {
+ display: flex;
+ align-items: center;
+
+ text {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #333333;
+ }
+ }
+
+ .content_list_item_top_right {
+ font-size: 26rpx;
+ font-weight: 400;
+
+ .created {
+ color: $nav-stateColor1 !important;
+ }
+
+ .warning {
+ color: $nav-stateColor5 !important;
+ }
+
+ .green {
+ color: $nav-stateColor6 !important;
+ }
+
+ .info {
+ color: $nav-stateColor3 !important;
+ }
+ }
+ }
+
+ .content_list_item_content {
+ padding: 24rpx 30rpx;
+ background: #f7f7f7;
+ border-radius: 16rpx;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ margin-top: 32rpx;
+
+ .content_list_item_content_item {
+ width: 100%;
+ display: flex;
+ margin-top: 24rpx;
+
+ &:first-child {
+ margin-top: 0;
+ }
+
+ // &:nth-child(1) {
+ // margin-top: 0 !important;
+ // }
+ // &:nth-child(2) {
+ // margin-top: 0 !important;
+ // }
+ .content_list_item_content_item_label {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+
+ .content_list_item_content_item_nr {
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #222222;
+ margin-right: 10rpx;
+ }
+ }
+ }
+ }
+ }
+
+ .content_total {
+ width: 100%;
+ height: 80rpx;
+ padding: 24rpx 30rpx;
+ background: #F7F7F7;
+ font-size: 24rpx;
+ font-weight: 400;
+ box-sizing: border-box;
+ color: #666666;
+ position: sticky;
+ z-index: 99;
+ }
+ }
+</style>
\ No newline at end of file
--
Gitblit v1.9.3