diff --git a/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue b/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue index 2aea3c01..9472496d 100644 --- a/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue +++ b/src/views/inboundOutboundManagement/glassCakeOutbound/index.vue @@ -16,18 +16,19 @@ @size-change="sizeChange" @on-load="onLoad" @row-save="rowSave" + @sort-change="sortChange" > @@ -97,6 +98,7 @@ import addOut from './components/addDialog.vue'; import detailsDialog from './components/detailsDialog.vue'; import outboundDialog from './components/outboundDialog.vue'; import { getUserByRoleAlias } from '@/api/storeManagement/warehouseMaintenance'; +import { mapGetters } from 'vuex'; export default { components: { addOut, @@ -188,12 +190,14 @@ export default { label: '出库单号', prop: 'outCode', search: false, + sortable: 'custom', width: 150, }, { label: '生产单号', prop: 'yoCode', search: true, + sortable: 'custom', order: 2, width: 150, }, @@ -201,24 +205,28 @@ export default { label: '零件号', prop: 'partCode', search: false, + sortable: 'custom', width: 150, }, { label: '零件名称', prop: 'partName', search: false, + sortable: 'custom', width: 150, }, { label: '批次号', prop: 'piNo', search: false, + sortable: 'custom', width: 150, }, { label: '流程卡号', prop: 'cardNo', search: true, + sortable: 'custom', width: 150, order: 5, }, @@ -226,6 +234,7 @@ export default { label: '生产数量', prop: 'quantity', search: false, + sortable: 'custom', width: 120, }, @@ -234,36 +243,42 @@ export default { prop: 'goodsCode', search: true, width: 150, + sortable: 'custom', order: 4, }, { label: '物料名称', prop: 'goodsName', search: false, + sortable: 'custom', width: 150, }, { label: '物料需求数量', prop: 'requireQty', search: false, + sortable: 'custom', width: 120, }, { label: '库房', prop: 'shName', search: false, + sortable: 'custom', width: 120, }, { label: '库位', prop: 'location', search: false, + sortable: 'custom', width: 120, }, { label: '是否印字', prop: 'printMark', search: false, + sortable: 'custom', width: 120, type: 'select', dicData: [ @@ -281,30 +296,35 @@ export default { label: '粉重', prop: 'powderWeight', search: false, + sortable: 'custom', width: 120, }, { label: '材料号', prop: 'materialNo', search: false, + sortable: 'custom', width: 120, }, { label: '成型厚度', prop: 'thickness', search: false, + sortable: 'custom', width: 120, }, { label: '炉批号', prop: 'stovePiNo', search: false, + sortable: 'custom', width: 120, }, { label: '已出库数量', prop: 'outQty', search: false, + sortable: 'custom', width: 120, }, // { @@ -320,6 +340,7 @@ export default { search: true, width: 120, order: 3, + sortable: 'custom', searchLabelWidth: 60, type: 'select', dicData: [ @@ -347,6 +368,7 @@ export default { search: true, width: 120, searchLabelWidth: 100, + sortable: 'custom', hide: true, format: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD', @@ -365,6 +387,7 @@ export default { label: '创建时间', prop: 'createTime', search: false, + sortable: 'custom', width: 180, type: 'datetime', }, @@ -372,12 +395,14 @@ export default { label: '创建人', prop: 'createUserName', search: false, + sortable: 'custom', width: 120, }, { label: '出库时间', prop: 'outTime', search: false, + sortable: 'custom', width: 180, type: 'datetime', }, @@ -385,12 +410,14 @@ export default { label: '出库人', prop: 'outUserName', search: false, + sortable: 'custom', width: 120, }, { label: '领料人', prop: 'pickerName', search: false, + sortable: 'custom', width: 120, }, ], @@ -403,6 +430,9 @@ export default { approverList: [], //审批人列表 }; }, + computed: { + ...mapGetters(['permission']), + }, mounted() { this.getApproverList(); if (JSON.stringify(this.$store.state.client.pieOutParams) !== '{}') { @@ -411,6 +441,17 @@ export default { } }, methods: { + // 排序 + sortChange({ prop, order }) { + this.query.descs = undefined; + this.query.ascs = undefined; + let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); + // 重新加载数据 + this.onLoad(this.page, this.query); + }, getApproverList() { getUserByRoleAlias({ roleAlias: 'sj_craft' }).then(res => { this.approverList = res.data.data; diff --git a/src/views/inboundOutboundManagement/graphiteMoldOutbound/index.vue b/src/views/inboundOutboundManagement/graphiteMoldOutbound/index.vue index 259ec194..b08bac1b 100644 --- a/src/views/inboundOutboundManagement/graphiteMoldOutbound/index.vue +++ b/src/views/inboundOutboundManagement/graphiteMoldOutbound/index.vue @@ -16,17 +16,18 @@ @size-change="sizeChange" @on-load="onLoad" @row-save="rowSave" + @sort-change="sortChange" > @@ -89,6 +90,7 @@ import { getList, scrapOut, delIssue } from '@/api/storeManagement/graphiteMoldO import addOut from './components/addDialog.vue'; import outboundDialog from './components/outboundDialog.vue'; import { getUserByRoleAlias } from '@/api/storeManagement/warehouseMaintenance'; +import { mapGetters } from 'vuex'; export default { components: { addOut, @@ -180,24 +182,28 @@ export default { prop: 'outCode', search: false, width: 150, + sortable: 'custom', }, { label: '生产单号', prop: 'yoCode', search: true, order: 2, + sortable: 'custom', width: 150, }, { label: '批次号', prop: 'piNo', search: false, + sortable: 'custom', width: 150, }, { label: '流程卡号', prop: 'cardNo', search: true, + sortable: 'custom', width: 150, order: 5, }, @@ -208,6 +214,7 @@ export default { prop: 'goodsCode', search: true, width: 150, + sortable: 'custom', order: 4, }, { @@ -215,29 +222,34 @@ export default { prop: 'goodsName', search: false, width: 150, + sortable: 'custom', }, { label: '物料需求数量', prop: 'needQuantity', search: false, + sortable: 'custom', width: 120, }, { label: '库房', prop: 'shName', search: false, + sortable: 'custom', width: 120, }, { label: '库位', prop: 'location', search: false, + sortable: 'custom', width: 120, }, { label: '已出库数量', prop: 'outedQuantity', search: false, + sortable: 'custom', width: 120, }, { @@ -247,6 +259,7 @@ export default { width: 120, order: 3, searchLabelWidth: 60, + sortable: 'custom', type: 'select', dicData: [ { @@ -265,17 +278,20 @@ export default { search: false, width: 180, type: 'datetime', + sortable: 'custom', }, { label: '创建人', prop: 'createUserName', search: false, + sortable: 'custom', width: 120, }, { label: '出库时间', prop: 'outTime', search: false, + sortable: 'custom', width: 180, type: 'datetime', }, @@ -283,12 +299,14 @@ export default { label: '出库人', prop: 'outUserName', search: false, + sortable: 'custom', width: 120, }, { label: '领料人', prop: 'pickerName', search: false, + sortable: 'custom', width: 120, }, ], @@ -301,6 +319,9 @@ export default { approverList: [], //审批人列表 }; }, + computed: { + ...mapGetters(['permission']), + }, mounted() { this.getApproverList(); if (JSON.stringify(this.$store.state.client.pieOutParams) !== '{}') { @@ -309,6 +330,17 @@ export default { } }, methods: { + // 排序 + sortChange({ prop, order }) { + this.query.descs = undefined; + this.query.ascs = undefined; + let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); + // 重新加载数据 + this.onLoad(this.page, this.query); + }, getApproverList() { getUserByRoleAlias({ roleAlias: 'sj_craft' }).then(res => { this.approverList = res.data.data; diff --git a/src/views/inboundOutboundManagement/materialIssuing.vue b/src/views/inboundOutboundManagement/materialIssuing.vue index 376e5bb6..dd5e8832 100644 --- a/src/views/inboundOutboundManagement/materialIssuing.vue +++ b/src/views/inboundOutboundManagement/materialIssuing.vue @@ -18,6 +18,7 @@ @refresh-change="refreshChange" @on-load="onLoad" @row-save="rowSave" + @sort-change="sortChange" > @@ -58,6 +59,7 @@ import { batchIssue, } from '@/api/storeManagement/materialIssuing'; import editMaterial from './components/editMaterial.vue'; +import { mapGetters } from 'vuex'; export default { components: { editMaterial, @@ -128,6 +130,7 @@ export default { prop: 'crCode', span: 8, overflow: true, + sortable: 'custom', search: false, width: 160, }, @@ -136,6 +139,7 @@ export default { prop: 'goodsCode', span: 8, overflow: true, + // sortable: 'custom', search: true, width: 160, }, @@ -145,6 +149,7 @@ export default { span: 8, overflow: true, width: 120, + sortable: 'custom', search: true, }, { @@ -152,6 +157,7 @@ export default { prop: 'location', span: 8, overflow: true, + sortable: 'custom', width: 120, search: false, }, @@ -161,6 +167,7 @@ export default { span: 8, overflow: true, width: 120, + sortable: 'custom', search: false, }, { @@ -169,6 +176,7 @@ export default { span: 8, overflow: true, width: 120, + sortable: 'custom', search: false, }, { @@ -177,6 +185,7 @@ export default { span: 8, overflow: true, width: 120, + sortable: 'custom', search: false, }, { @@ -185,6 +194,7 @@ export default { span: 8, overflow: true, width: 120, + sortable: 'custom', search: false, }, { @@ -194,11 +204,13 @@ export default { width: 100, overflow: true, search: false, + sortable: 'custom', }, { label: '规格', prop: 'specifications', span: 8, + sortable: 'custom', overflow: true, search: false, width: 100, @@ -208,6 +220,7 @@ export default { prop: 'checkCode', span: 8, overflow: true, + sortable: 'custom', width: 150, search: false, }, @@ -216,6 +229,7 @@ export default { label: '总库存', prop: 'currentStock', width: 100, + // sortable: 'custom', span: 8, overflow: true, search: false, @@ -226,11 +240,13 @@ export default { prop: 'quantity', span: 8, overflow: true, + // sortable: 'custom', search: false, }, { label: '计量单位', prop: 'unitName', + sortable: 'custom', width: 100, span: 8, overflow: true, @@ -242,6 +258,7 @@ export default { prop: 'pendingApplyQty', span: 8, overflow: true, + // sortable: 'custom', width: 100, search: false, }, @@ -250,6 +267,7 @@ export default { prop: 'outQuantity', span: 8, overflow: true, + // sortable: 'custom', width: 100, search: false, }, @@ -259,6 +277,7 @@ export default { prop: 'memo', span: 8, overflow: true, + sortable: 'custom', search: false, width: 130, }, @@ -267,6 +286,9 @@ export default { searchForm: {}, }; }, + computed: { + ...mapGetters(['permission']), + }, created() { if (JSON.stringify(this.$store.state.client.exchangeOutParams) !== '{}') { this.query = this.$store.state.client.exchangeOutParams; @@ -274,6 +296,17 @@ export default { } }, methods: { + // 排序 + sortChange({ prop, order }) { + this.query.descs = undefined; + this.query.ascs = undefined; + let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs'; + this.query[orderByFieldKey] = !prop + ? undefined + : prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); + // 重新加载数据 + this.onLoad(this.page, this.query); + }, changeCode(val) { if (this.checkCode == '') return; this.query.crCode = this.checkCode; diff --git a/src/views/inboundOutboundManagement/otherIssuing/index.vue b/src/views/inboundOutboundManagement/otherIssuing/index.vue index e7fb09c3..e39ca4e4 100644 --- a/src/views/inboundOutboundManagement/otherIssuing/index.vue +++ b/src/views/inboundOutboundManagement/otherIssuing/index.vue @@ -17,6 +17,7 @@ @refresh-change="refreshChange" @on-load="onLoad" :before-open="beforeOpen" + @sort-change="sortChange" > @@ -84,6 +89,7 @@