随车联
This commit is contained in:
parent
7264c74c68
commit
dfcad9e05d
|
|
@ -58,19 +58,24 @@ export default {
|
|||
|
||||
// 返回
|
||||
back() {
|
||||
this.isEdit = this.options.isEdit;
|
||||
// 如果是新增模式,关闭当前页面
|
||||
if (!this.isEdit) {
|
||||
this.$closePage({
|
||||
closeRoute: this.options.addPageUrl
|
||||
});
|
||||
if (this.options.addPageUrl) {
|
||||
this.isEdit = this.options.isEdit;
|
||||
// 如果是新增模式,关闭当前页面
|
||||
if (!this.isEdit) {
|
||||
this.$closePage({
|
||||
closeRoute: this.options.addPageUrl
|
||||
});
|
||||
} else {
|
||||
this.$closePage({
|
||||
closeRoute: this.options.editPageUrl
|
||||
});
|
||||
}
|
||||
// 打开列表页面
|
||||
this.$openPage(this.options.listPageUrl)
|
||||
} else {
|
||||
this.$closePage({
|
||||
closeRoute: this.options.editPageUrl
|
||||
});
|
||||
this.$emit("callback", { success: true });
|
||||
}
|
||||
// 打开列表页面
|
||||
this.$openPage(this.options.listPageUrl)
|
||||
|
||||
},
|
||||
|
||||
// 保存
|
||||
|
|
@ -93,7 +98,7 @@ export default {
|
|||
// 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,33 +107,38 @@ export default {
|
|||
loading: "保存中...",
|
||||
data: postdata,
|
||||
useBigInt: true,
|
||||
}).then(() => { // 成功回调
|
||||
}).then((a) => { // 成功回调
|
||||
if (afterSave) {
|
||||
afterSave();
|
||||
} else {
|
||||
this.$mk.success("保存成功");
|
||||
if (a.code == 200) {
|
||||
this.$mk.success("保存成功");
|
||||
|
||||
this.$emit("afterSave", { data: postdata });
|
||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||
this.$emit("afterSave", { data: postdata });
|
||||
if (!this.isEdit) { // 如果是新增模式,关闭当前页面
|
||||
|
||||
if (this.options.action_afterSave == "confirm") {
|
||||
this.$confirm({
|
||||
title: '提示',
|
||||
content: '新增成功,是否继续',
|
||||
okText: '确认',
|
||||
cancelText: '返回',
|
||||
onOk() {
|
||||
_this.options.formOptions.data = _this.defaultFormData;
|
||||
},
|
||||
onCancel() {
|
||||
_this.back();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.back();
|
||||
}
|
||||
|
||||
if (this.options.action_afterSave == "confirm") {
|
||||
this.$confirm({
|
||||
title: '提示',
|
||||
content: '新增成功,是否继续',
|
||||
okText: '确认',
|
||||
cancelText: '返回',
|
||||
onOk() {
|
||||
_this.options.formOptions.data = _this.defaultFormData;
|
||||
},
|
||||
onCancel() {
|
||||
_this.back();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.back();
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$mk.error(a.msg); // 显示错误信息
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}).catch((a) => { // 失败回调
|
||||
|
|
@ -152,7 +162,11 @@ export default {
|
|||
|
||||
// 取消 返回
|
||||
cancel() {
|
||||
this.back();
|
||||
if (this.options.addPageUrl) {
|
||||
this.back();
|
||||
} else {
|
||||
this.$emit("callback", {});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 监听属性
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ export default {
|
|||
let item = this.options.exportColumns[i];
|
||||
var v = "";
|
||||
if (item.valueGetter) {
|
||||
v = item.valueGetter({ row: row,column:item });
|
||||
v = item.valueGetter({ row: row, column: item });
|
||||
}
|
||||
else if (item.dataField) {
|
||||
v = row[item.dataField];
|
||||
|
|
@ -348,7 +348,27 @@ export default {
|
|||
toolbarClick(e) {
|
||||
if (e.name == "add") { // 如果是添加
|
||||
|
||||
this.$openPage(this.options.addPageUrl); // 打开页面
|
||||
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); // 打开页面
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
|
@ -437,20 +457,45 @@ export default {
|
|||
if (editPage != null) {
|
||||
editPage.beforeTabClose().then(() => {
|
||||
this.$closePage(this.options.editPageUrl);
|
||||
this.$openPage(this.options.editPageUrl + row[this.options.keyName]); // 打开页面
|
||||
this.showPageEdit( row[this.options.keyName]); // 打开页面
|
||||
});
|
||||
} else {
|
||||
this.$openPage(this.options.editPageUrl + row[this.options.keyName]); // 打开页面
|
||||
this.showPageEdit(row[this.options.keyName]); // 打开页面
|
||||
}
|
||||
|
||||
} 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) {
|
||||
let rows = row ? [row] : this.$refs.xGrid.getCheckboxRecords(); // 获取选中行
|
||||
|
|
@ -466,7 +511,7 @@ export default {
|
|||
|
||||
let delParms = {};
|
||||
let url = this.options.actions.delete;
|
||||
|
||||
|
||||
|
||||
if (url.indexOf('batchDelete') != -1) {
|
||||
delParms = {
|
||||
|
|
@ -505,10 +550,10 @@ export default {
|
|||
this.$refs.xGrid.commitProxy('query') // 提交搜索
|
||||
},
|
||||
|
||||
gridReload(){
|
||||
gridReload() {
|
||||
this.$refs.xGrid.commitProxy('query')
|
||||
},
|
||||
|
||||
|
||||
getConfirmData() {
|
||||
let rows = this.$refs.xGrid.getCheckboxRecords();
|
||||
return rows;
|
||||
|
|
@ -529,7 +574,8 @@ export default {
|
|||
|
||||
.gridPanel {
|
||||
height: calc(100vh - 220px);
|
||||
}
|
||||
}
|
||||
|
||||
.oplinks svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ export default {
|
|||
|
||||
// 处理回调
|
||||
handleCallback(e) {
|
||||
|
||||
console.log(e);
|
||||
const { callback } = this;
|
||||
// 判断是否有回调函数
|
||||
if (callback) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="edit-down-table">
|
||||
<vxe-pulldown class="edit-down-pulldown" ref="xDown" transfer>
|
||||
<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"
|
||||
@suffix-click="suffixClick" @search-click="popupEvent"></vxe-input>
|
||||
</template>
|
||||
|
|
@ -145,9 +145,11 @@ export default {
|
|||
if(params.treeConfig){
|
||||
this.treeConfig = params.treeConfig;
|
||||
}
|
||||
|
||||
if (params.popup) { // 如果弹出框存在
|
||||
this.enalbedPopup = true; // 是否启用弹出框
|
||||
this.popupPage = params.popup.page; // 弹出框页面
|
||||
|
||||
}
|
||||
if (params.dataUrl) {
|
||||
this.actions.getList = params.dataUrl;
|
||||
|
|
@ -286,6 +288,7 @@ export default {
|
|||
})
|
||||
},
|
||||
suffixClick() { // 后缀点击事件
|
||||
|
||||
this.$refs.xDown.togglePanel()
|
||||
},
|
||||
pageChangeEvent({ currentPage, pageSize }) { // 分页改变事件
|
||||
|
|
@ -318,6 +321,7 @@ export default {
|
|||
else {
|
||||
this.$emit('input', [e.row.ID, e.row[textField]]);
|
||||
}
|
||||
|
||||
|
||||
if (params.onDataChanged) {
|
||||
params.onDataChanged({ value: [e.row.ID, e.row[textField]], data: e.row })
|
||||
|
|
@ -326,6 +330,7 @@ export default {
|
|||
},
|
||||
|
||||
popupEvent() {
|
||||
console.log("popupEvent");
|
||||
this.modalVisible = true;
|
||||
},
|
||||
confirmEvent() {
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
|
||||
export default {
|
||||
// 格式化表单数据
|
||||
formatFormData: function ({ data, rules }) { // 格式化表单数据
|
||||
// 格式化表单数据(准备提交)
|
||||
formatFormData: function ({ data, rules , igFields }) { // 格式化表单数据
|
||||
|
||||
|
||||
let feachRules = (rules)=>{
|
||||
let feachRules = (rules) => {
|
||||
|
||||
rules.forEach(rule => { // 循环规则
|
||||
if(rule.children && rule.children.length){
|
||||
if (rule.children && rule.children.length) {
|
||||
feachRules(rule.children);
|
||||
}
|
||||
if (!rule.dataRule){
|
||||
if (!rule.dataRule) {
|
||||
return;
|
||||
}
|
||||
if (rule.field in data) { // 如果字段在数据中
|
||||
let value = data[rule.field]; // 获取值
|
||||
if (rule.dataRule.fromField) {
|
||||
value = value[rule.dataRule.fromField];
|
||||
}
|
||||
if (rule.dataRule.fromField) {
|
||||
value = value[rule.dataRule.fromField];
|
||||
}
|
||||
let saveField = rule.field;
|
||||
if(rule.dataRule.saveField){
|
||||
if (rule.dataRule.saveField) {
|
||||
saveField = rule.dataRule.saveField;
|
||||
}
|
||||
if (rule.dataRule.type == "integer") { // 如果是整数
|
||||
|
|
@ -32,29 +32,69 @@ export default {
|
|||
data[saveField] = parseInt(new Date(value).getTime() / 1000); // 转换为时间戳
|
||||
}
|
||||
else if (rule.dataRule.type == "string") { // 如果是字符串
|
||||
if(data[saveField] === true){
|
||||
if (data[saveField] === true) {
|
||||
data[saveField] = "true";
|
||||
}
|
||||
else if(data[saveField] === false){
|
||||
else if (data[saveField] === false) {
|
||||
data[saveField] = "false";
|
||||
}
|
||||
else if(data[saveField]){
|
||||
else if (data[saveField]) {
|
||||
data[saveField] = value + "";
|
||||
}
|
||||
}
|
||||
else {
|
||||
data[saveField] =value ;
|
||||
}
|
||||
}
|
||||
data[saveField] = value;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
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);
|
||||
|
||||
|
||||
},
|
||||
|
||||
// 验证表单数据
|
||||
validateForm : function ({ form }) { // 验证表单
|
||||
validateForm: function ({ form }) { // 验证表单
|
||||
|
||||
|
||||
return new Promise((resolve, reject) => { // 返回一个Promise
|
||||
|
|
|
|||
|
|
@ -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:'单位管理'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -64,6 +64,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 => {
|
||||
let name = FunName + item;
|
||||
|
|
|
|||
Loading…
Reference in New Issue