diff --git a/manifest.json b/manifest.json index d31377f..9249897 100644 --- a/manifest.json +++ b/manifest.json @@ -49,7 +49,8 @@ "", "" ], - "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] + "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], + "minSdkVersion" : 22 }, /* ios打包配置 */ "ios" : { diff --git a/pages/NursingNew/component/equipment.vue b/pages/NursingNew/component/equipment.vue index 5bfaaef..915b2a6 100644 --- a/pages/NursingNew/component/equipment.vue +++ b/pages/NursingNew/component/equipment.vue @@ -918,7 +918,6 @@ openchaobiao.value = true emit("canback", true) } else { - getrulevalue() emit("canback", true) } @@ -1029,13 +1028,15 @@ const getrulevalue = () => { rizhivalue.value.pageNo = 1; relrule.value = [] - ruletarget.value = 0 + ruletarget.value = 0; + ruletype.value = 0; if (typeNow.value == 1) { rizhivalue.value.cid = indexmessage.value.cid; rizhivalue.value.type = dianrizhi.value[0].type; electricityMeterListArray(rizhivalue.value).then((element : any) => { if (element.code == 200) { relrule.value = element.result.records; + // console.log("????",relrule.value) openrizhi.value = true } }) @@ -1046,6 +1047,7 @@ electricityMeterListArray(rizhivalue.value).then((element : any) => { if (element.code == 200) { relrule.value = element.result.records; + // console.log("????111",relrule.value) openrizhi.value = true } }) @@ -1245,7 +1247,8 @@ } const chaobiao = () => { - closeall() + closeall(); + if (typeNow.value == 1) { electricityMeteleRead(indexmessage.value.cid, indexmessage.value.address).then((res : any) => { uni.showToast({ diff --git a/pages/NursingNew/component/nurse/api.js b/pages/NursingNew/component/nurse/api.js index 3b3fd45..8764106 100644 --- a/pages/NursingNew/component/nurse/api.js +++ b/pages/NursingNew/component/nurse/api.js @@ -32,3 +32,68 @@ export const getNcPackagelist = (nuId,customerId) => { method: 'get', }) } + + + + +// 新增服务指令 +export const addDirective = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/nuIpadApi/nuBizNuCustomerServer/addDirective`, + method: 'post', + data: params, + }) +} + +// 新增即时指令 +export const addInstant = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/nuIpadApi/nuBizNuCustomerServer/addInstant`, + method: 'post', + data: params, + }) +} + +// 新增情绪/体型标签 +export const addElderTag = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/nuIpadApi/nuBizNuCustomerServer/addElderTag`, + method: 'post', + data: params, + }) +} + +// 编排护理流程-删除服务指令 +export const deleteDirective = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/nuIpadApi/nuBizNuCustomerServer/deleteDirective`, + method: 'post', + data: params, + }) +} + +// 编排护理流程-删除即时服务指令 +export const deleteInstant = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}//nuIpadApi/nuBizNuCustomerServer/deleteInstant`, + method: 'post', + data: params, + }) +} + +// 编排护理流程-删除情绪/体型标签 +export const deleteElderTag = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/nuIpadApi/nuBizNuCustomerServer/deleteElderTag`, + method: 'post', + data: params, + }) +} +// 编排护理流程-修改服务指令 +export const editDirective = (params) => { + return request({ + url: `${uni.getStorageSync('serverUrl')}/nuIpadApi/nuBizNuCustomerServer/editDirective`, + method: 'post', + data: params, + }) +} \ No newline at end of file diff --git a/pages/NursingNew/component/nurse/index.css b/pages/NursingNew/component/nurse/index.css index a0c7880..772ea2c 100644 --- a/pages/NursingNew/component/nurse/index.css +++ b/pages/NursingNew/component/nurse/index.css @@ -1708,51 +1708,6 @@ flex-direction: column; animation: shakesmall 0.8s infinite; background-color: #fff; - /* box-shadow: 8rpx 8rpx 16rpx rgba(255, 138, 0, 0.7); */ -} - -.title-time-border-pouple-active-transparent { - margin: 10rpx; - border: 4rpx dashed #7B61FF; - /* background: linear-gradient(to bottom, #f1eeff, #e3deff); */ - width: calc(100% - 40rpx); - height: calc(100% - 40rpx); - border-radius: 20rpx; - display: flex; - align-items: center; - flex-direction: column; - opacity: 0.3; - background-color: #fff; - /* box-shadow: 8rpx 8rpx 16rpx rgba(123, 97, 255, 0.7); */ -} - -.title-time-border-pouple { - margin: 10rpx; - border: 1rpx solid #dae8fa; - /* background: linear-gradient(to bottom, #f1eeff, #e3deff); */ - width: calc(100% - 40rpx); - height: calc(100% - 40rpx); - border-radius: 20rpx; - display: flex; - align-items: center; - flex-direction: column; - background-color: #fff; - /* box-shadow: 8rpx 8rpx 16rpx rgba(123, 97, 255, 0.7); */ -} - -.title-time-border-pouple-active { - margin: 10rpx; - border: 1rpx solid #dae8fa; - background-color: #fff; - /* background: linear-gradient(to bottom, #f1eeff, #e3deff); */ - width: calc(100% - 40rpx); - height: calc(100% - 40rpx); - border-radius: 20rpx; - display: flex; - align-items: center; - flex-direction: column; - animation: shakesmall 1s infinite; - /* box-shadow: 8rpx 8rpx 16rpx rgba(123, 97, 255, 0.7); */ } .down-icons { @@ -1862,8 +1817,11 @@ top: 220rpx; left: -17rpx; width: 60rpx; - height: 1210rpx; + height: 1000rpx; margin-top: 10rpx; + /* background-color: red; */ + overflow: hidden; + z-index: 9999; /* background: linear-gradient(to bottom, #c4dbf4, #c9c2ef, #c6dcf3); */ /* border-bottom: 2rpx solid #fff; */ /* border-left: 2rpx solid #fff; */ @@ -1878,7 +1836,7 @@ } .boom { - height: 1270rpx; + height: 2500rpx; display: flex; flex-direction: column; /* // justify-content: center; */ @@ -2100,8 +2058,8 @@ width: 100%; height: 100%; padding: 20rpx; - - .specia-title{ + + .specia-title { width: 100%; height: 100rpx; font-size: 40rpx; @@ -2110,9 +2068,314 @@ justify-content: center; align-items: center; } - .specia-cards{ + + .specia-cards { width: 100%; display: flex; flex-wrap: wrap; } -} \ No newline at end of file +} + +/* 容器默认隐藏,透明度为 0,不接受点击 */ +.neuro-wrapper { + position: fixed; + inset: 0; + display: flex; + justify-content: center; + align-items: center; + z-index: 999; + opacity: 0; + pointer-events: none; + transition: opacity 0.3s ease; +} + +/* 显示时透明度过渡到 1,可接受点击 */ +.neuro-wrapper.is-active { + opacity: 1; + pointer-events: auto; +} + +/* 遮罩层,半透明黑色 */ +.neuro-mask { + position: absolute; + inset: 0; + background-color: rgba(0, 0, 0, 0.3); +} + +/* 拟态框 固定尺寸 + 阴影样式 + 相对定位于 wrapper */ +.neuro-box { + position: relative; + width: 600rpx; + height: 450rpx; + border-radius: 30rpx; + background-color: #fff; + display: flex; + flex-direction: column; + align-items: center; + z-index: 1; + padding: 0 5%; +} + +.button { + width: 47%; + background-color: #ddf0ff; + display: flex; + justify-content: center; + align-items: center; + color: #007CFF; + border: 1rpx solid #007CFF; + font-size: 25rpx; + border-radius: 30rpx; +} + +.title { + margin-top: 70rpx; + font-size: 33rpx; + font-weight: 600; +} + +.card-font { + margin-top: 70rpx; + width: 600rpx; + justify-content: center; + display: flex; +} + +.button-white { + width: 47%; + border: 2rpx solid #c3cacd; + background: linear-gradient(to bottom, #f3f3f5, #dee4e9); + display: flex; + justify-content: center; + align-items: center; + font-size: 25rpx; + border-radius: 30rpx; +} + +.delete-button-father { + position: absolute; + bottom: 60rpx; + left: 50%; + transform: translateX(-50%); + width: 100%; + height: 70rpx; + display: flex; + justify-content: space-between; + padding: 0 50rpx; +} + + .right-container-title-nav { + margin-top: 60rpx; + display: flex; + align-items: center; + height: 60rpx; + position: relative; + font-size: 28rpx; + + .new-weight { + margin-left: 30rpx; + font-weight: 600; + } + + .right-icons { + position: absolute; + right: 0; + top: 0; + display: flex; + align-items: center; + margin-top: -5rpx; + } + } + + .white-button { + width: 160rpx; + height: 70rpx; + border-radius: 40rpx; + background-color: #E6E7EB; + margin-left: 20rpx; + margin-top: 10rpx; + display: flex; + justify-content: center; + align-items: center; + + .white-img { + width: 35rpx; + height: 35rpx; + margin-right: 10rpx; + } + } + + .left-top { + border-top-left-radius: 0 !important; + } + + .right-top { + border-top-right-radius: 0 !important; + } + + .left-bottom { + border-bottom-left-radius: 0 !important + } + + .right-bottom { + border-bottom-right-radius: 0 !important; + } + + .mark { + font-size: 29rpx; + position: relative; + } + + .marknone { + font-size: 29rpx; + color: #999; + display: flex; + margin-top: 5rpx; + } + + .tri-down { + width: 0; + height: 0; + border-left: 10rpx solid transparent; + /* s/2 */ + border-right: 10rpx solid transparent; + /* s/2 */ + border-top: 17.32rpx solid #999; + /* 0.866 * s */ + margin: 0rpx 0rpx 0 15rpx; + } + + .mark-bgc { + position: absolute; + top: 50rpx; + left: 0; + width: 450rpx; + background-color: #fff; + z-index: 999; + border-radius: 30rpx; + padding-bottom: 30rpx; + transition: opacity 0.3s ease; + } + + .blue-button { + margin-top: 60rpx; + width: 150rpx; + height: 70rpx; + border-radius: 40rpx; + display: flex; + justify-content: center; + align-items: center; + color: #007CFF; + font-size: 30rpx; + background: linear-gradient(to bottom, #e7f4ff, #c5e5ff); + border: 2rpx solid #9AD1FF; + } + + .firsttarget { + --color: #99C9FD; + --thick: 2px; + --radius: 50rpx; + --outline-offset: 10rpx; + /* 外扩多少 */ + /* 内层虚线(你现在用的) */ + border-radius: var(--radius); + /* 内部背景 */ + animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1); + /* 外层虚线:放在 outline(不会影响元素尺寸) */ + outline: var(--thick) dashed var(--color); + outline-offset: var(--outline-offset); + /* 保证文本 / 子元素在最上层 */ + position: relative; + z-index: 999; + } + + .secondtarget { + --color: #99C9FD; + --thick: 2px; + --radius: 10rpx; + --outline-offset: 0rpx; + /* 外扩多少 */ + /* 内层虚线(你现在用的) */ + border-radius: var(--radius); + /* 内部背景 */ + animation: scalePulse 360ms cubic-bezier(.2, .8, .2, 1); + /* 外层虚线:放在 outline(不会影响元素尺寸) */ + outline: var(--thick) dashed var(--color); + outline-offset: var(--outline-offset); + /* 保证文本 / 子元素在最上层 */ + position: relative; + z-index: 999; + } + + .xian-bian { + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 999; + border-right: 1rpx solid transparent; + border-image: repeating-linear-gradient(180deg, #A9ACB1 0px, #A9ACB1 6rpx, transparent 6rpx, transparent 12rpx) 1; + } + + .pulic-time { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + color: #99C9FD; + font-size: 35rpx; + font-weight: 600; + } + + .zhiling-card { + width: calc(100% - 20rpx); + height: 200rpx; + background-color: rgba(255, 255, 255, 0.3); + margin-left: 20rpx; + border-radius: 30rpx; + border: 2rpx solid rgb(229, 233, 249); + position: relative; + margin-bottom: 10rpx; + padding: 20rpx 30rpx; + overflow: hidden; + + .zhiling-card-button { + position: absolute; + top: 0rpx; + right: 0rpx; + width: 120rpx; + height: 40rpx; + } + + .zhiling-card-font { + position: absolute; + top: 0rpx; + right: 0rpx; + width: 120rpx; + height: 40rpx; + display: flex; + justify-content: center; + align-items: center; + color: #fff; + font-size: 24rpx; + } + + .bag { + display: flex; + flex-wrap: wrap; + margin-top: 20rpx; + + .bag-one { + // margin-right: 10rpx; + } + } + } + + .overlay { + position: fixed; + inset: 0; + background: rgba(0, 0, 0, 0.1); + /* 半透明黑色 */ + z-index: 998; + } \ No newline at end of file diff --git a/pages/NursingNew/component/nurse/index.vue b/pages/NursingNew/component/nurse/index.vue index eecdc8a..e8bf686 100644 --- a/pages/NursingNew/component/nurse/index.vue +++ b/pages/NursingNew/component/nurse/index.vue @@ -16,8 +16,8 @@ 体型标签: - - + + 体型标签 @@ -51,7 +51,8 @@ :class="topindex===1&&!bodystatus&&!facestatus?'firsttarget':''"> 情绪标签: - + + 情绪标签 @@ -100,8 +101,8 @@ - - + + @@ -112,10 +113,16 @@ + - @@ -127,7 +134,8 @@ + scroll-with-animation :scroll-y="true" @scroll="handleScrolltime" + :show-scrollbar="false"> @@ -138,7 +146,6 @@ :style="!targetRuler.bordershow && saveRulerTime.index0 === index0 && saveRulerTime.index1 === index1 ? {zIndex:999} : {borderBottom: '1rpx solid transparent'}" :id="`a${index0}_${index1}`" style="position: relative;" @click="rulerTouchClick(item1,index0,index1)" - @touchmove="rulerTouchMove" @touchend="rulerTouchEnd()" :data-index0="index0" :data-index1="index1"> - 是否确认删除该服务指令 @@ -163,7 +170,7 @@ v-if="saveEditIndex.index0 == index0 && saveEditIndex.index1 == index1 && index1 && isDelete"> 是否确认删除该服务指令 - + --> @@ -233,7 +240,7 @@ + @click.stop="bottomItems.splice(index, 1);killjishi(item.id)"> - @@ -365,6 +372,9 @@ 不能重复添加相同的即时服务指令 + + 请选择服务指令来进行操作 + @@ -377,14 +387,14 @@ - + - + 确定 @@ -409,7 +419,8 @@ - @@ -435,23 +446,20 @@ {{ timearr[showDetail[0]]?.children[showDetail[1]]?.endTime }} - - - - + + + {{item1.serviceDuration + "分钟"}} - - + {{ item1.cycleType == '1' ? '日常' : item1.cycleType == '2' ? '周期' : '即时' }} @@ -513,9 +521,9 @@ 护理流程 - 护理单元01 + {{uni.getStorageSync('nuName')}} - 王金凤 + {{uni.getStorageSync('NUall').elderInfo?uni.getStorageSync('NUall').elderInfo.name:""}} @@ -525,6 +533,45 @@ + + + + + + + + 取消 + 确定 + + + 确定要删除指令吗 + + + + + + {{timearr[saveEditIndex.index0].children[saveEditIndex.index1].startTime + `-` + timearr[saveEditIndex.index0].children[saveEditIndex.index1].endTime}} + + + + {{ timearr[saveEditIndex.index0].children[saveEditIndex.index1].cycleType == '1' ? '日常' : timearr[saveEditIndex.index0].children[saveEditIndex.index1].cycleType == '2' ? '周期' : '即时' }} + + + + {{splitString(timearr[saveEditIndex.index0].children[saveEditIndex.index1].directiveName)[0]}} + + + + + + @@ -532,7 +579,7 @@ import { ref, onMounted, onBeforeUnmount, computed, nextTick, defineProps, defineEmits, watch } from 'vue'; import { onShow, onHide } from '@dcloudio/uni-app'; import type { roomBtttonType } from "./index"; - import { getNclist, addBatch } from "./api.js"; + import { getNclist, addBatch, addDirective, addInstant, addElderTag, deleteDirective, deleteInstant, deleteElderTag, editDirective } from "./api.js"; import { myArray } from './yaoshandiao.js'; const props = defineProps({ @@ -744,6 +791,14 @@ } } ) + + /* ---- 用于 transform 的响应式字符串 ---- + 注意:虽然这是响应式,但我们只在 rAF 里更新它(受控更新),避免频繁触发 Vue 渲染 */ + const transformStyle = ref('translate3d(0, 0, 0)'); + /* rAF / 计数器变量 */ + let lastY = 0; + let ticking = false; + const bodydonghua = ref(false) const openbody = ref(false) const openface = ref(false) @@ -766,11 +821,15 @@ }, 50) } ) + const bodytarget = ref([]); const facetarget = ref([]); const addbody = (index : number) => { if (bodyTagList.value[index].izSelected == '1') { - bodyTagList.value[index].izSelected = '0' + // console.log("///",bodyTagList.value[index]) + // return + bodyTagList.value[index].izSelected = '0'; + } else { let targetNumber = 0; bodyTagList.value.forEach((element : any) => { @@ -876,17 +935,7 @@ // 这是二级菜单的动画的模板 const secondtemp = ref([]) onMounted(() => { - downdonghua.value = 0; - let goodArray = [] - myArray.forEach((element : any) => { - element.children.forEach((element1 : any) => { - goodArray.push({ - name: element1.title, - url: element1.url, - }) - }) - }) - secondtemp.value = goodArray + }) // 上次点击时间 const lastTap = ref(0) @@ -912,6 +961,17 @@ // 替换新的 const getNew = () => { + if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id) { + deleteDirective({ id: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id }).then((res : any) => { + doChangeNew() + }) + } else { + doChangeNew() + } + + + } + const doChangeNew = () => { let object = JSON.parse(JSON.stringify(timearr.value[flyNumber.value.index0].children[flyNumber.value.index1])) indexsave.value = [saveEditIndex.value.index0, saveEditIndex.value.index1] // 旧的tagName保存了 @@ -932,7 +992,6 @@ // 用 positioning 替换原来的小时部分 timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime = positioning + ":" + start.padStart(2, '0'); // "9:20" timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime = positioning + ":" + String(end % 60).padStart(2, '0'); // "9:20" - console.log("cccc",timearr.value[indexsave.value[0]].children[indexsave.value[1]]) flyNumber.value.index0 = -1; flyNumber.value.index1 = -1; isMove.value = false; @@ -941,7 +1000,17 @@ index1: saveEditIndex.value.index1 } whereEvent(data); - saveAll() + // saveAll() + let infoValue = timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] + infoValue.positioning = saveEditIndex.value.index0; + infoValue.positioningLong = saveEditIndex.value.index1; + // console.log("issuccess?",saveEditIndex.value.index0,saveEditIndex.value.index1) + editDirective(infoValue).then((res : any) => { + if (res.success) { + geteverything() + } + + }) } //变更左侧菜单 const changLeft = (index : number) => { @@ -971,6 +1040,7 @@ downList.value = bigArray.value[index]?.children thirdmenuIndex.value = 0; } + const isempty = ref(false); const changecard = () => { isDelete.value = false; open.value = false; @@ -982,6 +1052,12 @@ flyNumber.value.index1 = saveEditIndex.value.index1; isMove.value = true } + else { + isempty.value = true; + setTimeout(() => { + isempty.value = false; + }, 1500) + } } } @@ -1006,64 +1082,64 @@ const isRule = ref(false); const savemoved = ref(-1); const movecard = (where : number) => { - isDelete.value = false; - switch (where) { - case 0: - if (saveEditIndex.value.index1) { - saveEditIndex.value.index1-- - centerCell(); - isopen.value = false; - if (open.value) { - setTimeout(() => { - rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) - }, 50) - } - } else { - topindex.value = 0 - savemoved.value = saveEditIndex.value.index0 - isRule.value = false; - } - break - case 1: - if (saveEditIndex.value.index0 == 23) { - return - } - saveEditIndex.value.index0++ - centerCell(); - isopen.value = false; - if (open.value) { - setTimeout(() => { - rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) - }, 50) - } - break - case 2: - if (saveEditIndex.value.index1 == 11) { - return - } - saveEditIndex.value.index1++ - centerCell(); - isopen.value = false; - if (open.value) { - setTimeout(() => { - rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) - }, 50) - } - break - case 3: - if (saveEditIndex.value.index0 == 0) { - return - } - saveEditIndex.value.index0-- - centerCell(); - isopen.value = false; - if (open.value) { - setTimeout(() => { - rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) - }, 50) - } - break - } + // isDelete.value = false; + // switch (where) { + // case 0: + // if (saveEditIndex.value.index1) { + // saveEditIndex.value.index1-- + // centerCell(); + // isopen.value = false; + // if (open.value) { + // setTimeout(() => { + // rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) + // }, 50) + // } + // } else { + // topindex.value = 0 + // savemoved.value = saveEditIndex.value.index0 + // isRule.value = false; + // } + // break + // case 1: + // if (saveEditIndex.value.index0 == 23) { + // return + // } + // saveEditIndex.value.index0++ + // centerCell(); + // isopen.value = false; + // if (open.value) { + // setTimeout(() => { + // rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) + // }, 50) + // } + // break + // case 2: + // if (saveEditIndex.value.index1 == 11) { + // return + // } + // saveEditIndex.value.index1++ + // centerCell(); + // isopen.value = false; + // if (open.value) { + // setTimeout(() => { + // rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) + // }, 50) + // } + // break + // case 3: + // if (saveEditIndex.value.index0 == 0) { + // return + // } + // saveEditIndex.value.index0-- + // centerCell(); + // isopen.value = false; + // if (open.value) { + // setTimeout(() => { + // rulerTouchClick(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1], saveEditIndex.value.index0, saveEditIndex.value.index1) + // }, 50) + // } + // break + // } } const topindex = ref(-1) const movetop = (where : number) => { @@ -1137,10 +1213,17 @@ if (timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].directiveName) { if (!isDelete.value) { isDelete.value = true; + setTimeout(() => deletedonghua.value = true, 50) + } else { isDelete.value = false; deleteRuler(saveEditIndex.value.index0, saveEditIndex.value.index1); } + } else { + isempty.value = true; + setTimeout(() => { + isempty.value = false; + }, 1500) } } @@ -1165,14 +1248,32 @@ // 在作用域中声明一个定时器变量 let throttleTimer = null; //监听拖拽 - const dragOffset = ref(0); - const topIn = ref(0) - const moveDownNumber = ref(0) + // const dragOffset = ref(0); + // const moveDownNumber = ref(0) + /* 兼容:如果不支持 requestAnimationFrame,就用 setTimeout */ + const requestAnimationFrame = + typeof window !== 'undefined' && window.requestAnimationFrame + ? window.requestAnimationFrame + : (cb) => setTimeout(cb, 16); function handleScrolltime(e) { - let num = e.detail.scrollTop - topIn.value = e.detail.scrollTop - let formattedNum = parseFloat(num.toFixed(2)); - moveDownNumber.value = formattedNum + // let num = e.detail.scrollTop + // let formattedNum = parseFloat(num.toFixed(2)); + // moveDownNumber.value = formattedNum + // uni-app 的 scroll 事件通常把位置放在 e.detail.scrollTop + // 为保险,先做容错判断 + const scrollTop = (e && e.detail && (e.detail.scrollTop ?? e.detail.scrollY)) || 0; + lastY = scrollTop; + + // 如果还在等待上一帧更新,就直接返回;否则安排下一帧更新 + if (!ticking) { + ticking = true; + requestAnimationFrame(() => { + // 把 transform 更新为负的 scrollTop(向上平移) + // 使用 translate3d 触发 GPU 合成层 + transformStyle.value = `translate3d(0, -${lastY}px, 0)`; + ticking = false; + }); + } } const leftIn = ref(0) function handleTop(e) { @@ -1182,35 +1283,6 @@ const changeBug = ref(true); // 方法:根据条件返回不同的类名 const getClass = (item, index0, index1) => { - // if (item.cycleType === '日常') { - // if (flyNumber.value.index0 === (index0) && flyNumber.value.index1 === index1) { - // return 'title-time-border-yellow-active-transparent'; - // } else if (shakyTable.value) { - // return 'title-time-border-yellow-active'; - // } else { - // return 'title-time-border-yellow'; - // } - // } else if (item.cycleType == '周期') { - // //为啥这么写,是因为动画写行内无效!!! - // if (flyNumber.value.index0 === (index0) && flyNumber.value.index1 === index1) { - // return 'title-time-border-pouple-active-transparent'; - // } - // else if (shakyTable.value) { - // return 'title-time-border-pouple-active'; - // } else { - // return 'title-time-border-pouple'; - // } - - // }else if(item.cycleType == '打包'){ - // if (flyNumber.value.index0 === (index0) && flyNumber.value.index1 === index1) { - // return 'title-time-border-yellow-active-transparent'; - // } else if (shakyTable.value) { - // return 'title-time-border-yellow-active'; - // } else { - // return 'title-time-border-yellow'; - // } - - // } if (item.cycleType) { if (flyNumber.value.index0 === (index0) && flyNumber.value.index1 === index1) { return 'title-time-border-yellow-active-transparent'; @@ -1219,7 +1291,7 @@ } else { return 'title-time-border-yellow'; } - } + } return 'title-time-border'; } // 通用的生成函数 @@ -1403,7 +1475,7 @@ //表格点击开始 const showDetail = ref([-1, -1]) const rulerTouchClick = (item : any, index0 : number, index1 : number) => { - + isDelete.value = false; saveEditIndex.value.index0 = index0; saveEditIndex.value.index1 = index1; centerCell(); @@ -1448,38 +1520,21 @@ }) .exec() } - }, 50) + }, 400) } const shakyTable = ref(false); const reldata = ref([]); - //表格长按开始 - const rulerTouchMove = (e : any) => { - const moveXa = Math.floor(e.touches[0].pageX); - const moveYa = Math.floor(e.touches[0].pageY); - // 计算移动距离 - if ( - Math.abs(moveXa - moveX.value) > 0 || - Math.abs(moveYa - moveY.value) > 0 - ) { - // 移动时取消长按计时器 - if (timer.value) { - clearTimeout(timer.value); - timer.value = null; - } - } - } - //表格长按结束 - const rulerTouchEnd = () => { - isTuoing.value = false; - if (timer.value) { - clearTimeout(timer.value); - timer.value = null; - } - } const deleteRuler = (index0 : number, index1 : number) => { - let tagName = timearr.value[index0].children[index1].tagName - timearr.value[index0].children[index1] = { directiveName: "", tagName: tagName }; - saveAll() + // let tagName = timearr.value[index0].children[index1].tagName; + + // timearr.value[index0].children[index1] = { directiveName: "", tagName: tagName }; + // saveAll() + console.log("?????", timearr.value[index0].children[index1].id) + deleteDirective({ id: timearr.value[index0].children[index1].id }).then((res : any) => { + if (res.success) { + geteverything() + } + }) } const longPressTimer = ref(null); const isScrolling = ref(false) @@ -1610,15 +1665,47 @@ }, 1000) } - onBeforeUnmount(() => { - if (animTimer) clearTimeout(animTimer) - }) + const doaddDirective = (element : any) => { + // console.log("提交了啥", element) + addDirective(element).then((res) => { + // console.log("添加后返回了啥1", res) + if (res.success) { + geteverything() + } + }) + } + + const killjishi = (id : string) => { + deleteInstant({ id: id }).then((res) => { + // console.log("添加后返回了啥1", res) + if (res.success) { + geteverything() + } + }) + } + const addnew = () => { + // console.log("9999", timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1]) - if(iszhiling.value){ - let allobject = savePackagelist.value[forthmenuIndex.value]; - console.log("special",allobject) + if (isDelete.value) { + isDelete.value = false; + deleteRuler(saveEditIndex.value.index0, saveEditIndex.value.index1); + return + } + if (isMove.value) { + getNew() + return + } + let haveValue = false; + if (timearr.value[saveEditIndex.value.index0]?.children[saveEditIndex.value.index1].directiveName) { + haveValue = true + } + // return + if (iszhiling.value) { + let allobject = savePackagelist.value[forthmenuIndex.value]; + // console.log("special",allobject) + if (saveEditIndex.value.index1 === -1 && saveEditIndex.value.index0 === -1) { return } @@ -1638,13 +1725,17 @@ let cycleValue = ""; const startHour = Number(saveEditIndex.value.index0) const startMinute = Number(timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName) - const endMinute = startMinute + Number(allobject.totalDuration) + const endMinute = startMinute + Number(allobject.serviceDuration) const endHour = startHour + Math.floor(endMinute / 60) const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}` const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, '0')}` - // timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].startTime = formattedStart - // timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].endTime = formattedEnd + let param = { + id: haveValue ? timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id : "", + nuId: uni.getStorageSync('nuId'), + nuName: uni.getStorageSync('nuName'), + customerId: uni.getStorageSync('customerId'), + customerName: uni.getStorageSync('NUall').elderInfo.name, directiveId: allobject.id, directiveName: allobject.packageName, typeId: "", @@ -1656,20 +1747,17 @@ cycleValue: cycleValue, startTime: formattedStart, endTime: formattedEnd, + serviceDuration: allobject.serviceDuration, positioning: saveEditIndex.value.index0.toString(), positioningLong: saveEditIndex.value.index1.toString(), izPackage: '1', previewFile: "", previewFileSmall: "", - serviceDuration: "", immediateFile: "", immediateFileFocus: "", netImmediateFile: "", - tagName: "", - directivesList:JSON.stringify(allobject.directivesList) + tagName: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName, } - console.log("right",param) - //给表格赋值 timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] = param; let data = { @@ -1677,18 +1765,28 @@ index1: saveEditIndex.value.index1 } whereEvent(data); - saveAll() - + // saveAll() + if (haveValue) { + editDirective(param).then((res : any) => { + if (res.success) { + geteverything() + } + + }) + } else { + doaddDirective(param); + } + return } - - + let stopIt = false; let allobject = bigArray.value[upmenuIndex.value].children[downmenuIndex.value].children[thirdmenuIndex.value] + if (allobject.cycleType === "即时护理") { scrollLeft.value = 1; bottomItems.value.forEach((element : any, index : number) => { - if (element.directiveName === allobject.title) { + if (element.directiveName == allobject.title) { stopIt = true } }) @@ -1702,20 +1800,31 @@ let pushValue = allobject; pushValue.directiveId = allobject.id; pushValue.directiveName = allobject.title; + pushValue.serviceDuration = allobject.serviceDuration; + pushValue.target = `#03a4ff` pushValue.id = "" - bottomItems.value.unshift(pushValue) + pushValue.nuId = uni.getStorageSync('nuId'), + pushValue.nuName = uni.getStorageSync('nuName'), + pushValue.customerId = uni.getStorageSync('customerId'), + pushValue.customerName = uni.getStorageSync('NUall').elderInfo.name, + bottomItems.value.unshift(pushValue) // 实现即时指令动画 cleansettimeout.value = setTimeout(() => { bottomItems.value[0].target = `#fff`; - saveAll() + // saveAll() + addInstant(pushValue).then((res : any) => { + if (res.success) { + geteverything() + } + }) }, 1500) } else { clearTimeout(cleansettimeoutrel.value); isop.value = true; cleansettimeoutrel.value = setTimeout(() => { isop.value = false; - saveAll() + // saveAll() }, 1500) } }) @@ -1724,15 +1833,6 @@ if (saveEditIndex.value.index1 === -1 && saveEditIndex.value.index0 === -1) { return } - if (isDelete.value) { - isDelete.value = false; - deleteRuler(saveEditIndex.value.index0, saveEditIndex.value.index1); - return - } - if (isMove.value) { - getNew() - return - } flyNumber.value.index0 = -1; flyNumber.value.index1 = -1; isMove.value = false; @@ -1758,10 +1858,12 @@ } }) cycleValue = cycleTypeIndex.toString() + } else { cycleType = monthValue.value + "号"; cycleValue = monthValue.value } + console.log("重要", cycleValue) iszhouqi.value = false; weekIndex.value = -1; monthIndex.value = -1; @@ -1774,9 +1876,12 @@ const endHour = startHour + Math.floor(endMinute / 60) const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}` const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, '0')}` - // timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].startTime = formattedStart - // timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].endTime = formattedEnd let param = { + id: haveValue ? timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id : "", + nuId: uni.getStorageSync('nuId'), + nuName: uni.getStorageSync('nuName'), + customerId: uni.getStorageSync('customerId'), + customerName: uni.getStorageSync('NUall').elderInfo.name, directiveId: allobject.id, directiveName: allobject.title, typeId: allobject.typeId, @@ -1806,7 +1911,18 @@ index1: saveEditIndex.value.index1 } whereEvent(data); - saveAll() + if (haveValue) { + editDirective(param).then((res : any) => { + if (res.success) { + geteverything() + } + + }) + } else { + doaddDirective(param); + + } + } const cleansettimeout = ref(null); const cleansettimeoutrel = ref(null); @@ -1815,21 +1931,21 @@ return } //给后端编译一下 - let postArray = []; - timearr.value.forEach((element0, index0) => { - element0.children.forEach((element1, index1) => { - if (!element1.directiveName && !element1.id) { + // let postArray = []; + // timearr.value.forEach((element0, index0) => { + // element0.children.forEach((element1, index1) => { + // if (!element1.directiveName && !element1.id) { + + // } else { + // element1.positioning = index0; + // element1.positioningLong = index1; + // postArray.push(element1) + // } + + // }) + + // }) - } else { - element1.positioning = index0; - element1.positioningLong = index1; - postArray.push(element1) - } - - }) - - }) - console.log("入参111",postArray) let info = [] bodyTagList.value.forEach((element : any) => { @@ -1843,21 +1959,21 @@ } }) - bottomItems.value.forEach((element : any, index : number) => { - element.sort = index - }) + // bottomItems.value.forEach((element : any, index : number) => { + // element.sort = index + // }) let allvalue = { nuId: uni.getStorageSync('nuId'), nuName: uni.getStorageSync('nuName'), customerId: uni.getStorageSync('customerId'), customerName: uni.getStorageSync('NUall').elderInfo.name, - serverList: postArray, - instantList: bottomItems.value, + // serverList: postArray, + // instantList: bottomItems.value, tagList: info } - + // console.log("入参", allvalue) addBatch(allvalue).then(() => { geteverything() }) @@ -1919,13 +2035,19 @@ const emotionTagList = ref([]); const bodyTagList = ref([]); const geteverything = () => { - if (uni.getStorageSync('nuId') && uni.getStorageSync('customerId')) { getNclist(uni.getStorageSync('nuId'), uni.getStorageSync('customerId')).then((res : any) => { + timearr.value = Array.from({ length: 24 }, (_, hour) => ({ + positioning: hour.toString(), + children: minuteArr.map(time => ({ + tagName: time, // 表示分钟,如 '00', '05' 等 + directiveName: '' // 默认的 directiveName + })) + })) res.result.serviceList.forEach((res : any) => { timearr.value[res.positioning].children[res.positioningLong] = res; }) - console.log("res", res.result) + // console.log("返回了", res.result.serviceList) bottomItems.value = res.result.instantList cansumit.value = true; emotionTagList.value = res.result.emotionTagList; @@ -1937,6 +2059,7 @@ } }) bodyTagList.value = res.result.bodyTagList + // console.log("zzzz",res.result.bodyTagList) res.result.bodyTagList.forEach((res : any) => { if (res.izSelected == '1') { bodyTagListLook.value.push(res.netPic) @@ -1948,33 +2071,49 @@ } const savePackagelist = ref([]); onMounted(() => { - geteverything() - savePackagelist.value = uni.getStorageSync('Packagelist') + + savePackagelist.value = uni.getStorageSync('Packagelist') || [] let res = uni.getStorageSync('saveTree') - res.result.forEach((element : any) => { - if (element.netFlag == '0') { - doctorsayList.value.forEach((res : any) => { - if (res.name == element.title) { - element.url = res.url - } + + // console.log("jiance", savePackagelist.value, res) + + let goodArray = [] + myArray.forEach((element : any) => { + element.children.forEach((element1 : any) => { + goodArray.push({ + name: element1.title, + url: element1.url, }) - } else { - element.url = element.animationPath - } - element.children.forEach((res1 : any) => { - if (res1.netFlag == '0') { - secondtemp.value.forEach((res2 : any) => { - if (res2.name == res1.title) { - res1.url = res2.url + }) + }) + secondtemp.value = goodArray + + if (res.result) { + res.result.forEach((element : any) => { + if (element.netFlag == '0') { + doctorsayList.value.forEach((res : any) => { + if (res.name == element.title) { + element.url = res.url } }) } else { - res1.url = res1.animationPath + element.url = element.animationPath } + element.children.forEach((res1 : any) => { + if (res1.netFlag == '0') { + secondtemp.value.forEach((res2 : any) => { + if (res2.name == res1.title) { + res1.url = res2.url + } + }) + } else { + res1.url = res1.animationPath + } + }) }) - }) - bigArray.value = res.result; + bigArray.value = res.result; + } downList.value = bigArray.value[0].children upmenuIndex.value = -1; downdonghua.value = -1; @@ -1982,20 +2121,23 @@ upmenuIndex.value = 0; downdonghua.value = 0; }, 50) - // console.log("结束") - - // }) - uni.$on('where', findback); + downdonghua.value = 0; + geteverything() + + }) const bodyTagListLook = ref([]); const emotionTagListLook = ref([]); const cansumit = ref(false); - onHide(() => { + onBeforeUnmount(() => { + if (animTimer) clearTimeout(animTimer) uni.$off('where', findback); - }); + ticking = false; + + }) function findback(data : any) { solveWatch.value = 3; whereEvent(data) @@ -2084,217 +2226,10 @@ iszhiling.value = !iszhiling.value forthmenuIndex.value = 0; } + const deletedonghua = ref(false); \ No newline at end of file diff --git a/pages/NursingNew/index.vue b/pages/NursingNew/index.vue index b9c1a8a..d63187e 100644 --- a/pages/NursingNew/index.vue +++ b/pages/NursingNew/index.vue @@ -100,13 +100,14 @@ name.value = uni.getStorageSync('realname') getServiceTree().then((res : any) => { - //缓存护嘱菜单 + // console.log("{{{{{}}}}}",res) //缓存护嘱菜单 uni.setStorageSync("saveTree", res) }) getNcPackagelist().then((res : any) => { //缓存指令包 + // console.log("{{{{{}}}}}",res) uni.setStorageSync("Packagelist", res.result) - console.log("????////",res.result) + // console.log("????////",res.result) }) }) @@ -172,14 +173,7 @@ ), name: '设备' }, { - url: genPaths( - '/static/index/newindex/kufang', - 'storeroom_', - 11, // 张数 - 'png', - 1, // 起始索引为 1 - false // 不补零 - ), name: '返回' + url: [`/static/back.png`], name: '返回' }, // { // url: genPaths( @@ -192,24 +186,6 @@ // ), name: '返回' // }, ]) - const menuArray = ref([ - { url: '/static/index/lefticon/index.png', name: '首页' }, - { url: '/static/index/lefticon/nurse.png', name: '护嘱' }, - { url: '/static/index/lefticon/doctor.png', name: '医嘱' }, - { url: '/static/index/lefticon/give.png', name: '请领' }, - { url: '/static/index/lefticon/wifi.png', name: '设备' }, - { url: '/static/index/lefticon/back.png', name: '返回' } - ]) - - // 初始化左侧菜单列表 - const iconList = ref([ - { url: '/static/index/lefticon/index.png', targetUrl: '/static/index/lefticontarget/blueindex.png' }, - { url: '/static/index/lefticon/nurse.png', targetUrl: '/static/index/lefticontarget/bluenurse.png' }, - { url: '/static/index/lefticon/doctor.png', targetUrl: '/static/index/lefticontarget/bluedoctor.png' }, - { url: '/static/index/lefticon/give.png', targetUrl: '/static/index/lefticontarget/givedark.png' }, - { url: '/static/index/lefticon/wifi.png', targetUrl: '/static/index/lefticontarget/bluewifi.png' }, - { url: '/static/index/lefticon/back.png', targetUrl: '/static/index/lefticontarget/blueback.png' } - ]); // 当前选中的菜单索引 const menuIndex = ref(-1); diff --git a/pages/Warehouse/purchaseorder-备份.vue b/pages/Warehouse/purchaseorder-备份.vue new file mode 100644 index 0000000..89008b9 --- /dev/null +++ b/pages/Warehouse/purchaseorder-备份.vue @@ -0,0 +1,2348 @@ + + + + + + \ No newline at end of file diff --git a/pages/Warehouse/purchaseorder.vue b/pages/Warehouse/purchaseorder.vue index dcdc109..166f9d5 100644 --- a/pages/Warehouse/purchaseorder.vue +++ b/pages/Warehouse/purchaseorder.vue @@ -1,298 +1,105 @@ @@ -303,2048 +110,267 @@ import { onShow, onLoad, onHide, onPageScroll } from "@dcloudio/uni-app" import shadowview from './components/ShadowView.vue'; import calculator from './components/calculator.vue'; - const navurl = ref(''); - const InvoicingList = ref([]); - const TreeData = ref([]); - const cellobj = ref({}); - - const serverUrl = ref(''); - const scrolltop = ref(0) - const leftscrolltop = ref(0) - const shopitem = ref(-1); - const leftitem = ref(0) - const getblue = ref(false); - const shyp = ref(false); - const opacity = ref(false); - const gysnum = ref(false); - const gys = ref(false); - const crk = ref(false); - const shareShow = ref(false); - const deletedownisopacity = ref(false); - - - const scrollnum = ref(0); - - - const scroll = reactive({ scrolltop1: 0, scrolltop2: 0, scrolltop3: 0, act1: -1, act2: -1, act3: -1 }); - const form = reactive({ - nuId: '', - pageNo: 1, - pageSize: 9, - categoryId: '', - typeId: '', - medicationId: '', - wlParamInfo: '', - cgdId: "", - isWaring: 0 - }) - const mobanform = { - nuId: '', - pageNo: 1, - pageSize: 9, - categoryId: '', - typeId: '', - medicationId: '', - wlParamInfo: '', - cgdId: "", - isWaring: 0 - } - const getmiddle = (item : any, i : number) => { - let num = Math.ceil((i + 1)) - leftscrolltop.value = (num - 2) * 185; - leftitem.value = i; - shopitem.value = -1 - - InvoicingList.value = []; - Object.assign(form, mobanform) - - form.cgdId = item.id - queryInvo(); - getMaterial(); - // console.log("入参", form) - } - const switchshyp = () => { - let obj = { - id: cellobj.value.id, - status: shyp.value ? '5' : '2' - } - updateKfstatus(obj).then(res => { - // console.log(res) - if (res.success) { - shyp.value = shyp.value ? false : true; - cell(); - } else { - uni.showToast({ - icon: 'error', - title: res.message - }) - } - }) - } - const detailform = reactive({ - wlId: "", - nuId: uni.getStorageSync('nuId') - }) - const savedetail = ref({ - categoryName: '', - typeName: '', - medicationName: '', - materialNo: '', - specificationModel: '', - tagName: '', - materialUnits: '', - izYbbxName: '', - izJgyhName: '', - kcsl: '', - upperLimit: '', - lowerLimit: '', - materialName: '', - materialImg: '' - }) - const getdetail = () => { - // console.log("????", detailform) - queryWlInfoByWlId(detailform).then((res : any) => { - // console.log("res", res.result) - if (res.result) { - savedetail.value = res.result; - crk.value = true; - leftitem.value = -1 - } - - }) - - } - const shopclick = (i : number) => { - let num = Math.ceil((i + 1) / 2) - scrolltop.value = (num - 2) * 167; - shopitem.value = i; - // console.log(InvoicingList.value[i].wlId, uni.getStorageSync('nuId')) - detailform.wlId = InvoicingList.value[i]?.wlId - // getdetail() - - } - - - - const typescroll = (e : number, i : number, v : object) => { - if (e == 1) { - scroll.act2 = -1; - scroll.act3 = -1; - scroll.scrolltop2 = 0; - scroll.scrolltop3 = 0; - form.categoryId = v?.categoryId; - form.typeId = ''; - form.medicationId = ''; - if (scroll.act1 == i) { - scroll.act1 = -1; - form.categoryId = ''; - form.pageNo = 1; - InvoicingList.value = []; - queryInvo(); - return - } - } - if (e == 2) { - scroll.act3 = -1; - scroll.scrolltop3 = 0; - form.categoryId = v?.categoryId; - form.typeId = v?.typeId; - form.medicationId = ''; - } - if (e == 3) { - form.categoryId = v?.categoryId; - form.typeId = v?.typeId; - form.medicationId = v?.key; - } - scroll['act' + e] = i; - scroll['scrolltop' + e] = (i - 2) * 50; - form.pageNo = 1; - InvoicingList.value = []; - shopitem.value = 0; - queryInvo(); - } - const search = (x : number) => { - - if (x === 0) { form.wlParamInfo = '' } - form.pageNo = 1; - InvoicingList.value = []; - leftitem.value = saveleftgo.value; - shopitem.value = -1; - form.cgdId = plsbuy.value[leftitem.value].id - queryInvo(); - } - onLoad(() => { - form.nuId = uni.getStorageSync('nuId'); - serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/'; - firstgetqueryCgdList(); - cell() + + onMounted(()=>{ + firstgetqueryCgdList() }) - const init = () => { - InvoicingList.value = []; - plsbuy.value = [] - Object.assign(form, mobanform) - Object.assign(plzinfo, mobanplzinfo) - - serverUrl.value = uni.getStorageSync('serverUrl') + '/sys/common/static/'; - firstgetqueryCgdList(); - } + const searchValue = ref("") const plzinfo = reactive({ pageNo: 1, pageSize: 10, canpull: true }) + const leftscrolltop = ref(0) - const mobanplzinfo = { - pageNo: 1, - pageSize: 10, - canpull: true - } const plsbuy = ref([]) + const firstgetqueryCgdList = () => { queryCgdList(plzinfo).then((res : any) => { - // console.log("请购单", res.result.records) plsbuy.value.push(...res.result.records) - - form.cgdId = plsbuy.value[0].id - queryInvo(); - getMaterial(); + console.log("plsbuy",plsbuy.value) if (res.result.records.length < plzinfo.pageSize) { plzinfo.canpull = false; } }) } + const setout = ref(true) + let times = null + const plsbuytolower = () => { + if (!setout.value) { return } + plzinfo.pageNo++; + getqueryCgdList() + setout.value = false + times = setTimeout(() => { + setout.value = true + }, 500) + } //获得采购单列表 const getqueryCgdList = () => { if (!plzinfo.canpull) return queryCgdList(plzinfo).then((res : any) => { - console.log("请购单", res.result.records) + // console.log("请购单", res.result.records) plsbuy.value.push(...res.result.records) if (res.result.records.length < plzinfo.pageSize) { plzinfo.canpull = false; } }) } - const plsbuytolower = () => { - if (!setout) { return } - // status.value = 'loading' - // setout.value = false; - plzinfo.pageNo++; - getqueryCgdList() - times = setTimeout(() => { - setout.value = true - }, 1000) + const lefttarget = ref(0); + const clickLeftMenu = (index:any) => { + let num = Math.ceil((index + 1)) + leftscrolltop.value = (num - 2) * 186; + lefttarget.value = index } - const qingkong = () => { - gys.value = false; - anmidex.value = -1; - crk.value = false; - } - const colse = () => { - gysnum.value = !gysnum.value - } - const cell = () => { - queryNuInfoByNuId(form).then(res => { - console.log("ceshi", form, cellobj.value) - cellobj.value = res.result; - shyp.value = res.result.status == 5 ? false : true - }) - } - const getMaterial = () => { - getCgdMaterialTreeData(form).then(res => { - // console.log(form) - // console.log(res) - TreeData.value = res.result; - console.log("TreeData.value", TreeData.value) - }) - } - const setout = ref(true) - let times = null; - const status = ref('loadmore') - onPageScroll((e) => { - console.log(e) - }) - const scrolltolower = () => { - if (!setout) { return } - status.value = 'loading' - setout.value = false; - form.pageNo++; - queryInvo() - times = setTimeout(() => { - setout.value = true - }, 1000) - } - - const scrollview = (e : number) => { - if (e.detail.scrollTop > scrollnum.value) { - opacity.value = true; - setTimeout(() => { - opacity.value = false; - }, 900) - } else { - opacity.value = false; - } - scrollnum.value = e.detail.scrollTop; - } - const queryInvo = () => { - // console.log("form", form) - queryCgdInfoList(form).then(res => { - InvoicingList.value.push(...res.result.records); - detailform.wlId = InvoicingList.value[0].wlId - - - status.value = res.result.total == InvoicingList.value.length ? 'nomore' : 'loadmore'; - - }) - } - const saveleftgo = ref(0); - - const movecard = (type : number) => { - - - if (leftitem.value != -1) { - switch (type) { - case 0: - // 上 - if (leftitem.value) { - leftitem.value-- - getmiddle(plsbuy.value[leftitem.value], leftitem.value); - } - break; - case 1: - // → - saveleftgo.value = leftitem.value; - leftitem.value = -1; - shopitem.value = 0; - - break; - case 2: - // 下 - if (leftitem.value < plsbuy.value.length - 1) { - leftitem.value++ - getmiddle(plsbuy.value[leftitem.value], leftitem.value) - - } - - break; - case 3: - - // ← - break; - case 4: - // 扫描 - // saveleftgo.value = leftitem.value; - // leftitem.value = -1; - // shopitem.value = 0; - break; - case 5: - // 返回 - uni.navigateBack({ - delta: 1 - }) - break; - - default: - break; - } - } - else if (shopitem.value != -1) { - switch (type) { - case 0: - // 上 - shopitem.value = shopitem.value < 1 ? shopitem.value = 0 : shopitem.value - 2 - break; - case 1: - // → - shopitem.value = shopitem.value >= InvoicingList.value.length - 1 ? InvoicingList.value.length - 1 : shopitem.value + 1 - break; - case 2: - // 下 - shopitem.value = shopitem.value >= InvoicingList.value.length - 2 ? shopitem.value = 0 : shopitem.value + 2 - break; - case 3: - shopitem.value = shopitem.value == 0 ? shopitem.value = InvoicingList.value.length - 1 : shopitem.value - 1 - // ← - break; - case 4: - // 扫描 - getdetail() - break; - case 5: - // 返回 - leftitem.value = saveleftgo.value; - getmiddle(plsbuy.value[leftitem.value], leftitem.value) - shopitem.value = -1; - break; - - default: - break; - } - shopclick(shopitem.value) - } - - // shopclick(shopitem.value) - - - } - // 通用的生成函数 - function genPaths(base, prefix, count, ext = 'png', startIndex = 0, pad = false) { - return Array.from({ length: count }, (_, i) => { - const idx = pad - ? String(i + startIndex).padStart(2, '0') - : i + startIndex - return `${base}/${prefix}${idx}.${ext}` - }) - } - const anmidex = ref(-1) - const admiclick = (i : number) => { - anmidex.value = i; - if (plsbuy.value[leftitem.value]?.cgdType == '9') { - uni.showToast({ - title: '该表单已经作废', - icon: 'none', // 'none' 表示不带图标 - duration: 2000 - }) - return - } - switch (i) { - case 0: - bebad(); - break; - case 1: - // gys.value = true - shareToWeixin() - break; - case 2: - break; - case 3: - break; - case 4: - // crk.value = true - break; - case 5: - break; - - default: - break; - } - - } - const badshow = ref(false); - const donghuacs = ref(false); - const bebad = () => { - if (leftitem.value == -1) { - uni.showToast({ - title: '请选择想要作废的采购单', - icon: 'none', // 'none' 表示不带图标 - duration: 2000 - }) - return - } else { - badshow.value = true; - donghuacs.value = false; - setTimeout(() => donghuacs.value = true, 50) - } - } - const zuofei = () => { - voidedCgdMain({ id: plsbuy.value[leftitem.value].id }).then((res : any) => { - console.log("res", res) - if (res.success) { - uni.showToast({ - title: res.message, - icon: 'success', // 'none' 表示不带图标 - duration: 2000 - }) - badshow.value = false; - init() - } - }) - } - const shareToWeixin = () => { - if (leftitem.value == -1) { - uni.showToast({ - title: '请选择想要分享的采购单', - icon: 'none', // 'none' 表示不带图标 - duration: 2000 - }) - return - } else { - shareShow.value = true; - deletedownisopacity.value = false; - setTimeout(() => { - deletedownisopacity.value = true - }, 100) - } - - - } - const clickshare = () => { - uni.share({ - provider: "weixin", - scene: "WXSceneSession", - type: 0, - href: "https://www.baidu.com/", - title: "护理日程分享", - summary: "九泰护理日程测试", - imageUrl: "https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png", - success: function (res) { - console.log("success:"); - }, - fail: function (err) { - console.log("fail:"); - } - }); - } - const animArray = ref([ - { - url: genPaths( - '/static/index/warehouse/procurement/cancel', - 'cancel', - 9, // 张数 - 'png', - 1, // 起始索引为 1 - false // 不补零 - ), - name: '作废', - }, - { - url: genPaths( - '/static/index/warehouse/procurement/share', - 'share', - 6, // 张数 - 'png', - 1, // 起始索引为 1 - false // 不补零 - ), - name: '分享', - }, - - - ]) - - \ No newline at end of file diff --git a/pages/timeMatrix/drawer/index.vue b/pages/timeMatrix/drawer/index.vue index d178c92..b63aa18 100644 --- a/pages/timeMatrix/drawer/index.vue +++ b/pages/timeMatrix/drawer/index.vue @@ -25,6 +25,14 @@ } }) const ballarray = ref([ + { + name:'返回', + url:"" + }, + { + name:'详情', + url:"" + }, { name:'周期', url:"" @@ -73,7 +81,7 @@ left: 50%; transform: translateX(-50%); width: 100%; - height: 400rpx; + height: 600rpx; // background-color: red; display: flex; flex-wrap: wrap; diff --git a/pages/timeMatrix/drawer/specialDrawer.vue b/pages/timeMatrix/drawer/specialDrawer.vue index 968dbea..53d3d1d 100644 --- a/pages/timeMatrix/drawer/specialDrawer.vue +++ b/pages/timeMatrix/drawer/specialDrawer.vue @@ -125,8 +125,8 @@ position: fixed; bottom: 0; right: 0; - height: 40vh; - // background: #eff0f4; + height: 55vh; + // background: red; z-index: 1000; border-top-left-radius: 80rpx; border-bottom-left-radius: 80rpx; diff --git a/pages/timeMatrix/indexnew.vue b/pages/timeMatrix/indexnew.vue index 1f47d2d..e248de9 100644 --- a/pages/timeMatrix/indexnew.vue +++ b/pages/timeMatrix/indexnew.vue @@ -1,40 +1,9 @@