Răsfoiți Sursa

update 样品页面展示修改

linweizeng 3 ani în urmă
părinte
comite
05bf11dd35
2 a modificat fișierele cu 314 adăugiri și 91 ștergeri
  1. 116 67
      pages/jiance/order.vue
  2. 198 24
      pages/jiance/order/lhypbMessage.vue

+ 116 - 67
pages/jiance/order.vue

@@ -41,51 +41,59 @@
 			<uni-group mode="card" :title="'样品' + (index+1)" v-for="(item,index) in form.lhypb" :key="index"
 				v-if="index == lhypbIndex">
 				<u-form-item label="样品名称" prop="yangPinMingCheng" required>
-					<u-input placeholder="请输入样品名称" v-model="item.yangPinMingCheng"
-						:disabled="type == 'detail'?true :false" />
+					<text>{{item.yangPinMingCheng}}</text>
+					<!-- <u-input placeholder="请输入样品名称" v-model="item.yangPinMingCheng"
+						:disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
 				<u-form-item label="样品编号">
-					<u-input placeholder="请输入样品编号" v-model="item.yangPinBianHao" disabled />
+					<text>{{item.yangPinBianHao}}</text>
+					<!-- <u-input placeholder="请输入样品编号" v-model="item.yangPinBianHao" disabled /> -->
 				</u-form-item>
 				<u-form-item label="姓名">
-					<u-input placeholder="请输入姓名" v-model="item.xingMing" :disabled="type == 'detail'?true :false" />
+					<text>{{item.xingMing}}</text>
+					<!-- <u-input placeholder="请输入姓名" v-model="item.xingMing" :disabled="type == 'detail'?true :false" /> -->
 				</u-form-item>
 				<u-form-item label="性别">
-					<u-radio-group v-model="item.xingBie" v-if="type != 'detail'">
+					<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>
+					<text v-else>{{item.xingBie}}</text> -->
 				</u-form-item>
 				<u-form-item label="年龄">
-					<u-input placeholder="请输入年龄" v-model="item.nianLing" />
+					<text>{{item.nianLing}}</text>
+					<!-- <u-input placeholder="请输入年龄" v-model="item.nianLing" /> -->
 				</u-form-item>
 				<u-form-item label="送检批号/编号" prop="songJianPiHao" required>
-					<u-input placeholder="请输入送检批号/编号" v-model="item.songJianPiHao"
-						:disabled="type == 'detail'?true :false" />
+					<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>
-					<u-input placeholder="请选择样本状态" type="select" v-model="item.yangPinZhuangTai"
+					<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>
+					<text v-else>{{item.yangPinZhuangTai}}</text> -->
 				</u-form-item>
 				<u-form-item label="送检时间" prop="songJianShiJian" required>
-					<u-input placeholder="请选择送检时间" type="select" v-model="item.songJianShiJian"
+					<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>
+					<text v-else>{{item.songJianShiJian}}</text> -->
 				</u-form-item>
 				<u-form-item label="备注">
-					<u-input placeholder="请输入备注" v-model="item.beiZhu1" :disabled="type == 'detail'?true :false" />
+					<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-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> -->
 
 				<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)"
+					<!-- <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"
@@ -103,8 +111,9 @@
 								<view>送样要求:{{it.yang_pin_tiao_jia || ''}}</view>
 							</view>
 						</label>
-					</checkbox-group>
-					<view v-for="(it, x) in item.jianCeList" :key="x" v-if="it.checked && type=='detail'">
+					</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;">
@@ -130,26 +139,29 @@
 				</view>
 				<block v-if="item.showBoolean1">
 					<u-form-item label="样品类型①">
-						<u-input placeholder="请选择样品类型①" type="select" v-model="item.yangPinLeiXing"
+						<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>
+						<text v-else>{{item.yangPinLeiXing}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件①">
-						<u-input placeholder="请选择样品运输条件①" type="select" v-model="item.yangBenYunShuTiao"
+						<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>
+						<text v-else>{{item.yangBenYunShuTiao}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量①">
-						<!-- <u-number-box v-model="item.shuLiang" v-if="type != 'detail'"></u-number-box> -->
-						<uni-number-box v-model="item.shuLiang" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiang}}</text>
+						<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="样品规格①">
-						<u-input placeholder="请输入样品规格①" v-model="item.yangPinGuiGe" v-if="type != 'detail'" />
+						<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>
+						<text v-else>{{item.yangPinGuiGe}}</text> -->
 					</u-form-item>
 				</block>
 
@@ -164,26 +176,29 @@
 				</view>
 				<block v-if="item.showBoolean2">
 					<u-form-item label="样品类型②">
-						<u-input placeholder="请选择样品类型②" type="select" v-model="item.yangPinLeiXingEr"
+						<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>
+						<text v-else>{{item.yangPinLeiXingEr}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件②">
-						<u-input placeholder="请选择样品运输条件②" type="select" v-model="item.yangPinYunShuTiao"
+						<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>
+						<text v-else>{{item.yangPinYunShuTiao}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量②">
-						<!-- <u-number-box v-model="item.shuLiangEr" v-if="type != 'detail'"></u-number-box> -->
-						<uni-number-box v-model="item.shuLiangEr" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiangEr}}</text>
+						<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="样品规格②">
-						<u-input placeholder="请输入样品规格②" v-model="item.yangPinGuiGeEr" v-if="type != 'detail'" />
+						<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>
+						<text v-else>{{item.yangPinGuiGeEr}}</text> -->
 					</u-form-item>
 				</block>
 
@@ -198,26 +213,29 @@
 				</view>
 				<block v-if="item.showBoolean3">
 					<u-form-item label="样品类型③">
-						<u-input placeholder="请选择样品类型③" type="select" v-model="item.yangPinLeiXingSan"
+						<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>
+						<text v-else>{{item.yangPinLeiXingSan}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件③">
-						<u-input placeholder="请选择样品运输条件③" type="select" v-model="item.yangPinYunShuSan"
+						<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.yangPinLeiXingSan}}</text>
+						<text v-else>{{item.yangPinYunShuSan}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量③">
-						<!-- <u-number-box v-model="item.shuLiangSan" v-if="type != 'detail'"></u-number-box> -->
-						<uni-number-box v-model="item.shuLiangSan" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiangSan}}</text>
+						<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="样品规格③">
-						<u-input placeholder="请输入样品规格③" v-model="item.yangPinGuiGeSan" v-if="type != 'detail'" />
+						<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>
+						<text v-else>{{item.yangPinGuiGeSan}}</text> -->
 					</u-form-item>
 				</block>
 
@@ -232,38 +250,46 @@
 				</view>
 				<block v-if="item.showBoolean4">
 					<u-form-item label="样品类型④">
-						<u-input placeholder="请选择样品类型④" type="select" v-model="item.yangPinLeiXingSi"
+						<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>
+						<text v-else>{{item.yangPinLeiXingSi}}</text> -->
 					</u-form-item>
 					<u-form-item label="样品运输条件④">
-						<u-input placeholder="请选择样品运输条件④" type="select" v-model="item.yangPinYunShuSi"
+						<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>
+						<text v-else>{{item.yangPinYunShuSi}}</text> -->
 					</u-form-item>
 					<u-form-item label="数量④">
-						<!-- <u-number-box v-model="item.shuLiangSi" v-if="type != 'detail'"></u-number-box> -->
-						<uni-number-box v-model="item.shuLiangSi" v-if="type != 'detail'"></uni-number-box>
-						<text v-else>{{item.shuLiangSi}}</text>
+						<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="样品规格④">
-						<u-input placeholder="请输入样品规格④" v-model="item.yangPinGuiGeSi" v-if="type != 'detail'" />
+						<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>
+						<text v-else>{{item.yangPinGuiGeSi}}</text> -->
 					</u-form-item>
 				</block>
 				<u-form-item label="项目名称" prop="xiangMuMingCheng" v-if="form.weiTuoHeTong == '技术服务协议'">
-					<u-input placeholder="请输入项目名称" v-model="item.xiangMuMingCheng"
-						:disabled="type == 'detail'?true :false" />
+					<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">
-					<u-input v-model="item.yangPinZongJia" disabled />
+					<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'">删除样品{{index+1}}
 				</u-button>
+				<u-button type="error" class="btn" @click="updateSing(item,index)" v-if="type != 'detail'">
+					修改样品{{index+1}}
+				</u-button>
 			</uni-group>
 
 			<u-button type="success" class="btn" @click="getSing()" v-if="type != 'detail'">添加样品</u-button>
@@ -363,7 +389,9 @@
 
 		<u-popup v-model="lhypbShow" mode="bottom" height="80%">
 			<view>
-				<lhypb-message ref="lhypbMessage" :jianCeTypeList="jianCeTypeList"></lhypb-message>
+				<lhypb-message ref="lhypbMessage" :jianCeTypeList="jianCeTypeList" @deletClick="deletClick"
+					@sumbitSingClick="sumbitSingClick">
+				</lhypb-message>
 			</view>
 		</u-popup>
 	</view>
@@ -512,7 +540,8 @@
 				selectShow: false,
 
 				lhypbIndex: 0,
-				lhypbShow: false
+				lhypbShow: false,
+				lhypbIndexData: 'add', //判断样品添加还是修改
 			}
 		},
 		onLoad(options) {
@@ -821,8 +850,6 @@
 					this.form.zongJia = (this.total * 1).toFixed(2)
 				}
 			},
-
-
 			//调用日期组件
 			dateClick(type, index) {
 				if (type == 'inspect') {
@@ -1122,8 +1149,6 @@
 
 					}
 				});
-
-
 				this.$http.post("ibps/business/v3/bpm/instance/start", data).then(res => {
 					if (res.data.state == 200) {
 						this.$tip.success('提交成功!')
@@ -1267,13 +1292,24 @@
 						showBoolean4: false,
 						mingChengShow: false
 					}
-					this.form.lhypb.push(obj)
+					this.lhypbShow = true
+					this.lhypbIndexData = 'add'
+					this.$nextTick(() => {
+						this.$refs.lhypbMessage.getInit(obj)
+					})
 				})
-
 			},
 			deletSing(index) {
 				this.form.lhypb.splice(index, 1)
 			},
+			updateSing(item, index) {
+				this.lhypbIndex = index
+				this.lhypbIndexData = 'edit'
+				this.lhypbShow = true
+				this.$nextTick(() => {
+					this.$refs.lhypbMessage.getInit(item)
+				})
+			},
 			//弹出框显示
 			qianming(index) {
 				this.qianshow = true
@@ -1334,6 +1370,19 @@
 				});
 				return uuid;
 			},
+			deletClick() {
+				this.lhypbShow = false
+			},
+			sumbitSingClick(item) {
+				if (this.lhypbIndexData == 'add') {
+					this.lhypbShow = false
+					this.form.lhypb.push(item)
+				} else {
+					this.lhypbShow = false
+					this.form.lhypb[this.lhypbIndex] = item
+				}
+
+			}
 		}
 	}
 </script>

+ 198 - 24
pages/jiance/order/lhypbMessage.vue

@@ -26,24 +26,24 @@
 				</u-form-item>
 				<u-form-item label="样本状态" prop="yangPinZhuangTai" required>
 					<u-input placeholder="请选择样本状态" type="select" v-model="form.yangPinZhuangTai"
-						@click="sheetClick('state',index)" />
+						@click="sheetClick('state')" />
 				</u-form-item>
 				<u-form-item label="送检时间" prop="songJianShiJian" required>
 					<u-input placeholder="请选择送检时间" type="select" v-model="form.songJianShiJian"
-						@click="dateClick('inspect',index)" />
+						@click="dateClick('inspect')" />
 				</u-form-item>
 				<u-form-item label="备注">
 					<u-input placeholder="请输入备注" v-model="form.beiZhu1" />
 				</u-form-item>
 				<u-form-item label="检测类型">
 					<u-input placeholder="请选择检测类型" type="select" v-model="form.jianCeType"
-						@click="selectClick('jianCeType',index)" />
+						@click="selectClick('jianCeType')" />
 				</u-form-item>
 
 				<u-form-item label="检测项目" prop="name" label-position="top">
-					<checkbox-group v-for="(it, x) in form.jianCeList" :key="x" @click="changeIndex(it,index,x)">
+					<checkbox-group v-for="(it, x) in form.jianCeList" :key="x" @click="changeIndex(it,x)">
 						<label class=" uni-list-cell uni-list-cell-pd"
-							v-show="(it.jian_ce_lei_bie_==item.jianCeType) || it.checked"
+							v-show="(it.jian_ce_lei_bie_==form.jianCeType) || it.checked"
 							style="display: flex;margin: 15rpx 10rpx;font-size: 20rpx;line-height: 40rpx;">
 							<view>
 								<checkbox :checked="it.checked" :value="it.id_" />
@@ -59,7 +59,7 @@
 							</view>
 						</label>
 					</checkbox-group>
-					<view v-for="(it, x) in form.jianCeList" :key="x" v-if="it.checked">
+					<!-- <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;">
@@ -71,7 +71,7 @@
 								<view>送样要求:{{it.yang_pin_tiao_jia || ''}}</view>
 							</view>
 						</view>
-					</view>
+					</view> -->
 				</u-form-item>
 
 				<view class="qingshe" @click="form.showBoolean1 = !form.showBoolean1">
@@ -86,18 +86,18 @@
 				<block v-if="form.showBoolean1">
 					<u-form-item label="样品类型①">
 						<u-input placeholder="请选择样品类型①" type="select" v-model="form.yangPinLeiXing"
-							@click="sheetClick('yangpinType1',index)" />
+							@click="sheetClick('yangpinType1')" />
 					</u-form-item>
 					<u-form-item label="样品运输条件①">
 						<u-input placeholder="请选择样品运输条件①" type="select" v-model="form.yangBenYunShuTiao"
-							@click="sheetClick('transportType1',index)" />
+							@click="sheetClick('transportType1')" />
 					</u-form-item>
 					<u-form-item label="数量①">
 						<uni-number-box v-model="form.shuLiang"></uni-number-box>
 					</u-form-item>
 					<u-form-item label="样品规格①">
 						<u-input placeholder="请输入样品规格①" v-model="form.yangPinGuiGe" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification1',index)">规格
+						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification1')">规格
 						</u-button>
 					</u-form-item>
 				</block>
@@ -114,18 +114,18 @@
 				<block v-if="form.showBoolean2">
 					<u-form-item label="样品类型②">
 						<u-input placeholder="请选择样品类型②" type="select" v-model="form.yangPinLeiXingEr"
-							@click="sheetClick('yangpinType2',index)" />
+							@click="sheetClick('yangpinType2')" />
 					</u-form-item>
 					<u-form-item label="样品运输条件②">
 						<u-input placeholder="请选择样品运输条件②" type="select" v-model="form.yangPinYunShuTiao"
-							@click="sheetClick('transportType2',index)" />
+							@click="sheetClick('transportType2')" />
 					</u-form-item>
 					<u-form-item label="数量②">
 						<uni-number-box v-model="form.shuLiangEr"></uni-number-box>
 					</u-form-item>
 					<u-form-item label="样品规格②">
 						<u-input placeholder="请输入样品规格②" v-model="form.yangPinGuiGeEr" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification2',index)">规格
+						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification2')">规格
 						</u-button>
 					</u-form-item>
 				</block>
@@ -142,19 +142,18 @@
 				<block v-if="form.showBoolean3">
 					<u-form-item label="样品类型③">
 						<u-input placeholder="请选择样品类型③" type="select" v-model="form.yangPinLeiXingSan"
-							@click="sheetClick('yangpinType3',index)" />
+							@click="sheetClick('yangpinType3')" />
 					</u-form-item>
 					<u-form-item label="样品运输条件③">
 						<u-input placeholder="请选择样品运输条件③" type="select" v-model="form.yangPinYunShuSan"
-							@click="sheetClick('transportType3',index)" />
+							@click="sheetClick('transportType3')" />
 					</u-form-item>
 					<u-form-item label="数量③">
-						<!-- <u-number-box v-model="item.shuLiangSan" v-if="type != 'detail'"></u-number-box> -->
-						<uni-number-box v-model="item.shuLiangSan"></uni-number-box>
+						<uni-number-box v-model="form.shuLiangSan"></uni-number-box>
 					</u-form-item>
 					<u-form-item label="样品规格③">
 						<u-input placeholder="请输入样品规格③" v-model="form.yangPinGuiGeSan" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification3',index)">规格
+						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification3')">规格
 						</u-button>
 					</u-form-item>
 				</block>
@@ -171,18 +170,18 @@
 				<block v-if="form.showBoolean4">
 					<u-form-item label="样品类型④">
 						<u-input placeholder="请选择样品类型④" type="select" v-model="form.yangPinLeiXingSi"
-							@click="sheetClick('yangpinType4',index)" />
+							@click="sheetClick('yangpinType4')" />
 					</u-form-item>
 					<u-form-item label="样品运输条件④">
 						<u-input placeholder="请选择样品运输条件④" type="select" v-model="form.yangPinYunShuSi"
-							@click="sheetClick('transportType4',index)" />
+							@click="sheetClick('transportType4')" />
 					</u-form-item>
 					<u-form-item label="数量④">
-						<uni-number-box v-model="item.shuLiangSi"></uni-number-box>
+						<uni-number-box v-model="form.shuLiangSi"></uni-number-box>
 					</u-form-item>
 					<u-form-item label="样品规格④">
-						<u-input placeholder="请输入样品规格④" v-model="item.yangPinGuiGeSi" />
-						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification4',index)">规格
+						<u-input placeholder="请输入样品规格④" v-model="form.yangPinGuiGeSi" />
+						<u-button slot="right" type="success" size="mini" @click="sheetClick('specification4')">规格
 						</u-button>
 					</u-form-item>
 				</block>
@@ -193,25 +192,84 @@
 					<u-input v-model="form.yangPinZongJia" disabled />
 				</u-form-item>
 			</u-form>
+			<view style="height: 220rpx;"></view>
+
+			<view class="btnBottom">
+				<u-button type="error" class="btn" @click="deletSing">取消
+				</u-button>
+				<u-button type="error" class="btn" @click="sumbitSing">保存
+				</u-button>
+			</view>
 		</view>
 
+		<u-action-sheet :list="list" v-model="sheetShow" @click="actionSheetCallback" z-index="2000">
+		</u-action-sheet>
+		<u-select v-model="selectShow" :list="list" @confirm="selectConfirm"></u-select>
+		<u-calendar v-model="dateShow" :mode="mode" max-date="2050-01-01" @change="dateChange"></u-calendar>
+
 	</view>
 </template>
 
 <script>
 	import order from './test.json'
 	export default {
+		props: {
+			jianCeTypeList: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+		},
 		data() {
 			return {
 				errorType: ['toast'],
 				form: {
 
 				},
+				//样本状态
+				sampleStateList: order.sampleState,
 				sexList: order.sex,
-				list: []
+				//样本类型
+				sampleTypeList: order.sampleType,
+				//样本运输条件
+				transportTypeList: order.transportType,
+				//样本规格
+				specificationList: order.specification,
+				list: [],
+				listType: '',
+				sheetShow: false,
+				selectShow: false,
+				dateShow: false,
+				mode: 'date',
+				type: ""
 			}
 		},
 		methods: {
+			getInit(data) {
+				this.form = data
+			},
+			changeIndex(it, x) {
+				let itemData = this.form
+				this.form.jianCeList[x].checked = !this.form.jianCeList[x].checked
+
+				let show = itemData.jianCeList.some(item => item.id_ == '1039826037036285952' || item.id_ ==
+					'1040205909151711232')
+
+				if (show) {
+					itemData.mingChengShow = true
+				}
+				this.getTotal()
+			},
+			getTotal() {
+				var itemTotal = 0
+				this.form.jianCeList.forEach((it, x) => {
+					if (it.checked) {
+						itemTotal += parseFloat(it.zhe_hou_jia_ge_ || 0)
+					}
+				})
+				this.form.yangPinZongJia = (itemTotal).toFixed(2)
+			},
 			selectClick(type) {
 				this.listType = type
 				this.selectShow = true
@@ -219,6 +277,107 @@
 					this.list = this.jianCeTypeList
 				}
 			},
+			sheetClick(type) {
+				this.listType = type
+				this.sheetShow = true
+				if (type == 'state') {
+					this.list = this.sampleStateList
+				}
+
+				//1
+				if (type.includes('yangpinType')) {
+					this.list = this.sampleTypeList
+				}
+				if (type.includes('transportType')) {
+					this.list = this.transportTypeList
+				}
+				if (type.includes('specification')) {
+					this.list = this.specificationList
+				}
+				if (type == 'disposition') {
+					this.list = this.dispositionList
+				}
+			},
+
+			//下拉框回调
+			actionSheetCallback(e) {
+				let that = this
+				let lists = that.form
+
+				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
+				}
+
+			},
+			//调用日期组件
+			dateClick(type) {
+				if (type == 'inspect') {
+					this.type = type
+					this.mode = 'date'
+					this.dateShow = true
+				}
+			},
+			//日期回调
+			dateChange(e) {
+				if (this.type == 'inspect') {
+					this.form.songJianShiJian = e.result
+				}
+			},
+
+			deletSing() {
+				this.$emit("deletClick")
+			},
+			sumbitSing() {
+				this.$emit("sumbitSingClick", this.form)
+			}
 		}
 	}
 </script>
@@ -235,4 +394,19 @@
 		align-items: center;
 		margin-top: 25rpx;
 	}
+
+	.btnBottom {
+		z-index: 1500;
+		height: 220rpx;
+		background-color: #FFFFFF;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+
+
+		.btn {
+			margin: 20rpx;
+		}
+	}
 </style>