Просмотр исходного кода

跳转到抽样单未选中数据时的消息提示

jiangyu 3 лет назад
Родитель
Сommit
e3ae1f2d49
2 измененных файлов с 26 добавлено и 49 удалено
  1. 1 43
      src/components/jc/inputSample.vue
  2. 25 6
      src/components/jc/setTaskcd.vue

+ 1 - 43
src/components/jc/inputSample.vue

@@ -214,49 +214,6 @@
 					Authorization: 'bearer' + token
 				},
 				fileList: [],
-				// form: {
-				// 	sample_name: '',//样品名称
-				// 	sample_id: '',//样品编码
-				// 	brand: '',//商标
-				// 	ispack: '',//包装
-				// 	type: '', //型号规格
-				// 	standard: '',//执行标准
-				// 	production_date: '',//生产日期或批号
-				// 	place: '', //产地,
-				// 	certicfie: '',//产品认证情况
-				// 	certifie_num: '',//证书编号
-				// 	sample_renum: '',//抽样数量
-				// 	sample_num_unit: '',//单位
-				// 	sample_base: '',//抽样基数
-				// 	sample_base_unit: '',//单位
-				// 	sample_ground: '',//抽样场所
-				// 	// 受检单位情况
-				// 	units_name: '',//单位名称
-				// 	address: '',//通讯地址
-				// 	corporation: '',//法定代表人
-				// 	user_name: '',//受检人
-				// 	phone: '',//电话
-				// 	fax: '',//传真
-				// 	// 生产单位情况
-				// 	production_class: '',//生产、自购
-				// 	production_name: '',//单位名称
-				// 	p_address: '',//通讯地址
-				// 	p_postcode: '',//邮编
-				// 	p_user_name: '',//联系人
-				// 	p_phone: '',//电话
-				// 	p_fax: '',//传真
-				// 	// 抽样单位情况
-				// 	sample_unit_name: '',//单位名称
-				// 	sample_unit_user: '',//联系人
-				// 	sample_unit_address: '',//通讯地址
-				// 	sample_unit_postcode: '',//邮编
-				// 	sample_unit_phone: '',//联系电话
-				// 	sample_unit_fax: '',//传真
-				// 	sample_unit_email: '',//Email
-				// 	base: '',//检测任务依据
-				// 	sample_date: '',//抽样时间
-				// 	filr_url: '',//被抽检单位签字盖章附件
-				// 		},
 				form: {},
 				cyd_data: {},//抽样单信息上部分
 				unit_test: {},//受检单位信息
@@ -326,6 +283,7 @@
 				// console.log(this.form.sample_name)
 				var that = this
 				console.log(that.cyd_data)
+				that.cyd_data.task_id = that.task_id
 				that.form.cyd_data = that.cyd_data
 				that.form.unit_test = that.unit_test
 				that.form.unit_production = that.unit_production

+ 25 - 6
src/components/jc/setTaskcd.vue

@@ -530,7 +530,7 @@
 					},
 					{
 						label: '受检单位',
-						prop: 'units_name',
+						prop: 'unitTest.unit_name',
 						width: 180
 					},
 					{
@@ -558,12 +558,12 @@
 					},
 					{
 						label: '受检单位',
-						prop: 'production_name',
+						prop: 'unitTest.unit_name',
 						width: 180
 					},
 					{
 						label: '抽样单位',
-						prop: 'sample_unit_name',
+						prop: 'unitSample.unit_name',
 						width: 180
 					}, {
 						label: '检测单位',
@@ -652,7 +652,10 @@
 				total: 0,
 				sampleShow: false, //是否展示抽样卡片
 				checkShow: false, //是否展示检测卡片
-				currentRow: null //选中机构地域表格数据项
+				currentRow: null,
+				
+
+				 //选中机构地域表格数据项
 			};
 		},
 		components: {
@@ -838,8 +841,11 @@
 			},
 			async check(id, name) {
 				this.inputCheckShow = true
+
 				this.check_id = id,
-					this.check_name = name
+				this.check_name = name
+				console.log(this.check_id)
+				console.log(this.check_name)
 				var that = this
 				const {
 					data: res
@@ -847,6 +853,7 @@
 					sample_id: id
 				});
 				that.testPesticides = res.data
+				console.log(that.testPesticides)
 			},
 			handleClick(tab, event) {
 				console.log(tab, event);
@@ -896,13 +903,24 @@
 			},
 			// 填报抽样单
 			input() {
-				this.$router.push({
+				// console.log(this.under_id)
+				// // console.log(this.currentRow.id)
+				if(this.currentRow == null){
+					this.$message('请选中一条表格数据');
+					return
+				}
+						this.$router.push({
 					name: 'inputSample',
 					params: {
 						task_id: this.readForm.taskInfo.id,
 						under_id: this.currentRow.id
 					}
 				})
+				// }
+				// if(isset(this.currentRow.id)){
+				// 	this.under_id=this.currentRow.id
+				// }
+			
 				// console.log(this.currentRow.id)
 			},
 			// 返回
@@ -984,6 +1002,7 @@
 			},
 			// 跳转到查看抽样单详情
 			sampleDetail(id) {
+				console.log(id)
 				this.$router.push({
 					name: 'sampleDetail',
 					params: {