| | |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请选择状态" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item style="float: right"> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="设备编码" align="center" prop="equipmentCode"/> |
| | | <el-table-column label="设备名称" align="center" prop="equipmentName"/> |
| | | <el-table-column label="状态" align="center" prop="status" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="工序编号" align="center" prop="processesCode"/> |
| | | <el-table-column label="品牌" align="center" prop="equipmentBrand"/> |
| | | <el-table-column label="规格型号" align="center" prop="equipmentSpec"/> |
| | | <el-table-column label="车间编码" align="center" prop="workshopCode"/> |
| | | <el-table-column label="产线编码" align="center" prop="lineCode"/> |
| | | <el-table-column label="设备状态" align="center" prop="status"/> |
| | | <el-table-column label="创建时间" width="160" align="center" prop="createTime"/> |
| | | <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width"> |
| | |
| | | <el-form-item label="设备名称" prop="equipmentName"> |
| | | <el-input v-model="form.equipmentName" placeholder="请输入设备名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="工序编号" prop="processesCode"> |
| | | <el-select style="width: 100%" @change="handleSelectChangeprocessesCode(form.processesCode)" v-model="form.processesCode" placeholder="请选择工序编号"> |
| | | <el-option |
| | | v-for="item in processesCodeoptions" |
| | | :key="item.index" |
| | | :label="item.processesCode" |
| | | :value="item.processesCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="品牌" prop="equipmentBrand"> |
| | | <el-input v-model="form.equipmentBrand" placeholder="请输入品牌" /> |
| | | </el-form-item> |
| | | <el-form-item label="设备类型名称" prop="equipmentTypeName"> |
| | | <el-form-item label="设备类型" prop="equipmentTypeName"> |
| | | <el-input v-model="form.equipmentTypeName" placeholder="请输入设备类型名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="规格型号" prop="equipmentSpec"> |
| | | <el-input v-model="form.equipmentSpec" placeholder="请输入规格型号" /> |
| | | </el-form-item> |
| | | <el-form-item label="车间编码" prop="workshopCode"> |
| | | <el-input v-model="form.workshopCode" placeholder="请输入车间编码" /> |
| | | <el-form-item label="车间编号" prop="workshopCode"> |
| | | <el-select style="width: 100%" @change="handleSelectChange(form.workshopCode)" v-model="form.workshopCode" placeholder="请选择车间编号"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.workshopCode" |
| | | :label="item.workshopName" |
| | | :value="item.workshopCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="产线编号" prop="lineCode"> |
| | | <el-select style="width: 100%" v-model="form.lineCode" placeholder="请选择产线编号"> |
| | | <el-option |
| | | v-for="item in lineOptions" |
| | | :key="item.lineCode" |
| | | :label="item.lineName" |
| | | :value="item.lineCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请输入备注" /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="设备类型ID" prop="equipmentTypeId">--> |
| | | <!-- <el-input v-model="form.equipmentTypeId" placeholder="请输入设备类型ID" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="设备类型编码" prop="equipmentTypeCode">--> |
| | | <!-- <el-input v-model="form.equipmentTypeCode" placeholder="请输入设备类型编码" />--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | |
| | | <!-- <el-form-item label="产线编码" prop="lineCode">--> |
| | | <!-- <el-input v-model="form.lineCode" placeholder="请输入产线编码" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="工序编码" prop="processes">--> |
| | | <!-- <el-input v-model="form.processes" placeholder="请输入工序编码" />--> |
| | | <!-- </el-form-item>--> |
| | | |
| | | <!-- <el-form-item label="创建人" prop="createUser">--> |
| | | <!-- <el-input v-model="form.createUser" placeholder="请输入创建人" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="更新人" prop="updateUser">--> |
| | | <!-- <el-input v-model="form.updateUser" placeholder="请输入更新人" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="预留字段1" prop="spareField1">--> |
| | | <!-- <el-input v-model="form.spareField1" placeholder="请输入预留字段1" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="预留字段2" prop="spareField2">--> |
| | | <!-- <el-input v-model="form.spareField2" placeholder="请输入预留字段2" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="预留字段3" prop="spareField3">--> |
| | | <!-- <el-input v-model="form.spareField3" placeholder="请输入预留字段3" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="预留字段4" prop="spareField4">--> |
| | | <!-- <el-input v-model="form.spareField4" placeholder="请输入预留字段4" />--> |
| | | <!-- </el-form-item>--> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | |
| | | |
| | | <script> |
| | | import { listEquipmentArchives, getEquipmentArchives, delEquipmentArchives, addEquipmentArchives, updateEquipmentArchives } from "@/api/main/em/equipmentArchives/equipmentArchives"; |
| | | import {listWorkshop} from "@/api/main/bs/workshop/workshop"; |
| | | import {listLineInfo} from "@/api/main/bs/lineInfo/lineInfo"; |
| | | import ItemSelect from "@/components/itemSelect/single.vue"; |
| | | import {listProductionOrde} from "@/api/main/om/productionOrde/productionOrde"; |
| | | import {listProcesses} from "@/api/main/bs/processes/processes"; |
| | | |
| | | export default { |
| | | name: "EquipmentArchives", |
| | | dicts: ['sys_normal_disable'], |
| | | components: { |
| | | ItemSelect , |
| | | }, |
| | | data() { |
| | | return { |
| | | // 遮罩层 |
| | | lineOptions: [], |
| | | processesCodeoptions:[], |
| | | options: [], |
| | | loading: true, |
| | | titleName: "", |
| | | // 选中数组 |
| | |
| | | equipmentTypeName: null, |
| | | workshopCode: null, |
| | | lineCode: null, |
| | | processes: null, |
| | | processesCode: null, |
| | | status: null, |
| | | createUser: null, |
| | | updateUser: null, |
| | |
| | | spareField2: null, |
| | | spareField3: null, |
| | | spareField4: null |
| | | }, |
| | | processesCodeQueryParams:{ |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | processesCodes: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.initWorkshop(); |
| | | this.initProcesses(); |
| | | |
| | | }, |
| | | methods: { |
| | | /** 查询设备档案列表 */ |
| | | initWorkshop(){ |
| | | listWorkshop().then(response => { |
| | | this.options = response.rows; |
| | | }); |
| | | }, |
| | | // 在这里编写处理选中事件的逻辑 |
| | | handleSelectChange(selectedOption) { |
| | | this.form.lineCode = null; |
| | | let param = { |
| | | workshopCode : selectedOption |
| | | } |
| | | listLineInfo(param).then(response => { |
| | | this.lineOptions = response.rows; |
| | | }); |
| | | }, |
| | | handleSelectChangeprocessesCode(selectedOption) { |
| | | this.processesCodeQueryParams.processesCodes = selectedOption; |
| | | listProcesses(this.queryParams).then(response => { |
| | | this.form.processesName = response.rows[0].processesName; |
| | | }); |
| | | }, |
| | | initProcesses(){ |
| | | listProcesses(this.queryParams).then(response => { |
| | | this.processesCodeoptions = response.rows; |
| | | }); |
| | | }, |
| | | getList() { |
| | | console.log(this.queryParams) |
| | | this.loading = true; |
| | | listEquipmentArchives(this.queryParams).then(response => { |
| | | this.equipmentArchivesList = response.rows; |
| | |
| | | equipmentTypeName: null, |
| | | workshopCode: null, |
| | | lineCode: null, |
| | | processes: null, |
| | | status: null, |
| | | processesCode: null, |
| | | status: "0", |
| | | remark: null, |
| | | createUser: null, |
| | | createTime: null, |