modified: src/api/quality/finishedProduct.js
modified: src/api/quality/rawMaterial.js
modified: src/router/views/index.js
new file: src/views/common/rawMaterial-part.vue
modified: src/views/common/ztt-table.vue
modified: src/views/quality/finishedProductInspection/finishedProductInspectionAdd.vue
modified: src/views/quality/finishedProductInspection/index.vue
modified: src/views/quality/rawMaterial/rawMaterial-form.vue
| | |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function addFinish(obj) { |
| | | return request({ |
| | | url: '/mes/qualityFinishedInspect/addFinish', |
| | | method: 'post', |
| | | data: obj |
| | | }) |
| | | } |
| | | |
| | | export function queryById(obj) { |
| | | return request({ |
| | | url: '/mes/qualityFinishedInspect/'+obj, |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | export function chooseIFS(data) { |
| | | return request({ |
| | | url: '/mes/rawInspect/chooseIFS', |
| | | method: 'post', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | | export function selectHisByCode(data) { |
| | | return request({ |
| | | url: '/mes/rawInsProduct/seleHisByCode', |
| | | method: 'get', |
| | | params: data |
| | | }) |
| | | } |
| | | |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/quality/finishedProduct', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: 'finishedProduct-form', |
| | | name: 'finishedProductForm', |
| | | component: () => |
| | | import(/* webpackChunkName: "views" */ '@/views/quality/finishedProductInspection/finishedProductInspectionAdd'), |
| | | meta: { |
| | | keepAlive: false, |
| | | isTab: false, |
| | | isAuth: false |
| | | } |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/quality/newReport', |
| | | component: Layout, |
| | | children: [ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | v-diadrag |
| | | width="60%" |
| | | title="æ¥æ£ä¿¡æ¯" |
| | | top="5vh" |
| | | :visible.sync="innerVisible" |
| | | append-to-body |
| | | @close="$emit('update:currshowlist', false)" |
| | | :show="currshowlist" |
| | | class="part-dialog" |
| | | id="rawMaterial-part-dialog" |
| | | > |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | @currentChange="handleCurrentChange" |
| | | :uploadInfo="uploadInfo" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :bottomOffset="350" |
| | | :ajaxFun="ajaxFun" |
| | | :paramObj="paramObj" |
| | | :isShowPagination="false" |
| | | ref="rawPartTable" |
| | | > |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="innerVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveSelectRow">ç¡® å®</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import ttable from '@/views/common/ztt-table' |
| | | import { chooseIFS } from '@/api/quality/rawMaterial' |
| | | export default { |
| | | props: { |
| | | currshowlist: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | paramObj: { |
| | | type: Object, |
| | | default: () => { |
| | | return {} |
| | | } |
| | | }, |
| | | multiSelect: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | parentSelectedObj: { |
| | | type: Object, |
| | | default: null |
| | | }, |
| | | parentSelectedIndex: { |
| | | type: Number, |
| | | default: null |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | ajaxFun: chooseIFS, |
| | | innerVisible: false, |
| | | listLoading: true, |
| | | currentRow: null, |
| | | multipleSelection: [], |
| | | uploadInfo: { |
| | | // æ¯å¦å±ç¤ºä¸ä¼ EXCEL以å对åºçurl |
| | | isShow: false, |
| | | url: '' |
| | | }, |
| | | prelang: 'operation', |
| | | options: { |
| | | height: 300, // é»è®¤é«åº¦-为äºè¡¨å¤´åºå® |
| | | stripe: true, // æ¯å¦ä¸ºæé©¬çº¹ table |
| | | highlightCurrentRow: false, // æ¯å¦è¦é«äº®å½åè¡ |
| | | border: true, // æ¯å¦æçºµåè¾¹æ¡ |
| | | lazy: false, // æ¯å¦éè¦æå è½½ |
| | | fit: true, // åç宽度æ¯å¦èªæå¼ |
| | | multiSelect: false, // |
| | | seqNo: true, |
| | | isGeneralSearch: false, |
| | | isRefresh: false, // æ¯å¦æ¾ç¤ºå·æ°æé® |
| | | isShowHide: false, // æ¯å¦æ¾ç¤ºæ¾å½±æé® |
| | | isSearch: false, // é«çº§æ¥è¯¢æé® |
| | | defaultOrderBy: { column: 'formTime', direction: 'desc' } |
| | | }, |
| | | table: { |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | data: [], |
| | | // æ é¢ |
| | | column: [ |
| | | { |
| | | minWidth: '100', |
| | | prop: 'message', |
| | | label: 'message', |
| | | isTrue: false, |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'code', |
| | | label: 'é¶ä»¶å·', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'name', |
| | | label: 'åææåç§°', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'formTime', |
| | | label: 'æ¥ææ¥æ', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'specs', |
| | | label: 'è§æ ¼åå·', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'unit', |
| | | label: 'åä½', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'supplier', |
| | | label: 'ä¾åºå', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '100', |
| | | prop: 'number', |
| | | label: 'æ°é', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | ], |
| | | }, |
| | | } |
| | | }, |
| | | components: { |
| | | ttable |
| | | }, |
| | | created(){ |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | getData() { |
| | | if (this.$refs.rawPartTable !== undefined) { |
| | | this.$refs.rawPartTable.getDataList() |
| | | } |
| | | }, |
| | | saveSelectRow() { |
| | | if (this.multiSelect) { |
| | | this.$emit('handleSelectionChange', this.multipleSelection) |
| | | } else { |
| | | this.$emit( |
| | | 'listenToPartEvent', |
| | | this.currentRow, |
| | | this.parentSelectedObj, |
| | | this.parentSelectedIndex |
| | | ) |
| | | } |
| | | this.innerVisible = false |
| | | }, |
| | | handleCurrentChange(row) { |
| | | this.currentRow = row |
| | | }, |
| | | handleSelectionChange(val) { |
| | | // å¤è¡éä¸ |
| | | this.multipleSelection = val |
| | | }, |
| | | }, |
| | | watch: { |
| | | currshowlist() { |
| | | this.innerVisible = this.currshowlist |
| | | if (this.currshowlist) { |
| | | this.$nextTick(() => { |
| | | this.getData() |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | <style> |
| | | .part-dialog .el-dialog__header { |
| | | padding: 10px 20px 10px; |
| | | } |
| | | .part-dialog .el-dialog__header .el-dialog__headerbtn { |
| | | top: 10px; |
| | | } |
| | | .part-dialog .el-dialog__body { |
| | | padding: 5px 20px; |
| | | } |
| | | |
| | | .part-dialog .el-dialog__footer { |
| | | padding: 5px 20px 10px; |
| | | } |
| | | |
| | | .part-dialog .el-dialog__body .avue-crud__pagination { |
| | | margin-top: 0px; |
| | | margin-bottom: 5px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | .apply(this, args) |
| | | .then((response) => { |
| | | var _this = this |
| | | _this.tableData = response.data.data.records |
| | | var resultData = response.data.data.records |
| | | if(resultData == undefined){ |
| | | _this.tableData = response.data.data |
| | | }else{ |
| | | _this.tableData = response.data.data.records |
| | | } |
| | | _this.pagination.total = response.data.data.total |
| | | // 置空éä¸ |
| | | this.$refs.lmesTable.setCurrentRow() |
| | |
| | | <h2>ç¼è¾-äº§åæ£éª</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | | <el-button @click="addTestProjevt">çææ£éªé¡¹ç®</el-button> |
| | | <el-button @click="addTestProject">çææ£éªé¡¹ç®</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 100%" @change="changeOptionsSamplename" |
| | | v-model="processInspectVo.material" size="small" placeholder="è¯·éæ©äº§ååç§°"> |
| | | <el-option v-for="item in optionsSamplename" :key="item.id" :label="item.name" |
| | | :value="item.id + '-' + item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-form-item label="è´¨é追溯å·ï¼"> |
| | | <el-input disabled v-model="processInspectVo.qualityTraceability" |
| | | placeholder="请è¾å
¥è´¨é追溯å·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="è´¨é追溯å·ï¼"> |
| | | <el-input disabled v-model="processInspectVo.qualityTraceability" |
| | | placeholder="请è¾å
¥è¿½æº¯å·" autocomplete="off" /> |
| | | <el-form-item label="产ååç§°ï¼"> |
| | | <el-select style="width: 100%" @change="changeOptionsSamplename" |
| | | 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-col :span="6"> |
| | | <el-form-item label="è§æ ¼åå·ï¼"> |
| | | <el-input disabled v-model="processInspectVo.specificationsModel" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | placeholder="请è¾å
¥è§æ ¼åå·" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="åä½ï¼"> |
| | | <el-input disabled v-model="processInspectVo.unit" |
| | | placeholder="请è¾å
¥äº§åç¼ç " autocomplete="off" /> |
| | | placeholder="请è¾å
¥åä½" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-row> |
| | | <el-row style="width:100%;"> |
| | | <el-col :span="24"> |
| | | <el-table border :data="inspectionItems" max-height="400" :span-method="handleSpanMethod" height="calc(100vh - 550px)" |
| | | style="width: 100%"> |
| | | <el-table border :data="inspectionItems" max-height="400" height="calc(100vh - 550px)" |
| | | :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" |
| | | :cell-style="{textAlign:'center'}" row-key="iid" |
| | | 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"></el-table-column> |
| | | <el-table-column prop="name" label="ææ "></el-table-column> |
| | | <el-table-column prop="unit" label="åä½"></el-table-column> |
| | | <el-table-column prop="iname" label="ææ "></el-table-column> |
| | | <el-table-column prop="iunit" label="åä½"></el-table-column> |
| | | <el-table-column prop="required" label="æ åå¼"></el-table-column> |
| | | <el-table-column prop="internal" label="å
æµå¼"></el-table-column> |
| | | <el-table-column prop="inspectionValue" v-for="(item, index) in empiricalValueAdd" :key="index" label="æ£æµå¼" |
| | | min-width="100" style="text-align: center;"> |
| | | <template slot-scope="scope"> |
| | | <el-tooltip :disabled="scope.row.dname != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" |
| | | placement="top-start"> |
| | | <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> |
| | | <!-- <el-input :disabled="scope.row.dname === null" v-model="scope.row.empiricalValueAddss[index]" |
| | | @blur="changeState(scope.row, index)" placeholder="请è¾å
¥æ£æµå¼"></el-input> --> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º"> |
| | | <el-table-column prop="deviceName" label="è¯éªè®¾å¤" min-width="260"> |
| | | <template slot-scope="scope"> |
| | | <el-select style="width:100%" v-model="scope.row.equipmentId" filterable @change="updateDevice(scope.row)"> |
| | | <el-option v-for="(item,index) in deviceList" |
| | | :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç»è®º" fixed="right" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | |
| | | </el-row> |
| | | <el-row style="width:100%;margin-top:-180px"> |
| | | <el-col :span="24"> |
| | | <el-table border max-height="400" :data="inspectionResultForm"> |
| | | <el-table border max-height="400" :data="inspectionResultForm" |
| | | :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" |
| | | :cell-style="{textAlign:'center'}"> |
| | | <el-table-column prop="id" label="ç©æç¼å·"></el-table-column> |
| | | <el-table-column prop="name" label="ç©æåç§°"></el-table-column> |
| | | <el-table-column prop="inspecter" label="æ£éªå"></el-table-column> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | chooseMater, |
| | | addFinish, |
| | | queryById, } from '@/api/quality/finishedProduct' |
| | | import { updateDeviceById,selectDevice } from '@/api/quality/rawMaterial' |
| | | export default { |
| | | data() { |
| | | return { |
| | | deviceList: [], |
| | | hasChildren: true, |
| | | showUp: false, |
| | | isAddProject: false, |
| | | showLook: false, |
| | |
| | | mcode: null, |
| | | prname: null, |
| | | sname: null, |
| | | orderNumber: "", |
| | | orderNumber: "ZTTIC20230001", |
| | | qualityTraceability: null, |
| | | quantity: null, |
| | | specificationsModel: null, |
| | |
| | | }; |
| | | }, |
| | | watch: { |
| | | // filterText(val) { |
| | | // this.$refs.tree.filter(val); |
| | | // } |
| | | }, |
| | | beforeUpdate(){ |
| | | this.$nextTick(()=>{ |
| | | this.$refs.table.doLayout(); |
| | | }) |
| | | }, |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | // this.getOptions(); |
| | | this.getDeviceList() |
| | | }, |
| | | methods: { |
| | | changeOptionsSamplename() { |
| | | let id = this.processInspectVo.material.split("-")[0] |
| | | let sample = this.optionsSamplename.filter(o => { |
| | | return o.id == id |
| | | })[0] |
| | | this.processInspectVo.qualityTraceability = sample.qualityTraceability |
| | | this.processInspectVo.mcode = sample.mcode |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | getDeviceList(){ |
| | | selectDevice(null).then(res=>{ |
| | | this.deviceList = res.data.data |
| | | }) |
| | | }, |
| | | comBack() { |
| | | this.$parent.comBackMain() |
| | | updateDevice(row){ |
| | | if(this.dataForm.id != null){ |
| | | updateDeviceById({equiomentId:row.equipmentId,rpId:row.rpId}).then(res=>{ |
| | | }).catch(error=>{ |
| | | console.log(error) |
| | | }) |
| | | } |
| | | }, |
| | | changeOptionsSamplename(val) { |
| | | let sample = this.optionsSamplename.filter(o => { |
| | | return o.materialCode == val |
| | | })[0] |
| | | // this.processInspectVo.qualityTraceability = sample.qualityTraceability |
| | | this.processInspectVo.mcode = sample.materialCode |
| | | this.processInspectVo.material = sample.material |
| | | this.processInspectVo.specificationsModel = sample.specs |
| | | this.processInspectVo.unit = sample.unit |
| | | }, |
| | | handleClick(row) { |
| | | this.rowInfp = row |
| | |
| | | this.rowInfp = row |
| | | this.showUp = true |
| | | }, |
| | | combackMain() { |
| | | this.showUp = false |
| | | this.showLook = false |
| | | }, |
| | | searchPro() { |
| | | this.search.countSize = this.pageSize |
| | | this.search.pageSize = this.currentPage |
| | | this.defaultInitializationTable() |
| | | }, |
| | | // ç¹å»è®¾å¤æ ä¿åç¹å»è®°å½ |
| | | nodeClick(data) { |
| | | if (data.id != undefined) this.nodeData = data; |
| | | }, |
| | | // è®¾å¤æ è¿æ»¤æç´¢ |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | // è·åè®¾å¤æ å
容 |
| | | getOptions(row) { |
| | | this.$axios.get(this.$api.url.inspectionItemChooseDev, { |
| | | params: { |
| | | father: row.father, |
| | | name: row.name, |
| | | technologyId: this.processInspectVo.technologyId |
| | | } |
| | | }).then(res => { |
| | | this.materialOptions = res.data; |
| | | this.filterText = row.did |
| | | if(this.materialOptions.length===1){ |
| | | this.$message({ |
| | | message: '该项ç®ä¸åªæä¸ä¸ªè¯éªè®¾å¤ï¼æ ééæ©ï¼', |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | row.isSelectDevice = true |
| | | }); |
| | | }, |
| | | // ç¹å»è¡¨æ ¼éæ©è§¦å |
| | | clickTableSelect(scope) { |
| | |
| | | this.clickSelectDevice.index = scope.$index; |
| | | this.clickSelectDevice.rpId = scope.row.id; |
| | | this.getOptions(scope.row); |
| | | }, |
| | | // ç¹å»æ éé¢çç¡®å® |
| | | clickNodeSure(row) { |
| | | let select = this.materialOptions.filter(item => { |
| | | return item.id === this.filterText |
| | | })[0] |
| | | this.nodeData.id = select.id |
| | | this.nodeData.name = select.device |
| | | if (this.detailId == null) { |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].did = this.nodeData.id; |
| | | this.inspectionItems[ |
| | | this.clickSelectDevice.index |
| | | ].dname = this.nodeData.name; |
| | | this.centerDialogVisible = false; |
| | | } else { |
| | | this.$axios |
| | | .post(this.$api.url.inspectionItemUpdateDevByInsId, { |
| | | id: this.clickSelectDevice.rpId, |
| | | type: 2, |
| | | devId: this.nodeData.id |
| | | }) |
| | | .then(res => { |
| | | this.getTableData() |
| | | this.centerDialogVisible = false; |
| | | row.isSelectDevice=false |
| | | }); |
| | | } |
| | | }, |
| | | changeState(row, index) { |
| | | if (row.did != null && row.did != '') { |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // æ¯é¡µæ¡æ°æ¹åæ¶è§¦å éæ©ä¸é¡µæ¾ç¤ºå¤å°è¡ |
| | | handleSizeChange(val) { |
| | | this.search.countSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | handleSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | | if (columnIndex === 0) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | addTestProject() { |
| | | let val = this.processInspectVo |
| | | let data = { |
| | | customerName: val.prname, |
| | | material: val.material, |
| | | materialCode: val.mcode, |
| | | orderNumber: val.orderNumber, |
| | | projectName: val.sname, |
| | | quantity: val.quantity, |
| | | specs: val.specificationsModel, |
| | | unit: val.unit, |
| | | } |
| | | if (columnIndex === 1) { |
| | | const _row = this.spanArr[rowIndex]; |
| | | const _col = _row > 0 ? 1 : 0; |
| | | return { |
| | | rowspan: _row, |
| | | colspan: _col |
| | | } |
| | | } |
| | | }, |
| | | // åå¹¶è¡¨æ ¼ |
| | | mergeTable() { |
| | | this.rowList = [] |
| | | this.spanArr = [] |
| | | this.position = 0 |
| | | this.inspectionItems.forEach((item, index) => { |
| | | if (index === 0) { |
| | | this.spanArr.push(1); |
| | | this.position = 0; |
| | | } else { |
| | | if (this.inspectionItems[index].father === this.inspectionItems[index - 1].father) { |
| | | this.spanArr[this.position] += 1; |
| | | this.spanArr.push(0); |
| | | } else { |
| | | this.spanArr.push(1); |
| | | this.position = index; |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | changeOptionSoptionSprocesses() { |
| | | this.optionTechnology = [] |
| | | let working = this.optionSoptionSprocesses.filter(item => { |
| | | return item.name === this.processInspectVo.techfather |
| | | })[0] |
| | | this.optionTechnology = working.children |
| | | }, |
| | | addTestProjevt() { |
| | | // this.isAddProject = true |
| | | let val = JSON.parse(JSON.stringify(this.processInspectVo)) |
| | | val.material = this.processInspectVo.material.split("-")[1] |
| | | val.id = this.processInspectVo.material.split("-")[0] |
| | | this.$axios.post(this.$api.url.finishedInspectAddFinish, val, { |
| | | headers: { "Content-Type": "application/json" } |
| | | }).then(res => { |
| | | if (res.code == 201) { |
| | | this.$message({ |
| | | message: res.message, |
| | | type: 'warning' |
| | | }); |
| | | return |
| | | } |
| | | this.detailId = res.data |
| | | this.inspectionResultForm[0].id = val.mcode |
| | | this.inspectionResultForm[0].name = val.material |
| | | this.getTableData() |
| | | }) |
| | | }, |
| | | getTableData() { |
| | | this.$axios.get(this.$api.url.finishedInspectSelectFinishInspectsListById, { |
| | | params: { |
| | | id: this.detailId |
| | | } |
| | | }).then(res => { |
| | | this.processInspectVo.technologyId = res.data[0].techId |
| | | }) |
| | | this.$axios.get(this.$api.url.inspectionItemListUser, { |
| | | params: { |
| | | id: this.detailId, |
| | | type: 2 |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length < 1) { |
| | | return |
| | | } |
| | | this.inspectionItems = res.data |
| | | let arr = [] |
| | | let val = JSON.parse(JSON.stringify(this.inspectionItems)) |
| | | const uName = [] |
| | | //转æä¸ç»´æ°ç» |
| | | val.forEach(l => { |
| | | let father = l.father |
| | | l.children.forEach(c => { |
| | | c.father = father |
| | | c.empiricalValueAddss = [] |
| | | if (c.inspectionValue != '' && c.inspectionValue != null) { |
| | | c.empiricalValueAddss = c.inspectionValue.split(","); |
| | | } else { |
| | | c.empiricalValueAddss.push("") |
| | | } |
| | | uName.push(c['username']) |
| | | c.isSelectDevice = false |
| | | arr.push(c) |
| | | addFinish(data).then(res=>{ |
| | | let id = res.data.data |
| | | if(id != null){ |
| | | queryById(id).then(response=>{ |
| | | console.log(response.data.data.children) |
| | | let proList = response.data.data.children |
| | | proList.forEach(item=>{ |
| | | item.iid = Math.random(); |
| | | }) |
| | | this.inspectionItems = proList |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }) |
| | | }) |
| | | this.inspectionItems = arr |
| | | let arrSort = JSON.parse(JSON.stringify(arr)) |
| | | //æ ¹æ®éå对象æ°ç»é¿åº¦æåº |
| | | arrSort.sort((a, b) => { |
| | | if (a.empiricalValueAddss.length < b.empiricalValueAddss.length) { |
| | | return -1; // aæå¨båé¢ |
| | | } else if (a.empiricalValueAddss.length > b.empiricalValueAddss.length) { |
| | | return 1; // aæå¨båé¢ |
| | | } else { |
| | | return 0; // ä¿æç¸å¯¹é¡ºåºä¸å |
| | | } |
| | | }); |
| | | // console.log(arrSort); |
| | | console.log(uName); |
| | | let name = [...new Set(uName)].filter(item => item !== null); |
| | | let rname = '' |
| | | name.forEach(m => { |
| | | rname += m + "," |
| | | }) |
| | | this.inspectionResultForm[0].inspecter = rname.slice(0, -1) |
| | | this.empiricalValueAdd = arrSort[arrSort.length - 1].empiricalValueAddss.length |
| | | this.mergeTable(arr) |
| | | } |
| | | }).catch(error=>{ |
| | | console.log(error) |
| | | }) |
| | | }, |
| | | selectSample() { |
| | | let sample = this.optionsSamplename.filter(item => { |
| | | return item.name === this.processInspectVo.material |
| | | })[0] |
| | | this.processInspectVo.techfather = null |
| | | this.processInspectVo.techname = null |
| | | this.processInspectVo.materialCode = sample.code |
| | | this.processInspectVo.specificationsModel = sample.specifications |
| | | this.processInspectVo.unit = sample.unit |
| | | this.optionSoptionSprocesses = [] |
| | | this.optionSoptionSprocesses = sample.children |
| | | }, |
| | | selectInfoByOrderId() { |
| | | this.$axios.get(this.$api.url.finishedInspectChooseMater, { |
| | | params: { |
| | | chooseMater({ |
| | | orderNumber: this.processInspectVo.orderNumber |
| | | } |
| | | }).then(res => { |
| | | if (res.data.length > 0) { |
| | | console.log(res.data); |
| | | this.processInspectVo.sname = res.data[0].sname |
| | | this.processInspectVo.prname = res.data[0].prname |
| | | this.optionsSamplename = res.data[0].children |
| | | }).then(res => { |
| | | if (res.data.data != null) { |
| | | this.processInspectVo.sname = res.data.data.projectName |
| | | this.processInspectVo.prname = res.data.data.customerName |
| | | this.optionsSamplename = res.data.data.children |
| | | } else { |
| | | this.$message({ |
| | | message: '没æè¯¥è®¢åå·ï¼', |
| | | type: 'warning' |
| | | }); |
| | | this.processInspectVo.sname = null |
| | | this.processInspectVo.prname = null |
| | | this.optionsSamplename = [] |
| | | this.processInspectVo.mcode = null |
| | | this.processInspectVo.material = null |
| | | this.processInspectVo.specificationsModel = null |
| | | this.processInspectVo.unit = null |
| | | } |
| | | }) |
| | | }, |
| | | // å½å页æ¹åæ¶è§¦å 跳转å
¶ä»é¡µ |
| | | handleCurrentChange(val) { |
| | | this.search.pageSize = val; |
| | | this.defaultInitializationTable(); |
| | | }, |
| | | // æ¾ç¤ºæ°å¢é¡µé¢ |
| | | handleAddNew() { |
| | | this.showAddPage = true; |
| | | // this.getTableData() |
| | | }, |
| | | // è¡¨æ ¼åå§åæ¥å£ |
| | | defaultInitializationTable() { |
| | | this.$axios |
| | | .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | .then(res => { |
| | | this.inspectionTableTotal = res.data.total; |
| | | this.inspectionTable = res.data.row; |
| | | }); |
| | | // this.$axios |
| | | // .post(this.$api.url.selectProcessInspectsList, this.search) |
| | | // .then(res => { |
| | | // this.inspectionTableTotal = res.data.total; |
| | | // this.inspectionTable = res.data.row; |
| | | // }); |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | } |
| | | }, |
| | | created() { |
| | | this.defaultInitializationTable(); // åå§åè¡¨æ ¼æ°æ® |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | |
| | | .finishedProduct-basic { |
| | | background-color: #fff; |
| | | height: 150px; |
| | | height: 155px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 10px 20px; |
| | |
| | | <template> |
| | | <div class="content-main"> |
| | | <div v-if="!showAdd&&!showLook&&!showUp" class="rawPage"> |
| | | <!-- <div class="nav"> --> |
| | | <!-- <div class="title"> |
| | | <el-row> |
| | | <el-col :span="12">äº§åæ£éª</el-col> |
| | | <el-col :span="12"> |
| | | <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 icon="el-icon-download" size="mini">导åº</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> --> |
| | | <!-- <span>æ£æµç»æï¼</span> |
| | | <el-select v-model="searchData.result" size="small" placeholder="è¯·éæ©" style="width: 224px;margin-right: 52px;"> |
| | | <el-option :value="''" label="å
¨é¨"></el-option> |
| | | <el-option :value="1" label="åæ ¼"></el-option> |
| | | <el-option :value="0" label="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | <span>产ååç§°ï¼</span> |
| | | <el-input v-model="searchData.material" size="small" placeholder="请è¾å
¥äº§ååç§°" |
| | | style="width: 224px;margin-right: 52px;"></el-input> |
| | | <el-button size="mini" @click="()=>{searchData={};getInspectionTableData()}"><span>é ç½®</span></el-button> |
| | | <el-button size="mini" type="primary" @click="getInspectionTableData" style="background: #004EA2;"><span>æ¥ |
| | | 询</span></el-button> --> |
| | | <!-- </div> --> |
| | | <div class="rawPage"> |
| | | <basic-container> |
| | | <ttable |
| | | :table="table" |
| | |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | </basic-container> |
| | | <!-- <div class="content-body"> |
| | | <div class="inspectionTable"> |
| | | <el-table ref="inspectionTable" height="620" :cell-style="{textAlign: 'center'}" |
| | | :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" |
| | | :data="inspectionTable" style="width: 100%"> |
| | | <el-table-column type="selection" width="50"> |
| | | </el-table-column> |
| | | <el-table-column prop="order_number" label="订åå·" min-width="100" /> |
| | | <el-table-column prop="customer_name" label="客æ·åç§°" min-width="80" /> |
| | | <el-table-column prop="project_name" label="å·¥ç¨åç§°" min-width="80" /> |
| | | <el-table-column prop="quality_traceability" label="è´¨é追溯å·" min-width="108" /> |
| | | <el-table-column prop="material_code" label="产åç¼ç " min-width="100" /> |
| | | <el-table-column prop="material" label="产å大类" min-width="72" /> |
| | | <el-table-column 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="detectionPeriod" label="æ£éªæ¥æ" min-width="80" /> |
| | | <el-table-column prop="result" label="æ£æµç»æ" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <span style="color: #34BD66;" v-if="scope.row.result === 1">åæ ¼</span> |
| | | <span style="color: #E84738;" v-else-if="scope.row.result === 0">ä¸åæ ¼</span> |
| | | <span v-else-if="scope.row.result === null || scope.row.result === undefined">ææªç»è®º</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" min-width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small" @click="goToDetail(scope.row)">æ¥ç</el-button> |
| | | <el-button type="text" size="small">æå°</el-button> |
| | | <el-button v-if="scope.row.result == null" type="text" size="small" |
| | | @click="goUp(scope.row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> --> |
| | | <!-- åé¡µå¨ --> |
| | | <!-- <div class="pagination"> |
| | | <el-pagination :current-page="pageParams.pageSize" :page-sizes="[10, 50, 100, 200]" |
| | | :page-size="pageParams.countSize" layout="total, sizes, prev, pager, next, jumper" :total="pageParams.total" |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange" /> |
| | | </div> --> |
| | | <!-- </div> --> |
| | | </div> |
| | | <div class="newPage" v-if="showAdd"> |
| | | <finishedProductInspectionAdd /> |
| | | </div> |
| | | <div class="newPage" v-if="showLook"> |
| | | <finishedProductInspectionLook :rowInfo="rowInfo" /> |
| | | </div> |
| | | <div class="newPage" v-if="showUp"> |
| | | <finishedProductInspectionUp :rowInfo="rowInfo" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | { |
| | | text: 'æ°å¢', |
| | | type: 'primary', |
| | | fun: ()=>this.showAdd=true |
| | | fun: this.addOrUpdateHandle |
| | | }, |
| | | { |
| | | text: 'å é¤', |
| | |
| | | // this.getInspectionTableData() |
| | | }, |
| | | methods: { |
| | | // æ°å¢ / ä¿®æ¹ |
| | | addOrUpdateHandle(row) { |
| | | this.$router.push({ |
| | | name: 'finishedProductForm', |
| | | query: { id: row == null ? null : row.id } |
| | | }) |
| | | }, |
| | | formatResult(row, column, cellValue){ |
| | | if(cellValue != undefined || cellValue != null){ |
| | | if(cellValue == 0){ |
| | |
| | | }, |
| | | formatDateTime(row, column, cellValue) { |
| | | return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd') : '' |
| | | }, |
| | | addOrUpdateHandle(row) { |
| | | this.$router.push({ |
| | | name: 'rawMaterialForm', |
| | | query: { id: row == null ? null : row.id } |
| | | }) |
| | | }, |
| | | handleSelectionChange(){ |
| | | |
| | |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="rawMaterial-basic"> |
| | | <el-row style="width:100%;height:20px;margin-bottom:20px;" v-show="dataForm.id==null"> |
| | | <el-col :span="20"> |
| | | <span style="color:red;font-size:18px;padding: 0;margin: 0;">è¯·æ«æäºç»´ç è·åæ°æ®</span> |
| | | </el-col> |
| | | <el-col :span="4" style="text-align: right;"> |
| | | <el-button>æ«æäºç»´ç </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form |
| | | :model="dataForm" |
| | | :rules="dataRule" |
| | |
| | | class="l-mes" |
| | | label-width="110px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item prop="formTime" label="æ¥ææ¥æ"> |
| | | <el-date-picker |
| | | v-model="dataForm.formTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | disabled> |
| | | |
| | | </el-date-picker> |
| | | <el-col :span="6"> |
| | | <el-form-item label="é¶ä»¶å·" prop="code"> |
| | | <el-input v-model="dataForm.code"> |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | @click="queryCode()"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="åææç¼ç " prop="code"> |
| | | <el-input v-model="dataForm.code" disabled></el-input> |
| | | <el-form-item prop="formTime" label="æ¥ææ¥æ"> |
| | | <el-date-picker |
| | | v-model="dataForm.formTime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | disabled> |
| | | |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | |
| | | </el-row> |
| | | <el-row style="width:100%;"> |
| | | <el-col :span="24"> |
| | | <el-table :data="list" border style="width: 100%;" height="320"> |
| | | <el-table :header-cell-style="{textAlign:'center',color:'black',backgroundColor:'#fafafa'}" |
| | | :cell-style="{textAlign:'center'}" ref="table" |
| | | :data="list" border style="width: 100%;" height="320"> |
| | | <el-table-column type="index" label="åºå·" width="60"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="项ç®" width="260"> |
| | | <template slot-scope="scope"> |
| | | <el-input :disabled="dataForm.id != null" class="inline-input" v-model="scope.row.name" |
| | | <el-select v-if="projectList.length > 0" :disabled="dataForm.id != null" class="inline-input" v-model="scope.row.name" |
| | | filterable allow-create placeholder="请è¾å
¥æéæ©é¡¹ç®åç§°" style="width:100%" @change="changeName(scope.$index,scope.row)"> |
| | | <el-option v-for="(item,index) in projectList" :key="index" :label="item.name" :value="item.name"/> |
| | | </el-select> |
| | | <el-input v-else :disabled="dataForm.id != null" class="inline-input" v-model="scope.row.name" |
| | | placeholder="请è¾å
¥é¡¹ç®åç§°"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <rawMaterialPartDialog :paramObj="paramObj" :currshowlist.sync="showPart" @listenToPartEvent="selectPart" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | getObj, |
| | | updateRawInsProduct, |
| | | updateRawInspectsById, |
| | | chooseIFS, |
| | | selectHisByCode, |
| | | updateDeviceById, } from '@/api/quality/rawMaterial' |
| | | import rawMaterialPartDialog from '@/views/common/rawMaterial-part' |
| | | export default { |
| | | computed:{}, |
| | | components:{ |
| | | rawMaterialPartDialog |
| | | }, |
| | | data(){ |
| | | return{ |
| | | projectList: [], |
| | | paramObj: {}, |
| | | IFSData: [], |
| | | showPart: false, |
| | | // æ·»å å |
| | | empiricalValueAdd: 1, |
| | | // ç¼è¾æ¶å卿é¿çåæ°åï¼åå é¤å¤æ |
| | |
| | | dataForm:{ |
| | | id: null, |
| | | judgeState: null, |
| | | formTime: '2023-10-28 00:00:00', |
| | | message: '-2050314,1,1,*,1002', |
| | | name: 'name', |
| | | code: 'code4', |
| | | specs: 'specs', |
| | | unit: 'mm', |
| | | number: '111', |
| | | supplier: 'supplier', |
| | | formTime: '', |
| | | message: '', |
| | | name: '', |
| | | code: '88.118.1/A0487643', |
| | | specs: '', |
| | | unit: '', |
| | | number: '', |
| | | supplier: '', |
| | | rawInsProducts: [{ |
| | | equipmentId: 0, |
| | | name: '', |
| | |
| | | deviceList: [], |
| | | } |
| | | }, |
| | | beforeUpdate(){ |
| | | this.$nextTick(()=>{ |
| | | this.$refs.table.doLayout(); |
| | | }) |
| | | }, |
| | | mounted(){ |
| | | this.dataForm.id = this.$route.query.id |
| | | this.init() |
| | |
| | | |
| | | }, |
| | | methods:{ |
| | | changeName(index,row){ |
| | | this.projectList.forEach(item=>{ |
| | | if(row.name == item.name){ |
| | | this.list[index].unit = item.unit |
| | | this.list[index].required = item.required |
| | | } |
| | | }) |
| | | }, |
| | | // 确认åè° |
| | | selectPart(param, nodePart, index) { |
| | | if (typeof param !== 'undefined') { |
| | | this.dataForm.code = param.code |
| | | this.dataForm.name = param.name |
| | | this.dataForm.formTime = param.formTime |
| | | this.dataForm.unit = param.unit |
| | | this.dataForm.specs = param.specs |
| | | this.dataForm.supplier = param.supplier |
| | | this.dataForm.number = param.number |
| | | this.dataForm.message = param.message |
| | | this.projectList = param.rawInsProducts |
| | | } |
| | | }, |
| | | queryCode(){ |
| | | this.paramObj = { |
| | | code: this.dataForm.code |
| | | } |
| | | this.showPart = true |
| | | }, |
| | | updateDevice(row){ |
| | | if(this.dataForm.id != null){ |
| | | updateDeviceById({equiomentId:row.equipmentId,rpId:row.rpId}).then(res=>{ |
| | |
| | | }, |
| | | addTeatValueColumn(){ |
| | | this.empiricalValueAdd = this.empiricalValueAdd + 1; |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | equipmentId: null, |
| | | name: "", |
| | | required: "", |
| | | testValue: "", |
| | | unit: "", |
| | | testState: null, |
| | | testValueList: [], |
| | | }; |
| | | this.list.push(obj); |
| | | }, |
| | | // å é¤è¡ |
| | | clickDeleteline(scope) { |
| | |
| | | this.$message.error(error) |
| | | }) |
| | | }, |
| | | // æ·»å è¡ |
| | | clickAddLine() { |
| | | let obj = { |
| | | equipmentId: null, |
| | | name: "", |
| | | required: "", |
| | | testValue: "", |
| | | unit: "", |
| | | testState: null, |
| | | testValueList: [], |
| | | }; |
| | | this.list.push(obj); |
| | | }, |
| | | getDeviceList(){ |
| | | selectDevice(null).then(res=>{ |
| | | this.deviceList = res.data.data |
| | | }) |
| | | }, |
| | | }, |
| | | computed:{}, |
| | | components:{} |
| | | } |
| | | </script> |
| | | |
| | |
| | | |
| | | .rawMaterial-basic { |
| | | background-color: #fff; |
| | | height: 150px; |
| | | height: 155px; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | padding: 10px 20px; |