Merge remote-tracking branch 'origin/master'
| | |
| | | //编码申请控件 |
| | | export const getUsedTemplateByClassifyOid = (params) => { |
| | | return request({ |
| | | url: '/api/ubcs-code/codeApplySwingController/getUsedTemplateByClassifyOid', |
| | | url: '/api/ubcs-code/codeApplySwingController/getFormDefineByTemplateOid', |
| | | method: 'get', |
| | | params |
| | | }) |
| | | } |
| | | //码值 |
| | | export function getCodeRule(params) { |
| | | return request({ |
| | | url: 'api/ubcs-code/mdmEngineController/getCodeRuleByClassifyOid', |
| | |
| | | params |
| | | }) |
| | | } |
| | | |
| | | //保存 |
| | | export function addSaveCode(data) { |
| | | return request({ |
| | | url: 'api/ubcs-code/codeApplySwingController/addSaveCode', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | |
| | | //删除 |
| | | export const deleteData = (row) => { |
| | | const formData = new FormData(); |
| | | formData.append('oid', row.oid); |
| | | formData.append('ts', row.ts); |
| | | formData.append('oid', row.oid); |
| | | formData.append('ts', row.ts); |
| | | return request({ |
| | | url: '/api/ubcs-code/resembleRuleController/deleteData', |
| | | method: 'delete', |
| | | data:formData |
| | | }) |
| | | data: formData |
| | | }); |
| | | } |
| | |
| | | type: String, |
| | | default: "", |
| | | }, |
| | | LoadingStatus:{ |
| | | type: String, |
| | | default : "code" |
| | | }, |
| | | // 列表数据oid |
| | | rowOid: { |
| | | type: String, |
| | |
| | | this.handleResize(); |
| | | }, |
| | | created() { |
| | | |
| | | if (this.LoadingStatus === 'code') { |
| | | this.loading = false; |
| | | } |
| | | }, |
| | | computed: { |
| | | localTrendsSpan() { |
| | |
| | | </el-select></span> |
| | | </div> |
| | | <el-table ref="dataTable" v-loading="isLoading" :data="tableData" |
| | | :height="tableHeight" |
| | | :height="tableHeight" border |
| | | @select="handleSelection" @cell-click="handleCellClick" @row-click="handleRowClick" |
| | | @select-all="handleSelectionAll" @selection-change="handleSelectionChange" |
| | | @sort-change="sortChange"> |
| | |
| | | </el-link> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-for="item in this.tableHeadFindData" v-if="!item.hidden && item.prop !== 'id'" |
| | | <el-table-column v-for="item in this.tableHeadFindData" v-if="!item.hidden && item.prop !== 'id' && item.prop !== 'lcstatus'" |
| | | :key="item.id" |
| | | :formatter="item.formatter" |
| | | :label="item.label" :prop="item.prop" |
| | |
| | | :sortable="item.sortable" |
| | | :width="item.width" |
| | | align="center"> |
| | | </el-table-column> |
| | | <el-table-column v-for="item in lcstatusArray" v-if="!item.hidden" label="生命周期值" prop="lcstatus" |
| | | :show-overflow-tooltip="true" :sortable="item.sortable" :width="item.width" |
| | | align="center"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.lcstatus_text }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-row> |
| | |
| | | LinkList: [], |
| | | isCodeArrayPushed: false, // 编码数组添加标识变量 |
| | | CodeArray: [], |
| | | lcstatusArray:[], |
| | | islcstatusPushed:false, |
| | | // 状态搜索 |
| | | statusSelect: "all", |
| | | // 关键字查询 |
| | |
| | | if (!this.isCodeArrayPushed) { |
| | | this.CodeArray.push(newval.find(item => item.prop === 'id')) |
| | | this.isCodeArrayPushed = true |
| | | } |
| | | }; |
| | | if (!this.islcstatusPushed) { |
| | | this.lcstatusArray.push(newval.find(item => item.prop === 'lcstatus')) |
| | | this.islcstatusPushed = true |
| | | }; |
| | | // console.log('new',newval) |
| | | this.WupinFindValue = '' |
| | | }, |
| | |
| | | }, |
| | | // 排序 |
| | | sortChange(val) { |
| | | console.log(val) |
| | | // console.log(val) |
| | | this.isLoading = true; |
| | | let order = ""; |
| | | if (val.order == "ascending") { |
| | |
| | | <el-table v-if="this.crudArrayFlag" |
| | | ref="referAttrCrud" |
| | | v-loading="loading" |
| | | border |
| | | :data="ProData" |
| | | :height="this.editStyleFlag? 800 : 343" |
| | | style="width: 100%" |
| | |
| | | <top-color></top-color> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip v-if="showDebug" |
| | | effect="dark" |
| | | :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')" |
| | | placement="bottom"> |
| | | <div class="top-bar__item"> |
| | | <top-logs></top-logs> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip v-if="showLock" |
| | | effect="dark" |
| | | :content="$t('navbar.lock')" |
| | | placement="bottom"> |
| | | <div class="top-bar__item"> |
| | | <top-lock></top-lock> |
| | | </div> |
| | | </el-tooltip> |
| | | <!-- 错误日志--> |
| | | <!-- <el-tooltip v-if="showDebug"--> |
| | | <!-- effect="dark"--> |
| | | <!-- :content="logsFlag?$t('navbar.bug'):logsLen+$t('navbar.bugs')"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item">--> |
| | | <!-- <top-logs></top-logs>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- 锁屏--> |
| | | <!-- <el-tooltip v-if="showLock"--> |
| | | <!-- effect="dark"--> |
| | | <!-- :content="$t('navbar.lock')"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item">--> |
| | | <!-- <top-lock></top-lock>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <el-tooltip v-if="showTheme" |
| | | effect="dark" |
| | | :content="$t('navbar.theme')" |
| | |
| | | <top-theme></top-theme> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" |
| | | :content="$t('navbar.notice')" |
| | | placement="bottom"> |
| | | <div class="top-bar__item top-bar__item--show"> |
| | | <top-notice></top-notice> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" |
| | | :content="$t('navbar.language')" |
| | | placement="bottom"> |
| | | <div class="top-bar__item top-bar__item--show"> |
| | | <top-lang></top-lang> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip v-if="showFullScren" |
| | | effect="dark" |
| | | :content="isFullScren?$t('navbar.screenfullF'):$t('navbar.screenfull')" |
| | | placement="bottom"> |
| | | <div class="top-bar__item"> |
| | | <i :class="isFullScren?'icon-tuichuquanping':'icon-quanping'" |
| | | @click="handleScreen"></i> |
| | | </div> |
| | | </el-tooltip> |
| | | <!-- 消息通知--> |
| | | <!-- <el-tooltip effect="dark"--> |
| | | <!-- :content="$t('navbar.notice')"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item top-bar__item--show">--> |
| | | <!-- <top-notice></top-notice>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- 中英文--> |
| | | <!-- <el-tooltip effect="dark"--> |
| | | <!-- :content="$t('navbar.language')"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item top-bar__item--show">--> |
| | | <!-- <top-lang></top-lang>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- 全屏--> |
| | | <!-- <el-tooltip v-if="showFullScren"--> |
| | | <!-- effect="dark"--> |
| | | <!-- :content="isFullScren?$t('navbar.screenfullF'):$t('navbar.screenfull')"--> |
| | | <!-- placement="bottom">--> |
| | | <!-- <div class="top-bar__item">--> |
| | | <!-- <i :class="isFullScren?'icon-tuichuquanping':'icon-quanping'"--> |
| | | <!-- @click="handleScreen"></i>--> |
| | | <!-- </div>--> |
| | | <!-- </el-tooltip>--> |
| | | <img class="top-bar__img" |
| | | :src="userInfo.avatar"> |
| | | <el-dropdown> |
| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | ref="crud" |
| | | v-model="form" |
| | | :page.sync="page" |
| | | @row-del="rowDel" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-search" |
| | | plain @click="searchHandler">查 询 |
| | | </el-button> |
| | | <advanced-query :options="options" :visible.sync="findvisible" |
| | | @echoContion="echoContion"></advanced-query> |
| | | <el-button type="danger" |
| | | size="small" |
| | | icon="el-icon-delete" |
| | | plain @click="deleteHandler">删 除 |
| | | </el-button> |
| | | <el-button type="success" |
| | | size="small" |
| | | icon="el-icon-edit" |
| | | plain>修 改 |
| | | </el-button> |
| | | <el-button type="primary" |
| | | size="small" |
| | | icon="el-icon-refresh-right" |
| | | plain>刷 新 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | <basic-container> |
| | | <avue-crud ref="crud" |
| | | v-model="form" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="loading" |
| | | @row-del="rowDel" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-search" |
| | | plain |
| | | size="small" |
| | | type="primary" @click="searchHandler">查 询 |
| | | </el-button> |
| | | <advanced-query :options="options" :visible.sync="findvisible" |
| | | @echoContion="echoContion"></advanced-query> |
| | | <el-button icon="el-icon-delete" |
| | | plain |
| | | size="small" |
| | | type="danger" @click="deleteHandler">删 除 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" |
| | | plain |
| | | size="small" |
| | | type="success" @click="editHandler">修 改 |
| | | </el-button> |
| | | <el-button icon="el-icon-refresh-right" |
| | | plain |
| | | size="small" |
| | | type="primary" @click="onLoad">刷 新 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList,add,editSave,deleteData} from "@/api/code/codeMatch"; |
| | | import {getList, add, editSave, deleteData} from "@/api/code/codeMatch"; |
| | | |
| | | export default { |
| | | name: "Match", |
| | | data(){ |
| | | return{ |
| | | name: "Match", |
| | | data() { |
| | | return { |
| | | options: [ |
| | | { |
| | | fieid:'id', |
| | | title:'编号', |
| | | fieldType:'text', |
| | | queryField:'id' |
| | | fieid: 'id', |
| | | title: '编号', |
| | | fieldType: 'text', |
| | | queryField: 'id' |
| | | }, |
| | | { |
| | | fieid:'name', |
| | | title:'名称', |
| | | fieldType:'text', |
| | | queryField:'name' |
| | | fieid: 'name', |
| | | title: '名称', |
| | | fieldType: 'text', |
| | | queryField: 'name' |
| | | }, |
| | | { |
| | | fieid:'ignoreallspaceflag', |
| | | title:'忽略全部空格', |
| | | fieldType:'truefalse', |
| | | queryField:'ignoreallspaceflag' |
| | | fieid: 'ignoreallspaceflag', |
| | | title: '忽略全部空格', |
| | | fieldType: 'truefalse', |
| | | queryField: 'ignoreallspaceflag' |
| | | }, |
| | | { |
| | | fieid:'ignorecaseflag', |
| | | title:'忽略大小写', |
| | | fieldType:'truefalse', |
| | | queryField:'ignorecaseflag' |
| | | fieid: 'ignorecaseflag', |
| | | title: '忽略大小写', |
| | | fieldType: 'truefalse', |
| | | queryField: 'ignorecaseflag' |
| | | }, |
| | | { |
| | | fieid:'ignorespaceflag', |
| | | title:'忽略空格', |
| | | fieldType:'truefalse', |
| | | queryField:'ignorespaceflag' |
| | | fieid: 'ignorespaceflag', |
| | | title: '忽略空格', |
| | | fieldType: 'truefalse', |
| | | queryField: 'ignorespaceflag' |
| | | }, |
| | | { |
| | | fieid:'ignorewidthflag', |
| | | title:'忽略全半角', |
| | | fieldType:'truefalse', |
| | | queryField:'ignorewidthflag' |
| | | fieid: 'ignorewidthflag', |
| | | title: '忽略全半角', |
| | | fieldType: 'truefalse', |
| | | queryField: 'ignorewidthflag' |
| | | }, |
| | | { |
| | | fieid:'linkCharacter', |
| | | title:'忽略连接字符', |
| | | fieldType:'text', |
| | | queryField:'linkCharacter' |
| | | fieid: 'linkCharacter', |
| | | title: '忽略连接字符', |
| | | fieldType: 'text', |
| | | queryField: 'linkCharacter' |
| | | }, |
| | | ], |
| | | findvisible:false, |
| | | selectRow:[], |
| | | option:{ |
| | | height:700, |
| | | findvisible: false, |
| | | selectRow: [], |
| | | option: { |
| | | height: 700, |
| | | calcHeight: 80, |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | columnBtn:false, |
| | | columnBtn: false, |
| | | border: true, |
| | | index: true, |
| | | selection: true, |
| | |
| | | label: '是', |
| | | value: 'true' |
| | | }], |
| | | formatter:function(row){ |
| | | return row.ignoreallspaceflag ==='true' ? '是' : '否' |
| | | formatter: function (row) { |
| | | return row.ignoreallspaceflag === 'true' ? '是' : '否' |
| | | } |
| | | }, |
| | | { |
| | |
| | | label: '是', |
| | | value: 'true' |
| | | }], |
| | | formatter:function(row){ |
| | | return row.ignorecaseflag ==='true' ? '是' : '否' |
| | | formatter: function (row) { |
| | | return row.ignorecaseflag === 'true' ? '是' : '否' |
| | | } |
| | | }, |
| | | { |
| | |
| | | label: '是', |
| | | value: 'true' |
| | | }], |
| | | formatter:function(row){ |
| | | return row.ignorespaceflag ==='true' ? '是' : '否' |
| | | formatter: function (row) { |
| | | return row.ignorespaceflag === 'true' ? '是' : '否' |
| | | } |
| | | }, |
| | | { |
| | |
| | | label: '是', |
| | | value: 'true' |
| | | }], |
| | | formatter:function(row){ |
| | | return row.ignorewidthflag ==='true' ? '是' : '否' |
| | | formatter: function (row) { |
| | | return row.ignorewidthflag === 'true' ? '是' : '否' |
| | | } |
| | | }, |
| | | { |
| | |
| | | prop: "linkCharacter", |
| | | type: 'textarea', |
| | | labelWidth: 100, |
| | | span:24 |
| | | span: 24 |
| | | |
| | | } |
| | | ] |
| | | }, |
| | | loading:true, |
| | | data:[], |
| | | form:{}, |
| | | loading: true, |
| | | data: [], |
| | | form: {}, |
| | | page: { |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0 |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.onLoad() |
| | | }, |
| | | methods:{ |
| | | searchHandler(){ |
| | | this.findvisible=true; |
| | | methods: { |
| | | searchHandler() { |
| | | this.findvisible = true; |
| | | }, |
| | | echoContion(row){ |
| | | echoContion(val) { |
| | | console.log(...val) |
| | | // FindData({ |
| | | // templateOid: this.templateOid, |
| | | // codeClassifyOid: this.codeClassifyOid, |
| | | // ...val, |
| | | // }).then((res) => { |
| | | // this.tableData = res.data.data; |
| | | // this.page.total = res.data.total |
| | | // }); |
| | | }, |
| | | deleteHandler() { |
| | | const length = this.selectRow.length; |
| | | if (length > 1) { |
| | | this.$message.warning('只能选择一条数据!'); |
| | | return; |
| | | } |
| | | if (length <= 0) { |
| | | this.$message.warning('请选择一条数据! '); |
| | | return; |
| | | } |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return deleteData(this.selectRow[0]) |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | deleteHandler(){ |
| | | if(this.selectRow.length <= 0){ |
| | | this.$message.warning('请选择一条数据') |
| | | }else { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | const Obj = [...this.selectRow]; |
| | | return deleteData(item); |
| | | }) |
| | | .then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | editHandler() { |
| | | const length = this.selectRow.length; |
| | | if (length > 1) { |
| | | this.$message.warning('只能选择一条数据!'); |
| | | return; |
| | | } |
| | | if (length <= 0) { |
| | | this.$message.warning('请选择一条数据! '); |
| | | return; |
| | | } |
| | | this.$refs.crud.rowEdit(this.selectRow[0]); |
| | | }, |
| | | rowDel(row){ |
| | | rowDel(row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | rowUpdate(row, index, done, loading){ |
| | | rowUpdate(row, index, done, loading) { |
| | | console.log(row) |
| | | editSave(row).then(() => { |
| | | this.onLoad(this.page); |
| | |
| | | loading(); |
| | | }); |
| | | }, |
| | | selectionChange(row){ |
| | | console.log(row) |
| | | this.selectRow=row; |
| | | selectionChange(row) { |
| | | // console.log(row) |
| | | this.selectRow = row; |
| | | }, |
| | | currentChange(currentPage) { |
| | | this.page.currentPage = currentPage; |
| | |
| | | this.page.pageSize = pageSize; |
| | | }, |
| | | refreshChange() { |
| | | this.onLoad( this.page.currentPage,this.page.pageSize); |
| | | this.onLoad(this.page.currentPage, this.page.pageSize); |
| | | }, |
| | | onLoad(page){ |
| | | getList( this.page.currentPage,this.page.pageSize).then(res=>{ |
| | | this.page.total = res.data.total; |
| | | this.data = res.data.data; |
| | | onLoad(page) { |
| | | this.loading = true; |
| | | getList(this.page.currentPage, this.page.pageSize).then(res => { |
| | | if (res.data && res.data.data.length > 0) { |
| | | this.page.total = res.data.total; |
| | | this.data = res.data.data; |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | key="masterForm" data-key="masterForm" |
| | | v-bind="$attrs" |
| | | :type="type" |
| | | :LoadingStatus="status" |
| | | :TreeValue="TreeValue" |
| | | :eventList="eventList" |
| | | ref="FormTemplate" |
| | |
| | | @getFormData="getCodeApplyFormData" |
| | | @referConfigDataUpdate="referConfigDataUpdate" |
| | | ></FormTemplate> |
| | | <el-button |
| | | @click="submit()" |
| | | type="primary" |
| | | size="small" |
| | | style="float: right" |
| | | >保存</el-button> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | |
| | | </div> |
| | | </basic-container> |
| | | </el-col> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getAuthTree,getUsedTemplateByClassifyOid,getCodeRule} from '@/api/code/codeApply.js' |
| | | import {getAuthTree,getUsedTemplateByClassifyOid,getCodeRule,addSaveCode} from '@/api/code/codeApply.js' |
| | | |
| | | export default { |
| | | name: "codeApply", |
| | | components: { FormTemplate: () => import('@/components/FormTemplate/FormTemplate') }, |
| | | data() { |
| | | return { |
| | | defaultKeys: [ |
| | | "oid", |
| | | "id", |
| | | "name", |
| | | "description", |
| | | "revisionoid", |
| | | "nameoid", |
| | | "btmname", |
| | | "lastr", |
| | | "firstr", |
| | | "lastv", |
| | | "firstv", |
| | | "creator", |
| | | "createtime", |
| | | "lastModifier", |
| | | "lastmodifytime", |
| | | "revisionrule", |
| | | "revisionseq", |
| | | "revisionvalue", |
| | | "versionrule", |
| | | "versionseq", |
| | | "versionvalue", |
| | | "lcstatus", |
| | | "ts", |
| | | "owner", |
| | | "checkinby", |
| | | "checkintime", |
| | | "checkoutby", |
| | | "checkouttime", |
| | | "copyfromversion", |
| | | "secretgrade", |
| | | ], |
| | | codeClassifyOid:'', |
| | | type:'add', |
| | | status:'code', |
| | | TreeValue:'', |
| | | dialogVisible:true, |
| | | setForm:{}, |
| | |
| | | activeName: "codeApply", |
| | | showCodeApply: false, |
| | | eventList:[], |
| | | showResembleQuery:false, |
| | | hasResemble:false, |
| | | form: {}, |
| | | TreeData:[], |
| | | TreeOption: { |
| | |
| | | this.getTreeData() |
| | | }, |
| | | methods:{ |
| | | async submit() { |
| | | // 进行表单校验 |
| | | const formValidate = await this.$refs.FormTemplate.validate(); |
| | | if (!formValidate) return; |
| | | let codeValidate = true; |
| | | // 进行码值申请校验 |
| | | // if (this.showCodeApply) { |
| | | // codeValidate = await this.$refs.CodeApply.validate(); |
| | | // if (!codeValidate) { |
| | | // this.activeName = "codeApply"; |
| | | // return false; |
| | | // } |
| | | // } |
| | | let resembleQueryList = []; |
| | | if (this.showResembleQuery && this.$refs.resembleQueryRef) { |
| | | // 进行相似项查询 |
| | | resembleQueryList = await this.$refs.resembleQueryRef.resembleQuery( |
| | | this.form |
| | | ); |
| | | } |
| | | if (resembleQueryList.length > 0) { |
| | | await this.$confirm( |
| | | `该物料已有${resembleQueryList.length}条相似数据,是否继续保存?`, |
| | | "需要您确认", |
| | | { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | } |
| | | ); |
| | | } |
| | | // 排除一些字段 |
| | | const noData = [ |
| | | "jiliangdwname", |
| | | "materialtypeText", |
| | | "morengongysname", |
| | | "$caigouwl", |
| | | "$xiaoshouwl", |
| | | "$shifoupihaoguanli", |
| | | "lcstatus_text", |
| | | "hesuanfenleiname", |
| | | "$kucunwl", |
| | | "oldcode", |
| | | "lastmodifier" |
| | | ]; |
| | | let resForm = {}; |
| | | const { defaultValue, formValue } = this.getDefaultValueAndFormValues( |
| | | this.form |
| | | ); |
| | | noData.forEach((item) => { |
| | | this.$delete(formValue, item); |
| | | }); |
| | | const keys = Object.keys(formValue); |
| | | keys.forEach((item, index) => { |
| | | keys.forEach((itm, idx) => { |
| | | if ((item === ('$' + itm)) && idx !== index) { |
| | | this.$delete(formValue, keys[index]); |
| | | } |
| | | }) |
| | | }); |
| | | |
| | | resForm.data = formValue; |
| | | resForm = Object.assign({}, resForm, defaultValue); |
| | | resForm.secDTOList = this.secVOList.map((item) => { |
| | | return { |
| | | secOid: item.oid, |
| | | secValue: this.codeApplyForm[item.oid], |
| | | }; |
| | | }); |
| | | resForm.codeClassifyOid = this.codeClassifyOid; |
| | | resForm.codeRuleOid = this.codeRuleOid; |
| | | resForm.templateOid = this.templateOid; |
| | | // this.$emit("submit", resForm); |
| | | addSaveCode(resForm).then(res => { |
| | | this.$nextTick(() => { |
| | | this.addvisible = false; |
| | | this.$message.success("保存成功"); |
| | | this.onLoad() |
| | | }) |
| | | }) |
| | | console.log(resForm) |
| | | }, |
| | | getDefaultValueAndFormValues(form) { |
| | | let defaultValue = {}; |
| | | let formValue = {}; |
| | | for (const key in form) { |
| | | if (Object.hasOwnProperty.call(form, key)) { |
| | | const element = form[key]; |
| | | if (this.defaultKeys.includes(key)) { |
| | | defaultValue[key] = element; |
| | | } else { |
| | | formValue[key] = element; |
| | | } |
| | | } |
| | | } |
| | | return { |
| | | defaultValue, |
| | | formValue, |
| | | }; |
| | | }, |
| | | getFormData(form) { |
| | | this.form = form; |
| | | }, |
| | |
| | | }); |
| | | }, |
| | | nodeClick(row){ |
| | | // console.log(row) |
| | | console.log(row) |
| | | this.TreeValue=row.text.split(" ")[0].trim(); |
| | | this.codeClassifyOid = row.oid; |
| | | getUsedTemplateByClassifyOid({ 'codeClassifyOid': this.codeClassifyOid,templateOid:' 97e979919a1f1dca67290e85fee22688' }).then((res) => { |
| | | console.log('===res',res) |
| | | if (res.data.code === 200) { |
| | | if (res.status === 200) { |
| | | this.hasResemble = |
| | | res.data.resembleTableVO && |
| | | res.data.resembleTableVO.cols && |
| | | res.data.resembleTableVO.cols.length > 0; |
| | | this.resembleTableColumn = res.data.resembleTableVO.cols || []; |
| | | if (this.hasResemble) { |
| | | this.activeName = "resembleQuery"; |
| | | this.showResembleQuery = true; |
| | | } else { |
| | | this.showResembleQuery = false; |
| | | } |
| | | this.$nextTick(() => { |
| | | this.eventList=res.data.data.attributes |
| | | this.$refs.FormTemplate.templateRender( |
| | | res.data.formDefineVO.items |
| | | ); |
| | | this.eventList=res.data.templateVO.attributes |
| | | // this.$refs.FormTemplate.$emit('eventList', res.data.templateVO.attributes); |
| | | if (Object.keys(this.setForm).length > 0) { |
| | | this.$refs.FormTemplate.form = this.setForm; |
| | |
| | | * 用户平台 |
| | | */ |
| | | USER_TYPE("user_type"), |
| | | /*** |
| | | * 用户状态 |
| | | */ |
| | | USER_STATUS("user_status"), |
| | | ; |
| | | |
| | | final String name; |
| | |
| | | */ |
| | | private Long strategyUpdateStatus; |
| | | |
| | | /*** |
| | | * 账号是否停用 0为启用,1为停用 |
| | | */ |
| | | private Integer userStatus; |
| | | } |
| | |
| | | * 拓展信息 |
| | | */ |
| | | private String userExt; |
| | | |
| | | /*** |
| | | * 账号是否停用 0为启用,1为启用 |
| | | */ |
| | | private Integer userStatus; |
| | | /*** |
| | | * 账号是否停用 0为启用,1为启用 |
| | | */ |
| | | private String userStatus_text; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 设置最大流水号 |
| | | * @param codeOrderDTO 编码申请传输对象 |
| | |
| | | public R setMaxSerialNumberForCodeRule(@RequestBody CodeOrderDTO codeOrderDTO){ |
| | | return R.success(codeBasicSecService.setMaxSerialNumberForCodeRule(codeOrderDTO)); |
| | | } |
| | | |
| | | /*** |
| | | * 根据流水依赖获取最大流水号 |
| | | * @param codeOrderDTO |
| | | * @return |
| | | */ |
| | | @GetMapping("/getMaxSerialNumberForCodeRule") |
| | | @ApiOperationSupport(order = 15) |
| | | @ApiOperation(value = "查询编码规则的所有流水依赖的最大流水", notes = "传入oid") |
| | | public R getMaxSerialNumberForCodeRule(@RequestBody CodeOrderDTO codeOrderDTO){ |
| | | return R.data(codeBasicSecService.getMaxSerialNumberForCodeRule(codeOrderDTO)); |
| | | } |
| | | } |
| | |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.rmi.ServerException; |
| | | import java.util.*; |
| | |
| | | * @throws VciBaseException |
| | | */ |
| | | String setMaxSerialNumberForCodeRule(CodeOrderDTO codeOrderDTO) throws VciBaseException; |
| | | /** |
| | | * 根据流水依赖获取最大流水值 |
| | | * @param codeOrderDTO 编码申请传输对象 |
| | | * @return |
| | | * @throws VciBaseException |
| | | */ |
| | | Double getMaxSerialNumberForCodeRule(CodeOrderDTO codeOrderDTO); |
| | | } |
| | |
| | | } |
| | | return String.valueOf(maxSecNum); |
| | | } |
| | | |
| | | /*** |
| | | * 根据流水依赖获取最大流水号 |
| | | * @param codeOrderDTO 编码申请传输对象 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Double getMaxSerialNumberForCodeRule(CodeOrderDTO codeOrderDTO) { |
| | | Double maxSerialNumber=0.0; |
| | | VciBaseUtil.alertNotNull(codeOrderDTO.getCodeRuleOid(),"编码规则主键"); |
| | | List<CodeOrderSecDTO> codeOrderSecDTOList=codeOrderDTO.getSecDTOList(); |
| | | if(CollectionUtils.isEmpty(codeOrderSecDTOList)){ |
| | | throw new VciBaseException("最大流水号的流水依赖不能为空!"); |
| | | } |
| | | String codeRuleOid = codeOrderDTO.getCodeRuleOid(); |
| | | Map<String/**码段主键*/,CodeOrderSecDTO/**码段相关信息*/> codeOrderSecDTOMap = codeOrderSecDTOList.stream().collect(Collectors.toMap(s -> s.getSecOid(), t -> t)); |
| | | List<String> codeBasicSecOidList = codeOrderSecDTOList.stream().map(s->s.getSecOid()).collect(Collectors.toList());//流水依赖码段的主键集合 |
| | | //获取流水依赖码段 |
| | | LambdaQueryWrapper<CodeBasicSec> wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleOid) |
| | | .in(CodeBasicSec::getOid,codeBasicSecOidList) |
| | | .eq(CodeBasicSec::getSerialDependFlag,"true") |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | List<CodeBasicSec> codeBasicSecList = this.list(wrapper); |
| | | //按流水依赖顺序,处理流水依赖码段的值 |
| | | List<String> serialDependValueList = new ArrayList<>(); |
| | | codeBasicSecList.stream().forEach(s->{ |
| | | CodeOrderSecDTO codeOrderSecDTO = codeOrderSecDTOMap.get(s.getOid()); |
| | | String serialDependValue = codeOrderSecDTO.getSecValue(); |
| | | if(s.getSecType().equals(CodeSecTypeEnum.CODE_DATE_SEC.getValue())){ |
| | | try { |
| | | Date date = VciDateUtil.str2Date(codeOrderSecDTO.getSecValue(),s.getCodeDateFormatStr()); |
| | | serialDependValue = VciDateUtil.date2Str(date,s.getCodeDateFormatStr()); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | serialDependValueList.add(serialDependValue); |
| | | }); |
| | | |
| | | //获取流水码段 |
| | | wrapper = Wrappers.<CodeBasicSec>query().lambda() |
| | | .eq(CodeBasicSec::getPkCodeRule,codeRuleOid) |
| | | .eq(CodeBasicSec::getSecType,CodeSecTypeEnum.CODE_SERIAL_SEC.getValue()) |
| | | .orderByAsc(CodeBasicSec::getSerialDependOrder); |
| | | CodeBasicSec codeBasicSec = this.getOne(wrapper); |
| | | //根据编码规则和流水依赖,获取最大流水号 |
| | | String serialUnitString = serialDependValueList.size() == 0 ? EMPTY_SERIAL_UNIT : serialDependValueList.stream().collect(Collectors.joining(SERIAL_UNIT_SPACE)); |
| | | LambdaQueryWrapper<CodeSerialValue> codeSerialWrapper = new LambdaQueryWrapper<>(); |
| | | codeSerialWrapper.eq(CodeSerialValue::getCodeRuleOid, codeRuleOid); |
| | | codeSerialWrapper.eq(CodeSerialValue::getSerialUnit, serialUnitString); |
| | | codeSerialWrapper.eq(CodeSerialValue::getCodeSecOid,codeBasicSec.getOid()); |
| | | codeSerialWrapper.orderByDesc(CodeSerialValue::getCreateTime); |
| | | List<CodeSerialValue> codeSerialValueList = serialValueMapper.selectList(codeSerialWrapper); |
| | | if(!CollectionUtils.isEmpty(codeSerialValueList)){ |
| | | maxSerialNumber=StringUtils.isBlank(codeSerialValueList.get(0).getMaxSerial())?0:Double.parseDouble(codeSerialValueList.get(0).getMaxSerial()); |
| | | } |
| | | return maxSerialNumber; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.yulichang.base.MPJBaseServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.vci.ubcs.code.dto.CodeResembleRuleDTO; |
| | | import com.vci.ubcs.code.entity.CodeBasicSec; |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.entity.CodeResembleRule; |
| | | import com.vci.ubcs.code.enumpack.FrameworkDataLCStatus; |
| | |
| | | import com.vci.ubcs.code.service.ICodeResembleRuleService; |
| | | import com.vci.ubcs.code.vo.pagemodel.CodeResembleRuleVO; |
| | | import com.vci.ubcs.omd.entity.BtmType; |
| | | import com.vci.ubcs.starter.enumpack.CodeTableNameEnum; |
| | | import com.vci.ubcs.starter.exception.VciBaseException; |
| | | import com.vci.ubcs.starter.revision.service.RevisionModelUtil; |
| | | import com.vci.ubcs.starter.util.DefaultAttrAssimtUtil; |
| | | import com.vci.ubcs.starter.util.MdmBtmTypeConstant; |
| | | import com.vci.ubcs.starter.util.UBCSCondition; |
| | | import com.vci.ubcs.starter.util.UBCSSqlKeyword; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | | import com.vci.ubcs.starter.web.pagemodel.PageHelper; |
| | | import com.vci.ubcs.starter.web.util.BeanUtilForVCI; |
| | |
| | | query.setSize(pageHelper.getLimit()); |
| | | query.setCurrent(pageHelper.getPage()); |
| | | query.setDescs("createTime"); |
| | | |
| | | MPJLambdaWrapper<CodeResembleRule> mpjLambdaWrapper = new MPJLambdaWrapper<>(CodeResembleRule.class,CodeTableNameEnum.PL_CODE_RULE.getText()); |
| | | Map<String, Object> condition = new HashMap<>(conditionMap); |
| | | List<CodeResembleRule> doList = baseMapper.selectPage(Condition.getPage(query),Condition.getQueryWrapper(condition, CodeResembleRule.class)).getRecords(); |
| | | // 添加where条件 |
| | | UBCSSqlKeyword.buildConditionByAs(condition,mpjLambdaWrapper,CodeTableNameEnum.PL_CODE_RULE.getText()); |
| | | IPage<CodeResembleRule> codeResembleRuleIPage = baseMapper.selectPage(UBCSCondition.getPage(query), mpjLambdaWrapper); |
| | | DataGrid<CodeResembleRuleVO> dataGrid=new DataGrid<CodeResembleRuleVO>(); |
| | | if (!CollectionUtils.isEmpty(doList)) { |
| | | dataGrid.setData(codeResembleRuleDO2VOs(doList)); |
| | | dataGrid.setTotal(VciBaseUtil.getInt(String.valueOf(baseMapper.selectCount(Condition.getQueryWrapper(condition, CodeResembleRule.class))))); |
| | | if (!CollectionUtils.isEmpty(codeResembleRuleIPage.getRecords())) { |
| | | dataGrid.setData(codeResembleRuleDO2VOs(codeResembleRuleIPage.getRecords())); |
| | | dataGrid.setTotal(codeResembleRuleIPage.getTotal()); |
| | | } |
| | | return dataGrid; |
| | | } |
| | |
| | | //说明还是参照里面的,我们默认这种情况下都是字符串吧,因为参照的属性不一定用的平台的属性池里的,所以大部分情况下,显示的属性都是字符串吧 |
| | | return referFieldMap.get(field) + SPACE + "LIKE" + SPACE + "'%" + value + "%'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "LIKE " + "'%" + getStringValueInWhere(field, value, attrVOMap) + "%'" + SPACE; |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "LIKE " + "'%" + value + "%'" + SPACE; |
| | | } |
| | | } else if (key.endsWith("_notequal")) { |
| | | String field = UBCSSqlKeyword.getColumn(key, "_notequal"); |
| | |
| | | if (referFieldMap.containsKey(field)) { |
| | | return referFieldMap.get(field) + SPACE + " >= " + value + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + " >= " + getStringValueInWhere(value, field, attrVOMap) + SPACE; |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + " >= " + getStringValueInWhere(field, value, attrVOMap) + SPACE; |
| | | } |
| | | } else if (key.endsWith("_le")) { |
| | | //说明是<=的。我们需要先获取一下 |
| | |
| | | if (referFieldMap.containsKey(field)) { |
| | | return referFieldMap.get(field) + SPACE + "= '" + value + "'" + SPACE; |
| | | } else { |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "= '" + getStringValueInWhere(field, value, attrVOMap) + "'" + SPACE; |
| | | return (field.contains(".") ? "" : "t.") + field + SPACE + "= " + getStringValueInWhere(field, value, attrVOMap) + "" + SPACE; |
| | | } |
| | | } else { |
| | | // if (referFieldMap.containsKey(key)) { |
| | |
| | | // batchCBO.getDeleteCbos().addAll(cboList); |
| | | // WebUtil.setPersistence(false); |
| | | // batchCBO.copyFromOther( |
| | | productCodeService.recycleCode(classifyFullInfo.getCurrentClassifyVO().getBtmTypeId(), deleteBatchDTO.getOidList()); |
| | | productCodeService.recycleCode(classifyFullInfo.getTopClassifyVO().getBtmTypeId(), deleteBatchDTO.getOidList()); |
| | | // baseMapper.deleteBatchIds(cboList); |
| | | //使用传入的业务类型查询表 |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getCurrentClassifyVO().getBtmTypeId())); |
| | | R<List<BtmTypeVO>> listR = btmTypeClient.selectByIdCollection(Collections.singletonList(classifyFullInfo.getTopClassifyVO().getBtmTypeId())); |
| | | if (!listR.isSuccess() || listR.getData().size() == 0) { |
| | | throw new VciBaseException("传入业务类型未查询到相应表单,请检查!"); |
| | | } |
| | |
| | | throw new VciBaseException("要删除的状态对象不能为空"); |
| | | } |
| | | Set<String> oidSet= new HashSet<>(); |
| | | Set<String> idSet= new HashSet<>(); |
| | | statusVOList.stream().forEach( s -> { |
| | | VciBaseUtil.alertNotNull(s.getOid(),"要删除的状态对象的主键"); |
| | | oidSet.add(s.getOid()); |
| | | idSet.add(s.getId()); |
| | | }); |
| | | //查询 |
| | | List<Status> statusDOList = listStatusByOidCollectionDO(oidSet); |
| | |
| | | } |
| | | }); |
| | | //检查属性是否被引用 |
| | | if(checkStatusUseds(oidSet)){ |
| | | if(checkStatusUseds(idSet)){ |
| | | throw new VciBaseException("要删除的状态在生命周期对象中被使用,无法删除"); |
| | | } |
| | | Collection<Collection<String>> oidCollections = VciBaseUtil.switchCollectionForOracleIn(oidInDbSet); |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkStatusUseds(Collection<String> oidCollection) { |
| | | Long count = lifeCycleNodeMapper.selectCount(Wrappers.<LifeCycleNode>query().lambda().in(LifeCycleNode::getId,oidCollection)); |
| | | if(count>0){ |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public boolean checkStatusUsed(String pkStatus) throws VciBaseException { |
| | | |
| | | return false; |
| | | } |
| | | |
| | |
| | | userVO.setPostName(Func.join(postName)); |
| | | userVO.setSexName(DictCache.getValue(DictEnum.SEX, user.getSex())); |
| | | userVO.setUserTypeName(DictCache.getValue(DictEnum.USER_TYPE, user.getUserType())); |
| | | userVO.setUserStatus(user.getUserStatus()); |
| | | userVO.setUserStatus_text(DictCache.getValue(DictEnum.USER_STATUS,user.getUserStatus()));//用户状态 |
| | | return userVO; |
| | | } |
| | | |
| | | } |
| | |
| | | <result column="pwd_update_time" property="pwdUpdateTime"/> |
| | | <result column="secretgrade" property="secretGrade"/> |
| | | <result column="strategy_update_status" property="strategyUpdateStatus"/> |
| | | <result column="user_status" property="userStatus"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectByIdUser" resultType="com.vci.ubcs.system.user.entity.User"> |
| | | select id, code, user_type, account, password , name, real_name, avatar, email, phone , birthday, sex, role_id, dept_id, post_id , pwd_update_time, secretgrade, strategy_update_status, tenant_id, create_user , create_dept, create_time, update_user, update_time, status , is_deleted |
| | | select id, code, user_type, account, password , name, real_name, avatar, email, phone , birthday, sex, role_id, dept_id, post_id , pwd_update_time, secretgrade, strategy_update_status, tenant_id, create_user , create_dept, create_time, update_user, update_time, status , is_deleted,user_status, |
| | | from pl_org_user |
| | | where id = #{userId} and is_deleted = 0 |
| | | </select> |