2022-11-10 赵玉瑞 修改款式辅料及相关问题

zhc4dev
赵玉瑞 2 years ago
parent 3a4c15df00
commit 16a6112ecd
  1. 585
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  2. 4
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  3. 18
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  4. 173
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyStyleAccessoriesForm.vue
  5. 7
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleForm.vue
  6. 221
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  7. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/mapper/ZyStyleAccessoriesMapper.java
  8. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -5,8 +5,9 @@
<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="请选择服装款式" dictCode="zy_cloths_style,style_names,id" v-model="queryParam.styleId" ></j-dict-select-tag>
<a-form-item label="服装款式">
<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">
@ -24,23 +25,30 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</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-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>
@ -63,7 +71,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>
@ -81,22 +90,22 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="fuzhi(record)">复制</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="dongzuo(record.id)">动作</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="shebei(record.id)">设备</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="fuliao(record.id)">辅料</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="gongju(record.id)">工具</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a @click="mianliao(record.id)">面料</a>
<a-divider type="vertical" />
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="openDetail(record.id)">详情</a>
@ -109,10 +118,10 @@
</a-menu>
</a-dropdown>
</span>
<!-- 新建一个管理列-->
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- -->
<!-- </span>-->
<!-- 新建一个管理列-->
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- -->
<!-- </span>-->
</a-table>
</div>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
@ -127,282 +136,282 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyProcessModal from './modules/ZyProcessModal'
import ZyProcessModal1 from './modules/ZyProcessModal1'
import ZyProcessModal2 from './modules/ZyProcessModal2'
import ZyProcessModal3 from './modules/ZyProcessModal3'
import ZyProcessModal4 from './modules/ZyProcessModal4'
import ZyProcessModal5 from './modules/ZyProcessModal5'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyProcessDetail from './modules/ZyProcessDetail'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyProcessModal,
ZyProcessDetail,
ZyProcessModal1,
ZyProcessModal2,
ZyProcessModal3,
ZyProcessModal4,
ZyProcessModal5
},
data () {
return {
description: 'zy_process管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
},
{
title:'工序名称',
align:"center",
dataIndex: 'processName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'processDescribe'
// },
{
title:'品质要求',
align:"center",
dataIndex: 'qualityRequire'
},
{
title:'工序时间',
align:"center",
dataIndex: 'processTime'
},
{
title:'工序单价',
align:"center",
dataIndex: 'price'
},
{
title:'工序等级',
align:"center",
dataIndex: 'grade'
},
// {
// title:'',
// align:"center",
// dataIndex: 'fabricNum'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'machineId_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'componentId_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'toolId_dictText'
// },
{
title:'款式名称',
align:"center",
dataIndex: 'styleId_dictText'
},
{
title:'工段代码',
align:"center",
dataIndex: 'worksectionCode'
},
// {
// title:'',
// align:"center",
// dataIndex: 'contractNum'
// },
{
title:'合计(手工TMU)',
align:"center",
dataIndex: 'totalManualTmu'
},
{
title:'合计(机器TMU)',
align:"center",
dataIndex: 'totalMachineTmu'
},
{
title:'合计(手工秒)',
align:"center",
dataIndex: 'totalMaunal'
},
{
title:'合计(设备秒)',
align:"center",
dataIndex: 'totalMachine'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
// {
// title: '',
// dataIndex: 'action1',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action1' }
// },
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/base/zyProcess/list",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProcessModal from './modules/ZyProcessModal'
import ZyProcessModal1 from './modules/ZyProcessModal1'
import ZyProcessModal2 from './modules/ZyProcessModal2'
import ZyProcessModal3 from './modules/ZyProcessModal3'
import ZyProcessModal4 from './modules/ZyProcessModal4'
import ZyProcessModal5 from './modules/ZyProcessModal5'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyProcessDetail from './modules/ZyProcessDetail'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModal,
ZyProcessDetail,
ZyProcessModal1,
ZyProcessModal2,
ZyProcessModal3,
ZyProcessModal4,
ZyProcessModal5
},
data() {
return {
description: 'zy_process管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
//
loadRouteType:false,
styleId:"",
dictOptions:{},
superFieldList:[],
}
},
created() {
// queryParam.styleId=this.styleId
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'processDescribe'
// },
{
title: '品质要求',
align: "center",
dataIndex: 'qualityRequire'
},
{
title: '工序时间',
align: "center",
dataIndex: 'processTime'
},
{
title: '工序单价',
align: "center",
dataIndex: 'price'
},
{
title: '工序等级',
align: "center",
dataIndex: 'grade'
},
// {
// title:'',
// align:"center",
// dataIndex: 'fabricNum'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'machineId_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'componentId_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'toolId_dictText'
// },
// {
// title: '',
// align: "center",
// dataIndex: 'styleId_dictText'
// },
{
title: '工段代码',
align: "center",
dataIndex: 'worksectionCode'
},
// {
// title:'',
// align:"center",
// dataIndex: 'contractNum'
// },
{
title: '合计(手工TMU)',
align: "center",
dataIndex: 'totalManualTmu'
},
{
title: '合计(机器TMU)',
align: "center",
dataIndex: 'totalMachineTmu'
},
{
title: '合计(手工秒)',
align: "center",
dataIndex: 'totalMaunal'
},
{
title: '合计(设备秒)',
align: "center",
dataIndex: 'totalMachine'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
// {
// title: '',
// dataIndex: 'action1',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action1' }
// },
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/base/zyProcess/list",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
},
//
loadRouteType: false,
styleId: "",
dictOptions: {},
superFieldList: [],
}
},
created() {
// queryParam.styleId=this.styleId
// this.getSuperFieldList();
this.loadParameter() ;
this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
methods: {
initDictConfig(){
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.styleId = this.$route.query.styleId;
console.log(this.styleId)
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)
//
loadParameter() {
if (this.loadRouteType == false) {
this.styleId = this.$route.query.styleId;
console.log(this.styleId)
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;
}
}).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)
}
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.styleId=this.styleId;
return filterObj(param);
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'processCode',text:'工序代码',dictCode:''})
fieldList.push({type:'string',value:'processName',text:'工序名称',dictCode:''})
fieldList.push({type:'string',value:'processDescribe',text:'工艺描述',dictCode:''})
fieldList.push({type:'string',value:'mkExplain',text:'做工说明',dictCode:''})
fieldList.push({type:'string',value:'qualityRequire',text:'品质要求',dictCode:''})
fieldList.push({type:'string',value:'processTime',text:'工序时间',dictCode:''})
fieldList.push({type:'double',value:'price',text:'工序单价',dictCode:''})
fieldList.push({type:'string',value:'grade',text:'工序等级',dictCode:''})
fieldList.push({type:'string',value:'fabricNum',text:'面料代码',dictCode:''})
fieldList.push({type:'string',value:'fabricGrade',text:'面料等级',dictCode:''})
fieldList.push({type:'int',value:'needlePitch',text:'针距(针/厘米)',dictCode:''})
fieldList.push({type:'string',value:'machineId',text:'机器名',dictCode:'zy_machine,name,id'})
fieldList.push({type:'string',value:'manualWide',text:'手工宽放',dictCode:''})
fieldList.push({type:'double',value:'manualTime',text:'手工时间',dictCode:''})
fieldList.push({type:'int',value:'machineSpeed',text:'机器转速',dictCode:''})
fieldList.push({type:'string',value:'machineWide',text:'机器宽放',dictCode:''})
fieldList.push({type:'double',value:'machineTime',text:'机器时间',dictCode:''})
fieldList.push({type:'string',value:'machineFloat',text:'机器浮于',dictCode:''})
fieldList.push({type:'string',value:'bundleWide',text:'绑包宽放',dictCode:''})
fieldList.push({type:'string',value:'bundleTime',text:'绑包时间',dictCode:''})
fieldList.push({type:'string',value:'componentId',text:'部件表',dictCode:'zy_cloths_component,parts_name,id'})
fieldList.push({type:'int',value:'isBottleneck',text:'是否为瓶颈工序',dictCode:''})
fieldList.push({type:'string',value:'enterpriseId',text:'企业名称',dictCode:''})
fieldList.push({type:'string',value:'toolId',text:'工具名称',dictCode:'zy_tool,name,id'})
fieldList.push({type:'string',value:'styleId',text:'款式名称',dictCode:''})
fieldList.push({type:'string',value:'worksectionCode',text:'工段代码',dictCode:''})
fieldList.push({type:'string',value:'contractNum',text:'合同号',dictCode:''})
fieldList.push({type:'int',value:'totalManualTmu',text:'合计(手工TMU)',dictCode:''})
fieldList.push({type:'int',value:'totalMachineTmu',text:'合计(机器TMU)',dictCode:''})
fieldList.push({type:'int',value:'totalMaunal',text:'合计(手工秒)',dictCode:''})
fieldList.push({type:'int',value:'totalMachine',text:'合计(机器秒)',dictCode:''})
fieldList.push({type:'string',value:'image',text:'图片',dictCode:''})
fieldList.push({type:'string',value:'vedio',text:'视频',dictCode:''})
this.superFieldList = fieldList
},
openDetail(id){
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}).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.styleId = this.styleId;
return filterObj(param);
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
this.superFieldList = fieldList
},
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>

@ -84,7 +84,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">
<a-textarea v-model="model.foldingPackaging" rows="4" placeholder="请输入折叠搭配及包装" />
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装" dict-code="foldingPackaging" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -94,7 +94,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="缝纫形式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sewingForm">
<a-textarea v-model="model.sewingForm" rows="4" placeholder="请输入缝纫形式" />
<j-dict-select-tag v-model="model.sewingForm" placeholder="请输入缝纫形式" dict-code="sewingForm"/>
</a-form-model-item>
</a-col>
<a-col :span="24">

@ -6,7 +6,7 @@
<a-row :gutter="24">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式" v-if="styleId==undefined">
<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>
</a-form-item>
<a-form-item label="服装款式" v-else="">
@ -14,8 +14,8 @@
</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>
<a-form-item label="料类型" >
<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">
@ -144,15 +144,20 @@
}
},
{
title:'款式',
title:'款式名称',
align:"center",
dataIndex: 'styleId_dictText'
},
{
title:'面料',
title:'辅料类型',
align:"center",
dataIndex: 'accessoriesId_dictText'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
@ -189,7 +194,7 @@
initDictConfig(){
},
loadParameter() {
if (this.loadRouteType == false) {
if (this.loadRouteType === false) {
this.styleId = this.$route.query.id;
this.loadRouteType = true;
}
@ -235,6 +240,7 @@
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
if(this.styleId!==undefined)
param.styleId=this.styleId;
return filterObj(param);
},

@ -4,23 +4,23 @@
<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="styleId" v-if="model.styleId==undefined">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" />
<a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"
v-if="model.styleId===undefined">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id"
placeholder="请选择款式类型"/>
</a-form-model-item>
<a-form-model-item label="款式类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-else="">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" disabled />
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id"
placeholder="请选择款式类型" disabled/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="面料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accessoriesId">
<j-dict-select-tag type="list" v-model="model.accessoriesId" placeholder="请选择面料类型" dictCode="zy_accessories,contents,id" />
<a-form-model-item label="辅料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="accessoriesId">
<j-dict-select-tag type="list" v-model="model.accessoriesId" placeholder="请选择面料类型"
dictCode="zy_accessories,contents,id"/>
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="面料类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fabricId">-->
<!-- <j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
</a-row>
</a-form-model>
</j-form-container>
@ -29,90 +29,87 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
export default {
name: 'ZyStyleAccessoriesForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/zyaccessories/zyStyleAccessories/add",
edit: "/zyaccessories/zyStyleAccessories/edit",
queryById: "/zyaccessories/zyStyleAccessories/queryById"
}
export default {
name: 'ZyStyleAccessoriesForm',
components: {},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {},
url: {
add: "/zyaccessories/zyStyleAccessories/add",
edit: "/zyaccessories/zyStyleAccessories/edit",
queryById: "/zyaccessories/zyStyleAccessories/queryById"
}
}
},
computed: {
formDisabled() {
return this.disabled
},
computed: {
formDisabled(){
return this.disabled
},
},
created() {
//model
this.model.styleId = this.$route.query.id;
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.edit(this.modelDefault);
},
created () {
//model
this.model.styleId=this.$route.query.id;
this.modelDefault = JSON.parse(JSON.stringify(this.model));
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
} else {
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
})
},
}
}
</script>

@ -9,13 +9,6 @@
</a-form-model-item>
</a-col>
<!-- <a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-model="model.typeNme" placeholder="请输入服装类型" disabled></a-input>
<a-input v-model="model.typeid" hidden />
</a-form-model-item>
</a-col>-->
<a-col :span="24">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-dict-select-tag type="list" v-model="model.typeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择类型" disabled/>

@ -9,6 +9,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
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;
@ -37,138 +38,138 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: 款式辅料管理
* @Author: jeecg-boot
* @Date: 2022-11-10
* @Date: 2022-11-10
* @Version: V1.0
*/
@Api(tags="款式辅料管理")
@Api(tags = "款式辅料管理")
@RestController
@RequestMapping("/zyaccessories/zyStyleAccessories")
@Slf4j
public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccessories, IZyStyleAccessoriesService> {
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
/**
* 分页列表查询
*
* @param zyStyleAccessories
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "款式辅料管理-分页列表查询")
@ApiOperation(value="款式辅料管理-分页列表查询", notes="款式辅料管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleAccessories zyStyleAccessories,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 分页列表查询
*
* @param zyStyleAccessories
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "款式辅料管理-分页列表查询")
@ApiOperation(value = "款式辅料管理-分页列表查询", notes = "款式辅料管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleAccessories zyStyleAccessories,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyStyleAccessories
* @return
*/
@AutoLog(value = "款式辅料管理-添加")
@ApiOperation(value="款式辅料管理-添加", notes="款式辅料管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyStyleAccessories zyStyleAccessories) {
int a=zyStyleAccessoriesMapper.count(zyStyleAccessories.getAccessoriesId(),zyStyleAccessories.getStyleId());
if(a>=1)
return Result.error("添加失败,存在该款式辅料");
zyStyleAccessoriesService.save(zyStyleAccessories);
return Result.OK("添加成功!");
}
/**
* 添加
*
* @param zyStyleAccessories
* @return
*/
@AutoLog(value = "款式辅料管理-添加")
@ApiOperation(value = "款式辅料管理-添加", notes = "款式辅料管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyStyleAccessories zyStyleAccessories) {
int a = zyStyleAccessoriesMapper.count(zyStyleAccessories.getAccessoriesId(), zyStyleAccessories.getStyleId());
if (a >= 1)
return Result.error("添加失败,存在该款式辅料");
zyStyleAccessoriesService.save(zyStyleAccessories);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyStyleAccessories
* @return
*/
@AutoLog(value = "款式辅料管理-编辑")
@ApiOperation(value="款式辅料管理-编辑", notes="款式辅料管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyStyleAccessories zyStyleAccessories) {
zyStyleAccessoriesService.updateById(zyStyleAccessories);
return Result.OK("编辑成功!");
}
/**
* 编辑
*
* @param zyStyleAccessories
* @return
*/
@AutoLog(value = "款式辅料管理-编辑")
@ApiOperation(value = "款式辅料管理-编辑", notes = "款式辅料管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyStyleAccessories zyStyleAccessories) {
zyStyleAccessoriesService.updateById(zyStyleAccessories);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "款式辅料管理-通过id删除")
@ApiOperation(value="款式辅料管理-通过id删除", notes="款式辅料管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyStyleAccessoriesService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "款式辅料管理-通过id删除")
@ApiOperation(value = "款式辅料管理-通过id删除", notes = "款式辅料管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyStyleAccessoriesService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "款式辅料管理-批量删除")
@ApiOperation(value="款式辅料管理-批量删除", notes="款式辅料管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyStyleAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "款式辅料管理-批量删除")
@ApiOperation(value = "款式辅料管理-批量删除", notes = "款式辅料管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyStyleAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "款式辅料管理-通过id查询")
@ApiOperation(value="款式辅料管理-通过id查询", notes="款式辅料管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyStyleAccessories zyStyleAccessories = zyStyleAccessoriesService.getById(id);
if(zyStyleAccessories==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyStyleAccessories);
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "款式辅料管理-通过id查询")
@ApiOperation(value = "款式辅料管理-通过id查询", notes = "款式辅料管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyStyleAccessories zyStyleAccessories = zyStyleAccessoriesService.getById(id);
if (zyStyleAccessories == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyStyleAccessories);
}
/**
* 导出excel
*
* @param request
* @param zyStyleAccessories
*/
* 导出excel
*
* @param request
* @param zyStyleAccessories
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyStyleAccessories zyStyleAccessories) {
return super.exportXls(request, zyStyleAccessories, ZyStyleAccessories.class, "款式辅料管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyStyleAccessories.class);

@ -2,6 +2,7 @@ package org.jeecg.modules.demo.zyaccessories.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2022-11-10
* @Version: V1.0
*/
@Mapper
public interface ZyStyleAccessoriesMapper extends BaseMapper<ZyStyleAccessories> {
@Select("select count(*) from zy_style_accessories where style_id=#{styleId} and accessories_id=#{accessoriesId}")

@ -87,12 +87,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
/*LambdaQueryWrapper<ZyStyleModule> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ZyStyleModule::getStyleId,id);
Page<NewStyleModule> page = new Page<>(pageNo,pageSize);
Page<NewStyleModule> pageList = zyStyleModuleService.page(page, lambdaQueryWrapper);
System.out.println(pageList.getRecords());
return Result.OK(pageList);*/
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
@ -112,7 +106,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
}
}
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper);
System.out.println(list);
for (ZyStyleModule zyStyleModule : list) {
NewStyleModule newSeMo = new NewStyleModule();
//编辑回显
@ -146,8 +139,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
}
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, listNewStyleModules.size());
pageList.setRecords(listNewStyleModules);
System.out.println(pageList.getRecords());
//System.out.println(pageList.getRecords());
return Result.OK(pageList);
}
@ -172,7 +164,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
//System.out.println(zyStyleModule);
return Result.OK(pageList);
}
@ -187,14 +178,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) {
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
//String styleId = zyStyleModule.getStyleId();
//ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId);
//LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>();
//lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId());
//ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper);
//zyStyleModule.setTypeId(zyClothsType.getId());
zyStyleModuleService.save(zyStyleModule);
return Result.OK("添加成功!");

Loading…
Cancel
Save