Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export function fetchList(query) { |
| | | return request({ |
| | | url: '/mes/mouldRecord/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios' |
| | | |
| | | export function fetchList(query) { |
| | | return request({ |
| | | url: '/mes/mould/page', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function addMould(data) { |
| | | return request({ |
| | | url: '/mes/mould/addMould', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function updateMould(data) { |
| | | return request({ |
| | | url: '/mes/mould/updateMould', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | export function delById(id) { |
| | | return request({ |
| | | url: '/mes/mould/'+id, |
| | | method: 'delete', |
| | | }) |
| | | } |
| | |
| | | åªè½ä¸ä¼ xlsx/xlsæä»¶ï¼ä¸ä¸è¶
è¿10M<el-button |
| | | type="text" |
| | | style="font-size:14px;text-decoration: underline;" |
| | | @click="downDataTemplate(uploadInfo.fileName)" |
| | | @click="downDataTemplate(uploadInfo.fileName)" |
| | | v-if="uploadInfo.download" |
| | | >ä¸è½½æ¨¡æ¿</el-button |
| | | > |
| | |
| | | <template> |
| | | <div class="mod-config"> |
| | | <basic-container> |
| | | <ttable |
| | | :table="table" |
| | | :isShowHide="true" |
| | | :ajaxFun="ajaxFun" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | ref="processconfiguration" |
| | | > |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | <ttable |
| | | @handleSelectionChange="handleSelectionChange" |
| | | :table="table" |
| | | :ajaxFun="ajaxFun" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | ref="mouldTable" |
| | | class="mouldTable" |
| | | > |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | </basic-container> |
| | | <table-form |
| | | v-if="addOrUpdateVisible" |
| | | ></table-form> |
| | | <el-dialog |
| | | :title="editRow==null ? 'æ°å¢':'ä¿®æ¹'" |
| | | :visible.sync="dialogVisible" |
| | | width="40%"> |
| | | <el-form :model="editRow" label-position="right" label-width="100px" ref="editForm" :rules="editRules"> |
| | | <el-form-item prop="code" label="模å
·ç¼ç "> |
| | | <el-input v-model="editRow.code" placeholder="请è¾å
¥æ¨¡å
·ç¼ç ç§°"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="name" label="模å
·åç§°"> |
| | | <el-input v-model="editRow.name" placeholder="请è¾å
¥æ¨¡å
·åç§°"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmSaveOrUpdateMould">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { page, } from '@/api/equipment/mould' |
| | | import TableForm from './mould-from.vue' |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import { fetchList,addMould,updateMould,delById } from '@/api/equipment/moulde' |
| | | import { mapGetters } from 'vuex' |
| | | export default { |
| | | data(){ |
| | | return { |
| | | ajaxFun: page, |
| | | prelang: 'operation', |
| | | addOrUpdateVisible: false, |
| | | diaPrintTab: false, |
| | | editRules: { |
| | | code: [{required:true,message:'请è¾å
¥æ¨¡å
·ç¼å·',trigger:'blur'}], |
| | | name: [{required:true,message:'请è¾å
¥æ¨¡å
·åç§°',trigger:'blur'}] |
| | | }, |
| | | editRow: { |
| | | code: null, |
| | | name: null, |
| | | }, |
| | | dialogVisible: false, |
| | | ajaxFun: fetchList, |
| | | prelang: 'moudle', |
| | | multipleSelection: [], |
| | | dataListLoading: false, |
| | | options: { |
| | | height: 300, // é»è®¤é«åº¦-为äºè¡¨å¤´åºå® |
| | | stripe: true, // æ¯å¦ä¸ºæé©¬çº¹ table |
| | |
| | | // æ é¢ |
| | | column: [ |
| | | { |
| | | minWidth: '140', |
| | | prop: 'packageNo', |
| | | label: '设å¤', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | },{ |
| | | minWidth: '140', |
| | | prop: 'outBatchNo', |
| | | minWidth: '140px', |
| | | prop: 'code', |
| | | label: '模å
·ç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | |
| | | render: { fun: this.addOrUpdateHandle } |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'partNo', |
| | | minWidth: '140px', |
| | | prop: 'name', |
| | | label: '模å
·åç§°', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'partName', |
| | | label: 'å·¥åº', |
| | | minWidth: '140px', |
| | | prop: 'createUser', |
| | | label: '责任人', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'specs', |
| | | label: 'å·¥æ¥', |
| | | minWidth: '140px', |
| | | prop: 'status', |
| | | label: '模å
·ç¶æ', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'unit', |
| | | label: '寿å½è½¬æ¢ç³»æ°', |
| | | minWidth: '140px', |
| | | prop: 'createTime', |
| | | label: 'å建æ¶é´', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | searchInfoType: 'date', |
| | | formatter: this.formatDateTime |
| | | }, |
| | | ], |
| | | toolbar: [{ |
| | | text: 'æ°å¢', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }], |
| | | operator: [{ |
| | | text: 'å é¤', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | }], |
| | | toolbar: [], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: 100, |
| | | minWidth: 100 |
| | | }, |
| | | }, |
| | | }, |
| | | } |
| | | }, |
| | | // computed: { |
| | | // ...mapGetters(['permissions']) |
| | | // }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | components: { |
| | | ttable, |
| | | TableForm |
| | | }, |
| | | watch: { |
| | | dialogVisible(newVal){ |
| | | if(!newVal){ |
| | | this.editRow = { |
| | | code: null, |
| | | name: null, |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created(){ |
| | | if(this.permissions.equipment_mould_add){ |
| | | this.table.toolbar.push({ |
| | | text: 'æ°å¢', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle |
| | | }) |
| | | } |
| | | if(this.permissions.equipment_mould_del){ |
| | | this.table.operator = [{ |
| | | text: 'å é¤', |
| | | type: 'text', |
| | | fun: this.deleteHandle |
| | | }] |
| | | } |
| | | }, |
| | | mounted(){ |
| | | |
| | | }, |
| | | methods: { |
| | | addOrUpdateHandle() { |
| | | this.addOrUpdateVisible = true |
| | | console.log(this.addOrUpdateVisible,"--=--"); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | deleteHandle(row){ |
| | | this.$confirm('æ¯å¦ç¡®è®¤å 餿¨¡å
·å称为' + row.name, 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | closeOnClickModal: false, |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | return delById(row.id) |
| | | }).then((data) => { |
| | | this.$message.success('å 餿å') |
| | | this.getData() |
| | | }) |
| | | }, |
| | | confirmSaveOrUpdateMould(){ |
| | | this.$refs.editForm.validate(valid=>{ |
| | | if(valid){ |
| | | if(this.editRow.id){ |
| | | updateMould(this.editRow).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("ä¿®æ¹æå") |
| | | this.getData() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }else{ |
| | | addMould(this.editRow).then(res=>{ |
| | | if(res.status===200){ |
| | | this.$message.success("æ°å¢æå") |
| | | this.getData() |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | } |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | | }, |
| | | addOrUpdateHandle(row){ |
| | | if(row){ |
| | | this.editRow = row |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | formatDateTime(row, column, cellValue) { |
| | | return cellValue ? fecha.format(new Date(cellValue), 'yyyy-MM-dd HH:mm:ss') : '' |
| | | }, |
| | | getData() { |
| | | this.$refs.mouldTable.getDataList() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | </script> |
| | | <style scoped> |
| | | .mouldTable >>>.el-table__fixed-right .el-table__fixed-body-wrapper { |
| | | top: 74px !important; |
| | | } |
| | | </style> |
| | |
| | | :isShowHide="true" |
| | | :ajaxFun="ajaxFun" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :options="options" |
| | | ref="processconfiguration" |
| | | > |
| | | <template #toolbar> |
| | |
| | | |
| | | <script> |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { fetchList, } from '@/api/quality/finishedDelivery' |
| | | |
| | | import * as fecha from 'element-ui/lib/utils/date' |
| | | import { fetchList, } from '@/api/equipment/mouldRecord' |
| | | import { mapGetters } from 'vuex' |
| | | export default { |
| | | data(){ |
| | | return { |
| | |
| | | { |
| | | minWidth: '140', |
| | | prop: 'packageNo', |
| | | label: '设å¤', |
| | | label: 'æ¥å·¥åå·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | },{ |
| | | minWidth: '140', |
| | | prop: 'outBatchNo', |
| | | label: '模å
·ç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'partNo', |
| | | label: '模å
·åç§°', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'partName', |
| | | label: 'å·¥åº', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'specs', |
| | | label: 'å·¥æ¥', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'unit', |
| | | label: 'æ¹å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'number', |
| | | label: '产é', |
| | | prop: 'partNo', |
| | | label: 'å·¥åç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'number', |
| | | label: '寿å½è½¬æ¢ç³»æ°', |
| | | prop: 'partName', |
| | | label: 'å·¥ä½ç«åç§°', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'number', |
| | | label: '使ç¨é', |
| | | prop: 'specs', |
| | | label: '使ç¨äººç¼å·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'number', |
| | | label: 'æ¥å·¥åå·', |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '130', |
| | | prop: 'createUser', |
| | | label: 'ç¶æ', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | |
| | | ], |
| | | toolbar: [], |
| | | // operator: [], |
| | | // operatorConfig: {} |
| | | operator: null, |
| | | operatorConfig: {} |
| | | }, |
| | | } |
| | | }, |
| | | // computed: { |
| | | // ...mapGetters(['permissions']) |
| | | // }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | | }, |
| | | components: { |
| | | ttable |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | }, |
| | | methods: { |
| | | //å
è£
详æ
|
| | | |
| | | |
| | | //æå°æé® |
| | | printFun() { |
| | | this.diaPrintTab = false; |
| | |
| | | <div class="page-header"> |
| | | <div class="header-left"> |
| | | <a @click="$router.go(-1)"><i class="icon-btn-back"></i></a> |
| | | <h2 v-if="resultVal!=null && dataForm.id!=null">æ¥ç-åæææ£éª</h2> |
| | | <h2 v-if="(resultVal!=null || resultVal!='') && dataForm.id!=null">æ¥ç-åæææ£éª</h2> |
| | | <h2 v-else>ç¼è¾-åæææ£éª</h2> |
| | | </div> |
| | | <div class="btn-group header-right"> |
| | |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-search" |
| | | :disabled="resultVal!=null" |
| | | :disabled="(resultVal!=null || resultVal!='')" |
| | | @click="queryCode"></el-button> |
| | | <el-button |
| | | slot="append" |
| | | icon="el-icon-full-screen" |
| | | :disabled="resultVal!=null" |
| | | :disabled="(resultVal!=null || resultVal!='')" |
| | | @click="Turnonthecamera"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="æ°é" prop="number"> |
| | | <el-input v-model="dataForm.number" :disabled="resultVal!=null" /> |
| | | <el-input v-model="dataForm.number" :disabled="(resultVal!=null || resultVal!='')" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <template slot-scope="scope"> |
| | | <div v-if="!scope.row.children"> |
| | | <el-tooltip :disabled="scope.row.deviceId != null" class="item" effect="dark" content="请å
éæ©è®¾å¤ï¼" placement="top-start"> |
| | | <!-- <el-autocomplete clearable |
| | | :disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)" |
| | | @blur="changeState(scope.row,scope.$index)" |
| | | <el-autocomplete clearable |
| | | :disabled="scope.row.deviceId == null || (dataForm.id!=null&&(resultVal!=null || resultVal!=''))" |
| | | @input="changeState(scope.row,scope.$index)" |
| | | v-model="scope.row.testValueList[index]" |
| | | :fetch-suggestions="querySearch" |
| | | placeholder="请è¾å
¥æéæ©æ£æµå¼" > |
| | |
| | | <template slot-scope="{ item }"> |
| | | <div>{{ item.value }}</div> |
| | | </template> |
| | | </el-autocomplete> --> |
| | | </el-autocomplete> |
| | | |
| | | <el-select style="width:100%" filterable |
| | | :disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)" |
| | | <!-- <el-select style="width:100%" filterable |
| | | :disabled="scope.row.deviceId == null || (dataForm.id!=null&&(resultVal!=null || resultVal!=''))" |
| | | v-model="scope.row.testValueList[index]" |
| | | placeholder="请è¾å
¥æéæ©æ£æµå¼" |
| | | allow-create |
| | |
| | | > |
| | | <el-option label="æ¯" value="æ¯"/> |
| | | <el-option label="å¦" value="å¦"/> |
| | | </el-select> |
| | | </el-select> --> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | |
| | | <el-table-column prop="deviceName" label="è¯éªè®¾å¤" min-width="200"> |
| | | <template slot-scope="scope"> |
| | | <div v-if="!scope.row.children"> |
| | | <el-select ref="" :disabled="dataForm!=null && resultVal!=null" style="width:60%" |
| | | <el-select ref="" :disabled="dataForm!=null && (resultVal!=null || resultVal!='')" style="width:60%" |
| | | v-model="scope.row.deviceId" 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> |
| | |
| | | size="small" |
| | | slot="append" |
| | | icon="el-icon-full-screen" |
| | | :disabled="dataForm!=null && resultVal!=null" |
| | | :disabled="dataForm!=null && (resultVal!=null || resultVal!='')" |
| | | @click="codeDevice(scope.row,scope.$index)"></el-button> |
| | | </div> |
| | | </template> |
| | |
| | | <el-table-column prop="note" label="æ£éªæè¿°" width="160" > |
| | | <template slot-scope="scope"> |
| | | <div v-if="!scope.row.children"> |
| | | <el-input @blur="changeState(scope.row, scope.$index)" :disabled="scope.row.deviceId == null || (dataForm.id!=null&&resultVal!=null)" v-model="scope.row.note" placeholder="æ£éªæè¿°"></el-input> |
| | | <el-input @blur="changeState(scope.row, scope.$index)" :disabled="scope.row.deviceId == null || (dataForm.id!=null&&(resultVal!=null || resultVal!=''))" v-model="scope.row.note" placeholder="æ£éªæè¿°"></el-input> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | element-loading-text="请ç¨çï¼æä»¶ä¸ä¼ ä¸" |
| | | > |
| | | <el-upload |
| | | :disabled="dataForm.rawInsNo==null || resultVal!=null" |
| | | :disabled="dataForm.rawInsNo==null || (resultVal!=null || resultVal!='')" |
| | | drag |
| | | ref="upload" |
| | | action="/mes/rawInsProduct/upload" |
| | |
| | | @click="delProcessConfigFile(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | :disabled="resultVal!=null" |
| | | :disabled="(resultVal!=null || resultVal!='')" |
| | | >å é¤</el-button |
| | | > |
| | | <el-button |
| | |
| | | </el-table-column> |
| | | <el-table-column label="æä½"> |
| | | <template> |
| | | <el-button type="text" :disabled="resultVal!=null && dataForm.id!=null" @click="showDialog()" size="small">䏿¥</el-button> |
| | | <el-button type="text" :disabled="(resultVal!=null || resultVal!='') && dataForm.id!=null" @click="showDialog()" size="small">䏿¥</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | console.log(e.target.value); |
| | | }, |
| | | changeState(row, index) { |
| | | this.$nextTick(()=>{ |
| | | if(row){ |
| | | let isTrue = true |
| | | for(var i=0;i<row.testValueList.length;i++){ |
| | | let val = row.testValueList[i] |
| | | let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/ |
| | | if(!reg.test(val) && !['æ¯','å¦'].includes(val)){ |
| | | row.testValueList[i] = null |
| | | this.$message.error("请è¾å
¥æ°åæéæ©æ¯å¦") |
| | | isTrue = false |
| | | } |
| | | } |
| | | if(!isTrue){ |
| | | return |
| | | } |
| | | } |
| | | if (row.rpId != null && row.rpId != '') { |
| | | let val = row.testValueList.join(",") |
| | | if (val === undefined || val === '' || val === null) { |
| | | return |
| | | if(row){ |
| | | let isTrue = true |
| | | for(var i=0;i<row.testValueList.length;i++){ |
| | | let val = row.testValueList[i] |
| | | let reg = /(^-?[0-9]{1,6}$)|(^-?[0-9]{1,6}[\.]{1}[0-9]{1,3}$)/ |
| | | if(!reg.test(val) && !['æ¯','å¦'].includes(val)){ |
| | | row.testValueList[i] = null |
| | | this.$message.error("请è¾å
¥6使°åæéæ©æ¯å¦") |
| | | isTrue = false |
| | | } |
| | | } |
| | | let obj = { |
| | | if(!isTrue){ |
| | | return |
| | | } |
| | | } |
| | | if (row.rpId != null && row.rpId != '') { |
| | | let val = row.testValueList.join(",") |
| | | if (val === undefined || val === '' || val === null) { |
| | | return |
| | | } |
| | | let obj = { |
| | | deviceId: row.deviceId, |
| | | rpId: row.rpId, |
| | | testValue: val, |
| | | note: row.note |
| | | } |
| | | updateRawInsProduct(obj).then(res => { |
| | | if (res.data.code == 0) { |
| | | this.$message.success("æ´æ°æå") |
| | | } else { |
| | | this.$message.error("æ´æ°å¤±è´¥") |
| | | } |
| | | this.init(this.dataForm.id) |
| | | }) |
| | | } |
| | | }) |
| | | updateRawInsProduct(obj).then(res => { |
| | | if (res.data.code == 0) { |
| | | this.$message.success("æ´æ°æå") |
| | | } else { |
| | | this.$message.error("æ´æ°å¤±è´¥") |
| | | } |
| | | this.init(this.dataForm.id) |
| | | }) |
| | | } |
| | | }, |
| | | // å é¤åé¡¹ç® |
| | | delChildren(row,index,isParent) { |