Gitea 1 year ago
parent ce0e6a779f
commit a7f0dac52e
  1. 9
      ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList.vue
  2. 314
      ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList1.vue
  3. 24
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java

@ -116,6 +116,11 @@
</a-table> </a-table>
</div> </div>
<a-tabs defaultActiveKey="1">
<a-tab-pane key="1" tab="已完成" >
<ZyPlanProcessList1 />
</a-tab-pane>
</a-tabs>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal> <zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
<station-modal1 ref="modalFormgw"></station-modal1> <station-modal1 ref="modalFormgw"></station-modal1>
@ -139,6 +144,7 @@
import ZyProductModal from "../zyWorkProduct/modules/ZyProductModal"; import ZyProductModal from "../zyWorkProduct/modules/ZyProductModal";
import ZyProcessDetail from "../process/modules/ZyProcessDetail"; import ZyProcessDetail from "../process/modules/ZyProcessDetail";
import ZyDeviceDetail from "../device/modules/ZyDeviceDetail"; import ZyDeviceDetail from "../device/modules/ZyDeviceDetail";
import ZyPlanProcessList1 from './ZyPlanProcessList1'
export default { export default {
name: 'ZyPlanProcessList', name: 'ZyPlanProcessList',
@ -149,7 +155,8 @@
WorkOrderModal, WorkOrderModal,
ZyProductModal, ZyProductModal,
ZyProcessDetail, ZyProcessDetail,
ZyDeviceDetail ZyDeviceDetail,
ZyPlanProcessList1
}, },
data () { data () {
return { return {

@ -0,0 +1,314 @@
<template>
<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="工序名称">
<a-input placeholder="请输入工序名称" v-model="queryParam.processName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="设备名称">
<a-input placeholder="请输入设备名称" v-model="queryParam.machineNames"></a-input>
</a-form-item>
</a-col>
<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>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- 高级查询区域 -->
</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>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="gw" slot-scope="text, record">
<a @click="gw(record.stationId)">{{text}}</a>
</template>
<template slot="gd" slot-scope="text, record">
<a @click="gd(record.productNo)">{{text}}</a>
</template>
<template slot="cp" slot-scope="text, record">
<a @click="cp(record.productCode)">{{text}}</a>
</template>
<template slot="gx" slot-scope="text, record">
<a @click="gx(record.processId)">{{text}}</a>
</template>
<template slot="sb" slot-scope="text, record">
<a @click="sb(record.machineIds)">{{text}}</a>
</template>
<template slot="nodata" slot-scope="text, record">
<span v-if="!text" style="font-size: 14px;font-style: italic;"></span>
<span v-else style="font-size: 14px;font-style: italic;">{{record.proProcessName}}</span>
</template>
<template slot="nodata1" slot-scope="text, record">
<span v-if="!text" style="font-size: 14px;font-style: italic;"></span>
<span v-else style="font-size: 14px;font-style: italic;">{{record.postProcessName}}</span>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" 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-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
<station-modal1 ref="modalFormgw"></station-modal1>
<work-order-modal ref="modalFormgd"></work-order-modal>
<zy-product-modal ref="modalFormcp"></zy-product-modal>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
<ZyDeviceDetail ref="ZyDeviceDetail"></ZyDeviceDetail>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import StationModal1 from "../team/modules/StationModal1";
import WorkOrderModal from "../workorder/modules/WorkOrderModal";
import {deleteAction, getAction} from "@api/manage";
import ZyProductModal from "../zyWorkProduct/modules/ZyProductModal";
import ZyProcessDetail from "../process/modules/ZyProcessDetail";
import ZyDeviceDetail from "../device/modules/ZyDeviceDetail";
export default {
name: 'ZyPlanProcessList1',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal,
StationModal1,
WorkOrderModal,
ZyProductModal,
ZyProcessDetail,
ZyDeviceDetail
},
data () {
return {
description: '生产计划工序管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'工单编号',
align:"center",
dataIndex: 'productNo',
scopedSlots: {customRender: 'gd'}
},
{
title:'产品名称',
align:"center",
dataIndex: 'productCode_dictText',
scopedSlots: {customRender: 'cp'}
},
{
title:'工序名称',
align:"center",
dataIndex: 'processName',
scopedSlots: {customRender: 'gx'}
},
{
title:'工位名称',
align:"center",
dataIndex: 'stationName',
scopedSlots: {customRender: 'gw'}
},
{
title:'工位序号',
align:"center",
dataIndex: 'stationNum'
},
{
title:'设备名称',
align:"center",
dataIndex: 'machineNames',
scopedSlots: {customRender: 'sb'}
},
/* {
title:'工具名称',
align:"center",
dataIndex: 'toolsNames'
},*/
{
title:'前导工序',
align:"center",
dataIndex: 'proProcessName',
scopedSlots: {customRender: 'nodata'}
},
{
title:'后导工序',
align:"center",
dataIndex: 'postProcessName',
scopedSlots: {customRender: 'nodata1'}
},
/* {
title:'输入产品',
align:"center",
dataIndex: 'inputProduct'
},
{
title:'成品/半成品',
align:"center",
dataIndex: 'semiProduct'
},
{
title:'工人名称',
align:"center",
dataIndex: 'userNames'
},*/
{
title:'机器时长',
align:"center",
dataIndex: 'totalMachine'
},
{
title:'人工时长',
align:"center",
dataIndex: 'totalMaunal'
},
/* {
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}*/
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/pagelist1",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
//this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
gw(stationId){
getAction("/team/station/queryById", {id: stationId}).then((res) => {
if (res.success) {
this.$refs.modalFormgw.edit(res.result);
this.$refs.modalFormgw.title="详情";
} else {
}
})
},
gd(orderCode){
getAction("/workOrder/workOrder/queryByOrderCode", {orderCode: orderCode}).then((res) => {
if (res.success) {
this.$refs.modalFormgd.edit(res.result);
this.$refs.modalFormgd.title="详情";
this.$refs.modalFormgd.disableSubmit = true;
} else {
}
})
},
cp(productCode){
getAction("/zyproduct/zyProduct/queryByProductCode", {productCode: productCode}).then((res) => {
if (res.success) {
this.$refs.modalFormcp.edit(res.result);
this.$refs.modalFormcp.title="详情";
this.$refs.modalFormcp.disableSubmit = true;
} else {
}
})
},
gx(processId){
this.$refs.zyProcessDetail.showModal(processId);
},
sb(machineIds){
this.$refs.ZyDeviceDetail.showModal(machineIds.split(",")[0]);
},
initDictConfig(){
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -381,6 +381,30 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
String stationid = useridstationid.get(username).toString(); String stationid = useridstationid.get(username).toString();
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
queryWrapper.eq("station_id",stationid); queryWrapper.eq("station_id",stationid);
queryWrapper.in("status",1,2);
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
for(int i = 0 ; i < pageList.getRecords().size() ; i++){
ZyProductPlan zyProductPlan = zyProductPlanService.getById(pageList.getRecords().get(i).getPlanId());
pageList.getRecords().get(i).setProductCode(zyProductPlan.getProductNo());
pageList.getRecords().get(i).setProductNo(zyProductPlan.getProductCode());
}
return Result.OK(pageList);
}
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/pagelist1")
public Result<?> pagelist1(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//这里方便获取当前登陆信息
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String username = loginUser.getUsername();
String stationid = useridstationid.get(username).toString();
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
queryWrapper.eq("station_id",stationid);
queryWrapper.eq("status",3);
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize); Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper); IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
for(int i = 0 ; i < pageList.getRecords().size() ; i++){ for(int i = 0 ; i < pageList.getRecords().size() ; i++){

Loading…
Cancel
Save