<template>
|
<a-card :bordered="false">
|
<!-- 查询区域 -->
|
<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.workOrderCode"></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.materialNumber"></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="work_order_status" placeholder="请输入工单状态" v-model="queryParam.workOrderStatus"></j-dict-select-tag>
|
</a-form-item>
|
</a-col>
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
<a-form-item label="重发布人">
|
<j-select-user-by-dep placeholder="请输入重发布人" v-model="queryParam.republisher"></j-select-user-by-dep>
|
</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>
|
|
<div class="table-operator">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-menu slot="overlay">
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
|
</a-menu>
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
|
</a-dropdown>
|
</div>
|
<div>
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
|
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
|
</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}"
|
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>
|
|
<mes-production-work-order-modal ref="modalForm" @ok="modalFormOk"></mes-production-work-order-modal>
|
</a-card>
|
</template>
|
|
<script>
|
|
import '@/assets/less/TableExpand.less'
|
import { mixinDevice } from '@/utils/mixin'
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
import MesProductionWorkOrderModal from './modules/MesProductionWorkOrderModal'
|
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
|
|
export default {
|
name: 'MesProductionWorkOrderList',
|
mixins:[JeecgListMixin, mixinDevice],
|
components: {
|
MesProductionWorkOrderModal
|
},
|
data () {
|
return {
|
description: '排产工单管理页面',
|
// 表头
|
columns: [
|
{
|
title: '#',
|
dataIndex: '',
|
key:'rowIndex',
|
width:60,
|
align:"center",
|
customRender:function (t,r,index) {
|
return parseInt(index)+1;
|
}
|
},
|
{
|
title:'工单号(任务号)',
|
align:"center",
|
dataIndex: 'workOrderCode'
|
},
|
{
|
title:'物料编码',
|
align:"center",
|
dataIndex: 'materialNumber'
|
},
|
{
|
title:'物料名称',
|
align:"center",
|
dataIndex: 'materialName'
|
},
|
{
|
title:'计划生产数量',
|
align:"center",
|
dataIndex: 'planQuantity'
|
},
|
{
|
title:'产线(冗余)',
|
align:"center",
|
dataIndex: 'factoryId_dictText'
|
},
|
{
|
title:'班组',
|
align:"center",
|
dataIndex: 'groupId_dictText'
|
},
|
{
|
title:'班次(冗余)',
|
align:"center",
|
dataIndex: 'shiftId_dictText'
|
},
|
{
|
title:'排产日期',
|
align:"center",
|
dataIndex: 'workOrderDate'
|
},
|
{
|
title:'工单状态',
|
align:"center",
|
dataIndex: 'workOrderStatus_dictText'
|
},
|
{
|
title:'实际报工数量',
|
align:"center",
|
dataIndex: 'actualQuantity'
|
},
|
{
|
title:'发布人',
|
align:"center",
|
dataIndex: 'publisher'
|
},
|
{
|
title:'发布时间',
|
align:"center",
|
dataIndex: 'publishTime'
|
},
|
{
|
title:'重发布人',
|
align:"center",
|
dataIndex: 'republisher'
|
},
|
{
|
title:'重发布时间',
|
align:"center",
|
dataIndex: 'republishTime'
|
},
|
{
|
title: '操作',
|
dataIndex: 'action',
|
align:"center",
|
fixed:"right",
|
width:147,
|
scopedSlots: { customRender: 'action' }
|
}
|
],
|
url: {
|
list: "/mesproductionworkorder/mesProductionWorkOrder/list",
|
delete: "/mesproductionworkorder/mesProductionWorkOrder/delete",
|
deleteBatch: "/mesproductionworkorder/mesProductionWorkOrder/deleteBatch",
|
exportXlsUrl: "/mesproductionworkorder/mesProductionWorkOrder/exportXls",
|
importExcelUrl: "mesproductionworkorder/mesProductionWorkOrder/importExcel",
|
|
},
|
dictOptions:{},
|
superFieldList:[],
|
}
|
},
|
created() {
|
this.getSuperFieldList();
|
},
|
computed: {
|
importExcelUrl: function(){
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
},
|
},
|
methods: {
|
initDictConfig(){
|
},
|
getSuperFieldList(){
|
let fieldList=[];
|
fieldList.push({type:'int',value:'delFlag',text:'删除标记',dictCode:''})
|
fieldList.push({type:'string',value:'workOrderCode',text:'工单号(任务号)',dictCode:''})
|
fieldList.push({type:'string',value:'materialNumber',text:'物料编码',dictCode:''})
|
fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''})
|
fieldList.push({type:'double',value:'planQuantity',text:'计划生产数量',dictCode:''})
|
fieldList.push({type:'string',value:'factoryId',text:'产线ID(冗余)',dictCode:''})
|
fieldList.push({type:'string',value:'groupId',text:'班组ID',dictCode:''})
|
fieldList.push({type:'string',value:'shiftId',text:'班次ID(冗余)',dictCode:''})
|
fieldList.push({type:'datetime',value:'workOrderDate',text:'排产日期'})
|
fieldList.push({type:'string',value:'workOrderStatus',text:'工单状态',dictCode:'work_order_status'})
|
fieldList.push({type:'double',value:'actualQuantity',text:'实际报工数量',dictCode:''})
|
fieldList.push({type:'string',value:'publisher',text:'发布人',dictCode:''})
|
fieldList.push({type:'datetime',value:'publishTime',text:'发布时间'})
|
fieldList.push({type:'string',value:'republisher',text:'重发布人',dictCode:''})
|
fieldList.push({type:'datetime',value:'republishTime',text:'重发布时间'})
|
this.superFieldList = fieldList
|
}
|
}
|
}
|
</script>
|
<style scoped>
|
@import '~@assets/less/common.less';
|
</style>
|