计划管理功能 12.17

zhc4dev
zhc077 2 years ago
parent 84b53db98c
commit ee30cbd299
  1. 226
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
  2. 11
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  3. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  4. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java

@ -10,36 +10,36 @@
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<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">-->
<!--&lt;!&ndash; <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>&ndash;&gt;-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button>-->
<!-- &lt;!&ndash; <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"&ndash;&gt;-->
<!-- &lt;!&ndash; @change="handleImportExcel">&ndash;&gt;-->
<!-- &lt;!&ndash; <a-button type="primary" icon="import">导入</a-button>&ndash;&gt;-->
<!-- &lt;!&ndash; </a-upload>&ndash;&gt;-->
<!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
<!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!-- <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 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"
@ -64,18 +64,18 @@
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a-divider type="vertical"/>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a @click="jumpPage1(record)">制定计划详情</a>
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="jumpPage1(record)">制定计划详情</a>-->
</span>
</a-table>
</div>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
@ -85,6 +85,8 @@ import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyPlanProcessList',
@ -94,7 +96,7 @@ export default {
},
data() {
return {
description: '计划工序制定数据列表',
description: '生产计划工序管理页面',
//
columns: [
{
@ -108,34 +110,48 @@ export default {
}
},
{
title: '生产计划id',
title: '计划id',
align: "center",
dataIndex: 'planId'
},
{
title: '车间名称',
title: '工单编号',
align: "center",
dataIndex: 'teamName'
dataIndex: 'workOrderId'
},
{
title: '工单编号',
title: '产品id',
align: "center",
dataIndex: 'productId'
}, {
title: '车间',
align: "center",
dataIndex: 'productCode'
dataIndex: 'departId'
},
{
title: '产品名称',
title: '工序id',
align: "center",
dataIndex: 'productCode2'
dataIndex: 'productProcessId'
},
{
title:'工序名称',
align:"center",
dataIndex: 'processId_dictText'
title: '工位list',
align: "center",
dataIndex: 'stationList.stationName'
},
{
title: '工具id列表',
align: "center",
dataIndex: 'toolsIds'
},
{
title: '工序id列表',
align: "center",
dataIndex: 'processIds'
},
{
title:'序号',
align:"center",
dataIndex: 'number'
title: '成员id列表',
align: "center",
dataIndex: 'userIds'
},
{
title: '操作',
@ -147,20 +163,25 @@ export default {
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",
// productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
// deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
// exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
// importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
}
},
// mounted() {
// this.loadData()
// },
created() {
this.getSuperFieldList();
// this.loadParameter();
},
computed: {
importExcelUrl: function () {
@ -168,8 +189,66 @@ export default {
},
},
methods: {
initDictConfig() {
// valueChange(value) {
// if (value) this.loadData()
// },
//
loadParameter() {
if (this.loadRouteType === false) {
this.planId = this.$route.query.planId;
// this.biaoTi = this.$route.query.styleNames+"";
console.log("*******传递的planId:" + this.planId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
@ -180,16 +259,17 @@ export default {
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyProductPlanList',
// query: { //
// 'stationId': record.id,
// 'stationName': record.stationName,
// },
});
},
// jumpPage1(record) {
// this.$router.push({
// // path: '/productplan/ZyProductPlanList',
// path: '/productplan/ZyPlanProcessDataList',
//
// // query: { //
// // 'stationId': record.id,
// // 'stationName': record.stationName,
// // },
// });
// },
// pf(record) {
// this.$router.push({
// path: '/productplan/ZyPlanProcessAddList',
@ -197,17 +277,17 @@ export default {
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// },
}
}

@ -181,12 +181,11 @@ export default {
},
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyProductPlanList',
// query: { //
// 'stationId': record.id,
// 'stationName': record.stationName,
// },
path: '/productplan/ZyPlanProcessDataList',
query: { //
'planId': record.planId,
// 'stationName': record.stationName,
},
});
},
// pf(record) {

@ -3,6 +3,7 @@ package org.jeecg.modules.productplan.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -68,9 +69,10 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
// IPage<ZyPlanProcess> pageList = zyPlanProcessService.getProcessDatalist(page, queryWrapper);
List<ProcessDataVo> pageList = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
return Result.OK(pageList);
List<ProcessDataVo> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
PageList<ProcessDataVo> processDataVos = new PageList<>(processDatalist, processDatalist.size());
return Result.OK(processDatalist);
}
/**

@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
@ -47,9 +48,10 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
String productCode = zyProductPlan.getProductCode();
String departId = zyProductPlan.getWorkshopId();
// TODO zy_product产品表,根据工单id获取产品id,
List<ProcessDataVo> result = new LinkedList<>();
//根据产品id获取产品工序列表
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "产品id"));
// List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "产品id"));
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "1"));
Optional.ofNullable(productProcessesList).orElse(new ArrayList<>()).forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
vo.setProductProcessId(e.getProcessId());
@ -57,8 +59,9 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
vo.setWorkOrderId(productCode);
vo.setDepartId(departId);
vo.setStationList(iStationService.list(new LambdaQueryWrapper<Station>().eq(Station::getDepartId, departId)));
result.add(vo);
});
return null;
return result;
}
}

Loading…
Cancel
Save