modified: src/api/inspection/commisioninspection.js
modified: src/views/inspectionManagement/commissionInspection/index.vue
modified: src/views/inspectionManagement/reportForInspection/index.vue
| | |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | //新增报检单 |
| | | export function addInspect(data){ |
| | | return request({ |
| | | url: '/link-basic-table/addInspect', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | <el-table-column prop="entrusted" label="委托单位" min-width="12%" /> |
| | | <el-table-column prop="samples_number" label="样品数量" min-width="8%" /> |
| | | <el-table-column prop="sample_name" label="样品名称" min-width="8%" /> |
| | | <el-table-column prop="specifications_models" label="规格型号" min-width="12%" /> |
| | | <el-table-column prop="speName" label="规格型号" min-width="12%" /> |
| | | <el-table-column prop="inspectionTime" label="送样时间" min-width="8%" /> |
| | | <el-table-column prop="completionDeadline" label="完成期限" min-width="8%" /> |
| | | <el-table-column prop="contacts" label="委托编制人" min-width="8%" /> |
| | |
| | | selectViewUUID, |
| | | delLink, |
| | | chooseVersion, |
| | | lookProByVer |
| | | lookProByVer, |
| | | addInspect |
| | | } from '@/api/inspection/commisioninspection' |
| | | export default { |
| | | data() { |
| | |
| | | confirmBtn(formName) { |
| | | this.$refs[formName].validate((valid)=>{ |
| | | if(valid){ |
| | | // let dateArr = this.addInspectionForm.inspectionDate; |
| | | // //添加报检单 |
| | | // let val = this.checkData[0]; |
| | | // let obj = { |
| | | // "endTime": dateArr[1], |
| | | // "experiment": "", |
| | | // "formTime": val.createTime, |
| | | // "id": val.id, |
| | | // "mcode": val.materialCoding, |
| | | // "name": val.materialName, |
| | | // "num": val.quantity, |
| | | // "specifications": val.specificationsModels, |
| | | // "startTime": dateArr[0], |
| | | // "supplier": val.supplierName, |
| | | // "type": val.type, |
| | | // "unit": val.unit, |
| | | // "version": this.addInspectionForm.version |
| | | // } |
| | | // // this.createReport(obj); |
| | | // this.addReportDialog = false; |
| | | // this.initNewSelection(); |
| | | // this.showNewPage = true; |
| | | let dateArr = this.addInspectionForm.inspectionDate; |
| | | //添加报检单 |
| | | let val = this.checkData[0]; |
| | | let obj = { |
| | | "endTime": dateArr[1], |
| | | "mcode":"mcode", |
| | | "formTime": val.inspectionTime, |
| | | "id": val.id, |
| | | "name": val.sample_name, |
| | | "num": val.samples_number, |
| | | "specifications": val.speName, |
| | | "startTime": dateArr[0], |
| | | "supplier": val.entrusted, |
| | | "type": 2, |
| | | "version": this.addInspectionForm.version |
| | | } |
| | | this.createReport(obj); |
| | | this.addReportDialog = false; |
| | | } |
| | | }); |
| | | }, |
| | | //生成报检单请求 |
| | | async createReport(param) { |
| | | let res = await addInspect(param); |
| | | if(res.data==null)return |
| | | this.$message.success('报检成功') |
| | | this.$router.push(`/experiment/Viewdetails/${res.data}`) |
| | | }, |
| | | //生成报检单按钮 |
| | | addReportBtn() { |
| | |
| | | } else { |
| | | let mcode = this.checkData[0].entrust_coding; |
| | | let name = this.checkData[0].sample_name; |
| | | let specifications = this.checkData[0].specifications_models; |
| | | let specifications = this.checkData[0].speName; |
| | | let id = this.checkData[0].id; |
| | | this.getChooseVersionFun(mcode,name,specifications,id); |
| | | this.addReportDialog = true; |
| | |
| | | changeVersionFun(){ |
| | | let mCode = this.checkData[0].entrust_coding; |
| | | let name = this.checkData[0].sample_name; |
| | | let specifications = this.checkData[0].specifications_models; |
| | | let specifications = this.checkData[0].speName; |
| | | let version = this.addInspectionForm.version; |
| | | let id = this.checkData[0].id; |
| | | this.getProByVersion(mCode,name,specifications,version,id); |
| | |
| | | var vm = this; |
| | | this.chooseVersion = []; |
| | | await chooseVersion({ |
| | | mcode : mCode, |
| | | id : id, |
| | | name : name, |
| | | specifications : specifications |
| | | }).then((res)=>{ |
| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div class="rawPage" v-if="!showNewPage"> |
| | | <div class="rawPage"> |
| | | <div class="top-bar"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | | <el-form-item label="材料编码:" position="left" class="sermargin"> |
| | |
| | | <el-button type="primary" @click="confirmBtn('addInspectionForm')">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 生成报检单 --> |
| | | <div class="newPage" v-if="showNewPage"> |
| | | <!-- 新增页面 --> |
| | | <div class="inspectionForm"> |
| | | <el-form :model="inspectionForm" label-position="right" label-width="100px" size="mini"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="来料日期:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.formTime" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.supplier" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="样品编号:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.code" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="样品名称:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.name" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.specifications" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="单位:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.unit" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="8"> |
| | | <el-form-item label="数量:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.num" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报检日期:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.endTime" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报检人:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.userName" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <div class="header"> |
| | | <span style="font-size: 14px">检验项目</span> |
| | | <div> |
| | | <!-- <el-button type="primary" plain size="mini">保存</el-button> --> |
| | | <el-button @click="showNewPage = false" type="primary" plain size="mini" icon="el-icon-back">返回</el-button> |
| | | </div> |
| | | </div> |
| | | <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="inspectionItems"> |
| | | <el-table-column type="index" label="序号" width="60"></el-table-column> |
| | | <el-table-column prop="name" label="项目" width="250"></el-table-column> |
| | | <el-table-column prop="unit" label="单位" width="125"></el-table-column> |
| | | <el-table-column prop="required" label="标准值" width="125"></el-table-column> |
| | | <el-table-column prop="internal" label="内测值" width="125"></el-table-column> |
| | | <el-table-column prop="testValue" label="检验值" width="125"></el-table-column> |
| | | <el-table-column prop="userName" label="检验人"> |
| | | <template slot-scope="scope"> |
| | | <el-select @blur="blurOptions(scope.row)" v-model="scope.row.check" size="small" slot="append" |
| | | style="width: 260px;"> |
| | | <el-option v-for="(item,index) in checkeroptions" :key="index" :value="item.id" |
| | | :label="item.name"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="device" label="试验设备"> |
| | | <template slot-scope="scope"> |
| | | <el-select @blur="blurOptions(scope.row)" v-model="scope.row.device" size="small" slot="append" |
| | | style="width: 260px;"> |
| | | <el-option v-for="(item,index) in deviceoptions" :key="index" :value="item.id" |
| | | :label="item.equipmentName"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | return { |
| | | standardLibraryData:[], |
| | | chooseVersion: [], |
| | | userName: "", |
| | | devices: "", |
| | | addInspectionForm: { |
| | | inspectionDate: [], |
| | | version: null |
| | |
| | | value: 0, |
| | | label: '未报检' |
| | | }], |
| | | deviceoptions: [{ |
| | | value: 0, |
| | | label: '拉力机' |
| | | }, { |
| | | value: 1, |
| | | label: '拖拉机' |
| | | }], |
| | | checkeroptions: [{ |
| | | value: 0, |
| | | label: '黄小明' |
| | | }, { |
| | | value: 1, |
| | | label: '张三' |
| | | }], |
| | | radioOptions: [{ |
| | | label: '全部', |
| | | value: null |
| | |
| | | pageSize: 10, |
| | | total: 20, |
| | | data: '', |
| | | showNewPage: false, |
| | | inspectionForm: {}, |
| | | inspectionItems: [{ |
| | | index: 1, |
| | | name: "aaa", |
| | | unit: "KB", |
| | | required: "1", |
| | | internal: "2", |
| | | testValue: "3", |
| | | userName: "", |
| | | device: "" |
| | | }], |
| | | insertRule: { |
| | | fromDate: [{ |
| | | required: true, |
| | |
| | | }).catch(error => { |
| | | this.$message.error(error.message); |
| | | }); |
| | | }, |
| | | blurOptions(row) { |
| | | }, |
| | | async initNewSelection() { |
| | | const res = await selectUser(); |
| | | const res2 = await selectEquipment(); |
| | | this.checkeroptions = res.data; |
| | | this.deviceoptions = res2.data; |
| | | }, |
| | | resetForm(formName) { |
| | | this.addInspectionForm.inspectionDate = [], |
| | |
| | | "unit": val.unit, |
| | | "version": this.addInspectionForm.version |
| | | } |
| | | // this.createReport(obj); |
| | | this.createReport(obj); |
| | | this.addReportDialog = false; |
| | | this.initNewSelection(); |
| | | this.showNewPage = true; |
| | | } |
| | | })); |
| | | }, |