优化及修正内容

This commit is contained in:
zxx 2023-11-17 15:44:34 +08:00
parent ca5b4958bf
commit 02c805a655
4 changed files with 100 additions and 65 deletions

View File

@ -49,7 +49,14 @@ export default {
props: { // props: { //
readonly: Boolean, readonly: Boolean,
params: Object, params: Object,
value: [Array, String, Object] value: [Array, String, Object],
// name
searchFieldNames: {
type: Array,
default: function () {
return ['name'];
}
}
}, },
data() { data() {
return { return {
@ -80,7 +87,6 @@ export default {
treeConfig: null, treeConfig: null,
modalWidth: 800, // modalWidth: 800, //
modalHeight: 600, // modalHeight: 600, //
searchFieldNames: ['name'], //
tablePage: { // tablePage: { //
total: 0, // total: 0, //
currentPage: 1, // currentPage: 1, //
@ -89,6 +95,7 @@ export default {
} }
}, },
created() { // created() { //
this.load() // this.load() //
this.heightInit(); // this.heightInit(); //
@ -217,7 +224,7 @@ export default {
params.page = this.tablePage.currentPage; // params.page = this.tablePage.currentPage; //
params.limit = this.tablePage.pageSize; // params.limit = this.tablePage.pageSize; //
params.order_bys = params.order_bys || []; // params.order_bys = params.order_bys || []; //
params.search_rules = params.search_rules || []; // params.search_rules = params.search_rules || []; //
if (key) { if (key) {
key = this.$mk.trim(key); key = this.$mk.trim(key);
} }

View File

@ -23,22 +23,23 @@
</template> </template>
</vxe-form> </vxe-form>
<!-- 基础信息 End --> <!-- 基础信息 End -->
</a-tab-pane>
<a-tab-pane key="2" tab="料品自定义属性">
<!-- 料品属性 Start --> <!-- 料品属性 Start -->
<vxe-form :data="options.formOptions2.data" ref="xForm2" :title-width="options.formOptions2.titleWidth" <vxe-form :data="options.formOptions2.data" ref="xForm2" :title-width="options.formOptions2.titleWidth"
:title-align="options.formOptions2.titleAlign" :rules="options.formOptions2.rules" :title-align="options.formOptions2.titleAlign" :rules="options.formOptions2.rules"
:items="options.formOptions2.items" titleColon> :items="options.formOptions2.items" titleColon>
</vxe-form> </vxe-form>
<!-- 料品属性 End --> <!-- 料品属性 End -->
</a-tab-pane> </a-tab-pane>
<!-- <a-tab-pane key="2" tab="料品自定义属性">-->
<!-- -->
<!-- </a-tab-pane>-->
</a-tabs> </a-tabs>
@ -244,11 +245,16 @@ export default {
textField: "name", textField: "name",
listdataFieldName: 'MesEnumValue', listdataFieldName: 'MesEnumValue',
actionParams: { actionParams: {
search_rules: [ search_rules_enum: [
{ {
column: "code", column: "type",
mode: "=", mode: "=",
value: "SYS001" value: "0"
},
{
column: "sys_name",
mode: "=",
value: "color"
} }
] ]
}, },
@ -287,11 +293,16 @@ export default {
textField: "name", textField: "name",
listdataFieldName: 'MesEnumValue', listdataFieldName: 'MesEnumValue',
actionParams: { actionParams: {
search_rules: [ search_rules_enum: [
{ {
column: "code", column: "type",
mode: "=", mode: "=",
value: "SYS006" value: "0"
},
{
column: "sys_name",
mode: "=",
value: "face"
} }
] ]
}, },
@ -311,11 +322,16 @@ export default {
textField: "name", textField: "name",
listdataFieldName: 'MesEnumValue', listdataFieldName: 'MesEnumValue',
actionParams: { actionParams: {
search_rules: [ search_rules_enum: [
{ {
column: "code", column: "type",
mode: "=", mode: "=",
value: "SYS003" value: "0"
},
{
column: "sys_name",
mode: "=",
value: "molding"
} }
] ]
}, },
@ -337,11 +353,16 @@ export default {
textField: "name", textField: "name",
listdataFieldName: 'MesEnumValue', listdataFieldName: 'MesEnumValue',
actionParams: { actionParams: {
search_rules: [ search_rules_enum: [
{ {
column: "code", column: "type",
mode: "=", mode: "=",
value: "SYS004" value: "0"
},
{
column: "sys_name",
mode: "=",
value: "production"
} }
] ]
}, },
@ -365,11 +386,16 @@ export default {
textField: "name", textField: "name",
listdataFieldName: 'MesEnumValue', listdataFieldName: 'MesEnumValue',
actionParams: { actionParams: {
search_rules: [ search_rules_enum: [
{ {
column: "code", column: "type",
mode: "=", mode: "=",
value: "SYS005" value: "0"
},
{
column: "sys_name",
mode: "=",
value: "soil"
} }
] ]
}, },

View File

@ -129,7 +129,7 @@ export default {
{ {
title: '仓库', span: 12, title: '仓库', span: 16,
field: 'warehouse_detail', field: 'warehouse_detail',
dataRule: { dataRule: {
fromField: "id", fromField: "id",
@ -137,6 +137,7 @@ export default {
}, },
itemRender: { itemRender: {
name: 'MkFormDataSelector', props: { name: 'MkFormDataSelector', props: {
searchFieldNames: ["warehouse_title", "code"],
params: { params: {
dataType: "object", dataType: "object",
valueField: "id", valueField: "id",
@ -162,7 +163,7 @@ export default {
}, },
{ {
title: '仓位', span: 12, title: '仓位', span: 16,
field: 'warehouse_pos_detail', field: 'warehouse_pos_detail',
dataRule: { dataRule: {
fromField: "id", fromField: "id",
@ -170,6 +171,7 @@ export default {
}, },
itemRender: { itemRender: {
name: 'MkFormDataSelector', props: { name: 'MkFormDataSelector', props: {
searchFieldNames: ["warehouse_id", "code"],
params: { params: {
dataType: "object", dataType: "object",
valueField: "id", valueField: "id",
@ -197,7 +199,7 @@ export default {
}, },
{ {
title: '料品', span: 12, title: '料品', span: 16,
field: 'product_detail', field: 'product_detail',
dataRule: { dataRule: {
fromField: "id", 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' } } },
] ]
}, },

View File

@ -1,8 +1,8 @@
<template> <template>
<basic-page-list :desc="desc" :options="pageOptions"> <basic-page-list :desc="desc" :options="pageOptions" ref="List">
<template v-slot:column1="{ row }"> <template v-slot:column1="{ row }">
<a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button> <a-button class="in" type="primary" @click="stockIn(row.id)">入库</a-button>
<a-button class="out" @click="stockOut(row.id)">出库</a-button> <a-button class="out" @click="stockOut(row.id)">出库</a-button>
</template> </template>
@ -13,7 +13,7 @@
<script> <script>
import BASE_URL from '@/services/mes/api.js'; import BASE_URL from '@/services/mes/api.js';
export default { export default {
i18n: require("../i18n"), i18n: require("../i18n"),
@ -100,8 +100,8 @@ export default {
], ],
disabledEdit:false, disabledEdit: false,
disabledAdd:true, disabledAdd: true,
// //
gridOptions: { // gridOptions: { //
height: '100%', // 100% height: '100%', // 100%
@ -122,7 +122,7 @@ export default {
{ field: 'stock', sortable: true, title: '库存数量', width: 100 }, // { field: 'stock', sortable: true, title: '库存数量', width: 100 }, //
{ field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, // { field: 'create_time', formatter: 'formatDate', width: 100, sortable: true, title: '创建时间', showHeaderOverflow: true }, //
{ field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, // { field: 'update_time', formatter: 'formatDate', width: 100, sortable: true, title: '更新时间', showHeaderOverflow: true }, //
{ field: 'id' , slots: { default: 'column1' }, sortable: true, title: '出入库操作', width: 160,fixed:"right" }, // { 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 ===============================
@ -155,20 +155,20 @@ 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.xGrid.commitProxy('query') this.$refs.List.gridReload()
} }
} }
}); });
}, },
@ -179,20 +179,20 @@ 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.xGrid.commitProxy('query') this.$refs.List.gridReload()
} }
} }
}); });
}, },