随车联
This commit is contained in:
parent
7264c74c68
commit
dfcad9e05d
|
|
@ -58,6 +58,7 @@ export default {
|
||||||
|
|
||||||
// 返回
|
// 返回
|
||||||
back() {
|
back() {
|
||||||
|
if (this.options.addPageUrl) {
|
||||||
this.isEdit = this.options.isEdit;
|
this.isEdit = this.options.isEdit;
|
||||||
// 如果是新增模式,关闭当前页面
|
// 如果是新增模式,关闭当前页面
|
||||||
if (!this.isEdit) {
|
if (!this.isEdit) {
|
||||||
|
|
@ -71,6 +72,10 @@ export default {
|
||||||
}
|
}
|
||||||
// 打开列表页面
|
// 打开列表页面
|
||||||
this.$openPage(this.options.listPageUrl)
|
this.$openPage(this.options.listPageUrl)
|
||||||
|
} else {
|
||||||
|
this.$emit("callback", { success: true });
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 保存
|
// 保存
|
||||||
|
|
@ -93,7 +98,7 @@ export default {
|
||||||
// postdata = { MesUnit: postdata }
|
// postdata = { MesUnit: postdata }
|
||||||
}
|
}
|
||||||
// 格式化提交的数据
|
// 格式化提交的数据
|
||||||
this.$mk.formatFormData({ data: postdata, rules: this.options.formOptions.items });
|
this.$mk.formatFormData({ data: postdata, rules: this.options.formOptions.items ,igFields : this.options.saveIgFields });
|
||||||
|
|
||||||
|
|
||||||
// 提交数据
|
// 提交数据
|
||||||
|
|
@ -102,10 +107,11 @@ export default {
|
||||||
loading: "保存中...",
|
loading: "保存中...",
|
||||||
data: postdata,
|
data: postdata,
|
||||||
useBigInt: true,
|
useBigInt: true,
|
||||||
}).then(() => { // 成功回调
|
}).then((a) => { // 成功回调
|
||||||
if (afterSave) {
|
if (afterSave) {
|
||||||
afterSave();
|
afterSave();
|
||||||
} else {
|
} else {
|
||||||
|
if (a.code == 200) {
|
||||||
this.$mk.success("保存成功");
|
this.$mk.success("保存成功");
|
||||||
|
|
||||||
this.$emit("afterSave", { data: postdata });
|
this.$emit("afterSave", { data: postdata });
|
||||||
|
|
@ -129,6 +135,10 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.$mk.error(a.msg); // 显示错误信息
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}).catch((a) => { // 失败回调
|
}).catch((a) => { // 失败回调
|
||||||
|
|
@ -152,7 +162,11 @@ export default {
|
||||||
|
|
||||||
// 取消 返回
|
// 取消 返回
|
||||||
cancel() {
|
cancel() {
|
||||||
|
if (this.options.addPageUrl) {
|
||||||
this.back();
|
this.back();
|
||||||
|
} else {
|
||||||
|
this.$emit("callback", {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
|
|
|
||||||
|
|
@ -348,8 +348,28 @@ export default {
|
||||||
toolbarClick(e) {
|
toolbarClick(e) {
|
||||||
if (e.name == "add") { // 如果是添加
|
if (e.name == "add") { // 如果是添加
|
||||||
|
|
||||||
|
if (this.options.editPage) {
|
||||||
|
this.$mk.dialog.open({
|
||||||
|
page: this.options.editPage,
|
||||||
|
title: this.options.editPageTitle,
|
||||||
|
pageOptions: {
|
||||||
|
},
|
||||||
|
width: this.$mk.getWindowSize().width * 0.9,
|
||||||
|
height: this.$mk.getWindowSize().height * 0.9,
|
||||||
|
dataId: 0,
|
||||||
|
callback:({success})=>{
|
||||||
|
if(success){
|
||||||
|
this.$refs.xGrid.commitProxy('query')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
this.$openPage(this.options.addPageUrl); // 打开页面
|
this.$openPage(this.options.addPageUrl); // 打开页面
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getPageList() {
|
getPageList() {
|
||||||
|
|
@ -437,20 +457,45 @@ export default {
|
||||||
if (editPage != null) {
|
if (editPage != null) {
|
||||||
editPage.beforeTabClose().then(() => {
|
editPage.beforeTabClose().then(() => {
|
||||||
this.$closePage(this.options.editPageUrl);
|
this.$closePage(this.options.editPageUrl);
|
||||||
this.$openPage(this.options.editPageUrl + row[this.options.keyName]); // 打开页面
|
this.showPageEdit( row[this.options.keyName]); // 打开页面
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$openPage(this.options.editPageUrl + row[this.options.keyName]); // 打开页面
|
this.showPageEdit(row[this.options.keyName]); // 打开页面
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.$openPage(this.options.editPageUrl + row[this.options.keyName]); // 打开页面
|
this.showPageEdit(row[this.options.keyName]); // 打开页面
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
showPageEdit(dataId){
|
||||||
|
|
||||||
|
if( this.options.editPage){
|
||||||
|
this.$mk.dialog.open({
|
||||||
|
page: this.options.editPage,
|
||||||
|
title: this.options.editPageTitle,
|
||||||
|
pageOptions: {
|
||||||
|
},
|
||||||
|
width: this.$mk.getWindowSize().width * 0.9,
|
||||||
|
height: this.$mk.getWindowSize().height * 0.9,
|
||||||
|
dataId: dataId,
|
||||||
|
callback:({success})=>{
|
||||||
|
if(success){
|
||||||
|
this.$refs.xGrid.commitProxy('query')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.$openPage(this.options.editPageUrl + dataId);
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
pageDelete(row) {
|
pageDelete(row) {
|
||||||
let rows = row ? [row] : this.$refs.xGrid.getCheckboxRecords(); // 获取选中行
|
let rows = row ? [row] : this.$refs.xGrid.getCheckboxRecords(); // 获取选中行
|
||||||
|
|
@ -530,6 +575,7 @@ export default {
|
||||||
.gridPanel {
|
.gridPanel {
|
||||||
height: calc(100vh - 220px);
|
height: calc(100vh - 220px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.oplinks svg {
|
.oplinks svg {
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@ export default {
|
||||||
|
|
||||||
// 处理回调
|
// 处理回调
|
||||||
handleCallback(e) {
|
handleCallback(e) {
|
||||||
|
|
||||||
|
console.log(e);
|
||||||
const { callback } = this;
|
const { callback } = this;
|
||||||
// 判断是否有回调函数
|
// 判断是否有回调函数
|
||||||
if (callback) {
|
if (callback) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="edit-down-table">
|
<div class="edit-down-table">
|
||||||
<vxe-pulldown class="edit-down-pulldown" ref="xDown" transfer>
|
<vxe-pulldown class="edit-down-pulldown" ref="xDown" transfer>
|
||||||
<template>
|
<template>
|
||||||
<vxe-input class="edit-down-input" suffix-icon="vxe-icon-search" ref="inputx" :type="enalbedPopup ? 'search' : 'input'" v-model="textboxValue"
|
<vxe-input class="edit-down-input" ref="inputx" :type="enalbedPopup ? 'search' : 'input'" v-model="textboxValue"
|
||||||
:readonly="readonly" @keyup="keyupEvent" :placeholder="placeholder" @click="clickEvent"
|
:readonly="readonly" @keyup="keyupEvent" :placeholder="placeholder" @click="clickEvent"
|
||||||
@suffix-click="suffixClick" @search-click="popupEvent"></vxe-input>
|
@suffix-click="suffixClick" @search-click="popupEvent"></vxe-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -145,9 +145,11 @@ export default {
|
||||||
if(params.treeConfig){
|
if(params.treeConfig){
|
||||||
this.treeConfig = params.treeConfig;
|
this.treeConfig = params.treeConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.popup) { // 如果弹出框存在
|
if (params.popup) { // 如果弹出框存在
|
||||||
this.enalbedPopup = true; // 是否启用弹出框
|
this.enalbedPopup = true; // 是否启用弹出框
|
||||||
this.popupPage = params.popup.page; // 弹出框页面
|
this.popupPage = params.popup.page; // 弹出框页面
|
||||||
|
|
||||||
}
|
}
|
||||||
if (params.dataUrl) {
|
if (params.dataUrl) {
|
||||||
this.actions.getList = params.dataUrl;
|
this.actions.getList = params.dataUrl;
|
||||||
|
|
@ -286,6 +288,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
suffixClick() { // 后缀点击事件
|
suffixClick() { // 后缀点击事件
|
||||||
|
|
||||||
this.$refs.xDown.togglePanel()
|
this.$refs.xDown.togglePanel()
|
||||||
},
|
},
|
||||||
pageChangeEvent({ currentPage, pageSize }) { // 分页改变事件
|
pageChangeEvent({ currentPage, pageSize }) { // 分页改变事件
|
||||||
|
|
@ -319,6 +322,7 @@ export default {
|
||||||
this.$emit('input', [e.row.ID, e.row[textField]]);
|
this.$emit('input', [e.row.ID, e.row[textField]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (params.onDataChanged) {
|
if (params.onDataChanged) {
|
||||||
params.onDataChanged({ value: [e.row.ID, e.row[textField]], data: e.row })
|
params.onDataChanged({ value: [e.row.ID, e.row[textField]], data: e.row })
|
||||||
}
|
}
|
||||||
|
|
@ -326,6 +330,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
popupEvent() {
|
popupEvent() {
|
||||||
|
console.log("popupEvent");
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
},
|
},
|
||||||
confirmEvent() {
|
confirmEvent() {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// 格式化表单数据
|
// 格式化表单数据(准备提交)
|
||||||
formatFormData: function ({ data, rules }) { // 格式化表单数据
|
formatFormData: function ({ data, rules , igFields }) { // 格式化表单数据
|
||||||
|
|
||||||
|
|
||||||
let feachRules = (rules) => {
|
let feachRules = (rules) => {
|
||||||
|
|
@ -50,6 +50,46 @@ export default {
|
||||||
};
|
};
|
||||||
feachRules(rules);
|
feachRules(rules);
|
||||||
|
|
||||||
|
if(igFields){
|
||||||
|
igFields.forEach(field=>{
|
||||||
|
if(field in data){
|
||||||
|
delete data[field];
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 格式化表单数据(准备展示)
|
||||||
|
formatInitFormData: function ({ data, rules }) { // 格式化表单数据
|
||||||
|
|
||||||
|
|
||||||
|
let feachRules = (rules) => {
|
||||||
|
|
||||||
|
rules.forEach(rule => { // 循环规则
|
||||||
|
if (rule.children && rule.children.length) {
|
||||||
|
feachRules(rule.children);
|
||||||
|
}
|
||||||
|
if (!rule.dataRule) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(rule.dataRule.getter){
|
||||||
|
data[rule.field] = rule.dataRule.getter(data);
|
||||||
|
}
|
||||||
|
if (rule.field in data) { // 如果字段在数据中
|
||||||
|
if (rule.dataRule.type == "timestamp") { // 如果是时间戳
|
||||||
|
if (data[rule.field] > 0) {
|
||||||
|
data[rule.field] = new Date(data[rule.field] * 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
feachRules(rules);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,230 @@
|
||||||
|
<template>
|
||||||
|
<basic-page-edit :desc="desc" :dataId="getDataId()" @callback="handleCallback" :options="pageOptions"></basic-page-edit>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
|
||||||
|
i18n: require('./i18n'),
|
||||||
|
components: {},
|
||||||
|
props: {
|
||||||
|
pageMode: {
|
||||||
|
type: String,
|
||||||
|
default: "edit"
|
||||||
|
},
|
||||||
|
dataId: {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
|
||||||
|
return {
|
||||||
|
pageOptions: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
desc() {
|
||||||
|
return this.$t('editPageDesc')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
this.optionsInit();
|
||||||
|
this.dataInit();
|
||||||
|
|
||||||
|
},
|
||||||
|
// 函数
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
handleCallback(e) {
|
||||||
|
|
||||||
|
this.$emit("callback", e);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
optionsInit() {
|
||||||
|
|
||||||
|
|
||||||
|
// 页面数据变量
|
||||||
|
var pageData = {
|
||||||
|
// 当前项目名称
|
||||||
|
currentConfigName: "",
|
||||||
|
// 当前项目ID
|
||||||
|
currentBeid: 0,
|
||||||
|
|
||||||
|
|
||||||
|
uploadDefaultImg: null,
|
||||||
|
detailDataFieldName: "production_order_array",
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
get: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/production/order/array/detail`,
|
||||||
|
create: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/production/order/array/create`,
|
||||||
|
update: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/production/order/array/update`,
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
saveIgFields:['create','update','update_time','create_time','create_uid','update_uid'],
|
||||||
|
keyName: 'id',
|
||||||
|
// 是否编辑模式
|
||||||
|
isEdit: false,
|
||||||
|
// 表单数据
|
||||||
|
formOptions: {
|
||||||
|
data: {
|
||||||
|
|
||||||
|
batch_no: ''
|
||||||
|
|
||||||
|
},
|
||||||
|
// 标题宽度
|
||||||
|
titleWidth: 100,
|
||||||
|
// 标题对齐方式
|
||||||
|
titleAlign: 'right',
|
||||||
|
|
||||||
|
// 表单校验规则
|
||||||
|
rules: {
|
||||||
|
|
||||||
|
batch_no: [
|
||||||
|
{ required: true, message: '请输入批次编号' }
|
||||||
|
]
|
||||||
|
|
||||||
|
},
|
||||||
|
// 表单项
|
||||||
|
items: [
|
||||||
|
|
||||||
|
{ field: 'batch_no', title: '批次编号', span: 12, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
|
{ field: 'start_time', dataRule: { type: "timestamp" }, title: '开始日期', span: 12, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'pick_time', dataRule: { type: "timestamp" }, title: '领料日期', span: 12, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
{ field: 'finish_time', dataRule: { type: "timestamp" }, title: '结束日期', span: 12, itemRender: { name: '$input', props: { type: 'date' } } },
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '料品', span: 12,
|
||||||
|
field: 'mes_materials',
|
||||||
|
dataRule: {
|
||||||
|
getter:(data)=>{
|
||||||
|
return {
|
||||||
|
id : data.materials_id,
|
||||||
|
name : data.materials_name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fromField: "id",
|
||||||
|
saveField: "materials_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||||
|
},
|
||||||
|
itemRender: {
|
||||||
|
name: 'MkFormDataSelector', props: {
|
||||||
|
params: {
|
||||||
|
dataType: "object",
|
||||||
|
valueField: "id",
|
||||||
|
textField: "name",
|
||||||
|
listdataFieldName: 'MesMaterials',
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/MesMaterials/v1/mes/materials/list`,
|
||||||
|
popup: {
|
||||||
|
page: () => import("../../MesMaterials/MesMaterials/List")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '布产单', span: 12,
|
||||||
|
field: 'production_order',
|
||||||
|
dataRule: {
|
||||||
|
getter:(data)=>{
|
||||||
|
return {
|
||||||
|
id : data.production_order_id,
|
||||||
|
production_number : data.production_number
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fromField: "id",
|
||||||
|
saveField: "production_order_id" // 如果表单项存储的是对象,将从fromField中取得值保存到saveField
|
||||||
|
},
|
||||||
|
itemRender: {
|
||||||
|
name: 'MkFormDataSelector', props: {
|
||||||
|
params: {
|
||||||
|
dataType: "object",
|
||||||
|
valueField: "id",
|
||||||
|
textField: "production_number",
|
||||||
|
listdataFieldName: 'MesProductionOrder',
|
||||||
|
columns:[
|
||||||
|
{field:"production_number",title:"布产单编号"}
|
||||||
|
],
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/mes/production/order/list`,
|
||||||
|
popup: {
|
||||||
|
page: () => import("../../MesProductionOrder/MesProductionOrder/List")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 新增模式表单项
|
||||||
|
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 => {
|
||||||
|
|
||||||
|
let data = a.data[this.pageOptions.detailDataFieldName]
|
||||||
|
|
||||||
|
// 格式化要展示的数据
|
||||||
|
this.$mk.formatInitFormData({ data: data, rules: this.pageOptions.formOptions.items });
|
||||||
|
|
||||||
|
this.pageOptions.formOptions.data = data;
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
this.$forceUpdate()
|
||||||
|
}).catch((a) => {
|
||||||
|
this.$mk.error(a.data.msg);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.pageOptions.isEdit = true;
|
||||||
|
|
||||||
|
this.$forceUpdate()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取路由的id参数
|
||||||
|
getDataId() {
|
||||||
|
return this.dataId;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 监听属性
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
<template>
|
||||||
|
<basic-page-list :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: 'ProductionOrderArray',
|
||||||
|
|
||||||
|
|
||||||
|
editPage: ()=> import("./Edit.vue"),
|
||||||
|
editPageTitle:"随车联",
|
||||||
|
// 接口动作
|
||||||
|
actions: { // Api 接口地址
|
||||||
|
getList: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/production/order/array/list`,
|
||||||
|
|
||||||
|
delete: `${BASE_URL.BASE_URL}/MesProductionOrder/v1/production/order/array/batchDelete`,
|
||||||
|
|
||||||
|
|
||||||
|
// =============================== 接口地址 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
|
||||||
|
start_time: 0, // 开始时间
|
||||||
|
end_time: 0, // 结束时间
|
||||||
|
|
||||||
|
|
||||||
|
//搜索区
|
||||||
|
searchFormData: {
|
||||||
|
title: '',
|
||||||
|
desc: '',
|
||||||
|
},
|
||||||
|
// 搜索区配置
|
||||||
|
searchRules: [
|
||||||
|
{ key: "batch_no", mode: "like" }
|
||||||
|
],
|
||||||
|
//搜索区
|
||||||
|
searchFormItems: [ // 子项
|
||||||
|
{ field: 'batch_no', title: '批次编号', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入批次编号' } } },
|
||||||
|
|
||||||
|
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
||||||
|
{
|
||||||
|
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: 50 }, // 多选框
|
||||||
|
{ type: 'seq', width: 30 }, // 序号
|
||||||
|
|
||||||
|
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||||
|
|
||||||
|
{ field: 'batch_no', sortable: true, title: '批次编号', width: 150 },
|
||||||
|
{ field: 'materials_name', title: '料品名称', width: 150 },
|
||||||
|
{ field: 'production_number', title: '布产单编号', width: 150 },
|
||||||
|
{ field: 'start_time', formatter: 'formatDate', title: '开始日期', width: 150 },
|
||||||
|
{ field: 'pick_time', formatter: 'formatDate', title: '领料日期', width: 150 },
|
||||||
|
{ field: 'finish_time', formatter: 'formatDate', title: '完成日期', width: 150 },
|
||||||
|
|
||||||
|
{ field: 'create_time', formatter: 'formatDate', width: 160, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||||
|
{ field: 'update_time', formatter: 'formatDate', width: 160, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
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:'单位管理'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -65,6 +65,20 @@ routerMap[FunName + 'Update']= {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
routerMap['MesProductionOrderBatch']= {
|
||||||
|
name: '随车连',
|
||||||
|
icon: 'idcard',
|
||||||
|
path: `/MesProductionOrder/MesProductionOrderBatch`,
|
||||||
|
component: () => import(`@/pages/Middle/Mes/MesProductionOrder/Batch/List`),
|
||||||
|
meta: {
|
||||||
|
invisible: true,
|
||||||
|
},
|
||||||
|
authority: {
|
||||||
|
permission: [],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
InvisibleRouters.forEach(item => {
|
InvisibleRouters.forEach(item => {
|
||||||
let name = FunName + item;
|
let name = FunName + item;
|
||||||
if (!(name in routerMap)) {
|
if (!(name in routerMap)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue