仓库及库存
This commit is contained in:
parent
2c06689b3d
commit
fa32863376
|
|
@ -52,9 +52,9 @@ export default {
|
||||||
// 当前项目ID
|
// 当前项目ID
|
||||||
currentBeid: 0,
|
currentBeid: 0,
|
||||||
|
|
||||||
addPageUrl: "/MesUnit/MesUnitAdd",
|
addPageUrl: "/MesStock/MesStockAdd",
|
||||||
editPageUrl: "/MesUnit/MesUnitUpdate/",
|
editPageUrl: "/MesStock/MesStockUpdate/",
|
||||||
listPageUrl: "/MesUnit/MesUnitList",
|
listPageUrl: "/MesStock/MesStockList",
|
||||||
|
|
||||||
|
|
||||||
uploadDefaultImg: null,
|
uploadDefaultImg: null,
|
||||||
|
|
@ -63,16 +63,23 @@ export default {
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
// =============================== 接口地址 自动生成 Start ===============================
|
// =============================== 接口地址 自动生成 Start ===============================
|
||||||
MesUnitList: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/list`, // 库存列表
|
MesStockList: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/list`, // 库存列表
|
||||||
MesUnitDetail: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/detail`, // 库存详情
|
MesStockDetail: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/detail`, // 库存详情
|
||||||
MesUnitCreate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/create`, // 创建库存
|
MesStockCreate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/create`, // 创建库存
|
||||||
MesUnitUpdate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/update`, // 更新库存
|
MesStockUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/update`, // 更新库存
|
||||||
MesUnitDelete: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/detele`, // 删除库存
|
MesStockDelete: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/detele`, // 删除库存
|
||||||
MesUnitBatchDelete: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/batchDelete`, // 批量删除库存
|
MesStockBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/batchDelete`, // 批量删除库存
|
||||||
MesUnitBatchUpdate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/batchUpdate`, // 批量更新库存
|
ProductStockOut: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/out`, // 商品出库
|
||||||
MesUnitBatchCreate: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/batchCreate`, // 批量创建库存
|
ProductStockIn: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/in`, // 商品入库
|
||||||
MesUnitExportExcel: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/export/excel`, // 导出库存数据到EXCEL
|
MesStockPositionList: `${BASE_URL.BASE_URL}/MesStock/v1/mes/stock/position/list`, // 仓位库存列表
|
||||||
MesUnitImportExcel: `${BASE_URL.BASE_URL}/MesUnit/v1/mes/unit/import/excel`, // 批量导入EXCEL库存数据
|
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 ===============================
|
// =============================== 接口地址 自动生成 End ===============================
|
||||||
},
|
},
|
||||||
|
|
@ -87,13 +94,13 @@ export default {
|
||||||
|
|
||||||
id: 0,
|
id: 0,
|
||||||
code: "",
|
code: "",
|
||||||
title: "",
|
product_id: 0,
|
||||||
name: "",
|
product_detail: [],
|
||||||
|
stock: 0,
|
||||||
create_uid: 0,
|
create_uid: 0,
|
||||||
update_uid: 0,
|
update_uid: 0,
|
||||||
create_time: new Date(2100, 1, 1).getTime() / 10000,
|
create_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||||
update_time: new Date(2100, 1, 1).getTime() / 10000,
|
update_time: new Date(2100, 1, 1).getTime() / 10000,
|
||||||
|
|
||||||
// =============================== 表单数据 自动生成 End ===============================
|
// =============================== 表单数据 自动生成 End ===============================
|
||||||
},
|
},
|
||||||
// 标题宽度
|
// 标题宽度
|
||||||
|
|
@ -108,11 +115,11 @@ export default {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入编码' }
|
{ required: true, message: '请输入编码' }
|
||||||
],
|
],
|
||||||
title: [
|
product_id: [
|
||||||
{ required: true, message: '请输入库存名称' }
|
{ required: true, message: '请选择产品' }
|
||||||
],
|
],
|
||||||
name: [
|
stock: [
|
||||||
{ required: true, message: '请输入库存英文名称' }
|
{ required: true, message: '请输入库存数量' }
|
||||||
],
|
],
|
||||||
|
|
||||||
// =============================== 表单校验 自动生成 End ===============================
|
// =============================== 表单校验 自动生成 End ===============================
|
||||||
|
|
@ -121,9 +128,9 @@ export default {
|
||||||
items: [
|
items: [
|
||||||
// =============================== 表单项 自动生成 Start ===============================
|
// =============================== 表单项 自动生成 Start ===============================
|
||||||
|
|
||||||
{ field: 'code', title: '编码', span: 24, itemRender: { name: '$input' } },
|
{ field: 'product_id', title: '料品', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'title', title: '库存名称', span: 24, itemRender: { name: '$input' } },
|
{ field: 'code', title: '库存编码', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'name', title: '库存英文名称', span: 24, itemRender: { name: '$input' } },
|
{ field: 'stock', title: '库存数量', span: 12, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
// =============================== 表单项 自动生成 End ===============================
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
]
|
]
|
||||||
|
|
@ -136,9 +143,9 @@ export default {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pageData.actions.get = pageData.actions.MesUnitDetail;
|
pageData.actions.get = pageData.actions.MesStockDetail;
|
||||||
pageData.actions.create = pageData.actions.MesUnitCreate;
|
pageData.actions.create = pageData.actions.MesStockCreate;
|
||||||
pageData.actions.update = pageData.actions.MesUnitUpdate;
|
pageData.actions.update = pageData.actions.MesStockUpdate;
|
||||||
// 合并表单数据及配置
|
// 合并表单数据及配置
|
||||||
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
pageData.formOptions = Object.assign({}, this.$mk.config.defaults.formOptions, pageData.formOptions);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,204 @@
|
||||||
|
<template>
|
||||||
|
<basic-page-list :desc="desc" :options="pageOptions">
|
||||||
|
|
||||||
|
<template v-slot:column1="{ row }">
|
||||||
|
<a-button class="in" type="default" @click="stockIn(row.id)">查看详情</a-button>
|
||||||
|
</template>
|
||||||
|
</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: 'ProductStockLog',
|
||||||
|
|
||||||
|
addPageUrl: "/MesWarehouse/MesWarehousePositionAdd",
|
||||||
|
editPageUrl: "/MesWarehouse/MesWarehousePositionUpdate/",
|
||||||
|
|
||||||
|
// 接口动作
|
||||||
|
actions: { // Api 接口地址
|
||||||
|
// =============================== 接口地址 自动生成 Start ===============================
|
||||||
|
LogList: `${BASE_URL.BASE_URL}/MesStock/v1/log/list`, // 日志列表
|
||||||
|
LogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/log/detail`, // 日志详情
|
||||||
|
ProductStockLogList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/list`, // 商品出入库记录列表
|
||||||
|
ProductStockLogOutList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/out/list`, // 商品入库记录
|
||||||
|
ProductStockLogInList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/in/list`, // 商品入库记录
|
||||||
|
ProductStockLogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detail`, // 商品出入库记录详情
|
||||||
|
ProductStockLogCreate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/create`, // 创建商品出入库记录
|
||||||
|
ProductStockLogUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/update`, // 更新商品出入库记录
|
||||||
|
ProductStockLogDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detele`, // 删除商品出入库记录
|
||||||
|
ProductStockLogBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/batchDelete`, // 批量删除商品出入库记录
|
||||||
|
|
||||||
|
// =============================== 接口地址 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
|
||||||
|
start_time: 0, // 开始时间
|
||||||
|
end_time: 0, // 结束时间
|
||||||
|
|
||||||
|
|
||||||
|
//搜索区
|
||||||
|
searchFormData: {
|
||||||
|
title: '',
|
||||||
|
desc: '',
|
||||||
|
},
|
||||||
|
// 搜索区配置
|
||||||
|
searchRules: [
|
||||||
|
{ key: "title", mode: "like" },
|
||||||
|
{ key: "desc", mode: "like" }
|
||||||
|
],
|
||||||
|
//搜索区
|
||||||
|
searchFormItems: [ // 子项
|
||||||
|
{ field: 'title', 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: '40' }, // 多选框
|
||||||
|
{ type: 'seq', width: '40' }, // 序号
|
||||||
|
|
||||||
|
// "id,optional" validate:"" message:"" label:""` // 主键
|
||||||
|
// "stock_pos_id,optional" validate:"" message:"" label:""` // 库位ID
|
||||||
|
// "product_id,optional" validate:"" message:"" label:""` // 产品ID
|
||||||
|
|
||||||
|
// "stock,optional" validate:"" message:"" label:""` // 入库数量
|
||||||
|
// "out_time,optional" validate:"" message:"" label:""` // 入库时间
|
||||||
|
// "out_user_id,optional" validate:"" message:"" label:""` // 入库人员ID
|
||||||
|
// "out_user_name,optional" validate:"" message:"" label:""` // 入库人员姓名
|
||||||
|
// "bill_date,optional" validate:"" message:"" label:""` // 单据日期
|
||||||
|
// "in_type,optional" validate:"" message:"" label:""` // 入库类型
|
||||||
|
// "business_type,optional" validate:"" message:"" label:""` // 业务类型
|
||||||
|
// "business_no,optional" validate:"" message:"" label:""` // 业务单号
|
||||||
|
// "out_type,optional" validate:"" message:"" label:""` // 入库类型
|
||||||
|
// "department_id,optional" validate:"" message:"" label:""` // 部门ID
|
||||||
|
// "salesman_uid,optional" validate:"" message:"" label:""` // 业务员ID
|
||||||
|
// "handler_uid,optional" validate:"" message:"" label:""` // 经手人ID
|
||||||
|
// "handler_name,optional" validate:"" message:"" label:""` // 经手人姓名
|
||||||
|
// "warehouse_keeper_uid,optional" validate:"" message:"" label:""` // 仓管员ID
|
||||||
|
// "warehouse_keeper_name,optional" validate:"" message:"" label:""` // 仓管员姓名
|
||||||
|
// "check_user_uid,optional" validate:"" message:"" label:""` // 验货人id
|
||||||
|
// "check_user_name,optional" validate:"" message:"" label:""` // 验货人姓名
|
||||||
|
// "check_time,optional" validate:"" message:"" label:""` // 验货时间
|
||||||
|
// "delivery_no,optional" validate:"" message:"" label:""` // 发货单号
|
||||||
|
// "contact,optional" validate:"" message:"" label:""` // 联系人
|
||||||
|
// "phone,optional" validate:"" message:"" label:""` // 联系电话
|
||||||
|
// "remark,optional" validate:"" message:"" label:""` // 备注
|
||||||
|
// "salesman_name,optional" validate:"" message:"" label:""` // 业务员姓名
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||||
|
{ field: 'id' , slots: { default: 'column1' }, sortable: true, title: '查看详情', width: 100 }, // 查看详情
|
||||||
|
{ field: 'product_detail.name', sortable: true, title: '料品名称', width: 250 }, // 料品名称
|
||||||
|
{ field: 'in_type', sortable: true, title: '入库类型', width: 100 }, // 入库类型
|
||||||
|
{ field: 'in_stock', sortable: true, title: '入库数量', width: 100 }, // 入库数量
|
||||||
|
{ field: 'stock', sortable: true, title: '剩余库存', width: 100 }, // 入库数量
|
||||||
|
{ field: 'warehouse_idetail.name', sortable: true, title: '仓库', width: 150 }, // 仓库名称
|
||||||
|
{ field: 'warehouse_pos_idetail.name', sortable: true, title: '库位', width: 150 }, // 库位信息
|
||||||
|
{ field: 'in_user_name', sortable: true, title: '入库人', width: 100 }, // 入库人
|
||||||
|
{ field: 'bill_date',formatter: 'formatDate', sortable: true, title: '单据日期', width: 100 }, // 单据日期
|
||||||
|
{ field: 'business_type', sortable: true, title: '业务类型', width: 100 }, // 业务类型
|
||||||
|
{ field: 'business_no', sortable: true, title: '业务单号', width: 100 }, // 业务单号
|
||||||
|
{ field: 'out_type', sortable: true, title: '入库类型', width: 100 }, // 入库类型
|
||||||
|
{ field: 'handler_name', sortable: true, title: '经手人', width: 100 }, // 经手人
|
||||||
|
{ field: 'check_user_name', sortable: true, title: '验货人', width: 100 }, // 验货人
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ field: 'in_time', formatter: 'formatDate', width: 100, sortable: true, title: '入库时间', showHeaderOverflow: true }, // 入库时间
|
||||||
|
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||||
|
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||||
|
// { field: 'stock_id', sortable: true, title: '库存id', width: 250 }, // 库存id
|
||||||
|
|
||||||
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
pageData.actions.getList = pageData.actions.ProductStockLogInList;
|
||||||
|
pageData.actions.delete = pageData.actions.MesStockPositionBatchDelete;
|
||||||
|
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
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 入库
|
||||||
|
stockOut(id) {
|
||||||
|
console.log("stockOut:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 入库
|
||||||
|
stockIn(id) {
|
||||||
|
console.log("stockIn:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.out {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<basic-page-list :desc="desc" :options="pageOptions" @loadData="loadData">
|
<basic-page-list :desc="desc" :options="pageOptions">
|
||||||
<template v-slot:column1="{ row }">
|
<template v-slot:column1="{ row }">
|
||||||
<a-button type="default">出库</a-button>
|
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
|
||||||
{{ row.id }}
|
<a-button class="out" @click="stockOut(row.id)">出库</a-button>
|
||||||
<a-button>入库</a-button>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</basic-page-list>
|
</basic-page-list>
|
||||||
|
|
@ -114,19 +113,19 @@ export default {
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||||
|
|
||||||
{ field: 'id' ,solts:{default:'column1'}, sortable: true, title: '出入库操作', width: 150 }, // 出入库操作
|
|
||||||
{ field: 'code', sortable: true, title: '库存编码', width: 100 }, // 编码
|
{ field: 'code', sortable: true, title: '库存编码', width: 100 }, // 编码
|
||||||
{ field: 'product_detail.mes_materials_sort.name', 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.name', sortable: true, title: '料品名称', width: 250 }, // 产品详情
|
||||||
{ field: 'product_detail.code', sortable: true, title: '产品编码', width: 140 }, // 产品详情
|
{ field: 'product_detail.code', sortable: true, title: '料品编码', width: 120 }, // 产品详情
|
||||||
{ field: 'product_detail.spec', sortable: true, title: '规格型号', width: 250 }, // 规格型号
|
{ field: 'product_detail.spec', sortable: true, title: '规格型号', width: 150 }, // 规格型号
|
||||||
{ field: 'product_detail.size', sortable: true, title: '尺寸', width: 100 }, // 尺寸
|
{ field: 'product_detail.size', sortable: true, title: '尺寸', width: 100 }, // 尺寸
|
||||||
{ field: 'product_detail.color', sortable: true, title: '颜色', width: 100 }, // 颜色
|
{ field: 'product_detail.color', sortable: true, title: '颜色', width: 100 }, // 颜色
|
||||||
{ field: 'stock', 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: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||||
|
|
||||||
|
{ field: 'id' ,slots:{default:'column1'}, sortable: true, title: '出入库操作', width: 160,fixed:"right" }, // 出入库操作
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -142,7 +141,15 @@ export default {
|
||||||
this.pageOptions = pageData;
|
this.pageOptions = pageData;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 出库
|
||||||
|
stockOut(id) {
|
||||||
|
console.log("stockOut:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 入库
|
||||||
|
stockIn(id) {
|
||||||
|
console.log("stockIn:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -150,4 +157,9 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.out {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -0,0 +1,245 @@
|
||||||
|
<!-- 出入库记录 -->
|
||||||
|
<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 {
|
||||||
|
|
||||||
|
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: {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
optionsInit() {
|
||||||
|
// 页面数据变量
|
||||||
|
var pageData = {
|
||||||
|
// 当前项目名称
|
||||||
|
currentConfigName: "",
|
||||||
|
// 当前项目ID
|
||||||
|
currentBeid: 0,
|
||||||
|
|
||||||
|
addPageUrl: "/MesStock/MesStockAdd",
|
||||||
|
editPageUrl: "/MesStock/MesStockUpdate/",
|
||||||
|
listPageUrl: "/MesStock/MesStockList",
|
||||||
|
|
||||||
|
|
||||||
|
uploadDefaultImg: null,
|
||||||
|
|
||||||
|
detailDataFieldName: "mes_unit",
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
// =============================== 接口地址 自动生成 Start ===============================
|
||||||
|
LogList: `${BASE_URL.BASE_URL}/MesStock/v1/log/list`, // 日志列表
|
||||||
|
LogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/log/detail`, // 日志详情
|
||||||
|
ProductStockLogList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/list`, // 商品出入库记录列表
|
||||||
|
ProductStockLogOutList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/out/list`, // 商品出库记录
|
||||||
|
ProductStockLogInList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/in/list`, // 商品入库记录
|
||||||
|
ProductStockLogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detail`, // 商品出入库记录详情
|
||||||
|
ProductStockLogCreate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/create`, // 创建商品出入库记录
|
||||||
|
ProductStockLogUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/update`, // 更新商品出入库记录
|
||||||
|
ProductStockLogDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detele`, // 删除商品出入库记录
|
||||||
|
ProductStockLogBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/batchDelete`, // 批量删除商品出入库记录
|
||||||
|
ProductStockOut: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/out`, // 商品出库
|
||||||
|
ProductStockIn: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/in`, // 商品入库
|
||||||
|
|
||||||
|
// =============================== 接口地址 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
|
||||||
|
keyName: 'id',
|
||||||
|
// 是否编辑模式
|
||||||
|
isEdit: false,
|
||||||
|
// 表单数据
|
||||||
|
formOptions: {
|
||||||
|
data: {
|
||||||
|
// =============================== 表单数据 自动生成 Start ===============================
|
||||||
|
|
||||||
|
id: 0,
|
||||||
|
code: "",
|
||||||
|
title: "",
|
||||||
|
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,
|
||||||
|
|
||||||
|
// =============================== 表单数据 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
// 标题宽度
|
||||||
|
titleWidth: 180,
|
||||||
|
// 标题对齐方式
|
||||||
|
titleAlign: 'right',
|
||||||
|
|
||||||
|
// 表单校验规则
|
||||||
|
rules: {
|
||||||
|
// =============================== 表单校验 自动生成 Start ===============================
|
||||||
|
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入编码' }
|
||||||
|
],
|
||||||
|
title: [
|
||||||
|
{ required: true, message: '请输入库存名称' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入库存英文名称' }
|
||||||
|
],
|
||||||
|
|
||||||
|
// =============================== 表单校验 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
// 表单项
|
||||||
|
items: [
|
||||||
|
// =============================== 表单项 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
||||||
|
{ field: 'stock_pos_id', title: '库位ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'product_id', title: '产品ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'stock', title: '剩余库存数量', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'in_type', title: '入库类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'in_time', title: '入库时间', span: 12, itemRender: { name: '$input' } ,props: { type: "date" }},
|
||||||
|
{ field: 'in_user_id', title: '入库人员id', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'in_user_name', title: '入库人员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'in_stock', title: '入库数量', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'out_stock', title: '出库数量', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'out_time', title: '出库时间', span: 12, itemRender: { name: '$input' } ,props: { type: "date" }},
|
||||||
|
{ field: 'out_user_id', title: '出库人员id', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'out_user_name', title: '出库人员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'out_type', title: '出库类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'bill_date', title: '单据日期', span: 12, itemRender: { name: '$input' ,props: { type: "date" }} },
|
||||||
|
{ field: 'business_type', title: '业务类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'business_no', title: '业务单号', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'out_type', title: '出库类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'department_id', title: '部门ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'salesman_uid', title: '业务员ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'salesman_name', title: '业务员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'handler_uid', title: '经手人ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'handler_name', title: '经手人姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'warehouse_keeper_uid', title: '仓管员ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'warehouse_keeper_name', title: '仓管员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'check_user_uid', title: '验货人id', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'check_user_name', title: '验货人姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'check_time', title: '验货时间', span: 12, itemRender: { name: '$input' } ,props: { type: "date" }},
|
||||||
|
{ field: 'delivery_no', title: '发货单号', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'contact', title: '联系人', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'phone', title: '联系电话', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'remark', title: '备注', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'stock', title: '剩余库存数量', span: 12, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
|
|
||||||
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 新增模式表单项
|
||||||
|
addModeItems: [
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
pageData.actions.get = pageData.actions.MesStockDetail;
|
||||||
|
pageData.actions.create = pageData.actions.MesStockCreate;
|
||||||
|
pageData.actions.update = pageData.actions.MesStockUpdate;
|
||||||
|
// 合并表单数据及配置
|
||||||
|
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].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>
|
||||||
|
|
@ -0,0 +1,263 @@
|
||||||
|
<!-- 出入库记录 -->
|
||||||
|
<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 {
|
||||||
|
|
||||||
|
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: {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
optionsInit() {
|
||||||
|
// 页面数据变量
|
||||||
|
var pageData = {
|
||||||
|
// 当前项目名称
|
||||||
|
currentConfigName: "",
|
||||||
|
// 当前项目ID
|
||||||
|
currentBeid: 0,
|
||||||
|
|
||||||
|
addPageUrl: "/MesStock/MesStockAdd",
|
||||||
|
editPageUrl: "/MesStock/MesStockUpdate/",
|
||||||
|
listPageUrl: "/MesStock/MesStockList",
|
||||||
|
|
||||||
|
|
||||||
|
uploadDefaultImg: null,
|
||||||
|
|
||||||
|
detailDataFieldName: "mes_unit",
|
||||||
|
|
||||||
|
actions: {
|
||||||
|
// =============================== 接口地址 自动生成 Start ===============================
|
||||||
|
LogList: `${BASE_URL.BASE_URL}/MesStock/v1/log/list`, // 日志列表
|
||||||
|
LogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/log/detail`, // 日志详情
|
||||||
|
ProductStockLogList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/list`, // 商品出入库记录列表
|
||||||
|
ProductStockLogOutList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/out/list`, // 商品出库记录
|
||||||
|
ProductStockLogInList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/in/list`, // 商品入库记录
|
||||||
|
ProductStockLogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detail`, // 商品出入库记录详情
|
||||||
|
ProductStockLogCreate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/create`, // 创建商品出入库记录
|
||||||
|
ProductStockLogUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/update`, // 更新商品出入库记录
|
||||||
|
ProductStockLogDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detele`, // 删除商品出入库记录
|
||||||
|
ProductStockLogBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/batchDelete`, // 批量删除商品出入库记录
|
||||||
|
ProductStockOut: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/out`, // 商品出库
|
||||||
|
ProductStockIn: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/in`, // 商品入库
|
||||||
|
|
||||||
|
// =============================== 接口地址 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
|
||||||
|
keyName: 'id',
|
||||||
|
// 是否编辑模式
|
||||||
|
isEdit: false,
|
||||||
|
// 表单数据
|
||||||
|
formOptions: {
|
||||||
|
data: {
|
||||||
|
// =============================== 表单数据 自动生成 Start ===============================
|
||||||
|
|
||||||
|
id: 0,
|
||||||
|
code: "",
|
||||||
|
title: "",
|
||||||
|
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,
|
||||||
|
|
||||||
|
// =============================== 表单数据 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
// 标题宽度
|
||||||
|
titleWidth: 180,
|
||||||
|
// 标题对齐方式
|
||||||
|
titleAlign: 'right',
|
||||||
|
|
||||||
|
// 表单校验规则
|
||||||
|
rules: {
|
||||||
|
// =============================== 表单校验 自动生成 Start ===============================
|
||||||
|
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入编码' }
|
||||||
|
],
|
||||||
|
title: [
|
||||||
|
{ required: true, message: '请输入库存名称' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入库存英文名称' }
|
||||||
|
],
|
||||||
|
|
||||||
|
// =============================== 表单校验 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
// 表单项
|
||||||
|
items: [
|
||||||
|
// =============================== 表单项 自动生成 Start ===============================
|
||||||
|
// 库位ID
|
||||||
|
// 产品ID
|
||||||
|
// 入库数量
|
||||||
|
// 入库时间
|
||||||
|
// 入库人员id
|
||||||
|
// 入库人员姓名
|
||||||
|
// 单据日期
|
||||||
|
// 入库类型
|
||||||
|
// 业务类型
|
||||||
|
// 业务单号
|
||||||
|
// 出库类型
|
||||||
|
// 部门ID
|
||||||
|
// 业务员ID
|
||||||
|
// 经手人ID
|
||||||
|
// 经手人姓名
|
||||||
|
// 仓管员ID
|
||||||
|
// 仓管员姓名
|
||||||
|
// 验货人id
|
||||||
|
// 验货人姓名
|
||||||
|
// 验货时间
|
||||||
|
// 发货单号
|
||||||
|
// 联系人
|
||||||
|
// 联系电话
|
||||||
|
// 备注
|
||||||
|
// 业务员姓名
|
||||||
|
|
||||||
|
{ field: 'stock_pos_id', title: '库位ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'product_id', title: '产品ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'stock', title: '入库数量', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'in_time', title: '入库时间', span: 12, itemRender: { name: '$input' } ,props: { type: "date" }},
|
||||||
|
{ field: 'in_user_id', title: '入库人员id', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'in_user_name', title: '入库人员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'bill_date', title: '单据日期', span: 12, itemRender: { name: '$input' ,props: { type: "date" }} },
|
||||||
|
{ field: 'in_type', title: '入库类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'business_type', title: '业务类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'business_no', title: '业务单号', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'out_type', title: '出库类型', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'department_id', title: '部门ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'salesman_uid', title: '业务员ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'salesman_name', title: '业务员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'handler_uid', title: '经手人ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'handler_name', title: '经手人姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'warehouse_keeper_uid', title: '仓管员ID', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'warehouse_keeper_name', title: '仓管员姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'check_user_uid', title: '验货人id', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'check_user_name', title: '验货人姓名', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'check_time', title: '验货时间', span: 12, itemRender: { name: '$input' } ,props: { type: "date" }},
|
||||||
|
{ field: 'delivery_no', title: '发货单号', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'contact', title: '联系人', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'phone', title: '联系电话', span: 12, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'remark', title: '备注', span: 12, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 新增模式表单项
|
||||||
|
addModeItems: [
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
pageData.actions.get = pageData.actions.MesStockDetail;
|
||||||
|
pageData.actions.create = pageData.actions.MesStockCreate;
|
||||||
|
pageData.actions.update = pageData.actions.MesStockUpdate;
|
||||||
|
// 合并表单数据及配置
|
||||||
|
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].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>
|
||||||
|
|
@ -0,0 +1,204 @@
|
||||||
|
<template>
|
||||||
|
<basic-page-list :desc="desc" :options="pageOptions">
|
||||||
|
|
||||||
|
<template v-slot:column1="{ row }">
|
||||||
|
<a-button class="in" type="default" @click="stockIn(row.id)">查看详情</a-button>
|
||||||
|
</template>
|
||||||
|
</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: 'ProductStockLog',
|
||||||
|
|
||||||
|
addPageUrl: "/MesWarehouse/MesWarehousePositionAdd",
|
||||||
|
editPageUrl: "/MesWarehouse/MesWarehousePositionUpdate/",
|
||||||
|
|
||||||
|
// 接口动作
|
||||||
|
actions: { // Api 接口地址
|
||||||
|
// =============================== 接口地址 自动生成 Start ===============================
|
||||||
|
LogList: `${BASE_URL.BASE_URL}/MesStock/v1/log/list`, // 日志列表
|
||||||
|
LogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/log/detail`, // 日志详情
|
||||||
|
ProductStockLogList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/list`, // 商品出入库记录列表
|
||||||
|
ProductStockLogOutList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/out/list`, // 商品出库记录
|
||||||
|
ProductStockLogInList: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/in/list`, // 商品入库记录
|
||||||
|
ProductStockLogDetail: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detail`, // 商品出入库记录详情
|
||||||
|
ProductStockLogCreate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/create`, // 创建商品出入库记录
|
||||||
|
ProductStockLogUpdate: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/update`, // 更新商品出入库记录
|
||||||
|
ProductStockLogDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/detele`, // 删除商品出入库记录
|
||||||
|
ProductStockLogBatchDelete: `${BASE_URL.BASE_URL}/MesStock/v1/product/stock/log/batchDelete`, // 批量删除商品出入库记录
|
||||||
|
|
||||||
|
// =============================== 接口地址 自动生成 End ===============================
|
||||||
|
},
|
||||||
|
|
||||||
|
start_time: 0, // 开始时间
|
||||||
|
end_time: 0, // 结束时间
|
||||||
|
|
||||||
|
|
||||||
|
//搜索区
|
||||||
|
searchFormData: {
|
||||||
|
title: '',
|
||||||
|
desc: '',
|
||||||
|
},
|
||||||
|
// 搜索区配置
|
||||||
|
searchRules: [
|
||||||
|
{ key: "title", mode: "like" },
|
||||||
|
{ key: "desc", mode: "like" }
|
||||||
|
],
|
||||||
|
//搜索区
|
||||||
|
searchFormItems: [ // 子项
|
||||||
|
{ field: 'title', 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: '40' }, // 多选框
|
||||||
|
{ type: 'seq', width: '40' }, // 序号
|
||||||
|
|
||||||
|
// "id,optional" validate:"" message:"" label:""` // 主键
|
||||||
|
// "stock_pos_id,optional" validate:"" message:"" label:""` // 库位ID
|
||||||
|
// "product_id,optional" validate:"" message:"" label:""` // 产品ID
|
||||||
|
|
||||||
|
// "stock,optional" validate:"" message:"" label:""` // 出库数量
|
||||||
|
// "out_time,optional" validate:"" message:"" label:""` // 出库时间
|
||||||
|
// "out_user_id,optional" validate:"" message:"" label:""` // 出库人员ID
|
||||||
|
// "out_user_name,optional" validate:"" message:"" label:""` // 出库人员姓名
|
||||||
|
// "bill_date,optional" validate:"" message:"" label:""` // 单据日期
|
||||||
|
// "in_type,optional" validate:"" message:"" label:""` // 入库类型
|
||||||
|
// "business_type,optional" validate:"" message:"" label:""` // 业务类型
|
||||||
|
// "business_no,optional" validate:"" message:"" label:""` // 业务单号
|
||||||
|
// "out_type,optional" validate:"" message:"" label:""` // 出库类型
|
||||||
|
// "department_id,optional" validate:"" message:"" label:""` // 部门ID
|
||||||
|
// "salesman_uid,optional" validate:"" message:"" label:""` // 业务员ID
|
||||||
|
// "handler_uid,optional" validate:"" message:"" label:""` // 经手人ID
|
||||||
|
// "handler_name,optional" validate:"" message:"" label:""` // 经手人姓名
|
||||||
|
// "warehouse_keeper_uid,optional" validate:"" message:"" label:""` // 仓管员ID
|
||||||
|
// "warehouse_keeper_name,optional" validate:"" message:"" label:""` // 仓管员姓名
|
||||||
|
// "check_user_uid,optional" validate:"" message:"" label:""` // 验货人id
|
||||||
|
// "check_user_name,optional" validate:"" message:"" label:""` // 验货人姓名
|
||||||
|
// "check_time,optional" validate:"" message:"" label:""` // 验货时间
|
||||||
|
// "delivery_no,optional" validate:"" message:"" label:""` // 发货单号
|
||||||
|
// "contact,optional" validate:"" message:"" label:""` // 联系人
|
||||||
|
// "phone,optional" validate:"" message:"" label:""` // 联系电话
|
||||||
|
// "remark,optional" validate:"" message:"" label:""` // 备注
|
||||||
|
// "salesman_name,optional" validate:"" message:"" label:""` // 业务员姓名
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||||
|
{ field: 'id' , slots: { default: 'column1' }, sortable: true, title: '查看详情', width: 100 }, // 查看详情
|
||||||
|
{ field: 'product_detail.name', sortable: true, title: '料品名称', width: 250 }, // 料品名称
|
||||||
|
{ field: 'out_type', sortable: true, title: '出库类型', width: 100 }, // 出库类型
|
||||||
|
{ field: 'out_stock', sortable: true, title: '出库数量', width: 100 }, // 出库数量
|
||||||
|
{ field: 'stock', sortable: true, title: '剩余库存', width: 100 }, // 出库数量
|
||||||
|
{ field: 'warehouse_idetail.name', sortable: true, title: '仓库', width: 150 }, // 仓库名称
|
||||||
|
{ field: 'warehouse_pos_idetail.name', sortable: true, title: '库位', width: 150 }, // 库位信息
|
||||||
|
{ field: 'out_user_name', sortable: true, title: '出库人', width: 100 }, // 出库人
|
||||||
|
{ field: 'bill_date', formatter: 'formatDate',sortable: true, title: '单据日期', width: 100 }, // 单据日期
|
||||||
|
{ field: 'business_type', sortable: true, title: '业务类型', width: 100 }, // 业务类型
|
||||||
|
{ field: 'business_no', sortable: true, title: '业务单号', width: 100 }, // 业务单号
|
||||||
|
{ field: 'out_type', sortable: true, title: '出库类型', width: 100 }, // 出库类型
|
||||||
|
{ field: 'handler_name', sortable: true, title: '经手人', width: 100 }, // 经手人
|
||||||
|
{ field: 'check_user_name', sortable: true, title: '验货人', width: 100 }, // 验货人
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{ field: 'out_time', formatter: 'formatDate', width: 100, sortable: true, title: '出库时间', showHeaderOverflow: true }, // 出库时间
|
||||||
|
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||||
|
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||||
|
// { field: 'stock_id', sortable: true, title: '库存id', width: 250 }, // 库存id
|
||||||
|
|
||||||
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
pageData.actions.getList = pageData.actions.ProductStockLogOutList;
|
||||||
|
pageData.actions.delete = pageData.actions.MesStockPositionBatchDelete;
|
||||||
|
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
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 出库
|
||||||
|
stockOut(id) {
|
||||||
|
console.log("stockOut:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 入库
|
||||||
|
stockIn(id) {
|
||||||
|
console.log("stockIn:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.out {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,21 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<basic-page-list :desc="desc" :options="pageOptions" @loadData="loadData">
|
<basic-page-list :desc="desc" :options="pageOptions">
|
||||||
|
|
||||||
<!-- 如果为1-->
|
|
||||||
<template v-slot:column1="{ row }">
|
<template v-slot:column1="{ row }">
|
||||||
<a-tag v-if="row.is_default === 1" color="orange">
|
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
|
||||||
默认
|
<a-button class="out" @click="stockIn(row.id)">出库</a-button>
|
||||||
</a-tag>
|
|
||||||
</template>
|
</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>
|
</basic-page-list>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -124,16 +116,14 @@ export default {
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||||
{ field: 'product_id', sortable: true, title: '产品ID', width: 250 }, // 产品ID
|
{ field: 'warehouse_idetail.name', sortable: true, title: '仓库', width: 150 }, // 仓库名称
|
||||||
{ field: 'product_detail.name', sortable: true, title: '产品详情', width: 250 }, // 产品详情
|
{ field: 'warehouse_pos_idetail.name', sortable: true, title: '库位', width: 150 }, // 库位信息
|
||||||
{ field: 'warehouse_id', sortable: true, title: '仓库ID', width: 250 }, // 仓库ID
|
{ field: 'product_detail.name', sortable: true, title: '料品名称', width: 250 }, // 产品详情
|
||||||
{ field: 'warehouse_idetail.name', sortable: true, title: '仓库名称', width: 250 }, // 仓库名称
|
{ field: 'stock', sortable: true, title: '库存数量', width: 100 }, // 库存数量
|
||||||
{ field: 'warehouse_pos_id', sortable: true, title: '库位ID', width: 250 }, // 库位ID
|
|
||||||
{ field: 'warehouse_pos_idetail.name', sortable: true, title: '库位名称', width: 250 }, // 库位信息
|
|
||||||
{ field: 'stock', sortable: true, title: '库存数量', width: 250 }, // 库存数量
|
|
||||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
||||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
||||||
{ field: 'stock_id', sortable: true, title: '库存id', width: 250 }, // 库存id
|
{ field: 'id' , slots: { default: 'column1' }, sortable: true, title: '出入库操作', width: 160,fixed:"right" }, // 出入库操作
|
||||||
|
// { field: 'stock_id', sortable: true, title: '库存id', width: 250 }, // 库存id
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
@ -156,8 +146,17 @@ export default {
|
||||||
item.__hide_delete = true
|
item.__hide_delete = true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
// 出库
|
||||||
|
stockOut(id) {
|
||||||
|
console.log("stockOut:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
|
// 入库
|
||||||
|
stockIn(id) {
|
||||||
|
console.log("stockIn:"+id)
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -165,4 +164,9 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.out {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -143,26 +143,25 @@ export default {
|
||||||
items: [
|
items: [
|
||||||
// =============================== 表单项 自动生成 Start ===============================
|
// =============================== 表单项 自动生成 Start ===============================
|
||||||
|
|
||||||
{ field: 'code', title: '编码', span: 12, itemRender: { name: '$input' } },
|
{ field: 'code', title: '编码', span: 6, itemRender: { name: '$input' } },
|
||||||
//{ field: 'warehouse_title', title: '仓库名称', span: 12, itemRender: { name: '$input' } },
|
//{ field: 'warehouse_title', title: '仓库名称', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'warehouse_name', title: '仓库名称', span: 12, itemRender: { name: '$input' } },
|
{ field: 'warehouse_title', title: '仓库名称', span: 8, itemRender: { name: '$input' } },
|
||||||
|
|
||||||
{ field: 'warehouse_code', title: '仓库编码', span: 12, itemRender: { name: '$input' } },
|
{ field: 'warehouse_name', title: '英文名称', span: 6, itemRender: { name: '$input' } },
|
||||||
{ field: 'warehouse_type', title: '仓库类型', span: 12, itemRender: { name: '$select',props:{options:settings.options_warehouse_type} } },
|
|
||||||
|
{ field: 'warehouse_code', title: '仓库编号', span: 6, itemRender: { name: '$input' } },
|
||||||
|
{ field: 'warehouse_type', title: '仓库类型', span: 6, itemRender: { name: '$select',props:{options:settings.options_warehouse_type} } },
|
||||||
|
{ field: 'warehouse_storage_type', title: '存储类型', span: 6, itemRender: { name: '$select',props:{options:settings.options_warehouse_storage_type} } },
|
||||||
{ field: 'warehouse_address', title: '仓库地址', span: 12, itemRender: { name: '$input' } },
|
{ field: 'warehouse_address', title: '仓库地址', span: 12, itemRender: { name: '$input' } },
|
||||||
//{ field: 'warehouse_uid', title: '仓库负责人UID', span: 12, itemRender: { name: '$input' } },
|
|
||||||
{ field: 'warehouse_uname', title: '仓库负责人姓名', span: 12, itemRender: { name: '$input' } },
|
|
||||||
{ field: 'warehouse_mobile', title: '仓库负责人手机号', span: 12, itemRender: { name: '$input' } },
|
|
||||||
{ field: 'warehouse_phone', title: '仓库电话', span: 12, itemRender: { name: '$input' } },
|
{ field: 'warehouse_phone', title: '仓库电话', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'warehouse_remark', title: '仓库备注', span: 12, itemRender: { name: '$input' } },
|
{ field: 'warehouse_uid', title: '仓库负责人', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'warehouse_negative_stock', title: '仓库是否允许负库存', span: 12, itemRender: { name: '$select',props:{options:settings.options_warehouse_negative_stock} } },
|
{ field: 'warehouse_mobile', title: '仓库负责人手机号', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'warehouse_location', title: '是否启用库位管理', span: 12, itemRender: { name: '$select',props:{options:settings.options_is_open} } },
|
{ field: 'warehouse_remark', title: '仓库备注', span: 24, itemRender: { name: '$input' } },
|
||||||
{ field: 'warehouse_batch', title: '是否启用批次管理', span: 12, itemRender: { name: '$select',props:{options:settings.options_is_open} } },
|
{ field: 'warehouse_status', title: '仓库状态', span: 4, itemRender: { name: '$switch',props:{options:settings.options_is_enabled} } },
|
||||||
{ field: 'warehouse_serial', title: '是否启用序列号', span: 12, itemRender: { name: '$select',props:{options:settings.options_is_open} } },
|
{ field: 'warehouse_negative_stock', title: '仓库是否允许负库存', span: 4, itemRender: { name: '$switch',props:{options:settings.options_warehouse_negative_stock} } },
|
||||||
{ field: 'warehouse_storage_type', title: '存储类型', span: 12, itemRender: { name: '$select',props:{options:settings.options_warehouse_storage_type} } },
|
{ field: 'warehouse_location', title: '是否启用库位管理', span: 4, itemRender: { name: '$switch',props:{options:settings.options_is_open} } },
|
||||||
{ field: 'warehouse_effective_date',dataRule:{type:"timestamp"}, title: '仓库生效日期', span: 12, itemRender: { name: '$input',props:{type:"date"} } },
|
{ field: 'warehouse_batch', title: '是否启用批次管理', span: 4, itemRender: { name: '$switch',props:{options:settings.options_is_open} } },
|
||||||
{ field: 'warehouse_invalid_date', dataRule:{type:"timestamp"},title: '仓库失效日期', span: 12, itemRender: { name: '$input',props:{type:"date"} } },
|
{ field: 'warehouse_serial', title: '是否启用序列号', span: 4, itemRender: { name: '$switch',props:{options:settings.options_is_open} } },
|
||||||
{ field: 'warehouse_status', title: '仓库状态', span: 12, itemRender: { name: '$select',props:{options:settings.options_is_enabled} } },
|
|
||||||
|
|
||||||
// =============================== 表单项 自动生成 End ===============================
|
// =============================== 表单项 自动生成 End ===============================
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,47 @@ routerMap[FunName + 'PositionList']= {
|
||||||
permission: [],
|
permission: [],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
routerMap[FunName + 'OutList']= {
|
||||||
|
name: FunTitle,
|
||||||
|
icon: 'idcard',
|
||||||
|
path: `/${FunName}/${FunName}OutLogList`,
|
||||||
|
component: () => import(`@/pages/Middle/Mes/MesStock/MesStock/OutList`),
|
||||||
|
meta:{
|
||||||
|
page:{ cacheAble:false}
|
||||||
|
},
|
||||||
|
authority: {
|
||||||
|
permission: [],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
routerMap[FunName + 'InList']= {
|
||||||
|
name: FunTitle,
|
||||||
|
icon: 'idcard',
|
||||||
|
path: `/${FunName}/${FunName}InLogList`,
|
||||||
|
component: () => import(`@/pages/Middle/Mes/MesStock/MesStock/InList`),
|
||||||
|
meta:{
|
||||||
|
page:{ cacheAble:false}
|
||||||
|
},
|
||||||
|
authority: {
|
||||||
|
permission: [],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
routerMap[FunName + 'LogDetail']= {
|
||||||
|
name: FunTitle,
|
||||||
|
icon: 'idcard',
|
||||||
|
path: `/${FunName}/${FunName}LogDetail`,
|
||||||
|
component: () => import(`@/pages/Middle/Mes/MesStock/MesStock/LogDetail`),
|
||||||
|
meta:{
|
||||||
|
invisible: true,
|
||||||
|
page:{ cacheAble:false}
|
||||||
|
},
|
||||||
|
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