处理待办事项
This commit is contained in:
@@ -4,40 +4,37 @@
|
||||
:auto-scroll-to-top-when-reload="false" v-model="dataList" @query="queryList">
|
||||
<view style="z-index: 10000;position: sticky;" :style="'top:0px'">
|
||||
<view class="top-bar">
|
||||
<nut-button type="primary" block plain @click="navigateTo('/pages/config/goodsAdd')">
|
||||
新增备忘录
|
||||
<nut-button type="primary" block plain @click="navigateTo('/pages/todo/todoAdd')">
|
||||
添加待办事项
|
||||
</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="todo-item" v-for="(item, index) in dataList" :key="index">
|
||||
|
||||
<view class="goods-item-content">
|
||||
<!-- @click="navigateTo('/pages/control/goods/edit?id=' + item.goods_id)" -->
|
||||
<view class="goods-item-content-header">
|
||||
<view style="font-size: 24rpx">记录人:</view>
|
||||
<nut-tag custom-color="#1a1a1a">{{ item.user.staff_name }}</nut-tag>
|
||||
<view class="todo-item-content">
|
||||
<view class="todo-item-content-header" @click="onShowInfoPopup(item)">
|
||||
<view style="font-size: 24rpx"> 记录人: {{ item.user.staff_name }}</view>
|
||||
<view style="font-size: 24rpx"> 记录时间: {{ item.create_time }} </view>
|
||||
</view>
|
||||
<view class="goods-item-content-body">
|
||||
<view class="goods-item-content-body-desc">
|
||||
<view class="todo-item-content-body" @click="onShowInfoPopup(item)">
|
||||
<view class="todo-item-content-body-desc">
|
||||
{{item.content}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="goods-item-content-footer">
|
||||
<view class="todo-item-content-footer">
|
||||
<view style="font-size: 24rpx; color: red;" v-if="item.status.value === 0">
|
||||
状态:<text>{{item.status.text}}</text>
|
||||
</view>
|
||||
<view style="font-size: 24rpx; color:chartreuse;" v-else>
|
||||
状态:<text>{{item.status.text}}</text>
|
||||
</view>
|
||||
<view class="goods-item-content-footer-btn">
|
||||
<view class="todo-item-content-footer-btn">
|
||||
<nut-button size="small" type="success" v-if="item.status.value == 0"
|
||||
@click="onMark(item.goods_id,'1')">
|
||||
@click="onMark(item.id,'1')">
|
||||
标记已办
|
||||
</nut-button>
|
||||
<nut-button size="small" type="danger" v-if="item.status.value == 1"
|
||||
@click="onMark(item.goods_id,'0')">
|
||||
@click="onMark(item.id,'0')">
|
||||
标记未办
|
||||
</nut-button>
|
||||
</view>
|
||||
@@ -45,6 +42,20 @@
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
<!-- 弹出 -->
|
||||
<nut-popup :custom-style="{ height: '50%' }" v-model:visible="visibleInfoPopup" position="bottom"
|
||||
safe-area-inset-bottom :close-on-click-overlay="true" @close="onCloseInfoPopup">
|
||||
<view>
|
||||
<view class="title">记录人: {{tempTodo?.user?.staff_name}} </view>
|
||||
<view class="room-info">
|
||||
<view class="remark" v-if="tempTodo?.content">待办事项: {{tempTodo.content}}</view>
|
||||
<view class="room-id" v-if="tempTodo?.create_time">添加时间: {{tempTodo.create_time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</nut-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -62,22 +73,49 @@
|
||||
} from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
fetchTodoList
|
||||
fetchTodoList,
|
||||
fetchEditTodo
|
||||
} from '@/api/index';
|
||||
|
||||
import {
|
||||
navigateTo,
|
||||
} from '@/utils/helper';
|
||||
|
||||
const tempTodo = reactive({})
|
||||
|
||||
const visibleInfoPopup = ref(false)
|
||||
const onShowInfoPopup = (todo) => {
|
||||
console.log("----", todo);
|
||||
Object.assign(tempTodo, todo)
|
||||
visibleInfoPopup.value = true
|
||||
}
|
||||
const onCloseInfoPopup = () => {
|
||||
Object.assign(tempTodo, {})
|
||||
visibleInfoPopup.value = false
|
||||
console.log("关闭");
|
||||
};
|
||||
|
||||
|
||||
|
||||
// zp
|
||||
const paging = ref(null);
|
||||
// 列表
|
||||
const dataList = ref([]);
|
||||
|
||||
|
||||
// 标记
|
||||
const onMark = (id, status) => {
|
||||
const params = {
|
||||
id: id,
|
||||
status: status
|
||||
}
|
||||
console.log(params);
|
||||
fetchEditTodo(params).then(res => {
|
||||
uni.showToast({
|
||||
title: '标记成功',
|
||||
icon: 'success',
|
||||
});
|
||||
paging.value.refresh();
|
||||
}).catch(res => {
|
||||
paging.value.refresh();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -92,10 +130,8 @@
|
||||
fetchTodoList(params).then(res => {
|
||||
console.log('res=>', res.list);
|
||||
paging.value.complete(res.list);
|
||||
|
||||
}).catch(res => {
|
||||
paging.value.complete(false);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
@@ -104,24 +140,6 @@
|
||||
|
||||
const init = () => {
|
||||
console.log('init111');
|
||||
// // 加载默认筛选项内容
|
||||
// fetchFilterParmas().then(res => {
|
||||
// console.log(res);
|
||||
// // 处理成色
|
||||
// let degree_params = res.degree_list;
|
||||
// state.degree_params = degree_params.reduce((it, cit) => {
|
||||
// it.push({
|
||||
// text: cit.degree_name,
|
||||
// value: cit.degree_id
|
||||
// });
|
||||
// return it;
|
||||
// }, state.degree_params) || [];
|
||||
// // 产品类型
|
||||
// state.type_params = res.type_list
|
||||
// // 产品下品牌列表
|
||||
// state.drop_down_options = res.drop_down_options
|
||||
// state.o_drop_down_options = res.o_drop_down_options
|
||||
// })
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
@@ -130,9 +148,9 @@
|
||||
if (paging.value) {
|
||||
paging.value.refresh();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
init();
|
||||
})
|
||||
@@ -142,34 +160,16 @@
|
||||
.page-content {
|
||||
min-height: 100vh;
|
||||
background-color: #f2f3f5;
|
||||
--nut-menu-bar-box-shadow: none;
|
||||
--nut-menu-item-content-padding: 20rpx;
|
||||
--nut-menu-item-content-max-height: 900rpx;
|
||||
|
||||
|
||||
|
||||
// --nut-searchbar-input-padding:5px 0 5px 13px;
|
||||
--nut-searchbar-input-height: 40px;
|
||||
}
|
||||
|
||||
:deep(.titleClass) .nut-menu__title-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
.top-bar {
|
||||
background: #fff;
|
||||
// padding: 20rpx;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 20rpx 60rpx;
|
||||
// display: flex;
|
||||
// justify-content: space-between;
|
||||
// border-top: 1px solid #eee;
|
||||
// position: sticky;
|
||||
// bottom: 0;
|
||||
// z-index: 999;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
gap: 20rpx;
|
||||
|
||||
|
||||
.goods-item-content {
|
||||
.todo-item-content {
|
||||
// width: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
@@ -194,72 +194,40 @@
|
||||
/* 首尾贴边,中间均分 */
|
||||
|
||||
// gap: 15px;
|
||||
.goods-item-content-header {
|
||||
.todo-item-content-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 6rpx 0;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.goods-item-content-body {
|
||||
.todo-item-content-body {
|
||||
padding: 6rpx 0;
|
||||
|
||||
.goods-item-content-body-desc {
|
||||
.todo-item-content-body-desc {
|
||||
color: #7c7c7c;
|
||||
font-size: 26rpx;
|
||||
/* 关键属性 */
|
||||
display: -webkit-box;
|
||||
/* 使用弹性盒子布局 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直方向排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示两行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
/* 超出时显示省略号 */
|
||||
}
|
||||
}
|
||||
|
||||
.goods-item-content-stock {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.goods-item-content-stock-desc {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.goods-item-content-status-desc {
|
||||
font-size: 26rpx;
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-item-content-footer {
|
||||
.todo-item-content-footer {
|
||||
padding: 6rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// width: 100%;
|
||||
// flex-direction: row;
|
||||
|
||||
.goods-item-content-footer-btn {
|
||||
.todo-item-content-footer-btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
|
||||
.share-btn {
|
||||
border-radius: 50rpx;
|
||||
border: 2rpx solid red;
|
||||
font-size: 26rpx;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
color: red;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -267,215 +235,27 @@
|
||||
|
||||
|
||||
|
||||
.filter-types {
|
||||
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
gap: 10rpx;
|
||||
padding: 10rpx;
|
||||
// position: fixed;
|
||||
// top: 0;
|
||||
height: 60rpx;
|
||||
// z-index: 9999;
|
||||
background-color: #fff;
|
||||
border-bottom: 2rpx solid gainsboro;
|
||||
border-top: 2rpx solid gainsboro;
|
||||
|
||||
.filter-type-inner {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, .05);
|
||||
border-radius: 16rpx;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 28rpx;
|
||||
gap: 15rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
|
||||
// image {
|
||||
// height: 22px;
|
||||
// width: 22px;
|
||||
// }
|
||||
}
|
||||
|
||||
.filter-type-inner.active {
|
||||
background-color: rgba(250, 44, 25, .1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
.title {
|
||||
padding: 0 20rpx;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tabs-container {
|
||||
display: flex;
|
||||
|
||||
.tab-pane-inner {
|
||||
height: 600rpx;
|
||||
}
|
||||
|
||||
.tabs-inner {
|
||||
overflow-y: scroll;
|
||||
height: 600rpx;
|
||||
width: 160rpx;
|
||||
background-color: #F5F5F5;
|
||||
|
||||
.tab-inner {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
padding: 10rpx;
|
||||
font-size: 28rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #F5F5F5;
|
||||
|
||||
text {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.tab-inner-active {
|
||||
// background: #FFF;
|
||||
background-color: rgba(250, 44, 25, .1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.degree-inner {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-wrap: wrap;
|
||||
// gap: 20rpx;
|
||||
gap: 10rpx;
|
||||
// padding: 11px;
|
||||
.room-info {
|
||||
text-align: left;
|
||||
padding: 20rpx 20rpx;
|
||||
color: #666;
|
||||
width: 100%;
|
||||
margin-bottom: 60rpx;
|
||||
}
|
||||
|
||||
.degree-item {
|
||||
align-items: center;
|
||||
background-color: rgba(0, 0, 0, .05);
|
||||
border-radius: 10rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
font-size: 26rpx;
|
||||
gap: 10rpx;
|
||||
justify-content: center;
|
||||
min-height: 80rpx;
|
||||
width: calc(50% - 10rpx);
|
||||
}
|
||||
|
||||
.degree-item.active {
|
||||
background-color: rgba(250, 44, 25, .1);
|
||||
color: var(--nutui-color-primary);
|
||||
}
|
||||
|
||||
.product-btns {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 20rpx 0;
|
||||
|
||||
// border-bottom: 2rpx solid gainsboro;
|
||||
// border-top: 2rpx solid gainsboro;
|
||||
|
||||
.reset {
|
||||
flex: 1;
|
||||
|
||||
.room-id {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.confirm {
|
||||
flex: 2;
|
||||
|
||||
.remark {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.degree-btns {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
.reset {
|
||||
flex: 1;
|
||||
/* 重置按钮占 1 份 */
|
||||
}
|
||||
|
||||
.confirm {
|
||||
flex: 2;
|
||||
/* 确认按钮占 2 份 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.main-nav-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.nav-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 45%;
|
||||
height: 160rpx;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.phone-button {
|
||||
background: linear-gradient(135deg, #6a5ae0, #8d7bfb);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.parts-button {
|
||||
background: linear-gradient(135deg, #ff6b6b, #ee5253);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.nav-button-bg {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
opacity: 0.2;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.nav-button-icon {
|
||||
width: 90rpx;
|
||||
height: 90rpx;
|
||||
margin-right: 20rpx;
|
||||
// border-radius: 20rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.nav-button-content {
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.nav-button-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.nav-button-desc {
|
||||
font-size: 24rpx;
|
||||
opacity: 0.85;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user