|
@@ -0,0 +1,585 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
+ <el-breadcrumb-item>首页</el-breadcrumb-item>
|
|
|
+ <!-- <el-breadcrumb-item :to="{ path: '/jc/setTaskcd'}">例行检测</el-breadcrumb-item> -->
|
|
|
+ <!-- <el-breadcrumb-item>承担单位</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{ path: '/jc/routineMonitor' }">例行检测</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item>执行任务</el-breadcrumb-item>
|
|
|
+ :to="{ path: '/jc/setTaskcd' }"
|
|
|
+ <el-breadcrumb-item>抽样</el-breadcrumb-item> -->
|
|
|
+ <el-breadcrumb-item>填报抽样单</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ <div id="sjinformation">
|
|
|
+ <el-steps :active="active" finish-status="success" style="width:70%; margin:auto;">
|
|
|
+ <!-- <el-step title="步骤 1" description="填报抽样单编号"></el-step> -->
|
|
|
+ <el-step title="步骤 1" description="填报受检单位信息"></el-step>
|
|
|
+ <el-step title="步骤 2" description="填报样品信息"></el-step>
|
|
|
+ <el-step title="步骤 3" description="填报抽样单信息"></el-step>
|
|
|
+ </el-steps>
|
|
|
+ </div>
|
|
|
+ <!-- 受检单位信息 -->
|
|
|
+ <div id="sjinformation" style="margin:40px auto; width:60%" v-show="active == 1">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="单位名称:" prop="inspected_name" class="labelItem" required show-message="false" inline-message="true">
|
|
|
+ <el-input v-model="inspected_Unit.inspected_name" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单位地址:" prop="inspected_address" class="labelItem" required>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="10" style="margin-right:10px;">
|
|
|
+ <!-- <el-cascader placeholder="请选择地区" :options="region" v- model="selectedOptions" @change="handleChange" :props="{ expandTrigger: 'hover' }" style="width:100%">
|
|
|
+ </el-cascader> -->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-input v-model="inspected_Unit.address2" placeholder="请输入详细地址" style="width:100%"></el-input>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="联系人:" prop="contact_name" class="labelItem" required>
|
|
|
+ <el-input v-model="inspected_Unit.contact_name" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话:" prop="contact_phone" class="labelItem" required>
|
|
|
+ <el-input v-model="inspected_Unit.contact_phone" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="Email:" prop="contact_email" class="labelItem">
|
|
|
+ <el-input v-model="inspected_Unit.contact_email" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="success" style="margin-bottom:30px;" size="small" @click="next1()">下一步</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 样品信息 -->
|
|
|
+ <div style="width: 90%; margin:40px auto;" v-show="active == 2">
|
|
|
+ <!-- 新增 -->
|
|
|
+ <!-- <el-row :gutter="90" style="margin-right: 0px;"> -->
|
|
|
+ <div style="display: flex;flex-direction: row;float: right; margin-bottom:20px;">
|
|
|
+ <el-button type="primary" size="small" plain icon="el-icon-plus" @click="addSampleInforDialog = true;">新增</el-button>
|
|
|
+ </div>
|
|
|
+ <!-- </el-row> -->
|
|
|
+ <!-- 表格数据区域-->
|
|
|
+ <el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%; margin:auto;"
|
|
|
+ :row-style="rowStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="50"></el-table-column>
|
|
|
+ <el-table-column label="序号" width="50px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index+1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column :key="table.label" v-for="table in tableHeader" :label="table.label" :prop="table.prop"
|
|
|
+ align="center" :width="table.width" :fixed="table.fixed" />
|
|
|
+ </el-table>
|
|
|
+ <el-pagination style="margin-top:20px;" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
+ :current-page="queryInfo.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="queryInfo.pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="total">
|
|
|
+ </el-pagination>
|
|
|
+
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="success" style="margin-bottom:30px;" size="small" @click="next2()">下一步</el-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div id="sjinformation" style="margin:40px auto; width:60%" v-show="active == 3">
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="抽样单编号:" prop="cyd_code" class="labelItem" required>
|
|
|
+ <el-input v-model="cyd_code" style="width:40%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="备注:" prop="cyd_log" class="labelItem" required>
|
|
|
+ <el-input v-model="sample_unit.cyd_log" style="width:40%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <el-form>
|
|
|
+ <el-form-item label="抽样单报告上传:" prop="releaser" class="labelItem" required>
|
|
|
+ <el-upload
|
|
|
+ class="upload-demo"
|
|
|
+ :headers="myHeaders"
|
|
|
+ action="http://syjcapi.aielab.net/api/v1/ossUpload"
|
|
|
+ :on-preview="handlePreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :before-remove="beforeRemove"
|
|
|
+ multiple
|
|
|
+ :limit="3"
|
|
|
+ :on-exceed="handleExceed"
|
|
|
+ :file-list="fileList">
|
|
|
+ <el-button size="small" type="primary">点击上传</el-button>
|
|
|
+ <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
|
|
+ </el-upload>
|
|
|
+ <!-- <el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"
|
|
|
+ action="http://syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
|
|
|
+ <i class="el-icon-upload"></i>
|
|
|
+ <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
+ </el-upload> -->
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="success" style="margin-bottom:30px;" size="small" @click="next3()">完成</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="footer">
|
|
|
+ <el-button v-if="active > 1" type="success" style="margin:auto;" @click="pre">上一步</el-button>
|
|
|
+ <el-button v-if="active < 3" type="success" style="margin-right:20px;" @click="next">下一步</el-button>
|
|
|
+ </div> -->
|
|
|
+
|
|
|
+ <!-- 新增样品信息弹框 -->
|
|
|
+ <el-dialog title="新增样品信息" :visible.sync="addSampleInforDialog" width="50%" :close-on-click-modal="false" class="dialogItem" append-to-body>
|
|
|
+ <el-form id="addSample">
|
|
|
+ <el-form-item label="样品名称:" prop="sample_name" class="labelItem" required show-message="false">
|
|
|
+ <el-input v-model="product_Unit.sample_name" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="样品编号:" prop="releaser" class="labelItem" required>
|
|
|
+ <el-input v-model="" style="width:42%"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="样品商标:" prop="sample_brand" class="labelItem" required>
|
|
|
+ <el-input v-model="product_Unit.sample_brand" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="规格型号:" prop="sample_type" class="labelItem" required>
|
|
|
+ <el-input v-model="product_Unit.sample_type" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生产日期:" prop="sample_md_date" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_md_date" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="质量等级:" prop="sample_quality_grade" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_quality_grade" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="标称生产者名称:" prop="sample_product_name" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_product_name" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="标称生产者联系电话:" prop="sample_product_phone" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_product_phone" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="样品来源:" prop="sample_source" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_source" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="抽样数量:" prop="sample_count" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_count" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="抽样基数:" prop="sample_base" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_base" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="抽样时间:" prop="sample_ing_date" class="labelItem">
|
|
|
+ <el-date-picker v-model="product_Unit.sample_ing_date" style="width: 42%;" align="right" type="date"
|
|
|
+ :picker-options="pickerOptions" clearable />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注:" prop="sample_log" class="labelItem">
|
|
|
+ <el-input v-model="product_Unit.sample_log" style="width:42%"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div class="footer">
|
|
|
+ <el-button type="success" style="margin-bottom:30px;" size="small" @click="postSample()">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+</div>
|
|
|
+<!-- 底部按钮 -->
|
|
|
+ <!-- <el-form>
|
|
|
+ <el-form-item class="btn">
|
|
|
+ <el-button type="primary" @click="back()">返回任务详情</el-button>
|
|
|
+ <el-button @click="resetForm()">重置</el-button>
|
|
|
+ <el-button @click="onSubmit">保存,继续添加</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form> -->
|
|
|
+ <!-- <el-form ref="form1" :model="form" label-width="110px"
|
|
|
+ style="margin-top: 20px;width: 48%;background-color: aliceblue;padding:10px 1px 1px 10px;">
|
|
|
+ </el-form> -->
|
|
|
+ <!-- </el-card> -->
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ const token = window.sessionStorage.getItem('token')
|
|
|
+ import {
|
|
|
+ provinceAndCityData,
|
|
|
+ regionData,
|
|
|
+ provinceAndCityDataPlus,
|
|
|
+ regionDataPlus,
|
|
|
+ CodeToText,
|
|
|
+ TextToCode
|
|
|
+ } from 'element-china-area-data'
|
|
|
+ export default {
|
|
|
+ name: 'inputSample',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ active: 1,
|
|
|
+ addSampleInforDialog: false,
|
|
|
+ total: 0,
|
|
|
+ cellStyle: {
|
|
|
+ padding: 2 + 'px'
|
|
|
+ },
|
|
|
+ rowStyle: {
|
|
|
+ height: 35 + 'px'
|
|
|
+ },
|
|
|
+ tableHeader: [{
|
|
|
+ label: '样品名称',
|
|
|
+ prop: 'sample_name'
|
|
|
+ // fixed: 'left'
|
|
|
+ },
|
|
|
+ // {
|
|
|
+ // label: '样品编号',
|
|
|
+ // prop: 'year'
|
|
|
+ // // fixed: 'left'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: '样品来源',
|
|
|
+ prop: 'sample_source',
|
|
|
+ // fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '抽样数量',
|
|
|
+ prop: 'sample_count'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '抽样基数',
|
|
|
+ prop: 'sample_base'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '生产日期',
|
|
|
+ prop: 'sample_md_date'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'sample_log'
|
|
|
+ }
|
|
|
+
|
|
|
+ ],
|
|
|
+ // 数据表格数据
|
|
|
+ tableData: [],
|
|
|
+ // 批量删除选中数据
|
|
|
+ multipleSelection: [],
|
|
|
+ myHeaders: {
|
|
|
+ Authorization: 'bearer' + token
|
|
|
+ },
|
|
|
+ queryInfo:{
|
|
|
+ pageSize:10,
|
|
|
+ pageNum:1,
|
|
|
+ },
|
|
|
+ fileList: [],
|
|
|
+ form: {},
|
|
|
+ // 抽样单id
|
|
|
+ cyd_id: '',
|
|
|
+ cyd_code: '',//抽验单编号
|
|
|
+ cyd_data: {},//抽样单信息上部分
|
|
|
+ inspected_Unit: {},//受检单位信息
|
|
|
+ product_Unit: {},//样品信息
|
|
|
+ unit_production: {},//生产单位信息
|
|
|
+ unit_sample: {},//抽样单位信息
|
|
|
+ sample_unit: {},//填报抽样单最后一步
|
|
|
+ units: [],
|
|
|
+ production: [],
|
|
|
+ // 样品下拉框
|
|
|
+ sampleList: [],
|
|
|
+ task_id: '',
|
|
|
+ undertake_id: '',
|
|
|
+ // 产地
|
|
|
+ options: regionData,
|
|
|
+ selectedOptions: [],
|
|
|
+ // 日期选择器快捷选项
|
|
|
+ pickerOptions: {
|
|
|
+ disabledDate(time) {
|
|
|
+ return time.getTime() > Date.now();
|
|
|
+ },
|
|
|
+ shortcuts: [{
|
|
|
+ text: '今天',
|
|
|
+ onClick(picker) {
|
|
|
+ picker.$emit('pick', new Date());
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '昨天',
|
|
|
+ onClick(picker) {
|
|
|
+ const date = new Date();
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24);
|
|
|
+ picker.$emit('pick', date);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '一周前',
|
|
|
+ onClick(picker) {
|
|
|
+ const date = new Date();
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit('pick', date);
|
|
|
+ }
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.task_id = this.$route.params.task_id
|
|
|
+ this.task_profile_id = this.$route.params.under_id
|
|
|
+ console.log(this.task_id)
|
|
|
+ console.log(this.task_profile_id)
|
|
|
+ this.getCydObj()
|
|
|
+
|
|
|
+
|
|
|
+ console.log(regionData)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // // 步骤条下一步
|
|
|
+ // next() {
|
|
|
+ // if(this.active == 1){
|
|
|
+ // this.getSamples()
|
|
|
+ // }
|
|
|
+ // if(this.active++ >2) this.active = 1
|
|
|
+
|
|
|
+ // },
|
|
|
+ // // 步骤条上一步
|
|
|
+ // pre() {
|
|
|
+ // if(this.active == 3){
|
|
|
+ // this.getSamples()
|
|
|
+ // }
|
|
|
+ // if(this.active-- <2) this.active = 1
|
|
|
+ // },
|
|
|
+ //填报抽样单第一步页面中的下一步
|
|
|
+ async next1(){
|
|
|
+ this.$confirm('保存后不可修改, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.postInspectedUnit()
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '受检单位信息保存成功!'
|
|
|
+ });
|
|
|
+ this.active = 2
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消保存'
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ },
|
|
|
+ async next2(){
|
|
|
+ this.$confirm('保存后不可继续添加样品信息, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '样品信息保存成功!'
|
|
|
+ });
|
|
|
+ this.active = 3
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消保存'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ async next3(){
|
|
|
+ this.$confirm('是否确认完成抽样单填报?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '抽样单保存成功!'
|
|
|
+ });
|
|
|
+ this.postCydProfile()
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消保存'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // //新增样品信息弹框
|
|
|
+ // async addData() {
|
|
|
+ // this.addSampleInforDialog = true;
|
|
|
+ // },
|
|
|
+ //获取抽样单id
|
|
|
+ async getCydObj() {
|
|
|
+ const res = await this.$http.post('getCydObj',{
|
|
|
+ task_id:this.task_id,
|
|
|
+ task_profile_id:this.task_profile_id
|
|
|
+ })
|
|
|
+ console.log(res)
|
|
|
+ this.cyd_id = res.data.data.cyd_id
|
|
|
+ console.log(this.cyd_id)
|
|
|
+ },
|
|
|
+ //保存受检单位信息
|
|
|
+ async postInspectedUnit() {
|
|
|
+ var that = this
|
|
|
+ that.inspected_Unit['cyd_id'] = that.cyd_id
|
|
|
+ const res = await this.$http.post('postInspectedUnit',that.inspected_Unit)
|
|
|
+ console.log(res)
|
|
|
+ // 判断业务逻辑
|
|
|
+ // if (result.data.code == 0) {
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '提交成功!'
|
|
|
+ // });
|
|
|
+ // this.$router.push('jcobj')
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ //保存样品信息
|
|
|
+ async postSample(){
|
|
|
+ var that = this
|
|
|
+ that.product_Unit['cyd_id'] = that.cyd_id
|
|
|
+ const res = await this.$http.post('postSample',that.product_Unit)
|
|
|
+ console.log(res.data.message)
|
|
|
+ console.log(res.data.code)
|
|
|
+ if (res.data.code !== 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: res.data.message
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.addSampleInforDialog = false
|
|
|
+ this.getSamples()
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ //保存最后一步上传报告备注
|
|
|
+ async postCydProfile(){
|
|
|
+ var that = this
|
|
|
+ that.sample_unit['cyd_id'] = that.cyd_id
|
|
|
+ const res = await this.$http.post('postCydProfile',that.sample_unit)
|
|
|
+ const result = await this.$http.post('postCyd',{
|
|
|
+ cyd_id: that.cyd_id,
|
|
|
+ cyd_code: that.cyd_code})
|
|
|
+ console.log(result)
|
|
|
+ console.log(res)
|
|
|
+ this.$router.push({
|
|
|
+ name: 'setTaskcd',
|
|
|
+ params: {
|
|
|
+ id: that.task_id,
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //填报抽样单样品信息分页
|
|
|
+ handleSizeChange(val) {
|
|
|
+ this.queryInfo.pageSize = val;
|
|
|
+ console.log(`每页 ${val} 条`);
|
|
|
+ },
|
|
|
+ //填报抽样单样品信息分页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.queryInfo.pageNum = val;
|
|
|
+ console.log(`当前页: ${val}`);
|
|
|
+ this.gettaskList()
|
|
|
+ },
|
|
|
+ //获取抽样单样品信息列表
|
|
|
+ async getSamples(){
|
|
|
+ var that = this
|
|
|
+ that.queryInfo['cyd_id'] = that.cyd_id
|
|
|
+ const res = await this.$http.post('getSamples',that.queryInfo)
|
|
|
+ console.log(res.data.data.rows)
|
|
|
+ that.tableData = res.data.data.rows
|
|
|
+ that.total = res.data.data.total
|
|
|
+ },
|
|
|
+ // 获取样本列表
|
|
|
+ // 生成样品编码
|
|
|
+ // 获取选择产地
|
|
|
+ // handleChange() {
|
|
|
+ // var that = this
|
|
|
+ // var loc = "";
|
|
|
+ // // console.log(this.form.place)
|
|
|
+ // for (let i = 0; i < this.selectedOptions.length; i++) {
|
|
|
+ // loc += CodeToText[this.selectedOptions[i]];
|
|
|
+ // }
|
|
|
+ // // console.log(loc)
|
|
|
+ // that.cyd_data.place = loc
|
|
|
+ // console.log(that.cyd_data.place)
|
|
|
+ // },
|
|
|
+ // 上传成功(要确认数据)
|
|
|
+ // uploadSuccess(res) {
|
|
|
+ // console.log(res.data)
|
|
|
+ // this.cyd_data.file_url = res.data.fileUrl
|
|
|
+ // this.cyd_data.file_name = res.data.fileName
|
|
|
+ // },
|
|
|
+ // async onSubmit() {
|
|
|
+ // console.log(this.cyd_data.sample_name)
|
|
|
+ // var that = this
|
|
|
+ // console.log(that.cyd_data)
|
|
|
+ // that.cyd_data.task_id = that.task_id
|
|
|
+ // that.cyd_data.undertake_id = that.undertake_id
|
|
|
+ // that.form.cyd_data = that.cyd_data
|
|
|
+ // that.form.unit_test = that.unit_test
|
|
|
+ // that.form.unit_production = that.unit_production
|
|
|
+ // that.form.unit_sample = that.unit_sample
|
|
|
+ // console.log(that.form)
|
|
|
+ // const result = await this.$http.post('saveSample', this.form)
|
|
|
+ // if (result.data.code == 0) {
|
|
|
+ // // that.form.sample_id = result.data.data.id
|
|
|
+ // this.$message({
|
|
|
+ // type: 'success',
|
|
|
+ // message: '提交抽样单成功!'
|
|
|
+
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // 重置表单
|
|
|
+ // resetForm() {
|
|
|
+ // console.log(this.form)
|
|
|
+ // this.cyd_data = '';
|
|
|
+ // this.unit_test = '';
|
|
|
+ // this.unit_production = '';
|
|
|
+ // this.unit_sample = '';
|
|
|
+ // this.selectedOptions = '';
|
|
|
+ // },
|
|
|
+ // 返回
|
|
|
+ // back() {
|
|
|
+ // var that = this
|
|
|
+ // console.log(that.task_id)
|
|
|
+ // this.$router.push({
|
|
|
+ // name: 'setTaskcd',
|
|
|
+ // params: {
|
|
|
+ // id: that.task_id
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+ .form {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: center;
|
|
|
+ align-content: flex-start;
|
|
|
+ }
|
|
|
+
|
|
|
+ .el-descriptions {
|
|
|
+ width: 80%;
|
|
|
+ margin: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .el-descriptions__title {
|
|
|
+ margin: auto;
|
|
|
+ font-size: 1.25rem;
|
|
|
+ // font-weight: 31.25rem !important;
|
|
|
+ }
|
|
|
+ .btn{
|
|
|
+ margin-top:20px ;
|
|
|
+ // float: right;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .dialogItem /deep/ .el-dialog__body {
|
|
|
+ padding: 15px 12px 0;
|
|
|
+ color: #606266;
|
|
|
+ font-size: 14px;
|
|
|
+ word-break: break-all;
|
|
|
+ }
|
|
|
+ /deep/ #sampleReport{
|
|
|
+ .el-descriptions-item__label.is-bordered-label{
|
|
|
+ width: 15rem;}
|
|
|
+ }
|
|
|
+ /deep/ #sjinformation{
|
|
|
+ .el-form-item__label{
|
|
|
+ width: 14%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .footer {
|
|
|
+ margin-left: 45%;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ /deep/ #addSample{
|
|
|
+ .el-form-item__label{
|
|
|
+ width: 17%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|