This commit is contained in:
parent
9b577c97d0
commit
c53295bdad
|
|
@ -16,7 +16,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@antv/data-set": "^0.11.4",
|
"@antv/data-set": "^0.11.4",
|
||||||
"animate.css": "^4.1.0",
|
"animate.css": "^4.1.0",
|
||||||
"ant-design-vue": "1.7.2",
|
"ant-design-vue": "^1.7.2",
|
||||||
"axios": "^0.19.2",
|
"axios": "^0.19.2",
|
||||||
"clipboard": "^2.0.6",
|
"clipboard": "^2.0.6",
|
||||||
"core-js": "^3.6.5",
|
"core-js": "^3.6.5",
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,14 @@
|
||||||
<div :class="cls">
|
<div :class="cls">
|
||||||
|
|
||||||
<a-tooltip placement="topRight" title="日志" v-if="isShowLog">
|
<a-tooltip placement="topRight" title="日志" v-if="isShowLog">
|
||||||
<a class="iconlink" @click="toolbarClick({ name: 'log' })"> <a-icon type="file-text"></a-icon></a>
|
<a class="iconlink" @click="toolbarClick({ name: 'log' })">
|
||||||
|
<a-icon type="file-text"></a-icon>
|
||||||
|
</a>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip placement="topRight" title="设置" v-if="isShowSetting">
|
<a-tooltip placement="topRight" title="设置" v-if="isShowSetting">
|
||||||
<a class="iconlink" title="设置" @click="toolbarClick({ name: 'setting' })"> <a-icon type="setting"></a-icon></a>
|
<a class="iconlink" title="设置" @click="toolbarClick({ name: 'setting' })">
|
||||||
|
<a-icon type="setting"></a-icon>
|
||||||
|
</a>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
|
|
||||||
<a-button v-if="isShowAdd" type="primary" @click="toolbarClick({ name: 'add' })">
|
<a-button v-if="isShowAdd" type="primary" @click="toolbarClick({ name: 'add' })">
|
||||||
|
|
@ -24,7 +28,7 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "mktoolbar",
|
name: "zktoolbar",
|
||||||
props: {
|
props: {
|
||||||
isShowLog: {
|
isShowLog: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
@ -55,8 +59,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
};
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toolbarClick(e) {
|
toolbarClick(e) {
|
||||||
|
|
@ -72,7 +75,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<div class="zk-select">
|
||||||
|
|
||||||
|
<a-select v-model="selectedOption" placeholder="请选择">
|
||||||
|
<a-select-option v-for="option in options" :key="option.value" :value="option.value">{{
|
||||||
|
option.label
|
||||||
|
}}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "zkSelect",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
selectedOption: 'option2', // 设置为 'option2' 作为默认值
|
||||||
|
options: [
|
||||||
|
{value: 'option1', label: '选项1'},
|
||||||
|
{value: 'option2', label: '选项2'},
|
||||||
|
{value: 'option3', label: '选项3'},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -134,23 +134,21 @@ export default {
|
||||||
dataId: {}
|
dataId: {}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {};
|
||||||
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 根据row元素数量计算宽度
|
// 根据row元素数量计算宽度
|
||||||
thCenterStyle() {
|
thCenterStyle() {
|
||||||
return this.thCenter ? { textAlign: "center" } : {};
|
return this.thCenter ? {textAlign: "center"} : {};
|
||||||
},
|
},
|
||||||
// 根据row元素的height计算高度
|
// 根据row元素的height计算高度
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
rowClass(l){
|
rowClass(l) {
|
||||||
return "row"+l
|
return "row" + l
|
||||||
},
|
},
|
||||||
rowHeight(v) {
|
rowHeight(v) {
|
||||||
return { height: v.height * 40 + "px" };
|
return {height: v.height * 40 + "px"};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
@ -158,7 +156,7 @@ export default {
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1> {{title}}</h1>
|
<h1> {{ title }}</h1>
|
||||||
<div v-for="(item, index) in options" :key="index">
|
<div v-for="(item, index) in options" :key="index">
|
||||||
<div class="row" v-for="(value, key) in item" :key="key" :class="rowClass(value.row.length)">
|
<div class="row" v-for="(value, key) in item" :key="key" :class="rowClass(value.row.length)">
|
||||||
<div class="cell" v-for="(v, k) in value.row" :key="k" :style="rowHeight(v)">
|
<div class="cell" v-for="(v, k) in value.row" :key="k" :style="rowHeight(v)">
|
||||||
|
|
@ -166,7 +164,7 @@ export default {
|
||||||
{{ v.name }}
|
{{ v.name }}
|
||||||
</span>
|
</span>
|
||||||
<span class="td">
|
<span class="td">
|
||||||
{{ v.value }}
|
{{ v.value }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -181,13 +179,15 @@ export default {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
border-top:0px;
|
border-top: 0px;
|
||||||
margin:10px;
|
margin: 10px;
|
||||||
h1{
|
|
||||||
|
h1 {
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
@ -197,7 +197,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
.cell {
|
.cell {
|
||||||
height:40px;
|
height: 40px;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
@ -208,54 +208,66 @@ export default {
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
border-left: 1px solid #ccc;
|
border-left: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.th {
|
.th {
|
||||||
background: #f5f7fa;
|
background: #f5f7fa;
|
||||||
border-left:0px;
|
border-left: 0px;
|
||||||
}
|
}
|
||||||
.td{
|
|
||||||
|
.td {
|
||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
border-right: 1px solid #ccc;
|
border-right: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.row1{
|
|
||||||
|
.row1 {
|
||||||
.th {
|
.th {
|
||||||
width: 12.5%*1;
|
width: 12.5%*1;
|
||||||
}
|
}
|
||||||
.td{
|
|
||||||
|
.td {
|
||||||
width: 12.5%*7;
|
width: 12.5%*7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.row2{
|
|
||||||
|
.row2 {
|
||||||
.th {
|
.th {
|
||||||
width: 12.5%*2;
|
width: 12.5%*2;
|
||||||
}
|
}
|
||||||
.td{
|
|
||||||
|
.td {
|
||||||
width: 12.5%*6;
|
width: 12.5%*6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.row3{
|
|
||||||
|
.row3 {
|
||||||
.th {
|
.th {
|
||||||
width: 12.5%*3;
|
width: 12.5%*3;
|
||||||
}
|
}
|
||||||
.td{
|
|
||||||
width:12.5%*5;
|
.td {
|
||||||
|
width: 12.5%*5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.row4{
|
|
||||||
|
.row4 {
|
||||||
.th {
|
.th {
|
||||||
width: 12.5%*4;
|
width: 12.5%*4;
|
||||||
}
|
}
|
||||||
.td{
|
|
||||||
|
.td {
|
||||||
width: 12.5%*4;
|
width: 12.5%*4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.row5{
|
|
||||||
|
.row5 {
|
||||||
.th {
|
.th {
|
||||||
width: 12.5%*5;
|
width: 12.5%*5;
|
||||||
}
|
}
|
||||||
.td{
|
|
||||||
|
.td {
|
||||||
width: 12.5%*3;
|
width: 12.5%*3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "zktoolbar",
|
name: "zkToolbar",
|
||||||
props: {
|
props: {
|
||||||
isShowLog: {
|
isShowLog: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,7 @@ export default {
|
||||||
if (loading) { // 如果需要加载
|
if (loading) { // 如果需要加载
|
||||||
modal.hideLoading(); // 隐藏加载
|
modal.hideLoading(); // 隐藏加载
|
||||||
}
|
}
|
||||||
/*
|
if (result.code !== 200) { // 如果返回的状态码不是200
|
||||||
if (result.code != 200) { // 如果返回的状态码不是200
|
|
||||||
if (reject) { // 如果有错误回调
|
if (reject) { // 如果有错误回调
|
||||||
reject(response); // 返回错误
|
reject(response); // 返回错误
|
||||||
} else { // 如果没有错误回调
|
} else { // 如果没有错误回调
|
||||||
|
|
@ -42,7 +41,6 @@ export default {
|
||||||
}
|
}
|
||||||
return; // 返回
|
return; // 返回
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
resolve(result); // 返回成功
|
resolve(result); // 返回成功
|
||||||
}).catch((error) => { // 如果出错
|
}).catch((error) => { // 如果出错
|
||||||
if (loading) { // 如果需要加载
|
if (loading) { // 如果需要加载
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,21 @@
|
||||||
import dialog from "@/application/mk/components/dialog";
|
import dialog from "@/application/mk/components/dialog";
|
||||||
import request from "@/application/zk/func/request";
|
import request from "@/application/zk/func/request";
|
||||||
|
import zkToolbar from "./components/zkToolbar.vue";
|
||||||
|
import zkTableView from "./components/zkTableView.vue";
|
||||||
|
import zkSelect from "./components/zkSelect.vue";
|
||||||
|
|
||||||
|
|
||||||
var zk = {
|
var zk = {
|
||||||
|
// 请求
|
||||||
|
...request,
|
||||||
|
// 对话框
|
||||||
dialog: dialog,
|
dialog: dialog,
|
||||||
|
|
||||||
|
// 组件
|
||||||
init: (Vue) => {
|
init: (Vue) => {
|
||||||
Vue.component("zk-toolbar", () => import("../mk/components/toolbar/toolbar"));
|
Vue.component(zkToolbar.name, zkToolbar);
|
||||||
Vue.component("zk-table-view", () => import("../zk/components/TableView.vue"));
|
Vue.component(zkTableView.name, zkTableView);
|
||||||
|
Vue.component(zkSelect.name, zkSelect);
|
||||||
},
|
},
|
||||||
request:request
|
|
||||||
}
|
}
|
||||||
export default zk;
|
export default zk;
|
||||||
|
|
@ -702,6 +702,10 @@ export default {
|
||||||
this.attributes.forEach(item => {
|
this.attributes.forEach(item => {
|
||||||
|
|
||||||
let v = this.getAttributeValue(item.id);
|
let v = this.getAttributeValue(item.id);
|
||||||
|
// 转换 v 为字符串
|
||||||
|
if (v !== null && v !== undefined) {
|
||||||
|
v = v.toString();
|
||||||
|
}
|
||||||
let old = findOldAttribute(item.id);
|
let old = findOldAttribute(item.id);
|
||||||
if (old != null) {
|
if (old != null) {
|
||||||
old.value = v;
|
old.value = v;
|
||||||
|
|
@ -739,7 +743,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
// 提交数据
|
// 提交数据
|
||||||
this.$mk.post({
|
this.$zk.post({
|
||||||
url: action,
|
url: action,
|
||||||
loading: "保存中...",
|
loading: "保存中...",
|
||||||
data: postdata,
|
data: postdata,
|
||||||
|
|
@ -750,6 +754,7 @@ export default {
|
||||||
this.back();
|
this.back();
|
||||||
}
|
}
|
||||||
}).catch((a) => { // 失败回调
|
}).catch((a) => { // 失败回调
|
||||||
|
console.log("a.data.code"+a)
|
||||||
this.$mk.error(a.data.msg); // 显示错误信息
|
this.$mk.error(a.data.msg); // 显示错误信息
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,13 @@
|
||||||
|
|
||||||
<basic-page-list :desc="desc" :options="pageOptions">
|
<basic-page-list :desc="desc" :options="pageOptions">
|
||||||
<template v-slot:column1="{ row }">
|
<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>
|
||||||
|
<template v-slot:column2="{ row }">
|
||||||
|
<img v-if="row.product_detail.image" style="width:50px;height:50px;" :src="row.product_detail.image"
|
||||||
|
@click.stop="$hevueImgPreview(row.product_detail.image)"/>
|
||||||
|
<span v-else></span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</basic-page-list>
|
</basic-page-list>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -15,9 +19,7 @@ import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
i18n: require("./i18n"),
|
i18n: require("./i18n"),
|
||||||
props: {
|
props: {},
|
||||||
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageOptions: {}
|
pageOptions: {}
|
||||||
|
|
@ -46,7 +48,7 @@ export default {
|
||||||
keyName: 'id', // 主键字段名
|
keyName: 'id', // 主键字段名
|
||||||
listFieldName: 'MesStock',
|
listFieldName: 'MesStock',
|
||||||
|
|
||||||
disabledDelete:false,
|
disabledDelete: false,
|
||||||
|
|
||||||
addPageUrl: "/MesStock/MesStockAdd",
|
addPageUrl: "/MesStock/MesStockAdd",
|
||||||
editPageUrl: "/MesStock/MesStockUpdate/",
|
editPageUrl: "/MesStock/MesStockUpdate/",
|
||||||
|
|
@ -86,16 +88,21 @@ export default {
|
||||||
},
|
},
|
||||||
// 搜索区配置
|
// 搜索区配置
|
||||||
searchRules: [
|
searchRules: [
|
||||||
{ key: "materials", mode: "like" },
|
{key: "materials", mode: "like"},
|
||||||
],
|
],
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormItems: [ // 子项
|
searchFormItems: [ // 子项
|
||||||
{ field: 'materials', title: '料品', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入料品' } } },
|
{
|
||||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
field: 'materials',
|
||||||
|
title: '料品',
|
||||||
|
span: 5,
|
||||||
|
itemRender: {name: '$input', props: {placeholder: '请输入料品'}}
|
||||||
|
},
|
||||||
|
{span: 8, slots: {default: 'date'}}, // 自定义列
|
||||||
{
|
{
|
||||||
align: 'right', span: 4, itemRender: { // 按钮列
|
align: 'right', span: 4, itemRender: { // 按钮列
|
||||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
name: '$buttons', children: [{props: {type: 'submit', content: '搜索', status: 'primary'}}, // 搜索按钮
|
||||||
{ props: { type: 'reset', content: '重置' } }]
|
{props: {type: 'reset', content: '重置'}}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -108,22 +115,20 @@ export default {
|
||||||
id: 'datagrid_1', // 表格唯一标识
|
id: 'datagrid_1', // 表格唯一标识
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{ type: 'checkbox', width: '40' }, // 多选框
|
{type: 'checkbox', width: '40'}, // 多选框
|
||||||
{ type: 'seq', width: '40' }, // 序号
|
{type: 'seq', width: '40'}, // 序号
|
||||||
|
|
||||||
|
|
||||||
{ 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: 120 }, // 产品详情
|
|
||||||
{ field: 'product_detail.spec', sortable: true, title: '规格型号', width: 150 }, // 规格型号
|
|
||||||
{ 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 }, // 库存数量
|
|
||||||
{ slots: { default: 'column1' }, sortable: true, title: '操作', width: 160,fixed:"right" }, // 出入库操作
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
{field: 'product_detail.mes_materials_sort.name', sortable: true, title: '料品分类', width: 100}, // 产品详情
|
||||||
|
{field: 'product_detail.image', slots: {default: 'column2'}, sortable: true, title: '料品图片', width: 100}, // 产品详情
|
||||||
|
{field: 'product_detail.name', sortable: true, title: '料品名称', width: 250}, // 产品详情
|
||||||
|
{field: 'product_detail.code', sortable: true, title: '料品编码', width: 120}, // 产品详情
|
||||||
|
{field: 'product_detail.spec', sortable: true, title: '规格型号', width: 150}, // 规格型号
|
||||||
|
{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}, // 库存数量
|
||||||
|
{slots: {default: 'column1'}, sortable: true, title: '操作', width: 160, fixed: "right"}, // 出入库操作
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -136,29 +141,26 @@ export default {
|
||||||
this.pageOptions = pageData;
|
this.pageOptions = pageData;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
positionAdd(id) {
|
positionAdd(id) {
|
||||||
this.$mk.dialog.open({
|
this.$mk.dialog.open({
|
||||||
page: () => import("./Position/PositionAdd"),
|
page: () => import("./Position/PositionAdd"),
|
||||||
title: "增加仓位",
|
title: "增加仓位",
|
||||||
pageOptions: {
|
pageOptions: {},
|
||||||
},
|
width: 800,
|
||||||
width: 800,
|
height: 600,
|
||||||
height: 600,
|
dataId: id,
|
||||||
dataId: id,
|
callback: ({success}) => {
|
||||||
callback: ({ success }) => {
|
if (success) {
|
||||||
if (success) {
|
this.$refs.xGrid.commitProxy('query')
|
||||||
this.$refs.xGrid.commitProxy('query')
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {},
|
||||||
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,22 @@
|
||||||
<template>
|
<template>
|
||||||
<basic-page-list :desc="desc" :options="pageOptions" ref="List">
|
<div>
|
||||||
|
|
||||||
<template v-slot:column1="{ row }">
|
<basic-page-list :desc="desc" :options="pageOptions" ref="List">
|
||||||
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
|
|
||||||
<a-button class="out" @click="stockOut(row.id)">出库</a-button>
|
<template v-slot:column1="{ row }">
|
||||||
</template>
|
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
|
||||||
|
<a-button class="out" @click="stockOut(row.id)">出库</a-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:column2="{ row }">
|
||||||
|
<img v-if="row.product_detail.image" style="width:50px;height:50px;" :src="row.product_detail.image"
|
||||||
|
@click.stop="$hevueImgPreview(row.product_detail.image)"/>
|
||||||
|
<span v-else></span>
|
||||||
|
</template>
|
||||||
|
</basic-page-list>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
</basic-page-list>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -17,12 +25,11 @@ import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
i18n: require("../i18n"),
|
i18n: require("../i18n"),
|
||||||
props: {
|
props: {},
|
||||||
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageOptions: {}
|
pageOptions: {},
|
||||||
|
warehouse_search: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 计算属性
|
// 计算属性
|
||||||
|
|
@ -79,25 +86,97 @@ export default {
|
||||||
|
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormData: {
|
searchFormData: {
|
||||||
title: '',
|
warehouse_id: '',
|
||||||
desc: '',
|
warehouse_pos_id: '',
|
||||||
},
|
},
|
||||||
// 搜索区配置
|
// 搜索区配置
|
||||||
searchRules: [
|
searchRules: [
|
||||||
{ key: "materials", mode: "like" },
|
{key: "materials", mode: "like"},
|
||||||
{ key: "warehouse", mode: "like" },
|
{key: "warehouse_id", mode: "="},
|
||||||
{ key: "warehouse_pos", mode: "like" }
|
{key: "warehouse_pos_id", mode: "="}
|
||||||
|
|
||||||
],
|
],
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormItems: [ // 子项
|
searchFormItems: [ // 子项
|
||||||
{ field: 'materials', title: '料品', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入料品' } } },
|
{
|
||||||
{ field: 'warehouse', title: '仓库', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入仓库' } } },
|
field: 'materials',
|
||||||
{ field: 'warehouse_pos', title: '库位', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入库位' } } },
|
title: '料品',
|
||||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
span: 4,
|
||||||
|
itemRender: {name: '$input', props: {placeholder: '请输入料品'}}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '仓库', span: 5,
|
||||||
|
field: 'warehouse_id',
|
||||||
|
dataRule: {
|
||||||
|
fromField: "id",
|
||||||
|
saveField: "warehouse_id"
|
||||||
|
},
|
||||||
|
itemRender: {
|
||||||
|
name: 'MkFormDataSelector',
|
||||||
|
props: {
|
||||||
|
searchFieldNames: ["warehouse_title", "code"],
|
||||||
|
params: {
|
||||||
|
dataType: "object",
|
||||||
|
valueField: "id",
|
||||||
|
textField: "warehouse_title",
|
||||||
|
columns: [
|
||||||
|
{field: 'warehouse_title', title: '名称'},
|
||||||
|
{field: 'code', title: '编码'}
|
||||||
|
],
|
||||||
|
listdataFieldName: 'MesWarehouse',
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/MesWarehouse/v1/mes/warehouse/list`,
|
||||||
|
onDataChanged: ({data}) => {
|
||||||
|
|
||||||
|
console.log(data)
|
||||||
|
this.warehouse_search.clear();
|
||||||
|
this.warehouse_search = [{
|
||||||
|
column: "warehouse_id",
|
||||||
|
mode: "=",
|
||||||
|
value: data.id.toString()
|
||||||
|
}]
|
||||||
|
this.$forceUpdate(); // 强制刷新
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '仓位', span: 5,
|
||||||
|
field: 'warehouse_pos_id',
|
||||||
|
dataRule: {
|
||||||
|
fromField: "id",
|
||||||
|
saveField: "warehouse_pos_id"
|
||||||
|
},
|
||||||
|
itemRender: {
|
||||||
|
name: 'MkFormDataSelector', props: {
|
||||||
|
searchFieldNames: ["warehouse_id", "id"],
|
||||||
|
params: {
|
||||||
|
dataType: "object",
|
||||||
|
valueField: "id",
|
||||||
|
textField: "warehouse_location_name",
|
||||||
|
columns: [
|
||||||
|
{field: 'warehouse_location_name', title: '名称'},
|
||||||
|
{field: 'code', title: '编码'}
|
||||||
|
],
|
||||||
|
isClickToLoad: true,
|
||||||
|
actionParams: {
|
||||||
|
search_rules: this.warehouse_search
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
listdataFieldName: 'WarehouseLocation',
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/MesWarehouse/v1/warehouse/location/list`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
align: 'right', span: 4, itemRender: { // 按钮列
|
align: 'right', span: 4, itemRender: { // 按钮列
|
||||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
name: '$buttons', children: [{props: {type: 'submit', content: '搜索', status: 'primary'}}, // 搜索按钮
|
||||||
{ props: { type: 'reset', content: '重置' } }]
|
{props: {type: 'reset', content: '重置'}}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -112,20 +191,39 @@ export default {
|
||||||
id: 'datagrid_1', // 表格唯一标识
|
id: 'datagrid_1', // 表格唯一标识
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{ type: 'checkbox', width: '40' }, // 多选框
|
{type: 'checkbox', width: '40'}, // 多选框
|
||||||
{ type: 'seq', width: '40' }, // 序号
|
{type: 'seq', width: '40'}, // 序号
|
||||||
|
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
{ title: '操作', slots: { default: 'op' }, width: 50 },
|
{title: '操作', slots: {default: 'op'}, width: 50},
|
||||||
{ field: 'warehouse_idetail.name', sortable: true, title: '仓库', width: 150 }, // 仓库名称
|
{field: 'warehouse_idetail.name', sortable: true, title: '仓库', width: 120}, // 仓库名称
|
||||||
{ field: 'warehouse_pos_idetail.name', sortable: true, title: '库位', width: 150 }, // 库位信息
|
{field: 'warehouse_pos_idetail.name', sortable: true, title: '库位', width: 120}, // 库位信息
|
||||||
{ field: 'product_detail.name', sortable: true, title: '料品名称', width: 250 }, // 产品详情
|
{field: 'product_detail.image', slots: {default: 'column2'}, sortable: true, title: '料品图片', width: 100}, // 产品详情
|
||||||
{ field: 'stock', sortable: true, title: '库存数量', width: 100 }, // 库存数量
|
{field: 'product_detail.name', sortable: true, title: '料品名称', width: 250}, // 产品详情
|
||||||
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
{field: 'product_detail.code', sortable: true, title: '料品编号', width: 150}, // 产品详情
|
||||||
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
{field: 'product_detail.spec', sortable: true, title: '规格型号', width: 150}, // 规格型号
|
||||||
{ field: 'id', slots: { default: 'column1' }, sortable: true, title: '出入库操作', width: 160, fixed: "right" }, // 出入库操作
|
{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
|
||||||
|
}, // 更新时间
|
||||||
|
{field: 'id', slots: {default: 'column1'}, sortable: true, title: '出入库操作', width: 160, fixed: "right"}, // 出入库操作
|
||||||
// { field: 'stock_id', sortable: true, title: '库存id', width: 250 }, // 库存id
|
// { field: 'stock_id', sortable: true, title: '库存id', width: 250 }, // 库存id
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
@ -160,12 +258,11 @@ export default {
|
||||||
this.$mk.dialog.open({
|
this.$mk.dialog.open({
|
||||||
page: () => import("../OutIn/OutEdit"),
|
page: () => import("../OutIn/OutEdit"),
|
||||||
title: "出库",
|
title: "出库",
|
||||||
pageOptions: {
|
pageOptions: {},
|
||||||
},
|
|
||||||
width: 1000,
|
width: 1000,
|
||||||
height: 800,
|
height: 800,
|
||||||
dataId: id,
|
dataId: id,
|
||||||
callback: ({ success }) => {
|
callback: ({success}) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
this.$refs.List.gridReload()
|
this.$refs.List.gridReload()
|
||||||
|
|
||||||
|
|
@ -184,12 +281,11 @@ export default {
|
||||||
this.$mk.dialog.open({
|
this.$mk.dialog.open({
|
||||||
page: () => import("../OutIn/InEdit"),
|
page: () => import("../OutIn/InEdit"),
|
||||||
title: "入库",
|
title: "入库",
|
||||||
pageOptions: {
|
pageOptions: {},
|
||||||
},
|
|
||||||
width: 1000,
|
width: 1000,
|
||||||
height: 800,
|
height: 800,
|
||||||
dataId: id,
|
dataId: id,
|
||||||
callback: ({ success }) => {
|
callback: ({success}) => {
|
||||||
if (success) {
|
if (success) {
|
||||||
this.$refs.List.gridReload()
|
this.$refs.List.gridReload()
|
||||||
|
|
||||||
|
|
@ -200,9 +296,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {},
|
||||||
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<basic-page-list :desc="desc" :options="pageOptions"></basic-page-list>
|
<basic-page-list :desc="desc" :options="pageOptions">
|
||||||
|
<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_status === 0" color="red">
|
||||||
|
禁用
|
||||||
|
</a-tag>
|
||||||
|
<a-tag v-if="row.warehouse_status === 1" color="green">
|
||||||
|
启用
|
||||||
|
</a-tag>
|
||||||
|
</template>
|
||||||
|
</basic-page-list>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -9,9 +24,7 @@ const settings = require('../../basic/settings.js');
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
i18n: require("./i18n"),
|
i18n: require("./i18n"),
|
||||||
props: {
|
props: {},
|
||||||
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageOptions: {}
|
pageOptions: {}
|
||||||
|
|
@ -81,8 +94,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 搜索区配置
|
// 搜索区配置
|
||||||
searchRules: [
|
searchRules: [
|
||||||
{ key: "title", mode: "like" },
|
{key: "title", mode: "like"},
|
||||||
{ key: "desc", mode: "like" }
|
{key: "desc", mode: "like"}
|
||||||
],
|
],
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormItems: [ // 子项
|
searchFormItems: [ // 子项
|
||||||
|
|
@ -105,35 +118,65 @@ export default {
|
||||||
id: 'datagrid_1', // 表格唯一标识
|
id: 'datagrid_1', // 表格唯一标识
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{ type: 'checkbox', width: '40' }, // 多选框
|
{type: 'checkbox', width: '40'}, // 多选框
|
||||||
{ type: 'seq', width: '40' }, // 序号
|
{type: 'seq', width: '40'}, // 序号
|
||||||
|
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
{title: '操作', slots: {default: 'op'}, width: 120},
|
||||||
{ field: 'code', sortable: true, title: '编码', width: 250 }, // 编码
|
{field: 'code', sortable: true, title: '编码', width: 100}, // 编码
|
||||||
{ field: 'warehouse_title', sortable: true, title: '仓库名称', width: 250 }, // 仓库名称
|
{field: 'warehouse_title', sortable: true, title: '仓库名称', width: 150}, // 仓库名称
|
||||||
{ field: 'warehouse_name', sortable: true, title: '仓库英文名称', width: 250 }, // 仓库英文名称
|
{field: 'warehouse_name', sortable: true, title: '仓库英文名称', width: 150}, // 仓库英文名称
|
||||||
{ field: 'warehouse_code', sortable: true, title: '仓库编码', width: 250 }, // 仓库编码
|
{field: 'warehouse_code', sortable: true, title: '仓库编码', width: 100}, // 仓库编码
|
||||||
{ 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_type',
|
||||||
|
params: settings.options_warehouse_type,
|
||||||
|
formatter: 'formatEnum',
|
||||||
|
sortable: true,
|
||||||
|
title: '仓库类型',
|
||||||
|
width: 100
|
||||||
|
}, // 仓库类型:1.普通仓库,2.现场仓库,3.委外仓库
|
||||||
|
{field: 'warehouse_address', sortable: true, title: '仓库地址', width: 250}, // 仓库地址
|
||||||
//{ field: 'warehouse_uid', sortable: true, title: '仓库负责人UID', width: 250 }, // 仓库负责人UID
|
//{ field: 'warehouse_uid', sortable: true, title: '仓库负责人UID', width: 250 }, // 仓库负责人UID
|
||||||
{ field: 'warehouse_uname', sortable: true, title: '仓库负责人姓名', width: 250 }, // 仓库负责人姓名
|
{field: 'warehouse_uname', sortable: true, title: '仓库负责人', width: 120}, // 仓库负责人姓名
|
||||||
{ field: 'warehouse_mobile', sortable: true, title: '仓库负责人手机号', width: 250 }, // 仓库负责人手机号
|
{field: 'warehouse_mobile', sortable: true, title: '负责人手机', width: 120}, // 仓库负责人手机号
|
||||||
{ field: 'warehouse_phone', sortable: true, title: '仓库电话', width: 250 }, // 仓库电话
|
{field: 'warehouse_phone', sortable: true, title: '仓库电话', width: 120}, // 仓库电话
|
||||||
{ 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_storage_type',
|
||||||
{ field: 'warehouse_location', params: settings.options_is_open, formatter: 'formatEnum', sortable: true, title: '是否启用库位管理', width: 250 }, // 是否启用库位管理:0.不启用,1.启用
|
params: settings.options_warehouse_storage_type,
|
||||||
{ field: 'warehouse_batch', params: settings.options_is_open, formatter: 'formatEnum', sortable: true, title: '是否启用批次管理', width: 250 }, // 是否启用批次管理:0.不启用,1.启用
|
formatter: 'formatEnum',
|
||||||
{ field: 'warehouse_serial', params: settings.options_is_open, formatter: 'formatEnum', sortable: true, title: '是否启用序列号', width: 250 }, // 是否启用序列号:0.不启用,1.启用
|
sortable: true,
|
||||||
{ field: 'warehouse_storage_type', params: settings.options_warehouse_storage_type, formatter: 'formatEnum', sortable: true, title: '存储类型', width: 250 }, // 存储类型:1.可用,2.待检,3.在检,4.不合格,5.报废,6.待返工
|
title: '存储类型',
|
||||||
{ field: 'warehouse_effective_date', formatter: 'formatDate', sortable: true, title: '仓库生效日期', width: 250 }, // 仓库生效日期
|
width: 100
|
||||||
{ field: 'warehouse_invalid_date', formatter: 'formatDate', sortable: true, title: '仓库失效日期', width: 250 }, // 仓库失效日期
|
}, // 存储类型:1.可用,2.待检,3.在检,4.不合格,5.报废,6.待返工
|
||||||
{ field: 'warehouse_status', params: settings.options_is_enabled, formatter: 'formatEnum', sortable: true, title: '仓库状态', width: 250 }, // 仓库状态:0.禁用,1.启用
|
{
|
||||||
|
field: 'warehouse_status',
|
||||||
|
params: settings.options_is_enabled,
|
||||||
|
formatter: 'formatEnum',
|
||||||
|
sortable: true,
|
||||||
|
title: '仓库状态',
|
||||||
|
slots: {default: 'column2'},
|
||||||
|
width: 100
|
||||||
|
}, // 仓库状态:0.禁用,1.启用
|
||||||
|
{field: 'warehouse_remark', sortable: true, title: '仓库备注', width: 250}, // 仓库备注
|
||||||
|
{
|
||||||
|
field: 'warehouse_negative_stock',
|
||||||
|
params: settings.options_warehouse_negative_stock,
|
||||||
|
formatter: 'formatEnum',
|
||||||
|
sortable: true,
|
||||||
|
title: '是否允许负库存',
|
||||||
|
width: 150
|
||||||
|
}, // 仓库是否允许负库存:0.不允许,1.允许
|
||||||
|
{
|
||||||
|
field: 'warehouse_location',
|
||||||
|
params: settings.options_is_open,
|
||||||
|
formatter: 'formatEnum',
|
||||||
|
sortable: true,
|
||||||
|
title: '是否允许多库位',
|
||||||
|
width: 150
|
||||||
|
}, // 是否启用库位管理: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 }, // 更新时间
|
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
@ -153,9 +196,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {}
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<basic-page-list :desc="desc" :options="pageOptions" @loadData="loadData">
|
<basic-page-list :desc="desc" :options="pageOptions" @loadData="loadData">
|
||||||
|
|
||||||
<!-- 如果为1-->
|
|
||||||
<template v-slot:column1="{ row }">
|
<template v-slot:column1="{ row }">
|
||||||
<a-tag v-if="row.is_default === 1" color="orange">
|
<a-tag v-if="row.is_default === 1" color="orange">
|
||||||
默认
|
默认
|
||||||
|
|
@ -25,9 +24,7 @@ import BASE_URL from '@/services/mes/api.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
i18n: require("./i18n"),
|
i18n: require("./i18n"),
|
||||||
props: {
|
props: {},
|
||||||
|
|
||||||
},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
pageOptions: {}
|
pageOptions: {}
|
||||||
|
|
@ -97,18 +94,28 @@ export default {
|
||||||
},
|
},
|
||||||
// 搜索区配置
|
// 搜索区配置
|
||||||
searchRules: [
|
searchRules: [
|
||||||
{ key: "title", mode: "like" },
|
{key: "title", mode: "like"},
|
||||||
{ key: "desc", mode: "like" }
|
{key: "desc", mode: "like"}
|
||||||
],
|
],
|
||||||
//搜索区
|
//搜索区
|
||||||
searchFormItems: [ // 子项
|
searchFormItems: [ // 子项
|
||||||
{ field: 'code', title: '仓位编码', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入仓位编码' } } },
|
{
|
||||||
{ field: 'warehouse_location_name', title: '仓位名称', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入仓位名称' } } },
|
field: 'code',
|
||||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
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: { // 按钮列
|
align: 'right', span: 4, itemRender: { // 按钮列
|
||||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
name: '$buttons', children: [{props: {type: 'submit', content: '搜索', status: 'primary'}}, // 搜索按钮
|
||||||
{ props: { type: 'reset', content: '重置' } }]
|
{props: {type: 'reset', content: '重置'}}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -121,22 +128,36 @@ export default {
|
||||||
id: 'datagrid_1', // 表格唯一标识
|
id: 'datagrid_1', // 表格唯一标识
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{ type: 'checkbox', width: '40' }, // 多选框
|
{type: 'checkbox', width: '40'}, // 多选框
|
||||||
{ type: 'seq', width: '40' }, // 序号
|
{type: 'seq', width: '40'}, // 序号
|
||||||
|
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
{title: '操作', slots: {default: 'op'}, width: 120},
|
||||||
{ field: 'warehouse_detail.code', sortable: true, title: '仓库编码', width: 120 }, // 仓库编号
|
{field: 'warehouse_detail.code', sortable: true, title: '仓库编码', width: 120}, // 仓库编号
|
||||||
{ field: 'warehouse_detail.warehouse_title', sortable: true, title: '仓库名称', width: 150 }, // 仓库名称
|
{field: 'warehouse_detail.warehouse_title', sortable: true, title: '仓库名称', width: 150}, // 仓库名称
|
||||||
{ field: 'code', sortable: true, title: '库位编码', width: 120 }, // 编码
|
{field: 'code', sortable: true, title: '库位编码', width: 120}, // 编码
|
||||||
{ field: 'warehouse_location_name', sortable: true, title: '库位名称', width: 'auto' }, // 库位名称
|
{field: 'warehouse_location_name', sortable: true, title: '库位名称', width: 'auto'}, // 库位名称
|
||||||
{ field: 'warehouse_location_keeper_uname', sortable: true, title: '库管员', width: 100 }, // 库管员姓名
|
{field: 'warehouse_location_keeper_uname', sortable: true, title: '库管员', width: 100}, // 库管员姓名
|
||||||
{ field: 'is_default', sortable: true, title: '默认', slots: { default: 'column1' }, width: 70 }, // 是否默认库位:0.否,1.是
|
{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: '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 }, // 更新时间
|
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 ===============================
|
// =============================== 表格列 自动生成 Start ===============================
|
||||||
|
|
||||||
|
|
@ -163,9 +184,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {},
|
||||||
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue