新购页面样式修改

This commit is contained in:
bonus 2024-12-17 19:55:21 +08:00
parent b68e9764fe
commit 8e75bec1bf
4 changed files with 785 additions and 309 deletions

View File

@ -2,13 +2,13 @@
<!-- 新购验收详情 -->
<view class="accept page-common">
<uni-row :gutter="24" class="search-form">
<uni-col :span="12">
<uni-col :span="18">
<view>
<uni-easyinput placeholder="请输入内容" />
<uni-easyinput placeholder="请输入内容" v-model="searchValue" />
</view>
</uni-col>
<uni-col :span="4">
<view class="search">查询</view>
<uni-col :span="6">
<view class="search" @click="search">查询</view>
</uni-col>
</uni-row>
<div class="table-list-item"
@ -16,14 +16,14 @@
:key="index"
@click="handleItem(item)">
<div class="title">
<span style="font-size: 15px; font-weight: 800">新购验收</span>
<span v-if="item.status == 2" style="color: #ff4d4f">未验收</span>
<span v-else-if="item.status != 2" style="color: #3784fb">已验收</span>
<!-- <span v-else-if="item.status == 12" style="color: #ff4d4f">不合格</span> -->
<span>新购验收</span>
<span :class="item.status == 2 ? 'pending' : 'completed'">
{{ item.status == 2 ? '未验收' : '已验收' }}
</span>
</div>
<div class="line"></div>
<uni-row :gutter="24">
<uni-col :span="6">物资名</uni-col>
<uni-col :span="6">物资名</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.maTypeName }}</div></uni-col>
</uni-row>
@ -107,60 +107,123 @@ onShow(()=>{
.accept {
height: 100%;
word-break: break-all;
background-color: #f7f8fa;
padding: 24rpx;
overflow-y: auto;
.complete-btn {
display: flex;
padding: 20rpx;
.btn {
display: flex;
flex-direction: column;
align-items: center;
font-size: 30rpx;
font-weight: 800;
}
.bt-line {
width: 80rpx;
height: 4rpx;
background-color: #3784fb;
}
}
.search-form {
display: flex;
align-items: center;
box-sizing: content-box;
margin: 10rpx auto;
background: #fff;
padding: 24rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
:deep(.uni-easyinput__content) {
background-color: #f7f8fa;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
height: 80rpx;
transition: all 0.3s ease;
&:focus-within {
border-color: #3784fb;
box-shadow: 0 0 0 2rpx rgba(55, 132, 251, 0.1);
}
}
}
.search {
height: 60rpx;
background-color: #3784fb;
height: 80rpx;
background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%);
text-align: center;
line-height: 60rpx;
line-height: 80rpx;
color: #fff;
border-radius: 10rpx;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 600;
box-shadow: 0 6rpx 20rpx rgba(55, 132, 251, 0.2);
transition: all 0.3s ease;
&:active {
transform: translateY(2rpx);
opacity: 0.9;
}
}
}
.table-list-item {
margin: 20rpx 0;
padding: 20rpx;
margin: 24rpx 0;
padding: 32rpx;
background-color: #fff;
min-height: 300rpx;
border-radius: 10rpx;
border-radius: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
&:active {
transform: scale(0.985);
background-color: #fafbfc;
}
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
span:first-child {
font-size: 32rpx;
font-weight: 600;
color: #3784fb;
letter-spacing: 1rpx;
}
span:last-child {
padding: 8rpx 28rpx;
border-radius: 8rpx;
font-size: 26rpx;
font-weight: 600;
&.completed {
background-color: rgba(55, 132, 251, 0.1);
color: #3784fb;
}
&.pending {
background-color: rgba(250, 140, 22, 0.1);
color: #fa8c16;
}
}
}
.line {
margin: 24rpx 0;
height: 2rpx;
background: linear-gradient(90deg,
rgba(232, 232, 232, 0) 0%,
rgba(232, 232, 232, 1) 50%,
rgba(232, 232, 232, 0) 100%
);
}
:deep(.uni-row) {
margin-bottom: 20rpx;
.uni-col-6 {
color: #8c8c8c;
font-size: 28rpx;
font-weight: 500;
}
}
.cont {
display: flex;
justify-content: flex-end;
line-height: 1.9;
}
.line {
margin: 20rpx 0;
height: 1px;
background-color: #e8e8e8;
line-height: 1.8;
color: #262626;
font-size: 28rpx;
font-weight: 500;
}
}
</style>

View File

@ -2,17 +2,17 @@
<!-- 新购验收 -->
<view class="accept page-common">
<view class="complete-btn">
<view class="btn" @click="changeTab(1)">
<span>已完成</span>
<view class="btn first-active" @click="changeTab(1)">
<span :class="{ active: active == 1 }">已完成</span>
<div v-if="active == 1" class="bt-line"></div>
</view>
<view class="btn" style="margin-left: 120rpx" @click="changeTab(2)">
<span>未完成</span>
<view class="btn second-active" style="margin-left: 120rpx" @click="changeTab(2)">
<span :class="{ active: active == 2 }">未完成</span>
<div v-if="active == 2" class="bt-line"></div>
</view>
</view>
<uni-row :gutter="24" class="search-form">
<uni-col :span="18">
<uni-col :span="24">
<view>
<uni-datetime-picker
v-model="dateArray"
@ -37,38 +37,32 @@
<scroll-view scroll-y @scrolltolower="onScrollTolower" class="scroll-container">
<div class="table-list-item" v-for="(item, index) in tableList" :key="index" @click="handleItem(item)">
<div class="title">
<span style="font-size: 15px; font-weight: 800">新购验收</span>
<span :style="{ color: active == 1 ? '#3784fb' : '#ff4d4f' }">{{active == 1 ? '已完成' : '未完成'}}</span>
<div class="title-left">
<span class="code">{{ item.code }}</span>
</div>
<span :class="['status', active == 1 ? 'completed' : 'pending']">
{{active == 1 ? '已完成' : '未完成'}}
</span>
</div>
<div class="line"></div>
<uni-row :gutter="24">
<uni-col :span="6">到货时间</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.arrivalTime }}</div></uni-col
>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">采购单号</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.code }}</div></uni-col
>
<uni-col :span="18">
<div class="cont">{{ item.arrivalTime }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">采购物资</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.purchaseMaTypeName }}</div></uni-col
>
<uni-col :span="18">
<div class="cont">{{ item.purchaseMaTypeName }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">到货数量</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.purchaseMaNumber }}</div></uni-col
>
<uni-col :span="18">
<div class="cont">{{ item.purchaseMaNumber }}</div>
</uni-col>
</uni-row>
<!-- <uni-row :gutter="24">
<uni-col :span="6">验收数量</uni-col>
<uni-col :span="18"><div class="cont"></div></uni-col>
</uni-row> -->
</div>
<div class="loading-text">
{{ finish ? '没有更多数据了~' : '正在加载...' }}
@ -94,30 +88,46 @@ const queryParams = ref({
pageNum:1,
pageSize:5,
})
//
//
const getTableList = async (isTap = false) => {
let obj = {
"statusList":statusList.value,...queryParams.value
}
const { data: res } = await getPurchaseList(obj)
console.log('res列表数据', res)
total.value = res.total
if (isTap) {
tableList.value = res.rows
} else {
if (res.rows.length == 0) {
tableList.value = []
try {
let obj = {
"statusList": statusList.value,
...queryParams.value
}
const { data: res } = await getPurchaseList(obj)
console.log('res列表数据', res)
//
total.value = res.total
//
if (isTap) {
//
tableList.value = res.rows || []
//
queryParams.value.pageNum = 1
} else {
tableList.value.push(...res.rows)
//
if (res.rows && res.rows.length > 0) {
tableList.value = [...tableList.value, ...res.rows]
}
}
} catch (error) {
console.error('获取列表数据失败:', error)
//
if (isTap) {
tableList.value = []
}
}
}
//
const onScrollTolower = debounce(() => {
console.log('触底事件')
if (total.value > tableList.value.length) {
//
if (tableList.value.length < total.value) {
queryParams.value.pageNum++
getTableList()
getTableList(false)
}
}, 500)
//
@ -127,13 +137,19 @@ const finish = computed(() => {
const changeTab = (index) => {
active.value = index
//
queryParams.value.pageNum = 1
queryParams.value.keyWord = ''
queryParams.value.startTime = ''
queryParams.value.endTime = ''
if (index == 1) {
statusList.value = ['3', '13', '4', '14', '19']
getTableList(true)
} else if (index == 2) {
statusList.value = ['2', '12']
getTableList(true)
}
//
getTableList(true)
}
// change
const onChangeDate = (val) => {
@ -156,68 +172,199 @@ onLoad((options) => {
.accept {
height: 100%;
word-break: break-all;
background-color: #f7f8fa;
padding: 24rpx;
.complete-btn {
display: flex;
padding: 20rpx;
padding: 28rpx 24rpx;
justify-content: center;
background: #fff;
border-radius: 20rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
.btn {
display: flex;
flex-direction: column;
align-items: center;
font-size: 30rpx;
font-weight: 800;
}
.bt-line {
width: 80rpx;
height: 4rpx;
background-color: #3784fb;
padding: 0 60rpx;
position: relative;
transition: all 0.3s ease;
span {
font-size: 32rpx;
color: #8c8c8c;
font-weight: 500;
&.active {
color: #3784fb;
font-weight: 600;
.second-active & {
color: #fa8c16;
}
}
}
.bt-line {
width: 32rpx;
height: 6rpx;
background: #3784fb;
margin-top: 12rpx;
border-radius: 6rpx;
transition: all 0.3s ease;
.second-active & {
background: #fa8c16;
}
}
}
}
.search-form {
display: flex;
align-items: center;
box-sizing: content-box;
margin-bottom: 10rpx;
background: #fff;
padding: 24rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
:deep(.uni-easyinput__content),
:deep(.uni-date-editor) {
background-color: #f7f8fa;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
height: 80rpx;
transition: all 0.3s ease;
&:focus-within {
border-color: #3784fb;
box-shadow: 0 0 0 2rpx rgba(55, 132, 251, 0.1);
}
}
:deep(.uni-date-editor) {
.uni-date-range {
display: flex;
align-items: center;
width: 100%;
.uni-date-range--text {
width: 50%;
text-align: center;
color: #333;
}
}
}
}
.search {
height: 60rpx;
background-color: #3784fb;
height: 80rpx;
background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%);
text-align: center;
line-height: 60rpx;
line-height: 80rpx;
color: #fff;
border-radius: 10rpx;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 600;
box-shadow: 0 6rpx 20rpx rgba(55, 132, 251, 0.2);
transition: all 0.3s ease;
&:active {
transform: translateY(2rpx);
opacity: 0.9;
}
}
}
.scroll-container {
.table-list-item {
margin: 20rpx 0;
padding: 20rpx;
background-color: #fff;
min-height: 300rpx;
border-radius: 10rpx;
.title {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 2rpx;
.table-list-item {
margin: 24rpx 0;
padding: 32rpx;
background-color: #fff;
min-height: 300rpx;
border-radius: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
&:active {
transform: scale(0.985);
background-color: #fafbfc;
}
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.title-left {
.code {
font-size: 32rpx;
font-weight: 600;
color: #3784fb;
letter-spacing: 1rpx;
}
}
.cont {
display: flex;
justify-content: flex-end;
line-height: 1.9;
}
.line {
margin: 20rpx 0;
height: 1px;
background-color: #e8e8e8;
span.status {
padding: 8rpx 28rpx;
border-radius: 8rpx;
font-size: 26rpx;
font-weight: 600;
&.completed {
background-color: rgba(82, 196, 26, 0.1);
color: #52c41a;
}
&.pending {
background-color: rgba(250, 140, 22, 0.1);
color: #fa8c16;
}
}
}
.line {
margin: 24rpx 0;
height: 2rpx;
background: linear-gradient(90deg,
rgba(232, 232, 232, 0) 0%,
rgba(232, 232, 232, 1) 50%,
rgba(232, 232, 232, 0) 100%
);
}
:deep(.uni-row) {
margin-bottom: 20rpx;
.uni-col-6 {
color: #8c8c8c;
font-size: 28rpx;
font-weight: 500;
}
}
.cont {
display: flex;
justify-content: flex-end;
line-height: 1.8;
color: #262626;
font-size: 28rpx;
font-weight: 500;
}
}
}
//
.loading-text {
text-align: center;
font-size: 28rpx;
color: #666;
padding: 20rpx 0;
font-size: 26rpx;
color: #8c8c8c;
padding: 32rpx 0;
letter-spacing: 1rpx;
}
</style>

View File

@ -2,12 +2,12 @@
<!-- 领料出库详情 -->
<view class="page-container">
<uni-row :gutter="24" class="search-form">
<uni-col :span="12">
<uni-col :span="18">
<view>
<uni-easyinput placeholder="请输入内容" />
</view>
</uni-col>
<uni-col :span="4">
<uni-col :span="6">
<view class="search">查询</view>
</uni-col>
</uni-row>
@ -16,83 +16,68 @@
<view v-for="(item, index) in detailsList" :key="index" class="table-list-item">
<uni-swipe-action>
<uni-swipe-action-item @click="onClick($event, item)" :right-options="options">
<div class="title">
<span style="font-size: 15px; font-weight: 800">新购绑定</span>
<span v-if="item.status == 2" style="color: #3784fb">已完成</span>
<span v-if="item.status == 3" style="color: #ff4d4f">未完成</span>
<div class="content-wrapper">
<div class="title">
<span>新购绑定</span>
<span :class="['status', item.status == 2 ? 'completed' : 'pending']">
{{ item.status == 2 ? '已完成' : '未完成' }}
</span>
</div>
<view class="line"></view>
<uni-row :gutter="24">
<!-- <uni-col :span="2">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">物资名称</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.maTypeName }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">规格型号</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.typeName }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">采购数量</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.purchaseNum }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">已绑数量</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.bindNum }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">待绑数量</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.checkNum - item.bindNum }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">管理模式</uni-col>
<uni-col :span="16">
<uni-tag
text="编码"
type="warning"
v-if="item.manageType === 0"
size="small"
/>
<uni-tag
text="数量"
type="success"
v-if="item.manageType === 1"
size="small"
/>
</uni-col>
</uni-row>
</div>
<view class="line"></view>
<uni-row :gutter="24">
<!-- <uni-col :span="2">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">物资名称</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.maTypeName }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">规格型号</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.typeName }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">物资数量</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.purchaseNum }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">已绑数量</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.bindNum }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">待绑数量</uni-col>
<uni-col :span="16">
<view class="cont">{{ item.checkNum - item.bindNum }}</view>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">管理模式</uni-col>
<uni-col :span="16">
<uni-tag
text="编码"
type="warning"
v-if="item.manageType === 0"
size="small"
/>
<uni-tag
text="数量"
type="success"
v-if="item.manageType === 1"
size="small"
/>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<!-- <uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col> -->
<uni-col :span="6">状态</uni-col>
<uni-col :span="16">
<uni-tag
text="未完成"
type="warning"
size="small"
v-if="item.status == 3"
/>
<uni-tag
text="已完成"
type="success"
size="small"
v-if="item.status == 2"
/>
</uni-col>
</uni-row>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
@ -118,25 +103,28 @@ const options = ref([
style: {
backgroundColor: '#84c649',
color: '#fff',
fontSize: '30rpx',
},
fontSize: '28rpx',
fontWeight: '600'
}
},
{
text: '二维码绑定',
style: {
backgroundColor: '#65a1ff',
color: '#fff',
fontSize: '30rpx',
},
fontSize: '28rpx',
fontWeight: '600'
}
},
{
text: '驳回',
style: {
backgroundColor: '#ed6042',
color: '#fff',
fontSize: '30rpx',
},
},
fontSize: '28rpx',
fontWeight: '600'
}
}
])
//
@ -167,37 +155,80 @@ const getOutboundDetailsData = async () => {
}
//
const onClick = (e, item) => {
const { maTypeName, typeName, purchaseNum, bindNum, checkNum, typeId } = item
leaseApplyInfo.value.maTypeName = maTypeName
leaseApplyInfo.value.typeName = typeName
leaseApplyInfo.value.purchaseNum = purchaseNum
leaseApplyInfo.value.bindNum = bindNum
leaseApplyInfo.value.checkNum = checkNum
leaseApplyInfo.value.typeId = typeId
const { index } = e
// leaseApplyInfo
leaseApplyInfo.value = {
...leaseApplyInfo.value,
maTypeName,
typeName,
purchaseNum,
bindNum,
checkNum,
typeId
}
// 1.
if (index === 0) {
if (item.status === 2) {
uni.showToast({
title: '该物资已完成绑定',
icon: 'none'
})
return
}
uni.navigateTo({
url: `/pages/new-purchase/bind/coding-bind?queryParams=${JSON.stringify(
leaseApplyInfo.value,
)}`,
url: `/pages/new-purchase/bind/coding-bind?queryParams=${JSON.stringify(leaseApplyInfo.value)}`
})
}
// 2.
if (index === 1) {
if (item.status === 2) {
uni.showToast({
title: '该物资已完成绑定',
icon: 'none'
})
return
}
uni.navigateTo({
url: `/pages/new-purchase/bind/coding-scan?queryParams=${JSON.stringify(
leaseApplyInfo.value,
)}`,
url: `/pages/new-purchase/bind/coding-scan?queryParams=${JSON.stringify(leaseApplyInfo.value)}`
})
}
// 3.
if (index === 2) {
uni.showModal({
title: '提示',
content: '确定要驳回该物资吗?',
success: (res) => {
if (res.confirm) {
handleReject(item)
}
}
})
}
}
//
const handleReject = async (item) => {
try {
// API
// const res = await rejectBindAPI({ id: item.id })
uni.showToast({
title: '驳回成功',
icon: 'success'
})
//
getOutboundDetailsData()
} catch (error) {
uni.showToast({
title: '驳回失败',
icon: 'error'
})
console.error('驳回失败:', error)
}
}
@ -211,58 +242,200 @@ onShow(() => {
.page-container {
display: flex;
height: 100%;
padding: 0 15rpx;
flex-direction: column;
background-color: #e8f5fb;
background-color: #f7f8fa;
padding: 24rpx;
.search-form {
margin: 10rpx 0;
display: flex;
align-items: center;
box-sizing: content-box;
}
background: #fff;
padding: 24rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
.search {
height: 60rpx;
background-color: #3784fb;
text-align: center;
line-height: 60rpx;
color: #fff;
border-radius: 10rpx;
:deep(.uni-easyinput__content) {
width: 100%;
background-color: #f7f8fa;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
height: 80rpx;
transition: all 0.3s ease;
&:focus-within {
border-color: #3784fb;
box-shadow: 0 0 0 2rpx rgba(55, 132, 251, 0.1);
}
}
.search {
width: 100%;
height: 80rpx;
background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%);
text-align: center;
line-height: 80rpx;
color: #fff;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 600;
box-shadow: 0 6rpx 20rpx rgba(55, 132, 251, 0.2);
transition: all 0.3s ease;
&:active {
transform: translateY(2rpx);
opacity: 0.9;
}
}
}
.scroll-container {
padding: 0;
.table-list-item {
margin-bottom: 20rpx;
padding: 20rpx;
margin: 24rpx 0;
background-color: #fff;
min-height: 300rpx;
border-radius: 10rpx;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
border-radius: 20rpx;
overflow: hidden;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
.content-wrapper {
padding: 32rpx;
}
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
span:first-child {
font-size: 32rpx;
font-weight: 600;
color: #3784fb;
letter-spacing: 1rpx;
}
span.status {
padding: 8rpx 28rpx;
border-radius: 8rpx;
font-size: 26rpx;
font-weight: 600;
&.completed {
background-color: rgba(82, 196, 26, 0.1);
color: #52c41a;
}
&.pending {
background-color: rgba(250, 140, 22, 0.1);
color: #fa8c16;
}
}
}
.line {
margin: 20rpx 0;
height: 1px;
background-color: #e8e8e8;
margin: 24rpx 0;
height: 2rpx;
background: linear-gradient(90deg,
rgba(232, 232, 232, 0) 0%,
rgba(232, 232, 232, 1) 50%,
rgba(232, 232, 232, 0) 100%
);
}
:deep(.uni-row) {
margin-bottom: 20rpx;
.uni-col-6 {
color: #8c8c8c;
font-size: 28rpx;
font-weight: 500;
}
.uni-col-16 {
.cont {
display: flex;
justify-content: flex-end;
line-height: 1.8;
color: #262626;
font-size: 28rpx;
font-weight: 500;
}
:deep(.uni-tag) {
padding: 8rpx 28rpx;
border-radius: 8rpx;
font-size: 26rpx;
font-weight: 600;
border: none;
&[type="warning"] {
background-color: rgba(250, 140, 22, 0.1);
color: #fa8c16;
}
&[type="success"] {
background-color: rgba(82, 196, 26, 0.1);
color: #52c41a;
}
}
}
}
}
}
}
//
:deep(.uni-swipe_action) {
border-radius: 20rpx;
overflow: hidden;
margin: 0;
.uni-swipe_content {
margin: 0 !important;
border-radius: 20rpx;
}
}
//
:deep(.uni-swipe_button) {
writing-mode: vertical-rl;
padding: 0 32rpx;
font-size: 28rpx !important;
font-weight: 600;
transition: all 0.3s ease;
border-radius: 0;
margin: 0;
//
&:nth-child(1) {
background: linear-gradient(to bottom, #95d475, #52c41a) !important;
}
//
&:nth-child(2) {
background: linear-gradient(to bottom, #69aeff, #3784fb) !important;
}
//
&:nth-child(3) {
background: linear-gradient(to bottom, #ff7875, #ff4d4f) !important;
}
&:active {
opacity: 0.85;
transform: translateX(-2rpx);
}
}
//
.loading-text {
text-align: center;
font-size: 28rpx;
color: #666;
padding: 20rpx 0;
}
::v-deep .uni-swipe_button {
writing-mode: vertical-rl;
padding: 0 18rpx;
font-size: 26rpx;
color: #8c8c8c;
padding: 32rpx 0;
letter-spacing: 1rpx;
}
</style>

View File

@ -12,7 +12,7 @@
</view>
</view> -->
<uni-row :gutter="24" class="search-form" style="margin-top: 10rpx">
<uni-col :span="18">
<uni-col :span="24">
<view>
<uni-datetime-picker
v-model="dateArray"
@ -42,18 +42,19 @@
@click="handleItem(item)"
v-for="(item, index) in tableList"
>
<div class="title">
<span class="code">{{ item.code }}</span>
<div class="cont">
<uni-tag text="未完成" type="warning" v-if="item.taskStatus === 21" />
<uni-tag text="已完成" type="success" v-if="item.taskStatus === 22" />
</div>
</div>
<div class="line"></div>
<uni-row :gutter="24">
<uni-col :span="6">到货时间</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.createTime }}</div></uni-col
>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">采购单号</uni-col>
<uni-col :span="18"
><div class="cont">{{ item.code }}</div></uni-col
>
<uni-col :span="18">
<div class="cont">{{ item.createTime }}</div>
</uni-col>
</uni-row>
<uni-row :gutter="24">
<uni-col :span="6">采购物资</uni-col>
@ -67,21 +68,6 @@
<div class="cont">{{ item.purchaseMaNumber }}</div>
</uni-col>
</uni-row>
<!-- <uni-row :gutter="24">
<uni-col :span="6">绑定数量</uni-col>
<uni-col :span="18">
<div class="cont">{{ item.leaseProject }}</div>
</uni-col>
</uni-row> -->
<uni-row :gutter="24">
<uni-col :span="6">状态</uni-col>
<uni-col :span="18">
<div class="cont">
<uni-tag text="未完成" type="warning" v-if="item.taskStatus === 21" />
<uni-tag text="已完成" type="success" v-if="item.taskStatus === 22" />
</div>
</uni-col>
</uni-row>
</view>
<view class="loading-text">
{{ finish ? '没有更多数据了~' : '正在加载...' }}
@ -183,72 +169,179 @@ const maskClick = () => {}
.page-container {
display: flex;
height: 100%;
padding: 0 15rpx;
flex-direction: column;
.complete-btn {
display: flex;
padding: 20rpx;
.btn {
display: flex;
flex-direction: column;
align-items: center;
font-size: 30rpx;
font-weight: 800;
}
.bt-line {
width: 80rpx;
height: 4rpx;
background-color: #3784fb;
}
}
background-color: #f7f8fa;
padding: 24rpx;
.search-form {
display: flex;
align-items: center;
box-sizing: content-box;
margin-bottom: 10rpx;
background: #fff;
padding: 24rpx;
border-radius: 20rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
:deep(.uni-easyinput__content),
:deep(.uni-date-editor) {
background-color: #f7f8fa;
border: 2rpx solid #e8e8e8;
border-radius: 12rpx;
height: 80rpx;
transition: all 0.3s ease;
&:focus-within {
border-color: #3784fb;
box-shadow: 0 0 0 2rpx rgba(55, 132, 251, 0.1);
}
}
:deep(.uni-date-editor) {
width: 100%;
.uni-date {
width: 100%;
}
.uni-date-x {
width: 100%;
}
.uni-date-range {
display: flex;
align-items: center;
width: 100%;
.uni-date-range--text {
width: 50%;
text-align: center;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.uni-date-range--delimeter {
padding: 0 10rpx;
}
}
.uni-date-x--border {
width: 100%;
}
}
}
.search {
height: 60rpx;
background-color: #3784fb;
height: 80rpx;
background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%);
text-align: center;
line-height: 60rpx;
line-height: 80rpx;
color: #fff;
border-radius: 10rpx;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 600;
box-shadow: 0 6rpx 20rpx rgba(55, 132, 251, 0.2);
transition: all 0.3s ease;
&:active {
transform: translateY(2rpx);
opacity: 0.9;
}
}
.scroll-container {
padding: 0 2rpx;
.table-list-item {
margin: 20rpx 0;
padding: 20rpx;
margin: 24rpx 0;
padding: 32rpx;
background-color: #fff;
min-height: 300rpx;
border-radius: 10rpx;
border-radius: 20rpx;
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
&:active {
transform: scale(0.985);
background-color: #fafbfc;
}
.title {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20rpx;
.code {
font-size: 32rpx;
font-weight: 600;
color: #3784fb;
letter-spacing: 1rpx;
}
.cont {
display: flex;
justify-content: flex-end;
:deep(.uni-tag) {
padding: 8rpx 28rpx;
border-radius: 8rpx;
font-size: 26rpx;
font-weight: 600;
border: none;
&[type="warning"] {
background-color: rgba(250, 140, 22, 0.1);
color: #fa8c16;
}
&[type="success"] {
background-color: rgba(82, 196, 26, 0.1);
color: #52c41a;
}
}
}
}
.line {
margin: 24rpx 0;
height: 2rpx;
background: linear-gradient(90deg,
rgba(232, 232, 232, 0) 0%,
rgba(232, 232, 232, 1) 50%,
rgba(232, 232, 232, 0) 100%
);
}
:deep(.uni-row) {
margin-bottom: 20rpx;
.uni-col-6 {
color: #8c8c8c;
font-size: 28rpx;
font-weight: 500;
}
}
.cont {
display: flex;
justify-content: flex-end;
line-height: 1.9;
}
.line {
margin: 20rpx 0;
height: 1px;
background-color: #e8e8e8;
line-height: 1.8;
color: #262626;
font-size: 28rpx;
font-weight: 500;
}
}
}
}
//
.loading-text {
text-align: center;
font-size: 28rpx;
color: #666;
padding: 20rpx 0;
font-size: 26rpx;
color: #8c8c8c;
padding: 32rpx 0;
letter-spacing: 1rpx;
}
</style>