From d8d184a00d3581b3a77aa26864a153f0515524e0 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 29 八月 2023 18:30:03 +0800
Subject: [PATCH] 小程序
---
h5_standard/src/views/children.vue | 2
minipro_standard/store/index.js | 23
minipro_standard/pages/login/login.vue | 29
minipro_standard/components/LabelSelection.vue | 88 ++
/dev/null | 22
minipro_standard/pages.json | 20
minipro_standard/util/api/index.js | 10
minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue | 77 +
h5_standard/src/utils/request.ts | 4
h5_standard/src/views/workOrder/workOrderReporting.vue | 6
minipro_standard/pages/plannedProgress/plannedProgress.vue | 632 +++++++++++++++++++
minipro_standard/pages_adjust/components/location.vue | 97 +++
minipro_standard/uni.scss | 9
minipro_standard/components/Search.vue | 178 +++++
minipro_standard/pages/planDetails/planDetails.vue | 546 +++++++++++++++++
minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue | 4
minipro_standard/pages_adjust/components/Warehouse.vue | 136 ++++
17 files changed, 1,825 insertions(+), 58 deletions(-)
diff --git a/h5_standard/src/utils/request.ts b/h5_standard/src/utils/request.ts
index 06d7b67..d51170a 100644
--- a/h5_standard/src/utils/request.ts
+++ b/h5_standard/src/utils/request.ts
@@ -29,9 +29,9 @@
// 娣诲姞鍝嶅簲鎷︽埅鍣�
service.interceptors.response.use(
(response) => {
- // if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) {
+ if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) {
loading.clear();
- // }
+ }
if (response.data.code === 401) { // 澶勭悊鐧诲綍杩囨湡
Toast.fail({ message: '鐧诲綍杩囨湡锛屽噯澶囪嚜鍔ㄩ噸鏂扮櫥褰�', duration: 2000, forbidClick: true })
setTimeout(() => {
diff --git a/h5_standard/src/views/children.vue b/h5_standard/src/views/children.vue
index 0b165b2..d03ea27 100644
--- a/h5_standard/src/views/children.vue
+++ b/h5_standard/src/views/children.vue
@@ -36,7 +36,7 @@
const title = ref<string>('')
- alert(window.document.title)
+ // alert(window.document.title)
const pathLists = reactive<string[]>([
'/index',
'/workbench',
diff --git a/h5_standard/src/views/workOrder/workOrderReporting.vue b/h5_standard/src/views/workOrder/workOrderReporting.vue
index 689f086..3057755 100644
--- a/h5_standard/src/views/workOrder/workOrderReporting.vue
+++ b/h5_standard/src/views/workOrder/workOrderReporting.vue
@@ -306,11 +306,11 @@
</van-list>
</div>
</div>
- <!-- 鎶ュ伐鎸夐挳 -->
- <template v-if="info.status === 2 || info.procedureNeedcheck === 1">
+ <!-- 鎶ュ伐鎸夐挳 v-if="info.status === 2 || info.procedureNeedcheck === 1" -->
+ <template>
<div class="bh_zw"></div>
<div class="bg_footer">
- <div class="bg_footer_submit" v-if="typeView == 0" @click="submit">纭鎶ュ伐</div>
+ <div class="bg_footer_submit" v-if="typeView == 0 && (info.status === 2 || info.procedureNeedcheck === 1)" @click="submit">纭鎶ュ伐</div>
<!-- proxy.$auth('h5:workorder:processRecord') && -->
<div class="bg_footer_submit1" @click="jumpdj" v-if="typeView == 1">
<img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" />
diff --git a/minipro_standard/components/LabelSelection.vue b/minipro_standard/components/LabelSelection.vue
new file mode 100644
index 0000000..6a26a84
--- /dev/null
+++ b/minipro_standard/components/LabelSelection.vue
@@ -0,0 +1,88 @@
+<template>
+ <scroll-view class="tag" scroll-x>
+ <view class="tag_list">
+ <view v-for="item in TagList"
+ :key="item.id"
+ :class="{'tag_item': true, 'tagActive': item.id == activeId}"
+ @click="change(item)">
+ <text>{{item.name}}</text>
+ <text v-if="isShow && item.num">({{item.num}})</text>
+ </view>
+ </view>
+ </scroll-view>
+</template>
+
+<script>
+ export default {
+ name: "LabelSelection",
+ props: {
+ TagList: Array,
+ isShow: Boolean
+ },
+ data() {
+ return {
+ activeId: ''
+ };
+ },
+ methods: {
+ change(item) {
+ if (this.activeId !== item.id) {
+ this.activeId = item.id
+ this.$emit('change', item.id)
+ }
+ }
+ },
+ watch: {
+ TagList: {
+ immediate: true,
+ handler(news, old) {
+ let list = news
+ if (list && list.length !== 0) {
+ this.activeId = list[0].id
+ }
+ }
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .tag::-webkit-scrollbar {
+ width: 0 !important;
+ }
+ .tag::-webkit-scrollbar {
+ width: 0 !important;
+ height: 0;
+ }
+ .tag {
+ width: 100%;
+ padding: 5rpx 0;
+ box-sizing: border-box;
+ .tag_list {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ flex-wrap: nowrap;
+ .tagActive {
+ background: $nav-color !important;
+ text {
+ color: #FFFFFF !important;
+ }
+ }
+ .tag_item {
+ min-width: 120rpx;
+ padding: 14rpx 24rpx;
+ border-radius: 26rpx;
+ text-align: center;
+ flex-shrink: 0;
+ margin-right: 20rpx;
+ border: 1rpx solid #CCCCCC;
+ text {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #555555;
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/minipro_standard/components/Search.vue b/minipro_standard/components/Search.vue
new file mode 100644
index 0000000..9c33b94
--- /dev/null
+++ b/minipro_standard/components/Search.vue
@@ -0,0 +1,178 @@
+<template>
+ <view class="search">
+ <view class="search_box">
+ <view class="search_input">
+ <image src="@/static/ic_search@2x.png" alt="">
+ <input v-model="text" @keyup.enter="searchInput()" type="text" :placeholder="placeholder" />
+ </view>
+ <view class="search_operation" v-if="isShow">
+ <view class="search_operation_w"></view>
+ <image @click="openCate()" src="@/static/filter@2x.png" mode="widthFix">
+ </view>
+ </view>
+ <u-popup :show="open" :round="10" mode="bottom">
+ <view class="content">
+ <slot name="content"></slot>
+ </view>
+ <view class="zhanwei"></view>
+ <view class="footer">
+ <view class="footer_close" @click="closes">閲嶇疆</view>
+ <view class="footer_submit" @click="submit">纭畾</view>
+ </view>
+ </u-popup>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ text: '',
+ open: false
+ };
+ },
+ props: {
+ isShow: Boolean,
+ placeholder: String
+ },
+ methods: {
+ // 鎼滅储妗嗘悳绱�
+ searchInput() {
+ this.$emit('searchInput', this.text)
+ },
+ // 鎵撳紑寮圭獥
+ openCate() {
+ this.open = true
+ },
+ // 閲嶇疆
+ closes() {
+ this.open = false
+ this.text = ''
+ this.$emit('reset', this.text)
+ },
+ // 鎼滅储鎻愪氦
+ submit() {
+ this.open = false
+ this.$emit('submit')
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .search {
+ width: 100%;
+ height: 68rpx;
+ display: flex;
+ align-items: center;
+ .zhanwei {
+ height: 180rpx;
+ background: #ffffff;
+ }
+ .content {
+ padding: 30rpx 30rpx 0 30rpx;
+ }
+ .footer {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding-left: 40rpx;
+ padding-right: 40rpx;
+ padding-bottom: 64rpx;
+ box-sizing: border-box;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ background: #ffffff;
+ z-index: 99;
+ .footer_close {
+ flex: 1;
+ padding: 28rpx 0;
+ box-sizing: border-box;
+ margin-right: 22rpx;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #999999;
+ background: #F7F7F7;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .footer_submit {
+ flex: 1;
+ padding: 28rpx 0;
+ box-sizing: border-box;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #ffffff;
+ background: $nav-color;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ .search_box {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ .search_input {
+ flex: 1;
+ height: 100%;
+ background: #F7F7F7;
+ border-radius: 8rpx;
+ display: flex;
+ align-items: center;
+ padding: 15rpx 30rpx;
+ box-sizing: border-box;
+ image {
+ width: 28rpx;
+ height: 28rpx;
+ margin-right: 10rpx;
+ }
+ input {
+ width: 100%;
+ border: none;
+ outline: none;
+ background: #F7F7F7;
+ font-size: 26rpx;
+ }
+ input::-webkit-input-placeholder { /* WebKit browsers */
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #B2B2B2;
+ }
+ input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #B2B2B2;
+ }
+ input::-moz-placeholder { /* Mozilla Firefox 19+ */
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #B2B2B2;
+ }
+ input:-ms-input-placeholder { /* Internet Explorer 10+ */
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #B2B2B2;
+ }
+ }
+ .search_operation {
+ flex-shrink: 0;
+ /*width: 150rpx;*/
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ /*margin-left: 30rpx;*/
+ image {
+ width: 44rpx;
+ height: 44rpx;
+ }
+ .search_operation_w {
+ width: 30rpx;
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/minipro_standard/components/Warehouse.vue b/minipro_standard/components/Warehouse.vue
deleted file mode 100644
index e663399..0000000
--- a/minipro_standard/components/Warehouse.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-<template>
- <u-popup :show="show" mode="top" @close="close" @open="open">
- <view>
- <text>浜虹敓鑻ュ彧濡傚垵瑙侊紝浣曚簨绉嬮鎮茬敾鎵�</text>
- </view>
- </u-popup>
-</template>
-
-<script>
- export default {
- name:"Warehouse",
- data() {
- return {
-
- };
- }
- }
-</script>
-
-<style lang="scss" scoped>
-
-</style>
\ No newline at end of file
diff --git a/minipro_standard/pages.json b/minipro_standard/pages.json
index 90a1b84..ebebaeb 100644
--- a/minipro_standard/pages.json
+++ b/minipro_standard/pages.json
@@ -54,7 +54,25 @@
}
}
- ],
+ ,{
+ "path" : "pages/plannedProgress/plannedProgress",
+ "style" :
+ {
+ "navigationBarTitleText": "璁″垝杩涘害",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ,{
+ "path" : "pages/planDetails/planDetails",
+ "style" :
+ {
+ "navigationBarTitleText": "璁″垝璇︽儏",
+ "enablePullDownRefresh": false
+ }
+
+ }
+ ],
"subPackages": [
{
"root": "pages_adjust",
diff --git a/minipro_standard/pages/login/login.vue b/minipro_standard/pages/login/login.vue
index 6f10dc0..1632dbc 100644
--- a/minipro_standard/pages/login/login.vue
+++ b/minipro_standard/pages/login/login.vue
@@ -11,7 +11,7 @@
</view>
<view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height">
<image src="@/static/login_ic_phone@2x.png" mode="" class="img40 mr25"></image>
- <u--input placeholder="鎵嬫満鍙�" border="none" v-model="loginForm.account"></u--input>
+ <u--input placeholder="鎵嬫満鍙�" border="none" v-model="loginForm.username"></u--input>
</view>
<view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height">
<image src="@/static/login_ic_password@2x.png" mode="" class="img40 mr25"></image>
@@ -22,21 +22,37 @@
</template>
<script>
+ import { wxAccountLogin, getUserInfo } from '@/util/api/index.js'
export default {
data() {
return {
loginForm: {
companyId: '',
- account: '',
+ username: '',
password: ''
}
};
},
methods: {
- loginAction() {
- uni.reLaunch({
- url: '/pages/workbench/workbench'
+ async loginAction() {
+ if (!this.loginForm.companyId) return uni.showToast({ title: '浼佷笟浠g爜涓嶈兘涓虹┖', icon:"error", duration: 2000 });
+ if (!this.loginForm.username) return uni.showToast({ title: '鎵嬫満鍙蜂笉鑳戒负绌�', icon:"error", duration: 2000 });
+ if (!this.loginForm.password) return uni.showToast({ title: '瀵嗙爜涓嶈兘涓虹┖', icon:"error", duration: 2000 });
+ let res = await wxAccountLogin({
+ companyId: this.loginForm.companyId,
+ username: this.loginForm.username,
+ password: this.loginForm.password
})
+ if (res.code === 200) {
+ let user = await getUserInfo({})
+ if (user.code === 200) {
+ await this.$store.commit('SETUSERINFO', user.data)
+ await this.$store.dispatch('getMenuList', 2)
+ uni.reLaunch({
+ url: '/pages/workbench/workbench'
+ })
+ }
+ }
}
}
}
@@ -56,7 +72,6 @@
height: 100%;
}
.login-log {
- // margin-top: ;
margin: 356rpx auto 0 auto ;
left: 0;
right: 0;
@@ -75,7 +90,7 @@
}
}
.input-height {
- height: 100rpx;
+ height: 100rpx;
}
.com-input {
margin-top: -60px;
diff --git a/minipro_standard/pages/planDetails/planDetails.vue b/minipro_standard/pages/planDetails/planDetails.vue
new file mode 100644
index 0000000..9d3f17f
--- /dev/null
+++ b/minipro_standard/pages/planDetails/planDetails.vue
@@ -0,0 +1,546 @@
+<template>
+ <view class="details">
+ <view class="content_list">
+ <view class="content_list_item">
+ <view class="content_list_item_top">
+ <view class="content_list_item_top_left">
+ <text v-if="info.mmodel">{{info.mmodel.name}}</text>
+ <view class="content_list_item_top_left_tag" v-if="info.urgent">浼樺厛{{info.urgent}}</view>
+ <view class="content_list_item_top_left_type" v-if="info.type === 0">姝e父</view>
+ <view class="content_list_item_top_left_type dangerous" v-else-if="info.type === 1">寮傚父</view>
+ <view class="content_list_item_top_left_type warning" v-else-if="info.type === 2">杩斿伐</view>
+ </view>
+ <view class="content_list_item_top_right">
+ <text v-if="info.status === 0">宸茬敓鎴�</text>
+ <text v-if="info.status === 1">宸插彂甯�</text>
+ <text v-if="info.status === 2">宸叉挙鍥�</text>
+ <text v-if="info.status === 3">宸插彇娑�</text>
+ <text v-if="info.status === 4">宸插垎閰�</text>
+ <text v-if="info.status === 5">宸叉殏鍋�</text>
+ <text v-if="info.status === 6">宸插畬宸�</text>
+ <text v-if="info.status === 7">宸插叆搴�</text>
+ <text v-if="info.status === 8">宸插叧闂�</text>
+<!-- <text class="warning" v-if="info.status === 0">寰呭彂甯�</text>-->
+<!-- <text class="green" v-else-if="info.status === 1 || info.status === 4">鐢熶骇涓�</text>-->
+<!-- <text class="info" v-else-if="info.status === 6 || info.status === 7 || info.status === 3 || info.status === 8">宸插畬鎴�</text>-->
+ </view>
+ </view>
+ <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" v-if="info.pmodel">{{info.pmodel.name}}</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" v-if="info.umodel">{{info.num}}{{info.umodel.name}}</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">{{info.planDate}}</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">{{info.batch}}</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">{{info.createTime}}</view>
+ </view>
+ <view class="content_list_item_content_item" v-if="info.usermodel">
+ <view class="content_list_item_content_item_label">璁″垝浜哄憳锛�</view>
+ <view class="content_list_item_content_item_nr">{{info.usermodel.realname}}</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" v-if="info.umodel">{{info.distributNum}}{{info.umodel.name}}</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" v-if="info.umodel">{{info.doneNum}}{{info.umodel.name}}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <NotFound info="鏆傛湭鍒嗛厤宸ュ崟" v-if="info.workorderList && info.workorderList.length === 0" />
+ <template v-else>
+ <!-- <view class="details_list">
+ <view class="details_list_item" v-for="(item, i) in info.workorderList" :key="i" @click="jump(item)">
+ <view class="details_list_item_top">
+ <text>{{ item.createUserName }}</text>
+ <text>{{ item.code }}</text>
+ </view>
+ <view class="details_list_item_center">
+ <text>鑹搧鏁帮細{{ item.qualifiedNum }}</text>
+ <text>涓嶈壇鏁帮細<text class="red">{{ item.unqualifiedNum }}</text></text>
+ </view>
+ <view class="details_list_item_bottom">
+ <text>{{ item.createTime }}</text>
+ </view>
+ </view>
+ </view> -->
+ <view class="details_timeline" v-for="(item, i) in info.workorderList" :key="i">
+ <view class="details_timeline_header">
+ <view class="details_timeline_header_code">
+ <text>宸ュ崟缂栧彿锛歿{item.code}}</text>
+ <text>鐢熶骇浜哄憳锛歿{proUserStr(item)}}</text>
+ </view>
+ <text v-if="item.status === 0" class="yellow">宸插垱寤�</text>
+ <text v-if="item.status === 1" class="green">宸插鏂�</text>
+ <text v-if="item.status === 2">宸插畬宸�</text>
+ <text v-if="item.status === 3" class="purple">宸叉楠�</text>
+ <text v-if="item.status === 4">宸叉姤宸�</text>
+ <text v-if="item.status === 5">宸插叆搴�</text>
+ <text v-if="item.status === 6">宸插彇娑�</text>
+ <!-- <text v-if="item.status === 7">宸插彇娑�</text>-->
+ <!-- <text v-if="item.status === 8">宸插叧闂�</text>-->
+ </view>
+ <view class="details_timeline_item" v-if="item.produceDate">
+ <view class="activedian"></view>
+ <view class="dian active"></view>
+ <view class="x"></view>
+ <view class="details_timeline_item_zw"></view>
+ <view class="details_timeline_item_left">
+ <text class="active_font">浜у嚭</text>
+ <text>{{item.produceDate}}</text>
+ </view>
+ <view class="details_timeline_item_right">
+ <view class="item">
+ <view class="item_label">鐗╂枡锛�</view>
+ <view class="item_nr">
+ <view class="item_nr_item" v-if="item.qualifiedNum !== 0">
+ <text class="success">[鍚堟牸鍝乚</text>
+ <text>{{item.qualifiedNum}}{{info.umodel.name}}</text>
+ </view>
+ <view class="item_nr_item" v-if="item.unqualifiedNum !== 0">
+ <text class="warning">[涓嶈壇鍝乚</text>
+ <text>{{item.unqualifiedNum}}{{info.umodel.name}}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="details_timeline_item" v-if="item.materialDate">
+ <view class="activedian" v-if="!item.produceDate"></view>
+ <view class="dian" :class="{ 'active': !item.produceDate }"></view>
+ <view class="x" :style="{ height: item.materialList.length === 1 ? '2.1rem' : 1.2 * item.materialList.length + 'rem' }"></view>
+ <view class="details_timeline_item_zw"></view>
+ <view class="details_timeline_item_left">
+ <text :class="{'active_font': !item.produceDate}">鎶曟枡</text>
+ <text>{{item.materialDate}}</text>
+ </view>
+ <view class="details_timeline_item_right">
+ <view class="item">
+ <view class="item_label">鐗╂枡锛�</view>
+ <view class="item_nr" v-if="item.materialList && item.materialList.length !== 0">
+ <view class="item_nr_item" v-for="(items, idx) in item.materialList" :key="idx">
+ <text style="margin: 0;">{{items.name}} / {{items.num}}{{items.unitName}}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="details_timeline_item">
+ <view class="activedian" v-if="!item.materialDate && !item.produceDate"></view>
+ <view class="dian" :class="{ 'active': !item.materialDate && !item.produceDate }"></view>
+ <view class="details_timeline_item_zw"></view>
+ <view class="details_timeline_item_left">
+ <text :class="{'active_font': !item.materialDate && !item.produceDate}">鍒嗛厤</text>
+ <text>{{ item.distributeDate }}</text>
+ </view>
+ <view class="details_timeline_item_right">
+ <view class="item">
+ <view class="item_label">鍒嗛厤鏁伴噺锛�</view>
+ <view class="item_nr">{{item.planNum}}{{info.umodel.name}}</view>
+ </view>
+ </view>
+ </view>
+ </view>
+ </template>
+ <!-- <view class="details_zw"></view> -->
+ <!-- <view class="details_btn" @click="toJump">鍘绘姤宸�</view> -->
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ info: {}
+ };
+ },
+ methods: {
+ // 鑾峰彇璇︽儏
+ queryByIDs() {
+ queryByID(this.$route.query.id)
+ .then(res => {
+ if (res.code === 200) {
+ this.info = res.data
+ }
+ })
+ },
+ proUserStr(item) {
+ if (!item.proUserList || item.proUserList.length<1) {
+ return '-'
+ }
+ return item.proUserList.map(user => { return user.proUserDepartName }).join('锛�')
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+.details {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ background: #F7F7F7;
+ .details_zw {
+ width: 100%;
+ height: 148rpx;
+ }
+ .details_btn {
+ position: fixed;
+ bottom: 60rpx;
+ left: 30rpx;
+ width: calc(100% - 60rpx);
+ height: 88rpx;
+ line-height: 88rpx;
+ text-align: center;
+ background: #305ED5;
+ box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0,0,0,0.08);
+ border-radius: 8rpx;
+ font-size: 30rpx;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #FFFFFF;
+ }
+ .van-skeleton {
+ padding: 0 !important;
+ }
+ .content_list {
+ width: 100%;
+ padding: 30rpx;
+ background: #ffffff;
+ display: flex;
+ flex-direction: column;
+ box-sizing: border-box;
+ .content_list_item {
+ display: flex;
+ flex-direction: column;
+ .content_list_item_top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .content_list_item_top_left {
+ display: flex;
+ align-items: center;
+ max-width: 83%;
+ text {
+ max-width: 400rpx;
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #333333;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+ .dangerous {
+ background: $nav-stateColor4 !important;
+ }
+ .warning {
+ background: $nav-stateColor5 !important;
+ }
+ .content_list_item_top_left_type {
+ flex-shrink: 0;
+ padding: 5rpx 10rpx;
+ background: $nav-stateColor2;
+ border-radius: 8rpx;
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #FFFFFF;
+ margin-left: 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ .content_list_item_top_left_tag {
+ flex-shrink: 0;
+ padding: 5rpx 10rpx;
+ background: $nav-stateColor4;
+ border-radius: 8rpx;
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #FFFFFF;
+ margin-left: 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ .content_list_item_top_right {
+ font-size: 26rpx;
+ font-weight: 400;
+ flex-shrink: 0;
+ .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: 50%;
+ display: flex;
+ margin-top: 24rpx;
+ &: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;
+ }
+ }
+ }
+ }
+ }
+ .details_list {
+ width: 100%;
+ height: auto;
+ background-color: #FFFFFF;
+ margin-top: 20rpx;
+ .details_list_item {
+ width: 100%;
+ padding: 24rpx 30rpx;
+ box-sizing: border-box;
+ background-color: #FFFFFF;
+ border-bottom: 2rpx solid #F7F7F7;
+ &:last-child {
+ border: none !important;
+ }
+ .details_list_item_top {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ text {
+ &:first-child {
+ font-size: 30rpx;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ margin-right: 16rpx;
+ }
+ &:last-child {
+ font-size: 24rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #666666;
+ }
+ }
+ }
+ .details_list_item_center {
+ width: 100%;
+ margin: 16rpx 0 20rpx 0;
+ .red {
+ color: #DE5243;
+ }
+ text {
+ &:first-child {
+ font-size: 26rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #333333;
+ margin-right: 100rpx;
+ }
+ &:last-child {
+ font-size: 26rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #333333;
+ }
+ }
+ }
+ .details_list_item_bottom {
+ text {
+ font-size: 24rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #999999;
+ }
+ }
+ }
+ }
+ .details_timeline {
+ padding: 30rpx;
+ background: #ffffff;
+ margin-top: 20rpx;
+ .details_timeline_header {
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ .yellow {
+ color: $nav-stateColor1 !important;
+ }
+ .green {
+ color: $nav-stateColor6 !important;
+ }
+ .purple {
+ color: $nav-color !important;
+ }
+ text {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ .details_timeline_header_code {
+ display: flex;
+ flex-direction: column;
+ text {
+ &:first-child {
+ font-size: 28rpx;
+ font-weight: 500;
+ color: #222222;
+ }
+ &:last-child {
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #777777;
+ margin-top: 24rpx;
+ }
+ }
+ }
+ }
+ .details_timeline_item {
+ display: flex;
+ align-items: flex-start;
+ position: relative;
+ margin-top: 60rpx;
+ &:nth-child(1) {
+ margin-top: 0 !important;
+ }
+ .x {
+ position: absolute;
+ top: 30rpx;
+ left: 29rpx;
+ width: 1rpx;
+ height: 165rpx;
+ border-right: 1rpx dashed #CCCCCC;
+ }
+ .dian {
+ position: absolute;
+ top: 22rpx;
+ left: 22rpx;
+ width: 16rpx;
+ height: 16rpx;
+ background: #CCCCCC;
+ border-radius: 50%;
+ }
+ .active {
+ width: 16rpx;
+ height: 16rpx;
+ background: $nav-color;
+ z-index: 8;
+ }
+ .activedian {
+ position: absolute;
+ top: 14rpx;
+ left: 14rpx;
+ width: 32rpx;
+ height: 32rpx;
+ background: #E4EBFE;
+ border-radius: 50%;
+ }
+ .details_timeline_item_zw {
+ width: 100rpx;
+ }
+ .details_timeline_item_left {
+ display: flex;
+ flex-direction: column;
+ width: 150rpx;
+ .active_font {
+ color: $nav-color !important;
+ }
+ text {
+ &:nth-child(1) {
+ font-size: 30rpx;
+ font-weight: 500;
+ color: #333333;
+ }
+ &:nth-child(2) {
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #999999;
+ margin-top: 16rpx;
+ }
+ }
+ }
+ .details_timeline_item_right {
+ display: flex;
+ flex-direction: column;
+ flex: 1;
+ margin-left: 30rpx;
+ .item {
+ display: flex;
+ align-items: flex-start;
+ margin-top: 24rpx;
+ &:nth-child(1) {
+ margin-top: 0 !important;
+ }
+ .item_label {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #666666;
+ flex-shrink: 0;
+ }
+ .item_nr {
+ font-size: 26rpx;
+ font-weight: 400;
+ color: #333333;
+ .item_nr_item {
+ display: flex;
+ align-items: center;
+ margin-bottom: 24rpx;
+ .success {
+ color: $nav-stateColor2;
+ }
+ .warning {
+ color: $nav-stateColor5;
+ }
+ text {
+ font-size: 26rpx;
+ font-weight: 400;
+ &:last-child {
+ color: #333333;
+ margin-left: 12rpx;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+</style>
diff --git a/minipro_standard/pages/plannedProgress/plannedProgress.vue b/minipro_standard/pages/plannedProgress/plannedProgress.vue
new file mode 100644
index 0000000..a36f4a1
--- /dev/null
+++ b/minipro_standard/pages/plannedProgress/plannedProgress.vue
@@ -0,0 +1,632 @@
+<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.startDate ? 'color: #000' : ''">{{ listData.startDate ? listData.startDate : '寮�濮嬫棩鏈�'}}</view>
+ <text>-</text>
+ <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">{{ listData.endDate ? listData.endDate : '缁撴潫鏃ユ湡'}}</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 factoryList" :key="item.id" @click="changeTags(i, item.id)">{{item.name}}</view>
+ </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 data" :key="item.id" @click="changeTag(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 @scrolltolower="getLists" scroll-y :style="{height: height}">
+ <view class="content_list_item" v-for="item in lists" :key="item.id" @click="jump(item)">
+ <view class="content_list_item_top">
+ <view class="content_list_item_top_left">
+ <text v-if="item.mmodel">{{item.mmodel.name}}</text>
+ <view class="content_list_item_top_left_tag" v-if="item.urgent">浼樺厛{{item.urgent}}</view>
+ <view class="content_list_item_top_left_tag warning" v-if="item.paused === 1">鍋�</view>
+ </view>
+ <view class="content_list_item_top_right">
+ <text v-if="item.status === 0">宸茬敓鎴�</text>
+ <text v-if="item.status === 1">宸插彂甯�</text>
+ <text v-if="item.status === 2">宸叉挙鍥�</text>
+ <text v-if="item.status === 3">宸插彇娑�</text>
+ <text v-if="item.status === 4">宸插垎閰�</text>
+ <text v-if="item.status === 5">宸叉殏鍋�</text>
+ <text v-if="item.status === 6">宸插畬宸�</text>
+ <text v-if="item.status === 7">宸插叆搴�</text>
+ <text v-if="item.status === 8">宸插叧闂�</text>
+<!-- <text class="warning" v-if="item.status === 0">寰呭彂甯�</text>-->
+<!-- <text class="green" v-else-if="item.status === 1 || item.status === 4">鐢熶骇涓�</text>-->
+<!-- <text class="info" v-else-if="item.status === 6 || item.status === 7 || item.status === 3 || item.status === 8">宸插畬鎴�</text>-->
+ </view>
+ </view>
+ <view class="content_list_item_content">
+ <view class="content_list_item_content_item" v-if="item.pmodel">
+ <view class="content_list_item_content_item_label">宸ュ簭鍚嶇О锛�</view>
+ <view class="content_list_item_content_item_nr">{{item.pmodel.name}}</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.planDate}}</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" v-if="item.mmodel">{{item.mmodel.code}}</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" v-if="item.umodel">{{item.num}}{{item.umodel.name}}</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.batch}}</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.publishDate ? item.publishDate : '-'}}</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.usermodel.realname}}</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.fmodel.name}}</view>
+ </view>
+ </view>
+ </view>
+ </scroll-view>
+ </view>
+ <!-- 閫夋嫨鏃ユ湡 -->
+ <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm"></u-calendar>
+ </view>
+</template>
+
+<script>
+ import Search from '@/components/Search.vue'
+ import LabelSelection from '@/components/LabelSelection.vue'
+ export default {
+ components: { Search, LabelSelection },
+ data() {
+ return {
+ height: '',
+ top: '',
+ listData: {
+ capacity: 10,
+ page: 0,
+ total: 0,
+ startDate: '',
+ endDate: '',
+ procedureIds: [],
+ departIds: '',
+ mixParam: '',
+ cateIds: []
+ },
+ tagList: [
+ {
+ id: '',
+ name: '鍏ㄩ儴',
+ num: '0'
+ },
+ {
+ id: '0',
+ name: '寰呭彂甯�',
+ num: '0'
+ },
+ {
+ id: '1,4',
+ name: '鐢熶骇涓�',
+ num: '0'
+ },
+ {
+ id: '6, 7, 3, 8',
+ name: '宸插畬鎴�',
+ num: '0'
+ }
+ ],
+ data: [], // 宸ュ簭鏁版嵁
+ factoryList: [],
+ finished: true,
+ loading: false,
+ refreshing: false,
+ timeShow: false,
+ lists: [
+ {
+ id: 1,
+ status: 0,
+ urgent: 1,
+ num: 100,
+ batch: '11111',
+ planDate: '2023-08-29',
+ mmodel: {
+ name: '宸ュ簭璁″垝',
+ code: 'fbdseasafghb'
+ },
+ usermodel: {
+ realname: '璁″垝浜哄憳'
+ },
+ pmodel: {
+ name: '宸ュ簭璁″垝'
+ },
+ fmodel: {
+ name: '宸ュ巶'
+ }
+ },
+ {
+ id: 2,
+ status: 0,
+ urgent: 1,
+ num: 100,
+ batch: '11111',
+ planDate: '2023-08-29',
+ mmodel: {
+ name: '宸ュ簭璁″垝',
+ code: 'fbdseasafghb'
+ },
+ usermodel: {
+ realname: '璁″垝浜哄憳'
+ },
+ pmodel: {
+ name: '宸ュ簭璁″垝'
+ },
+ fmodel: {
+ name: '宸ュ巶'
+ }
+ },
+ {
+ id: 3,
+ status: 0,
+ urgent: 1,
+ num: 100,
+ batch: '11111',
+ planDate: '2023-08-29',
+ mmodel: {
+ name: '宸ュ簭璁″垝',
+ code: 'fbdseasafghb'
+ },
+ usermodel: {
+ realname: '璁″垝浜哄憳'
+ },
+ pmodel: {
+ name: '宸ュ簭璁″垝'
+ },
+ fmodel: {
+ name: '宸ュ巶'
+ }
+ },
+ {
+ id: 4,
+ status: 0,
+ urgent: 1,
+ num: 100,
+ batch: '11111',
+ planDate: '2023-08-29',
+ mmodel: {
+ name: '宸ュ簭璁″垝',
+ code: 'fbdseasafghb'
+ },
+ usermodel: {
+ realname: '璁″垝浜哄憳'
+ },
+ pmodel: {
+ name: '宸ュ簭璁″垝'
+ },
+ fmodel: {
+ name: '宸ュ巶'
+ }
+ },
+ {
+ id: 5,
+ status: 0,
+ urgent: 1,
+ num: 100,
+ batch: '11111',
+ planDate: '2023-08-29',
+ mmodel: {
+ name: '宸ュ簭璁″垝',
+ code: 'fbdseasafghb'
+ },
+ usermodel: {
+ realname: '璁″垝浜哄憳'
+ },
+ pmodel: {
+ name: '宸ュ簭璁″垝'
+ },
+ fmodel: {
+ name: '宸ュ巶'
+ }
+ }
+ ]
+ };
+ },
+ 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()
+ })
+ },
+ methods: {
+ // 璺宠浆
+ jump(item) {
+ uni.navigateTo({
+ url: `/pages/planDetails/planDetails?id=${item.id}`
+ })
+ },
+ // 鑾峰彇澶撮儴缁勪欢楂樺害
+ getHeight(height) {
+ this.height = height
+ },
+ // 閲嶇疆
+ reset() {
+ this.listData.page = 0
+ this.finished = false
+ this.lists = []
+ this.listData.mixParam = ''
+ this.listData.startDate = ''
+ this.listData.endDate = ''
+ this.listData.procedureIds = []
+ if (this.factoryList.length > 0) {
+ this.listData.departIds = this.factoryList[0].id
+ }
+ if (this.data.length > 0) {
+ this.data.forEach(item => { item.isActive = false })
+ }
+ // this.getLists()
+ // this.pageCounts()
+ },
+ // 鏃ユ湡纭畾
+ timeConfirm(val) {
+ this.listData.startDate = val[0]
+ this.listData.endDate = val[val.length - 1]
+ this.timeShow = false
+ },
+ // 鍒囨崲宸ュ巶
+ changeTags(i, id) {
+ this.listData.departIds = id
+ this.getWorkingProcedures(id)
+ this.factoryList.forEach((item, index) => {
+ if (index === i) {
+ item.isActive = true
+ } else {
+ item.isActive = false
+ }
+ })
+ },
+ // 鎵撳紑鏃ユ湡鎻掍欢
+ openDate() {
+ this.timeShow = true
+ },
+ // 鎼滅储
+ searchInput(val) {
+ this.listData.mixParam = val
+ this.listData.page = 0
+ this.finished = false
+ this.lists = []
+ this.getLists()
+ },
+ // 鐐瑰嚮鏍囩鎼滅储
+ clickTag(ids) {
+ this.listData.cateIds = ids
+ this.listData.page = 0
+ this.finished = false
+ this.lists = []
+ // this.getLists()
+ },
+ // 鑾峰彇鍒楄〃缁熻
+ pageCounts() {
+ pageCount({
+ factoryId: this.listData.departIds,
+ procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
+ startDate: this.listData.startDate,
+ endDate: this.listData.endDate,
+ statusList: this.listData.cateIds
+ }).then(res => {
+ if (res.code === 200 && res.data) {
+ this.tagList[0].num = res.data.allNum.toString()
+ this.tagList[1].num = res.data.startNum.toString()
+ this.tagList[2].num = res.data.ingNum.toString()
+ this.tagList[3].num = res.data.endNum.toString()
+ }
+ })
+ },
+ // 鑾峰彇宸ュ巶鏁版嵁
+ getOrganizations() {
+ getOrganization({
+ type: 1
+ }).then(res => {
+ if (res.code === 200 && res.data && res.data.length !== 0) {
+ res.data.forEach((item, i) => {
+ item.isActive = i === 0;
+ })
+ if (res.data.length > 0) {
+ this.factoryList = res.data
+ this.listData.departIds = this.factoryList[0].id
+ this.listData.procedureIds = ''
+ this.finished = false
+ this.getWorkingProcedures(this.factoryList[0].id)
+ this.getLists()
+ this.pageCounts()
+ }
+ }
+ })
+ },
+ // 鑾峰彇宸ュ簭鏁版嵁
+ getWorkingProcedures(orgId) {
+ this.data = []
+ getWorkingProcedure({ orgId })
+ .then(res => {
+ if (res.code === 200 && res.data && res.data.length !== 0) {
+ res.data.forEach((item, i) => {
+ item.isActive = false;
+ })
+ this.data = res.data
+ }
+ })
+ },
+ // 鎼滅储寮规鎻愪氦
+ submit() {
+ let pmodelOrgId = []
+ this.data.forEach((item) => {
+ if (item.isActive) {
+ pmodelOrgId.push(item.id)
+ }
+ })
+ this.listData.procedureIds = pmodelOrgId
+ this.listData.page = 0
+ this.finished = false
+ this.lists = []
+ // this.getLists()
+ // this.pageCounts()
+ },
+ // 鑾峰彇璁″垝鍒楄〃鏁版嵁
+ getLists() {
+ console.log('getLists')
+ if (!this.finished) {
+ this.loading = true
+ this.listData.page = this.listData.page++
+ getList({
+ capacity: this.listData.capacity,
+ model: {
+ mixParam: this.listData.mixParam,
+ startDate: this.listData.startDate,
+ endDate: this.listData.endDate,
+ procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
+ factoryId: this.listData.departIds,
+ statusList: this.listData.cateIds
+ },
+ page: this.listData.page,
+ sorts: [
+ {
+ direction: 'ASC',
+ property: 'publishDate'
+ }
+ ]
+ }).then(res => {
+ this.loading = false
+ this.listData.total = res.data.total
+ if (this.refreshing) {
+ this.lists = []
+ this.refreshing = false;
+ }
+ if (res.code === 200 && res.data.records.length !== 0) {
+ if (this.lists.length === 0) {
+ this.lists = res.data.records
+ } else {
+ this.lists.push(...res.data.records)
+ }
+ } else {
+ this.finished = true
+ }
+ }).catch(err => {
+ this.loading = false
+ this.finished = true
+ if (this.refreshing) {
+ this.lists = []
+ this.refreshing = 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%;
+ background: white;
+ padding: 30rpx;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ border-bottom: 1rpx solid #ececec;
+ .content_list_item_top {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ .content_list_item_top_left {
+ display: flex;
+ align-items: center;
+ width: 80%;
+ text {
+ font-size: 32rpx;
+ font-weight: 500;
+ color: #333333;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .warning {
+ background: $nav-stateColor5 !important;
+ }
+ .content_list_item_top_left_tag {
+ flex-shrink: 0;
+ padding: 5rpx 10rpx;
+ background: $nav-stateColor4;
+ border-radius: 8rpx;
+ font-size: 22rpx;
+ font-weight: 400;
+ color: #FFFFFF;
+ margin-left: 16rpx;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ .content_list_item_top_right {
+ font-size: 26rpx;
+ font-weight: 400;
+ flex-shrink: 0;
+ margin-left: 10rpx;
+ .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: 50%;
+ display: flex;
+ margin-top: 24rpx;
+ &: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>
diff --git a/minipro_standard/pages_adjust/components/Warehouse.vue b/minipro_standard/pages_adjust/components/Warehouse.vue
new file mode 100644
index 0000000..9911c53
--- /dev/null
+++ b/minipro_standard/pages_adjust/components/Warehouse.vue
@@ -0,0 +1,136 @@
+<template>
+ <u-popup :show="show" mode="bottom" :closeable="true" :round="10" @open="open" @close="close">
+ <view class="title">
+ <text>閫夋嫨浠撳簱</text>
+ </view>
+ <view class="content">
+ <view class="content_search">
+ <u-search :showAction="false" placeholder="璇疯緭鍏ヤ粨搴撳悕绉�" v-model="keyword"></u-search>
+ </view>
+ <div class="content_total">鍏眥{total}}鏉℃暟鎹�</div>
+ <view class="content_list">
+ <u-list @scrolltolower="scrolltolower">
+ <u-list-item v-for="(item, index) in indexList" :key="index">
+ <div class="content_list_item" @click="getVal(item)">
+ <div class="content_list_item_name">
+ <span style="color: #03AF76;">[DTFHNE]</span>
+ <!-- <span style="color: #03AF76;" v-if="item.tmodel.label == 'APPLIANCE_ONTEST'">[{{ item.tmodel.code }}]</span>
+ <span style="color: #305ED5;" v-if="item.tmodel.label == 'APPLIANCE_MIX'">[{{ item.tmodel.code }}]</span>
+ <span style="color: #F5A400;" v-if="item.tmodel.label == 'APPLIANCE_OFFTEST'">[{{ item.tmodel.code }}]</span> -->
+ <!-- <span style="color: red;" v-if="item.tmodel.label == 'APPLIANCE_USELESS'">[{{ item.tmodel.code }}]</span> -->
+ <span>{{item.name}}</span>
+ </div>
+ </div>
+ </u-list-item>
+ </u-list>
+ </view>
+ </view>
+ </u-popup>
+</template>
+
+<script>
+ export default {
+ props: {
+ show: Boolean
+ },
+ data() {
+ return {
+ keyword: '',
+ total: 0,
+ indexList: []
+ };
+ },
+ methods: {
+ getVal(item) {
+ this.$emit('value', item)
+ },
+ open() {
+ this.indexList = []
+ this.loadmore()
+ },
+ scrolltolower() {
+ this.loadmore()
+ },
+ loadmore() {
+ for (let i = 0; i < 20; i++) {
+ this.indexList.push({
+ id: i,
+ name: `浠撳簱${i}`
+ })
+ }
+ },
+ close() {
+ this.$emit('close')
+ }
+ }
+ }
+</script>
+
+<style lang="scss" scoped>
+ .title {
+ width: 100%;
+ height: 85rpx;
+ line-height: 85rpx;
+ text-align: center;
+ text {
+ font-size: 30rpx;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ }
+ }
+ .content {
+ width: 100%;
+ .content_search {
+ width: 100%;
+ padding: 0 30rpx 30rpx 30rpx;
+ background: white;
+ position: sticky;
+ top: 85rpx;
+ z-index: 9;
+ box-sizing: border-box;
+ }
+ .content_total {
+ padding: 24rpx 30rpx;
+ background: #F7F7F7;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ .content_list {
+ width: 100%;
+ height: 800rpx;
+ display: flex;
+ flex-direction: column;
+ .content_list_item {
+ padding: 30rpx;
+ display: flex;
+ border-bottom: 1rpx solid #ececec;
+ .serious {
+ color: $nav-stateColor4 !important;
+ }
+ .success {
+ color: $nav-stateColor2 !important;
+ }
+ .warning {
+ color: $nav-stateColor5 !important;
+ }
+ .content_list_item_status {
+ font-size: 28rpx;
+ margin-right: 10rpx;
+ }
+ .content_list_item_name {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ span {
+ font-size: 30rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/minipro_standard/pages_adjust/components/location.vue b/minipro_standard/pages_adjust/components/location.vue
new file mode 100644
index 0000000..1dadea7
--- /dev/null
+++ b/minipro_standard/pages_adjust/components/location.vue
@@ -0,0 +1,97 @@
+<template>
+ <u-popup :show="show" mode="bottom" :closeable="true" :round="10" @open="open" @close="close">
+ <view class="title">
+ <text>閫夋嫨璐т綅</text>
+ </view>
+ <view class="content">
+ <view class="content_list">
+ <u-list @scrolltolower="scrolltolower">
+ <u-list-item v-for="(item, index) in indexList" :key="index">
+ <div class="content_list_item">
+ <div class="content_list_item_name">
+ 璐т綅{{index}}
+ </div>
+ </div>
+ </u-list-item>
+ </u-list>
+ </view>
+ </view>
+ </u-popup>
+</template>
+
+<script>
+ export default {
+ props: {
+ show: Boolean
+ },
+ data() {
+ return {
+ indexList: [1,2,3,4,5,6,7,8,9]
+ };
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .title {
+ width: 100%;
+ height: 85rpx;
+ line-height: 85rpx;
+ text-align: center;
+ text {
+ font-size: 30rpx;
+ font-family: PingFangSC-Medium, PingFang SC;
+ font-weight: 500;
+ color: #222222;
+ }
+ }
+ .content {
+ width: 100%;
+ .content_search {
+ width: 100%;
+ padding: 0 30rpx 30rpx 30rpx;
+ background: white;
+ position: sticky;
+ top: 85rpx;
+ z-index: 9;
+ box-sizing: border-box;
+ }
+ .content_total {
+ padding: 24rpx 30rpx;
+ background: #F7F7F7;
+ font-size: 24rpx;
+ font-weight: 400;
+ color: #666666;
+ }
+ .content_list {
+ width: 100%;
+ height: 800rpx;
+ display: flex;
+ flex-direction: column;
+ .content_list_item {
+ padding: 30rpx;
+ display: flex;
+ border-bottom: 1rpx solid #ececec;
+ .serious {
+ color: $nav-stateColor4 !important;
+ }
+ .success {
+ color: $nav-stateColor2 !important;
+ }
+ .warning {
+ color: $nav-stateColor5 !important;
+ }
+ .content_list_item_status {
+ font-size: 28rpx;
+ margin-right: 10rpx;
+ }
+ .content_list_item_name {
+ font-size: 30rpx;
+ font-family: PingFangSC-Regular, PingFang SC;
+ font-weight: 400;
+ color: #222222;
+ }
+ }
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue b/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
index f9a42cf..3217796 100644
--- a/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
+++ b/minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
@@ -3,16 +3,16 @@
<view class="rework_list">
<view class="rework_list_item">
<text><b>*</b>鍗曟嵁绫诲瀷</text>
- <view class="rework_list_item_right">
+ <view class="rework_list_item_right" @click="typeShow = true">
<text :class="form.typeName ? 'black' : ''">{{form.typeName ? form.typeName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="rework_list_item">
<text><b>*</b>鍏ュ簱浠撳簱</text>
- <view class="rework_list_item_right">
+ <view class="rework_list_item_right" @click="warehouseShow = true">
<text :class="form.warehouseName ? 'black' : ''">{{form.warehouseName ? form.warehouseName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
@@ -33,14 +33,14 @@
<text><b>*</b>鍏ュ簱璐т綅</text>
<view class="rework_qd_item_right">
<text :class="item.locationName ? 'black' : ''">{{item.locationName ? item.locationName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="rework_qd_item">
<text><b>*</b>鍏ュ簱鐗╂枡</text>
<view class="rework_qd_item_right">
<text :class="item.materialName ? 'black' : ''">{{item.materialName ? item.materialName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<template v-if="form.type !== 25">
@@ -48,7 +48,7 @@
<text>鐢熶骇宸ュ簭</text>
<view class="rework_qd_item_right">
<text :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
</template>
@@ -56,19 +56,19 @@
<text><b>*</b>璐ㄩ噺灞炴��</text>
<view class="rework_qd_item_right">
<text :class="item.qualityTypeName ? 'black' : ''">{{item.qualityTypeName ? item.qualityTypeName : '璇烽�夋嫨'}}</text>
- <van-icon name="arrow" size="20" color="#999999" />
+ <u-icon name="arrow-right"></u-icon>
</view>
</view>
<view class="rework_qd_item">
<text>鎵规鍙�</text>
<view class="rework_qd_item_right">
- <input type="text" v-model="item.batch" placeholder="璇疯緭鍏�" />
+ <u--input placeholder="璇疯緭鍏�" style="width: 230rpx;" border="surround" v-model="item.batch"></u--input>
</view>
</view>
<view class="rework_qd_item">
<text><b>*</b>鍏ュ簱鏁伴噺<template v-if="item.unitName">({{ item.unitName }})</template></text>
<view class="rework_qd_item_right">
- <input type="text" v-model="item.num" placeholder="0" />
+ <u--input placeholder="0" border="surround" v-model="item.num"></u--input>
</view>
</view>
</view>
@@ -82,11 +82,20 @@
<button class="rework_footer_submit">鎻愪氦</button>
</view>
<u-toast ref="uToast"></u-toast>
+ <!-- 浠撳簱 -->
+ <Warehouse :show="warehouseShow" @close="close" @value="getValue" />
+ <!-- 璐т綅 -->
+ <location :show="locationShow" @close="close1" @value="getValue1" />
+ <!-- 鍗曟嵁绫诲瀷 -->
+ <u-picker :show="typeShow" keyName="name" :columns="typeList" @confirm="confirm" @cancel="typeClose"></u-picker>
</view>
</template>
<script>
+ import Warehouse from '../../components/Warehouse.vue'
+ import location from '../../components/location.vue'
export default {
+ components: { Warehouse, location },
data() {
return {
form: {
@@ -95,10 +104,50 @@
type: '',
typeName: ''
},
- list: []
+ list: [
+ {
+ batch: '',
+ locationId: '',
+ locationIdLabel: '',
+ locationName: '',
+ materialId: '',
+ materialName: '',
+ num: '',
+ hasBom: '',
+ procedureId: '',
+ procedureName: '',
+ qualityType: '',
+ qualityTypeName: '',
+ unitId: '',
+ unitName: ''
+ }
+ ],
+ typeList: [[{name: '閲囪喘鍏ュ簱', id: 25}, {name: '搴撳瓨璋冩暣', id: 28}]],
+ warehouseShow: false,
+ typeShow: false,
+ locationShow: false
};
},
methods: {
+ // 纭鍗曟嵁绫诲瀷
+ confirm(val) {
+ this.form.type = val.value[0].id
+ this.form.typeName = val.value[0].name
+ this.typeShow = false
+ },
+ // 浠撳簱纭
+ getValue(val) {
+ this.form.warehouseName = val.name
+ this.form.warehouseId = val.id
+ this.warehouseShow = false
+ },
+ typeClose() {
+ this.typeShow = false
+ },
+ close() {
+ this.warehouseShow = false
+ },
+ // 娣诲姞鏄庣粏
addItem() {
if (!this.form.warehouseId) return this.$refs.uToast.show({ type: 'default', message: "璇烽�夋嫨鍏ュ簱浠撳簱" })
this.list.push({
@@ -133,12 +182,12 @@
<style lang="scss" scoped>
.rework {
width: 100%;
- height: 100%;
- position: absolute;
+ min-height: 100vh;
+ background-color: #F7F7F7;
.rework_list {
display: flex;
flex-direction: column;
- background: white;
+ background: #ffffff;
padding: 0 30rpx;
box-sizing: border-box;
.rework_list_item {
diff --git a/minipro_standard/store/index.js b/minipro_standard/store/index.js
index 0d677c6..0b3342b 100644
--- a/minipro_standard/store/index.js
+++ b/minipro_standard/store/index.js
@@ -1,6 +1,6 @@
import Vue from 'vue'
import Vuex from 'vuex'
-import { pageCount } from '@/util/api/index.js'
+import { pageCount, getTreeList } from '@/util/api/index.js'
Vue.use(Vuex) // vue鐨勬彃浠舵満鍒�
@@ -8,7 +8,8 @@
const statusbarHeight = uni.getStorageSync('statusbarHeight');
const menuButtonWidth = uni.getStorageSync('menuButtonWidth');
const token = uni.getStorageSync('token');
-const userInfo = uni.getStorageSync('userInfo');
+const userInfo = uni.getStorageSync('userInfo');
+const Menu = uni.getStorageSync('MenuList');
// Vuex.Store 鏋勯�犲櫒閫夐」
@@ -20,7 +21,9 @@
token: token || null,
menuButtonWidth: menuButtonWidth || '0',
statusbarHeight: statusbarHeight || '0',
- navHeight: navHeight || '0',
+ navHeight: navHeight || '0',
+ // 鑿滃崟鏉冮檺
+ Menu: Menu ? Menu : [],
// 寰呭姙鏁伴噺
upcomingNum: {
d: 0,
@@ -47,12 +50,22 @@
SETNUM(state, val) {
state.upcomingNum.d = val.d
state.upcomingNum.y = val.y
+ },
+ SETMENU (state, data) {
+ state.Menu = data
+ uni.setStorageSync('MenuList', JSON.stringify(data));
}
},
actions: {
+ // 鍚戝悗绔幏鍙栬彍鍗曟爮鏉冮檺
+ async getMenuList (content, type) {
+ let res = await getTreeList({ type: type })
+ if (res.code === 200) {
+ content.commit('SETMENU', res.data)
+ }
+ },
// 鑾峰彇鐘舵�侀珮搴�
- getHeight(context) {
-
+ getHeight(context) {
let res = uni.getMenuButtonBoundingClientRect()
let status = uni.getSystemInfoSync()
let menuButtonWidth = res.width
diff --git a/minipro_standard/uni.scss b/minipro_standard/uni.scss
index 3bc1c4c..04138e5 100644
--- a/minipro_standard/uni.scss
+++ b/minipro_standard/uni.scss
@@ -17,6 +17,15 @@
$nav-color: #4275FC;
+// 鍏ㄥ眬鐘舵�佽壊
+$nav-stateColor1: #305ED5;
+$nav-stateColor2: #03AF76;
+$nav-stateColor3: #999999;
+$nav-stateColor4: #de5243;
+$nav-stateColor5: #F5A400;
+$nav-stateColor6: #666666;
+$nav-stateColor7: #03AF76;
+
/* 琛屼负鐩稿叧棰滆壊 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
diff --git a/minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue b/minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue
index 1a25db6..d8a2b69 100644
--- a/minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue
+++ b/minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue
@@ -49,9 +49,9 @@
const preLoadScreen = this.uList.preLoadScreen
const windowHeight = this.sys.windowHeight
if(n <= windowHeight * preLoadScreen) {
- this.parent.updateOffsetFromChild(0)
+ // this.parent.updateOffsetFromChild(0)
} else if (this.rect.top <= n - windowHeight * preLoadScreen) {
- this.parent.updateOffsetFromChild(this.rect.top)
+ // this.parent.updateOffsetFromChild(this.rect.top)
}
}
// #endif
diff --git a/minipro_standard/util/api/index.js b/minipro_standard/util/api/index.js
index bbaad1e..d2e0fbc 100644
--- a/minipro_standard/util/api/index.js
+++ b/minipro_standard/util/api/index.js
@@ -17,7 +17,6 @@
// 鑿滃崟鏁版嵁
export function getTreeList(params) {
return http.get('/system/menu/treeNodes', {params})
-
}
// 閫�鍑虹櫥褰�
@@ -25,3 +24,12 @@
return http.get(`/wechat/logout`)
}
+// 鐧诲綍
+export function wxAccountLogin(data) {
+ return http.post('/system/wxAccountLogin', data)
+}
+
+// 鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛淇℃伅
+export function getUserInfo(params) {
+ return http.get('/system/getUserInfo', {params})
+}
\ No newline at end of file
--
Gitblit v1.9.3