|
|
@@ -8,6 +8,9 @@
|
|
|
:datasource="datasource"
|
|
|
:selection.sync="selection"
|
|
|
row-key="id"
|
|
|
+ cache-key="entrust_list_data"
|
|
|
+ :height="tableHeight"
|
|
|
+ @fullscreen-change="fullscreenChange"
|
|
|
>
|
|
|
<template v-slot:type="{ row }">
|
|
|
<span> {{ getDictValue('请托类型', row.type + '') }}</span>
|
|
|
@@ -128,252 +131,261 @@
|
|
|
</ele-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
- <script>
|
|
|
-import OrderSearch from './components/order-search.vue';
|
|
|
-import dictMixins from '@/mixins/dictMixins';
|
|
|
-import Create from './components/create';
|
|
|
-import {
|
|
|
- getWarehouseList
|
|
|
|
|
|
- // queryKilnXCH
|
|
|
-} from '@/api/mes';
|
|
|
-import { getList, remove, submit, warehouseEntry } from '@/api/entrust/index';
|
|
|
+<script>
|
|
|
+ import OrderSearch from './components/order-search.vue';
|
|
|
+ import dictMixins from '@/mixins/dictMixins';
|
|
|
+ import Create from './components/create';
|
|
|
+ import {
|
|
|
+ getWarehouseList
|
|
|
|
|
|
-export default {
|
|
|
- components: {
|
|
|
- OrderSearch,
|
|
|
- Create
|
|
|
- },
|
|
|
- mixins: [dictMixins],
|
|
|
- data() {
|
|
|
- return {
|
|
|
- visible: false,
|
|
|
- loading: false,
|
|
|
- id: '',
|
|
|
- warehouseId: '',
|
|
|
- selection: [],
|
|
|
- warehouseList: []
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- // 表格列配置
|
|
|
- columns() {
|
|
|
- return [
|
|
|
- {
|
|
|
- columnKey: 'selection',
|
|
|
- type: 'selection',
|
|
|
- width: 45,
|
|
|
- align: 'center',
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- columnKey: 'index',
|
|
|
- label: '序号',
|
|
|
- type: 'index',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- fixed: 'left'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'type',
|
|
|
- label: '类型',
|
|
|
- width: 55,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- slot: 'type'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'priority',
|
|
|
- label: '紧急程度',
|
|
|
- width: 90,
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return cellValue == 1 ? '一般' : cellValue == 2 ? '紧急' : '';
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'code',
|
|
|
- label: '编码',
|
|
|
- align: 'center',
|
|
|
- width: 160,
|
|
|
- showOverflowTooltip: true,
|
|
|
- slot: 'code'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'name',
|
|
|
- label: '名称',
|
|
|
- width: 130,
|
|
|
- showOverflowTooltip: true,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'workOrderCode',
|
|
|
- label: '工单编码',
|
|
|
- width: 160,
|
|
|
- showOverflowTooltip: true,
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'procedureList',
|
|
|
- width: 130,
|
|
|
- showOverflowTooltip: true,
|
|
|
-
|
|
|
- label: '工序',
|
|
|
- align: 'center',
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return cellValue.map((item) => item.produceTaskName).toString();
|
|
|
- }
|
|
|
- },
|
|
|
+ // queryKilnXCH
|
|
|
+ } from '@/api/mes';
|
|
|
+ import { getList, remove, submit, warehouseEntry } from '@/api/entrust/index';
|
|
|
|
|
|
- // {
|
|
|
- // prop: 'a',
|
|
|
- // label: '关联名称',
|
|
|
- // align: 'center'
|
|
|
- // },
|
|
|
- {
|
|
|
- prop: 'factoriesName',
|
|
|
- label: '所属工厂',
|
|
|
- align: 'center',
|
|
|
- width: 130,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'pleaseEntrustDeptName',
|
|
|
- label: '请托部门',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'pleaseEntrustUserName',
|
|
|
- label: '请托人',
|
|
|
- align: 'center',
|
|
|
- width: 80,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'beEntrustedFactoriesName',
|
|
|
- label: '受托工厂',
|
|
|
- align: 'center',
|
|
|
- width: 130,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'beEntrustedDeptName',
|
|
|
- label: '受托部门',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'finishTime',
|
|
|
- label: '完成时间',
|
|
|
- align: 'center',
|
|
|
- width: 150,
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'describes',
|
|
|
- label: '需求描述',
|
|
|
- align: 'center',
|
|
|
- showOverflowTooltip: true
|
|
|
- },
|
|
|
- {
|
|
|
- prop: 'status',
|
|
|
- label: '状态',
|
|
|
- align: 'center',
|
|
|
- slot: 'status',
|
|
|
- width: 80,
|
|
|
- showOverflowTooltip: true,
|
|
|
- formatter: (row, column, cellValue) => {
|
|
|
- return cellValue == 0
|
|
|
- ? '草稿'
|
|
|
- : cellValue == 1
|
|
|
- ? '审核中'
|
|
|
- : cellValue == 2
|
|
|
- ? '审核通过'
|
|
|
- : '';
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- columnKey: 'action',
|
|
|
- label: '操作',
|
|
|
- width: 240,
|
|
|
- align: 'center',
|
|
|
- resizable: false,
|
|
|
- fixed: 'right',
|
|
|
- slot: 'action',
|
|
|
- showOverflowTooltip: true
|
|
|
- }
|
|
|
- ];
|
|
|
- }
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.requestDict('请托类型');
|
|
|
- getWarehouseList().then((res) => {
|
|
|
- this.warehouseList = res;
|
|
|
- });
|
|
|
- },
|
|
|
- filters: {},
|
|
|
- methods: {
|
|
|
- /* 表格数据源 */
|
|
|
- datasource({ page, limit, where }) {
|
|
|
- return getList({
|
|
|
- pageNum: page,
|
|
|
- size: limit,
|
|
|
- ...where
|
|
|
- });
|
|
|
- },
|
|
|
- open(type, row) {
|
|
|
- this.$refs.create.open(type, row);
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ OrderSearch,
|
|
|
+ Create
|
|
|
},
|
|
|
- openWarehouseEntry(id) {
|
|
|
- this.id = id;
|
|
|
- this.visible = true;
|
|
|
+ mixins: [dictMixins],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ visible: false,
|
|
|
+ loading: false,
|
|
|
+ id: '',
|
|
|
+ warehouseId: '',
|
|
|
+ selection: [],
|
|
|
+ warehouseList: [],
|
|
|
+ tableHeight: 'calc(100vh - 340px)'
|
|
|
+ };
|
|
|
},
|
|
|
- warehouseEntry() {
|
|
|
- if(!this.warehouseId){
|
|
|
- this.$message.error('请选择仓库');
|
|
|
- return
|
|
|
+ computed: {
|
|
|
+ // 表格列配置
|
|
|
+ columns() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ columnKey: 'selection',
|
|
|
+ type: 'selection',
|
|
|
+ width: 45,
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'index',
|
|
|
+ label: '序号',
|
|
|
+ type: 'index',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'type',
|
|
|
+ label: '类型',
|
|
|
+ width: 55,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'type'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'priority',
|
|
|
+ label: '紧急程度',
|
|
|
+ width: 90,
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 1 ? '一般' : cellValue == 2 ? '紧急' : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'code',
|
|
|
+ label: '编码',
|
|
|
+ align: 'center',
|
|
|
+ width: 160,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'code'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '名称',
|
|
|
+ width: 130,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'workOrderCode',
|
|
|
+ label: '工单编码',
|
|
|
+ width: 160,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'procedureList',
|
|
|
+ width: 130,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+
|
|
|
+ label: '工序',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue.map((item) => item.produceTaskName).toString();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ // {
|
|
|
+ // prop: 'a',
|
|
|
+ // label: '关联名称',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ prop: 'factoriesName',
|
|
|
+ label: '所属工厂',
|
|
|
+ align: 'center',
|
|
|
+ width: 130,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'pleaseEntrustDeptName',
|
|
|
+ label: '请托部门',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'pleaseEntrustUserName',
|
|
|
+ label: '请托人',
|
|
|
+ align: 'center',
|
|
|
+ width: 80,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'beEntrustedFactoriesName',
|
|
|
+ label: '受托工厂',
|
|
|
+ align: 'center',
|
|
|
+ width: 130,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'beEntrustedDeptName',
|
|
|
+ label: '受托部门',
|
|
|
+ align: 'center',
|
|
|
+ width: 120,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'finishTime',
|
|
|
+ label: '完成时间',
|
|
|
+ align: 'center',
|
|
|
+ width: 150,
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'describes',
|
|
|
+ label: '需求描述',
|
|
|
+ align: 'center',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态',
|
|
|
+ align: 'center',
|
|
|
+ slot: 'status',
|
|
|
+ width: 80,
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ formatter: (row, column, cellValue) => {
|
|
|
+ return cellValue == 0
|
|
|
+ ? '草稿'
|
|
|
+ : cellValue == 1
|
|
|
+ ? '审核中'
|
|
|
+ : cellValue == 2
|
|
|
+ ? '审核通过'
|
|
|
+ : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 240,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ fixed: 'right',
|
|
|
+ slot: 'action',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ];
|
|
|
}
|
|
|
- warehouseEntry({
|
|
|
- id:this.id,
|
|
|
- warehouseId:this.warehouseId
|
|
|
- }).then(res=>{
|
|
|
- this.reload();
|
|
|
- this.visible = false;
|
|
|
- })
|
|
|
},
|
|
|
- remove(id) {
|
|
|
- let ids = id || this.selection.map((item) => item.id);
|
|
|
- remove(ids).then((res) => {
|
|
|
- this.$message.success('删除' + res);
|
|
|
- this.reload();
|
|
|
+ created() {
|
|
|
+ this.requestDict('请托类型');
|
|
|
+ getWarehouseList().then((res) => {
|
|
|
+ this.warehouseList = res;
|
|
|
});
|
|
|
},
|
|
|
+ filters: {},
|
|
|
+ methods: {
|
|
|
+ /* 表格数据源 */
|
|
|
+ datasource({ page, limit, where }) {
|
|
|
+ return getList({
|
|
|
+ pageNum: page,
|
|
|
+ size: limit,
|
|
|
+ ...where
|
|
|
+ });
|
|
|
+ },
|
|
|
+ open(type, row) {
|
|
|
+ this.$refs.create.open(type, row);
|
|
|
+ },
|
|
|
+ openWarehouseEntry(id) {
|
|
|
+ this.id = id;
|
|
|
+ this.visible = true;
|
|
|
+ },
|
|
|
+ warehouseEntry() {
|
|
|
+ if (!this.warehouseId) {
|
|
|
+ this.$message.error('请选择仓库');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ warehouseEntry({
|
|
|
+ id: this.id,
|
|
|
+ warehouseId: this.warehouseId
|
|
|
+ }).then((res) => {
|
|
|
+ this.reload();
|
|
|
+ this.visible = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ remove(id) {
|
|
|
+ let ids = id || this.selection.map((item) => item.id);
|
|
|
+ remove(ids).then((res) => {
|
|
|
+ this.$message.success('删除' + res);
|
|
|
+ this.reload();
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
- submit(item) {
|
|
|
- submit({
|
|
|
- businessId: item.id,
|
|
|
- beEntrustedDeptId: item.beEntrustedDeptId
|
|
|
- }).then((res) => {
|
|
|
- this.$message.success('提交' + res.message);
|
|
|
- this.reload();
|
|
|
- this.visible = false;
|
|
|
- });
|
|
|
- },
|
|
|
- /* 刷新表格 */
|
|
|
- reload(where) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.table.reload({ page: 1, where });
|
|
|
- });
|
|
|
+ submit(item) {
|
|
|
+ submit({
|
|
|
+ businessId: item.id,
|
|
|
+ beEntrustedDeptId: item.beEntrustedDeptId
|
|
|
+ }).then((res) => {
|
|
|
+ this.$message.success('提交' + res.message);
|
|
|
+ this.reload();
|
|
|
+ this.visible = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /* 刷新表格 */
|
|
|
+ reload(where) {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.table.reload({ page: 1, where });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ fullscreenChange(fullscreen) {
|
|
|
+ if (fullscreen) {
|
|
|
+ this.tableHeight = 'calc(100vh - 120px)';
|
|
|
+ } else {
|
|
|
+ this.tableHeight = 'calc(100vh - 340px)';
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
-
|
|
|
- <style lang="scss" scoped></style>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|