| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div class="rawPage" v-if="!showNewPage"> |
| | | <div class="top-bar"> |
| | | <el-form ref="form" :inline="true" :model="searchData"> |
| | | <el-form-item label="材料编码:" class="sermargin"> |
| | | <el-form-item label="材料编码:" position="left" class="sermargin"> |
| | | <el-input |
| | | v-model="searchData.code" |
| | | class="input-form" |
| | |
| | | </el-input> |
| | | </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> |
| | | </div> |
| | | <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 v-model="radioValue" @change="radioclick"> |
| | | <el-radio-button v-for="option in radioOptions" :key="option.value" :label="option.value">{{ option.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-button @click="showNewPage = true" type="primary" size="mini" icon="el-icon-document" style="background-color: rgb(1, 102, 226);">生成报检单</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table-box"> |
| | |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | label="" |
| | | min-width="10%" |
| | | /> |
| | | <el-table-column |
| | |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="date" |
| | | prop="createTime" |
| | | label="来料日期" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="providerName" |
| | | prop="supplierName" |
| | | label="供应商名称" |
| | | min-width="12%" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | prop="materialCoding" |
| | | label="材料编码" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="name" |
| | | prop="materialName" |
| | | label="材料名称" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="modelandspecification" |
| | | prop="specificationsModels" |
| | | label="规格型号" |
| | | min-width="12%" |
| | | /> |
| | |
| | | min-width="5%" |
| | | /> |
| | | <el-table-column |
| | | prop="amount" |
| | | prop="quantity" |
| | | label="数量" |
| | | min-width="5%" |
| | | /> |
| | | <el-table-column |
| | | prop="commisiondate" |
| | | prop="inspectionDate" |
| | | label="报检日期" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="person" |
| | | prop="surveyor" |
| | | label="检验人" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="checkdate" |
| | | prop="dateSurvey" |
| | | label="检验日期" |
| | | min-width="8%" |
| | | /> |
| | | <el-table-column |
| | | prop="state" |
| | | prop="condition" |
| | | label="状态" |
| | | min-width="8%" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span :style="{ color: scope.row.state === '已检测' ? 'green' : 'red' }"> |
| | | {{ scope.row.state }} |
| | | <span :style="{ color: scope.row.condition === 1 ? 'green' : 'red' }"> |
| | | {{ scope.row.condition === 1 ? '已检测':'未检测' }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :page-size="100" |
| | | :page-sizes="[5, 10, 15, 20]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="400"> |
| | | :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 生成报检单 --> |
| | | <div class="newPage" v-if="showNewPage"> |
| | | <!-- 新增页面 --> |
| | | <div class="inspectionForm"> |
| | | <el-form :model="inspectionForm" ref="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.createTime" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.supplier_name" disabled autocomplete="off" /> </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="样品编号:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.materialCoding" 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.materialName" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.specificationsModels" 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.quantity" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报检日期:" > |
| | | <el-input style="width: 180px;" :value="inspectionForm.dateSurvey" disabled autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="报检人:"> |
| | | <el-input style="width: 180px;" :value="inspectionForm.surveyor" 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="project" label="项目" width="250"></el-table-column> |
| | | <el-table-column prop="unit" label="单位" width="125"></el-table-column> |
| | | <el-table-column prop="standardVal" label="标准值" width="125"></el-table-column> |
| | | <el-table-column prop="controlVal" label="内测值" width="125"></el-table-column> |
| | | <el-table-column prop="detectionVal" label="检验值" width="125"></el-table-column> |
| | | <el-table-column prop="checker" label="检验人"> |
| | | <template slot-scope="scope"> |
| | | <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-column prop="device" label="试验设备"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.device" size="small" slot="append" style="width: 260px;"> |
| | | <el-option v-for="item in deviceoptions" :key="item.value" :label="item.label">{{ item.label }}</el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getRawMaterialList } from '@/api/inspection/rawmaterial' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | date: '' |
| | | }, |
| | | options: [{ |
| | | value: '1', |
| | | label: '部门1' |
| | | value: 0, |
| | | label: '全部' |
| | | }, { |
| | | value: '2', |
| | | label: '部门2' |
| | | value: 1, |
| | | label: '已检验' |
| | | }, { |
| | | value: '3', |
| | | label: '部门3' |
| | | value: 2, |
| | | label: '待检验' |
| | | }], |
| | | radioValue: '', |
| | | deviceoptions:[{ |
| | | value: 0, |
| | | label: '拉力机' |
| | | },{ |
| | | value: 1, |
| | | label: '拖拉机' |
| | | }], |
| | | checkeroptions:[{ |
| | | value: 0, |
| | | label: '黄小明' |
| | | },{ |
| | | value: 1, |
| | | label: '张三' |
| | | }], |
| | | radioOptions:[{ |
| | | label: '全部', |
| | | value: 0 |
| | | },{ |
| | | value: 1, |
| | | label: '已检验' |
| | | },{ |
| | | value: 2, |
| | | label: '待检验' |
| | | }], |
| | | radioValue: 0, |
| | | inspectionTable: [{ |
| | | date: '2023-07-28', |
| | | providerName: '国网山东省电力有限公司', |
| | | code: 'BP214274', |
| | | name: '铝包钢绞线', |
| | | modelandspecification: 'JLHA/G1A-185/30-26/7', |
| | | createTime: '2023-07-28', |
| | | supplier_name: '国网山东省电力有限公司', |
| | | materialCoding: 'BP214274', |
| | | materialName: '铝包钢绞线', |
| | | specificationsModels: 'JLHA/G1A-185/30-26/7', |
| | | unit: '吨', |
| | | amount: '21', |
| | | commisiondate: '2023-08-02', |
| | | person: '黄小明', |
| | | checkdate: '2023-12-09', |
| | | state: '已检测' |
| | | }, { |
| | | date: '2023-07-28', |
| | | providerName: '国网山东省电力有限公司', |
| | | code: 'BP214274', |
| | | name: '铝包钢绞线', |
| | | modelandspecification: 'JLHA/G1A-185/30-26/7', |
| | | unit: '吨', |
| | | amount: '21', |
| | | commisiondate: '2023-08-02', |
| | | person: '黄小明', |
| | | checkdate: '2023-12-09', |
| | | state: '待检测' |
| | | }, { |
| | | date: '2023-07-28', |
| | | providerName: '国网山东省电力有限公司', |
| | | code: 'BP214274', |
| | | name: '铝包钢绞线', |
| | | modelandspecification: 'JLHA/G1A-185/30-26/7', |
| | | unit: '吨', |
| | | amount: '21', |
| | | commisiondate: '2023-08-02', |
| | | person: '黄小明', |
| | | checkdate: '2023-12-09', |
| | | state: '已检测' |
| | | }, { |
| | | date: '2023-07-28', |
| | | providerName: '国网山东省电力有限公司', |
| | | code: 'BP214274', |
| | | name: '铝包钢绞线', |
| | | modelandspecification: 'JLHA/G1A-185/30-26/7', |
| | | unit: '吨', |
| | | amount: '21', |
| | | commisiondate: '2023-08-02', |
| | | person: '黄小明', |
| | | checkdate: '2023-12-09', |
| | | state: '待检测' |
| | | quantity: 21, |
| | | dateSurvey: '2023-08-02', |
| | | surveyor: '黄小明', |
| | | inspectionDate: '2023-12-09', |
| | | condition: 1 |
| | | }], |
| | | currentPage: 0 |
| | | currentPage: 1, |
| | | pageSize: 5, |
| | | total:20, |
| | | data: '', |
| | | showNewPage: false, |
| | | inspectionForm:{ |
| | | 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', |
| | | }, |
| | | inspectionItems:[{ |
| | | project:'导线外径', |
| | | unit: 'mm', |
| | | standardVal: '30.0', |
| | | controlVal: '30.0', |
| | | detectionVal: '30.0', |
| | | device:'', |
| | | checker: '', |
| | | },{ |
| | | project:'导线外径', |
| | | unit: 'mm', |
| | | standardVal: '30.0', |
| | | controlVal: '30.0', |
| | | detectionVal: '30.0', |
| | | device:'', |
| | | checker: '' |
| | | },{ |
| | | project:'导线外径', |
| | | unit: 'mm', |
| | | standardVal: '30.0', |
| | | controlVal: '30.0', |
| | | detectionVal: '30.0', |
| | | device:'', |
| | | checker: '' |
| | | },{ |
| | | project:'导线外径', |
| | | unit: 'mm', |
| | | standardVal: '30.0', |
| | | controlVal: '30.0', |
| | | detectionVal: '30.0', |
| | | device:'', |
| | | checker: '' |
| | | },{ |
| | | project:'导线外径', |
| | | unit: 'mm', |
| | | standardVal: '30.0', |
| | | controlVal: '30.0', |
| | | detectionVal: '30.0', |
| | | device:'', |
| | | checker: '' |
| | | },{ |
| | | project:'导线外径', |
| | | unit: 'mm', |
| | | standardVal: '30.0', |
| | | controlVal: '30.0', |
| | | detectionVal: '30.0', |
| | | device:'', |
| | | checker: '' |
| | | }] |
| | | } |
| | | }, |
| | | created(){ |
| | | this.getRawMaterialList() |
| | | }, |
| | | methods: { |
| | | // 获取分页列表数据 |
| | | async getRawMaterialList(){ |
| | | const res = await getRawMaterialList({pageNo: this.currentPage,pageSize:this.pageSize}) |
| | | // console.log(res) |
| | | this.inspectionTable = res.data.row |
| | | this.data = res.data.row |
| | | this.total = res.data.total |
| | | }, |
| | | async search(){ |
| | | this.radioValue = this.searchData.state |
| | | const res = await getRawMaterialList({condition: this.searchData.state, |
| | | createTime:this.searchData.date, |
| | | materialCoding:this.searchData.code, |
| | | materialName: this.searchData.name, |
| | | pageNo: this.currentPage, |
| | | pageSize: this.pageSize |
| | | }) |
| | | // console.log(res) |
| | | this.inspectionTable = res.data.row |
| | | this.data = res.data.row |
| | | this.total = res.data.total |
| | | }, |
| | | reset(){ |
| | | this.searchData = { |
| | | code: '', |
| | | name: '', |
| | | state: '', |
| | | date: '' |
| | | } |
| | | this.getRawMaterialList() |
| | | }, |
| | | radioclick(){ |
| | | this.searchData.state = this.radioValue |
| | | // console.log(this.radioValue) |
| | | this.inspectionTable = this.data.filter((item)=>{ |
| | | return item.condition === this.radioValue |
| | | }) |
| | | if(this.radioValue === 0){ |
| | | this.inspectionTable = this.data |
| | | } |
| | | this.total = this.inspectionTable.length |
| | | }, |
| | | // 每页条数改变时触发 选择一页显示多少行 |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`) |
| | | this.currentPage = 1 |
| | | this.pageSize = val |
| | | this.getRawMaterialList({pageNo: this.currentPage,pageSize:this.pageSize}) |
| | | }, |
| | | // 当前页改变时触发 跳转其他页 |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`) |
| | | this.currentPage = val |
| | | this.getRawMaterialList({pageNo: this.currentPage,pageSize:this.pageSize}) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .top-bar{ |
| | | .content-main{ |
| | | height: 100%; |
| | | .top-bar{ |
| | | margin: -25px -15px; |
| | | background: #fff; |
| | | display: flex; |
| | |
| | | color: red; |
| | | } |
| | | |
| | | .newPage{ |
| | | margin: -25px -15px; |
| | | .inspectionForm{ |
| | | background-color:#fff; |
| | | .formwrapper{ |
| | | margin-left: 80px; |
| | | padding:10px 0px; |
| | | } |
| | | } |
| | | .inspectionProject{ |
| | | margin:10px 0px; |
| | | .header{ |
| | | display:flex; |
| | | justify-content: space-between; |
| | | padding-top: -3px; |
| | | padding-bottom: 3px; |
| | | } |
| | | .el-table{ |
| | | padding: 10px 10px; |
| | | height: 65vh; |
| | | overflow-y: auto; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | </style> |