linweizeng 3 жил өмнө
parent
commit
798035da5d

+ 3 - 3
pages/communication/communication.vue

@@ -2,7 +2,7 @@
 	<view>
 		<cu-custom bgColor="bg-luohu" :isBack="true">
 			<block slot="backText">返回</block>
-			<block slot="content">检测报告</block>
+			<block slot="content">沟通记录</block>
 		</cu-custom>
 		<view>
 			<view class="cu-form-group">
@@ -297,7 +297,7 @@
 							this.form.keHuLianXiRen = data[0].lian_xi_ren_ || ''
 						} else {
 							return uni.showToast({
-								title: '该账户暂时不能填写满意度调查,如果需要填写请联系本公司',
+								title: '该账户暂时不能填写沟通记录,如果需要填写请联系本公司',
 								icon: 'none',
 								duration: 2000
 							})
@@ -312,7 +312,7 @@
 
 				if (this.form.buMenName == '') {
 					return uni.showToast({
-						title: '该账户暂时不能填写满意度调查,如果需要填写请联系本公司',
+						title: '该账户暂时不能填写沟通记录,如果需要填写请联系本公司',
 						icon: 'none',
 						duration: 2000
 					})

+ 1 - 1
pages/fileView/fileView.vue

@@ -77,7 +77,7 @@
 				console.log(access_token)
 
 				let sql =
-					`{"sql":"select FILE_PATH_  from ibps_file_attachment  WHERE id_ = (SELECT  gai_zhang_jian_pd FROM t_lhjcbgb WHERE id_ = '${id}')"}`
+					`{"sql":"select FILE_PATH_  from ibps_file_attachment  WHERE id_ = (SELECT bao_gao_pdf_ FROM t_lhjcbgb WHERE id_ = '${id}')"}`
 
 				let md5 = this.sig(sql) //加密, 获取md5密文
 				let requestData = sql.slice(0, 1) + '"sig":"' + md5 + '",' + sql.slice(1) //结果拼接

+ 4 - 3
pages/fileView/reportList.vue

@@ -54,6 +54,7 @@
 		data() {
 			return {
 				id: '',
+				yangPinBianHao: '',
 				reportList: [],
 				userid: '',
 				time: '',
@@ -63,7 +64,7 @@
 		onLoad(option) {
 			console.log(option)
 			if (option.id) {
-				this.id = option.id
+				this.yangPinBianHao = option.id
 				this.getList(option.id)
 			}
 		},
@@ -81,7 +82,7 @@
 				this.time = time
 			},
 			/* 
-			  根据委托单id查询报告礼拜
+			  根据样品编号查询报告礼拜
 			*/
 			getList(id) {
 				uni.showLoading({
@@ -90,7 +91,7 @@
 				});
 				//'${id}'
 				let sql =
-					`select * from t_lhjcbgb where  wei_tuo_id_= '${id}' ORDER BY create_time_ desc`
+					`select * from t_lhjcbgb where yang_pin_bian_hao = '${id}' ORDER BY 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) {

+ 2 - 2
pages/jiance/jindu.vue

@@ -57,8 +57,8 @@
 					<u-button class="m-r-15" type="success" size="mini"
 						@click="editOrder(item.id_,item.he_tong_bian_hao_,'1', 'edit')"
 						v-if="item.wei_tuo_zhuang_ta == '待编制' || item.shi_fou_guo_shen_ == '已退回'">修改</u-button>
-					<u-button type="warning" size="mini" class="m-r-15" @click="getTag(item.id_)">样品标签</u-button>
-					<u-button type="warning" size="mini" @click="goto(item.id_)">查看报告</u-button>
+					<!-- <u-button type="warning" size="mini" class="m-r-15" @click="getTag(item.id_)">样品标签</u-button>
+					<u-button type="warning" size="mini" @click="goto(item.id_)">查看报告</u-button> -->
 
 					<!-- 					<button style="margin-right: 15rpx; height: 50rpx;" size="mini"
 						@click="editOrder(item.id_,item.he_tong_bian_hao_,'0')">明细</button>

+ 19 - 3
pages/jiance/list.vue

@@ -42,9 +42,12 @@
 						</view>
 					</view>
 					<!-- v-if="item.zhuang_tai_ && (item.zhuang_tai_ == '待运营中心审核' || item.zhuang_tai_ == '待检测中心审核' || item.zhuang_tai_ == '待财务审核' || item.zhuang_tai_ == '待样品接收')" -->
-					<view class="btnList"
-						v-if="item.wei_tuo_zhuang_ta && (item.wei_tuo_zhuang_ta == '待审核' ||item.wei_tuo_zhuang_ta == '已编制' || item.wei_tuo_zhuang_ta == '待财务审核' || item.wei_tuo_zhuang_ta == '待签订' || item.wei_tuo_zhuang_ta == '待样品接收')">
-						<u-button type="warning" size="mini" @click="goto(item.id_)">样品修改</u-button>
+					<view class="btnList">
+						<u-button class="u-m-r-15" type="warning" size="mini" @click="goto(item.id_)"
+							v-if="item.wei_tuo_zhuang_ta && (item.wei_tuo_zhuang_ta == '待审核' ||item.wei_tuo_zhuang_ta == '已编制' || item.wei_tuo_zhuang_ta == '待财务审核' || item.wei_tuo_zhuang_ta == '待签订' || item.wei_tuo_zhuang_ta == '待样品接收')">
+							样品修改</u-button>
+						<u-button type="warning" size="mini" class="m-r-15" @click="getTag(item.id_)">样品标签</u-button>
+						<u-button type="warning" size="mini" @click="goBaogao(item.yang_pin_bian_hao)">查看报告</u-button>
 					</view>
 				</view>
 			</uni-section>
@@ -174,6 +177,19 @@
 					url: '/pages/jiance/list/specimen?id=' + id
 				})
 			},
+			goBaogao(option) {
+				uni.navigateTo({ // 跳转页面
+					url: '/pages/fileView/reportList?id=' + option
+				})
+			},
+			/**
+			 * 样品标签页
+			 */
+			getTag(id) {
+				uni.navigateTo({ // 跳转页面
+					url: '/pages/tag/sampleTag?id=' + id
+				})
+			},
 
 
 			sig(sql) {

+ 88 - 5
pages/jiance/list/specimen.vue

@@ -38,7 +38,12 @@
 				<u-form-item label="备注">
 					<u-input placeholder="请输入备注" v-model="form.bei_zhu_1_" />
 				</u-form-item>
-				<u-form-item label="检测项目" label-position="top">
+				<view v-if="jianCeListShow">
+					<view class="qingshe" style="background-color: #99cc66;margin-bottom: 20rpx;">
+						<view class="qingTitle" style="color: #FFFFFF;">
+							常规项目
+						</view>
+					</view>
 					<view style="width: 100%;">
 						<view v-for="(it, x) in jianCeList" :key="x">
 							<view class="jiancexiangm">
@@ -50,7 +55,31 @@
 							</view>
 						</view>
 					</view>
-				</u-form-item>
+				</view>
+				<view v-if="taoCanShow">
+					<view class="qingshe" style="background-color: #99cc66;margin-bottom: 20rpx;">
+						<view class="qingTitle" style="color: #FFFFFF;">
+							套餐
+						</view>
+					</view>
+					<view class="btnBox">
+						<u-tag class="btnSin" size="default" :text="it.tao_can_ming_chen" v-for="(it, x) in taoCanList"
+							:key="x" />
+					</view>
+					<view>
+						<view>
+							<view v-for="(it, x) in taoCanXiangMuList" :key="x">
+								<view class="jiancexiangm">
+									<view>
+										{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
+										<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '当'}}元]</text>
+									</view>
+									<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
 
 				<view class="qingshe" @click="showBoolean1 = !showBoolean1">
 					<view>
@@ -241,7 +270,11 @@
 				sexList: order.sex,
 				listType: '',
 
-				mingChengShow: false
+				mingChengShow: false,
+				taoCanList: [],
+				taoCanShow: false,
+				taoCanXiangMuList: [],
+				jianCeListShow: false
 			}
 		},
 		onLoad(option) {
@@ -314,6 +347,10 @@
 							this.mingChengShow = true
 						}
 
+						this.getTaoCanList(result.xuan_ze_tao_can_)
+						this.taoCanChange(result.tao_can_zi_biao_i)
+
+
 					}
 				})
 			},
@@ -326,9 +363,45 @@
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
 						let result = res.data.variables.data
-						// console.log(result)
-						this.jianCeList = result
+						if (result.length > 0) {
+							this.jianCeListShow = true
+							this.jianCeList = result
+						} else {
+							this.jianCeListShow = false
+							this.jianCeList = []
+						}
+
+					}
+				})
+			},
+			//根据合同查询套餐
+			getTaoCanList(id) {
+				let sql =
+					`select  * from  t_jctc  where FIND_IN_SET(id_,'${id}')`
 
+				let requestData = this.$sig(sql)
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const datas = res.data.variables.data
+						if (datas.length > 0) {
+							this.taoCanShow = true
+							this.taoCanList = datas
+						} else {
+							this.taoCanShow = false
+							this.taoCanList = []
+						}
+					}
+				})
+			},
+			//根据套餐查询套餐项目
+			taoCanChange(i) {
+				let sql =
+					`select tm.*,tt.zhe_hou_jia_ge_,tt.tao_can_zhu_jian_,tt.id_ as tczbId from t_mjjcnlfw  tm,t_httcb tt where tm.id_ = tt.jian_ce_xiang_mu_ and  FIND_IN_SET(tt.id_,'${i}')`
+				let requestData = this.$sig(sql)
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const datas = res.data.variables.data
+						this.taoCanXiangMuList = datas
 					}
 				})
 			},
@@ -494,4 +567,14 @@
 			line-height: 30rpx;
 		}
 	}
+
+	.btnBox {
+		display: flex;
+		flex-wrap: wrap;
+
+		.btnSin {
+			margin: 10rpx 5rpx;
+		}
+
+	}
 </style>

+ 195 - 215
pages/jiance/order.vue

@@ -44,91 +44,81 @@
 				v-if="index == lhypbIndex">
 				<u-form-item label="样品名称" prop="yangPinMingCheng" required>
 					<text>{{item.yangPinMingCheng}}</text>
-					<!-- <u-input placeholder="请输入样品名称" v-model="item.yangPinMingCheng"
-						:disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
 				<u-form-item label="样品编号">
 					<text>{{item.yangPinBianHao}}</text>
-					<!-- <u-input placeholder="请输入样品编号" v-model="item.yangPinBianHao" disabled /> -->
 				</u-form-item>
 				<u-form-item label="姓名">
 					<text>{{item.xingMing}}</text>
-					<!-- <u-input placeholder="请输入姓名" v-model="item.xingMing" :disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
 				<u-form-item label="性别">
 					<text>{{item.xingBie}}</text>
-					<!-- <u-radio-group v-model="item.xingBie" v-if="type != 'detail'">
-						<u-radio v-for="(it, index) in sexList" :key="index" :name="it.name">
-							{{it.name}}
-						</u-radio>
-					</u-radio-group>
-					<text v-else>{{item.xingBie}}</text> -->
 				</u-form-item>
 				<u-form-item label="年龄">
 					<text>{{item.nianLing}}</text>
-					<!-- <u-input placeholder="请输入年龄" v-model="item.nianLing" /> -->
 				</u-form-item>
 				<u-form-item label="送检批号/编号" prop="songJianPiHao" required>
 					<text>{{item.songJianPiHao}}</text>
-					<!-- <u-input placeholder="请输入送检批号/编号" v-model="item.songJianPiHao"
-						:disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
 				<u-form-item label="样本状态" prop="yangPinZhuangTai" required>
 					<text>{{item.yangPinZhuangTai}}</text>
-					<!-- <u-input placeholder="请选择样本状态" type="select" v-model="item.yangPinZhuangTai"
-						@click="sheetClick('state',index)" v-if="type != 'detail'" />
-					<text v-else>{{item.yangPinZhuangTai}}</text> -->
 				</u-form-item>
 				<u-form-item label="送检时间" prop="songJianShiJian" required>
 					<text>{{item.songJianShiJian}}</text>
-					<!-- <u-input placeholder="请选择送检时间" type="select" v-model="item.songJianShiJian"
-						@click="dateClick('inspect',index)" v-if="type != 'detail'" />
-					<text v-else>{{item.songJianShiJian}}</text> -->
 				</u-form-item>
 				<u-form-item label="备注">
 					<text>{{item.beiZhu1}}</text>
-					<!-- <u-input placeholder="请输入备注" v-model="item.beiZhu1" :disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
-				<!-- <u-form-item label="检测类型" v-if="type != 'detail'">
-					<u-input placeholder="请选择检测类型" type="select" v-model="item.jianCeType"
-						@click="selectClick('jianCeType',index)" />
-				</u-form-item> -->
 
-				<u-form-item label="检测项目" prop="name" label-position="top">
-					<!-- <checkbox-group v-for="(it, x) in item.jianCeList" :key="x" @click="changeIndex(it,index,x)"
-						v-if="type != 'detail'">
-						<label class=" uni-list-cell uni-list-cell-pd"
-							v-show="(it.jian_ce_lei_bie_==item.jianCeType) || it.checked"
-							style="display: flex;margin: 15rpx 10rpx;font-size: 20rpx;line-height: 40rpx;">
-							<view>
-								<checkbox :checked="it.checked" :value="it.id_" />
-							</view>
-							<view style="margin-left: 10rpx;font-size: 28rpx;">
-								<view>
-									{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
-									<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '当'}}元]</text>
+				<view>
+					<view class="qingshe" style="background-color: #99cc66;">
+						<view class="qingTitle" style="color: #FFFFFF;">
+							常规项目
+						</view>
+					</view>
+					<u-form-item label="检测项目" prop="name" label-position="top">
+						<view v-for="(it, x) in item.jianCeList" :key="x" v-if="it.checked">
+							<view class="uni-list-cell uni-list-cell-pd">
+								<view
+									style="margin-left: 10rpx;font-size: 28rpx;line-height: 40rpx;background: #eee;padding: 10rpx;">
+									<view>
+										{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}[{{it.zhe_hou_jia_ge_ || ''}}元]
+									</view>
+									<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
+									<view>报告周期(工作日):{{it.bao_gao_zhou_qi_g || '当'}}天</view>
+									<view>送样要求:{{it.yang_pin_tiao_jia || ''}}</view>
 								</view>
-								<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
-								<view>报告周期(工作日):{{it.bao_gao_zhou_qi_g || '当'}}天</view>
-								<view>送样要求:{{it.yang_pin_tiao_jia || ''}}</view>
 							</view>
-						</label>
-					</checkbox-group> -->
-					<!-- && type=='detail' -->
-					<view v-for="(it, x) in item.jianCeList" :key="x" v-if="it.checked">
-						<view class="uni-list-cell uni-list-cell-pd">
-							<view
-								style="margin-left: 10rpx;font-size: 28rpx;line-height: 40rpx;background: #eee;padding: 10rpx;">
-								<view>
-									{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}[{{it.zhe_hou_jia_ge_ || ''}}元]
+						</view>
+					</u-form-item>
+				</view>
+				<view v-if="item.taoCanXiangMuList && item.taoCanXiangMuList.length > 0">
+					<view class="qingshe" style="background-color: #99cc66;margin-bottom: 20rpx;" v-if="taoCanShow">
+						<view class="qingTitle" style="color: #FFFFFF;">
+							套餐
+						</view>
+					</view>
+					<u-form-item label="套餐选择" label-position="top">
+						<view class="btnBox">
+							<u-tag class="btnSin" size="default" :text="it.tao_can_ming_chen" v-if="it.checked"
+								v-for="(it, x) in item.taoCanList" :key="x" />
+						</view>
+					</u-form-item>
+					<view>
+						<view>
+							<view v-for="(it, x) in item.taoCanXiangMuList" :key="x">
+								<view class="jiancexiangm">
+									<view>
+										{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
+										<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '当'}}元]</text>
+									</view>
+									<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
 								</view>
-								<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
-								<view>报告周期(工作日):{{it.bao_gao_zhou_qi_g || '当'}}天</view>
-								<view>送样要求:{{it.yang_pin_tiao_jia || ''}}</view>
 							</view>
 						</view>
 					</view>
-				</u-form-item>
+				</view>
+
 
 				<view class="qingshe" @click="item.showBoolean1 = !item.showBoolean1">
 					<view>
@@ -142,28 +132,15 @@
 				<block v-if="item.showBoolean1">
 					<u-form-item label="样品类型①">
 						<text>{{item.yangPinLeiXing}}</text>
-						<!-- <u-input placeholder="请选择样品类型①" type="select" v-model="item.yangPinLeiXing"
-							@click="sheetClick('yangpinType1',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinLeiXing}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件①">
 						<text>{{item.yangBenYunShuTiao}}</text>
-						<!-- <u-input placeholder="请选择样品运输条件①" type="select" v-model="item.yangBenYunShuTiao"
-							@click="sheetClick('transportType1',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangBenYunShuTiao}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量①">
 						<text>{{item.shuLiang}}</text>
-						<!-- <uni-number-box v-model="item.shuLiang" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiang}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品规格①">
 						<text>{{item.yangPinGuiGe}}</text>
-						<!-- <u-input placeholder="请输入样品规格①" v-model="item.yangPinGuiGe" v-if="type != 'detail'" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification1',index)"
-							v-if="type != 'detail'">规格
-						</u-button>
-						<text v-else>{{item.yangPinGuiGe}}</text> -->
 					</u-form-item>
 				</block>
 
@@ -179,28 +156,15 @@
 				<block v-if="item.showBoolean2">
 					<u-form-item label="样品类型②">
 						<text>{{item.yangPinLeiXingEr}}</text>
-						<!-- <u-input placeholder="请选择样品类型②" type="select" v-model="item.yangPinLeiXingEr"
-							@click="sheetClick('yangpinType2',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinLeiXingEr}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件②">
 						<text>{{item.yangPinYunShuTiao}}</text>
-						<!-- <u-input placeholder="请选择样品运输条件②" type="select" v-model="item.yangPinYunShuTiao"
-							@click="sheetClick('transportType2',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinYunShuTiao}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量②">
 						<text>{{item.shuLiangEr}}</text>
-						<!-- <uni-number-box v-model="item.shuLiangEr" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiangEr}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品规格②">
 						<text>{{item.yangPinGuiGeEr}}</text>
-						<!-- <u-input placeholder="请输入样品规格②" v-model="item.yangPinGuiGeEr" v-if="type != 'detail'" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification2',index)"
-							v-if="type != 'detail'">规格
-						</u-button>
-						<text v-else>{{item.yangPinGuiGeEr}}</text> -->
 					</u-form-item>
 				</block>
 
@@ -216,28 +180,15 @@
 				<block v-if="item.showBoolean3">
 					<u-form-item label="样品类型③">
 						<text>{{item.yangPinLeiXingSan}}</text>
-						<!-- <u-input placeholder="请选择样品类型③" type="select" v-model="item.yangPinLeiXingSan"
-							@click="sheetClick('yangpinType3',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinLeiXingSan}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件③">
 						<text>{{item.yangPinYunShuSan}}</text>
-						<!-- <u-input placeholder="请选择样品运输条件③" type="select" v-model="item.yangPinYunShuSan"
-							@click="sheetClick('transportType3',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinYunShuSan}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量③">
 						<text>{{item.shuLiangSan}}</text>
-						<!-- <uni-number-box v-model="item.shuLiangSan" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiangSan}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品规格③">
 						<text>{{item.yangPinGuiGeSan}}</text>
-						<!-- <u-input placeholder="请输入样品规格③" v-model="item.yangPinGuiGeSan" v-if="type != 'detail'" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification3',index)"
-							v-if="type != 'detail'">规格
-						</u-button>
-						<text v-else>{{item.yangPinGuiGeSan}}</text> -->
 					</u-form-item>
 				</block>
 
@@ -253,38 +204,22 @@
 				<block v-if="item.showBoolean4">
 					<u-form-item label="样品类型④">
 						<text>{{item.yangPinLeiXingSi}}</text>
-						<!-- <u-input placeholder="请选择样品类型④" type="select" v-model="item.yangPinLeiXingSi"
-							@click="sheetClick('yangpinType4',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinLeiXingSi}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件④">
 						<text>{{item.yangPinYunShuSi}}</text>
-						<!-- <u-input placeholder="请选择样品运输条件④" type="select" v-model="item.yangPinYunShuSi"
-							@click="sheetClick('transportType4',index)" v-if="type != 'detail'" />
-						<text v-else>{{item.yangPinYunShuSi}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量④">
 						<text>{{item.shuLiangSi}}</text>
-						<!-- <uni-number-box v-model="item.shuLiangSi" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiangSi}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品规格④">
 						<text>{{item.yangPinGuiGeSi}}</text>
-						<!-- <u-input placeholder="请输入样品规格④" v-model="item.yangPinGuiGeSi" v-if="type != 'detail'" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification4',index)"
-							v-if="type != 'detail'">规格
-						</u-button>
-						<text v-else>{{item.yangPinGuiGeSi}}</text> -->
 					</u-form-item>
 				</block>
 				<u-form-item label="项目名称" prop="xiangMuMingCheng" v-if="form.weiTuoHeTong == '技术服务协议'">
 					<text>{{item.xiangMuMingCheng}}</text>
-					<!-- <u-input placeholder="请输入项目名称" v-model="item.xiangMuMingCheng"
-						:disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
 				<u-form-item label="样品总价" prop="yangPinZongJia">
 					<text>{{item.yangPinZongJia}}</text>
-					<!-- <u-input v-model="item.yangPinZongJia" disabled /> -->
 				</u-form-item>
 
 				<u-button type="error" class="btn" @click="deletSing(index)" v-if="type != 'detail'">
@@ -390,10 +325,10 @@
 			</view>
 		</u-popup>
 
-		<u-popup v-model="lhypbShow" mode="bottom" height="80%">
+		<u-popup v-model="lhypbShow" mode="bottom" height="80%" border-radius="20">
 			<view>
-				<lhypb-message ref="lhypbMessage" :jianCeTypeList="jianCeTypeList" @deletClick="deletClick"
-					@sumbitSingClick="sumbitSingClick">
+				<lhypb-message ref="lhypbMessage" :jianCeTypeList="jianCeTypeList" :taoCanShow="taoCanShow"
+					:heTongId="form.heTongId" @deletClick="deletClick" @sumbitSingClick="sumbitSingClick">
 				</lhypb-message>
 			</view>
 		</u-popup>
@@ -552,12 +487,17 @@
 				lhypbIndexData: 'add', //判断样品添加还是修改
 				buttonFlagNum: '',
 
-				taoCanList: []
+				taoCanList: [],
+				taoCanShow: true,
+				taoCanXiangmMuList: []
 			}
 		},
 		onLoad(options) {
+			//一开始查合同  如果修改或者明细 传option.id
+			this.getDataHetong(options.id)
 			this.getInit()
 			if (options.saveId) { //是不是暂存信息
+				this.buttonFlagNum = '3'
 				this.saveId = options.saveId
 				this.getSaveData(options.saveId)
 			} else if (options.type && options.type != '') { //是不是修改信息
@@ -567,7 +507,7 @@
 			}
 			if (options.id) { //是不是修改信息
 				this.id = options.id
-				this.getDe(options.id)
+				// this.getDe(options.id)
 
 				if (options.type == 'edit') {
 					this.getTaskId(options.id)
@@ -608,7 +548,7 @@
 				if (info.org !== null) {
 					this.orgId = info.org.id || ''
 				}
-				this.getDataHetong()
+				// this.getDataHetong()
 
 				//获取时间
 				let nowDate = new Date((new Date).getTime() + 8 * 60 * 60 * 1000)
@@ -653,6 +593,14 @@
 						const data = res.data.variables.data[0]
 						if (data.count > 0) {
 							this.getLhwtdh()
+
+							if (this.form.lhypb.length > 0) {
+								this.form.lhypb.forEach((item, index) => {
+									this.getLhypbh(res => {
+										item.yangPinBianHao = res
+									})
+								})
+							}
 						}
 					}
 				})
@@ -702,8 +650,9 @@
 						} else {
 							this.total = parseFloat(result.zong_jia_)
 						}
-
-						this.getJiance(result.he_tong_id_, this.type, id)
+						this.getTaoCanXiangMu(result.he_tong_id_)
+						this.hetongChange(result.he_tong_id_, this.type, id)
+						// this.getJiance(result.he_tong_id_, this.type, id)
 					}
 				})
 			},
@@ -717,13 +666,31 @@
 						let result = res.data.variables.data
 						let list = service.getListForm(result, this.jianCeList)
 						this.form.lhypb = list
+
+						this.form.lhypb.forEach(item => {
+							let taoCanList = JSON.parse(JSON.stringify(this.taoCanList))
+							let xuanZeTaoCan = item.xuanZeTaoCan.split(',')
+
+							taoCanList.forEach(ite => {
+								let show = xuanZeTaoCan.some(it => it == ite.id_)
+								if (show) {
+									ite.checked = true
+								} else {
+									ite.checked = false
+								}
+							})
+							item.taoCanList = taoCanList
+							item.taoCanXiangMuList = this.taoCanXiangmMuList
+						})
+
+
 					}
 				})
 			},
 
 
 			//获取合同  //weiTouId 委托id特殊 在委托详情和修改才出现
-			getDataHetong() {
+			getDataHetong(weiTouId) {
 				let info = uni.getStorageSync(USER_INFO);
 				if (info == undefined) {
 					return;
@@ -756,24 +723,30 @@
 								duration: 2000
 							})
 						}
+
+						if (weiTouId) {
+							this.getDe(weiTouId)
+						}
 					}
 				});
 			},
-			//选择合同
-			hetongChange(e) {
+			//选择合同  e 合同id  type 判断这个是否添加add  还是 修改 明细 detail  id 委托单id
+			hetongChange(e, type = '', weiTouId = '') {
 				//从合同中选择付款方式
 				if (e != '') {
 					let data = this.hetongList.find((item, index) => item.id_ == e)
-					console.log(data)
-					this.form.weiTuoDanLaiYuan = data.wei_tuo_dan_lai_y
-					this.form.weiTuoHeTong = data.he_tong_lei_xing_
-					this.form.fuKuanFangShi = data.fu_kuan_fang_shi_
-					this.form.weiTuoDanWei = data.zhuan_huan_ke_hu_
-					this.form.songJianDanWei = data.zhuan_huan_ke_hu_
-					this.form.weiTuoFangLianXiD = data.dian_hua_
-					this.form.weiTuoFangLianXiR = data.lian_xi_ren_
-					this.form.weiTuoFangMingChe = data.ke_hu_dang_wei
-					this.getJiance(e, '')
+					if (type == '') {
+						this.form.weiTuoDanLaiYuan = data.wei_tuo_dan_lai_y || ''
+						this.form.weiTuoHeTong = data.he_tong_lei_xing_ || ''
+						this.form.fuKuanFangShi = data.fu_kuan_fang_shi_ || ''
+						this.form.weiTuoDanWei = data.zhuan_huan_ke_hu_ || ''
+						this.form.songJianDanWei = data.zhuan_huan_ke_hu_ || ''
+						this.form.weiTuoFangLianXiD = data.dian_hua_ || ''
+						this.form.weiTuoFangLianXiR = data.lian_xi_ren_ || ''
+						this.form.weiTuoFangMingChe = data.ke_hu_dang_wei || ''
+					}
+
+					this.getJiance(e, type, weiTouId)
 					this.getTaoCanList(data.xuan_ze_tao_can_)
 				}
 			},
@@ -828,10 +801,23 @@
 					}
 				});
 			},
-			//根据合同查询套餐
-			getTaoCanList(id) {
+			//获取属于合同套餐的全部项目
+			getTaoCanXiangMu(heTongid) {
+				let sql =
+					`select tm.*,tt.zhe_hou_jia_ge_,tt.tao_can_zhu_jian_,tt.id_ as tczbId from t_mjjcnlfw  tm,t_httcb tt where tm.id_ = tt.jian_ce_xiang_mu_ and parent_id_ = '${heTongid}'`
+				let requestData = this.$sig(sql)
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const datas = res.data.variables.data
+						this.taoCanXiangmMuList = datas
+					}
+				})
+			},
+			//根据合同查询套餐 1根据合同人套餐id里面选择套餐 2.根据合同id选择套餐
+			getTaoCanList(id, type) {
 				let sql =
 					`select  * from  t_jctc  where FIND_IN_SET(id_,'${id}')`
+
 				let requestData = this.$sig(sql)
 				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
 					if (res.data.state == 200) {
@@ -839,7 +825,7 @@
 						if (datas.length > 0) {
 							this.taoCanShow = true
 							datas.forEach(item => {
-								this.$set(item, 'chacked', false)
+								this.$set(item, 'checked', false)
 							})
 							this.taoCanList = datas
 						} else {
@@ -881,8 +867,14 @@
 							itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
 						}
 					})
+					item.taoCanXiangMuList.forEach((it, x) => {
+						total += parseFloat(it.zhe_hou_jia_ge_ || 0)
+						itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
+					})
 					item.yangPinZongJia = (itemTotal).toFixed(2)
 				})
+
+
 				this.form.zongJia = total
 				this.total = total
 				this.getMultiple()
@@ -899,56 +891,28 @@
 			},
 			//调用日期组件
 			dateClick(type, index) {
-				// if (type == 'inspect') {
-				// 	this.type = type
-				// 	this.mode = 'date'
-				// 	this.dateShow = true
-				// 	this.listIndex = index
-				// }
+				this.listType = type
 				if (type == 'report') {
-					this.type = type
 					this.mode = 'date'
 					this.dateShow = true
 				}
 				if (type == 'weiTuo') {
-					this.type = type
 					this.mode = 'date'
 					this.dateShow = true
 				}
 			},
 			//日期回调
 			dateChange(e) {
-				// if (this.type == 'inspect') {
-				// 	this.form.lhypb[this.listIndex].songJianShiJian = e.result
-				// }
-				if (this.type == 'report') {
+				if (this.listType == 'report') {
 					this.form.chuBaoGaoShiJian = e.result
 				}
-				if (this.type == 'weiTuo') {
+				if (this.listType == 'weiTuo') {
 					this.form.weiTuoRiQi = e.result
 				}
 			},
 			sheetClick(type, index) {
 				this.listType = type
 				this.sheetShow = true
-				// if (type == 'state') {
-				// 	this.list = this.sampleStateList
-				// 	this.listIndex = index
-				// }
-
-				// //1
-				// if (type.includes('yangpinType')) {
-				// 	this.list = this.sampleTypeList
-				// 	this.listIndex = index
-				// }
-				// if (type.includes('transportType')) {
-				// 	this.list = this.transportTypeList
-				// 	this.listIndex = index
-				// }
-				// if (type.includes('specification')) {
-				// 	this.list = this.specificationList
-				// 	this.listIndex = index
-				// }
 				if (type == 'disposition') {
 					this.list = this.dispositionList
 				}
@@ -959,55 +923,6 @@
 			actionSheetCallback(e) {
 				let that = this
 				let lists = that.form.lhypb[this.listIndex]
-
-				// if (this.listType == 'state') {
-				// 	lists.yangPinZhuangTai = this.list[e].text
-				// }
-
-				// //1
-				// if (this.listType == 'yangpinType1') {
-				// 	lists.yangPinLeiXing = that.list[e].text
-				// }
-				// if (this.listType == 'transportType1') {
-				// 	lists.yangBenYunShuTiao = that.list[e].text
-				// }
-				// if (this.listType == 'specification1') {
-				// 	lists.yangPinGuiGe = that.list[e].text
-				// }
-
-				// //2
-				// if (this.listType == 'yangpinType2') {
-				// 	lists.yangPinLeiXingEr = that.list[e].text
-				// }
-				// if (this.listType == 'transportType2') {
-				// 	lists.yangPinYunShuTiao = that.list[e].text
-				// }
-				// if (this.listType == 'specification2') {
-				// 	lists.yangPinGuiGeEr = that.list[e].text
-				// }
-
-				// //3
-				// if (this.listType == 'yangpinType3') {
-				// 	lists.yangPinLeiXingSan = that.list[e].text
-				// }
-				// if (this.listType == 'transportType3') {
-				// 	lists.yangPinYunShuSan = that.list[e].text
-				// }
-				// if (this.listType == 'specification3') {
-				// 	lists.yangPinGuiGeSan = that.list[e].text
-				// }
-
-				// //3
-				// if (this.listType == 'yangpinType4') {
-				// 	lists.yangPinLeiXingSi = that.list[e].text
-				// }
-				// if (this.listType == 'transportType4') {
-				// 	lists.yangPinYunShuSi = that.list[e].text
-				// }
-				// if (this.listType == 'specification4') {
-				// 	lists.yangPinGuiGeSi = that.list[e].text
-				// }
-
 				if (this.listType == 'disposition') {
 					this.form.yangBenChuLi = this.list[e].text
 				}
@@ -1071,6 +986,12 @@
 					]
 				}
 
+				//如果是暂存数据 id清楚
+				if (this.buttonFlagNum === '3') {
+					this.form.id = ''
+					this.form.zhanShiBiaoId = this.generateUUID()
+				}
+
 				this.form.shiFouGuoShen = "已编制"
 				this.form.bianZhiRen = this.userid
 				this.form.bianZhiShiJian = this.time
@@ -1079,6 +1000,15 @@
 				this.form.fuKuanZhuangTai = '未结清'
 
 				this.form.lhypb.forEach((item, index) => {
+					if (this.buttonFlagNum === '3') {
+						item.id = ''
+						item.parentId = ''
+					}
+					let list1 = []
+					let list2 = []
+					let list3 = []
+					let list4 = []
+					let list5 = []
 					item.jianCeXiangMu2 = []
 					item.weiTuoDanHao = this.form.weiTuoBianHao
 					item.weiTuoDanWei = this.form.weiTuoDanWei
@@ -1094,6 +1024,26 @@
 					item.yangPinZongShu = parseInt(item.shuLiangSi) + parseInt(item.shuLiangSan) + parseInt(item
 							.shuLiangEr) +
 						parseInt(item.shuLiang)
+
+					item.taoCanList.forEach(it => {
+						if (it.checked) {
+							list1.push(it.id_)
+						}
+					})
+					item.xuanZeTaoCan = list1.join(',')
+
+					if (item.taoCanXiangMuList.length > 0) {
+						item.taoCanXiangMuList.forEach(it => {
+							list2.push(it.id_)
+							list3.push(it.zhe_hou_jia_ge_)
+							list4.push(it.jian_ce_xiang_mu_)
+							list5.push(it.tczbId)
+						})
+						item.taoCanZiBiaoId = list5.join(',')
+						item.taoCanMingCheng = list4.join(',')
+						item.taoCanJiaGe = list3.join(',')
+						item.taoCanXiangMu = list2.join(',')
+					}
 				})
 
 				//委托提交判断
@@ -1283,7 +1233,6 @@
 						duration: 2000
 					})
 				}
-				console.log("9")
 
 				this.getLhypbh(res => {
 					let obj = {
@@ -1338,11 +1287,17 @@
 						showBoolean4: false,
 						mingChengShow: false,
 
-						taoCanList: JSON.parse(JSON.stringify(this.taoCanList))
+						taoCanList: JSON.parse(JSON.stringify(this.taoCanList)),
+						taoCanXiangMuList: [],
+
+						taoCanZiBiaoId: '',
+						taoCanMingCheng: '',
+						taoCanJiaGe: '',
+						taoCanXiangMu: '',
+						xuanZeTaoCan: ''
 					}
 					this.lhypbShow = true
 					this.lhypbIndexData = 'add'
-					console.log("555")
 					this.$nextTick(() => {
 						this.$refs.lhypbMessage.getInit(obj)
 					})
@@ -1468,6 +1423,31 @@
 		}
 	}
 
+	.jiancexiangm {
+		padding: 10rpx 30rpx;
+		// width: 100%;
+		padding: 20rpx;
+		margin-bottom: 20rpx;
+		background-color: #f1f1f1;
+		border-radius: 8rpx;
+		color: #606266;
+
+		view {
+			line-height: 30rpx;
+		}
+	}
+
+	.btnBox {
+		display: flex;
+		flex-wrap: wrap;
+
+		.btnSin {
+			margin: 10rpx 5rpx;
+		}
+
+	}
+
+
 	/deep/ .uni-group__content {
 		padding: 15rpx 25rpx;
 	}

+ 109 - 21
pages/jiance/order/lhypbMessage.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view class="u-m-20">
-			<u-form :model="form" ref="form" label-width="220" :error-type="errorType">
+			<u-form :model="form" ref="uForm" label-width="220" :error-type="errorType">
 				<u-form-item label="样品名称" prop="yangPinMingCheng" required>
 					<u-input placeholder="请输入样品名称" v-model="form.yangPinMingCheng" />
 				</u-form-item>
@@ -57,7 +57,7 @@
 							</view>
 							<view style="margin-left: 10rpx;font-size: 28rpx;">
 								<view>
-									{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
+									{{it.xiang_mu_bian_hao || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
 									<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '当'}}元]</text>
 								</view>
 								<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
@@ -68,27 +68,33 @@
 					</checkbox-group>
 				</u-form-item>
 
-				<view class="qingshe" style="background-color: #99cc66;">
+				<view class="qingshe" style="background-color: #99cc66;" v-if="taoCanShow">
 					<view class="qingTitle" style="color: #FFFFFF;">
 						套餐选择
 					</view>
 				</view>
 
-				<u-form-item label="选择套餐" prop="name" label-position="top">
-					<checkbox-group v-for="(it, x) in form.taoCanList" :key="x" @click="changeTaoCanIndex(it,x)">
-						<label class=" uni-list-cell uni-list-cell-pd"
-							style="display: flex;align-items: center;margin: 15rpx 10rpx;font-size: 20rpx;line-height: 40rpx;">
-							<view>
-								<checkbox :checked="it.checked" :value="it.id_" />
-							</view>
-							<view style="margin-left: 10rpx;font-size: 28rpx;">
+				<u-form-item label="选择套餐" prop="name" label-position="top" v-if="taoCanShow">
+					<view class="btnBox">
+						<u-button class="btnSin" size="mini" :type="it.checked ? 'success':''"
+							v-for="(it, x) in form.taoCanList" :key="x" @click="changeTaoCanIndex(it,x,it.checked)">
+							{{it.tao_can_ming_chen}}
+						</u-button>
+					</view>
+				</u-form-item>
+				<view v-if="form.taoCanXiangMuList.length > 0">
+					<view style="padding: 0 20rpx;">
+						<view v-for="(it, x) in form.taoCanXiangMuList" :key="x">
+							<view class="jiancexiangm">
 								<view>
-									{{it.tao_can_ming_chen || ''}}
+									{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}
+									<text style="color: red;">[{{it.zhe_hou_jia_ge_ || '当'}}元]</text>
 								</view>
+								<view>{{it.yi_ju_de_biao_zhu || ''}}</view>
 							</view>
-						</label>
-					</checkbox-group>
-				</u-form-item>
+						</view>
+					</view>
+				</view>
 
 				<view class="qingshe" @click="form.showBoolean1 = !form.showBoolean1">
 					<view>
@@ -235,13 +241,21 @@
 				default: () => {
 					return []
 				}
+			},
+			taoCanShow: {
+				type: Boolean,
+				default: true
+			},
+			heTongId: {
+				type: String,
+				default: ''
 			}
 		},
 		data() {
 			return {
 				errorType: ['toast'],
 				form: {
-
+					taoCanXiangMuList: []
 				},
 				//样本状态
 				sampleStateList: order.sampleState,
@@ -284,11 +298,11 @@
 			}
 		},
 		onReady() {
-			this.$refs.form.setRules(this.rules);
+			this.$refs.uForm.setRules(this.rules);
 		},
 		methods: {
 			getInit(data) {
-				this.form = data
+				this.form = JSON.parse(JSON.stringify(data))
 			},
 			changeIndex(it, x) {
 				let itemData = this.form
@@ -302,10 +316,36 @@
 				}
 				this.getTotal()
 			},
-			changeTaoCanIndex(it, x) {
+			changeTaoCanIndex(it, x, checked) {
 				let itemData = this.form
+
+				//checked 判断套餐是否被选中
+				if (!checked) {
+					let itList = it.xuan_ze_jian_ce_x.split(',')
+					let arr = itemData.taoCanXiangMuList.map(item => item.id_)
+					//判断现选的套餐跟已选套餐是否有相同的
+					var cList = itList.filter((item) => arr.some((ite) => ite === item))
+					if (cList.length > 0) {
+						uni.showToast({
+							title: it.tao_can_ming_chen + '与其他套餐的检测项目相同,请选择其他套餐',
+							icon: 'none',
+							duration: 2000
+						})
+						return
+					}
+				} else {
+					itemData.taoCanXiangMuList = itemData.taoCanXiangMuList.filter(item => item.tao_can_zhu_jian_ !== it
+						.id_)
+				}
 				this.form.taoCanList[x].checked = !this.form.taoCanList[x].checked
-				this.getTotal()
+
+				if (!checked) {
+					this.taoCanChange(it.id_)
+				} else {
+					this.getTotal()
+				}
+
+
 			},
 			getTotal() {
 				var itemTotal = 0
@@ -314,6 +354,9 @@
 						itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
 					}
 				})
+				this.form.taoCanXiangMuList.forEach((it, x) => {
+					itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
+				})
 				this.form.yangPinZongJia = (itemTotal).toFixed(2)
 			},
 			selectClick(type) {
@@ -344,6 +387,13 @@
 					this.list = this.dispositionList
 				}
 			},
+			selectConfirm(e) {
+				let that = this
+				let lists = that.form
+				if (this.listType == 'jianCeType') {
+					lists.jianCeType = e[0].value
+				}
+			},
 
 			//下拉框回调
 			actionSheetCallback(e) {
@@ -417,6 +467,21 @@
 					this.form.songJianShiJian = e.result
 				}
 			},
+			//根据套餐查询套餐项目
+			taoCanChange(i) {
+				let sql =
+					`select tm.*,tt.zhe_hou_jia_ge_,tt.tao_can_zhu_jian_,tt.id_ as tczbId from t_mjjcnlfw  tm,t_httcb tt where tm.id_ = tt.jian_ce_xiang_mu_ and  tt.tao_can_zhu_jian_ = '${i}' and parent_id_ = '${this.heTongId}'`
+				let requestData = this.$sig(sql)
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const datas = res.data.variables.data
+						datas.forEach(item => {
+							this.form.taoCanXiangMuList.push(item)
+						})
+						this.getTotal()
+					}
+				})
+			},
 
 			deletSing() {
 				this.$emit("deletClick")
@@ -434,7 +499,7 @@
 				// 	})
 				// 	return
 				// }
-				this.$refs.form.validate(valid => {
+				this.$refs.uForm.validate(valid => {
 					if (valid) {
 						this.$emit("sumbitSingClick", this.form)
 					} else {
@@ -478,4 +543,27 @@
 			margin: 20rpx;
 		}
 	}
+
+	.jiancexiangm {
+		padding: 10rpx 30rpx;
+		// width: 100%;
+		padding: 20rpx;
+		margin-bottom: 20rpx;
+		background-color: #f1f1f1;
+		border-radius: 8rpx;
+		color: #606266;
+
+		view {
+			line-height: 30rpx;
+		}
+	}
+
+	.btnBox {
+		display: flex;
+		flex-wrap: wrap;
+
+		.btnSin {
+			margin: 10rpx 5rpx;
+		}
+	}
 </style>

+ 13 - 3
pages/jiance/order/meth.js

@@ -18,9 +18,10 @@ export default {
 			weiTuoFangMingChe: item.wei_tuo_fang_ming,
 			weiTuoFangLianXiR: item.wei_tuo_fang_lian,
 			weiTuoFangLianXiD: item.wei_tuo_lian,
-			weiTuoRiQi: item.wei_tuo_fang_lian,
+			weiTuoRiQi: item.wei_tuo_ri_qi_,
 			weiTuoFangQueRen: item.wei_tuo_fang_que_,
-			zongJia: item.zong_jia_
+			zongJia: item.zong_jia_,
+			zhanShiBiaoId: item.zhan_shi_biao_id_
 		}
 		return form
 	},
@@ -83,7 +84,16 @@ export default {
 				showBoolean2: false,
 				showBoolean3: false,
 				showBoolean4: false,
-				mingChengShow: false
+				mingChengShow: false,
+
+
+				taoCanList: [],
+				taoCanXiangMuList: [],
+				taoCanZiBiaoId: item.tao_can_zi_biao_i,
+				taoCanMingCheng: item.tao_can_ming_chen,
+				taoCanJiaGe: item.tao_can_jia_ge_,
+				taoCanXiangMu: item.tao_can_xiang_mu_,
+				xuanZeTaoCan: item.xuan_ze_tao_can_
 			}
 			if (obj.yangPinLeiXing != '') {
 				obj.showBoolean1 = true

+ 1 - 3
pages/tag/sampleTag.vue

@@ -97,10 +97,8 @@
 			},
 			getLook(id) {
 				let sql =
-					`select * from t_lhypb where parent_id_ = '${id}' order by yang_pin_bian_hao asc`
+					`select * from t_lhypb where id_ = '${id}' order by yang_pin_bian_hao asc`
 				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

+ 27 - 44
pages/user/editpassword.vue

@@ -4,20 +4,14 @@
 			<cu-custom bgColor="bg-luohu" :isBack="true">
 				<block slot="backText">返回</block>
 				<block slot="content">修改密码</block>
-				<!-- <view slot="right"  @tap="rightClick">编辑</view> -->
 			</cu-custom>
 
 			<view class="example-body " style="display: flex;justify-content: center; margin-top: 80rpx;">
-				<uni-file-picker readonly :value="fileLists" :imageStyles="imageStyles" file-mediatype="image">
-				</uni-file-picker>
-
+				<u-avatar :src="photo" size="160">
+				</u-avatar>
 			</view>
-
-
-			<!-- list列表 -->
 			<uni-card>
 				<view class="cu-list menu">
-
 					<view class="cu-form-group">
 						<view class="title">密码</view>
 						<input placeholder="请输入六位以上密码" name="input" type="password" v-model="password"></input>
@@ -26,13 +20,10 @@
 						<view class="title">确认</view>
 						<input placeholder="请再输入一遍密码" name="input" type="password" v-model="again"></input>
 					</view>
-
-
 				</view>
-
 			</uni-card>
 			<view class="padding flex flex-direction" style="margin-bottom: 100rpx;">
-				<button class="cu-btn bg-blue lg" @click="submit">确认修改</button>
+				<button class="cu-btn bg-blue lg bg-mingjian" @click="submit">确认修改</button>
 			</view>
 
 		</scroll-view>
@@ -46,48 +37,40 @@
 		USER_INFO
 	} from "@/common/util/constants"
 	import api from '@/api/api.js'
+	import http from '@/common/service/http.js'
 	export default {
 		data() {
 			return {
-				imageStyles: {
-					width: 84,
-					height: 84,
-					border: {
-						radius: '50%'
-					}
-				},
-				listStyles: {
-					// 是否显示边框
-					border: true,
-					// 是否显示分隔线
-					dividline: true,
-					// 线条样式
-					borderStyle: {
-						width: 1,
-						color: 'blue',
-						style: 'dashed',
-						radius: 2
-					}
-				},
-				fileLists: [{
-					//url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg',
-					url: '/static/touxiang.jpg',
-					extname: 'png',
-					name: 'shuijiao.png'
-				}],
 				password: "",
 				again: "",
-
-
+				id: '',
+				photo: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg'
 			};
 		},
 		onLoad() {
-			this.user = uni.getStorageSync(USER_INFO);
-			//this.loadinfo()
-			console.log(this.user)
-
+			let user = uni.getStorageSync(USER_INFO).employee;
+			this.id = user.id
+			this.loadinfo()
 		},
 		methods: {
+			loadinfo() {
+				let token = uni.getStorageSync(ACCESS_TOKEN)
+				this.$http.get('ibps/platform/v3/employee/load', {
+					params: {
+						employeeId: this.id
+					}
+				}).then(res => {
+					if (res.data.state == '200') {
+						let result = res.data.data
+						this.user = result
+						if (result.photo != '') {
+							this.photo = http.apiHosp + 'ibps/platform/v3' + this.user.photo +
+								'&access_token=' +
+								token + '&tenantId='
+						}
+					}
+				}).catch(e => {})
+			},
 			submit() {
 				if (!this.password || this.password.length < 6) {
 					this.$tip.alert('正确输入密码');

+ 27 - 96
pages/user/people.vue

@@ -3,23 +3,18 @@
 		<scroll-view scroll-y class="page">
 			<!-- 头部logo-->
 			<view class="UCenter-bg">
-				<uni-file-picker readonly :value="fileLists" :imageStyles="imageStyles" file-mediatype="image">
-				</uni-file-picker>
-
-				<!-- 								<image :src="personalList.avatar" class="png round animation-slide-right margin-bottom-sm"
-					mode="scaleToFill" :style="[{animationDelay: '0.1s'}]"></image> -->
-				<image src="https://static.jeecg.com/upload/test/wave_1595818053612.gif" mode="scaleToFill"
-					class="gif-wave"></image>
+				<u-avatar :src="photo" size="160">
+				</u-avatar>
 			</view>
 			<view class="padding flex text-center text-grey bg-white shadow-warp">
 				<view class="flex flex-sub flex-direction solid-right animation-slide-top"
 					:style="[{animationDelay: '0.2s'}]">
-					<view class="text-xl text-orange">{{personalList.username}}</view>
+					<view class="text-xl text-orange">{{user.name}}</view>
 					<view class="margin-top-sm"><text class="cuIcon-people"></text> 用户</view>
 				</view>
 
 				<view class="flex flex-sub flex-direction animation-slide-top" :style="[{animationDelay: '0.2s'}]">
-					<view class="text-xl text-green">{{personalList.post?personalList.post:'客户'}}</view>
+					<view class="text-xl text-green">{{user.orgName || '客户'}}</view>
 					<view class="margin-top-sm"><text class="cuIcon-news"></text> 职务</view>
 				</view>
 			</view>
@@ -92,103 +87,39 @@
 		name: "people",
 		data() {
 			return {
-				personalList: {
-					avatar: '',
-					realname: '',
-					username: '',
-					post: ''
+				user: {
+					name: '',
+					orgName: ''
 				},
-				positionUrl: '/sys/position/list',
-				departUrl: '/sys/user/userDepartList',
-				userUrl: '/sys/user/queryById',
-				postUrl: '/sys/position/queryByCode',
-				userId: '',
 				id: '',
-
-				fileLists: [{
-					// url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg',
-					url: '/static/touxiang.jpg',
-					extname: 'png',
-					name: 'shuijiao.png'
-				}],
-				imageStyles: {
-					width: 84,
-					height: 84,
-					border: {
-						radius: '50%'
-					}
-				},
+				photo: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg'
 			};
 		},
-		watch: {
-			cur: {
-				immediate: true,
-				handler() {
-					this.userId = this.$store.getters.userid;
-					this.load()
-				},
-			},
-		},
-		onLoad() {
-			this.user = uni.getStorageSync(USER_INFO).employee;
+
+		created() {
+			let user = uni.getStorageSync(USER_INFO).employee;
+			this.id = user.id
+			this.loadinfo()
 		},
 		methods: {
-			scan() {
-				console.log("进来了")
-				// #ifndef H5
-				uni.scanCode({
-					success: function(res) {}
-				});
-				// #endif
-				// #ifdef H5
-				this.$tip.alert("暂不支持")
-				// #endif
-			},
-			load() {
-				// if (!this.userId) {
-
-				// 	return;
-				// }
-				// this.$http.get(this.userUrl, {
-				// 	params: {
-				// 		id: this.userId
-				// 	}
-				// }).then(res => {
-				// 	console.log("res", res)
-				// 	if (res.data.success) {
-				// 		let perArr = res.data.result
-				// 		let avatar = (perArr.avatar && perArr.avatar.length > 0) ? api.getFileAccessHttpUrl(perArr
-				// 			.avatar) : '/static/avatar_boy.png'
-				// 		this.personalList.avatar = avatar
-				// 		this.personalList.realname = perArr.realname
-				// 		this.personalList.username = perArr.username
-				// 		this.personalList.depart = perArr.departIds
-				// 		this.getpost(perArr.post)
-				// 	}
-				// }).catch(err => {
-				// 	console.log(err);
-				// });
-				let user = uni.getStorageSync(USER_INFO).employee;
-				this.personalList.avatar = user.post
-				this.personalList.post = user.orgName
-				this.personalList.username = user.name
-			},
-			getpost(code) {
-				if (!code || code.length == 0) {
-					this.personalList.post = '员工'
-					return false;
-				}
-				this.$http.get(this.postUrl, {
+			loadinfo() {
+				let token = uni.getStorageSync(ACCESS_TOKEN)
+				this.$http.get('ibps/platform/v3/employee/load', {
 					params: {
-						code: code
+						employeeId: this.id
 					}
 				}).then(res => {
-					if (res.data.success) {
-						this.personalList.post = res.data.result.name
+					if (res.data.state == '200') {
+						let result = res.data.data
+						this.user = result
+						if (result.photo != '') {
+							this.photo = http.apiHosp + 'ibps/platform/v3' + this.user.photo +
+								'&access_token=' +
+								token + '&tenantId='
+						}
 					}
-				}).catch(err => {});
-
-			}
+				}).catch(e => {})
+			},
 		}
 	}
 </script>

+ 108 - 217
pages/user/userdetail.vue

@@ -4,118 +4,33 @@
 			<cu-custom bgColor="bg-luohu" :isBack="true">
 				<block slot="backText">返回</block>
 				<block slot="content">用户详情</block>
-				<!-- <view slot="right"  @tap="rightClick">编辑</view> -->
 			</cu-custom>
 
 			<view class="example-body " style="display: flex;justify-content: center; margin-top: 80rpx;">
-				<uni-file-picker readonly :value="fileLists" :imageStyles="imageStyles" file-mediatype="image">
-				</uni-file-picker>
-
+				<u-avatar :src="photo" size="160" @click="getImage">
+				</u-avatar>
 			</view>
-
-
-			<!-- list列表 -->
 			<uni-card>
 				<view class="cu-list menu">
-					<!-- 				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.1s'}]">
-					<view class="content">
-						<text class="text-grey">头像</text>
-					</view>
-					<view class="action">
-						<view class="cu-avatar round sm" :style="{backgroundImage: 'url(' + personalMsg.avatar + ')'}"></view>
-					</view>
-				
-				</view> -->
-					<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
-						<view class="content">
-							<text class="text-grey">姓名:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey">{{user.name}}</text>
-						</view>
-					</view>
-					<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
-						<view class="content">
-							<text class="text-grey">单位名称:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey">{{user.orgName}}</text>
-						</view>
-					</view>
-					<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
-						<view class="content">
-							<text class="text-grey">手机号:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey">{{user.mobile}}</text>
-						</view>
-					</view>
-					<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
-						<view class="content">
-							<text class="text-grey">邮箱:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey">{{user.email}}</text>
-						</view>
-					</view>
-					<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.2s'}]">
-						<view class="content">
-							<text class="text-grey">地址:</text>
-						</view>
-						<view class="action">
-							<text class="text-grey">{{user.address}}</text>
-						</view>
-					</view>
-
-					<!-- 				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.3s'}]">
-					<view class="content">
-						<text class="text-grey">性别</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{personalMsg.sex}}</text>
-					</view>
-				</view> -->
-					<!-- 				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.4s'}]">
-					<view class="content">
-						<text class="text-grey">生日</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{personalMsg.birthday}}</text>
-					</view>
-				</view> -->
+					<u-form :model="user" ref="uForm" label-width="160">
+						<u-form-item label="单位名称">
+							<u-input v-model="user.name" input-align="right" />
+						</u-form-item>
+
+						<u-form-item label="手机号">
+							<u-input v-model="user.mobile" input-align="right" />
+						</u-form-item>
+
+						<u-form-item label="邮箱">
+							<u-input v-model="user.email" input-align="right" />
+						</u-form-item>
+
+						<u-form-item label="地址">
+							<u-input v-model="user.address" input-align="right" />
+						</u-form-item>
+					</u-form>
+					<u-button class="u-m-t-40" type="error" @click="sumbit">提交</u-button>
 				</view>
-
-				<!-- 			<view class="cu-list menu">
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.5s'}]">
-					<view class="content">
-						<text class="text-grey">对外信息展示</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{getSubStringText(personalMsg.realname+'@'+personalMsg.orgCode,11)}}</text>
-					</view>
-				</view>
-			</view> -->
-
-
-
-				<!-- 			<view class="cu-list menu">
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '0.9s'}]">
-					<view class="content">
-						<text class="text-grey">手机</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{personalMsg.phone}}</text>
-					</view>
-				</view>
-				<view class="cu-item animation-slide-bottom" :style="[{animationDelay: '1s'}]">
-					<view class="content">
-						<text class="text-grey">邮箱</text>
-					</view>
-					<view class="action">
-						<text class="text-grey">{{personalMsg.email}}</text>
-					</view>
-				</view>
-			</view> -->
 			</uni-card>
 
 
@@ -130,143 +45,110 @@
 		USER_INFO
 	} from "@/common/util/constants"
 	import api from '@/api/api.js'
+	import http from '@/common/service/http.js'
 	export default {
 		data() {
 			return {
-				userInfo: {},
-				imageStyles: {
-					width: 84,
-					height: 84,
-					border: {
-						radius: '50%'
-					}
-				},
-				listStyles: {
-					// 是否显示边框
-					border: true,
-					// 是否显示分隔线
-					dividline: true,
-					// 线条样式
-					borderStyle: {
-						width: 1,
-						color: 'blue',
-						style: 'dashed',
-						radius: 2
-					}
-				},
-				fileLists: [{
-					//url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg',
-					url: '/static/touxiang.jpg',
-					extname: 'png',
-					name: 'shuijiao.png'
-				}],
+				id: '',
 				user: {
 					companyname: '',
 					number: '',
 					username: '',
 				},
-				personalMsg: {
-					avatar: '',
-					realname: '',
-					username: '',
-					sex: 1,
-					birthday: new Date(),
-					orgCode: '',
-					workNo: '',
-					status: 1,
-					phone: '',
-					telephone: '',
-					email: '',
-					post: '',
-					departIds: '',
-					identity: '',
-				},
-				userUrl: '/sys/user/queryById',
-				positionUrl: '/sys/position/list',
-				departUrl: '/sys/user/userDepartList'
+				photo: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/b7c7f970-517d-11eb-97b7-0dc4655d6e68.jpg'
 			};
 		},
 		onLoad() {
-			this.user = uni.getStorageSync(USER_INFO).employee;
-			console.log(this.user)
+			let user = uni.getStorageSync(USER_INFO).employee;
+			this.id = user.id
+			this.loadinfo()
 
 		},
 		methods: {
-			getSubStringText(text, len) {
-				if (!text || text.length == 0) {
-					return ''
-				}
-				if (text.length < len) {
-					return text;
-				}
-				return text.substr(0, len) + "..."
-			},
-			rightClick() {
-				this.$Router.push({
-					name: 'useredit',
-					params: this.personalMsg
-				})
-				/* uni.navigateTo({
-				    url: '/pages/user/useredit?item='+item
-				}); */
-			},
 			loadinfo() {
-				this.$http.get(this.userUrl, {
+				let token = uni.getStorageSync(ACCESS_TOKEN)
+				this.$http.get('ibps/platform/v3/employee/load', {
 					params: {
-						id: this.$store.getters.userid
+						employeeId: this.id
 					}
 				}).then(res => {
-					console.log("用户", res)
-					if (res.data.success) {
-						let result = res.data.result
-						if (result.avatar && result.avatar.length > 0)
-							this.personalMsg.avatar = api.getFileAccessHttpUrl(result.avatar)
-						this.personalMsg.realname = result.realname
-						this.personalMsg.username = result.username
-						this.personalMsg.post = result.post
-						this.personalMsg.sex = result.sex === 1 ? '男' : '女'
-						this.personalMsg.birthday = result.birthday == null ? '无' : result.birthday
-						this.personalMsg.departIds = result.departIds
-						this.personalMsg.workNo = result.workNo
-						this.personalMsg.phone = result.phone
-						this.personalMsg.telephone = result.telephone == null ? '无' : result.telephone
-						this.personalMsg.email = result.email
-						this.personalMsg.post = result.post
-						this.personalMsg.identity = result.identity === 1 ? '普通成员' : '上级'
-						this.personalMsg.status = result.status === 1 ? '正常' : '冻结'
-						this.personalMsg.orgCode = result.orgCode
-					}
-				}).catch(e => {
-					console.log("请求错误", e)
-				})
-
-				this.$http.get(this.departUrl, {
-					params: {
-						userId: this.$store.getters.userid
+					if (res.data.state == '200') {
+						let result = res.data.data
+						this.user = result
+						if (result.photo != '') {
+							this.photo = http.apiHosp + 'ibps/platform/v3' + this.user.photo +
+								'&access_token=' +
+								token + '&tenantId='
+						}
 					}
+				}).catch(e => {})
+			},
+			sumbit() {
+				this.$http.post('ibps/platform/v3/employee/update', {
+					partyEmployeePo: this.user,
+					user: this.user,
+					attrValueVoList: [],
+					positionVoList: [],
+					roleVoList: [],
+					userGroupPoList: []
 				}).then(res => {
-					if (res.success) {
-						for (let item of res.result) {
-							this.personalMsg.orgCode = item.title
-							this.personalMsg.departIds = item.title
-						}
+					if (res.data.state == '200') {
+						let datas = res.data
+						uni.showToast({
+							title: datas.message,
+							icon: 'none',
+							duration: 2000
+						})
+					} else {
+						let datas = res.data
+						uni.showToast({
+							title: datas.cause,
+							icon: 'none',
+							duration: 2000
+						})
 					}
-				}).catch(e => {
-					console.log("请求错误", e)
+				}).catch(res => {
+					let datas = res.data
+					uni.showToast({
+						title: datas.cause,
+						icon: 'none',
+						duration: 2000
+					})
 				})
+			},
+			getImage() {
+				let token = uni.getStorageSync(ACCESS_TOKEN)
+				uni.chooseImage({
+					success: (res) => {
+						const tempFilePaths = res.tempFilePaths;
+						// this.select(tempFilePaths[0])
+
+						uni.uploadFile({
+							// url: http.apiHosp + 'ibps/platform/v3/file/upload/mobile', //仅为示例,非真实的接口地址
+							url: http.apiHosp + '/ibps/platform/v3/file/upload', //仅为示例,非真实的接口地址
+							filePath: tempFilePaths[0],
+							name: 'file',
+							formData: {
+								'ext': '.jpg'
+							},
+							header: {
+								'X-Authorization-access_token': token,
+								'X-Authorization-systemid': ''
+							},
+							success: (res) => {
+								let data = JSON.parse(res.data)
+								if (data.state == 200) {
+									let datas = data.data
+									this.user.photo = '/file/getImage?attachmentId=' + datas.id
+									let phto = '/file/getImage?attachmentId=' + datas.id +
+										'&access_token=' + token + '&tenantId='
+									this.photo = http.apiHosp + 'ibps/platform/v3' + phto
+								}
 
-				this.$http.get(this.positionUrl).then(res => {
-					if (res.success) {
-						let postArr = res.result.records
-						for (let item of postArr) {
-							if (this.personalMsg.post == item.code) {
-								this.personalMsg.post = item.name
 							}
-						}
+						});
 					}
-				}).catch(e => {
-					console.log("请求错误", e)
-				})
+				});
 			},
 		}
 	}
@@ -317,3 +199,12 @@
 		color: #333;
 	}
 </style>
+<style lang="scss" scoped>
+	/deep/ .uni-input-input {
+		color: #8799a3;
+	}
+
+	/deep/ .u-form-item--left__content__label {
+		color: #8799a3;
+	}
+</style>

+ 2 - 2
pages/user/userexit.vue

@@ -1,8 +1,8 @@
 <template name="user">
 	<view>
 		<scroll-view scroll-y class="page">
-			<image src="/static/componentBg.png " mode="widthFix" class="response"></image>
-			<view class="nav-list">
+			<!-- <image src="/static/componentBg.png " mode="widthFix" class="response"></image> -->
+			<view class="nav-list u-m-t-30">
 				<navigator hover-class="none" :url="'/pages/common/' + item.name" class="nav-li" navigateTo
 					:class="'bg-'+item.color" :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]"
 					v-for="(item,index) in elements" :key="index">