合并代码

This commit is contained in:
Teng 2025-11-19 13:30:41 +08:00
parent fd205040af
commit 1bcd5ca284
2 changed files with 87 additions and 87 deletions

View File

@ -986,54 +986,54 @@
let startTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime; let startTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime;
let endTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime; let endTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime;
let positioning = timearr.value[indexsave.value[0]].positioning; let positioning = timearr.value[indexsave.value[0]].positioning;
// trim // trim
const parseTime = (t) => { const parseTime = (t) => {
const parts = String(t || '').split(':').map(s => s.trim()); const parts = String(t || '').split(':').map(s => s.trim());
const h = Number(parts[0] ?? 0); const h = Number(parts[0] ?? 0);
const m = Number(parts[1] ?? 0); const m = Number(parts[1] ?? 0);
return { return {
hour: Number.isFinite(h) ? h : 0, hour: Number.isFinite(h) ? h : 0,
minute: Number.isFinite(m) ? m : 0 minute: Number.isFinite(m) ? m : 0
}; };
}; };
const sOrig = parseTime(startTime); const sOrig = parseTime(startTime);
const eOrig = parseTime(endTime); const eOrig = parseTime(endTime);
// 24*60 // 24*60
let duration = (eOrig.hour * 60 + eOrig.minute) - (sOrig.hour * 60 + sOrig.minute); let duration = (eOrig.hour * 60 + eOrig.minute) - (sOrig.hour * 60 + sOrig.minute);
if (duration < 0) duration += 24 * 60; // if (duration < 0) duration += 24 * 60; //
// positioning // positioning
const newStartMin = Number(String(newtagName).trim()); const newStartMin = Number(String(newtagName).trim());
const newHour = Number(String(positioning).trim()); const newHour = Number(String(positioning).trim());
// //
if (!Number.isFinite(newStartMin) || newStartMin < 0 || newStartMin >= 60) { if (!Number.isFinite(newStartMin) || newStartMin < 0 || newStartMin >= 60) {
throw new Error('newtagName 必须是 0-59 的数字字符串或数字'); throw new Error('newtagName 必须是 0-59 的数字字符串或数字');
} }
if (!Number.isFinite(newHour) || newHour < 0) { if (!Number.isFinite(newHour) || newHour < 0) {
throw new Error('positioning 必须是有效小时(数字或数字字符串)'); throw new Error('positioning 必须是有效小时(数字或数字字符串)');
} }
// //
const newStartTotal = newHour * 60 + newStartMin; const newStartTotal = newHour * 60 + newStartMin;
const newEndTotal = newStartTotal + duration; const newEndTotal = newStartTotal + duration;
// / // /
const newEndHour = Math.floor(newEndTotal / 60) % 24; // 0-23 const newEndHour = Math.floor(newEndTotal / 60) % 24; // 0-23
const newEndMin = newEndTotal % 60; const newEndMin = newEndTotal % 60;
// //
const pad2 = (n) => String(n).padStart(2, '0'); const pad2 = (n) => String(n).padStart(2, '0');
timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].startTime =
`${String(newHour)}:${pad2(newStartMin)}`; `${String(newHour)}:${pad2(newStartMin)}`;
timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime = timearr.value[indexsave.value[0]].children[indexsave.value[1]].endTime =
`${String(newEndHour)}:${pad2(newEndMin)}`; `${String(newEndHour)}:${pad2(newEndMin)}`;
// const rest = startTime.split(":")[1]; // ":20" // const rest = startTime.split(":")[1]; // ":20"
// const rest0 = endTime.split(":")[1];; // ":20" // const rest0 = endTime.split(":")[1];; // ":20"
// let many = Number(rest0) - Number(rest); // let many = Number(rest0) - Number(rest);
@ -1575,9 +1575,9 @@
const shakyTable = ref(false); const shakyTable = ref(false);
const reldata = ref([]); const reldata = ref([]);
const deleteRuler = (index0 : number, index1 : number) => { const deleteRuler = (index0 : number, index1 : number) => {
console.log("?????",timearr.value[index0].children[index1]) console.log("?????", timearr.value[index0].children[index1])
deleteDirective(timearr.value[index0].children[index1]).then((res : any) => { deleteDirective(timearr.value[index0].children[index1]).then((res : any) => {
if (res.success) { if (res.success) {
geteverything() geteverything()
} }
@ -1804,6 +1804,11 @@
immediateFileFocus: "", immediateFileFocus: "",
netImmediateFile: "", netImmediateFile: "",
tagName: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName, tagName: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName,
mp3File: allobject.mp3File,
netMp3File: allobject.netMp3File,
mp4File: allobject.mp4File,
netMp4File: allobject.netMp4File,
serviceContent: allobject.serviceContent,
} }
// //
timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] = param; timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] = param;
@ -1812,9 +1817,9 @@
index1: saveEditIndex.value.index1 index1: saveEditIndex.value.index1
} }
whereEvent(data); whereEvent(data);
console.log("zou",haveValue) console.log("zou", haveValue)
if (haveValue) { if (haveValue) {
editDirective(param).then((res : any) => { editDirective(param).then((res : any) => {
if (res.success) { if (res.success) {
geteverything() geteverything()
@ -1860,7 +1865,7 @@
// //
cleansettimeout.value = setTimeout(() => { cleansettimeout.value = setTimeout(() => {
bottomItems.value[0].target = `#fff`; bottomItems.value[0].target = `#fff`;
console.log("即时指令看看进入了啥",pushValue) console.log("即时指令看看进入了啥", pushValue)
addInstant(pushValue).then((res : any) => { addInstant(pushValue).then((res : any) => {
if (res.success) { if (res.success) {
geteverything() geteverything()
@ -1924,7 +1929,7 @@
const endHour = startHour + Math.floor(endMinute / 60) const endHour = startHour + Math.floor(endMinute / 60)
const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}` const formattedStart = `${String(startHour)}:${String(startMinute).padStart(2, '0')}`
const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, '0')}` const formattedEnd = `${String(endHour)}:${String(endMinute % 60).padStart(2, '0')}`
console.log("allobject",allobject) console.log("allobject", allobject)
let param = { let param = {
id: haveValue ? timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id : "", id: haveValue ? timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id : "",
nuId: uni.getStorageSync('nuId'), nuId: uni.getStorageSync('nuId'),
@ -1952,6 +1957,11 @@
immediateFileFocus: allobject.immediateFileFocus, immediateFileFocus: allobject.immediateFileFocus,
netImmediateFile: allobject.netImmediateFile, netImmediateFile: allobject.netImmediateFile,
tagName: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName, tagName: timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].tagName,
mp3File: allobject.mp3File,
netMp3File: allobject.netMp3File,
mp4File: allobject.mp4File,
netMp4File: allobject.netMp4File,
serviceContent: allobject.serviceContent,
} }
// //
timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] = param; timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1] = param;
@ -1960,7 +1970,7 @@
index1: saveEditIndex.value.index1 index1: saveEditIndex.value.index1
} }
whereEvent(data); whereEvent(data);
console.log("日常指令看看进入了啥",param) console.log("日常指令看看进入了啥", param)
if (haveValue) { if (haveValue) {
editDirective(param).then((res : any) => { editDirective(param).then((res : any) => {
if (res.success) { if (res.success) {
@ -1980,21 +1990,6 @@
if (!cansumit.value) { if (!cansumit.value) {
return return
} }
//
// 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)
// }
// })
// })
let info = [] let info = []
@ -2094,7 +2089,7 @@
directiveName: '' // directiveName directiveName: '' // directiveName
})) }))
})) }))
console.log("wtf",res) console.log("wtf", res)
res.result.serviceList.forEach((res : any) => { res.result.serviceList.forEach((res : any) => {
timearr.value[res.positioning].children[res.positioningLong] = res; timearr.value[res.positioning].children[res.positioningLong] = res;
}) })
@ -2123,10 +2118,10 @@
} }
const savePackagelist = ref([]); const savePackagelist = ref([]);
onMounted(() => { onMounted(() => {
// console.log("jiance",uni.getStorageSync('serverUrl')) // console.log("jiance",uni.getStorageSync('serverUrl'))
// uni.setStorageSync('serverUrl', `http://localhost:8091/nursing-unit_101`); // uni.setStorageSync('serverUrl', `http://localhost:8091/nursing-unit_101`);
savePackagelist.value = uni.getStorageSync('Packagelist') || [] savePackagelist.value = uni.getStorageSync('Packagelist') || []
let res = uni.getStorageSync('saveTree') let res = uni.getStorageSync('saveTree')

View File

@ -213,19 +213,7 @@
</view> </view>
</view> </view>
<view style="display: flex;flex-wrap: wrap;width: 60%;"> <view style="display: flex;flex-wrap: wrap;width: 60%;">
<view style=" <view class="moban-photo" v-for="(item,index) in albumlist" :key="index">
width: 40%;
height: 150rpx;
margin-right: 4%;
margin-top: 3%;
background-color: #F9F9F9;
display: flex;
justify-content: center;
align-items: center;
border-radius: 20rpx;
border-radius: 0.6vw;
overflow: hidden;
position: relative;" v-for="(item,index) in albumlist" :key="index">
<view <view
style="width: 1.6vw;height: 1.6vw;z-index: 20;position: absolute; right: 0.1vw;top: 0.1vw;background: rgba(255, 255, 255, 0.7);display: flex;justify-content: center;align-items: center;" style="width: 1.6vw;height: 1.6vw;z-index: 20;position: absolute; right: 0.1vw;top: 0.1vw;background: rgba(255, 255, 255, 0.7);display: flex;justify-content: center;align-items: center;"
@click.stop="deldex=index;open=1"> @click.stop="deldex=index;open=1">
@ -234,17 +222,9 @@
<image style="width: 100%;height: 100%;" :src="item?item:'/static/zhanwei.png'" mode="aspectFill" <image style="width: 100%;height: 100%;" :src="item?item:'/static/zhanwei.png'" mode="aspectFill"
@click="previewImage(item,index,albumlist)" /> @click="previewImage(item,index,albumlist)" />
</view> </view>
<view style="width: 40%;height: 150rpx;margin-right: 4%;margin-top: 3%;" v-if="albumlist.length<4" @click="uplod"> <view style="width: 40%;height: 150rpx;margin-right: 4%;margin-top: 3%;" v-if="albumlist.length<4"
<view style=" @click="uplod(0)">
width: 100%; <view class="moban-photo-special">
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color:#fafdff ;
border: 1rpx solid #c4ebff;
border-radius: 20rpx;">
<image style="width: 50rpx;height: 50rpx;margin-bottom: 5rpx;" <image style="width: 50rpx;height: 50rpx;margin-bottom: 5rpx;"
src="/static/index/warehouse/procurement/picking/addphoto.png" /> src="/static/index/warehouse/procurement/picking/addphoto.png" />
<view style="color: #78B1EB;font-size: 25rpx;"> <view style="color: #78B1EB;font-size: 25rpx;">
@ -380,7 +360,9 @@
</view> </view>
<view class="photowall-other-one" v-if="topbuttontarget==1"> <view class="photowall-other-one" v-if="topbuttontarget==1">
<view <view
style="width: 100%;height: 70%;display: flex;flex-direction: column;justify-content: center;align-items: center;background-color:#fafdff ;border: 1rpx solid #78B1EB;border-radius: 30rpx;"> style="width: 100%;height: 70%;display: flex;flex-direction: column;justify-content: center;align-items: center;background-color:#fafdff ;border: 1rpx solid #78B1EB;border-radius: 30rpx;"
@click="uplod(1)"
>
<image style="width: 70rpx;height: 70rpx;margin-bottom: 5rpx;" <image style="width: 70rpx;height: 70rpx;margin-bottom: 5rpx;"
src="/static/index/warehouse/procurement/picking/addphoto.png" /> src="/static/index/warehouse/procurement/picking/addphoto.png" />
<view style="color: #78B1EB;"> <view style="color: #78B1EB;">
@ -1141,7 +1123,7 @@
console.log("///", res); console.log("///", res);
opengys.value = false; opengys.value = false;
} }
const openjianhuoclick = () => { const openjianhuoclick = () => {
if (showvalue.value.jianhuobtn == false) { if (showvalue.value.jianhuobtn == false) {
return return
@ -1464,9 +1446,9 @@
} }
const InvoicingList = ref([]) const InvoicingList = ref([])
const queryInvo = (index:number) => { const queryInvo = (index : number) => {
queryCgdInfoList(form).then(res => { queryCgdInfoList(form).then(res => {
InvoicingList.value=res.result.records; InvoicingList.value = res.result.records;
clickmiddle(index); clickmiddle(index);
}) })
} }
@ -1537,17 +1519,12 @@
const badshow = ref(false); const badshow = ref(false);
const donghuacs = ref(false) const donghuacs = ref(false)
const bebad = () => { const bebad = () => {
// console.log("ceshi",Number(plsbuy.value[lefttarget.value]?.status))
// console.log("right?",plsbuy.value[lefttarget.value])
if (!Number(plsbuy.value[lefttarget.value]?.status) && plsbuy.value.length) { if (!Number(plsbuy.value[lefttarget.value]?.status) && plsbuy.value.length) {
badshow.value = true; badshow.value = true;
moreindex.value = -1; moreindex.value = -1;
donghuacs.value = false; donghuacs.value = false;
setTimeout(() => donghuacs.value = true, 50) setTimeout(() => donghuacs.value = true, 50)
} }
// return
} }
const zuofei = () => { const zuofei = () => {
voidedCgdMain({ id: plsbuy.value[lefttarget.value].id }).then((res : any) => { voidedCgdMain({ id: plsbuy.value[lefttarget.value].id }).then((res : any) => {
@ -1573,26 +1550,27 @@
donghuaopo.value = false; donghuaopo.value = false;
setTimeout(() => { setTimeout(() => {
donghuaopo.value = true; donghuaopo.value = true;
console.log("zzz", donghuaopo.value)
}, 100) }, 100)
} }
// //
const albumlist = ref([]) const albumlist = ref([])
const uplod = () => { const uplod = (type:number) => {
uni.chooseImage({ uni.chooseImage({
count: 1, //9 count: 1, //9
sizeType: ['compressed'], // sizeType: ['compressed'], //
sourceType: ['camera'], // sourceType: ['camera'], //
crop: {
quality: 60
},
success: (e) => { success: (e) => {
let ar = JSON.stringify(e.tempFilePaths) let ar = JSON.stringify(e.tempFilePaths)
uni.compressImage({ uni.compressImage({
src: JSON.parse(ar)[0], src: JSON.parse(ar)[0],
quality: 60, quality: 60,
success: res => { success: res => {
albumlist.value.push(res.tempFilePath) if(!type){
albumlist.value.push(res.tempFilePath)
}else if(type==1){
console.log("成功!")
}
} }
}) })
} }
@ -3152,4 +3130,31 @@
font-size: 34rpx; font-size: 34rpx;
color: #999; color: #999;
} }
.moban-photo {
width: 40%;
height: 150rpx;
margin-right: 4%;
margin-top: 3%;
background-color: #F9F9F9;
display: flex;
justify-content: center;
align-items: center;
border-radius: 20rpx;
border-radius: 0.6vw;
overflow: hidden;
position: relative;
}
.moban-photo-special {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #fafdff;
border: 1rpx solid #c4ebff;
border-radius: 20rpx;
}
</style> </style>