This commit is contained in:
bb_pan 2025-07-19 14:09:33 +08:00
parent 3f3638bcab
commit dc44e00aec
4 changed files with 71 additions and 31 deletions

View File

@ -3,7 +3,8 @@
<canvas class="scroll-view" id="mycanvas" canvas-id="mycanvas" <canvas class="scroll-view" id="mycanvas" canvas-id="mycanvas"
@touchstart="touchstart" @touchstart="touchstart"
@touchmove="touchmove" @touchmove="touchmove"
@touchend="touchend"/> @touchend="touchend"
disable-scroll="true"/>
<view class="fun-box"> <view class="fun-box">
<view class="fun-box-btn clear flex" @click="clear"> <view class="fun-box-btn clear flex" @click="clear">
<text>清空</text> <text>清空</text>
@ -76,31 +77,67 @@
} }
} }
// //
const draw = ()=> { // const draw = ()=> {
let point1 = points[0] // let point1 = points[0]
let point2 = points[1] // let point2 = points[1]
points.shift() // points.shift()
canvaCtx.moveTo(point1.X, point1.Y) // canvaCtx.moveTo(point1.X, point1.Y)
canvaCtx.lineTo(point2.X, point2.Y) // canvaCtx.lineTo(point2.X, point2.Y)
canvaCtx.stroke() // canvaCtx.stroke()
canvaCtx.draw(true) // canvaCtx.draw(true)
// }
const draw = () => {
if (points.length < 2) return;
canvaCtx.beginPath();
canvaCtx.moveTo(points[0].X, points[0].Y);
for (let i = 1; i < points.length; i++) {
canvaCtx.lineTo(points[i].X, points[i].Y);
}
canvaCtx.stroke();
canvaCtx.draw(true);
//
points = [points[points.length - 1]]; //
} }
// //
const touchend = e=>{ const touchend = e=>{
points = []; points = [];
} }
// //
const clear = ()=>{ // const clear = ()=>{
return uni.getSystemInfo() // return uni.getSystemInfo()
.then(res=>{ // .then(res=>{
canvaCtx.clearRect(0, 0, res.windowWidth, res.windowHeight); // canvaCtx.clearRect(0, 0, res.windowWidth, res.windowHeight);
canvaCtx.draw(true); // canvaCtx.draw(true);
return res // return res
}) // })
.catch(err=>{ // .catch(err=>{
// console.log(err); // // console.log(err);
}) // })
} // }
const clear = () => {
return new Promise((resolve, reject) => {
uni.createSelectorQuery()
.in(_this)
.select('#mycanvas') // id canvas
.fields({ size: true, rect: true }, data => {
if (!data) {
reject('Canvas not found')
return
}
const { width, height } = data
// canvas
canvaCtx.clearRect(0, 0, width, height)
canvaCtx.draw(true)
resolve()
})
.exec()
})
}
// //
const confirm = ()=>{ const confirm = ()=>{
uni.canvasToTempFilePath({ canvasId: 'mycanvas', }, _this, _this.parent) uni.canvasToTempFilePath({ canvasId: 'mycanvas', }, _this, _this.parent)

View File

@ -257,7 +257,7 @@ const uploadSignUrl = async (base64Data) => {
<style lang="scss" scoped> <style lang="scss" scoped>
.img { .img {
height: 300px; height: 500px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -294,7 +294,7 @@ const uploadSignUrl = async (base64Data) => {
} }
} }
.signature-page { .signature-page {
min-height: 99vh; min-height: 94vh;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
position: relative; position: relative;

View File

@ -79,24 +79,24 @@
<div class="cont">{{ item.leasePerson }}</div> <div class="cont">{{ item.leasePerson }}</div>
</uni-col> </uni-col>
</uni-row> </uni-row>
<uni-row :gutter="24"> <!-- <uni-row :gutter="24">
<uni-col :span="6">预领数量</uni-col> <uni-col :span="6">预领数量</uni-col>
<uni-col :span="18"> <uni-col :span="18">
<div class="cont">{{ item.preCountNum }}</div> <div class="cont">{{ item.preCountNum }}</div>
</uni-col> </uni-col>
</uni-row> </uni-row> -->
<uni-row :gutter="24"> <uni-row :gutter="24">
<uni-col :span="6">已领数量</uni-col> <uni-col :span="6">出库数量</uni-col>
<uni-col :span="18"> <uni-col :span="18">
<div class="cont">{{ item.alNum }}</div> <div class="cont">{{ item.alNum }}</div>
</uni-col> </uni-col>
</uni-row> </uni-row>
<uni-row :gutter="24"> <!-- <uni-row :gutter="24">
<uni-col :span="6">待领数量</uni-col> <uni-col :span="6">待领数量</uni-col>
<uni-col :span="18"> <uni-col :span="18">
<div class="cont">{{ item.preCountNum - item.alNum }}</div> <div class="cont">{{ item.preCountNum - item.alNum }}</div>
</uni-col> </uni-col>
</uni-row> </uni-row> -->
</uni-swipe-action-item> </uni-swipe-action-item>
</uni-swipe-action> </uni-swipe-action>
</view> </view>
@ -116,11 +116,14 @@ import { onBackPress } from '@dcloudio/uni-app'
const total = ref(0) // const total = ref(0) //
const active = ref(1) // tap const active = ref(1) // tap
const tableList = ref([]) // const tableList = ref([]) //
const dateArray = ref([]) // const dateArray = ref([
new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000).toISOString().split('T')[0],
new Date().toISOString().split('T')[0],
]) //
// //
const queryParams = ref({ const queryParams = ref({
startTime: '', // startTime: dateArray.value[0] || '', //
endTime: '', // endTime: dateArray.value[1] || '', //
keyWord: '', // keyWord: '', //
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,

View File

@ -29,7 +29,7 @@ export const getBackInfo = (id,keyWord) => {
export const getProjectList = (data) => { export const getProjectList = (data) => {
return http({ return http({
method: 'POST', method: 'POST',
url: '/material/select/getProjectInfo', url: '/material/select/getProjectList',
data:data, data:data,
}) })
} }