Merge branch 'master' of http://192.168.0.22:9001/r/mom-before
| | |
| | | chooseFather: "/technology/chooseFather",//获取工序列表 |
| | | chooseDevice: "/technology/chooseDevice",//获取设备组列表 |
| | | addTechnology: "/technology/add",//添加工艺路线 |
| | | leftAddOneTwo: "/material/add",//左侧新增1,2级 |
| | | leftAddThree: "/standard/add",//左侧三级新增 |
| | | leftAddFour: "/specifications/add",//左侧四级新增 |
| | | // 技术管理-技术文件 |
| | | selectAllOrder: "/orders/selectAllOrder", //查询所有订单列表 |
| | | selectOrderById: "/orders/selectOrderById", //根据订单id查询订单详情 |
| | |
| | | projectListByfinishId: "/inspection-item/list_user", //根据id查询所有项目 |
| | | |
| | | } |
| | | |
| | | // 过程检验 |
| | | const processInspection = { |
| | | selectProcessInspectsList: "/processInspect/selectProcessInspectsList", // 分页查询过程检验单列表 |
| | | } |
| | | // QMS实验室管理 |
| | | const laboratory = { |
| | | delDeviceById:"/device/delDeviceById",//删除 |
| | |
| | | ...dispose, |
| | | ...Basicdata, |
| | | ...unRawInspects, |
| | | ...processInspection, |
| | | // ...gettable, |
| | | selectSaleList: "sale/selectSaleList", //查询销售单列表 |
| | | selectSaleDatilById: "sale/selectSaleDatilById", //根据销售单id查看详情, |
| | |
| | | </el-card> |
| | | </div> |
| | | <el-dialog title="提示" :visible.sync="dialogVisible" width="30%"> |
| | | <el-form label-width="130px"> |
| | | <el-form label-width="130px" style="height: 500px; overflow: auto ;"> |
| | | <el-empty |
| | | v-if="updateEditList.length == 0" |
| | | :image-size="200" |
| | | ></el-empty> |
| | | <div v-for="item in updateEditList" :key="item.$index"> |
| | | <el-form-item |
| | | :label=" |
| | |
| | | <el-row> |
| | | <el-col :span="12">过程检验</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button @click="handleAddNew" type="primary" size="mini" icon="el-icon-plus" style="background: #004EA2; ">新增</el-button> |
| | | <el-button icon="el-icon-delete" size="mini">删除</el-button> |
| | | <el-button |
| | | @click="handleAddNew" |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-plus" |
| | | style="background: #004EA2; " |
| | | >新增</el-button |
| | | > |
| | | <el-button icon="el-icon-download" size="mini">导出</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="nav"> |
| | | <span>检验结果:</span> |
| | | <el-select v-model="inspectionResult" size="small" placeholder="请选择" style="width: 224px;margin-right: 52px;"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | <span>检验状态:</span> |
| | | <el-select |
| | | size="small" |
| | | v-model="search.result" |
| | | placeholder="请选择检测状态" |
| | | style="width: 224px;margin-right: 52px;" |
| | | > |
| | | <el-option :value="''" label="全部"></el-option> |
| | | <el-option :value="1" label="已检测"></el-option> |
| | | <el-option :value="2" label="待检测"></el-option> |
| | | </el-select> |
| | | <span>检验日期:</span> |
| | | <el-date-picker |
| | | v-model="inspectionDate" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | style="margin-right: 52px"> |
| | | </el-date-picker> |
| | | <span>检验人:</span> |
| | | <el-select v-model="inspecter" size="small" placeholder="请选择" style="width: 224px;margin-right: 52px;"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <span>产品名称:</span> |
| | | <el-input |
| | | size="small" |
| | | style="width: 224px;margin-right: 30px;" |
| | | v-model="search.name" |
| | | placeholder="请输入产品名称" |
| | | ></el-input> |
| | | <span>工序:</span> |
| | | <el-input |
| | | size="small" |
| | | style="width: 224px;margin-right: 30px;" |
| | | v-model="search.techfather" |
| | | placeholder="请输入工序" |
| | | ></el-input> |
| | | <el-button size="mini"><span>重 置</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;"><span>查 询</span></el-button> |
| | | <el-button size="mini" type="primary" style="background: #004EA2;" |
| | | ><span>查 询</span></el-button |
| | | > |
| | | </div> |
| | | <div class="content-body"> |
| | | <div class="inspectionTable"> |
| | | <el-table |
| | | ref="inspectionTable" |
| | | :height="400" |
| | | :max-height="400" |
| | | height="calc(100vh - 320px)" |
| | | :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :header-cell-style="{ |
| | | border: '0px', |
| | | background: '#f5f7fa', |
| | | color: '#606266', |
| | | boxShadow: 'inset 0 1px 0 #ebeef5', |
| | | textAlign: 'center' |
| | | }" |
| | | border |
| | | :data="inspectionTable" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column |
| | | type="selection" |
| | | width="50"> |
| | | </el-table-column> |
| | | label="序号" |
| | | type="index" |
| | | width="60" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="number" |
| | | label="订单号" |
| | | min-width="100" |
| | | prop="order_number" |
| | | label="订单编号" |
| | | min-width="90" |
| | | /> |
| | | <el-table-column prop="material" label="产品名称" min-width="80" /> |
| | | <el-table-column |
| | | prop="username" |
| | | label="客户名称" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="projectname" |
| | | label="工程名称" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | prop="tracenumber" |
| | | label="质量追溯号" |
| | | min-width="108" |
| | | /> |
| | | <el-table-column |
| | | prop="code" |
| | | label="产品编码" |
| | | min-width="100" |
| | | /> |
| | | <el-table-column |
| | | prop="class" |
| | | label="产品大类" |
| | | min-width="72" |
| | | /> |
| | | <el-table-column |
| | | prop="specificationmodel" |
| | | prop="specifications_model" |
| | | label="规格型号" |
| | | min-width="110" |
| | | /> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="单位" |
| | | min-width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="quantity" |
| | | label="数量" |
| | | min-width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="machine" |
| | | label="机台" |
| | | min-width="60" |
| | | /> |
| | | <el-table-column prop="techfather" label="工序" min-width="70" /> |
| | | <el-table-column prop="techname" label="工艺名称" min-width="70" /> |
| | | <el-table-column prop="unit" label="单位" min-width="50" /> |
| | | <el-table-column prop="quantity" label="数量" min-width="50" /> |
| | | <el-table-column |
| | | prop="group" |
| | | label="班组" |
| | | min-width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="worker" |
| | | label="主机工" |
| | | prop="createTime" |
| | | label="报检日期" |
| | | min-width="60" |
| | | /> |
| | | <el-table-column prop="name" label="报检人" min-width="50" /> |
| | | <el-table-column |
| | | prop="date" |
| | | label="检验日期" |
| | | min-width="80" |
| | | prop="updateTime" |
| | | label="检测日期" |
| | | min-width="60" |
| | | /> |
| | | <el-table-column |
| | | prop="result" |
| | | label="检测结果" |
| | | min-width="80" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | min-width="80" |
| | | > |
| | | <el-table-column prop="result" label="合格状态" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="handleClick(scope.row)">查看</el-button> |
| | | <el-button type="text" size="small" style="margin-left: 0;">打印</el-button> |
| | | <span style="color: #34BD66;" v-if="scope.row.result == 1" |
| | | >合格</span |
| | | > |
| | | <span style="color: #E84738;" v-else-if="scope.row.result == 0" |
| | | >不合格</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" style="margin-left: 0;" |
| | | >详情</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | size="small" |
| | | @click="handleClick(scope.row)" |
| | | >查看</el-button |
| | | > |
| | | <el-button type="text" size="small" style="margin-left: 0;" |
| | | >编辑</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <!-- 分页器 --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | :current-page="currentPage" |
| | | :page-sizes="[100, 200, 300, 400]" |
| | | :current-page="1" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="this.inspectionTable.length" |
| | | :total="inspectionTableTotal" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | |
| | | <el-col :span="12">新增过程检验单</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <!-- 点击返回,当前页面值为false --> |
| | | <el-button @click="showAddPage = false" type="primary" size="mini" icon="el-icon-back" style="background: #004EA2; ">返回</el-button> |
| | | <el-button |
| | | type="primary" |
| | | size="mini" |
| | | style="background: #004EA2; " |
| | | icon="el-icon-circle-plus-outline" |
| | | >新增</el-button |
| | | > |
| | | <el-button |
| | | @click="showAddPage = false" |
| | | type="primary" |
| | | size="mini" |
| | | icon="el-icon-back" |
| | | style="background: #004EA2; " |
| | | >返回</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | <el-form :model="addInspectionform" ref="addInspectionform" class="addInspectionform" label-position="left" label-width="100px" size="mini" > |
| | | <el-form |
| | | :model="addInspectionform" |
| | | ref="addInspectionform" |
| | | class="addInspectionform" |
| | | label-position="right" |
| | | label-width="120px" |
| | | size="small" |
| | | > |
| | | <div class="formwrapper"> |
| | | <el-row :gutter="450"> |
| | | <el-col :span="5"> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="订单号:"> |
| | | <el-input style="width: 180px;" v-model="addInspectionform.number" placeholder="请输入订单号" autocomplete="off" /> |
| | | <el-input |
| | | style="width: 210px;" |
| | | size="small" |
| | | v-model="addInspectionform.number" |
| | | placeholder="请输入订单号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="客户名称:"> |
| | | <el-input style="width: 180px;" v-model="addInspectionform.username" placeholder="请输入客户名称" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="工程名称:"> |
| | | <el-input style="width: 180px;" v-model="addInspectionform.projectname" placeholder="请输入工程名称" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="450"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="质量追溯号:" > |
| | | <el-input style="width: 180px;" v-model="addInspectionform.tracenumber" placeholder="请输入追溯号" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="产品编码:"> |
| | | <el-input style="width: 180px;" v-model="addInspectionform.code" placeholder="请输入产品编码" autocomplete="off" /> </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产品名称:"> |
| | | <el-select style="width: 180px;" v-model="addInspectionform.class" size="small" placeholder="请选择产品名称"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <el-input |
| | | style="width: 210px;" |
| | | size="small" |
| | | v-model="addInspectionform.code" |
| | | placeholder="请输入产品编码" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="产品编码:"> |
| | | <el-input |
| | | style="width: 210px;" |
| | | size="small" |
| | | disabled |
| | | v-model="addInspectionform.code" |
| | | placeholder="请输入产品编码" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="450"> |
| | | <el-col :span="5"> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="规格型号:" > |
| | | <el-select style="width: 180px;" v-model="addInspectionform.specificationmodel" size="small" placeholder="请选择规格型号"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | <el-input |
| | | style="width: 210px;" |
| | | size="small" |
| | | disabled |
| | | v-model="addInspectionform.number" |
| | | placeholder="请输入规格型号" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="工序名称:"> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="请选择" |
| | | style="width: 210px;" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="单位:" > |
| | | <el-select style="width: 180px;" v-model="addInspectionform.unit" size="small" placeholder="请选择单位"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | <el-col :span="7"> |
| | | <el-form-item label="工艺名称:"> |
| | | <el-select |
| | | v-model="value" |
| | | placeholder="请选择" |
| | | style="width: 210px;" |
| | | size="small" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="数量:"> |
| | | <el-input style="width: 180px;" v-model="addInspectionform.quantity" placeholder="请输入数量" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="450"> |
| | | <!-- <el-col :span="5"> |
| | | <el-form-item label="班组:" > |
| | | <el-select style="width: 180px;" v-model="addInspectionform.group" size="small" placeholder="请选择班组"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> </el-form-item> |
| | | </el-col> --> |
| | | <el-col :span="5"> |
| | | <el-form-item label="主机工:" > |
| | | <el-select style="width: 180px;" v-model="addInspectionform.worker" size="small" placeholder="请选择主机工"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <el-row :gutter="230"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="单位:"> |
| | | <el-input |
| | | style="width: 210px;" |
| | | size="small" |
| | | disabled |
| | | v-model="addInspectionform.quantity" |
| | | placeholder="请输入单位" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="机台:" > |
| | | <el-select style="width: 180px;" v-model="addInspectionform.machine" size="small" placeholder="请选择产品机台"> |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | | <el-col :span="7"> |
| | | <el-form-item label="数量:"> |
| | | <el-input |
| | | style="width: 210px;" |
| | | size="small" |
| | | v-model="addInspectionform.quantity" |
| | | placeholder="请输入数量" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-button |
| | | type="primary" |
| | | style="float: right; font-size: 14px; !important" |
| | | >生成检验项目</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | <div class="inspectionProject"> |
| | | <span>检验项目</span> |
| | | <el-table :data="inspectionItems"> |
| | | <el-table-column type="index" label="序号" width="60"></el-table-column> |
| | | <el-table-column prop="project" label="项目"></el-table-column> |
| | | <el-row> |
| | | <el-col :span="12" class="inspectionProject_span">检验项目</el-col> |
| | | <el-col :span="12" class="inspectionProject_span"> |
| | | <el-button size="mini" @click="clickDeleteInspectionColumn()" |
| | | >删除检验值列</el-button |
| | | > |
| | | <el-button |
| | | style="margin-right: 30px;" |
| | | size="mini" |
| | | @click="clickAddInspectionColumn()" |
| | | >添加检验值列</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | style="margin-right: 30px;" |
| | | @click="clickAddLine()" |
| | | >添加检验行</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | <el-table |
| | | :data="inspectionItems" |
| | | height="calc(100vh - 550px)" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="序号" |
| | | width="60" |
| | | ></el-table-column> |
| | | <el-table-column prop="material" label="项目"></el-table-column> |
| | | <el-table-column prop="unit" label="单位"></el-table-column> |
| | | <el-table-column prop="standardVal" label="标准值"></el-table-column> |
| | | <el-table-column prop="controlVal" label="内测值"></el-table-column> |
| | | <el-table-column prop="detectionVal" label="检验值"></el-table-column> |
| | | <el-table-column |
| | | prop="testValue" |
| | | label="检测值" |
| | | min-width="150" |
| | | v-for="(item, index) in empiricalValueAdd" |
| | | :key="index" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-tooltip |
| | | :disabled="scope.row.deviceId != null" |
| | | class="item" |
| | | effect="dark" |
| | | content="请先选择设备!" |
| | | placement="top-start" |
| | | > |
| | | <el-input |
| | | :disabled="scope.row.deviceId == null" |
| | | // v-model="scope.row.testValueList[index]" |
| | | @blur="changeState(scope.row, index)" |
| | | placeholder="请输入检测值" |
| | | ></el-input> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="试验设备"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.device }} |
| | | <el-select v-model="scope.row.device" size="small" slot="append" style="width: 100px;"> |
| | | <el-select |
| | | v-model="scope.row.device" |
| | | size="small" |
| | | slot="append" |
| | | style="width: 100px;" |
| | | > |
| | | <el-option value="选项1"></el-option> |
| | | <el-option value="选项2"></el-option> |
| | | </el-select> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="conclusion" label="结论"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.insState==1">合格</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.insState==0">不合格</span> |
| | | <span style="color: #34BD66;" v-if="scope.row.insState == 1" |
| | | >合格</span |
| | | > |
| | | <span style="color: #E84738;" v-else-if="scope.row.insState == 0" |
| | | >不合格</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="detailId == null" label="操作" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="clickDeleteline(scope)" |
| | | >删除</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | export default { |
| | | data(){ |
| | | return { |
| | | inspectionResult: '', |
| | | inspectionDate: '', |
| | | inspecter: '', |
| | | inspectionTable:[{ |
| | | number: '8540395029753', |
| | | username: 'jack', |
| | | projectname: '布隆迪', |
| | | tracenumber: '826403164021', |
| | | code: 'C-982164', |
| | | class: '成品', |
| | | specificationmodel: '8.8/15kV JLS-3.2', |
| | | unit: '吨', |
| | | quantity: '15', |
| | | machine: '拉闸机', |
| | | group: '1组', |
| | | worker: '黄小明', |
| | | date: '2023-08-01', |
| | | result: '合格', |
| | | operation: '' |
| | | },{ |
| | | number: '2497320327652', |
| | | username: 'rose', |
| | | projectname: '布隆迪', |
| | | tracenumber: '826403164021', |
| | | code: 'C-24114', |
| | | class: '成品', |
| | | specificationmodel: '8.6/15kV JAD-3.2', |
| | | unit: '吨', |
| | | quantity: '43', |
| | | machine: '拉闸机', |
| | | group: '1组', |
| | | worker: '黄小明', |
| | | date: '2023-08-01', |
| | | result: '合格', |
| | | operation: '' |
| | | }], |
| | | currentPage: 1, // 当前页码 |
| | | pageSize: 100, |
| | | search: { |
| | | countSize: 10, |
| | | pageSize: 1, |
| | | result: "", // 检测状态 |
| | | name: "", // 产品名称 |
| | | techfather: "" // 工序 |
| | | }, |
| | | inspectionTable: [], |
| | | inspectionTableTotal: "", |
| | | // 添加列 |
| | | empiricalValueAdd: 1, |
| | | // 编辑时存储最长的列数字,做删除判断 |
| | | empiricalValueAddMaxNumber: 0, |
| | | showAddPage: false, |
| | | addInspectionform: [{ |
| | | number: '', |
| | | username: '', |
| | | projectname: '', |
| | | tracenumber: '', |
| | | code: '', |
| | | class: '', |
| | | specificationmodel: '', |
| | | unit: '', |
| | | quantity: '', |
| | | group: '', |
| | | worker: '', |
| | | machine: '' |
| | | }], |
| | | inspectionItems:[{ |
| | | project:'布隆迪', |
| | | unit:'吨', |
| | | standardVal: '8219384314', |
| | | controlVal:'9823401', |
| | | detectionVal:'11111', |
| | | device:'', |
| | | conclusion:'合格' |
| | | }], |
| | | inspectionResultForm:[{ |
| | | id:'274024', |
| | | name:'111', |
| | | inspecter:'111', |
| | | conclusion:'', |
| | | operation:'' |
| | | }] |
| | | addInspectionform: [ |
| | | { |
| | | number: "", |
| | | username: "", |
| | | projectname: "", |
| | | tracenumber: "", |
| | | code: "", |
| | | class: "", |
| | | specificationmodel: "", |
| | | unit: "", |
| | | quantity: "", |
| | | group: "", |
| | | worker: "", |
| | | machine: "" |
| | | } |
| | | ], |
| | | inspectionItems: [], // 新增检验项目表格 |
| | | inspectionResultForm: [ |
| | | { |
| | | id: "274024", |
| | | name: "111", |
| | | inspecter: "111", |
| | | conclusion: "", |
| | | operation: "" |
| | | } |
| | | ], |
| | | options: [ |
| | | { |
| | | value: "选项1", |
| | | label: "黄金糕" |
| | | }, |
| | | { |
| | | value: "选项2", |
| | | label: "双皮奶" |
| | | }, |
| | | { |
| | | value: "选项3", |
| | | label: "蚵仔煎" |
| | | }, |
| | | { |
| | | value: "选项4", |
| | | label: "龙须面" |
| | | }, |
| | | { |
| | | value: "选项5", |
| | | label: "北京烤鸭" |
| | | } |
| | | ], |
| | | value: "" |
| | | }; |
| | | }, |
| | | methods:{ |
| | | // 每页条数改变时触发 选择一页显示多少行 |
| | | handleSizeChange(val) { |
| | | console.log(`每页 ${val} 条`) |
| | | this.currentPage = 1 |
| | | this.pageSize = val |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // 当前页改变时触发 跳转其他页 |
| | | handleCurrentChange(val) { |
| | | console.log(`当前页: ${val}`) |
| | | this.currentPage = val |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // 显示新增页面 |
| | | handleAddNew(){ |
| | | this.showAddPage=true |
| | | this.showAddPage = true; |
| | | }, |
| | | // 表格初始化接口 |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | }, |
| | | // 添加行 |
| | | clickAddLine() { |
| | | let obj = { |
| | | material: "", |
| | | materialCode: "", |
| | | orderNumber: "", |
| | | quantity: 0, |
| | | specificationsModel: "", |
| | | techfather: "", |
| | | techname: "", |
| | | technologyId: 0, |
| | | unit: "" |
| | | }; |
| | | this.inspectionItems.push(obj); |
| | | }, |
| | | // 删除行 |
| | | clickDeleteline(scope) { |
| | | this.inspectionItems.splice(scope.$index, 1); |
| | | }, |
| | | // 删除检验值列 |
| | | clickDeleteInspectionColumn() { |
| | | if (this.empiricalValueAdd - 1 === 0) { |
| | | } else { |
| | | if (this.empiricalValueAddMaxNumber != this.empiricalValueAdd - 1) { |
| | | this.empiricalValueAdd = this.empiricalValueAdd - 1; |
| | | this.inspectionItems.forEach(i => { |
| | | i.testValueList.splice(this.empiricalValueAdd, 1); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | // 添加检验值列 |
| | | clickAddInspectionColumn() { |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultInitializationTable(); // 初始化表格数据 |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .title{ |
| | | padding: 12px; |
| | | |
| | | } |
| | | .nav{ |
| | | display: flex; |
| | | padding: 20px 20px; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | } |
| | | .table_header { |
| | | height: calc(100vh - 550px); |
| | | } |
| | | .nav *{ |
| | | font-size: 14px; |
| | |
| | | padding: 20px 0px; |
| | | margin-left: 100px; |
| | | } |
| | | .inspectionProject span{ |
| | | display: block; |
| | | padding: 5px 0px; |
| | | } |
| | | .inspectionProject .el-table{ |
| | | background-color: #fff; |
| | | padding: 10px 12px; |
| | |
| | | background-color: #fff; |
| | | padding: 10px 12px; |
| | | } |
| | | .inspectionProject_span { |
| | | line-height: 32px; |
| | | padding: 10px 20px; |
| | | } |
| | | .inspectionProject_span .el-button { |
| | | float: right; |
| | | font-size: 13px !important; |
| | | } |
| | | </style> |
| | |
| | | <span>原材料编码:</span> |
| | | <el-input |
| | | v-model="search.code" |
| | | size="small" |
| | | placeholder="请输入" |
| | | size="small" |
| | | style="width: 224px;margin-right: 30px;" |
| | | clearable |
| | | ></el-input> |
| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="材料编码"> </el-table-column> |
| | | <el-table-column prop="id" label="材料名称"> </el-table-column> |
| | | <el-table-column prop="name" label="材料名称"> </el-table-column> |
| | | <el-table-column prop="specifications" label="规格型号"> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="单位"> </el-table-column> |
| | |
| | | <el-button size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }" |
| | | <el-tree style="width: ;" :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }" |
| | | node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | |
| | | <!-- 左侧点击+按钮 --> |
| | | <el-dialog title="BOM新增" :visible.sync="bomLeftAdd" width="29%"> |
| | | <el-form ref="leftAdd" :model="leftAdd"> |
| | | <el-form-item label="类型"> |
| | | <el-cascader v-model="leftAdd.type" size="mini" style="width: 93%;" :options="formTypeOptions" :props="{ checkStrictly: true }" clearable></el-cascader> |
| | | <el-form-item :rules="[{ required: true, message: '请选择产品类型', trigger: 'blur' }]" label="产品类型" prop="type"> |
| | | <el-cascader @change="changeLeftAdd" v-model="leftAdd.type" style="width: 86%;" :options="formTypeOptions" :props="{ checkStrictly: true }" clearable></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item v-if="leftAdd.type.length<2" label="产品大类" prop="father"> |
| | | <el-autocomplete class="inline-input" style="width: 88%;" v-model="leftAdd.father" :fetch-suggestions="querySearch" placeholder="请选择产品大类" @select="handleSelect"></el-autocomplete> |
| | | </el-form-item> |
| | | <el-form-item v-if="leftAdd.type.length<3" label="产品名称" prop="name"> |
| | | <el-autocomplete class="inline-input" style="width: 88%;" v-model="leftAdd.name" :fetch-suggestions="querySearchName" placeholder="请选择产品名称" @select="handleSelect"></el-autocomplete> |
| | | </el-form-item> |
| | | <el-form-item v-if="leftAdd.type.length<4" label="产品标准" prop="standard"> |
| | | <el-autocomplete class="inline-input" style="width: 88%;" v-model="leftAdd.standard" :fetch-suggestions="querySearchStandar" placeholder="请选择产品标准" @select="handleSelect"></el-autocomplete> |
| | | </el-form-item> |
| | | <el-form-item label="产品型号" prop="specifications"> |
| | | <el-input v-model="leftAdd.specifications" style="width: 88%;" placeholder="请输入产品型号"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bomLeftAdd = false">取 消</el-button> |
| | | <el-button type="primary" @click="bomLeftAdd = false">确 定</el-button> |
| | | <el-button @click="resetForm('leftAdd')">取 消</el-button> |
| | | <el-button type="primary" @click="submitForm('leftAdd')">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 右上侧点击修改按钮 --> |
| | |
| | | }, |
| | | version: {}, |
| | | leftAdd:{ |
| | | type: null, |
| | | type: [], |
| | | father: null, |
| | | standard: null, |
| | | name: null, |
| | |
| | | }, |
| | | VER: {}, |
| | | verdata: {}, |
| | | character: 0 |
| | | character: 0, |
| | | restaurants: [], |
| | | bomName:[], |
| | | bomStandard:[], |
| | | isLeftAdd: true |
| | | } |
| | | }, |
| | | // watch: { |
| | |
| | | console.log(this.formTypeOptions); |
| | | }, |
| | | methods: { |
| | | changeLeftAdd(){ |
| | | if(this.leftAdd.type.length===2){ |
| | | this.leftAdd.father=null |
| | | this.leftAdd.father=this.leftAdd.type[1] |
| | | } |
| | | if(this.leftAdd.type.length===3){ |
| | | this.leftAdd.name=null |
| | | this.leftAdd.father=this.leftAdd.type[1] |
| | | this.leftAdd.name=this.leftAdd.type[2] |
| | | } |
| | | if(this.leftAdd.type.length===4){ |
| | | this.leftAdd.standard=null |
| | | this.leftAdd.father=this.leftAdd.type[1] |
| | | this.leftAdd.name=this.leftAdd.type[2] |
| | | this.leftAdd.standard=this.leftAdd.type[3] |
| | | } |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | let obj=JSON.parse(JSON.stringify(this.leftAdd)) |
| | | console.log(obj); |
| | | let one=this.list.filter(item=>{ |
| | | return item.name===obj.type[0] |
| | | })[0] |
| | | let two=one.children.filter(item=>{ |
| | | return item.name===obj.father |
| | | })[0] |
| | | console.log("two",two); |
| | | //执行一二级新增 |
| | | if(two===undefined||two===null){ |
| | | obj.type=this.getType(obj.type[0]) |
| | | this.$axios.post(this.$api.url.leftAddOneTwo,obj,{ |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res=>{ |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'success' |
| | | }); |
| | | this.selectMaterialTree() |
| | | }) |
| | | }else{ |
| | | let three=two.children.filter(item=>{ |
| | | return item.name===obj.name |
| | | })[0] |
| | | console.log("three",three); |
| | | if(three===undefined||three===null){ |
| | | obj.type=this.getType(obj.type[0]) |
| | | this.$axios.post(this.$api.url.leftAddOneTwo,obj,{ |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res=>{ |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'success' |
| | | }); |
| | | this.selectMaterialTree() |
| | | }) |
| | | }else{ |
| | | //新增标准型号 |
| | | let four=three.children.filter(item=>{ |
| | | return item.name===obj.standard |
| | | })[0] |
| | | if(four===undefined||four===null){ |
| | | let StandardDto={ |
| | | "id": three.id, |
| | | "specifications": obj.specifications, |
| | | "standard": obj.standard |
| | | } |
| | | this.$axios.post(this.$api.url.leftAddThree,StandardDto,{ |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res=>{ |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'success' |
| | | }); |
| | | this.selectMaterialTree() |
| | | }) |
| | | }else{ |
| | | let specificationsDto={ |
| | | "id": four.id, |
| | | "specifications": obj.specifications |
| | | } |
| | | this.$axios.post(this.$api.url.leftAddFour,specificationsDto,{ |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res=>{ |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'success' |
| | | }); |
| | | this.selectMaterialTree() |
| | | this.selectVersion() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | this.resetForm('leftAdd') |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | resetForm(formName) { |
| | | this.bomLeftAdd=false |
| | | this.$refs[formName].resetFields(); |
| | | }, |
| | | leftAddBom(){ |
| | | confirmAdd(formName){ |
| | | this.$refs[formName].validate(valid=>{ |
| | | if(valid){ |
| | |
| | | startLeftAdd(){ |
| | | |
| | | }, |
| | | getType(typeName){ |
| | | return typeName==="成品"?1:2 |
| | | }, |
| | | handleSelect(item) { |
| | | console.log(item); |
| | | }, |
| | | querySearch(queryString, cb) { |
| | | var restaurants = this.restaurants; |
| | | var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants; |
| | | // 调用 callback 返回建议列表的数据 |
| | | cb(results); |
| | | }, |
| | | querySearchName(queryString, cb) { |
| | | var restaurants = this.bomName; |
| | | var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants; |
| | | // 调用 callback 返回建议列表的数据 |
| | | cb(results); |
| | | }, |
| | | querySearchStandar(queryString, cb) { |
| | | var restaurants = this.bomStandard; |
| | | var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants; |
| | | // 调用 callback 返回建议列表的数据 |
| | | cb(results); |
| | | }, |
| | | loadFatherType(){ |
| | | return [{label:"橡胶连接器",value: "橡胶连接器"},{label:"金属连接器",value: "金属连接器"}, |
| | | {label:"湿插拔电连接器",value: "湿插拔电连接器"},{label:"分支组件",value: "分支组件"}] |
| | | }, |
| | | createFilter(queryString) { |
| | | return (restaurant) => { |
| | | return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0); |
| | | }; |
| | | }, |
| | | selectDataList() { |
| | | this.list.forEach(a => { |
| | | a.code = '[1]' |
| | |
| | | this.selectVersion() |
| | | }, |
| | | handleNodeClick(val) {//树的值 |
| | | if(val.code==='[5]'&&val.children===undefined){ |
| | | console.log(val); |
| | | this.returntree = val |
| | | this.typeselect=0 |
| | | this.selectVersion() |
| | | } |
| | | }, |
| | | async selectVersion() {//版本 |
| | | let v=await this.$axios.get(this.$api.url.selectVersion, { |
| | |
| | | break; |
| | | } |
| | | }, |
| | | // 递归更改添加级联所需属性 |
| | | replaceProp(arr){ |
| | | for (let index = 0; index < arr.length; index++) { |
| | | let element = arr[index]; |
| | | element.label=element.name |
| | | element.value=element.name |
| | | // if() |
| | | if(element.children!=undefined){ |
| | | if(element.code==='[4]'){ |
| | | delete element['children'] |
| | | continue |
| | | } |
| | | this.replaceProp(element.children) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | watch:{ |
| | | leftAdd: { |
| | | handler(newVal, oldVal) { |
| | | console.log("新的",newVal); |
| | | console.log("旧的",oldVal); |
| | | if(this.isLeftAdd){ |
| | | let tree=JSON.parse(JSON.stringify(this.list)) |
| | | let father=null; |
| | | if(newVal.father!=null&&newVal.father!=''&&newVal.type.length>0){ |
| | | let one=tree.filter(item=>{ |
| | | return item.name===newVal.type[0] |
| | | })[0] |
| | | console.log(one); |
| | | let two=one.children.filter(item=>{ |
| | | return item.name===newVal.father |
| | | })[0] |
| | | if(two!=undefined){ |
| | | this.bomName=[] |
| | | father=JSON.parse(JSON.stringify(two)) |
| | | two.children.forEach(item=>{ |
| | | let obj={label: item.name,value: item.name} |
| | | this.bomName.push(obj) |
| | | }) |
| | | } |
| | | } |
| | | if(newVal.name!=null&&newVal!=''&&newVal.father!=null&&newVal.father!=''&&newVal.type.length>0){ |
| | | let three=null |
| | | if(father!=undefined&&father!=null){ |
| | | three=father.children.filter(item=>{ |
| | | return item.name===newVal.name |
| | | })[0] |
| | | } |
| | | if(three!=undefined&&three!=null){ |
| | | this.bomStandard=[] |
| | | three.children.forEach(item=>{ |
| | | let obj={label: item.name,value: item.name} |
| | | this.bomStandard.push(obj) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | deep: true // 深度监听对象内部属性的变化,可选的 |
| | | }, |
| | |
| | | handler(newval,oldVal){ |
| | | if(newval){ |
| | | let treeOptions = JSON.parse(JSON.stringify(this.list)); |
| | | console.log(treeOptions); |
| | | |
| | | this.replaceProp(treeOptions) |
| | | this.formTypeOptions=treeOptions |
| | | this.restaurants=this.loadFatherType() |
| | | } |
| | | } |
| | | } |
| | |
| | | .thing .left { |
| | | width: 295px; |
| | | height: calc(100% - 32px); |
| | | overflow-y: auto; |
| | | border-right: 3px solid rgb(245, 247, 251); |
| | | padding: 16px; |
| | | } |
| | |
| | | clearable |
| | | value-format="yyyy-MM-dd" |
| | | ></el-date-picker> |
| | | <span>产品大类:</span> |
| | | <el-select |
| | | v-model="search.productCategories" |
| | | size="small" |
| | | placeholder="请选择" |
| | | style="width: 224px;margin-right: 30px;" |
| | | > |
| | | <el-option label="全部" :value="''"></el-option> |
| | | <el-option label="成品" :value="1"></el-option> |
| | | <el-option label="半成品" :value="2"></el-option> |
| | | </el-select> |
| | | <el-button size="mini" @click="clean()"><span>重 置</span></el-button> |
| | | <el-button |
| | | size="mini" |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="material_code" label="材料编码"> |
| | | </el-table-column> |
| | | <el-table-column prop="id" label="材料名称"> </el-table-column> |
| | | <el-table-column prop="project_name" label="材料名称"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="specifications_model" |
| | | label="规格型号" |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="100"> |
| | | <template> |
| | | <template slot-scope="scope"> |
| | | <div style="display: flex;"> |
| | | <el-button type="text" siae="small" size="mini">评审</el-button> |
| | | <el-popover |
| | | placement="left" |
| | | width="160" |
| | | :ref="`popover-${scope.$index}`" |
| | | > |
| | | <div style="padding: 6px">评审是否通过?</div> |
| | | <div style="text-align: right; margin: 6px;"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | style="color: #E84738;" |
| | | @click=" |
| | | scope._self.$refs[`popover-${scope.$index}`].doClose(); |
| | | rawEvaluate(scope.row, 0); |
| | | " |
| | | >不通过</el-button |
| | | > |
| | | <el-button |
| | | type="text" |
| | | style="color: #34bd66;" |
| | | size="mini" |
| | | @click=" |
| | | scope._self.$refs[`popover-${scope.$index}`].doClose(); |
| | | rawEvaluate(scope.row, 1); |
| | | " |
| | | >通过</el-button |
| | | > |
| | | </div> |
| | | <el-button |
| | | slot="reference" |
| | | type="text" |
| | | siae="small" |
| | | size="mini" |
| | | >评审</el-button |
| | | > |
| | | </el-popover> |
| | | <el-button |
| | | type="text" |
| | | siae="small" |
| | | size="mini" |
| | | style=" color:87, 138, 193 ;" |
| | | style=" color:87, 138, 193 ;margin-left: 10px;" |
| | | >查看</el-button |
| | | > |
| | | </div> |
| | |
| | | countSize: 10, // 条数/页 |
| | | pageSize: 1, // 起始页 |
| | | formTime: "", // 来料日期 |
| | | productCategories: "", // 产品大类 |
| | | dealState: "" // 处理状态 |
| | | }, |
| | | unqualifiedTable: [], // 页面表格数据 |
| | |
| | | dealState: "" // 处理状态 |
| | | }; |
| | | this.getDetailInfo(); |
| | | }, |
| | | rawEvaluate(row, passOrNo) { |
| | | this.$axios |
| | | .post(this.$api.url.evaluatePassOrNo, { |
| | | rawId: row.id, |
| | | passOrNo: passOrNo |
| | | }) |
| | | .then(res => { |
| | | this.unqualifiedTable = []; |
| | | this.getDetailInfo(); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | |
| | | Vue.use(qs); |
| | | Vue.use(api); |
| | | |
| | | const javaApi = 'http://192.168.0.23:8001' |
| | | const javaApi = 'http://192.168.0.25:8001' |
| | | |
| | | // const javaApi = '192.168.0.6' |
| | | |