modified: src/api/basic/param.js
modified: src/views/basic/company/index.vue
modified: src/views/basic/division/index.vue
modified: src/views/basic/factory/index.vue
modified: src/views/basic/param/index.vue
modified: src/views/basic/part/index.vue
modified: src/views/basic/template/index.vue
modified: src/views/common/param.vue
modified: src/views/common/ztt-table.vue
modified: src/views/technology/completeproductstructure/completeproductstructure-form.vue
modified: src/views/technology/completeproductstructure/index.vue
modified: src/views/technology/structure/index.vue
modified: src/views/technology/structure/single-structure-form.vue
| | |
| | | params: query |
| | | }) |
| | | } |
| | | export function pageInModel(query) { |
| | | return request({ |
| | | url: '/mes/param/pageInModel', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | export function getTechnologyParamPage(query, id) { |
| | | return request({ |
| | | url: '/mes/param/param/page/' + id, |
| | |
| | | multipleSelection: [], |
| | | uploadInfo:{//是否展示上传EXCEL以及对应的url |
| | | isShow:false, |
| | | url:'' |
| | | url:'/mes/company/upload' |
| | | }, |
| | | prelang:"operation", |
| | | options: { |
| | |
| | | seqNo:true, |
| | | isShowHide:true,//是否显示显影按钮 |
| | | isSearch:false,//高级查询按钮 |
| | | isCopy: true, |
| | | isCopy: false, |
| | | isRefresh: true, |
| | | defaultOrderBy:{column:'createTime',direction:'desc'} |
| | | }, |
| | | table: { |
| | |
| | | seqNo: true, |
| | | isShowHide: true, // 是否显示显影按钮 |
| | | isSearch: false, // 高级查询按钮 |
| | | isRefresh: true, |
| | | defaultOrderBy: { column: 'createTime', direction: 'desc' } |
| | | }, |
| | | table: { |
| | |
| | | uploadInfo: { |
| | | // 是否展示上传EXCEL以及对应的url |
| | | isShow: false, |
| | | url: '' |
| | | url: '/mes/factory/' |
| | | }, |
| | | prelang: 'operation', |
| | | options: { |
| | |
| | | seqNo: true, |
| | | isShowHide: true, // 是否显示显影按钮 |
| | | isSearch: false, // 高级查询按钮 |
| | | isRefresh: true, |
| | | defaultOrderBy: { column: 'createTime', direction: 'desc' } |
| | | }, |
| | | table: { |
| | |
| | | this.option.column.forEach(item => { |
| | | if (row.paramItemThree == "" && item.prop == 'paramItemThree') { |
| | | item.display = false |
| | | }else if(row.paramItemThree != "" && item.prop == 'paramItemThree'){ |
| | | item.display = true |
| | | } |
| | | if (row.paramItemTwo == "" && item.prop == 'paramItemTwo') { |
| | | item.display = false |
| | | }else if(row.paramItemTwo != "" && item.prop == 'paramItemTwo'){ |
| | | item.display = true |
| | | } |
| | | }) |
| | | console.log(row); |
| | | // let type=this.typeOptions.filter(t=>{ |
| | | // return t.label==row.paramType |
| | | // })[0] |
| | | // row.paramType=type.value |
| | | this.$refs.crud.rowEdit(row, index) |
| | | }, |
| | | showDel(row, index) { |
| | | this.$refs.crud.rowDel(row, index) |
| | | }, |
| | | updateParam(row, index, done, loading) { |
| | | // console.log(row); |
| | | // this.formDisabled = true |
| | | let data = { |
| | | dict: '', |
| | | id: 0, |
| | | id: '', |
| | | parameterFormat: '', |
| | | parameterItem: '', |
| | | type: row.paramType, |
| | | unit: row.unit, |
| | | } |
| | | row.paramType == '2' ? data.dict = row.paramFormat : data.parameterFormat = row.paramFormat |
| | | if (row.threeId) { |
| | | if (row.threeId!="null") { |
| | | data.id = row.threeId |
| | | data.parameterItem = row.paramItemThree |
| | | } else { |
| | | if (row.twoId) { |
| | | if (row.twoId!="null") { |
| | | data.id = row.twoId |
| | | data.parameterItem = row.paramItemTwo |
| | | } else { |
| | |
| | | data.parameterItem = row.paramItem |
| | | } |
| | | } |
| | | console.log(data) |
| | | if(data.type=='文本格式'){ |
| | | let type=this.typeOptions.filter(t=>{ |
| | | return t.label==row.paramType |
| | | })[0] |
| | | data.type=type.value |
| | | } |
| | | // console.log(data); |
| | | // return |
| | | putObj(data).then(res => { |
| | | if (res.data.data.code == 0) { |
| | | this.$message.success("更新成功") |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | console.log("1111",row); |
| | | this.addOrUpdateVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs.addOrUpdate.init(row == null ? null : row.id) |
| | |
| | | :prelang="prelang" :options="options" :bottomOffset="125" :ajaxFun="ajaxFun" ref="partTable"> |
| | | <template #toolbar></template> |
| | | </ttable> |
| | | <el-upload :headers="{'Authorization': 'Bearer ' + yourToken}" class="upload-demo" action="/mes/part/uploadExcel" :on-preview="handlePreview" |
| | | <!-- <el-upload :headers="{'Authorization': 'Bearer ' + yourToken}" class="upload-demo" action="/mes/part/uploadExcel" :on-preview="handlePreview" |
| | | :on-remove="handleRemove" :file-list="fileList" :on-success="fileUpload" :limit="1"> |
| | | <el-button size="small" type="primary">点击Excel导入</el-button> |
| | | </el-upload> |
| | | </el-upload> --> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form> |
| | | <PrintLabelForm :currshowlist.sync="showPrintLabelForm" :printLabelInfo="printLabelInfo" /> |
| | |
| | | uploadInfo: { |
| | | // 是否展示上传EXCEL以及对应的url |
| | | isShow: true, |
| | | url: '/mes/part/upload' |
| | | url: '/mes/part/uploadExcel' |
| | | }, |
| | | prelang: 'operation', |
| | | options: { |
| | |
| | | seqNo: true, |
| | | isShowHide: true, // 是否显示显影按钮 |
| | | isSearch: false, // 高级查询按钮 |
| | | isRefresh: true, |
| | | defaultOrderBy: { column: 'id', direction: 'desc' } |
| | | }, |
| | | table: { |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .el-upload-dragger { |
| | | width: 300px !important; |
| | | } |
| | | </style> |
| | |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | label="参数类型" |
| | | prop="type" |
| | | align="center" |
| | |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="单位" prop="unit" align="center"> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | }, |
| | | // 添加 |
| | | relateOperationParam() { |
| | | console.log(11111); |
| | | if (this.templateId !== 0) { |
| | | // 筛选出当前页面已有的参数 |
| | | this.paramSelArr = [] |
| | |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { fetchList, delObj } from '@/api/basic/param' |
| | | import { fetchList, delObj ,pageInModel} from '@/api/basic/param' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { mapGetters } from 'vuex' |
| | | import { remote } from '../../api/admin/dict' |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | ajaxFun: fetchList, |
| | | ajaxFun: pageInModel, |
| | | currentRow: false, |
| | | typeOptions: [], |
| | | innerVisible: false, |
| | |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'type', |
| | | label: '参数类型', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'select', |
| | | formatter: this.getParam, |
| | | optList: () => { |
| | | return this.typeOptions |
| | | } |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'parameterFormat', |
| | | label: '参数格式', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'unit', |
| | | label: '单位', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // { |
| | | // minWidth: '140', |
| | | // prop: 'type', |
| | | // label: '参数类型', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'select', |
| | | // formatter: this.getParam, |
| | | // optList: () => { |
| | | // return this.typeOptions |
| | | // } |
| | | // }, |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'parameterFormat', |
| | | // label: '参数格式', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'unit', |
| | | // label: '单位', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | { |
| | | minWidth: '200', |
| | | prop: 'createUser', |
| | |
| | | </el-dialog> |
| | | <el-dialog title="导入" :visible.sync="importDialogVisible" width="22%"> |
| | | <span> |
| | | <div> |
| | | <div> |
| | | <div style="width: 100%;"> |
| | | <div style="width: 100%;"> |
| | | <el-upload |
| | | style="margin-left:8px;display: inline;" |
| | | style="margin-left:8px;display: inline;width: 100%;" |
| | | class="upload-demo" |
| | | drag |
| | | :headers="headers" |
| | |
| | | <i class="el-icon-upload"></i> |
| | | <div class="el-upload__text"><em>点击导入数据</em></div> |
| | | <div class="el-upload__tip" slot="tip"> |
| | | 只能上传xlsx/xls文件,且不超过10M<el-button |
| | | 只能上传xlsx/xls文件,且不超过30M<el-button |
| | | type="text" |
| | | style="font-size:15px;text-decoration: underline;" |
| | | @click="downDataTemplate" |
| | |
| | | this.colSelectDialogVisible = true |
| | | this.handleCheckedCol() |
| | | }, |
| | | // 限制文件上传大小,目前限制为10M(另可以加类型限制) |
| | | // 限制文件上传大小,目前限制为30M(另可以加类型限制) |
| | | |
| | | beforeAvatarUpload(file) { |
| | | const fileName = file.name |
| | | const fileType = fileName.substring(fileName.lastIndexOf('.') + 1) |
| | | const isLt10M = file.size / 1024 / 1024 < 10 |
| | | if (fileType !== 'xlsx' && fileType !== 'xls') { |
| | | this.$message.error('文件格式只能为xlsx或xls,请删除后重新上传') |
| | | const isLt10M = file.size / 1024 / 1024 < 30 |
| | | if (fileType !== 'xlsx' && fileType !== 'xls'&&fileType!=='csv') { |
| | | this.$message.error('文件格式只能为xlsx或xls、csv,请删除后重新上传') |
| | | } |
| | | if (!isLt10M) { |
| | | this.$message({ |
| | |
| | | type: 'success' |
| | | }) |
| | | this.getDataList() |
| | | this.importDialogVisible=false |
| | | } |
| | | this.$refs.uploadScan.clearFiles() |
| | | }, |
| | |
| | | font-size: 14px; |
| | | visibility: hidden; |
| | | } |
| | | .upload-demo{ |
| | | width: 100%; |
| | | } |
| | | .el-upload-dragger { |
| | | width: 300px !important; |
| | | } |
| | | </style> |
| | |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column prop="partName" label="零件名" width="400"> |
| | | <el-table-column prop="partName" label="零件名" width="430"> |
| | | </el-table-column> |
| | | <el-table-column prop="partNo" label="零件号" width="100"> |
| | | <el-table-column prop="partNo" label="零件号" width="120"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="originalQpa" |
| | |
| | | default-expand-all |
| | | class="preView-structure-table" |
| | | > |
| | | <el-table-column prop="partName" label="零件名" width="400"> |
| | | <el-table-column prop="partName" label="零件名" width="430"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="partNo" |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | |
| | | // 替代号 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'alternativeNo', |
| | | label: '替代号', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // // 替代号 |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'alternativeNo', |
| | | // label: '替代号', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | |
| | | // 替代描述 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'alternativeDesc', |
| | | label: '替代描述', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // // 替代描述 |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'alternativeDesc', |
| | | // label: '替代描述', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | |
| | | // 绝缘颜色 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'insulationColor', |
| | | label: '绝缘颜色', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // 护套颜色 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'sheathColor', |
| | | label: '护套颜色', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // // 绝缘颜色 |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'insulationColor', |
| | | // label: '绝缘颜色', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | // // 护套颜色 |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'sheathColor', |
| | | // label: '护套颜色', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | // 特性1 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'characteristicOne', |
| | | label: '特性1', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'characteristicOne', |
| | | // label: '特性1', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | // 创建人 |
| | | { |
| | | minWidth: '120', |
| | |
| | | // 零件号 |
| | | { |
| | | minWidth: '140', |
| | | prop: 'custom', |
| | | label: '客户名称', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text', |
| | | }, |
| | | { |
| | | minWidth: '140', |
| | | prop: 'partNo', |
| | | label: '零件号', |
| | | sort: true, |
| | |
| | | this.$message.warning(response.msg) |
| | | } else { |
| | | this.$message({ |
| | | message: '上传成功', |
| | | message: '上传成功,后台正在导入,请稍后重新刷新!', |
| | | type: 'success' |
| | | }) |
| | | this.getData() |
| | | this.importStructureVisible=false |
| | | // this.getData() |
| | | } |
| | | this.$refs.zhuangbeiUploadScan.clearFiles() |
| | | }, |
| | |
| | | </div> |
| | | </div> |
| | | <div class="page-main"> |
| | | <div class="single-structure-basic" style="height: 22%;"> |
| | | <el-form :inline="true" :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes"> |
| | | <div class="single-structure-basic" style="height: 40%;width: 100%;"> |
| | | <el-form :inline="true" style="width: 100%;" label-position="left" :model="dataForm" :rules="dataRule" ref="dataForm" class="l-mes"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-col :span="24" style="display: flex; justify-content: space-around;"> |
| | | <el-form-item label="零件号" prop="partNo"> |
| | | <el-input v-model="dataForm.partNo" placeholder="请选择零件" @blur="checkPartNo()"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openPartDialog()"></el-button> |
| | |
| | | <el-input v-model="dataForm.partName" placeholder="零件名称" :readonly="true"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="客户名称" prop="custom"> |
| | | <el-input v-model="dataForm.custom" placeholder="客户名称" :readonly="true"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="结构类型" prop="bomTypeDb"> |
| | | <el-select v-model="dataForm.bomTypeDb" placeholder="请选择结构类型" style="width:100%"> |
| | | <el-option v-for="(item, index) in bomTypeDbOptions" :label="item.label" :value="item.value" |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-form-item label="替代" prop="alternativeNo"> |
| | | <el-input v-model="dataForm.alternativeNo"></el-input> |
| | | </el-form-item> |
| | |
| | | v-model="dataForm.alternativeDesc" |
| | | ></el-input> |
| | | </el-form-item> --> |
| | | <el-col :span="24" style="display: flex; justify-content: space-around;"> |
| | | <el-form-item label="版本号" prop="version"> |
| | | <el-input v-model="dataForm.version" disabled></el-input> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="克重(kg)" prop="gramWeight"> |
| | | <el-input v-model="dataForm.gramWeight"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" style="display: flex; justify-content: space-around;"> |
| | | <el-form-item label="浇口(kg)" prop="gateGramWeight"> |
| | | <el-input v-model="dataForm.gateGramWeight"></el-input> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="回料比例(%)" prop="scale"> |
| | | <el-input v-model="dataForm.scale"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" style="display: flex; justify-content: space-around;"> |
| | | <el-form-item label="烘料时间(h)" prop="dryingTime"> |
| | | <el-input v-model="dataForm.dryingTime"></el-input> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="备注" prop="remark"> |
| | | <el-input type="textarea" :autosize="{ minRows: 1, maxRows: 3 }" v-model="dataForm.remark"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-form-item label="已同步至IFS" prop="ifsSync"> |
| | | <span |
| | | style="width: 146px;display: inline-block;font-size:12px;font-weight:bold;" |
| | | >{{ dataForm.ifsSync ? '是' : '否' }}</span |
| | | > |
| | | </el-form-item> --> |
| | | <el-form-item label="默认结构" prop="master"> |
| | | <el-col :span="24" style="display: flex; justify-content: left;"> |
| | | <el-form-item label="默认结构" style="margin-left: 5%;" prop="master"> |
| | | <el-checkbox v-model="dataForm.master"></el-checkbox> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | partNo: null, |
| | | partId: null, |
| | | partName: null, |
| | | custom: null, |
| | | remark: null, |
| | | bomTypeDb: 'M', |
| | | alternativeNo: '*', |
| | |
| | | if (resCode === 0) { |
| | | this.dataForm.id = resData.id |
| | | this.dataForm.partNo = resData.partNo |
| | | this.dataForm.custom=resData.custom |
| | | this.dataForm.partId = resData.partId |
| | | this.dataForm.partName = resData.partName |
| | | this.dataForm.remark = resData.remark |