Administrator 2 éve
szülő
commit
4072f2ba8e

+ 2 - 14
app.json

@@ -19,24 +19,20 @@
     "pages/xqzggzs/xqzggzs",
     "pages/xqzggzs2/xqzggzs2",
     "pages/xunjian/xunjian",
-    "pages/xunjiancz/xunjiancz"
-
+    "pages/xunjiancz/xunjiancz",
+    "pages/qianming/qianming"
   ],
-
-
   "permission": {
     "scope.userLocation": {
       "desc": "小道要获取你的位置信息"
     }
   },
-
   "window": {
     "backgroundTextStyle": "light",
     "navigationBarBackgroundColor": "#fff",
     "navigationBarTitleText": "Weixin",
     "navigationBarTextStyle": "black"
   },
-
   "tabBar": {
     "index": "-1",
     "color": "#737373",
@@ -58,14 +54,6 @@
       }
     ]
   },
-
-
-
-
-
-
-
   "style": "v2",
   "sitemapLocation": "sitemap.json"
-  
 }

+ 4 - 2
base/httputil.js

@@ -6,8 +6,10 @@
 
 
 
-let BASE_Server = "http://192.168.1.100:8080"
-let BASE_Server_Login = "http://192.168.1.100:9200"
+let BASE_Server = "http://192.168.1.102:8080"
+let BASE_Server_Login = "http://192.168.1.102:9200"
+// let BASE_Server = "http://192.168.54.126:8080"
+// let BASE_Server_Login = "http://192.168.54.126:9200"
 let app = getApp()
 
 

+ 16 - 0
base/tools.js

@@ -0,0 +1,16 @@
+const uuid = function () {
+  var s = [];
+  var hexDigits = "0123456789abcdef";
+  for (var i = 0; i < 36; i++) {
+    s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
+  }
+  s[14] = "4"; // bits 12-15 of the time_hi_and_version field to 0010
+  s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1); // bits 6-7 of the clock_seq_hi_and_reserved to 01
+  s[8] = s[13] = s[18] = s[23] = "-";
+
+  var uuid = s.join("");
+  return uuid
+}
+module.exports= {
+  uuid
+}

+ 120 - 0
pages/qianming/qianming.js

@@ -0,0 +1,120 @@
+var content = null;
+var touchs = [];
+var canvasw = 0;
+var canvash = 0;
+var that = null;
+
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+  // 画布的触摸移动开始手势响应
+  start: function (event) {
+    // console.log("触摸开始" + event.changedTouches[0].y)
+    // console.log("触摸开始" + event.changedTouches[0].x)
+    //获取触摸开始的 x,y
+    let point = {
+      x: event.changedTouches[0].y,
+      y: event.changedTouches[0].x
+    }
+    touchs.push(point)
+  },
+
+  // 画布的触摸移动手势响应
+  move: function (e) {
+    let point = {
+      x: e.touches[0].y,
+      y: e.touches[0].x
+    }
+    touchs.push(point)
+    if (touchs.length >= 2) {
+      this.draw(touchs)
+    }
+  },
+
+  // 画布的触摸移动结束手势响应
+  end: function (e) {
+    // console.log("触摸结束" + e)
+    //清空轨迹数组
+    for (let i = 0; i < touchs.length; i++) {
+      touchs.pop()
+    }
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    that = this
+    //获得Canvas的上下文
+    content = wx.createCanvasContext('firstCanvas')
+    //设置线的颜色
+    content.setStrokeStyle("#000")
+    //设置线的宽度
+    content.setLineWidth(5)
+    //设置线两端端点样式更加圆润
+    content.setLineCap('round')
+    //设置两条线连接处更加圆润
+    content.setLineJoin('round')
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+    // 获取画布尺寸
+    var query = wx.createSelectorQuery()
+    query.select('#canvas').boundingClientRect()
+    query.exec(function (res) {
+      canvasw = res[0].width;
+      canvash = res[0].height
+    })
+  },
+
+  //绘制
+  draw: function (touchs) {
+    let point1 = touchs[0]
+    let point2 = touchs[1]
+    touchs.shift()
+    content.moveTo(point1.y, point1.x)
+    content.lineTo(point2.y, point2.x)
+    content.stroke()
+    content.draw(true)
+  },
+  //清除操作
+  clearClick: function () {
+    //清除画布
+    content.clearRect(0, 0, canvasw, canvash)
+    content.draw(true)
+  },
+  //保存图片
+  saveClick: function () {
+    var that = this
+    wx.canvasToTempFilePath({
+      canvasId: 'firstCanvas',
+      success: function (res) {
+        //打印图片路径
+        var path = res.tempFilePath
+        //上传图片
+        that.uploadSignPic(path)
+        console.log(path)
+
+
+      }
+    })
+  },
+
+
+  /**
+   * 上传签名图片
+   */
+  uploadSignPic: function (path) {
+    //具体实现的业务逻辑
+  }
+
+})

+ 3 - 0
pages/qianming/qianming.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 18 - 0
pages/qianming/qianming.wxml

@@ -0,0 +1,18 @@
+<!-- 手写界面 -->
+<view class='hand_writing_container'>
+  <view class="tips_title">请在区域内进行签名</view>
+  <view id="canvas" class="canvas">
+    <canvas class='firstCanvas' canvas-id="firstCanvas" bindtouchmove='move' bindtouchstart='start' bindtouchend='end' disable-scroll='true'>
+    </canvas>
+  </view>
+  <view class="btn_container">
+    <view class="btn clean" bindtap="clearClick">
+      <image src="/image/clear.png"></image>
+      <text>内容清除</text>
+    </view>
+    <view class="btn submit" bindtap="saveClick">
+      <image src="/image/submit.png"></image>
+      <text>确认提交</text>
+    </view>
+  </view>
+</view>

+ 74 - 0
pages/qianming/qianming.wxss

@@ -0,0 +1,74 @@
+.hand_writing_container {
+  width: 100%;
+  padding: 5.503vh 8.1761vh 0;
+  box-sizing: border-box;
+}
+
+.tips_title {
+  height: 4.72vh;
+  line-height: 4.72vh;
+  margin-bottom: 3.459vh;
+  font-size: 4.71698vh;
+  font-family: Source Han Sans CN;
+  font-weight: 500;
+  color: rgba(45, 45, 45, 1);
+}
+
+.canvas {
+  width: 100%;
+  height: 66.194968vh;
+  margin-bottom: 3.7735849vh;
+  box-sizing: border-box;
+  border: 1rpx dashed black;
+}
+
+.firstCanvas {
+  background-color: white;
+  width: 100%;
+  height: 100%;
+}
+
+.btn_container {
+  display: flex;
+  align-items: center;
+  padding: 0 45.44vh;
+  box-sizing: border-box;
+  justify-content: space-between;
+}
+
+.btn {
+  width: 45.597484vh;
+  height: 13.83647798vh;
+  padding: 0 11vh;
+  box-sizing: border-box;
+  border-radius: 1.572327vh;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.btn image {
+  flex: 0 0 4.71698vh;
+  width: 4.71698vh;
+  height: 4.71698vh;
+  display: block;
+  margin-right: 1.88679vh;
+}
+
+.btn text {
+  flex: 0 0 auto;
+  height: 4.717vh;
+  line-height: 4.717vh;
+  font-size: 4.71698vh;
+  font-family: Source Han Sans CN;
+  font-weight: 400;
+  color: rgba(255, 255, 255, 1);
+}
+
+.clean {
+  background-color: #07c160;
+}
+
+.submit {
+  background-color: #ff3d33;
+}

+ 9 - 1
pages/xqzggzs2/xqzggzs2.js

@@ -12,7 +12,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
+    console.log(options.logId)
   },
 
   /**
@@ -62,5 +62,13 @@ Page({
    */
   onShareAppMessage() {
 
+  },
+
+  bindQianming(){
+    wx.navigateTo({
+      url: '../qianming/qianming',
+    })
   }
+
+
 })

+ 1 - 1
pages/xqzggzs2/xqzggzs2.wxml

@@ -13,7 +13,7 @@
 
 <view class="flex_row mar_top">检查人员:<input type="text" style="width: 190rpx;"/><text>编号:</text><input type="text" style="width: 190rpx;"/></view>
 <view class="flex_row mar_top2"><text style="opacity: 0;">检查人员:</text><input type="text" style="width: 190rpx;"/>编号:<input type="text" style="width: 190rpx;"/></view>
-<view class="flex_row mar_top2">被复查单位负责人(签名):<input type="text" style="width: 220rpx;"/></view>
+<view class="flex_row mar_top2" bindtap="bindQianming">被复查单位负责人(签名):<input type="text" style="width: 220rpx;"/></view>
 <view class="flex_row mar_top2" style="text-align: right;"><input type="text" style="width: 370rpx;"/>部门(印章)</view>
 <view class="flex_row mar_top2" style="text-align: right;"><input type="number" style="width: 100rpx;"/>年<input type="number" style="width: 100rpx;"/>月<input type="number" style="width: 100rpx;"/>日</view>
 

+ 11 - 3
pages/xunjian/xunjian.js

@@ -336,9 +336,17 @@ Page({
   },
   submitXujianSuccess(res) {
     if (res.code == 200) {
-      wx.navigateTo({
-        url: '../xqzggzs2/xqzggzs2?logId='+res.logId,
-      })
+      if(res.data.haveXQZG == true){
+        //有限期整改的东西,去通知书页面
+        wx.navigateTo({
+          url: '../xqzggzs2/xqzggzs2?logId='+res.data.logId,
+        })
+      }else{
+        // 直接返回详情页
+        wx.navigateTo({
+          url: '../details/details?busEnterpriseId='+this.data.busEnterpriseId,
+        })
+      }
     } else {
       wx.showToast({
         title: res.msg,