Merge remote-tracking branch 'origin/master'

zhc4dev
赵玉瑞 2 years ago
commit 5db1646886
  1. 61
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  2. 10
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  3. 77
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  4. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  5. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -138,6 +138,8 @@
import ZyProcessModal5 from './modules/ZyProcessModal5' import ZyProcessModal5 from './modules/ZyProcessModal5'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyProcessDetail from './modules/ZyProcessDetail' import ZyProcessDetail from './modules/ZyProcessDetail'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default { export default {
name: 'ZyProcessList', name: 'ZyProcessList',
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
@ -285,12 +287,17 @@
importExcelUrl: "base/zyProcess/importExcel", importExcelUrl: "base/zyProcess/importExcel",
}, },
//
loadRouteType:false,
styleId:"",
dictOptions:{}, dictOptions:{},
superFieldList:[], superFieldList:[],
} }
}, },
created() { created() {
this.getSuperFieldList(); // queryParam.styleId=this.styleId
// this.getSuperFieldList();
this.loadParameter() ;
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function(){
@ -300,6 +307,58 @@
methods: { methods: {
initDictConfig(){ 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)
}
}).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(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'processCode',text:'工序代码',dictCode:''}) fieldList.push({type:'string',value:'processCode',text:'工序代码',dictCode:''})

@ -247,12 +247,20 @@
}, },
jumpPage4(record) { jumpPage4(record) {
this.$router.push({ this.$router.push({
path: '/zyclothsstyle/ZyClothsStyleList', path: '/src/views/zystylemodel/ZyStyleModelList',
query: { // query: { //
'id': record.id, 'id': record.id,
} }
}); });
}, },
jumpPage5(record) {
this.$router.push({
path: '/process/ZyProcessList',
query: { //
'styleId': record.id,
}
});
},
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'popup',value:'typeId',text:'类型id', popup:{code:'zy_cloths_type',field:'type_name',orgFields:'type_name',destFields:'id'}}) fieldList.push({type:'popup',value:'typeId',text:'类型id', popup:{code:'zy_cloths_type',field:'type_name',orgFields:'type_name',destFields:'id'}})

@ -27,7 +27,6 @@
:pagination="pagination" :pagination="pagination"
style="margin-top: 8px;" style="margin-top: 8px;"
@pageChange="handlePageChange" @pageChange="handlePageChange"
@selectRowChange="handleSelectRowChange"
> >
<template v-slot:action="props"> <template v-slot:action="props">
<a @click="submitForm(props)">保存</a> <a @click="submitForm(props)">保存</a>
@ -52,7 +51,7 @@
import ZyStyleModelModal from './modules/ZyStyleModelModal' import ZyStyleModelModal from './modules/ZyStyleModelModal'
import {deleteAction, getAction, postAction, putAction, postFormAction, httpAction} from "@api/manage"; import {deleteAction, getAction, postAction, putAction, postFormAction, httpAction} from "@api/manage";
import store from "@/store"; import store from "@/store";
import { validateDuplicateValue } from '@/utils/util' import {filterObj, validateDuplicateValue} from '@/utils/util'
export default { export default {
name: 'ZyStyleModelList', name: 'ZyStyleModelList',
@ -86,11 +85,13 @@
pageSizeOptions: ['10', '20', '30', '100', '200'], pageSizeOptions: ['10', '20', '30', '100', '200'],
// 0 // 0
total: 0, total: 0,
showQuickJumper: true,
showSizeChanger: true,
id:null
}, },
//
selectedRows: [],
// //
dataSource: [],
columns: [ columns: [
{ {
title: '款式', title: '款式',
@ -144,15 +145,19 @@
exportXlsUrl: "/zystylemodel/zyStyleModel/exportXls", exportXlsUrl: "/zystylemodel/zyStyleModel/exportXls",
importExcelUrl: "zystylemodel/zyStyleModel/importExcel", importExcelUrl: "zystylemodel/zyStyleModel/importExcel",
}, },
//
loadRouteType:false,
id:null,
rowId:'', rowId:'',
dictOptions:{}, dictOptions:{},
superFieldList:[], superFieldList:[],
} }
}, },
created() { created() {
this.loadData(); //this.loadData();
this.loadParameter() ;
//model //model
this.modelDefault = JSON.parse(JSON.stringify(this.model)); //this.modelDefault = JSON.parse(JSON.stringify(this.model));
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function(){
@ -179,8 +184,6 @@
}, },
submitForm (props) { submitForm (props) {
this.model = Object.assign({}, props); this.model = Object.assign({}, props);
// console.log(props.rowId)
// console.log(this.model)
var str = props.rowId; var str = props.rowId;
let httpurl = ''; let httpurl = '';
let method = ''; let method = '';
@ -200,25 +203,38 @@
} }
}) })
}, },
//
loadParameter() {
if (this.loadRouteType == false) {
this.id = this.$route.query.id;
this.loadRouteType = true;
}
},
// //
loadData() { loadData(arg) {
// // 1
let formData = { if (arg === 1) {
pageNo: this.pagination.current, this.pagination.current = 1;
pageSize: this.pagination.pageSize
} }
// //
this.loading = true this.loadParameter();
getAction(this.url.list, formData).then(res => { var params = this.getQueryParams();//
this.loading = true;
getAction(this.url.list, params).then(res => {
if (res.success) { if (res.success) {
// total /*// 后台查询回来的 total数据总数
this.pagination.total = res.result.total this.pagination.total = res.result.total*/
// dataSource // dataSource
this.dataSource = res.result.records this.dataSource = res.result.records||res.result;
console.log(this.dataSource,'aaa') console.log(this.dataSource,'abc')
// if(res.result.total)
this.selectedRows = [] {
this.pagination.total = res.result.total;
}else{
this.pagination.total = 0;
}
//this.dataSource = res.result.records
} else { } else {
this.$error({title: '主表查询失败', content: res.message}) this.$error({title: '主表查询失败', content: res.message})
} }
@ -237,7 +253,20 @@
}, },
initDictConfig(){ initDictConfig(){
}, },
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.id
return filterObj(param);
},
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:''}) fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:''})

@ -66,11 +66,13 @@ public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZySty
//@AutoLog(value = "zy_style_model-分页列表查询") //@AutoLog(value = "zy_style_model-分页列表查询")
@ApiOperation(value="zy_style_model-分页列表查询", notes="zy_style_model-分页列表查询") @ApiOperation(value="zy_style_model-分页列表查询", notes="zy_style_model-分页列表查询")
@GetMapping(value = "/list") @GetMapping(value = "/list")
public Result<IPage<ZyStyleModel>> queryPageList(ZyStyleModel zyStyleModel, public Result<IPage<ZyStyleModel>> queryPageList(ZyStyleModel zyStyleModel,String id,
@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<ZyStyleModel> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap()); QueryWrapper<ZyStyleModel> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
System.out.println(zyStyleModel.getStyleId());
//queryWrapper.eq("style_id", id);
Page<ZyStyleModel> page = new Page<ZyStyleModel>(pageNo, pageSize); Page<ZyStyleModel> page = new Page<ZyStyleModel>(pageNo, pageSize);
IPage<ZyStyleModel> pageList = zyStyleModelService.page(page, queryWrapper); IPage<ZyStyleModel> pageList = zyStyleModelService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);

@ -81,7 +81,6 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@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.out.println(id);
List<NewStyleModule> listNewStyleModules = new ArrayList<>(); List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
if(id!=null){ if(id!=null){

Loading…
Cancel
Save