<template>
|
<a-card :bordered="false" title="生产订单">
|
<!-- 查询区域 -->
|
<div class="table-page-search-wrapper">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-row :gutter="24">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="生产订单号">
|
<j-input placeholder="请输入生产订单号" v-model="queryParam.orderCode"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="订单类型">
|
<j-dict-select-tag dictCode="orderCategory" placeholder="请输入订单类型"
|
v-model="queryParam.orderCategory"></j-dict-select-tag>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="物料编号">
|
<j-input placeholder="请输入物料编号" v-model="queryParam.materialNumber"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="物料名称">
|
<j-input placeholder="请输入物料名称" v-model="queryParam.materialName"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="订单状态">
|
<j-dict-select-tag dictCode="order_status" placeholder="请输入订单状态"
|
v-model="queryParam.order_status"></j-dict-select-tag>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="计划工艺路线">
|
<j-input placeholder="请输入计划工艺路线" v-model="queryParam.processRoute"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="计划物料清单">
|
<j-input placeholder="请输入计划物料清单" v-model="queryParam.materialListCode"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="工厂编码">
|
<j-input placeholder="请输入工厂编码" v-model="queryParam.factoryCode"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="工厂名称">
|
<j-input placeholder="请输入工厂名称" v-model="queryParam.factoryName"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="客户型号">
|
<j-input placeholder="请输入客户型号" v-model="queryParam.customerOrderModel"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="客户名称">
|
<j-input placeholder="请输入客户名称" v-model="queryParam.customer"></j-input>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
|
</span>
|
</a-col>
|
</a-row>
|
</a-form>
|
</div>
|
<!-- 查询区域-END -->
|
|
|
<!-- table区域-begin -->
|
<a-spin :spinning="confirmLoading">
|
<div>
|
<a-table
|
ref="table"
|
size="middle"
|
:scroll="{x:true}"
|
bordered
|
rowKey="id"
|
:columns="columns"
|
:dataSource="dataSource"
|
:pagination="ipagination"
|
:loading="loading"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}"
|
class="j-table-force-nowrap"
|
@change="handleTableChange">
|
|
<template slot="htmlSlot" slot-scope="text">
|
<div v-html="text"></div>
|
</template>
|
<template slot="imgSlot" slot-scope="text,record">
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
|
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
|
style="max-width:80px;font-size: 12px;font-style: italic;" />
|
</template>
|
<template slot="fileSlot" slot-scope="text">
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
<a-button
|
v-else
|
:ghost="true"
|
type="primary"
|
icon="download"
|
size="small"
|
@click="downloadFile(text)">
|
下载
|
</a-button>
|
</template>
|
|
<span slot="action" slot-scope="text, record">
|
<a @click="handleEdit(record)">编辑</a>
|
|
<a-divider type="vertical" />
|
<a-dropdown>
|
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
<a-menu slot="overlay">
|
<a-menu-item>
|
<a @click="handleDetail(record)">详情</a>
|
</a-menu-item>
|
<a-menu-item>
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
<a>删除</a>
|
</a-popconfirm>
|
</a-menu-item>
|
</a-menu>
|
</a-dropdown>
|
</span>
|
</a-table>
|
</div>
|
<a-tabs v-model="activeKey" @change="handleChangeTabs">
|
<a-tab-pane tab="工单报工" :key="refKeys1[0]" :forceRender="true">
|
<div style="display: flex; align-items: center; margin-bottom: 10px;">
|
</div>
|
<j-vxe-table
|
keep-source
|
:ref="refKeys1[0]"
|
:loading="mesWorkReporting.loading"
|
:columns="mesWorkReporting.columns"
|
:dataSource="mesWorkReporting.dataSource"
|
:maxHeight="300"
|
:rowNumber="true"
|
:rowSelection="true"
|
:toolbar="false">
|
</j-vxe-table>
|
</a-tab-pane>
|
<a-tab-pane tab="移库单打印" :key="refKeys2[0]" :forceRender="true">
|
<div style="display: flex; align-items: center; margin-bottom: 10px;">
|
</div>
|
<j-vxe-table
|
keep-source
|
:ref="refKeys2[0]"
|
:loading="mesTransferOrderPrint.loading"
|
:columns="mesTransferOrderPrint.columns"
|
:dataSource="mesTransferOrderPrint.dataSource"
|
:maxHeight="300"
|
:rowNumber="true"
|
:rowSelection="true"
|
:toolbar="false">
|
</j-vxe-table>
|
</a-tab-pane>
|
</a-tabs>
|
</a-spin>
|
<mes-production-order-modal ref="modalForm" @ok="modalFormOk"></mes-production-order-modal>
|
</a-card>
|
|
</template>
|
|
<script>
|
|
import '@/assets/less/TableExpand.less'
|
import { mixinDevice } from '@/utils/mixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import MesProductionOrderModal from './modules/MesProductionOrderModal'
|
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
|
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
|
import { JVXETypes } from '@/components/jeecg/JVxeTable'
|
import { getAction } from '@api/manage'
|
export default {
|
name: 'MesProductionOrderList',
|
mixins: [JeecgListMixin, mixinDevice,JVxeTableModelMixin,JVXETypes],
|
components: {
|
MesProductionOrderModal,
|
},
|
data() {
|
return {
|
description: 'SAP生产订单管理页面',
|
activeKey : 'mesWorkReporting',
|
// 工单报工
|
refKeys1: ['mesWorkReporting'],
|
tableKeys1: ['mesWorkReporting'],
|
//移库单打印
|
refKeys2: ['mesTransferOrderPrint'],
|
tableKeys2: ['mesTransferOrderPrint'],
|
|
// 表头
|
columns: [
|
{
|
title: '#',
|
dataIndex: '',
|
key: 'rowIndex',
|
width: 60,
|
align: 'center',
|
customRender: function(t, r, index) {
|
return parseInt(index) + 1
|
}
|
},
|
{
|
title: '生产订单号',
|
align: 'center',
|
dataIndex: 'orderCode'
|
},
|
{
|
title: '订单类型',
|
align: 'center',
|
dataIndex: 'orderCategory'
|
},
|
{
|
title: '物料编号',
|
align: 'center',
|
dataIndex: 'materialNumber'
|
},
|
{
|
title: '物料名称',
|
align: 'center',
|
dataIndex: 'materialName'
|
},
|
{
|
title: '计划开始日期',
|
align: 'center',
|
dataIndex: 'planStart'
|
},
|
{
|
title: '计划结束日期',
|
align: 'center',
|
dataIndex: 'planEnd'
|
},
|
{
|
title: '订单数量',
|
align: 'center',
|
dataIndex: 'orderQuantity'
|
},
|
{
|
title: '产品单位',
|
align: 'center',
|
dataIndex: 'productionUnit_dictText'
|
},
|
{
|
title: '订单状态',
|
align: 'center',
|
dataIndex: 'orderStatus_dictText'
|
},
|
{
|
title: '优先级',
|
align: 'center',
|
dataIndex: 'priority_dictText'
|
},
|
{
|
title: '计划工艺路线',
|
align: 'center',
|
dataIndex: 'processRoute'
|
},
|
{
|
title: '计划物料清单',
|
align: 'center',
|
dataIndex: 'materialListCode'
|
},
|
{
|
title: '工厂编码',
|
align: 'center',
|
dataIndex: 'factoryCode'
|
},
|
{
|
title: '工厂名称',
|
align: 'center',
|
dataIndex: 'factoryName'
|
},
|
{
|
title: '客户型号',
|
align: 'center',
|
dataIndex: 'customerOrderModel'
|
},
|
{
|
title: '客户名称',
|
align: 'center',
|
dataIndex: 'customer'
|
},
|
{
|
title: '备注',
|
align: 'center',
|
dataIndex: 'remark'
|
},
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align: 'center',
|
fixed: 'right',
|
width: 147,
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
mesWorkReporting: {
|
loading: false,
|
dataSource: [],
|
columns: [
|
{
|
title: '订单号',
|
key: 'orderCode',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '工单号',
|
key: 'workOrderCode',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '产线名称',
|
key: 'factoryName',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '批次号',
|
key: 'batchNumber',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '托号',
|
key: 'palletNumber',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '数量',
|
key: 'quantity',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '报工人',
|
key: 'reporter',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '报工时间',
|
key: 'reportTime',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '线边仓名称',
|
key: 'warehouseName',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '成品下线打印状态',
|
key: 'printStatus',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
]
|
},
|
mesTransferOrderPrint: {
|
loading: false,
|
dataSource: [],
|
columns: [
|
{
|
title: '订单号',
|
key: 'orderCode',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '移库单号',
|
key: 'workOrderCode',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '移库类型',
|
key: 'orderCategory',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '原库存地',
|
key: 'originalWarehouseName',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '目标库存地',
|
key: 'targetWarehouseName',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '托号',
|
key: 'palletNumber',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '数量',
|
key: 'quantity',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '操作人',
|
key: 'operator',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '操作时间',
|
key: 'operateTime',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
{
|
title: '移库单状态',
|
key: 'orderStatus',
|
type: JVXETypes.input,
|
width: '200px',
|
placeholder: '请输入${title}',
|
defaultValue: ''
|
},
|
]
|
},
|
url: {
|
list: '/mesproductionwork/mesProductionOrder/list',
|
delete: '/mesproductionwork/mesProductionOrder/delete',
|
deleteBatch: '/mesproductionwork/mesProductionOrder/deleteBatch',
|
exportXlsUrl: '/mesproductionwork/mesProductionOrder/exportXls',
|
importExcelUrl: 'mesproductionwork/mesProductionOrder/importExcel',
|
queryWorkReportingByOrderId:'/mesworkreporting/mesWorkReporting/queryWorkReportingByOrderId',
|
queryOrderPrintByOrderId:'/mestransferorderprint/mesTransferOrderPrint/queryOrderPrintByOrderId'
|
},
|
dictOptions: {},
|
superFieldList: []
|
}
|
},
|
created() {
|
this.getSuperFieldList()
|
},
|
computed: {
|
importExcelUrl: function() {
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
}
|
},
|
methods: {
|
//mesWorkReporting,mesTransferOrderPrint
|
async onSelectChange(selectedRowKeys) {
|
this.mesWorkReporting.loading = true
|
this.mesTransferOrderPrint.loading = true
|
|
this.selectedRowKeys = selectedRowKeys
|
this.mesWorkReporting.dataSource = []
|
this.mesTransferOrderPrint.dataSource = []
|
|
if (selectedRowKeys.length > 0) {
|
const selectedId = selectedRowKeys[0] // 选中行的id
|
let parm = {
|
'orderId': selectedId
|
}
|
const mesWorkReportingResult = await getAction(this.url.queryWorkReportingByOrderId, parm)
|
const mesTransferOrderPrintResult = await getAction(this.url.queryOrderPrintByOrderId, parm)
|
this.mesWorkReporting.dataSource = mesWorkReportingResult.result
|
this.mesTransferOrderPrint.dataSource = mesTransferOrderPrintResult.result
|
this.mesWorkReporting.loading = false
|
this.mesTransferOrderPrint.loading = false
|
}
|
},
|
|
initDictConfig() {
|
},
|
getSuperFieldList() {
|
let fieldList = []
|
fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'orderCode', text: '生产订单号', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'orderCategory', text: '订单类型', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编号', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' })
|
fieldList.push({ type: 'datetime', value: 'planStart', text: '计划开始日期' })
|
fieldList.push({ type: 'datetime', value: 'planEnd', text: '计划结束日期' })
|
fieldList.push({ type: 'double', value: 'orderQuantity', text: '订单数量', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'productionUnit', text: '产品单位', dictCode: 'production_unit' })
|
fieldList.push({ type: 'string', value: 'orderStatus', text: '订单状态', dictCode: 'order_status' })
|
fieldList.push({ type: 'string', value: 'priority', text: '优先级', dictCode: 'priority' })
|
fieldList.push({ type: 'string', value: 'processRoute', text: '计划工艺路线', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'materialListCode', text: '计划物料清单', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'factoryCode', text: '工厂编码', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'factoryName', text: '工厂名称', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'customerOrderModel', text: '客户型号', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'customer', text: '客户名称', dictCode: '' })
|
fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
|
this.superFieldList = fieldList
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
@import '~@assets/less/common.less';
|
</style>
|