计划工序添重构 12.24

zhc4dev
zhc077 2 years ago
parent f7ebbafa59
commit 91b4784adb
  1. 285
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList.vue
  2. 342
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataList_back1223.vue
  3. 38
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  4. 2
      ant-design-vue-jeecg/src/views/productplan/ZyPlanTeamDataList.vue
  5. 18
      ant-design-vue-jeecg/src/views/productplan/ZyPlanTeamList.vue
  6. 130
      ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList_demo.vue
  7. 28
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanProcessForm.vue
  8. 29
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java
  9. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java
  10. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java

@ -1,52 +1,20 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>-->
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <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>-->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('计划工序')">导出</a-button>
<a-button type="primary" @click="fanHui()">返回</a-button>
</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"
@ -77,12 +45,59 @@
</span>
<span slot="machineList" slot-scope="machineList">
<a-select style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in machineList" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
<a-select style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in machineList" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</span>
<span slot="proProcess" slot-scope="proProcess">
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"
pidValue="" placeholder="前导工序"/>
</span>
<span slot="postProcess" slot-scope="postProcess">
<j-search-select-tag type="list" dict="zy_process,process_name,id,id in(select process_id from zy_product_process where product_id='1')" pidField="pid"
pidValue="" placeholder="后导工序"/>
</span>
<span slot="inputProduct" slot-scope="inputProduct">
<a-input v-model="processIds" placeholder="请输入产品"></a-input>
</span>
<span slot="semiProduct" slot-scope="semiProduct">
<a-input v-model="semiProduct" placeholder="请输入成品/半成品"></a-input>
</span>
<!-- <template
v-for="col in columns"
:slot="col"
slot-scope="text, record, index"
>
<div :key="col">
<a-input
v-if="record.editable"
style="margin: -5px 0"
:value="text"
@change="e => handleChange(e.target.value, record.key, col)"
/>
<template v-else>
{{ text }}
</template>
</div>
</template>
<template slot="operation" slot-scope="text, record, index">
<div class="editable-row-operations">
<span v-if="record.editable">
<a @click="() => save(record)">Save</a>
<a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record)">
<a>Cancel</a>
</a-popconfirm>
</span>
<span>
<a :disabled="editingKey !== ''" @click="() => edit(index)">Edit66</a>
</span>
</div>
</template>-->
</a-table>
</div>
@ -110,13 +125,16 @@ export default {
ZyPlanProcessModal
},
data() {
// this.cacheData = this.dataSource.map(item => ({ ...item }));
this.cacheData = [];
return {
description: '生产计划工序管理页面',
// columns,
//
columns: [
{
title: '#',
dataIndex: '',
dataIndex: 'productProcessId',
key: 'rowIndex',
width: 60,
align: "center",
@ -124,21 +142,27 @@ export default {
return parseInt(index) + 1;
}
},
// {
// title: 'id',
// align: "center",
// dataIndex: 'planId'
// },
/* {
title: '计划id',
align: "center",
dataIndex: 'planId'
},*/
{
title: '工单编号',
align: "center",
dataIndex: 'workOrderId'
dataIndex: 'workOrderId',
scopedSlots: {customRender: 'workOrderId'}
},
{
/*{
title: '产品id',
align: "center",
dataIndex: 'productId'
},
{
title: '工序id',
align: "center",
dataIndex: 'productProcessId'
},*/
{
title: '产品',
align: "center",
@ -166,8 +190,8 @@ export default {
align: "center",
dataIndex: 'toolsList',
width: 150,
scopedSlots: {customRender: 'toolsList'}
// scopedSlots: {customRender: this.toolsList}
scopedSlots: {customRender: 'toolsList'}
},
{
title: '工具设备列表',
@ -177,14 +201,50 @@ export default {
scopedSlots: {customRender: 'machineList'}
},
{
title: '操作',
dataIndex: 'action',
title: '前导工序',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
dataIndex: 'proProcess',
width: 150,
scopedSlots: {customRender: 'proProcess'}
},
{
title: '后导工序',
align: "center",
dataIndex: 'proProcess',
width: 150,
scopedSlots: {customRender: 'postProcess'}
},
{
title: '输入产品',
align: "center",
dataIndex: 'inputProduct',
width: 150,
scopedSlots: {customRender: 'inputProduct'}
},
{
title: '成品/半成品',
align: "center",
dataIndex: 'semiProduct',
width: 150,
scopedSlots: {customRender: 'semiProduct'}
},
// {
// title: 'operation',
// dataIndex: 'operation',
// scopedSlots: {customRender: 'operation'},
// },
// {
// title: '',
// dataIndex: 'action',
// align: "center",
// fixed: "right",
// width: 147,
// scopedSlots: {customRender: 'action'}
// }
],
editingKey: '',
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",
stationToolslist: "/stationTool/list",
@ -198,7 +258,7 @@ export default {
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
// superFieldList: [],
toolsList: [],
machineList: [],
}
@ -295,48 +355,75 @@ export default {
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
// let fieldList = [];
// fieldList.push({type: 'string', value: 'id', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'planId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productName', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'stationId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'machineIds', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'toolsIds', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productProcessId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'productProcessId', text: 'id', dictCode: ''})
// fieldList.push({type: 'string', value: 'userIds', text: 'id', dictCode: ''})
// this.superFieldList = fieldList
},
// 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',
// query: { //
// }
// });
// 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)
// handleChange(value, key, column) {
// const newData = [...this.data];
// const target = newData.find(item => key === item.key);
// if (target) {
// target[column] = value;
// this.data = newData;
// }
// });
// },
}
}
edit(key) {
alert("the edit() record =" + JSON.stringify(key))
// const newData = [...this.data];
const newData = [...this.dataSource];
// const newData = record;
console.log("the edit() newData =", JSON.stringify(newData));
// this.editingKey = '0';
// record.editable = true;
// const target = newData.find(item => key === item.key);
const target = newData[0];
console.log("the edit() target =", JSON.stringify(target));
this.editingKey = key;
console.log("the edit() editingKey =", this.editingKey);
if (target) {
// debugger;
target.editable = true;
this.dataSource = newData;
}
},
save(key) {
// const newData = [...this.data];
const newData = this.dataSource;
console.log("save() newData=", JSON.stringify(newData))
const newCacheData = [...this.cacheData];
const target = newData.find(item => key === item.key);
const targetCache = newCacheData.find(item => key === item.key);
if (target && targetCache) {
delete target.editable;
this.dataSource = newData;
Object.assign(targetCache, target);
this.cacheData = newCacheData;
}
this.editingKey = '';
},
cancel(key) {
const newData = this.dataSource;
const target = newData.find(item => key === item.key);
this.editingKey = '';
if (target) {
Object.assign(target, this.cacheData.find(item => key === item.key));
delete target.editable;
this.dataSource = newData;
}
},
},
};
</script>
<style scoped>
@import '~@assets/less/common.less';
.editable-row-operations a {
margin-right: 8px;
}
</style>

@ -0,0 +1,342 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<!-- <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>-->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button>
<a-button type="primary" @click="fanHui()">返回</a-button>
</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">
<span slot="stationList" slot-scope="stationList">
<a-select @change="getToolAndMachine" style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in stationList" :value="item.id">
{{ item.stationName }}
</a-select-option>
</a-select>
</span>
<span slot="toolsList" slot-scope="toolsList">
<a-select style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in toolsList" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</span>
<span slot="machineList" slot-scope="machineList">
<a-select style="width: 180px" placeholder="请选择">
<a-select-option v-for="item in machineList" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</span>
</a-table>
</div>
<div class="table-operator" style="text-align: right">
<a-button type="primary" @click="fanHui()">提交</a-button>
</div>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
<script>
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',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal
},
data() {
return {
description: '生产计划工序管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
// {
// title: 'id',
// align: "center",
// dataIndex: 'planId'
// },
{
title: '工单编号',
align: "center",
dataIndex: 'workOrderId'
},
{
title: '产品id',
align: "center",
dataIndex: 'productId'
},
{
title: '产品',
align: "center",
dataIndex: 'productName'
},
{
title: '车间',
align: "center",
dataIndex: 'departName'
},
{
title: '工序',
align: "center",
dataIndex: 'processName'
},
{
title: '工位列表',
align: "center",
dataIndex: 'stationList',
width: 150,
scopedSlots: {customRender: 'stationList'}
},
{
title: '工位工具列表',
align: "center",
dataIndex: 'toolsList',
width: 150,
scopedSlots: {customRender: 'toolsList'}
// scopedSlots: {customRender: this.toolsList}
},
{
title: '工具设备列表',
align: "center",
dataIndex: 'machineList',
width: 150,
scopedSlots: {customRender: 'machineList'}
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/getProcessDatalist",
stationToolslist: "/stationTool/list",
stationMachinelist: "/stationMachine/list",
// 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",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
toolsList: [],
machineList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
fanHui() {
this.$router.push({
path: '/productplan/ZyPlanProcessList',
});
},
getToolAndMachine(stationId) {
// alert("stationId=" + stationId);
getAction(this.url.stationToolslist, {"stationId": stationId}).then((res) => {
if (res.success) {
this.toolsList = res.result.records || res.result;
console.log("toolsList", JSON.stringify(this.toolsList))
} else {
this.$message.warning(res.message)
}
});
getAction(this.url.stationMachinelist, {"stationId": stationId}).then((res) => {
if (res.success) {
this.machineList = res.result.records || res.result;
console.log("machineList", JSON.stringify(this.toolsList))
} else {
this.$message.warning(res.message)
}
});
},
//
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: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
// 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',
// query: { //
// }
// });
// 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)
// }
// });
// },
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -55,14 +55,14 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<span slot="processId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<!-- <span slot="processId_dictText" slot-scope="text, record">-->
<!-- <a-popover>-->
<!-- <template slot="content">-->
<!-- <p>{{ text }}</p>-->
<!-- </template>-->
<!-- <a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>-->
<!-- </a-popover>-->
<!-- </span>-->
<span slot="stationId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
@ -151,7 +151,7 @@ export default {
title: '工序',
align: "center",
dataIndex: 'processId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
// scopedSlots: {customRender: 'processId_dictText'}
},
{
title: '工位',
@ -177,6 +177,26 @@ export default {
dataIndex: 'userIds_dictText',
scopedSlots: {customRender: 'userIds_dictText'}
},
{
title:'前导工序',
align:"center",
dataIndex: 'proProcess_dictText'
},
{
title:'后导工序',
align:"center",
dataIndex: 'postProcess_dictText'
},
{
title:'输入产品',
align:"center",
dataIndex: 'inputProduct'
},
{
title:'成品/半成品',
align:"center",
dataIndex: 'semiProduct'
},
{
title: '操作',
dataIndex: 'action',

@ -198,7 +198,7 @@ export default {
},
methods: {
saveBatch() {
alert("保存开始")
// alert("")
postAction(this.url.addTeamBatch, this.processIds).then((res) => {
if (res.success) {
this.$message.success(res.message)

@ -55,14 +55,14 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<span slot="processId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<!-- <span slot="processId_dictText" slot-scope="text, record">-->
<!-- <a-popover>-->
<!-- <template slot="content">-->
<!-- <p>{{ text }}</p>-->
<!-- </template>-->
<!-- <a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>-->
<!-- </a-popover>-->
<!-- </span>-->
<span slot="stationId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
@ -151,7 +151,7 @@ export default {
title: '工序',
align: "center",
dataIndex: 'processId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
// scopedSlots: {customRender: 'processId_dictText'}
},
{
title: '工位',

@ -0,0 +1,130 @@
<template>
<a-table :columns="columns" :data-source="data" bordered>
<template
v-for="col in ['name', 'age', 'address']"
:slot="col"
slot-scope="text, record, index"
>
<div :key="col">
<a-input
v-if="record.editable"
style="margin: -5px 0"
:value="text"
@change="e => handleChange(e.target.value, record.key, col)"
/>
<template v-else>
{{ text }}
</template>
</div>
</template>
<template slot="operation" slot-scope="text, record, index">
<div class="editable-row-operations">
<span v-if="record.editable">
<a @click="() => save(record.key)">Save</a>
<a-popconfirm title="Sure to cancel?" @confirm="() => cancel(record.key)">
<a>Cancel</a>
</a-popconfirm>
</span>
<span v-else>
<a :disabled="editingKey !== ''" @click="() => edit(record.key)">Edit</a>
</span>
</div>
</template>
</a-table>
</template>
<script>
const columns = [
{
title: 'name',
dataIndex: 'name',
width: '25%',
scopedSlots: { customRender: 'name' },
},
{
title: 'age',
dataIndex: 'age',
width: '15%',
scopedSlots: { customRender: 'age' },
},
{
title: 'address',
dataIndex: 'address',
width: '40%',
scopedSlots: { customRender: 'address' },
},
{
title: 'operation',
dataIndex: 'operation',
scopedSlots: { customRender: 'operation' },
},
];
const data = [];
for (let i = 0; i < 100; i++) {
data.push({
key: i.toString(),
name: `Edrward ${i}`,
age: 32,
address: `London Park no. ${i}`,
});
}
export default {
data() {
this.cacheData = data.map(item => ({ ...item }));
return {
data,
columns,
editingKey: '',
};
},
methods: {
handleChange(value, key, column) {
const newData = [...this.data];
const target = newData.find(item => key === item.key);
if (target) {
target[column] = value;
this.data = newData;
}
},
edit(key) {
alert(key)
const newData = [...this.data];
console.log("newData=",JSON.stringify(newData))
const target = newData.find(item => key === item.key);
this.editingKey = key;
if (target) {
target.editable = true;
this.data = newData;
}
},
save(key) {
const newData = [...this.data];
const newCacheData = [...this.cacheData];
const target = newData.find(item => key === item.key);
const targetCache = newCacheData.find(item => key === item.key);
if (target && targetCache) {
delete target.editable;
this.data = newData;
Object.assign(targetCache, target);
this.cacheData = newCacheData;
}
this.editingKey = '';
},
cancel(key) {
const newData = [...this.data];
const target = newData.find(item => key === item.key);
this.editingKey = '';
if (target) {
Object.assign(target, this.cacheData.find(item => key === item.key));
delete target.editable;
this.data = newData;
}
},
},
}
</script>
<style scoped>
.editable-row-operations a {
margin-right: 8px;
}
</style>

@ -33,6 +33,34 @@
<a-input v-model="model.userIds" placeholder="请输入成员id列表"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="前导工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="proProcess">
<j-popup
v-model="model.proProcess"
field="proProcess"
org-fields=""
dest-fields=""
code=""
:multi="true"
@input="popupCallback"
/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="后导工序" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="postProcess">
<j-search-select-tag v-model="model.postProcess" dict="" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="输入产品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inputProduct">
<a-input v-model="model.inputProduct" placeholder="请输入输入产品" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="成品/半成品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="semiProduct">
<a-input v-model="model.semiProduct" placeholder="请输入成品/半成品" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>

@ -72,14 +72,14 @@ public class ZyPlanProcess implements Serializable {
*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id列表")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
private String processId;
/**
* 工位id
*/
@Excel(name = "工位id", width = 15)
@ApiModelProperty(value = "工位id")
@Dict(dictTable = "station",dicText = "station_name",dicCode = "id")
@Dict(dictTable = "station", dicText = "station_name", dicCode = "id")
private String stationId;
/**
* 设备id列表
@ -102,4 +102,29 @@ public class ZyPlanProcess implements Serializable {
@ApiModelProperty(value = "成员id列表")
@Dict(dictTable = "groupx_member", dicText = "user_id", dicCode = "id")
private String userIds;
/**
* 前导工序
*/
@Excel(name = "前导工序", width = 15)
@ApiModelProperty(value = "前导工序")
private String proProcess;
/**
* 后导工序
*/
@Excel(name = "后导工序", width = 15)
@ApiModelProperty(value = "后导工序")
private String postProcess;
/**
* 输入产品
*/
@Excel(name = "输入产品", width = 15)
@ApiModelProperty(value = "输入产品")
private String inputProduct;
/**
* 成品/半成品
*/
@Excel(name = "成品/半成品", width = 15)
@ApiModelProperty(value = "成品/半成品")
private String semiProduct;
}

@ -17,7 +17,7 @@ public class ProcessDataVo implements Serializable {
private static final long serialVersionUID = 1009888L;
private String id;
// private String id;
//工单id
private String workOrderId;

@ -3,7 +3,6 @@ package org.jeecg.modules.productplan.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.swagger.annotations.Authorization;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.demo.base.service.IZyProcessService;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
@ -24,10 +23,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
/**
* @Description: 生产计划工序
@ -77,7 +74,7 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
vo.setProductProcessId(e.getProcessId());
vo.setProcessName(iZyProcessService.getById(e.getProcessId()).getProcessName());
vo.setProductId(e.getProductId());
// vo.setProductName("产品名称")
vo.setProductName("产品名称");
vo.setWorkOrderId(productCode);
vo.setDepartId(departId);
vo.setDepartName(depart.getDepartName());

Loading…
Cancel
Save