linweizeng 3 anni fa
parent
commit
3ab0ddeb82

+ 2 - 6
App.vue

@@ -159,12 +159,8 @@
 			]
 
 		},
-		onShow: function() {
-			console.log('App Show')
-		},
-		onHide: function() {
-			console.log('App Hide')
-		}
+		onShow: function() {},
+		onHide: function() {}
 
 	}
 </script>

+ 11 - 0
common/pc.js

@@ -0,0 +1,11 @@
+(function() {
+	var u = navigator.userAgent,
+		w = window.innerWidth;
+	if (!u.match(/AppleWebKit.*Mobile.*/) || u.indexOf('iPad') > -1) {
+		var sw = w * 576 / 1920;
+		window.innerWidth = sw < 375 ? 375 : sw;
+		window.onload = function() {
+			window.innerWidth = w;
+		}
+	}
+})();

+ 7 - 0
common/router/modules/routes.js

@@ -209,6 +209,13 @@ const routes = [{
 		meta: {
 			title: '委托暂存',
 		},
+	},
+	{
+		path: "/pages/communication/communication",
+		name: 'communication',
+		meta: {
+			title: '沟通',
+		},
 	}
 ]
 export default routes

+ 7 - 1
common/util/work.js

@@ -173,7 +173,13 @@ export const sh = {
 			description: "任务中心",
 			useCount: 10000,
 			page: 'tousu'
-		},
+		}, {
+			title: "沟通",
+			icon: icon_prefix + "wendang.png",
+			description: "文档中心",
+			useCount: 10000,
+			page: 'communication'
+		}
 		/* {
 		      title:"文档中心",
 		      icon:icon_prefix+"wendang.png",

+ 21 - 88
components/autograph/autograph.vue

@@ -1,13 +1,16 @@
 <template>
 	<view>
 		<slot name="top"></slot>
-		<canvas class="my-canvas-cls" disable-scroll="true" canvas-id="mycanvas" @touchstar.prevent="touchstart"
-			@touchmove.prevent="touchmove" @touchend.prevent="touchend"></canvas>
+		<VueSignaturePad width="100%" height="600rpx" ref="signaturePad" :options="options" disable-scroll="true"
+			class="my-canvas-cls" />
 		<slot name="footer"></slot>
 		<view class="footer" v-if="footerShow">
-			<view class="left" @click.stop="finish">保存</view>
-			<view class="right" @click="clear">清除</view>
-			<view class="close" @click="close">关闭</view>
+			<u-button type="success" @click.stop="finish" size="mini">保存</u-button>
+			<u-button type="warning" @click.stop="clear" size="mini">清除</u-button>
+			<u-button type="error" @click.stop="close" size="mini">关闭</u-button>
+			<!-- <view class="left" @click.stop="finish">保存</view> -->
+			<!-- <view class="right" @click="clear">清除</view> -->
+			<!-- <view class="close" @click="close">关闭</view> -->
 		</view>
 	</view>
 </template>
@@ -21,6 +24,11 @@
 				points: [],
 				//签名图片
 				SignatureImg: '',
+				options: {
+					penColor: "#000",
+					minWidth: 1, //控制画笔最小宽度
+					maxWidth: 1, //控制画笔最大宽度
+				},
 			};
 		},
 		props: {
@@ -31,96 +39,20 @@
 		},
 		watch: {},
 		methods: {
-			// createCanvas()----该方法主要是创建了画布
-			// touchstart()----触摸开始,获取到起点
-			// touchmove()----触摸移动,获取到路径点
-			// touchend()----触摸结束,将未绘制的点清空防止对后续路径产生干扰
-			// draw()----绘制笔迹
-			// clear()----清空画布
-			// finish()----完成绘画并保存到本地
-
-			createCanvas() {
-				//创建绘图对象
-				this.ctx = uni.createCanvasContext('mycanvas', this);
-				//设置画笔样式
-				this.ctx.lineWidth = 4;
-				this.ctx.lineCap = 'round';
-				this.ctx.lineJoin = 'round';
-			},
-			touchstart(e) {
-				let startX = e.changedTouches[0].x;
-				let startY = e.changedTouches[0].y;
-				let startPoint = {
-					X: startX,
-					Y: startY
-				};
-				this.points.push(startPoint);
-				//每次触摸开始,开启新的路径
-				this.ctx.beginPath();
-			},
-			touchmove(e) {
-
-				let moveX = e.changedTouches[0].x;
-				let moveY = e.changedTouches[0].y;
-				let movePoint = {
-					X: moveX,
-					Y: moveY
-				};
-				this.points.push(movePoint); //存点
-				let len = this.points.length;
-				if (len >= 2) {
-					this.draw(); //绘制路径
-				}
-			},
-			touchend() {
-				this.points = [];
-			},
-			draw() {
-				let point1 = this.points[0];
-				let point2 = this.points[1];
-				this.points.shift();
-				this.ctx.moveTo(point1.X, point1.Y);
-				this.ctx.lineTo(point2.X, point2.Y);
-				this.ctx.stroke();
-				this.ctx.draw(true);
-			},
 			clear() {
-				let that = this;
-				uni.getSystemInfo({
-					success: (res) => {
-						let canvasw = res.windowWidth;
-						let canvash = res.windowHeight;
-						that.ctx.clearRect(0, 0, canvasw, canvash);
-						that.ctx.draw(true);
-						this.$emit("clear", res)
-					}
-				});
+				this.$refs.signaturePad.clearSignature();
+				this.$emit("clear", '')
+
 			},
 			finish() {
-				let that = this;
-				uni.canvasToTempFilePath({
-					canvasId: 'mycanvas',
-					success: (res) => {
-						//这里的res.tempFilePath就是生成的签字图片
-						this.$emit("save", res)
-					}
-				});
-
-				uni.getSystemInfo({
-					success: (res) => {
-						let canvasw = res.windowWidth;
-						let canvash = res.windowHeight;
-						that.ctx.clearRect(0, 0, canvasw, canvash);
-						that.ctx.draw(true);
-					}
-				});
+				const {
+					data
+				} = this.$refs.signaturePad.saveSignature()
+				this.$emit("save", data)
 			},
 			close() {
 				this.$emit("close")
 			}
-		},
-		mounted() {
-			this.createCanvas();
 		}
 	};
 </script>
@@ -136,6 +68,7 @@
 		position: relative;
 		background: #F6F6F6;
 		z-index: 9999;
+		border-radius: 8rpx;
 	}
 
 	.footer {

+ 5 - 0
main.js

@@ -1,3 +1,4 @@
+import '@/common/pc.js'
 import Vue from 'vue'
 import App from './App'
 import store from './store'
@@ -18,6 +19,10 @@ import {
 	mdSig
 } from '@/common/util/md.js'
 
+import VueSignaturePad from "vue-signature-pad";
+
+Vue.use(VueSignaturePad);
+
 // 注册缓存器
 Vue.use(MinCache, {
 	timeout: 6

+ 2 - 1
package.json

@@ -7,7 +7,8 @@
     "html2canvas": "^1.4.1",
     "ids": "^1.0.0",
     "uview-ui": "^1.8.4",
-    "vue-barcode": "^1.3.0"
+    "vue-barcode": "^1.3.0",
+    "vue-signature-pad": "^2.0.5"
   },
   "devDependencies": {
     "node-sass": "^7.0.3",

+ 10 - 1
pages.json

@@ -241,7 +241,16 @@
 			}
 
 		}
-	],
+	    ,{
+            "path" : "pages/communication/communication",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
 	"globalStyle": {
 		"mp-alipay": {
 			/* 支付宝小程序特有相关 */

+ 362 - 0
pages/communication/communication.vue

@@ -0,0 +1,362 @@
+<template>
+	<view>
+		<cu-custom bgColor="bg-gradual-pink" :isBack="true">
+			<block slot="backText">返回</block>
+			<block slot="content">检测报告</block>
+		</cu-custom>
+		<view>
+			<view class="cu-form-group">
+				<view class="title">表单编号:</view>
+				<input placeholder="请输入表单编号" v-model="form.biaoDanBianHao" name="input" :disabled="true"></input>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">客户单位名称:</view>
+				<input placeholder="请输入客户单位名称" v-model="form.buMenName" name="input" :disabled="true"></input>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">客户联系人:</view>
+				<input placeholder="请输入客户联系人" v-model="form.keHuLianXiRen" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.keHuLianXiRen != ''" @click="form.keHuLianXiRen = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">委托单号:</view>
+				<input placeholder="请输入委托单号" v-model="form.weiTuoDanHao" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.weiTuoDanHao != ''" @click="form.weiTuoDanHao = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">联系电话:</view>
+				<input placeholder="请输入联系电话" v-model="form.lianXiDianHua" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.lianXiDianHua != ''" @click="form.lianXiDianHua = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">样品名称:</view>
+				<input placeholder="请输入样品名称" v-model="form.yangPinMingCheng" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.yangPinMingCheng != ''" @click="form.yangPinMingCheng = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">样品编号:</view>
+				<input placeholder="请输入样品编号" v-model="form.yangPinBianHao" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.yangPinBianHao != ''" @click="form.yangPinBianHao = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">样品类型:</view>
+				<input placeholder="请输入样品类型" v-model="form.yangPinLeiXing" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.yangPinLeiXing != ''" @click="form.yangPinLeiXing = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">报告编号:</view>
+				<input placeholder="请输入报告编号" v-model="form.baoGaoBianHao" name="input"></input>
+				<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+					v-if="form.baoGaoBianHao != ''" @click="form.baoGaoBianHao = ''"></u-icon>
+			</view>
+			<view class="cu-form-group">
+				<view class="title">沟通类型:</view>
+				<input placeholder="请选择沟通类型" v-model="form.gouTongLeiXing" name="input" disabled></input>
+				<u-button type="success" size="mini" @click="sheetShow = true">选择</u-button>
+			</view>
+			<uni-section title="沟通内容" type="line" padding>
+				<textarea maxlength="-1" v-model="form.gouTongNeiRong" placeholder="意见和建议"></textarea>
+			</uni-section>
+			<!-- 			<uni-section title="上传附件" type="line">
+				<view class="example-body">
+					<uni-file-picker limit="5" file-mediatype="all" @select="select" @progress="progress"
+						@success="success" @fail="fail" @delete="deleteMe" :auto-upload="false" ref="uploadMe">
+					</uni-file-picker>
+				</view>
+			</uni-section> -->
+			<uni-section title="签名" type="line" padding>
+				<view style="width: 100%;">
+					<view style="text-align: right;width: 100%;">
+						<view>
+							<u-button type="primary" size="mini" @click="qianming(0)">
+								签名</u-button>
+							<u-button type="primary" size="mini" @click="deqianming(0)" style="margin-left: 15rpx;"
+								v-if="form.keHu != ''">
+								取消</u-button>
+						</view>
+					</view>
+					<view style="width: 100%;" v-if="form.keHu != ''">
+						<image :src="form.keHu" style="width: 100%;height: 500rpx;border: 1px #eee solid;">
+						</image>
+					</view>
+				</view>
+			</uni-section>
+			<view class="padding flex flex-direction">
+				<button class="cu-btn bg-blue lg" @click="onSubmit">提交</button>
+			</view>
+		</view>
+
+		<u-action-sheet :list="list" v-model="sheetShow" @click="actionSheetCallback"></u-action-sheet>
+		<u-popup mode="center" v-model="popupShow">
+			<view style="padding: 30rpx;background: #FFFFFF;width: 100%;">
+				<view class="cu-form-group ">
+					<view class="title">签名</view>
+				</view>
+				<autograph @save="save" @clear="clear" @close="close"></autograph>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		ACCESS_TOKEN,
+		USER_NAME,
+		USER_INFO
+	} from "@/common/util/constants" // 拉取登录token,userName,userInfo
+	import http from '@/common/service/http.js'
+	import autograph from '@/components/autograph/autograph'
+	export default {
+		components: {
+			autograph
+		},
+		data() {
+			return {
+				sheetShow: false,
+				form: {
+					biaoDanBianHao: '',
+					buMenName: '',
+					keHuDanWeiMingChe: '',
+					keHuLianXiRen: '',
+					weiTuoDanHao: '',
+					lianXiDianHua: '',
+					yangPinMingCheng: '',
+					yangPinBianHao: '',
+					yangPinLeiXing: '',
+					baoGaoBianHao: '',
+					gouTongLeiXing: '',
+					gouTongNeiRong: '',
+					keHu: ''
+				},
+				fuJianShangChuanArray: [],
+				popupShow: false,
+				list: [{
+					text: '投诉'
+				}, {
+					text: '委托单'
+				}, {
+					text: '检测项目'
+				}, {
+					text: '样品信息修改'
+				}, {
+					text: '检测结果'
+				}, {
+					text: '检测报告退回'
+				}, {
+					text: '其它'
+				}],
+				kehuXinXinList: []
+			}
+		},
+		created() {
+			this.getGtbh()
+			this.getKehu()
+		},
+		methods: {
+			actionSheetCallback(e) {
+				this.form.gouTongLeiXing = this.list[e].text
+			},
+			// 获取上传状态
+			select(file) {
+				//读取文件大小
+				var fileSize = file.size;
+				let token = uni.getStorageSync(ACCESS_TOKEN)
+				if (fileSize > 1048576) {
+					that.$message({
+						type: 'error',
+						showClose: true,
+						duration: 3000,
+						message: '文件大于1M!'
+					});
+					return false;
+				}
+				let that = this
+				for (let e in file.tempFilePaths) {
+					console.log("000", file.tempFiles[e].file)
+					var extName = file.tempFiles[e].file.name.substring(file.tempFiles[e].file.name.lastIndexOf('.'));
+					const path = file.tempFilePaths[e];
+					uni.uploadFile({
+						// url: http.apiHosp + 'ibps/platform/v3/file/upload/mobile', //仅为示例,非真实的接口地址
+						url: http.apiHosp + '/ibps/platform/v3/file/upload', //仅为示例,非真实的接口地址
+						filePath: path,
+						name: 'file',
+						formData: {
+							'ext': '.jpg'
+						},
+						header: {
+							'X-Authorization-access_token': token,
+							'X-Authorization-systemid': ''
+						},
+						success: (uploadFileRes) => {
+							let data = JSON.parse(uploadFileRes.data)
+							that.fuJianShangChuanArray.push({
+								fileid: file.tempFiles[e].file.uuid,
+								uploadid: data.data.id
+							})
+						}
+					});
+				}
+				return true;
+				console.log('选择文件:')
+			},
+			// 删除
+			deleteMe(file) {
+				for (let e in this.fuJianShangChuanArray) {
+					if (this.fuJianShangChuanArray[e].fileid == file.tempFile.uuid) {
+						this.fuJianShangChuanArray.splice(e, 1)
+					}
+				}
+			},
+			// 获取上传进度
+			progress(e) {
+				console.log('上传进度:', e)
+			},
+			// 上传成功
+			success(file) {
+
+				console.log('上传成功', file)
+			},
+			// 上传失败
+			fail(e) {
+				console.log('上传失败:', e)
+			},
+			//弹出框显示
+			qianming(index) {
+				this.qianshow = true
+				this.qianIndex = index
+				this.popupShow = true
+			},
+			//清除签名
+			deqianming(index) {
+				if (index == 0) {
+					this.form.keHu = ''
+				}
+			},
+			//保存签名
+			save(val) {
+				if (this.qianIndex == 0) {
+					this.form.keHu = val
+				}
+				this.qianshow = false
+				this.popupShow = false
+			},
+			//清除签名
+			clear(val) {
+				if (this.qianIndex == 0) {
+					this.form.keHu = ''
+				}
+			},
+			/**
+			 * 关闭签名弹窗
+			 */
+			close() {
+				this.popupShow = false
+			},
+
+			//获取样品编号
+			getGtbh(callback) {
+				let smsParams = {
+					alias: "gtbh"
+				};
+				let this_ = this
+				this.$http.post("/ibps/business/v3/jc/sys/getNextIdByAlias", smsParams).then(res => {
+					if (res.data.state == 200) {
+						const data = res.data.data
+						this.form.biaoDanBianHao = data
+					}
+				});
+			},
+			getKehu() {
+				let info = uni.getStorageSync(USER_INFO);
+				if (info) {
+					this.mobile = info.employee.mobile
+				}
+				let sql =
+					`select tk.id_,tk.ke_hu_ming_cheng_,ty.lian_xi_ren_,ty.ke_hu_dian_hua_ from t_khxx tk,t_yxkh ty where tk.ke_hu_ming_cheng_ = ty.id_  and ty.ke_hu_dian_hua_='${this.mobile}' ORDER BY tk.create_time_ desc`
+
+				let requestData = this.$sig(sql)
+
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const data = res.data.variables.data
+						if (data.length > 0) {
+							data.forEach((item, index) => {
+								this.$set(item, 'value', item.ke_hu_ming_cheng_)
+								this.$set(item, 'text', item.lian_xi_ren_)
+							})
+							this.kehuXinXinList = data
+							this.form.keHuDanWeiMingChe = data[0].id_ || ''
+							this.form.buMenName = data[0].lian_xi_ren_
+							this.form.lianXiDianHua = data[0].ke_hu_dian_hua_ || ''
+							this.form.keHuLianXiRen = data[0].lian_xi_ren_ || ''
+						} else {
+							return uni.showToast({
+								title: '该账户暂时不能填写满意度调查,如果需要填写请联系本公司',
+								icon: 'none',
+								duration: 2000
+							})
+						}
+					}
+				})
+			},
+			onSubmit() {
+				let info = uni.getStorageSync(USER_INFO);
+				let useId = info.user.id
+				let detpId = info.org.id
+
+				if (this.form.buMenName == '') {
+					return uni.showToast({
+						title: '该账户暂时不能填写满意度调查,如果需要填写请联系本公司',
+						icon: 'none',
+						duration: 2000
+					})
+				}
+
+				var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
+				var time = nowDate.toJSON().split('T').join(' ').substr(0, 10);
+				let para = {
+					"parameters": [{
+							"key": "defId",
+							"value": "1056942070293331968"
+						},
+						{
+							"key": "version",
+							"value": "0"
+						},
+						{
+							"key": "data",
+							"value": ""
+						}
+					]
+				}
+				this.form.bianZhiRen = useId
+				this.form.bianZhiShiJian = time
+				this.form.bianZhiBuMen = detpId
+				this.form.shiFouGuoShen = "已编制"
+				para.parameters[2].value = JSON.stringify(this.form);
+				let that = this;
+				this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
+					if (res.data.state == 200) {
+						this.$tip.success("提交成功!")
+						this.$Router.replace({
+							name: 'index'
+						})
+					}
+				}).catch((err) => {
+					let msg = ((err.response || {}).data || {}).message || err.data.message || "请求出现错误,请稍后再试"
+					this.$tip.error(msg);
+				});
+			}
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 111 - 68
pages/jiance/manyi.vue

@@ -4,42 +4,66 @@
 			<block slot="backText">返回</block>
 			<block slot="content">客户满意度调查</block>
 		</cu-custom>
-		<!-- 		<view class="cu-form-group margin-top">
-			<view class="title">调查时间:</view>
-			<my-date style="padding: 0px;" v-model="pingJiaShiJian" placeholder="请选择" fields="day" label=""></my-date>
-		</view> -->
 		<view class="cu-form-group">
 			<view class="title">客户单位:</view>
-			<app-select placeholder="请选择调查部门" v-model="buMenId" :dict="kehuXinXinList" space
-				style="position: relative;right: 60rpx;" @change="onChange"></app-select>
+			<input placeholder="请输入客户单位" v-model="buMenName" name="input" :disabled="true"></input>
 		</view>
 		<view class="cu-form-group">
-			<view class="title">评价人联系电话:</view>
-			<input placeholder="请输入评价人联系电话" v-model="lianxidianhua" name="input"></input>
-			<!-- <app-select placeholder="请选择调查部门" v-model="buMenId" :dict="kehuXinXinList" space
-				style="position: relative;right: 30rpx;"></app-select> -->
+			<view class="title">客户联系方式:</view>
+			<input placeholder="请输入客户联系方式" v-model="lianxidianhua" name="input"></input>
+			<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+				v-if="lianxidianhua != ''" @click="lianxidianhua = ''"></u-icon>
+		</view>
+		<view class="cu-form-group">
+			<view class="title">服务项目:</view>
+			<input placeholder="请输入服务项目" v-model="fuWuXiangMu" name="input"></input>
+			<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+				v-if="fuWuXiangMu != ''" @click="fuWuXiangMu = ''"></u-icon>
+		</view>
+		<view class="cu-form-group">
+			<view class="title">服务类型:</view>
+			<!-- 			<input placeholder="请输入服务类型" v-model="fuWuLeiXing" name="input"></input>
+			<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+				v-if="fuWuLeiXing != ''" @click="fuWuLeiXing = ''"></u-icon> -->
+			<u-radio-group v-model="fuWuLeiXing">
+				<u-radio v-for="(it, index) in fuWuLeiXingList" :key="index" :name="it.name">
+					{{it.name}}
+				</u-radio>
+			</u-radio-group>
+		</view>
+		<view class="cu-form-group">
+			<view class="title">客户联系人:</view>
+			<input placeholder="请输入客户联系人" v-model="keHuLianXiRen" name="input"></input>
+			<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+				v-if="keHuLianXiRen != ''" @click="keHuLianXiRen = ''"></u-icon>
+		</view>
+		<view class="cu-form-group">
+			<view class="title">客户联系邮箱:</view>
+			<input placeholder="请输入客户联系邮箱" v-model="keHuLianXiYouXian" name="input"></input>
+			<u-icon class="uni-icon" name="close-circle-fill" color="rgb(192, 196, 204)" size="42"
+				v-if="keHuLianXiYouXian != ''" @click="keHuLianXiYouXian = ''"></u-icon>
 		</view>
 
-		<uni-section title="对公司人员的工作态度是否满意?" type="line" padding>
-			<uni-rate size="18" :value="5" v-model="wenTiYiDaAn" />
+		<uni-section title="服务态度" type="line" padding>
+			<uni-rate size="18" :value="5" :max="6" v-model="wenTiYiDaAn" />
 		</uni-section>
-		<uni-section title="工作及时性是否满意?" type="line" padding>
-			<uni-rate size="18" :value="5" v-model="wenTiErDaAn" />
+		<uni-section title="检测服务能力" type="line" padding>
+			<uni-rate size="18" :value="5" :max="6" v-model="wenTiErDaAn" />
 		</uni-section>
-		<uni-section title="对出具的检测报告结果表达是否满意?" type="line" padding>
-			<uni-rate size="18" :value="5" v-model="wenTiSanDaAn" />
+		<uni-section title="检测报告及时性" type="line" padding>
+			<uni-rate size="18" :value="5" :max="6" v-model="wenTiSanDaAn" />
 		</uni-section>
-		<uni-section title="当您对检测结果有疑异时,检验中心给出的解释或者后续的处理方式是否让您满意?" type="line" padding>
-			<uni-rate size="18" :value="5" v-model="wenTiSiDaAn" />
+		<uni-section title="报告差错率" type="line" padding>
+			<uni-rate size="18" :value="5" :max="6" v-model="wenTiSiDaAn" />
 		</uni-section>
-		<uni-section title="对检验部门的管理是否满意?" type="line" padding>
-			<uni-rate size="18" :value="5" v-model="wenTiWuDaAn" />
+		<uni-section title="投诉应答处理" type="line" padding>
+			<uni-rate size="18" :value="5" :max="6" v-model="wenTiWuDaAn" />
 		</uni-section>
 		<uni-section title="客户意见和建议" type="line" padding>
 			<textarea maxlength="-1" v-model="qingNinTianXie" placeholder="意见和建议"></textarea>
 		</uni-section>
 		<view class="padding flex flex-direction">
-			<button class="cu-btn bg-blue lg" @click="onSubmit">提交</button>
+			<button class="cu-btn bg-blue lg bg-mingjian" @click="onSubmit">提交</button>
 		</view>
 	</view>
 </template>
@@ -70,32 +94,34 @@
 				wenTiWuDaAn: '',
 				qingNinTianXie: '',
 				kehuXinXinList: [],
-				lianxidianhua: ''
+				lianxidianhua: '',
+				fuWuLeiXing: '',
+				keHuLianXiYouXian: '',
+				fuWuXiangMu: '',
+				keHuLianXiRen: '',
+				mobile: '',
+				buMenName: '',
+				fuWuLeiXingList: [{
+					name: "检验检测"
+				}, {
+					name: "科研服务"
+				}]
 			}
 		},
 		onLoad() {
 			this.getKehu()
-			let that = this
-			// this.$http.post("/ibps/business/v3/common/queryBuMenList", "466555896126767104").then(res => {
-			// 	if (res.data.state == 200 && res.data.data) {
-			// 		this.buMenList = []
-			// 		for (let ind in res.data.data) {
-			// 			this.buMenList.push({
-			// 				value: res.data.data[ind].id,
-			// 				text: res.data.data[ind].buMenMingChengs
-			// 			})
-			// 		}
-			// 	}
-			// });
 		},
 		methods: {
 			getKehu() {
+				let info = uni.getStorageSync(USER_INFO);
+				if (info) {
+					this.mobile = info.employee.mobile
+				}
 				let sql =
-					`{"sql":"select tk.ke_hu_ming_cheng_,ty.lian_xi_ren_ from t_khxx tk,t_yxkh ty where tk.ke_hu_ming_cheng_ = ty.id_ ORDER BY tk.create_time_ desc"}`
+					`select tk.id_,tk.ke_hu_ming_cheng_,ty.lian_xi_ren_,ty.ke_hu_dian_hua_ from t_khxx tk,t_yxkh ty where tk.ke_hu_ming_cheng_ = ty.id_  and ty.ke_hu_dian_hua_='${this.mobile}' ORDER BY tk.create_time_ desc`
 
+				let requestData = this.$sig(sql)
 
-				let md5 = this.sig(sql) //加密, 获取md5密文
-				let requestData = sql.slice(0, 1) + '"sig":"' + md5 + '",' + sql.slice(1) //结果拼接
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
 						const data = res.data.variables.data
@@ -104,6 +130,18 @@
 							this.$set(item, 'text', item.lian_xi_ren_)
 						})
 						this.kehuXinXinList = data
+						this.buMenId = data[0].id_ || ''
+						this.buMenName = data[0].lian_xi_ren_
+						this.lianxidianhua = data[0].ke_hu_dian_hua_ || ''
+						this.keHuLianXiRen = data[0].lian_xi_ren_ || ''
+
+						if (data.length == 0) {
+							uni.showToast({
+								title: '该账户暂时不能填写满意度调查,如果需要填写请联系本公司',
+								icon: 'none',
+								duration: 2000
+							})
+						}
 					}
 				})
 			},
@@ -111,6 +149,15 @@
 			onSubmit() {
 				let info = uni.getStorageSync(USER_INFO);
 				let useId = info.user.id
+				let detpId = info.org.id
+
+				if (this.buMenName == '') {
+					return uni.showToast({
+						title: '该账户暂时不能填写满意度调查,如果需要填写请联系本公司',
+						icon: 'none',
+						duration: 2000
+					})
+				}
 
 				var nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
 				var time = nowDate.toJSON().split('T').join(' ').substr(0, 10);
@@ -130,21 +177,35 @@
 					]
 				}
 				let paraValue = {
-					"nianFen": time.substring(0, 4),
-					"keHu": this.buMenId,
-					"lianXiDianHua": this.lianxidianhua,
-					"pingFen1": this.wenTiYiDaAn,
-					"pingFen2": this.wenTiErDaAn,
-					"pingFen3": this.wenTiSanDaAn,
-					"pingFen4": this.wenTiSiDaAn,
-					"pingFen5": this.wenTiWuDaAn,
-					"yiJianHeJianYi": this.qingNinTianXie,
-					"tianXieRen": useId,
-					"tianXieShiJian": time,
-					"shiFouGuoShen": "已编制",
+					nianFen: time.substring(0, 4),
+					keHu: this.buMenId,
+					lianXiDianHua: this.lianxidianhua,
+					keHuLianXiRen: this.keHuLianXiRen,
+					keHuLianXiYouXian: this.keHuLianXiYouXian,
+					fuWuXiangMu: this.fuWuXiangMu,
+					fuWuLeiXing: this.fuWuLeiXing,
+					pingFen1: this.wenTiYiDaAn == '' ? 0 : this.wenTiYiDaAn == 6 ? 10 : this.wenTiYiDaAn == 5 ? 9 :
+						this.wenTiYiDaAn == 4 ? 7 : this.wenTiYiDaAn == 3 ? 5 : this.wenTiYiDaAn == 2 ? 2 : this
+						.wenTiYiDaAn == 1 ? 0 : 0,
+					pingFen2: this.wenTiErDaAn == '' ? 0 : this.wenTiErDaAn == 6 ? 10 : this.wenTiErDaAn == 5 ? 9 :
+						this.wenTiErDaAn == 4 ? 7 : this.wenTiErDaAn == 3 ? 5 : this.wenTiErDaAn == 2 ? 2 : this
+						.wenTiErDaAn == 1 ? 0 : 0,
+					pingFen3: this.wenTiSanDaAn == '' ? 0 : this.wenTiSanDaAn == 6 ? 10 : this.wenTiSanDaAn == 5 ? 9 :
+						this.wenTiSanDaAn == 4 ? 7 : this.wenTiSanDaAn == 3 ? 5 : this.wenTiSanDaAn == 2 ? 2 : this
+						.wenTiSanDaAn == 1 ? 0 : 0,
+					pingFen4: this.wenTiSiDaAn == '' ? 0 : this.wenTiSiDaAn == 6 ? 10 : this.wenTiSiDaAn == 5 ? 9 :
+						this.wenTiSiDaAn == 4 ? 7 : this.wenTiSiDaAn == 3 ? 5 : this.wenTiSiDaAn == 2 ? 2 : this
+						.wenTiSiDaAn == 1 ? 0 : 0,
+					pingFen5: this.wenTiWuDaAn == '' ? 0 : this.wenTiWuDaAn == 6 ? 10 : this.wenTiWuDaAn == 5 ? 9 :
+						this.wenTiWuDaAn == 4 ? 7 : this.wenTiWuDaAn == 3 ? 5 : this.wenTiWuDaAn == 2 ? 2 : this
+						.wenTiWuDaAn == 1 ? 0 : 0,
+					yiJianHeJianYi: this.qingNinTianXie,
+					bianZhiRen: useId,
+					bianZhiShiJian: time,
+					bianZhiBuMen: detpId,
+					shiFouGuoShen: "已编制",
 				}
 				para.parameters[2].value = JSON.stringify(paraValue);
-				console.log()
 				let that = this;
 				this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
 					if (res.data.state == 200) {
@@ -157,24 +218,6 @@
 					let msg = ((err.response || {}).data || {}).message || err.data.message || "请求出现错误,请稍后再试"
 					this.$tip.error(msg);
 				});
-				// this.$http.post("ibps/business/v3/sh/manyidu/add", para).then(res => {
-				// 	if (res.data.state == 200) {
-				// 		this.$tip.success("提交成功!")
-				// 		this.$Router.replace({
-				// 			name: 'index'
-				// 		})
-				// 	} else if (res.data.state == 400) {
-				// 		this.$tip.success("用户未登录!")
-				// 		this.$Router.replace({
-				// 			name: 'login'
-				// 		})
-				// 	} else {
-				// 		this.$tip.error("请求错误: " + res.data.message)
-				// 	}
-				// }).catch((err) => {
-				// 	let msg = ((err.response || {}).data || {}).message || err.data.message || "请求出现错误,请稍后再试"
-				// 	this.$tip.error(msg);
-				// });
 			},
 			onChange(e) {
 				console.log(e)

+ 9 - 8
pages/jiance/order.vue

@@ -278,14 +278,14 @@
 		<u-calendar v-model="dateShow" :mode="mode" max-date="2050-01-01" @change="dateChange"></u-calendar>
 		<u-action-sheet :list="list" v-model="sheetShow" @click="actionSheetCallback"></u-action-sheet>
 
-		<popup ref="centers" :maskColor="true" :center="true" style="z-index: 9999;">
-			<view style="padding: 30rpx;background: #FFFFFF;margin: 10rpx;width: 100%;">
+		<u-popup mode="center" v-model="popupShow">
+			<view style="padding: 30rpx;background: #FFFFFF;width: 100%;">
 				<view class="cu-form-group ">
 					<view class="title">签名</view>
 				</view>
 				<autograph @save="save" @clear="clear" @close="close"></autograph>
 			</view>
-		</popup>
+		</u-popup>
 	</view>
 </template>
 
@@ -395,7 +395,8 @@
 				type: '', //判断哪个功能
 				id: '', //委托单id
 				taskId: '',
-				total: 0
+				total: 0,
+				popupShow: false
 
 
 			}
@@ -1079,7 +1080,7 @@
 			qianming(index) {
 				this.qianshow = true
 				this.qianIndex = index
-				this.$refs.centers.show()
+				this.popupShow = true
 			},
 			//清除签名
 			deqianming(index) {
@@ -1090,10 +1091,10 @@
 			//保存签名
 			save(val) {
 				if (this.qianIndex == 0) {
-					this.form.weiTuoFangQueRen = val.tempFilePath
+					this.form.weiTuoFangQueRen = val
 				}
 				this.qianshow = false
-				this.$refs.centers.hide()
+				this.popupShow = false
 			},
 			//清除签名
 			clear(val) {
@@ -1105,7 +1106,7 @@
 			 * 关闭签名弹窗
 			 */
 			close() {
-				this.$refs.centers.hide()
+				this.popupShow = false
 			},
 			/**
 			 * @param {Object} data

+ 74 - 66
pages/jiance/tousu.vue

@@ -7,43 +7,35 @@
 
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">投诉人</view>
-			<input v-model="Complainants" name="input" placeholder="请输入投诉人">
+			<input v-model="form.ComplainantsName" name="input" placeholder="请输入投诉人" disabled>
 		</view>
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">电话</view>
-			<input v-model="telephone" name="input" placeholder="请输入电话">
+			<input v-model="form.telephone" name="input" placeholder="请输入电话">
 		</view>
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">投诉单位</view>
-			<input v-model="company" name="input" placeholder="请输入投诉单位">
+			<input v-model="form.company" name="input" placeholder="请输入投诉单位">
 		</view>
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">投诉日期</view>
-			<input v-model="time" name="input" placeholder="请输入投诉日期" disabled @click="show = true">
+			<input v-model="form.touSuRiQi" name="input" placeholder="请输入投诉日期" disabled @click="show = true">
 		</view>
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">邮编</view>
-			<input v-model="postcode" name="input" placeholder="请输入邮编">
+			<input v-model="form.postcode" name="input" placeholder="请输入邮编">
 		</view>
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">地址</view>
-			<input v-model="address" name="input" placeholder="请输入地址">
+			<input v-model="form.address" name="input" placeholder="请输入地址">
 		</view>
 		<view class="cu-form-group" style="z-index: 999;">
 			<view class="title">投诉方式</view>
-			<input v-model="complaintsWay" name="input" placeholder="请输入投诉方式" disabled @click="selectShow = true">
+			<input v-model="form.complaintsWay" name="input" placeholder="请输入投诉方式" disabled @click="selectShow = true">
 		</view>
-		<!-- <view class="cu-form-group">
-			<view class="title">被调查部门:</view>
-			<app-select placeholder="请选择调查部门" v-model="beiTouSuBuMen" :dict="buMenList" space></app-select>
-		</view> -->
-		<!-- <view class="cu-form-group">
-			<view class="title" style="width: 100px;">投诉方式:</view>
-			<app-select placeholder="请选择投诉方式" :dict="touSuFangShiList" space ></app-select>
-		</view> -->
 
 		<uni-section title="投诉内容" type="line" padding>
-			<textarea maxlength="-1" v-model="content" placeholder="投诉内容"></textarea>
+			<textarea maxlength="-1" v-model="form.content" placeholder="投诉内容"></textarea>
 		</uni-section>
 
 		<uni-section title="上传附件" type="line">
@@ -90,34 +82,66 @@
 				list: test.list,
 
 				buMenList: [],
-				beiTouSuBuMen: '',
-				content: '',
 				fuJianShangChuanArray: [],
-				fuJianShangChuan: '',
-
-				shenQingLeiXing: '',
-				Complainants: '',
-				telephone: '',
-				company: '',
-				time: '',
-				postcode: '',
-				address: '',
-				complaintsWay: ''
+
+				form: {
+					ComplainantsName: "",
+					Complainants: "",
+					telephone: "",
+					postcode: "",
+					company: "",
+					touSuRiQi: "",
+					address: "",
+					complaintsWay: "",
+					content: "",
+					yeShu: "",
+					fuJianShangChuan: "",
+					youWuYouXiaoTouSu: "",
+					officeSurvey: "",
+					chuLiCuoShi: "",
+					chuLiShiJian: "",
+					chuLiJieGuoShiFou: "",
+					shiFouTongYi: "",
+					keHuQianMing: "",
+					bianZhiRen: "",
+					bianZhiSJ: "",
+					bianZhiBuMen: "",
+					acceptor: "",
+					acceptanceDate: "",
+					shouLiBuMen: "",
+					zeRenBuMenFuZeRen: "",
+					zeRenShouLiRiQi: "",
+					zeRenBuMen: "",
+					zhiLiangFuZeRen: "",
+					zhiLiangRiQi: "",
+					zhiLiangBuMen: "",
+					shouLiRen2: "",
+					shouLiRiQi2: "",
+					shouLiBuMen2: "",
+					qianMingRiQi: ""
+				}
 			}
 		},
 		onLoad() {
-			let that = this
-			this.$http.post("/ibps/business/v3/common/queryBuMenList", "466555896126767104").then(res => {
-				if (res.data.state == 200 && res.data.data) {
-					this.buMenList = []
-					for (let ind in res.data.data) {
-						this.buMenList.push({
-							value: res.data.data[ind].id,
-							text: res.data.data[ind].buMenMingChengs
-						})
-					}
-				}
-			});
+			// let that = this
+			// this.$http.post("/ibps/business/v3/common/queryBuMenList", "466555896126767104").then(res => {
+			// 	if (res.data.state == 200 && res.data.data) {
+			// 		this.buMenList = []
+			// 		for (let ind in res.data.data) {
+			// 			this.buMenList.push({
+			// 				value: res.data.data[ind].id,
+			// 				text: res.data.data[ind].buMenMingChengs
+			// 			})
+			// 		}
+			// 	}
+			// });
+		},
+		created() {
+			let info = uni.getStorageSync(USER_INFO);
+			let useId = info.user.id
+			let name = info.user.name
+			this.form.Complainants = useId
+			this.form.ComplainantsName = name
 		},
 		methods: {
 			// 获取上传状态
@@ -209,30 +233,14 @@
 						}
 					]
 				}
-				let paraValue = {
-					"id": "",
-					"nianDu": time.substring(0, 4),
-					"Complainants": this.Complainants,
-					"telephone": this.telephone,
-					"postcode": this.postcode,
-					"company": this.company,
-					"touSuRiQi": this.time,
-					"address": this.address,
-					"beiTouSuBuMen": "",
-					"complaintsWay": "其他方式",
-					"content": this.content,
-					"fuJianShangChuan": tmpArray.join(","),
-					"youWuYouXiaoTouSu": "",
-					"banGongShi": "",
-					"officeSurvey": "",
-					"chuLiJieGuoShiFou": "",
-					"bianZhiBuMen": "",
-					"bianZhiRen": useId,
-					"bianZhiSJ": time,
-					"shiFouGuoShen": "已编制",
-					"zhuangTai": "已登记"
-				}
-				para.parameters[2].value = JSON.stringify(paraValue);
+				this.form.nianDu = time.substring(0, 4)
+				this.form.fuJianShangChuan = tmpArray.join(",")
+				this.form.bianZhiRen = useId
+				this.form.bianZhiSJ = time
+				this.form.shiFouGuoShen = "已编制"
+				this.form.zhuangTai = "已登记"
+				this.form.bianZhiBuMen = "1041786072788369408"
+				para.parameters[2].value = JSON.stringify(this.form);
 				console.log()
 				let that = this;
 				this.$http.post("ibps/business/v3/bpm/instance/start", para).then(res => {
@@ -248,10 +256,10 @@
 				});
 			},
 			dateChange(e) {
-				this.time = e.result
+				this.form.touSuRiQi = e.result
 			},
 			selecConfirm(e) {
-				this.complaintsWay = e[0].value
+				this.form.complaintsWay = e[0].value
 			}
 		}
 	}