| | |
| | | <template> |
| | | <a-card :bordered="false" title="上料"> |
| | | <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-search-select-tag placeholder="请输入工工单号" v-model="queryParam.workOrderId" dict="mes_production_work_order,work_order_code,id"></j-search-select-tag> |
| | | <a-form-item label="产线"> |
| | | <j-tree-select placeholder="请选择产线" dict="base_factory,factory_name,id" pid-field="parent_id" |
| | | v-model="queryParam.factoryId" style="width: 100%"></j-tree-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设备ID"> |
| | | <j-input placeholder="请输入设备ID" v-model="queryParam.equipmentId"></j-input> |
| | | <a-form-item label="工单号"> |
| | | <j-search-select-tag placeholder="请输入工工单号" v-model="queryParam.workOrderId" |
| | | dict="mes_production_work_order,work_order_code,id"></j-search-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设备"> |
| | | <j-search-select-tag placeholder="请选择设备" v-model="queryParam.equipmentId" |
| | | dict="eam_equipment,equipment_name,id,del_flag=0"></j-search-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="物料编码"> |
| | | <j-input dictCode="work_order_status" placeholder="请输入物料编码" v-model="queryParam.materialNumber"></j-input> |
| | | <a-input dictCode="work_order_status" placeholder="请输入物料编码" |
| | | v-model="queryParam.materialNumber"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="物料名称"> |
| | | <j-input dictCode="work_order_status" placeholder="请输入物料名称" v-model="queryParam.materialName"></j-input> |
| | | <a-input dictCode="work_order_status" placeholder="请输入物料名称" |
| | | v-model="queryParam.materialName"></a-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.batchNumber"></j-input> |
| | | <a-input placeholder="请输入批次号" v-model="queryParam.batchNumber"></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <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> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? '收起' : '展开' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </div> |
| | | <!-- 查询区域-END --> |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <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> |
| | | |
| | | <!-- table区域-begin --> |
| | | <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-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'}" |
| | | :customRow="clickSelect" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <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> |
| | | |
| | | <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"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="下料" :key="refKeys[0]" :forceRender="true"> |
| | | <a-table |
| | | :ref="refKeys[0]" |
| | | :loading="mesMaterialUnloading.loading" |
| | | :columns="mesMaterialUnloading.columns" |
| | | :dataSource="mesMaterialUnloading.dataSource" |
| | | :pagination="false" |
| | | :scroll="{ y: 300 }" |
| | | size="middle" |
| | | bordered> |
| | | </a-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | <mes-material-loading-modal ref="modalForm" @ok="modalFormOk"></mes-material-loading-modal> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MesMaterialLoadingModal from './modules/MesMaterialLoadingModal' |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MesMaterialLoadingModal from './modules/MesMaterialLoadingModal' |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@/components/jeecg/JVxeTable' |
| | | import { getAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'MesMaterialLoadingList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | MesMaterialLoadingModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '上料管理页面', |
| | | // 表头 |
| | | export default { |
| | | name: 'MesMaterialLoadingList', |
| | | mixins: [JeecgListMixin, mixinDevice,JVxeTableModelMixin,JVXETypes], |
| | | components: { |
| | | MesMaterialLoadingModal |
| | | }, |
| | | data() { |
| | | return { |
| | | description: '上料管理页面', |
| | | refKeys: ['mesMaterialUnloading'], |
| | | tableKeys: ['mesMaterialUnloading'], |
| | | activeKey: 'mesMaterialUnloading', |
| | | // 表头 |
| | | 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: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '工序编码', |
| | | align: 'center', |
| | | dataIndex: 'processCode' |
| | | }, |
| | | { |
| | | title: '工序名称', |
| | | align: 'center', |
| | | dataIndex: 'processName' |
| | | }, |
| | | { |
| | | title: '物料编码', |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title: '物料名称', |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title: '批次号', |
| | | align: 'center', |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title: '数量', |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title: '剩余数量', |
| | | align: 'center', |
| | | dataIndex: 'remainingQuantity' |
| | | }, |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align: 'center', |
| | | // fixed: 'right', |
| | | // width: 147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | mesMaterialUnloading: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title:'工单号', |
| | | align:"center", |
| | | dataIndex: 'workOrderId_dictText' |
| | | }, |
| | | { |
| | | title:'设备ID', |
| | | align:"center", |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title:'工序编码', |
| | | align:"center", |
| | | dataIndex: 'processCode' |
| | | }, |
| | | { |
| | | title:'工序名称', |
| | | align:"center", |
| | | dataIndex: 'processName' |
| | | }, |
| | | { |
| | | title:'物料编码', |
| | | align:"center", |
| | | title: '物料编码', |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title:'物料名称', |
| | | align:"center", |
| | | title: '物料名称', |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'批次号', |
| | | align:"center", |
| | | title: '批次号', |
| | | align: 'center', |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title:'数量', |
| | | align:"center", |
| | | title: '数量', |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'剩余数量', |
| | | align:"center", |
| | | dataIndex: 'remainingQuantity' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/mes/mesMaterialLoading/list", |
| | | delete: "/mes/mesMaterialLoading/delete", |
| | | deleteBatch: "/mes/mesMaterialLoading/deleteBatch", |
| | | exportXlsUrl: "/mes/mesMaterialLoading/exportXls", |
| | | importExcelUrl: "mes/mesMaterialLoading/importExcel", |
| | | |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | ] |
| | | }, |
| | | url: { |
| | | list: '/mes/mesMaterialLoading/list', |
| | | delete: '/mes/mesMaterialLoading/delete', |
| | | deleteBatch: '/mes/mesMaterialLoading/deleteBatch', |
| | | exportXlsUrl: '/mes/mesMaterialLoading/exportXls', |
| | | importExcelUrl: 'mes/mesMaterialLoading/importExcel', |
| | | queryUnloadingByLoadingId:'/mes/mesMaterialLoading/queryUnloadingByLoadingId' |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList() |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function() { |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig() { |
| | | }, |
| | | onSelectChange(selectedRowKeys, selectionRows) { |
| | | this.selectedRowKeys = selectedRowKeys; |
| | | this.selectionRows = selectionRows; |
| | | this.selectTabData(selectedRowKeys[0]) |
| | | }, |
| | | clickSelect(record) { |
| | | return { |
| | | on: { |
| | | click: () => { |
| | | this.selectedRowKeys = [record.id] |
| | | this.selectTabData(record.id) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | selectTabData(id) { |
| | | this.mesMaterialUnloading.loading = true |
| | | getAction(this.url.queryUnloadingByLoadingId, { 'loadingId': id }).then(res => { |
| | | if (res.success) { |
| | | this.mesMaterialUnloading.dataSource = res.result |
| | | } |
| | | }).finally(() => { |
| | | this.mesMaterialUnloading.loading = false |
| | | }) |
| | | }, |
| | | 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:'workOrderId',text:'工单ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentId',text:'设备ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'processCode',text:'工序编码',dictCode:''}) |
| | | fieldList.push({type:'string',value:'processName',text:'工序名称',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialNumber',text:'物料编码',dictCode:''}) |
| | | fieldList.push({type:'string',value:'materialName',text:'物料名称',dictCode:''}) |
| | | fieldList.push({type:'string',value:'batchNumber',text:'批次号',dictCode:''}) |
| | | fieldList.push({type:'double',value:'quantity',text:'数量',dictCode:''}) |
| | | fieldList.push({type:'double',value:'remainingQuantity',text:'剩余数量',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | } |
| | | getSuperFieldList() { |
| | | let fieldList = [] |
| | | fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'workOrderId', text: '工单ID', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'equipmentId', text: '设备ID', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'processCode', text: '工序编码', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'processName', text: '工序名称', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'materialNumber', text: '物料编码', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'materialName', text: '物料名称', dictCode: '' }) |
| | | fieldList.push({ type: 'string', value: 'batchNumber', text: '批次号', dictCode: '' }) |
| | | fieldList.push({ type: 'double', value: 'quantity', text: '数量', dictCode: '' }) |
| | | fieldList.push({ type: 'double', value: 'remainingQuantity', text: '剩余数量', dictCode: '' }) |
| | | this.superFieldList = fieldList |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |