Merge branch 'master' of http://192.168.110.209:9001/r/lims-before
| | |
| | | ENV = 'development' |
| | | |
| | | # base api |
| | | VUE_APP_BASE_API = 'http://192.168.110.254:1234/' |
| | | VUE_APP_BASE_API = 'http://localhost:1234/' |
| | |
| | | params |
| | | }) |
| | | } |
| | | |
| | | export function chooseUseProId(params) { |
| | | return request({ |
| | | url: '/inspection/chooseUseProId', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | export function selectEquipment() { |
| | | return request({ |
| | | url: '/inspection/selectEquipment', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | export function chooseEquipment(params) { |
| | | return request({ |
| | | url: '/inspection/chooseEquipment', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | |
| | | |
| | | Vue.use(Router) |
| | | |
| | | /* Layout */ |
| | | import Layout from '@/layout' |
| | | |
| | | /** |
| | | * Note: sub-menu only appear when route children.length >= 1 |
| | | * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html |
| | | * |
| | | * hidden: true if set true, item will not show in the sidebar(default is false) |
| | | * alwaysShow: true if set true, will always show the root menu |
| | | * if not set alwaysShow, when item has more than one children route, |
| | | * it will becomes nested mode, otherwise not show the root menu |
| | | * redirect: noRedirect if set noRedirect will no redirect in the breadcrumb |
| | | * name:'router-name' the name is used by <keep-alive> (must set!!!) |
| | | * meta : { |
| | | roles: ['admin','editor'] control the page roles (you can set multiple roles) |
| | | title: 'title' the name show in sidebar and breadcrumb (recommend set) |
| | | icon: 'svg-name'/'el-icon-x' the icon show in the sidebar |
| | | breadcrumb: false if set false, the item will hidden in breadcrumb(default is true) |
| | | activeMenu: '/example/list' if set path, the sidebar will highlight the path you set |
| | | } |
| | | */ |
| | | |
| | | /** |
| | | * constantRoutes |
| | | * a base page that does not have permission requirements |
| | | * all roles can be accessed |
| | | */ |
| | | function getRoutes() { |
| | | let constantRoutes = [ |
| | | { |
| | |
| | | path: '/', |
| | | component: Layout, |
| | | redirect: '/home', |
| | | // meta: { title: '主页', icon: 'el-icon-s-home' }, |
| | | children: [{ |
| | | path: 'home', |
| | | name: 'Home', |
| | |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // path: '/rawMaterials', |
| | | // component: Layout, |
| | | // redirect: '/rawMaterials/reportForInspection', |
| | | // name: 'rawMaterials', |
| | | // meta: { title: '检验', icon: 'el-icon-s-help' }, |
| | | // children: [ |
| | | // { |
| | | // path: 'reportForInspection', |
| | | // name: 'ReportForInspection', |
| | | // component: () => import('@/views/rawMaterials/reportForInspection/index'), |
| | | // meta: { title: '原材料报检', icon: 'table' }, |
| | | // children: [ |
| | | // // { |
| | | // // path: 'index', |
| | | // // name: 'ReportForInspectionIndex', |
| | | // // // hidden: true, |
| | | // // component: () => import('@/views/rawMaterials/reportForInspection/index'), |
| | | // // meta: { title: '原材料报检', icon: 'table' } |
| | | // // }, |
| | | // { |
| | | // path: 'forInspectionDetail', |
| | | // name: 'ForInspectionDetail', |
| | | // hidden: true, |
| | | // component: () => import('@/views/rawMaterials/reportForInspection/forInspectionDetail'), |
| | | // meta: { title: '新增检验单详情', icon: 'table' } |
| | | // } |
| | | // ] |
| | | // }, |
| | | // { |
| | | // path: 'print', |
| | | // name: 'Print', |
| | | // component: () => import('@/views/rawMaterials/print/index'), |
| | | // meta: { title: '条码打印', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'planAssignments', |
| | | // name: 'PlanAssignments', |
| | | // component: () => import('@/views/rawMaterials/planAssignments/index'), |
| | | // meta: { title: '检验计划分配', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'rawMaterialInspection', |
| | | // name: 'RawMaterialInspection', |
| | | // component: () => import('@/views/rawMaterials/rawMaterialInspection/index'), |
| | | // meta: { title: '原材料检验', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'checkTheReport', |
| | | // name: 'CheckTheReport', |
| | | // component: () => import('@/views/rawMaterials/checkTheReport/index'), |
| | | // meta: { title: '检验报告', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'reportAuditing', |
| | | // name: 'ReportAuditing', |
| | | // component: () => import('@/views/rawMaterials/reportAuditing/index'), |
| | | // meta: { title: '报告审核', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'nonConformanceReview', |
| | | // name: 'NonConformanceReview', |
| | | // component: () => import('@/views/rawMaterials/nonConformanceReview/index'), |
| | | // meta: { title: '不合格反馈', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'nonConformingFeedback', |
| | | // name: 'NonConformingFeedback', |
| | | // component: () => import('@/views/rawMaterials/nonConformingFeedback/index'), |
| | | // meta: { title: '不合格评审', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'passRateStatistics', |
| | | // name: 'PassRateStatistics', |
| | | // component: () => import('@/views/rawMaterials/passRateStatistics/index'), |
| | | // meta: { title: '合格率统计', icon: 'tree' } |
| | | // } |
| | | // ] |
| | | // }, |
| | | { |
| | | path: '/inspectionManagement', |
| | | component: Layout, |
| | |
| | | meta: { title: '新增检验', icon: 'tree' } |
| | | }, |
| | | { |
| | | path: 'Viewdetails', |
| | | path: 'Viewdetails/:id', |
| | | name: 'Viewdetails', |
| | | hidden: true, |
| | | component: () => import('@/views/experiment/inspectionApplication/Viewdetails/index'), |
| | |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // path: '/finishedProduct', |
| | | // component: Layout, |
| | | // redirect: '/finishedProduct/reportForInspection', |
| | | // name: 'FinishedProduct', |
| | | // meta: { title: '成品检验', icon: 'el-icon-s-help' }, |
| | | // children: [ |
| | | // { |
| | | // path: 'reportForInspection', |
| | | // name: 'ReportForInspection', |
| | | // component: () => import('@/views/rawMaterials/reportForInspection/index'), |
| | | // meta: { title: '成品送检登记', icon: 'table' } |
| | | // }, |
| | | // { |
| | | // path: 'print', |
| | | // name: 'Print', |
| | | // component: () => import('@/views/rawMaterials/print/index'), |
| | | // meta: { title: '条码打印', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'planAssignments', |
| | | // name: 'PlanAssignments', |
| | | // component: () => import('@/views/rawMaterials/planAssignments/index'), |
| | | // meta: { title: '检验计划分配', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'rawMaterialInspection', |
| | | // name: 'RawMaterialInspection', |
| | | // component: () => import('@/views/rawMaterials/rawMaterialInspection/index'), |
| | | // meta: { title: '成品检验', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'checkTheReport', |
| | | // name: 'CheckTheReport', |
| | | // component: () => import('@/views/rawMaterials/checkTheReport/index'), |
| | | // meta: { title: '检验报告', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'reportAuditing', |
| | | // name: 'ReportAuditing', |
| | | // component: () => import('@/views/rawMaterials/reportAuditing/index'), |
| | | // meta: { title: '报告审核', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'nonConformanceReview', |
| | | // name: 'NonConformanceReview', |
| | | // component: () => import('@/views/rawMaterials/nonConformanceReview/index'), |
| | | // meta: { title: '不合格反馈', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'nonConformingFeedback', |
| | | // name: 'NonConformingFeedback', |
| | | // component: () => import('@/views/rawMaterials/nonConformingFeedback/index'), |
| | | // meta: { title: '不合格评审', icon: 'tree' } |
| | | // }, |
| | | // { |
| | | // path: 'passRateStatistics', |
| | | // name: 'PassRateStatistics', |
| | | // component: () => import('@/views/rawMaterials/passRateStatistics/index'), |
| | | // meta: { title: '合格率统计', icon: 'tree' } |
| | | // } |
| | | // ] |
| | | // }, |
| | | { |
| | | path: '/laboratory', |
| | | component: Layout, |
| | |
| | | { |
| | | path: 'message', |
| | | name: 'Message', |
| | | // hidden: true, |
| | | component: () => import('@/views/message/message/index'), |
| | | // meta: { title: '我的消息', icon: 'table' } |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | path: '/', |
| | | component: Layout, |
| | | redirect: '/home', |
| | | // meta: { title: '主页', icon: 'el-icon-s-home' }, |
| | | children: [{ |
| | | path: 'home', |
| | | name: 'Home', |
| | |
| | | const service = axios.create({ |
| | | baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url |
| | | // withCredentials: true, // send cookies when cross-domain requests |
| | | timeout: 5000 // request timeout |
| | | timeout: 10000 // request timeout |
| | | }) |
| | | |
| | | // request interceptor |
| | |
| | | <template> |
| | | <div> |
| | | <div style="overflow: hidden;"> |
| | | <el-card style="margin: 10px;" > |
| | | <div slot="header" class="clearfix"> |
| | | <span> |
| | | <i slot="prefix" class="el-icon-s-home" /> |
| | | 实验管理/原材料检验单</span> |
| | | </div> |
| | | <div class="card-content"> |
| | | <el-row :gutter="80"> |
| | | <el-form ref="form" :model="searchData" label-width="80px"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="来料日期:" > |
| | | <el-input :disabled="true" v-model="searchData.formTime"></el-input> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="供应商名称:" > |
| | | <el-input :disabled="true" v-model="searchData.supplier"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产品编号:"> |
| | | <el-input :disabled="true" v-model="searchData.code"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row :gutter="80"> |
| | | <el-form ref="form" :model="searchData" label-width="80px"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="原材料名称:"> |
| | | <el-input :disabled="true" v-model="searchData.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="规格型号:"> |
| | | <el-input :disabled="true" v-model="searchData.specifications"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="单位:"> |
| | | <el-input :disabled="true" v-model="searchData.unit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row :gutter="80"> |
| | | <el-form ref="form" :model="searchData" label-width="80px"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="数量:"> |
| | | <el-input :disabled="true" v-model="searchData.num"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="登记日期:"> |
| | | <el-input :disabled="true" v-model="searchData.endTime"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | |
| | | <el-form-item label="登记人:"> |
| | | <el-input :disabled="true" v-model="searchData.userName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | </div> |
| | | </el-card> |
| | | |
| | | |
| | | <el-row style="margin: 5px;"> |
| | | <el-col :span="12" style="line-height: 32px;">检验项目</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- <el-button ic size="medium " @click="()=>{}">保存</el-button> --> |
| | | <el-button icon="el-icon-refresh-lef" size="medium " style="background-color: cornflowerblue;" @click="goback">返回</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <el-card style="margin: 10px;"> |
| | | <el-table |
| | | :data="insProducts" |
| | | height="calc(80vh - 250px)" |
| | | border |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | label="序号" |
| | | type="index" |
| | | width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="项目" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="单位" |
| | | width="180"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="internal" |
| | | label="标准值"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="required" |
| | | label="内控值"> |
| | | </el-table-column> |
| | | <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,indxe) in ZERENren" :key="indxe" :label="item.name" :value="item.name"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="inspectionMaterialId" |
| | | label="实验设备"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="SHEbei" size="small" slot="append" style="width: 220px;"> |
| | | <el-option v-for="(item,index) in getDevices" :key="index" :label="item.name"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div style="overflow: hidden;"> |
| | | <el-card style="margin: 10px;"> |
| | | <div slot="header" class="clearfix"> |
| | | <span> |
| | | <i slot="prefix" class="el-icon-s-home" /> |
| | | 实验管理/原材料检验单</span> |
| | | </div> |
| | | <div class="card-content"> |
| | | <el-row> |
| | | <el-form ref="form" :model="searchData" label-width="150px"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="来料日期:"> |
| | | <el-input :disabled="true" v-model="searchData.formTime"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input :disabled="true" v-model="searchData.supplier"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="产品编号:"> |
| | | <el-input :disabled="true" v-model="searchData.code"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form ref="form" :model="searchData" label-width="150px"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="原材料名称:"> |
| | | <el-input :disabled="true" v-model="searchData.name"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-input :disabled="true" v-model="searchData.specifications"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="单位:"> |
| | | <el-input :disabled="true" v-model="searchData.unit"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row> |
| | | <el-form ref="form" :model="searchData" label-width="150px"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="数量:"> |
| | | <el-input :disabled="true" v-model="searchData.num"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="登记日期:"> |
| | | <el-input :disabled="true" v-model="searchData.endTime"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="登记人:"> |
| | | <el-input :disabled="true" v-model="searchData.userName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </el-row> |
| | | </div> |
| | | </el-card> |
| | | <el-row style="margin: 0 20px;"> |
| | | <el-col :span="12" style="line-height: 32px;">检验项目</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button icon="el-icon-refresh-lef" size="medium" @click="goback">返回</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div> |
| | | <el-card style="margin: 10px;"> |
| | | <el-table :data="insProducts" height="calc(80vh - 250px)" border style="width: 100%"> |
| | | <el-table-column label="序号" type="index" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="项目" width="200"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位" width="150"> |
| | | </el-table-column> |
| | | <el-table-column prop="internal" label="标准值"> |
| | | </el-table-column> |
| | | <el-table-column prop="required" label="内控值"> |
| | | </el-table-column> |
| | | <el-table-column prop="userName" label="责任人" width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.username" slot="append" |
| | | @change="(val)=>chooseUseProId(val, scope.row)"> |
| | | <el-option v-for="(item,indxe) in ZERENren" :key="indxe" :label="item.name" |
| | | :value="item.id"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionMaterialId" label="实验设备" width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-cascader v-model="scope.row.instrumentName" :options="devices" |
| | | :props="{label: 'Name',value: 'Id',children: 'childrenList'}" |
| | | @change="(val)=>chooseEquipment(val, scope.row)"></el-cascader> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { selectInspectsListById,selectUser,chooseinstum} from '@/api/experiment/planAssignments' |
| | | export default { |
| | | data(){ |
| | | return { |
| | | searchData:{ |
| | | formTime: '', |
| | | supplier: '', |
| | | code: '', |
| | | name: '', |
| | | specifications: '', |
| | | unit: '', |
| | | num: '', |
| | | endTime: '', |
| | | userName: '', |
| | | }, |
| | | insProducts:[], |
| | | value:'', |
| | | SHEbei:[], |
| | | aaa:{}, |
| | | ZERENren:[], |
| | | // getDevices:[] |
| | | } |
| | | }, |
| | | created(){ |
| | | // if(this.$route.query){ |
| | | // this.uu = this.$route.query.id; |
| | | // } |
| | | this.aaa = this.$route.query |
| | | // if(this.$route.query){ |
| | | // this.aaa = this.$router.query.data1 |
| | | // console.log(this.aaa); |
| | | // } |
| | | console.log(this.aaa); |
| | | this.selectInspectsListById() |
| | | this.selectUser() |
| | | this.chooseinstum() |
| | | }, |
| | | methods: { |
| | | //返回 |
| | | async goback(){ |
| | | this.$router.push({name:'inspectionApplication'}) |
| | | }, |
| | | //检验单责任人 |
| | | async selectUser(){ |
| | | const res = await selectUser() |
| | | this.ZERENren = res.data |
| | | console.log(this.ZERENren); |
| | | }, |
| | | |
| | | async chooseinstum(){ |
| | | const res = await chooseinstum() |
| | | this.getDevices = res.data |
| | | console.log(this.getDevices); |
| | | }, |
| | | //检验单表 |
| | | async selectInspectsListById() { |
| | | const res = await selectInspectsListById({id:this.aaa.id}) |
| | | this.searchData = res.data |
| | | this.insProducts = res.data.insProducts |
| | | } |
| | | } |
| | | } |
| | | import { |
| | | selectInspectsListById, |
| | | selectUser, |
| | | selectEquipment, |
| | | chooseUseProId, |
| | | chooseEquipment |
| | | } from '@/api/experiment/planAssignments' |
| | | export default { |
| | | data() { |
| | | return { |
| | | searchData: { |
| | | formTime: '', |
| | | supplier: '', |
| | | code: '', |
| | | name: '', |
| | | specifications: '', |
| | | unit: '', |
| | | num: '', |
| | | endTime: '', |
| | | userName: '', |
| | | }, |
| | | insProducts: [], |
| | | value: '', |
| | | SHEbei: [], |
| | | id: null, |
| | | ZERENren: [], |
| | | devices: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.id = this.$route.params.id |
| | | this.selectInspectsListById() |
| | | this.selectUser() |
| | | this.selectEquipment() |
| | | }, |
| | | methods: { |
| | | //返回 |
| | | async goback() { |
| | | this.$router.push({ |
| | | name: 'inspectionApplication' |
| | | }) |
| | | }, |
| | | //检验单责任人 |
| | | async selectUser() { |
| | | const res = await selectUser() |
| | | this.ZERENren = res.data |
| | | }, |
| | | async selectEquipment() { |
| | | const res = await selectEquipment() |
| | | this.devices = JSON.parse(JSON.stringify(res.data).replaceAll('father', '').replaceAll('ins', '').replaceAll( |
| | | 'son', '').replaceAll('name', 'Name')) |
| | | }, |
| | | //检验单表 |
| | | async selectInspectsListById() { |
| | | const res = await selectInspectsListById({ |
| | | id: this.id |
| | | }) |
| | | this.searchData = res.data |
| | | this.insProducts = res.data.insProducts |
| | | }, |
| | | chooseUseProId(val, row) { |
| | | chooseUseProId({ |
| | | id: row.id, |
| | | userProId: val |
| | | }).then(res => { |
| | | if (res.data) this.$message.success('责任人分配成功') |
| | | }) |
| | | }, |
| | | chooseEquipment(val, row) { |
| | | chooseEquipment({ |
| | | id: row.id, |
| | | equipmentId: val[2] |
| | | }).then(res => { |
| | | if (res.data) this.$message.success('设备分配成功') |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | </style> |
| | | |
| | | </style> |
| | |
| | | <el-table-column prop="createTime" label="登记日期" min-width="80px" /> |
| | | <el-table-column prop="inspection_status" label="检验结果" min-width="80px"> |
| | | <template slot-scope="scope"> |
| | | <el-tag class="tag" :type="scope.row.inspection_status === 0 ? 'danger' : 'success'" |
| | | disable-transitions>{{ scope.row.inspection_status === 0 ? '不合格' : '合格' }}</el-tag> |
| | | <el-tag class="tag" type="danger" disable-transitions v-if="scope.row.inspection_status == 0">不合格</el-tag> |
| | | <el-tag class="tag" type="success" disable-transitions v-else-if="scope.row.inspection_status == 1">合格</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="userName" label="登记人" min-width="80px" /> |
| | |
| | | <el-table-column label="操作" min-width="150" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">查看</el-button> |
| | | <!-- <el-button type="text" size="small" >提交</el-button> --> |
| | | <el-button type="text" size="small">作废</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-card> |
| | | <template slot-scope="scope"> |
| | | <span>版本选择:</span> |
| | | <el-select @change="ccc" v-model="selectedValue" size="small" slot="append" style="width: 220px;"> |
| | | <el-select @change="getProductVerison" v-model="version" size="small" slot="append" style="width: 220px;"> |
| | | <el-option v-for="item in BANben" :key="item" :label="item" :value="item"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-card> |
| | | <el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border |
| | | height="calc(80vh - 250px)" default-expand-all ref="multipleTable" |
| | | @select-all="selectAll" @selection-change="handleSelectionChange" |
| | | height="calc(40vh)" 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 prop="name" label="项目名称" sortable> |
| | | </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 prop="required" label="标准值" sortable> |
| | | </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> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | amount: '', |
| | | checkdate: [] |
| | | }, |
| | | selectedValue: {}, |
| | | selectedValue: null, |
| | | infoForm: {}, |
| | | commisionSelection: { |
| | | entrust_coding: '', |
| | |
| | | tableData: [], |
| | | tableRow: {}, |
| | | BANben: [], |
| | | // select_1: [], |
| | | aa: {}, |
| | | version: null, |
| | | listdata:[], |
| | | ddd:{} |
| | | } |
| | |
| | | if (this.$route.name === 'ForInspectionDetail') this.showDetail = true |
| | | }, |
| | | methods: { |
| | | |
| | | async selectAll() { |
| | | const res = selectAll({ |
| | | type: 0 |
| | |
| | | this.commisionTable = res.data |
| | | }, |
| | | async handleClick(row) { |
| | | this.inspectionTable = row; |
| | | this.id = row.id |
| | | this.$router.push({ |
| | | name: 'Viewdetails', |
| | | query: { |
| | | id: row.id |
| | | } |
| | | }); |
| | | this.selectInspectsList() |
| | | // this.$router.push({ |
| | | // name: 'Viewdetails', |
| | | // query: { |
| | | // id: row.id |
| | | // } |
| | | // }); |
| | | this.$router.push(`Viewdetails/${row.id}`); |
| | | }, |
| | | // validateInput() { |
| | | // if (this.inputValue.trim() === '') { |
| | | // } |
| | | // }, // 输入值为空,弹出提示信息或进行其他处理 |
| | | // alert('输入值不能为空'); |
| | | // return; |
| | | |
| | | //版本库 |
| | | async chooseVer() { |
| | | const res = await chooseVer({ |
| | |
| | | name: this.tmp.name, |
| | | specifications: this.tmp.specifications |
| | | }) |
| | | this.BANben = res.data |
| | | this.aa = this.BANben[0] |
| | | this.BANben = [] |
| | | res.data.forEach(a=>{ |
| | | this.BANben.push('V ' + a) |
| | | }) |
| | | this.version = this.BANben[0] |
| | | this.lookProByVer() |
| | | }, |
| | | |
| | | //标准库 |
| | | async lookProByVer() { |
| | | const res = await lookProByVer({ |
| | | mcode: this.tmp.mcode, |
| | | name: this.tmp.name, |
| | | specifications: this.tmp.specifications, |
| | | version: this.aa |
| | | version: this.version.replace('V ', '') |
| | | }) |
| | | this.tableData = res.data |
| | | }, |
| | | ccc(val) { |
| | | this.aa = val |
| | | getProductVerison(val) { |
| | | this.version = val |
| | | this.lookProByVer() |
| | | }, |
| | | async selectInspectsList() { |
| | |
| | | pageSize: this.currentPage, |
| | | message: this.id |
| | | }) |
| | | // this.inspectionTable = data |
| | | 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 formTime = item["form_time"] |
| | | var startTime = item["start_time"] |
| | | var endTime = item["end_time"] |
| | | var checkdate = startTime + '~' + endTime |
| | | var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%d')"] |
| | | var createTime = item["create_time"] |
| | | item['formTime'] = formTime // 来料日期 |
| | | item['checkdate'] = checkdate // 检验日期 |
| | | item['createTime'] = createTime // 登记日期 |
| | |
| | | }) |
| | | var 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 formTime = item["form_time"] |
| | | var startTime = item["start_time"] |
| | | var endTime = item["end_time"] |
| | | var checkdate = startTime + '~' + endTime |
| | | var createTime = item["DATE_FORMAT(i"]["`create_time`,'%Y-%m-%d')"] |
| | | var createTime = item["create_time"] |
| | | item['formTime'] = formTime // 来料日期 |
| | | item['checkdate'] = checkdate // 检验日期 |
| | | item['createTime'] = createTime // 登记日期 |
| | |
| | | }) |
| | | this.rawMaterialTable = res.data |
| | | }) |
| | | |
| | | // this.infoForm = res.data |
| | | // this.$router.push({ name: 'ReportForInspection' }); |
| | | } else if (this.type === 1) { |
| | | this.commisionVisible = true |
| | | selectAll({ |
| | |
| | | supplier: this.infoForm.supplier, |
| | | type: this.type, |
| | | unit: this.infoForm.unit, |
| | | version:this.BANben[1] |
| | | version:this.version.replace('V ', '') |
| | | }).then(res=>{ |
| | | |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success' |
| | | }); |
| | | this.$router.push(`Viewdetails/${res.data}`) |
| | | }) |
| | | } |
| | | if (this.type === 1) { |
| | |
| | | supplier: this.commisionSelection.supplier, |
| | | type: this.type, |
| | | unit: this.commisionSelection.unit, |
| | | version:this.aa |
| | | |
| | | version:this.version |
| | | }) |
| | | } |
| | | if (this.type === 2) { |
| | |
| | | supplier: this.finishedTable.supplier, |
| | | type: this.type, |
| | | unit: this.finishedTable.unit, |
| | | version:this.aa |
| | | |
| | | version:this.version |
| | | }) |
| | | } |
| | | this.type = 0 |
| | |
| | | background: #fff; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 5px 24px 0px 24px; |
| | | padding: 20px 24px 0px 24px; |
| | | } |
| | | |
| | | .input-form { |
| | |
| | | <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="speName" label="规格型号" min-width="10%" > |
| | | <el-table-column prop="speName" label="规格型号" min-width="10%"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位" min-width="8%" /> |
| | | <el-table-column prop="samplesNumber" label="数量" min-width="8%" /> |
| | |
| | | experiment: [], |
| | | addway: '' |
| | | }, |
| | | experList: [{ |
| | | key: '1', |
| | | label: '外观检查' |
| | | }, { |
| | | key: '2', |
| | | label: '动作电压试验' |
| | | }, { |
| | | key: '3', |
| | | label: '电阻管泄漏电流试验' |
| | | }, { |
| | | key: '4', |
| | | label: '绝缘部分交流耐压试验' |
| | | }], |
| | | experList: [], |
| | | sampleoptions: [], |
| | | samplecodeoptions: [], |
| | | model_spe_options: [], |
| | |
| | | }, |
| | | 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] |
| | | } |
| | | this.addPointerForm.experiment = exper |
| | | let tmp = this.addPointerForm |
| | | this.sampleoptions.forEach(a => { |
| | | if (a.key == tmp.sampleName) tmp.sampleName = a.value |
| | | }) |
| | | tmp.speName = tmp.addway + '-' + tmp.speName |
| | | tmp.addway = 1 |
| | | this.detectionInfo.push(tmp) |
| | | this.dialogueFormVisible = false |
| | | this.addPointerForm = { |
| | |
| | | return item.name |
| | | }) |
| | | }) |
| | | this.model_sta_options.forEach(a=>{ |
| | | if(a.key == val){ |
| | | this.model_sta_options.forEach(a => { |
| | | if (a.key == val) { |
| | | this.addPointerForm.speName = a.value |
| | | } |
| | | }) |
| | |
| | | :data="inspectionTable" style="width: 100%" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" :selectable="checkSelect" min-width="5%"></el-table-column> |
| | | <el-table-column type="index" label="序号" min-width="8%" /> |
| | | <el-table-column prop="createTime" label="来料日期" min-width="8%" /> |
| | | <el-table-column prop="dateSurvey" label="来料日期" min-width="8%" /> |
| | | <el-table-column prop="supplierName" label="供应商名称" min-width="12%" /> |
| | | <el-table-column prop="materialCoding" label="材料编码" min-width="8%" /> |
| | | <el-table-column prop="materialName" label="材料名称" min-width="8%" /> |
| | |
| | | <el-table-column prop="quantity" label="数量" min-width="5%" /> |
| | | <el-table-column prop="inspectionDate" label="报检日期" min-width="8%" /> |
| | | <el-table-column prop="surveyor" label="检验人" min-width="8%" /> |
| | | <el-table-column prop="dateSurvey" label="检验日期" min-width="8%" /> |
| | | <el-table-column prop="insTime" label="检验日期" min-width="8%" /> |
| | | <el-table-column prop="type" label="状态" min-width="8%"> |
| | | <template slot-scope="scope"> |
| | | <span :style="{ color: scope.row.type === 1 ? 'green' : 'red' }"> |
| | |
| | | label: '未报检' |
| | | }], |
| | | radioValue: null, |
| | | inspectionTable: [{ |
| | | createTime: '2023-07-28', |
| | | supplier_name: '国网山东省电力有限公司', |
| | | materialCoding: 'BP214274', |
| | | materialName: '铝包钢绞线', |
| | | specificationsModels: 'JLHA/G1A-185/30-26/7', |
| | | unit: '吨', |
| | | quantity: 21, |
| | | dateSurvey: '2023-08-02', |
| | | surveyor: '黄小明', |
| | | inspectionDate: '2023-12-09', |
| | | condition: 1 |
| | | }], |
| | | inspectionTable: [], |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 20, |
| | |
| | | }); |
| | | }, |
| | | blurOptions(row) { |
| | | console.log("更新", row); |
| | | }, |
| | | async initNewSelection() { |
| | | const res = await selectUser(); |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | console.log(row.id); |
| | | this.deleteMaterialFun(row, index); |
| | | }).catch(() => {}); |
| | | }, |
| | |
| | | let name = this.checkData[0].materialName; |
| | | let specifications = this.checkData[0].specificationsModels; |
| | | this.getChooseVersionFun(mcode,name,specifications); |
| | | console.log(this.standardLibraryData); |
| | | this.addReportDialog = true; |
| | | } |
| | | } |
| | |
| | | specifications : specifications, |
| | | version: version |
| | | }).then((res)=>{ |
| | | console.log(res); |
| | | vm.standardLibraryData = res.data; |
| | | }) |
| | | |
| | |
| | | //生成报检单 |
| | | async createReport(param) { |
| | | let res = await addInspect(param); |
| | | const res2 = await selectInspectsListById({ |
| | | id: res.data |
| | | }); |
| | | this.resultData = res2.data; |
| | | this.inspectionForm = res2.data; |
| | | this.inspectionItems = res2.data.insProducts; |
| | | if(res.data==null)return |
| | | this.$message.success('报检成功') |
| | | this.$router.push(`/experiment/Viewdetails/${res.data}`) |
| | | }, |
| | | // 获取分页列表数据 |
| | | async getRawMaterialList() { |