2022-12-02 赵玉瑞 修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent ce8f7d3a83
commit 4e329c4c15
  1. 21
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue
  2. 18
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  3. 19
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  4. 16
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  5. 51
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  6. 56
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  7. 20
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  8. 104
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  9. 42
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  10. 10
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
  11. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
  12. 2
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
  13. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml
  14. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularController.java
  15. 1
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/entity/ZyClothsModular.java
  16. 1
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsModularMapper.java
  17. 7
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/xml/ZyClothsModularMapper.xml
  18. 2
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsModularService.java
  19. 35
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsModularServiceImpl.java
  20. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/entity/ZyProcessComponent.java
  21. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysLogMapper.xml
  22. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysBaseApiImpl.java
  23. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/entity/ZyProcessModular.java
  24. 12
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  25. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/ZyClothsStyleMapper.java
  26. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/mapper/xml/ZyClothsStyleMapper.xml
  27. 36
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java

@ -4,10 +4,15 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
<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-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">-->
<!-- <a-input v-model="model.nums" 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>
@ -33,11 +38,7 @@
<!-- <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="enterpriseId">
<j-select-depart v-model="model.enterpriseId" placeholder="请选择企业"/>
</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>
@ -80,9 +81,9 @@
},
confirmLoading: false,
validatorRules: {
nums: [
{ required: true, message: '请输入编号!'},
],
// nums: [
// { required: true, message: '!'},
// ],
modularName: [
{ required: true, message: '请输入模块名称!'},
],

@ -3,9 +3,18 @@
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-item label="上级类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-tree-select v-model="model.typeId" dict="zy_cloths_type,type_name,id" pidField="type_id" placeholder="请选择上级类型" ></j-tree-select>
<j-tree-select v-model="model.typeId"
dict="zy_cloths_type,type_name,id"
pidField="type_id"
placeholder="请选择上级类型" >
</j-tree-select>
{{ typeId }}
</a-form-item>
</a-col>
@ -25,11 +34,7 @@
&lt;!&ndash; <j-dict-select-tag v-model="model.enterpriseId" placeholder="请输入企业" dictCode="sc_competitioninf,compname,compid" ></j-dict-select-tag>&ndash;&gt;
</a-form-model-item>
</a-col>-->
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
@ -74,6 +79,7 @@
],
typeName: [
{ required: true, message: '请输入类型名称!'},
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!?]{0,5}$/, message: '文本长度过长'},
],
enterpriseId: [
{ required: true, message: '请输入企业!'},

@ -162,6 +162,7 @@ export default {
return parseInt(index) + 1;
}
},
{
title: '款式名称',
align: "center",
@ -178,11 +179,7 @@ export default {
align: "center",
dataIndex: 'specification'
},
{
title: '服装类型',
align: "center",
dataIndex: 'typeId_dictText'
},
{
title: '形式',
align: "center",
@ -256,6 +253,7 @@ export default {
query: { //
'id': record.id,
'typeId': record.typeId,
'styleNames': record.styleNames,
}
});
},
@ -265,34 +263,39 @@ export default {
path: '/src/views/zystylefabric/ZyStyleFabricList',
query: { //
'id': record.id,
'styleNames': record.styleNames,
}
});
},
//
jumpPage3(record) {
this.$router.push({
path: '/src/views/zystyleaccessories/ZyStyleAccessoriesList',
query: { //
'id': record.id,
'styleNames': record.styleNames,
}
});
},
//
//
jumpPage4(record) {
this.$router.push({
path: '/src/views/zystylemodel/ZyStyleModelList',
query: { //
'id': record.id,
'styleNames': record.styleNames,
}
});
},
//
//
jumpPage5(record) {
this.$router.push({
//path: '/process/ZyProcessList',
path: '/zystylemodular/ZyStyleModularList',
query: { //
'id': record.id,
}
'styleNames': record.styleNames,
},
});
},
getSuperFieldList() {

@ -28,11 +28,11 @@
<j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape" placeholder="请输入形式" ></j-dict-select-tag>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">-->
<!-- <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<a-col :span="24">
<a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleNames">
<a-input v-model="model.styleNames" placeholder="请输入名称" ></a-input>
@ -147,9 +147,9 @@
typeId: [
{ required: true, message: '请选择服装类型!'},
],
nums: [
{ required: true, message: '请输入编号!'},
],
// nums: [
// { required: true, message: '!'},
// ],
styleNames: [
{ required: true, message: '请输入名称!'},
],

@ -7,15 +7,18 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式" v-if="styleId===undefined">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId"></j-dict-select-tag>
</a-form-item>
<a-form-item label="服装款式" v-else="">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" disabled></j-dict-select-tag>
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId" disabled></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料类型">
<j-dict-select-tag placeholder="请选择辅料类型" dictCode="zy_accessories,contents,id" v-model="queryParam.accessoriesId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请选择辅料类型" dictCode="zy_accessories,contents,id"
v-model="queryParam.accessoriesId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -24,6 +27,7 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-button type="primary">{{biaoTi}}</a-button>
</a-row>
</a-row>
</a-form>
@ -34,23 +38,32 @@
<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-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>
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<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>
@ -73,7 +86,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>
@ -110,7 +124,8 @@
</a-table>
</div>
<zy-style-accessories-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-style-accessories-modal>
<zy-style-accessories-modal @valueChange="valueChange" ref="modalForm"
@ok="modalFormOk"></zy-style-accessories-modal>
</a-card>
</template>
@ -122,6 +137,7 @@
import ZyStyleAccessoriesModal from './modules/ZyStyleAccessoriesModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyStyleAccessoriesList',
mixins: [JeecgListMixin, mixinDevice],
@ -131,6 +147,7 @@
data() {
return {
description: '款式辅料管理管理页面',
biaoTi: '',
//
columns: [
{
@ -191,6 +208,16 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/src/views/zyclothsstyle/ZyClothsStyleList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
initDictConfig() {
},
valueChange(value) {
@ -200,6 +227,7 @@
if (this.loadRouteType === false) {
this.styleId = this.$route.query.id;
this.loadRouteType = true;
this.biaoTi = this.$route.query.styleNames+"款式辅料管理";
}
},
loadData(arg) {
@ -218,8 +246,7 @@
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if(res.result.total)
{
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;

@ -6,12 +6,14 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"
v-model="queryParam.styleId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="面料类型">
<j-dict-select-tag placeholder="请选择面料类型" dictCode="zy_fabric,name,id" v-model="queryParam.fabricId" ></j-dict-select-tag>
<j-dict-select-tag placeholder="请选择面料类型" dictCode="zy_fabric,name,id"
v-model="queryParam.fabricId"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -20,9 +22,11 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-button type="primary">{{biaoTi}}</a-button>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
@ -35,16 +39,23 @@
<!-- 高级查询区域 -->
<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>
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<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>
@ -67,7 +78,8 @@
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img v-else :src="getImgView(text)" :preview="record.id" 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>
@ -118,6 +130,7 @@
data() {
return {
description: '款式面料表管理页面',
biaoTi: '',
//
columns: [
{
@ -130,26 +143,27 @@
return parseInt(index) + 1;
}
},
{
title:'款式名称',
align:"center",
dataIndex: 'styleNames'
},
{
title: '款式编号',
align: "center",
dataIndex: 'styleNums'
},
{
title:'面料名称',
title: '款式名称',
align: "center",
dataIndex: 'fabricName'
dataIndex: 'styleNames'
},
{
title: '面料编号',
align: "center",
dataIndex: 'fabricNumber'
},
{
title: '面料名称',
align: "center",
dataIndex: 'fabricName'
},
{
title: '创建时间',
align: "center",
@ -189,6 +203,16 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/src/views/zyclothsstyle/ZyClothsStyleList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
initDictConfig() {
},
valueChange(value) {
@ -196,8 +220,9 @@
},
//
loadParameter() {
if (this.loadRouteType == false) {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"款式面料管理";
// console.log("*******id"+this.id)
this.loadRouteType = true;
}
@ -218,8 +243,7 @@
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if(res.result.total)
{
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;

@ -4,11 +4,14 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col>
<a-button type="primary">{{biaoTi}}</a-button>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<a-button type="primary" @click="fanHui()">返回</a-button>
<!-- table区域-begin -->
<div>
@ -62,6 +65,7 @@
data() {
return {
description: 'zy_style_model管理页面',
biaoTi: '',
//
//
toolbarConfig: {
@ -165,6 +169,16 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/src/views/zyclothsstyle/ZyClothsStyleList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
handleDelete: function (id) {
if (!this.url.delete) {
this.$message.error("请设置url.delete属性!")
@ -207,6 +221,7 @@
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"款式型号管理";
console.log("**********传递到此层的id:" + this.id);
this.loadRouteType = true;
}
@ -228,8 +243,7 @@
// dataSource
this.dataSource = res.result.records || res.result;
console.log(this.dataSource, 'abc')
if(res.result.total)
{
if (res.result.total) {
this.pagination.total = res.result.total;
} else {
this.pagination.total = 0;

@ -4,6 +4,9 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col>
<a-button type="primary">{{biaoTi}}款式工序管理</a-button>
</a-col>
</a-row>
</a-form>
</div>
@ -13,23 +16,32 @@
<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-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>
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<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>
@ -52,7 +64,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>
@ -87,6 +100,8 @@
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyStyleModularModal from './modules/ZyStyleModularModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyStyleModularList',
@ -97,6 +112,9 @@
data() {
return {
description: '款式工序表管理页面',
biaoTi: '',
loadRouteType: false,
id: '',
//
columns: [
{
@ -110,7 +128,7 @@
}
},
{
title:'款式',
title: '款式名称',
align: "center",
dataIndex: 'styleId_dictText'
},
@ -119,6 +137,11 @@
align: "center",
dataIndex: 'processId_dictText'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
@ -141,7 +164,8 @@
}
},
created() {
this.getSuperFieldList();
//this.getSuperFieldList();
this.loadParameter();
},
computed: {
importExcelUrl: function () {
@ -149,6 +173,70 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/src/views/zyclothsstyle/ZyClothsStyleList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames + "款式工序管理";
//this.queryParam.id = this.model.id;
console.log('********biaoTi: ' + this.biaoTi);
console.log('aaaaaaa id ' + this.id)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!");
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
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------------
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.id = this.$route.query.id;
return filterObj(param);
},
initDictConfig() {
},
valueChange(value) {

@ -28,15 +28,19 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
<a-button type="primary">{{biaoTi}}</a-button>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="styleModuleHandleAdd(id,typeId)" 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>-->
@ -53,8 +57,8 @@
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" @click="fanHui()">返回</a-button>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
@ -134,6 +138,7 @@ export default {
data() {
return {
description: '款式模块表管理页面',
biaoTi: '',
//
columns: [
{
@ -147,35 +152,37 @@ export default {
}
},
{
title: '款式名称',
title: '服装类型',
align: "center",
dataIndex: 'styleNames'
dataIndex: 'typeName'
},
{
title: '款式编号',
align: "center",
dataIndex: 'styleNums'
},
{
title: '款式名称',
align: "center",
dataIndex: 'styleNames'
},
/*{
title: '服装类型',
align: "center",
dataIndex: 'typeId'
},*/
{
title: '服装类型',
title: '模块编号',
align: "center",
dataIndex: 'typeName'
dataIndex: 'modularNums'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularName'
},
{
title: '模块编号',
align: "center",
dataIndex: 'modularNums'
},
{
title: '创建时间',
align: "center",
@ -217,6 +224,16 @@ export default {
},
},
methods: {
fanHui() {
this.$router.push({
path: '/src/views/zyclothsstyle/ZyClothsStyleList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
initDictConfig() {
},
valueChange(value) {
@ -227,7 +244,9 @@ export default {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.typeId = this.$route.query.typeId;
this.biaoTi = this.$route.query.styleNames+"款式模块管理";
console.log('********id对应的为款式style_id: ' + this.id);
console.log('********biaoTi: ' + this.biaoTi);
console.log('******typeId此为类型typeId: ' + this.typeId);
this.loadRouteType = true;
}
@ -248,8 +267,7 @@ export default {
if (res.success) {
//update-begin---author:zhangyafei Date:20201118 for------------
this.dataSource = res.result.records || res.result;
if(res.result.total)
{
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;

@ -7,12 +7,15 @@ import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyStyleModular.mapper.ZyStyleModularMapper;
import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -49,7 +52,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> {
@Autowired
private IZyStyleModularService zyStyleModularService;
@Resource
private ZyStyleModularMapper zyStyleModularMapper;
/**
* 分页列表查询
*
@ -62,13 +66,15 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
@AutoLog(value = "款式工序表-分页列表查询")
@ApiOperation(value = "款式工序表-分页列表查询", notes = "款式工序表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModular zyStyleModular,
public Result<?> queryPageList(ZyStyleModular zyStyleModular, String id,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleModular> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModular, req.getParameterMap());
Page<ZyStyleModular> page = new Page<ZyStyleModular>(pageNo, pageSize);
IPage<ZyStyleModular> pageList = zyStyleModularService.page(page, queryWrapper);
List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
pageList.setRecords(list);
return Result.OK(pageList);
}

@ -64,4 +64,9 @@ public class ZyStyleModular implements Serializable {
@ApiModelProperty(value = "工序id")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")
private Integer order;
}

@ -14,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> {
List<ZyStyleModular> selectListByStyleId(String styleId);
}

@ -2,4 +2,9 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.zyStyleModular.mapper.ZyStyleModularMapper">
<select id="selectListByStyleId" resultType="org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular">
SELECT *
FROM zy_style_modular
WHERE style_id = #{styleId}
</select>
</mapper>

@ -103,6 +103,8 @@ public class ZyClothsModularController extends JeecgController<ZyClothsModular,
@ApiOperation(value="zy_cloths_modular-添加", notes="zy_cloths_modular-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsModular zyClothsModular) {
//nums,编号,varchar,18,非空,不重复,编码规则:服装类型(10)+序号(8)
zyClothsModular.setNums(zyClothsModularService.generateNumber(zyClothsModular));
zyClothsModularService.save(zyClothsModular);
return Result.OK("添加成功!");
}

@ -76,4 +76,5 @@ public class ZyClothsModular implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "updateTime")
private java.util.Date updateTime;
}

@ -15,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface ZyClothsModularMapper extends BaseMapper<ZyClothsModular> {
public List<ZyClothsModular> selectByType(@Param("cloths_type_id")String cloths_type_id);
List<String> selectNumsList1();
}

@ -2,7 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.base.mapper.ZyClothsModularMapper">
<select id="selectByType" resultType="org.jeecg.modules.demo.base.entity.ZyClothsModular">
SELECT * from zy_cloths_modular
SELECT *
from zy_cloths_modular
where cloths_type_id = #{cloths_type_id}
</select>
<select id="selectNumsList1" resultType="java.lang.String">
select nums
from zy_cloths_modular
</select>
</mapper>

@ -14,4 +14,6 @@ import java.util.List;
public interface IZyClothsModularService extends IService<ZyClothsModular> {
public List<ZyClothsModular> selectByType(String cloths_type_id);
/**nums,编号,varchar,18,非空,不重复,编码规则:服装类型(10)+序号(8)*/
String generateNumber(ZyClothsModular zyClothsModular);
}

@ -8,7 +8,11 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
/**
* @Description: zy_cloths_modular
@ -18,7 +22,7 @@ import java.util.List;
*/
@Service
public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMapper, ZyClothsModular> implements IZyClothsModularService {
@Autowired
@Resource
private ZyClothsModularMapper zyClothsModularMapper;
@Override
@ -26,4 +30,33 @@ public class ZyClothsModularServiceImpl extends ServiceImpl<ZyClothsModularMappe
return zyClothsModularMapper.selectByType(cloths_type_id);
}
/**
* nums编号varchar18非空不重复编码规则服装类型10+序号8
*/
@Override
public String generateNumber(ZyClothsModular zyClothsModular) {
String nums = zyClothsModular.getClothsTypeId();
String substring = nums.substring(nums.length() - 10);
String format = String.format("%08d", orderNumber());
return substring + format;
}
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));
}else {
listLong.add(Long.valueOf(newNums));
}
}
System.out.println(listLong);
return Collections.max(listLong)+1;
}
}

@ -49,6 +49,10 @@ public class ZyProcessComponent implements Serializable {
@Dict(dicCode = "pingjing")
@ApiModelProperty(value = "是否瓶颈工序")
private String bottleneck;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")
private Integer order;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")

@ -60,7 +60,7 @@ public class SysBaseApiImpl implements ISysBaseAPI {
private static String DB_TYPE = "";
@Autowired
private ISysMessageTemplateService sysMessageTemplateService;
@Resource
@Autowired
private SysLogMapper sysLogMapper;
@Resource
private SysUserMapper userMapper;

@ -62,4 +62,8 @@ public class ZyProcessModular implements Serializable {
@ApiModelProperty(value = "工序ID")
@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
private java.lang.String processId;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")
private Integer order;
}

@ -11,6 +11,7 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -159,7 +160,16 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyClothsStyle zyClothsStyle) {
//生成编号 类型编号(10位)+顺序号(8位)在service层处理
// zyClothsStyle.setNums(zyClothsStyleService.generateNumber(zyClothsStyle));
zyClothsStyle.setNums(zyClothsStyleService.generateNumber(zyClothsStyle));
//同类型的款式名称不能重复
LambdaQueryWrapper<ZyClothsStyle> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName());
List<ZyClothsStyle> zyClothsStyleList = zyClothsStyleService.list(queryWrapper);
for (ZyClothsStyle zy : zyClothsStyleList) {
if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())){
return Result.error("添加失败!数据已存在");
}
}
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}

@ -1,12 +1,10 @@
package org.jeecg.modules.zyclothsstyle.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import java.util.List;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
@ -15,4 +13,5 @@ import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
*/
public interface ZyClothsStyleMapper extends BaseMapper<ZyClothsStyle> {
List<String> selectNumsList();
}

@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.zyclothsstyle.mapper.ZyClothsStyleMapper">
<mapper namespace="org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper">
<select id="selectNumsList" resultType="java.lang.String">
SELECT nums
FROM zy_cloths_style
</select>
</mapper>

@ -1,13 +1,23 @@
package org.jeecg.modules.zyclothsstyle.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.bytedeco.javacpp.freenect;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* @Description: 服装款式表
* @Author: jeecg-boot
@ -17,6 +27,9 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@Service
public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, ZyClothsStyle> implements IZyClothsStyleService {
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
/**
* 生成编号 类型编号10位+顺序号8位
*
@ -25,9 +38,26 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
@Override
public String generateNumber(ZyClothsStyle zyClothsStyle) {
//先拿到类型编号
//在来一个顺序号
String nums = zyClothsStyle.getTypeId();
//截取后十位
String substring = nums.substring(nums.length() - 10);
//再来一个顺序号
String format = String.format("%08d", orderNumber());
//生成编码
return null;
return substring + format;
}
private Long orderNumber() {
List<String> zyClothsStyleList = zyClothsStyleMapper.selectNumsList();
List<Long> list = new ArrayList<>();
for (String nums : zyClothsStyleList) {
if (nums.length() > 8) {
String substring = nums.substring(nums.length() - 8);
list.add(Long.valueOf(substring));
}else {
list.add(Long.valueOf(nums));
}
}
return Collections.max(list)+1;
}
}

Loading…
Cancel
Save