Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
| | |
| | | "vue-quill-editor": "3.0.6", |
| | | "vue-router": "^3.0.2", |
| | | "vuedraggable": "^2.24.3", |
| | | "vuex": "^3.0.1" |
| | | "vuex": "^3.0.1", |
| | | "xlsx-style": "^0.8.13" |
| | | }, |
| | | "devDependencies": { |
| | | "@vue/cli-plugin-babel": "~3.8.0", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export function fetchList(query) { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function pullEquip() { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/updateDevicd', |
| | | method: 'post', |
| | | }) |
| | | } |
| | | |
| | | export function addObj(obj) { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/addDevicd', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function getObj(id) { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | export function delObj(id) { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | | |
| | | export function putObj(obj) { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/updateDevicd', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function getEquipmentPageByWorkstation(id) { |
| | | return request({ |
| | | url: '/mes/equipmentDevice/page/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | params: obj |
| | | }) |
| | | } |
| | | |
| | | export function selectDevice() { |
| | | return request({ |
| | | url: '/mes/qualityProcessInsProduct/selectDevice', |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | | export function exportProcessInsProduct(query) { |
| | | return request({ |
| | | url: '/mes/qualityProcessInspect/exportExcel', |
| | | method: 'get', |
| | | responseType : 'blob', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | |
| | | export function selectDevice() { |
| | | return request({ |
| | | url: '/mes/rawInsProduct/selectDevice', |
| | | url: '/mes/qualityFinishedInsProduct/scope', |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | } |
| | | }, |
| | | getDataList(selectedId) { |
| | | this.dataListLoading = true |
| | | // this.dataListLoading = true |
| | | var criteria = {} |
| | | criteria.dateTimeFilters = this.dateTimeFilters |
| | | criteria.multiSearchFilter = this.multiSearchFilter |
| | |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: '忥', |
| | | type: 'primary', |
| | | loading: false, |
| | | fun: this.pullEquipFun |
| | | } |
| | | // { |
| | | // text: '忥', |
| | | // type: 'primary', |
| | | // loading: false, |
| | | // fun: this.pullEquipFun |
| | | // } |
| | | ], |
| | | operator: [ |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :uploadInfo="uploadInfo" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :ajaxFun="ajaxFun" |
| | | ref="equipmentTable" |
| | | > |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | <!-- å¼¹çª, æ°å¢ / ä¿®æ¹ --> |
| | | <table-form |
| | | v-if="addOrUpdateVisible" |
| | | ref="addOrUpdate" |
| | | @refreshDataList="getData" |
| | | ></table-form> |
| | | </basic-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { delObj, fetchList,pullEquip } from '@/api/equipment/metering' |
| | | import TableForm from './metering-form' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { mapGetters } from 'vuex' |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import { remote } from '../../../api/admin/dict' |
| | | export default { |
| | | data() { |
| | | return { |
| | | ajaxFun: fetchList, |
| | | multipleSelection: [], |
| | | uploadInfo: { |
| | | // æ¯å¦å±ç¤ºä¸ä¼ EXCEL以å对åºçurl |
| | | isShow: true, |
| | | url: '/mes/equipment/upload' |
| | | }, |
| | | prelang: 'workstation', |
| | | options: { |
| | | height: 300, // é»è®¤é«åº¦-为äºè¡¨å¤´åºå® |
| | | stripe: true, // æ¯å¦ä¸ºæé©¬çº¹ table |
| | | highlightCurrentRow: false, // æ¯å¦è¦é«äº®å½åè¡ |
| | | border: true, // æ¯å¦æçºµåè¾¹æ¡ |
| | | lazy: false, // æ¯å¦éè¦æå è½½ |
| | | fit: true, // åç宽度æ¯å¦èªæå¼ |
| | | multiSelect: true, // |
| | | seqNo: true, |
| | | isRefresh: true, // æ¯å¦æ¾ç¤ºå·æ°æé® |
| | | isShowHide: true, // æ¯å¦æ¾ç¤ºæ¾å½±æé® |
| | | isSearch: false, // é«çº§æ¥è¯¢æé® |
| | | defaultOrderBy: { column: 'manufactureDate', direction: 'desc' } |
| | | }, |
| | | table: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | data: [], |
| | | // æ é¢ |
| | | column: [ |
| | | // 设å¤ç¼å· |
| | | { |
| | | minWidth: '30', |
| | | prop: 'code', |
| | | label: '设å¤ç¼å·', |
| | | sort: true, |
| | | isTrue: true, |
| | | formatter: (row, column, cellValue) => { |
| | | return cellValue |
| | | }, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // 设å¤åç§° |
| | | { |
| | | minWidth: '30', |
| | | prop: 'name', |
| | | label: '设å¤åç§°', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // å·¥å |
| | | // { |
| | | // minWidth: '30', |
| | | // prop: 'factoryName', |
| | | // label: 'å·¥å', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | { |
| | | minWidth: '30', |
| | | prop: 'type', |
| | | label: '设å¤ç±»å', |
| | | // sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | // searchInfoType: 'select', |
| | | formatter: this.workShopFormatter, |
| | | // optList: () => { |
| | | // return this.workshopList |
| | | // } |
| | | }, |
| | | // åå·è§æ ¼ |
| | | { |
| | | minWidth: '30', |
| | | prop: 'supplier', |
| | | label: 'åå®¶', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: false, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // ç¶æ |
| | | { |
| | | minWidth: '30', |
| | | prop: 'status', |
| | | label: 'ç¶æ', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // å¶é æ¥æ |
| | | { |
| | | minWidth: '150', |
| | | width: '250', |
| | | prop: 'createTime', |
| | | label: 'å建æ¶é´', |
| | | sort: true, |
| | | isTrue: true, |
| | | formatter: this.formatReceiveTime, |
| | | isSearch: true, |
| | | searchInfoType: 'datetime' |
| | | }, |
| | | |
| | | { |
| | | minWidth: '150', |
| | | width: '250', |
| | | prop: 'updateTime', |
| | | label: 'ä¿®æ¹æ¶é´', |
| | | sort: true, |
| | | isTrue: true, |
| | | formatter: this.formatReceiveTime, |
| | | isSearch: true, |
| | | searchInfoType: 'datetime' |
| | | }, |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: 'æ°å¢', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | // { |
| | | // text: '忥', |
| | | // type: 'primary', |
| | | // loading: false, |
| | | // fun: this.pullEquipFun |
| | | // } |
| | | ], |
| | | operator: [ |
| | | { |
| | | text: 'ä¿®æ¹', |
| | | icon: 'el-icon-edit', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: 'å é¤', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | } |
| | | ], |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: 130, |
| | | minWidth: 130 |
| | | } |
| | | }, |
| | | addOrUpdateVisible: false, |
| | | workshopList: [] |
| | | } |
| | | }, |
| | | components: { |
| | | ttable, |
| | | TableForm |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | created() { |
| | | remote('work_shop').then((response) => { |
| | | if (response.data.code === 0) { |
| | | this.workshopList = response.data.data |
| | | } else { |
| | | this.workshopList = [] |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | pullEquipFun(){ |
| | | this.table.toolbar.find((e) => e.text === '忥').loading = true |
| | | pullEquip().then(res=>{ |
| | | this.$message.success(res.data.data.msg) |
| | | this.table.toolbar.find((e) => e.text === '忥').loading = false |
| | | }).catch(error=>{ |
| | | this.$message.error("åæ¥å¤±è´¥",error) |
| | | this.getData() |
| | | this.table.toolbar.find((e) => e.text === '忥').loading = false |
| | | }) |
| | | }, |
| | | workShopFormatter(row, column, cellValue) { |
| | | if(cellValue==='åæææ£éª'){ |
| | | cellValue=="åæææ£éª" |
| | | } |
| | | if(cellValue==='è¿ç¨æ£éª'){ |
| | | cellValue=="è¿ç¨æ£éª" |
| | | } |
| | | return cellValue |
| | | }, |
| | | // è·åæ°æ®å表 |
| | | getData() { |
| | | this.$refs.equipmentTable.getDataList() |
| | | }, |
| | | formatReceiveTime(row, column, cellValue) { |
| | | return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd HH:mm:ss') : '' |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | // æ°å¢ / ä¿®æ¹ |
| | | addOrUpdateHandle(row) { |
| | | this.addOrUpdateVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addOrUpdate.init(row == null ? null : row.id) |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | deleteHandle(row) { |
| | | this.$confirm('æ¯å¦ç¡®è®¤å é¤è®¾å¤å称为' + row.name, 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | closeOnClickModal: false, |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | return delObj(row.id) |
| | | }) |
| | | .then((data) => { |
| | | this.$message.success('å 餿å') |
| | | this.getData() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="!dataForm.id ? 'æ°å¢' : 'ä¿®æ¹'" |
| | | :close-on-click-modal="false" |
| | | :visible.sync="visible" |
| | | > |
| | | <el-form |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | | ref="dataForm" |
| | | label-width="80px" |
| | | class="l-mes" |
| | | > |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å·" prop="code"> |
| | | <el-input v-model="dataForm.code" placeholder="ç¼å·"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-model="dataForm.name" placeholder="åç§°"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç±»å" prop="type"> |
| | | <el-select |
| | | v-model="dataForm.type" |
| | | filterable |
| | | placeholder="è¯·éæ©" |
| | | style="width:100%" |
| | | > |
| | | <el-option |
| | | v-for="item in workshopList" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå®¶" prop="supplier"> |
| | | <el-input |
| | | v-model="dataForm.supplier" |
| | | placeholder="åå®¶" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¶æ" prop="state"> |
| | | <el-select |
| | | v-model="dataForm.status" |
| | | placeholder="ç¶æ" |
| | | filterable |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in equipmentState" |
| | | :key="item.id" |
| | | :label="item.label" |
| | | :value="item.label" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="visible = false">åæ¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | :disabled="isSubmit" |
| | | v-thinclick="`dataFormSubmit`" |
| | | >ç¡®å®</el-button |
| | | > |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { getObj, addObj, putObj } from '@/api/equipment/metering' |
| | | import { loadFactoryList } from '@/api/basic/factory' |
| | | import { remote } from '../../../api/admin/dict' |
| | | export default { |
| | | data() { |
| | | return { |
| | | // options: regionData, |
| | | visible: false, |
| | | dataForm: { |
| | | id: 0, |
| | | number: '', |
| | | name: '', |
| | | factoryId: '', |
| | | workshop: '', |
| | | position: '', |
| | | email: '', |
| | | supplier: '', |
| | | manufacturer: '', |
| | | typeSpecification: '', |
| | | manufactureDate: '', |
| | | installDate: '', |
| | | state: '', |
| | | description: '', |
| | | value1: '', |
| | | code: null, |
| | | type: null, |
| | | status: null, |
| | | supplier: null |
| | | }, |
| | | dataRule: { |
| | | number: [{ required: true, message: 'ç¼å·ä¸è½ä¸ºç©º', trigger: 'blur' }], |
| | | name: [{ required: true, message: 'åç§°ä¸è½ä¸ºç©º', trigger: 'blur' }] |
| | | }, |
| | | factoryOptions: [], |
| | | equipmentState: [], |
| | | isSubmit: false, |
| | | workshopList: [{ |
| | | label: "åæææ£éª", |
| | | value: 'åæææ£éª' |
| | | },{ |
| | | label: 'è¿ç¨æ£éª', |
| | | value: 'è¿ç¨æ£éª' |
| | | }] |
| | | } |
| | | }, |
| | | methods: { |
| | | init(id) { |
| | | this.dataForm.id = id || 0 |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.dataForm.resetFields() |
| | | if (this.dataForm.id) { |
| | | getObj(this.dataForm.id).then((response) => { |
| | | this.dataForm = response.data.data |
| | | }) |
| | | } else { |
| | | if (this.factoryOptions.length > 0) { |
| | | this.dataForm.factoryId = this.factoryOptions[0].id |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 表åæäº¤ |
| | | getEquipmentState() { |
| | | remote('equipment_state').then((response) => { |
| | | if (response.data.code === 0) { |
| | | this.equipmentState = response.data.data |
| | | } |
| | | }) |
| | | }, |
| | | dataFormSubmit() { |
| | | this.isSubmit = true |
| | | this.$refs.dataForm.validate((valid) => { |
| | | if (valid) { |
| | | if (this.dataForm.id) { |
| | | putObj(this.dataForm).then((data) => { |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.visible = false |
| | | this.isSubmit = false |
| | | this.$emit('refreshDataList') |
| | | }) |
| | | } else { |
| | | addObj(this.dataForm).then((data) => { |
| | | this.$message.success('æ·»å æå') |
| | | this.visible = false |
| | | this.isSubmit = false |
| | | this.$emit('refreshDataList') |
| | | }) |
| | | } |
| | | } else { |
| | | this.isSubmit = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | initFactorySelect() { |
| | | loadFactoryList().then((res) => { |
| | | this.factoryOptions = res.data |
| | | if (this.factoryOptions.length > 0) { |
| | | this.dataForm.factoryId = this.factoryOptions[0].id |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | this.initFactorySelect() |
| | | this.getEquipmentState() |
| | | |
| | | // remote('work_shop').then((response) => { |
| | | // if (response.data.code === 0) { |
| | | // this.workshopList = response.data.data |
| | | // } else { |
| | | // this.workshopList = [] |
| | | // } |
| | | // }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | width="240" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-col v-if="scope.row.itype === '1'"> |
| | | <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | <span v-if="resultVal != null" v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | <el-col v-else> |
| | | <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" placement="top-start"> |
| | | <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" label="è¯éªè®¾å¤" min-width="250"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="resultVal!=null && processInspectVo.id!=null" v-text="scope.row.ename"></span> |
| | | <div v-else> |
| | | <el-select style="width:100%" v-model="scope.row.eId" |
| | | <el-input v-model="scope.row.eId" v-if="scope.row.iname != null" placeholder="请è¾å
¥è®¾å¤å·"></el-input> |
| | | <!-- <el-select style="width:100%" v-model="scope.row.eId" |
| | | v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)"> |
| | | <el-option v-for="(item,index) in deviceList" |
| | | :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option> |
| | | </el-select> |
| | | </el-select> --> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataVal: [{ |
| | | label: 'æ¯', |
| | | value: 'æ¯' |
| | | }, { |
| | | label: 'å¦', |
| | | value: 'å¦' |
| | | }], |
| | | resultVal: null, |
| | | deviceList: [], |
| | | hasChildren: true, |
| | |
| | | this.init() |
| | | }, |
| | | methods: { |
| | | |
| | | submitSave(){ |
| | | let pro = 0 |
| | | this.inspectionItems.forEach(item => { |
| | |
| | | }, |
| | | getDeviceList(){ |
| | | selectDevice(null).then(res=>{ |
| | | this.deviceList = res.data.data |
| | | // this.deviceList = res.data.data |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | updateDevice(row,index){ |
| | |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import processInspectForm from './processInspect-form' |
| | | import { page,deleteById } from '@/api/quality/processInspect' |
| | | import { transform } from '@/util/fileTransform' |
| | | import { page,deleteById,exportProcessInsProduct } from '@/api/quality/processInspect' |
| | | export default { |
| | | components: { |
| | | processInspectForm, |
| | |
| | | }, |
| | | { |
| | | text: '导åº', |
| | | fun: this.exportExcel |
| | | } |
| | | ], |
| | | operator: [{ |
| | |
| | | }, |
| | | created() { }, |
| | | methods: { |
| | | exportExcel(){ |
| | | let queryParam=this.$refs.processInspect.getQueryParam(); |
| | | delete queryParam.criteria |
| | | console.log(queryParam); |
| | | exportProcessInsProduct(queryParam).then((res)=>{ |
| | | transform(res) |
| | | }) |
| | | }, |
| | | deleteHandle(row){ |
| | | this.$confirm('确认å é¤è¯¥æ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="finishedProduct-basic"> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="l-mes" |
| | | label-position="right" label-width="120px" style="width: 100%" size="small"> |
| | | <el-form :model="processInspectVo" ref="addInspectionform" class="l-mes" label-position="right" |
| | | label-width="120px" style="width: 100%" size="small"> |
| | | <div class="formwrapper"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 100%" @change="changeOptionsSamplename" :disabled="processInspectVo.id != null" |
| | | v-model="processInspectVo.material" size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option v-for="(item,index) in optionsSamplename" :key="index" :label="item.material" |
| | | :value="item.materialCode"> |
| | | <el-select style="width: 100%" @change="changeOptionsSamplename" |
| | | :disabled="processInspectVo.id != null" v-model="processInspectVo.material" |
| | | size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option v-for="(item, index) in optionsSamplename" :key="index" |
| | | :label="item.material" :value="item.materialCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产åç¼ç ï¼"> |
| | | <el-input disabled v-model="processInspectVo.materialCode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | <el-input disabled v-model="processInspectVo.materialCode" placeholder="请è¾å
¥äº§åç¼ç " |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input disabled v-model="processInspectVo.specs" |
| | | placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | <el-input disabled v-model="processInspectVo.specs" placeholder="请è¾å
¥è§æ ¼åå·" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input disabled v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | <el-input disabled v-model="processInspectVo.unit" placeholder="请è¾å
¥åä½" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ°éï¼"> |
| | | <el-input v-model="processInspectVo.quantity" placeholder="请è¾å
¥æ°é" |
| | | autocomplete="off" :disabled="processInspectVo.id != null" /> |
| | | <el-input v-model="processInspectVo.quantity" placeholder="请è¾å
¥æ°é" autocomplete="off" |
| | | :disabled="processInspectVo.id != null" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :span="24"> |
| | | <el-table border :data="inspectionItems" height="400" |
| | | :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" |
| | | :cell-style="{textAlign:'center'}" row-key="iid" default-expand-all |
| | | style="width: 100%" ref="table" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | | :cell-style="{ textAlign: 'center' }" row-key="iid" default-expand-all style="width: 100%" |
| | | ref="table" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> |
| | | <el-table-column type="index" label="åºå·" width="60"></el-table-column> |
| | | <el-table-column label="项ç®" prop="father" width="240" ></el-table-column> |
| | | <el-table-column prop="iname" label="ææ " width="240" ></el-table-column> |
| | | <el-table-column prop="iunit" label="åä½" width="240" ></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼" width="240" ></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | width="240" style="text-align: center;"> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" |
| | | label="æ£æµå¼" width="240" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-col v-if="scope.row.itype === '1'"> |
| | | <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" placement="top-start"> |
| | | <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | <span v-if="resultVal != null && processInspectVo.id!=null" v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | <el-col v-else> |
| | | <el-tooltip v-if="scope.row.iname != null" :disabled="scope.row.eId != null" |
| | | class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" placement="top-start"> |
| | | <!-- <el-input :disabled="scope.row.eId == null" |
| | | v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> --> |
| | | <el-select style="width: 100%;" @change="changeState(scope.row, index)" :disabled="scope.row.eId == null" v-model="scope.row.empiricalValueAddss[index]" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in dataVal" :key="item.value" :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <span v-if="resultVal != null && processInspectVo.id != null" |
| | | v-text="scope.row.empiricalValueAddss[index]"></span> |
| | | </el-tooltip> |
| | | </el-col> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" label="è¯éªè®¾å¤" min-width="250"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="resultVal != null && scope.row.iname != null" v-text="scope.row.ename"></span> |
| | | <span v-if="resultVal != null && scope.row.iname != null" |
| | | v-text="scope.row.ename"></span> |
| | | <div v-else> |
| | | <el-select style="width:100%" v-model="scope.row.eId" |
| | | v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)"> |
| | | <el-option v-for="(item,index) in deviceList" |
| | | :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option> |
| | | <el-select style="width:100%" v-model="scope.row.eId" v-if="scope.row.iname != null" |
| | | filterable @change="updateDevice(scope.row, scope.$index)"> |
| | | <el-option v-for="(item, index) in deviceList" :key="index" :value="item.id" |
| | | :label="item.code + '-' + item.name"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </template> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template> |
| | | <el-button type="text" :disabled="resultVal != null && processInspectVo.id!=null" @click="submitSave()" size="small">䏿¥</el-button> |
| | | <el-button type="text" :disabled="resultVal != null && processInspectVo.id != null" |
| | | @click="submitSave()" size="small">䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | updateProcessInsProduct, |
| | | updateProcessInspectsById, |
| | | } from '@/api/quality/processInspect' |
| | | import { selectDevice } from '@/api/quality/rawMaterial' |
| | | import { selectDevice } from '@/api/quality/processInspect' |
| | | export default { |
| | | data() { |
| | | return { |
| | | dataVal: [{ |
| | | label: 'æ¯', |
| | | value: 'æ¯' |
| | | }, { |
| | | label: 'å¦', |
| | | value: 'å¦' |
| | | }], |
| | | resultVal: null, |
| | | technologyList: [], |
| | | deviceList: [], |
| | |
| | | }) |
| | | }, |
| | | updateDevice(row,index){ |
| | | updateDeviceBypppId({equiomentId:row.eId,ppid:row.iId}).then(res=>{ |
| | | updateDeviceBypppId({ deviceId: row.eId, ppid: row.iid }).then(res => { |
| | | this.inspectionItems.forEach(obj=>{ |
| | | console.log(obj); |
| | | if(obj.children){ |
| | | obj.children[index-1].inspectionValue = '' |
| | | obj.children[index - 1].inspectionValue = null |
| | | obj.children[index-1].iresult = null |
| | | obj.children[index-1].empiricalValueAddss = [] |
| | | } |
| | |
| | | return |
| | | } |
| | | let obj = { |
| | | equiomentId: row.eId, |
| | | devideId: row.eId, |
| | | ppid: row.iid, |
| | | inspectionValue: str |
| | | } |
| | |
| | | border: 1px solid #ddd; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /*èªå®ä¹disabledç¶æä¸checkboxçæ ·å¼*/ |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled.is-checked |
| | | .el-checkbox__inner { |
| | | .completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner { |
| | | background-color: #006eff; |
| | | border-color: #006eff; |
| | | } |
| | | |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled.is-checked |
| | | + span.el-checkbox__label { |
| | | .completeproductstructure-checkout .el-checkbox__input.is-disabled.is-checked+span.el-checkbox__label { |
| | | color: #006eff; |
| | | border-color: #006eff; |
| | | } |
| | | |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled |
| | | .el-checkbox__inner { |
| | | .completeproductstructure-checkout .el-checkbox__input.is-disabled .el-checkbox__inner { |
| | | background-color: #ffffff; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .completeproductstructure-checkout |
| | | .el-checkbox__input.is-disabled |
| | | + span.el-checkbox__label { |
| | | .completeproductstructure-checkout .el-checkbox__input.is-disabled+span.el-checkbox__label { |
| | | color: #606266; |
| | | cursor: pointer; |
| | | } |
| | |
| | | <el-radio label="æ¥æ¶">æ¥æ¶</el-radio> |
| | | <el-radio label="é级使ç¨">é级使ç¨</el-radio> |
| | | <el-radio label="æ¥åº">æ¥åº</el-radio> |
| | | <el-radio label="é为ä»ç¨">é为ä»ç¨</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div v-if="type === 'è¿ç¨æ£éª'"> |
| | | <el-radio-group v-model="checkList"> |
| | | <el-row> |
| | | <div style="padding: 20px;"> |
| | | <el-radio label="è¿ä¿®">è¿ä¿®</el-radio> |
| | | <el-radio label="æ¥æ¶">æ¥æ¶</el-radio> |
| | | <el-radio label="é级使ç¨">é级使ç¨</el-radio> |
| | | <el-radio label="æ¥åº">æ¥åº</el-radio> |
| | | </div> |
| | | <div style="padding: 20px;"> |
| | | <el-radio label="è¿å·¥">è¿å·¥</el-radio> |
| | | <el-radio label="é为ä»ç¨">é为ä»ç¨</el-radio> |
| | | </div> |
| | | </el-row> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-form> |