linweizeng há 3 anos atrás
pai
commit
1dcb25ec9c
2 ficheiros alterados com 72 adições e 15 exclusões
  1. 40 4
      pages/jiance/order.vue
  2. 32 11
      pages/jiance/order/lhypbMessage.vue

+ 40 - 4
pages/jiance/order.vue

@@ -550,6 +550,9 @@
 				lhypbIndex: 0,
 				lhypbShow: false,
 				lhypbIndexData: 'add', //判断样品添加还是修改
+				buttonFlagNum: '',
+
+				taoCanList: []
 			}
 		},
 		onLoad(options) {
@@ -570,6 +573,9 @@
 					this.getTaskId(options.id)
 				}
 			}
+			if (options.buttonFlag) {
+				this.buttonFlagNum = options.buttonFlag
+			}
 		},
 		onReady() {
 			this.$refs.form.setRules(this.rules);
@@ -767,7 +773,8 @@
 					this.form.weiTuoFangLianXiD = data.dian_hua_
 					this.form.weiTuoFangLianXiR = data.lian_xi_ren_
 					this.form.weiTuoFangMingChe = data.ke_hu_dang_wei
-					this.getJiance(e)
+					this.getJiance(e, '')
+					this.getTaoCanList(data.xuan_ze_tao_can_)
 				}
 			},
 			//根据合同id选择检测项目
@@ -821,6 +828,35 @@
 					}
 				});
 			},
+			//根据合同查询套餐
+			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
+							datas.forEach(item => {
+								this.$set(item, 'chacked', false)
+							})
+							this.taoCanList = datas
+						} else {
+
+							setTimeout(function() {
+								uni.showToast({
+									title: '该合同没有套餐检测项目',
+									icon: 'none',
+									duration: 1000
+								})
+							}, 500);
+							this.taoCanShow = false
+							this.taoCanList = []
+						}
+					}
+				})
+			},
 			//选择项目
 			changeIndex(it, index, x) {
 				let itemData = this.form.lhypb[index]
@@ -1238,8 +1274,6 @@
 					}
 				});
 			},
-
-
 			//添加样品记录
 			getSing() {
 				if (this.form.heTongId == '') {
@@ -1302,7 +1336,9 @@
 						showBoolean2: false,
 						showBoolean3: false,
 						showBoolean4: false,
-						mingChengShow: false
+						mingChengShow: false,
+
+						taoCanList: JSON.parse(JSON.stringify(this.taoCanList))
 					}
 					this.lhypbShow = true
 					this.lhypbIndexData = 'add'

+ 32 - 11
pages/jiance/order/lhypbMessage.vue

@@ -35,6 +35,13 @@
 				<u-form-item label="备注">
 					<u-input placeholder="请输入备注" v-model="form.beiZhu1" />
 				</u-form-item>
+
+				<view class="qingshe" style="background-color: #99cc66;">
+					<view class="qingTitle" style="color: #FFFFFF;">
+						常规项目选择
+					</view>
+				</view>
+
 				<u-form-item label="检测类型">
 					<u-input placeholder="请选择检测类型" type="select" v-model="form.jianCeType"
 						@click="selectClick('jianCeType')" />
@@ -59,19 +66,28 @@
 							</view>
 						</label>
 					</checkbox-group>
-					<!-- <view v-for="(it, x) in form.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;">
+				</u-form-item>
+
+				<view class="qingshe" style="background-color: #99cc66;">
+					<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;">
 								<view>
-									{{it.jian_ce_lei_bie_ || ''}}-{{it.jian_ce_xiang_mu_ || ''}}[{{it.zhe_hou_jia_ge_ || ''}}元]
+									{{it.tao_can_ming_chen || ''}}
 								</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> -->
+						</label>
+					</checkbox-group>
 				</u-form-item>
 
 				<view class="qingshe" @click="form.showBoolean1 = !form.showBoolean1">
@@ -219,7 +235,7 @@
 				default: () => {
 					return []
 				}
-			},
+			}
 		},
 		data() {
 			return {
@@ -286,6 +302,11 @@
 				}
 				this.getTotal()
 			},
+			changeTaoCanIndex(it, x) {
+				let itemData = this.form
+				this.form.taoCanList[x].checked = !this.form.taoCanList[x].checked
+				this.getTotal()
+			},
 			getTotal() {
 				var itemTotal = 0
 				this.form.jianCeList.forEach((it, x) => {