This commit is contained in:
parent
e8d745358d
commit
0cfbae5279
|
|
@ -2,11 +2,87 @@
|
|||
import JSONbig from 'json-bigint'
|
||||
export default {
|
||||
|
||||
toBigInt(id) {
|
||||
return JSONbig.parse(`{"v":${id}}`).v;
|
||||
},
|
||||
toBigInt(id) {
|
||||
return JSONbig.parse(`{"v":${id}}`).v;
|
||||
},
|
||||
|
||||
trim(str) {
|
||||
return str.replace(/^\s+|\s+$/gm, '');
|
||||
trim(str) {
|
||||
return str.replace(/^\s+|\s+$/gm, '');
|
||||
},
|
||||
|
||||
|
||||
formatDetailData({ data }) {
|
||||
|
||||
if (data.create_time) {
|
||||
data.create_time = new Date(data.create_time * 1000);
|
||||
}
|
||||
if (data.update_time) {
|
||||
data.update_time = new Date(data.update_time * 1000);
|
||||
}
|
||||
|
||||
|
||||
return data;
|
||||
|
||||
},
|
||||
|
||||
getPostFieldValue({ dataId, list, type, deletedList, fieldName, rowFilter, dataRule }) {
|
||||
|
||||
let d = {};
|
||||
console.log(list)
|
||||
if (rowFilter) {
|
||||
list = list.filter(rowFilter);
|
||||
}
|
||||
if (dataRule) {
|
||||
list.forEach(item => {
|
||||
|
||||
dataRule.forEach(rule => {
|
||||
let value = item[rule.field];
|
||||
if (rule.type == "integer") {
|
||||
item[rule.field] = parseInt(value);
|
||||
}
|
||||
else if (rule.type == "number") {
|
||||
item[rule.field] = parseFloat(value);
|
||||
}
|
||||
else if (rule.type == "timestamp") {
|
||||
item[rule.field] = parseInt(new Date(value).getTime() / 1000);
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
if (fieldName) {
|
||||
list.forEach(item => {
|
||||
item[fieldName] = dataId;
|
||||
})
|
||||
}
|
||||
if (dataId && type !== 'array') {
|
||||
|
||||
|
||||
|
||||
d = {
|
||||
insertList: [],
|
||||
updateList: [],
|
||||
deleteList: []
|
||||
};
|
||||
|
||||
list.forEach(item => {
|
||||
if (item.id) {
|
||||
d.updateList.push(item);
|
||||
}
|
||||
else {
|
||||
d.insertList.push(item);
|
||||
}
|
||||
});
|
||||
|
||||
deletedList.forEach(item => {
|
||||
d.deleteList.push(item);
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
d = list;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
|
@ -105,6 +105,7 @@ export default {
|
|||
|
||||
formOptions: {
|
||||
data: {
|
||||
ename:"",
|
||||
"name": "",
|
||||
"code": "",
|
||||
parent_id: "0"
|
||||
|
|
@ -120,7 +121,7 @@ export default {
|
|||
},
|
||||
|
||||
items: [
|
||||
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
{ field: 'code', title: '编号', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入编号' } } },
|
||||
|
||||
{ title: '上级分类', span: 24, slots: { default: 'parent_id' } },
|
||||
|
|
@ -209,6 +210,18 @@ export default {
|
|||
|
||||
postdata.parent_id = parseInt(postdata.parent_id)
|
||||
}
|
||||
if(!postdata.ename){
|
||||
postdata.ename = "";
|
||||
}
|
||||
if(!postdata.create_uid){
|
||||
postdata.create_uid = 0;
|
||||
}
|
||||
if(!postdata.update_uid){
|
||||
postdata.update_uid = 0;
|
||||
}
|
||||
postdata.create_time = 0;
|
||||
postdata.update_time = 0;
|
||||
|
||||
this.$mk.post({
|
||||
url: action,
|
||||
loading: "保存中...",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,438 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||
</vxe-form>
|
||||
|
||||
<a-tabs>
|
||||
<a-tab-pane key="1" tab="工序设置">
|
||||
|
||||
<vxe-table border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData"
|
||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||
<vxe-column width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="oplinks2">
|
||||
<a @click.stop="pageAdd(row)" title="新增">
|
||||
<a-icon class="icon" type="plus-circle" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon class="icon" type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mes_processes" title="工序" width="160" :params="editor_processes" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="sort" title="排序" width="160"
|
||||
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
||||
</vxe-table>
|
||||
</a-tab-pane>
|
||||
|
||||
</a-tabs>
|
||||
|
||||
|
||||
<div class="mk-toolbar" v-if="isEdit">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footerbar">
|
||||
<a-button type="primary" @click="ok">确定</a-button>
|
||||
<a-button @click="cancel">取消</a-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
export default {
|
||||
|
||||
name: '',
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
//let _this = this;
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
uploadDefaultImg: null,
|
||||
detailDataFieldName: "mold_component",
|
||||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/detail`,
|
||||
create: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/create`,
|
||||
update: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/update`
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
material_id: 0,
|
||||
warehouse_id: 0,
|
||||
version: '',
|
||||
is_default: 0
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 100,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
code: [
|
||||
{ required: true, message: '请输入编码' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称' }
|
||||
],
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
{ field: 'code', title: '编码', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'name', title: '名称', span: 12, itemRender: { name: '$input' } },
|
||||
|
||||
{
|
||||
title: '分类', span: 12,
|
||||
field: 'mold_component_category',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "category_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldComponentCategory',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/category/list`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
table1Height: 400,
|
||||
detailsSourceData: [
|
||||
],
|
||||
detailsData: [
|
||||
],
|
||||
deletedDetailsData: [
|
||||
|
||||
],
|
||||
editor_processes: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesProcesses',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_processes_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 合并表单数据及配置
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
return pageData;
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
|
||||
// 获取路由的id参数
|
||||
let dataId = this.getDataId();
|
||||
|
||||
// 如果有id参数,说明是编辑模式
|
||||
if (dataId) {
|
||||
this.$mk.post({
|
||||
url: this.actions.get,
|
||||
loading: "加载中...",
|
||||
data: { id: this.$mk.toBigInt(dataId) },
|
||||
useBigInt: true
|
||||
}).then(a => {
|
||||
|
||||
|
||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName] });
|
||||
|
||||
this.detailsData = a.data[this.detailDataFieldName].mold_component_processes || [];
|
||||
|
||||
this.detailsDataInit();
|
||||
});
|
||||
|
||||
this.isEdit = true;
|
||||
|
||||
|
||||
} else {
|
||||
// 如果没有id参数,说明是新增模式
|
||||
this.addModeItems.forEach(item => {
|
||||
this.formOptions.items.push(item);
|
||||
})
|
||||
|
||||
this.detailsDataInit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.heightInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
|
||||
heightInit() {
|
||||
|
||||
this.$nextTick(() => {
|
||||
let h = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 180;
|
||||
|
||||
this.table1Height = h;
|
||||
});
|
||||
|
||||
},
|
||||
detailsDataInit() {
|
||||
for (let i = this.detailsData && this.detailsData.length; i < 10; i++) {
|
||||
this.detailsData.push({});
|
||||
}
|
||||
},
|
||||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
return dataId;
|
||||
},
|
||||
getDataId_BigInt() {
|
||||
let dataId = this.getDataId();
|
||||
return this.$mk.toBigInt(dataId);
|
||||
},
|
||||
|
||||
|
||||
// 返回
|
||||
back() {
|
||||
// 如果是新增模式,关闭当前页面
|
||||
if (!this.isEdit) {
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldComponentAdd"
|
||||
});
|
||||
} else {
|
||||
// 如果是编辑模式,关闭当前页面
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldComponentUpdate"
|
||||
});
|
||||
}
|
||||
// 打开列表页面
|
||||
this.$openPage('/Mold/MoldComponent')
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 保存
|
||||
ok() {
|
||||
|
||||
|
||||
|
||||
let save = () => {
|
||||
|
||||
|
||||
// 如果是新增模式,提交新增接口 如果是编辑模式,提交编辑接口
|
||||
let action = !this.isEdit ? this.actions.create : this.actions.update;
|
||||
// 如果是新增模式,提交的数据中加入id 如果是编辑模式,提交的数据中不加入id
|
||||
let postdata = Object.assign({}, this.formOptions.data);
|
||||
|
||||
|
||||
postdata.mold_component_processes = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || row.mes_processes_id },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
list: this.detailsData,
|
||||
deletedList: this.deletedDetailsData,
|
||||
fieldName: 'component_id',
|
||||
dataRule:[
|
||||
{field:'sort',type:'integer'}
|
||||
]
|
||||
});
|
||||
|
||||
// 格式化提交的数据
|
||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||
|
||||
|
||||
|
||||
// 提交数据
|
||||
this.$mk.post({
|
||||
url: action,
|
||||
loading: "保存中...",
|
||||
data: postdata,
|
||||
useBigInt: true,
|
||||
}).then((a) => { // 成功回调
|
||||
if (a.code == "200") {
|
||||
|
||||
|
||||
this.$mk.success("保存成功");
|
||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||
this.back();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$mk.error(a.message);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 验证表单
|
||||
this.$mk.validateForm({ form: this.$refs.xForm }).then(() => { // 验证表单
|
||||
|
||||
save(); // 提交保存
|
||||
|
||||
}).catch(count => { // 验证失败
|
||||
this.$mk.error(`存在${count}项错误,请检查`);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 取消 返回
|
||||
cancel() {
|
||||
this.back();
|
||||
},
|
||||
|
||||
|
||||
pageAdd(row) {
|
||||
const $table = this.$refs.xTable
|
||||
const record = {
|
||||
}
|
||||
if (row) {
|
||||
this.detailsData.splice($table.getRowSeq(row), 0, record);
|
||||
} else {
|
||||
this.detailsData.push(record)
|
||||
}
|
||||
},
|
||||
pageDelete(row) {
|
||||
const $table = this.$refs.xTable;
|
||||
if (row.id) {
|
||||
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
||||
}
|
||||
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
||||
},
|
||||
beforeEditMethod({ column, row }) {
|
||||
console.log(column, row);
|
||||
return true;
|
||||
},
|
||||
afterEditEvent({ column, row }) {
|
||||
console.log(column, row);
|
||||
},
|
||||
beforeEditEvent({ column, row }) {
|
||||
console.log(column, row);
|
||||
},
|
||||
onPulldownSelected({ row, name, params }) {
|
||||
console.log(row, name, params);
|
||||
|
||||
},
|
||||
onPopupSelected({ rows, name, params }) {
|
||||
console.log(rows, name, params);
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="less">
|
||||
.page-body {
|
||||
padding: 30px;
|
||||
background: @base-bg-color;
|
||||
}
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
/* background: white; */
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 600px);
|
||||
}
|
||||
|
||||
.footerbar {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.imagePanel {
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.oplinks2 i {
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<template>
|
||||
<basic-page-list ref="listPage" :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
i18n: require("./i18n"),
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// 页面描述
|
||||
desc() {
|
||||
return this.$t("pageDesc");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 创建完成
|
||||
created() {
|
||||
this.optionsInit();
|
||||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MoldComponent',
|
||||
addPageUrl: "/Mold/MoldComponentAdd",
|
||||
editPageUrl: "/Mold/MoldComponentUpdate/",
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
getList: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`,
|
||||
delete: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/batchDelete`
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
exportFileTitle: "模型",
|
||||
enabledExport: false,
|
||||
enabledImport: false,
|
||||
enabledImportTemplate: false,
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
title: '',
|
||||
desc: '',
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{ key: "name", mode: "like" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
|
||||
|
||||
{ field: 'code', title: '编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
||||
{ field: 'name', title: '名称', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
stripe: true, // 启用斑马纹
|
||||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: 80 }, // 多选框
|
||||
{ type: 'seq', width:80 }, // 序号
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 250 },
|
||||
|
||||
{ field: 'name', sortable: true, title: '名称', width: 250 },
|
||||
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
CN: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
HK: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
US: {
|
||||
pageDesc:'单位管理'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import list from './List'
|
||||
export default list
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
<template>
|
||||
<basic-page-edit :desc="desc" :dataId="getDataId()" :options="pageOptions"></basic-page-edit>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
this.optionsInit();
|
||||
this.dataInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
addPageUrl: "/Mold/MoldComponentCategoryAdd",
|
||||
editPageUrl: "/Mold/MoldComponentCategoryUpdate/",
|
||||
listPageUrl: "/Mold/MoldComponentCategory",
|
||||
|
||||
|
||||
uploadDefaultImg: null,
|
||||
|
||||
detailDataFieldName: "mold_component_category",
|
||||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/category/detail`,
|
||||
create: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/category/create`,
|
||||
update: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/category/update`,
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
|
||||
id: 0,
|
||||
code: "",
|
||||
name: "",
|
||||
create_uid: 0,
|
||||
update_uid: 0,
|
||||
create_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||
update_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 150,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
code: [
|
||||
{ required: true, message: '请输入编码' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称' }
|
||||
],
|
||||
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
|
||||
{ field: 'code', title: '编码', span: 24, itemRender: { name: '$input' } },
|
||||
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input' } },
|
||||
|
||||
{ field: 'sort',dataRule:{type:'integer'}, title: '排序', span: 24, itemRender: { name: '$input',props:{type:'number'} } },
|
||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input' } },
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
};
|
||||
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
dataInit() {
|
||||
// 获取路由的id参数
|
||||
let dataId = this.getDataId();
|
||||
// 如果有id参数,说明是编辑模式
|
||||
if (dataId) {
|
||||
const json = `{"id":${dataId}}`;
|
||||
this.$mk.post({
|
||||
url: this.pageOptions.actions.get,
|
||||
loading: "加载中...",
|
||||
data: json,
|
||||
config: {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}
|
||||
}).then(a => {
|
||||
|
||||
|
||||
this.pageOptions.formOptions.data = this.$mk.formatDetailData({data:a.data[this.pageOptions.detailDataFieldName]});
|
||||
|
||||
this.$forceUpdate()
|
||||
}).catch((a) => {
|
||||
this.$mk.error(a.data.msg);
|
||||
});
|
||||
|
||||
this.pageOptions.isEdit = true;
|
||||
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
// 如果没有id参数,说明是新增模式
|
||||
this.addModeItems.forEach(item => {
|
||||
this.pageOptions.formOptions.items.push(item);
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
return dataId;
|
||||
}
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<template>
|
||||
<basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// 页面描述
|
||||
desc() {
|
||||
return this.$t("pageDesc");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 创建完成
|
||||
created() {
|
||||
this.optionsInit();
|
||||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MoldComponentCategory',
|
||||
|
||||
addPageUrl: "/Mold/MoldComponentCategoryAdd",
|
||||
editPageUrl: "/Mold/MoldComponentCategoryUpdate/",
|
||||
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
getList: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/category/list`,
|
||||
delete: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/category/batchDelete`,
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
name: '',
|
||||
code: '',
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{ key: "code", mode: "like" },
|
||||
{ key: "name", mode: "like" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'name', title: '名称', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
{ field: 'code', title: '编码', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
stripe: true, // 启用斑马纹
|
||||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
columns: [
|
||||
{ type: 'checkbox', width:60 }, // 多选框
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 250 },
|
||||
{ field: 'name', sortable: true, title: '名称', width: 250 },
|
||||
{ field: 'remark', sortable: true, title: '备注', width: 250 },
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,467 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||
</vxe-form>
|
||||
|
||||
<a-tabs>
|
||||
<a-tab-pane key="1" tab="订单明细">
|
||||
|
||||
<vxe-table border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData"
|
||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||
<vxe-column width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="oplinks2">
|
||||
<a @click.stop="pageAdd(row)" title="新增">
|
||||
<a-icon class="icon" type="plus-circle" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon class="icon" type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mold_id" title="模型" width="160" :params="editor_scheme" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type" formatter = 'formatEnum'
|
||||
:edit-render="{ name: '$select',props:{options:options_production_type} }"></vxe-column>
|
||||
|
||||
<vxe-column field="mold_master_uid" title="师傅" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
<vxe-column field="manufacture_cycle" title="制作周期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="draw_start_time" title="预计开始画图时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="split_design_time" title="分模设计时间预计" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="draw_time" title="出图时间预计" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="draw2D_time" title="出2D时间预计" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="draw3D_time" title="出3D时间预计" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="horizontal_frame_time" title="横架到厂日期预计" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
<vxe-column field="inlay_deep_hole_time" title="镶件深孔钻到厂日期预计" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input',props:{type:'date'} }"></vxe-column>
|
||||
</vxe-table>
|
||||
</a-tab-pane>
|
||||
|
||||
</a-tabs>
|
||||
|
||||
|
||||
<div class="mk-toolbar" v-if="isEdit">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footerbar">
|
||||
<a-button type="primary" @click="ok">确定</a-button>
|
||||
<a-button @click="cancel">取消</a-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
export default {
|
||||
|
||||
name: '',
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
//let _this = this;
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
|
||||
options_production_type:[{value:'1',label:'正常布产'},{value:'2',label:'委托布产'}],
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
uploadDefaultImg: null,
|
||||
detailDataFieldName: "mold_order",
|
||||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/detail`,
|
||||
create: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/create`,
|
||||
update: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/update`
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
material_id: 0,
|
||||
warehouse_id: 0,
|
||||
version: '',
|
||||
is_default: 0
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 100,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
code: [
|
||||
{ required: true, message: '请输入订单编码' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称' }
|
||||
],
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
{ field: 'code', title: '订单编码', span: 8, itemRender: { name: '$input' } },
|
||||
{ field: 'name', title: '客户名称', span: 8, itemRender: { name: '$input' } },
|
||||
{ field: 'contact', title: '联系人', span: 8, itemRender: { name: '$input' } },
|
||||
{ field: 'phone', title: '联系电话', span: 8, itemRender: { name: '$input' } },
|
||||
{ field: 'salesman', title: '业务员姓名', span: 8, itemRender: { name: '$input' } },
|
||||
{ field: 'contract_no', title: '合同号', span: 8, itemRender: { name: '$input' } },
|
||||
{ field: 'contract_start_time', dataRule: { type: "timestamp" }, title: '合同开始日期', span: 8, itemRender: { name: '$input', props: { type: "date" } } },
|
||||
{ field: 'contract_end_time', dataRule: { type: "timestamp" }, title: '合同结束日期', span: 8, itemRender: { name: '$input', props: { type: "date" } } },
|
||||
|
||||
{ field: 'remark', title: '备注', span: 8, itemRender: { name: '$input' } },
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
table1Height: 400,
|
||||
detailsSourceData: [
|
||||
],
|
||||
detailsData: [
|
||||
],
|
||||
deletedDetailsData: [
|
||||
|
||||
],
|
||||
editor_scheme: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldScheme',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_scheme_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/list`
|
||||
},
|
||||
editor_staff: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesStaff',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_staff_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 合并表单数据及配置
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
return pageData;
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
|
||||
// 获取路由的id参数
|
||||
let dataId = this.getDataId();
|
||||
|
||||
// 如果有id参数,说明是编辑模式
|
||||
if (dataId) {
|
||||
this.$mk.post({
|
||||
url: this.actions.get,
|
||||
loading: "加载中...",
|
||||
data: { id: this.$mk.toBigInt(dataId) },
|
||||
useBigInt: true
|
||||
}).then(a => {
|
||||
|
||||
|
||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName] });
|
||||
|
||||
this.detailsData = a.data[this.detailDataFieldName].order_molds || [];
|
||||
|
||||
this.detailsDataInit();
|
||||
});
|
||||
|
||||
this.isEdit = true;
|
||||
|
||||
|
||||
} else {
|
||||
// 如果没有id参数,说明是新增模式
|
||||
this.addModeItems.forEach(item => {
|
||||
this.formOptions.items.push(item);
|
||||
})
|
||||
|
||||
this.detailsDataInit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.heightInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
|
||||
heightInit() {
|
||||
|
||||
this.$nextTick(() => {
|
||||
let h = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 300;
|
||||
|
||||
this.table1Height = h;
|
||||
});
|
||||
|
||||
},
|
||||
detailsDataInit() {
|
||||
for (let i = this.detailsData && this.detailsData.length; i < 10; i++) {
|
||||
this.detailsData.push({});
|
||||
}
|
||||
},
|
||||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
return dataId;
|
||||
},
|
||||
getDataId_BigInt() {
|
||||
let dataId = this.getDataId();
|
||||
return this.$mk.toBigInt(dataId);
|
||||
},
|
||||
|
||||
|
||||
// 返回
|
||||
back() {
|
||||
// 如果是新增模式,关闭当前页面
|
||||
if (!this.isEdit) {
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldOrderAdd"
|
||||
});
|
||||
} else {
|
||||
// 如果是编辑模式,关闭当前页面
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldOrderUpdate"
|
||||
});
|
||||
}
|
||||
// 打开列表页面
|
||||
this.$openPage('/Mold/MoldOrder')
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 保存
|
||||
ok() {
|
||||
|
||||
|
||||
|
||||
let save = () => {
|
||||
|
||||
|
||||
// 如果是新增模式,提交新增接口 如果是编辑模式,提交编辑接口
|
||||
let action = !this.isEdit ? this.actions.create : this.actions.update;
|
||||
// 如果是新增模式,提交的数据中加入id 如果是编辑模式,提交的数据中不加入id
|
||||
let postdata = Object.assign({}, this.formOptions.data);
|
||||
|
||||
|
||||
postdata.order_molds = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || row.mold_id },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
list: this.detailsData,
|
||||
deletedList: this.deletedDetailsData,
|
||||
fieldName: 'order_id',
|
||||
dataRule:[
|
||||
{field:'production_type',type:'integer'},
|
||||
{field:'manufacture_cycle',type:'timestamp'},
|
||||
{field:'draw_start_time',type:'timestamp'},
|
||||
{field:'split_design_time',type:'timestamp'},
|
||||
{field:'draw_time',type:'timestamp'},
|
||||
{field:'draw2D_time',type:'timestamp'},
|
||||
{field:'draw3D_time',type:'timestamp'},
|
||||
{field:'horizontal_frame_time',type:'timestamp'},
|
||||
{field:'inlay_deep_hole_time',type:'timestamp'}
|
||||
]
|
||||
});
|
||||
|
||||
// 格式化提交的数据
|
||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||
|
||||
|
||||
|
||||
// 提交数据
|
||||
this.$mk.post({
|
||||
url: action,
|
||||
loading: "保存中...",
|
||||
data: postdata,
|
||||
useBigInt: true,
|
||||
}).then((a) => { // 成功回调
|
||||
if (a.code == "200") {
|
||||
|
||||
|
||||
this.$mk.success("保存成功");
|
||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||
this.back();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$mk.error(a.message);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 验证表单
|
||||
this.$mk.validateForm({ form: this.$refs.xForm }).then(() => { // 验证表单
|
||||
|
||||
save(); // 提交保存
|
||||
|
||||
}).catch(count => { // 验证失败
|
||||
this.$mk.error(`存在${count}项错误,请检查`);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 取消 返回
|
||||
cancel() {
|
||||
this.back();
|
||||
},
|
||||
|
||||
|
||||
pageAdd(row) {
|
||||
const $table = this.$refs.xTable
|
||||
const record = {
|
||||
}
|
||||
if (row) {
|
||||
this.detailsData.splice($table.getRowSeq(row), 0, record);
|
||||
} else {
|
||||
this.detailsData.push(record)
|
||||
}
|
||||
},
|
||||
pageDelete(row) {
|
||||
const $table = this.$refs.xTable;
|
||||
if (row.id) {
|
||||
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
||||
}
|
||||
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
||||
},
|
||||
beforeEditMethod({ column, row }) {
|
||||
console.log(column, row);
|
||||
return true;
|
||||
},
|
||||
afterEditEvent({ column, row }) {
|
||||
console.log(column, row);
|
||||
},
|
||||
beforeEditEvent({ column, row }) {
|
||||
console.log(column, row);
|
||||
},
|
||||
onPulldownSelected({ row, name, params }) {
|
||||
console.log(row, name, params);
|
||||
|
||||
},
|
||||
onPopupSelected({ rows, name, params }) {
|
||||
console.log(rows, name, params);
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="less">
|
||||
.page-body {
|
||||
padding: 30px;
|
||||
background: @base-bg-color;
|
||||
}
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
/* background: white; */
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 600px);
|
||||
}
|
||||
|
||||
.footerbar {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.imagePanel {
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.oplinks2 i {
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
<template>
|
||||
<basic-page-list ref="listPage" :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// 页面描述
|
||||
desc() {
|
||||
return this.$t("pageDesc");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 创建完成
|
||||
created() {
|
||||
this.optionsInit();
|
||||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MoldOrder',
|
||||
addPageUrl: "/Mold/MoldOrderAdd",
|
||||
editPageUrl: "/Mold/MoldOrderUpdate/",
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
getList: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/list`,
|
||||
delete: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/batchDelete`
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
exportFileTitle: "模型",
|
||||
enabledExport: false,
|
||||
enabledImport: false,
|
||||
enabledImportTemplate: false,
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
code: '' ,
|
||||
name:''
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
|
||||
|
||||
{ field: 'code', title: '订单编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入订单编码' } } },
|
||||
{ field: 'name', title: '客户名称', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入客户名称' } } },
|
||||
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
stripe: true, // 启用斑马纹
|
||||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: 80 }, // 多选框
|
||||
{ type: 'seq', width:80 }, // 序号
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
|
||||
{ field: 'code', sortable: true, title: '订单编码', width: 250 },
|
||||
|
||||
{ field: 'name', sortable: true, title: '客户名称', width: 250 },
|
||||
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
CN: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
HK: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
US: {
|
||||
pageDesc:'单位管理'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import list from './List'
|
||||
export default list
|
||||
|
|
@ -0,0 +1,602 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||
</vxe-form>
|
||||
|
||||
<a-tabs>
|
||||
<a-tab-pane key="1" tab="工艺布产组件">
|
||||
<vxe-table border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData"
|
||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||
<vxe-column width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="oplinks2">
|
||||
<a @click.stop="pageAdd(row)" title="新增">
|
||||
<a-icon class="icon" type="plus-circle" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon class="icon" type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mold_component" title="部件" width="160" :params="editor_component" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="component_num" title="部件数量" width="160"
|
||||
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
||||
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type"
|
||||
formatter='formatEnum'
|
||||
:edit-render="{ name: '$select', props: { options: options_production_type } }"></vxe-column>
|
||||
|
||||
<vxe-column field="process_uid" title="加工人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="prepare_process_time" title="预备加工日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="plan_complete_time" title="计划完成日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="send_time" title="发料时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
<vxe-column field="send_uid" title="发料人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
<vxe-column field="complete_time" title="实际完成时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="remark" title="备注" width="160" :edit-render="{ name: '$input', props: {} }"></vxe-column>
|
||||
|
||||
</vxe-table>
|
||||
|
||||
</a-tab-pane>
|
||||
|
||||
|
||||
<a-tab-pane key="2" tab="工序设置">
|
||||
|
||||
<vxe-table border show-overflow keep-source ref="xTable2" :height="table1Height" :data="detailsData2"
|
||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||
<vxe-column width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="oplinks2">
|
||||
<a @click.stop="pageAdd2(row)" title="新增">
|
||||
<a-icon class="icon" type="plus-circle" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete2(row)" title="删除">
|
||||
<a-icon class="icon" type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mold_component" title="部件" width="160" :params="editor_component" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="mes_processes" title="工序" width="160" :params="editor_processes" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="process_uid" title="加工人员" width="160" :params="editor_staff" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
|
||||
|
||||
<vxe-column field="prepare_process_time" title="预备加工日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="plan_complete_time" title="计划完成日期" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="send_time" title="发料时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="complete_time" title="实际完成时间" width="160" formatter="formatDate"
|
||||
:edit-render="{ name: '$input', props: { type: 'date' } }"></vxe-column>
|
||||
<vxe-column field="remark" title="备注" width="160" :edit-render="{ name: '$input', props: {} }"></vxe-column>
|
||||
|
||||
|
||||
</vxe-table>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
||||
|
||||
<div class="mk-toolbar" v-if="isEdit">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footerbar">
|
||||
<a-button type="primary" @click="ok">确定</a-button>
|
||||
<a-button @click="cancel">取消</a-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
export default {
|
||||
|
||||
name: '',
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
const options_production_type = [{ value: '1', label: '正常布产' }, { value: '2', label: '委托布产' }];
|
||||
//let _this = this;
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
|
||||
options_production_type: options_production_type,
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
uploadDefaultImg: null,
|
||||
detailDataFieldName: "mold_scheme",
|
||||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/detail`,
|
||||
create: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/create`,
|
||||
update: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/update`
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
production_type: 1
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 150,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
order_code: [
|
||||
{ required: true, message: '请输入订单编号' }
|
||||
],
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
{ field: 'order_code', title: '订单编号', span: 8, itemRender: { name: '$input' } },
|
||||
|
||||
{
|
||||
title: '订单', span: 8,
|
||||
field: 'order_id',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "order_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldOrder',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/list`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '模具', span: 8,
|
||||
field: 'mold_id',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "mold_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldScheme',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/list`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{ field: 'production_type', title: '布产类型', span: 8, itemRender: { name: '$select', props: { options: options_production_type } } },
|
||||
|
||||
{ field: 'manufacture_cycle', dataRule: { type: 'timestamp' }, title: '制作周期', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'draw_start_time', dataRule: { type: 'timestamp' }, title: '预计开始画图时间', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'split_design_time', dataRule: { type: 'timestamp' }, title: '分模设计时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'draw_time', dataRule: { type: 'timestamp' }, title: '出图时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'draw2D_time', dataRule: { type: 'timestamp' }, title: '出2D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'draw3D_time', dataRule: { type: 'timestamp' }, title: '出3D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'horizontal_frame_time', dataRule: { type: 'timestamp' }, title: '出2D时间预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'inlay_deep_hole_time', dataRule: { type: 'timestamp' }, title: '镶件深孔钻到厂日期预计', span: 8, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||
{ field: 'problem', title: '出现问题及建议反馈', span: 24, itemRender: { name: '$input', props: {} } },
|
||||
|
||||
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
table1Height: 400,
|
||||
detailsSourceData: [
|
||||
],
|
||||
detailsData: [
|
||||
],
|
||||
deletedDetailsData: [
|
||||
|
||||
],
|
||||
|
||||
detailsData2: [
|
||||
],
|
||||
deletedDetailsData2: [
|
||||
|
||||
],
|
||||
editor_component: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldComponent',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "component_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`
|
||||
},
|
||||
|
||||
|
||||
editor_processes: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesProcesses',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_processes_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
||||
},
|
||||
|
||||
editor_staff: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesStaff',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_staff_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 合并表单数据及配置
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
return pageData;
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
|
||||
// 获取路由的id参数
|
||||
let dataId = this.getDataId();
|
||||
|
||||
// 如果有id参数,说明是编辑模式
|
||||
if (dataId) {
|
||||
this.$mk.post({
|
||||
url: this.actions.get,
|
||||
loading: "加载中...",
|
||||
data: { id: this.$mk.toBigInt(dataId) },
|
||||
useBigInt: true
|
||||
}).then(a => {
|
||||
|
||||
|
||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName] });
|
||||
|
||||
this.detailsData = a.data[this.detailDataFieldName].mold_scheme_components || [];
|
||||
this.detailsData2 = a.data[this.detailDataFieldName].mold_scheme_processes || [];
|
||||
|
||||
|
||||
|
||||
|
||||
this.detailsDataInit();
|
||||
|
||||
});
|
||||
|
||||
this.isEdit = true;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
// 如果没有id参数,说明是新增模式
|
||||
this.addModeItems.forEach(item => {
|
||||
this.formOptions.items.push(item);
|
||||
})
|
||||
|
||||
this.detailsDataInit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.heightInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
|
||||
heightInit() {
|
||||
|
||||
this.$nextTick(() => {
|
||||
let h = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 500;
|
||||
|
||||
this.table1Height = h;
|
||||
});
|
||||
|
||||
},
|
||||
detailsDataInit() {
|
||||
for (let i = this.detailsData && this.detailsData.length; i < 10; i++) {
|
||||
this.detailsData.push({});
|
||||
}
|
||||
for (let i = this.detailsData2 && this.detailsData2.length; i < 10; i++) {
|
||||
this.detailsData2.push({});
|
||||
}
|
||||
},
|
||||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
return dataId;
|
||||
},
|
||||
getDataId_BigInt() {
|
||||
let dataId = this.getDataId();
|
||||
return this.$mk.toBigInt(dataId);
|
||||
},
|
||||
|
||||
|
||||
// 返回
|
||||
back() {
|
||||
// 如果是新增模式,关闭当前页面
|
||||
if (!this.isEdit) {
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldProductionOrderAdd"
|
||||
});
|
||||
} else {
|
||||
// 如果是编辑模式,关闭当前页面
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldProductionOrderUpdate"
|
||||
});
|
||||
}
|
||||
// 打开列表页面
|
||||
this.$openPage('/Mold/MoldProductionOrder')
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 保存
|
||||
ok() {
|
||||
|
||||
|
||||
|
||||
let save = () => {
|
||||
|
||||
|
||||
// 如果是新增模式,提交新增接口 如果是编辑模式,提交编辑接口
|
||||
let action = !this.isEdit ? this.actions.create : this.actions.update;
|
||||
// 如果是新增模式,提交的数据中加入id 如果是编辑模式,提交的数据中不加入id
|
||||
let postdata = Object.assign({}, this.formOptions.data);
|
||||
|
||||
|
||||
// 格式化提交的数据
|
||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||
|
||||
postdata.mold_production_order_component = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || row.mold_id },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
list: this.detailsData,
|
||||
deletedList: this.deletedDetailsData,
|
||||
fieldName: 'production_id',
|
||||
dataRule: [
|
||||
{ field: 'production_type', type: 'integer' }
|
||||
]
|
||||
});
|
||||
postdata.mold_production_order_component_processes = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || (row.mold_id && row.mes_processes_id) },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
list: this.detailsData2,
|
||||
deletedList: this.deletedDetailsData2,
|
||||
fieldName: 'production_id',
|
||||
dataRule: [
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
// 提交数据
|
||||
this.$mk.post({
|
||||
url: action,
|
||||
loading: "保存中...",
|
||||
data: postdata,
|
||||
useBigInt: true,
|
||||
}).then((a) => { // 成功回调
|
||||
if (a.code == "200") {
|
||||
|
||||
|
||||
this.$mk.success("保存成功");
|
||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||
this.back();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$mk.error(a.message);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 验证表单
|
||||
this.$mk.validateForm({ form: this.$refs.xForm }).then(() => { // 验证表单
|
||||
|
||||
save(); // 提交保存
|
||||
|
||||
}).catch(count => { // 验证失败
|
||||
this.$mk.error(`存在${count}项错误,请检查`);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 取消 返回
|
||||
cancel() {
|
||||
this.back();
|
||||
},
|
||||
|
||||
|
||||
pageAdd(row) {
|
||||
const $table = this.$refs.xTable
|
||||
const record = {
|
||||
}
|
||||
if (row) {
|
||||
this.detailsData.splice($table.getRowSeq(row), 0, record);
|
||||
} else {
|
||||
this.detailsData.push(record)
|
||||
}
|
||||
},
|
||||
pageDelete(row) {
|
||||
const $table = this.$refs.xTable;
|
||||
if (row.id) {
|
||||
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
||||
}
|
||||
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
||||
},
|
||||
|
||||
|
||||
pageAdd2(row) {
|
||||
const $table = this.$refs.xTable2
|
||||
const record = {
|
||||
}
|
||||
if (row) {
|
||||
this.detailsData2.splice($table.getRowSeq(row), 0, record);
|
||||
} else {
|
||||
this.detailsData2.push(record)
|
||||
}
|
||||
},
|
||||
pageDelete2(row) {
|
||||
const $table = this.$refs.xTable2;
|
||||
if (row.id) {
|
||||
this.deletedDetailsData2.push(this.$mk.toBigInt(row.id))
|
||||
}
|
||||
this.detailsData2.splice($table.getRowSeq(row) - 1, 1);
|
||||
},
|
||||
|
||||
|
||||
|
||||
beforeEditMethod({ column, row }) {
|
||||
console.log(column, row);
|
||||
return true;
|
||||
},
|
||||
afterEditEvent({ column, row }) {
|
||||
console.log(column, row);
|
||||
},
|
||||
beforeEditEvent({ column, row }) {
|
||||
console.log(column, row);
|
||||
},
|
||||
onPulldownSelected({ row, name, params }) {
|
||||
console.log(row, name, params);
|
||||
|
||||
},
|
||||
onPopupSelected({ rows, name, params }) {
|
||||
console.log(rows, name, params);
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="less">
|
||||
.page-body {
|
||||
padding: 30px;
|
||||
background: @base-bg-color;
|
||||
}
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
/* background: white; */
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 600px);
|
||||
}
|
||||
|
||||
.footerbar {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.imagePanel {
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.oplinks2 i {
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
<template>
|
||||
<basic-page-list ref="listPage" :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
i18n: require("./i18n"),
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// 页面描述
|
||||
desc() {
|
||||
return this.$t("pageDesc");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 创建完成
|
||||
created() {
|
||||
this.optionsInit();
|
||||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MoldProductionOrder',
|
||||
addPageUrl: "/Mold/MoldProductionOrderAdd",
|
||||
editPageUrl: "/Mold/MoldProductionOrderUpdate/",
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
getList: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/list`,
|
||||
delete: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/batchDelete`
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
exportFileTitle: "模型",
|
||||
enabledExport: false,
|
||||
enabledImport: false,
|
||||
enabledImportTemplate: false,
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
title: '',
|
||||
desc: '',
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{ key: "order_code", mode: "like" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
|
||||
|
||||
{ field: 'order_code', title: '订单编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入订单编码' } } },
|
||||
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
stripe: true, // 启用斑马纹
|
||||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: 80 }, // 多选框
|
||||
{ type: 'seq', width:80 }, // 序号
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
|
||||
{ field: 'order_code', sortable: true, title: '订单编码', width: 250 },
|
||||
|
||||
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
CN: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
HK: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
US: {
|
||||
pageDesc:'单位管理'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import list from './List'
|
||||
export default list
|
||||
|
|
@ -0,0 +1,523 @@
|
|||
<template>
|
||||
<div class="page-body">
|
||||
|
||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||
</vxe-form>
|
||||
|
||||
<a-tabs>
|
||||
<a-tab-pane key="1" tab="部件信息">
|
||||
<vxe-table border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData"
|
||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||
<vxe-column width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="oplinks2">
|
||||
<a @click.stop="pageAdd(row)" title="新增">
|
||||
<a-icon class="icon" type="plus-circle" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete(row)" title="删除">
|
||||
<a-icon class="icon" type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mold_component" title="部件" width="160" :params="editor_component" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type" formatter = 'formatEnum'
|
||||
:edit-render="{ name: '$select',props:{options:options_production_type} }"></vxe-column>
|
||||
</vxe-table>
|
||||
|
||||
</a-tab-pane>
|
||||
|
||||
|
||||
<a-tab-pane key="2" tab="工序设置">
|
||||
|
||||
<vxe-table border show-overflow keep-source ref="xTable2" :height="table1Height" :data="detailsData2"
|
||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||
<vxe-column width="60">
|
||||
<template #default="{ row }">
|
||||
<div class="oplinks2">
|
||||
<a @click.stop="pageAdd2(row)" title="新增">
|
||||
<a-icon class="icon" type="plus-circle" />
|
||||
</a>
|
||||
<a @click.stop="pageDelete2(row)" title="删除">
|
||||
<a-icon class="icon" type="delete" />
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="mold_component" title="部件" width="160" :params="editor_component" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
<vxe-column field="mes_processes" title="工序" width="160" :params="editor_processes" formatter="formatRef"
|
||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||
</vxe-table>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
|
||||
|
||||
|
||||
<div class="mk-toolbar" v-if="isEdit">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="footerbar">
|
||||
<a-button type="primary" @click="ok">确定</a-button>
|
||||
<a-button @click="cancel">取消</a-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
export default {
|
||||
|
||||
name: '',
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
//let _this = this;
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
|
||||
options_production_type:[{value:'1',label:'正常布产'},{value:'2',label:'委托布产'}],
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
uploadDefaultImg: null,
|
||||
detailDataFieldName: "mold_scheme",
|
||||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/detail`,
|
||||
create: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/create`,
|
||||
update: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/update`
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
material_id: 0,
|
||||
warehouse_id: 0,
|
||||
version: '',
|
||||
is_default: 0
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 100,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
code: [
|
||||
{ required: true, message: '请输入模型编码' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入模型名称' }
|
||||
],
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
{ field: 'code', title: '模型编码', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'name', title: '模型名称', span: 12, itemRender: { name: '$input' } },
|
||||
|
||||
{
|
||||
title: '分类', span: 12,
|
||||
field: 'mold_scheme_category',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
saveField: "mold_category_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldSchemeCategory',
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/category/list`
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
table1Height: 400,
|
||||
detailsSourceData: [
|
||||
],
|
||||
detailsData: [
|
||||
],
|
||||
deletedDetailsData: [
|
||||
|
||||
],
|
||||
|
||||
detailsData2: [
|
||||
],
|
||||
deletedDetailsData2: [
|
||||
|
||||
],
|
||||
editor_component: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MoldComponent',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "component_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MoldComponent/v1/mold/component/list`
|
||||
},
|
||||
|
||||
|
||||
editor_processes: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
textField: "name",
|
||||
listdataFieldName: 'MesProcesses',
|
||||
mapper: [
|
||||
{ fromField: "id", field: "mes_processes_id" }
|
||||
],
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesProcesses/v1/mes/processes/list`
|
||||
},
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
// 合并表单数据及配置
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
return pageData;
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
|
||||
// 获取路由的id参数
|
||||
let dataId = this.getDataId();
|
||||
|
||||
// 如果有id参数,说明是编辑模式
|
||||
if (dataId) {
|
||||
this.$mk.post({
|
||||
url: this.actions.get,
|
||||
loading: "加载中...",
|
||||
data: {id : this.$mk.toBigInt(dataId)},
|
||||
useBigInt : true
|
||||
}).then(a => {
|
||||
|
||||
|
||||
this.formOptions.data = this.$mk.formatDetailData({data: a.data[this.detailDataFieldName] });
|
||||
|
||||
this.detailsData = a.data[this.detailDataFieldName].mold_scheme_components || [];
|
||||
this.detailsData2 = a.data[this.detailDataFieldName].mold_scheme_processes || [];
|
||||
|
||||
|
||||
|
||||
|
||||
this.detailsDataInit();
|
||||
|
||||
});
|
||||
|
||||
this.isEdit = true;
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
// 如果没有id参数,说明是新增模式
|
||||
this.addModeItems.forEach(item => {
|
||||
this.formOptions.items.push(item);
|
||||
})
|
||||
|
||||
this.detailsDataInit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
this.heightInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
|
||||
heightInit() {
|
||||
|
||||
this.$nextTick(() => {
|
||||
let h = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 200;
|
||||
|
||||
this.table1Height = h;
|
||||
});
|
||||
|
||||
},
|
||||
detailsDataInit() {
|
||||
for (let i = this.detailsData && this.detailsData.length; i < 10; i++) {
|
||||
this.detailsData.push({});
|
||||
}
|
||||
for (let i = this.detailsData2 && this.detailsData2.length; i < 10; i++) {
|
||||
this.detailsData2.push({});
|
||||
}
|
||||
},
|
||||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
return dataId;
|
||||
},
|
||||
getDataId_BigInt() {
|
||||
let dataId = this.getDataId();
|
||||
return this.$mk.toBigInt(dataId);
|
||||
},
|
||||
|
||||
|
||||
// 返回
|
||||
back() {
|
||||
// 如果是新增模式,关闭当前页面
|
||||
if (!this.isEdit) {
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldSchemeAdd"
|
||||
});
|
||||
} else {
|
||||
// 如果是编辑模式,关闭当前页面
|
||||
this.$closePage({
|
||||
closeRoute: "/Mold/MoldSchemeUpdate"
|
||||
});
|
||||
}
|
||||
// 打开列表页面
|
||||
this.$openPage('/Mold/MoldScheme')
|
||||
},
|
||||
|
||||
|
||||
|
||||
// 保存
|
||||
ok() {
|
||||
|
||||
|
||||
|
||||
let save = () => {
|
||||
|
||||
|
||||
// 如果是新增模式,提交新增接口 如果是编辑模式,提交编辑接口
|
||||
let action = !this.isEdit ? this.actions.create : this.actions.update;
|
||||
// 如果是新增模式,提交的数据中加入id 如果是编辑模式,提交的数据中不加入id
|
||||
let postdata = Object.assign({}, this.formOptions.data);
|
||||
|
||||
|
||||
// 格式化提交的数据
|
||||
this.$mk.formatFormData({ data: postdata, rules: this.formOptions.items });
|
||||
|
||||
postdata.mold_scheme_components = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || row.component_id },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
list: this.detailsData,
|
||||
deletedList: this.deletedDetailsData,
|
||||
fieldName: 'mold_id',
|
||||
dataRule:[
|
||||
{field:'production_type',type:'integer'}
|
||||
]
|
||||
});
|
||||
postdata.mold_scheme_processes = this.$mk.getPostFieldValue({
|
||||
rowFilter: (row) => { return row.id || ( row.component_id && row.mes_processes_id) },
|
||||
dataId: this.getDataId_BigInt(),
|
||||
list: this.detailsData2,
|
||||
deletedList: this.deletedDetailsData2,
|
||||
fieldName: 'mold_id',
|
||||
dataRule:[
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
// 提交数据
|
||||
this.$mk.post({
|
||||
url: action,
|
||||
loading: "保存中...",
|
||||
data: postdata,
|
||||
useBigInt: true,
|
||||
}).then((a) => { // 成功回调
|
||||
if (a.code == "200") {
|
||||
|
||||
|
||||
this.$mk.success("保存成功");
|
||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||
this.back();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$mk.error(a.message);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 验证表单
|
||||
this.$mk.validateForm({ form: this.$refs.xForm }).then(() => { // 验证表单
|
||||
|
||||
save(); // 提交保存
|
||||
|
||||
}).catch(count => { // 验证失败
|
||||
this.$mk.error(`存在${count}项错误,请检查`);
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
// 取消 返回
|
||||
cancel() {
|
||||
this.back();
|
||||
},
|
||||
|
||||
|
||||
pageAdd(row) {
|
||||
const $table = this.$refs.xTable
|
||||
const record = {
|
||||
}
|
||||
if (row) {
|
||||
this.detailsData.splice($table.getRowSeq(row), 0, record);
|
||||
} else {
|
||||
this.detailsData.push(record)
|
||||
}
|
||||
},
|
||||
pageDelete(row) {
|
||||
const $table = this.$refs.xTable;
|
||||
if (row.id) {
|
||||
this.deletedDetailsData.push(this.$mk.toBigInt(row.id))
|
||||
}
|
||||
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
||||
},
|
||||
|
||||
|
||||
pageAdd2(row) {
|
||||
const $table = this.$refs.xTable2
|
||||
const record = {
|
||||
}
|
||||
if (row) {
|
||||
this.detailsData2.splice($table.getRowSeq(row), 0, record);
|
||||
} else {
|
||||
this.detailsData2.push(record)
|
||||
}
|
||||
},
|
||||
pageDelete2(row) {
|
||||
const $table = this.$refs.xTable2;
|
||||
if (row.id) {
|
||||
this.deletedDetailsData2.push(this.$mk.toBigInt(row.id))
|
||||
}
|
||||
this.detailsData2.splice($table.getRowSeq(row) - 1, 1);
|
||||
},
|
||||
|
||||
|
||||
|
||||
beforeEditMethod({ column, row }) {
|
||||
console.log(column,row);
|
||||
return true;
|
||||
},
|
||||
afterEditEvent({ column, row }) {
|
||||
console.log(column,row);
|
||||
},
|
||||
beforeEditEvent({ column, row }) {
|
||||
console.log(column,row);
|
||||
},
|
||||
onPulldownSelected({ row, name, params }) {
|
||||
console.log(row, name, params );
|
||||
|
||||
},
|
||||
onPopupSelected({ rows, name, params }) {
|
||||
console.log(rows, name, params);
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="less">
|
||||
.page-body {
|
||||
padding: 30px;
|
||||
background: @base-bg-color;
|
||||
}
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
/* background: white; */
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 600px);
|
||||
}
|
||||
|
||||
.footerbar {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.imagePanel {
|
||||
cursor: pointer;
|
||||
padding: 10px;
|
||||
width: 100px;
|
||||
|
||||
img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.oplinks2 i {
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
<template>
|
||||
<basic-page-list ref="listPage" :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
i18n: require("./i18n"),
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// 页面描述
|
||||
desc() {
|
||||
return this.$t("pageDesc");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 创建完成
|
||||
created() {
|
||||
this.optionsInit();
|
||||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MoldScheme',
|
||||
addPageUrl: "/Mold/MoldSchemeAdd",
|
||||
editPageUrl: "/Mold/MoldSchemeUpdate/",
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
getList: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/list`,
|
||||
delete: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/batchDelete`
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
exportFileTitle: "模型",
|
||||
enabledExport: false,
|
||||
enabledImport: false,
|
||||
enabledImportTemplate: false,
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
title: '',
|
||||
desc: '',
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{ key: "name", mode: "like" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
|
||||
|
||||
{ field: 'code', title: '编码', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
||||
{ field: 'name', title: '名称', span: 6, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
stripe: true, // 启用斑马纹
|
||||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{ type: 'checkbox', width: 80 }, // 多选框
|
||||
{ type: 'seq', width:80 }, // 序号
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 250 },
|
||||
|
||||
{ field: 'name', sortable: true, title: '名称', width: 250 },
|
||||
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
CN: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
HK: {
|
||||
pageDesc:'单位管理'
|
||||
},
|
||||
US: {
|
||||
pageDesc:'单位管理'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
import list from './List'
|
||||
export default list
|
||||
|
|
@ -0,0 +1,177 @@
|
|||
<template>
|
||||
<basic-page-edit :desc="desc" :dataId="getDataId()" :options="pageOptions"></basic-page-edit>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
this.optionsInit();
|
||||
this.dataInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
addPageUrl: "/Mold/MoldSchemeCategoryAdd",
|
||||
editPageUrl: "/Mold/MoldSchemeCategoryUpdate/",
|
||||
listPageUrl: "/Mold/MoldSchemeCategory",
|
||||
|
||||
|
||||
uploadDefaultImg: null,
|
||||
|
||||
detailDataFieldName: "mold_scheme_category",
|
||||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/category/detail`,
|
||||
create: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/category/create`,
|
||||
update: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/category/update`,
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
|
||||
id: 0,
|
||||
code: "",
|
||||
name: "",
|
||||
create_uid: 0,
|
||||
update_uid: 0,
|
||||
create_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||
update_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 150,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
|
||||
code: [
|
||||
{ required: true, message: '请输入编码' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入名称' }
|
||||
],
|
||||
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
|
||||
{ field: 'code', title: '编码', span: 24, itemRender: { name: '$input' } },
|
||||
{ field: 'name', title: '名称', span: 24, itemRender: { name: '$input' } },
|
||||
|
||||
{ field: 'sort',dataRule:{type:'integer'}, title: '排序', span: 24, itemRender: { name: '$input',props:{type:'number'} } },
|
||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input' } },
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
};
|
||||
|
||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
dataInit() {
|
||||
// 获取路由的id参数
|
||||
let dataId = this.getDataId();
|
||||
// 如果有id参数,说明是编辑模式
|
||||
if (dataId) {
|
||||
const json = `{"id":${dataId}}`;
|
||||
this.$mk.post({
|
||||
url: this.pageOptions.actions.get,
|
||||
loading: "加载中...",
|
||||
data: json,
|
||||
config: {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
}
|
||||
}).then(a => {
|
||||
|
||||
this.pageOptions.formOptions.data = this.$mk.formatDetailData({data:a.data[this.pageOptions.detailDataFieldName]});
|
||||
|
||||
this.$forceUpdate()
|
||||
});
|
||||
|
||||
this.pageOptions.isEdit = true;
|
||||
|
||||
this.$forceUpdate()
|
||||
} else {
|
||||
// 如果没有id参数,说明是新增模式
|
||||
this.addModeItems.forEach(item => {
|
||||
this.pageOptions.formOptions.items.push(item);
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 获取路由的id参数
|
||||
getDataId() {
|
||||
let dataId = this.dataId;
|
||||
if (this.$route.params.id) {
|
||||
dataId = this.$route.params.id;
|
||||
}
|
||||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
return dataId;
|
||||
}
|
||||
},
|
||||
// 监听属性
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -0,0 +1,111 @@
|
|||
<template>
|
||||
<basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
// 计算属性
|
||||
computed: {
|
||||
// 页面描述
|
||||
desc() {
|
||||
return this.$t("pageDesc");
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// 创建完成
|
||||
created() {
|
||||
this.optionsInit();
|
||||
},
|
||||
// 动作
|
||||
methods: {
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据
|
||||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MoldSchemeCategory',
|
||||
|
||||
addPageUrl: "/Mold/MoldSchemeCategoryAdd",
|
||||
editPageUrl: "/Mold/MoldSchemeCategoryUpdate/",
|
||||
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
getList: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/category/list`,
|
||||
delete: `${BASE_URL.BASE_URL}/MoldScheme/v1/mold/scheme/category/batchDelete`,
|
||||
},
|
||||
|
||||
start_time: 0, // 开始时间
|
||||
end_time: 0, // 结束时间
|
||||
|
||||
|
||||
//搜索区
|
||||
searchFormData: {
|
||||
name: '',
|
||||
code: '',
|
||||
},
|
||||
// 搜索区配置
|
||||
searchRules: [
|
||||
{ key: "code", mode: "like" },
|
||||
{ key: "name", mode: "like" }
|
||||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'name', title: '名称', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入名称' } } },
|
||||
{ field: 'code', title: '编码', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
||||
{ props: { type: 'reset', content: '重置' } }]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
stripe: true, // 启用斑马纹
|
||||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
columns: [
|
||||
{ type: 'checkbox', width:60 }, // 多选框
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 250 },
|
||||
{ field: 'name', sortable: true, title: '名称', width: 250 },
|
||||
{ field: 'remark', sortable: true, title: '备注', width: 250 },
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -0,0 +1,282 @@
|
|||
// 视图组件
|
||||
const view = {
|
||||
tabs: () => import('@/layouts/tabs'),
|
||||
blank: () => import('@/layouts/BlankView'),
|
||||
page: () => import('@/layouts/PageView')
|
||||
}
|
||||
|
||||
// 路由组件注册
|
||||
const routerMap = {
|
||||
};
|
||||
|
||||
routerMap['Mold']= {
|
||||
name: '模具管理',
|
||||
icon: 'idcard',
|
||||
component: view.blank,
|
||||
meta: {
|
||||
},
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
routerMap['MoldOrder']= {
|
||||
name: '模具订单',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldOrder`,
|
||||
meta:{
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldOrder`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
routerMap['MoldOrderCreate']= {
|
||||
name: '模具订单',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldOrderAdd`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldOrder/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldOrderUpdate']= {
|
||||
name: '模具订单',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldOrderUpdate/:id`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldOrder/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
routerMap['MoldProductionOrder']= {
|
||||
name: '工艺布产',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldProductionOrder`,
|
||||
meta:{
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldProductionOrder`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldProductionOrderCreate']= {
|
||||
name: '工艺布产',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldProductionOrderAdd`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldProductionOrder/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldProductionOrderUpdate']= {
|
||||
name: '工艺布产',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldProductionOrderUpdate/:id`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldProductionOrder/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
routerMap['MoldScheme']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldScheme`,
|
||||
meta:{
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldScheme`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldSchemeCreate']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldSchemeAdd`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldScheme/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldSchemeUpdate']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldSchemeUpdate/:id`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldScheme/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
routerMap['MoldComponent']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldComponent`,
|
||||
meta:{
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldComponent`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldComponentCreate']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldComponentAdd`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldComponent/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldComponentUpdate']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldComponentUpdate/:id`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldComponent/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
routerMap['MoldComponentCategory']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldComponentCategory`,
|
||||
meta:{
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldComponentCategory/List`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldComponentCategoryCreate']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldComponentCategoryAdd`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldComponentCategory/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldComponentCategoryUpdate']= {
|
||||
name: '模具设计',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldComponentCategoryUpdate/:id`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldComponentCategory/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
routerMap['MoldSchemeCategory']= {
|
||||
name: '模具分类',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldSchemeCategory`,
|
||||
meta:{
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldSchemeCategory/List`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldSchemeCategoryCreate']= {
|
||||
name: '模具分类',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldSchemeCategoryAdd`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldSchemeCategory/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
routerMap['MoldSchemeCategoryUpdate']= {
|
||||
name: '模具分类',
|
||||
icon: 'idcard',
|
||||
path: `/Mold/MoldSchemeCategoryUpdate/:id`,
|
||||
meta:{
|
||||
invisible: true,
|
||||
page:{ cacheAble:false}
|
||||
},
|
||||
component: () => import(`@/pages/Middle/Mold/MoldSchemeCategory/Edit`),
|
||||
authority: {
|
||||
permission: [],
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export default routerMap
|
||||
|
|
@ -15,7 +15,7 @@ import Bathroom from '@/router/Middle/bathroom/router.map.js'
|
|||
import Mes from '@/router/Middle/Mes/router.map.js'
|
||||
import Chatgpt from '@/router/Middle/Chatgpt/router.map.js'
|
||||
import ProvideLoanApply from '@/router/Middle/ProvideLoanApply/router.map.js'
|
||||
|
||||
import Mold from '@/router/Middle/Mold/router.map.js'
|
||||
|
||||
import Test from '@/router/Test/router.map.js'
|
||||
|
||||
|
|
@ -42,6 +42,8 @@ const routerMap = Object.assign({
|
|||
//车贷
|
||||
ProvideLoanApply,
|
||||
|
||||
//模具
|
||||
Mold,
|
||||
|
||||
//测试
|
||||
Test
|
||||
|
|
|
|||
Loading…
Reference in New Issue