| | |
| | | <h2 v-else>编辑-原材料检验</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button @click="save()" type="primary" v-if="this.dataForm.id==null">保存</el-button> |
| | | <el-button @click="save()" type="primary" v-if="dataForm.id==null">保存</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="零件号" prop="code"> |
| | | <el-input v-model="dataForm.code" disabled> |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | :disabled="resultVal!=null && dataForm.id!=null" |
| | | @click="queryCode"></el-button> |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-full-screen" |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div class="rawMaterial-detail"> |
| | | <div> |
| | | <el-tabs class="rawMaterial-detail" @tab-click="tabsClick"> |
| | | <el-tab-pane label="检验项目"> |
| | | <el-row style="width:100%;z-index: 10;height:50px;"> |
| | | <el-col :xs="12" :lg="15">检验项目</el-col> |
| | | <el-col :xs="4" :lg="3" style="text-align: right;"> |
| | | <el-col :xs="12" :lg="18"></el-col> |
| | | <el-col :xs="4" :lg="2" style="text-align: right;"> |
| | | <el-button v-if="dataForm.id==null" size="small" @click="clickAddLine()">添加检验项目</el-button> |
| | | </el-col> |
| | | <el-col :xs="4" :lg="3" style="text-align: right;"> |
| | | <el-col :xs="4" :lg="2" style="text-align: right;"> |
| | | <el-button class="pad-addcol-btn" v-if="resultVal==null || dataForm.id==null" size="small" @click="addTeatValueColumn()">添加检测值列</el-button> |
| | | </el-col> |
| | | <el-col :xs="4" :lg="3" style="text-align: right;"> |
| | | <el-col :xs="4" :lg="2" style="text-align: right;"> |
| | | <el-button v-if="resultVal==null || dataForm.id==null" size="small" @click="delTeatValueColumn()">删除检测值列</el-button> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-table> |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="附件上传" type="card"> |
| | | <div style="display: flex;justify-content:flex-end;"> |
| | | <div></div> |
| | | </div> |
| | | <div |
| | | v-loading="progrecessFileLoading" |
| | | element-loading-text="请稍等,文件上传中" |
| | | > |
| | | <el-upload |
| | | drag |
| | | ref="upload" |
| | | action="/mes/rawInsProduct/upload" |
| | | :auto-upload="true" |
| | | :headers="headers" |
| | | :before-upload="submitUpload" |
| | | :on-success="uploadSuccess" |
| | | :data="paramData" |
| | | :with-credentials="true" |
| | | :show-file-list="false" |
| | | > |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"> |
| | | 将文件拖到此处,或<em>点击上传</em> |
| | | </div> |
| | | </el-upload> |
| | | </div> |
| | | |
| | | <el-table :data="processConfigFileTableData" height="260px"> |
| | | <el-table-column |
| | | prop="rawInsNo" |
| | | align="center" |
| | | label="原材料检验编号" |
| | | show-overflow-tooltip |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="originalFileName" |
| | | align="center" |
| | | label="原文件名" |
| | | width="200" |
| | | ></el-table-column> |
| | | <el-table-column prop="fileName" align="center" label="文件后缀"></el-table-column> |
| | | <el-table-column prop="createUser" align="center" label="上传人"></el-table-column> |
| | | <el-table-column |
| | | prop="createTime" |
| | | align="center" |
| | | label="上传时间" |
| | | show-overflow-tooltip |
| | | ></el-table-column> |
| | | <el-table-column prop="updateUser" align="center" label="更新人"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="updateTime" |
| | | align="center" |
| | | label="更新时间" |
| | | show-overflow-tooltip |
| | | ></el-table-column> |
| | | <el-table-column align="center" label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="delProcessConfigFile(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | :disabled="resultVal!=null" |
| | | >删除</el-button |
| | | > |
| | | <el-button |
| | | @click="downloadProcessConfigFile(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | >下载</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | <div class="rawMaterial-result"> |
| | | <el-row> |
| | |
| | | getObj, |
| | | updateRawInsProduct, |
| | | updateRawInspectsById, |
| | | getProcessConfigFiles, |
| | | deleteProcessConfigFile, |
| | | updateDeviceById, chooseIFS} from '@/api/quality/rawMaterial' |
| | | import rawMaterialPartDialog from '@/views/common/rawMaterial-part' |
| | | import { getStore } from '@/util/store' |
| | | import qrCodeApp from '@/views/common/qrCodeApp' |
| | | export default { |
| | | components:{ |
| | |
| | | computed:{}, |
| | | data(){ |
| | | return{ |
| | | progrecessFileLoading: false, |
| | | processConfigFileTableData: [], |
| | | fileList: [], |
| | | headers: { |
| | | Authorization: 'Bearer ' + getStore({ name: 'access_token' }) |
| | | }, |
| | | paramData: { |
| | | rawInsNo: '', |
| | | lineNumber: '' |
| | | }, |
| | | row: null, |
| | | proIndex: 0, |
| | | deviceCode: false, |
| | |
| | | }, |
| | | }, |
| | | methods:{ |
| | | tabsClick(tab,even){ |
| | | if(tab.index == 1){ |
| | | this.getConfigFiles(); |
| | | } |
| | | }, |
| | | getConfigFiles() { |
| | | const param = { |
| | | rawInsNo: this.dataForm.rawInsNo, |
| | | lineNumber: this.dataForm.id |
| | | } |
| | | getProcessConfigFiles(param).then((res) => { |
| | | this.processConfigFileTableData = res.data.data |
| | | }) |
| | | }, |
| | | downloadProcessConfigFile(row) { |
| | | // downloadProcessConfigFile( |
| | | // row.fileName, |
| | | // row.bucketName, |
| | | // row.originalFileName |
| | | // ) |
| | | }, |
| | | delProcessConfigFile(row) { |
| | | this.$confirm('是否删除该附件', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | closeOnClickModal: false |
| | | }) |
| | | .then(function() { |
| | | return deleteProcessConfigFile(row.id) |
| | | }) |
| | | .then((data) => { |
| | | this.getConfigFiles() |
| | | }) |
| | | }, |
| | | submitUpload() { |
| | | this.paramData.rawInsNo = this.dataForm.rawInsNo |
| | | this.paramData.lineNumber = this.dataForm.id |
| | | this.progrecessFileLoading = true |
| | | }, |
| | | uploadSuccess() { |
| | | this.progrecessFileLoading = false |
| | | this.getConfigFiles() |
| | | }, |
| | | cancelDeviceCodeDialog(){ |
| | | this.deviceCode = false |
| | | }, |
| | |
| | | this.proIndex=index |
| | | }, |
| | | getResultInfo(data){ |
| | | console.log("扫描后执行",data); |
| | | if(!data.includes("part_no")){ |
| | | this.$message({ |
| | | message: '未识别出二位码零件信息!', |
| | |
| | | <style> |
| | | .rawMaterial-detail { |
| | | width: 100%; |
| | | height: 470px; |
| | | height: 530px; |
| | | padding: 10px 20px; |
| | | display: flex; |
| | | border: 1px solid #ddd; |
| | | background-color: #fff; |
| | | margin-top: 10px; |
| | | box-sizing: border-box; |
| | | flex-wrap: wrap; |
| | | /* display: flex; |
| | | flex-wrap: wrap; */ |
| | | } |
| | | |
| | | .rawMaterial-result { |