src/api/basic/post.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/division/division-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/param/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/param/param-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/post/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/post/post-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/staff/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/staff/staff-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/basic/warehouse/warehouse-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/technology/document/document-form.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/basic/post.js
@@ -45,3 +45,17 @@ data: obj }) } export function getDivisionByFactoryId(id,factoryId) { return request({ url: '/mes/division/getDivisionByFactoryId?id=' + id+"&factoryId="+factoryId, method: 'get' }) } export function getObjById(id,factoryId,divisionId) { return request({ url: '/mes/post/getObjById?id=' + id+"&factoryId="+factoryId+"&divisionId="+divisionId, method: 'get' }) } src/views/basic/division/division-form.vue
@@ -1,50 +1,25 @@ <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-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="divisionNo"> <el-input v-model="dataForm.divisionNo" placeholder="部门编号" ></el-input> <el-input v-model="dataForm.divisionNo" placeholder="部门编号"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="部门名称" prop="divisionName"> <el-input v-model="dataForm.divisionName" placeholder="部门名称" ></el-input> <el-input v-model="dataForm.divisionName" placeholder="部门名称"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="公司" prop="companyId"> <el-select @change="changeCompany" v-model="dataForm.companyId" filterable placeholder="请选择" style="width: 100%;" > <el-option v-for="(item, index) in this.companyOptions" :key="index" :label="item.companyName" :value="item.id" > <el-select @change="changeCompany" v-model="dataForm.companyId" filterable placeholder="请选择" style="width: 100%;"> <el-option v-for="(item, index) in this.companyOptions" :key="index" :label="item.companyName" :value="item.id"> </el-option> </el-select> </el-form-item> @@ -68,12 +43,7 @@ </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 > <el-button type="primary" :disabled="isSubmit" v-thinclick="`dataFormSubmit`">确定</el-button> </span> </el-dialog> </template> @@ -93,7 +63,7 @@ data() { return { visible: false, factotyOption:[], factotyOption: [], dataForm: { id: 0, divisionNo: '', @@ -137,22 +107,29 @@ /* this.initCompanySelect(); this.initStaffSelect(); */ if (this.dataForm.id) { console.log(111); getObj(this.dataForm.id).then((response) => { this.dataForm = response.data.data this.dataForm.factotyId = response.data.data.factoryId this.changeCompany() }) } }) }, changeCompany() { console.log(this.dataForm.companyId); loadFactoryListByCompany(this.dataForm.companyId).then((res) => { console.log(res.data); this.factotyOption = res.data.data }) // if (this.dataForm.factotyId != '') { // let datas = this.factotyOption.filter(item => { // return item.id == this.dataForm.factotyId // }); // console.log(datas); // } }, changeFactory(){ this.dataForm.factotyName=this.factotyOption.filter(item=>{ return item.id==this.dataForm.factotyId changeFactory() { this.dataForm.factotyName = this.factotyOption.filter(item => { return item.id == this.dataForm.factotyId })[0].factoryName; console.log(this.dataForm); }, @@ -166,8 +143,8 @@ staffId: this.dataForm.staffId, companyId: this.dataForm.companyId, id: this.dataForm.id, factoryId: this.dataForm.factotyId, factoryName: this.dataForm.factotyName, factotyId: this.dataForm.factotyId } this.$refs.dataForm.validate((valid) => { if (valid) { @@ -210,6 +187,19 @@ created() { this.initCompanySelect() this.initStaffSelect() }, watch: { 'dataForm.companyId': { handler(newValue, oldValue) { if (newValue != ''&&oldValue!='') { if(oldValue!=newValue){ this.dataForm.factotyId=null } } }, immediate: true, deep: true } } } </script> src/views/basic/param/index.vue
@@ -1,8 +1,10 @@ <template> <div class="mod-config"> <basic-container> <ttable <!-- <ttable :table="table" :row-key="id" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @handleSelectionChange="handleSelectionChange" :uploadInfo="uploadInfo" :prelang="prelang" @@ -11,13 +13,70 @@ ref="paramTable" > <template #toolbar></template> </ttable> </ttable> --> <el-row style="margin-left: 10px;"> <el-form :inline="true" :model="table" class="demo-form-inline"> <el-form-item label="参数项"> <el-input v-model="table.param" placeholder="参数项"></el-input> </el-form-item> <el-form-item label="参数编号"> <el-input v-model="table.code" placeholder="参数编号"></el-input> </el-form-item> <el-form-item> <el-button type="primary" @click="onSearch">查询</el-button> </el-form-item> </el-form> </el-row> <el-row style="margin-left: 10px;height: 80vh;"> <el-row> <el-button type="defult" @click="addOrUpdateHandle">新增</el-button> <el-button type="defult" @click="onSearch">导入</el-button> <!-- <el-button type="defult" @click="isExpandAllClick">展开/折叠</el-button> --> </el-row> <el-row style="padding-top: 20px;"> <!-- 表格数据区--> <el-table height="480" style="width: 100%;" :data="table.data" row-key="id" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table-column type="index" label="序号" width="50"> </el-table-column> <el-table-column prop="code" label="参数编号"></el-table-column> <el-table-column prop="parameterItem" label="参数项"></el-table-column> <el-table-column prop="type" label="参数类型"> <template slot-scope="scope"> <el-col v-show="scope.row.bianJi===false">{{ scope.row.type }}</el-col> <el-col v-show="scope.row.bianJi"> 111 <!-- <el-select v-model="scope.row.type" filterable placeholder="请选择参数类型" style="width:100%" @change="changeType"> <el-option v-for="(item, index) in this.typeOptions" :label="item.label" :value="item.value" :key="item.value"> </el-option> </el-select> --> </el-col> </template> </el-table-column> <el-table-column prop="parameterFormat" label="参数格式"></el-table-column> <el-table-column prop="unit" label="单位"></el-table-column> <el-table-column prop="code" label="操作"> <template slot-scope="scope"> <el-row style=" display: flex;width: 100%;"> <el-col><el-button type="text">删除</el-button></el-col> <el-col v-if="scope.row.isBianji"> <el-button @click="bianji(scope.row)" type="text">{{ scope.row.bianJiBtn }}</el-button> </el-col> </el-row> </template> </el-table-column> </el-table> <el-row style="display: flex; justify-content: end;"> <el-pagination :current-page="table.currentPage" @current-change="handlesCurrentChange" @size-change="sizeChangeHandle" :page-sizes="[10, 20, 50, 100]" :page-size="table.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="table.total"></el-pagination> </el-row> </el-row> </el-row> <!-- 弹窗, 新增 / 修改 --> <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData" ></table-form> <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form> </basic-container> </div> </template> @@ -30,6 +89,9 @@ export default { data() { return { isExpandAll: false, // 重新渲染表格状态 refreshTable: true, ajaxFun: fetchList, typeOptions: [], multipleSelection: [], @@ -47,14 +109,16 @@ border: true, // 是否有纵向边框 lazy: false, // 是否需要懒加载 fit: true, // 列的宽度是否自撑开 multiSelect: true, // multiSelect: false, // seqNo: true, isShowHide: true, // 是否显示显影按钮 isSearch: true, // 高级查询按钮 isSearch: false, // 高级查询按钮 defaultOrderBy: { column: 'createTime', direction: 'desc' } }, table: { param: null, total: 0, code: null, currentPage: 1, pageSize: 20, data: [], @@ -77,6 +141,24 @@ sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, { minWidth: '120', prop: 'second', label: '二级参数', sort: true, isTrue: true, isSearch: false, searchInfoType: 'text' }, { minWidth: '130', prop: 'third', label: '三级参数', sort: true, isTrue: true, isSearch: false, searchInfoType: 'text' }, { @@ -182,11 +264,68 @@ }, created() { this.getParamType() this.getData() }, methods: { changeType(){}, bianji(row){ // this.$set(row.bianJi,false,true) row.bianJi=true row.bianJiBtn='保存' console.log(row) }, isExpandAllClick() { // console.log(1111); this.isExpandAll = !this.isExpandAll; this.$nextTick(() => { this.refreshTable = true; }); // console.log(this.isExpandAll); }, handlesCurrentChange() { }, sizeChangeHandle() { }, onSearch() { }, // 获取数据列表 getData() { this.$refs.paramTable.getDataList() let param = { parentId: 0, code: this.table.code, size: this.table.pageSize, current: this.table.currentPage, parameterItem: this.table.param } fetchList(param).then((res) => { console.log(res.data); this.table.total = res.data.data.total this.table.data = res.data.data.records let datas=JSON.parse(JSON.stringify(this.table.data)) datas.forEach(l => { l.bianJi = false if (l.children.length < 1) { l.isBianji = true l.bianJiBtn='编辑' } if (l.children.length > 0) { l.isBianji = false l.children.forEach(c => { c.bianji = false if (c.children.length < 1) { c.isBianji = true c.bianJiBtn='编辑' } else { l.isBianji = false c.children.forEach(cc => { cc.bianJi = false cc.isBianji = true c.bianJiBtn='编辑' }) } }) } }) this.table.data=datas console.log(this.table.data); }) }, // 新增 / 修改 addOrUpdateHandle(row) { @@ -222,7 +361,7 @@ cancelButtonText: '取消', type: 'warning' }) .then(function() { .then(function () { return delObj(row.id) }) .then((data) => { @@ -233,3 +372,10 @@ } } </script> <style scoped> table, tr, td { text-align: center; } </style> src/views/basic/param/param-form.vue
@@ -1,27 +1,25 @@ <template> <el-dialog v-diadrag :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-dialog v-diadrag :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-form-item label="参数编号" prop="code"> <el-input v-model="dataForm.code" placeholder="参数编号"></el-input> </el-form-item> <el-form-item label="参数项" prop="parameterItem"> <el-input v-model="dataForm.parameterItem" placeholder="参数项" ></el-input> <el-input v-model="dataForm.parameterItem" placeholder="参数项"></el-input> </el-form-item> <el-form-item label="参数类型" prop="type"> <el-form-item label="二级参数" prop="secondId"> <el-select v-model="dataForm.secondId" multiple collapse-tags style="width: 100%;" placeholder="请选择"> <el-option v-for="item in optionsSecond" :key="item.id" :label="item.label" :value="item.id"> </el-option> </el-select> </el-form-item> <el-form-item label="三级级参数" prop="thirdId"> <el-select v-model="dataForm.thirdId" multiple collapse-tags style="width: 100%;" placeholder="请选择"> <el-option v-for="item in optionsThird" :key="item.id" :label="item.label" :value="item.id"> </el-option> </el-select> </el-form-item> <!-- <el-form-item label="参数类型" prop="type"> <el-select v-model="dataForm.type" filterable @@ -66,7 +64,7 @@ </el-form-item> <el-form-item label="单位" prop="unit"> <el-input v-model="dataForm.unit" placeholder="单位"></el-input> </el-form-item> </el-form-item> --> </el-form> <span slot="footer" class="dialog-footer"> <el-button @click="visible = false">取消</el-button> @@ -84,11 +82,15 @@ return { typeOptions: [], dictOptions: [], optionsSecond: [], optionsThird: [], visible: false, dataForm: { id: 0, code: '', parameterItem: '', secondId: null, thirdId: null, type: '', parameterFormat: '', unit: '', @@ -98,6 +100,8 @@ updateTime: '', dict: '' }, secondParam: null, thirdParam: null, dataRule: { code: [ { required: true, message: '参数编号不能为空', trigger: 'blur' } @@ -105,10 +109,10 @@ parameterItem: [ { required: true, message: '参数项不能为空', trigger: 'blur' } ], type: [ { required: true, message: '参数类型不能为空', trigger: 'blur' } ], unit: [{ required: true, message: '单位不能为空', trigger: 'blur' }] // type: [ // { required: true, message: '参数类型不能为空', trigger: 'blur' } // ], // unit: [{ required: true, message: '单位不能为空', trigger: 'blur' }] }, clickDateArr: [] } @@ -116,6 +120,16 @@ created() { this.getParamType() this.getDictOptions() remote('second_param').then((response) => { if (response.data.code === 0) { this.optionsSecond = response.data.data } }) remote('third_param').then((response) => { if (response.data.code === 0) { this.optionsThird = response.data.data } }) }, methods: { init(id) { @@ -171,7 +185,7 @@ if (this.clickDateArr.length > 1) { if ( this.clickDateArr[this.clickDateArr.length - 1] - this.clickDateArr[this.clickDateArr.length - 2] < this.clickDateArr[this.clickDateArr.length - 2] < 2000 ) { // 小于2秒则认为重复提交 @@ -185,23 +199,24 @@ if (!response.data.data) { this.addOrUpdate() } else { // 增加参数项内容重复提示 this.$confirm( '参数项内容重复,编号:' + response.data.data + ',请确认是否继续', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', closeOnClickModal: false, type: 'warning' } ) .then(() => { this.addOrUpdate() }) .catch(() => {}) this.message.error('编号重复!') // // 增加参数项内容重复提示 // this.$confirm( // '参数项内容重复,编号:' + // response.data.data + // ',请确认是否继续', // '提示', // { // confirmButtonText: '确定', // cancelButtonText: '取消', // closeOnClickModal: false, // type: 'warning' // } // ) // .then(() => { // this.addOrUpdate() // }) // .catch(() => { }) } }) } @@ -221,6 +236,7 @@ } }) } else { addObj(this.dataForm).then((response) => { const data = response.data.data if (data.code === 0) { src/views/basic/post/index.vue
@@ -104,6 +104,33 @@ isSearch: true, searchInfoType: 'text' }, { minWidth: '120', prop: 'companyName', label: '公司名称', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, { minWidth: '120', prop: 'factoryName', label: '工厂名称', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, { minWidth: '120', prop: 'divisionName', label: '部门名称', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, // 描述 { minWidth: '120', src/views/basic/post/post-form.vue
@@ -3,17 +3,17 @@ <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="120px" class="l-mes"> <el-row> <el-col :span="12"> <el-form-item label="公司" prop="company"> <el-select style="width: 100%;" v-model="dataForm.company" placeholder="请选择"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> <el-form-item label="公司" prop="companyId"> <el-select @change="changeCompany" style="width: 100%;" v-model="dataForm.companyId" placeholder="请选择"> <el-option v-for="item in options" :key="item.id" :label="item.companyName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="工厂" prop="factory"> <el-select style="width: 100%;" v-model="dataForm.factory" placeholder="请选择"> <el-option v-for="item in optionsfactory" :key="item.value" :label="item.label" :value="item.value"> <el-form-item label="工厂" prop="factoryId"> <el-select @change="changeFactory" style="width: 100%;" v-model="dataForm.factoryId" placeholder="请选择"> <el-option v-for="item in optionsfactory" :key="item.id" :label="item.factoryName" :value="item.id"> </el-option> </el-select> </el-form-item> @@ -21,9 +21,9 @@ </el-row> <el-row> <el-col :span="12"> <el-form-item label="部门" prop="division"> <el-select style="width: 100%;" v-model="dataForm.division" placeholder="请选择"> <el-option v-for="item in optionsdepartment" :key="item.value" :label="item.label" :value="item.value"> <el-form-item label="部门" prop="divisionId"> <el-select @change="changeDivision" style="width: 100%;" v-model="dataForm.divisionId" placeholder="请选择"> <el-option v-for="item in optionsdepartment" :key="item.id" :label="item.divisionName" :value="item.id"> </el-option> </el-select> </el-form-item> @@ -55,21 +55,29 @@ </template> <script> import { getObj, addObj, putObj } from '@/api/basic/post' import { getObj, addObj, putObj, getDivisionByFactoryId } from '@/api/basic/post' import { loadStaff, dataFormTransfer, loadFactoryListByCompany } from '@/api/basic/division' import { loadCompany } from '@/api/basic/factory' export default { data() { return { ruleOptions: [], visible: false, options: [], optionsfactory:[], optionsfactory: [], optionsdepartment: [], dataForm: { id: 0, company: null, factory: null, division: null, companyId: null, companyName: null, factoryId: null, factoryName: null, divisionId: null, divisionName: null, postNo: '', postName: '', remark: '' @@ -81,13 +89,13 @@ postNo: [ { required: true, message: '岗位编号不能为空', trigger: 'blur' } ], company: [ companyId: [ { required: true, message: '公司名称不能为空', trigger: 'blur' } ], factory: [ factoryId: [ { required: true, message: '工厂名称不能为空', trigger: 'blur' } ], division: [ ], divisionId: [ { required: true, message: '部门名称不能为空', trigger: 'blur' } ] }, @@ -95,9 +103,36 @@ } }, mounted() { this.initTestRuleSelect() // this.initTestRuleSelect() this.initCompanySelect() }, methods: { changeDivision(){ this.dataForm.divisionName = this.optionsdepartment.filter(item => { return item.id == this.dataForm.divisionId })[0].divisionName; }, changeCompany() { loadFactoryListByCompany(this.dataForm.companyId).then((res) => { this.optionsfactory = res.data.data }) this.dataForm.companyName = this.options.filter(item => { return item.id == this.dataForm.companyId })[0].companyName; }, changeFactory() { getDivisionByFactoryId(this.dataForm.companyId, this.dataForm.factoryId).then((res) => { this.optionsdepartment=res.data.data }) this.dataForm.factoryName = this.optionsfactory.filter(item => { return item.id == this.dataForm.factoryId })[0].factoryName; }, initCompanySelect() { loadCompany().then((res) => { this.options = res.data }) }, init(id) { this.dataForm.id = id || 0 this.visible = true @@ -106,6 +141,8 @@ if (this.dataForm.id) { getObj(this.dataForm.id).then((response) => { this.dataForm = response.data.data this.changeCompany() this.changeFactory() }) } }) @@ -134,7 +171,38 @@ this.isSubmit = false } }) } }, }, watch: { 'dataForm.companyId': { handler(newValue, oldValue) { if (newValue != ''&&oldValue!=''&&oldValue!=undefined&&newValue!=undefined) { console.log(newValue); console.log(oldValue); if(oldValue!=newValue){ this.dataForm.factoryId=null this.dataForm.divisionId=null this.optionsdepartment=[] } } }, immediate: true, deep: true }, 'dataForm.factoryId': { handler(newValue, oldValue) { if (newValue != ''&&oldValue!=''&&oldValue!=undefined&&newValue!=undefined) { console.log(newValue); console.log(oldValue); if(oldValue!=newValue){ this.dataForm.divisionId=null this.optionsdepartment=[] } } }, immediate: true, deep: true }, } } </script> src/views/basic/staff/index.vue
@@ -103,6 +103,24 @@ return formatVal } }, { minWidth: '120', prop: 'companyName', label: '公司', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, { minWidth: '120', prop: 'factoryName', label: '工厂', sort: true, isTrue: true, isSearch: true, searchInfoType: 'text' }, // 部门 { minWidth: '120', src/views/basic/staff/staff-form.vue
@@ -1,56 +1,52 @@ <template> <el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible" > <el-form :model="dataForm" :rules="rules" ref="dataForm" label-width="100px" class="l-mes" > <el-dialog :title="!dataForm.id ? '新增' : '修改'" :close-on-click-modal="false" :visible.sync="visible"> <el-form :model="dataForm" :rules="rules" ref="dataForm" label-width="100px" class="l-mes"> <el-row> <el-col :span="12"> <el-form-item label="人员编号" prop="staffNo"> <el-input v-model="dataForm.staffNo" placeholder="人员编号" ></el-input> <el-input v-model="dataForm.staffNo" placeholder="人员编号"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="人员名称" prop="staffName"> <el-input v-model="dataForm.staffName" placeholder="人员名称" ></el-input> <el-input v-model="dataForm.staffName" placeholder="人员名称"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="公司" prop="companyId"> <el-select @change="changeCompany" style="width: 100%;" v-model="dataForm.companyId" placeholder="请选择"> <el-option v-for="item in options" :key="item.id" :label="item.companyName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="工厂" prop="factoryId"> <el-select @change="changeFactory" style="width: 100%;" v-model="dataForm.factoryId" placeholder="请选择"> <el-option v-for="item in optionsfactory" :key="item.id" :label="item.factoryName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="部门" prop="divisionId"> <el-select v-model="dataForm.divisionId" filterable placeholder="请选择" style="width: 100%;" > <el-option v-for="(item, index) in this.divisionOptions" :key="index" :label="item.divisionName" :value="item.id" > <el-select @change="changeDivision" v-model="dataForm.divisionId" filterable placeholder="请选择" style="width: 100%;"> <el-option v-for="(item, index) in this.divisionOptions" :key="index" :label="item.divisionName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="电话" prop="phone"> <el-input v-model="dataForm.phone" placeholder="电话"></el-input> <el-form-item label="岗位" prop="postId"> <el-select v-model="dataForm.postId" filterable placeholder="请选择" style="width: 100%;"> <el-option v-for="item in this.postOptions" :key="item.id" :label="item.postName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> </el-row> @@ -60,84 +56,57 @@ <el-input v-model="dataForm.email" placeholder="邮箱"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="电话" prop="phone"> <el-input v-model="dataForm.phone" placeholder="电话"></el-input> </el-form-item> </el-col> <!-- <el-col :span="12"> <el-form-item label="岗位" prop="post"> <el-input v-model="dataForm.post" placeholder="岗位"></el-input> </el-form-item> </el-col>--> <el-col :span="12"> <el-form-item label="岗位" prop="postId"> <el-select v-model="dataForm.postId" filterable placeholder="请选择" style="width: 100%;" > <el-option v-for="item in this.postOptions" :key="item.id" :label="item.postName" :value="item.id" > </el-option> </el-select> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="人员系数" prop="personnelFactor"> <el-input v-model="dataForm.personnelFactor" placeholder="人员系数" ></el-input> <el-input v-model="dataForm.personnelFactor" placeholder="人员系数"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="人员性质" prop="personNature"> <el-select v-model="dataForm.personNature" placeholder="请选择" style="width: 100%;" > <el-option v-for="item in this.personNatureOptions" :key="item.value" :label="item.label" :value="item.value" > <el-select v-model="dataForm.personNature" placeholder="请选择" style="width: 100%;"> <el-option v-for="item in this.personNatureOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="试用截止日期" prop="trialDeadline"> <el-input v-model="dataForm.trialDeadline" placeholder="" ></el-input> <el-input v-model="dataForm.trialDeadline" placeholder=""></el-input> </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 > <el-button type="primary" :disabled="isSubmit" v-thinclick="`dataFormSubmit`">确定</el-button> </span> </el-dialog> </template> <script> import { getObj, loadDivision, dataFormTransfer } from '@/api/basic/staff' import { getList } from '@/api/basic/post' import { getList, getDivisionByFactoryId ,getObjById} from '@/api/basic/post' import { dateFormat, dateFormatYearMonthDate } from '@/util/date' import { loadFactoryListByCompany } from '@/api/basic/division' import { loadCompany } from '@/api/basic/factory' export default { props: { @@ -151,6 +120,8 @@ data() { return { visible: false, options: [], optionsfactory: [], dataForm: { id: 0, staffNo: '', @@ -166,7 +137,11 @@ updateUser: '', divisionId: '', personNature: '', trialDeadline: '' trialDeadline: '', companyId: null, companyName: null, factoryId: null, factoryName: null, }, divisionOptions: [], postOptions: [], @@ -175,7 +150,7 @@ } }, computed: { rules: function() { rules: function () { return { divisionId: [ { required: true, message: '部门不能为空', trigger: 'blur' } @@ -186,11 +161,45 @@ ], staffName: [ { required: true, message: '人员名称不能为空', trigger: 'blur' } ], companyId: [ { required: true, message: '公司名称不能为空', trigger: 'blur' } ], factoryId: [ { required: true, message: '工厂名称不能为空', trigger: 'blur' } ] } } }, methods: { changeDivision(){ getObjById(this.dataForm.companyId,this.dataForm.factoryId,this.dataForm.divisionId).then((response) => { this.postOptions = response.data.data }) }, changeCompany() { loadFactoryListByCompany(this.dataForm.companyId).then((res) => { this.optionsfactory = res.data.data }) // this.divisionOptions=[] // this.dataForm.divisionId='' this.dataForm.companyName = this.options.filter(item => { return item.id == this.dataForm.companyId })[0].companyName; }, changeFactory() { getDivisionByFactoryId(this.dataForm.companyId, this.dataForm.factoryId).then((res) => { this.divisionOptions=res.data.data }) this.dataForm.factoryName = this.optionsfactory.filter(item => { return item.id == this.dataForm.factoryId })[0].factoryName; }, initCompanySelect() { loadCompany().then((res) => { this.options = res.data }) }, init(id) { this.dataForm.id = id || 0 this.visible = true @@ -199,6 +208,9 @@ if (this.dataForm.id) { getObj(this.dataForm.id).then((response) => { this.dataForm = response.data.data this.changeCompany() this.changeFactory() this.changeDivision() }) } else { const trialDeadline = new Date() @@ -224,7 +236,11 @@ id: this.dataForm.id, personnelFactor: this.dataForm.personnelFactor, personNature: this.dataForm.personNature, trialDeadline: this.dataForm.trialDeadline trialDeadline: this.dataForm.trialDeadline, factoryId: this.dataForm.factoryId, factoryName: this.dataForm.factoryName, companyId: this.dataForm.companyId, companyName: this.dataForm.companyName } this.$refs.dataForm.validate((valid) => { if (valid) { @@ -265,10 +281,61 @@ } }, created() { this.initDivisionSelect() this.initPostSelect() // this.initDivisionSelect() // this.initPostSelect() this.initCompanySelect() if(this.dataForm.staffNo!=''){ console.log(121212); this.changeCompany() this.changeDivision() } }, watch: { 'dataForm.divisionId': { handler(newValue, oldValue) { if (newValue != ''&&oldValue!=''&&oldValue!=undefined&&newValue!=undefined) { if(oldValue!=newValue){ this.dataForm.postId=null this.postOptions=[] } } }, immediate: true, deep: true }, 'dataForm.companyId': { handler(newValue, oldValue) { if (newValue != ''&&oldValue!=''&&oldValue!=undefined&&newValue!=undefined) { console.log(newValue); console.log(oldValue); if(oldValue!=newValue){ this.dataForm.factoryId=null this.dataForm.divisionId=null this.divisionOptions=[] this.dataForm.postId=null this.postOptions=[] } } }, immediate: true, deep: true }, 'dataForm.factoryId': { handler(newValue, oldValue) { if (newValue != ''&&oldValue!=''&&oldValue!=undefined&&newValue!=undefined) { console.log(newValue); console.log(oldValue); if(oldValue!=newValue){ this.dataForm.divisionId=null this.divisionOptions=[] this.dataForm.postId=null this.postOptions=[] } } }, immediate: true, deep: true }, 'dataForm.personNature': { handler(newValue, oldValue) { if ( src/views/basic/warehouse/warehouse-form.vue
@@ -109,8 +109,8 @@ </el-col> </el-row> <el-row> <el-col :span="12"> <el-form-item label="仓库地图" prop="warehouseMap"> <!-- <el-col :span="12"> --> <!-- <el-form-item label="仓库地图" prop="warehouseMap"> <el-upload ref="upload" action="/mes/warehouse/upload" @@ -130,9 +130,9 @@ <div slot="tip" class="el-upload__tip"> 只能上传jpg/png文件,且不超过500kb </div> </el-upload> </el-form-item> </el-col> </el-upload> --> <!-- </el-form-item> </el-col> --> <el-col :span="12"> <el-form-item label="仓库状态" prop="warehouseStatus"> <el-switch src/views/technology/document/document-form.vue
@@ -12,22 +12,12 @@ </div> <div class="page-main"> <div class="document-basic"> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" style="width: 100%" class="l-mes" :disabled="!editable" label-width="110px" > <el-form :model="dataForm" :rules="dataRule" ref="dataForm" style="width: 100%" class="l-mes" :disabled="!editable" label-width="110px"> <el-row> <el-col :span="5"> <el-form-item prop="name" label="文件名称"> <el-input v-model="dataForm.name" placeholder="文件名称" ></el-input> <el-input v-model="dataForm.name" placeholder="文件名称"></el-input> </el-form-item> </el-col> <el-col :span="4"> @@ -38,27 +28,16 @@ </el-col> <el-col :span="4"> <el-form-item prop="docType" label="类型"> <el-select v-model="dataForm.docType" placeholder="请选择类型" style="width:100%" > <el-option v-for="(item, index) in bomTypeDbOptions" :label="item.label" :value="item.value" :key="index" > <el-select v-model="dataForm.docType" placeholder="请选择类型" style="width:100%"> <el-option v-for="(item, index) in bomTypeDbOptions" :label="item.label" :value="item.value" :key="index"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="3"> <el-form-item prop="version" label="版本号"> <el-input v-model="dataForm.version" placeholder="版本号" ></el-input> <el-input v-model="dataForm.version" placeholder="版本号"></el-input> </el-form-item> </el-col> <!-- <el-col :span="3"> @@ -113,11 +92,7 @@ <el-col :span="5"> <el-form-item label="产品零件号" prop="partNo"> <el-input v-model="dataForm.partNo" placeholder="请选择零件"> <el-button slot="append" icon="el-icon-search" @click="openPartDialog()" ></el-button> <el-button slot="append" icon="el-icon-search" @click="openPartDialog()"></el-button> </el-input> </el-form-item> </el-col> @@ -128,12 +103,7 @@ </el-col> <el-col :span="5"> <el-form-item label="备注" prop="remark"> <el-input type="textarea" v-model="dataForm.remark" placeholder="备注" style="width:360px" ></el-input> <el-input type="textarea" v-model="dataForm.remark" placeholder="备注" style="width:360px"></el-input> </el-form-item> </el-col> </el-row> @@ -142,61 +112,24 @@ <div class="document-detail"> <el-tabs type="card" style="width: 100%;height: 100%"> <el-tab-pane label="原材用量" style="height: 100%" class="orimaterial-quantity" > <el-card shadow="never" style="margin-top: 12px;border: 1px solid #cfd5de;" > <el-tab-pane label="原材用量" style="height: 100%" class="orimaterial-quantity"> <el-card shadow="never" style="margin-top: 12px;border: 1px solid #cfd5de;"> <div slot="header"> <div> <el-button type="text" size="small" class="blue-but" v-if="editable" @click="calcMaterialCost()" >计算用量 <el-button type="text" size="small" class="blue-but" v-if="editable" @click="calcMaterialCost()">计算用量 </el-button> <el-button type="text" size="small" @click="exportMaterialCost()" >导出 <el-button type="text" size="small" @click="exportMaterialCost()">导出 </el-button> </div> </div> <el-table :data="materialCostList" border height="650" :span-method="objectSpanMethod" :header-cell-style="{ color: '#999' }" class="document-materialcost-table" show-summary :summary-method="getSummaries" ref="summeryTable" > <el-table-column label="成品" prop="finishedProduct" align="center" > <el-table :data="materialCostList" border height="650" :span-method="objectSpanMethod" :header-cell-style="{ color: '#999' }" class="document-materialcost-table" show-summary :summary-method="getSummaries" ref="summeryTable"> <el-table-column label="成品" prop="finishedProduct" align="center"> </el-table-column> <el-table-column label="Bom编号" prop="bomNumber" align="center" > <el-table-column label="Bom编号" prop="bomNumber" align="center"> </el-table-column> <el-table-column label="工序" prop="operationName" align="center" > <el-table-column label="工序" prop="operationName" align="center"> </el-table-column> <el-table-column label="物料" prop="partName" align="center"> </el-table-column> @@ -207,163 +140,63 @@ </el-table> </el-card> </el-tab-pane> <el-tab-pane class="final-product-checkout" label="成品检测" style="height: 100%" > <TeststandardDialog :editable="editable" :documentId="Number(dataForm.id)" > <el-tab-pane class="final-product-checkout" label="成品检测" style="height: 100%"> <TeststandardDialog :editable="editable" :documentId="Number(dataForm.id)"> </TeststandardDialog> </el-tab-pane> <el-tab-pane label="产品结构工序参数" style="height: 100%"> <div class="document-related-stock-part"> <div style="padding-left:18px;font-size:14px;font-weight:700;color:#000;height:20px;line-height:20px;" > <div style="padding-left:18px;font-size:14px;font-weight:700;color:#000;height:20px;line-height:20px;"> <span>相关库存零件</span> </div> <el-table :data="relatedStockPartList" @row-click="clickRelatedStockPart" highlight-current-row height="188px" :header-cell-style="relatedStockPartTableHeaderCellStyle" :row-style="{ height: '0' }" :cell-style="{ padding: '1px' }" > <el-table-column label="零件编号" prop="partNo" align="center" :show-overflow-tooltip="true" > <el-table :data="relatedStockPartList" @row-click="clickRelatedStockPart" highlight-current-row height="188px" :header-cell-style="relatedStockPartTableHeaderCellStyle" :row-style="{ height: '0' }" :cell-style="{ padding: '1px' }"> <el-table-column label="零件编号" prop="partNo" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="零件描述" prop="partName" align="center" width="400" :show-overflow-tooltip="true" > <el-table-column label="零件描述" prop="partName" align="center" width="400" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="工艺路线编号" prop="routingNo" align="center" :show-overflow-tooltip="true" > <el-table-column label="工艺路线编号" prop="routingNo" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="工艺路线版本" prop="routingVersion" align="center" :show-overflow-tooltip="true" > <el-table-column label="工艺路线版本" prop="routingVersion" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="工艺替代号" prop="routingAlternativeNo" align="center" :show-overflow-tooltip="true" > <el-table-column label="工艺替代号" prop="routingAlternativeNo" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="工艺替代描述" prop="routingAlternativeDesc" align="center" :show-overflow-tooltip="true" > <el-table-column label="工艺替代描述" prop="routingAlternativeDesc" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="BOM号" prop="bomNo" align="center" :show-overflow-tooltip="true" > <el-table-column label="BOM号" prop="bomNo" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="BOM版本" prop="bomVersion" align="center" :show-overflow-tooltip="true" > <el-table-column label="BOM版本" prop="bomVersion" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="BOM替代号" prop="bomAlternativeNo" align="center" :show-overflow-tooltip="true" > <el-table-column label="BOM替代号" prop="bomAlternativeNo" align="center" :show-overflow-tooltip="true"> </el-table-column> <el-table-column label="BOM替代描述" prop="bomAlternativeDesc" align="center" :show-overflow-tooltip="true" > <el-table-column label="BOM替代描述" prop="bomAlternativeDesc" align="center" :show-overflow-tooltip="true"> </el-table-column> </el-table> </div> <el-card class="document-bom" header="BOM-工序参数"> <div slot="header"> <span>BOM-工序参数</span> <el-tooltip class="item" effect="dark" content="删除工艺路线" placement="top-start" v-if="editable" style="margin-left:5px ;" > <el-button style="float: right; padding: 3px 0px 3px 5px;color:red" type="text" @click="delCompleteproductstructure()" >删除 <el-tooltip class="item" effect="dark" content="删除工艺路线" placement="top-start" v-if="editable" style="margin-left:5px ;"> <el-button style="float: right; padding: 3px 0px 3px 5px;color:red" type="text" @click="delCompleteproductstructure()">删除 </el-button> </el-tooltip> <el-tooltip class="item" effect="dark" content="选择工艺路线" placement="top-start" v-if="editable" > <el-button style="float: right; padding: 3px 0" type="text" @click="addTechnology()" >添加 <el-tooltip class="item" effect="dark" content="选择工艺路线" placement="top-start" v-if="editable"> <el-button style="float: right; padding: 3px 0" type="text" @click="addTechnology()">添加 </el-button> </el-tooltip> </div> <el-collapse v-model="currTechnologyBomPartName" accordion @change="handleCompleteproductstructureChange" > <el-collapse-item v-for="(item, i) in completeproductstructureData" :key="i" :name="item.bomRoutingId" > <el-collapse v-model="currTechnologyBomPartName" accordion @change="handleCompleteproductstructureChange"> <el-collapse-item v-for="(item, i) in completeproductstructureData" :key="i" :name="item.bomRoutingId"> <template slot="title"> <el-checkbox class="completeproductstructure-checkout" v-model="item.expand" disabled > <span style="font-weight:bold">工艺路线编号:</span >{{ item.routingNo }} <span style="font-weight:bold">零件号:</span >{{ item.partNo }} <span style="font-weight:bold">零件名称:</span >{{ item.partName }} <span style="font-weight:bold">Bom编号:</span >{{ item.number == null ? '无' : item.number }} <el-checkbox class="completeproductstructure-checkout" v-model="item.expand" disabled> <span style="font-weight:bold">工艺路线编号:</span>{{ item.routingNo }} <span style="font-weight:bold">零件号:</span>{{ item.partNo }} <span style="font-weight:bold">零件名称:</span>{{ item.partName }} <span style="font-weight:bold">Bom编号:</span>{{ item.number == null ? '无' : item.number }} </el-checkbox> </template> <div style="display:flex;"> @@ -373,9 +206,7 @@ item.showBom ? 'highlight-tab-class' : 'unhighlight-tab-class' ]" @click="item.showBom = true" > ]" @click="item.showBom = true"> BOM结构 </div> <div @@ -384,44 +215,23 @@ !item.showBom ? 'highlight-tab-class' : 'unhighlight-tab-class' ]" @click="item.showBom = false" > ]" @click="item.showBom = false"> 工序参数 </div> </div> <div class="document-bom-div" v-show="item.showBom"> <el-tooltip class="item" effect="dark" content="添加或更换BOM结构" placement="top-start" v-if="editable" style="margin-right:20px;" > <el-button style="float: right; padding: 3px 0px;color:#67c23a" type="text" @click="addCompleteproductstructure()" >添加 <el-tooltip class="item" effect="dark" content="添加或更换BOM结构" placement="top-start" v-if="editable" style="margin-right:20px;"> <el-button style="float: right; padding: 3px 0px;color:#67c23a" type="text" @click="addCompleteproductstructure()">添加 </el-button> </el-tooltip> <el-table :data="item.completeproductstructureDetail" row-key="id" border height="440" default-expand-all class="structure-detail-table" > <el-table :data="item.completeproductstructureDetail" row-key="id" border height="440" default-expand-all class="structure-detail-table"> <el-table-column prop="partNo" label="零件号" width="240"> </el-table-column> <el-table-column prop="partName" label="零件名称" width="400" > <el-table-column prop="partName" label="零件名称" width="400"> </el-table-column> <el-table-column prop="qpa" label="数量" width="180"> </el-table-column> @@ -430,165 +240,75 @@ </el-table> </div> <div class="document-technology-div" v-show="!item.showBom"> <div style="border: 1px solid #ebeef5;height: 440px;overflow: auto;" > <el-collapse v-model="currTechnologyOperationName" accordion @change=" handleTechnologyOperationChange( $event, item.bomRoutingId ) " > <el-collapse-item v-for="(ele, j) in item.technologyOperationData" :key="j" :name="ele.id" > <template slot="title" ><span style="font-weight:300" > 工序名称:</span >{{ ele.operationName }} <span style="font-weight:300">工序编号:</span >{{ ele.operationNo }} <div style="border: 1px solid #ebeef5;height: 440px;overflow: auto;"> <el-collapse v-model="currTechnologyOperationName" accordion @change=" handleTechnologyOperationChange( $event, item.bomRoutingId ) "> <el-collapse-item v-for="(ele, j) in item.technologyOperationData" :key="j" :name="ele.id"> <template slot="title"><span style="font-weight:300"> 工序名称:</span>{{ ele.operationName }} <span style="font-weight:300">工序编号:</span>{{ ele.operationNo }} </template> <el-tabs v-model="activeTemplateName" type="card"> <el-tab-pane v-for="(paramTab, index) in paramTabs" :key="index" :label="paramTab.label" :name="paramTab.name" > <el-tab-pane v-for="(paramTab, index) in paramTabs" :key="index" :label="paramTab.label" :name="paramTab.name"> <el-table :data="paramTab.params"> <el-table-column prop="parameterItem" label="名称" align="center" > <el-table-column prop="parameterItem" label="名称" align="center"> <template slot-scope="scope"> <span >{{ scope.row.parameterItem }}({{ scope.row.unit }})</span > <span>{{ scope.row.parameterItem }}({{ scope.row.unit }})</span> </template> </el-table-column> <el-table-column prop="paramValue" label="值" align="center" ></el-table-column> <el-table-column prop="paramValue" label="值" align="center"></el-table-column> </el-table> </el-tab-pane> <el-tab-pane label="备注" style="height: 100%"> <rich-text :editorId=" 'fwb' + item.id + '-' + ele.id + '-' + j " :richContent="ele.remark" ></rich-text> <rich-text :editorId="'fwb' + item.id + '-' + ele.id + '-' + j " :richContent="ele.remark"></rich-text> </el-tab-pane> <el-tab-pane label="检测标准"> <checkStandardTable ref="documentTestStandardTable" :dataFormId="dataForm.id" :routingOperationId="ele.id" :operationId="ele.operationId" :operationName="ele.operationName" :paramTypeOptions="paramTypeOptions" :bomRoutingId=" currTechnologyBomPart == null ? null : currTechnologyBomPart.bomRoutingId " :everyBomRoutingId="item.bomRoutingId" :editable="editable" @refreshTestStandardInfo=" refreshTestStandardInfo " ></checkStandardTable> <checkStandardTable ref="documentTestStandardTable" :dataFormId="dataForm.id" :routingOperationId="ele.id" :operationId="ele.operationId" :operationName="ele.operationName" :paramTypeOptions="paramTypeOptions" :bomRoutingId="currTechnologyBomPart == null ? null : currTechnologyBomPart.bomRoutingId " :everyBomRoutingId="item.bomRoutingId" :editable="editable" @refreshTestStandardInfo="refreshTestStandardInfo"></checkStandardTable> </el-tab-pane> <el-tab-pane label="抽检规则"> <div> <div style="padding: 0px 20px;"> <el-button type="primary" @click="openAddSpotCheckRuleDialog" >新增</el-button > <el-button type="primary" @click="openAddSpotCheckRuleDialog">新增</el-button> </div> <div> <el-table :data="spotCheckRuleList" style="width: 100%" > <el-table-column prop="ruleNo" label="规则编号" align="center" > <el-table :data="spotCheckRuleList" style="width: 100%"> <el-table-column prop="ruleNo" label="规则编号" align="center"> </el-table-column> <el-table-column prop="ruleName" label="规则名称" align="center" > <el-table-column prop="ruleName" label="规则名称" align="center"> </el-table-column> <el-table-column prop="samplingOperationName" label="抽检工序" align="center" > <el-table-column prop="samplingOperationName" label="抽检工序" align="center"> </el-table-column> <el-table-column prop="retrospectOperationName" label="追溯工序" align="center" > <el-table-column prop="retrospectOperationName" label="追溯工序" align="center"> </el-table-column> <el-table-column prop="applyType" label="检测类型" align="center" :formatter="applyTypeFormatter" > <el-table-column prop="applyType" label="检测类型" align="center" :formatter="applyTypeFormatter"> </el-table-column> <el-table-column prop="measurement" label="抽检比例" align="center" :formatter="measurementFormatter" > <el-table-column prop="measurement" label="抽检比例" align="center" :formatter="measurementFormatter"> </el-table-column> <el-table-column prop="samplingPosition" label="抽检位置" align="center" > <el-table-column prop="samplingPosition" label="抽检位置" align="center"> </el-table-column> <el-table-column label="操作" width="100" align="center" > <el-table-column label="操作" width="100" align="center"> <template slot-scope="scope"> <el-button type="text" size="small" @click=" openEditSpotCheckRule(scope.row) " >编辑</el-button > <el-button type="text" size="small" @click="delSpotCheckRule(scope.row)" >删除</el-button > <el-button type="text" size="small" @click=" openEditSpotCheckRule(scope.row) ">编辑</el-button> <el-button type="text" size="small" @click="delSpotCheckRule(scope.row)">删除</el-button> </template> </el-table-column> </el-table> @@ -609,21 +329,11 @@ <div slot="header"> <span>结构图</span> </div> <el-upload class="upload-demo" action="/mes/document/uploadJgt" :headers="headers" :on-preview="handleStructurePreview" :on-remove="handleStructureRemove" :on-success="handleStructureSuccess" :data="paramStructureDatas" :file-list="fileStructureList" :on-exceed="handleStructureExceed" :before-upload="beforeStructureAvatarUpload" list-type="picture" multiple :with-credentials="true" > <el-upload class="upload-demo" action="/mes/document/uploadJgt" :headers="headers" :on-preview="handleStructurePreview" :on-remove="handleStructureRemove" :on-success="handleStructureSuccess" :data="paramStructureDatas" :file-list="fileStructureList" :on-exceed="handleStructureExceed" :before-upload="beforeStructureAvatarUpload" list-type="picture" multiple :with-credentials="true"> <el-button size="small" type="primary">点击上传</el-button> <div slot="tip" class="el-upload__tip"> 只能上传jpg图片,且不超过2MB @@ -695,33 +405,18 @@ </el-tabs> </div> </div> <completeproductstructureDialog :currshowlist.sync="showCompleteproductstructure" :queryParam="bomQueryParam" @listenToCompleteproductstructureEvent="selectCompleteproductstructure" /> <routingDialog :currshowlist.sync="showTechnology" :queryParam="queryParam" @listenToRoutingEvent="selectTechnology" /> <qualityStandardDialog :currshowlist.sync="showQualityStandard" @listenToSelectTestStandardEvent="selectQualityStandard" /> <completeproductstructureDialog :currshowlist.sync="showCompleteproductstructure" :queryParam="bomQueryParam" @listenToCompleteproductstructureEvent="selectCompleteproductstructure" /> <routingDialog :currshowlist.sync="showTechnology" :queryParam="queryParam" @listenToRoutingEvent="selectTechnology" /> <qualityStandardDialog :currshowlist.sync="showQualityStandard" @listenToSelectTestStandardEvent="selectQualityStandard" /> <partDialog :currshowlist.sync="showPart" @listenToPartEvent="selectPart" /> <spotCheckRule :currshowlist.sync="spotCheckRuleShow" :docBomId="currDocBomId" :routingOperationId="currRoutingOperationId" :routingOperationName="currRoutingOperationName" @refreshSpotCheckRuleList="refreshSpotCheckRuleList" /> <spotCheckRuleEdit :currshowlist.sync="editSpotCheckRuleShow" :documentSamplingRuleId="currDocumentSamplingRuleId" @refreshSpotCheckRuleList="refreshSpotCheckRuleList" /> <spotCheckRule :currshowlist.sync="spotCheckRuleShow" :docBomId="currDocBomId" :routingOperationId="currRoutingOperationId" :routingOperationName="currRoutingOperationName" @refreshSpotCheckRuleList="refreshSpotCheckRuleList" /> <spotCheckRuleEdit :currshowlist.sync="editSpotCheckRuleShow" :documentSamplingRuleId="currDocumentSamplingRuleId" @refreshSpotCheckRuleList="refreshSpotCheckRuleList" /> </div> </template> @@ -873,7 +568,7 @@ spotCheckRuleEdit }, computed: { editable: function() { editable: function () { if (!this.dataForm.id) { return true } @@ -962,15 +657,15 @@ } // flowTemp.loadData(jsondata) // 保存按钮事件 _this.flowTemp.onBtnSaveClick = function() { _this.flowTemp.onBtnSaveClick = function () { _this.saveFlow() } // 重置按钮事件 _this.flowTemp.onFreshClick = function() { _this.flowTemp.onFreshClick = function () { _this.getFlow() } // 打印按钮事件 _this.flowTemp.onPrintClick = function() { _this.flowTemp.onPrintClick = function () { _this.flowTemp.exportDiagram('流程图') } }, @@ -1874,8 +1569,7 @@ }, handleFlowExceed(files, fileList) { this.$message.warning( `当前限制选择 1 个流程图文件,本次选择了 ${ files.length `当前限制选择 1 个流程图文件,本次选择了 ${files.length } 个流程图文件,共选择了 ${files.length + fileList.length} 个流程图文件` ) }, @@ -2053,9 +1747,10 @@ padding: 10px 20px; box-sizing: border-box; } .el-card.is-always-shadow{ width: 100%; } .el-card.is-always-shadow { width: 100%; } .document-flow { background-color: #fff; @@ -2069,30 +1764,22 @@ } /*自定义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; } @@ -2161,11 +1848,13 @@ .GooFlow .ico .ico_start:before { color: red; } .highlight-tab-class { color: #006eff; background: #e4e7ed; border-top: 1px solid #006eff; } .unhighlight-tab-class { border: 1px solid #e4e7ed; border-bottom: none;