From db7a85fe5243a806a29c4956dd910141a1d12b9f Mon Sep 17 00:00:00 2001 From: bb_pan Date: Fri, 20 Jun 2025 15:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 9 +- src/pages/back/backCode.vue | 68 +++++++++++++-- src/pages/back/backNum.vue | 114 ++++++++++++++++++++----- src/pages/back/detail.vue | 39 ++++++++- src/pages/back/index.vue | 64 +++++++------- src/pages/my/signature.vue | 87 ++++++++++--------- src/pages/picking/outbound/details.vue | 4 +- src/services/back.js | 2 +- 8 files changed, 279 insertions(+), 108 deletions(-) diff --git a/src/pages.json b/src/pages.json index 8d5070b..5074a96 100644 --- a/src/pages.json +++ b/src/pages.json @@ -206,7 +206,8 @@ { "path": "pages/back/detail", "style": { - "navigationBarTitleText": "退料任务详情" + // "navigationBarTitleText": "退料任务详情" + "navigationStyle": "custom" } }, { @@ -225,7 +226,8 @@ { "path": "pages/back/backCode", "style": { - "navigationBarTitleText": "退料编码" + // "navigationBarTitleText": "退料编码" + "navigationStyle": "custom" } }, { @@ -243,7 +245,8 @@ { "path": "pages/back/backNum", "style": { - "navigationBarTitleText": "退料数量" + // "navigationBarTitleText": "退料数量" + "navigationStyle": "custom" } }, { diff --git a/src/pages/back/backCode.vue b/src/pages/back/backCode.vue index 29df3d4..41db55b 100644 --- a/src/pages/back/backCode.vue +++ b/src/pages/back/backCode.vue @@ -1,7 +1,11 @@ @@ -136,7 +139,14 @@ const imgList = ref([]) // 图片列表,用于回显 const bmFileInfos = ref([]) // 上传后的图片信息 const scanQrCodeRef = ref(null) const codeList = ref([]) +const isExpanded = ref(false) +const leftClick = () => { + // 返回 + uni.navigateBack({ + delta: 1, // 返回到已存在的页面 + }) +} const changeRadio = (e) => { console.log(e.detail.value) apDetection.value = e.detail.value @@ -565,7 +575,7 @@ onLoad((options) => { } .accept { padding: 24rpx; - height: 95vh; + /* height: 95vh; */ word-break: break-all; background-color: #f7f8fa; display: flex; @@ -580,7 +590,7 @@ onLoad((options) => { margin-bottom: 24rpx; // 卡片标题 - > div:first-child { + /* > div:first-child { font-size: 32rpx; font-weight: 600; color: #262626; @@ -599,6 +609,41 @@ onLoad((options) => { background: #3784fb; border-radius: 6rpx; } + } */ + .card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 24rpx; + + .title { + font-size: 32rpx; + font-weight: 600; + color: #262626; + position: relative; + padding-left: 24rpx; + + &::before { + content: ''; + position: absolute; + left: 0; + top: 50%; + transform: translateY(-50%); + width: 6rpx; + height: 28rpx; + background: #3784fb; + border-radius: 6rpx; + } + } + + .icon { + transition: transform 0.5s ease; /* 添加动画过渡 */ + transform: rotate(0deg); + + &.is-expanded { + transform: rotate(180deg); + } + } } // 表单样式 @@ -751,4 +796,13 @@ onLoad((options) => { } } } +.top-content { + max-height: 30px; + overflow: hidden; + transition: max-height 0.5s ease-out; + + &.is-expanded { + max-height: 2000px !important; + } +} diff --git a/src/pages/back/backNum.vue b/src/pages/back/backNum.vue index 8eeab88..40a9ad0 100644 --- a/src/pages/back/backNum.vue +++ b/src/pages/back/backNum.vue @@ -1,8 +1,10 @@ @@ -131,13 +148,23 @@ import { ref, reactive } from 'vue' import { onLoad } from '@dcloudio/uni-app' import { getUseType,insertApp } from '../../services/back.js'; +import eselect from '@/components/tree-select/eselect.vue' const taskInfo = ref({}) const maTypeSelectList = ref([]) -const typeId = ref("")//类型 +const typeId = ref()//类型 const maCodeSelectList = ref([]) const typeCode = ref("")//规格型号 const typeList = ref([]) +const isExpanded = ref(false) +const treeSelect = ref() + +const leftClick = () => { + // 返回 + uni.navigateBack({ + delta: 1, // 返回到已存在的页面 + }) +} //类下拉选 const getMaType = () => { let obj = { @@ -147,8 +174,11 @@ const getMaType = () => { console.log(res) maTypeSelectList.value = res.data.map(option => { return { - value:option.typeId, - text:option.typeName, + // value:option.typeId, + // text:option.typeName, + id:option.typeId, + name:option.typeName, + parentId: 0 } }); }).catch(error => { @@ -156,19 +186,26 @@ const getMaType = () => { }) } //规格 -const getMaCode = () => { +const getMaCode = (e) => { + console.log('🚀 ~ getMaCode ~ e:', e.id) + typeId.value = e.id + console.log('🚀 ~ getMaCode ~ typeId.value:', typeId.value) let obj = { "agreementId":taskInfo.value.agreementId, "typeId":typeId.value } + console.log('🚀 ~ getMaCode ~ obj:', obj) getUseType(obj).then(res => { console.log(res) maCodeSelectList.value = res.data.map(option => { let obj = { ...option, bmFileInfos:[], - value:option.typeId, - text:option.typeName, + // value:option.typeId, + // text:option.typeName, + id:option.typeId, + name:option.typeName, + parentId: 0 } return obj }); @@ -176,13 +213,29 @@ const getMaCode = () => { console.log(error) }) } +const clearTypeId = () => { + typeId.value = '' + typeCode.value = '' + maCodeSelectList.value = [] + treeSelect.value.showLabel = '' + console.log('🚀 ~ clearTypeId ~ treeSelect.value:', treeSelect.value) +} //选择规格型号 const selectMaCode = (e) => { - console.log(e) + console.log('🚀 ~ selectMaCode ~ e:', e) + // 不可重复添加 + if(typeList.value.some(item => item.typeId == e.id)){ + // 提示 + uni.showToast({ + title: '请勿重复添加', + icon: 'none' + }); + return + } maCodeSelectList.value.forEach(item=>{ console.log(item) - if(item.typeId==e){ - typeList.value.push(item) + if(item.typeId==e.id){ + typeList.value.unshift(item) } }) console.log(typeList.value) @@ -332,7 +385,10 @@ onLoad((options)=>{ }) - diff --git a/src/pages/back/detail.vue b/src/pages/back/detail.vue index f956dae..385db0a 100644 --- a/src/pages/back/detail.vue +++ b/src/pages/back/detail.vue @@ -1,5 +1,5 @@