From 47d47722b1c4cbed9ce921cfa36bd30308a3c956 Mon Sep 17 00:00:00 2001 From: DIYC <877965299@qq.com> Date: Mon, 26 Mar 2018 15:59:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B0=8F=E7=A8=8B?= =?UTF-8?q?=E5=BA=8FPC=E7=AB=AF=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BA=97=E9=93=BA=E5=90=8D=E7=A7=B0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=88=97=E8=A1=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=95=86=E5=93=81=E5=BA=97=E9=93=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/api/GoodsManageController.java | 6 + .../com/xsmart/goods/dao/GoodsManageDao.java | 8 ++ .../goods/services/GoodsManageService.java | 16 +++ .../src/components/goods/goodsManage/index.js | 17 ++- webAdmin/src/models/goodsManage.js | 23 +++- .../routes/goods/goodsManage/GoodsManage.js | 114 ++++++++++++++++-- webAdmin/src/services/goods.js | 7 ++ 7 files changed, 173 insertions(+), 18 deletions(-) diff --git a/goods/src/main/java/com/xsmart/goods/api/GoodsManageController.java b/goods/src/main/java/com/xsmart/goods/api/GoodsManageController.java index 7819fc20..eca1fe8f 100644 --- a/goods/src/main/java/com/xsmart/goods/api/GoodsManageController.java +++ b/goods/src/main/java/com/xsmart/goods/api/GoodsManageController.java @@ -28,6 +28,12 @@ public class GoodsManageController { return goodsManageService.queryGoods(requestBean); } + @RequestMapping(value = "/v1/GoodsManageService/queryShopList") + @ResponseBody + public Object queryShopList(@ModelAttribute RequestBean requestBean, HttpServletRequest request){ + return goodsManageService.queryShopList(requestBean); + } + @RequestMapping(value = "/v1/GoodsManageService/addGoods", method= RequestMethod.POST) @ResponseBody public Object addGoods(@ModelAttribute RequestBean requestBean,HttpServletRequest httpServletRequest) { diff --git a/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java b/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java index 0e027867..eeba02d7 100644 --- a/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java +++ b/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java @@ -487,4 +487,12 @@ public interface GoodsManageDao { "xiangou_num = #{goodsMap.xiangou_num} " + "where goods_id = #{goodsMap.goods_id}") int modGoodSI(@Param("goodsMap") Map goodsMap); + + /** + * 查询开启状态的店铺 + * @return + */ + @Select("select id, shop_name from seller_shopInfo " + + "where status = 1 and audit_status = 1 GROUP BY shop_name") + List> queryShopList(@Param("content") String content); } diff --git a/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java b/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java index b8d99d2e..ff53a053 100644 --- a/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java +++ b/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java @@ -39,10 +39,12 @@ public class GoodsManageService { Integer goodsId=requestBean.getRequestParamInteger("goods_id"); String goodsSn=requestBean.getRequestParamString("goods_sn"); String goodsName=requestBean.getRequestParamString("goods_name"); + Integer sellerId = requestBean.getRequestParamInteger("sellerId"); Map goodsMap=new HashMap<>(); goodsMap.put("goods_id",goodsId); goodsMap.put("goods_sn",goodsSn); goodsMap.put("goods_name",goodsName); + goodsMap.put("sellerId", sellerId); Page> page=new Page<>(currentPage,pageSize); page.setRecords(goodsManageDao.queryGoods(page,goodsMap)); responseBean.addResultPageItem("goodsManage",page); @@ -62,6 +64,20 @@ public class GoodsManageService { return responseBean; } + /** + * 查询开启状态的店铺 + * @param requestBean + * @return + */ + public ResponseBean queryShopList(RequestBean requestBean){ + ResponseBean responseBean = requestBean.getResponseBean(); + String content = requestBean.getRequestParamString("content"); + List> shopList = goodsManageDao.queryShopList(content); + responseBean.addResultItem("shopList", shopList); + responseBean.setResult(ResultConstant.SUCCESS); + return responseBean; + } + /** * 发布商品 diff --git a/webAdmin/src/components/goods/goodsManage/index.js b/webAdmin/src/components/goods/goodsManage/index.js index c00d7653..849c36fc 100644 --- a/webAdmin/src/components/goods/goodsManage/index.js +++ b/webAdmin/src/components/goods/goodsManage/index.js @@ -67,13 +67,20 @@ export default class GoodsManageTable extends PureComponent{ {val} } + },{ + title: '店铺名称', dataIndex:'from_seller_name', width:'3%', + render: (val, record) => { + return + {val} + + } },{ title:'所属分类',dataIndex:'cat_name',width:'3%', - render: (val, record) => { - return - {val} - - } + render: (val, record) => { + return + {val} + + } },{ title:'用户名称',dataIndex:'user_name',width:'2%', render: (val, record) => { diff --git a/webAdmin/src/models/goodsManage.js b/webAdmin/src/models/goodsManage.js index 49cdc33a..185c4725 100644 --- a/webAdmin/src/models/goodsManage.js +++ b/webAdmin/src/models/goodsManage.js @@ -4,7 +4,7 @@ import { queryGoods, addGoods, modGoods, delGoods, checkGoodsSn, querySellerShop, queryGoodsPhoto, queryGoodsSingle, queryGoodComments, queryMidComments, queryNativeComments, modGoodsCat, modGoodsGI, modGoodsSI, - modGoodsAttr + modGoodsAttr,queryShopList } from '../services/goods'; export default { namespace:'goodsManage', @@ -19,7 +19,7 @@ export default { } }, effects:{ - * fetch({payload},{put,call}){ + * fetch({payload, callback},{put,call}){ yield put({ type:'GoodsManageLoading', payload:true, @@ -33,7 +33,26 @@ export default { type:'GoodsManageLoading', payload:false, }) + if (callback) callback(response); }, + + *queryShopList({payload, callback}, {put, call}){ + yield put({ + type:'GoodsManageLoading', + payload:true, + }); + const response=yield call(queryShopList,payload); + yield put({ + type:'handleGoodsManage', + payload:response, + }) + yield put({ + type:'GoodsManageLoading', + payload:false, + }) + if (callback) callback(response); + }, + * add({payload, callback},{put,call}){ yield put({ type:'GoodsManageLoading', diff --git a/webAdmin/src/routes/goods/goodsManage/GoodsManage.js b/webAdmin/src/routes/goods/goodsManage/GoodsManage.js index be8af382..db834b9e 100644 --- a/webAdmin/src/routes/goods/goodsManage/GoodsManage.js +++ b/webAdmin/src/routes/goods/goodsManage/GoodsManage.js @@ -10,7 +10,8 @@ import { Select, Button, Modal, - message + message, + AutoComplete } from 'antd'; import moment from 'moment'; import PageHeaderLayout from '../../../layouts/PageHeaderLayout'; @@ -19,6 +20,7 @@ import GoodsManageTable from '../../../components/goods/goodsManage'; import GoodsEdit from '../../../components/goods/goodsManage/GoodsEdit'; import RecObjectAdd from '../../../components/Operation/RecObject/RecObjectAdd' import {powerControl} from '../../../utils/powerControl'; +import data from "../../../common/nav"; const AuthButton = powerControl(Button); const FormItem = Form.Item; const {Option} = Select; @@ -35,10 +37,34 @@ export default class GoodsManage extends PureComponent{ record: {}, recObjectVisible:false, returnPath:{}, - } - componentDidMount(){ + dataSourceList:{}, + dataSource: [], + data:{}, + }; + componentDidMount(){ this.props.dispatch({ type:'goodsManage/fetch', + callback: (response) => { + if (response.resultData.goodsManage !== null){ + if (response.resultData.goodsManage.list.length > 0){ + this.setState({ + data: response.resultData.goodsManage, + }); + }else { + message.success('没有数据!'); + } + } + } + }); + this.props.dispatch({ + type:'goodsManage/queryShopList', + callback: (response) => { + if (response.resultData.shopList !== null && response.resultData.shopList.length > 0){ + this.setState({ + dataSourceList: response.resultData.shopList, + }); + } + } }); } handleFormReset = () => { @@ -56,9 +82,20 @@ export default class GoodsManage extends PureComponent{ dispatch({ type: 'goodsManage/fetch', payload: fieldsValue, + callback: (response) => { + if (response.resultData.goodsManage !== null){ + if (response.resultData.goodsManage.list.length > 0){ + this.setState({ + data: response.resultData.goodsManage, + }); + }else { + message.success('没有数据!'); + } + } + } }); }); - } + }; renderForm() { return this.renderSimpleForm(); }; @@ -74,12 +111,29 @@ export default class GoodsManage extends PureComponent{ }, }); dispatch(routerRedux.push('/goods/addGoods')); - } + }; handleModalVisible = (flag) => { this.setState({ modalVisible: !!flag, }); - } + }; + + autoCHandleSearch = (value) =>{ + const {dataSourceList} = this.state; + let data = []; + if(!value){ + data = []; + }else { + dataSourceList.map((item) =>{ + if(item.shop_name.indexOf(value)!==-1){ + data.push(item); + } + }); + } + this.setState({ + dataSource:data, + }); + }; /** * 推荐按钮事件 @@ -178,6 +232,17 @@ export default class GoodsManage extends PureComponent{ dispatch({ type: 'goodsManage/fetch', payload: params, + callback: (response) => { + if (response.resultData.goodsManage !== null){ + if (response.resultData.goodsManage.list.length > 0){ + this.setState({ + data: response.resultData.goodsManage, + }); + }else { + message.success('没有数据!'); + } + } + } }); } handleGoodsListChange = (pagination, filtersArg, sorter) => { @@ -203,29 +268,56 @@ export default class GoodsManage extends PureComponent{ dispatch({ type: 'goodsManage/fetch', payload: params, + callback: (response) => { + if (response.resultData.goodsManage !== null){ + if (response.resultData.goodsManage.list.length > 0){ + this.setState({ + data: response.resultData.goodsManage, + }); + }else { + message.success('没有数据!'); + } + } + } }); } renderSimpleForm() { const{form}=this.props; + const {dataSource}=this.state; const {getFieldDecorator} = form; + const children = dataSource.map((item) => { + return ; + }); return (
- + + + {getFieldDecorator('sellerId')( + + {children} + + )} + + + {getFieldDecorator('goods_sn')( )} - + {getFieldDecorator('goods_name')( )} - + 查询 重置 @@ -236,8 +328,8 @@ export default class GoodsManage extends PureComponent{ ); }; render(){ - const {recObjectVisible,editType,record} = this.state; - const {goodsManage:{data,loading:ruleLoading}}=this.props; + const {recObjectVisible,editType,record, data} = this.state; + const {goodsManage:{loading:ruleLoading}}=this.props; return (
diff --git a/webAdmin/src/services/goods.js b/webAdmin/src/services/goods.js index fdc5fb52..825f367e 100644 --- a/webAdmin/src/services/goods.js +++ b/webAdmin/src/services/goods.js @@ -192,6 +192,13 @@ export async function queryGoods(params){ }); } +export async function queryShopList(params){ + return requeste('GoodsManageService','queryShopList',{ + method:'POST', + body:params, + }); +} + export async function addGoods(params){ return requeste('GoodsManageService','addGoods',{ method:'POST', -- Gitee From b9f93ecf875b48aa7ac8a6ac0079551f3c94416d Mon Sep 17 00:00:00 2001 From: DIYC <877965299@qq.com> Date: Mon, 26 Mar 2018 17:14:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E5=95=86?= =?UTF-8?q?=E5=93=81=E9=A1=B5=E9=9D=A2=E5=BA=97=E9=93=BA=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xsmart/goods/dao/GoodsManageDao.java | 7 ++++--- .../goods/services/GoodsManageService.java | 6 +++++- .../src/components/goods/goodsManage/index.js | 5 ----- .../src/routes/goods/goodsManage/GoodsManage.js | 16 +++++++++++----- 4 files changed, 20 insertions(+), 14 deletions(-) diff --git a/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java b/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java index eeba02d7..8046fbe5 100644 --- a/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java +++ b/goods/src/main/java/com/xsmart/goods/dao/GoodsManageDao.java @@ -492,7 +492,8 @@ public interface GoodsManageDao { * 查询开启状态的店铺 * @return */ - @Select("select id, shop_name from seller_shopInfo " + - "where status = 1 and audit_status = 1 GROUP BY shop_name") - List> queryShopList(@Param("content") String content); + @Select("select t1.id, t2.shop_name from infu_admin_seller_rel t1 " + + "LEFT JOIN seller_shopinfo t2 on t1.id = t2.id " + + "where t1.user_id=#{shopMap.user_id}") + List> queryShopList(@Param("shopMap") Map shopMap); } diff --git a/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java b/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java index ff53a053..29ba96ce 100644 --- a/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java +++ b/goods/src/main/java/com/xsmart/goods/services/GoodsManageService.java @@ -72,7 +72,11 @@ public class GoodsManageService { public ResponseBean queryShopList(RequestBean requestBean){ ResponseBean responseBean = requestBean.getResponseBean(); String content = requestBean.getRequestParamString("content"); - List> shopList = goodsManageDao.queryShopList(content); + Integer userId = requestBean.getRequestParamInteger("user_id"); + Map shopMap = new HashMap<>(); + shopMap.put("user_id", userId); + shopMap.put("content", content); + List> shopList = goodsManageDao.queryShopList(shopMap); responseBean.addResultItem("shopList", shopList); responseBean.setResult(ResultConstant.SUCCESS); return responseBean; diff --git a/webAdmin/src/components/goods/goodsManage/index.js b/webAdmin/src/components/goods/goodsManage/index.js index 849c36fc..5e23a4f5 100644 --- a/webAdmin/src/components/goods/goodsManage/index.js +++ b/webAdmin/src/components/goods/goodsManage/index.js @@ -69,11 +69,6 @@ export default class GoodsManageTable extends PureComponent{ } },{ title: '店铺名称', dataIndex:'from_seller_name', width:'3%', - render: (val, record) => { - return - {val} - - } },{ title:'所属分类',dataIndex:'cat_name',width:'3%', render: (val, record) => { diff --git a/webAdmin/src/routes/goods/goodsManage/GoodsManage.js b/webAdmin/src/routes/goods/goodsManage/GoodsManage.js index db834b9e..1bcb34e1 100644 --- a/webAdmin/src/routes/goods/goodsManage/GoodsManage.js +++ b/webAdmin/src/routes/goods/goodsManage/GoodsManage.js @@ -37,7 +37,7 @@ export default class GoodsManage extends PureComponent{ record: {}, recObjectVisible:false, returnPath:{}, - dataSourceList:{}, + dataSourceList:[], dataSource: [], data:{}, }; @@ -56,8 +56,12 @@ export default class GoodsManage extends PureComponent{ } } }); + const userObj=JSON.parse(localStorage.getItem("userInfoState")); this.props.dispatch({ type:'goodsManage/queryShopList', + payload: { + user_id: userObj.userInfo.user_id, + }, callback: (response) => { if (response.resultData.shopList !== null && response.resultData.shopList.length > 0){ this.setState({ @@ -125,8 +129,10 @@ export default class GoodsManage extends PureComponent{ data = []; }else { dataSourceList.map((item) =>{ - if(item.shop_name.indexOf(value)!==-1){ - data.push(item); + if (item.shop_name !== null){ + if(item.shop_name.indexOf(value)!==-1){ + data.push(item); + } } }); } @@ -283,7 +289,7 @@ export default class GoodsManage extends PureComponent{ } renderSimpleForm() { const{form}=this.props; - const {dataSource}=this.state; + const {dataSource, dataSourceList}=this.state; const {getFieldDecorator} = form; const children = dataSource.map((item) => { return ; @@ -295,7 +301,7 @@ export default class GoodsManage extends PureComponent{ {getFieldDecorator('sellerId')( {children} -- Gitee From 545681301283cf200082eb1f34a74f49c66b4a24 Mon Sep 17 00:00:00 2001 From: pansheng0401 <602706154@qq.com> Date: Tue, 27 Mar 2018 17:59:47 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=97=AE=E9=A2=98=20=E8=A7=A3=E5=86=B3=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E5=8F=82=E6=95=B0=E6=96=B0=E5=A2=9E=E4=B8=A4=E6=AC=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E8=A7=A3=E5=86=B3=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=97=E8=A1=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xsmart/oa/dao/SystemParamConfigDAO.java | 4 ++- .../oa/dao/SystemPermissionListDAO.java | 2 +- .../services/SystemPermissionListService.java | 16 +++------- .../order/services/OrderFillsService.java | 2 +- webAdmin/src/components/Order/index.js | 1 - .../SystemParamConfig/SystemEditAndAdd.js | 2 +- .../src/components/SystemParamConfig/index.js | 3 +- webAdmin/src/models/goodsCategory.js | 1 - webAdmin/src/models/orderManage.js | 2 -- webAdmin/src/models/systemconfig.js | 3 ++ webAdmin/src/routes/Admin/SysParamConfig.js | 4 +++ .../src/routes/Admin/SysPermissionList.js | 6 +++- .../routes/Order/OrderManage/OptionResult.js | 32 ++++++++++++++----- .../routes/Order/OrderManage/OrderManage.js | 10 ++++-- .../routes/Order/OrderManage/orderDetails.js | 21 ++++++------ 15 files changed, 68 insertions(+), 41 deletions(-) diff --git a/oa/src/main/java/com/xsmart/oa/dao/SystemParamConfigDAO.java b/oa/src/main/java/com/xsmart/oa/dao/SystemParamConfigDAO.java index 22f2c6fa..d831ab8b 100644 --- a/oa/src/main/java/com/xsmart/oa/dao/SystemParamConfigDAO.java +++ b/oa/src/main/java/com/xsmart/oa/dao/SystemParamConfigDAO.java @@ -18,7 +18,9 @@ public interface SystemParamConfigDAO { @Insert("insert into cfgs_sys_param(param_code,param_name,param_group_code,param_group_text,param_value,param_status)values(#{paramCode},#{paramName},#{paramGroupCode},#{paramGroupText},#{paramValue},#{paramStatus})") public int insertSystemParam(@Param("paramCode")String paramCode,@Param("paramName")String paramName,@Param("paramGroupCode")String paramGroupCode,@Param("paramGroupText")String paramGroupText,@Param("paramValue")String paramValue,@Param("paramStatus")Integer paramStatus); - @Select("") + @Select("") List>queryCfgsSysParam(Pagination page,@Param("paramCode")String paramCode,@Param("paramName")String paramName); diff --git a/oa/src/main/java/com/xsmart/oa/dao/SystemPermissionListDAO.java b/oa/src/main/java/com/xsmart/oa/dao/SystemPermissionListDAO.java index 28ecff9c..0e947036 100644 --- a/oa/src/main/java/com/xsmart/oa/dao/SystemPermissionListDAO.java +++ b/oa/src/main/java/com/xsmart/oa/dao/SystemPermissionListDAO.java @@ -22,7 +22,7 @@ public interface SystemPermissionListDAO { /** - * @param catId + * @param actionId * @return */ @Select("") diff --git a/oa/src/main/java/com/xsmart/oa/services/SystemPermissionListService.java b/oa/src/main/java/com/xsmart/oa/services/SystemPermissionListService.java index 529af240..f9186373 100644 --- a/oa/src/main/java/com/xsmart/oa/services/SystemPermissionListService.java +++ b/oa/src/main/java/com/xsmart/oa/services/SystemPermissionListService.java @@ -31,32 +31,26 @@ public class SystemPermissionListService { systemPermissionListMap.put("action_desc",action_desc); ResponseBean responseBean = requestBean.getResponseBean(); Page> page = new Page<>(currentPage,pageSize); + List> list = new ArrayList<>(); if (action_code!=null || action_desc!=null){ - List> list = systemPermissionListDAO.querySystemPermissionListSecond(page, systemPermissionListMap); + list = systemPermissionListDAO.querySystemPermissionListSecond(page, systemPermissionListMap); Map listMap = new HashMap<>(); - - page.setRecords(list); getSystemPermissionListChildren3(list,null); - System.out.println(list); if(list.size()>0){ Iterator> itList = list.listIterator(); listMap = itList.next(); String parentNode=queryParentNode(MapUtils.getInteger(listMap,"ACTION_ID"),null); - - System.out.println(parentNode); listMap.put("parent_node",parentNode); list.clear(); list.add(listMap); - System.out.println("list="+list); } - page.setRecords(list); // getSystemPermissionListChildren(page.getRecords()); }else{ - page.setRecords(systemPermissionListDAO.querySystemPermissionList(page, systemPermissionListMap)); - getSystemPermissionListChildren(page.getRecords()); + list = systemPermissionListDAO.querySystemPermissionList(page, systemPermissionListMap); + getSystemPermissionListChildren(list); } - + page.setRecords(list); responseBean.addResultPageItem("systemPermissionList",page); responseBean.setResult(ResultConstant.SUCCESS); return responseBean; diff --git a/order/src/main/java/com/xsmart/order/services/OrderFillsService.java b/order/src/main/java/com/xsmart/order/services/OrderFillsService.java index 803cd2c6..1e5d82eb 100644 --- a/order/src/main/java/com/xsmart/order/services/OrderFillsService.java +++ b/order/src/main/java/com/xsmart/order/services/OrderFillsService.java @@ -129,7 +129,7 @@ public class OrderFillsService { public ResponseBean queryOrderDetail(RequestBean requestBean) { ResponseBean responseBean = requestBean.getResponseBean(); int currentPage = requestBean.getRequestParamInteger("currentPage", 1); - int pageSize = requestBean.getRequestParamInteger("pageSize", 3); + int pageSize = requestBean.getRequestParamInteger("pageSize", 5); Page> page = new Page<>(currentPage, pageSize); Integer orderId = requestBean.getRequestParamInteger("order_id"); page.setRecords(orderFillsDao.queryGoods(page,orderId)); diff --git a/webAdmin/src/components/Order/index.js b/webAdmin/src/components/Order/index.js index 3272ff31..e8a13a7e 100644 --- a/webAdmin/src/components/Order/index.js +++ b/webAdmin/src/components/Order/index.js @@ -220,7 +220,6 @@ export default class OrderManageTable extends PureComponent{ fixed:'right', // fixed: 'right', render: (val, record) => ( -

{/* this.handleUpdateConfirm(record.order_id,pagination,formValues )}>确认订单|*/} {/* this.handleUpdatePay(record.order_id,pagination,formValues)}>确认发货*/} diff --git a/webAdmin/src/components/SystemParamConfig/SystemEditAndAdd.js b/webAdmin/src/components/SystemParamConfig/SystemEditAndAdd.js index 391b9d3b..519c103a 100644 --- a/webAdmin/src/components/SystemParamConfig/SystemEditAndAdd.js +++ b/webAdmin/src/components/SystemParamConfig/SystemEditAndAdd.js @@ -173,7 +173,7 @@ export default class SystemEditAndAdd extends PureComponent { - diff --git a/webAdmin/src/components/SystemParamConfig/index.js b/webAdmin/src/components/SystemParamConfig/index.js index 4bc2d51e..4fbac046 100644 --- a/webAdmin/src/components/SystemParamConfig/index.js +++ b/webAdmin/src/components/SystemParamConfig/index.js @@ -46,6 +46,7 @@ export default class SystemParam extends PureComponent{ },{ title: '操作', render: (text, record) => { + return ( this.handleEdit(record)}>编辑 @@ -63,7 +64,7 @@ export default class SystemParam extends PureComponent{

record.param_id} + rowKey={record => {record.parm_id,record.param_code}} dataSource={list} columns={columns} pagination={paginationProps} diff --git a/webAdmin/src/models/goodsCategory.js b/webAdmin/src/models/goodsCategory.js index 3ab564b4..90bf39aa 100644 --- a/webAdmin/src/models/goodsCategory.js +++ b/webAdmin/src/models/goodsCategory.js @@ -78,7 +78,6 @@ export default { // type: 'changeLoading', // payload: false, // }); - if (callback) callback(response); }, * findParentId({payload, callback}, {call, put}) { diff --git a/webAdmin/src/models/orderManage.js b/webAdmin/src/models/orderManage.js index 3cf8e419..faf143cb 100644 --- a/webAdmin/src/models/orderManage.js +++ b/webAdmin/src/models/orderManage.js @@ -159,11 +159,9 @@ export default { }) }, handleOrderManage(state,{payload}){ - return ({ ...state, data:payload.resultData.orderManage, - }) }, saveConfirm(state,{payload}){ diff --git a/webAdmin/src/models/systemconfig.js b/webAdmin/src/models/systemconfig.js index edd82a18..7e41905d 100644 --- a/webAdmin/src/models/systemconfig.js +++ b/webAdmin/src/models/systemconfig.js @@ -86,10 +86,13 @@ export default{ }) }, handleQueryParam(state,{payload}){ + return ({ ...state, data:payload.resultData.systemParam, + }) + console.log(payload.resultData.systemParam); } }, }; \ No newline at end of file diff --git a/webAdmin/src/routes/Admin/SysParamConfig.js b/webAdmin/src/routes/Admin/SysParamConfig.js index 7095a492..b04af015 100644 --- a/webAdmin/src/routes/Admin/SysParamConfig.js +++ b/webAdmin/src/routes/Admin/SysParamConfig.js @@ -147,6 +147,9 @@ export default class SysParamConfig extends PureComponent { return this.renderSimpleForm(); } handleFormReset = () => { + this.setState({ + formValues:{}, + }) const {form, dispatch} = this.props; form.resetFields(); dispatch({ @@ -157,6 +160,7 @@ export default class SysParamConfig extends PureComponent { render() { const {submitting, form,systemConfig:{loading:paramLoading,data}} = this.props; const {getFieldDecorator, getFieldValue} = form; + const {modalVisible,editType,record}=this.state; const formItemLayout = { diff --git a/webAdmin/src/routes/Admin/SysPermissionList.js b/webAdmin/src/routes/Admin/SysPermissionList.js index b9f15b20..b25e1794 100644 --- a/webAdmin/src/routes/Admin/SysPermissionList.js +++ b/webAdmin/src/routes/Admin/SysPermissionList.js @@ -102,6 +102,9 @@ export default class SystemPermissionList extends PureComponent{ handleFormReset = () => { const {form, dispatch} = this.props; + this.setState({ + formValues:{} + }) form.resetFields(); dispatch({ type: 'systemPermissionList/fetch', @@ -213,7 +216,7 @@ export default class SystemPermissionList extends PureComponent{ render() { const {modalVisible,editType,record,selectedRows} = this.state; const {rule: {loading: ruleLoading, data, typesSList}} = this.props; - + console.log(data) return ( @@ -225,6 +228,7 @@ export default class SystemPermissionList extends PureComponent{ this.handleAddType()}>新建 操作成功; orderMange:state.orderManage })) export default class OptionResult extends PureComponent{ + state={ + orderMange:{}, + record:{}, + } + + handleReturn = () => { const {dispatch} = this.props; dispatch(routerRedux.push('/order/orderManage')); } - handleReturnDetail=(orderId)=>{ - const {dispatch} = this.props; - dispatch(routerRedux.push('/order/orderDetails')); - } + componentDidMount() { - this.timer = setInterval(function(){ - this.handleReturn(); - }.bind(this), 5000); + this.props.dispatch({ + type:'orderManage/fetch', + payload:{order_sn:this.props.orderMange.FormData.order_sn}, + callback:(response)=>{ + if(response.result===0){ + this.state.orderMange=response.resultData.orderManage; + }else{ + message.error("失败") + } + } + }) + // this.timer = setInterval(function(){ + // this.handleReturn(); + // }.bind(this), 5000); + } componentWillUnmount() { // 如果存在this.timer,则使用clearTimeout清空。 @@ -34,10 +49,11 @@ export default class OptionResult extends PureComponent{ } render(){ const {orderId}=this.props.orderMange; + // const {orderManage:{data}} = this.props; const actions = (
- +
); diff --git a/webAdmin/src/routes/Order/OrderManage/OrderManage.js b/webAdmin/src/routes/Order/OrderManage/OrderManage.js index 65aff9b8..d9f07c2e 100644 --- a/webAdmin/src/routes/Order/OrderManage/OrderManage.js +++ b/webAdmin/src/routes/Order/OrderManage/OrderManage.js @@ -46,6 +46,10 @@ class OrderManage extends Component{ handleFormReset = () => { const {form, dispatch} = this.props; form.resetFields(); + this.props.dispatch({ + type: 'orderManage/fetch', + }); + }; // handleAddOrder = () => { @@ -190,8 +194,9 @@ class OrderManage extends Component{ //未发货 if (key == 'shipping') { this.state.tabStatus={ - shipping_status:0 - }; + shipping_status:0, + } + ; const {dispatch} = this.props; dispatch({ type: 'orderManage/fetch', @@ -265,6 +270,7 @@ class OrderManage extends Component{ {this.renderForm()} + 商品信息