Merge remote-tracking branch 'origin/master' into zhc4dev

zhc4dev
zhc077 2 years ago
commit b65fe9e789
  1. 1
      ant-design-vue-jeecg/babel.config.js
  2. 2
      ant-design-vue-jeecg/package.json
  3. 33
      ant-design-vue-jeecg/public/index.html
  4. 10
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  5. 401
      ant-design-vue-jeecg/src/views/process/ZyProcessComponentList.vue
  6. 25
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  7. 95
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  8. 14
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  9. 14
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessAccessoriesList.vue
  10. 12
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessActionList.vue
  11. 12
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessFabricList.vue
  12. 36
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
  13. 32
      ant-design-vue-jeecg/src/views/product/pdaccessories/ProductAccessoriesList.vue
  14. 25
      ant-design-vue-jeecg/src/views/product/pdfabric/ProductFabricList.vue
  15. 9
      ant-design-vue-jeecg/src/views/product/pdmachine/ProductMachineList.vue
  16. 13
      ant-design-vue-jeecg/src/views/product/pdoperationtool/ProductOperationtoolList.vue
  17. 30
      ant-design-vue-jeecg/src/views/product/productProcess/ZyProductProcessList.vue
  18. 115
      ant-design-vue-jeecg/src/views/system/Depart3List.vue
  19. 57
      ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
  20. 18
      ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue
  21. 254
      ant-design-vue-jeecg/src/views/zyWorkProduct/ZyProductList.vue
  22. 299
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
  23. 119
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
  24. 5
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue
  25. 10
      ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
  26. 10
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  27. 2
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  28. 12
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  29. 32
      ant-design-vue-jeecg/vue.config.js
  30. 6
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/entity/ZyAccessories.java
  31. 4
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/controller/ZyFabricController.java
  32. 12
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/fabric/entity/ZyFabric.java
  33. 5
      jeecg-boot/jeecg-boot-module-process/pom.xml
  34. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java
  35. 26
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  36. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  37. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsTypeMapper.xml
  38. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsComponentService.java
  39. 12
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  40. 69
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsComponentServiceImpl.java
  41. 54
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  42. 66
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  43. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessMachine.java
  44. 16
      jeecg-boot/jeecg-boot-module-system/pom.xml
  45. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/JeecgSystemApplication.java
  46. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/entity/OrderGoods.java
  47. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/IZyOrdersService.java
  48. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdcomponentprocess/entity/ProductComponentProcess.java
  49. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmodulecomponent/entity/ProductModuleComponent.java
  50. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/pdmoduleprocess/entity/ProductModuleProcess.java
  51. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/entity/ProductAccessories.java
  52. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/entity/ProductFabric.java
  53. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/entity/ProductMachine.java
  54. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdoperationtool/entity/ProductOperationtool.java
  55. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/productModule/entity/ProductModule.java
  56. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/entity/ZyProductProcess.java
  57. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysDepartController.java
  58. 204
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
  59. 115
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/entity/WorkOrderVo.java
  60. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/mapper/WorkOrderMapper.java
  61. 34
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/mapper/xml/WorkOrderMapper.xml
  62. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java
  63. 433
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java
  64. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java
  65. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProduct.java
  66. 183
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/entity/ZyProductVo.java
  67. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/mapper/ZyProductMapper.java
  68. 53
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/mapper/xml/ZyProductMapper.xml
  69. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/service/IZyProductService.java
  70. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/service/impl/ZyProductServiceImpl.java
  71. 28
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  72. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  73. 77
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  74. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  75. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModelDetailsVo.java
  76. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  77. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
  78. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  79. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/entity/ZyStyleModuleDetailVo.java
  80. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
  81. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/xml/ZyStyleModuleMapper.xml
  82. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/IZyStyleModuleService.java
  83. 24
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java
  84. 1
      jeecg-boot/pom.xml

@ -4,3 +4,4 @@ module.exports = {
{ useBuiltIns: 'entry' }]
]
}

@ -121,4 +121,4 @@
"last 2 versions",
"not ie <= 10"
]
}
}

@ -8,6 +8,12 @@
<title>黄淮学院服装智能制造管理平台</title>
<link rel="icon" href="<%= BASE_URL %>logohuanghuai.png">
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
<!--<script src="https://cdn.bootcss.com/vue/2.6.10/vue.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/axios/0.19.0-beta.1/axios.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/vuex/3.1.0/vuex.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/vue-router/3.0.1/vue-router.min.js"></script>-->
<!--<script src="https://cdn.bootcss.com/element-ui/2.6.1/index.js"></script>-->
<style>
html,
body,
@ -268,7 +274,7 @@
<!-- 全局配置 -->
<script>
window._CONFIG = {};
window._CONFIG['domianURL'] = 'http://localhost:8081/jeecg-boot';
window._CONFIG['domianURL'] = 'http://localhost:10085/jeecg-boot';
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas';
window._CONFIG['imgDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/view';
window._CONFIG['downloadUrl'] = window._CONFIG['domianURL'] + '/sys/common/download';
@ -278,11 +284,28 @@
<body>
<div id="app">
<!--<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.min.js"></script>-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/vue-router/3.1.6/vue-router.min.js"></script>-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.18.1/axios.min.js"></script>-->
<!--<link href="https://cdn.bootcdn.net/ajax/libs/ant-design-vue/1.7.2/antd.min.css" rel="stylesheet">-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/ant-design-vue/1.7.2/antd.min.js"></script>-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.1/moment.min.js"></script>-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/moment.js/2.29.1/locale/zh-cn.min.js"></script>-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/vuex/3.1.2/vuex.min.js"></script>-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/jsoneditor/9.0.0/jsoneditor.min.js"></script>-->
<!--<link href="https://cdn.bootcdn.net/ajax/libs/jsoneditor/9.0.0/jsoneditor.min.css" rel="stylesheet">-->
<!--<script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.9.0-rc.1/echarts.min.js"></script>-->
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载 服装智能制造软件平台V3.0,请耐心等待
<!--<div id="loader"></div>-->
<!--<div class="loader-section section-left"></div>-->
<!--<div class="loader-section section-right"></div>-->
<!--<div class="load_title">正在加载 服装智能制造软件平台V3.0,请耐心等待-->
</div>
</div>

@ -165,11 +165,11 @@
align:"center",
dataIndex: 'specs'
},
{
title:'库存量',
align:"center",
dataIndex: 'store'
},
// {
// title:'',
// align:"center",
// dataIndex: 'store'
// },
{
title:'供货商信息',
align:"center",

@ -1,5 +1,5 @@
<template>
<!-- <a-card :bordered="false">-->
<!-- <a-card :bordered="false">-->
<a-modal
width="70%"
title=""
@ -22,8 +22,9 @@
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序" >
<j-dict-select-tag v-model="queryParam.processId" dictCode="zy_process,process_name,id" placeholder="请选择工序" />
<a-form-item label="工序">
<j-dict-select-tag v-model="queryParam.processId" dictCode="zy_process,process_name,id"
placeholder="请选择工序"/>
</a-form-item>
</a-col>
@ -41,24 +42,30 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd1(componentId1)" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_process_component')">导出</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>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('zy_process_component')">导出</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>-->
<!-- <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-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-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>
<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>
@ -81,7 +88,8 @@
</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;"/>
<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>
@ -98,9 +106,9 @@
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical" />-->
<a @click="handleDetail(record.id)">详情</a>
<!-- <a-divider type="vertical" />-->
<!-- <a @click="handleDetail(record.id)">详情</a>-->
<a @click="openDetail(record.processId)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
@ -110,199 +118,212 @@
</a-table>
</div>
<zy-process-component-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-component-modal>
<zy-process-component-modal @valueChange="valueChange" ref="modalForm"
@ok="modalFormOk"></zy-process-component-modal>
<ZyProcessComponentFormDetail ref="ZyProcessComponentFormDetail"></ZyProcessComponentFormDetail>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
</a-modal>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessComponentModal from './modules/ZyProcessComponentModal'
import ZyProcessComponentFormDetail from './modules/ZyProcessComponentFormDetail'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {filterObj} from "@/utils/util";
import {getAction} from "@api/manage";
import ZyProcessDetail from '@views/process/modules/ZyProcessDetail'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProcessComponentModal from './modules/ZyProcessComponentModal'
import ZyProcessComponentFormDetail from './modules/ZyProcessComponentFormDetail'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {filterObj} from "@/utils/util";
import {getAction} from "@api/manage";
export default {
name: 'ZyProcessComponentList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessComponentModal,
ZyProcessComponentFormDetail
},
data () {
return {
description: 'zy_process_component管理页面',
visible: false,
confirmLoading: false,
componentId1:'',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'部件名称',
align:"center",
dataIndex: 'componentId_dictText'
},
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
},
{
title:'工序',
align:"center",
dataIndex: 'processId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'bottleneck_dictText'
// },
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'ZyProcessComponentList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessDetail,
ZyProcessComponentModal,
ZyProcessComponentFormDetail
},
data() {
return {
description: 'zy_process_component管理页面',
visible: false,
confirmLoading: false,
componentId1: '',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
],
url: {
list: "/pro/zyProcessComponent/list",
delete: "/pro/zyProcessComponent/delete",
deleteBatch: "/pro/zyProcessComponent/deleteBatch",
exportXlsUrl: "/pro/zyProcessComponent/exportXls",
importExcelUrl: "pro/zyProcessComponent/importExcel",
},
//
loadRouteType: false,
biaoTi: '',
dictOptions:{},
superFieldList:[],
}
},
created() {
{
title: '部件名称',
align: "center",
dataIndex: 'componentId_dictText'
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序',
align: "center",
dataIndex: 'processId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'bottleneck_dictText'
// },
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/pro/zyProcessComponent/list",
delete: "/pro/zyProcessComponent/delete",
deleteBatch: "/pro/zyProcessComponent/deleteBatch",
exportXlsUrl: "/pro/zyProcessComponent/exportXls",
importExcelUrl: "pro/zyProcessComponent/importExcel",
},
//
loadRouteType: false,
biaoTi: '',
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
edit2(record) {
this.model = Object.assign({}, record);
this.componentId1 = this.model.id;
this.biaoTi = this.model.partsName;
//console.log(topicid);
this.queryParam.componentId = this.model.id;
//console.log( this.queryParam.topicid);
this.loadData();
this.visible = true;
},
methods: {
edit2(record) {
this.model = Object.assign({}, record);
this.componentId1 = this.model.id;
this.biaoTi = this.model.partsName;
//console.log(topicid);
this.queryParam.componentId = this.model.id;
//console.log( this.queryParam.topicid);
this.loadData();
this.visible = true;
},
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
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();
const params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for------------
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
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();
const params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.$message.warning(res.message)
this.ipagination.total = 0;
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
//update-end---author:zhangyafei Date:20201118 for------------
} else {
this.$message.warning(res.message)
}
const 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.id=this.id;
param.componentId = this.componentId1;
return filterObj(param);
},
showModal2() {
this.visible = true;
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 2000);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'componentId',text:'部件',dictCode:'zy_cloths_component,parts_name,nums'})
fieldList.push({type:'string',value:'processId',text:'工艺',dictCode:'zy_process,process_name,id'})
this.superFieldList = fieldList
},
handleDetail(id){
//id = this.model.id;
console.log("this。model.id +++++"+id);
this.$refs.ZyProcessComponentFormDetail.showModal(id);
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
const 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.id=this.id;
param.componentId = this.componentId1;
return filterObj(param);
},
showModal2() {
this.visible = true;
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 2000);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
initDictConfig() {
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({
type: 'string',
value: 'componentId',
text: '部件',
dictCode: 'zy_cloths_component,parts_name,nums'
})
fieldList.push({type: 'string', value: 'processId', text: '工艺', dictCode: 'zy_process,process_name,id'})
this.superFieldList = fieldList
},
// handleDetail(id) {
// //id = this.model.id;
// console.log("thismodel.id +++++" + id);
// this.$refs.ZyProcessComponentFormDetail.showModal(id);
// }
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -5,7 +5,7 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId"/>
<j-select-depart v-model="model.enterpriseId" @change="getEnterNums"/>
</a-form-model-item>
</a-col>
</a-row>
@ -167,7 +167,9 @@ export default {
edit: "/base/zyClothsComponent/edit",
queryById: "/base/zyClothsComponent/queryById",
//
sort: "/base/zyClothsComponent/sort"
sort: "/base/zyClothsComponent/sort",
//
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@ -181,6 +183,25 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
getEnterNums() {
if (this.model.id) {
getAction(this.url.enterpriseNum, {id: this.model.enterpriseId}).then((res) => {
if (res.code === 500) {
this.$message({
type: 'error',
message: '只能选择一个企业!'
});
} else if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result + this.model.nums.substring(4);
console.log('编辑中改变企业编号 res.result ' + this.model.nums)
})
}
},
async getNumberClothsComponentList() {
//const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {

@ -5,7 +5,7 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业" @change="getEnterNums"/>
</a-form-model-item>
</a-col>
</a-row>
@ -49,7 +49,8 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="模块类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularType">
<j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType" placeholder="请选择模块类型" />
<j-dict-select-tag type="list" v-model="model.modularType" dictCode="zyModularType"
placeholder="请选择模块类型"/>
</a-form-model-item>
</a-col>
</a-row>
@ -68,44 +69,44 @@
</a-form-model-item>
</a-col>
</a-row>
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="模块名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularName">-->
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="模块名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularName">-->
<!-- <a-input v-model="model.modularName" placeholder="请输入模块名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择服装类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择服装类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
</a-form-model>
</j-form-container>
</a-spin>
@ -162,7 +163,9 @@ export default {
edit: "/base/zyClothsModular/edit",
queryById: "/base/zyClothsModular/queryById",
//getActionurl
sort: "/base/zyClothsModular/sort"
sort: "/base/zyClothsModular/sort",
//
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@ -176,8 +179,26 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
getEnterNums() {
if (this.model.id) {
getAction(this.url.enterpriseNum, {id: this.model.enterpriseId}).then((res) => {
if (res.code === 500) {
this.$message({
type: 'error',
message: '只能选择一个企业!'
});
} else if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result + this.model.nums.substring(4);
console.log('编辑中改变企业编号 res.result ' + this.model.nums)
})
}
},
async bianhao() {
//var n=6
getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
//let num = res.result;
console.log("+6++++aaa: " + res.result)

@ -78,16 +78,16 @@ export default {
},
confirmLoading: false,
validatorRules: {
// nums: [
// { required: true, message: '!'},
// ],
enterpriseId: [
{required: true, message: '请选择一个企业!'},
],
nums: [
{required: true, message: '请输入编号!'},
],
typeName: [
{required: true, message: '请输入类型名称!'},
{pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
],
enterpriseId: [
{required: true, message: '请选择一个企业!'},
],
},
url: {
add: "/base/zyClothsType/add",
@ -95,7 +95,7 @@ export default {
queryById: "/base/zyClothsType/queryById",
weiyi: "/base/zyClothsType/weiyi",
//
enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},

@ -79,9 +79,9 @@
</template>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit1(record,code)">编辑</a>-->
<a @click="handleDetail(record.accessoriesId)">详情</a>
<!-- <a-divider type="vertical" />-->
<a-divider type="vertical" />
<!-- <a @click="handleDetail(record)">详情</a>-->
@ -94,7 +94,7 @@
</a-table>
</div>
<ZyAccessoriesFormDetail ref="ZyAccessoriesFormDetail"></ZyAccessoriesFormDetail>
<zy-process-accessories-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-accessories-modal>
</a-card>
</template>
@ -105,12 +105,13 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessAccessoriesModal from './ZyProcessAccessoriesModal'
import ZyAccessoriesFormDetail from '@/views/erp/accessories/modules/ZyAccessoriesFormDetail'
export default {
name: 'ZyProcessAccessoriesList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessAccessoriesModal
ZyProcessAccessoriesModal,
ZyAccessoriesFormDetail
},
data () {
return {
@ -205,6 +206,9 @@
fieldList.push({type:'popup',value:'processId',text:'工序表id', popup:{code:'',field:'',orgFields:'',destFields:''}})
fieldList.push({type:'popup',value:'accessoriesId',text:'辅料表id', popup:{code:'',field:'',orgFields:'',destFields:''}})
this.superFieldList = fieldList
},
handleDetail(id){
this.$refs.ZyAccessoriesFormDetail.showModal(id)
}
}
}

@ -80,8 +80,8 @@
<span slot="action" slot-scope="text, record">
<!-- <a-divider type="vertical" />-->
<a @click="handleDetail(record.actionId)">详情</a>
<a-divider type="vertical" />
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical" />-->
@ -98,6 +98,7 @@
</div>
<zy-process-action-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-action-modal>
<ZyClothActionFormDetail ref="ZyClothActionFormDetail"></ZyClothActionFormDetail>
</a-card>
</template>
@ -107,6 +108,7 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessActionModal from './ZyProcessActionModal'
import ZyClothActionFormDetail from './ZyClothActionFormDetail'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {getAction} from "@api/manage";
@ -114,7 +116,8 @@
name: 'ZyProcessActionList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessActionModal
ZyProcessActionModal,
ZyClothActionFormDetail
},
data () {
return {
@ -237,6 +240,9 @@
fieldList.push({type:'string',value:'processId',text:'工序id',dictCode:'zy_process,process_name,id'})
fieldList.push({type:'string',value:'actionId',text:'动作id',dictCode:'zy_cloth_action,descr,nums'})
this.superFieldList = fieldList
},
handleDetail(id){
this.$refs.ZyClothActionFormDetail.showModal(id)
}
}
}

@ -85,8 +85,9 @@
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit1(record,code)">编辑</a>-->
<a @click="handleDetail(record.fabricId,record.fabricId_dictText)">详情</a>
<!-- <a-divider type="vertical" />-->
<a-divider type="vertical" />
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical" />-->
@ -100,6 +101,7 @@
</div>
<zy-process-fabric-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-fabric-modal>
<ZyFabricFormDetailModel ref="ZyFabricFormDetailModel"></ZyFabricFormDetailModel>
</a-card>
</template>
@ -110,12 +112,14 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessFabricModal from './ZyProcessFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyFabricFormDetailModel from '@/views/erp/fabric/modules/ZyFabricFormDetailModel'
export default {
name: 'ZyProcessFabricList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessFabricModal
ZyProcessFabricModal,
ZyFabricFormDetailModel
},
data () {
return {
@ -209,6 +213,10 @@
fieldList.push({type:'string',value:'processId',text:'工序',dictCode:'zy_process,process_name,id'})
fieldList.push({type:'string',value:'fabricId',text:'面料',dictCode:'zy_fabric,name,id'})
this.superFieldList = fieldList
},
handleDetail(id,name){
this.$refs.ZyFabricFormDetailModel.showModal(id,name)
// this.$children[0].showModal(id)
}
}
}

@ -42,7 +42,7 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="工序时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="processTime">
<a-input-number v-model="model.processTime" placeholder="请输入工序时间" ></a-input-number>
<a-input v-model="model.processTime" placeholder="请输入工序时间" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="11">
@ -78,12 +78,12 @@
<!-- </a-col>-->
<a-col :span="12">
<a-form-model-item label="手工宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualWide">
<a-input-number v-model="model.manualWide" placeholder="请输入手工宽放" ></a-input-number>
<a-input v-model="model.manualWide" placeholder="请输入手工宽放" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="11">
<a-form-model-item label="手工时间(秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="manualTime">
<a-input-number v-model="model.manualTime" placeholder="请输入手工时间" style="width: 100%" />
<a-input v-model="model.manualTime" placeholder="请输入手工时间" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -93,7 +93,7 @@
</a-col>
<a-col :span="11">
<a-form-model-item label="机器宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineWide">
<a-input-number v-model="model.machineWide" placeholder="请输入机器宽放" ></a-input-number>
<a-input v-model="model.machineWide" placeholder="请输入机器宽放" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -108,7 +108,7 @@
<!-- </a-col>-->
<a-col :span="11">
<a-form-model-item label="绑包宽放(毫米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bundleWide">
<a-input-number v-model="model.bundleWide" placeholder="请输入绑包宽放" ></a-input-number>
<a-input v-model="model.bundleWide" placeholder="请输入绑包宽放" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -265,9 +265,35 @@
},
confirmLoading: false,
validatorRules: {
processTime:[
{
pattern: /^\d+$/,message:'请输入正整数'
},
],
manualWide:[
{
pattern: /^\d+$/,message:'请输入正整数'
},
],
machineWide:[
{
pattern: /^\d+$/,message:'请输入正整数'
},
],
bundleWide:[
{
pattern: /^\d+$/,message:'请输入正整数'
},
],
fabricNum: [
{ required: true, message: '请输入面料代码!'},
],
enterpriseId: [
{ required: true, message: '请选择企业!'},
],
typeId: [
{ required: true, message: '请选择款式!'},
],
price:[{
pattern: /^\d*\.?\d+$/,message:'请输入正数'
},],

@ -1,6 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -81,6 +81,9 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record.accessoriesId)">详情</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<!-- <a-divider type="vertical" />-->
@ -92,7 +95,7 @@
</a-table>
</div>
<ZyAccessoriesFormDetail ref="ZyAccessoriesFormDetail"></ZyAccessoriesFormDetail>
<product-accessories-modal ref="modalForm" @ok="modalFormOk"></product-accessories-modal>
</a-card>
</template>
@ -105,12 +108,13 @@
import ProductAccessoriesModal from './modules/ProductAccessoriesModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import ZyAccessoriesFormDetail from '@/views/erp/accessories/modules/ZyAccessoriesFormDetail'
export default {
name: 'ProductAccessoriesList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ProductAccessoriesModal
ProductAccessoriesModal,
ZyAccessoriesFormDetail
},
data () {
return {
@ -129,16 +133,16 @@
return parseInt(index)+1;
}
},
{
title:'产品编号',
align:"center",
dataIndex: 'productId'
},
// {
// title:'',
// align:"center",
// dataIndex: 'productId_dictText'
// dataIndex: 'productId'
// },
{
title:'产品编号',
align:"center",
dataIndex: 'productId_dictText'
},
{
title:'辅料',
align:"center",
@ -178,6 +182,7 @@
},
dictOptions:{},
superFieldList:[],
loadRouteType:false,
}
},
created() {
@ -192,7 +197,7 @@
fanhui(){
this.$router.push({
/*返回产品*/
path: '',/*在引号中填写返回vue*/
path: '/WorkProduct',/*在引号中填写返回vue*/
});
},
initDictConfig(){
@ -209,7 +214,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"产品辅料管理";
this.biaoTi = this.$route.query.productName+"产品辅料管理";
console.log("***********")
this.loadRouteType = true;
}
@ -263,6 +268,9 @@
this.accessoriesId = ''
this.loadData(1);
},
handleDetail(id){
this.$refs.ZyAccessoriesFormDetail.showModal(id)
}
}
}
</script>

@ -1,6 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -81,6 +81,9 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record.fabricId,record.fabricId_dictText)">详情</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<!-- <a-divider type="vertical" />-->
@ -91,7 +94,7 @@
</a-table>
</div>
<ZyFabricFormDetailModel ref="ZyFabricFormDetailModel"></ZyFabricFormDetailModel>
<product-fabric-modal ref="modalForm" @ok="modalFormOk"></product-fabric-modal>
</a-card>
</template>
@ -104,12 +107,13 @@
import ProductFabricModal from './modules/ProductFabricModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import ZyFabricFormDetailModel from '@/views/erp/fabric/modules/ZyFabricFormDetailModel'
export default {
name: 'ProductFabricList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ProductFabricModal
ProductFabricModal,
ZyFabricFormDetailModel
},
data () {
return {
@ -131,7 +135,7 @@
{
title:'产品编号',
align:"center",
dataIndex: 'productId'
dataIndex: 'productId_dictText'
},
{
title:'面料',
@ -172,6 +176,7 @@
},
dictOptions:{},
superFieldList:[],
loadRouteType:false,
}
},
created() {
@ -188,7 +193,7 @@
fanhui(){
this.$router.push({
/*返回产品*/
path: '',/*在引号中填写返回vue*/
path: '/WorkProduct',/*在引号中填写返回vue*/
});
},
getSuperFieldList(){
@ -203,8 +208,8 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"产品面料管理";
console.log("***********")
this.biaoTi = this.$route.query.productName+"产品面料管理";
console.log("***********想看看")
this.loadRouteType = true;
}
},
@ -257,6 +262,10 @@
this.fabricId = ''
this.loadData(1);
},
handleDetail(id,name){
this.$refs.ZyFabricFormDetailModel.showModal(id,name)
// this.$children[0].showModal(id)
}
}
}
</script>

@ -1,6 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -132,7 +132,7 @@
{
title:'产品编号',
align:"center",
dataIndex: 'productId'
dataIndex: 'productId_dictText'
},
// {
// title:'',
@ -174,6 +174,7 @@
},
dictOptions:{},
superFieldList:[],
loadRouteType:false
}
},
created() {
@ -188,7 +189,7 @@
fanhui(){
this.$router.push({
/*返回产品*/
path: '',/*在引号中填写返回vue*/
path: '/WorkProduct',/*在引号中填写返回vue*/
});
},
up(id){
@ -222,7 +223,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"产品设备管理";
this.biaoTi = this.$route.query.productName+"产品设备管理";
console.log("***********")
this.loadRouteType = true;
}

@ -1,13 +1,13 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<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="operationtoolId"></a-input>
<a-form-item label="工具名称">
<a-input placeholder="工具名称" v-model="operationtoolId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -132,7 +132,7 @@
{
title:'产品编号',
align:"center",
dataIndex: 'productId'
dataIndex: 'productId_dictText'
},
// {
// title:'',
@ -174,6 +174,7 @@
},
dictOptions:{},
superFieldList:[],
loadRouteType:false,
}
},
created() {
@ -188,7 +189,7 @@
fanhui(){
this.$router.push({
/*返回产品*/
path: '',/*在引号中填写返回vue*/
path: '/WorkProduct',/*在引号中填写返回vue*/
});
},
up(id){
@ -222,7 +223,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"产品工具管理";
this.biaoTi = this.$route.query.productName+"产品工具管理";
console.log("***********")
this.loadRouteType = true;
}

@ -1,5 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -22,7 +23,8 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button @click="fanhui" type="primary" icon="plus">返回</a-button>
<!-- <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>-->
@ -81,9 +83,10 @@
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<a @click="openDetail(record.processId)">详情</a>
<a-divider type="vertical" />
<a @click="up(record.id)">升序</a>
<a-divider type="vertical" />
@ -92,7 +95,7 @@
</a-table>
</div>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
<zy-product-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-product-process-modal>
</a-card>
</template>
@ -105,17 +108,19 @@
import ZyProductProcessModal from './modules/ZyProductProcessModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
import ZyProcessDetail from '@/views/process/modules/ZyProcessDetail'
export default {
name: 'ZyProductProcessList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProductProcessModal
ZyProductProcessModal,
ZyProcessDetail
},
data () {
return {
description: '产品工序管理页面',
processId:'',
biaoTi:'',
//
columns: [
{
@ -175,6 +180,10 @@
},
},
methods: {
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
},
up(id){
getAction(this.url.up,{id:id}).then((res)=>{
if(res.success){
@ -208,6 +217,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi=this.$route.query.productName+"产品工序管理";
console.log("***********")
this.loadRouteType = true;
}
@ -261,6 +271,12 @@
this.processId = ''
this.loadData(1);
},
fanhui(){
this.$router.push({
/*返回产品*/
path: '/WorkProduct',/*在引号中填写返回vue*/
});
},
}
}
</script>

@ -75,31 +75,52 @@
<a-tab-pane tab="基本信息" key="1" >
<a-card :bordered="false" v-if="selectedKeys.length>0">
<a-form :form="form">
<template v-if="!orgTypeDisabled">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
<a-tree-select
style="width:100%"
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
:treeData="treeData"
:disabled="disable"
v-model="model.parentId"
placeholder="无">
</a-tree-select>
</a-form-item>
</template>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="部门名称">
<a-input placeholder="请输入机构/部门名称" v-decorator="['departName', validatorRules.departName ]"/>
</a-form-item>
<template v-if="!orgCategoryDisabled">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
<a-tree-select
style="width:100%"
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
:treeData="treeData"
:disabled="disable"
v-model="model.parentId"
placeholder="无">
</a-tree-select>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="英文名称">
<a-input placeholder="请输入英文名称" v-decorator="['departNameEn', {'initialValue':''}]"/>
</a-form-item>
</template>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="缩写">
<a-input placeholder="请输入手机号" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="部门编码">
<a-input disabled placeholder="请输入部门编码" v-decorator="['orgCode', validatorRules.orgCode ]"/>
</a-form-item>
<template v-if="orgCategoryDisabled">
<template v-if="orgTypeDisabled">
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
<a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
@ -135,14 +156,9 @@
<!--</template>-->
</a-form-item>
</template>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="排序">
<a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
</a-form-item>
<template v-if="orgCategoryDisabled">
<template v-if="orgTypeDisabled">
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
@ -158,12 +174,13 @@
</template>
<!--<a-form-item-->
<!--:labelCol="labelCol"-->
<!--:wrapperCol="wrapperCol"-->
<!--label="备注">-->
<!--<a-textarea placeholder="请输入备注" v-decorator="['memo', {'initialValue':''}]"/>-->
<!--</a-form-item>-->
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="备注">
<a-textarea placeholder="请输入备注" v-decorator="['memo', {'initialValue':''}]"/>
</a-form-item>
</a-form>
<div class="anty-form-btn">
<a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">重置</a-button>
@ -189,7 +206,7 @@
import DepartModal from './modules/DepartModal'
import pick from 'lodash.pick'
import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api'
import {httpAction, deleteAction} from '@/api/manage'
import {httpAction, deleteAction,getAction} from '@/api/manage'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import DepartAuthModal from './modules/DepartAuthModal'
//
@ -198,6 +215,15 @@
title: '部门名称',
dataIndex: 'departName'
},
{
title: '英文名称',
dataIndex: 'departNameEn'
},
{
title: '缩写',
dataIndex: 'departNameAbbr'
},
{
title: '',
align: 'center',
@ -282,7 +308,8 @@
departName: {rules: [{required: true, message: '请输入部门/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入部门编码!'}]},
orgCategory: {rules: [{required: true, message: '请输入部门类型!'}]},
mobile: {rules: [{validator: this.validateMobile}]}
mobile: {rules: [{validator: this.validateMobile}]},
departNameAbbr: {rules: [{required: true,validator: this.validatedepartNameAbbr}]}
},
url: {
delete: '/sys/sysDepart/delete',
@ -290,8 +317,10 @@
deleteBatch: '/sys/sysDepart/deleteBatch',
exportXlsUrl: "sys/sysDepart/exportXls",
importExcelUrl: "sys/sysDepart/importExcel",
validatedepartNameAbbrUrl: "sys/sysDepart/validatedepartNameAbbr",
},
orgCategoryDisabled:false,
orgTypeDisabled:false,
}
},
computed: {
@ -375,9 +404,6 @@
ids += this.checkedKeys[a] + ','
}
var that = this
this.$confirm( '确定要删除所选中的 ' + this.checkedKeys.length + ' 条数据,以及子节点数据吗?','确认删除',
{
confirmButtonText: '确定',
@ -458,6 +484,12 @@
}else{
this.orgCategoryDisabled =true;
}
if(record.orgType == '1'){
this.orgTypeDisabled =true ;
}else{
this.orgTypeDisabled =false;
}
this.$nextTick(() => {
// this.form.getFieldDecorator('fax', {initialValue: ''})
this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
@ -634,9 +666,30 @@
this.getAllKeys(node.children[a])
}
}
}
},
// <!---- author:os_chengtgen -- date:20190827 -- for: =======------>
//
validatedepartNameAbbr(rule, value, callback){
let reg = /^[_a-zA-Z0-9]+$/
let reg2 = /^.{4,4}$/
// 618
if (value !== '' && !reg.test(value)) {
callback('只允许字母、数字、下划线')
} else if (value !== '' && !reg2.test(value)) {
callback('长度为4个字符')
} else {
getAction(this.url.validatedepartNameAbbrUrl,{'name':value}).then((res) => {
if (res.success) {
callback()
}else{
// this.$message.error(res.message);
callback('缩写已存在,请重新输入')
}
})
}
},
},
created() {
this.currFlowId = this.$route.params.id

@ -30,6 +30,20 @@
:disabled="condition">
</a-tree-select>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="英文名称">
<a-input placeholder="请输入英文名称" v-decorator="['departNameEn', {'initialValue':''}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="缩写">
<a-input placeholder="请输入手机号" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/>
</a-form-item>
<template v-if="seen">
<a-form-item
:labelCol="labelCol"
@ -85,12 +99,12 @@
<a-input placeholder="请输入地址" v-decorator="['address', {}]"/>
</a-form-item>
</template>
<!--<a-form-item-->
<!--:labelCol="labelCol"-->
<!--:wrapperCol="wrapperCol"-->
<!--label="备注">-->
<!--<a-textarea placeholder="请输入备注" v-decorator="['memo', {}]"/>-->
<!--</a-form-item>-->
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="备注">
<a-textarea placeholder="请输入备注" v-decorator="['memo', {}]"/>
</a-form-item>
</a-form>
</a-spin>
@ -98,7 +112,7 @@
</template>
<script>
import {httpAction} from '@/api/manage'
import {httpAction,getAction} from '@/api/manage'
import {queryIdTree} from '@/api/api'
import pick from 'lodash.pick'
import ATextarea from 'ant-design-vue/es/input/TextArea'
@ -134,10 +148,12 @@
validatorRules: {
departName: {rules: [{required: true, message: '请输入部门/部门名称!'}]},
orgCode: {rules: [{required: true, message: '请输入部门编码!'}]},
mobile: {rules: [{validator: this.validateMobile}]}
mobile: {rules: [{validator: this.validateMobile}]},
departNameAbbr: {rules: [{required: true,validator: this.validatedepartNameAbbr}]}
},
url: {
add: "/sys/sysDepart/add",
validatedepartNameAbbrUrl: "sys/sysDepart/validatedepartNameAbbr",
},
dictDisabled: true,
}
@ -222,8 +238,31 @@
} else {
callback("您的手机号码格式不正确!");
}
},
//
validatedepartNameAbbr(rule, value, callback){
let reg = /^[_a-zA-Z0-9]+$/
let reg2 = /^.{4,4}$/
// 618
if (value !== '' && !reg.test(value)) {
callback('只允许字母、数字、下划线')
} else if (value !== '' && !reg2.test(value)) {
callback('长度为4个字符')
} else {
//
}
console.log("validatedepartNameAbbrUrl");
console.log(value);
getAction(this.url.validatedepartNameAbbrUrl,{'name':value}).then((res) => {
if (res.success) {
callback()
}else{
// this.$message.error(res.message);
callback('缩写已存在,请重新输入')
}
})
}
},
}
}
</script>

@ -110,12 +110,11 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<a @click="openDetail(record.id)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.processId)">
<a>删除</a>
</a-popconfirm>
</span>
@ -124,11 +123,13 @@
</div>
<zy-process-modular-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-process-modular-modal>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
</a-modal>
</template>
<script>
import ZyProcessDetail from '@views/process/modules/ZyProcessDetail'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
@ -140,7 +141,8 @@ export default {
name: 'ZyProcessModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModularModal
ZyProcessModularModal,
ZyProcessDetail,
},
data() {
return {
@ -307,6 +309,10 @@ export default {
fieldList.push({type: 'string', value: 'modularId', text: '模块ID', dictCode: ''})
fieldList.push({type: 'string', value: 'processId', text: '工序ID', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}

@ -4,6 +4,56 @@
<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.productCode"></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.productName"></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.workCode"></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.realname"></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.departName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<!--<a-form-item label="生产时间">-->
<!--<a-range-picker v-model="queryParam.produceTime"-->
<!--format="yyyy-MM-dd HH:mm:ss"-->
<!--:placeholder="['开始时间', '结束时间']"-->
<!--@change="onproducetimeChange" />-->
<!--</a-form-item>-->
<a-form-item label="生产时间">
<!-- <a-input-number v-model="model.money" placeholder="请输入单价" :precision="2" :min="0" style="width: 100%" />-->
<a-input-number placeholder="请输入生产时间" v-model="queryParam.produceTime" :min="0"></a-input-number>
</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>
<!--<a @click="handleToggleSearch" style="margin-left: 8px">-->
<!--{{ toggleSearchStatus ? '收起' : '展开' }}-->
<!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!--</a>-->
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -11,27 +61,27 @@
<!-- 操作按钮区域 -->
<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>
<!--<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>
<!--<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"
@ -68,22 +118,27 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDetail(record)">工序</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">模块</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">面料</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">辅料</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">设备</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">工具</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<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>
@ -127,62 +182,78 @@
dataIndex: 'productCode'
},
{
title:'工单',
title:'产品名称',
align:"center",
dataIndex: 'workOrderId'
dataIndex: 'productName'
},
{
title:'生产时间',
title:'工单编号',
align:"center",
dataIndex: 'produceTime'
dataIndex: 'workCode'
},
{
title:'合计(手工TMU)',
title:'客户姓名',
align:"center",
dataIndex: 'totalManualTmu'
dataIndex: 'realname'
},
{
title:'合计(设备TMU)',
title:'产品图片',
align:"center",
dataIndex: 'totalMachineTmu'
dataIndex: 'productPicture',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'合计(手工秒)',
title:'结构图',
align:"center",
dataIndex: 'totalMaunal'
dataIndex: 'structureDiagram',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'合计(设备秒)',
title:'排料图',
align:"center",
dataIndex: 'totalMachine'
dataIndex: 'layoutDiagram',
scopedSlots: {customRender: 'imgSlot'}
},
{
title:'企业',
title:'款式',
align:"center",
dataIndex: 'enterprisesId'
dataIndex: 'typeName'
},
{
title:'用户',
title:'型号',
align:"center",
dataIndex: 'userId'
dataIndex: 'modelNumber'
},
{
title:'结构图',
title:'合计(手工TMU)',
align:"center",
dataIndex: 'structureDiagram',
scopedSlots: {customRender: 'imgSlot'}
dataIndex: 'totalManualTmu'
},
{
title:'排料图',
title:'合计(设备TMU)',
align:"center",
dataIndex: 'layoutDiagram',
scopedSlots: {customRender: 'imgSlot'}
dataIndex: 'totalMachineTmu'
},
{
title:'产品图片',
title:'合计(手工秒)',
align:"center",
dataIndex: 'productPicture',
scopedSlots: {customRender: 'imgSlot'}
dataIndex: 'totalMaunal'
},
{
title:'合计(设备秒)',
align:"center",
dataIndex: 'totalMachine'
},
{
title:'生产时间',
align:"center",
dataIndex: 'produceTime'
},
{
title:'生产企业',
align:"center",
dataIndex: 'departName'
},
{
title:'身高',
@ -281,6 +352,79 @@
methods: {
initDictConfig(){
},
//
//-
jumpProcesses(record)
{
this.$router.push({
path: '/src/views/product/productProcess/ZyProductProcessList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
//-
jumpModules(record)
{
this.$router.push({
path: '/src/views/product/productModule/ProductModuleList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
//-
jumpFabrics(record)
{
this.$router.push({
path: '/src/views/product/pdfabric/ProductFabricList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
//-
jumpAccessories(record)
{
this.$router.push({
path: '/src/views/duct/pdaccessories/ProductAccessoriesList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
//-
jumpEquipment(record)
{
this.$router.push({
path: '/src/views/product/pdmachine/ProductMachineList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
//-
jumpTools(record)
{
this.$router.push({
path: '/src/views/product/pdoperationtool/ProductOperationtoolList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
onproducetimeChange: function (value, dateString) {
console.log(dateString[0],dateString[1]);
this.queryParam.produceTimeBegin=dateString[0];
this.queryParam.produceTimeEnd=dateString[1];
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productCode',text:'产品编号',dictCode:''})

@ -4,11 +4,11 @@
<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="是否子单">
<j-dict-select-tag placeholder="请选择是否子单" v-model="queryParam.ischild" dictCode="ischild"/>
</a-form-item>
</a-col>
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="是否子单">-->
<!--<j-dict-select-tag placeholder="请选择是否子单" v-model="queryParam.ischild" dictCode="ischild"/>-->
<!--</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.ordersNum"></a-input>
@ -19,46 +19,46 @@
<j-dict-select-tag placeholder="请选择订单类型" v-model="queryParam.ordersType" dictCode="orders_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="支付方式">
<j-dict-select-tag placeholder="请选择支付方式" v-model="queryParam.paymentMethod" dictCode="payment_method"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="支付状态">
<j-dict-select-tag placeholder="请选择支付状态" v-model="queryParam.paymentStatus" dictCode="payment_status"/>
</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.accountNo"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="城市">
<j-area-linkage type="cascader" v-model="queryParam.cityId" placeholder="请选择省市区"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="发票客户类型">
<j-dict-select-tag placeholder="请选择发票客户类型" v-model="queryParam.invoiceCustomerType" dictCode="invoice_customer_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="发票类型">
<j-dict-select-tag placeholder="请选择发票类型" v-model="queryParam.invoiceType" dictCode="invoice_type"/>
</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.accountNumber"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="物流企业">
<j-select-depart placeholder="请选择物流企业" v-model="queryParam.logisticsEnterprisesId"/>
</a-form-item>
</a-col>
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="支付方式">-->
<!--<j-dict-select-tag placeholder="请选择支付方式" v-model="queryParam.paymentMethod" dictCode="payment_method"/>-->
<!--</a-form-item>-->
<!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="支付状态">-->
<!--<j-dict-select-tag placeholder="请选择支付状态" v-model="queryParam.paymentStatus" dictCode="payment_status"/>-->
<!--</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.accountNo"></a-input>-->
<!--</a-form-item>-->
<!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="城市">-->
<!--<j-area-linkage type="cascader" v-model="queryParam.cityId" placeholder="请选择省市区"/>-->
<!--</a-form-item>-->
<!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="发票客户类型">-->
<!--<j-dict-select-tag placeholder="请选择发票客户类型" v-model="queryParam.invoiceCustomerType" dictCode="invoice_customer_type"/>-->
<!--</a-form-item>-->
<!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="发票类型">-->
<!--<j-dict-select-tag placeholder="请选择发票类型" v-model="queryParam.invoiceType" dictCode="invoice_type"/>-->
<!--</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.accountNumber"></a-input>-->
<!--</a-form-item>-->
<!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="物流企业">-->
<!--<j-select-depart placeholder="请选择物流企业" v-model="queryParam.logisticsEnterprisesId"/>-->
<!--</a-form-item>-->
<!--</a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="交付状态">
<j-dict-select-tag placeholder="请选择交付状态" v-model="queryParam.deliveryStatus" dictCode="delivery_status"/>
@ -94,10 +94,10 @@
<!-- 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"
@ -211,30 +211,25 @@
}
},
// {
// title:'',
// title:'()',
// align:"center",
// dataIndex: 'ordersNum'
// dataIndex: 'money'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'freight'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'promotionPrice'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'actualPayment'
// },
{
title:'总金额(元)',
align:"center",
dataIndex: 'money'
},
{
title:'运费',
align:"center",
dataIndex: 'freight'
},
{
title:'促销',
align:"center",
dataIndex: 'promotionPrice'
},
{
title:'实付款',
align:"center",
dataIndex: 'actualPayment'
},
{
title:'交货期(天)',
align:"center",
@ -246,7 +241,7 @@
dataIndex: 'ordersType_dictText'
},
{
title:'客',
title:'客',
align:"center",
dataIndex: 'userId_dictText'
},
@ -255,50 +250,50 @@
// align:"center",
// dataIndex: 'goodsQuantity'
// },
{
title:'支付方式',
align:"center",
dataIndex: 'paymentMethod_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'paymentMethod_dictText'
// },
{
title:'支付状态',
align:"center",
dataIndex: 'paymentStatus_dictText'
},
{
title:'账号/卡号',
align:"center",
dataIndex: 'accountNo'
},
{
title:'开户银行',
align:"center",
dataIndex: 'bankDeposit'
},
{
title:'支付时间',
align:"center",
dataIndex: 'paymentTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'城市',
align:"center",
dataIndex: 'cityId',
scopedSlots: {customRender: 'pcaSlot'}
},
{
title:'地址',
align:"center",
dataIndex: 'address'
},
{
title:'邮编',
align:"center",
dataIndex: 'zipCode'
},
// {
// title:'/',
// align:"center",
// dataIndex: 'accountNo'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'bankDeposit'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'paymentTime',
// customRender:function (text) {
// return !text?"":(text.length>10?text.substr(0,10):text)
// }
// },
// {
// title:'',
// align:"center",
// dataIndex: 'cityId',
// scopedSlots: {customRender: 'pcaSlot'}
// },
// {
// title:'',
// align:"center",
// dataIndex: 'address'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'zipCode'
// },
{
title:'收货人',
align:"center",
@ -309,41 +304,41 @@
align:"center",
dataIndex: 'mobile'
},
{
title:'发票客户类型',
align:"center",
dataIndex: 'invoiceCustomerType_dictText'
},
{
title:'发票类型',
align:"center",
dataIndex: 'invoiceType_dictText'
},
{
title:'纳税人识别号',
align:"center",
dataIndex: 'taxIdentificationNumber'
},
{
title:'开票地址',
align:"center",
dataIndex: 'addressBilling'
},
{
title:'电话',
align:"center",
dataIndex: 'telephone'
},
{
title:'公户开户行',
align:"center",
dataIndex: 'bankPublic'
},
{
title:'公户账号',
align:"center",
dataIndex: 'accountNumber'
},
// {
// title:'',
// align:"center",
// dataIndex: 'invoiceCustomerType_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'invoiceType_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'taxIdentificationNumber'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'addressBilling'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'telephone'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'bankPublic'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'accountNumber'
// },
{
title:'销售门店',
align:"center",
@ -354,11 +349,11 @@
align:"center",
dataIndex: 'salespersonId_dictText'
},
{
title:'物流企业',
align:"center",
dataIndex: 'logisticsEnterprisesId_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'logisticsEnterprisesId_dictText'
// },
{
title:'交付状态',
align:"center",
@ -398,7 +393,7 @@
},
methods: {
paidan(record){
this.$refs.productionForm.showModal(record.id)
this.$refs.productionForm.showModal(record.id,record.ordersNum+"订单派单管理")
// getAction(this.url.paidan,{id:record.id}).then((res) => {
// if (res.success) {

@ -6,29 +6,27 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工单编号">
<a-input placeholder="请输入工单编号" v-model="queryParam.workCode"></a-input>
<a-input placeholder="请输入工单编号" v-model="queryParam.productCode"></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.orderCode"></a-input>
<a-input placeholder="请输入订单编号" v-model="queryParam.ordersNum"></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.realname"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="客户名称">
<a-input placeholder="请输入客户名称" v-model="queryParam.customerName"></a-input>
</a-form-item>
</a-col>
</template>
<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>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
<!--<a @click="handleToggleSearch" style="margin-left: 8px">-->
<!--{{ toggleSearchStatus ? '收起' : '展开' }}-->
<!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!--</a>-->
</span>
</a-col>
</a-row>
@ -38,25 +36,25 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!--<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>
<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>
<!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--<a-button type="primary" icon="import">导入</a-button>-->
<!--</a-upload>-->
<!--<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"
@ -93,8 +91,16 @@
</template>
<span slot="action" slot-scope="text, record">
<!--<a @click="handleEdit(record)">编辑</a>-->
<!--<a-divider type="vertical" />-->
<a @click="handleProductDetail(record)">产品管理</a>
<a-divider type="vertical" />
<a @click="jumpMaking(record)">制单</a>
<a-divider type="vertical" />
<a-popconfirm title="确定撤销吗?" @confirm="() => cancellationWorkOrder(record.id)">
<a>撤销工单</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
@ -104,6 +110,7 @@
</div>
<work-order-modal ref="modalForm" @ok="modalFormOk"></work-order-modal>
<zy-product-modal ref="productForm" @ok="modalFormOk"></zy-product-modal>
</a-card>
</template>
@ -113,12 +120,14 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import WorkOrderModal from '@/views/workorder/modules/WorkOrderModal'
import ZyProductModal from '@/views/zyWorkProduct/modules/ZyProductModal'
import {getAction } from '@/api/manage'
export default {
name: 'ZyWorkOrderList',
mixins:[JeecgListMixin, mixinDevice],
components: {
WorkOrderModal
WorkOrderModal,
ZyProductModal
},
data () {
return {
@ -135,20 +144,25 @@
return parseInt(index)+1;
}
},
{
title:'订单编号',
align:"center",
dataIndex: 'ordersNum'
},
{
title:'工单编号',
align:"center",
dataIndex: 'productCode'
},
{
title:'订单',
title:'客户名称',
align:"center",
dataIndex: 'ordersId'
dataIndex: 'realname'
},
{
title:'订单商品',
title:'商品名称',
align:"center",
dataIndex: 'orderGoodsId'
dataIndex: 'goodsName'
},
{
title:'商品数量',
@ -160,6 +174,7 @@
align:"center",
dataIndex: 'orderTime'
},
{
title:'交货期',
align:"center",
@ -168,7 +183,7 @@
{
title:'工单状态',
align:"center",
dataIndex: 'workOrderStatus_dictText'
dataIndex: 'workOrderStatusText'
},
{
title:'企业',
@ -190,7 +205,7 @@
deleteBatch: "/workOrder/workOrder/deleteBatch",
exportXlsUrl: "/workOrder/workOrder/exportXls",
importExcelUrl: "workOrder/workOrder/importExcel",
cancellationWorkOrderUrl:"workOrder/workOrder/cancellationWorkOrder",
},
dictOptions:{},
}
@ -204,7 +219,35 @@
},
methods: {
initDictConfig(){
}
},
//-
jumpMaking(record)
{
this.$router.push({
path: '/src/views/maker/ZyMakerList',
// query: { //
// 'pid': record.id,
// 'tname': record.name,
// }
});
},
//
cancellationWorkOrder(workId) {
// /
getAction(this.url.cancellationWorkOrderUrl,{'id':workId}).then((res) => {
if (res.success) {
this.$message.success("撤销成功!");
this.loadData();
}else{
this.$message.error(res.message);
}
})
},
handleProductDetail(record){
this.$refs.productForm.edit(record);
this.$refs.productForm.title="产品管理";
this.$refs.productForm.disableSubmit = true;
},
}
}
</script>

@ -10,6 +10,7 @@
cancelText="关闭"
>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333; padding-left: 28% ">{{ biaoTi }}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
@ -149,6 +150,7 @@
selectedRowKeys: [],
selectdepRows: [],
selectdepIds: [],
biaoTi:"",
}
},
created() {
@ -162,10 +164,11 @@
methods: {
initDictConfig(){
},
showModal(orderId) {
showModal(orderId,biaoTi) {
this.selectedRowKeys=[]
this.orderId=orderId
this.visible = true;
this.biaoTi=biaoTi
this.loadData();
},
close () {

@ -76,6 +76,16 @@
<j-image-upload isMultiple v-model="model.url"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="结构图(多副)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="structureDiagram">
<j-image-upload isMultiple v-model="model.structureDiagram"></j-image-upload>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="排料图(一副)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutDiagram">
<j-image-upload isMultiple v-model="model.layoutDiagram"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>

@ -366,9 +366,9 @@ export default {
// typeId: [
// {required: true, message: '!'},
// ],
// nums: [
// { required: true, message: '!'},
// ],
nums: [
{ required: true, message: '请输入编号!'},
],
styleNames: [
{required: true, message: '请输入款式名称!'},
],
@ -383,7 +383,7 @@ export default {
//getActionurl
sort: "/zyclothsstyle/zyClothsStyle/sort",
//
enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
enterpriseNum: "/base/zyClothsType/getEnterpriseNum"
}
}
},
@ -404,7 +404,7 @@ export default {
if (res.code === 500) {
this.$message({
type: 'error',
message: '只能选择一个企业!'
message: res.message,
});
} else if (res.code !== 200) {
this.$message({

@ -75,6 +75,8 @@ import {filterObj, validateDuplicateValue} from '@/utils/util'
import ZyStyleModelListDetails from "@views/zystylemodel/modules/ZyStyleModelListDetails";
export default {
// Jv
//JVXETable
name: 'ZyStyleModelList',
mixins: [JeecgListMixin, mixinDevice],
components: {

@ -106,7 +106,8 @@
<span slot="action" slot-scope="text, record">
<a @click="viewDetail(record.id)">详情</a>
<!-- <a @click="viewDetail(record.id)">详情</a>-->
<a @click="openDetail(record.processId)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
@ -118,11 +119,13 @@
<zy-style-modular-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-style-modular-modal>
<ZyStyleModularListDetails ref="ZyStyleModularListDetails"></ZyStyleModularListDetails>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
</a-card>
</template>
<script>
import ZyProcessDetail from '@views/process/modules/ZyProcessDetail'
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
@ -135,6 +138,7 @@ export default {
name: 'ZyStyleModularList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessDetail,
ZyStyleModularListDetails,
ZyStyleModularModal
},
@ -164,7 +168,7 @@ export default {
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
dataIndex: 'processCode'//
},
{
title: '工序',
@ -285,6 +289,10 @@ export default {
fieldList.push({type: 'string', value: 'styleId', text: '款式id', dictCode: ''})
fieldList.push({type: 'string', value: 'processId', text: '工序id', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}

@ -1,4 +1,6 @@
const path = require('path')
//YU 优化 解决webpack打包后chunk.js 数量过多,影响加载速度问题(Jeecg)
const webpack = require('webpack')
const CompressionPlugin = require("compression-webpack-plugin")
function resolve(dir) {
@ -14,7 +16,6 @@
*/
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false,
//打包app时放开该配置
//publicPath:'./',
configureWebpack: config => {
@ -31,17 +32,37 @@
"maxAssetSize": 30000000
}
}
// config.externals = {
// 'vue': 'Vue',
// 'vuex': 'Vuex',
// 'vue-router': 'VueRouter',
// 'axios':'axios',
// };
},
chainWebpack: (config) => {
// YU-优化
config.plugins.delete('prefetch')
// YU-优化 只保留中文语言包
config.plugin('ContextReplacementPlugin').use(webpack.ContextReplacementPlugin, [/moment[/\\]locale$/, /zh-cn/])
config.resolve.alias
.set('@$', resolve('src'))
.set('@api', resolve('src/api'))
.set('@assets', resolve('src/assets'))
.set('@comp', resolve('src/components'))
.set('@views', resolve('src/views'))
//.set('@ant-design/icons/lib/dist$',resolve("src/icons.js"))
// YU-优化 包
// config.set('externals', {
// 'vue': 'Vue',
// 'vuex': 'Vuex',
// 'vue-router': 'VueRouter',
// 'axios':'axios',
// })
//生产环境,开启js\css压缩
if (process.env.NODE_ENV === 'production') {
@ -51,6 +72,15 @@
deleteOriginalAssets: false // 不删除源文件
}))
}
// YU-优化
// 限制打包的个数(减少打包生成的js文件和css文件)
//在合并chunk时,webpack会尝试识别出具有重复模块的chunk,并优先进行合并。任何模块都不会被合并到entry chunk中,以免影响初始页面加载时间
//maxChunks:使用大于或等于 1 的值,来限制 chunk 的最大数量。使用 1 防止添加任何其他额外的 chunk,这是因为 entry/main chunk 也会包含在计数之中。
//minChunkSize: 设置 chunk 的最小大小。
// config.plugin('chunkPlugin').use(webpack.optimize.LimitChunkCountPlugin, [{
// maxChunks: 10,
// minChunkSize: 10000
// }])
// 配置 webpack 识别 markdown 为普通的文件
config.module

@ -61,9 +61,9 @@ public class ZyAccessories implements Serializable {
@ApiModelProperty(value = "规格")
private java.lang.String specs;
/**库存量*/
@Excel(name = "库存量", width = 15)
@ApiModelProperty(value = "库存量")
private java.lang.Integer store;
// @Excel(name = "库存量", width = 15)
// @ApiModelProperty(value = "库存量")
// private java.lang.Integer store;
/**供货商信息*/
@Excel(name = "供货商信息", width = 15)
@ApiModelProperty(value = "供货商信息")

@ -265,7 +265,7 @@ public class ZyFabricController extends JeecgController<ZyFabric, IZyFabricServi
@ApiOperation(value="面料表-添加", notes="面料表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyFabric zyFabric) {
zyFabric.setCreateTime(new Date().toLocaleString());
// zyFabric.setCreateTime(new Date().toLocaleString());
List<ZyFabric> list = zyFabricService.list();
for (ZyFabric zy : list){
if (zy.getName().equals(zyFabric.getName())){
@ -286,7 +286,7 @@ public class ZyFabricController extends JeecgController<ZyFabric, IZyFabricServi
@ApiOperation(value="面料表-编辑", notes="面料表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyFabric zyFabric) {
zyFabric.setUpdateTime(new Date().toLocaleString());
// zyFabric.setUpdateTime(new Date().toLocaleString());
List<ZyFabric> list = zyFabricService.list();
ZyFabric zyFabric1 = zyFabricService.getById(zyFabric.getId());
list.remove(zyFabric1);

@ -144,20 +144,20 @@ public class ZyFabric implements Serializable {
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建时间*/
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间")
private java.lang.String createTime;
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新时间*/
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
// @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT_UPDATE)
@ApiModelProperty(value = "更新时间")
private java.lang.String updateTime;
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;

@ -20,6 +20,11 @@
<version>2.4.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-module-erp</artifactId>
<version>2.4.5</version>
</dependency>
</dependencies>

@ -71,8 +71,6 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
//queryWrapper.eq("modular_id", modularId);
Page<ZyClothsModularCompent> page = new Page<ZyClothsModularCompent>(pageNo, pageSize);
IPage<ZyClothsModularCompent> pageList = zyClothsModularCompentService.page(page, queryWrapper);
//List<ZyClothsModularCompent> recordList = zyClothsModularCompentMapper.queryList(modularId);
//pageList.setRecords(recordList);
List<ZyClothsModularCompent> records = pageList.getRecords();
//Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//只要数字 如果是纯数字 就把它替换了

@ -14,11 +14,11 @@ import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
@ -57,8 +57,6 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//zyClothsTypeService.chuliBianHaoWenti();
//System.err.println(zyClothsType);
QueryWrapper<ZyClothsType> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsType, req.getParameterMap());
Page<ZyClothsType> page = new Page<ZyClothsType>(pageNo, pageSize);
IPage<ZyClothsType> pageList = zyClothsTypeService.page(page, queryWrapper);
@ -82,6 +80,11 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
@ApiOperation(value = "zy_cloths_type-添加", notes = "zy_cloths_type-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsType zyClothsType) {
//处理空值问题
// Result<?> resultEmpty = zyClothsTypeService.handleEmpty(zyClothsType);
// if (resultEmpty.getMessage().equals("都不为空")){
// return resultEmpty;
// }
if (StringUtils.isEmpty(zyClothsType.getNums())) {
return Result.error("服装类型编号 不能为空");
}
@ -118,9 +121,6 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
/**
* 编辑
*
* @param zyClothsType
* @return
*/
@AutoLog(value = "zy_cloths_type-编辑")
@ApiOperation(value = "zy_cloths_type-编辑", notes = "zy_cloths_type-编辑")
@ -203,6 +203,7 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
if (StringUtils.isEmpty(enterpriseId)) {
return Result.error("请先选择一个企业");
}
//nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)
String a = zyClothsTypeService.sort(enterpriseId);
if (a == null) {
return Result.OK("0");
@ -212,5 +213,18 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
return Result.OK(a);
}
@GetMapping(value = "/getEnterpriseNum")
public Result<?> enterpriseNum(@RequestParam(name = "id", required = true)String id) {
if (StringUtils.isEmpty(id)) {
return Result.error("请先选择一个企业");
} else if (id.contains(",")) {
//id.contains(",") 判断是否字符中是否包含","
return Result.error("只能选择一个企业");
} else {
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(id);
//根据企业名称拿到企业编号
return Result.OK(zyClothsTypeService.getEnterpriseNums(enterpriseName));
}
}
}

@ -16,8 +16,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@Mapper
public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
List<String> selectNumsList();
List<String> listByTypeId(String typeId);
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")

@ -5,10 +5,6 @@
UPDATE `zy_cloths_type` SET enterprise_id= #{id}
</update>
<select id="selectNumsList" resultType="java.lang.String">
SELECT nums
FROM zy_cloths_type
</select>
<select id="listByTypeId" resultType="java.lang.String">
SELECT type_name
FROM zy_cloths_type

@ -21,7 +21,7 @@ public interface IZyClothsComponentService extends IService<ZyClothsComponent> {
public List<ZyClothsComponent> selectByModular(String modular_id);
/**编码规则:服装类型(10)+序号(8)*/
String generateNumber(ZyClothsComponent zyClothsComponent);
//String generateNumber(ZyClothsComponent zyClothsComponent);
ZyClothsComponentDetail queryDetail(String id);

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.extension.service.IService;
@ -23,13 +24,12 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
Long orderNumber();
/**
* 拿到集合中的最大值
* @param listString 传进来一个String类型的集合
* @param i 返回数字的位数 例如一般6位或8位
* 拿到集合中的最大值 digits: 位数
* @param stringList 传进来一个String类型的集合
* @param digits 返回数字的位数 例如一般6位或8位
* @return 返回一个long类型的i位数最大值
*/
Long getListMax(List<String> listString, int i);
Long getListMax(List<String> stringList, int digits);
Result<?> handleEmpty(ZyClothsType zyClothsType);
}

@ -9,6 +9,7 @@ import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.pro.service.IZyProcessComponentService;
import org.jetbrains.annotations.NotNull;
@ -21,6 +22,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: zy_cloths_component
@ -33,6 +35,8 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
@Autowired
private IZyProcessComponentService zyProcessComponentService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsComponentMapper zyClothsComponentMapper;
@ -57,15 +61,15 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
/**
* 编码规则服装类型10+序号8
*/
@Override
public String generateNumber(ZyClothsComponent zyClothsComponent) {
String nums = zyClothsComponent.getClothsTypeId();
ZyClothsType zyClothsType = zyClothsTypeMapper.selectById(nums);
String nums1 = zyClothsType.getNums();
//String substring = nums.substring(nums.length() - 10);
String format = String.format("%08d", orderNumber());
return nums1 + format;
}
// @Override
// public String generateNumber(ZyClothsComponent zyClothsComponent) {
// String nums = zyClothsComponent.getClothsTypeId();
// ZyClothsType zyClothsType = zyClothsTypeMapper.selectById(nums);
// String nums1 = zyClothsType.getNums();
// //String substring = nums.substring(nums.length() - 10);
// String format = String.format("%08d", orderNumber());
// return nums1 + format;
// }
@Override
public ZyClothsComponentDetail queryDetail(String id) {
@ -81,10 +85,15 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
return detail;
}
/**
* 编码规则服装类型10+序号8
*/
@Override
public String sort(String id) {
String nums = zyClothsTypeMapper.selectNumOne(id);
String format = String.format("%08d", orderNumber());
List<ZyClothsComponent> components = this.list();
List<String> collect = components.stream().map(ZyClothsComponent::getNums).collect(Collectors.toList());
String format = String.format("%08d", zyClothsTypeService.getListMax(collect, 8));
return nums + format;
}
@ -125,24 +134,24 @@ public class ZyClothsComponentServiceImpl extends ServiceImpl<ZyClothsComponentM
}
public Long orderNumber() {
List<String> listString = zyClothsComponentMapper.selectNumsList2();
//System.err.println(listString);
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (!StringUtils.hasText(newNums)) {
newNums = "0";
}
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
} else {
listLong.add(Long.valueOf(newNums));
}
}
//System.out.println(listLong);
return Collections.max(listLong) + 1;
}
// public Long orderNumber() {
// List<String> listString = zyClothsComponentMapper.selectNumsList2();
// //System.err.println(listString);
// List<Long> listLong = new ArrayList<>();
// for (String nums : listString) {
// String REGEX = "[^0-9]";
// String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
// if (!StringUtils.hasText(newNums)) {
// newNums = "0";
// }
// if (newNums.length() > 8) {
// String substring = nums.substring(nums.length() - 8);
// listLong.add(Long.valueOf(substring));
// } else {
// listLong.add(Long.valueOf(newNums));
// }
// }
// //System.out.println(listLong);
// return Collections.max(listLong) + 1;
// }
}

@ -9,6 +9,8 @@ import org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -20,6 +22,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: zy_cloths_modular
@ -32,6 +35,8 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
@Autowired
private IZyClothsModularCompentService zyClothsModularComponentService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@ -50,7 +55,9 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
public String generateNumber(String id) {
String numOne = zyClothsTypeMapper.selectNumOne(id);
// String substring = nums.substring(nums.length() - 10);
String format = String.format("%08d", orderNumber());
List<ZyClothsModular> zyClothsModularList = this.list();
List<String> collect = zyClothsModularList.stream().map(ZyClothsModular::getNums).collect(Collectors.toList());
String format = String.format("%08d", zyClothsTypeService.getListMax(collect, 8));
return numOne + format;
}
@ -97,6 +104,7 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
return zyProcessModularVos;
}
@NotNull
private ZyClothsModular detail(String id) {
ZyClothsModular zyClothsModular = zyClothsModularMapper.selectById(id);
//翻译服装类型名称 和企业
@ -117,30 +125,30 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
}else {
zyClothsModular.setEnterpriseId("null");
}
System.out.println("zyClothsModular 服装款式详情"+zyClothsModular);
//System.out.println("zyClothsModular 服装款式详情"+zyClothsModular);
return zyClothsModular;
}
private Long orderNumber() {
List<String> listString = zyClothsModularMapper.selectNumsList1();
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (newNums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
listLong.add(Long.valueOf(substring));
continue;
}
if (StringUtils.isEmpty(newNums)) {
newNums = "0";
}
listLong.add(Long.valueOf(newNums));
}
//System.out.println(listLong);
return Collections.max(listLong) + 1;
}
// private Long orderNumber() {
// List<String> listString = zyClothsModularMapper.selectNumsList1();
// List<Long> listLong = new ArrayList<>();
// for (String nums : listString) {
// String REGEX = "[^0-9]";
// String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
// if (newNums.length() > 8) {
// String substring = nums.substring(nums.length() - 8);
// listLong.add(Long.valueOf(substring));
// continue;
// }
// if (StringUtils.isEmpty(newNums)) {
// newNums = "0";
// }
// listLong.add(Long.valueOf(newNums));
//
// }
// //System.out.println(listLong);
// return Collections.max(listLong) + 1;
//
// }
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.base.service.impl;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.mapper.ZyClothsTypeMapper;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
@ -7,6 +8,7 @@ import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
@ -14,6 +16,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: zy_cloths_type
@ -30,6 +33,7 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
/**
* 顺序号
* nums编号非空不重复企业缩写4+顺序号6
*/
@Override
public String sort(String enterpriseId) {
@ -78,35 +82,59 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
@Override
public Long orderNumber() {
List<String> listString = zyClothsTypeMapper.selectNumsList();
return this.getListMax(listString,6);
//List<String> listString = zyClothsTypeMapper.selectNumsList();
List<ZyClothsType> zyClothsTypeList = this.list();
List<String> stringList = zyClothsTypeList.stream().map(ZyClothsType::getNums).collect(Collectors.toList());
return this.getListMax(stringList,6);
}
/**
* 拿到集合中的最大值 digits: 位数
* @param stringList 传进来一个String类型的集合
* @param digits 返回数字的位数 例如一般6位或8位
* @return 返回一个long类型的digits位数最大值
*/
@Override
public Long getListMax(@NotNull List<String> listString, int i) {
List<Long> listLong = new ArrayList<>();
for (String nums : listString) {
String REGEX = "[^0-9]";
//只要数字
public Long getListMax(List<String> stringList, int digits) {
if (ObjectUtils.isEmpty(stringList)){
return 1L;
}
List<Long> longList = new ArrayList<>();
String REGEX = "[^0-9]";
for (String nums : stringList) {
//只要数字.trim()去空格
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (StringUtils.isEmpty(newNums)) {
continue;
}
if (newNums.length() > i) {
//拿到后6位
String substring = newNums.substring(newNums.length() - i);
listLong.add(Long.valueOf(substring));
} else {
listLong.add(Long.valueOf(newNums));
if (StringUtils.isEmpty(newNums)) continue;
if (newNums.length() <= digits) longList.add(Long.valueOf(newNums));
else {
//拿到后6位 substring(4) 截掉前4位
String substring = newNums.substring(newNums.length() - digits);
longList.add(Long.valueOf(substring));
}
}
long max = Collections.max(listLong) + 1;
if (Long.toString(max).length() > i) {
long max = Collections.max(longList) + 1;
if (Long.toString(max).length() > digits) {
String toString = Long.toString(max);
String substring = toString.substring(toString.length() - i);
String substring = toString.substring(toString.length() - digits);
return Long.valueOf(substring);
}
return max;
}
@Override
public Result<?> handleEmpty(ZyClothsType zyClothsType) {
if (ObjectUtils.isEmpty(zyClothsType)){
return Result.error("服装类型数据 不能为空");
}
if (StringUtils.isEmpty(zyClothsType.getNums())) {
return Result.error("服装类型编号 不能为空");
}
//type_name,类型名称,varchar,50,非空,同类型下不重复
if (!StringUtils.hasText(zyClothsType.getTypeName())) {
return Result.error("类型名称 不能为空");
}
return Result.error("true");
}
}

@ -40,9 +40,9 @@ public class ZyProcessMachine implements Serializable {
@ApiModelProperty(value = "工序")
private String processId;
/**机器*/
@Excel(name = "机器", width = 15, dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@Excel(name = "设备", width = 15, dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
@Dict(dictTable = "zy_device", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "机器")
@ApiModelProperty(value = "设备")
private String machineId;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")

@ -59,11 +59,12 @@
<artifactId>jeecg-boot-module-process</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-module-activiti</artifactId>
<version>${jeecgboot.version}</version>
</dependency>
<!--流程设计器-->
<!--<dependency>-->
<!--<groupId>org.jeecgframework.boot</groupId>-->
<!--<artifactId>jeecg-boot-module-activiti</artifactId>-->
<!--<version>${jeecgboot.version}</version>-->
<!--</dependency>-->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-module-orderbymakeclothplan</artifactId>
@ -133,6 +134,11 @@
<artifactId>spring-test</artifactId>
<version>5.2.4.RELEASE</version>
</dependency>
<!-- 引入定时任务依赖 -->
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-job</artifactId>
</dependency>
</dependencies>
<build>

@ -29,7 +29,7 @@ import java.net.UnknownHostException;
@Slf4j
@SpringBootApplication(exclude = {org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration.class
,org.activiti.spring.boot.SecurityAutoConfiguration.class
// ,org.activiti.spring.boot.SecurityAutoConfiguration.class
})
@EnableScheduling
@EnableTransactionManagement

@ -102,16 +102,18 @@ public class OrderGoods implements Serializable {
@Excel(name = "商品视频", width = 15)
@ApiModelProperty(value = "商品视频")
private java.lang.String goodsVideo;
/**服装款式*/
@Excel(name = "服装款式", width = 15)
@Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
@ApiModelProperty(value = "服装款式id")
private java.lang.String styleId;
/**服装类型id*/
@Excel(name = "服装类型id", width = 15)
@Dict(dictTable = "zy_cloths_type ", dicText = "type_name", dicCode = "id")
@ApiModelProperty(value = "服装类型id")
private java.lang.String clothsTypeId;
/**款式id*/
@Excel(name = "款式id", width = 15)
@Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
@ApiModelProperty(value = "款式id")
private java.lang.String styleId;
/**型号id*/
@Excel(name = "型号id", width = 15)
@Dict(dictTable = "zy_style_model", dicText = "model_number", dicCode = "id")

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.zyorders.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import com.baomidou.mybatisplus.extension.service.IService;

@ -46,7 +46,7 @@ public class ProductComponentProcess implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
//@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 表暂未设计暂时不打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productComponentId;
/**产品模块部件id*/
@Excel(name = "产品模块部件id", width = 15)

@ -47,7 +47,7 @@ public class ProductModuleComponent implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
//@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 表暂未设计暂时不打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**产品模块id*/
@Excel(name = "产品模块id", width = 15)

@ -48,7 +48,7 @@ public class ProductModuleProcess implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
//@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 表暂未设计暂时不打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**产品模块id*/
@Excel(name = "产品模块id", width = 15)

@ -48,7 +48,7 @@ public class ProductAccessories implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
// @Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 由于当前产品还没有,需要后期打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**辅料id*/
@Excel(name = "辅料id", width = 15)

@ -48,7 +48,7 @@ public class ProductFabric implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
// @Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 由于当前产品还没有,需要后期打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**面料id*/
@Excel(name = "面料id", width = 15)

@ -44,7 +44,7 @@ public class ProductMachine implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
// @Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 由于当前产品还没有,需要后期打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**设备d*/
@Excel(name = "设备d", width = 15)

@ -45,7 +45,7 @@ public class ProductOperationtool implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
// @Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 由于当前产品还没有,需要后期打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**工具id*/
@Excel(name = "工具id", width = 15)

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@ -63,6 +64,7 @@ public class ProductModule implements Serializable {
private String styleModuleId;
/**模块id*/
@Excel(name = "模块id", width = 15)
@Dict(dictTable = "zy_cloths_modular ", dicText = "modular_name", dicCode = "id")
@ApiModelProperty(value = "模块id")
private String moduleId;
/**部位*/

@ -56,13 +56,14 @@ public class ZyProductProcess implements Serializable {
/**产品id*/
@Excel(name = "产品id", width = 15)
@ApiModelProperty(value = "产品id")
// @Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id") 由于当前产品还没有,需要后期打开
@Dict(dictTable = "zy_product",dicText = "product_code",dicCode = "id")
private String productId;
/**工序id*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**序号*/
@Excel(name = "序号", width = 15)
@ApiModelProperty(value = "序号")

@ -527,4 +527,22 @@ public class SysDepartController {
result.setResult(sysUsers);
return result;
}
/**
* 根据部门id获取用户信息
*
* @return
*/
@GetMapping("/validatedepartNameAbbr")
public Result<?> getValidatedepartNameAbbr(@RequestParam(name = "name") String name) {
QueryWrapper<SysDepart> depWrapper=new QueryWrapper<SysDepart>();
depWrapper.eq("depart_name_abbr",name);
List<SysDepart> list = sysDepartService.list(depWrapper);
if(list.size()>0)
{
return Result.error("缩写已存在!");
}
return Result.OK("成功!");
}
}

@ -1,5 +1,6 @@
package org.jeecg.modules.workorder.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -21,11 +22,28 @@ import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.service.ICustomerMeasureService;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories;
import org.jeecg.modules.demo.ordergoodsaccessories.service.IOrderGoodsAccessoriesService;
import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric;
import org.jeecg.modules.demo.ordergoodsfabric.service.IOrderGoodsFabricService;
import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
import org.jeecg.modules.demo.ordergoodsmodule.service.IOrderGoodsModuleService;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.product.pdaccessories.entity.ProductAccessories;
import org.jeecg.modules.product.pdaccessories.service.IProductAccessoriesService;
import org.jeecg.modules.product.pdfabric.entity.ProductFabric;
import org.jeecg.modules.product.pdfabric.service.IProductFabricService;
import org.jeecg.modules.product.productModule.entity.ProductModule;
import org.jeecg.modules.product.productModule.service.IProductModuleService;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.service.IZyProductProcessService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
@ -64,38 +82,15 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderService> {
@Autowired
private IWorkOrderService workOrderService;
//订单
@Autowired
private IZyOrdersService zyOrdersService;
//订单商品
@Autowired
private IOrderGoodsService orderGoodsService;
//工单产品
@Autowired
private IZyProductService zyProductService;
//款式
@Autowired
private IZyClothsStyleService zyClothsStyleService;
//型号
@Autowired
private IZyStyleModelService zyStyleModelService;
//顾客测体
@Autowired
private ICustomerMeasureService customerMeasureService;
//成衣样板
@Autowired
private IZyClothSampleService zyClothSampleService;
//部门
@Autowired
private ISysDepartService sysDepartService;
/**
* 分页列表查询
*
@ -254,13 +249,13 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
@AutoLog(value = "工单管理-分页列表查询")
@ApiOperation(value="工单管理-分页列表查询", notes="工单管理工-分页列表查询")
@GetMapping(value = "/workList")
public Result<?> queryPageWorkList(WorkOrder workOrder,
public Result<?> queryPageWorkList(WorkOrderVo workOrder,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<WorkOrder> queryWrapper = QueryGenerator.initQueryWrapper(workOrder, req.getParameterMap());
//QueryWrapper<WorkOrder> queryWrapper = QueryGenerator.initQueryWrapper(workOrder, req.getParameterMap());
Page<WorkOrder> page = new Page<WorkOrder>(pageNo, pageSize);
IPage<WorkOrder> pageList = workOrderService.page(page, queryWrapper);
IPage<WorkOrder> pageList = workOrderService.selectPage(page, workOrder);
return Result.OK(pageList);
}
@ -308,144 +303,41 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
return Result.error("该订单已经派单,请不要重复操作!");
}
else {//start for 1
//商品订单是否存在
QueryWrapper<OrderGoods> ogWrapper=new QueryWrapper<OrderGoods>();
ogWrapper.eq("orders_id",orderId);
List<OrderGoods> ogList=orderGoodsService.list(ogWrapper);
if(ogList.size()>0)
{//start if 02
// 保存工单
OrderGoods ogModel=ogList.get(0);
//服装款式
//QueryWrapper<ZyClothsStyle> csWrapper=new QueryWrapper<ZyClothsStyle>();
ZyClothsStyle csModel=zyClothsStyleService.getById(ogModel.getStyleId());
//服装型号
//QueryWrapper<ZyStyleModel> sm=new QueryWrapper<ZyStyleModel>();
ZyStyleModel smModel=zyStyleModelService.getById(ogModel.getModelId());
if(csModel==null ||smModel==null)
{
return Result.error("该订单服装型号或服装款式不存在,请检查后在操作!");
}
//得到结构图和排排料图
QueryWrapper<ZyClothSample> csWrapper=new QueryWrapper<ZyClothSample>();
csWrapper.eq("style_id",ogModel.getStyleId());
csWrapper.eq("stylemodel_id",ogModel.getModelId());
List<ZyClothSample> csList=zyClothSampleService.list(csWrapper);
// if(csList.size()<=0)
// {
// return Result.error("商品成衣样板不存在,请检查后在操作!");
// }
// ZyClothSample cSampleModel=csList.get(0);
int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
workOrder.setOrdersId(orderId);//订单id
workOrder.setOrderGoodsId(ogModel.getId());// 订单商品
workOrder.setGoodsNum(goodNum);//商品数量
workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间
workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期
workOrder.setWorkOrderStatus(0);//工单状态
workOrder.setEnterprisesId(depId);//企业id
workOrderService.save(workOrder);
//保存产品
if(ogModel.getGoodsNum()>0)
{
//量体数据
CustomerMeasure mesureModel=customerMeasureService.getById(ogModel.getMeasureId());
if(mesureModel==null) {
return Result.error("未找到对客户量体数据!");
}
return workOrderService.paidan(zyOrders,depId);
for(int i=0;i<goodNum;i++)
{
ZyProduct productModel=new ZyProduct();
productModel.setProductCode(CreateProductCode(workOrder.getProductCode()));// 产品编号
productModel.setWorkOrderId(workOrder.getId());//_ 工单id
// productModel.setProduceTime("");// 生产时间
// productModel.setTotalManualTmu("");// 合计(手工TMU)
// productModel.setTotalMachineTmu("");// 合计(设备TMU)
// productModel.setTotalMaunal("");// 合计(手工秒)
// productModel.setTotalMachine("");// 合计(设备秒)
// productModel.setEnterprisesId("");//_id 企业id
productModel.setUserId(zyOrders.getUserId());//_id 用户id
// productModel.setStructureDiagram(cSampleModel.getStructureDiagram());//_diagram 结构图
// productModel.setLayoutDiagram(cSampleModel.getLayoutDiagram());//_diagram 排料图
// productModel.setProductPicture(cSampleModel.getUrl());//_picture 产品图片
productModel.setHeight(mesureModel.getHeight());// 身高
productModel.setWeight(mesureModel.getWeight());// 体重
productModel.setHem(mesureModel.getHem());// 下摆
productModel.setCuff(mesureModel.getCuff());// 袖口
productModel.setSleeveLength(mesureModel.getSleeveLength());//_length 袖长
productModel.setBust(mesureModel.getBust()) ;//胸围
productModel.setTheWaist(mesureModel.getTheWaist());//_waist 腰围
productModel.setShoulderwidth(mesureModel.getShoulderWidth());// width 肩宽
productModel.setForebodylength(mesureModel.getForebodyLength()) ;//length 前身长
productModel.setNeck(mesureModel.getNeck());// 领围
productModel.setHipline(mesureModel.getHipline());// 臀围
productModel.setLength(mesureModel.getLength());// 衣长
productModel.setSternalDistance(mesureModel.getSternalDistance());//distance 胸距
productModel.setEnterprisesId(depId);//企业
zyProductService.save(productModel);
}
}else
{
return Result.error("订单商品数量小于0!");
}
}else//end if 02
{
return Result.error("订单商品数据未找到!");
}
}//end for 1
}
//修改订单状态
zyOrders.setDeliveryStatus(3);
zyOrdersService.updateById(zyOrders);
return Result.OK("成功");
}
//生成工单编号
/**
*
* @param styleCode 款式编号
* @param modelCode 型号编号
* 撤销工单
* 增加撤销操作点击撤销删除工单和对应的产品订单状态改为派单前的状态
* 撤销操作同时会撤销产品模块产品面料产品辅料产品工序以及制单数据
* @param
* @return
*/
private String CreateWorkCode(String styleCode,String modelCode)
{//编号规则:款式编号(10)+型号(4)+顺序号(8)
String mrstr = "00000000";
int listsize = workOrderService.count();
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String workCode = styleCode+modelCode+substr+str;
return workCode;
}
@AutoLog(value = "撤销工单")
@ApiOperation(value="撤销工单", notes="撤销工单")
@GetMapping(value = "/cancellationWorkOrder")
public Result<?> cancellationWorkOrder(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
WorkOrder woModel=workOrderService.getById(id);
if(woModel==null) {
return Result.error("未找到对应数据!");
}else{
//增加撤销操作,点击撤销删除工单和对应的产品,订单状态改为派单前的状态。
//撤销操作,同时会撤销产品模块、产品面料、产品辅料、产品工序、以及制单数据
return workOrderService.cancellationWorkOrder(woModel);
//修改订单状态
// ZyOrders zyOrders = zyOrdersService.getById(woModel.getOrdersId());
// zyOrders.setDeliveryStatus(2);
// zyOrdersService.updateById(zyOrders);
}
/**
*
* @param workCode 工单编号
* @return
*/
private String CreateProductCode(String workCode)
{//编号规则:工单编号(22)+顺序号(8)
String mrstr = "00000000";
int listsize = zyProductService.count();
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String produceCode = workCode+substr+str;
return produceCode;
}
}

@ -0,0 +1,115 @@
package org.jeecg.modules.workorder.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="work_order对象", description="工单订单完工")
public class WorkOrderVo implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**工单编号*/
@Excel(name = "工单编号", width = 15)
@ApiModelProperty(value = "工单编号")
private String productCode;
// /**订单*/
// @Excel(name = "订单", width = 15)
// @ApiModelProperty(value = "订单")
// private String ordersId;
/**原订单id*/
@Excel(name = "订单", width = 15)
@Dict(dictTable = "zy_orders", dicText = "orders_num", dicCode = "id")
@ApiModelProperty(value = "订单")
private String ordersId;
/**订单商品*/
@Excel(name = "订单商品", width = 15)
@ApiModelProperty(value = "订单商品")
private String orderGoodsId;
@ApiModelProperty(value = "订单商品名称")
private String goodsName;
/**商品数量*/
@Excel(name = "商品数量", width = 15)
@ApiModelProperty(value = "商品数量")
private Integer goodsNum;
/**下单时间*/
@Excel(name = "下单时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "下单时间")
private Date orderTime;
/**交货期*/
@Excel(name = "交货期", width = 15)
@ApiModelProperty(value = "交货期")
private Integer deliveryTime;
/**工单状态*/
@Excel(name = "工单状态", width = 15, dicCode = "work_order_status")
@Dict(dicCode = "work_order_status")
@ApiModelProperty(value = "工单状态")
private Integer workOrderStatus;
@ApiModelProperty(value = "工单状态")
private String workOrderStatusText;
/**企业*/
@Excel(name = "企业", width = 15)
@ApiModelProperty(value = "企业")
private String enterprisesId;
@ApiModelProperty(value = "客户姓名")
private String realname;
@ApiModelProperty(value = "企业")
private String departName;
@ApiModelProperty(value = "订单编号")
private java.lang.String ordersNum;
}

@ -2,9 +2,12 @@ package org.jeecg.modules.workorder.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
/**
* @Description: 工单订单完工
@ -14,4 +17,6 @@ import org.jeecg.modules.workorder.entity.WorkOrder;
*/
public interface WorkOrderMapper extends BaseMapper<WorkOrder> {
//自定义分页查询
IPage<WorkOrder> selectListPage(Page<WorkOrder> page,@Param("model") WorkOrderVo model);
}

@ -2,4 +2,38 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.workorder.mapper.WorkOrderMapper">
<select id="selectListPage" resultType="org.jeecg.modules.workorder.entity.WorkOrderVo">
SELECT wo.*,og.goods_name AS goodsName ,us.realname,dict.item_text AS workOrderStatusText ,dep.`depart_name` AS departName ,o.orders_num AS ordersNum
FROM work_order AS wo
LEFT JOIN zy_orders o ON o.id= wo.orders_id
LEFT JOIN order_goods og ON og.id= wo.order_goods_id
LEFT JOIN sys_user us ON us.username= o.user_id
LEFT JOIN sys_dict_item dict ON dict.dict_id='1611565939851538433'
LEFT JOIN sys_depart dep ON dep.id=wo.enterprises_id
<where>
dict.item_value=wo.work_order_status
<if test="model != null">
<!--工单编号 -->
<if test="model.productCode!=null and model.productCode!=''">
and wo.product_code =#{model.productCode}
</if >
<!--订单编号 -->
<if test="model.ordersNum!=null and model.ordersNum!=''">
and o.orders_num =#{model.ordersNum}
</if >
<!--客户名称 -->
<if test="model.realname!=null and model.realname!=''">
and us.realname LIKE CONCAT("%",#{model.realname},"%")
</if >
</if>
</where>
order by wo.create_time desc
</select>
</mapper>

@ -1,8 +1,13 @@
package org.jeecg.modules.workorder.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
/**
* @Description: 工单订单完工
@ -12,4 +17,11 @@ import org.jeecg.modules.workorder.entity.WorkOrder;
*/
public interface IWorkOrderService extends IService<WorkOrder> {
//自定义分页查询
IPage<WorkOrder> selectPage(Page<WorkOrder> page, WorkOrderVo workOrder);
//派单
Result<?> paidan(ZyOrders zyOrders,String depId);
Result<?> cancellationWorkOrder(WorkOrder woModel);
}

@ -1,13 +1,62 @@
package org.jeecg.modules.workorder.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyProcess;
import org.jeecg.modules.demo.base.mapper.ZyProcessMapper;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.mapper.CustomerMeasureMapper;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.mapper.OrderGoodsMapper;
import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories;
import org.jeecg.modules.demo.ordergoodsaccessories.mapper.OrderGoodsAccessoriesMapper;
import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric;
import org.jeecg.modules.demo.ordergoodsfabric.mapper.OrderGoodsFabricMapper;
import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
import org.jeecg.modules.demo.ordergoodsmodule.mapper.OrderGoodsModuleMapper;
import org.jeecg.modules.demo.pro.entity.ZyProcessMachine;
import org.jeecg.modules.demo.pro.mapper.ZyProcessMachineMapper;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyStyleModular.mapper.ZyStyleModularMapper;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper;
import org.jeecg.modules.operationtool.entity.ZyOperationtool;
import org.jeecg.modules.operationtool.mapper.ZyOperationtoolMapper;
import org.jeecg.modules.product.pdaccessories.entity.ProductAccessories;
import org.jeecg.modules.product.pdaccessories.mapper.ProductAccessoriesMapper;
import org.jeecg.modules.product.pdfabric.entity.ProductFabric;
import org.jeecg.modules.product.pdfabric.mapper.ProductFabricMapper;
import org.jeecg.modules.product.pdmachine.entity.ProductMachine;
import org.jeecg.modules.product.pdmachine.mapper.ProductMachineMapper;
import org.jeecg.modules.product.pdoperationtool.entity.ProductOperationtool;
import org.jeecg.modules.product.pdoperationtool.mapper.ProductOperationtoolMapper;
import org.jeecg.modules.product.productModule.entity.ProductModule;
import org.jeecg.modules.product.productModule.mapper.ProductModuleMapper;
import org.jeecg.modules.product.zyproductprocess.entity.ZyProductProcess;
import org.jeecg.modules.product.zyproductprocess.mapper.ZyProductProcessMapper;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
import org.jeecg.modules.workorder.mapper.WorkOrderMapper;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.mapper.ZyProductMapper;
import org.jeecg.modules.zyclothsample.entity.ZyClothSample;
import org.jeecg.modules.zyclothsample.mapper.ZyClothSampleMapper;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.ArrayList;
import java.util.List;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
@ -17,4 +66,388 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder> implements IWorkOrderService {
//订单
@Autowired
private ZyOrdersMapper zyOrdersMapper;
//订单商品
@Autowired
private OrderGoodsMapper orderGoodsMapper;
//服装款式表
@Autowired
private ZyClothsStyleMapper clothsStyleMapper;
//服装型号
@Autowired
private ZyStyleModelMapper styleModelMapper;
//成衣样板
@Autowired
private ZyClothSampleMapper clothSampleMapper;
//顾客测体
@Autowired
private CustomerMeasureMapper customerMeasureMapper;
//工单产品
@Autowired
private ZyProductMapper productMapper;
//服装工序
@Autowired
private ZyStyleModularMapper styleModularMapper;
//基本工序
@Autowired
private ZyProcessMapper processMapper;
//产品工序
@Autowired
private ZyProductProcessMapper productProcessMapper;
//工序工具
@Autowired
private ZyOperationtoolMapper zyOperationtoolMapper;
//产品工具
@Autowired
private ProductOperationtoolMapper productOperationtoolMapper;
//工序设备
@Autowired
private ZyProcessMachineMapper zyProcessMachine;
//产品设备
@Autowired
private ProductMachineMapper productMachineMapper;
//订单商品模块表
@Autowired
private OrderGoodsModuleMapper orderGoodsModuleMapper;
//产品模块
@Autowired
private ProductModuleMapper productModuleMapper;
//订单商品面料表
@Autowired
private OrderGoodsFabricMapper orderGoodsFabricMapper;
//产品面料表
@Autowired
private ProductFabricMapper productFabricMapper;
//订单商品辅料表
@Autowired
private OrderGoodsAccessoriesMapper orderGoodsAccessoriesMapper;
//产品辅料表
@Autowired
private ProductAccessoriesMapper productAccessoriesMapper;
/**
* 自定义分页查询
* @param page
* @param workOrder
* @return
*/
@Override
public IPage<WorkOrder> selectPage(Page<WorkOrder> page, WorkOrderVo workOrder) {
return baseMapper.selectListPage(page,workOrder);
}
/**
* 派单
* @param zyOrders
* @return
*/
@Override
public Result<?> paidan(ZyOrders zyOrders,String depId) {
//订单ID
String orderId=zyOrders.getId();
//商品订单是否存在
QueryWrapper<OrderGoods> ogWrapper=new QueryWrapper<OrderGoods>();
ogWrapper.eq("orders_id",orderId);
List<OrderGoods> ogList=orderGoodsMapper.selectList(ogWrapper);
if(ogList.size()>0)
{//start if 02
// 保存工单
OrderGoods ogModel=ogList.get(0);
//服装款式
//QueryWrapper<ZyClothsStyle> csWrapper=new QueryWrapper<ZyClothsStyle>();
ZyClothsStyle csModel=clothsStyleMapper.selectById(ogModel.getStyleId());
//服装型号
//QueryWrapper<ZyStyleModel> sm=new QueryWrapper<ZyStyleModel>();
ZyStyleModel smModel=styleModelMapper.selectById(ogModel.getModelId());
if(csModel==null ||smModel==null)
{
return Result.error("该订单服装型号或服装款式不存在,请检查后在操作!");
}
//得到结构图和排排料图
QueryWrapper<ZyClothSample> csWrapper=new QueryWrapper<ZyClothSample>();
csWrapper.eq("style_id",ogModel.getStyleId());
csWrapper.eq("stylemodel_id",ogModel.getModelId());
//成衣样板
List<ZyClothSample> csList=clothSampleMapper.selectList(csWrapper);
if(csList.size()<=0)
{
return Result.error("商品成衣样板不存在,请检查后在操作!");
}
ZyClothSample cSampleModel=csList.get(0);
int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
workOrder.setOrdersId(orderId);//订单id
workOrder.setOrderGoodsId(ogModel.getId());// 订单商品
workOrder.setGoodsNum(goodNum);//商品数量
workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间
workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期
workOrder.setWorkOrderStatus(0);//工单状态
workOrder.setEnterprisesId(depId);//企业id
baseMapper.insert(workOrder);
//保存产品
if(ogModel.getGoodsNum()>0)
{
//量体数据
CustomerMeasure mesureModel=customerMeasureMapper.selectById(ogModel.getMeasureId());
if(mesureModel==null) {
return Result.error("未找到对客户量体数据!");
}
for(int i=0;i<goodNum;i++)
{
ZyProduct productModel=new ZyProduct();
productModel.setProductName(ogModel.getGoodsName());
productModel.setProductCode(CreateProductCode(workOrder.getProductCode()));// 产品编号
productModel.setWorkOrderId(workOrder.getId());//_ 工单id
// productModel.setProduceTime("");// 生产时间
// productModel.setTotalManualTmu("");// 合计(手工TMU)
// productModel.setTotalMachineTmu("");// 合计(设备TMU)
// productModel.setTotalMaunal("");// 合计(手工秒)
// productModel.setTotalMachine("");// 合计(设备秒)
// productModel.setEnterprisesId("");//_id 企业id
productModel.setUserId(zyOrders.getUserId());//_id 用户id
productModel.setStructureDiagram(cSampleModel.getStructureDiagram());//_diagram 结构图
productModel.setLayoutDiagram(cSampleModel.getLayoutDiagram());//_diagram 排料图
productModel.setProductPicture(cSampleModel.getUrl());//_picture 产品图片
productModel.setHeight(mesureModel.getHeight());// 身高
productModel.setWeight(mesureModel.getWeight());// 体重
productModel.setHem(mesureModel.getHem());// 下摆
productModel.setCuff(mesureModel.getCuff());// 袖口
productModel.setSleeveLength(mesureModel.getSleeveLength());//_length 袖长
productModel.setBust(mesureModel.getBust()) ;//胸围
productModel.setTheWaist(mesureModel.getTheWaist());//_waist 腰围
productModel.setShoulderwidth(mesureModel.getShoulderWidth());// width 肩宽
productModel.setForebodylength(mesureModel.getForebodyLength()) ;//length 前身长
productModel.setNeck(mesureModel.getNeck());// 领围
productModel.setHipline(mesureModel.getHipline());// 臀围
productModel.setLength(mesureModel.getLength());// 衣长
productModel.setSternalDistance(mesureModel.getSternalDistance());//distance 胸距
productModel.setEnterprisesId(depId);//企业
productMapper.insert(productModel);
//产品模块、产品面料、产品辅料、产品工序、
//#region 产品工序-添加(服装款式类型中读取)
//根据服务款式表id 得到服装工序,然后在得到基本工序
QueryWrapper<ZyStyleModular> styleModularLWrapper=new QueryWrapper<ZyStyleModular>();
styleModularLWrapper.eq("type_id",ogModel.getStyleId());
List<ZyStyleModular> zyStyleModularList=styleModularMapper.selectList(styleModularLWrapper);
//将工序保存到产品工序中
//List<ZyProductProcess> productProcessList=new ArrayList<>();
for(ZyStyleModular item:zyStyleModularList)
{
ZyProductProcess zpp=new ZyProductProcess();
zpp.setProductId(productModel.getId());//产品id
zpp.setProcessId(item.getProcessId());//工序id
zpp.setNumber(item.getSerialnumber());//序号
productProcessMapper.insert(zpp);//保存
//ZyProcess =processMapper.selectById(item.getProcessId());
//region 获取工序工具
QueryWrapper<ZyOperationtool> operationtoolWrapper=new QueryWrapper<ZyOperationtool>();
//根据工序ID
operationtoolWrapper.eq("operationid",item.getProcessId());
List<ZyOperationtool> operationtoolList=zyOperationtoolMapper.selectList(operationtoolWrapper);
int sort=1;
for(ZyOperationtool itemTool:operationtoolList)
{
ProductOperationtool poModel=new ProductOperationtool();
poModel.setProductId(productModel.getId());//产品id
poModel.setOperationtoolId(itemTool.getToolid());//工具id
poModel.setSort(sort++);//序号
productOperationtoolMapper.insert(poModel);
}
//endregion
//region 获取工序设备
QueryWrapper<ZyProcessMachine> processMachineWrapper=new QueryWrapper<ZyProcessMachine>();
//根据工序ID
processMachineWrapper.eq("process_id",item.getProcessId());
List<ZyProcessMachine> processMachineList=zyProcessMachine.selectList(processMachineWrapper);
//遍历设备
sort=1;
for(ZyProcessMachine itemMachine:processMachineList)
{
ProductMachine pmModel=new ProductMachine();
pmModel.setProductId(productModel.getId());//产品id
pmModel.setMachineId(itemMachine.getMachineId());//设备
pmModel.setSort(sort++);//序号
productMachineMapper.insert(pmModel);
}
//endregion
//productProcessList.add(zpp);
}
//zyProductProcessService.save()
//#endregion
//#region 工具-添加(服装款式类型中读取)
//#endregion
//#region 设备-添加(服装款式类型中读取)
//#endregion
//#region 产品模块-添加(从订单中读取)
//订单商品模块表-根据订单商品id
QueryWrapper<OrderGoodsModule> productModuleWrapper=new QueryWrapper<OrderGoodsModule>();
productModuleWrapper.eq("order_goods_id",ogModel.getId());
List<OrderGoodsModule> orderGoodsModuleList=orderGoodsModuleMapper.selectList(productModuleWrapper);
//循环保存
List<ProductModule> ProductModuleList=new ArrayList<>();
for(OrderGoodsModule item:orderGoodsModuleList)
{
ProductModule pmModel=new ProductModule();
pmModel.setProductId(productModel.getId());//产品id
pmModel.setStyleModuleId(item.getStyleModuleId());//款式模块id
pmModel.setModuleId(item.getModuleId());//模块id
//保存
productModuleMapper.insert(pmModel);
//ProductModuleList.add(pmModel);
}
//productModuleMapper.saveBatch(ProductModuleList);
//#endregion
//#region 产品面料-添加(从订单中读取)
//订单商品面料表-根据订单商品id
QueryWrapper<OrderGoodsFabric> ogFabricWrapper=new QueryWrapper<OrderGoodsFabric>();
ogFabricWrapper.eq("order_goods_id",ogModel.getId());
List<OrderGoodsFabric> orderGoodsFabricList=orderGoodsFabricMapper.selectList(ogFabricWrapper);
//循环保存
List<ProductFabric> productFabricList=new ArrayList<>();
for(OrderGoodsFabric item:orderGoodsFabricList)
{
ProductFabric ptModel=new ProductFabric();
ptModel.setProductId(productModel.getId());//产品id
ptModel.setFabricId(item.getFabricId());//面料id
// productFabricList.add(ptModel);
//保存
productFabricMapper.insert(ptModel);
}
//保存
// productFabricMapper.saveBatch(productFabricList);
//#endregion
//#region 产品辅料-添加(从订单中读取)
//订单商品辅料表-根据订单商品id
QueryWrapper<OrderGoodsAccessories> ogAccessoriesWrapper=new QueryWrapper<OrderGoodsAccessories>();
ogAccessoriesWrapper.eq("order_goods_id",ogModel.getId());
List<OrderGoodsAccessories> orderGoodsAccessoriesList=orderGoodsAccessoriesMapper.selectList(ogAccessoriesWrapper);
//循环保存
List<ProductAccessories> productAccessoriesList=new ArrayList<>();
for(OrderGoodsAccessories item:orderGoodsAccessoriesList)
{
ProductAccessories paModel=new ProductAccessories();
paModel.setProductId(productModel.getId());//产品id
paModel.setAccessoriesId(item.getAccessoriesId());//辅料id
productAccessoriesMapper.insert(paModel);
// productAccessoriesList.add(paModel);
}
//保存
// productAccessoriesMapper.saveBatch(productAccessoriesList);
//#endregion
}
}else
{
return Result.error("订单商品数量小于0!");
}
}else//end if 02
{
return Result.error("订单商品数据未找到!");
}
//修改订单状态
zyOrders.setDeliveryStatus(3);
zyOrdersMapper.updateById(zyOrders);
return Result.OK("成功");
}
/**
* 撤销工单
* @param woModel
* @return
*/
@Override
public Result<?> cancellationWorkOrder(WorkOrder woModel) {
//ZyProduct
return null;
}
//生成工单编号
/**
*
* @param styleCode 款式编号
* @param modelCode 型号编号
* @return
*/
private String CreateWorkCode(String styleCode,String modelCode)
{//编号规则:款式编号(10)+型号(4)+顺序号(8)
String mrstr = "00000000";
QueryWrapper<WorkOrder> query = new QueryWrapper<WorkOrder>();
int listsize = baseMapper.selectList(query).size();
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String workCode = styleCode+modelCode+substr+str;
return workCode;
}
/**
*
* @param workCode 工单编号
* @return
*/
private String CreateProductCode(String workCode)
{//编号规则:工单编号(22)+顺序号(8)
String mrstr = "00000000";
QueryWrapper<ZyProduct> query = new QueryWrapper<ZyProduct>();
int listsize = productMapper.selectList(query).size();
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String produceCode = workCode+substr+str;
return produceCode;
}
}

@ -19,6 +19,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.entity.ZyProductVo;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@ -62,13 +63,13 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
@AutoLog(value = "产品表-分页列表查询")
@ApiOperation(value="产品表-分页列表查询", notes="产品表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyProduct zyProduct,
public Result<?> queryPageList(ZyProductVo zyProduct,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyProduct> queryWrapper = QueryGenerator.initQueryWrapper(zyProduct, req.getParameterMap());
//QueryWrapper<ZyProduct> queryWrapper = QueryGenerator.initQueryWrapper(zyProduct, req.getParameterMap());
Page<ZyProduct> page = new Page<ZyProduct>(pageNo, pageSize);
IPage<ZyProduct> pageList = zyProductService.page(page, queryWrapper);
IPage<ZyProduct> pageList = zyProductService.selectListPage(page, zyProduct);
return Result.OK(pageList);
}

@ -59,11 +59,12 @@ public class ZyProduct implements Serializable {
@ApiModelProperty(value = "产品编号")
private String productCode;
@Excel(name = "产品编号", width = 50)
@Excel(name = "产品名称", width = 50)
@ApiModelProperty(value = "产品名称")
private String productName;
/**工单*/
@Excel(name = "工单", width = 15)
@Dict(dictTable = "work_order", dicText = "product_code", dicCode = "id")
@ApiModelProperty(value = "工单")
private String workOrderId;
/**生产时间*/
@ -88,10 +89,12 @@ public class ZyProduct implements Serializable {
private Integer totalMachine;
/**企业*/
@Excel(name = "企业", width = 15)
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "企业")
private String enterprisesId;
/**用户*/
@Excel(name = "用户", width = 15)
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "用户")
private String userId;
/**结构图*/

@ -0,0 +1,183 @@
package org.jeecg.modules.workproduct.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 产品表
* @Author: jeecg-boot
* @Date: 2023-01-07
* @Version: V1.0
*/
@Data
@TableName("zy_product")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_product对象", description="产品表")
public class ZyProductVo implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**产品编号*/
@Excel(name = "产品编号", width = 15)
@ApiModelProperty(value = "产品编号")
private String productCode;
@Excel(name = "产品名称", width = 50)
@ApiModelProperty(value = "产品名称")
private String productName;
/**工单编号*/
@Excel(name = "工单", width = 15)
@ApiModelProperty(value = "工单")
private String workCode;
/**生产时间*/
@Excel(name = "生产时间", width = 15)
@ApiModelProperty(value = "生产时间")
private Integer produceTime;
/**合计(手工TMU)*/
@Excel(name = "合计(手工TMU)", width = 15)
@ApiModelProperty(value = "合计(手工TMU)")
private Double totalManualTmu;
/**合计(设备TMU)*/
@Excel(name = "合计(设备TMU)", width = 15)
@ApiModelProperty(value = "合计(设备TMU)")
private Double totalMachineTmu;
/**合计(手工秒)*/
@Excel(name = "合计(手工秒)", width = 15)
@ApiModelProperty(value = "合计(手工秒)")
private Integer totalMaunal;
/**合计(设备秒)*/
@Excel(name = "合计(设备秒)", width = 15)
@ApiModelProperty(value = "合计(设备秒)")
private Integer totalMachine;
/**企业*/
@Excel(name = "企业", width = 15)
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "企业")
private String enterprisesId;
/**用户*/
@Excel(name = "用户", width = 15)
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "用户")
private String userId;
/**结构图*/
@Excel(name = "结构图", width = 15)
@ApiModelProperty(value = "结构图")
private String structureDiagram;
/**排料图*/
@Excel(name = "排料图", width = 15)
@ApiModelProperty(value = "排料图")
private String layoutDiagram;
/**产品图片*/
@Excel(name = "产品图片", width = 15)
@ApiModelProperty(value = "产品图片")
private String productPicture;
/**身高*/
@Excel(name = "身高", width = 15)
@ApiModelProperty(value = "身高")
private Double height;
/**体重*/
@Excel(name = "体重", width = 15)
@ApiModelProperty(value = "体重")
private Double weight;
/**下摆*/
@Excel(name = "下摆", width = 15)
@ApiModelProperty(value = "下摆")
private Double hem;
/**袖口*/
@Excel(name = "袖口", width = 15)
@ApiModelProperty(value = "袖口")
private Double cuff;
/**袖长*/
@Excel(name = "袖长", width = 15)
@ApiModelProperty(value = "袖长")
private Double sleeveLength;
/**胸围*/
@Excel(name = "胸围", width = 15)
@ApiModelProperty(value = "胸围")
private Double bust;
/**腰围*/
@Excel(name = "腰围", width = 15)
@ApiModelProperty(value = "腰围")
private Double theWaist;
/**肩宽*/
@Excel(name = "肩宽", width = 15)
@ApiModelProperty(value = "肩宽")
private Double shoulderwidth;
/**前身长*/
@Excel(name = "前身长", width = 15)
@ApiModelProperty(value = "前身长")
private Double forebodylength;
/**领围*/
@Excel(name = "领围", width = 15)
@ApiModelProperty(value = "领围")
private Double neck;
/**臀围*/
@Excel(name = "臀围", width = 15)
@ApiModelProperty(value = "臀围")
private Double hipline;
/**衣长*/
@Excel(name = "衣长", width = 15)
@ApiModelProperty(value = "衣长")
private Double length;
/**胸距*/
@Excel(name = "胸距", width = 15)
@ApiModelProperty(value = "胸距")
private Double sternalDistance;
@ApiModelProperty(value = "客户姓名")
private String realname;
@ApiModelProperty(value = "企业名称")
private String departName;
@ApiModelProperty(value = "款式")
private String typeName;
@ApiModelProperty(value = "型号")
private String modelNumber;
@ApiModelProperty(value = "生产时间-开始")
private Integer produceTimeBegin;
@ApiModelProperty(value = "生产时间")
private Integer produceTimeEnd;
}

@ -2,9 +2,12 @@ package org.jeecg.modules.workproduct.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.entity.ZyProductVo;
/**
* @Description: 产品表
@ -14,4 +17,6 @@ import org.jeecg.modules.workproduct.entity.ZyProduct;
*/
public interface ZyProductMapper extends BaseMapper<ZyProduct> {
//自定义分页查询
IPage<ZyProduct> selectListPage(Page<ZyProduct> page, @Param("model")ZyProductVo model);
}

@ -2,4 +2,57 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.workproduct.mapper.ZyProductMapper">
<select id="selectListPage" resultType="org.jeecg.modules.workproduct.entity.ZyProductVo">
SELECT p.*,wo.product_code AS workCode,us.realname,dep.depart_name AS departName,cs.type_name AS typeName,sm.model_number AS modelNumber FROM
zy_product p
LEFT JOIN work_order wo ON wo.id= p.work_order_id
LEFT JOIN order_goods og ON og.id= wo.order_goods_id
LEFT JOIN sys_user us ON us.username= p.user_id
LEFT JOIN sys_depart dep ON dep.id=p.enterprises_id
LEFT JOIN zy_cloths_style cs ON cs.id= og.style_id
LEFT JOIN zy_style_model sm ON sm.id= og.model_id
<where>
<if test="model != null">
<!--产品编号 -->
<if test="model.productCode!=null and model.productCode!=''">
and p.product_code LIKE CONCAT("%",#{model.productCode},"%")
</if >
<!--产品名称 -->
<if test="model.productName!=null and model.productName!=''">
and p.product_name LIKE CONCAT("%",#{model.productName},"%")
</if >
<!--工单编号 -->
<if test="model.workCode!=null and model.workCode!=''">
and wo.product_codeLIKE CONCAT("%",#{model.workCode},"%")
</if >
<!--客户名称 -->
<if test="model.realname!=null and model.realname!=''">
and us.realname LIKE CONCAT("%",#{model.realname},"%")
</if >
<!--生产企业 -->
<if test="model.departName!=null and model.departName!=''">
and dep.depart_name LIKE CONCAT("%",#{model.departName},"%")
</if >
<!--生产时间 -->
<if test="model.produceTime!=null and model.produceTime!=''">
and p.produce_time =#{model.produceTime}
</if >
<!--<if test="model.produceTimeBegin!=null and model.produceTimeBegin.trim() neq ''">-->
<!--and date_format(create_time,'%Y-%m-%d %H:%i:%s') &gt;= str_to_date(#{model.produceTimeBegin},'%Y-%m-%d %H:%i:%s')-->
<!--</if>-->
<!--<if test="model.produceTimeEnd!=null and model.produceTimeEnd.trim() neq ''">-->
<!--and date_format(create_time,'%Y-%m-%d %H:%i:%s') &lt;= str_to_date(#{model.produceTimeEnd},'%Y-%m-%d %H:%i:%s')-->
<!--</if>-->
</if>
</where>
order by p.create_time desc
</select>
</mapper>

@ -1,7 +1,10 @@
package org.jeecg.modules.workproduct.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.entity.ZyProductVo;
/**
* @Description: 产品表
@ -11,4 +14,11 @@ import org.jeecg.modules.workproduct.entity.ZyProduct;
*/
public interface IZyProductService extends IService<ZyProduct> {
/**
* 自定义分页查询
* @param page
* @param zyProduct
* @return
*/
IPage<ZyProduct> selectListPage(Page<ZyProduct> page, ZyProductVo zyProduct);
}

@ -1,6 +1,9 @@
package org.jeecg.modules.workproduct.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.entity.ZyProductVo;
import org.jeecg.modules.workproduct.mapper.ZyProductMapper;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.springframework.stereotype.Service;
@ -16,4 +19,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyProductServiceImpl extends ServiceImpl<ZyProductMapper, ZyProduct> implements IZyProductService {
//自定义分页查询
@Override
public IPage<ZyProduct> selectListPage(Page<ZyProduct> page, ZyProductVo zyProduct) {
return baseMapper.selectListPage(page,zyProduct);
}
}

@ -172,20 +172,20 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.OK("添加成功!");
}
@GetMapping(value = "/enterpriseNum")
public Result<?> enterpriseNum(@RequestParam(name = "id", required = true) String id) {
//id.contains(",") 判断是否字符中是否包含","
if (id.contains(",")) {
return Result.error("只能选择一个企业");
} else {
String sort = zyClothsStyleService.enterpriseNum(id);
//System.err.println(sort + " enterpriseNum");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}
return Result.OK(sort);
}
}
// @GetMapping(value = "/enterpriseNum")
// public Result<?> enterpriseNum(@RequestParam(name = "id", required = true) String id) {
// //id.contains(",") 判断是否字符中是否包含","
// if (id.contains(",")) {
// return Result.error("只能选择一个企业");
// } else {
// String sort = zyClothsStyleService.enterpriseNum(id);
// //System.err.println(sort + " enterpriseNum");
// if (StringUtils.isEmpty(sort)) {
// return Result.OK(0);
// }
// return Result.OK(sort);
// }
// }
/**
* getAction的url sort 编码

@ -24,5 +24,5 @@ public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
*/
AllClothStyle queryDetail(String id);
String enterpriseNum(String id);
//String enterpriseNum(String id);
}

@ -23,9 +23,8 @@ import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: 服装款式表
@ -58,35 +57,35 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
*/
@Override
public AllClothStyle queryDetail(String id) {
AllClothStyle zyAllClothStyle = new AllClothStyle();
AllClothStyle zyAll = new AllClothStyle();
//服装款式详情
List<ZyClothsStyle> zyClothsStyles = detail(id);
zyAllClothStyle.setZyClothsStyles(zyClothsStyles);
List<ZyClothsStyle> zyClothsStyles = this.detail(id);
zyAll.setZyClothsStyles(zyClothsStyles);
//服装 款式 模块详情
List<NewStyleModule> zyStyleModuleList = zyStyleModuleService.detail(id);
zyAllClothStyle.setZyStyleModuleList(zyStyleModuleList);
zyAll.setZyStyleModuleList(zyStyleModuleList);
//服装 面料详情
List<NewZyStyleFabric> zyStyleFabricList = zyStyleFabricService.detail(id);
zyAllClothStyle.setZyStyleFabricList(zyStyleFabricList);
zyAll.setZyStyleFabricList(zyStyleFabricList);
//服装 辅料详情
List<ZyStyleAccessories> zyStyleAccessoriesList = zyStyleAccessoriesService.detail(id);
zyAllClothStyle.setZyStyleAccessoriesList(zyStyleAccessoriesList);
zyAll.setZyStyleAccessoriesList(zyStyleAccessoriesList);
//服装 款式型号
List<ZyStyleModel> zyStyleModels = zyStyleModelService.detail(id);
zyAllClothStyle.setZyStyleModels(zyStyleModels);
zyAll.setZyStyleModels(zyStyleModels);
//服装 工序详情
List<ZyStyleModular> zyStyleModularList = zyStyleModularService.detail(id);
zyAllClothStyle.setZyStyleModularList(zyStyleModularList);
zyAll.setZyStyleModularList(zyStyleModularList);
return zyAllClothStyle;
return zyAll;
}
@Override
public String enterpriseNum(String id) {
String enterpriseName = zyClothsStyleMapper.getEnterpriseName(id);
//根据企业名称拿到企业编号
return zyClothsTypeService.getEnterpriseNums(enterpriseName);
}
// @Override
// public String enterpriseNum(String id) {
// String enterpriseName = zyClothsStyleMapper.getEnterpriseName(id);
// //根据企业名称拿到企业编号
// return zyClothsTypeService.getEnterpriseNums(enterpriseName);
// }
public List<ZyClothsStyle> detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);
@ -116,30 +115,32 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
public String sort(String id) {
String nums = zyClothsStyleMapper.sort(id);
//System.out.println(nums + " nums");
String format = String.format("%08d", orderNumber());
List<ZyClothsStyle> styleList = this.list();
List<String> collect = styleList.stream().map(ZyClothsStyle::getNums).collect(Collectors.toList());
String format = String.format("%08d", zyClothsTypeService.getListMax(collect, 8));
//System.err.println(format + " format");
return nums + format;
}
private Long orderNumber() {
List<String> numsList = zyClothsStyleMapper.selectNumsList();
List<Long> list = new ArrayList<>();
for (String nums : numsList) {
String REGEX = "[^0-9]";
String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
if (newNums.length() > 8) {
String substring = newNums.substring(newNums.length() - 8);
list.add(Long.valueOf(substring));
continue;
}
if (StringUtils.isEmpty(newNums)) {
newNums = "0";
}
list.add(Long.valueOf(newNums));
}
return Collections.max(list) + 1;
}
// private Long orderNumber() {
// List<String> numsList = zyClothsStyleMapper.selectNumsList();
// List<Long> list = new ArrayList<>();
//
// for (String nums : numsList) {
// String REGEX = "[^0-9]";
// String newNums = Pattern.compile(REGEX).matcher(nums).replaceAll("").trim();
// if (newNums.length() > 8) {
// String substring = newNums.substring(newNums.length() - 8);
// list.add(Long.valueOf(substring));
// continue;
// }
// if (StringUtils.isEmpty(newNums)) {
// newNums = "0";
// }
// list.add(Long.valueOf(newNums));
//
// }
// return Collections.max(list) + 1;
// }
}

@ -12,16 +12,14 @@ import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@ -128,8 +126,8 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
@ApiOperation(value = "zy_style_model-详情", notes = "zy_style_model-详情")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
ZyStyleModelDetailsVO detailVO = zyStyleModelService.queryDetails(id);
return Result.OK(detailVO);
ZyStyleModelDetailsVo detailVo = zyStyleModelService.queryDetails(id);
return Result.OK(detailVo);
}
/**

@ -5,7 +5,7 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import java.util.List;
@Data
public class ZyStyleModelDetailsVO {
public class ZyStyleModelDetailsVo {
/**服装款式*/
private List<ZyClothsStyle> zyClothsStyles;
/**子模块 款式型号 */

@ -3,7 +3,7 @@ package org.jeecg.modules.zystylemodel.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import java.util.List;
@ -17,7 +17,7 @@ public interface IZyStyleModelService extends IService<ZyStyleModel> {
List<ZyStyleModel> detail(String id);
ZyStyleModelDetailsVO queryDetails(String id);
ZyStyleModelDetailsVo queryDetails(String id);
boolean dataTypeProblem(ZyStyleModel zyStyleModel);
}

@ -7,7 +7,7 @@ import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVO;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jetbrains.annotations.Contract;
@ -17,7 +17,6 @@ import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.List;
import java.util.regex.Pattern;
@ -107,19 +106,21 @@ public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyS
}
@Override
public ZyStyleModelDetailsVO queryDetails(String id) {
public ZyStyleModelDetailsVo queryDetails(String id) {
ZyStyleModel model = getById(id);
AllClothStyle detail = zyClothsStyleService.queryDetail(model.getStyleId());
ZyStyleModelDetailsVO detailsVO = new ZyStyleModelDetailsVO();
detailsVO.setZyClothsStyles(detail.getZyClothsStyles());
detailsVO.setZyStyleModels(detail.getZyStyleModels());
return detailsVO;
ZyStyleModelDetailsVo detailsVo = new ZyStyleModelDetailsVo();
detailsVo.setZyClothsStyles(detail.getZyClothsStyles());
detailsVo.setZyStyleModels(detail.getZyStyleModels());
return detailsVo;
}
@Override
public boolean dataTypeProblem(ZyStyleModel zyStyleModel) {
public boolean dataTypeProblem(@NotNull ZyStyleModel zyStyleModel) {
// Pattern pattern = Pattern.compile("/[^\\d]/g");
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
Pattern pattern = Pattern.compile("[0-9]+(\\.[0-9]+)?");
// /^\d+(\.{0,1}\d+){0,1}$/
//正则表达式判断是否是数字字符串(可判断正数,负数和小数)
if (!ObjectUtils.isEmpty(zyStyleModel.getCollarLarge())){
return pattern.matcher(zyStyleModel.getCollarLarge().toString()).matches();

@ -4,12 +4,10 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import io.swagger.annotations.Example;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
@ -19,17 +17,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVO;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVo;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.jeecg.common.system.base.controller.JeecgController;
@ -85,7 +78,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//System.err.println("ZyStyleModule 款式模块表 传来的 " + id);
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
//从服装款式进去款式模块时 根据style_id进行筛选 所以一般都会有id即style_id
queryWrapper.eq(StringUtils.hasText(id), "style_id", id);
@ -106,8 +98,8 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
zyStyleModules.addAll(zyStyleModulesList);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleModules = zyStyleModules.stream().filter(ZyStyleModule -> ZyStyleModule.getStyleId().equals(id)).collect(Collectors.toList());
pageList.setRecords(zyStyleModules);
List<ZyStyleModule> collect = zyStyleModules.stream().filter(ZyStyleModule -> ZyStyleModule.getStyleId().equals(id)).collect(Collectors.toList());
pageList.setRecords(collect);
}
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型
@ -178,8 +170,8 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
//System.out.println("款式模块表 /detail controller层接受到的id: : " + id);
ZyStyleModuleDetailVO detailVO = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVO);
ZyStyleModuleDetailVo detailVo = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVo);
}
/**

@ -5,7 +5,7 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import java.util.List;
@Data
public class ZyStyleModuleDetailVO {
public class ZyStyleModuleDetailVo {
/**服装款式*/
private List<ZyClothsStyle> zyClothsStyles;
/**子模块 款式模块*/

@ -19,7 +19,7 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
/**根据服装款式的id style_id 查询所有*/
List<ZyStyleModule> handWritingList(String id);
//List<ZyStyleModule> handWritingList(String id);
@Select("SELECT * FROM zy_style_module WHERE style_id = #{id}")
List<ZyStyleModule> getListByStyleId(String id);

@ -2,10 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper">
<select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule"
parameterType="string">
SELECT *
FROM zy_style_module
WHERE style_id = #{id}
</select>
<!-- <select id="handWritingList" resultType="org.jeecg.modules.zystylemodule.entity.ZyStyleModule"-->
<!-- parameterType="string">-->
<!-- SELECT *-->
<!-- FROM zy_style_module-->
<!-- WHERE style_id = #{id}-->
<!-- </select>-->
</mapper>

@ -1,10 +1,9 @@
package org.jeecg.modules.zystylemodule.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVO;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVo;
import java.util.List;
@ -24,5 +23,5 @@ public interface IZyStyleModuleService extends IService<ZyStyleModule> {
*/
List<NewStyleModule> changeList(List<ZyStyleModule> zyStyleModules);
ZyStyleModuleDetailVO queryDetail(String id);
ZyStyleModuleDetailVo queryDetail(String id);
}

@ -1,15 +1,18 @@
package org.jeecg.modules.zystylemodule.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModelDetailsVo;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVO;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModuleDetailVo;
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.springframework.beans.factory.annotation.Autowired;
@ -19,7 +22,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@ -40,13 +42,13 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, Z
@Autowired
private ZyStyleFabricMapper zyStyleFabricMapper;
@Autowired
private ZyStyleModuleMapper zyStyleModuleMapper;
@Override
public List<NewStyleModule> detail(String id) {
List<ZyStyleModule> list = zyStyleModuleMapper.handWritingList(id);
return changeList(list);
//List<ZyStyleModule> list = zyStyleModuleMapper.handWritingList(id);
List<ZyStyleModule> moduleList = this.list(new LambdaQueryWrapper<ZyStyleModule>().eq(ZyStyleModule::getStyleId, id));
return changeList(moduleList);
}
@Override
@ -86,14 +88,14 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, Z
}
@Override
public ZyStyleModuleDetailVO queryDetail(String id) {
ZyStyleModuleDetailVO detailVO = new ZyStyleModuleDetailVO();
public ZyStyleModuleDetailVo queryDetail(String id) {
ZyStyleModuleDetailVo detailVo = new ZyStyleModuleDetailVo();
ZyStyleModule zyStyleModule = getById(id);
String styleId = zyStyleModule.getStyleId();
AllClothStyle allClothStyle = zyClothsStyleService.queryDetail(styleId);
detailVO.setZyClothsStyles(allClothStyle.getZyClothsStyles());
detailVO.setZyStyleModuleList(allClothStyle.getZyStyleModuleList());
return detailVO;
detailVo.setZyClothsStyles(allClothStyle.getZyClothsStyles());
detailVo.setZyStyleModuleList(allClothStyle.getZyStyleModuleList());
return detailVo;
}
}

@ -101,6 +101,7 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>

Loading…
Cancel
Save