Compare commits
2 Commits
06086307e6
...
02c805a655
| Author | SHA1 | Date |
|---|---|---|
|
|
02c805a655 | |
|
|
ca5b4958bf |
|
|
@ -22,7 +22,8 @@
|
|||
|
||||
<vxe-toolbar ref="xToolbar" custom>
|
||||
<template #buttons>
|
||||
<a-button type="primary" icon="delete" @click="pageDelete()" v-if="options.disabledDelete !== true">批量删除</a-button>
|
||||
<a-button type="primary" icon="delete" @click="pageDelete()"
|
||||
v-if="options.disabledDelete !== true">批量删除</a-button>
|
||||
<a-button type="primary" style="margin-left: 5px;" icon="print" v-if="options.enabledPrint"
|
||||
@click="pagePrint()">打印</a-button>
|
||||
<a-button type="primary" style="margin-left: 5px;" icon="print" v-if="options.enabledPrint2"
|
||||
|
|
@ -44,8 +45,8 @@
|
|||
<vxe-grid ref='xGrid' v-bind="options.gridOptions" class="mytable-style" :row-class-name="rowClassName">
|
||||
<template #op="{ row }">
|
||||
<div class="oplinks">
|
||||
<a v-if="enabledOp({ name: 'edit', row: row })" @click.stop="pageEdit(row)" title="编辑"><a-icon
|
||||
type="edit" /></a>
|
||||
<a v-if="options.disabledEdit !== false && 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>
|
||||
|
|
@ -687,6 +688,7 @@ export default {
|
|||
.page-body {
|
||||
padding: 15px;
|
||||
background: @base-bg-color;
|
||||
//border: 1px solid red;
|
||||
}
|
||||
|
||||
.gridPanel {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,14 @@ export default {
|
|||
props: { // 组件属性
|
||||
readonly: Boolean,
|
||||
params: Object,
|
||||
value: [Array, String, Object]
|
||||
value: [Array, String, Object],
|
||||
// 搜索字段 默认为name
|
||||
searchFieldNames: {
|
||||
type: Array,
|
||||
default: function () {
|
||||
return ['name'];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -80,7 +87,6 @@ export default {
|
|||
treeConfig: null,
|
||||
modalWidth: 800, // 弹出框宽度
|
||||
modalHeight: 600, // 弹出框高度
|
||||
searchFieldNames: ['name'], // 搜索字段
|
||||
tablePage: { // 表格分页
|
||||
total: 0, // 总数
|
||||
currentPage: 1, // 当前页
|
||||
|
|
@ -89,6 +95,7 @@ export default {
|
|||
}
|
||||
},
|
||||
created() { // 创建
|
||||
|
||||
this.load() // 加载
|
||||
this.heightInit(); // 高度初始化
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,171 @@
|
|||
import { request } from '@/utils/request' // 加载request
|
||||
import modal from './modal' // 加载modal
|
||||
|
||||
import JSONbig from 'json-bigint'
|
||||
|
||||
export default {
|
||||
|
||||
// 提交post请求 ,获取数据
|
||||
post: function ({ url, data, loading, config, useBigInt }) { // post请求
|
||||
|
||||
if (useBigInt) {
|
||||
config = config || {};
|
||||
config.headers = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
data = JSONbig.stringify(data);
|
||||
}
|
||||
return new Promise((resolve, reject) => { // 返回一个Promise
|
||||
|
||||
if (loading) { // 如果需要加载
|
||||
modal.loading(loading); // 显示加载
|
||||
}
|
||||
request(url, 'post', data, config).then(response => { // 发送请求
|
||||
if (!response) { // 如果没有返回
|
||||
reject && reject(response); // 返回错误
|
||||
return; // 返回
|
||||
}
|
||||
var result = response.data; // 获取数据
|
||||
if (!result) { // 如果没有数据
|
||||
reject && reject(response); // 返回错误
|
||||
return; // 返回
|
||||
}
|
||||
if (loading) { // 如果需要加载
|
||||
modal.hideLoading(); // 隐藏加载
|
||||
}
|
||||
/*
|
||||
if (result.code != 200) { // 如果返回的状态码不是200
|
||||
if (reject) { // 如果有错误回调
|
||||
reject(response); // 返回错误
|
||||
} else { // 如果没有错误回调
|
||||
modal.error(result.msg); // 显示错误
|
||||
}
|
||||
return; // 返回
|
||||
}
|
||||
*/
|
||||
resolve(result); // 返回成功
|
||||
}).catch((error) => { // 如果出错
|
||||
if (loading) { // 如果需要加载
|
||||
modal.hideLoading(); // 隐藏加载
|
||||
}
|
||||
modal.error(error.toString()); // 显示错误
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
get: function ({ url, loading, config, useBigInt }) { // post请求
|
||||
|
||||
if (useBigInt) {
|
||||
config = config || {};
|
||||
config.headers = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
}
|
||||
return new Promise((resolve, reject) => { // 返回一个Promise
|
||||
|
||||
if (loading) { // 如果需要加载
|
||||
modal.loading(loading); // 显示加载
|
||||
}
|
||||
request(url, 'get', {}, config).then(response => { // 发送请求
|
||||
if (!response) { // 如果没有返回
|
||||
reject && reject(response); // 返回错误
|
||||
return; // 返回
|
||||
}
|
||||
var result = response.data; // 获取数据
|
||||
if (!result) { // 如果没有数据
|
||||
reject && reject(response); // 返回错误
|
||||
return; // 返回
|
||||
}
|
||||
if (loading) { // 如果需要加载
|
||||
modal.hideLoading(); // 隐藏加载
|
||||
}
|
||||
resolve(result); // 返回成功
|
||||
}).catch((error) => { // 如果出错
|
||||
if (loading) { // 如果需要加载
|
||||
modal.hideLoading(); // 隐藏加载
|
||||
}
|
||||
modal.error(error.toString()); // 显示错误
|
||||
});
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 获取分页数据
|
||||
getPagedData: function ({ url, method = 'post', data, callback, config,useBigInt,rowFilters,listFieldName }) { // 获取分页数据 默认post请求
|
||||
|
||||
if (useBigInt) {
|
||||
config = config || {};
|
||||
config.headers = {
|
||||
'Content-Type': 'application/json'
|
||||
};
|
||||
data = JSONbig.stringify(data);
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => { // 返回一个Promise
|
||||
|
||||
if (data.start_time && typeof (data.start_time) == "string") { // 如果开始时间是字符串
|
||||
data.start_time = parseInt(new Date(data.start_time).getTime() / 1000); // 转换为时间戳
|
||||
}
|
||||
if (data.end_time && typeof (data.end_time) == "string") { // 如果结束时间是字符串
|
||||
data.end_time = parseInt(new Date(data.end_time).getTime() / 1000); // 转换为时间戳
|
||||
}
|
||||
request(url, method, data, config).then(response => { // 发送请求
|
||||
if (!response) { // 如果没有返回
|
||||
reject && reject(response); // 返回错误
|
||||
return;
|
||||
}
|
||||
var result = response.data; // 获取数据
|
||||
if (!result) { // 如果没有数据
|
||||
reject && reject(response); // 返回错误
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.code != 200) { // 如果返回的状态码不是200
|
||||
if (reject) { // 如果有错误回调
|
||||
reject(response); // 返回错误
|
||||
} else { // 如果没有错误回调
|
||||
modal.error(result.msg); // 显示错误
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(
|
||||
rowFilters && // 如果有行过滤器
|
||||
rowFilters.length && // 如果行过滤器有数据
|
||||
listFieldName && // 如果列表字段名有数据
|
||||
result.data && // 如果返回的数据有数据
|
||||
result.data[listFieldName] && // 如果返回的数据中有列表字段名
|
||||
result.data[listFieldName].length // 如果返回的数据中的列表字段名有数据
|
||||
){
|
||||
console.log( JSON.stringify(result.data[listFieldName]))
|
||||
result.data[listFieldName] = result.data[listFieldName].filter((row)=>{
|
||||
for(let i =0;i<rowFilters.length;i++){
|
||||
let f = rowFilters[i];
|
||||
if(!f(row)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
console.log( JSON.stringify(result.data[listFieldName]))
|
||||
}
|
||||
// console.log(result.data)
|
||||
resolve(result.data); // 返回成功
|
||||
|
||||
if (callback) { // 如果有回调
|
||||
callback(result.data); // 执行回调
|
||||
}
|
||||
}).catch((error) => {
|
||||
resolve({ // 返回一个空数据
|
||||
total: 0, // 总数
|
||||
list: [] // 列表
|
||||
});
|
||||
modal.error(error.toString()); // 显示错误
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,8 +1,12 @@
|
|||
|
||||
import dialog from "@/application/mk/components/dialog";
|
||||
import request from "@/application/zk/func/request";
|
||||
|
||||
var zk = {
|
||||
|
||||
dialog: dialog,
|
||||
init: (Vue) => {
|
||||
Vue.component("mk-toolbar", () => import("../mk/components/toolbar/toolbar"));
|
||||
Vue.component("zk-toolbar", () => import("../mk/components/toolbar/toolbar"));
|
||||
},
|
||||
request:request
|
||||
}
|
||||
export default zk;
|
||||
|
|
@ -461,10 +461,10 @@ export default {
|
|||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.page-body {
|
||||
background: white;
|
||||
padding: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.toolbarbtns .ant-btn {
|
||||
|
|
|
|||
|
|
@ -23,15 +23,6 @@
|
|||
</template>
|
||||
</vxe-form>
|
||||
<!-- 基础信息 End -->
|
||||
</a-tab-pane>
|
||||
|
||||
|
||||
|
||||
<a-tab-pane key="2" tab="料品自定义属性">
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 料品属性 Start -->
|
||||
<vxe-form :data="options.formOptions2.data" ref="xForm2" :title-width="options.formOptions2.titleWidth"
|
||||
:title-align="options.formOptions2.titleAlign" :rules="options.formOptions2.rules"
|
||||
|
|
@ -39,6 +30,16 @@
|
|||
</vxe-form>
|
||||
<!-- 料品属性 End -->
|
||||
</a-tab-pane>
|
||||
|
||||
|
||||
|
||||
<!-- <a-tab-pane key="2" tab="料品自定义属性">-->
|
||||
<!-- -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- </a-tab-pane>-->
|
||||
</a-tabs>
|
||||
|
||||
|
||||
|
|
@ -244,11 +245,16 @@ export default {
|
|||
textField: "name",
|
||||
listdataFieldName: 'MesEnumValue',
|
||||
actionParams: {
|
||||
search_rules: [
|
||||
search_rules_enum: [
|
||||
{
|
||||
column: "code",
|
||||
column: "type",
|
||||
mode: "=",
|
||||
value: "SYS001"
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
column: "sys_name",
|
||||
mode: "=",
|
||||
value: "color"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -287,11 +293,16 @@ export default {
|
|||
textField: "name",
|
||||
listdataFieldName: 'MesEnumValue',
|
||||
actionParams: {
|
||||
search_rules: [
|
||||
search_rules_enum: [
|
||||
{
|
||||
column: "code",
|
||||
column: "type",
|
||||
mode: "=",
|
||||
value: "SYS006"
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
column: "sys_name",
|
||||
mode: "=",
|
||||
value: "face"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -311,11 +322,16 @@ export default {
|
|||
textField: "name",
|
||||
listdataFieldName: 'MesEnumValue',
|
||||
actionParams: {
|
||||
search_rules: [
|
||||
search_rules_enum: [
|
||||
{
|
||||
column: "code",
|
||||
column: "type",
|
||||
mode: "=",
|
||||
value: "SYS003"
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
column: "sys_name",
|
||||
mode: "=",
|
||||
value: "molding"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -337,11 +353,16 @@ export default {
|
|||
textField: "name",
|
||||
listdataFieldName: 'MesEnumValue',
|
||||
actionParams: {
|
||||
search_rules: [
|
||||
search_rules_enum: [
|
||||
{
|
||||
column: "code",
|
||||
column: "type",
|
||||
mode: "=",
|
||||
value: "SYS004"
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
column: "sys_name",
|
||||
mode: "=",
|
||||
value: "production"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -365,11 +386,16 @@ export default {
|
|||
textField: "name",
|
||||
listdataFieldName: 'MesEnumValue',
|
||||
actionParams: {
|
||||
search_rules: [
|
||||
search_rules_enum: [
|
||||
{
|
||||
column: "code",
|
||||
column: "type",
|
||||
mode: "=",
|
||||
value: "SYS005"
|
||||
value: "0"
|
||||
},
|
||||
{
|
||||
column: "sys_name",
|
||||
mode: "=",
|
||||
value: "soil"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -607,10 +607,10 @@ export default {
|
|||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.page-body {
|
||||
background: white;
|
||||
padding: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -622,10 +622,10 @@ export default {
|
|||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.page-body {
|
||||
background: white;
|
||||
padding: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.toolbarbtns .ant-btn {
|
||||
|
|
|
|||
|
|
@ -512,10 +512,10 @@ export default {
|
|||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.page-body {
|
||||
background: white;
|
||||
padding: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1089,10 +1089,10 @@ export default {
|
|||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.page-body {
|
||||
background: white;
|
||||
padding: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.oplinks2 svg {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ export default {
|
|||
|
||||
|
||||
{
|
||||
title: '仓库', span: 12,
|
||||
title: '仓库', span: 16,
|
||||
field: 'warehouse_detail',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
|
|
@ -137,6 +137,7 @@ export default {
|
|||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
searchFieldNames: ["warehouse_title", "code"],
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
|
|
@ -162,7 +163,7 @@ export default {
|
|||
},
|
||||
|
||||
{
|
||||
title: '仓位', span: 12,
|
||||
title: '仓位', span: 16,
|
||||
field: 'warehouse_pos_detail',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
|
|
@ -170,6 +171,7 @@ export default {
|
|||
},
|
||||
itemRender: {
|
||||
name: 'MkFormDataSelector', props: {
|
||||
searchFieldNames: ["warehouse_id", "code"],
|
||||
params: {
|
||||
dataType: "object",
|
||||
valueField: "id",
|
||||
|
|
@ -197,7 +199,7 @@ export default {
|
|||
},
|
||||
|
||||
{
|
||||
title: '料品', span: 12,
|
||||
title: '料品', span: 16,
|
||||
field: 'product_detail',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
|
|
@ -219,7 +221,7 @@ export default {
|
|||
|
||||
|
||||
|
||||
{ field: 'stock', dataRule: { type: "number" }, title: '库存数量', span: 12, itemRender: { name: '$input', props: { type: 'number' } } },
|
||||
// { field: 'stock', dataRule: { type: "number" }, title: '库存数量', span: 12, itemRender: { name: '$input', props: { type: 'number' } } },
|
||||
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<basic-page-list :desc="desc" :options="pageOptions">
|
||||
<template v-slot:column1="{ row }">
|
||||
<a-button class="in" type="primary" @click="positionAdd(row.id)">增加仓位</a-button>
|
||||
<a-button class="in" type="primary" @click="positionAdd(row.id)">为该库存增加仓位</a-button>
|
||||
</template>
|
||||
|
||||
</basic-page-list>
|
||||
|
|
@ -46,7 +46,7 @@ export default {
|
|||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MesStock',
|
||||
|
||||
disabledDelete:true,
|
||||
disabledDelete:false,
|
||||
|
||||
addPageUrl: "/MesStock/MesStockAdd",
|
||||
editPageUrl: "/MesStock/MesStockUpdate/",
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ export default {
|
|||
items: [
|
||||
|
||||
|
||||
{ field: 'in_stock', dataRule: { type: 'number' }, title: '入库数量', span: 12, itemRender: { name: '$input' , props: { type: "number" }} },
|
||||
{ field: 'stock', dataRule: { type: 'number' }, title: '入库数量', span: 12, itemRender: { name: '$input', props: { type: "number" } } },
|
||||
{ field: 'in_type',title: '入库类型', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'in_time', dataRule: { type: 'timestamp' }, title: '入库时间', span: 12, itemRender: { name: '$input', props: { type: "date" } } },
|
||||
|
||||
{
|
||||
|
|
@ -200,7 +201,7 @@ export default {
|
|||
// 返回
|
||||
back() {
|
||||
|
||||
this.$emit("callback", {});
|
||||
this.$emit("callback", { success: true });
|
||||
},
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export default {
|
|||
};
|
||||
|
||||
pageData.actions.getList = pageData.actions.ProductStockLogInList;
|
||||
pageData.actions.delete = pageData.actions.MesStockPositionBatchDelete;
|
||||
pageData.actions.delete = pageData.actions.ProductStockLogBatchDelete;
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<!-- 出入库记录 -->
|
||||
<template>
|
||||
<basic-page-edit :desc="desc" :dataId="getDataId()" :options="pageOptions"></basic-page-edit>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
@ -233,6 +234,7 @@ export default {
|
|||
if (!dataId) {
|
||||
dataId = 0;
|
||||
}
|
||||
|
||||
return dataId;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ export default {
|
|||
// 表单项
|
||||
items: [
|
||||
|
||||
|
||||
{ field: 'out_stock', dataRule: { type: 'number' }, title: '出库数量', span: 12, itemRender: { name: '$input' , props: { type: "number" }} },
|
||||
{ field: 'stock', dataRule: { type: 'number' }, title: '出库数量', span: 12, itemRender: { name: '$input' , props: { type: "number" }} },
|
||||
{ field: 'out_type',title: '出库类型', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'out_time', dataRule: { type: 'timestamp' }, title: '出库时间', span: 12, itemRender: { name: '$input' , props: { type: "date" }} },
|
||||
|
||||
{
|
||||
|
|
@ -201,7 +201,7 @@ export default {
|
|||
back() {
|
||||
|
||||
|
||||
this.$emit("callback", {});
|
||||
this.$emit("callback", {success:true});
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -240,6 +240,8 @@ export default {
|
|||
this.back();
|
||||
}, 500);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
this.$mk.error(a.msg || a.message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export default {
|
|||
};
|
||||
|
||||
pageData.actions.getList = pageData.actions.ProductStockLogOutList;
|
||||
pageData.actions.delete = pageData.actions.MesStockPositionBatchDelete;
|
||||
pageData.actions.delete = pageData.actions.ProductStockLogBatchDelete;
|
||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
||||
this.pageOptions = pageData;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<basic-page-list :desc="desc" :options="pageOptions">
|
||||
<basic-page-list :desc="desc" :options="pageOptions" ref="List">
|
||||
|
||||
<template v-slot:column1="{ row }">
|
||||
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
|
||||
|
|
@ -47,10 +47,8 @@ export default {
|
|||
|
||||
keyName: 'id', // 主键字段名
|
||||
listFieldName: 'MesStockPosition',
|
||||
|
||||
addPageUrl: "/MesStock/MesStockPositionAdd",
|
||||
editPageUrl: "/MesStock/MesStockPositionUpdate/",
|
||||
disabledAdd:true,
|
||||
// 接口动作
|
||||
actions: { // Api 接口地址
|
||||
// =============================== 接口地址 自动生成 Start ===============================
|
||||
|
|
@ -91,7 +89,7 @@ export default {
|
|||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'title', 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: { // 按钮列
|
||||
|
|
@ -102,6 +100,8 @@ export default {
|
|||
],
|
||||
|
||||
|
||||
disabledEdit: false,
|
||||
disabledAdd: true,
|
||||
//数据区
|
||||
gridOptions: { // 表格配置
|
||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
||||
|
|
@ -115,7 +115,7 @@ export default {
|
|||
|
||||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
{ title: '操作', slots: { default: 'op' }, width: 50 },
|
||||
{ field: 'warehouse_idetail.name', sortable: true, title: '仓库', width: 150 }, // 仓库名称
|
||||
{ field: 'warehouse_pos_idetail.name', sortable: true, title: '库位', width: 150 }, // 库位信息
|
||||
{ field: 'product_detail.name', sortable: true, title: '料品名称', width: 250 }, // 产品详情
|
||||
|
|
@ -159,12 +159,13 @@ export default {
|
|||
title: "出库",
|
||||
pageOptions: {
|
||||
},
|
||||
width: 800,
|
||||
height: 600,
|
||||
width: 1000,
|
||||
height: 800,
|
||||
dataId: id,
|
||||
callback: ({ success }) => {
|
||||
if (success) {
|
||||
this.$refs.xGrid.commitProxy('query')
|
||||
this.$refs.List.gridReload()
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -182,12 +183,13 @@ export default {
|
|||
title: "入库",
|
||||
pageOptions: {
|
||||
},
|
||||
width: 800,
|
||||
height: 600,
|
||||
width: 1000,
|
||||
height: 800,
|
||||
dataId: id,
|
||||
callback: ({ success }) => {
|
||||
if (success) {
|
||||
this.$refs.xGrid.commitProxy('query')
|
||||
this.$refs.List.gridReload()
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -0,0 +1,52 @@
|
|||
<script>
|
||||
export default {
|
||||
api: require('@/services/Middle/Mes/MesStock/api.js'),
|
||||
i18n: require('../i18n'),
|
||||
components: {},
|
||||
props: {
|
||||
pageMode: {
|
||||
type: String,
|
||||
default: "edit"
|
||||
},
|
||||
dataId: {
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
|
||||
return {
|
||||
pageOptions: {},
|
||||
search_rules:[],
|
||||
order_bys:[],
|
||||
start_time: 0,
|
||||
end_time: 0,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
MesStock: this.$zk.request(this.api.MesStockList.url, {
|
||||
"limit":this.limit,
|
||||
"end_time":
|
||||
"start_time": 0,
|
||||
"search_rules": this.search_rules,
|
||||
"order_bys": this.order_bys,
|
||||
"page": 1
|
||||
}, true,{}, true)
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log(this.MesStock)
|
||||
},
|
||||
computed: {
|
||||
desc() {
|
||||
return this.$t('editPageDesc')
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
|
|
@ -145,11 +145,10 @@ export default {
|
|||
{ 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_phone', title: '仓库电话', span: 12, itemRender: { name: '$input' } },
|
||||
{ field: 'warehouse_phone', title: '仓库电话', span: 6, itemRender: { name: '$input' } },
|
||||
|
||||
{
|
||||
title: '仓库负责人', span: 12,
|
||||
title: '仓库负责人', span: 6,
|
||||
field: 'warehouse_uname',
|
||||
dataRule: {
|
||||
fromField: "id",
|
||||
|
|
@ -171,15 +170,16 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
{ field: 'warehouse_mobile', title: '仓库负责人手机号', span: 12, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'warehouse_mobile', title: '仓库负责人手机号', span: 6, itemRender: { name: 'MkFormInputShow' } },
|
||||
{ field: 'warehouse_address', title: '仓库地址', span: 24, itemRender: { name: '$input' } },
|
||||
|
||||
|
||||
{ field: 'warehouse_remark', title: '仓库备注', span: 24, itemRender: { name: '$input' } },
|
||||
{ field: 'warehouse_remark', title: '仓库备注', span: 24, itemRender: { name: '$textarea' } },
|
||||
{ field: 'warehouse_status', title: '仓库状态', dataRule: { type: 'bool' }, span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_enabled } } },
|
||||
{ field: 'warehouse_negative_stock', dataRule: { type: 'bool' }, title: '仓库是否允许负库存', span: 4, itemRender: { name: '$switch', props: { options: settings.options_warehouse_negative_stock } } },
|
||||
{ field: 'warehouse_location', dataRule: { type: 'bool' }, title: '是否启用库位管理', span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_open } } },
|
||||
{ field: 'warehouse_batch', dataRule: { type: 'bool' }, title: '是否启用批次管理', span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_open } } },
|
||||
{ field: 'warehouse_serial', dataRule: { type: 'bool' }, title: '是否启用序列号', span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_open } } },
|
||||
{ field: 'warehouse_location', dataRule: { type: 'bool' }, title: '是否启用多库位管理', span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_open } } },
|
||||
// { field: 'warehouse_batch', dataRule: { type: 'bool' }, title: '是否启用批次管理', span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_open } } },
|
||||
// { field: 'warehouse_serial', dataRule: { type: 'bool' }, title: '是否启用序列号', span: 4, itemRender: { name: '$switch', props: { options: settings.options_is_open } } },
|
||||
|
||||
// =============================== 表单项 自动生成 End ===============================
|
||||
]
|
||||
|
|
|
|||
|
|
@ -86,15 +86,15 @@ export default {
|
|||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入标题' } } },
|
||||
{ field: 'desc', 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: '重置' } }]
|
||||
}
|
||||
}
|
||||
// { field: 'code', title: '编码', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
|
||||
// { field: 'warehouse_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: '重置' } }]
|
||||
// }
|
||||
// }
|
||||
],
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,15 @@ export default {
|
|||
{ field: 'code', title: '编码' }
|
||||
],
|
||||
listdataFieldName: 'MesWarehouse',
|
||||
actionParams: {
|
||||
search_rules: [
|
||||
{
|
||||
column: "warehouse_location",
|
||||
mode: "=",
|
||||
value: "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
dataUrl: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/list`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,7 +102,8 @@ export default {
|
|||
],
|
||||
//搜索区
|
||||
searchFormItems: [ // 子项
|
||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入仓位名称' } } },
|
||||
{ field: 'code', title: '仓位编码', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入仓位编码' } } },
|
||||
{ field: 'warehouse_location_name', title: '仓位名称', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入仓位名称' } } },
|
||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
||||
{
|
||||
align: 'right', span: 4, itemRender: { // 按钮列
|
||||
|
|
@ -127,13 +128,13 @@ export default {
|
|||
// =============================== 表格列 自动生成 Start ===============================
|
||||
|
||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
||||
{ field: 'warehouse_detail.code', sortable: true, title: '仓库编码', width: 120 }, // 仓库编号
|
||||
{ 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: 'code', sortable: true, title: '库位编码', width: 120 }, // 编码
|
||||
{ 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: 'warehouse_location_keeper_uname', sortable: true, title: '库管员', width: 100 }, // 库管员姓名
|
||||
{ field: 'is_default', sortable: true, title: '默认', slots: { default: 'column1' }, width: 70 }, // 是否默认库位:0.否,1.是
|
||||
{ field: 'warehouse_location_status', sortable: true, title: '状态', slots: { default: 'column2' }, width: 70 }, // 库位状态: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 }, // 更新时间
|
||||
|
||||
|
|
|
|||
|
|
@ -144,10 +144,10 @@ export default {
|
|||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<style scoped>
|
||||
.page-body {
|
||||
background: white;
|
||||
padding: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.formtabs .ant-tabs-tabpane {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
const request = require('@/utils/request') // 导入请求方法
|
||||
const METHOD = request.METHOD
|
||||
const BASE_URL = process.env.VUE_APP_API_BASE_URL // 获取环境变量VUE_APP_API_BASE_URL
|
||||
|
||||
module.exports = {
|
||||
BASE_URL,
|
||||
Settings: {url:`${BASE_URL}/MesStock/v1/settings/list`, method:METHOD.POST }, // 服务配置
|
||||
SettingsUpdate: {url:`${BASE_URL}/MesStock/v1/settings/update`, method:METHOD.POST }, // 配置修改
|
||||
LogList: {url:`${BASE_URL}/MesStock/v1/log/list`, method:METHOD.POST }, // 日志列表
|
||||
LogDetail: {url:`${BASE_URL}/MesStock/v1/log/detail`, method:METHOD.POST }, // 日志详情
|
||||
MesStockList: {url:`${BASE_URL}/MesStock/v1/mes/stock/list`, method:METHOD.POST }, // 库存列表
|
||||
MesStockDetail: {url:`${BASE_URL}/MesStock/v1/mes/stock/detail`, method:METHOD.POST }, // 库存详情
|
||||
MesStockCreate: {url:`${BASE_URL}/MesStock/v1/mes/stock/create`, method:METHOD.POST }, // 创建库存
|
||||
MesStockUpdate: {url:`${BASE_URL}/MesStock/v1/mes/stock/update`, method:METHOD.POST }, // 更新库存
|
||||
MesStockDelete: {url:`${BASE_URL}/MesStock/v1/mes/stock/detele`, method:METHOD.POST }, // 删除库存
|
||||
MesStockBatchDelete: {url:`${BASE_URL}/MesStock/v1/mes/stock/batchDelete`, method:METHOD.POST }, // 批量删除库存
|
||||
ProductStockOut: {url:`${BASE_URL}/MesStock/v1/product/stock/out`, method:METHOD.POST }, // 商品出库
|
||||
ProductStockIn: {url:`${BASE_URL}/MesStock/v1/product/stock/in`, method:METHOD.POST }, // 商品入库
|
||||
ProductStockBatchOut: {url:`${BASE_URL}/MesStock/v1/product/stock/batchOut`, method:METHOD.POST }, // 商品批量出库
|
||||
ProductStockBatchIn: {url:`${BASE_URL}/MesStock/v1/product/stock/batchIn`, method:METHOD.POST }, // 商品批量入库
|
||||
ProductStockLogList: {url:`${BASE_URL}/MesStock/v1/product/stock/log/list`, method:METHOD.POST }, // 商品出入库记录列表
|
||||
ProductStockLogOutList: {url:`${BASE_URL}/MesStock/v1/product/stock/log/out/list`, method:METHOD.POST }, // 商品出库记录
|
||||
ProductStockLogInList: {url:`${BASE_URL}/MesStock/v1/product/stock/log/in/list`, method:METHOD.POST }, // 商品入库记录
|
||||
ProductStockLogDetail: {url:`${BASE_URL}/MesStock/v1/product/stock/log/detail`, method:METHOD.POST }, // 商品出入库记录详情
|
||||
ProductStockLogCreate: {url:`${BASE_URL}/MesStock/v1/product/stock/log/create`, method:METHOD.POST }, // 创建商品出入库记录
|
||||
ProductStockLogUpdate: {url:`${BASE_URL}/MesStock/v1/product/stock/log/update`, method:METHOD.POST }, // 更新商品出入库记录
|
||||
ProductStockLogDelete: {url:`${BASE_URL}/MesStock/v1/product/stock/log/detele`, method:METHOD.POST }, // 删除商品出入库记录
|
||||
ProductStockLogBatchDelete: {url:`${BASE_URL}/MesStock/v1/product/stock/log/batchDelete`, method:METHOD.POST }, // 批量删除商品出入库记录
|
||||
MesStockPositionList: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/list`, method:METHOD.POST }, // 仓位库存列表
|
||||
MesStockPositionDetail: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/detail`, method:METHOD.POST }, // 仓位库存详情
|
||||
MesStockPositionCreate: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/create`, method:METHOD.POST }, // 创建仓位库存
|
||||
MesStockPositionUpdate: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/update`, method:METHOD.POST }, // 更新仓位库存
|
||||
MesStockPositionDelete: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/detele`, method:METHOD.POST }, // 删除仓位库存
|
||||
MesStockPositionBatchDelete: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/batchDelete`, method:METHOD.POST }, // 批量删除仓位库存
|
||||
MesStockPositionBatchUpdate: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/batchUpdate`, method:METHOD.POST }, // 批量更新仓位库存
|
||||
MesStockPositionBatchCreate: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/batchCreate`, method:METHOD.POST }, // 批量创建仓位库存
|
||||
MesStockPositionBatchHandle: {url:`${BASE_URL}/MesStock/v1/mes/stock/position/batchHandle`, method:METHOD.POST }, // 批量处理仓位库存
|
||||
}
|
||||
Loading…
Reference in New Issue