瀏覽代碼

yxy代码

yzx 5 月之前
父節點
當前提交
71d85e1726
共有 3 個文件被更改,包括 56 次插入31 次删除
  1. 1 3
      app/admin/controller/borrow/BorrowApp.php
  2. 2 2
      uniapp/pages/index/detail.vue
  3. 53 26
      uniapp/pages/teacher/application.vue

+ 1 - 3
app/admin/controller/borrow/BorrowApp.php

@@ -329,9 +329,7 @@ class BorrowApp extends Backend
         }
         $row['accessories'] = Db::name('accessories')->where('borrow_id', $id)->find();
         $row['asset'] = $rows;
-        $row['sign'] = Db::name('borrow_img')->where('borrow_id', $id)->select();
-
-        $row['usersign'] = Db::name('sign')->where('uid', $this->auth->id)->value('sign');
+        $row['borrowImg'] = Db::name('borrow_img')->where('borrow_id', $id)->select();
 
         $this->success('', [
             'row' => $row

+ 2 - 2
uniapp/pages/index/detail.vue

@@ -94,7 +94,7 @@
 						<view class="" v-if="datailData.status == 0">
 							<view class="detail_tou">电子签名:</view>
 							<view class="" style="float: left;">
-								<image style="width: 200px; height: 200px; background-color: #eeeeee;" :src="'https://yxy.glut.cc/' + datailData.usersign"></image>
+								<image style="width: 200px; height: 200px; background-color: #eeeeee;" :src="'https://yxy.glut.cc/' + datailData.sign"></image>
 							</view>
 						</view>
 						<uv-line></uv-line>
@@ -527,7 +527,7 @@
 		datailData.value = xiangqinData.value.data.row
 		 
 		wx.hideLoading()
-		const updatedArray = datailData.value.sign.map(item => ({
+		const updatedArray = datailData.value.borrowImg.map(item => ({
 			...item,
 			url: `${baseUrl}${item.url}`,
 			url2: `${item.url}`,

+ 53 - 26
uniapp/pages/teacher/application.vue

@@ -60,6 +60,39 @@
 								<superwei-combox :candidates="candidates" :isJSON="true" keyName="value"
 									placeholder="请选择或输入" v-model="item.model" @input="input_json" @select="select_json">
 								</superwei-combox>
+
+								<!-- <uv-form-item label="预计归还时间" required="required" borderBottom  prop="expected_end_time" labelWidth="100" @click="showDateSelect" ref="formdata">
+									<uv-input v-model="formdata.expected_end_time" disabled disabledColor="#ffffff"  border="none"></uv-input>
+									<uv-datetime-picker :minDate="new Date()" ref="datetimePicker" mode="datetime" @confirm="showDateconfirm"></uv-datetime-picker>
+									<template v-slot:right>
+										<uv-icon name="arrow-right"></uv-icon>
+									</template><strong></strong>
+								</uv-form-item> -->
+
+								<!-- <uni-combox label="所在城市" :candidates="candidates" placeholder="请选择所在城市" v-model="item.model"></uni-combox> -->
+								<!-- <superwei-combox :candidates="candidates" :isJSON="true" keyName="model" placeholder="请选择或输入"
+								    v-model="item.model" @input="input_json" @select="select_json">
+								</superwei-combox> -->
+								<!-- <uni-combox :candidates="candidates" placeholder="请选择仪器" v-model="item.model"></uni-combox> -->
+								<!-- <picker @change="bindPickerChange" :value="index" :range="item.origins">
+									<view class="uni-input">{{origins[index]}}</view>
+								</picker> -->
+
+								<!-- <uni-section title="本地数据" type="line">
+									<view class="uni-px-5 uni-pb-5">
+										<uni-data-picker
+											placeholder="请选择班级"
+											popup-title="请选择"
+											:localdata="candidates"
+											v-model="item.model"
+											@change="onchange"
+											@nodeclick="onnodeclick"
+											@popupopened="onpopupopened"
+											@popupclosed="onpopupclosed"
+											@inputclick="inputclick"
+										></uni-data-picker>
+									</view>
+								</uni-section> -->
 								<uv-input v-model="item.num" placeholder="数量"></uv-input>
 								<button class="button" size="mini" type="default"
 									@click="onDelArrayItem(idx)">删除</button>
@@ -335,7 +368,7 @@ export default {
 			this.pImg = data
 		})
 		uni.$on('q-sign', data => {
-			// console.log('tempFilePath', data);
+			console.log('tempFilePath', data);
 			formdata.sign = data.tempFilePath;
 
 			const ctx2 = uni.createCanvasContext('myCanvasr');
@@ -350,39 +383,33 @@ export default {
 				})
 			);
 			// 获取拼接后的图片路径
-
 			const res = requestFileApi(
 				'/admin/ajax/upload?server=1',
 				data.tempFilePath
 			).then(d => {
 				var responseObject = JSON.parse(d);
 				var fileUrl = responseObject.data.file.url;
-				// // 传图片接口;
-				// const returndata = requestApi(
-				// 	'admin/ajax/saveSign?server=1',
-				// 	{
-				// 		sign: fileUrl
-				// 	},
-				// 	'POST'
-				// ).then(ret => {
-				// 	this.signShow = true;
-				// })
+				// 传图片接口;
+				formdata.sign =fileUrl
 			})
 		})
-		// // 获取电子签字
-		// const returndata = requestApi(
-		// 	'admin/ajax/getSign?server=1', 'GET'
-		// ).then(ret => {
-		// 	console.log(ret)
-		// 	if (ret.code == 1) {
-		// 		this.signSrc = "https://yxy.glut.cc/" + ret.data.file.sign
-
-		// 		if (ret.data.file.sign !== '') {
-		// 			this.signShow = true
-		// 		}
-		// 	}
-		// })
-
+		
+		if(formdata.sign ==null){
+			// 获取电子签字
+			const returndata = requestApi(
+				'admin/ajax/getSign?server=1', 'GET'
+			).then(ret => {
+				console.log(ret)
+				if (ret.code == 1) {
+					formdata.sign = "https://yxy.glut.cc/" + ret.data.sign[0].sign
+					if (ret.data.sign[0].sign !== '') {
+						this.signShow = true
+					}
+				}
+			})
+		}
+		
+	
 		const getUserData = requestApi(
 			'admin/borrow.BorrowApp/add?server=1', 'GET'
 		).then(ret => {