Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit 6c209ebe31
  1. 4
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 32
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  3. 40
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  4. 74
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  5. 43
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleListDetail.vue
  6. 30
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  7. 35
      ant-design-vue-jeecg/src/views/zystyleaccessories/modules/ZyStyleAccListDetail.vue
  8. 11
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  9. 35
      ant-design-vue-jeecg/src/views/zystylefabric/modules/ZyStyleFabricListDetail.vue
  10. 44
      ant-design-vue-jeecg/src/views/zystylemodel/modules/ZyStyleModelListDetails.vue
  11. 4
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyProcessList.vue
  12. 37
      ant-design-vue-jeecg/src/views/zystylemodular/modules/ZyStyleModularListDetails.vue
  13. 9
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  14. 35
      ant-design-vue-jeecg/src/views/zystylemodule/modules/ZyStyleModuleListDetail.vue
  15. 33
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  16. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/entity/ZyStyleAccessories.java
  17. 29
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  18. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/mapper/ZyStyleFabricMapper.java
  19. 25
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  20. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java

@ -325,9 +325,9 @@ export const JeecgListMixin = {
console.log("js层id的传递"+id); console.log("js层id的传递"+id);
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
styleModuleHandleAdd: function (id,typeId) { styleModuleHandleAdd: function (id,typeId,styleNames) {
this.$refs.modalForm.add(id,typeId); this.$refs.modalForm.add(id,typeId);
this.$refs.modalForm.title = "新增"; this.$refs.modalForm.title = "服装款式 "+styleNames+" 新增";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
}, },
handleAdd1: function (id) { handleAdd1: function (id) {

@ -193,22 +193,24 @@
}, },
methods: { methods: {
async getNumberClothsComponentList() { async getNumberClothsComponentList() {
const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId) //const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsComponent/sort?id=' + this.model.clothsTypeId)
if (res.code !== 200) { getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {
this.$message({ if (res.code !== 200) {
type: 'error', this.$message({
message: '未查询到数据!' type: 'error',
}); message: '未查询到数据!'
} });
this.model.nums = res.result }
//console.log('res.result') this.model.nums = res.result
//console.log(res.result) //console.log('res.result')
//this.confirmLoading = false //console.log(res.result)
// if (this.data.length === 0) { //this.confirmLoading = false
// this.data.push(res.result) // if (this.data.length === 0) {
// } // this.data.push(res.result)
// }
console.log("制衣部件 编号: "+this.model.nums); console.log("制衣部件 编号: "+this.model.nums);
})
}, },
// bianHao() { // bianHao() {
// getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => { // getAction(this.url.sort, {id: this.model.clothsTypeId}).then((res) => {

@ -85,7 +85,7 @@
{ pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'}, { pattern: /^[0-9A-Za-z\u4e00-\u9fa5.,;,。;、!()?]{0,50}$/, message: '文本长度过长'},
], ],
enterpriseId: [ enterpriseId: [
{ required: true, message: '请输入企业!'}, { required: true, message: '请选择一个企业!'},
], ],
}, },
url: { url: {
@ -106,26 +106,38 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model)); this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
methods: { methods: {
async bianHao(){ bianHao(){
const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsType/weiyi?id=' + this.model.enterpriseId) // const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsType/weiyi?id=' + this.model.enterpriseId)
if (res.code !== 200) { // if (res.code !== 200) {
this.$message({ // this.$message({
type: 'error', // type: 'error',
message: '未查询到数据!' // message: ''
}); // });
} // }
this.model.nums = res.result // this.model.nums = res.result
console.log('res.result') // console.log('res.result')
console.log(res.result) // console.log(res.result)
//this.confirmLoading = false //this.confirmLoading = false
// if (this.data.length === 0) { // if (this.data.length === 0) {
// this.data.push(res.result) // this.data.push(res.result)
// } // }
//console.log("List "+this.model.nums); //console.log("List "+this.model.nums);
// var n=6 // var n=6
getAction(this.url.weiyi,{id: this.model.enterpriseId}).then((res)=>{
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
let num = res.result;
console.log("res.result: "+num)
//num=num.toString()
this.model.nums=res.result;
})
// getAction(this.url.weiyi,null).then((res)=>{ // getAction(this.url.weiyi,null).then((res)=>{
// var num=parseInt(res.result,10)+1 // let num = parseInt(res.result, 10) + 1;
// console.log(num) // console.log(num)
// num=num.toString() // num=num.toString()
// while(num.length<n){ // while(num.length<n){

@ -7,7 +7,7 @@
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId" <a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId"
class="label"> class="label">
<!-- <j-select-depart v-model="model.enterpriseId" multi @change="bianHao"/>--> <!-- <j-select-depart v-model="model.enterpriseId" multi @change="bianHao"/>-->
<j-select-depart v-model="model.enterpriseId" @change="bianHao"/> <j-select-depart v-model="model.enterpriseId" @change="bianHao"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -399,21 +399,22 @@ export default {
methods: { methods: {
async bianHao() { async bianHao() {
if (this.model.id) { if (this.model.id) {
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/enterpriseNum?id=' + this.model.enterpriseId) //const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/enterpriseNum?id=' + this.model.enterpriseId)
getAction(this.url.enterpriseNum,{id: this.model.enterpriseId}).then((res)=>{
if (res.code === 500){ if (res.code === 500) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '只能选择一个企业!' message: '只能选择一个企业!'
}); });
}else if (res.code !== 200) { } else if (res.code !== 200) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '未查询到数据!' message: '未查询到数据!'
}); });
} }
this.model.nums = res.result + this.model.nums.substring(4); this.model.nums = res.result + this.model.nums.substring(4);
console.log('res.result '+this.model.nums) console.log('res.result ' + this.model.nums)
})
} }
}, },
add() { add() {
@ -452,28 +453,35 @@ export default {
}) })
}, },
async popupCallback(value, row) { popupCallback(value, row) {
this.model = Object.assign(this.model, row); this.model = Object.assign(this.model, row);
console.log("1222346584" + "++++++" + row) console.log("1222346584" + "++++++" + row)
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/sort?id=' + this.model.typeId) getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
if (res.code !== 200) { if (res.code !== 200) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '未查询到数据!' message: '未查询到数据!'
}); });
} }
let num = res.result;
console.log("res.result: " + num)
//num=num.toString()
this.model.nums = res.result;
})
//const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/sort?id=' + this.model.typeId)
// var n = 8; // var n = 8;
// this.model = Object.assign(this.model, row); // this.model = Object.assign(this.model, row);
// getAction(this.url.sort, {id: this.model.typeId}).then((res) => { // getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
//console.log("aaaaaa" + res.result); //console.log("aaaaaa" + res.result);
//var num = parseInt(res.result, 10) + 1; //var num = parseInt(res.result, 10) + 1;
// num = num.toString(); // num = num.toString();
// while (num.length < n) { // while (num.length < n) {
// num = "0" + num // num = "0" + num
// } // }
this.model.nums = res.result; //this.model.nums = res.result;
// console.log(this.model.processCode) // console.log(this.model.processCode)
}, },
} }
} }
</script> </script>

@ -85,6 +85,8 @@
</div> </div>
</template> </template>
<script> <script>
import {getAction} from "@api/manage";
const columns1 = [ const columns1 = [
{ {
title: '款式名称', title: '款式名称',
@ -376,25 +378,28 @@ export default {
this.getDetailData() this.getDetailData()
}, },
async getDetailData() { async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/detail?id=' + this.id) getAction(this.url.detail, {id: this.id}).then((res) => {
if (res.code !== 200) { if (res.code !== 200) {
this.$message({ this.$message({
type: 'error', type: 'error',
message: '未查询到数据!' message: '未查询到数据!'
}); });
} }
console.log('res.result') console.log('res.result')
console.log(res.result) console.log(res.result)
this.confirmLoading = false this.confirmLoading = false
if (this.data1.length === 0) { if (this.data1.length === 0) {
this.data1.push(res.result.zyClothsStyles) this.data1.push(res.result.zyClothsStyles)
} }
this.data1 = res.result.zyClothsStyles this.data1 = res.result.zyClothsStyles
this.data2 = res.result.zyStyleFabricList this.data2 = res.result.zyStyleFabricList
this.data3 = res.result.zyStyleAccessoriesList this.data3 = res.result.zyStyleAccessoriesList
this.data4 = res.result.zyStyleModels this.data4 = res.result.zyStyleModels
this.data = res.result.zyStyleModuleList this.data = res.result.zyStyleModuleList
this.data5 = res.result.zyStyleModularList this.data5 = res.result.zyStyleModularList
})
//const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/detail?id=' + this.id)
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;

@ -6,16 +6,21 @@
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="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" <!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"-->
v-model="queryParam.styleId"></j-dict-select-tag> <!-- v-model="queryParam.styleId"></j-dict-select-tag>-->
</a-form-item> <!-- </a-form-item>-->
<a-form-item label="服装款式" v-else=""> <!-- <a-form-item label="服装款式" v-else="">-->
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" <!-- <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id"-->
v-model="queryParam.styleId" disabled></j-dict-select-tag> <!-- v-model="queryParam.styleId" disabled></j-dict-select-tag>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="辅料编号">-->
<!-- <a-input placeholder="请输入辅料编号" v-model="queryParam.accessNum"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料名称"> <a-form-item label="辅料名称">
<j-dict-select-tag placeholder="请选择辅料名称" dictCode="zy_accessories,contents,id" <j-dict-select-tag placeholder="请选择辅料名称" dictCode="zy_accessories,contents,id"
@ -177,6 +182,11 @@ export default {
align: "center", align: "center",
dataIndex: 'styleId_dictText' dataIndex: 'styleId_dictText'
}, },
{
title: '辅料编号',
align: "center",
dataIndex: 'accessNum'
},
{ {
title: '辅料名称', title: '辅料名称',
align: "center", align: "center",

@ -25,6 +25,8 @@
</template> </template>
<script> <script>
import {getAction} from "@api/manage";
const columns1 = [ const columns1 = [
{ {
title: '款式名称', title: '款式名称',
@ -105,6 +107,9 @@ export default {
columns3, columns3,
id: '', id: '',
url: {
detail: "/zyaccessories/zyStyleAccessories/detail",
},
} }
}, },
methods: { methods: {
@ -114,20 +119,22 @@ export default {
this.getDetailData() this.getDetailData()
}, },
async getDetailData() { async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zyaccessories/zyStyleAccessories/detail?id=' + this.id) //const {data: res} = await this.$axios.get('/jeecg-boot/zyaccessories/zyStyleAccessories/detail?id=' + this.id)
if (res.code !== 200) { getAction(this.url.detail, {id: this.id}).then((res) => {
this.$message({ if (res.code !== 200) {
type: 'error', this.$message({
message: '未查询到数据!' type: 'error',
}); message: '未查询到数据!'
} });
console.log('res.result'+res.result) }
this.confirmLoading = false console.log('res.result'+res.result)
if (this.data1.length === 0) { this.confirmLoading = false
this.data1.push(res.result.zyClothsStyles) if (this.data1.length === 0) {
} this.data1.push(res.result.zyClothsStyles)
this.data1 = res.result.zyClothsStyles }
this.data3 = res.result.zyStyleAccessoriesList this.data1 = res.result.zyClothsStyles
this.data3 = res.result.zyStyleAccessoriesList
})
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;

@ -5,10 +5,15 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <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>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装款式"> <a-form-item label="面料编号">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_style,style_names,id" <a-input placeholder="请输入面料编号" v-model="queryParam.fabricNumber"></a-input>
v-model="queryParam.styleId"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">

@ -26,6 +26,8 @@
</template> </template>
<script> <script>
import {getAction} from "@api/manage";
const columns1 = [ const columns1 = [
{ {
title: '款式名称', title: '款式名称',
@ -119,6 +121,9 @@ export default {
columns2, columns2,
id: '', id: '',
url: {
detail: "/zystylefabric/zyStyleFabric/detail",
},
} }
}, },
methods: { methods: {
@ -128,20 +133,22 @@ export default {
this.getDetailData() this.getDetailData()
}, },
async getDetailData() { async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zystylefabric/zyStyleFabric/detail?id=' + this.id) //const {data: res} = await this.$axios.get('/jeecg-boot/zystylefabric/zyStyleFabric/detail?id=' + this.id)
if (res.code !== 200) { getAction(this.url.detail, {id: this.id}).then((res) => {
this.$message({ if (res.code !== 200) {
type: 'error', this.$message({
message: '未查询到数据!' type: 'error',
}); message: '未查询到数据!'
} });
console.log('res.result'+res.result) }
this.confirmLoading = false console.log('res.result'+res.result)
if (this.data1.length === 0) { this.confirmLoading = false
this.data1.push(res.result.zyClothsStyles) if (this.data1.length === 0) {
} this.data1.push(res.result.zyClothsStyles)
this.data1 = res.result.zyClothsStyles }
this.data2 = res.result.zyStyleFabricList this.data1 = res.result.zyClothsStyles
this.data2 = res.result.zyStyleFabricList
})
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;

@ -15,7 +15,8 @@
</a-table> </a-table>
<h3 style="width: 98%;;margin:20px auto 0">管理型号</h3> <h3 style="width: 98%;;margin:20px auto 0">管理型号</h3>
<a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns4" :data-source="data4" rowKey="id" bordered :pagination="false"> <a-table style="width: 98%;font-size:14px;margin:10px auto 0" :columns="columns4" :data-source="data4"
rowKey="id" bordered :pagination="false">
</a-table> </a-table>
@ -26,6 +27,8 @@
</template> </template>
<script> <script>
import {getAction} from "@api/manage";
const columns1 = [ const columns1 = [
{ {
title: '款式名称', title: '款式名称',
@ -163,9 +166,12 @@ export default {
// //
columns4, columns4,
data4:[], data4: [],
id: '', id: '',
url: {
detail: "/zystylemodel/zyStyleModel/detail",
},
} }
}, },
methods: { methods: {
@ -174,22 +180,24 @@ export default {
this.id = id this.id = id
this.getDetailData() this.getDetailData()
}, },
async getDetailData() { getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodel/zyStyleModel/detail?id=' + this.id) //const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodel/zyStyleModel/detail?id=' + this.id)
if (res.code !== 200) { getAction(this.url.detail, {id: this.id}).then((res) => {
this.$message({ if (res.code !== 200) {
type: 'error', this.$message({
message: '未查询到数据!' type: 'error',
}); message: '未查询到数据!'
} });
console.log('res.result') }
console.log(res.result) console.log('res.result')
this.confirmLoading = false console.log(res.result)
if (this.data1.length === 0) { this.confirmLoading = false
this.data1.push(res.result.zyClothsStyles) if (this.data1.length === 0) {
} this.data1.push(res.result.zyClothsStyles)
this.data1 = res.result.zyClothsStyles }
this.data4 = res.result.zyStyleModels this.data1 = res.result.zyClothsStyles
this.data4 = res.result.zyStyleModels
})
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;

@ -161,8 +161,8 @@ export default {
}, },
created() { created() {
// queryParam.styleId=this.styleId // queryParam.styleId=this.styleId
// this.getSuperFieldList(); this.getSuperFieldList();
this.loadParameter(); //this.loadParameter();
}, },
computed: { computed: {
importExcelUrl: function () { importExcelUrl: function () {

@ -26,6 +26,8 @@
</template> </template>
<script> <script>
import {getAction} from "@api/manage";
const columns1 = [ const columns1 = [
{ {
title: '款式名称', title: '款式名称',
@ -101,6 +103,9 @@ export default {
data5: [], data5: [],
id: '', id: '',
url: {
detail: "/zyStyleModular/zyStyleModular/detail",
},
} }
}, },
methods: { methods: {
@ -110,21 +115,23 @@ export default {
this.getDetailData() this.getDetailData()
}, },
async getDetailData() { async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zyStyleModular/zyStyleModular/detail?id=' + this.id) //const {data: res} = await this.$axios.get('/jeecg-boot/zyStyleModular/zyStyleModular/detail?id=' + this.id)
if (res.code !== 200) { getAction(this.url.detail, {id: this.id}).then((res) => {
this.$message({ if (res.code !== 200) {
type: 'error', this.$message({
message: '未查询到数据!' type: 'error',
}); message: '未查询到数据!'
} });
console.log('res.result') }
console.log(res.result) console.log('res.result')
this.confirmLoading = false console.log(res.result)
if (this.data1.length === 0) { this.confirmLoading = false
this.data1.push(res.result.zyClothsStyles) if (this.data1.length === 0) {
} this.data1.push(res.result.zyClothsStyles)
this.data1 = res.result.zyClothsStyles }
this.data5 = res.result.zyStyleModularList this.data1 = res.result.zyClothsStyles
this.data5 = res.result.zyStyleModularList
})
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;

@ -23,6 +23,11 @@
v-model="queryParam.modularId"></j-dict-select-tag> v-model="queryParam.modularId"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="7" :lg="7" :md="8" :sm="24">
<a-form-item label="模块编号">
<a-input placeholder="模块编号" v-model="queryParam.modularNums"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <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="searchQuery" icon="search">查询</a-button>
@ -39,7 +44,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="styleModuleHandleAdd(id,typeId)" type="primary" icon="plus">新增</a-button> <a-button @click="styleModuleHandleAdd(id,typeId,styleNames)" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('款式模块表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button> <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
@ -215,6 +220,7 @@ export default {
loadRouteType: false, loadRouteType: false,
id: "", id: "",
typeId: "", typeId: "",
styleNames: '',
dictOptions: {}, dictOptions: {},
superFieldList: [], superFieldList: [],
} }
@ -251,6 +257,7 @@ export default {
this.id = this.$route.query.id; this.id = this.$route.query.id;
this.typeId = this.$route.query.typeId; this.typeId = this.$route.query.typeId;
this.biaoTi = this.$route.query.styleNames + "款式模块管理"; this.biaoTi = this.$route.query.styleNames + "款式模块管理";
this.styleNames = this.$route.query.styleNames;
//console.log('********idstyle_id: ' + this.id); //console.log('********idstyle_id: ' + this.id);
//console.log('********biaoTi: ' + this.biaoTi); //console.log('********biaoTi: ' + this.biaoTi);
//console.log('******typeIdtypeId: ' + this.typeId); //console.log('******typeIdtypeId: ' + this.typeId);

@ -25,6 +25,8 @@
</template> </template>
<script> <script>
import {getAction} from "@api/manage";
const columns1 = [ const columns1 = [
{ {
title: '款式名称', title: '款式名称',
@ -117,6 +119,9 @@ export default {
columns, columns,
id: '', id: '',
url: {
detail: "/zystylemodule/zyStyleModule/detail",
},
} }
}, },
methods: { methods: {
@ -126,20 +131,22 @@ export default {
this.getDetailData() this.getDetailData()
}, },
async getDetailData() { async getDetailData() {
const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodule/zyStyleModule/detail?id=' + this.id) //const {data: res} = await this.$axios.get('/jeecg-boot/zystylemodule/zyStyleModule/detail?id=' + this.id)
if (res.code !== 200) { getAction(this.url.detail, {id: this.id}).then((res) => {
this.$message({ if (res.code !== 200) {
type: 'error', this.$message({
message: '未查询到数据!' type: 'error',
}); message: '未查询到数据!'
} });
console.log('res.result'+res.result) }
this.confirmLoading = false console.log('res.result'+res.result)
if (this.data1.length === 0) { this.confirmLoading = false
this.data1.push(res.result.zyClothsStyles) if (this.data1.length === 0) {
} this.data1.push(res.result.zyClothsStyles)
this.data1 = res.result.zyClothsStyles }
this.data = res.result.zyStyleModuleList this.data1 = res.result.zyClothsStyles
this.data = res.result.zyStyleModuleList
})
}, },
handleOk(e) { handleOk(e) {
this.confirmLoading = true; this.confirmLoading = true;

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.zyaccessories.controller; package org.jeecg.modules.demo.zyaccessories.controller;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -11,9 +12,13 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils; import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO; import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories; import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper; import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper;
@ -33,6 +38,8 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired; 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.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.MultipartHttpServletRequest;
@ -55,6 +62,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccessories, IZyStyleAccessoriesService> { public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccessories, IZyStyleAccessoriesService> {
@Autowired @Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService; private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IZyAccessoriesService zyAccessoriesService;
@Autowired @Autowired
private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper; private ZyStyleAccessoriesMapper zyStyleAccessoriesMapper;
@ -78,13 +87,35 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
//zyStyleAccessories.getAccessNum() 辅料编号 查询参数 只有查询的时候才会有
// List<ZyAccessories> accessories = new ArrayList<>();
// if (StringUtils.hasText(zyStyleAccessories.getAccessNum())) {
// LambdaQueryWrapper<ZyAccessories> queryWrapper2 = new LambdaQueryWrapper<>();
// queryWrapper2.like(ZyAccessories::getNums, zyStyleAccessories.getAccessNum());
// accessories.addAll(zyAccessoriesService.list());
// }
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap()); QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize); Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper); IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
List<ZyStyleAccessories> listRecords = pageList.getRecords(); List<ZyStyleAccessories> listRecords = pageList.getRecords();
// if (!ObjectUtils.isEmpty(accessories) && !ObjectUtils.isEmpty(listRecords)) {
// for (ZyAccessories zy : accessories) {
// listRecords.stream()
// .filter(ZyStyleAccessories -> ZyStyleAccessories.getAccessoriesId().equals(zy.getId()))
// .collect(Collectors.toList());
// }
// }
for (ZyStyleAccessories zy : listRecords) { for (ZyStyleAccessories zy : listRecords) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId()); String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
zy.setTypeName(typeName); String num = zyStyleFabricMapper.getAccessoriesNumById(zy.getAccessoriesId());
if (StringUtils.hasText(typeName)) {
zy.setTypeName(typeName);
}
if (StringUtils.hasText(num)) {
zy.setAccessNum(num);
}
} }
return Result.OK(pageList); return Result.OK(pageList);
} }

@ -65,7 +65,9 @@ public class ZyStyleAccessories implements Serializable {
@ApiModelProperty(value = "面料id") @ApiModelProperty(value = "面料id")
@Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id") @Dict(dictTable = "zy_accessories", dicText = "contents", dicCode = "id")
private java.lang.String accessoriesId; private java.lang.String accessoriesId;
/** 辅料 编号*/
@TableField(exist = false)
private java.lang.String accessNum;
/**服装类型名称*/ /**服装类型名称*/
@Excel(name = "服装类型名称", width = 15) @Excel(name = "服装类型名称", width = 15)
@ApiModelProperty(value = "服装类型名称") @ApiModelProperty(value = "服装类型名称")

@ -1,5 +1,6 @@
package org.jeecg.modules.zystylefabric.controller; package org.jeecg.modules.zystylefabric.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -9,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result; import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.fabric.entity.ZyFabric; import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.fabric.service.IZyFabricService; import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
@ -19,7 +21,11 @@ import org.jeecg.modules.zystylefabric.entity.ZyStyleFabricDetailVo;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper; import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService; import org.jeecg.modules.zystylefabric.service.INewZyStyleFabricService;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService; import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodule.entity.NewStyleModule;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.springframework.beans.factory.annotation.Autowired; 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.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
@ -29,6 +35,7 @@ import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* @Description: 款式面料表 * @Description: 款式面料表
@ -66,10 +73,12 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
@ApiOperation(value = "款式面料表-分页列表查询", notes = "款式面料表-分页列表查询") @ApiOperation(value = "款式面料表-分页列表查询", notes = "款式面料表-分页列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<IPage<NewZyStyleFabric>> queryPageList(ZyStyleFabric zyStyleFabric, String id, public Result<IPage<NewZyStyleFabric>> queryPageList(ZyStyleFabric zyStyleFabric, String id,
@RequestParam(name = "fabricNumber", required = false) String fabricNumber,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<ZyStyleFabric> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZyStyleFabric> queryWrapper = new QueryWrapper<>();
//从服装款式进去款式面料时 根据style_id进行筛选 所以一般都会有id即style_id
if (id != null) { if (id != null) {
queryWrapper.eq("style_id", id); queryWrapper.eq("style_id", id);
} }
@ -84,6 +93,26 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
} }
List<ZyStyleFabric> list = zyStyleFabricService.list(queryWrapper); List<ZyStyleFabric> list = zyStyleFabricService.list(queryWrapper);
//fabricNumber 面料编号查询参数 只有查询的时候才会有
if (StringUtils.hasText(fabricNumber)) {
LambdaQueryWrapper<ZyFabric> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.like( ZyFabric::getFabricNumber,fabricNumber);
List<ZyFabric> listTwo = zyFabricService.list(queryWrapper2);
if (ObjectUtils.isEmpty(listTwo)){
IPage<NewZyStyleFabric> pageList2 = new Page<>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
List<ZyStyleFabric> zyStyleFabricList = new ArrayList<>();
for (ZyFabric zy : listTwo) {
List<ZyStyleFabric> zyStyleFabrics = zyStyleFabricMapper.getListByFabricId(zy.getId());
zyStyleFabricList.addAll(zyStyleFabrics);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleFabricList = zyStyleFabricList.stream().filter(ZyStyleFabric -> ZyStyleFabric.getStyleId().equals(id)).collect(Collectors.toList());
list.clear();
list.addAll(zyStyleFabricList);
}
List<NewZyStyleFabric> newZyStyleFabrics = zyStyleFabricService.changeList(list); List<NewZyStyleFabric> newZyStyleFabrics = zyStyleFabricService.changeList(list);
IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size()); IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size());
pageList.setRecords(newZyStyleFabrics); pageList.setRecords(newZyStyleFabrics);

@ -35,4 +35,10 @@ public interface ZyStyleFabricMapper extends BaseMapper<ZyStyleFabric> {
/**根据styleId 拿到 面料名称*/ /**根据styleId 拿到 面料名称*/
@Select("select contents from zy_accessories where id = #{styleId}") @Select("select contents from zy_accessories where id = #{styleId}")
String getAccessoriesNameByStyleId(String styleId); String getAccessoriesNameByStyleId(String styleId);
/**根据styleId 拿到 面料名称*/
@Select("select nums from zy_accessories where id = #{styleId}")
String getAccessoriesNumById(String styleId);
@Select("SELECT * FROM zy_style_fabric WHERE fabric_id = #{id}")
List<ZyStyleFabric> getListByFabricId(String id);
} }

@ -3,10 +3,13 @@ package org.jeecg.modules.zystylemodule.controller;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; 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.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.query.QueryGenerator;
@ -77,17 +80,35 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
public Result<?> queryPageList(ZyStyleModule zyStyleModule2, public Result<?> queryPageList(ZyStyleModule zyStyleModule2,
@RequestParam(name = "id", required = false) String id, @RequestParam(name = "id", required = false) String id,
@RequestParam(name = "modularId", required = false) String modularId, @RequestParam(name = "modularId", required = false) String modularId,
@RequestParam(name = "modularNums", required = false) String modularNums,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
//System.err.println("ZyStyleModule 款式模块表 传来的 " + id); //System.err.println("ZyStyleModule 款式模块表 传来的 " + id);
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
//从服装款式进去款式模块时 根据style_id进行筛选 所以一般都会有id即style_id
queryWrapper.eq(StringUtils.hasText(id), "style_id", id); queryWrapper.eq(StringUtils.hasText(id), "style_id", id);
queryWrapper.eq(StringUtils.hasText(modularId), "modular_id", modularId); queryWrapper.eq(StringUtils.hasText(modularId), "modular_id", modularId);
Page<ZyStyleModule> page = new Page<>(pageNo, pageSize); Page<ZyStyleModule> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper); IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
if (StringUtils.hasText(modularNums)){
LambdaQueryWrapper<ZyClothsModular> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.like( ZyClothsModular::getNums,modularNums);
List<ZyClothsModular> list = zyClothsModularService.list(queryWrapper2);
if (ObjectUtils.isEmpty(list)){
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
List<ZyStyleModule> zyStyleModules = new ArrayList<>();
for (ZyClothsModular zy :list) {
List<ZyStyleModule> zyStyleModulesList = zyStyleModuleMapper.getListByModularId(zy.getId());
zyStyleModules.addAll(zyStyleModulesList);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleModules = zyStyleModules.stream().filter(ZyStyleModule -> ZyStyleModule.getStyleId().equals(id)).collect(Collectors.toList());
pageList.setRecords(zyStyleModules);
}
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id); //List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型 //改变list中的实体类 类型
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords()); List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords());
@ -156,7 +177,7 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@ApiOperation(value = "款式模块表-详情", notes = "款式模块表-详情") @ApiOperation(value = "款式模块表-详情", notes = "款式模块表-详情")
@GetMapping(value = "/detail") @GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) { public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("款式模块表 /detail controller层接受到的id: : " + id); //System.out.println("款式模块表 /detail controller层接受到的id: : " + id);
ZyStyleModuleDetailVO detailVO = zyStyleModuleService.queryDetail(id); ZyStyleModuleDetailVO detailVO = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVO); return Result.OK(detailVO);
} }

@ -23,4 +23,7 @@ public interface ZyStyleModuleMapper extends BaseMapper<ZyStyleModule> {
@Select("SELECT * FROM zy_style_module WHERE style_id = #{id}") @Select("SELECT * FROM zy_style_module WHERE style_id = #{id}")
List<ZyStyleModule> getListByStyleId(String id); List<ZyStyleModule> getListByStyleId(String id);
@Select("SELECT * FROM zy_style_module WHERE modular_id = #{id}")
List<ZyStyleModule> getListByModularId(String id);
} }

Loading…
Cancel
Save