计划管理功能 12.17

zhc4dev
zhc077 2 years ago
parent 84b53db98c
commit ee30cbd299
  1. 202
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
  2. 9
      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 --> <!-- 查询区域-END -->
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <!-- <div class="table-operator">-->
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <!--&lt;!&ndash; <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>&ndash;&gt;-->
<a-button type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button> <!-- <a-button type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"--> <!-- &lt;!&ndash; <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"&ndash;&gt;-->
<!-- @change="handleImportExcel">--> <!-- &lt;!&ndash; @change="handleImportExcel">&ndash;&gt;-->
<!-- <a-button type="primary" icon="import">导入</a-button>--> <!-- &lt;!&ndash; <a-button type="primary" icon="import">导入</a-button>&ndash;&gt;-->
<!-- </a-upload>--> <!-- &lt;!&ndash; </a-upload>&ndash;&gt;-->
<!-- 高级查询区域 --> <!-- &lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal"-->
@handleSuperQuery="handleSuperQuery"></j-super-query> <!-- @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<a-menu slot="overlay"> <!-- <a-menu slot="overlay">-->
<a-menu-item key="1" @click="batchDel"> <!-- <a-menu-item key="1" @click="batchDel">-->
<a-icon type="delete"/> <!-- <a-icon type="delete"/>-->
删除 <!-- 删除-->
</a-menu-item> <!-- </a-menu-item>-->
</a-menu> <!-- </a-menu>-->
<a-button style="margin-left: 8px"> 批量操作 <!-- <a-button style="margin-left: 8px"> 批量操作-->
<a-icon type="down"/> <!-- <a-icon type="down"/>-->
</a-button> <!-- </a-button>-->
</a-dropdown> <!-- </a-dropdown>-->
</div> <!-- </div>-->
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a-->
style="font-weight: 600">{{ selectedRowKeys.length }}</a> <!-- style="font-weight: 600">{{ selectedRowKeys.length }}</a>-->
<a style="margin-left: 24px" @click="onClearSelected">清空</a> <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
</div> <!-- </div>-->
<a-table <a-table
ref="table" ref="table"
@ -64,18 +64,18 @@
<!-- <a @click="handleEdit(record)">编辑</a>--> <!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>--> <!-- <a-divider type="vertical"/>-->
<!-- <a @click="handleDetail(record)">详情</a>--> <!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical"/>--> <!-- <a-divider type="vertical"/>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
<a-divider type="vertical"/> <!-- <a-divider type="vertical"/>-->
<a @click="jumpPage1(record)">制定计划详情</a> <!-- <a @click="jumpPage1(record)">制定计划详情</a>-->
</span> </span>
</a-table> </a-table>
</div> </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> </a-card>
</template> </template>
@ -85,6 +85,8 @@ import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin' import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2' import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default { export default {
name: 'ZyPlanProcessList', name: 'ZyPlanProcessList',
@ -94,7 +96,7 @@ export default {
}, },
data() { data() {
return { return {
description: '计划工序制定数据列表', description: '生产计划工序管理页面',
// //
columns: [ columns: [
{ {
@ -108,34 +110,48 @@ export default {
} }
}, },
{ {
title: '生产计划id', title: '计划id',
align: "center", align: "center",
dataIndex: 'planId' dataIndex: 'planId'
}, },
{ {
title: '车间名称', title: '工单编号',
align: "center", align: "center",
dataIndex: 'teamName' dataIndex: 'workOrderId'
}, },
{ {
title: '工单编号', title: '产品id',
align: "center",
dataIndex: 'productId'
}, {
title: '车间',
align: "center",
dataIndex: 'departId'
},
{
title: '工序id',
align: "center",
dataIndex: 'productProcessId'
},
{
title: '工位list',
align: "center", align: "center",
dataIndex: 'productCode' dataIndex: 'stationList.stationName'
}, },
{ {
title: '产品名称', title: '工具id列表',
align: "center", align: "center",
dataIndex: 'productCode2' dataIndex: 'toolsIds'
}, },
{ {
title:'工序名称', title: '工序id列表',
align:"center", align: "center",
dataIndex: 'processId_dictText' dataIndex: 'processIds'
}, },
{ {
title:'序号', title: '成员id列表',
align:"center", align: "center",
dataIndex: 'number' dataIndex: 'userIds'
}, },
{ {
title: '操作', title: '操作',
@ -147,20 +163,25 @@ export default {
} }
], ],
url: { url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list", list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list", // productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete", delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch", // deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls", // exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel", // importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
}, },
loadRouteType: false,
planId: "",
dictOptions: {}, dictOptions: {},
superFieldList: [], superFieldList: [],
} }
}, },
// mounted() {
// this.loadData()
// },
created() { created() {
this.getSuperFieldList(); this.getSuperFieldList();
// this.loadParameter();
}, },
computed: { computed: {
importExcelUrl: function () { importExcelUrl: function () {
@ -168,8 +189,66 @@ export default {
}, },
}, },
methods: { 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() { getSuperFieldList() {
let fieldList = []; let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''}) fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
@ -180,16 +259,17 @@ export default {
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''}) fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList this.superFieldList = fieldList
}, },
jumpPage1(record) { // jumpPage1(record) {
this.$router.push({ // this.$router.push({
path: '/productplan/ZyProductPlanList', // // path: '/productplan/ZyProductPlanList',
// path: '/productplan/ZyPlanProcessDataList',
// query: { // //
// 'stationId': record.id, // // query: { //
// 'stationName': record.stationName, // // 'stationId': record.id,
// // 'stationName': record.stationName,
// // },
// });
// }, // },
});
},
// pf(record) { // pf(record) {
// this.$router.push({ // this.$router.push({
// path: '/productplan/ZyPlanProcessAddList', // path: '/productplan/ZyPlanProcessAddList',

@ -181,12 +181,11 @@ export default {
}, },
jumpPage1(record) { jumpPage1(record) {
this.$router.push({ this.$router.push({
path: '/productplan/ZyProductPlanList', path: '/productplan/ZyPlanProcessDataList',
query: { //
// query: { // 'planId': record.planId,
// 'stationId': record.id,
// 'stationName': record.stationName, // 'stationName': record.stationName,
// }, },
}); });
}, },
// pf(record) { // 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -68,9 +69,10 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize); Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
// IPage<ZyPlanProcess> pageList = zyPlanProcessService.getProcessDatalist(page, queryWrapper); List<ProcessDataVo> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
List<ProcessDataVo> pageList = zyPlanProcessService.getProcessDatalist(zyPlanProcess); PageList<ProcessDataVo> processDataVos = new PageList<>(processDatalist, processDatalist.size());
return Result.OK(pageList);
return Result.OK(processDatalist);
} }
/** /**

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

Loading…
Cancel
Save