zouyu
2023-08-26 8cdd746682b92b7aaabad790db5bafa3d57ccea7
Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
已修改14个文件
已添加2个文件
2470 ■■■■■ 文件已修改
.env.development 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/experiment/planAssignments.js 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/inspection/commisioninspection.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/laboratory/role.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/Viewdetails/index.vue 178 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/inspectionApplication/index.vue 154 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/experiment/reportAuditing/index.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/addCommision.vue 1017 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inspectionManagement/commissionInspection/index.vue 123 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/role/index.vue 226 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/laboratory/role/menuPower.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/template_testReport/index.vue 651 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -2,4 +2,4 @@
ENV = 'development'
# base api
VUE_APP_BASE_API =  'http://192.168.110.87:1234/'
VUE_APP_BASE_API =  'http://192.168.110.107:1234/'
src/api/experiment/planAssignments.js
@@ -30,4 +30,28 @@
    method: 'post',
    data
  })
}
}
//检验单详情
export function selectInspectsListById(params){
  return request({
    url: '/inspection/selectInspectsListById',
    method: 'get',
    params
  })
}
//选择责任项目检验人
export function selectUser(params){
  return request({
    url: '/inspection/selectUser',
    method: 'get',
    params
  })
}
// å§”托检验列表
export function getCommisionList(params) {
  return request({
    url: '/link-basic-table/page',
    method: 'get',
    params
  })
}
src/api/inspection/commisioninspection.js
@@ -25,7 +25,7 @@
  })
}
//规格型号
export function getModelSpecification(params){
  return request({
    url: '/link-basic/specification',
src/api/laboratory/role.js
@@ -6,4 +6,29 @@
      method: 'get',
      params
    })
  }
  export function addRoleInfo(data) {
    return request({
      url: '/role-manager/addRoleInfo',
      method: 'post',
      data
    })
  }
  export function assertRepeat(params) {
    return request({
      url: '/role-manager/assertRepeat',
      method: 'get',
      params
    })
  }
  //getAllRoleAndMenuInfo
  export function getAllRoleAndMenuInfo(params) {
    return request({
      url: '/role-manager/getAllRoleAndMenuInfo',
      method: 'get',
      params
    })
  }
src/layout/components/Navbar.vue
@@ -82,7 +82,14 @@
      'avatar'
    ])
  },
    data() {
        return {
            user: {
                id: null,
                name: 'value'
            }
        }
    },
    mounted() {
        this.getUser()
    },
src/router/index.js
@@ -47,6 +47,11 @@
    hidden:true
  },
  {
    path: '/testReport',
    component: () => import('@/views/template_testReport/index'),
    hidden:true
  },
  {
    path: '/',
    component: Layout,
    redirect: '/home',
@@ -477,7 +482,7 @@
]
const createRouter = () => new Router({
  // mode: 'history', // require service support
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})
src/utils/request.js
@@ -48,7 +48,6 @@
    // if the custom code is not 20000, it is judged as an error.
    if (res.code !== 200) {
      console.log(res.message || 'Error')
      // Message({
      //   message: res.message || 'Error',
      //   type: 'error',
src/views/basicData/index.vue
@@ -136,7 +136,7 @@
      <el-table
        :data="tableData"
        style="width: 100%; margin-bottom: 20px"
        row-key="name"
        row-key="id"
        border
        height="calc(100vh - 250px)"
        default-expand-all
src/views/experiment/inspectionApplication/Viewdetails/index.vue
@@ -12,7 +12,7 @@
                <el-form ref="form" :model="searchData" label-width="80px">
                    <el-col :span="6">
                        <el-form-item label="来料日期:" >
                            <el-input :disabled="true" v-model="searchData.from_time"></el-input>
                            <el-input :disabled="true" v-model="searchData.formTime"></el-input>
                            
                        </el-form-item>
                    </el-col>
@@ -23,7 +23,7 @@
                    </el-col>                    
                    <el-col :span="6">
                        <el-form-item label="产品编号:">
                            <el-input :disabled="true" v-model="searchData.mcode"></el-input>
                            <el-input :disabled="true" v-model="searchData.code"></el-input>
                        </el-form-item> 
                    </el-col>
                </el-form>
@@ -60,7 +60,7 @@
                    <el-col :span="6">
                        <el-form-item label="登记日期:">
                            <el-input :disabled="true" v-model="searchData.end_time"></el-input>
                            <el-input :disabled="true" v-model="searchData.endTime"></el-input>
                        </el-form-item>
                    </el-col>
                    
@@ -86,7 +86,7 @@
        <div>        
            <el-card style="margin: 10px;">
                <el-table
                    :data="tableData"
                    :data="insProducts"
                    border      
                    style="width: 100%">
                    <el-table-column
@@ -95,52 +95,37 @@
                    width="50">
                    </el-table-column>
                    <el-table-column
                        prop="date"
                        prop="name"
                        label="项目"
                        width="180">
                    </el-table-column>
                    <el-table-column
                        prop="name"
                        prop="unit"
                        label="单位"
                        width="180">
                    </el-table-column>
                    <el-table-column
                        prop="kk"
                        prop="internal"
                        label="标准值">
                    </el-table-column>
                    <el-table-column
                        prop="zz"
                        prop="required"
                        label="内控值">
                    </el-table-column>
                    <el-table-column
                        prop="oo"
                        wight="200"
                        label="经验人">
                        <template>
                            <el-select v-model="value" placeholder="黄晓明">
                                <el-option
                                    v-for="item in cities"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                                    <span style="float: left">{{ item.label }}</span>
                                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
                                    </el-option>
                    <el-table-column prop="userName" label="经验人">
                        <template slot-scope="scope">
                            <el-select v-model="value" size="small" slot="append" style="width: 220px;">
                            <el-option v-for="item in ZERENren" :key="item.id" :label="item.name"  :value="item.name"></el-option>
                            </el-select>
                        </template>
                    </el-table-column>
                    <el-table-column
                        prop="pp"
                        prop="inspectionMaterialId"
                        label="实验设备">
                        <template>
                            <el-select v-model="value" placeholder="拉力机">
                                <el-option
                                v-for="item in cities"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                                </el-option>
                            </el-select>
                            <!-- <el-select v-model="scope.row.checker" size="small" slot="append" style="width: 260px;">
                            <el-option v-for="item in checkeroptions" :key="item.value" :label="item.label">{{ item.label }}</el-option>
                            </el-select> -->
                        </template>
                    </el-table-column>
                </el-table>
@@ -151,126 +136,39 @@
</div>       
</template>
<script>
  import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments'
  import { selectInspectsListById,selectUser} from '@/api/experiment/planAssignments'
export default {
    data(){
        return {
            searchData:{
                from_time:'',
                supplier:'',
                mcode:'',
                name:'',
                specifications:'',
                unit:'',
                num:'',
                userName:'',
                end_time:'',
            },
            value:{},
            cities:[{
                value: 'Beijing',
                label: '黄小明'
                }, {
                value: 'Shanghai',
                label: '黄小明'
                }, {
            }],
            tableData:[{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          },{
            date: '导线',
            name: 'mm',
            kk:'30.0',
            zz:'30.0',
            oo:'黄晓明',
            pp:'拉力机',
          }],
          currentPage:1,
          pageSize:8,
          id:''
            searchData:{ },
            insProducts:[],
            uu:'',
            value:''
        }
    },
    created(){
        console.log(this.$route.query.icode);
        this.id = this.$route.query.icode;
        this.selectInspectsList()
        console.log(this.$route.query.id);
        this.uu = this.$route.query.id;
        this.selectInspectsListById()
        this.selectUser()
    },
    methods: {
      async goback(){
        //返回
      async goback(){
        this.$router.push({name:'inspectionApplication'})
      },
      async selectInspectsList() {
        // èŽ·å–åˆ†é¡µåˆ—è¡¨
        const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage ,message:this.id})
        // this.inspectionTable = data
        console.log(res)
    //     res.data.forEach((item) => {
    //       var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
    //       var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"]
    //       var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
    //       var checkdate = startTime + '~' + endTime
    //       var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"]
    //       item['formTime'] = formTime // æ¥æ–™æ—¥æœŸ
    //       item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
    //       item['createTime'] = createTime // ç™»è®°æ—¥æœŸ
    //   })
        this.searchData.mcode = res.data.row[0].mcode
        this.searchData.supplier = res.data.row[0].supplier
        this.searchData.from_time = res.data.row[0]["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
        this.searchData.name = res.data.row[0].name
        this.searchData.specifications = res.data.row[0].specifications
        this.searchData.unit = res.data.row[0].unit
        this.searchData.num = res.data.row[0].num
        this.searchData.end_time = res.data.row[0]["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
        this.searchData.userName = res.data.row[0].userName
        const data = res.data.row
        data.forEach((item) => {
          var formTime = item["DATE_FORMAT(`form_time`,'%Y-%m-%d')"]
          var startTime = item["DATE_FORMAT(i"]["`start_time`,'%Y-%m-%d')"]
          var endTime = item["DATE_FORMAT(i"]["`end_time`,'%Y-%m-%d')"]
          var checkdate = startTime + '~' + endTime
          var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"]
          item['formTime'] = formTime // æ¥æ–™æ—¥æœŸ
          item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
          item['createTime'] = createTime // ç™»è®°æ—¥æœŸ
      })
        this.inspectionTable = data
        this.total = res.data.total
      //检验单责任人
      async selectUser(){
        const res = await selectUser()
        this.ZERENren = res.data
        // console.log(this.ZERENren);
      },
      //检验单表
      async selectInspectsListById() {
        const res = await selectInspectsListById({id:this.uu})
        this.searchData = res.data
        this.insProducts = res.data.insProducts
      }
}
}
</script>
src/views/experiment/inspectionApplication/index.vue
@@ -82,7 +82,7 @@
                  label="检验类型"
                  min-width="80px">
                  <template slot-scope="scope">
                    <div v-if="scope.row.type === 0" ><span>原材料检验</span></div>
                    <div v-if="scope.row.type === 0" ><span >原材料检验</span></div>
                    <div v-if="scope.row.type === 1" ><span>委托检验</span></div>
                    <div v-if="scope.row.type === 2" ><span>成品检验</span></div>
                  </template>
@@ -180,16 +180,17 @@
              title="新增检验单"
              :visible.sync="checkTypeVisible"
              width="50%"
                            top="10vh"
            >
              <div class="check-box">
                <el-radio-group v-model="type" @change="handleRadioChange">
                  <el-radio :label="0" border >原材料检验</el-radio>
                  <el-radio :label="1" border>委托检验</el-radio>
                  <el-radio :label="2" border>成品检验</el-radio>
                  <el-radio :style="`background-color: ${type==0?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="0" border>原材料检验</el-radio>
                  <el-radio :style="`background-color: ${type==1?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="1" border>委托检验</el-radio>
                  <el-radio :style="`background-color: ${type==2?'rgb(170, 236, 214)':'#fff'};border-radius: 10px;`" :label="2" border>成品检验</el-radio>
                </el-radio-group>
              </div>
              <div v-if="type === 0 || type === ''">
                <el-form :model="infoForm" ref="infoForm" class="checkTypeForm" label-position="top" label-width="200px" size="mini">
              <div v-if="type === 0">
                <el-form :model="infoForm" ref="infoForm" class="checkTypeForm" label-position="top" label-width="200px" size="medium">
                  <el-row :gutter="100">
                      <el-col :span="10">
                          <el-form-item label="来料日期:">
@@ -367,11 +368,86 @@
              </div>
              <span slot="footer" class="dialog-footer">
                <el-button @click="checkTypeVisible = false">取 æ¶ˆ</el-button>
                <el-button type="primary" @click="addInspection">ç¡® å®š</el-button>
                <!-- <el-button type="primary" @click="addInspection">ç¡® å®š</el-button> -->
                <el-button type="primary" @click="QUEding">ç¡® å®š</el-button>
              </span>
            </el-dialog>
          </div>
        </div>
        <!-- ç¡®å®šè·³è½¬åŸºæœ¬åº“弹窗 -->
        <el-dialog
              title="标准库"
              :visible.sync="Standardframe"
              width="48%"
              >
              <!-- <el-form :model="form">
                <el-form-item label="请选择审核结果:" :label-width="formLabelWidth">
                </el-form-item>
              </el-form> -->
              <!-- <div slot="footer" class="dialog-footer"> -->
                <el-table
                    :data="tableData"
                    style="width: 100%; margin-bottom: 20px"
                    row-key="name"
                    border
                    height="calc(100vh - 250px)"
                    default-expand-all
                    ref="multipleTable"
                    :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
                  >
                    <el-table-column type="selection" label="序号"> </el-table-column>
                    <el-table-column
                      type="index"
                      width="50px"
                      label="序号"
                    ></el-table-column>
                    <el-table-column label="项目名称" sortable>
                      <template scope="scope">
                        <el-tag
                          ><div
                            class="firstDiv"
                            :style="`color: ${
                              scope.row.code == '[1]' ? '#16a7ff' : '#58c173'
                            }`"
                          >
                            {{ scope.row.code == "[1]" ? "01" : "02" }}
                          </div>
                          <span style="color: black">{{ scope.row.name }}</span></el-tag
                        >
                      </template>
                    </el-table-column>
                    <el-table-column
                      prop="unit"
                      label="单位"
                      sortable
                    ></el-table-column>
                    <el-table-column label="标准值" sortable>
                      <template scope="scope">
                        <el-input
                          v-if="scope.row.edit === true || scope.row.code === '[2]'"
                          @blur="requiredOnfocus(scope)"
                          v-model="scope.row.required"
                          placeholder="请输入标准值"
                        ></el-input>
                      </template>
                    </el-table-column>
                    <el-table-column prop="internal" label="内控值" sortable>
                      <template scope="scope">
                        <el-input
                          v-if="scope.row.edit === true || scope.row.code === '[2]'"
                          @blur="requiredOnfocus(scope)"
                          v-model="scope.row.internal"
                          placeholder="请输入内控值"
                        ></el-input>
                      </template>
                    </el-table-column>
                  </el-table>
              <!-- </div> -->
            </el-dialog>
        <!-- åŽŸææ–™æ£€éªŒæ¨¡æ€æ¡† -->
        <el-dialog
        title="原材料检验"
@@ -491,7 +567,7 @@
                />
                <el-table-column
                  prop="formTime"
                  label="来料日期"
                  label="委托bian'ha"
                  min-width="10%"
                />
                <el-table-column
@@ -534,13 +610,12 @@
      </template>
      <template v-else>
        <router-view />
      </template>
    </div>
  </template>
  <script>
  import { selectInspectsList, selectAll, addInspect} from '@/api/experiment/planAssignments'
  import { selectInspectsList, selectAll, addInspect,getCommisionList} from '@/api/experiment/planAssignments'
  export default {
    data() {
      return {
@@ -588,7 +663,7 @@
          amount: '',
          checkdate: []
        },
        infoForm:'',
        infoForm:{},
        commisionSelection:{
          entrust_coding: '',
          entrusted: '',
@@ -629,10 +704,12 @@
        pageSize: 8, // æ¯é¡µçš„æ•°æ®æ¡æ•°
        radioValue: '全部',
        checkTypeVisible: false,
        type: '', // é»˜è®¤ä¸é€‰ä¸­çš„状态
        type: 0, // é»˜è®¤ä¸é€‰ä¸­çš„状态
        rawmaterialVisible: false,
        commisionVisible: false,
        tmp: ''
        tmp: '',
        Standardframe: false,
                tableData: []
      }
    },
    watch: {
@@ -662,14 +739,20 @@
        // console.log(res);
        this.inspectionTable = row;
        console.log(row.icode);
        this.icode = row.icode
        this.$router.push({name:'Viewdetails',query: {icode:row.icode}});
        console.log(row.id);
        this.id = row.id
        this.$router.push({name:'Viewdetails',query: {id:row.id}});
        this.selectInspectsList()
      },
      //委托检验
      async getCommisionList() {
        const res = await getCommisionList({pageNo:1,pageSize:10 })
        this.commisionTable = res.data
        console.log(this.commisionTable);
      },
      async selectInspectsList() {
        // èŽ·å–åˆ†é¡µåˆ—è¡¨
        const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage,message:this.icode})
        const res = await selectInspectsList({ countSize: this.pageSize, pageSize: this.currentPage,message:this.id})
        // this.inspectionTable = data
        // console.log(res.data.row)
        const data = res.data.row
@@ -745,19 +828,20 @@
    async handleRadioChange(){
      if(this.type === 0){
        // åŽŸææ–™æŠ¥æ£€
        // this.rawmaterialVisible = true
        // const res = await selectAll({type: this.type})
        // var data = res.data
        // data.forEach((item)=>{
        //   var checkdate = []
        //   checkdate.push(item['createTime'])
        //   checkdate.push(item['updateTime'])
        //   item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
        // })
        this.$router.push({ name: 'ReportForInspection' });
        this.rawmaterialVisible = true
        const res = await selectAll({type: this.type})
        var data = res.data
        data.forEach((item)=>{
          var checkdate = []
          checkdate.push(item['createTime'])
          checkdate.push(item['updateTime'])
          item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
        })
          // this.infoForm = res.data
        // this.$router.push({ name: 'ReportForInspection' });
      }else if(this.type === 1){
        // this.commisionVisible = true
        // const res = await selectAll({type: this.type})
        this.commisionVisible = true
        const res = await getCommisionList({pageNo:1,pageSize:10})
        // var data = res.data
        // data.forEach((item)=>{
        //   var checkdate = []
@@ -766,8 +850,8 @@
        //   item['checkdate_'] = item['startTime'] + '~' + item['endTime']
        //   item['checkdate'] = checkdate // æ£€éªŒæ—¥æœŸ
        // })
        // this.commisionTable = res.data
        this.$router.push({ name: 'CommissionInspection' });
        this.commisionTable = res.data
        // this.$router.push({ name: 'CommissionInspection' });
      }
    },
    // æ–°å¢žæ£€éªŒ
@@ -811,7 +895,7 @@
          type: this.type,
          unit: this.finishedTable.unit })
      }
      this.type = ''
      this.type = 0
      this.checkTypeVisible = false
      this.$message({
          message: '添加成功!',
@@ -830,6 +914,10 @@
        console.log(`当前页: ${val}`)
        this.currentPage = val
        this.selectInspectsList()
      },
      //确定跳转
      QUEding(){
        this.Standardframe = true
      }
    }
  }
@@ -854,7 +942,7 @@
          }
          height: auto;
          font-size: 22px !important;
          padding: 20px 40px !important;
          padding: 40px 50px !important;
          ::v-deep  .el-radio__label{
            font-size: 22px !important;
            padding-left: 0px !important;
src/views/experiment/reportAuditing/index.vue
@@ -78,7 +78,7 @@
              </span>
            </template></el-table-column
          >
          <el-table-column
          <el-table-columne
            prop="materialName"
            label="样品名称"
            min-width="10%"
@@ -86,7 +86,7 @@
          <el-table-column prop="status" label="审批状态" min-width="8%" v-model="Auditconclusion">
            <template slot-scope="scope">
              <span>
                <el-tag type="warning">{{
                <el-tag :color="scope.row.status == 0 ? '' : 'rgb(187, 237, 221)'" type="warning">{{
                  scope.row.status == 0 ? "待通过" : "通过"
                }}</el-tag>
              </span>
@@ -109,7 +109,7 @@
              title="原始记录审核"
              :visible.sync="checkskipvisible"
              width="30%"
              >
              <el-form :model="form">
                <el-form-item label="请选择审核结果:" :label-width="formLabelWidth">
@@ -153,7 +153,7 @@
      reportTable: [],
      page: 1,
      total: 0,
      pageSize: 10,
      pageSize: 8,
      checkskipvisible: false,
      form:{},
      // handleClose:{},
@@ -163,7 +163,7 @@
      Auditconclusion:{},
      tableRow: {},
    };
  },
  created() {
@@ -201,9 +201,13 @@
    //通过
    async checkskip(row) {
      console.log(this.tableRow);
      this.reportTable[this.tableRow.$index].status=2
      this.reportTable[this.tableRow.$index].status=1
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
      this.$message({
          message: '通过成功',
          type: 'success'
        });
    },
    //不通过
@@ -212,12 +216,16 @@
      this.reportTable[this.tableRow.$index].status=0
      this.transmitData(this.tableRow.row.id)
      this.checkskipvisible= false
      this.$message({
          message: '待通过',
          type: 'warning'
        });
    },
    //审核
    async transmitData(id) {
      let param={"id":id,"result":1}
     let data = await checkApi(param)
    async transmitData(id) {
      let param={"id":id,"result":2}
     let data = await checkApi(param)
    },
    // æŸ¥è¯¢åˆ—表
    async getData() {
src/views/inspectionManagement/commissionInspection/addCommision.vue
@@ -1,12 +1,13 @@
<template>
  <div class="add_commision">
  <div class="content-main">
    <div class="firstBox">
      <div class="title">委托信息</div>
      <div class="tableBox">
        <div class="tableBox-header">
        <el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small" style="background-color: rgb(1, 102, 226);">添加样品</el-button>
<!--        <el-input
    <div class="add_commision">
        <div class="content-main">
            <div class="firstBox">
                <div class="title">委托信息</div>
                <div class="tableBox">
                    <div class="tableBox-header">
                        <el-button class="split" @click="dialogueFormVisible = true" type="primary" size="small"
                            style="background-color: rgb(1, 102, 226);">添加样品</el-button>
                        <!--        <el-input
          v-model="searchData"
          class="input-form split"
          placeholder="扫描二维码录入样品..."
@@ -14,537 +15,493 @@
          style="width: 200px;"
        >
        </el-input>-->
        <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">重置</el-button>
      </div>
        <el-table
                ref="detectionInfo"
                :max-height="800"
                :cell-style="{textAlign: 'center'}"
                :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
                :data="detectionInfo"
                style="width: 100%"
              >
                <el-table-column
                  type="index"
                  label="序号"
                  min-width="10%"
                />
                <el-table-column
                  prop="sampleNumber"
                  label="样品编号"
                  min-width="8%"
                />
                <el-table-column
                  prop="sampleName"
                  label="样品名称"
                  min-width="10%"
                />
                <el-table-column
                  prop="specificationsModels"
                  label="规格型号"
                  min-width="10%"
                />
                <el-table-column
                  prop="unit"
                  label="单位"
                  min-width="8%"
                />
                <el-table-column
                  prop="samplesNumber"
                  label="数量"
                  min-width="8%"
                />
                <el-table-column
                  prop="addway"
                  label="添加方式"
                  min-width="8%">
                  <template slot-scope="scope">
                    <div v-if="scope.row.addway === 0">
                      <el-tag :type= 'success' disable-transitions>扫描</el-tag>
                    </div>
                    <div v-if="scope.row.addway === 1">
                      <el-tag :type= 'primary' disable-transitions>录入</el-tag>
                    </div>
                    <div v-else></div>
                </template>
                </el-table-column>
                <el-table-column
                  prop="experiment"
                  label="试验"
                  min-width="8%"
                />
                <el-table-column
                  prop="remarks"
                  label="备注"
                  min-width="8%"
                />
                <el-table-column
                  label="操作"
                  min-width="8%"
                >
                  <template slot-scope="scope">
                    <el-button type="text" size="small">修改</el-button>
                    <el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button>
                  </template>
                </el-table-column>
              </el-table>
              <!-- åˆ†é¡µå™¨ -->
              <div>
                <el-pagination
                  class="pagination"
                  @size-change="handleSizeChange"
                  @current-change="handleCurrentChange"
                  :current-page="currentPage"
                  :page-sizes="[100, 200, 300, 400]"
                  :page-size="100"
                  layout="total, sizes, prev, pager, next, jumper"
                  :total="400">
                </el-pagination>
              </div>
      </div>
      <div class="secondBox">
        <el-row class="header">
            <el-col :span="12">基本信息</el-col>
            <el-col :span="12" style="text-align: right;">
            <!-- ç‚¹å‡»è¿”回,当前页面值为false -->
            <!-- <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">打印委托单</el-button> -->
            </el-col>
        </el-row>
            <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px" size="mini" >
              <div class="formwrapper">
                  <el-row :gutter="200">
                        <el-col :span="5">
                        <el-form-item label="委托编号:">
                            <el-input style="width: 160px" type="text" :value="infoForm.commisioncode" readonly disabled="true" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="委托单位:">
                          <el-input style="width: 160px" v-model="infoForm.department" placeholder="请输入委托单位"  />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="联系人:">
                          <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="请输入委托单位"  />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="联系电话:">
                          <el-input style="width: 160px" v-model="infoForm.tel" placeholder="请输入联系电话" />
                        </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="200">
                        <el-col :span="5">
                        <el-form-item label="联系地址:" >
                          <el-input style="width: 160px;" v-model="infoForm.address" placeholder="请输入联系地址" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="完成期限:">
                            <el-date-picker
                              v-model="infoForm.deadline"
                              type="date"
                              placeholder="选择日期"
                              style="width: 160px;">
                            </el-date-picker>
                          </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样时间:">
                            <el-date-picker
                              v-model="infoForm.time"
                              type="date"
                              placeholder="选择日期"
                              style="width: 160px;">
                            </el-date-picker>
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样方式:">
                          <el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="送样">
                                <el-option v-for="options in sampleDeliveryMode" :key="options.key" :value="options.value">{{ options.value }}</el-option>
                            </el-select>
                        </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row :gutter="200">
                        <el-col :span="5">
                        <el-form-item label="送样人:" >
                          <el-input style="width: 160px;" v-model="infoForm.sender" placeholder="请输入送样人" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="送样人电话:" >
                          <el-input style="width: 160px;" v-model="infoForm.sendertel" placeholder="请输入送样人电话" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="报告数:">
                            <el-input style="width: 160px;" v-model="infoForm.num" placeholder="请输入报告数" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                        <el-col :span="5">
                        <el-form-item label="委托备注:">
                            <el-input style="width: 160px;" v-model="infoForm.other" placeholder="备注" autocomplete="off" />
                        </el-form-item>
                        </el-col>
                    </el-row>
                    </div>
                    <div class="submitBtn">
                      <el-button type="primary" size="small" @click="submitInspection" style="background-color: rgb(1, 102, 226);">提交</el-button>
                      <!-- ç‚¹å‡»è¿”回,当前页面值为false -->
                      <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">打印委托单</el-button>
                    </div>
                </el-form>
      </div>
    </div>
    <div class="checkType">
      <el-dialog
        title="添加指标"
        :visible.sync="dialogueFormVisible"
        width="40%"
      >
        <el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right" label-width="100px" size="mini">
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="样品编号:">
                <el-select style="width: 160px;" v-model="addPointerForm.sampleNumber" size="small" placeholder="请选择样品编号">
                  <el-option v-for="options in samplecodeoptions" :value="options.value" :key="options.key" >{{ options.value }}</el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="样品名称:">
                <el-select style="width: 160px;" v-model="addPointerForm.sampleName" size="small" placeholder="请选择样品名称">
                  <el-option v-for="options in sampleoptions" :value="options.value" :key="options.key">{{ options.value }}</el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="规格型号:">
                <el-select style="width: 160px;" v-model="addPointerForm.specificationsModels" size="small" placeholder="请选择样品名称">
                  <el-option v-for="options in model_spe_options" :value="options.value" :key="options.key">{{ options.value }}</el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="样品单位:">
                <el-input style="width: 160px" type="text" v-model="addPointerForm.unit" placeholder="请输入单位" autocomplete="off" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="样品数量:">
                <el-input style="width: 160px" type="text" v-model="addPointerForm.samplesNumber" placeholder="请输入数量" autocomplete="off" />
              </el-form-item>
            </el-col>
            <el-col :span="10">
              <el-form-item label="备注:">
                <el-input style="width: 160px" type="text" v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50">
            <el-col :span="10">
              <el-form-item label="添加实验:">
                <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
                  <el-checkbox v-for="expers in experList" :label="expers.label" :key="expers.key">{{ expers.label }}</el-checkbox>
                </el-checkbox-group>
              </el-form-item>
            </el-col>
          </el-row>
              </el-form>
              <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="addInspection">添加</el-button>
                <el-button @click="dialogueFormVisible = false">取 æ¶ˆ</el-button>
              </span>
      </el-dialog>
          </div>
  </div>
</div>
                        <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">重置</el-button>
                    </div>
                    <el-table ref="detectionInfo" :max-height="800" :cell-style="{textAlign: 'center'}"
                        :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}"
                        :data="detectionInfo" style="width: 100%;margin-bottom: 20px;">
                        <el-table-column type="index" label="序号" min-width="10%" />
                        <el-table-column prop="sampleNumber" label="样品编号" min-width="8%" />
                        <el-table-column prop="sampleName" label="样品名称" min-width="10%" />
                        <el-table-column prop="specificationsModels" label="规格型号" min-width="10%" />
                        <el-table-column prop="unit" label="单位" min-width="8%" />
                        <el-table-column prop="samplesNumber" label="数量" min-width="8%" />
                        <el-table-column prop="addway" label="添加方式" min-width="8%">
                            <template slot-scope="scope">
                                <div v-if="scope.row.addway === 0">
                                    <el-tag type="success" disable-transitions>扫描</el-tag>
                                </div>
                                <div v-if="scope.row.addway === 1">
                                    <el-tag type="primary" disable-transitions>录入</el-tag>
                                </div>
                                <div v-else></div>
                            </template>
                        </el-table-column>
                        <el-table-column prop="remarks" label="备注" min-width="8%" />
                        <el-table-column label="操作" min-width="8%">
                            <template slot-scope="scope">
                                <el-button type="text" size="small">修改</el-button>
                                <el-button type="text" size="small" @click="deleteRow(scope.row)">删除</el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <div class="secondBox">
                    <el-row class="header">
                        <el-col :span="12" style="font-size: 16px;margin-bottom: 5px;">基本信息</el-col>
                        <el-col :span="12" style="text-align: right;">
                        </el-col>
                    </el-row>
                    <el-form :model="infoForm" ref="infoForm" class="infoForm" label-position="right" label-width="100px"
                        size="mini">
                        <div class="formwrapper">
                            <el-row :gutter="200">
                                <el-col :span="5">
                                    <el-form-item label="委托编号:">
                                        <el-input style="width: 200px" type="text" :value="infoForm.commisioncode" readonly disabled
                                            autocomplete="off" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="委托单位:">
                                        <el-input style="width: 200px" v-model="infoForm.department" placeholder="请输入委托单位" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="联系人:">
                                        <el-input style="width: 200px" v-model="infoForm.contacter" placeholder="请输入委托单位" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="联系电话:">
                                        <el-input style="width: 200px" v-model="infoForm.tel" placeholder="请输入联系电话" size="small" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="200">
                                <el-col :span="5">
                                    <el-form-item label="联系地址:">
                                        <el-input style="width: 200px;" v-model="infoForm.address" placeholder="请输入联系地址" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="完成期限:">
                                        <el-date-picker v-model="infoForm.deadline" type="date" placeholder="选择日期" style="width: 200px;"
                                            size="small">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="送样时间:">
                                        <el-date-picker v-model="infoForm.time" type="date" placeholder="选择日期" style="width: 200px;">
                                        </el-date-picker>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="送样方式:">
                                        <el-select style="width: 200px;" v-model="infoForm.way" size="small" placeholder="送样">
                                            <el-option v-for="options in sampleDeliveryMode" :key="options.key"
                                                :value="options.value">{{ options.value }}</el-option>
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                            <el-row :gutter="200">
                                <el-col :span="5">
                                    <el-form-item label="送样人:">
                                        <el-input style="width: 200px;" v-model="infoForm.sender" placeholder="请输入送样人" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="送样人电话:">
                                        <el-input style="width: 200px;" v-model="infoForm.sendertel" placeholder="请输入送样人电话"
                                            autocomplete="off" size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="报告数:">
                                        <el-input style="width: 200px;" v-model="infoForm.num" placeholder="请输入报告数" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="5">
                                    <el-form-item label="委托备注:">
                                        <el-input style="width: 200px;" v-model="infoForm.other" placeholder="备注" autocomplete="off"
                                            size="small" />
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </div>
                        <div class="submitBtn">
                            <el-button type="primary" size="small" @click="submitInspection"
                                style="background-color: rgb(1, 102, 226);">提交</el-button>
                            <!-- ç‚¹å‡»è¿”回,当前页面值为false -->
                            <el-button type="primary" size="mini" style="background-color: rgb(1, 102, 226); ">打印委托单</el-button>
                        </div>
                    </el-form>
                </div>
            </div>
            <div class="checkType">
                <el-dialog title="添加样品" :visible.sync="dialogueFormVisible" width="40%" top="30vh">
                    <el-form :model="addPointerForm" ref="addPointerForm" class="addPointerForm" label-position="right"
                        label-width="100px" size="mini">
                        <el-row :gutter="50">
                            <el-col :span="11">
                                <el-form-item label="样品编号:">
                                    <el-input v-model="addPointerForm.sampleNumber" size="small" disabled>
                                    </el-input>
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="样品名称:">
                                    <el-select v-model="addPointerForm.sampleName" size="small" placeholder="请选择样品名称"
                                        @change="upMaterialName">
                                        <el-option v-for="options in sampleoptions" :value="options.key" :label="options.value"></el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="50">
                            <el-col :span="11">
                                <el-form-item label="评定标准:">
                                    <el-select v-model="addPointerForm.addway" size="small" placeholder="请选择评定标准">
                                        <el-option v-for="options in model_spe_options" :value="options.value"
                                            :key="options.key">{{ options.value }}</el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="规格型号:">
                                    <el-select v-model="addPointerForm.specificationsModels" size="small" placeholder="请先选择样品名称">
                                        <el-option v-for="options in model_spe_options" :value="options.value"
                                            :key="options.key">{{ options.value }}</el-option>
                                    </el-select>
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="50">
                            <el-col :span="11">
                                <el-form-item label="样品单位:">
                                    <el-input type="text" v-model="addPointerForm.unit" placeholder="请输入单位" autocomplete="off" />
                                </el-form-item>
                            </el-col>
                            <el-col :span="11">
                                <el-form-item label="样品数量:">
                                    <el-input type="text" v-model="addPointerForm.samplesNumber" placeholder="请输入数量" autocomplete="off" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                        <el-row :gutter="50">
                            <el-col :span="9">
                                <el-form-item label="添加项目:">
                                    <el-checkbox-group v-model="addPointerForm.experiment" style="display: flex; flex-direction: column;">
                                        <el-checkbox v-for="expers in experList" :label="expers.label"
                                            :key="expers.key">{{ expers.label }}</el-checkbox>
                                    </el-checkbox-group>
                                </el-form-item>
                            </el-col>
                            <el-col :span="41">
                                <el-form-item label="备注:">
                                    <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 20}"  style="width: 200px;" v-model="addPointerForm.remarks" placeholder="请输入备注" autocomplete="off" />
                                </el-form-item>
                            </el-col>
                        </el-row>
                    </el-form>
                    <span slot="footer" class="dialog-footer">
                        <el-button type="primary" @click="addInspection">添加</el-button>
                        <el-button @click="dialogueFormVisible = false">取 æ¶ˆ</el-button>
                    </span>
                </el-dialog>
            </div>
        </div>
    </div>
</template>
<script>
import {getSampleName, getModelSpecification, getlink, addInspection} from '@/api/inspection/commisioninspection'
export default {
  data() {
    return {
      currentPage: 0,
      searchData: '',
      infoForm: {
        commisioncode: '',
        department: '',
        contacter: '',
        tel: '',
        address: '',
        deadline: '',
        time: '',
        way: '',
        sender: '',
        sendertel: '',
        num: '',
        other: ''
      },
      detectionInfo: [],
      addPointerForm:{
        sampleNumber: '',
        sampleName: '',
        specificationsModels: '',
        unit: '',
        samplesNumber: '',
        remarks: '',
        experiment: [],
        addway: ''
      },
      experList:[{
        key: '1',
        label: '外观检查'
      },{
        key: '2',
        label: '动作电压试验'
      },{
        key: '3',
        label: '电阻管泄漏电流试验'
      },{
        key: '4',
        label: '绝缘部分交流耐压试验'
      }],
      sampleoptions:[{
        key:'1',
        value: '选项1'
      },{
        key:'2',
        value: '选项2'
      }],
      samplecodeoptions:[{
        key:'1',
        value: ''
      }],
      model_spe_options:[{
        key:'1',
        value: '选项1'
      },{
        key: '2',
        value: '选项2'
      }],
      sampleDeliveryMode:[{
        key: '1',
        value: '送样'
      },{
        key: '2',
        value: '上门'
      }],
      dialogueFormVisible: false,
      showDetail: false
    }
  },
  created(){
    this.getlink()
  },
  mounted(){
    this.getSampleName()
    this.getModelSpecification()
  },
  methods: {
    // èŽ·å–é“¾æŽ¥link
    getlink(){
      getlink().then((result)=>{
        this.$store.commit('settings/SAVE_LINK',result.data)
        console.log(this.$store.state.settings.link)
      })
    },
    async getSampleName(){
      const res = await getSampleName()
      // console.log('res',res.data)
      this.sampleoptions = res.data.map((item)=>{
        return{
          key:item.id.toString(),
          value:item.name
        }
      })
      this.samplecodeoptions = res.data.map((item)=>{
        return{
          key:item.id.toString(),
          value:item.code
        }
      })
    },
    async getModelSpecification(){
      const res = await getModelSpecification({materialId: '1'})
      // console.log(res)
      this.model_spe_options = res.data.map((item)=>{
        return{
          key:item.specificationsId,
          value:item.specificationsName
        }
      })
    },
    addInspection(){
      let exper = this.addPointerForm.experiment[0]
      this.addPointerForm.addway = 1
      for(let i=1;i<this.addPointerForm.experiment.length;i++){
        exper += ',' + this.addPointerForm.experiment[i]
      }
      // console.log(exper)
      this.addPointerForm.experiment = exper
      let tmp = this.addPointerForm
      this.detectionInfo.push(tmp)
      this.dialogueFormVisible = false
      this.addPointerForm ={
        sampleNumber: '',
        sampleName: '',
        specificationsModels: '',
        unit: '',
        samplesNumber: '',
        remarks: '',
        experiment: [],
        addway: ''
      }
    },
    async submitInspection(){
      let sampledeliveryway
      if(this.infoForm.way === '送样'){
        sampledeliveryway = 1
      }else{
        sampledeliveryway = 2
      }
      const res = await addInspection({completionDeadline: this.infoForm.deadline,
        contactAddress: this.infoForm.address,
        contactNumber: this.infoForm.tel,
        contacts: this.infoForm.contacter,
        entrustRemarks: this.infoForm.other,
        entrusted: this.infoForm.department,
        inspectionTime: this.infoForm.time,
        linkDetectionList: this.detectionInfo,
        reportNumber: parseInt(this.infoForm.num),
        sampleDeliveryMode: sampledeliveryway,
        sampleDeliveryPhone: this.infoForm.sendertel,
        sampleSender: this.infoForm.sender})
//       const res = await addInspection({
//   completionDeadline: "2023-08-03",
//   contactAddress: "江苏南通",
//   contactNumber: "12321423432",
//   contacts: "小黑",
//   entrustRemarks: "委托备注YPBH123456789YPBH123456789YPBH123456789",
//   entrusted: "阿里巴巴",
//   inspectionTime: "2023-08-03",
//   linkDetectionList: [
//     {
//       "experiment": "做梦",
//       "remarks": "通过了",
//       "sampleName": "发动机",
//       "sampleNumber": "YPBH123456789",
//       "samplesNumber": 20,
//       "specificationsModels": "GGXH-AAAAA",
//       "unit": "百度"
//     }
//   ],
//   reportNumber: 23,
//   sampleDeliveryMode: 1,
//   sampleDeliveryPhone: "123456789676",
//   sampleSender: "小白"
// })
      // console.log(res)
      this.infoForm.commisioncode = res.data
      if(res.data){
        this.$message({
          message: '恭喜你!',
          type: 'success'
        })
        // è·³è½¬é¡µé¢
        this.$router.push('/inspectionManagement/commissionInspection')
        this.showDetail = true
      }else{
        this.$message.error(res.message)
      }
    },
    handleSizeChange(pageSize) {
      this.pageParams.pageSize = pageSize
    },
    handleCurrentChange(pageNo) {
      this.pageParams.pageNo = pageNo
    },
    deleteRow(row){
      console.log(row)
      row = null
    }
  }
}
    import {
        getSampleName,
        getModelSpecification,
        getlink,
        addInspection,
        isIfViewUUID
    } from '@/api/inspection/commisioninspection'
    export default {
        data() {
            return {
                currentPage: 0,
                searchData: '',
                infoForm: {
                    commisioncode: '',
                    department: '',
                    contacter: '',
                    tel: '',
                    address: '',
                    deadline: '',
                    time: '',
                    way: '',
                    sender: '',
                    sendertel: '',
                    num: '',
                    other: ''
                },
                detectionInfo: [],
                addPointerForm: {
                    sampleNumber: '',
                    sampleName: '',
                    specificationsModels: '',
                    unit: '',
                    samplesNumber: '',
                    remarks: '',
                    experiment: [],
                    addway: ''
                },
                experList: [{
                    key: '1',
                    label: '外观检查'
                }, {
                    key: '2',
                    label: '动作电压试验'
                }, {
                    key: '3',
                    label: '电阻管泄漏电流试验'
                }, {
                    key: '4',
                    label: '绝缘部分交流耐压试验'
                }],
                sampleoptions: [{
                    key: '1',
                    value: '选项1'
                }, {
                    key: '2',
                    value: '选项2'
                }],
                samplecodeoptions: [{
                    key: '1',
                    value: ''
                }],
                model_spe_options: [],
                sampleDeliveryMode: [{
                    key: '1',
                    value: '送样'
                }, {
                    key: '2',
                    value: '上门'
                }],
                dialogueFormVisible: false,
                showDetail: false,
                viewId: null
            }
        },
        created() {
            this.viewId = this.$route.params.viewId
            this.$store.commit('settings/SAVE_LINK', this.viewId)
            this.getlink(this.$route.params.viewId)
        },
        mounted() {
            this.getSampleName()
        },
        methods: {
            getlink(viewId) {
                if (viewId == null) {
                    this.$message.error('当前链接不在有效期内,系统自动关闭')
                    this.$router.push('/404')
                    return
                }
                isIfViewUUID({
                    viewId
                }).then(res => {
                    if (!res.data) {
                        this.$message.error('当前链接不在有效期内,系统自动关闭')
                        this.$router.push('/404')
                    }
                })
            },
            async getSampleName() {
                const res = await getSampleName()
                this.sampleoptions = res.data.map((item) => {
                    return {
                        key: item.id.toString(),
                        value: item.name,
                        code: item.code
                    }
                })
            },
            async getModelSpecification(val) {
                const res = await getModelSpecification({
                    materialId: val
                })
                this.model_spe_options = res.data.map((item) => {
                    return {
                        key: item.specificationsId,
                        value: item.specificationsName
                    }
                })
            },
            addInspection() {
                let exper = this.addPointerForm.experiment[0]
                this.addPointerForm.addway = 1
                for (let i = 1; i < this.addPointerForm.experiment.length; i++) {
                    exper += ',' + this.addPointerForm.experiment[i]
                }
                // console.log(exper)
                this.addPointerForm.experiment = exper
                let tmp = this.addPointerForm
                this.detectionInfo.push(tmp)
                this.dialogueFormVisible = false
                this.addPointerForm = {
                    sampleNumber: '',
                    sampleName: '',
                    specificationsModels: '',
                    unit: '',
                    samplesNumber: '',
                    remarks: '',
                    experiment: [],
                    addway: ''
                }
            },
            async submitInspection() {
                let sampledeliveryway
                if (this.infoForm.way === '送样') {
                    sampledeliveryway = 1
                } else {
                    sampledeliveryway = 2
                }
                const res = await addInspection({
                    completionDeadline: this.infoForm.deadline,
                    contactAddress: this.infoForm.address,
                    contactNumber: this.infoForm.tel,
                    contacts: this.infoForm.contacter,
                    entrustRemarks: this.infoForm.other,
                    entrusted: this.infoForm.department,
                    inspectionTime: this.infoForm.time,
                    linkDetectionList: this.detectionInfo,
                    reportNumber: parseInt(this.infoForm.num),
                    sampleDeliveryMode: sampledeliveryway,
                    sampleDeliveryPhone: this.infoForm.sendertel,
                    sampleSender: this.infoForm.sender
                })
                this.infoForm.commisioncode = res.data
                if (res.data) {
                    this.$message({
                        message: '恭喜你!',
                        type: 'success'
                    })
                    // è·³è½¬é¡µé¢
                    this.$router.push('/inspectionManagement/commissionInspection')
                    this.showDetail = true
                } else {
                    this.$message.error(res.message)
                }
            },
            handleSizeChange(pageSize) {
                this.pageParams.pageSize = pageSize
            },
            handleCurrentChange(pageNo) {
                this.pageParams.pageNo = pageNo
            },
            deleteRow(row) {
            },
            upMaterialName(val) {
                this.sampleoptions.forEach(a => {
                    if (a.key == val) {
                        this.addPointerForm.sampleNumber = a.code
                    }
                })
                this.getModelSpecification(val)
            }
        }
    }
</script>
<style lang="scss" scoped>
.add_commision{
  padding: 20px;
}
.content-main{
  padding: 20px 40px;
  background-color: #f0f2f5;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  // align-items: center;
.firstBox{
  .title {
    padding: 15px 10px;
    font-size: 18px;
    background-color: #0166e2;
    color: #fff;
    border-radius: 4px;
  }
  .tableBox{
    background-color: #fff;
    padding: 0px 20px;
    margin: 0px -15px;
    flex: 1;
    background: #fff;
    /* padding: 20px 20px 10px 20px; */
    display: flex;
    flex-direction: column;
    .tableBox-header{
      padding: 20px 0px;
      .split{
        margin-right: 15px;
      }
    }
          .el-table {
            flex: 1;
          }
          >div:nth-child(3){
            display: flex;
            justify-content: end;
            margin: 10px 0;
          }
  }
}
.secondBox{
  margin: 0px -15px;
  .header{
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    margin-top: 10px;
  }
  .submitBtn{
    display: flex;
    justify-content: end;
    margin-right: 40px;
    margin-top: 20px;
  }
}
.infoForm{
  background-color: #fff;
  padding: 20px 50px;
  .formwrapper{
    margin: 20px 0px;
    padding-left: 30px;
    .el-row{
      margin: 10px 0px;
    }
  }
}
}
</style>
        .firstBox {
            .title {
                padding: 15px 10px;
                font-size: 18px;
                background-color: #0166e2;
                color: #fff;
                border-radius: 4px;
                margin-bottom: 20px;
            }
            .tableBox {
                background-color: #fff;
                padding: 0px 20px;
                flex: 1;
                background: #fff;
                /* padding: 20px 20px 10px 20px; */
                display: flex;
                flex-direction: column;
                .tableBox-header {
                    padding: 20px 0px;
                    .split {
                        margin-right: 15px;
                    }
                }
                .el-table {
                    flex: 1;
                }
                >div:nth-child(3) {
                    display: flex;
                    justify-content: end;
                    margin: 10px 0;
                }
            }
        }
        .secondBox {
            .header {
                display: flex;
                justify-content: space-between;
                padding: 10px 20px;
                margin-top: 10px;
            }
            .submitBtn {
                display: flex;
                justify-content: end;
                margin-right: 40px;
                margin-top: 20px;
            }
        }
        .infoForm {
            background-color: #fff;
            padding: 20px 50px;
            .formwrapper {
                margin: 20px 0px;
                padding-left: 30px;
                .el-row {
                    margin: 10px 0px;
                }
            }
        }
    }
</style>
src/views/inspectionManagement/commissionInspection/index.vue
@@ -339,70 +339,71 @@
        display: flex;
        justify-content: space-between;
        padding: 5px 24px 0px 24px;
    }
.top-bar{
    margin: -25px -15px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    padding: 5px 24px 0px 24px;
    .sermargin{
      margin-right: 60px;
    }
    .rightForm{
      display: flex;
      justify-content: space-between;
      /* background-color: #bfa; */
      height: 40px;
      line-height: 40px;
      >div{
        padding: 0px 10px;
        padding-bottom: 10px;
        border:1px solid rgb(8, 156, 230);
        margin-right: 10px;
        /* height: 40px;
        .sermargin {
            margin-right: 60px;
        }
        .rightForm {
            display: flex;
            justify-content: space-between;
            /* background-color: #bfa; */
            height: 40px;
            line-height: 40px;
            >div {
                padding: 0px 10px;
                padding-bottom: 10px;
                border: 1px solid rgb(8, 156, 230);
                margin-right: 10px;
                /* height: 40px;
        line-height: 40px; */
      }
      .rightBtn{
        background-color: rgb(1, 102, 226);
      }
    }
  }
            }
.library-table{
      background-color: #fff;
      flex: 1;
      margin: 0px -15px;
      margin-top: 40px;
      display: flex;
      flex-direction: column;
      .table-header{
        padding: 20px;
        display: flex;
        justify-content: space-between;
        .el-form-item{
          margin-bottom: 30px !important;
        }
      }
      .table-box{
          padding: 0px 20px;
          margin-top: 0px;
          flex: 1;
          background: #fff;
          /* padding: 20px 20px 10px 20px; */
          display: flex;
          flex-direction: column;
          .el-table {
            flex: 1;
          }
          >div:nth-child(2){
            display: flex;
            justify-content: end;
            margin: 10px 0;
          }
      }
    }
            .rightBtn {
                background-color: rgb(1, 102, 226);
            }
        }
    }
    .library-table {
        background-color: #fff;
        flex: 1;
        margin: 0px -15px;
        margin-top: 40px;
        display: flex;
        flex-direction: column;
        .table-header {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            .el-form-item {
                margin-bottom: 30px !important;
            }
        }
        .table-box {
            padding: 0px 20px;
            margin-top: 0px;
            flex: 1;
            background: #fff;
            /* padding: 20px 20px 10px 20px; */
            display: flex;
            flex-direction: column;
            .el-table {
                flex: 1;
            }
            >div:nth-child(2) {
                display: flex;
                justify-content: end;
                margin: 10px 0;
            }
        }
    }
    .rightBtn {
        background-color: rgb(1, 102, 226);
src/views/laboratory/role/index.vue
@@ -7,10 +7,6 @@
            <el-input v-model="searchData.roleName" class="input-form" placeholder="请输入角色名称" style="width:250px">
            </el-input>
          </el-form-item>
          <el-form-item label="权限:" class="sermargin">
            <el-input v-model="searchData.permission" class="input-form" placeholder="请输入权限" style="width:250px">
            </el-input>
          </el-form-item>
          <el-form-item class="rightBtn">
            <el-button type="primary">查询</el-button>
            <el-button type="primary" plain>重置</el-button>
@@ -28,11 +24,10 @@
          <el-table :max-height="800" :cell-style="{ textAlign: 'center' }"
            :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center' }"
            :data="roleTable" style="width: 100%">
            <el-table-column type="selection" min-width="8%" />
            <el-table-column prop="rolename" label="角色名称" min-width="20%" />
            <el-table-column prop="permission" label="权限" min-width="20%" />
            <el-table-column prop="create_time" label="创建时间" min-width="20%" />
            <el-table-column prop="update_time" label="更新时间" min-width="20%" />
            <el-table-column type="index" min-width="8%" />
            <el-table-column prop="roleName" label="角色名称" min-width="20%" />
            <el-table-column prop="createTime" label="创建时间" min-width="20%" />
            <el-table-column prop="updateTime" label="更新时间" min-width="20%" />
            <el-table-column label="操作" min-width="12%">
              <template slot-scope="scope">
                <el-button type="text" size="small">编辑</el-button>
@@ -50,23 +45,61 @@
        </div>
      </div>
    </div>
    <el-dialog title="新增角色" :visible.sync="dialogTableVisible" width="60%">
    <el-dialog title="新增角色" :visible.sync="dialogTableVisible" width="50%">
      <el-form :model="roleAdd" ref="roleAdd" label-position="right" label-width="100px">
        <el-form-item label="角色名:">
          <el-input style="width: 300px" v-model="roleAdd.roleName" placeholder="请输入角色名">
          </el-input>
        </el-form-item>
        <el-form-item label="功能选择:">
          <el-cascader size="medium " v-model="roleAdd.menuData" :options="menuInfo">
            <template slot-scope="{ node, data }">
              <span>{{ data.label }}</span>
              <span v-if="!node.isLeaf"> ({{  }}) </span>
            </template>
          </el-cascader>
        </el-form-item>
        <el-col :span="24" style="display: flex;justify-content: space-between;">
          <el-form-item :rules="nameaRules" label="角色名:">
            <el-input @blur="assertName" style="width: 300px" v-model="roleAdd.roleName" placeholder="请输入角色名">
            </el-input>
          </el-form-item>
          <!-- <el-form-item label="菜单选择:">
            <el-cascader style="width: 300px" collapse-tags size="medium " filterable :props="props"
              v-model="roleAdd.menuData" :options="menuInfo">
              <template slot-scope="{ data }">
                <span>{{ data.label }}</span>
              </template>
            </el-cascader>
          </el-form-item> -->
        </el-col>
      </el-form>
      <el-col :span="24">
        <el-table height="300" :data="menuInfo" style="width: 100%;margin-bottom: 20px;" row-key="id"
          :default-expand-all="false" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
          <el-table-column highlight-current-row prop="parentId" label="菜单类型" sortable width="180">
            <template slot-scope="scope">
              <span v-if="scope.row.parentId == 0 && scope.row.children != undefined" style="color: #409eff;">主菜单</span>
              <span v-if="scope.row.parentId == 0 && scope.row.children === undefined" style="color: #409eff;">
                ä¸»èœå•
              </span>
            </template>
          </el-table-column>
          <el-table-column prop="name" label="菜单名" sortable width="180">
            <template slot-scope="scope">
              <el-col v-if="scope.row.parentId == 0">
                <span style="color: #409eff;">{{ scope.row.name }}</span>
              </el-col>
              <el-col v-else>
                <span style="color: #40b815;">{{ scope.row.name }}</span>
              </el-col>
            </template>
          </el-table-column>
          <el-table-column prop="id" label="操作权限">
            <template slot-scope="scope">
              <el-col v-if="scope.row.parentId == 0 && scope.row.children != undefined">
                <!-- <el-checkbox v-model="scope.row.select">查询</el-checkbox> -->
              </el-col>
              <el-col v-else>
                <el-checkbox size="medium" v-model="scope.row.selected" @change="chekSelect(scope)">查询</el-checkbox>
                <el-checkbox size="medium" v-model="scope.row.added" @change="chekAdd(scope)">添加</el-checkbox>
                <el-checkbox size="medium" v-model="scope.row.updated" @change="chekUpdate(scope)">修改</el-checkbox>
                <el-checkbox size="medium" v-model="scope.row.deleted" @change="chekDelet(scope)">删除</el-checkbox>
              </el-col>
            </template>
          </el-table-column>
        </el-table>
      </el-col>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogTableVisible = false">取 æ¶ˆ</el-button>
        <el-button @click="clearAll">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="addRole">ç¡® å®š</el-button>
      </span>
    </el-dialog>
@@ -74,8 +107,12 @@
</template>
<script>
import { getMenusTree } from '@/api/laboratory/role'
import { getMenusTree, addRoleInfo, assertRepeat, getAllRoleAndMenuInfo } from '@/api/laboratory/role'
import { default as menuPower } from './menuPower.vue'
export default {
  components: {
    menuPower: () => import('./menuPower.vue')
  },
  data() {
    return {
      props: { multiple: true },
@@ -83,22 +120,15 @@
        roleName: null,
        menuData: null
      },
      nameaRules: [{ required: true, message: '请输入角色名' }],
      menuTableTree: null,
      searchData: {
        roleName: '',
        permission: ''
      },
      assertRepeatName: true,
      menuInfo: [],
      roleTable: [{
        rolename: '部长',
        permission: 'ROOT',
        create_time: '2023-07-04 12:12:12',
        update_time: '2023-07-04 12:12:12'
      }, {
        rolename: '组长',
        permission: '--',
        create_time: '2023-07-04 12:12:12',
        update_time: '2023-07-04 12:12:12'
      }],
      roleTable: [],
      updateData: {
        oldPassWord: '',
        newPassWord: '',
@@ -113,23 +143,62 @@
  created() {
  },
  mounted() {
    this.start()
  },
  methods: {
    chekSelect(scope) {
    },
    async start() {
      let res = await getAllRoleAndMenuInfo()
      this.roleTable = res.data
      console.log(res);
    },
    async assertName() {
      if (this.roleAdd.roleName == null || this.roleAdd.roleName == '') {
        this.$message({
          message: '请输入角色名',
          type: 'warning'
        });
        return
      }
      let res = await assertRepeat({ roleName: this.roleAdd.roleName })
      if (!res.data) {
        this.assertRepeatName = false
        this.$message({
          message: '角色名重复,请重新输入!',
          type: 'warning'
        });
      } else {
        this.assertRepeatName = true
      }
    },
    chekAdd(scope) {
      scope.row.selected = true
    },
    chekUpdate(scope) {
      scope.row.selected = true
    },
    chekDelet(scope) {
      scope.row.selected = true
    },
    async addClickRole() {
      let res = await getMenusTree();
      this.menuInfo = res.data
      this.menuInfo.forEach(item => {
        item.select = false
        item.add = false
        item.update = false
        item.delete = false
        this.$set(item, 'selected', false);
        this.$set(item, 'added', false);
        this.$set(item, 'updated', false);
        this.$set(item, 'deleted', false);
        if (item.children.length == 0) {
          delete item['children']
        } else {
          item.children.forEach(c => {
            c.select = false
            c.add = false
            c.update = false
            c.delete = false
            this.$set(c, 'selected', false);
            this.$set(c, 'added', false);
            this.$set(c, 'updated', false);
            this.$set(c, 'deleted', false);
            if (c.children.length == 0) {
              delete c['children']
            }
@@ -137,10 +206,68 @@
        }
      })
      this.dialogTableVisible = true
      // console.log(this.dialogTableVisible)
    },
    addRole() {
      console.log(this.roleAdd);
    async addRole() {
      if (this.roleAdd.roleName == null || this.roleAdd.roleName == '') {
        this.$message({
          message: '请输入角色名',
          type: 'warning'
        });
        return
      }
      if (!this.assertRepeatName) {
        this.$message({
          message: '角色名重复,请重新输入',
          type: 'warning'
        });
        return
      }
      this.menuInfo.forEach(item => {
        if (item.children != undefined) {
          item.children.forEach(c => {
            if (c.added) {
              item.selected = true
            }
            if (c.selected) {
              item.selected = true
            }
            if (c.updated) {
              item.selected = true
            }
            if (c.deleted) {
              item.selected = true
            }
          })
        }
      })
      console.log(this.menuInfo);
      this.roleAdd.menuData = JSON.parse(JSON.stringify(this.menuInfo));
      this.roleAdd.menuData.forEach(item => {
        if (item.children != undefined) {
          let child = item.children.filter(c => {
            return c.added == true || c.selected == true || c.deleted == true || c.updated === true
          })
          item.children = child
        }
      })
      this.roleAdd.menuData = this.roleAdd.menuData.filter(item => {
        return item.selected == true
      })
      let res = await addRoleInfo(this.roleAdd);
      if (res.data) {
        this.$message({
          message: '添加角色成功',
          type: 'success'
        });
        this.dialogTableVisible = false
      } else {
        this.$message.error('添加失败!请重新操作');
      }
    },
    assertDml(a, b) {
      a = b ? true : false
      console.log(a);
      return a
    },
    // search(){},
    // reset(){},
@@ -153,6 +280,13 @@
    handleCurrentChange(val) {
      console.log(`当前是第${val}页`)
      this.currentPage = val
    },
    clearAll() {
      this.roleAdd.roleName = null
      this.roleAdd.menuData = null
      this.menuInfo = []
      this.assertRepeatName = true
      this.dialogTableVisible = false
    }
  }
}
src/views/laboratory/role/menuPower.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,21 @@
<template>
    <div>
    </div>
</template>
<script>
export default {
    data() {
        return {
        }
    },
    created() {
    },
    methods: {
    }
}
</script>
<style scoped></style>
src/views/template_testReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,651 @@
<template>
  <div class="content-wrapper">
    <div class="content-main">
      <div class="cover">
        <div class="cover-top">
          <div>
            <div style="height: 30px; line-height: 30px;">报告编号:</div>
            <div style="height: 30px; line-height: 30px;">Reference No:</div>
          </div>
        </div>
        <div class="title">
          <h1 style="text-align-last:justify ;">检验报告</h1>
          <h1>Test   Report</h1>
        </div>
        <div class="cover-body">
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div>试样名称</div>
            <span style="font-size: 14px;">Name of Product</span>
            </div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div style="text-align-last: justify;">型号</div>
            <span style="font-size: 14px;">Type and Size</span>
            </div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div>委托单位</div>
            <span style="font-size: 14px;display: block;margin: 10px 50px 0px;">Client</span>
          </div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
          <div class="name">
            <div style="width:140px; text-align-last: justify;">
            <div>检验类别</div>
            <span style="font-size: 14px;">Kind of Test</span></div>
            <div class="line"> æµ‹è¯•名称</div>
          </div>
        </div>
        <div class="cover-footer">
          <span>江苏中天科技股份有限公司检测中心</span><br>
          <span style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</span>
        </div>
      </div>
      <div class="pageOne">
        <div class="statement">
          <div><h2>声明</h2></div>
          <div style="text-align-last: center;"><h2 style="font-size: 14px;">Statement</h2></div>
        </div>
        <div class="statement-body">
          <div>
            <span>1.    æœ¬æ£€éªŒæŠ¥å‘Šï¼ˆåŒ…括复印件)未加检测专用章一律无效。</span><br>
            <span>This test report (including any duplicates) shall become effective only with pecial chapter for testing on.</span>
          </div>
          <div>
            <span>2.    æœ¬æ£€éªŒæŠ¥å‘Šæ— ç¼–写、审核、批准人签章无效。</span><br>
            <span>This test report shall become effective only with the signatures of compiler checker and approver.</span>
          </div>
          <div>
            <span>3.    æœ¬æ£€éªŒæŠ¥å‘Šæ¶‚改无效。</span><br>
            <span>This test report will be invalid if altered.</span>
          </div>
          <div>
            <span>4.    æœ¬æ£€éªŒæŠ¥å‘Šä¸å¾—部分复印。</span><br>
            <span>This test report mustn’t copy partly.</span>
          </div>
          <div>
            <span>5.    é€æ ·å§”托检验,仅对来样负责。</span><br>
            <span>For the sample submitted by clients, the test result is valid only for these samples.</span>
          </div>
          <div>
            <span>6.    æ ·å“åŠå§”托单位为委托方自命名。</span><br>
            <span>Samples and consignor name for the principal.</span>
          </div>
          <div>
            <span>7.    æœ¬æ£€éªŒæŠ¥å‘Šä¸­è‹±æ–‡æè¿°æœ‰å†²çªæ—¶ï¼Œä»¥ä¸­æ–‡è§£é‡Šä¸ºå‡†ã€‚</span><br>
            <span>If the Chinese and English version of the test report have any conflict, the Chinese version should be the standard for arbitrament.</span>
          </div>
          <div>
            <span>8.    å§”托方对本检验报告若有异议,应于样品保存期内向本中心提出,联系电话:0513-84885657</span><br>
            <span>Clients who have any different ideas about this test report, may contract with Test Central within the sample reservation time. Tel: 0513-84885657</span>
          </div>
          <div>
            <span>9.    æœ¬ä¸­å¿ƒæ ·å“è‡ªæŠ¥å‘Šå‘送日起,一般保存一个月,以备复验。</span><br>
            <span>The sample shall be reserved for one month beginning from the data when this test report is submitted for examine or review.</span>
          </div>
        </div>
        <div class="statement-footer">
          <div class="depart">
            <span>江苏中天科技股份有限公司检测中心</span><br>
            <span>Test Center of Jiangsu Zhongtian Technology Co., LTD</span>
          </div>
          <div class="address">
            <span>地    å€ï¼šæ±Ÿè‹çœå—通市经济技术开发区新开南路19号</span><br>
            <span>Address: No.19 Xinkai South Road, Nantong Economic and Technological Development Zone, Jiangsu Province</span>
          </div>
          <div class="zipcode">邮政编码Zip Code:226010</div>
          <div class="tel">电    è¯Tel:0513-89059043</div>
          <div class="email">邮    ç®±E-mail::ztttc@chinaztt.com </div>
        </div>
      </div>
      <div class="pageTwo">
        <div class="header" style="line-height: 10px;">
          <div style="width: 350px;margin: 0 auto; text-align-last: justify;">
            <h2 style="font-size: 18px;">江苏中天科技股份有限公司检测中心</h2>
          </div>
          <div style="width: 500px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2>
          </div>
          <div style="width: 120px;margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 18px;">检测报告</h2>
          </div>
          <div style="width: 100px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">Test Report</h2>
          </div>
        </div>
        <div class="table">
          <div class="table-header">
            <div>
              <span>报告编号:</span><br>
              <span>Reference No:</span>
            </div>
            <div>
              <span>第1页共2页</span><br>
              <span>Page 1 of 2</span>
            </div>
          </div>
          <div class="table-body">
            <table width="100%" border="1" cellspacing="0" style="text-align: center;">
              <tr>
                <td><span>试样名称</span><br>
                <span>Name of product</span></td>
                <td colspan="2"></td>
                <td>
                  <span>规格型号</span><br>
                  <span>Type and size</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>样品数量</span><br>
                  <span>Test item</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验项目</span><br>
                  <span>Test item</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>来样方式</span><br>
                  <span>Delivering method</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验类型</span><br>
                  <span>Type of test</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>样品状态</span><br>
                  <span>Sample discription</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>生产单位</span><br>
                  <span>Producer</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>收样时间</span><br>
                  <span>Received date</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验日期</span><br>
                  <span>Test date</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>委托人</span><br>
                  <span>Consignor</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>电话</span><br>
                  <span>Tel</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>委托单位</span><br>
                  <span>Client</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>委托单位地址</span><br>
                  <span>Address</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>检验环境</span><br>
                  <span>Test environment</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>检验依据</span><br>
                  <span>Test standard</span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td style="height: 180px;">
                  <span>结论</span><br>
                  <span>Conclusion </span>
                </td>
                <td colspan="5">
                  <div style="height: 120px;"></div>
                  <div style="height: 60px;margin-left: 250px;">
                    <span>(检测报告专用章)</span><br>
                     <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br>
                      <span>签发日期:  å¹´   æœˆ   æ—¥</span><br>
                      <span>Date of issue: August 23, 2023</span>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <span>备注</span><br>
                  <span>Remark </span>
                </td>
                <td colspan="5"></td>
              </tr>
              <tr>
                <td>
                  <span>编制</span><br>
                  <span>Preparer</span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>检验</span><br>
                  <span>Tester</span>
                </td>
                <td colspan="2"></td>
              </tr>
              <tr>
                <td>
                  <span>审核</span><br>
                  <span>Checker </span>
                </td>
                <td colspan="2"></td>
                <td>
                  <span>批准</span><br>
                  <span>Approver</span>
                </td>
                <td colspan="2"></td>
              </tr>
            </table>
          </div>
        </div>
      </div>
      <div class="pageThree">
        <div class="header" style="line-height: 10px;">
          <div style="width: 350px;margin: 0 auto; text-align-last: justify;">
            <h2 style="font-size: 18px;">江苏中天科技股份有限公司检测中心</h2>
          </div>
          <div style="width: 500px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2>
          </div>
          <div style="width: 120px;margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 18px;">检测报告</h2>
          </div>
          <div style="width: 100px; margin: 0 auto;text-align-last: justify;">
            <h2 style="font-size: 14px;">Test Report</h2>
          </div>
        </div>
        <div class="table">
          <div class="table-header">
            <div>
              <span>报告编号:</span><br>
              <span>Reference No:</span>
            </div>
            <div>
              <span>第2页共2页</span><br>
              <span>Page 2 of 2</span>
            </div>
          </div>
          <div class="table-body">
            <table width="100%" border="1" cellspacing="0" style="text-align: center;">
              <tr>
                <td colspan="4">
                  <span>样品编号</span><br>
                  <span>Sample No</span></td>
                <td colspan="3"></td>
                <td colspan="4">
                  <span>规格型号</span><br>
                  <span>Type</span>
                </td>
                <td colspan="3"></td>
              </tr>
              <tr>
                <td>
                  <span>序号</span><br>
                  <span>No</span>
                </td>
                <td colspan="3">
                  <span>检验项目</span><br>
                  <span>Test item</span>
                </td>
                <td>
                  <span>单位</span><br>
                  <span>Unit</span>
                </td>
                <td colspan="3">
                  <span>标准要求</span><br>
                  <span>Requirement</span>
                </td>
                <td colspan="3">
                  <span>检验结果</span><br>
                  <span>Test result</span>
                </td>
                <td>
                  <span>结论</span><br>
                  <span>Conclusion</span>
                </td>
                </tr>
                <tr>
                  <td>
                    <span></span><br>
                    <span></span>
                  </td>
                  <td colspan="3">
                    <span>样品标识</span><br>
                    <span>Sample labeling</span>
                  </td>
                  <td>
                    <span></span><br>
                    <span>I</span>
                  </td>
                  <td colspan="3">
                    <span></span><br>
                    <span></span>
                  </td>
                  <td colspan="3">
                    <span></span><br>
                    <span></span>
                  </td>
                  <td>
                    <span></span><br>
                    <span></span>
                  </td>
                </tr>
                <tr v-for="item in resultTable" :key="index">
                  <td>
                    <span>{{ item.id }}</span><br>
                  </td>
                  <td colspan="3">
                    <span>{{ item.testitem }}</span><br>
                    <span>{{ item.testitem_engName }}</span>
                  </td>
                  <td>
                    <span>{{ item.unit }}</span>
                  </td>
                  <td colspan="3">
                    <span>{{ item.requirement }}</span><br>
                    <span>{{ item.requirement_eng }}</span>
                  </td>
                  <td colspan="3">
                    <span>{{ item.testresult }}</span><br>
                    <span>{{ item.testresult_engName }}</span>
                  </td>
                  <td>
                    <span>{{ item.conclusion }}</span>
                  </td>
                </tr>
            </table>
          </div>
        </div>
      </div>
      <div class="pageFour">
        <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;">
          <div>
            <span>报告编号:</span><br>
            <span>Reference No:</span>
          </div>
          <div>
            <span>附页</span><br>
            <span>Appenfix</span>
          </div>
        </div>
        <hr>
        <div class="table">
          <div class="table-header">
            <div style="width: 200px; margin: 0 auto;text-align-last: justify;"><h2>检验设备一览表</h2></div>
            <div style="text-align-last: center;"><h2 style="font-size: 14px;">Equipment List</h2></div>
          </div>
          <div class="table-body">
            <table width="100%" border="1" cellspacing="0" style="text-align: center;">
              <thead>
                  <tr>
                    <td>
                      <span>序号</span><br>
                      <span>No</span>
                    </td>
                    <td colspan="2">
                      <span>设备名称</span><br>
                      <span>Equipment name</span>
                    </td>
                    <td>
                      <span>设备型号</span><br>
                      <span>type</span>
                    </td>
                    <td colspan="2">
                      <span>编号</span><br>
                      <span>Factory number</span>
                    </td>
                    <td colspan="2">
                      <span>校准有效期</span><br>
                      <span>Date of validity</span>
                    </td>
                  </tr>
              </thead>
              <tr v-for="item in table" :key="index">
                <td>
                  <span>{{ item.id }}</span>
                </td>
                <td colspan="2">
                  <span>{{ item.equipment_name }}</span>
                </td>
                <td>
                  <span>{{ item.type }}</span><br>
                </td>
                <td colspan="2">
                  <span>{{ item.factory_number }}</span>
                </td>
                <td colspan="2">
                  <span>{{ item.validity }}</span>
                </td>
              </tr>
            </table>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props:{
  },
  data(){
    return {
      resultTable:[
        {
          id: '1',
          testitem: '原始拉伸',
          testitem_engName: 'Primitive strength',
          unit: 'MPa',
          requirement: '最小10.0',
          requirement_eng: 'Minimun 10.0',
          testresult: '',
          testitem_engName: ''
        }
      ],
      table:[{
        id: 1,
        equipment_name: '拖拉机',
        type: 1,
        factory_number: 'Akjgfewof',
        validity:'2023.8.25~2023.8.27'
      }]
    }
  }
}
</script>
<style lang="scss" scoped>
.content-wrapper{
  background-color: #f0f2f5;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  .content-main{
    margin: -50px auto;
    width: 50%;
    // background-color: #fff;
    // background-color: #bfa;
    .cover{
      margin: 80px 0px;
      padding:0px 50px;
      height: 1200px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      .cover-top{
        display: flex;
        justify-content: end;
        font-size: 20px;
        margin-right: 50px;
        padding-top: 50px;
        // font-weight: bold;
      }
      .title{
        margin-top: 100px;
        padding: 0px 220px;
        text-align: center;
        font-size: 25px;
      }
      .cover-body{
        font-size: 25px;
        margin: 100px 80px;
        .name{
          // background-color: #bfa;
          display: flex;
          justify-content: space-between;
          margin-bottom: 20px;
          .line{
            width: 500px;
            border-bottom: solid 1px black;
            text-align: center;
            // height: 60px;
            line-height: 60px;
          }
        }
      }
      .cover-footer{
        text-align: center;
        margin-top: 200px;
        span{
          font-size: 23px;
          height: 40px;
          line-height: 40px;
        }
      }
    }
    .pageOne{
      margin-top: -50px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 100px;
      height: 1200px;
      .statement{
        margin: 0 auto;
        width: 100px;
        text-align-last: justify;
      }
      .statement-body{
        line-height: 32px;
        text-align: justify;
        margin: 30px 0px;
        font-size: 12px;
      }
      .statement-footer{
        line-height: 30px;
        font-size: 12px;
      }
    }
    .pageTwo{
      margin-top: 30px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 60px;
      height: 1200px;
      .table{
        margin-top: 20px;
        .table-header{
          display: flex;
          justify-content: space-between;
          font-size: 14px;
          line-height: 20px;
        }
        .table-body{
          font-size: 12px;
          table td{
            width: 150px;
            height: 52px;
          }
        }
      }
    }
    .pageThree{
      margin-top: 30px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 60px;
      height: 1200px;
      .table{
        margin-top: 20px;
        .table-header{
          display: flex;
          justify-content: space-between;
          font-size: 14px;
          line-height: 20px;
        }
        .table-body{
          font-size: 12px;
          table td{
            width: 8%;
            height: 52px;
          }
        }
      }
    }
    .pageFour{
      margin-top: 30px;
      background-color: #fff;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2);
      padding:50px 60px;
      height: 1200px;
      .table{
        margin-top: 50px;
        .table-header{
          line-height: 20px;
        }
        .table-body{
          margin-top: 20px;
          font-size: 12px;
          table td{
            width: 80px;
            height: 52px;
          }
        }
      }
    }
  }
}
</style>