From b5abe70a5173840fdd4f93efbba6ec10a12d5264 Mon Sep 17 00:00:00 2001 From: jyy <935090232@qq.com> Date: Fri, 09 Apr 2021 15:23:44 +0800 Subject: [PATCH] 服务单 --- zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html | 3 ++- zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java | 6 ++++++ zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html | 5 +++++ zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java | 7 ++++--- zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html | 13 ++++++++----- zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java | 18 ++++++++++++++++++ zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java | 3 +++ 7 files changed, 46 insertions(+), 9 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java b/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java index 7c53969..fcd90d7 100644 --- a/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java +++ b/zq-erp/src/main/java/com/matrix/system/common/constance/AppConstance.java @@ -573,9 +573,10 @@ public static final String WAREHOUSE_MANAGE_STOCK = "WAREHOUSE_MANAGE_STOCK"; - - - + /** + * 家居产品销售是否生成消耗业绩 + */ + public static final String SHOP_MANAGE_JJCPAS_CONSUME = "shopManageJjcpasConsume"; diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java index 268665d..40331bd 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/AchieveNewServiceImpl.java @@ -8,7 +8,10 @@ import com.matrix.core.tools.StringUtils; import com.matrix.core.tools.WebUtil; import com.matrix.system.app.vo.UserAchieveVo; +import com.matrix.system.common.bean.BusParameterSettings; import com.matrix.system.common.bean.SysUsers; +import com.matrix.system.common.constance.AppConstance; +import com.matrix.system.common.dao.BusParameterSettingsDao; import com.matrix.system.common.dao.SysUsersDao; import com.matrix.system.constance.Dictionary; import com.matrix.system.hive.bean.*; @@ -233,8 +236,11 @@ @Autowired ShoppingGoodsDao shoppingGoodsDao; + @Autowired + BusParameterSettingsDao busParameterSettingsDao; private void buildAchieve(SysOrder pageOrder, SysOrderItem orderItem, AchieveNew achieveNew) { + BusParameterSettings shopManageJjcpasConsume =null; if (Dictionary.ORDER_STATU_TK.equals(pageOrder.getStatu())) { achieveNew.setId(null); achieveNew.setProjPercentage(0 - achieveNew.getProjPercentage()); @@ -249,6 +255,18 @@ } else { achieveNew.setDatatime(new Date()); } + if(Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(orderItem.getShoppingGoods().getGoodType())){ + if(shopManageJjcpasConsume==null){ + shopManageJjcpasConsume = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_JJCPAS_CONSUME, pageOrder.getCompanyId()); + } + if(AppConstance.IS_Y.equals(shopManageJjcpasConsume.getParamValue())){ + achieveNew.setHisConsume(achieveNew.getGoodsCash()); + } + + } + + + achieveNew.setOrderType(Dictionary.ORDER_TYPE_SEAL); achieveNew.setOrderId(pageOrder.getId()); achieveNew.setOrderItemId(orderItem.getId()); diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java index 647ead9..807bdcd 100644 --- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java +++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java @@ -1372,9 +1372,12 @@ moneyCardUseFlowDao.insert(moneyCardUseFlow); order.setFlows(czVo.getFlows()); + addOrderFlow(order); + // 添加员工业绩 achieveNewService.addAchaeveByOrder(order); + return order; } diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html index 1d204ba..d3837fd 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html @@ -253,7 +253,7 @@ goodsCash: 0, achieveType : _this.achieveTypeList[0].value, commission : 0, - isShare: false, + isShare: false }); } }); @@ -309,6 +309,7 @@ goodsCash: achieve.goodsCash, achieveType: achieve.achieveType, projPercentage: achieve.commission, + payMethod:"现金", }; achaeveList.push(achieveNew); }) diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html index f76a2a6..05fd426 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html @@ -79,6 +79,11 @@ width="400"> </el-table-column> <el-table-column + prop="projUse.source" + label="来源" + width="400"> + </el-table-column> + <el-table-column :formatter="hkPrice" label="划扣金额" width="100"> @@ -172,11 +177,9 @@ MTools.closeForm(); }, serviceTime(row, column) { - console.log(column); - console.log(row); - // if (!column.bedState) { - // return "-"; - // } + if (!row.beginTime) { + return "-"; + } var startTime = this.dateFormat(row.beginTime); var endTime = this.dateFormat(row.endTime); return startTime + " - " + endTime; diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html index ce54cfa..cd511b3 100644 --- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html +++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html @@ -276,6 +276,11 @@ </template> </el-table-column> <el-table-column + prop="source" + label="来源" + width="180"> + </el-table-column> + <el-table-column prop="status" label="状态" width="180"> diff --git a/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java b/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java index a29c349..eccda8a 100644 --- a/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java +++ b/zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java @@ -68,6 +68,12 @@ newSetting3.setCategory("微信开发配置"); newSettings.add(newSetting3); + ParameterSettings newSetting4=new ParameterSettings(); + newSetting4.setCode(AppConstance.SHOP_MANAGE_JJCPAS_CONSUME); + newSetting4.setName("家居产品销售是否生成消耗业绩"); + newSetting4.setType(1); + newSetting4.setCategory("店务配置"); + newSettings.add(newSetting4); -- Gitblit v1.9.1