This commit is contained in:
parent
c53cb5bbd1
commit
a86f76f505
|
|
@ -44,8 +44,10 @@
|
|||
<vxe-grid ref='xGrid' v-bind="options.gridOptions" class="mytable-style" :row-class-name="rowClassName">
|
||||
<template #op="{ row }">
|
||||
<div class="oplinks">
|
||||
<a @click.stop="pageEdit(row)" title="编辑"><a-icon type="edit" /></a>
|
||||
<a @click.stop="pageDelete(row)" title="删除"><a-icon type="delete" /></a>
|
||||
<a v-if="enabledOp({ name: 'edit', row: row })" @click.stop="pageEdit(row)" title="编辑"><a-icon
|
||||
type="edit" /></a>
|
||||
<a v-if="enabledOp({ name: 'delete', row: row })" @click.stop="pageDelete(row)" title="删除"><a-icon
|
||||
type="delete" /></a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -177,6 +179,13 @@ export default {
|
|||
// 动作
|
||||
methods: {
|
||||
|
||||
enabledOp({ name, row }) {
|
||||
|
||||
if (name == 'delete' && row.__hide_delete) {
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
},
|
||||
pagePrint() {
|
||||
let tableData = JSON.parse(JSON.stringify(this.$refs.xGrid.getTableData().fullData));
|
||||
this.$emit("print", { tableData: tableData });
|
||||
|
|
|
|||
|
|
@ -94,6 +94,9 @@ VXETable.formats.mixin({
|
|||
formatYesNo({ cellValue }) { // 格式化是否
|
||||
return cellValue ? '是' : '否'
|
||||
},
|
||||
formatStart({ cellValue }) { // 格式化启用禁用
|
||||
return cellValue ? '启用' : '禁用'
|
||||
},
|
||||
formatRef({ cellValue, column }) { // 格式化参照
|
||||
|
||||
if (column && column.params
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
<template>
|
||||
<basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
<basic-page-list :desc="desc" :options="pageOptions" @loadData="loadData">
|
||||
<template v-slot:column1="{ row }">
|
||||
<a-button type="default">出库</a-button>
|
||||
{{ row.id }}
|
||||
<a-button>入库</a-button>
|
||||
</template>
|
||||
|
||||
</basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -37,24 +44,31 @@ export default {
|
|||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MesUnit',
|
||||
listFieldName: 'MesStock',
|
||||
|
||||
addPageUrl: "/MesUnit/MesUnitAdd",
|
||||
editPageUrl: "/MesUnit/MesUnitUpdate/",
|
||||
addPageUrl: "/MesWarehouse/MesWarehousePositionAdd",
|
||||
editPageUrl: "/MesWarehouse/MesWarehousePositionUpdate/",
|
||||
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
// =============================== 接口地址 自动生成 Start ===============================
|
||||
MesUnitList: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/list`, // 库存列表
|
||||
MesUnitDetail: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/detail`, // 库存详情
|
||||
MesUnitCreate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/create`, // 创建库存
|
||||
MesUnitUpdate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/update`, // 更新库存
|
||||
MesUnitDelete: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/detele`, // 删除库存
|
||||
MesUnitBatchDelete: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/batchDelete`, // 批量删除库存
|
||||
MesUnitBatchUpdate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/batchUpdate`, // 批量更新库存
|
||||
MesUnitBatchCreate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/batchCreate`, // 批量创建库存
|
||||
MesUnitExportExcel: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/export/excel`, // 导出库存数据到EXCEL
|
||||
MesUnitImportExcel: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/import/excel`, // 批量导入EXCEL库存数据
|
||||
MesStockList: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/list`, // 库存列表
|
||||
MesStockDetail: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/detail`, // 库存详情
|
||||
MesStockCreate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/create`, // 创建库存
|
||||
MesStockUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/update`, // 更新库存
|
||||
MesStockDelete: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/detele`, // 删除库存
|
||||
MesStockBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/batchDelete`, // 批量删除库存
|
||||
ProductStockOut: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/out`, // 商品出库
|
||||
ProductStockIn: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/in`, // 商品入库
|
||||
MesStockPositionList: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/list`, // 仓位库存列表
|
||||
MesStockPositionDetail: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/detail`, // 仓位库存详情
|
||||
MesStockPositionCreate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/create`, // 创建仓位库存
|
||||
MesStockPositionUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/update`, // 更新仓位库存
|
||||
MesStockPositionDelete: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/detele`, // 删除仓位库存
|
||||
MesStockPositionBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/batchDelete`, // 批量删除仓位库存
|
||||
MesStockPositionBatchUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/batchUpdate`, // 批量更新仓位库存
|
||||
MesStockPositionBatchCreate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/batchCreate`, // 批量创建仓位库存
|
||||
MesStockPositionBatchHandle: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/batchHandle`, // 批量处理仓位库存
|
||||
|
||||
// =============================== 接口地址 自动生成 End ===============================
|
||||
},
|
||||
|
|
@ -75,8 +89,7 @@ export default {
|
|||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入标题' } } },
|
||||
{ field: 'desc', title: '描述', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入描述' } } },
|
||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入库存编码' } } },
|
||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
|
|
@ -94,31 +107,47 @@ export default {
|
|||
id: 'datagrid_1', // 表格唯一标识
|
||||
|
||||
columns: [
|
||||
{ type: 'checkbox', width: '50' }, // 多选框
|
||||
{ type: 'checkbox', width: '40' }, // 多选框
|
||||
{ type: 'seq', width: '40' }, // 序号
|
||||
|
||||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
|
||||
{ field: 'code', sortable: true, title: '编码', width: 250 }, // 编码
|
||||
{ field: 'title', sortable: true, title: '库存名称', width: 250 }, // 库存名称
|
||||
{ field: 'name', sortable: true, title: '库存英文名称', width: 250 }, // 库存英文名称
|
||||
{ field: 'id' ,solts:{default:'column1'}, sortable: true, title: '出入库操作', width: 150 }, // 出入库操作
|
||||
{ field: 'code', sortable: true, title: '库存编码', width: 100 }, // 编码
|
||||
{ field: 'product_detail.mes_materials_sort.name', sortable: true, title: '分类', width: 100 }, // 产品详情
|
||||
{ field: 'product_detail.name', sortable: true, title: '产品名称', width: 250 }, // 产品详情
|
||||
{ field: 'product_detail.code', sortable: true, title: '产品编码', width: 140 }, // 产品详情
|
||||
{ field: 'product_detail.spec', sortable: true, title: '规格型号', width: 250 }, // 规格型号
|
||||
{ field: 'product_detail.size', sortable: true, title: '尺寸', width: 100 }, // 尺寸
|
||||
{ field: 'product_detail.color', sortable: true, title: '颜色', width: 100 }, // 颜色
|
||||
{ field: 'stock', sortable: true, title: '库存数量', width: 100 }, // 库存数量
|
||||
{ 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.actions.getList = pageData.actions.MesUnitList;
|
||||
pageData.actions.delete = pageData.actions.MesUnitBatchDelete;
|
||||
pageData.actions.getList = pageData.actions.MesStockList;
|
||||
pageData.actions.delete = pageData.actions.MesStockBatchDelete;
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
@ -1,13 +1,248 @@
|
|||
<template>
|
||||
<div>
|
||||
positionEdit
|
||||
</div>
|
||||
<basic-page-edit :desc="desc" :dataId="getDataId()" :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: {
|
||||
}
|
||||
</script>
|
||||
},
|
||||
|
||||
<style></style>
|
||||
data() {
|
||||
|
||||
return {
|
||||
pageOptions: {}
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
this.optionsInit();
|
||||
this.dataInit();
|
||||
|
||||
},
|
||||
// 函数
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
optionsInit() {
|
||||
// 页面数据变量
|
||||
var pageData = {
|
||||
// 当前项目名称
|
||||
currentConfigName: "",
|
||||
// 当前项目ID
|
||||
currentBeid: 0,
|
||||
|
||||
addPageUrl: "/MesWarehouse/MesWarehousePositionAdd",
|
||||
editPageUrl: "/MesWarehouse/MesWarehousePositionUpdate/",
|
||||
listPageUrl: "/MesWarehouse/MesWarehousePositionList",
|
||||
|
||||
|
||||
uploadDefaultImg: null,
|
||||
detailDataFieldName: "warehouse_location",
|
||||
|
||||
actions: {
|
||||
// =============================== 接口地址 自动生成 Start ===============================
|
||||
MesWarehouseList: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/list`, // 仓库列表
|
||||
MesWarehouseDetail: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/detail`, // 仓库详情
|
||||
MesWarehouseCreate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/create`, // 创建仓库
|
||||
MesWarehouseUpdate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/update`, // 更新仓库
|
||||
MesWarehouseDelete: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/detele`, // 删除仓库
|
||||
MesWarehouseBatchDelete: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/batchDelete`, // 批量删除仓库
|
||||
MesWarehouseBatchUpdate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/batchUpdate`, // 批量更新仓库
|
||||
MesWarehouseBatchCreate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/batchCreate`, // 批量创建仓库
|
||||
MesWarehouseExportExcel: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/export/excel`, // 导出仓库数据到EXCEL
|
||||
MesWarehouseImportExcel: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/import/excel`, // 批量导入EXCEL仓库数据
|
||||
WarehouseLocationList: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/list`, // 仓库库位列表
|
||||
WarehouseLocationDetail: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/detail`, // 仓库库位详情
|
||||
WarehouseLocationCreate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/create`, // 创建仓库库位
|
||||
WarehouseLocationUpdate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/update`, // 更新仓库库位
|
||||
WarehouseLocationDelete: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/detele`, // 删除仓库库位
|
||||
WarehouseLocationBatchDelete: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/batchDelete`, // 批量删除仓库库位
|
||||
WarehouseLocationBatchUpdate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/batchUpdate`, // 批量更新仓库库位
|
||||
WarehouseLocationBatchCreate: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/batchCreate`, // 批量创建仓库库位
|
||||
WarehouseLocationExportExcel: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/export/excel`, // 导出仓库库位数据到EXCEL
|
||||
WarehouseLocationImportExcel: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/import/excel`, // 批量导入EXCEL仓库库位数据
|
||||
|
||||
// =============================== 接口地址 自动生成 End ===============================
|
||||
},
|
||||
|
||||
keyName: 'id',
|
||||
// 是否编辑模式
|
||||
isEdit: false,
|
||||
// 表单数据
|
||||
formOptions: {
|
||||
data: {
|
||||
// =============================== 表单数据 自动生成 Start ===============================
|
||||
|
||||
id: 0,
|
||||
warehouse_id: 0,
|
||||
code: "",
|
||||
warehouse_location_code: "",
|
||||
warehouse_location_name: "",
|
||||
warehouse_location_keeper_uid: 0,
|
||||
warehouse_location_keeper_uname: "",
|
||||
create_uid: 0,
|
||||
update_uid: 0,
|
||||
warehouse_location_status: 0,
|
||||
create_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||
update_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||
is_default: 0,
|
||||
|
||||
// =============================== 表单数据 自动生成 End ===============================
|
||||
},
|
||||
// 标题宽度
|
||||
titleWidth: 150,
|
||||
// 标题对齐方式
|
||||
titleAlign: 'right',
|
||||
|
||||
// 表单校验规则
|
||||
rules: {
|
||||
// =============================== 表单校验 自动生成 Start ===============================
|
||||
|
||||
warehouse_id: [
|
||||
{ required: true, message: '请选择仓库' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '请输入编码' }
|
||||
],
|
||||
warehouse_location_code: [
|
||||
{ message: '输入库位编号' }
|
||||
],
|
||||
warehouse_location_name: [
|
||||
{ required: true, message: '请输入库位名称' }
|
||||
],
|
||||
warehouse_location_keeper_uid: [
|
||||
{ required: true, message: '请输入库管员UID' }
|
||||
],
|
||||
warehouse_location_keeper_uname: [
|
||||
{ required: true, message: '请输入库管员姓名' }
|
||||
],
|
||||
warehouse_location_status: [
|
||||
{ required: true, message: '请输入库位状态:0.禁用,1.启用' }
|
||||
],
|
||||
is_default: [
|
||||
{ required: true, message: '请输入是否默认库位:0.否,1.是' }
|
||||
],
|
||||
|
||||
// =============================== 表单校验 自动生成 End ===============================
|
||||
},
|
||||
// 表单项
|
||||
items: [
|
||||
// =============================== 表单项 自动生成 Start ===============================
|
||||
|
||||
{ field: 'warehouse_id', title: '选择仓库', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'code', title: '编码', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'warehouse_location_code', title: '库位编码', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'warehouse_location_name', title: '库位名称', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'warehouse_location_keeper_uid', title: '选择管理员', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'warehouse_location_status', title: '库位状态', span: 12, itemRender: { name: '$switch' } },
|
||||
{ field: 'is_default', title: '是否默认库位', span: 12, itemRender: { name: '$switch' } },
|
||||
|
||||
// =============================== 表单项 自动生成 End ===============================
|
||||
]
|
||||
},
|
||||
// 新增模式表单项
|
||||
addModeItems: [
|
||||
|
||||
],
|
||||
|
||||
|
||||
};
|
||||
pageData.actions.get = pageData.actions.MesWarehouseDetail;
|
||||
pageData.actions.create = pageData.actions.MesWarehouseCreate;
|
||||
pageData.actions.update = pageData.actions.MesWarehouseUpdate;
|
||||
|
||||
// 合并表单数据及配置
|
||||
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 detailDataFieldName = this.pageOptions.detailDataFieldName;
|
||||
if(a.data[detailDataFieldName].warehouse_effective_date){
|
||||
a.data[detailDataFieldName].warehouse_effective_date = new Date(a.data[detailDataFieldName].warehouse_effective_date * 1000);
|
||||
}
|
||||
if(a.data[detailDataFieldName].warehouse_invalid_date){
|
||||
a.data[detailDataFieldName].warehouse_invalid_date = new Date(a.data[detailDataFieldName].warehouse_invalid_date * 1000);
|
||||
}
|
||||
if (a.data[detailDataFieldName].create_time) {
|
||||
a.data[detailDataFieldName].create_time = new Date(a.data[detailDataFieldName].create_time * 1000);
|
||||
}
|
||||
if (a.data[detailDataFieldName].update_time) {
|
||||
a.data[detailDataFieldName].update_time = new Date(a.data[detailDataFieldName].update_time * 1000);
|
||||
}
|
||||
this.pageOptions.formOptions.data = a.data[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>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,27 @@
|
|||
<template>
|
||||
<basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
|
||||
<basic-page-list :desc="desc" :options="pageOptions" @loadData="loadData">
|
||||
|
||||
<!-- 如果为1-->
|
||||
<template v-slot:column1="{ row }">
|
||||
<a-tag v-if="row.is_default === 1" color="orange">
|
||||
默认
|
||||
</a-tag>
|
||||
</template>
|
||||
|
||||
<template v-slot:column2="{ row }">
|
||||
<a-tag v-if="row.warehouse_location_status === 0" color="red">
|
||||
禁用
|
||||
</a-tag>
|
||||
<a-tag v-if="row.warehouse_location_status === 1" color="green">
|
||||
启用
|
||||
</a-tag>
|
||||
</template>
|
||||
</basic-page-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BASE_URL from '@/services/mes/api.js';
|
||||
|
||||
const settings = require('../../basic/settings.js');
|
||||
|
||||
export default {
|
||||
i18n: require("./i18n"),
|
||||
|
|
@ -38,10 +54,10 @@ export default {
|
|||
var pageData = { // 页面数据变量
|
||||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MesWarehouse',
|
||||
listFieldName: 'WarehouseLocation',
|
||||
|
||||
addPageUrl: "/MesWarehouse/MesWarehouseAdd",
|
||||
editPageUrl: "/MesWarehouse/MesWarehouseUpdate/",
|
||||
addPageUrl: "/MesWarehouse/MesWarehousePositionAdd",
|
||||
editPageUrl: "/MesWarehouse/MesWarehousePositionUpdate/",
|
||||
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
|
|
@ -86,8 +102,7 @@ export default {
|
|||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入标题' } } },
|
||||
{ field: 'desc', title: '描述', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入描述' } } },
|
||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入仓位名称' } } },
|
||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
|
|
@ -112,26 +127,13 @@ export default {
|
|||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
{ field: 'code', sortable: true, title: '编码', width: 250 }, // 编码
|
||||
{ field: 'warehouse_title', sortable: true, title: '仓库名称', width: 250 }, // 仓库名称
|
||||
{ field: 'warehouse_name', sortable: true, title: '仓库英文名称', width: 250 }, // 仓库英文名称
|
||||
{ field: 'warehouse_code', sortable: true, title: '仓库编码', width: 250 }, // 仓库编码
|
||||
{ field: 'warehouse_type', params: settings.options_warehouse_type, formatter: 'formatEnum', sortable: true, title: '仓库类型', width: 250 }, // 仓库类型:1.普通仓库,2.现场仓库,3.委外仓库
|
||||
{ field: 'warehouse_address', sortable: true, title: '仓库地址', width: 250 }, // 仓库地址
|
||||
//{ field: 'warehouse_uid', sortable: true, title: '仓库负责人UID', width: 250 }, // 仓库负责人UID
|
||||
{ field: 'warehouse_uname', sortable: true, title: '仓库负责人姓名', width: 250 }, // 仓库负责人姓名
|
||||
{ field: 'warehouse_mobile', sortable: true, title: '仓库负责人手机号', width: 250 }, // 仓库负责人手机号
|
||||
{ field: 'warehouse_phone', sortable: true, title: '仓库电话', width: 250 }, // 仓库电话
|
||||
{ field: 'warehouse_remark', sortable: true, title: '仓库备注', width: 250 }, // 仓库备注
|
||||
{ field: 'warehouse_negative_stock', params: settings.options_warehouse_negative_stock, formatter: 'formatEnum', sortable: true, title: '仓库是否允许负库存', width: 250 }, // 仓库是否允许负库存:0.不允许,1.允许
|
||||
{ field: 'warehouse_location', params: settings.options_is_open, formatter: 'formatEnum', sortable: true, title: '是否启用库位管理', width: 250 }, // 是否启用库位管理:0.不启用,1.启用
|
||||
{ field: 'warehouse_batch', params: settings.options_is_open, formatter: 'formatEnum', sortable: true, title: '是否启用批次管理', width: 250 }, // 是否启用批次管理:0.不启用,1.启用
|
||||
{ field: 'warehouse_serial', params: settings.options_is_open, formatter: 'formatEnum', sortable: true, title: '是否启用序列号', width: 250 }, // 是否启用序列号:0.不启用,1.启用
|
||||
{ field: 'warehouse_storage_type', params: settings.options_warehouse_storage_type, formatter: 'formatEnum', sortable: true, title: '存储类型', width: 250 }, // 存储类型:1.可用,2.待检,3.在检,4.不合格,5.报废,6.待返工
|
||||
{ field: 'warehouse_effective_date', formatter: 'formatDate', sortable: true, title: '仓库生效日期', width: 250 }, // 仓库生效日期
|
||||
{ field: 'warehouse_invalid_date', formatter: 'formatDate', sortable: true, title: '仓库失效日期', width: 250 }, // 仓库失效日期
|
||||
{ field: 'warehouse_status', params: settings.options_is_enabled, formatter: 'formatEnum', sortable: true, title: '仓库状态', width: 250 }, // 仓库状态:0.禁用,1.启用
|
||||
|
||||
{ field: 'warehouse_detail.warehouse_title', sortable: true, title: '仓库名称', width: 150 }, // 仓库名称
|
||||
{ field: 'warehouse_detail.code', sortable: true, title: '仓库编码', width: 'auto' }, // 仓库编号
|
||||
{ field: 'code', sortable: true, title: '库位编码', width: 'auto' }, // 编码
|
||||
{ field: 'warehouse_location_name', sortable: true, title: '库位名称', width: 'auto' }, // 库位名称
|
||||
{ field: 'warehouse_location_keeper_uname', sortable: true, title: '库管员姓名', width: 150 }, // 库管员姓名
|
||||
{ field: 'is_default', sortable: true, title: '默认库位', slots: { default: 'column1' }, width: 100 }, // 是否默认库位:0.否,1.是
|
||||
{ field: 'warehouse_location_status', sortable: true, title: '库位状态', slots: { default: 'column2' }, width: 100 }, // 库位状态:0.禁用,1.启用
|
||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||
|
||||
|
|
@ -143,19 +145,26 @@ export default {
|
|||
|
||||
};
|
||||
|
||||
pageData.actions.getList = pageData.actions.MesWarehouseList;
|
||||
pageData.actions.delete = pageData.actions.MesWarehouseBatchDelete;
|
||||
pageData.actions.getList = pageData.actions.WarehouseLocationList;
|
||||
pageData.actions.delete = pageData.actions.WarehouseLocationBatchDelete;
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
|
||||
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
loadData(e) {
|
||||
console.log(e.WarehouseLocation);
|
||||
e.WarehouseLocation.forEach(item => {
|
||||
console.log(item.is_default);
|
||||
if (item.is_default === 1) {
|
||||
item.__hide_delete = true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue