| | |
| | | ENV = 'development' |
| | | |
| | | # base api |
| | | VUE_APP_BASE_API = 'http://192.168.110.254:1234/' |
| | | VUE_APP_BASE_API = 'http://192.168.110.167:1234/' |
| | |
| | | |
| | | # base api |
| | | # VUE_APP_BASE_API = '/prod-api' |
| | | VUE_APP_BASE_API = 'http://192.168.110.254:1234/' |
| | | VUE_APP_BASE_API = 'http://192.168.110.167:1234/' |
| | | |
| | |
| | | |
| | | # base api |
| | | # VUE_APP_BASE_API = '/stage-api' |
| | | VUE_APP_BASE_API = 'http://192.168.110.254:1234/' |
| | | VUE_APP_BASE_API = 'http://192.168.110.167:1234/' |
| | | |
| | | |
| | |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | export function getlink(params){ |
| | | return request({ |
| | | url:'/link-basic-table/link', |
| | | method:'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | export function getSampleName(params){ |
| | | return request({ |
| | | url: '/link-basic/material', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | |
| | | } |
| | | |
| | | export function getModelSpecification(params){ |
| | | return request({ |
| | | url: '/link-basic/specification', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | // 添加检验申请单 |
| | | export function addInspection(data){ |
| | | return request({ |
| | | url: '/link-basic/addInspection', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | padding-right: 15px; |
| | | } |
| | | } |
| | | .el-menu--popup{ |
| | | width: 120px; |
| | | } |
| | | </style> |
| | |
| | | path: 'inspectionApplication', |
| | | name: 'InspectionApplication', |
| | | component: () => import('@/views/experiment/inspectionApplication/index'), |
| | | meta: { title: '检验申请', icon: 'tree' } |
| | | meta: { title: '新增检验', icon: 'tree' } |
| | | }, |
| | | { |
| | | path: 'planAssignments', |
| | |
| | | const state = { |
| | | showSettings: showSettings, |
| | | fixedHeader: fixedHeader, |
| | | sidebarLogo: sidebarLogo |
| | | sidebarLogo: sidebarLogo, |
| | | link:'' |
| | | } |
| | | |
| | | const mutations = { |
| | |
| | | if (state.hasOwnProperty(key)) { |
| | | state[key] = value |
| | | } |
| | | }, |
| | | SAVE_LINK(state,link){ |
| | | state.link = link |
| | | } |
| | | } |
| | | |
| | |
| | | // please modify it according to the actual situation |
| | | config.headers['X-Token'] = getToken() |
| | | } |
| | | config.headers['link'] = store.state.settings.link |
| | | // console.log('config' ,config) |
| | | return config |
| | | }, |
| | | error => { |
| | |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <div class="content-main"> |
| | | <div class="top-bar"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | | <el-form-item> |
| | | <el-form-item label="申请单号:"> |
| | | <el-input |
| | | v-model="searchData.keyword" |
| | | v-model="searchData.applicationnumber" |
| | | class="input-form" |
| | | placeholder="请输入申请单号/检验对象/对象位置/对象名称" |
| | | placeholder="请输入申请单号" |
| | | style="width: 200px; margin-right: 20px;" |
| | | > |
| | | <i slot="prefix" class="el-input__icon el-icon-search" /> |
| | | <i slot="prefix" class="el-input__icon el-icon-search" /> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="检验类型:"> |
| | | <el-select v-model="searchData.type" placeholder="全部" style="width: 100px;margin-right: 20px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检验状态:" style="margin-right: 20px;"> |
| | | <el-select v-model="searchData.state" placeholder="全部" style="width: 100px;margin-right: 20px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary">查询</el-button> |
| | |
| | | return { |
| | | showDetail: false, |
| | | searchData: { |
| | | keyword: '' |
| | | applicationnumber: '', |
| | | type: '', |
| | | state: '' |
| | | }, |
| | | inspectionTable: [{ |
| | | applicationnum: 'QC22-09155', |
| | |
| | | amount: '', |
| | | checkdate: '' |
| | | }, |
| | | options:[{ |
| | | value: '0', |
| | | label: '选项1' |
| | | },{ |
| | | value:'1', |
| | | label: '选项2' |
| | | }], |
| | | currentPage: 1, |
| | | total: 20, // 总条数 |
| | | pageSize: 10, // 每页的数据条数 |
| | |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <template> |
| | | <div v-if="!showDetail"> |
| | | <div class="content-main"> |
| | | <div class="firstBox"> |
| | | <div class="title">检测信息</div> |
| | | <div class="tableBox"> |
| | | <div class="tableBox-header"> |
| | | <el-button class="split" type="primary" size="small" style="background-color: rgb(1, 102, 226);">添加样品</el-button> |
| | | <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" |
| | |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | prop="sampleid" |
| | | prop="sampleNumber" |
| | | label="样品编号" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="samplename" |
| | | prop="sampleName" |
| | | label="样品名称" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | prop="modelandspecification" |
| | | prop="specificationsModels" |
| | | label="规格型号" |
| | | min-width="10%" |
| | | /> |
| | |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="amount" |
| | | prop="samplesNumber" |
| | | label="数量" |
| | | min-width="8%" |
| | | /> |
| | |
| | | label="添加方式" |
| | | min-width="8%"> |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | :type="scope.row.addway === 0 ? 'success' : 'primary'" |
| | | disable-transitions |
| | | >{{ scope.row.addway === 0 ? '扫描' : '录入' }}</el-tag> |
| | | <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 |
| | |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="other" |
| | | prop="remarks" |
| | | label="备注" |
| | | min-width="8%" |
| | | /> |
| | |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small">修改</el-button> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">删除</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">基本信息</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="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-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="委托单位:"> |
| | | <el-select style="width: 160px;" v-model="infoForm.department" size="small" placeholder="请选择产品名称"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <el-input style="width: 160px" v-model="infoForm.department" placeholder="请输入委托单位" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="联系人:"> |
| | | <el-select style="width: 160px;" v-model="infoForm.contacter" size="small" placeholder="请选择产品名称"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <el-input style="width: 160px" v-model="infoForm.contacter" placeholder="请输入委托单位" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="联系电话:"> |
| | | <el-select style="width: 160px;" v-model="infoForm.tel" size="small" placeholder="请选择产品名称"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <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-select style="width: 160px;" v-model="infoForm.address" size="small" placeholder="请选择产品名称"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <el-input style="width: 160px;" v-model="infoForm.address" placeholder="请输入联系地址" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | |
| | | <el-col :span="5"> |
| | | <el-form-item label="送样方式:"> |
| | | <el-select style="width: 160px;" v-model="infoForm.way" size="small" placeholder="送样"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | <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> |
| | | </div> |
| | | <div class="submitBtn"> |
| | | <el-button type="primary" size="small" style="background-color: rgb(1, 102, 226);">提交</el-button> |
| | | <el-button type="primary" size="small" @click="submitInspection" 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> |
| | | <div v-else> |
| | | <router-view></router-view> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getSampleName, getModelSpecification, getlink, addInspection} from '@/api/inspection/commisioninspection' |
| | | export default { |
| | | data() { |
| | | return { |
| | | currentPage: 0, |
| | | searchData: '', |
| | | infoForm: { |
| | | commisioncode: 'ST9162324', |
| | | commisioncode: '', |
| | | department: '', |
| | | contacter: '', |
| | | tel: '', |
| | |
| | | num: '', |
| | | other: '' |
| | | }, |
| | | detectionInfo: [{ |
| | | sampleid: 'GW31478631', |
| | | samplename: '绝缘杆', |
| | | modelandspecification: 'JLHA/G1A-185/30-26/7', |
| | | unit: '根', |
| | | amount: '40', |
| | | addway: 0, |
| | | experiment: '交流耐压试验', |
| | | other: '123', |
| | | opertion: '', |
| | | }] |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" plain>重置</el-button> |
| | | <el-button type="primary" @click="search">查询</el-button> |
| | | <el-button type="primary" plain @click="reset">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form> |
| | |
| | | <div class="library-table"> |
| | | <div class="table-header"> |
| | | <div class="search-bar"> |
| | | <el-radio-group v-model="radioValue"> |
| | | <el-radio-button label="全部" /> |
| | | <el-radio-button label="待检验" /> |
| | | <el-radio-button label="已检验" /> |
| | | </el-radio-group> |
| | | <el-radio-group v-model="radioValue" @change="radioclick"> |
| | | <el-radio-button v-for="item in conditionsOptions" :key="item.value" :label="item.value"> |
| | | {{ item.label }} |
| | | </el-radio-button> |
| | | </el-radio-group> |
| | | </div> |
| | | <div class="generateInsp"> |
| | | <el-button type="primary" size="mini" icon="el-icon-document" style="background-color: rgb(1, 102, 226);">生成报检单</el-button> |
| | |
| | | <el-table-column |
| | | prop="entrust_coding" |
| | | label="委托编号" |
| | | min-width="8%" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | | prop="entrusted" |
| | |
| | | options: [{ |
| | | value: '1', |
| | | label: '部门1' |
| | | }, { |
| | | value: '2', |
| | | label: '部门2' |
| | | }, { |
| | | value: '3', |
| | | label: '部门3' |
| | | }], |
| | | radioValue: '', |
| | | radioValue: 0, |
| | | commisionTable: [{ |
| | | specifications_models: "GGXH-AAAAA", |
| | | inspectionTime: "2023-08-03", |
| | |
| | | sample_name: "发动机", |
| | | inspection_status: 1 |
| | | }], |
| | | conditionsOptions: [ |
| | | { |
| | | label: '全部', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '已检验', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: '待检验', |
| | | value: 2 |
| | | } |
| | | ], |
| | | currentPage: 1, |
| | | pageSize: 5, |
| | | total: 100, |
| | |
| | | }, |
| | | methods: { |
| | | async getCommisionList(){ |
| | | const res = await getCommisionList({pageNo:this.currentPage , pageSize:this.pageSize}) |
| | | const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize}) |
| | | this.commisionTable = res.data.row |
| | | // this.total = res.data.row.length |
| | | console.log(this.commisionTable) |
| | | this.total = res.data.total |
| | | // console.log(res) |
| | | // 获取所有的委托单位名称 |
| | | const allDepartmentNames = [...new Set(this.commisionTable.map(item => item.entrusted))] |
| | | // 将allDepartmentNames转换为options需要的格式 |
| | | this.options = allDepartmentNames.map(name => ({ value: name, label: name })) |
| | | |
| | | }, |
| | | // 查询方法 |
| | | async search() { |
| | | // 将搜索条件作为参数传递给getCommisionList方法 |
| | | if(this.radioValue === 0){ |
| | | const res = await getCommisionList({ |
| | | pageNo: this.currentPage, |
| | | pageSize: this.pageSize, |
| | | entrustCoding: this.searchData.code, |
| | | sampleName: this.searchData.name, |
| | | entrusted: this.searchData.department, |
| | | }) |
| | | }else{ |
| | | const res = await getCommisionList({ |
| | | pageNo: this.currentPage, |
| | | pageSize: this.pageSize, |
| | | entrustCoding: this.searchData.code, |
| | | sampleName: this.searchData.name, |
| | | entrusted: this.searchData.department, |
| | | inspectionStatus: this.radioValue |
| | | }) |
| | | } |
| | | // console.log(res) |
| | | this.commisionTable = res.data.row |
| | | this.total = res.data.total |
| | | }, |
| | | |
| | | // 重置方法 |
| | | reset() { |
| | | // 重置搜索条件 |
| | | this.searchData.code = '' |
| | | this.searchData.name = '' |
| | | this.searchData.department = '' |
| | | this.radioValue = '0' |
| | | // 重新获取数据 |
| | | this.getCommisionList() |
| | | }, |
| | | async radioclick(){ |
| | | // 处理点击radio的时间 |
| | | // console.log('radioValue',this.radioValue) |
| | | if(this.radioValue === 0){ |
| | | this.getCommisionList() |
| | | }else{ |
| | | const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize, inspectionStatus: this.radioValue}) |
| | | // console.log(res) |
| | | this.commisionTable = res.data.row |
| | | this.total = res.data.total |
| | | } |
| | | |
| | | }, |
| | | // 每页条数改变时触发 选择一页显示多少行 |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`) |
| | | async handleSizeChange(val) { |
| | | // console.log(`每页 ${val} 条`) |
| | | this.currentPage = 1 |
| | | this.pageSize = val |
| | | if(this.radioValue === 0){ |
| | | this.getCommisionList() |
| | | }else{ |
| | | const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize, inspectionStatus: this.radioValue}) |
| | | this.commisionTable = res.data.row |
| | | this.total = res.data.total |
| | | } |
| | | }, |
| | | // 当前页改变时触发 跳转其他页 |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`) |
| | | async handleCurrentChange(val) { |
| | | // console.log(`当前页: ${val}`) |
| | | this.currentPage = val |
| | | this.commisionTable = getCommisionList({pageNo:this.currentPage , pageSize:this.pageSize}) |
| | | if(this.radioValue === 0){ |
| | | this.getCommisionList() |
| | | }else{ |
| | | const res = await getCommisionList({pageNo:this.currentPage, pageSize:this.pageSize, inspectionStatus: this.radioValue}) |
| | | this.commisionTable = res.data.row |
| | | this.total = res.data.total |
| | | } |
| | | }, |
| | | goToaddCommision() { |
| | | this.$router.push('/inspectionManagement/commissionInspection/addCommision') |
| | |
| | | // height: 800px; |
| | | // } |
| | | .standard-library-main{ |
| | | width: 100%; |
| | | width: 100vh; |
| | | height: 100%; |
| | | // 页面中心内容区域 |
| | | .content-main{ |
| | |
| | | background: #fff; |
| | | } |
| | | .library-bom{ |
| | | flex: 2; |
| | | // width: 20%; |
| | | padding-right: 10px; |
| | | width: 40vh; |
| | | // height: 100%; |
| | | max-height: 100%; |
| | | margin-right: 12px; |
| | | overflow-y: scroll; |
| | | // overflow-y: scroll; |
| | | .el-tree { |
| | | // margin-top: 12px; |
| | | ::v-deep .el-tree-node__content{ |
| | |
| | | } |
| | | .library-table{ |
| | | // height: 100%; |
| | | flex: 8; |
| | | width: 170vh; |
| | | max-height: 100%; |
| | | // flex: 8; |
| | | margin-left: 12px; |