Merge branch 'master' of http://192.168.30.2:3000/bonus/bonus-material-app
This commit is contained in:
commit
453e655c89
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name" : "material-app",
|
"name" : "material-app",
|
||||||
"appid" : "__UNI__AD10BE7",
|
"appid" : "__UNI__2AF69B2",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.1",
|
"versionName" : "1.0.1",
|
||||||
"versionCode" : 101,
|
"versionCode" : 101,
|
||||||
|
|
|
||||||
|
|
@ -106,20 +106,15 @@ const maxNum = computed(() => {
|
||||||
const scanStart = () => {
|
const scanStart = () => {
|
||||||
console.log('编码识别--')
|
console.log('编码识别--')
|
||||||
// 只允许通过相机扫码
|
// 只允许通过相机扫码
|
||||||
// uni.scanCode({
|
uni.scanCode({
|
||||||
// onlyFromCamera: true,
|
onlyFromCamera: true,
|
||||||
// scanType: ['qrCode', 'pdf417'],
|
scanType: ['qrCode', 'pdf417'],
|
||||||
// success: (res) => {
|
success: (res) => {
|
||||||
// console.log('扫码结果:' + res.result)
|
console.log('扫码结果:' + res.result)
|
||||||
// queryCodeParams.value.maCode = res.result
|
queryCodeParams.value.maCode = res.result.split("qrcode=")[1]
|
||||||
// },
|
},
|
||||||
// fail: (err) => {
|
fail: (err) => {},
|
||||||
// // uni.showToast({
|
})
|
||||||
// // title: '取消',
|
|
||||||
// // icon: 'none'
|
|
||||||
// // });
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
|
|
||||||
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
|
||||||
mpaasScanModule.mpaasScan({
|
mpaasScanModule.mpaasScan({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- 编码出库-->
|
<!-- 编码出库-->
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="table-list-item">
|
<!-- 表单信息区域 -->
|
||||||
|
<view class="form-section">
|
||||||
|
<view class="section-header" @tap="toggleForm">
|
||||||
|
<text class="title">表单信息</text>
|
||||||
|
<text class="toggle-icon" :class="{ 'is-expanded': isExpanded }">›</text>
|
||||||
|
</view>
|
||||||
|
<view class="form-content" :class="{ 'is-expanded': isExpanded }">
|
||||||
<uni-forms :model="formData" label-width="100" :border="true">
|
<uni-forms :model="formData" label-width="100" :border="true">
|
||||||
<uni-forms-item label="领料单位:" name="leaseUnit">
|
<uni-forms-item label="领料单位:" name="leaseUnit">
|
||||||
<span class="form-view">{{ queryParams.leaseUnit }}</span>
|
<span class="form-view">{{ queryParams.leaseUnit }}</span>
|
||||||
|
|
@ -20,6 +26,7 @@
|
||||||
</uni-forms-item>
|
</uni-forms-item>
|
||||||
</uni-forms>
|
</uni-forms>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="table-list-item">
|
<view class="table-list-item">
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
|
|
@ -137,6 +144,14 @@ const queryCodeParams = ref({
|
||||||
maCode: '',
|
maCode: '',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 控制表单展开收起
|
||||||
|
const isExpanded = ref(true)
|
||||||
|
|
||||||
|
// 切换表单展开状态
|
||||||
|
const toggleForm = () => {
|
||||||
|
isExpanded.value = !isExpanded.value
|
||||||
|
}
|
||||||
|
|
||||||
// 标准箱识别
|
// 标准箱识别
|
||||||
const boxScan = async () => {
|
const boxScan = async () => {
|
||||||
boxCode.value=""
|
boxCode.value=""
|
||||||
|
|
@ -181,7 +196,7 @@ const boxScan = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标准箱出库确认
|
// 标准箱出库<EFBFBD><EFBFBD>认
|
||||||
const boxOutBound = async () => {
|
const boxOutBound = async () => {
|
||||||
// 解构所需要的数据
|
// 解构所需要的数据
|
||||||
const { typeId, parentId } = queryParams.value
|
const { typeId, parentId } = queryParams.value
|
||||||
|
|
@ -193,7 +208,9 @@ const boxOutBound = async () => {
|
||||||
boxId: e.boxId,
|
boxId: e.boxId,
|
||||||
maId: e.maId,
|
maId: e.maId,
|
||||||
maCode: e.maCode,
|
maCode: e.maCode,
|
||||||
manageType: 3,
|
manageType: 0,
|
||||||
|
// 出库方式 0数量,1编码,2二维码,3标准箱
|
||||||
|
outType: 3,
|
||||||
outNum: 1,
|
outNum: 1,
|
||||||
parentId,
|
parentId,
|
||||||
typeId,
|
typeId,
|
||||||
|
|
@ -219,14 +236,15 @@ const boxOutBound = async () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const maxNum = ref(0)
|
||||||
// 计算出库最大数量
|
// 计算出库最大数量
|
||||||
const maxNum = computed(() => {
|
// const maxNum = computed(() => {
|
||||||
// 1. 先通过预领数量和已领数量计算剩余待出库数量
|
// // 1. 先通过预领数量和已领数量计算剩余待出库数量
|
||||||
const waitNum = queryParams.value.preNum - queryParams.value.alNum - codeNum.value
|
// const waitNum = queryParams.value.preNum - queryParams.value.alNum
|
||||||
|
|
||||||
// 2. 判断库存数量是否大于待出库数量 如大于则取待出库数量 如小于则取库存书看了
|
// // 2. 判断库存数量是否大于待出库数量 如大于则取待出库数量 如小于则取库存书看了
|
||||||
return total.value > waitNum ? waitNum : total.value
|
// return total.value > waitNum ? waitNum : total.value
|
||||||
})
|
// })
|
||||||
|
|
||||||
// 获取编码列表
|
// 获取编码列表
|
||||||
const getCodeDeviceListData = async () => {
|
const getCodeDeviceListData = async () => {
|
||||||
|
|
@ -277,7 +295,7 @@ const onScrollTolower = debounce(() => {
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
// 判断数据是否加载完毕
|
// 判断数<EFBFBD><EFBFBD>是否加载完毕
|
||||||
const finish = computed(() => {
|
const finish = computed(() => {
|
||||||
if (total.value === codeDeviceList.value.length) return true
|
if (total.value === codeDeviceList.value.length) return true
|
||||||
})
|
})
|
||||||
|
|
@ -355,9 +373,11 @@ onLoad((options) => {
|
||||||
uni.$on('onUpdate', (num) => {
|
uni.$on('onUpdate', (num) => {
|
||||||
console.log('监听事件', num)
|
console.log('监听事件', num)
|
||||||
codeNum.value = num
|
codeNum.value = num
|
||||||
|
|
||||||
})
|
})
|
||||||
queryParams.value = JSON.parse(options.queryParams)
|
queryParams.value = JSON.parse(options.queryParams)
|
||||||
queryCodeParams.typeId = queryParams.value.typeId
|
maxNum.value = queryParams.value.preNum - queryParams.value.alNum
|
||||||
|
queryCodeParams.value.typeId = queryParams.value.typeId
|
||||||
getCodeDeviceListData()
|
getCodeDeviceListData()
|
||||||
})
|
})
|
||||||
// 页面销毁时移除事件监听
|
// 页面销毁时移除事件监听
|
||||||
|
|
@ -544,4 +564,77 @@ onUnmounted(() => {
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
letter-spacing: 1rpx;
|
letter-spacing: 1rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-section {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||||
|
|
||||||
|
// 头部样式
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 24rpx 32rpx;
|
||||||
|
background: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background: #f7f8fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #262626;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toggle-icon {
|
||||||
|
font-size: 40rpx;
|
||||||
|
color: #8c8c8c;
|
||||||
|
transform: rotate(90deg);
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
display: inline-block;
|
||||||
|
|
||||||
|
&.is-expanded {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表单内容区域
|
||||||
|
.form-content {
|
||||||
|
max-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.3s ease-out;
|
||||||
|
|
||||||
|
&.is-expanded {
|
||||||
|
max-height: 1000rpx; // 根据实际内容调整
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.uni-forms) {
|
||||||
|
padding: 0 32rpx 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.uni-forms-item) {
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-forms-item__label {
|
||||||
|
color: #8c8c8c;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-view {
|
||||||
|
color: #262626;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -312,147 +312,78 @@ const onClick = (e, item) => {
|
||||||
|
|
||||||
// 列表项样式
|
// 列表项样式
|
||||||
.table-list-item {
|
.table-list-item {
|
||||||
margin: 24rpx 0;
|
|
||||||
padding: 0;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 20rpx;
|
|
||||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
// 滑动操作区域样式
|
|
||||||
.swipe-action {
|
|
||||||
:deep(.uni-swipe) {
|
|
||||||
width: 100% !important;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.uni-swipe_content) {
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
padding: 32rpx;
|
padding: 24rpx;
|
||||||
overflow: hidden;
|
margin-bottom: 24rpx;
|
||||||
}
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||||
|
transition: all 0.3s ease;
|
||||||
:deep(.uni-swipe_right) {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 滑动按钮样式
|
|
||||||
:deep(.uni-swipe_button-group) {
|
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: stretch;
|
|
||||||
|
|
||||||
.uni-swipe_button {
|
|
||||||
padding: 0 50rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
height: auto;
|
|
||||||
margin: 0;
|
|
||||||
min-width: 120rpx;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.3s;
|
|
||||||
|
|
||||||
&:nth-child(1) {
|
|
||||||
background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%);
|
|
||||||
box-shadow: 0 4rpx 16rpx rgba(55, 132, 251, 0.2);
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-child(2) {
|
|
||||||
background: linear-gradient(135deg, #ff4d4f 0%, #ed6042 100%);
|
|
||||||
box-shadow: 0 4rpx 16rpx rgba(237, 96, 66, 0.2);
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
|
transform: scale(0.99);
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
transform: scale(0.98);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
transform: scale(0.985);
|
|
||||||
background-color: #fafbfc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 标题栏
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
span {
|
.main-title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #3784fb;
|
color: #262626;
|
||||||
background: linear-gradient(90deg, #3784fb, #4b8eff);
|
}
|
||||||
-webkit-background-clip: text;
|
|
||||||
-webkit-text-fill-color: transparent;
|
// 状态标签
|
||||||
|
.status-tag {
|
||||||
|
:deep(.uni-tag) {
|
||||||
|
padding: 8rpx 24rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
&[type="warning"] {
|
||||||
|
color: #fa8c16;
|
||||||
|
background: rgba(250, 140, 22, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&[type="success"] {
|
||||||
|
color: #52c41a;
|
||||||
|
background: rgba(82, 196, 26, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 分隔线
|
||||||
.line {
|
.line {
|
||||||
margin: 24rpx 0;
|
|
||||||
height: 2rpx;
|
height: 2rpx;
|
||||||
background: linear-gradient(90deg,
|
background: linear-gradient(90deg,
|
||||||
rgba(232, 232, 232, 0) 0%,
|
rgba(232, 232, 232, 0) 0%,
|
||||||
rgba(232, 232, 232, 1) 50%,
|
rgba(232, 232, 232, 1) 50%,
|
||||||
rgba(232, 232, 232, 0) 100%
|
rgba(232, 232, 232, 0) 100%
|
||||||
);
|
);
|
||||||
|
margin: 24rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.uni-row) {
|
// 内容行
|
||||||
|
.uni-row {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-col-8 {
|
|
||||||
color: #8c8c8c;
|
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 500;
|
|
||||||
|
.uni-col-6 {
|
||||||
|
color: #8c8c8c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cont {
|
.cont {
|
||||||
color: #262626;
|
color: #262626;
|
||||||
font-size: 28rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 1.8;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标签样式
|
|
||||||
:deep(.uni-tag) {
|
|
||||||
padding: 6rpx 20rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
font-size: 26rpx;
|
|
||||||
font-weight: 600;
|
|
||||||
margin: 0;
|
|
||||||
|
|
||||||
&[type="warning"] {
|
|
||||||
color: #fa8c16;
|
|
||||||
background-color: rgba(250, 140, 22, 0.1);
|
|
||||||
border: 2rpx solid rgba(250, 140, 22, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
&[type="success"] {
|
|
||||||
color: #52c41a;
|
|
||||||
background-color: rgba(82, 196, 26, 0.1);
|
|
||||||
border: 2rpx solid rgba(82, 196, 26, 0.2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -464,4 +395,47 @@ const onClick = (e, item) => {
|
||||||
padding: 32rpx 0;
|
padding: 32rpx 0;
|
||||||
letter-spacing: 1rpx;
|
letter-spacing: 1rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 优化滑动区域样式
|
||||||
|
:deep(.uni-swipe_action) {
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.uni-swipe_content {
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-swipe_button-group {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.uni-swipe_button {
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
writing-mode: vertical-rl;
|
||||||
|
|
||||||
|
// 查看按钮
|
||||||
|
&:nth-child(1) {
|
||||||
|
background: linear-gradient(to bottom, #3ad980, #34C759) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 出库按钮
|
||||||
|
&:nth-child(2) {
|
||||||
|
background: linear-gradient(to bottom, #3b95ff, #007AFF) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<view class="complete-btn">
|
<view class="complete-btn">
|
||||||
<view class="btn" @click="changeTab(1)">
|
<view class="btn" @click="changeTab(1)">
|
||||||
<span>已完成</span>
|
<span>未完成</span>
|
||||||
<div v-if="active == 1" class="bt-line"></div>
|
<div v-if="active == 1" class="bt-line"></div>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" style="margin-left: 80rpx" @click="changeTab(2)">
|
<view class="btn" style="margin-left: 80rpx" @click="changeTab(2)">
|
||||||
<span>未完成</span>
|
<span>已完成</span>
|
||||||
<div v-if="active == 2" class="bt-line"></div>
|
<div v-if="active == 2" class="bt-line"></div>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -126,7 +126,7 @@ const queryParams = ref({
|
||||||
startTime: '', // 开始时间
|
startTime: '', // 开始时间
|
||||||
endTime: '', // 结束时间
|
endTime: '', // 结束时间
|
||||||
keyWord: '', // 关键字
|
keyWord: '', // 关键字
|
||||||
statusList: [4], // 状态
|
statusList: [3], // 状态
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 3,
|
pageSize: 3,
|
||||||
})
|
})
|
||||||
|
|
@ -140,7 +140,7 @@ const onChangeDate = (val) => {
|
||||||
|
|
||||||
// 获取列表数据
|
// 获取列表数据
|
||||||
const getTableList = async (isTap = false) => {
|
const getTableList = async (isTap = false) => {
|
||||||
// console.log('queryParams.value查询参数', queryParams.value)
|
console.log('queryParams.value查询参数', queryParams.value)
|
||||||
const res = await getPickingOutboundListAPI(queryParams.value)
|
const res = await getPickingOutboundListAPI(queryParams.value)
|
||||||
console.log('res列表数据', res)
|
console.log('res列表数据', res)
|
||||||
total.value = res.total
|
total.value = res.total
|
||||||
|
|
@ -178,11 +178,12 @@ const onScrollTolower = debounce(() => {
|
||||||
// tap 栏切换
|
// tap 栏切换
|
||||||
const changeTab = (index) => {
|
const changeTab = (index) => {
|
||||||
active.value = index
|
active.value = index
|
||||||
if (index == 1) {
|
console.log('index', index)
|
||||||
|
if (index == 2) {
|
||||||
queryParams.value.statusList = [4] // 查已完成的
|
queryParams.value.statusList = [4] // 查已完成的
|
||||||
queryParams.value.pageNum = 1
|
queryParams.value.pageNum = 1
|
||||||
getTableList(true)
|
getTableList(true)
|
||||||
} else if (index == 2) {
|
} else if (index == 1) {
|
||||||
queryParams.value.statusList = [3] // 查未完成的
|
queryParams.value.statusList = [3] // 查未完成的
|
||||||
queryParams.value.pageNum = 1
|
queryParams.value.pageNum = 1
|
||||||
getTableList(true)
|
getTableList(true)
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,11 @@
|
||||||
<scroll-view scroll-y class="scroll-container">
|
<scroll-view scroll-y class="scroll-container">
|
||||||
<view v-for="(item, index) in detailsList"
|
<view v-for="(item, index) in detailsList"
|
||||||
:key="index" class="table-list-item"
|
:key="index" class="table-list-item"
|
||||||
@tap="onRepairItem(item)"
|
>
|
||||||
|
<uni-swipe-action>
|
||||||
|
<uni-swipe-action-item
|
||||||
|
:right-options="options"
|
||||||
|
@click="onClick($event, item)"
|
||||||
>
|
>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span style="font-size: 15px; font-weight: 800">修试入库</span>
|
<span style="font-size: 15px; font-weight: 800">修试入库</span>
|
||||||
|
|
@ -74,7 +78,7 @@
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row :gutter="24">
|
<uni-row :gutter="24">
|
||||||
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
<uni-col :span="2" style="color: transparent">{{ index + 1 }}</uni-col>
|
||||||
<uni-col :span="6">到货数量:</uni-col>
|
<uni-col :span="6">维修数量:</uni-col>
|
||||||
<uni-col :span="16">
|
<uni-col :span="16">
|
||||||
<view class="cont">{{ item.repairNum }}</view>
|
<view class="cont">{{ item.repairNum }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
|
|
@ -118,6 +122,8 @@
|
||||||
<view class="cont">{{ item.status }}</view>
|
<view class="cont">{{ item.status }}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
|
</uni-swipe-action-item>
|
||||||
|
</uni-swipe-action>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -131,6 +137,33 @@ const detailsList = ref([])
|
||||||
// const query = defineProps() // 获取上级页面传递的路由参数
|
// const query = defineProps() // 获取上级页面传递的路由参数
|
||||||
const taskId = ref('')
|
const taskId = ref('')
|
||||||
|
|
||||||
|
// 左滑按钮配置
|
||||||
|
const options = ref([
|
||||||
|
{
|
||||||
|
text: '查看',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#34C759'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '入库',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#007AFF'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
// 左滑按钮点击事件
|
||||||
|
const onClick = (e, item) => {
|
||||||
|
if (e.index === 0) {
|
||||||
|
// 查看操作
|
||||||
|
handleView(item)
|
||||||
|
} else {
|
||||||
|
// 入库操作
|
||||||
|
handleInbound(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 获取列表详情
|
// 获取列表详情
|
||||||
const getDetailsData = async () => {
|
const getDetailsData = async () => {
|
||||||
const res = await getRepairedDetailList(taskId.value)
|
const res = await getRepairedDetailList(taskId.value)
|
||||||
|
|
@ -155,18 +188,18 @@ const onChangeChecked = (val) => {
|
||||||
val.isChecked = !val.isChecked
|
val.isChecked = !val.isChecked
|
||||||
}
|
}
|
||||||
|
|
||||||
// 计算全选按钮是否选中
|
// 计算全选按钮是中
|
||||||
const allChecked = computed(() => {
|
const allChecked = computed(() => {
|
||||||
return detailsList.value.every((e) => e.isChecked == true)
|
return detailsList.value.every((e) => e.isChecked == true)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 点击合格按钮
|
// 点击<EFBFBD><EFBFBD><EFBFBD>格按钮
|
||||||
const onQualified = async () => {
|
const onQualified = async () => {
|
||||||
const isSelect = detailsList.value.some((e) => e.isChecked == true)
|
const isSelect = detailsList.value.some((e) => e.isChecked == true)
|
||||||
|
|
||||||
if (!isSelect) {
|
if (!isSelect) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请勾选需要需要合格的<EFBFBD><EFBFBD>据!',
|
title: '请勾选需要需要合格的据!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
@ -219,7 +252,7 @@ onLoad((options) => {
|
||||||
getDetailsData()
|
getDetailsData()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// <EFBFBD><EFBFBD>面销毁时移除事件监听
|
// 面销毁时移除事件监听
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
uni.$off('onUpdate') // 移除事件监听
|
uni.$off('onUpdate') // 移除事件监听
|
||||||
})
|
})
|
||||||
|
|
@ -416,4 +449,45 @@ onUnmounted(() => {
|
||||||
color: #8c8c8c;
|
color: #8c8c8c;
|
||||||
padding: 24rpx 0;
|
padding: 24rpx 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 优化滑动区域样式
|
||||||
|
:deep(.uni-swipe_action) {
|
||||||
|
border-radius: 20rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.uni-swipe_content {
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-swipe_button-group {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
.uni-swipe_button {
|
||||||
|
height: 100%;
|
||||||
|
padding: 0 40rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
writing-mode: vertical-rl;
|
||||||
|
|
||||||
|
&:nth-child(1) {
|
||||||
|
background: linear-gradient(to bottom, #3ad980, #34C759) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(2) {
|
||||||
|
background: linear-gradient(to bottom, #3b95ff, #007AFF) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
opacity: 0.85;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="new-purchase">
|
<view class="new-purchase">
|
||||||
<view
|
<view
|
||||||
class="purchase-item"
|
class="purchase-item"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue