| | |
| | | <template> |
| | | <a-card :bordered="false" title="上料"> |
| | | <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-search-select-tag placeholder="请输入工工单号" v-model="queryParam.workOrderId" dict="mes_production_work_order,work_order_code,id"></j-search-select-tag> |
| | | <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-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.materialNumber"></j-input> |
| | | <j-input dictCode="work_order_status" 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 dictCode="work_order_status" placeholder="请输入物料名称" v-model="queryParam.materialName"></j-input> |
| | | <j-input dictCode="work_order_status" placeholder="请输入物料名称" |
| | | v-model="queryParam.materialName"></j-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | |
| | | </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 --> |
| | | <a-spin :spinning="confirmLoading"> |
| | | <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" |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | |
| | | </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;"/> |
| | | <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-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | |
| | | <a-tabs v-model="activeKey" @change="handleChangeTabs"> |
| | | <a-tab-pane tab="下料" :key="refKeys[0]" :forceRender="true"> |
| | | <div style="display: flex; align-items: center; margin-bottom: 10px;"> |
| | | </div> |
| | | <j-vxe-table |
| | | keep-source |
| | | :ref="refKeys[0]" |
| | | :loading="mesMaterialUnloading.loading" |
| | | :columns="mesMaterialUnloading.columns" |
| | | :dataSource="mesMaterialUnloading.dataSource" |
| | | :maxHeight="300" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="false" |
| | | /> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | | <mes-material-loading-modal ref="modalForm" @ok="modalFormOk"></mes-material-loading-modal> |
| | | </a-card> |
| | | </template> |
| | |
| | | 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], |
| | | mixins: [JeecgListMixin, mixinDevice,JVxeTableModelMixin,JVXETypes], |
| | | components: { |
| | | MesMaterialLoadingModal |
| | | }, |
| | | data () { |
| | | return { |
| | | description: '上料管理页面', |
| | | refKeys: ['mesMaterialUnloading'], |
| | | tableKeys: ['mesMaterialUnloading'], |
| | | activeKey: 'mesMaterialUnloading', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | align: 'center', |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title:'工单号', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'workOrderId_dictText' |
| | | }, |
| | | { |
| | | title:'设备ID', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'equipmentId' |
| | | }, |
| | | { |
| | | title:'工序编码', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'processCode' |
| | | }, |
| | | { |
| | | title:'工序名称', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'processName' |
| | | }, |
| | | { |
| | | title:'物料编码', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title:'物料名称', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title:'批次号', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title:'数量', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'剩余数量', |
| | | align:"center", |
| | | align: 'center', |
| | | dataIndex: 'remainingQuantity' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | mesMaterialUnloading: { |
| | | loading: false, |
| | | dataSource: [], |
| | | columns: [ |
| | | // { |
| | | // title: '上料', |
| | | // key: 'loadingId', |
| | | // type: JVXETypes.input, |
| | | // width: '200px', |
| | | // placeholder: '请输入${title}', |
| | | // defaultValue: '' |
| | | // }, |
| | | { |
| | | title: '物料编码', |
| | | key: 'materialNumber', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '物料名称', |
| | | key: 'materialName', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '批次号', |
| | | key: 'batchNumber', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | }, |
| | | { |
| | | title: '数量', |
| | | key: 'quantity', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | } |
| | | ] |
| | | }, |
| | | url: { |
| | | list: "/mes/mesMaterialLoading/list", |
| | | delete: "/mes/mesMaterialLoading/delete", |
| | | deleteBatch: "/mes/mesMaterialLoading/deleteBatch", |
| | | exportXlsUrl: "/mes/mesMaterialLoading/exportXls", |
| | | importExcelUrl: "mes/mesMaterialLoading/importExcel", |
| | | |
| | | 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:[], |
| | | superFieldList: [] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | this.getSuperFieldList() |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` |
| | | } |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | async onSelectChange(selectedRowKeys) { |
| | | this.mesMaterialUnloading.loading = true |
| | | // 单选模式下,selectedRowKeys 是数组,但长度最多为1 |
| | | console.log('点击了---->',selectedRowKeys[0]) |
| | | this.selectedRowKeys = selectedRowKeys |
| | | this.mesMaterialUnloading.dataSource=[] |
| | | // 获取选中行的完整数据 |
| | | if (selectedRowKeys.length > 0) { |
| | | const selectedId = selectedRowKeys[0] // 选中行的id |
| | | const mesMaterialUnloading = await getAction(this.url.queryUnloadingByLoadingId, { 'loadingId': selectedId }) |
| | | this.mesMaterialUnloading.dataSource = mesMaterialUnloading.result |
| | | this.mesMaterialUnloading.loading = false |
| | | } |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | 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:''}) |