diff --git a/.env.dev b/.env.dev index 93e957d9..abd002b5 100644 --- a/.env.dev +++ b/.env.dev @@ -13,11 +13,11 @@ VUE_APP_TITLE = MES系统 # 芋道管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.0.33:48082' +# VUE_APP_BASE_API = 'http://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48080' # VUE_APP_BASE_API = 'http://192.168.1.8:48080' -# VUE_APP_BASE_API = 'http://192.168.1.56:48080' +VUE_APP_BASE_API = 'http://192.168.1.56:48080' # VUE_APP_BASE_API = 'http://192.168.1.188:48080' diff --git a/src/api/base/equipment.js b/src/api/base/equipment.js index 8c1b4246..0a4fd0ab 100644 --- a/src/api/base/equipment.js +++ b/src/api/base/equipment.js @@ -55,7 +55,7 @@ export function exportEquipmentExcel(query) { // 获得所有设备列表 export function getEquipmentAll() { return request({ - url: '/base/equipment/listAll', + url: '/base/core-equipment/listAll', method: 'get' }) } diff --git a/src/api/base/groupTeamScheduling.js b/src/api/base/groupTeamScheduling.js index 35f754bf..be88f707 100644 --- a/src/api/base/groupTeamScheduling.js +++ b/src/api/base/groupTeamScheduling.js @@ -26,12 +26,3 @@ export function autoSet(query) { params: query }) } - -// 获得排班信息分页 建议size 150 -export function groupTeamSchedulingPage(query) { - return request({ - url: '/base/group-team-scheduling/page', - method: 'get', - params: query - }) -} \ No newline at end of file diff --git a/src/api/base/orderManage.js b/src/api/base/orderManage.js index 8f8d1cf5..9114d63c 100644 --- a/src/api/base/orderManage.js +++ b/src/api/base/orderManage.js @@ -34,6 +34,14 @@ export function getOrderCode() { }) } +// 获取工单code +export function getWorkOrderCode() { + return request({ + url: '/base/order/getWorkOrderCode', + method: 'get' + }) +} + // 获得订单 export function getOrderById(query) { return request({ @@ -41,4 +49,48 @@ export function getOrderById(query) { method: 'get', params: query }) -} \ No newline at end of file +} + +// 获得工艺流程列表 +export function getProcessFlowList() { + return request({ + url: '/extend/process-flow/listAll', + method: 'get' + }) +} + +// 创建订单 +export function orderCreate(data) { + return request({ + url: '/base/order/create', + method: 'post', + data: data + }) +} + +// 更新订单 +export function orderUpdate(data) { + return request({ + url: '/base/order/update', + method: 'put', + data: data + }) +} + +// 删除订单 +export function orderDelete(query) { + return request({ + url: '/base/order/delete', + method: 'delete', + params: query + }) +} + +// 下发订单,绑定的穿工单id,新建不传 +export function orderIssue(data) { + return request({ + url: '/base/order/issue', + method: 'post', + data: data + }) +} diff --git a/src/api/monitoring/teamProduction.js b/src/api/monitoring/teamProduction.js new file mode 100644 index 00000000..5c257193 --- /dev/null +++ b/src/api/monitoring/teamProduction.js @@ -0,0 +1,19 @@ +import request from '@/utils/request' + +// 获得排班信息分页 建议size 150 +export function groupTeamSchedulingPage(query) { + return request({ + url: '/base/group-team-scheduling/page', + method: 'get', + params: query + }) +} + +// 获得不同产线每小时报废数据,用于班组检测 班组生产情况详情(动态结构) +export function getSchedulingMonitoringRecord(query) { + return request({ + url: '/base/quality-inspection-record/getSchedulingMonitoringRecord', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/utils/dict.js b/src/utils/dict.js index a7621c32..f90ec7c2 100644 --- a/src/utils/dict.js +++ b/src/utils/dict.js @@ -89,8 +89,6 @@ export const DICT_TYPE = { // ============== ENERGY - 能源模块 ============= ENERGY_UNIT: 'energy_unit', - - // ============== ENERGY - 能源模块 ============= EQU_ALARM_LEVEL: 'equ_alarm_level', MONITOR_INDEX_TYPE: 'monitor_index_type', OBJECT_TYPE: 'object_type', @@ -99,8 +97,9 @@ export const DICT_TYPE = { // ============== ORDER - 订单模块 ============= ORDER_STATUS: 'order_status', - ORDER_ORIGIN: 'order_origin', - ORDER_PRIORITY: 'order_priority' + ORDER_ORIGIN: 'order_Origin', + ORDER_PRIORITY: 'order_priority', + PACK_SPEC: 'pack_spec' } /** diff --git a/src/views/energy/monitoring/orderEnergy/index.vue b/src/views/energy/monitoring/orderEnergy/index.vue index 9918fe5b..847d7003 100644 --- a/src/views/energy/monitoring/orderEnergy/index.vue +++ b/src/views/energy/monitoring/orderEnergy/index.vue @@ -96,7 +96,7 @@ const tableProps = [ } ] import { getEnergyTypeListAll } from '@/api/base/energyType' -import { orderList, workOrderList } from '@/api/base/orderManage' +import { workOrderList } from '@/api/base/orderManage' import { getWorkOrderMsg, getOrderEnergyData } from '@/api/monitoring/orderEnergy' import BarChart from "./components/barChart" export default { @@ -104,25 +104,21 @@ export default { data() { return { formConfig: [ - { - type: 'select', - label: '订单', - selectOptions: [], - param: 'energyTypeId' - }, { type: 'select', label: '工单', selectOptions: [], - param: 'energyTypeId1' + param: 'workOrderId', + clearable: false }, { type: 'select', label: '能源类型', selectOptions: [], - param: 'energyTypeId2', + param: 'objType', filterable: true, - width: 120 + width: 120, + clearable: false }, { type: 'select', @@ -130,8 +126,9 @@ export default { selectOptions: this.getDictDatas(this.DICT_TYPE.OBJECT_TYPE), labelField: 'label', valueField: 'value', - param: 'energyTypeId3', - width: 100 + param: 'energyTypeId', + width: 100, + clearable: false }, { type: 'button', @@ -145,8 +142,9 @@ export default { tableH: this.tableHeight(400), // 查询参数 queryParams: { - pageNo: 1, - pageSize: 10000 + workOrderId: '', + objType: '', + energyTypeId: '' }, orderMsg: {}, chartData: [], @@ -162,34 +160,38 @@ export default { }, methods: { getListArr() { - getEnergyTypeListAll().then(res => { - this.formConfig[2].selectOptions = res.data || [] - }) - orderList().then(res => { - console.log(res) - }) workOrderList().then(res => { - console.log(res) + this.formConfig[0].selectOptions = res.data || [] + }) + getEnergyTypeListAll().then(res => { + this.formConfig[1].selectOptions = res.data || [] }) }, - buttonClick() { - getWorkOrderMsg({ - "workOrderId": 1, - "objType": "3", - "energyTypeId": '1681183397517406210' - }).then(res => { - console.log(res) + buttonClick(val) { + if (!val.workOrderId) { + this.$modal.msgWarning('工单不能为空') + return false + } + if (!val.objType) { + this.$modal.msgWarning('能源类型不能为空') + return false + } + if (!val.energyTypeId) { + this.$modal.msgWarning('对象维度不能为空') + return false + } + this.queryParams.workOrderId = val.workOrderId + this.queryParams.objType = val.objType + this.queryParams.energyTypeId = val.energyTypeId + getWorkOrderMsg({ ...this.queryParams }).then(res => { this.orderMsg = res.data || {} getOrderEnergyData({ - "workOrderId": 1, - "objType": "3", - "energyTypeId": '1681183397517406210', - "startProduceTime": "1694239523000", - "finishProduceTime": "1694498723000" - }).then(res => { - console.log(res) - this.tableData = res.data || [] - this.chartData = res.data || [] + ...this.queryParams, + startProduceTime: res.data.startProduceTime || '', + finishProduceTime: res.data.finishProduceTime || '' + }).then(result => { + this.tableData = result.data || [] + this.chartData = result.data || [] }) }) }, diff --git a/src/views/group/monitoring/groupTeamScheduling/components/schedulingMonitoringDetail.vue b/src/views/group/monitoring/groupTeamScheduling/components/schedulingMonitoringDetail.vue deleted file mode 100644 index 99934d85..00000000 --- a/src/views/group/monitoring/groupTeamScheduling/components/schedulingMonitoringDetail.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue b/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue index 702ab09f..bdf1eba9 100644 --- a/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue +++ b/src/views/group/monitoring/groupTeamView/components/groupTeamViewDetail.vue @@ -64,14 +64,12 @@ export default { }, methods: { init(params) { - console.log(params) this.visible = true this.queryParams = params getByTeam({ teamId: this.queryParams.teamId, workOrderId: this.queryParams.workOrderId }).then(res => { - console.log(res) this.tableData = res.data || [] }) } diff --git a/src/views/group/monitoring/groupTeamView/index.vue b/src/views/group/monitoring/groupTeamView/index.vue index 63e0f837..7a5a6e1f 100644 --- a/src/views/group/monitoring/groupTeamView/index.vue +++ b/src/views/group/monitoring/groupTeamView/index.vue @@ -61,10 +61,11 @@ export default { return { formConfig: [ { - type: 'input', - label: '工单名称', - placeholder: '工单名称', - param: 'cnName' + type: 'select', + label: '工单', + selectOptions: [], + param: 'workOrderId', + clearable: false }, { type: 'button', @@ -79,7 +80,8 @@ export default { pageSize: 1000, workOrderId: '' }, - workOrderName: '工单名称ddd', + workOrderList: [], + workOrderName: '', tableBtn, tableProps, tableH: this.tableHeight(220), @@ -92,33 +94,42 @@ export default { window.addEventListener('resize', () => { this.tableH = this.tableHeight(220) }) + this.getOrderList() }, methods: { // 获取工单list getOrderList() { workOrderList().then(res => { - + console.log(res) + this.formConfig[0].selectOptions = res.data || [] + this.workOrderList = res.data || [] }) }, // 查询 buttonClick(val) { - // this.queryParams.workOrderId = val.id - this.queryParams.workOrderId = 1 + if (!val.workOrderId) { + this.$modal.msgWarning('工单不能为空') + return false + } + this.queryParams.workOrderId = val.workOrderId this.getList() }, // 获取table数据 getList() { getByWorkOrder({ id: this.queryParams.workOrderId }).then(res => { - console.log(res) - this.list = res.data + this.list = res.data || [] }) }, handleClick(val) { - console.log(val) this.paramVisible = true let params = {} params.teamId = val.data.id params.teamName = val.data.name + this.workOrderList.map(item => { + if (this.queryParams.workOrderId === item.id) { + this.workOrderName = item.name + } + }) params.workOrderId = this.queryParams.workOrderId params.workOrderName = this.workOrderName this.$nextTick(() => { diff --git a/src/views/group/monitoring/teamProduction/components/teamProductionDetail.vue b/src/views/group/monitoring/teamProduction/components/teamProductionDetail.vue new file mode 100644 index 00000000..a681e8c0 --- /dev/null +++ b/src/views/group/monitoring/teamProduction/components/teamProductionDetail.vue @@ -0,0 +1,162 @@ + + + \ No newline at end of file diff --git a/src/views/group/monitoring/groupTeamScheduling/index.vue b/src/views/group/monitoring/teamProduction/index.vue similarity index 89% rename from src/views/group/monitoring/groupTeamScheduling/index.vue rename to src/views/group/monitoring/teamProduction/index.vue index 3e3c6e09..c5fce23c 100644 --- a/src/views/group/monitoring/groupTeamScheduling/index.vue +++ b/src/views/group/monitoring/teamProduction/index.vue @@ -30,13 +30,13 @@ @pagination="getList" /> - + \ No newline at end of file diff --git a/src/views/order/base/orderManage/components/bindWorkOrder.vue b/src/views/order/base/orderManage/components/bindWorkOrder.vue new file mode 100644 index 00000000..48d07d70 --- /dev/null +++ b/src/views/order/base/orderManage/components/bindWorkOrder.vue @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/src/views/order/base/orderManage/components/orderAdd.vue b/src/views/order/base/orderManage/components/orderAdd.vue index 9462cff6..4a5317b5 100644 --- a/src/views/order/base/orderManage/components/orderAdd.vue +++ b/src/views/order/base/orderManage/components/orderAdd.vue @@ -20,7 +20,7 @@ - + + :key="item.id" + :label="item.name" + :value="item.id"> @@ -72,7 +72,14 @@ - + + + + @@ -86,7 +93,7 @@ @@ -105,20 +112,24 @@ - + - + @@ -142,9 +153,10 @@ \ No newline at end of file