| | |
| | | NODE_ENV=production |
| | | VUE_APP_API_BASE_URL=http://127.0.0.1:9989 |
| | | VUE_APP_API_BASE_URL=http://10.210.199.3:6099 |
| | | VUE_APP_CAS_BASE_URL=http://localhost:8888/cas |
| | | VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview |
| | |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | |
| | | </a-table> |
| | | </div> |
| | | <!-- 库存统计表格 --> |
| | | <div style="margin-top: 20px;"> |
| | | <a-card title="库存统计"> |
| | | <a-table |
| | | :pagination="statisticsPagination" |
| | | :columns="statisticsColumns"/>in |
| | | :dataSource="statisticsData" |
| | | :loading="statisticsLoading" |
| | | bordered |
| | | size="middle"> |
| | | <span slot="inventoryStatus" slot-scope="text"> |
| | | <a-tag :color="getTagColor(text)">{{ text }}</a-tag> |
| | | </span> |
| | | /> |
| | | </a-card> |
| | | </div> |
| | | |
| | | <cutting-inventory-modal ref="modalForm" @ok="modalFormOk"></cutting-inventory-modal> |
| | |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | // 统计表格列定义 |
| | | statisticsColumns: [ |
| | | { |
| | | title:'刀具编码', |
| | | align:"center", |
| | | dataIndex: 'cuttingCode', |
| | | customRender: (text, record, index) => { |
| | | const obj = { |
| | | children: text, |
| | | attrs: {} |
| | | }; |
| | | // 设置合并逻辑 |
| | | if (record.rowSpan !== undefined) { |
| | | obj.attrs.rowSpan = record.rowSpan; |
| | | } else { |
| | | obj.attrs.rowSpan = 1; |
| | | } |
| | | return obj; |
| | | } |
| | | }, |
| | | { |
| | | title: '库存状态', |
| | | dataIndex: 'inventoryStatus', |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: '数量', |
| | | dataIndex: 'cuttingIdNumber', |
| | | align: "center" |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/cms/cuttingInventory/list", |
| | | delete: "/cms/cuttingInventory/delete", |
| | | deleteBatch: "/cms/cuttingInventory/deleteBatch", |
| | | exportXlsUrl: "/cms/cuttingInventory/exportXls", |
| | | importExcelUrl: "cms/cuttingInventory/importExcel", |
| | | |
| | | statistics: "/cms/cuttingInventory/statistics" // 添加统计接口地址 |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | // 统计数据 |
| | | statisticsData: [], |
| | | statisticsLoading: false, |
| | | |
| | | // 为主表格保留原有的分页配置 |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | // 为统计表格添加单独的分页配置 |
| | | statisticsPagination: { |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' 共' + total + '条' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | this.getSuperFieldList(); |
| | | this.loadStatisticsData(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | |
| | | fieldList.push({type:'string',value:'inventoryStatus',text:'库存状态'}) |
| | | fieldList.push({type:'number',value:'currentLife',text:'当前寿命(百分比)'}) |
| | | this.superFieldList = fieldList |
| | | }, |
| | | // 加载统计信息 |
| | | loadStatisticsData() { |
| | | this.statisticsLoading = true; |
| | | // 调用后端接口获取统计数据 |
| | | this.$http({ |
| | | url: this.url.statistics, |
| | | method: "get", |
| | | params: { |
| | | ...this.getQueryParams(), |
| | | pageNo: this.statisticsPagination.current, |
| | | pageSize: this.statisticsPagination.pageSize |
| | | } |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | // 更新统计表格的分页总数 |
| | | this.statisticsPagination.total = res.result.total; |
| | | // 对数据进行合并处理,使用 res.result.records 而不是 res.result |
| | | this.statisticsData = this.mergeStatisticsData(res.result.records); |
| | | } |
| | | this.statisticsLoading = false; |
| | | }).catch(() => { |
| | | this.statisticsLoading = false; |
| | | }); |
| | | }, |
| | | |
| | | // 根据状态返回标签颜色 |
| | | getTagColor(status) { |
| | | const colorMap = { |
| | | '正常': 'green', |
| | | '已出库': 'orange', |
| | | }; |
| | | return colorMap[status]; |
| | | }, |
| | | |
| | | // 重写搜索方法,在搜索完成后加载统计信息 |
| | | searchQuery() { |
| | | this.loadData(1); |
| | | // 搜索完成后加载统计信息 |
| | | this.$nextTick(() => { |
| | | this.loadStatisticsData(); |
| | | }); |
| | | }, |
| | | |
| | | // 重写重置方法 |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | | this.loadData(1); |
| | | this.$nextTick(() => { |
| | | this.loadStatisticsData(); |
| | | }); |
| | | }, |
| | | |
| | | // 重写加载数据方法 |
| | | loadData(arg) { |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//查询条件 |
| | | this.loading = true; |
| | | this.$http({ |
| | | url: this.url.list, |
| | | method: "get", |
| | | params: params |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | this.dataSource = res.result.records; |
| | | this.ipagination.total = res.result.total; |
| | | |
| | | // 加载统计信息 |
| | | this.loadStatisticsData(); |
| | | } |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | // 合并统计数据方法 |
| | | mergeStatisticsData(data) { |
| | | if (!data || data.length === 0) return []; |
| | | |
| | | const grouped = {}; |
| | | |
| | | // 按刀具编码分组 |
| | | data.forEach(item => { |
| | | const key = item.cuttingCode; |
| | | if (!grouped[key]) { |
| | | grouped[key] = { |
| | | cuttingCode: item.cuttingCode, |
| | | cuttingId: item.cuttingId, |
| | | statuses: [] |
| | | }; |
| | | } |
| | | // 使用 item.inventoryStatus 和 item.cuttingIdNumber |
| | | grouped[key].statuses.push({ |
| | | status: item.inventoryStatus, |
| | | count: item.cuttingIdNumber |
| | | }); |
| | | }); |
| | | |
| | | // 转换为表格需要的格式,并添加行合并信息 |
| | | const result = []; |
| | | Object.values(grouped).forEach(group => { |
| | | const statuses = group.statuses; |
| | | const totalCount = statuses.reduce((sum, s) => sum + s.count, 0); |
| | | |
| | | // 第一行显示刀具编码,设置rowSpan |
| | | result.push({ |
| | | cuttingCode: group.cuttingCode, |
| | | cuttingId: group.cuttingId, |
| | | inventoryStatus: `${statuses[0].status}:${statuses[0].count}`, |
| | | cuttingIdNumber: totalCount, |
| | | rowSpan: statuses.length // 合并的行数 |
| | | }); |
| | | |
| | | // 剩余行只显示状态信息,刀具编码列rowSpan为0 |
| | | for (let i = 1; i < statuses.length; i++) { |
| | | result.push({ |
| | | cuttingCode: group.cuttingCode, |
| | | cuttingId: group.cuttingId, |
| | | inventoryStatus: `${statuses[i].status}:${statuses[i].count}`, |
| | | cuttingIdNumber: totalCount, |
| | | rowSpan: 0 // 表示被合并 |
| | | }); |
| | | } |
| | | }); |
| | | return result; |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | |
| | | <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.factoryId" |
| | | dict="base_factory,factory_name,id,del_flag=0 and factory_category = '3'" |
| | | ></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.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,del_flag=0 and work_order_status != 'NEW'"></j-search-select-tag> |
| | | </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.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-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="是否齐备"> |
| | | <a-select |
| | | placeholder="请选择是否齐备" |
| | | v-model="queryParam.checkFlag" |
| | | allowClear |
| | | > |
| | | <a-select-option value="是">是</a-select-option> |
| | | <a-select-option value="否">否</a-select-option> |
| | | </a-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="物料名称"> |
| | | <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="是否齐备"> |
| | | <a-select |
| | | placeholder="请选择是否齐备" |
| | | v-model="queryParam.checkFlag" |
| | | allowClear |
| | | > |
| | | <a-select-option value="1">是</a-select-option> |
| | | <a-select-option value="0">否</a-select-option> |
| | | </a-select> |
| | | </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> |
| | |
| | | <!-- 查询区域-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> |
| | | <!-- <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> |
| | | <!-- <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" |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :rowSelection="null" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </span> |
| | | <span slot="checkFlag" slot-scope="text, record"> |
| | | <span v-if="text === '0'" style="color: red">否</span> |
| | | <span v-if="text === '1'" style="color: green">是</span> |
| | | </span> |
| | | |
| | | </a-table> |
| | |
| | | { |
| | | title:'是否齐备', |
| | | align:"center", |
| | | dataIndex: 'checkFlag' |
| | | dataIndex: 'checkFlag', |
| | | scopedSlots: { customRender: 'checkFlag' } |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/mes/mesKittingCompletenessCheck/list", |
| | |
| | | <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.factoryId" |
| | | dict="base_factory,factory_name,id,del_flag=0 and factory_category = '3'" |
| | | ></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.workOrderId" |
| | |
| | | </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.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> |
| | |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type: 'radio'}" |
| | | :customRow="clickSelect" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | |
| | | </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 |
| | | <a-table |
| | | :ref="refKeys[0]" |
| | | :loading="mesMaterialUnloading.loading" |
| | | :columns="mesMaterialUnloading.columns" |
| | | :dataSource="mesMaterialUnloading.dataSource" |
| | | :maxHeight="300" |
| | | :rowNumber="true" |
| | | :rowSelection="true" |
| | | :toolbar="false" |
| | | /> |
| | | :pagination="false" |
| | | :scroll="{ y: 300 }" |
| | | size="middle" |
| | | bordered> |
| | | </a-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | | </a-spin> |
| | |
| | | { |
| | | title: '工单号', |
| | | align: 'center', |
| | | dataIndex: 'workOrderId_dictText' |
| | | dataIndex: 'workOrderCode' |
| | | }, |
| | | { |
| | | title: '设备ID', |
| | | title: '设备', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId' |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '工序编码', |
| | |
| | | align: 'center', |
| | | dataIndex: 'remainingQuantity' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // 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: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: '物料编码', |
| | | key: 'materialNumber', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | align: 'center', |
| | | dataIndex: 'materialNumber' |
| | | }, |
| | | { |
| | | title: '物料名称', |
| | | key: 'materialName', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | align: 'center', |
| | | dataIndex: 'materialName' |
| | | }, |
| | | { |
| | | title: '批次号', |
| | | key: 'batchNumber', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | align: 'center', |
| | | dataIndex: 'batchNumber' |
| | | }, |
| | | { |
| | | title: '数量', |
| | | key: 'quantity', |
| | | type: JVXETypes.input, |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '' |
| | | align: 'center', |
| | | dataIndex: 'quantity' |
| | | } |
| | | ] |
| | | }, |
| | |
| | | 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 |
| | | 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) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | 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 |
| | | }) |
| | | }, |
| | | getSuperFieldList() { |
| | | let fieldList = [] |
| | | fieldList.push({ type: 'int', value: 'delFlag', text: '删除标记', dictCode: '' }) |
| | |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchDel"> |
| | | <a-menu-item key="1" @click="batchPublish"> |
| | | <a-icon type="check-circle" theme="filled" /> |
| | | 发布 |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="batchRequest"> |
| | | <a-icon type="check-square" theme="filled" /> |
| | | 请求WMS |
| | | </a-menu-item> |
| | | <a-menu-item key="3" @click="batchDel"> |
| | | <a-icon type="delete" /> |
| | | 删除 |
| | | </a-menu-item> |
| | |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | <span slot="action" slot-scope="text, record"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | |
| | | <a-divider type="vertical" /> |
| | | <a @click="handleEdit(record)" v-if="record.publishStatus === 'WAIT_PUBLISH'">编辑</a> |
| | | <a-divider type="vertical" v-if="record.publishStatus === 'WAIT_PUBLISH'" /> |
| | | <a-popconfirm title="确定发布吗?" @confirm="() => handlePublish(record.id)" v-if="record.publishStatus === 'WAIT_PUBLISH'"> |
| | | <a>发布</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" v-if="record.publishStatus === 'WAIT_PUBLISH'" /> |
| | | <a-popconfirm title="确定请求WMS吗?" @confirm="() => handleRequest(record.id)" v-if="record.publishStatus === 'PUBLISHED' && record.requestStatus === 'WAIT_REQUEST'"> |
| | | <a>请求WMS</a> |
| | | </a-popconfirm> |
| | | <a-divider type="vertical" v-if="record.publishStatus === 'PUBLISHED' && record.requestStatus === 'WAIT_REQUEST'" /> |
| | | <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-menu-item v-if="record.publishStatus === 'WAIT_PUBLISH'"> |
| | | <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a>删除</a> |
| | | </a-popconfirm> |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import MesMaterialTransferRequestModal from './modules/MesMaterialTransferRequestModal' |
| | | import { putAction } from '@api/manage' |
| | | |
| | | export default { |
| | | name: 'MesMaterialTransferRequestList', |
| | |
| | | url: { |
| | | list: '/mes/mesMaterialTransferRequest/list', |
| | | delete: '/mes/mesMaterialTransferRequest/delete', |
| | | deleteBatch: '/mes/mesMaterialTransferRequest/deleteBatch' |
| | | deleteBatch: '/mes/mesMaterialTransferRequest/deleteBatch', |
| | | publish: '/mes/mesMaterialTransferRequest/publish', |
| | | publishBatch: '/mes/mesMaterialTransferRequest/publishBatch', |
| | | request: '/mes/mesMaterialTransferRequest/request', |
| | | requestBatch: '/mes/mesMaterialTransferRequest/requestBatch' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: {} |
| | | methods: { |
| | | handlePublish(id) { |
| | | if(!this.url.publish){ |
| | | this.$message.error("请设置url.publish属性!") |
| | | return |
| | | } |
| | | let that = this; |
| | | putAction(that.url.publish, {id: id}).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | handleRequest(id) { |
| | | if(!this.url.request){ |
| | | this.$message.error("请设置url.request属性!") |
| | | return |
| | | } |
| | | let that = this; |
| | | putAction(that.url.request, {id: id}).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | that.loadData(); |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message:'消息', |
| | | description:res.message |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | batchPublish() { |
| | | if (!this.url.publishBatch) { |
| | | this.$message.error('请设置url.publishBatch属性!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择一条记录' |
| | | }) |
| | | } else { |
| | | let ids = '' |
| | | for (let a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | let that = this |
| | | this.$confirm({ |
| | | title: '确认发布', |
| | | content: '是否发布选中数据?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | putAction(that.url.publishBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | batchRequest() { |
| | | if (!this.url.requestBatch) { |
| | | this.$message.error('请设置url.requestBatch属性!') |
| | | return |
| | | } |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | // this.$message.warning('请选择一条记录!'); |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择一条记录' |
| | | }) |
| | | } else { |
| | | let ids = '' |
| | | for (let a = 0; a < this.selectedRowKeys.length; a++) { |
| | | ids += this.selectedRowKeys[a] + ',' |
| | | } |
| | | let that = this |
| | | this.$confirm({ |
| | | title: '确认请求WMS', |
| | | content: '是否将选中数据请求WMS?', |
| | | onOk: function() { |
| | | that.loading = true |
| | | putAction(that.url.requestBatch, { ids: ids }).then((res) => { |
| | | if (res.success) { |
| | | // that.$message.success(res.message); |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | that.onClearSelected() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="产线"> |
| | | <j-tree-select dict="base_factory,factory_name,id" pid-field="parent_id" |
| | | v-model="queryParam.factoryId" style="width: 100%"></j-tree-select> |
| | | <j-search-select-tag placeholder="请选择" v-model="queryParam.factoryId" |
| | | dict="base_factory,factory_name,id,del_flag=0 and factory_category = '3'" |
| | | ></j-search-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | |
| | | :scroll="{ y: 300 }" |
| | | size="middle" |
| | | bordered> |
| | | <span slot="checkFlag" slot-scope="text, record"> |
| | | <span v-if="text === '0'" style="color: red">否</span> |
| | | <span v-if="text === '1'" style="color: green">是</span> |
| | | </span> |
| | | </a-table> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | |
| | | title: '是否齐备', |
| | | align: 'center', |
| | | dataIndex: 'checkFlag', |
| | | customRender: function(text) { |
| | | return text === '0' ? '否' : text === '1' ? '是' : '' |
| | | } |
| | | scopedSlots: { customRender: 'checkFlag' } |
| | | } |
| | | ] |
| | | }, |
| | |
| | | <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.factoryId" |
| | | dict="base_factory,factory_name,id,del_flag=0 and factory_category = '3'" |
| | | ></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.orderId" |
| | | dict="mes_production_order,order_code,id" |
| | |
| | | <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" |
| | | dict="mes_production_work_order,work_order_code,id,del_flag=0 and work_order_status != 'NEW'" |
| | | ></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 |
| | | dict="base_factory,factory_name,id" |
| | | placeholder="请选择产线名称" |
| | | v-model="queryParam.factoryId" |
| | | display="factoryName" |
| | | codeField="id" |
| | | /> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="批次号"> |
| | | <j-input placeholder="请输入批次号" v-model="queryParam.batchNumber"></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.palletNumber"></j-input> |
| | | </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.reporter"></j-select-user-by-dep> |
| | | </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.warehouseId" |
| | | dict="base_line_side_warehouse,warehouse_name,id,del_flag=0 and warehouse_status = '1'" |
| | | ></j-search-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.batchNumber"></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.palletNumber"></j-input> |
| | | </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.reporter"></j-select-user-by-dep> |
| | | </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.warehouseId" |
| | | dict="base_line_side_warehouse,warehouse_name,id" |
| | | ></j-search-select-tag> |
| | | </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> |
| | |
| | | |
| | | <!-- 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> |
| | | <!-- <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" |
| | |
| | | :dataSource="dataSource" |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
| | | :rowSelection="null" |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | |
| | | } |
| | | }, |
| | | { |
| | | title:'订单ID', |
| | | title:'生产订单号', |
| | | align:"center", |
| | | dataIndex: 'orderId_dictText' |
| | | }, |
| | | { |
| | | title:'工单ID', |
| | | title:'排产工单号', |
| | | align:"center", |
| | | dataIndex: 'workOrderId_dictText' |
| | | }, |
| | | { |
| | | title:'产线ID', |
| | | title:'产线', |
| | | align:"center", |
| | | dataIndex: 'factoryId_dictText' |
| | | }, |
| | |
| | | dataIndex: 'quantity' |
| | | }, |
| | | { |
| | | title:'线边仓', |
| | | align:"center", |
| | | dataIndex: 'warehouseId_dictText' |
| | | }, |
| | | { |
| | | title:'报工人', |
| | | align:"center", |
| | | dataIndex: 'reporter' |
| | |
| | | align:"center", |
| | | dataIndex: 'reportTime' |
| | | }, |
| | | { |
| | | title:'线边仓ID', |
| | | align:"center", |
| | | dataIndex: 'warehouseId_dictText' |
| | | }, |
| | | { |
| | | title:'成品下线打印状态', |
| | | align:"center", |
| | | dataIndex: 'printStatus_dictText' |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | // { |
| | | // title:'成品下线打印状态', |
| | | // align:"center", |
| | | // dataIndex: 'printStatus_dictText' |
| | | // }, |
| | | // { |
| | | // title: '操作', |
| | | // dataIndex: 'action', |
| | | // align:"center", |
| | | // fixed:"right", |
| | | // width:147, |
| | | // scopedSlots: { customRender: 'action' } |
| | | // } |
| | | ], |
| | | url: { |
| | | list: "/mes/mesWorkReporting/list", |
| | |
| | | <a-form-model-item label="起始库存地点" :labelCol="labelCol" :wrapperCol="wrapperCol" |
| | | prop="originalWarehouseId"> |
| | | <j-dict-select-tag type="list" v-model="model.originalWarehouseId" dictCode="original_warehouse_list" |
| | | placeholder="请选择起始库存地点" /> |
| | | placeholder="请选择起始库存地点" :disabled="formDisabled || editable" /> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-form-model-item label="任务号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderCode"> |
| | | <work-order-select-modal :workOrder="workOrderObj" :submitDisabled="formDisabled" |
| | | <work-order-select-modal :workOrder="workOrderObj" :submitDisabled="formDisabled || editable" |
| | | orderStatus="PUBLISHED" @ok="selectConfirm"></work-order-select-modal> |
| | | </a-form-model-item> |
| | | </a-col> |
| | |
| | | sm: { span: 16 } |
| | | }, |
| | | confirmLoading: false, |
| | | editable: false, |
| | | validatorRules: { |
| | | originalWarehouseId: [ |
| | | { required: true, message: '起始库存地点必选', trigger: 'change' } |
| | |
| | | this.model.workOrderCode = this.model.workOrderId_dictText |
| | | this.visible = true |
| | | if (this.model.workOrderId) { |
| | | this.editable = true; |
| | | let workOrderRes = await this.loadProductionWorkOrder(this.model.workOrderId) |
| | | if(!workOrderRes.success || !workOrderRes.result) { |
| | | return; |
| | |
| | | this.model.targetWarehouseId = undefined |
| | | this.model.warehouseName = '' |
| | | } |
| | | }else { |
| | | this.editable = false; |
| | | } |
| | | }, |
| | | async selectConfirm(rows) { |
| | |
| | | <a-row :gutter="12"> |
| | | <a-col :span="7"> |
| | | <a-form-item label="产线" :label-col="{span: 6}" :wrapper-col="{span: 18}"> |
| | | <j-tree-select dict="base_factory,factory_name,id" pid-field="parent_id" |
| | | v-model="queryParam.factoryId" style="width: 100%"></j-tree-select> |
| | | <j-search-select-tag placeholder="请选择" v-model="queryParam.factoryId" |
| | | dict="base_factory,factory_name,id,del_flag=0 and factory_category = '3'" |
| | | ></j-search-select-tag> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="9"> |