Merge branch 'main' of http://47.115.223.229:8888/yangjun/hldy_app_mini
This commit is contained in:
commit
4b36343dde
|
|
@ -986,54 +986,54 @@
|
|||
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 positioning = timearr.value[indexsave.value[0]].positioning;
|
||||
|
||||
|
||||
|
||||
|
||||
// 解析原始时间(健壮地 trim)
|
||||
const parseTime = (t) => {
|
||||
const parts = String(t || '').split(':').map(s => s.trim());
|
||||
const h = Number(parts[0] ?? 0);
|
||||
const m = Number(parts[1] ?? 0);
|
||||
return {
|
||||
hour: Number.isFinite(h) ? h : 0,
|
||||
minute: Number.isFinite(m) ? m : 0
|
||||
};
|
||||
const parts = String(t || '').split(':').map(s => s.trim());
|
||||
const h = Number(parts[0] ?? 0);
|
||||
const m = Number(parts[1] ?? 0);
|
||||
return {
|
||||
hour: Number.isFinite(h) ? h : 0,
|
||||
minute: Number.isFinite(m) ? m : 0
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
const sOrig = parseTime(startTime);
|
||||
const eOrig = parseTime(endTime);
|
||||
|
||||
|
||||
// 计算时长(分钟)。若发生负值,认为跨天(加 24*60)
|
||||
let duration = (eOrig.hour * 60 + eOrig.minute) - (sOrig.hour * 60 + sOrig.minute);
|
||||
if (duration < 0) duration += 24 * 60; // 假设结束是在次日或跨日
|
||||
|
||||
|
||||
// 解析新的起始分钟和小时(positioning 可能是字符串)
|
||||
const newStartMin = Number(String(newtagName).trim());
|
||||
const newHour = Number(String(positioning).trim());
|
||||
|
||||
|
||||
// 校验
|
||||
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) {
|
||||
throw new Error('positioning 必须是有效小时(数字或数字字符串)');
|
||||
throw new Error('positioning 必须是有效小时(数字或数字字符串)');
|
||||
}
|
||||
|
||||
|
||||
// 计算新的起止总分钟
|
||||
const newStartTotal = newHour * 60 + newStartMin;
|
||||
const newEndTotal = newStartTotal + duration;
|
||||
|
||||
|
||||
// 处理跨小时/跨天
|
||||
const newEndHour = Math.floor(newEndTotal / 60) % 24; // 保持在 0-23
|
||||
const newEndMin = newEndTotal % 60;
|
||||
|
||||
|
||||
// 格式化字符串
|
||||
const pad2 = (n) => String(n).padStart(2, '0');
|
||||
|
||||
|
||||
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 =
|
||||
`${String(newEndHour)}:${pad2(newEndMin)}`;
|
||||
`${String(newEndHour)}:${pad2(newEndMin)}`;
|
||||
// const rest = startTime.split(":")[1]; // ":20"
|
||||
// const rest0 = endTime.split(":")[1];; // ":20"
|
||||
// let many = Number(rest0) - Number(rest);
|
||||
|
|
@ -1575,9 +1575,9 @@
|
|||
const shakyTable = ref(false);
|
||||
const reldata = ref([]);
|
||||
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) => {
|
||||
|
||||
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
}
|
||||
|
|
@ -1804,6 +1804,11 @@
|
|||
immediateFileFocus: "",
|
||||
netImmediateFile: "",
|
||||
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;
|
||||
|
|
@ -1812,9 +1817,9 @@
|
|||
index1: saveEditIndex.value.index1
|
||||
}
|
||||
whereEvent(data);
|
||||
console.log("zou",haveValue)
|
||||
console.log("zou", haveValue)
|
||||
if (haveValue) {
|
||||
|
||||
|
||||
editDirective(param).then((res : any) => {
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
|
|
@ -1860,7 +1865,7 @@
|
|||
// 实现即时指令动画
|
||||
cleansettimeout.value = setTimeout(() => {
|
||||
bottomItems.value[0].target = `#fff`;
|
||||
console.log("即时指令看看进入了啥",pushValue)
|
||||
console.log("即时指令看看进入了啥", pushValue)
|
||||
addInstant(pushValue).then((res : any) => {
|
||||
if (res.success) {
|
||||
geteverything()
|
||||
|
|
@ -1924,7 +1929,7 @@
|
|||
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')}`
|
||||
console.log("allobject",allobject)
|
||||
console.log("allobject", allobject)
|
||||
let param = {
|
||||
id: haveValue ? timearr.value[saveEditIndex.value.index0].children[saveEditIndex.value.index1].id : "",
|
||||
nuId: uni.getStorageSync('nuId'),
|
||||
|
|
@ -1952,6 +1957,11 @@
|
|||
immediateFileFocus: allobject.immediateFileFocus,
|
||||
netImmediateFile: allobject.netImmediateFile,
|
||||
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;
|
||||
|
|
@ -1960,7 +1970,7 @@
|
|||
index1: saveEditIndex.value.index1
|
||||
}
|
||||
whereEvent(data);
|
||||
console.log("日常指令看看进入了啥",param)
|
||||
console.log("日常指令看看进入了啥", param)
|
||||
if (haveValue) {
|
||||
editDirective(param).then((res : any) => {
|
||||
if (res.success) {
|
||||
|
|
@ -1980,21 +1990,6 @@
|
|||
if (!cansumit.value) {
|
||||
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 = []
|
||||
|
||||
|
|
@ -2094,7 +2089,7 @@
|
|||
directiveName: '' // 默认的 directiveName
|
||||
}))
|
||||
}))
|
||||
console.log("wtf",res)
|
||||
console.log("wtf", res)
|
||||
res.result.serviceList.forEach((res : any) => {
|
||||
timearr.value[res.positioning].children[res.positioningLong] = res;
|
||||
})
|
||||
|
|
@ -2123,10 +2118,10 @@
|
|||
}
|
||||
const savePackagelist = ref([]);
|
||||
onMounted(() => {
|
||||
|
||||
|
||||
// console.log("jiance一下",uni.getStorageSync('serverUrl'))
|
||||
// uni.setStorageSync('serverUrl', `http://localhost:8091/nursing-unit_101`);
|
||||
|
||||
|
||||
savePackagelist.value = uni.getStorageSync('Packagelist') || []
|
||||
let res = uni.getStorageSync('saveTree')
|
||||
|
||||
|
|
|
|||
|
|
@ -213,19 +213,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view style="display: flex;flex-wrap: wrap;width: 60%;">
|
||||
<view style="
|
||||
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 class="moban-photo" v-for="(item,index) in albumlist" :key="index">
|
||||
<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;"
|
||||
@click.stop="deldex=index;open=1">
|
||||
|
|
@ -234,17 +222,9 @@
|
|||
<image style="width: 100%;height: 100%;" :src="item?item:'/static/zhanwei.png'" mode="aspectFill"
|
||||
@click="previewImage(item,index,albumlist)" />
|
||||
</view>
|
||||
<view style="width: 40%;height: 150rpx;margin-right: 4%;margin-top: 3%;" v-if="albumlist.length<4" @click="uplod">
|
||||
<view style="
|
||||
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;">
|
||||
<view style="width: 40%;height: 150rpx;margin-right: 4%;margin-top: 3%;" v-if="albumlist.length<4"
|
||||
@click="uplod(0)">
|
||||
<view class="moban-photo-special">
|
||||
<image style="width: 50rpx;height: 50rpx;margin-bottom: 5rpx;"
|
||||
src="/static/index/warehouse/procurement/picking/addphoto.png" />
|
||||
<view style="color: #78B1EB;font-size: 25rpx;">
|
||||
|
|
@ -380,7 +360,9 @@
|
|||
</view>
|
||||
<view class="photowall-other-one" v-if="topbuttontarget==1">
|
||||
<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;"
|
||||
src="/static/index/warehouse/procurement/picking/addphoto.png" />
|
||||
<view style="color: #78B1EB;">
|
||||
|
|
@ -1141,7 +1123,7 @@
|
|||
console.log("///", res);
|
||||
opengys.value = false;
|
||||
}
|
||||
|
||||
|
||||
const openjianhuoclick = () => {
|
||||
if (showvalue.value.jianhuobtn == false) {
|
||||
return
|
||||
|
|
@ -1464,9 +1446,9 @@
|
|||
|
||||
}
|
||||
const InvoicingList = ref([])
|
||||
const queryInvo = (index:number) => {
|
||||
queryCgdInfoList(form).then(res => {
|
||||
InvoicingList.value=res.result.records;
|
||||
const queryInvo = (index : number) => {
|
||||
queryCgdInfoList(form).then(res => {
|
||||
InvoicingList.value = res.result.records;
|
||||
clickmiddle(index);
|
||||
})
|
||||
}
|
||||
|
|
@ -1537,17 +1519,12 @@
|
|||
const badshow = ref(false);
|
||||
const donghuacs = ref(false)
|
||||
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) {
|
||||
badshow.value = true;
|
||||
moreindex.value = -1;
|
||||
donghuacs.value = false;
|
||||
setTimeout(() => donghuacs.value = true, 50)
|
||||
}
|
||||
// return
|
||||
|
||||
|
||||
}
|
||||
const zuofei = () => {
|
||||
voidedCgdMain({ id: plsbuy.value[lefttarget.value].id }).then((res : any) => {
|
||||
|
|
@ -1573,26 +1550,27 @@
|
|||
donghuaopo.value = false;
|
||||
setTimeout(() => {
|
||||
donghuaopo.value = true;
|
||||
console.log("zzz", donghuaopo.value)
|
||||
}, 100)
|
||||
}
|
||||
// 上传
|
||||
const albumlist = ref([])
|
||||
const uplod = () => {
|
||||
const uplod = (type:number) => {
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['camera'], //从相册选择
|
||||
crop: {
|
||||
quality: 60
|
||||
},
|
||||
success: (e) => {
|
||||
let ar = JSON.stringify(e.tempFilePaths)
|
||||
uni.compressImage({
|
||||
src: JSON.parse(ar)[0],
|
||||
quality: 60,
|
||||
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;
|
||||
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>
|
||||
Loading…
Reference in New Issue