订单管理所有模块以及商品管理BUG修改

zhc4dev
Gitea 2 years ago
parent f0900655e1
commit c3c1b94591
  1. 57
      ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue
  2. 41
      ant-design-vue-jeecg/src/views/ordergoodsaccessories/OrderGoodsAccessoriesList.vue
  3. 41
      ant-design-vue-jeecg/src/views/ordergoodsfabric/OrderGoodsFabricList.vue
  4. 47
      ant-design-vue-jeecg/src/views/ordergoodsmodule/OrderGoodsModuleList.vue
  5. 27
      ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue
  6. 29
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/controller/OrderGoodsController.java
  7. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsaccessories/controller/OrderGoodsAccessoriesController.java
  8. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsfabric/controller/OrderGoodsFabricController.java
  9. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoodsmodule/controller/OrderGoodsModuleController.java

@ -112,7 +112,15 @@
下载
</a-button>
</template>
<template slot="mk" slot-scope="text, record">
<a @click="goodsModule(record)">管理</a>
</template>
<template slot="ml" slot-scope="text, record">
<a @click="goodsModule2(record)">管理</a>
</template>
<template slot="fl" slot-scope="text, record">
<a @click="goodsModule3(record)">管理</a>
</template>
<span slot="action" slot-scope="text, record">
<!--<a @click="handleEdit(record)">编辑</a>-->
<a @click="handleDetail(record)">详情</a>
@ -279,6 +287,21 @@
align:"center",
dataIndex: 'payTotalPrice'
},
{
title: '订单商品模块',
align: "center",
scopedSlots: {customRender: 'mk'}
},
{
title: '订单商品面料',
align: "center",
scopedSlots: {customRender: 'ml'}
},
{
title: '订单商品辅料',
align: "center",
scopedSlots: {customRender: 'fl'}
},
{
title: '操作',
dataIndex: 'action',
@ -289,7 +312,7 @@
}
],
url: {
list: "/ordergoods/orderGoods/list",
list: "/ordergoods/orderGoods/list?orderid="+this.$route.query.orderid+"&ischild="+this.$route.query.ischild,
delete: "/ordergoods/orderGoods/delete",
deleteBatch: "/ordergoods/orderGoods/deleteBatch",
exportXlsUrl: "/ordergoods/orderGoods/exportXls",
@ -309,6 +332,36 @@
},
},
methods: {
goodsModule(record)
{
this.$router.push({
path: '/ordergoodsmodule/OrderGoodsModuleList',
query: { //
'ordergoodsid': record.id,
'goodsname':record.goodsName,
}
});
},
goodsModule2(record)
{
this.$router.push({
path: '/ordergoodsfabric/OrderGoodsFabricList',
query: { //
'ordergoodsid': record.id,
'goodsname':record.goodsName,
}
});
},
goodsModule3(record)
{
this.$router.push({
path: '/ordergoodsaccessories/OrderGoodsAccessoriesList',
query: { //
'ordergoodsid': record.id,
'goodsname':record.goodsName,
}
});
},
initDictConfig(){
},
getSuperFieldList(){

@ -1,34 +1,19 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单商品">
<j-dict-select-tag placeholder="请选择订单商品" v-model="queryParam.orderGoodsId" dictCode="order_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-dict-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料">
<j-dict-select-tag placeholder="请选择辅料" v-model="queryParam.accessoriesId" dictCode="zy_accessories,contents,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -38,18 +23,12 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('订单商品辅料表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
@ -95,22 +74,7 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
@ -174,7 +138,7 @@
}
],
url: {
list: "/ordergoodsaccessories/orderGoodsAccessories/list",
list: "/ordergoodsaccessories/orderGoodsAccessories/list?ordergoodsid="+this.$route.query.ordergoodsid,
delete: "/ordergoodsaccessories/orderGoodsAccessories/delete",
deleteBatch: "/ordergoodsaccessories/orderGoodsAccessories/deleteBatch",
exportXlsUrl: "/ordergoodsaccessories/orderGoodsAccessories/exportXls",
@ -187,6 +151,7 @@
},
created() {
this.getSuperFieldList();
this.biaoTi = this.$route.query.goodsname+"订单商品辅料管理";
},
computed: {
importExcelUrl: function(){

@ -1,34 +1,19 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单商品">
<j-dict-select-tag placeholder="请选择订单商品" v-model="queryParam.orderGoodsId" dictCode="order_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-dict-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="面料">
<j-dict-select-tag placeholder="请选择面料" v-model="queryParam.fabricId" dictCode="zy_fabric,name,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -38,18 +23,12 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('订单商品面料表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
@ -95,22 +74,7 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
@ -174,7 +138,7 @@
}
],
url: {
list: "/ordergoodsfabric/orderGoodsFabric/list",
list: "/ordergoodsfabric/orderGoodsFabric/list?ordergoodsid="+this.$route.query.ordergoodsid,
delete: "/ordergoodsfabric/orderGoodsFabric/delete",
deleteBatch: "/ordergoodsfabric/orderGoodsFabric/deleteBatch",
exportXlsUrl: "/ordergoodsfabric/orderGoodsFabric/exportXls",
@ -187,6 +151,7 @@
},
created() {
this.getSuperFieldList();
this.biaoTi = this.$route.query.goodsname+"订单商品面料管理";
},
computed: {
importExcelUrl: function(){

@ -1,44 +1,24 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单商品">
<j-dict-select-tag placeholder="请选择订单商品" v-model="queryParam.orderGoodsId" dictCode="order_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="商品">
<j-dict-select-tag placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="款式">
<j-dict-select-tag placeholder="请选择款式" v-model="queryParam.styleId" dictCode="zy_cloths_style,style_names,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="款式模块">
<a-input placeholder="请输入款式模块" v-model="queryParam.styleModuleId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块">
<j-dict-select-tag placeholder="请选择模块" v-model="queryParam.moduleId" dictCode="zy_cloths_modular ,modular_name,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -48,18 +28,12 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('订单商品模块表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
@ -105,22 +79,7 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
@ -148,6 +107,7 @@
return {
description: '订单商品模块表管理页面',
//
biaoTi: '',
columns: [
{
title: '#',
@ -189,7 +149,7 @@
}
],
url: {
list: "/ordergoodsmodule/orderGoodsModule/list",
list: "/ordergoodsmodule/orderGoodsModule/list?ordergoodsid="+this.$route.query.ordergoodsid,
delete: "/ordergoodsmodule/orderGoodsModule/delete",
deleteBatch: "/ordergoodsmodule/orderGoodsModule/deleteBatch",
exportXlsUrl: "/ordergoodsmodule/orderGoodsModule/exportXls",
@ -202,6 +162,7 @@
},
created() {
this.getSuperFieldList();
this.biaoTi = this.$route.query.goodsname+"订单商品模块管理";
},
computed: {
importExcelUrl: function(){

@ -141,6 +141,8 @@
<a-divider type="vertical" />
<a @click="shengchan(record)">生产</a>
<a-divider type="vertical" />
<a @click="shangpin(record)">商品</a>
<a-divider type="vertical" />
<!-- <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />-->
<a @click="handleDetail(record)">详情</a>
@ -188,6 +190,14 @@
return parseInt(index)+1;
}
},
{
title:'下单时间',
align:"center",
dataIndex: 'orderTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'是否子单',
align:"center",
@ -198,14 +208,6 @@
align:"center",
dataIndex: 'orderId_dictText'
},
{
title:'下单时间',
align:"center",
dataIndex: 'orderTime',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'订单编号',
align:"center",
@ -424,6 +426,15 @@
}
},
shangpin(record){
this.$router.push({
path: '/ordergoods/OrderGoodsList',
query: { //
'orderid': record.id,
'ischild':record.ischild,
}
});
},
getPcaText(code){
return this.pcaData.getText(code);
},

@ -20,6 +20,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -49,6 +51,8 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class OrderGoodsController extends JeecgController<OrderGoods, IOrderGoodsService> {
@Autowired
private IOrderGoodsService orderGoodsService;
@Autowired
private IZyOrdersService zyOrdersService;
/**
* 分页列表查询
@ -65,11 +69,34 @@ public class OrderGoodsController extends JeecgController<OrderGoods, IOrderGood
public Result<?> queryPageList(OrderGoods orderGoods,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,@RequestParam(name="orderid",required=true)String orderid,@RequestParam(name="ischild",required=true)String ischild) {
if(orderid.equals("undefined")&&ischild.equals("undefined")){
QueryWrapper<OrderGoods> queryWrapper = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
Page<OrderGoods> page = new Page<OrderGoods>(pageNo, pageSize);
IPage<OrderGoods> pageList = orderGoodsService.page(page, queryWrapper);
return Result.OK(pageList);
}else if(ischild.equals("0")){
ZyOrders zyOrders = new ZyOrders();
QueryWrapper<ZyOrders> queryWrapper1 = QueryGenerator.initQueryWrapper(zyOrders, req.getParameterMap());
queryWrapper1.eq("order_id",orderid);
List<ZyOrders> list = zyOrdersService.list(queryWrapper1);
String ids = "";
for (int i = 0 ; i < list.size() ; i++){
ids = ids + list.get(i).getId()+",";
}
QueryWrapper<OrderGoods> queryWrapper2 = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
queryWrapper2.in("orders_id",ids.substring(0,ids.length()-1).split(","));
Page<OrderGoods> page = new Page<OrderGoods>(pageNo, pageSize);
IPage<OrderGoods> pageList = orderGoodsService.page(page, queryWrapper2);
return Result.OK(pageList);
}else {
QueryWrapper<OrderGoods> queryWrapper3 = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
queryWrapper3.eq("orders_id",orderid);
Page<OrderGoods> page = new Page<OrderGoods>(pageNo, pageSize);
IPage<OrderGoods> pageList = orderGoodsService.page(page, queryWrapper3);
return Result.OK(pageList);
}
}
/**

@ -65,8 +65,9 @@ public class OrderGoodsAccessoriesController extends JeecgController<OrderGoodsA
public Result<?> queryPageList(OrderGoodsAccessories orderGoodsAccessories,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String ordergoodsid) {
QueryWrapper<OrderGoodsAccessories> queryWrapper = QueryGenerator.initQueryWrapper(orderGoodsAccessories, req.getParameterMap());
queryWrapper.eq("order_goods_id",ordergoodsid);
Page<OrderGoodsAccessories> page = new Page<OrderGoodsAccessories>(pageNo, pageSize);
IPage<OrderGoodsAccessories> pageList = orderGoodsAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);

@ -65,8 +65,9 @@ public class OrderGoodsFabricController extends JeecgController<OrderGoodsFabric
public Result<?> queryPageList(OrderGoodsFabric orderGoodsFabric,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String ordergoodsid) {
QueryWrapper<OrderGoodsFabric> queryWrapper = QueryGenerator.initQueryWrapper(orderGoodsFabric, req.getParameterMap());
queryWrapper.eq("order_goods_id",ordergoodsid);
Page<OrderGoodsFabric> page = new Page<OrderGoodsFabric>(pageNo, pageSize);
IPage<OrderGoodsFabric> pageList = orderGoodsFabricService.page(page, queryWrapper);
return Result.OK(pageList);

@ -65,8 +65,9 @@ public class OrderGoodsModuleController extends JeecgController<OrderGoodsModule
public Result<?> queryPageList(OrderGoodsModule orderGoodsModule,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String ordergoodsid) {
QueryWrapper<OrderGoodsModule> queryWrapper = QueryGenerator.initQueryWrapper(orderGoodsModule, req.getParameterMap());
queryWrapper.eq("order_goods_id",ordergoodsid);
Page<OrderGoodsModule> page = new Page<OrderGoodsModule>(pageNo, pageSize);
IPage<OrderGoodsModule> pageList = orderGoodsModuleService.page(page, queryWrapper);
return Result.OK(pageList);

Loading…
Cancel
Save