This commit is contained in:
zxx 2023-11-22 15:40:37 +08:00
parent 9b577c97d0
commit c53295bdad
12 changed files with 392 additions and 183 deletions

View File

@ -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",

View File

@ -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>

View File

@ -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>

View File

@ -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"} : {};
}, },
// rowheight // rowheight
}, },
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)">
@ -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;
} }
} }

View File

@ -28,7 +28,7 @@
<script> <script>
export default { export default {
name: "zktoolbar", name: "zkToolbar",
props: { props: {
isShowLog: { isShowLog: {
type: Boolean, type: Boolean,

View File

@ -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) { // 如果需要加载

View File

@ -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;

View File

@ -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); //
}); });

View File

@ -5,7 +5,11 @@
<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>
<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> </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,21 +115,19 @@ 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"}, //
] ]
@ -141,12 +146,11 @@ export default {
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')
} }
@ -156,9 +160,7 @@ export default {
}, },
watch: { watch: {},
},
}; };
</script> </script>

View File

@ -1,4 +1,6 @@
<template> <template>
<div>
<basic-page-list :desc="desc" :options="pageOptions" ref="List"> <basic-page-list :desc="desc" :options="pageOptions" ref="List">
<template v-slot:column1="{ row }"> <template v-slot:column1="{ row }">
@ -6,9 +8,15 @@
<a-button class="out" @click="stockOut(row.id)">出库</a-button> <a-button class="out" @click="stockOut(row.id)">出库</a-button>
</template> </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> </basic-page-list>
</div>
</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>

View File

@ -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>

View File

@ -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>