订单管理BUG修改

zhc4dev
Gitea 2 years ago
parent 0ad37f7090
commit fadb13d557
  1. 13
      ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
  2. 14
      ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
  3. 22
      ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue
  4. 106
      ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue
  5. 3
      ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue
  6. 2
      ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
  7. 92
      ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue
  8. 44
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/entity/OrderGoodsJk.java
  9. 188
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
  10. 85
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/ZyOrdersJk.java

@ -1,5 +1,6 @@
<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">
@ -81,6 +82,8 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<!-- <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
@ -93,6 +96,7 @@
</div>
<goods-accessories-modal ref="modalForm" @ok="modalFormOk" @valueChange="valueChange"></goods-accessories-modal>
<ZyAccessoriesFormDetail ref="ZyAccessoriesFormDetail"></ZyAccessoriesFormDetail>
</a-card>
</template>
@ -104,17 +108,20 @@
import GoodsAccessoriesModal from './modules/GoodsAccessoriesModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
import ZyAccessoriesFormDetail from "../erp/accessories/modules/ZyAccessoriesFormDetail";
export default {
name: 'GoodsAccessoriesList',
mixins:[JeecgListMixin, mixinDevice],
components: {
GoodsAccessoriesModal
GoodsAccessoriesModal,
ZyAccessoriesFormDetail
},
data () {
return {
description: '商品辅料表管理页面',
//
biaoTi: '',
columns: [
{
title: '#',
@ -160,6 +167,7 @@
},
created() {
this.getSuperFieldList();
this.biaoTi = this.$route.query.goodsname+"商品辅料管理";
},
computed: {
importExcelUrl: function(){
@ -167,6 +175,9 @@
},
},
methods: {
handleDetail(record){
this.$refs.ZyAccessoriesFormDetail.showModal(record.accessoriesId)
},
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',

@ -1,5 +1,6 @@
<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">
@ -81,6 +82,8 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<!-- <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="handleDetail(record)">详情</a>
@ -93,6 +96,7 @@
</div>
<goods-fabric-modal ref="modalForm" @ok="modalFormOk" @valueChange="valueChange"></goods-fabric-modal>
<ZyFabricFormDetailModel ref="ZyFabricFormDetailModel"></ZyFabricFormDetailModel>
</a-card>
</template>
@ -104,17 +108,20 @@
import GoodsFabricModal from './modules/GoodsFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
import ZyFabricFormDetailModel from "../erp/fabric/modules/ZyFabricFormDetailModel";
export default {
name: 'GoodsFabricList',
mixins:[JeecgListMixin, mixinDevice],
components: {
GoodsFabricModal
GoodsFabricModal,
ZyFabricFormDetailModel
},
data () {
return {
description: '商品面料表管理页面',
//
biaoTi: '',
columns: [
{
title: '#',
@ -160,6 +167,7 @@
},
created() {
this.getSuperFieldList();
this.biaoTi = this.$route.query.goodsname+"商品面料管理";
},
computed: {
importExcelUrl: function(){
@ -167,6 +175,10 @@
},
},
methods: {
handleDetail(record){
this.$refs.ZyFabricFormDetailModel.showModal(record.fabricId,'')
// this.$children[0].showModal(id)
},
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',

@ -1,5 +1,6 @@
<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">
@ -86,22 +87,11 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a @click="handleDetail(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>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
@ -130,6 +120,7 @@
return {
description: '商品模块表管理页面',
//
biaoTi: '',
columns: [
{
title: '#',
@ -185,6 +176,7 @@
},
created() {
this.getSuperFieldList();
this.biaoTi = this.$route.query.goodsname+"商品模块管理";
},
computed: {
importExcelUrl: function(){

@ -4,56 +4,50 @@
<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-col :xl="4" :lg="5" :md="6" :sm="22">
<a-form-item label="订单">
<j-dict-select-tag placeholder="请选择订单" v-model="queryParam.ordersId" dictCode="zy_orders,orders_num,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<!-- <a-col :xl="4" :lg="5" :md="6" :sm="22">
<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-col>-->
<a-col :xl="4" :lg="5" :md="6" :sm="22">
<a-form-item label="商品编号">
<a-input placeholder="请输入商品编号" v-model="queryParam.goodsCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-col :xl="4" :lg="5" :md="6" :sm="22">
<a-form-item label="商品名称">
<a-input placeholder="请输入商品名称" v-model="queryParam.goodsName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="是否定制">
<j-dict-select-tag placeholder="请选择是否定制" v-model="queryParam.customized" dictCode="yn"/>
</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.measureId" dictCode="customer_measure,username,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.recommend" dictCode="yn"/>
<j-dict-select-tag type="radio" placeholder="请选择是否定制" v-model="queryParam.customized" dictCode="yn"/>
</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.status" dictCode="good_status"/>
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="是否推荐">
<j-dict-select-tag type="radio" placeholder="请选择是否推荐" v-model="queryParam.recommend" dictCode="yn"/>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="状态">
<j-dict-select-tag type="radio" placeholder="请选择状态" v-model="queryParam.status" dictCode="good_status"/>
</a-form-item>
</a-col>
<a-col :xl="4" :lg="5" :md="6" :sm="22">
<a-form-item label="顾客">
<j-dict-select-tag placeholder="请选择顾客" v-model="queryParam.measureId" dictCode="customer_measure,username,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>
@ -63,18 +57,18 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <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>
<!-- <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 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-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
</a-dropdown>
</div>
@ -120,22 +114,12 @@
</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>
<!--<a @click="handleEdit(record)">编辑</a>-->
<a @click="handleDetail(record)">详情</a>
<!-- <a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>-->
</span>
</a-table>
@ -179,16 +163,11 @@
align:"center",
dataIndex: 'ordersId_dictText'
},
{
/* {
title:'商品',
align:"center",
dataIndex: 'goodsId_dictText'
},
{
title:'商品数量',
align:"center",
dataIndex: 'goodsNum'
},
},*/
{
title:'商品编号',
align:"center",
@ -200,21 +179,26 @@
dataIndex: 'goodsName'
},
{
title:'商品数量',
align:"center",
dataIndex: 'goodsNum'
},
/* {
title:'商品描述',
align:"center",
dataIndex: 'goodsIntr'
},
},*/
{
title:'是否定制',
align:"center",
dataIndex: 'customized_dictText'
},
{
title:'顾客量体',
title:'顾客',
align:"center",
dataIndex: 'measureId_dictText'
},
{
/* {
title:'商品图片',
align:"center",
dataIndex: 'goodsPicture'
@ -229,21 +213,21 @@
align:"center",
dataIndex: 'goodsVideo',
scopedSlots: {customRender: 'fileSlot'}
},
},*/
{
title:'服装类型',
align:"center",
dataIndex: 'clothsTypeId'
dataIndex: 'clothsTypeId_dictText'
},
{
title:'款式',
align:"center",
dataIndex: 'styleId'
dataIndex: 'styleId_dictText'
},
{
title:'型号',
align:"center",
dataIndex: 'modelId'
dataIndex: 'modelId_dictText'
},
{
title:'单位',
@ -336,7 +320,7 @@
fieldList.push({type:'string',value:'goodsName',text:'商品名称',dictCode:''})
fieldList.push({type:'string',value:'goodsIntr',text:'商品描述',dictCode:''})
fieldList.push({type:'int',value:'customized',text:'是否定制',dictCode:'yn'})
fieldList.push({type:'string',value:'measureId',text:'顾客量体',dictCode:'customer_measure,username,id'})
fieldList.push({type:'string',value:'measureId',text:'顾客',dictCode:'customer_measure,username,id'})
fieldList.push({type:'string',value:'goodsPicture',text:'商品图片',dictCode:''})
fieldList.push({type:'string',value:'defaultPicture',text:'默认图片',dictCode:''})
fieldList.push({type:'string',value:'goodsVideo',text:'商品视频',dictCode:''})

@ -334,6 +334,7 @@
path: '/goodsmodule/GoodsModuleList',
query: { //
'goodsid': record.id,
'goodsname':record.goodsName,
}
});
},
@ -343,6 +344,7 @@
path: '/goodsfabric/GoodsFabricList',
query: { //
'goodsid': record.id,
'goodsname':record.goodsName,
}
});
},
@ -352,6 +354,7 @@
path: '/goodsaccessories/GoodsAccessoriesList',
query: { //
'goodsid': record.id,
'goodsname':record.goodsName,
}
});
},

@ -35,7 +35,7 @@
</a-col>
<a-col :span="24">
<a-form-model-item label="商品描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsIntr">
<a-input v-model="model.goodsIntr" placeholder="请输入商品描述" ></a-input>
<a-textarea v-model="model.goodsIntr" placeholder="请输入商品描述" rows="4"/>
</a-form-model-item>
</a-col>
<a-col :span="24">

@ -4,62 +4,62 @@
<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-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="是否子单">
<j-dict-select-tag placeholder="请选择是否子单" v-model="queryParam.ischild" dictCode="ischild"/>
<j-dict-select-tag type="radio" placeholder="请选择是否子单" v-model="queryParam.ischild" dictCode="ischild"/>
</a-form-item>
</a-col>
<a-col :xl="5" :lg="7" :md="8" :sm="24">
<a-form-item label="订单类型">
<j-dict-select-tag type="radio" placeholder="请选择订单类型" v-model="queryParam.ordersType" dictCode="orders_type"/>
</a-form-item>
</a-col>
<!-- <a-col :xl="4" :lg="7" :md="8" :sm="24">
<a-form-item label="发票客户类型">
<j-dict-select-tag type="radio" placeholder="请选择发票客户类型" v-model="queryParam.invoiceCustomerType" dictCode="invoice_customer_type"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="发票类型">
<j-dict-select-tag type="radio" placeholder="请选择发票类型" v-model="queryParam.invoiceType" dictCode="invoice_type"/>
</a-form-item>
</a-col>-->
<a-col :xl="4" :lg="5" :md="6" :sm="22">
<a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.ordersNum"></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.ordersType" dictCode="orders_type"/>
</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="支付方式">
<j-dict-select-tag placeholder="请选择支付方式" v-model="queryParam.paymentMethod" dictCode="payment_method"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
</a-col>-->
<a-col :xl="3" :lg="5" :md="4" :sm="12">
<a-form-item label="支付状态">
<j-dict-select-tag placeholder="请选择支付状态" v-model="queryParam.paymentStatus" dictCode="payment_status"/>
</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-input placeholder="请输入账号/卡号" v-model="queryParam.accountNo"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
</a-col>-->
<a-col :xl="4" :lg="5" :md="6" :sm="22">
<a-form-item label="城市">
<j-area-linkage type="cascader" v-model="queryParam.cityId" placeholder="请选择省市区"/>
</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.invoiceCustomerType" dictCode="invoice_customer_type"/>
</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.invoiceType" dictCode="invoice_type"/>
</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-input placeholder="请输入公户账号" v-model="queryParam.accountNumber"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
</a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="物流企业">
<j-select-depart placeholder="请选择物流企业" v-model="queryParam.logisticsEnterprisesId"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
</a-col>-->
<a-col :xl="3" :lg="5" :md="4" :sm="12">
<a-form-item label="交付状态">
<j-dict-select-tag placeholder="请选择交付状态" v-model="queryParam.deliveryStatus" dictCode="delivery_status"/>
</a-form-item>
@ -77,13 +77,13 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <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>
<!--<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>
@ -141,12 +141,12 @@
<a-divider type="vertical" />
<a @click="shengchan(record)">生产</a>
<a-divider type="vertical" />
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<!-- <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />-->
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
<a-popconfirm title="确定撤销订单吗?" @confirm="() => handleDelete(record.id)">
<a>撤销订单</a>
</a-popconfirm>
</span>
@ -251,17 +251,17 @@
align:"center",
dataIndex: 'goodsQuantity'
},
{
/* {
title:'支付方式',
align:"center",
dataIndex: 'paymentMethod_dictText'
},
},*/
{
title:'支付状态',
align:"center",
dataIndex: 'paymentStatus_dictText'
},
{
/* {
title:'账号/卡号',
align:"center",
dataIndex: 'accountNo'
@ -270,7 +270,7 @@
title:'开户银行',
align:"center",
dataIndex: 'bankDeposit'
},
},*/
{
title:'支付时间',
align:"center",
@ -285,7 +285,7 @@
dataIndex: 'cityId',
scopedSlots: {customRender: 'pcaSlot'}
},
{
/* {
title:'地址',
align:"center",
dataIndex: 'address'
@ -294,7 +294,7 @@
title:'邮编',
align:"center",
dataIndex: 'zipCode'
},
},*/
{
title:'收货人',
align:"center",
@ -305,7 +305,7 @@
align:"center",
dataIndex: 'mobile'
},
{
/* {
title:'发票客户类型',
align:"center",
dataIndex: 'invoiceCustomerType_dictText'
@ -324,13 +324,13 @@
title:'开票地址',
align:"center",
dataIndex: 'addressBilling'
},
},*/
{
title:'电话',
align:"center",
dataIndex: 'telephone'
},
{
/* {
title:'公户开户行',
align:"center",
dataIndex: 'bankPublic'
@ -339,7 +339,7 @@
title:'公户账号',
align:"center",
dataIndex: 'accountNumber'
},
},*/
{
title:'销售门店',
align:"center",
@ -350,11 +350,11 @@
align:"center",
dataIndex: 'salespersonId_dictText'
},
{
/* {
title:'物流企业',
align:"center",
dataIndex: 'logisticsEnterprisesId_dictText'
},
},*/
{
title:'交付状态',
align:"center",

@ -0,0 +1,44 @@
package org.jeecg.modules.demo.ordergoods.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 订单商品表
* @Author: jeecg-boot
* @Date: 2022-12-28
* @Version: V1.0
*/
@Data
public class OrderGoodsJk implements Serializable {
private static final long serialVersionUID = 1L;
/**商品id*/
@Excel(name = "商品id", width = 15, dictTable = "zy_goods", dicText = "goods_name", dicCode = "id")
@Dict(dictTable = "zy_goods", dicText = "goods_name", dicCode = "id")
@ApiModelProperty(value = "商品id")
private java.lang.String goodsId;
/**商品数量*/
@Excel(name = "商品数量", width = 15)
@ApiModelProperty(value = "商品数量")
private java.lang.Integer goodsNum;
/**顾客量体id*/
@Excel(name = "顾客量体id", width = 15, dictTable = "customer_measure", dicText = "username", dicCode = "id")
@Dict(dictTable = "customer_measure", dicText = "username", dicCode = "id")
@ApiModelProperty(value = "顾客量体id")
private java.lang.String measureId;
}

@ -1,6 +1,7 @@
package org.jeecg.modules.demo.zyorders.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -12,9 +13,31 @@ import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
import org.jeecg.modules.demo.goodsfabric.service.IGoodsFabricService;
import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
import org.jeecg.modules.demo.goodsmodule.service.IGoodsModuleService;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories;
import org.jeecg.modules.demo.ordergoodsaccessories.service.IOrderGoodsAccessoriesService;
import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric;
import org.jeecg.modules.demo.ordergoodsfabric.service.IOrderGoodsFabricService;
import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
import org.jeecg.modules.demo.ordergoodsmodule.service.IOrderGoodsModuleService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.service.IZyGoodsService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -22,6 +45,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -49,10 +76,147 @@ import org.jeecg.common.aspect.annotation.AutoLog;
@RequestMapping("/zyorders/zyOrders")
@Slf4j
public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersService> {
@Autowired
private IZyOrdersService zyOrdersService;
@Autowired
private IZyOrdersService zyOrdersService;
@Autowired
private IOrderGoodsService orderGoodsService;
@Autowired
private ICustomerReceivingAddressService iCustomerReceivingAddressService;
@Autowired
private ICustomerInvoiceService iCustomerInvoiceService;
@Autowired
private IZyGoodsService zyGoodsService;
@Autowired
private IOrderGoodsModuleService orderGoodsModuleService;
@Autowired
private IOrderGoodsFabricService orderGoodsFabricService;
@Autowired
private IOrderGoodsAccessoriesService orderGoodsAccessoriesService;
@Autowired
private IGoodsModuleService goodsModuleService;
@Autowired
private IGoodsFabricService goodsFabricService;
@Autowired
private IGoodsAccessoriesService goodsAccessoriesService;
/**
* 订单和订单商品接口
*
* @param
* @return
*/
@AutoLog(value = "订单和订单商品接口")
@ApiOperation(value="订单和订单商品接口", notes="订单和订单商品接口")
@GetMapping(value = "/orderJk")
public Result<?> orderJk(ZyOrdersJk zyOrdersJk,List<OrderGoodsJk> orderGoodsJkList,HttpServletRequest req) {
Double actual_payment = 0.00;
Double money = 0.00;
for(int i = 0 ; i < orderGoodsJkList.size() ; i++){
ZyGoods zyGoods = zyGoodsService.getById(orderGoodsJkList.get(i).getGoodsId());
money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum();
actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum();
}
ZyOrders zyOrders = new ZyOrders();
zyOrders.setIschild(0);
zyOrders.setOrderTime(new Date());
zyOrders.setOrdersNum(getOrdersNum());
zyOrders.setMoney(money);
zyOrders.setFreight(zyOrdersJk.getFreight());
zyOrders.setPromotionPrice(money-actual_payment);
zyOrders.setActualPayment(actual_payment);
zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime());
zyOrders.setOrdersType(zyOrdersJk.getOrdersType());
zyOrders.setUserId(zyOrdersJk.getUserId());
zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
CustomerReceivingAddress customerReceivingAddress = iCustomerReceivingAddressService.getById(zyOrdersJk.getAddressId());
zyOrders.setCityId(customerReceivingAddress.getCityId());
zyOrders.setAddress(customerReceivingAddress.getAddress());
zyOrders.setZipCode(customerReceivingAddress.getZipCode());
zyOrders.setReceiver(zyOrdersJk.getReceiver());
zyOrders.setMobile(customerReceivingAddress.getMobile());
CustomerInvoice customerInvoice = iCustomerInvoiceService.getById(zyOrdersJk.getInvoiceId());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber());
zyOrders.setAddressBilling(customerInvoice.getAddress());
zyOrders.setTelephone(customerInvoice.getTelephone());
zyOrders.setBankPublic(customerInvoice.getBankDeposit());
zyOrders.setAccountNumber(customerInvoice.getAccountNumber());
zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId());
zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());
zyOrders.setDeliveryStatus(0);
zyOrdersService.save(zyOrders);
for(int j = 0 ; j < orderGoodsJkList.size() ; j++){
ZyGoods zyGoods = zyGoodsService.getById(orderGoodsJkList.get(j).getGoodsId());
OrderGoods orderGoods = new OrderGoods();
orderGoods.setOrdersId(zyOrders.getId());
orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId());
orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setGoodsCode(zyGoods.getGoodsCode());
orderGoods.setGoodsName(zyGoods.getGoodsName());
orderGoods.setGoodsIntr(zyGoods.getGoodsIntr());
orderGoods.setCustomized(zyGoods.getCustomized());
orderGoods.setMeasureId(orderGoodsJkList.get(j).getMeasureId());
orderGoods.setGoodsPicture(zyGoods.getGoodsPicture());
orderGoods.setDefaultPicture(zyGoods.getDefaultPicture());
orderGoods.setGoodsVideo(zyGoods.getGoodsVideo());
orderGoods.setClothsTypeId(zyGoods.getClothsTypeId());
orderGoods.setStyleId(zyGoods.getStyleId());
orderGoods.setModelId(zyGoods.getModelId());
orderGoods.setUnit(zyGoods.getUnit());
orderGoods.setNumber(zyGoods.getNumber());
orderGoods.setUnitPrice(zyGoods.getUnitPrice());
orderGoods.setDiscount(zyGoods.getDiscount());
orderGoods.setPromotionPrice(zyGoods.getPromotionPrice());
orderGoods.setRecommend(zyGoods.getRecommend());
orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin());
orderGoods.setStatus(zyGoods.getStatus());
orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoodsService.save(orderGoods);
GoodsModule goodsModule = new GoodsModule();
QueryWrapper<GoodsModule> queryWrapperzsm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
queryWrapperzsm.eq("goods_id",zyGoods.getId());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List<GoodsModule> listzsm = goodsModuleService.list(queryWrapperzsm);
for (int k = 0 ; k < listzsm.size() ; k++){
OrderGoodsModule orderGoodsModule = new OrderGoodsModule();
orderGoodsModule.setOrderGoodsId(orderGoods.getId());
orderGoodsModule.setGoodsId(zyGoods.getId());
orderGoodsModule.setStyleId(zyGoods.getStyleId());
orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId());
orderGoodsModule.setModuleId(listzsm.get(k).getModuleId());
orderGoodsModuleService.save(orderGoodsModule);
}
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrapperzsf.eq("goods_id",zyGoods.getId());
List<GoodsFabric> listzsf = goodsFabricService.list(queryWrapperzsf);
for (int o = 0 ; o < listzsf.size() ; o++){
OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric();
orderGoodsFabric.setOrderGoodsId(orderGoods.getId());
orderGoodsFabric.setGoodsId(zyGoods.getId());
orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId());
orderGoodsFabricService.save(orderGoodsFabric);
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperzsa.eq("goods_id",zyGoods.getId());
List<GoodsAccessories> listzsa = goodsAccessoriesService.list(queryWrapperzsa);
for (int p = 0 ; p < listzsa.size() ; p++){
OrderGoodsAccessories orderGoodsAccessories = new OrderGoodsAccessories();
orderGoodsAccessories.setOrderGoodsId(orderGoods.getId());
orderGoodsAccessories.setGoodsId(zyGoods.getId());
orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId());
orderGoodsAccessoriesService.save(orderGoodsAccessories);
}
}
return Result.OK("成功");
}
/**
* 分页列表查询
@ -114,8 +278,10 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
@ApiOperation(value="订单基本信息管理-通过id删除", notes="订单基本信息管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyOrdersService.removeById(id);
return Result.OK("删除成功!");
ZyOrders zyOrders = zyOrdersService.getById(id);
zyOrders.setDeliveryStatus(9);
zyOrdersService.updateById(zyOrders);
return Result.OK("撤销订单成功!");
}
/**
@ -128,8 +294,13 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
@ApiOperation(value="订单基本信息管理-批量删除", notes="订单基本信息管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyOrdersService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
String str[] = ids.split(",");
for (int i = 0 ; i < str.length ; i ++){
ZyOrders zyOrders = zyOrdersService.getById(str[i]);
zyOrders.setDeliveryStatus(9);
zyOrdersService.updateById(zyOrders);
}
return Result.OK("批量撤销订单成功!");
}
/**
@ -175,7 +346,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
@AutoLog(value = "生成订单编号")
@ApiOperation(value="生成订单编号", notes="生成订单编号")
@GetMapping(value = "/getOrdersNum")
public Result<?> getOrdersNum() {
public String getOrdersNum() {
String mrstr = "000000000000000000";
int listsize = zyOrdersService.count();
int strsize = listsize+1;
@ -183,7 +354,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String OrdersNum = substr+str;
return Result.OK(OrdersNum);
return OrdersNum;
}
/**
@ -216,6 +387,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
ZyOrders zo = new ZyOrders();
zo = zyOrders;
zo.setId(null);
zo.setOrdersNum(getOrdersNum());
zo.setFreight(Double.parseDouble("0"));
zo.setIschild(1);
zo.setOrderId(id);

@ -0,0 +1,85 @@
package org.jeecg.modules.demo.zyorders.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 订单基本信息
* @Author: jeecg-boot
* @Date: 2022-12-26
* @Version: V1.0
*/
@Data
public class ZyOrdersJk implements Serializable {
private static final long serialVersionUID = 1L;
/**运费*/
@Excel(name = "运费", width = 15)
@ApiModelProperty(value = "运费")
private java.lang.Double freight;
/**交货期*/
@Excel(name = "交货期", width = 15)
@ApiModelProperty(value = "交货期")
private java.lang.Integer deliveryTime;
/**订单类型*/
@Excel(name = "订单类型", width = 15, dicCode = "orders_type")
@Dict(dicCode = "orders_type")
@ApiModelProperty(value = "订单类型")
private java.lang.Integer ordersType;
/**顾客id*/
@Excel(name = "顾客id", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "顾客id")
private java.lang.String userId;
/**商品条目数量*/
@Excel(name = "商品条目数量", width = 15)
@ApiModelProperty(value = "商品条目数量")
private java.lang.Integer goodsQuantity;
/**顾客地址id*/
@Excel(name = "顾客地址id", width = 15)
@ApiModelProperty(value = "顾客地址id")
private java.lang.String addressId;
/**收货人*/
@Excel(name = "收货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "收货人")
private java.lang.String receiver;
/**顾客发票id*/
@Excel(name = "顾客发票id", width = 15)
@ApiModelProperty(value = "顾客发票id")
private java.lang.String invoiceId;
/**销售门店*/
@Excel(name = "销售门店", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "销售门店")
private java.lang.String salesEnterpriseId;
/**销售员*/
@Excel(name = "销售员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "销售员")
private java.lang.String salespersonId;
/**物流企业*/
@Excel(name = "物流企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "物流企业")
private java.lang.String logisticsEnterprisesId;
/**交付状态*/
@Excel(name = "交付状态", width = 15, dicCode = "delivery_status")
@Dict(dicCode = "delivery_status")
@ApiModelProperty(value = "交付状态")
private java.lang.Integer deliveryStatus;
}
Loading…
Cancel
Save