diff --git a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java index ccd51f2e89..1ece09d950 100644 --- a/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java +++ b/anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/bussalesorderborrower/BusSalesOrderBorrowerFeign.java @@ -114,4 +114,9 @@ public interface BusSalesOrderBorrowerFeign { @ApiOperation("批量保存") @PostMapping("/saveList") ResultBean saveList(@RequestBody List borrowers); + + @ApiOperation("根据客户sid查询贷款人sid") + @PostMapping("/selectByCustomSid") + @ResponseBody + ResultBean selectByCustomSid(@RequestParam("customSid") String customSid); } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapplydetails/BusDeliveredApplyDetailsMapper.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapplydetails/BusDeliveredApplyDetailsMapper.java index f471f4e651..6d7ccbebbe 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapplydetails/BusDeliveredApplyDetailsMapper.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapplydetails/BusDeliveredApplyDetailsMapper.java @@ -35,6 +35,7 @@ import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetails; import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetailsVo; +import org.apache.ibatis.annotations.Update; import java.util.List; @@ -98,4 +99,7 @@ public interface BusDeliveredApplyDetailsMapper extends BaseMapper list); + + @Select("select sid from bus_sales_order_loancontract where customSid = #{customSid}") + String selectByCustomSid(String customSid); } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java index ab183ed049..279c8b0a08 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerRest.java @@ -138,4 +138,11 @@ public class BusSalesOrderBorrowerRest implements BusSalesOrderBorrowerFeign { int i = busSalesOrderBorrowerService.saveList(borrowers); return rb.success(); } + + @Override + public ResultBean selectByCustomSid(String customSid) { + ResultBean rb = ResultBean.fireFail(); + String borrowerSid = busSalesOrderBorrowerService.selectByCustomSid(customSid); + return rb.success().setData(borrowerSid); + } } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java index 4999d706d0..d6735ee3dd 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderborrower/BusSalesOrderBorrowerService.java @@ -333,4 +333,8 @@ public class BusSalesOrderBorrowerService extends MybatisBaseService borrowers) { return baseMapper.saveList(borrowers); } + + public String selectByCustomSid(String customSid) { + return baseMapper.selectByCustomSid(customSid); + } } diff --git a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java index 5959a7f0c3..872d4c5509 100644 --- a/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java +++ b/anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java @@ -65,8 +65,8 @@ import com.yxt.anrui.buscenter.api.bussalesorderreturnvehapply.flow.GetNodeVo; import com.yxt.anrui.buscenter.api.bussalesorderreturnvehapply.flow.SubmitBusSalesOrderReturnVehApplyDto; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicle; import com.yxt.anrui.buscenter.api.bussalesordervehicle.BusSalesOrderVehicleDetailsVo; -import com.yxt.anrui.buscenter.api.bussalesreturnorders.BusSalesReturnOrders; import com.yxt.anrui.buscenter.api.bussalesreturnorders.BusSalesReturnOrdersDto; +import com.yxt.anrui.buscenter.biz.busdeliveredapplydetails.BusDeliveredApplyDetailsService; import com.yxt.anrui.buscenter.biz.bussalesorder.BusSalesOrderService; import com.yxt.anrui.buscenter.biz.bussalesorderborrower.BusSalesOrderBorrowerService; import com.yxt.anrui.buscenter.biz.bussalesorderreturnveh.BusSalesOrderReturnVehService; @@ -180,6 +180,8 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService updateBDEmpinfo(@RequestBody @Valid BDEmpinfo bdEmpinfo); - @ApiOperation("暂存销售退货单的接口") + @ApiOperation("下推销售退货单的接口") @PostMapping("/draftSalesReturnOrders") @ResponseBody ResultBean draftSalesReturnOrders(@RequestBody @Valid SalesReturn salesReturn); diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/salesreturn/SalesReturnOrdersService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/salesreturn/SalesReturnOrdersService.java index 685c50d62d..ea9f7867b7 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/salesreturn/SalesReturnOrdersService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/kingdee/salesreturn/SalesReturnOrdersService.java @@ -61,7 +61,7 @@ public class SalesReturnOrdersService extends FinKingDeeService { } String kingDeeData = SalesReturnOrdersCastToKingDeeBillFields.getKingDeeData(map_fEntityModel_, vehicleListMap.getData()); try { - ResultBean resultBean1 = accessKingDeeInterface(KingDeeBillId.SAL_RETURNSTOCK.getID(), kingDeeData, KingDeeBillUrl.DRAFT_URL.getURL()); + ResultBean resultBean1 = accessKingDeeInterface(KingDeeBillId.SAL_RETURNSTOCK.getID(), kingDeeData, KingDeeBillUrl.PUSH_URL.getURL()); if (!resultBean1.getSuccess()) { log.info("销售退货单保存失败!"); return rb.setMsg("销售退货单保存失败!"); diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java index fd2236b6aa..fc635f37e6 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeign.java @@ -121,5 +121,12 @@ public interface LoanRepaymentScheduleFeign { @ResponseBody public ResultBean> getRepaymentPlanListByVinNo(@RequestParam("vinNo") String vinNo, @RequestParam("sid") String sid); - + /** + * 根据条件分页查询数据的列表(已测试) + * + */ + @ApiOperation("微信小程序还款计划列表") + @PostMapping("/getRepaymentPlanListWx") + @ResponseBody + ResultBean> getRepaymentPlanListWx(PagerQuery pagerQuery); } diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java index cbe93a8ce2..ca2739cae9 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loanrepaymentschedule/LoanRepaymentScheduleFeignFallback.java @@ -22,8 +22,6 @@ import java.util.List; @Component public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentScheduleFeign { - - @Override public ResultBean loanCreateSchedule(String salesOrderSid) { return null; @@ -104,4 +102,9 @@ public class LoanRepaymentScheduleFeignFallback implements LoanRepaymentSchedule public ResultBean> getRepaymentPlanListByVinNo(String vinNo,String sid) { return null; } + + @Override + public ResultBean> getRepaymentPlanListWx(PagerQuery pagerQuery) { + return null; + } } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java index 52519a25c8..c62a782a18 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleRest.java @@ -120,4 +120,11 @@ public class LoanRepaymentScheduleRest implements LoanRepaymentScheduleFeign { public ResultBean> getRepaymentPlanListByVinNo(String vinNo,String sid) { return loanRepaymentScheduleService.getRepaymentPlanListByVinNo(vinNo,sid); } + + @Override + public ResultBean> getRepaymentPlanListWx(PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo page = loanRepaymentScheduleService.getRepaymentPlanListWx(pq); + return rb.success().setData(page); + } } diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java index 3977e55312..0c6f178c89 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java @@ -6949,4 +6949,33 @@ public class LoanRepaymentScheduleService extends MybatisBaseService getRepaymentPlanListWx(PagerQuery pq) { + IPage page = PagerUtil.queryToPage(pq); + AppRepaymentPlanQuery pagerQuery = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("isDelete", 0); + qw.orderByDesc("createTime"); + String userSid = pagerQuery.getUserSid(); + SysUserVo sysUserVo = sysUserFeign.fetchBySid(userSid).getData(); + CrmCustomerTempVo crmCustomerTempVo = crmCustomerTempFeign.selByMobile(sysUserVo.getMobile()).getData(); + String borrSid = busSalesOrderBorrowerFeign.selectByCustomSid(crmCustomerTempVo.getSid()).getData(); + qw.eq("borrowerSid", borrSid); + if (StringUtils.isNotBlank(pagerQuery.getNames())) { + qw.and(wrapper -> wrapper.like("loanContractNo", pagerQuery.getNames()).or().like("borrowerName", pagerQuery.getNames()).or().like("bankName", pagerQuery.getNames())); + } + IPage pagging = baseMapper.getRepaymentPlanList(page, qw); + List records = pagging.getRecords(); + records.removeAll(Collections.singleton(null)); + if (!records.isEmpty()) { + String urlPrefix = docPdfComponent.getPrefixTemplateUrl(); + for (AppRepaymentPlanVo record : records) { + if (StringUtils.isNotBlank(record.getDownloadUrl())) { + record.setDownloadUrl(urlPrefix + record.getDownloadUrl()); + } + } + } + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } } diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java index 015969a206..7f337ef0b2 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeign.java @@ -29,6 +29,10 @@ public interface RepaymentPlanFeign { @ResponseBody public ResultBean> getRepaymentPlanList(@RequestBody PagerQuery pq); + @ApiOperation("微信小程序还款计划列表") + @PostMapping("/getRepaymentPlanListWx") + @ResponseBody + public ResultBean> getRepaymentPlanListWx(@RequestBody PagerQuery pq); @ApiOperation("查看还款计划表") @GetMapping("/getRepaymentPlanListBySid") diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java index e8c1a3fae8..def09b0c0b 100644 --- a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanFeignFallback.java @@ -22,6 +22,11 @@ public class RepaymentPlanFeignFallback implements RepaymentPlanFeign { return null; } + @Override + public ResultBean> getRepaymentPlanListWx(PagerQuery pq) { + return null; + } + @Override public ResultBean getRepaymentPlanListBySid(String sid) { return null; diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVehWxVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVehWxVo.java new file mode 100644 index 0000000000..26fc876483 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanVehWxVo.java @@ -0,0 +1,17 @@ +package com.yxt.anrui.terminal.api.risk.repaymentplan; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author Administrator + * @description + * @date 2023/8/28 10:33 + */ +@Data +public class RepaymentPlanVehWxVo implements Vo { + + @ApiModelProperty("车架号") + private String vinNo; +} diff --git a/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java new file mode 100644 index 0000000000..aa92b83616 --- /dev/null +++ b/anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/risk/repaymentplan/RepaymentPlanWxVo.java @@ -0,0 +1,29 @@ +package com.yxt.anrui.terminal.api.risk.repaymentplan; + +import com.yxt.common.core.vo.Vo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author Administrator + * @description + * @date 2023/8/28 10:33 + */ +@Data +public class RepaymentPlanWxVo implements Vo { + + @ApiModelProperty("业务sid") + private String sid; + @ApiModelProperty("消贷合同编号") + private String contractId; + @ApiModelProperty("贷款人名称") + private String lenderName; + @ApiModelProperty("金融产品") + private String financial; + @ApiModelProperty("销售专员") + private String salesName; + @ApiModelProperty("车辆信息") + private List repaymentPlanVehWxVoList; +} diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java index 04e328afa0..e84329b4a7 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanRest.java @@ -31,6 +31,11 @@ public class RepaymentPlanRest implements RepaymentPlanFeign { return repaymentPlanService.getRepaymentPlanList(pq); } + @Override + public ResultBean> getRepaymentPlanListWx(PagerQuery pq) { + return repaymentPlanService.getRepaymentPlanListWx(pq); + } + @Override public ResultBean getRepaymentPlanListBySid(String sid) { return repaymentPlanService.getRepaymentPlanListBySid(sid); diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java index f7da5eaa59..d5f994c24d 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/repaymentplan/RepaymentPlanService.java @@ -7,10 +7,7 @@ import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDe import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactDto; import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactQuery; import com.yxt.anrui.terminal.api.risk.mortgage.AppMortgageInformationTransactVo; -import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanDetailsVo; -import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanListDetailsVo; -import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanQuery; -import com.yxt.anrui.terminal.api.risk.repaymentplan.RepaymentPlanVo; +import com.yxt.anrui.terminal.api.risk.repaymentplan.*; import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.vo.PagerVo; @@ -70,4 +67,31 @@ public class RepaymentPlanService { } return rb.success().setData(vo); } + + public ResultBean> getRepaymentPlanListWx(PagerQuery pq) { + ResultBean> rb = ResultBean.fireFail(); + PagerVo pagerVo = new PagerVo<>(); + PagerQuery pagerQuery = new PagerQuery<>(); + BeanUtil.copyProperties(pq, pagerQuery); + ResultBean> repaymentPlanList = loanRepaymentScheduleFeign.getRepaymentPlanListWx(pagerQuery); + if (repaymentPlanList.getSuccess()) { + PagerVo data = repaymentPlanList.getData(); + BeanUtil.copyProperties(data, pagerVo); + List vehWxVos = new ArrayList<>(); + for (AppRepaymentPlanVo record : data.getRecords()) { + String vinNo = record.getVinNo(); + String[] vinNos = vinNo.split(","); + for (String no : vinNos) { + RepaymentPlanVehWxVo repaymentPlanVehWxVo = new RepaymentPlanVehWxVo(); + repaymentPlanVehWxVo.setVinNo(no); + vehWxVos.add(repaymentPlanVehWxVo); + } + } + List records = pagerVo.getRecords(); + for (RepaymentPlanWxVo record : records) { + record.setRepaymentPlanVehWxVoList(vehWxVos); + } + } + return rb.success().setData(pagerVo); + } } diff --git a/yxt-as-ui/src/api/basicinformation/claimantManufacturer.js b/yxt-as-ui/src/api/basicinformation/claimantManufacturer.js new file mode 100644 index 0000000000..98fb6d88a5 --- /dev/null +++ b/yxt-as-ui/src/api/basicinformation/claimantManufacturer.js @@ -0,0 +1,35 @@ +import request from '@/utils/request' + +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/as/v1/asserviceclaimanu/listPage', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/as/v1/asserviceclaimanu/save', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + fetchBySid: function(data) { + return request({ + url: '/as/v1/asserviceclaimanu/fetchDetailsBySid/' + data, + method: 'get' + }) + }, + deleteBySids: function(data) { + return request({ + url: '/as/v1/asserviceclaimanu/delBySids', + method: 'DELETE', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + } +} diff --git a/yxt-as-ui/src/api/basicinformation/maintenanceProjectRecord.js b/yxt-as-ui/src/api/basicinformation/maintenanceProjectRecord.js new file mode 100644 index 0000000000..164a62355c --- /dev/null +++ b/yxt-as-ui/src/api/basicinformation/maintenanceProjectRecord.js @@ -0,0 +1,115 @@ +import request from '@/utils/request' + +export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/listPage', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 初始化 + init: function(data) { + return request({ + url: '/as/v1/asserviceitemapply/applyInit', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 回显 + fetchDetailsBySid: function(data) { + return request({ + url: '/as/v1/asserviceitemapply/fetchDetailsBySid/' + data, + method: 'get' + }) + }, + saveOrUpdate: function(data) { + return request({ + url: '/as/v1/asserviceitemapply/save', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + deleteBySids: function(data) { + return request({ + url: '/as/v1/asserviceitemapply/delBySids', + method: 'DELETE', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 提交流程 + submit: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/submitApply', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(同意) + complete: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/complete', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(加签) + delegate: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/delegate', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(驳回) + reject: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/reject', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(终止) + breakProcess: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/breakProcess', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 流程审批(撤回) + revokeProcess: function(params) { + return request({ + url: '/as/v1/asserviceitemapply/revokeProcess', + method: 'post', + data: params, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 审批流程(同意)获取下一环节 + getNextNodesForSubmit: function(data) { + return request({ + url: '/as/v1/asserviceitemapply/getNextNodesForSubmit', + method: 'get', + params: data + }) + }, + // 审批流程(驳回)获取上一环节 + getPreviousNodesForReject: function(data) { + return request({ + url: '/as/v1/asserviceitemapply/getPreviousNodesForReject', + method: 'get', + params: data + }) + } +} diff --git a/yxt-as-ui/src/api/basicinformation/maintenanceitem.js b/yxt-as-ui/src/api/basicinformation/maintenanceitem.js index bd449b4f2e..99a961966f 100644 --- a/yxt-as-ui/src/api/basicinformation/maintenanceitem.js +++ b/yxt-as-ui/src/api/basicinformation/maintenanceitem.js @@ -24,6 +24,22 @@ export default { method: 'get' }) }, + disableState: function(data) { + return request({ + url: '/as/v1/AsServiceItem/disableState', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + enable: function(data) { + return request({ + url: '/as/v1/AsServiceItem/enable', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, deleteBySids: function(data) { return request({ url: '/as/v1/AsServiceItem/delBySids', diff --git a/yxt-as-ui/src/api/maintenance/maintenanceReturnBound.js b/yxt-as-ui/src/api/maintenance/maintenanceReturnBound.js deleted file mode 100644 index 215f5d0bc3..0000000000 --- a/yxt-as-ui/src/api/maintenance/maintenanceReturnBound.js +++ /dev/null @@ -1,49 +0,0 @@ -import request from '@/utils/request' - -export default { - - // 选择工单初始化数据 - initBill: function(data) { - return request({ - url: '/as/v1/AsBusrepairInventorybill/init', - method: 'get', - params: data - }); - }, - - - // 查询分页列表 - getGoodsListPage: function(params) { - return request({ - url: '/wms/apiadmin/WmsOutBill/getInventoryList', - method: 'post', - data: params, - headers: { - 'Content-Type': 'application/json' - } - }) - }, - - // 新增、保存 - saveBill: function(data) { - return request({ - url: '/as/v1/AsBusrepairInventorybill/quitBill', - method: 'post', - data: data, - headers: { - 'Content-Type': 'application/json' - } - }); - }, - - - // 详情 - detailsBill: function(data) { - return request({ - url: '/as/v1/AsBusrepairInventorybill/details', - method: 'get', - params: data - }); - }, - -} diff --git a/yxt-as-ui/src/api/maintenance/maintenanceOutbound.js b/yxt-as-ui/src/api/maintenanceReceive/maintenanceReceive.js similarity index 51% rename from yxt-as-ui/src/api/maintenance/maintenanceOutbound.js rename to yxt-as-ui/src/api/maintenanceReceive/maintenanceReceive.js index 178a0a52c5..220ae34173 100644 --- a/yxt-as-ui/src/api/maintenance/maintenanceOutbound.js +++ b/yxt-as-ui/src/api/maintenanceReceive/maintenanceReceive.js @@ -2,6 +2,18 @@ import request from '@/utils/request' export default { + // 查询分页列表 + listPage: function(params) { + return request({ + url: '/as/v1/AsBusrepairInventorybill/listPage', + method: 'post', + data: params, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 选择工单初始化数据 initBill: function(data) { return request({ @@ -11,8 +23,7 @@ export default { }); }, - - // 查询分页列表 + // 模糊查询 商品列表 getGoodsListPage: function(params) { return request({ url: '/wms/apiadmin/WmsOutBill/getInventoryList', @@ -24,8 +35,8 @@ export default { }) }, - // 新增、保存 - saveBill: function(data) { + // 新增、保存领料出库 + saveOutBill: function(data) { return request({ url: '/as/v1/AsBusrepairInventorybill/outBill', method: 'post', @@ -36,6 +47,29 @@ export default { }); }, + // 新增、保存 领料退库 + saveQuitBill: function(data) { + return request({ + url: '/as/v1/AsBusrepairInventorybill/quitBill', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + + saveConfirm: function(data) { + return request({ + url: '/as/v1/AsBusrepairInventorybill/saveConfirm', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }); + }, + // 详情 detailsBill: function(data) { diff --git a/yxt-as-ui/src/api/operation/repairbill.js b/yxt-as-ui/src/api/operation/repairbill.js index 05398b1422..0dc7329b17 100644 --- a/yxt-as-ui/src/api/operation/repairbill.js +++ b/yxt-as-ui/src/api/operation/repairbill.js @@ -26,6 +26,14 @@ export default { headers: { 'Content-Type': 'application/json' } }) }, + sendBack: function(data) { + return request({ + url: '/as/v1/AsBusrepairBill/sendBack', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, fetchBySid: function(data) { return request({ url: '/as/v1/AsBusrepairBill/fetchDetailsBySid/' + data, @@ -49,7 +57,7 @@ export default { headers: { 'Content-Type': 'application/json' } }) }, - // 确认材料费 + // 结算 settle: function(data) { return request({ url: '/as/v1/AsBusrepairBill/settle', @@ -57,5 +65,39 @@ export default { data: data, headers: { 'Content-Type': 'application/json' } }) + }, + // 打印出门证 + printCard: function(data) { + return request({ + url: '/as/v1/AsBusrepairBill/printCard', + method: 'post', + params: data + }) + }, + // 打印结算单 + printSettle: function(data) { + return request({ + url: '/as/v1/AsBusrepairBill/printSettle', + method: 'post', + params: data + }) + }, + // 确认工时费比例初始化 + detailsByManHourFee: function(data) { + return request({ + url: '/as/v1/AsBusrepairBill/detailsByManHourFee', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + // 确认工时费比例保存 + saveByManHourFee: function(data) { + return request({ + url: '/as/v1/AsBusrepairBill/saveByManHourFee', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) } } diff --git a/yxt-as-ui/src/api/storage/deliveryNotice.js b/yxt-as-ui/src/api/storage/deliveryNotice.js index fc11c9105a..5747aa07f5 100644 --- a/yxt-as-ui/src/api/storage/deliveryNotice.js +++ b/yxt-as-ui/src/api/storage/deliveryNotice.js @@ -14,6 +14,18 @@ export default { }) }, + // 终止逾期到货通知单 + billToEnd: function(data) { + return request({ + url: '/wms/apiadmin/inventory/WmsReceiptBill/billToEndBySids', + method: 'post', + data: data, + headers: { + 'Content-Type': 'application/json' + } + }) + }, + // 详情初始化 init: function(data) { return request({ diff --git a/yxt-as-ui/src/api/storage/receivingGoods.js b/yxt-as-ui/src/api/storage/receivingGoods.js index 62e017ab4d..cbe6915344 100644 --- a/yxt-as-ui/src/api/storage/receivingGoods.js +++ b/yxt-as-ui/src/api/storage/receivingGoods.js @@ -14,6 +14,15 @@ export default { }) }, + // 根据收货单sid 获取上架单列表 + getUpShlefList: function(data) { + return request({ + url: '/wms/apiadmin/inventory/WmsReceiptBill/getUpShlefListBySid/' + data, + method: 'get' + }); + }, + + // 初始化 init: function(data) { return request({ @@ -22,7 +31,6 @@ export default { }); }, - // 新增、保存 save: function(data) { return request({ diff --git a/yxt-as-ui/src/router/index.js b/yxt-as-ui/src/router/index.js index 0f1a6028bc..0492665998 100644 --- a/yxt-as-ui/src/router/index.js +++ b/yxt-as-ui/src/router/index.js @@ -169,30 +169,46 @@ export const constantRoutes = [{ component: () => import('@/views/operation/merchandisereturn/merchandisereturn.vue'), name: 'MerchandiseReturn', meta: { title: '商品退货管理', noCache: true } - }, + } ] }, { - path: '/maintenance', + path: '/maintenanceReceive', component: Layout, - redirect: '/maintenance', + redirect: '/maintenanceReceive', meta: { title: '维修领料' }, children: [ + + { + path: '/maintenanceReceive/index', + component: () => import('@/views/maintenanceReceive/index.vue'), + name: 'MaintenanceReceive', + meta: { + title: '维修领料', + noCache: true + } + }, { - path: '/maintenanceOutbound/index', - component: () => import('@/views/maintenance/maintenanceOutbound/index.vue'), + path: '/maintenanceReceive/maintenanceOutbound', + component: () => import('@/views/maintenanceReceive/maintenanceOutbound.vue'), name: 'MaintenanceOutbound', - meta: { title: '维修出库', noCache: true } + meta: { + title: '维修出库', + noCache: true + } }, { - path: '/maintenanceReturnBound/index', - component: () => import('@/views/maintenance/maintenanceReturnBound/index.vue'), + path: '/maintenanceReceive/maintenanceReturnBound', + component: () => import('@/views/maintenanceReceive/maintenanceReturnBound.vue'), name: 'MaintenanceReturnBound', - meta: { title: '维修退库', noCache: true } - }, + meta: { + title: '维修退库', + noCache: true + } + } ] }, @@ -511,6 +527,12 @@ export const constantRoutes = [{ name: 'MaintenanceItem', meta: { title: '维修项目管理', noCache: true } }, + { + path: '/maintenanceProjectRecord/maintenanceProjectRecord', + component: () => import('@/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecord.vue'), + name: 'MaintenanceProjectRecord', + meta: { title: '维修项目备案', noCache: true } + }, { path: '/additionitem/additionitem', component: () => import('@/views/basicinformation/additionitem/additionitem.vue'), @@ -552,6 +574,12 @@ export const constantRoutes = [{ component: () => import('@/views/basicinformation/supplier/supplier.vue'), name: 'Supplier', meta: { title: '供应商管理', noCache: true } + }, + { + path: '/claimantManufacturer/claimantManufacturer', + component: () => import('@/views/basicinformation/claimantManufacturer/claimantManufacturer.vue'), + name: 'ClaimantManufacturer', + meta: { title: '索赔厂家管理', noCache: true } } ] }, @@ -788,6 +816,27 @@ export const constantRoutes = [{ import('@/views/workFlow/oldPartsFactoryFlow/oldPartsFactoryYiBan.vue'), name: 'OldPartsFactoryYiBan' }, + // 维修项目备案 -- 编辑 + { + path: '/weixiubeianFlow/maintenanceProjectRecordEdit', + component: () => + import('@/views/workFlow/weixiubeianFlow/maintenanceProjectRecordEdit.vue'), + name: 'MaintenanceProjectRecordEdit' + }, + // 维修项目备案 -- 待办 + { + path: '/weixiubeianFlow/maintenanceProjectRecordDaiBan', + component: () => + import('@/views/workFlow/weixiubeianFlow/maintenanceProjectRecordDaiBan.vue'), + name: 'MaintenanceProjectRecordDaiBan' + }, + // 维修项目备案 -- 已办 + { + path: '/weixiubeianFlow/maintenanceProjectRecordYiBan', + component: () => + import('@/views/workFlow/weixiubeianFlow/maintenanceProjectRecordYiBan.vue'), + name: 'MaintenanceProjectRecordYiBan' + }, // 404 page must be placed at the end !!! // { path: '*', redirect: '/404', hidden: true } ] diff --git a/yxt-as-ui/src/views/basicinformation/claimantManufacturer/claimantManufacturer.vue b/yxt-as-ui/src/views/basicinformation/claimantManufacturer/claimantManufacturer.vue new file mode 100644 index 0000000000..5a0cf66c04 --- /dev/null +++ b/yxt-as-ui/src/views/basicinformation/claimantManufacturer/claimantManufacturer.vue @@ -0,0 +1,366 @@ + + + + diff --git a/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecord.vue b/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecord.vue new file mode 100644 index 0000000000..2d0904b681 --- /dev/null +++ b/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecord.vue @@ -0,0 +1,326 @@ + + + + diff --git a/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecordAdd.vue b/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecordAdd.vue new file mode 100644 index 0000000000..9cb9ff1fc1 --- /dev/null +++ b/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecordAdd.vue @@ -0,0 +1,223 @@ + + + + + diff --git a/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecordInfo.vue b/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecordInfo.vue new file mode 100644 index 0000000000..4abd68ffda --- /dev/null +++ b/yxt-as-ui/src/views/basicinformation/maintenanceProjectRecord/maintenanceProjectRecordInfo.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitem.vue b/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitem.vue index 0bffb0d7c2..5fbab88084 100644 --- a/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitem.vue +++ b/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitem.vue @@ -18,6 +18,16 @@ + + + + + + + + + +
查询 @@ -41,6 +51,17 @@ 查看 + + + + + + + @@ -73,6 +94,8 @@ + +
@@ -83,6 +106,8 @@ import ButtonBar from '@/components/ButtonBar' import req from '@/api/basicinformation/maintenanceitem' import maintenanceitemAdd from './maintenanceitemAdd' import maintenanceitemInfo from './maintenanceitemInfo' +import maintenanceProjectRecordAdd from '../maintenanceProjectRecord/maintenanceProjectRecordAdd' +import { getButtonPermissions } from '@/api/Common/dictcommons' export default { name: 'MaintenanceItem', @@ -91,7 +116,8 @@ export default { pageye, ButtonBar, maintenanceitemAdd, - maintenanceitemInfo + maintenanceitemInfo, + maintenanceProjectRecordAdd }, data() { return { @@ -104,6 +130,27 @@ export default { btnKey: 'toAdd', btnLabel: '新增' }, + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'toBeiAn', + btnLabel: '备案' + }, + { + type: 'danger', + size: 'small', + icon: '', + btnKey: 'toForbidden', + btnLabel: '禁用' + }, + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'toEnable', + btnLabel: '启用' + }, { type: 'danger', size: 'small', @@ -125,12 +172,37 @@ export default { tableKey: 0, list: [], sids: [], // 用于导出的时候保存已选择的SIDs + multipleSelection: [], + state_list: [ + { + dictKey: '0', + dictValue: '备案中' + }, + { + dictKey: '1', + dictValue: '未备案' + }, + { + dictKey: '2', + dictValue: '已备案' + } + ], + Enable_list: [ + { + dictKey: '1', + dictValue: '启用' + }, + { + dictKey: '0', + dictValue: '禁用' + } + ], FormLoading: false, listLoading: false, // 翻页 listQuery: { current: 1, - size: 10, + size: 5, total: 0, params: { serviceType: '', @@ -139,7 +211,9 @@ export default { type: '1', orgPath: '', menuUrl: '', - userSid: '' + userSid: '', + state: '', + isEnable: '' } } } @@ -149,7 +223,18 @@ export default { this.getList() }, mounted() { - this.$refs['btnbar'].setButtonList(this.btnList) + getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => { + if (res.success) { + for (var i = 0; i < res.data.length; i++) { + for (var k = 0; k < this.btnList.length; k++) { + if (res.data[i].buttonId === this.btnList[k].btnKey) { + this.btnList.splice(k, 1) + } + } + } + this.$refs['btnbar'].setButtonList(this.btnList) + } + }) }, methods: { // 搜索条件效果 @@ -167,6 +252,15 @@ export default { case 'toAdd': this.toAdd() break + case 'toBeiAn': + this.toBeiAn() + break + case 'toForbidden': + this.toForbidden() + break + case 'toEnable': + this.toEnable() + break case 'doDel': this.doDel() break @@ -180,6 +274,7 @@ export default { // 信息条数 获取点击时当前的sid handleSelectionChange(row) { const aa = [] + this.multipleSelection = row row.forEach(element => { aa.push(element.sid) }) @@ -217,7 +312,7 @@ export default { handleReset() { this.listQuery = { current: 1, - size: 10, + size: 5, total: 0, params: { serviceType: '', @@ -226,7 +321,9 @@ export default { type: '1', orgPath: '', menuUrl: '', - userSid: '' + userSid: '', + state: '', + isEnable: '' } } this.getList() @@ -236,18 +333,101 @@ export default { this.$refs['divAdd'].showAdd() }, toEdit(row) { - this.viewState = 3 - this.$refs['divAdd'].showEdit(row) + if (row.state !== '0') { + this.viewState = 3 + this.$refs['divAdd'].showEdit(row) + } else { + this.$message({ showClose: true, type: 'error', message: '因该条记录备案状态为备案中,操作失败' }) + } }, toInfo(row) { this.viewState = 4 this.$refs['divInfo'].showInfo(row) }, + toBeiAn() { + if (this.sids.length > 0) { + for (var i = 0; i < this.multipleSelection.length; i++) { + if (this.multipleSelection[i].state === '0' || this.multipleSelection[i].state === '2') { + this.$message({ showClose: true, type: 'error', message: '请选择备案状态为未备案的记录进行操作' }) + return + } + } + this.viewState = 5 + this.$refs['divBeiAn'].showAdd(this.sids) + } else { + this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行操作' }) + } + }, + toForbidden() { + if (this.sids.length === 0) { + this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行操作' }) + return + } + const tip = '请确认是否禁用所选 ' + this.sids.length + ' 条记录?' + this.$confirm(tip, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + req.disableState(this.sids).then(resp => { + if (resp.success) { + this.$message({ type: 'success', message: resp.msg, showClose: true }) + } + this.getList() + loading.close() + }).catch(e => { + loading.close() + }) + }).catch(() => { + }) + }, + toEnable() { + if (this.sids.length === 0) { + this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行操作' }) + return + } + const tip = '请确认是否启用所选 ' + this.sids.length + ' 条记录?' + this.$confirm(tip, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + req.enable(this.sids).then(resp => { + if (resp.success) { + this.$message({ type: 'success', message: resp.msg, showClose: true }) + } + this.getList() + loading.close() + }).catch(e => { + loading.close() + }) + }).catch(() => { + }) + }, // 删除 doDel() { if (this.sids.length === 0) { this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) return + } else { + for (var i = 0; i < this.multipleSelection.length; i++) { + if (this.multipleSelection[i].state === '0' || this.multipleSelection[i].state === '2') { + this.$message({ showClose: true, type: 'error', message: '请选择备案状态为未备案的记录进行操作' }) + return + } + } } const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' this.$confirm(tip, '提示', { diff --git a/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitemAdd.vue b/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitemAdd.vue index 667ee0bfa5..4fd17125f8 100644 --- a/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitemAdd.vue +++ b/yxt-as-ui/src/views/basicinformation/maintenanceitem/maintenanceitemAdd.vue @@ -61,17 +61,17 @@
*工时数
- +
*外协成本
- +
*销售价
- {{ calculatePrice }} + {{ formobj.price }}
*工时提成
@@ -167,21 +167,13 @@ export default { hourPrice: [{ required: true, message: '工时单价不能为空', trigger: 'blur' }], hours: [{ required: true, message: '工时数不能为空', trigger: 'blur' }], price: [{ required: true, message: '销售价不能为空', trigger: 'blur' }], - examineHourPrice: [{ required: true, message: '考核工时不能为空', trigger: 'blur' }], + examineHourPrice: [{ required: true, message: '工时提成不能为空', trigger: 'blur' }], cost: [{ required: true, message: '外协成本不能为空', trigger: 'blur' }], isReserve: [{ required: true, message: '预约项目不能为空', trigger: 'change' }], subjectName: [{ required: true, message: '科目不能为空', trigger: 'change' }] } } }, - computed: { - // 计算销售价 = 工时单价 * 工时数 + 外协成本 - calculatePrice() { - let price = '0' - price = Math.round((parseFloat(price) + (parseFloat(this.formobj.hourPrice !== '' ? this.formobj.hourPrice : '0') * parseFloat(this.formobj.hours !== '' ? this.formobj.hours : '0')) + parseFloat(this.formobj.cost !== '' ? this.formobj.cost : '0')) * 100) / 100 - return price - } - }, methods: { init() { getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { @@ -231,7 +223,7 @@ export default { if (res.success) { this.formobj = res.data // 因提成比例不存数据库,则编辑信息时需要计算出值 - this.examineHourPriceInput(this.formobj) + this.royaltiesRatioInput(this.formobj) } }) }, @@ -285,16 +277,22 @@ export default { this.formobj.manufacturerSid = '' } }, + // 计算销售价 = 工时单价 * 工时数 + 外协成本 + priceInput(val) { + val.price = Math.round(((parseFloat(val.hourPrice !== '' ? val.hourPrice : '0') * parseFloat(val.hours !== '' ? val.hours : '0')) + parseFloat(val.cost !== '' ? val.cost : '0')) * 100) / 100 + // 因销售价发生变化,重置工时提成和提成比例 + val.examineHourPrice = '' + this.royaltiesRatio = '' + }, // 计算提成比例 = 工时提成 / 销售价 royaltiesRatioInput(val) { - this.royaltiesRatio = Math.round((((parseFloat(val.examineHourPrice !== '' ? val.examineHourPrice : '0') / parseFloat(this.calculatePrice)) * 100).toFixed(2)) * 100) / 100 + this.royaltiesRatio = Math.round((((parseFloat(val.examineHourPrice !== '' ? val.examineHourPrice : '0') / parseFloat(val.price !== '' ? val.price : '0')) * 100).toFixed(2)) * 100) / 100 }, // 计算工时提成 = 销售价 * 提成比例 examineHourPriceInput(val) { - val.examineHourPrice = Math.round((parseFloat(this.calculatePrice) * ((parseFloat(this.royaltiesRatio !== '' ? this.royaltiesRatio : '0') / 100)).toFixed(2)) * 100) / 100 + val.examineHourPrice = Math.round((parseFloat(val.price !== '' ? val.price : '0') * ((parseFloat(this.royaltiesRatio !== '' ? this.royaltiesRatio : '0') / 100)).toFixed(2)) * 100) / 100 }, saveOrUpdate() { - this.formobj.price = this.calculatePrice this.$refs['form_obj'].validate((valid) => { if (valid) { this.submitdisabled = true @@ -338,6 +336,7 @@ export default { subjectName: '', subjectSid: '' } + this.royaltiesRatio = '' this.submitdisabled = false this.$emit('doback') } diff --git a/yxt-as-ui/src/views/maintenance/maintenanceReturnBound/relation/chooseproducts.vue b/yxt-as-ui/src/views/maintenance/maintenanceReturnBound/relation/chooseproducts.vue deleted file mode 100644 index 1141cc140a..0000000000 --- a/yxt-as-ui/src/views/maintenance/maintenanceReturnBound/relation/chooseproducts.vue +++ /dev/null @@ -1,205 +0,0 @@ - - - - diff --git a/yxt-as-ui/src/views/maintenanceReceive/index.vue b/yxt-as-ui/src/views/maintenanceReceive/index.vue new file mode 100644 index 0000000000..cc9d7b7253 --- /dev/null +++ b/yxt-as-ui/src/views/maintenanceReceive/index.vue @@ -0,0 +1,392 @@ + + + + diff --git a/yxt-as-ui/src/views/maintenanceReceive/maintenanceConfirm.vue b/yxt-as-ui/src/views/maintenanceReceive/maintenanceConfirm.vue new file mode 100644 index 0000000000..82d2f5ef28 --- /dev/null +++ b/yxt-as-ui/src/views/maintenanceReceive/maintenanceConfirm.vue @@ -0,0 +1,323 @@ + + + + diff --git a/yxt-as-ui/src/views/maintenance/maintenanceOutbound/index.vue b/yxt-as-ui/src/views/maintenanceReceive/maintenanceOutbound.vue similarity index 86% rename from yxt-as-ui/src/views/maintenance/maintenanceOutbound/index.vue rename to yxt-as-ui/src/views/maintenanceReceive/maintenanceOutbound.vue index 306e9f19ea..f95e36cf91 100644 --- a/yxt-as-ui/src/views/maintenance/maintenanceOutbound/index.vue +++ b/yxt-as-ui/src/views/maintenanceReceive/maintenanceOutbound.vue @@ -7,7 +7,7 @@
【新增】维修出库
- 选择维修工单 + 出库 关闭
@@ -115,7 +115,10 @@
是否外出
- {{formobj.subject}} + + + +
@@ -136,12 +139,12 @@ - +
@@ -159,7 +162,7 @@ - + @@ -172,6 +175,13 @@
商品列表
+ + +
前台登记时对商品要求备注
+ +
+
@@ -180,25 +190,25 @@ 删除 - + - + - - - - + + - + - - + + + -
-
附加项目
- 添加 -
+
附加项目
+ + +
外出费(元)
+ +
+ +
备注
+ +
+
+ + +
厂家补助(元)
+ +
+ +
备注
+ +
+
+ + +
施救费(元)
+ +
+ +
备注
+ +
+ +
+
+
+ +
+ + 点击上传 + +
+
+
- - - - - - +
+ + + + + + + +
+
-
合计金额:
- {{ jeTotal }} = 工时费:{{ gsfTotal }} + 材料费:{{ clfTotal }} + 附加费:{{ fjfTotal }} + 税额:{{ seTotal }} +
应收合计:
+ {{ ysTotal }} = 工时费:{{ gsfTotal }} + 材料费:{{ clfTotal }} + 附加费:{{ fjfTotal }} + 税额:0
-
应收金额:
- {{ ysjeTotal }} = 合计金额:{{ jeTotal }} - 优惠: - 优惠券: - 积分抵扣: +
实收合计:
+ {{ ssTotal }} = 应收合计:{{ ysTotal }} - 优惠:{{ yhTotal }}
@@ -446,7 +487,7 @@
应收金额
- {{ ysjeTotal }} + {{ ysTotal }}
@@ -504,8 +545,9 @@ import req from '@/api/operation/repairbill' import maintenanceitem from '@/api/basicinformation/maintenanceitem' import additionitem from '@/api/basicinformation/additionitem' -import { getServiceType, selAllByOrgSidPath, selSubjectInfo, getGroupList, typeValues } from '@/api/Common/dictcommons' +import { selAllByOrgSidPath, selSubjectInfo, getGroupList, typeValues } from '@/api/Common/dictcommons' import customer from '../../operation/preregistration/relation/customer' +import { getStorage } from '@/utils/auth' export default { name: 'RepairBillAdd', @@ -517,15 +559,23 @@ export default { viewTitle: '', viewState: 1, submitdisabled: false, + updateAction: process.env.VUE_APP_BASE_API + '/portal/file/upload', + fileList: [], + headers: { + token: window.sessionStorage.getItem('token') + }, user_list: [], // 服务顾问 - serviceType_list: [], // 工种 subject_list: [], // 科目 + claimManufacturer_list: [], // 索赔厂家 group_list: [], // 班组 + mainRepairersChange_list: [], // 主修人 settleVisible: false, // 结算弹框 billType_list: [], // 单据类型 responsibility_list: [], // 责任划分 - otherInsuranceType_list: [], // 对方险种 - accidentType_list: [], // 出险类型 + responsibilityRatio_list: [], // 对方险种 + useInsurer_list: [], // 使用保险方 + insuranceType_list: [], // 使用险种 + insuranceCompany_list: [], // 保险公司 invoiceType_list: [], // 发票类型 settle_list: [], // 结算方式 otherSettle_list: [], // 其他结算方式 @@ -558,29 +608,36 @@ export default { } }, subjoinData: [], + // insurance保险信息 + insuranceKey: 3, formobj: { sid: '', - createByName: '', - operator: '', + registerRemarks: '', billNo: '', - billType: '', + createByName: '', + deptName: '', + createDate: '', billTypeKey: '', - entryTime: '', - estimatedFinishTime: '', + billType: '', subjectSid: '', subject: '', + claimManufacturerSid: '', + claimManufacturer: '', + isGoOut: '', + estimatedFinishTime: '', + entryTime: '', + nodeName: '', + waitorName: '', + waitorSid: '', groupSid: '', groupName: '', - waitorSid: '', - waitorName: '', mainRepairers: '', - barCode: '', - shotRemarks: '', printRemarks: '', + remarks: '', + isSpecialSign: '', discountAmount: '', coupon: '', scoreDeduct: '', - nodeName: '', nodeTime: '', outDoorState: '', outDoorTime: '', @@ -588,6 +645,7 @@ export default { customerName: '', mobile: '', customerOrg: '', + customerSource: '', memberCardSid: '', memberCarNumber: '', vehMark: '', @@ -596,43 +654,28 @@ export default { mileage: '', oil: '', currentMileage: '', - receivableAmount: '', + dockingPeopleSid: '', + dockingPeople: '', + dockingPhone: '', invoiceVo: { isInvoicing: '', invoiceType: '', invoiceTypeKey: '', - invoiceTitle: '', - taxpayerNo: '', - invoiceCode: '', - taxRate: '' + invoiceCompanySid: '', + invoiceCompany: '' }, insuranceVo: { responsibility: '', responsibilityKey: '', - otherInsuranceType: '', - otherInsuranceTypeKey: '', - insuranceCompany1: '', - insuranceCompany2: '', - insurer: '', - claimBillNo: '', - investigator: '', - lossAdjuster: '', - isSpecialSign: '', - accidentType: '', - accidentTypeKey: '' - }, - otherVo: { - manufacturer: '', - senderName: '', - senderMobile: '' + isPersonInjuries: '', + responsibilityRatioKey: '', + responsibilityRatio: '', + insuranceList: [] }, sitemVos: [], aitemVos: [], goodsDetailsVos: [], - orgPath: '', createBySid: '', - deptSid: '', - deptName: '', operatorSid: '', nodeCode: '', settleVo: { @@ -645,17 +688,36 @@ export default { settleAmount: '', otherSettleKey: '', otherSettleValue: '', - otherSettleAmount: '', debts: '', - settleTime: '' + settleTime: '', + otherSettleAmount: '' }, - showReSettleBtn: true + showReSettleBtn: true, + hourAmount: '', + otherAmount: '', + goodsAmount: '', + addAmount: '', + taxAmount: '', + outAmount: '', + subsidyAmount: '', + rescueAmount: '', + actualAmount: '', + receivableAmount: '', + subsidyRemarks: '', + rescueRemarks: '', + outRemarks: '', + fileName: '', + operator: '', + useOrgSid: '', + createOrgSid: '' }, rules: { billType: [{ required: true, message: '工单类型不能为空', trigger: 'change' }], + isGoOut: [{ required: true, message: '是否外出不能为空', trigger: 'change' }], subject: [{ required: true, message: '科目不能为空', trigger: 'change' }], estimatedFinishTime: [{ required: true, message: '预计完工不能为空', trigger: 'change' }], waitorName: [{ required: true, message: '服务顾问不能为空', trigger: 'change' }], + isSpecialSign: [{ required: true, message: '特殊标志不能为空', trigger: 'change' }], customerName: [{ required: true, message: '客户信息不能为空', trigger: 'change' }], 'settleVo.payerName': [{ required: true, message: '付款人姓名不能为空', trigger: 'blur' }], 'settleVo.settleValue': [{ required: true, message: '结算方式不能为空', trigger: 'change' }], @@ -677,21 +739,22 @@ export default { } return gsf }, - // 计算材料费 = 商品列表中所有销售价之和 + // 计算材料费 = 商品列表中所有销售价 * 数量的和 clfTotal() { let clf = '0' if (this.formobj.goodsDetailsVos.length > 0) { this.formobj.goodsDetailsVos.forEach((e) => { if (e.goodsSpuName !== '') { - clf = Math.round((parseFloat(clf) + parseFloat(e.price !== '' ? e.price : '0')) * 100) / 100 + clf = Math.round((parseFloat(clf) + (parseFloat(e.price !== '' ? e.price : '0') * parseFloat(e.count !== '' ? e.count : '0'))) * 100) / 100 } }) } return clf }, - // 计算附加费 == 附加项目列表中所有销售价之和 + // 计算附加费 == 外出费 + 厂家补助 + 施救费 + 附加项目列表中所有销售价之和 fjfTotal() { let fjf = '0' + fjf = parseFloat(this.formobj.outAmount !== '' ? this.formobj.outAmount : '0') + parseFloat(this.formobj.subsidyAmount !== '' ? this.formobj.subsidyAmount : '0') + parseFloat(this.formobj.rescueAmount !== '' ? this.formobj.rescueAmount : '0') if (this.formobj.aitemVos.length > 0) { this.formobj.aitemVos.forEach((e) => { if (e.aitemName !== '') { @@ -701,28 +764,41 @@ export default { } return fjf }, - // 计算税额 = 材料费 * 税率 - seTotal() { - let se = '0' - se = Math.round((parseFloat(this.clfTotal) * (parseFloat(this.formobj.invoiceVo.taxRate !== '' ? this.formobj.invoiceVo.taxRate : '0') / 100)) * 100) / 100 - return se + // 计算应收合计 = 工时费 + 材料费 + 附加费 + 税额 + ysTotal() { + let ys = '0' + ys = Math.round((parseFloat(ys) + parseFloat(this.gsfTotal) + parseFloat(this.clfTotal) + parseFloat(this.fjfTotal)) * 100) / 100 + return ys }, - // 计算合计金额 = 工时费 + 材料费 + 附加费 + 税额 - jeTotal() { - let je = '0' - je = Math.round((parseFloat(je) + parseFloat(this.gsfTotal) + parseFloat(this.clfTotal) + parseFloat(this.fjfTotal) + parseFloat(this.seTotal)) * 100) / 100 - return je + // 优惠 = 服务项目列表中的所有优惠之和 + 商品列表中所有优惠之和 + yhTotal() { + let yh = '0' + if (this.formobj.sitemVos.length > 0) { + this.formobj.sitemVos.forEach((e) => { + if (e.serviceItem !== '') { + yh = Math.round((parseFloat(yh) + parseFloat(e.discountAmount !== '' ? e.discountAmount : '0')) * 100) / 100 + } + }) + } + if (this.formobj.goodsDetailsVos.length > 0) { + this.formobj.goodsDetailsVos.forEach((e) => { + if (e.goodsSpuName !== '') { + yh = Math.round((parseFloat(yh) + parseFloat(e.discountAmount !== '' ? e.discountAmount : '0')) * 100) / 100 + } + }) + } + return yh }, - // 计算应收金额 - ysjeTotal() { + // 计算实收合计 = 应收合计 - 优惠 + ssTotal() { let ysje = '0' - ysje = Math.round((parseFloat(ysje) + parseFloat(this.jeTotal) - parseFloat(this.formobj.discountAmount !== '' ? this.formobj.discountAmount : '0') - parseFloat(this.formobj.coupon !== '' ? this.formobj.coupon : '0') - parseFloat(this.formobj.scoreDeduct !== '' ? this.formobj.scoreDeduct : '0')) * 100) / 100 + ysje = Math.round((parseFloat(ysje) + parseFloat(this.ysTotal) - parseFloat(this.yhTotal)) * 100) / 100 return ysje }, // 结算页面中计算欠款金额 = 应付金额 - 订金抵扣 - 结算金额 - 其他结算金额 qkjeTotal() { let qkje = '0' - qkje = Math.round((parseFloat(this.ysjeTotal) - parseFloat(this.formobj.settleVo.depositdeductAmount !== '' ? this.formobj.settleVo.depositdeductAmount : '0') - parseFloat(this.formobj.settleVo.settleAmount !== '' ? this.formobj.settleVo.settleAmount : '0') - parseFloat(this.formobj.settleVo.otherSettleAmount !== '' ? this.formobj.settleVo.otherSettleAmount : '0')) * 100) / 100 + // qkje = Math.round((parseFloat(this.ysjeTotal) - parseFloat(this.formobj.settleVo.depositdeductAmount !== '' ? this.formobj.settleVo.depositdeductAmount : '0') - parseFloat(this.formobj.settleVo.settleAmount !== '' ? this.formobj.settleVo.settleAmount : '0') - parseFloat(this.formobj.settleVo.otherSettleAmount !== '' ? this.formobj.settleVo.otherSettleAmount : '0')) * 100) / 100 return qkje } }, @@ -738,14 +814,24 @@ export default { this.responsibility_list = res.data } }) - typeValues({ type: 'otherInsuranceType' }).then((res) => { + typeValues({ type: 'responsibilityRatio' }).then((res) => { + if (res.success) { + this.responsibilityRatio_list = res.data + } + }) + typeValues({ type: 'useInsurer' }).then((res) => { + if (res.success) { + this.useInsurer_list = res.data + } + }) + typeValues({ type: 'insuranceType' }).then((res) => { if (res.success) { - this.otherInsuranceType_list = res.data + this.insuranceType_list = res.data } }) - typeValues({ type: 'accidentType' }).then((res) => { + typeValues({ type: 'insuranceCompany' }).then((res) => { if (res.success) { - this.accidentType_list = res.data + this.insuranceCompany_list = res.data } }) typeValues({ type: 'billingType' }).then((res) => { @@ -763,11 +849,6 @@ export default { this.otherSettle_list = res.data } }) - getServiceType({ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then((resp) => { - if (resp.success) { - this.serviceType_list = resp.data - } - }) selSubjectInfo({ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then((resp) => { if (resp.success) { this.subject_list = resp.data @@ -820,6 +901,9 @@ export default { day: nowDate.getDate() } this.formobj.createDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) + this.formobj.isGoOut = 0 + this.formobj.nodeCode = '1' + this.formobj.nodeName = '登记' }, showEdit(sid) { this.viewTitle = '【编辑】维修单' @@ -864,6 +948,14 @@ export default { this.formobj.subjectSid = '' } }, + changeClaimManufacturer(value) { + const choose = this.claimManufacturer_list.filter((item) => item.claimManufacturer === value) + if (choose.length > 0 && choose !== null) { + this.formobj.claimManufacturerSid = choose[0].claimManufacturerSid + } else { + this.formobj.claimManufacturerSid = '' + } + }, waitorChange(value) { const choose = this.user_list.filter((item) => item.name === value) if (choose.length > 0 && choose !== null) { @@ -876,8 +968,11 @@ export default { const choose = this.group_list.filter((item) => item.groupName === value) if (choose.length > 0 && choose !== null) { this.formobj.groupSid = choose[0].groupSid + this.mainRepairersChange_list = choose[0].members } else { this.formobj.groupSid = '' + this.mainRepairersChange_list = [] + this.formobj.mainRepairers = '' } }, responsibilityChange(value) { @@ -888,22 +983,54 @@ export default { this.formobj.insuranceVo.responsibilityKey = '' } }, - otherInsuranceTypeChange(value) { - const choose = this.otherInsuranceType_list.filter((item) => item.dictValue === value) + responsibilityRatioChange(value) { + const choose = this.responsibilityRatio_list.filter((item) => item.dictValue === value) if (choose.length > 0 && choose !== null) { - this.formobj.insuranceVo.otherInsuranceTypeKey = choose[0].dictKey + this.formobj.insuranceVo.responsibilityRatioKey = choose[0].dictKey } else { - this.formobj.insuranceVo.otherInsuranceTypeKey = '' + this.formobj.insuranceVo.responsibilityRatioKey = '' } }, - accidentTypeChange(value) { - const choose = this.accidentType_list.filter((item) => item.dictValue === value) - if (choose.length > 0 && choose !== null) { - this.formobj.insuranceVo.accidentTypeKey = choose[0].dictKey + insuranceAdd() { + this.formobj.insuranceVo.insuranceList.push({ + useInsurerKey: '', + useInsurer: '', + insuranceTypeKey: '', + insuranceType: '', + insuranceCompanyKey: '', + insuranceCompany: '', + claimBillNo: '', + investigator: '', + lossAdjuster: '' + }) + }, + useInsurerChange(value, row) { + const choose = this.useInsurer_list.filter((item) => item.dictKey === value) + if (choose !== null && choose.length > 0) { + row.useInsurer = choose[0].dictValue } else { - this.formobj.insuranceVo.accidentTypeKey = '' + row.useInsurer = '' } }, + insuranceTypeChange(value, row) { + const choose = this.insuranceType_list.filter((item) => item.dictKey === value) + if (choose !== null && choose.length > 0) { + row.insuranceType = choose[0].dictValue + } else { + row.insuranceType = '' + } + }, + insuranceCompanyChange(value, row) { + const choose = this.insuranceCompany_list.filter((item) => item.dictKey === value) + if (choose !== null && choose.length > 0) { + row.insuranceCompany = choose[0].dictValue + } else { + row.insuranceCompany = '' + } + }, + insuranceDelete(index) { + this.formobj.insuranceVo.insuranceList.splice(index, 1) + }, invoiceTypeChange(value) { const choose = this.invoiceType_list.filter((item) => item.dictValue === value) if (choose.length > 0 && choose !== null) { @@ -949,58 +1076,41 @@ export default { } }) }, - userChange(row, list) { - const aa = [] - list.forEach((e) => { - this.user_list.forEach((k) => { - if (e === k.sid) { - aa.push(k.name) - } - }) - }) - row.staffNameList = aa - }, serviceDelete(index) { this.formobj.sitemVos.splice(index, 1) }, serviceCurrentChange(value, row) { row.serviceItemSid = value.sid row.serviceItem = value.sitemName - row.serviceTypeSid = value.serviceType + row.serviceTypeSid = value.serviceTypeSid row.serviceType = value.serviceType row.examineHourPrice = value.examineHourPrice row.hourPrice = value.hourPrice row.hours = value.hours row.price = value.price - document.body.click() - }, - serviceTypeChange(value, row) { - const choose = this.serviceType_list.filter((item) => item.serviceType === value) - if (choose !== null && choose.length > 0) { - row.serviceTypeSid = choose[0].serviceTypeSid - } else { - row.serviceTypeSid = '' - } - }, - subjectChange(value, row) { - const choose = this.subject_list.filter((item) => item.subject === value) - if (choose !== null && choose.length > 0) { - row.subjectSid = choose[0].subjectSid - } else { - row.subjectSid = '' + row.discount = '10' + row.discountAmount = '0' + row.amount = row.price + if (this.mainRepairersChange_list.length > 0) { + this.mainRepairersChange_list.forEach((e) => { + row.staffNameList.push(e.memberName) + row.staffList.push(e.memberSid) + }) } + document.body.click() }, - // 计算销售价=工时数*工时单价 - computeXSJ(row) { - row.price = Math.round((parseFloat(row.hourPrice === '' ? '0' : row.hourPrice) * parseFloat(row.hours === '' ? '0' : row.hours)) * 100) / 100 - this.computeYHAndXSJE(row) - }, - // 计算工时数=销售价除以工时单价 - computeGSS(row) { - row.hours = Math.round((parseFloat(row.price === '' ? '0' : row.price) / parseFloat(row.hourPrice === '' ? '0' : row.hourPrice)) * 100) / 100 - this.computeYHAndXSJE(row) + userChange(row, list) { + const aa = [] + list.forEach((e) => { + this.user_list.forEach((k) => { + if (e === k.sid) { + aa.push(k.name) + } + }) + }) + row.staffNameList = aa }, - // 计算优惠、销售金额 + // 计算优惠、销售金额 -- 服务项目列表 computeYHAndXSJE(row) { // 计算优惠(销售价 * (1 - (折扣 * 0.1))) row.discountAmount = Math.round((parseFloat(row.price === '' ? '0' : row.price) * Math.round((parseFloat(1) - parseFloat(row.discount === '' ? '0' : row.discount) * parseFloat(0.1)) * 100) / 100) * 100) / 100 @@ -1011,6 +1121,17 @@ export default { row.amount = Math.round((parseFloat(row.price === '' ? '0' : row.price) - parseFloat(row.discountAmount === '' ? '0' : row.discountAmount)) * 100) / 100 } }, + // 计算优惠、销售金额 -- 上你列表 + computeYHAndJE(row) { + // 计算优惠(销售价 * 数量 * (1 - (折扣 * 0.1))) + row.discountAmount = Math.round((parseFloat(row.price === '' ? '0' : row.price) * parseFloat(row.count !== '' ? row.count : '0') * Math.round((parseFloat(1) - parseFloat(row.discount === '' ? '0' : row.discount) * parseFloat(0.1)) * 100) / 100) * 100) / 100 + // 计算销售金额(销售价 * 数量 - 优惠) + if (row.price == 0) { + row.amount = '0' + } else { + row.amount = Math.round((parseFloat(row.price === '' ? '0' : row.price) * parseFloat(row.count !== '' ? row.count : '0') - parseFloat(row.discountAmount === '' ? '0' : row.discountAmount)) * 100) / 100 + } + }, subjoinAdd() { this.formobj.aitemVos.push({ aitemSid: '', @@ -1043,6 +1164,14 @@ export default { row.price = value.price document.body.click() }, + handleSuccess(resp, file, fileList) { + if (resp.success) { + console.log(resp, file, fileList, 2222) + } + }, + handleRemove(file, fileList) { + console.log(file, fileList, 2222) + }, saveOrUpdate() { this.formobj.operator = window.sessionStorage.getItem('name') this.formobj.operatorSid = window.sessionStorage.getItem('userSid') @@ -1052,6 +1181,13 @@ export default { this.$message({ showClose: true, type: 'error', message: '服务项目列表不能为空' }) return } + this.formobj.hourAmount = this.gsfTotal // 工时费 + this.formobj.goodsAmount = this.clfTotal // 材料费 + this.formobj.addAmount = this.fjfTotal // 附加费 + this.formobj.taxAmount = '0' // 税额费 + this.formobj.receivableAmount = this.ysTotal // 应收合计 + this.formobj.actualAmount = this.ssTotal // 实收合计 + console.log(this.formobj, 88) this.submitdisabled = true req.saveOrUpdate(this.formobj).then((res) => { if (res.success) { @@ -1069,7 +1205,6 @@ export default { submit() { this.formobj.operator = window.sessionStorage.getItem('name') this.formobj.operatorSid = window.sessionStorage.getItem('userSid') - this.formobj.receivableAmount = this.ysjeTotal this.$refs['form_obj'].validate((valid) => { if (valid) { if (this.formobj.sitemVos.length === 0) { @@ -1090,6 +1225,29 @@ export default { } }) }, + toSendBack() { + this.formobj.operator = window.sessionStorage.getItem('name') + this.formobj.operatorSid = window.sessionStorage.getItem('userSid') + this.$refs['form_obj'].validate((valid) => { + if (valid) { + if (this.formobj.sitemVos.length === 0) { + this.$message({ showClose: true, type: 'error', message: '服务项目列表不能为空' }) + return + } + this.submitdisabled = true + req.sendBack(this.formobj).then((res) => { + if (res.success) { + this.$message({ showClose: true, type: 'success', message: '退回成功' }) + this.handleReturn('true') + } else { + this.submitdisabled = false + } + }).catch(() => { + this.submitdisabled = false + }) + } + }) + }, settleAccounts() { this.settleVisible = true }, @@ -1143,6 +1301,32 @@ export default { } }) }, + toPrintSettle() { + req.printSettle({ sid: this.formobj.sid }).then((res) => { + if (res.success) { + var xhr = new XMLHttpRequest() + xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '结算单', true) + xhr.setRequestHeader('token', getStorage()) + xhr.responseType = 'blob' + xhr.onload = function(e) { + // 如果请求执行成功 + var blob = this.response + var filename = '结算单.pdf' + var a = document.createElement('a') + // blob.type="application/octet-stream"; + // 创键临时url对象 + var url = URL.createObjectURL(blob) + a.href = url + a.download = filename + a.click() + // 释放之前创建的URL对象 + window.URL.revokeObjectURL(url) + } + // 发送请求 + xhr.send() + } + }) + }, resetState() { this.viewState = 1 }, @@ -1150,27 +1334,32 @@ export default { if (isreload === 'true') this.$emit('reloadlist') this.formobj = { sid: '', - createByName: '', - operator: '', + registerRemarks: '', billNo: '', - billType: '', + createByName: '', + deptName: '', + createDate: '', billTypeKey: '', - entryTime: '', - estimatedFinishTime: '', + billType: '', subjectSid: '', subject: '', + claimManufacturerSid: '', + claimManufacturer: '', + isGoOut: '', + estimatedFinishTime: '', + entryTime: '', + nodeName: '', + waitorName: '', + waitorSid: '', groupSid: '', groupName: '', - waitorSid: '', - waitorName: '', mainRepairers: '', - barCode: '', - shotRemarks: '', printRemarks: '', + remarks: '', + isSpecialSign: '', discountAmount: '', coupon: '', scoreDeduct: '', - nodeName: '', nodeTime: '', outDoorState: '', outDoorTime: '', @@ -1178,6 +1367,7 @@ export default { customerName: '', mobile: '', customerOrg: '', + customerSource: '', memberCardSid: '', memberCarNumber: '', vehMark: '', @@ -1185,44 +1375,29 @@ export default { vehModel: '', mileage: '', oil: '', - receivableAmount: '', currentMileage: '', + dockingPeopleSid: '', + dockingPeople: '', + dockingPhone: '', invoiceVo: { isInvoicing: '', invoiceType: '', invoiceTypeKey: '', - invoiceTitle: '', - taxpayerNo: '', - invoiceCode: '', - taxRate: '' + invoiceCompanySid: '', + invoiceCompany: '' }, insuranceVo: { responsibility: '', responsibilityKey: '', - otherInsuranceType: '', - otherInsuranceTypeKey: '', - insuranceCompany1: '', - insuranceCompany2: '', - insurer: '', - claimBillNo: '', - investigator: '', - lossAdjuster: '', - isSpecialSign: '', - accidentType: '', - accidentTypeKey: '' - }, - otherVo: { - manufacturer: '', - senderName: '', - senderMobile: '' + isPersonInjuries: '', + responsibilityRatioKey: '', + responsibilityRatio: '', + insuranceList: [] }, sitemVos: [], aitemVos: [], goodsDetailsVos: [], - orgPath: '', createBySid: '', - deptSid: '', - deptName: '', operatorSid: '', nodeCode: '', settleVo: { @@ -1235,11 +1410,28 @@ export default { settleAmount: '', otherSettleKey: '', otherSettleValue: '', - otherSettleAmount: '', debts: '', - settleTime: '' + settleTime: '', + otherSettleAmount: '' }, - showReSettleBtn: true + showReSettleBtn: true, + hourAmount: '', + otherAmount: '', + goodsAmount: '', + addAmount: '', + taxAmount: '', + outAmount: '', + subsidyAmount: '', + rescueAmount: '', + actualAmount: '', + receivableAmount: '', + subsidyRemarks: '', + rescueRemarks: '', + outRemarks: '', + fileName: '', + operator: '', + useOrgSid: '', + createOrgSid: '' } this.settleVisible = false this.submitdisabled = false @@ -1256,6 +1448,12 @@ export default { .addinputInfo { margin-left: 120px !important; } +.span-sty-one { + width: 180px !important; +} +.addinputInfo-one { + margin-left: 170px !important; +} /deep/ .el-form-item__error { margin-left: 120px !important; } @@ -1263,11 +1461,9 @@ export default { margin-left: 120px !important; width: calc(100% - 115px); } -.titleOne { - padding: 7px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; +.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { + display: inline; + line-height: 1px; + vertical-align: middle; } diff --git a/yxt-as-ui/src/views/operation/repairbill/repairbillBYLeaveFactory.vue b/yxt-as-ui/src/views/operation/repairbill/repairbillBYLeaveFactory.vue index f458261034..40abe7d9f0 100644 --- a/yxt-as-ui/src/views/operation/repairbill/repairbillBYLeaveFactory.vue +++ b/yxt-as-ui/src/views/operation/repairbill/repairbillBYLeaveFactory.vue @@ -92,6 +92,11 @@ + + + @@ -146,7 +153,10 @@ import ButtonBar from '@/components/ButtonBar' import req from '@/api/operation/repairbill' import repairbillAdd from './repairbillAdd' import repairbillInfo from './repairbillInfo' +import arrearsleavefactoryAdd from '../arrearsleavefactory/arrearsleavefactoryAdd' +import arrearsleavefactory from '@/api/operation/arrearsleavefactory' import { typeValues } from '@/api/Common/dictcommons' +import { getStorage } from '@/utils/auth' export default { name: 'RepairBYLeaveFactory', @@ -155,7 +165,8 @@ export default { pageye, ButtonBar, repairbillAdd, - repairbillInfo + repairbillInfo, + arrearsleavefactoryAdd }, data() { return { @@ -164,16 +175,16 @@ export default { { type: 'primary', size: 'small', - icon: 'edit', - btnKey: 'toEdit', - btnLabel: '编辑' + icon: '', + btnKey: 'toPrint', + btnLabel: '打印出门证' }, { - type: 'danger', + type: 'primary', size: 'small', - icon: 'del', - btnKey: 'doDel', - btnLabel: '删除' + icon: '', + btnKey: 'leaveFactory', + btnLabel: '欠款出厂申请' }, { type: 'info', @@ -189,6 +200,7 @@ export default { tableKey: 0, list: [], sids: [], // 用于导出的时候保存已选择的SIDs + multipleSelection: [], billType_list: [], state_list: [ { @@ -265,11 +277,11 @@ export default { btnHandle(btnKey) { console.log('XXXXXXXXXXXXXXX ' + btnKey) switch (btnKey) { - case 'toEdit': - this.toEdit() + case 'toPrint': + this.toPrint() break - case 'doDel': - this.doDel() + case 'leaveFactory': + this.leaveFactory() break case 'doClose': this.doClose() @@ -281,6 +293,7 @@ export default { // 信息条数 获取点击时当前的sid handleSelectionChange(row) { const aa = [] + this.multipleSelection = row row.forEach(element => { aa.push(element.sid) }) @@ -351,10 +364,36 @@ export default { } this.getList() }, - toEdit() { + toPrint() { if (this.sids.length === 1) { - this.viewState = 3 - this.$refs['divAdd'].showEdit(this.sids[0]) + if (this.multipleSelection[0].outDoorState === '1') { + req.printCard({ sid: this.sids[0] }).then((res) => { + if (res.success) { + var xhr = new XMLHttpRequest() + xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + '&outFileName=' + '出门证', true) + xhr.setRequestHeader('token', getStorage()) + xhr.responseType = 'blob' + xhr.onload = function(e) { + // 如果请求执行成功 + var blob = this.response + var filename = '出门证.pdf' + var a = document.createElement('a') + // blob.type="application/octet-stream"; + // 创键临时url对象 + var url = URL.createObjectURL(blob) + a.href = url + a.download = filename + a.click() + // 释放之前创建的URL对象 + window.URL.revokeObjectURL(url) + } + // 发送请求 + xhr.send() + } + }) + } else { + this.$message({ showClose: true, type: 'error', message: '请选择是否可出厂为是的记录进行操作' }) + } } else { this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) } @@ -363,35 +402,21 @@ export default { this.viewState = 4 this.$refs['divInfo'].showInfo(row) }, - // 删除 - doDel() { - if (this.sids.length === 0) { - this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) - return + leaveFactory() { + if (this.sids.length === 1) { + if (this.multipleSelection[0].subject === '保外' && this.multipleSelection[0].outDoorState === '0') { + arrearsleavefactory.init(this.sids[0]).then((res) => { + if (res.success) { + this.viewState = 5 + this.$refs['divQKCC'].showAdd(res.data) + } + }) + } else { + this.$message({ showClose: true, type: 'error', message: '请选择是否可出厂为否且科目为保外的记录进行操作' }) + } + } else { + this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) } - const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' - this.$confirm(tip, '提示', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning' - }).then(() => { - const loading = this.$loading({ - lock: true, - text: 'Loading', - spinner: 'el-icon-loading', - background: 'rgba(0, 0, 0, 0.7)' - }) - req.deleteBySids(this.sids).then(resp => { - if (resp.success) { - this.$message({ type: 'success', message: resp.msg, showClose: true }) - } - this.getList() - loading.close() - }).catch(e => { - loading.close() - }) - }).catch(() => { - }) }, // 修改、编辑、详情返回列表页面 resetState() { diff --git a/yxt-as-ui/src/views/operation/repairbill/repairbillByBeCompleted.vue b/yxt-as-ui/src/views/operation/repairbill/repairbillByBeCompleted.vue index 9de3348687..58a81b93ac 100644 --- a/yxt-as-ui/src/views/operation/repairbill/repairbillByBeCompleted.vue +++ b/yxt-as-ui/src/views/operation/repairbill/repairbillByBeCompleted.vue @@ -136,6 +136,34 @@ + + + + + + + + + + + + + + + + + + +
@@ -160,7 +188,22 @@ export default { data() { return { btndisabled: false, + dialogVisible: false, + gsfKey: 1, + index: 0, + formobj: { + sid: '', + list: [] + }, + allocationProportion_list: [], btnList: [ + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'toConfirm', + btnLabel: '确认工时费比例' + }, { type: 'primary', size: 'small', @@ -265,6 +308,9 @@ export default { btnHandle(btnKey) { console.log('XXXXXXXXXXXXXXX ' + btnKey) switch (btnKey) { + case 'toConfirm': + this.toConfirm() + break case 'toEdit': this.toEdit() break @@ -351,6 +397,32 @@ export default { } this.getList() }, + toConfirm() { + req.detailsByManHourFee(this.sids).then((res) => { + if (res.success) { + this.dialogVisible = true + this.formobj = res.data + } + }) + }, + allocationProportionChange(value, row) { + const choose = this.allocationProportion_list.filter((item) => item.dictKey === value) + if (choose !== null && choose.length > 0) { + row.allocationProportion = choose[0].dictValue + row.allotmentAmount = Math.round((parseFloat(row.manHourFee) * parseFloat(row.allocationProportion)) * 100) / 100 + } else { + row.allocationProportion = '' + row.allotmentAmount = '' + } + }, + handleConfirm() { + req.saveByManHourFee(this.formobj).then((res) => { + if (res.success) { + this.dialogVisible = false + this.$message({ showClose: true, type: 'success', message: '保存成功' }) + } + }) + }, toEdit() { if (this.sids.length === 1) { this.viewState = 3 diff --git a/yxt-as-ui/src/views/operation/repairbill/repairbillBySettleAccounts.vue b/yxt-as-ui/src/views/operation/repairbill/repairbillBySettleAccounts.vue index 5e58aff051..99f9d4d3a3 100644 --- a/yxt-as-ui/src/views/operation/repairbill/repairbillBySettleAccounts.vue +++ b/yxt-as-ui/src/views/operation/repairbill/repairbillBySettleAccounts.vue @@ -136,8 +136,6 @@ - - @@ -150,7 +148,6 @@ import arrearsleavefactory from '@/api/operation/arrearsleavefactory' import { typeValues } from '@/api/Common/dictcommons' import repairbillAdd from './repairbillAdd' import repairbillInfo from './repairbillInfo' -import arrearsleavefactoryAdd from '../arrearsleavefactory/arrearsleavefactoryAdd' export default { name: 'RepairBillBySettleAccounts', @@ -159,8 +156,7 @@ export default { pageye, ButtonBar, repairbillAdd, - repairbillInfo, - arrearsleavefactoryAdd + repairbillInfo }, data() { return { @@ -173,13 +169,6 @@ export default { btnKey: 'toEdit', btnLabel: '编辑' }, - { - type: 'primary', - size: 'small', - icon: '', - btnKey: 'leaveFactory', - btnLabel: '欠款出厂' - }, { type: 'danger', size: 'small', @@ -201,7 +190,6 @@ export default { tableKey: 0, list: [], sids: [], // 用于导出的时候保存已选择的SIDs - multipleSelection: [], billType_list: [], state_list: [ { @@ -281,9 +269,6 @@ export default { case 'toEdit': this.toEdit() break - case 'leaveFactory': - this.leaveFactory() - break case 'doDel': this.doDel() break @@ -297,7 +282,6 @@ export default { // 信息条数 获取点击时当前的sid handleSelectionChange(row) { const aa = [] - this.multipleSelection = row row.forEach(element => { aa.push(element.sid) }) @@ -376,22 +360,6 @@ export default { this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) } }, - leaveFactory() { - if (this.sids.length === 1) { - if (this.multipleSelection[0].subject === '保外') { - arrearsleavefactory.init(this.sids[0]).then((res) => { - if (res.success) { - this.viewState = 5 - this.$refs['divQKCC'].showAdd(res.data) - } - }) - } else { - this.$message({ showClose: true, type: 'error', message: '请选择科目为保外的记录进行操作' }) - } - } else { - this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) - } - }, toInfo(row) { this.viewState = 4 this.$refs['divInfo'].showInfo(row) diff --git a/yxt-as-ui/src/views/operation/repairbill/repairbillInfo.vue b/yxt-as-ui/src/views/operation/repairbill/repairbillInfo.vue index 86bed6ca75..6f898e5d84 100644 --- a/yxt-as-ui/src/views/operation/repairbill/repairbillInfo.vue +++ b/yxt-as-ui/src/views/operation/repairbill/repairbillInfo.vue @@ -34,16 +34,20 @@ {{ formobj.subject }}
-
环节
- {{ formobj.nodeName }} +
索赔厂家
+ {{ formobj.claimManufacturer }}
+ +
是否外出
+ {{ formobj.isGoOut == '1' ? '是' : '否' }} +
进厂时间
{{ formobj.entryTime }}
- +
预计完工
{{ formobj.estimatedFinishTime }}
@@ -63,10 +67,6 @@
- -
快捷备注
- {{ formobj.shotRemarks }} -
备注(打印)
{{ formobj.printRemarks }} @@ -75,6 +75,10 @@
备注
{{ formobj.remarks }}
+ +
特殊标注
+ {{ formobj.isSpecialSign == '1' ? '有' : '否' }} +
@@ -88,8 +92,8 @@ {{ formobj.mobile }} -
客户单位
- {{ formobj.customerOrg }} +
客户来源
+ {{ formobj.customerSource }}
@@ -121,19 +125,15 @@
- + -
送修人姓名
- {{ formobj.otherVo.senderName }} +
对接人姓名
+ {{ formobj.dockingPeople }}
- -
送修人电话
- {{ formobj.otherVo.senderMobile }} -
- -
厂家
- {{ formobj.otherVo.manufacturer }} + +
对接人电话
+ {{ formobj.dockingPhone }}
@@ -143,77 +143,38 @@
责任划分
{{ formobj.insuranceVo.responsibility }} - -
对方险种
- {{ formobj.insuranceVo.otherInsuranceType }} -
- - - -
保险公司1
- {{ formobj.insuranceVo.insuranceCompany1 }} -
- -
保险公司2
- {{ formobj.insuranceVo.insuranceCompany2 }} -
-
保险索赔单号
- {{ formobj.insuranceVo.claimBillNo }} +
责任比例
+ {{ formobj.insuranceVo.responsibilityRatio }}
-
- - -
保险人员
- {{ formobj.insuranceVo.insurer }} -
- -
勘察员
- {{ formobj.insuranceVo.investigator }} -
- -
定损员
- {{ formobj.insuranceVo.lossAdjuster }} -
-
- -
特殊标志
- {{ formobj.insuranceVo.isSpecialSign == '1' ? '是' : '否' }} -
- -
出险类型
- {{ formobj.insuranceVo.accidentType }} +
是否存在人伤
+ {{ formobj.insuranceVo.isPersonInjuries == '1' ? '是' : formobj.insuranceVo.isPersonInjuries == '0' ? '否' : '' }}
+ + + + + + + + +
是否开发票
- {{ formobj.invoiceVo.isInvoicing == '1' ? '是' : '否' }} + {{ formobj.invoiceVo.isInvoicing == '1' ? '是' : formobj.invoiceVo.isInvoicing == '0' ? '否' : '' }}
发票类型
{{ formobj.invoiceVo.invoiceType }}
-
开票名称
- {{ formobj.invoiceVo.invoiceTitle }} -
-
- - -
税号
- {{ formobj.invoiceVo.taxpayerNo }} -
- -
发票号码
- {{ formobj.invoiceVo.invoiceCode }} -
- -
税率(%)
- {{ formobj.invoiceVo.taxRate }} +
开票单位
+ {{ formobj.invoiceVo.invoiceCompany }}
@@ -223,18 +184,23 @@ - - + - +
商品
+ + +
前台登记时对商品要求备注
+ {{ formobj.registerRemarks }} +
+
@@ -251,22 +217,55 @@
附加项目
+ + +
外出费(元)
+ {{ formobj.outAmount }} +
+ +
备注
+ {{ formobj.outRemarks }} +
+
+ + +
厂家补助(元)
+ {{ formobj.subsidyAmount }} +
+ +
备注
+ {{ formobj.subsidyRemarks }} +
+
+ + +
施救费(元)
+ {{ formobj.rescueAmount }} +
+ +
备注
+ {{ formobj.rescueRemarks }} +
+ + + +
- + -
合计金额:
- {{ jeTotal }} = 工时费:{{ gsfTotal }} + 材料费:{{ clfTotal }} + 附加费:{{ fjfTotal }} + 税额:{{ seTotal }} +
应收合计:
+ {{ ysTotal }} = 工时费:{{ gsfTotal }} + 材料费:{{ clfTotal }} + 附加费:{{ fjfTotal }} + 税额:0
-
应收金额:
- {{ ysjeTotal }} = 合计金额:{{ jeTotal }} - 优惠:{{ formobj.discountAmount }} - 优惠券:{{ formobj.coupon }} - 积分抵扣:{{ formobj.scoreDeduct }} +
实收合计:
+ {{ ssTotal }} = 应收合计:{{ ysTotal }} - 优惠:{{ yhTotal }}
@@ -296,29 +295,36 @@ export default { serviceKey: 1, // subjoin附加项目 subjoinKey: 2, + // insuranceKey保险信息 + insuranceKey: 3, formobj: { sid: '', - createByName: '', - operator: '', + registerRemarks: '', billNo: '', - billType: '', + createByName: '', + deptName: '', + createDate: '', billTypeKey: '', - entryTime: '', - estimatedFinishTime: '', + billType: '', subjectSid: '', subject: '', + claimManufacturerSid: '', + claimManufacturer: '', + isGoOut: '', + estimatedFinishTime: '', + entryTime: '', + nodeName: '', + waitorName: '', + waitorSid: '', groupSid: '', groupName: '', - waitorSid: '', - waitorName: '', mainRepairers: '', - barCode: '', - shotRemarks: '', printRemarks: '', + remarks: '', + isSpecialSign: '', discountAmount: '', coupon: '', scoreDeduct: '', - nodeName: '', nodeTime: '', outDoorState: '', outDoorTime: '', @@ -326,6 +332,7 @@ export default { customerName: '', mobile: '', customerOrg: '', + customerSource: '', memberCardSid: '', memberCarNumber: '', vehMark: '', @@ -334,42 +341,28 @@ export default { mileage: '', oil: '', currentMileage: '', + dockingPeopleSid: '', + dockingPeople: '', + dockingPhone: '', invoiceVo: { isInvoicing: '', invoiceType: '', invoiceTypeKey: '', - invoiceTitle: '', - taxpayerNo: '', - invoiceCode: '', - taxRate: '' + invoiceCompanySid: '', + invoiceCompany: '' }, insuranceVo: { responsibility: '', responsibilityKey: '', - otherInsuranceType: '', - otherInsuranceTypeKey: '', - insuranceCompany1: '', - insuranceCompany2: '', - insurer: '', - claimBillNo: '', - investigator: '', - lossAdjuster: '', - isSpecialSign: '', - accidentType: '', - accidentTypeKey: '' - }, - otherVo: { - manufacturer: '', - senderName: '', - senderMobile: '' + isPersonInjuries: '', + responsibilityRatioKey: '', + responsibilityRatio: '', + insuranceList: [] }, sitemVos: [], aitemVos: [], goodsDetailsVos: [], - orgPath: '', createBySid: '', - deptSid: '', - deptName: '', operatorSid: '', nodeCode: '', settleVo: { @@ -383,9 +376,27 @@ export default { otherSettleKey: '', otherSettleValue: '', debts: '', - settleTime: '' + settleTime: '', + otherSettleAmount: '' }, - showReSettleBtn: true + showReSettleBtn: true, + hourAmount: '', + otherAmount: '', + goodsAmount: '', + addAmount: '', + taxAmount: '', + outAmount: '', + subsidyAmount: '', + rescueAmount: '', + actualAmount: '', + receivableAmount: '', + subsidyRemarks: '', + rescueRemarks: '', + outRemarks: '', + fileName: '', + operator: '', + useOrgSid: '', + createOrgSid: '' }, rules: {} } @@ -403,21 +414,22 @@ export default { } return gsf }, - // 计算材料费 = 商品列表中所有销售价之和 + // 计算材料费 = 商品列表中所有销售价 * 数量的和 clfTotal() { let clf = '0' if (this.formobj.goodsDetailsVos.length > 0) { this.formobj.goodsDetailsVos.forEach((e) => { if (e.goodsSpuName !== '') { - clf = Math.round((parseFloat(clf) + parseFloat(e.price !== '' ? e.price : '0')) * 100) / 100 + clf = Math.round((parseFloat(clf) + (parseFloat(e.price !== '' ? e.price : '0') * parseFloat(e.count !== '' ? e.count : '0'))) * 100) / 100 } }) } return clf }, - // 计算附加费 == 附加项目列表中所有销售价之和 + // 计算附加费 == 外出费 + 厂家补助 + 施救费 + 附加项目列表中所有销售价之和 fjfTotal() { let fjf = '0' + fjf = parseFloat(this.formobj.outAmount !== '' ? this.formobj.outAmount : '0') + parseFloat(this.formobj.subsidyAmount !== '' ? this.formobj.subsidyAmount : '0') + parseFloat(this.formobj.rescueAmount !== '' ? this.formobj.rescueAmount : '0') if (this.formobj.aitemVos.length > 0) { this.formobj.aitemVos.forEach((e) => { if (e.aitemName !== '') { @@ -427,22 +439,35 @@ export default { } return fjf }, - // 计算税额 = 材料费 * 税率 - seTotal() { - let se = '0' - se = Math.round((parseFloat(this.clfTotal) * (parseFloat(this.formobj.invoiceVo.taxRate !== '' ? this.formobj.invoiceVo.taxRate : '0') / 100)) * 100) / 100 - return se + // 计算应收合计 = 工时费 + 材料费 + 附加费 + 税额 + ysTotal() { + let ys = '0' + ys = Math.round((parseFloat(ys) + parseFloat(this.gsfTotal) + parseFloat(this.clfTotal) + parseFloat(this.fjfTotal)) * 100) / 100 + return ys }, - // 计算合计金额 = 工时费 + 材料费 + 附加费 + 税额 - jeTotal() { - let je = '0' - je = Math.round((parseFloat(je) + parseFloat(this.gsfTotal) + parseFloat(this.clfTotal) + parseFloat(this.fjfTotal) + parseFloat(this.seTotal)) * 100) / 100 - return je + // 优惠 = 服务项目列表中的所有优惠之和 + 商品列表中所有优惠之和 + yhTotal() { + let yh = '0' + if (this.formobj.sitemVos.length > 0) { + this.formobj.sitemVos.forEach((e) => { + if (e.serviceItem !== '') { + yh = Math.round((parseFloat(yh) + parseFloat(e.discountAmount !== '' ? e.discountAmount : '0')) * 100) / 100 + } + }) + } + if (this.formobj.goodsDetailsVos.length > 0) { + this.formobj.goodsDetailsVos.forEach((e) => { + if (e.goodsSpuName !== '') { + yh = Math.round((parseFloat(yh) + parseFloat(e.discountAmount !== '' ? e.discountAmount : '0')) * 100) / 100 + } + }) + } + return yh }, - // 计算应收金额 - ysjeTotal() { + // 计算实收合计 = 应收合计 - 优惠 + ssTotal() { let ysje = '0' - ysje = Math.round((parseFloat(ysje) + parseFloat(this.jeTotal) - parseFloat(this.formobj.discountAmount !== '' ? this.formobj.discountAmount : '0') - parseFloat(this.formobj.coupon !== '' ? this.formobj.coupon : '0') - parseFloat(this.formobj.scoreDeduct !== '' ? this.formobj.scoreDeduct : '0')) * 100) / 100 + ysje = Math.round((parseFloat(ysje) + parseFloat(this.ysTotal) - parseFloat(this.yhTotal)) * 100) / 100 return ysje } }, @@ -470,32 +495,37 @@ export default { }, negativeSettlement() { this.viewState = 2 - this.$refs['divFJS'].showAdd(this.formobj.sid ) + this.$refs['divFJS'].showAdd(this.formobj.sid) }, handleReturn() { this.formobj = { sid: '', - createByName: '', - operator: '', + registerRemarks: '', billNo: '', - billType: '', + createByName: '', + deptName: '', + createDate: '', billTypeKey: '', - entryTime: '', - estimatedFinishTime: '', + billType: '', subjectSid: '', subject: '', + claimManufacturerSid: '', + claimManufacturer: '', + isGoOut: '', + estimatedFinishTime: '', + entryTime: '', + nodeName: '', + waitorName: '', + waitorSid: '', groupSid: '', groupName: '', - waitorSid: '', - waitorName: '', mainRepairers: '', - barCode: '', - shotRemarks: '', printRemarks: '', + remarks: '', + isSpecialSign: '', discountAmount: '', coupon: '', scoreDeduct: '', - nodeName: '', nodeTime: '', outDoorState: '', outDoorTime: '', @@ -503,6 +533,7 @@ export default { customerName: '', mobile: '', customerOrg: '', + customerSource: '', memberCardSid: '', memberCarNumber: '', vehMark: '', @@ -511,42 +542,28 @@ export default { mileage: '', oil: '', currentMileage: '', + dockingPeopleSid: '', + dockingPeople: '', + dockingPhone: '', invoiceVo: { isInvoicing: '', invoiceType: '', invoiceTypeKey: '', - invoiceTitle: '', - taxpayerNo: '', - invoiceCode: '', - taxRate: '' + invoiceCompanySid: '', + invoiceCompany: '' }, insuranceVo: { responsibility: '', responsibilityKey: '', - otherInsuranceType: '', - otherInsuranceTypeKey: '', - insuranceCompany1: '', - insuranceCompany2: '', - insurer: '', - claimBillNo: '', - investigator: '', - lossAdjuster: '', - isSpecialSign: '', - accidentType: '', - accidentTypeKey: '' - }, - otherVo: { - manufacturer: '', - senderName: '', - senderMobile: '' + isPersonInjuries: '', + responsibilityRatioKey: '', + responsibilityRatio: '', + insuranceList: [] }, sitemVos: [], aitemVos: [], goodsDetailsVos: [], - orgPath: '', createBySid: '', - deptSid: '', - deptName: '', operatorSid: '', nodeCode: '', settleVo: { @@ -560,9 +577,27 @@ export default { otherSettleKey: '', otherSettleValue: '', debts: '', - settleTime: '' + settleTime: '', + otherSettleAmount: '' }, - showReSettleBtn: true + showReSettleBtn: true, + hourAmount: '', + otherAmount: '', + goodsAmount: '', + addAmount: '', + taxAmount: '', + outAmount: '', + subsidyAmount: '', + rescueAmount: '', + actualAmount: '', + receivableAmount: '', + subsidyRemarks: '', + rescueRemarks: '', + outRemarks: '', + fileName: '', + operator: '', + useOrgSid: '', + createOrgSid: '' } this.$emit('doback') } @@ -577,4 +612,10 @@ export default { .addinputInfo { margin-left: 120px !important; } +.span-sty-one { + width: 180px !important; +} +.addinputInfo-one { + margin-left: 170px !important; +} diff --git a/yxt-as-ui/src/views/storage/deliveryNotice/index.vue b/yxt-as-ui/src/views/storage/deliveryNotice/index.vue index 8a4d5c4939..924d704a31 100644 --- a/yxt-as-ui/src/views/storage/deliveryNotice/index.vue +++ b/yxt-as-ui/src/views/storage/deliveryNotice/index.vue @@ -79,15 +79,24 @@ - + + + + + + - - + + @@ -105,6 +114,7 @@ + @@ -155,13 +165,15 @@ import pageye from '@/components/pagination/pageye' import divAdd from './receiptAdd.vue' import divInfo from './receiptInfo.vue' + import sourceBillInfo from './procurementInfo.vue' export default { components: { ButtonBar, Pagination, pageye, divAdd, - divInfo + divInfo, + sourceBillInfo }, data() { return { @@ -177,18 +189,27 @@ searchxianshitit: '显示查询条件', tableLoading: false, dataList: [], - btnList: [{ + btnList: [ + // { + // type: 'primary', + // size: 'small', + // icon: 'plus', + // btnKey: 'toAudit', + // btnLabel: '审核' + // }, + { type: 'primary', size: 'small', icon: 'plus', - btnKey: 'toAudit', - btnLabel: '审核' - }, { - type: 'primary', + btnKey: 'toAdd', + btnLabel: '新增收货单' + }, + { + type: 'danger', size: 'small', icon: 'plus', - btnKey: 'toAdd', - btnLabel: '收货' + btnKey: 'toEnd', + btnLabel: '终止' }, { type: 'info', @@ -260,6 +281,14 @@ this.loadList() }, methods: { + showSourceBillDetail(row) { + console.log("showSourceBillDetail》》》》", row) + + this.viewState = 5 + this.$refs['sourceinfo'].showInfo(row.sourceBillSid) + // this.$refs['sourceinfo'].showInfo('1b20ee30-d7d5-4cd0-8ee3-3802ddd12ff2') + + }, saveExamine() { }, @@ -291,6 +320,11 @@ console.log("val", val); this.selectionList = val + const aa = [] + val.forEach(element => { + aa.push(element.sid) + }) + this.sids = aa }, // 搜索条件效果 @@ -310,6 +344,9 @@ case 'toAdd': this.toAdd() break + case 'toEnd': + this.toEnd() + break case 'doClose': this.doClose() break @@ -359,6 +396,57 @@ } this.loadList() }, + toEnd() { + + for (var i = 0; i < this.selectionList.length; i++) { + + if (this.selectionList[i].billState == '已收货' || this.selectionList[i].billState == '已收货(部分终止)') { + this.$message({ + type: 'warning', + message: "不可选择已收货或已终止的记录。", + showClose: true + }) + return + } + } + + if (this.sids.length > 0) { + const tip = '请确认是否终止所选 ' + this.sids.length + ' 条记录?' + this.$confirm(tip, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + const loading = this.$loading({ + lock: true, + text: 'Loading', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + req.billToEnd(this.sids).then((resp) => { + loading.close() + if (resp.success) { + this.$message({ + type: 'success', + message: resp.msg, + showClose: true + }) + this.loadList() + } else { + // 根据resp.code进行异常情况处理 + } + }).catch(e => { + loading.close() + }) + }).catch(() => {}) + } else { + this.$message({ + showClose: true, + message: '请至少选择一条记录进行终止操作' + }) + } + + }, toAdd() { if (this.selectionList.length != 1) { @@ -370,7 +458,7 @@ return } - if(this.selectionList[0].billState=='已收货'){ + if (this.selectionList[0].billState == '已收货') { this.$message({ type: 'warning', message: "此记录已完成,不可重复操作。", diff --git a/yxt-as-ui/src/views/storage/deliveryNotice/procurementInfo.vue b/yxt-as-ui/src/views/storage/deliveryNotice/procurementInfo.vue new file mode 100644 index 0000000000..22ade4459c --- /dev/null +++ b/yxt-as-ui/src/views/storage/deliveryNotice/procurementInfo.vue @@ -0,0 +1,389 @@ + + + + + diff --git a/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue b/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue index 49f5be6f8f..f34ceca349 100644 --- a/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue +++ b/yxt-as-ui/src/views/storage/deliveryNotice/receiptAdd.vue @@ -48,7 +48,7 @@
供应商
+ class="addinputInfo addinputw"> @@ -67,10 +67,20 @@
- +
单据状态
{{ formobj.billState }}
+ +
* 收货人是否与上架人一致
+ + + + + + + +
@@ -117,7 +127,7 @@
--> - + @@ -196,6 +211,11 @@ width: calc(100% - 115px); } + .first_row { + border-top: 1px solid #E0E3EB; + } + + .titleOne { padding: 7px; display: flex; diff --git a/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordDaiBan.vue b/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordDaiBan.vue new file mode 100644 index 0000000000..64d7c8d20e --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordDaiBan.vue @@ -0,0 +1,413 @@ + + + + + diff --git a/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordEdit.vue b/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordEdit.vue new file mode 100644 index 0000000000..08b1da4708 --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordEdit.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordYiBan.vue b/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordYiBan.vue new file mode 100644 index 0000000000..6c977193c8 --- /dev/null +++ b/yxt-as-ui/src/views/workFlow/weixiubeianFlow/maintenanceProjectRecordYiBan.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java new file mode 100644 index 0000000000..ae526cffe6 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanu.java @@ -0,0 +1,68 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.yxt.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanu.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu
+ * Description: 索赔厂家管理.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理", description = "索赔厂家管理") +@TableName("as_service_claimanu") +public class AsServiceClaimanu extends BaseEntity { + private static final long serialVersionUID = 1L; + + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("部门sid") + private String useOrgSid; // 部门sid + @ApiModelProperty("部门名称") + private String useOrgName; // 部门名称 + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java new file mode 100644 index 0000000000..dd82d3902f --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDetailsVo.java @@ -0,0 +1,71 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuVo.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo
+ * Description: 索赔厂家管理 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 视图数据详情", description = "索赔厂家管理 视图数据详情") +public class AsServiceClaimanuDetailsVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("部门sid") + private String useOrgSid; // 部门sid + @ApiModelProperty("部门名称") + private String useOrgName; // 部门名称 + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + +} \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java new file mode 100644 index 0000000000..ad72840ea6 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuDto.java @@ -0,0 +1,72 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.dto.Dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuDto.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto
+ * Description: 索赔厂家管理 数据传输对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 数据传输对象", description = "索赔厂家管理 数据传输对象") +public class AsServiceClaimanuDto implements Dto { + + private String sid; // sid + + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("部门sid") + private String useOrgSid; // 部门sid + @ApiModelProperty("部门名称") + private String useOrgName; // 部门名称 + @ApiModelProperty("创建组织名称") + private String createOrgName; // 创建组织名称 + @ApiModelProperty("创建组织sid") + private String createOrgSid; // 创建组织sid + @ApiModelProperty("组织全路径") + private String orgPath; +} \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java new file mode 100644 index 0000000000..dbb0bc8ae1 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuQuery.java @@ -0,0 +1,60 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.query.Query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuQuery.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery
+ * Description: 索赔厂家管理 查询条件.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 查询条件", description = "索赔厂家管理 查询条件") +public class AsServiceClaimanuQuery implements Query { + + @ApiModelProperty("索赔厂家名称") + private String claiManuName; + + private String userSid; + @ApiModelProperty("菜单url") + private String menuUrl; + @ApiModelProperty("组织全路径") + private String orgPath; +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java new file mode 100644 index 0000000000..4c82a6b754 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/api/asserviceclaimanu/AsServiceClaimanuVo.java @@ -0,0 +1,64 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.api.asserviceclaimanu; + + +import com.yxt.common.core.vo.Vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuVo.java
+ * Class: com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo
+ * Description: 索赔厂家管理 视图数据对象.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Data +@ApiModel(value = "索赔厂家管理 视图数据对象", description = "索赔厂家管理 视图数据对象") +public class AsServiceClaimanuVo implements Vo { + + private String sid; // sid + + @ApiModelProperty("索赔厂家编号") + private String claiManuNo; // 索赔厂家编号 + @ApiModelProperty("索赔厂家名称") + private String claiManuName; // 索赔厂家名称 + @ApiModelProperty("排序") + private Integer sortNo; // 排序 + @ApiModelProperty("备注") + private String remarks; + @ApiModelProperty("门店") + private String useOrgName; +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java new file mode 100644 index 0000000000..4ed665035b --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.java @@ -0,0 +1,70 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.biz.asserviceclaimanu; + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo; +import org.apache.ibatis.annotations.Update; + +import java.util.List; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuMapper.java
+ * Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuMapper
+ * Description: 索赔厂家管理.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Mapper +public interface AsServiceClaimanuMapper extends BaseMapper { + + IPage selectPageVo(IPage page, @Param(Constants.WRAPPER) Wrapper qw); + + @Update("update as_service_claimanu set isDelete = '1' where sid = #{sid}") + void updateIsDel(String sid); + + @Select("select * from as_service_claimanu where sid = #{sid} and isDelete = '0'") + AsServiceClaimanu fetchIsDeleteBySid(String sid); + + @Select("select count(*) from as_service_claimanu where claiManuNo = #{claiManuNo} and useOrgSid = #{useOrgSid} and isDelete = '0'") + int checkByCodeAndUseOrgSid(@Param("claiManuNo") String claiManuNo,@Param("useOrgSid") String useOrgSid); + + @Select("select count(*) from as_service_claimanu where claiManuNo = #{claiManuNo} and useOrgSid = #{useOrgSid} and sid != #{dtoSid} and isDelete = '0'") + int checkSidByCodeAndUseOrgSid(@Param("claiManuNo") String claiManuNo,@Param("useOrgSid") String useOrgSid,@Param("dtoSid") String dtoSid); +} \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml new file mode 100644 index 0000000000..a29bcede6b --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuMapper.xml @@ -0,0 +1,11 @@ + + + + + + + \ No newline at end of file diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java new file mode 100644 index 0000000000..1716f3817a --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuRest.java @@ -0,0 +1,91 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.biz.asserviceclaimanu; + +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDetailsVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuFeignFallback.java
+ * Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuRest
+ * Description: 索赔厂家管理.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Api(tags = "索赔厂家管理") +@RestController +@RequestMapping("v1/asserviceclaimanu") +public class AsServiceClaimanuRest { + + @Autowired + private AsServiceClaimanuService asServiceClaimanuService; + + @ApiOperation("根据条件分页查询数据的列表") + @PostMapping("/listPage") + public ResultBean> listPage(@RequestBody PagerQuery pq){ + ResultBean rb = ResultBean.fireFail(); + PagerVo pv = asServiceClaimanuService.listPageVo(pq); + return rb.success().setData(pv); + } + + @ApiOperation("新增或修改") + @PostMapping("/save") + public ResultBean save(@RequestBody AsServiceClaimanuDto dto){ + return asServiceClaimanuService.saveOrUpdateDto(dto); + } + + @ApiOperation("根据sid批量删除") + @DeleteMapping("/delBySids") + public ResultBean delBySids(@RequestBody String[] sids){ + ResultBean rb = ResultBean.fireFail(); + asServiceClaimanuService.updateIsDel(sids); + return rb.success(); + } + + @ApiOperation("根据SID获取一条记录") + @GetMapping("/fetchDetailsBySid/{sid}") + public ResultBean fetchDetailsBySid(@PathVariable("sid") String sid){ + ResultBean rb = ResultBean.fireFail(); + AsServiceClaimanuDetailsVo vo = asServiceClaimanuService.fetchDetailsVoBySid(sid); + return rb.success().setData(vo); + } +} diff --git a/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java new file mode 100644 index 0000000000..403f5ec508 --- /dev/null +++ b/yxt-as/src/main/java/com/yxt/anrui/as/biz/asserviceclaimanu/AsServiceClaimanuService.java @@ -0,0 +1,203 @@ +/********************************************************* + ********************************************************* + ******************** ******************* + ************* ************ + ******* _oo0oo_ ******* + *** o8888888o *** + * 88" . "88 * + * (| -_- |) * + * 0\ = /0 * + * ___/`---'\___ * + * .' \\| |// '. * + * / \\||| : |||// \ * + * / _||||| -:- |||||- \ * + * | | \\\ - /// | | * + * | \_| ''\---/'' |_/ | * + * \ .-\__ '-' ___/-. / * + * ___'. .' /--.--\ `. .'___ * + * ."" '< `.___\_<|>_/___.' >' "". * + * | | : `- \`.;`\ _ /`;.`/ - ` : | | * + * \ \ `_. \_ __\ /__ _/ .-` / / * + * =====`-.____`.___ \_____/___.-`___.-'===== * + * `=---=' * + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * + *********__佛祖保佑__永无BUG__验收通过__钞票多多__********* + *********************************************************/ +package com.yxt.anrui.as.biz.asserviceclaimanu; + +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.yxt.anrui.as.feign.portal.privilege.PrivilegeQuery; +import com.yxt.anrui.as.feign.portal.sysorganization.SysOrganizationFeign; +import com.yxt.anrui.as.feign.portal.sysorganization.SysOrganizationVo; +import com.yxt.anrui.as.feign.portal.sysstafforg.SysStaffOrgFeign; +import com.yxt.anrui.as.feign.portal.sysuser.SysUserFeign; +import org.apache.commons.lang3.StringUtils; +import com.yxt.common.base.service.MybatisBaseService; +import com.yxt.common.base.utils.PagerUtil; +import com.yxt.common.core.query.PagerQuery; +import com.yxt.common.core.result.ResultBean; +import com.yxt.common.core.vo.PagerVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanu; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuQuery; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDetailsVo; +import com.yxt.anrui.as.api.asserviceclaimanu.AsServiceClaimanuDto; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; + +/** + * Project: yxt-as(索赔厂家管理)
+ * File: AsServiceClaimanuService.java
+ * Class: com.yxt.anrui.as.biz.asserviceclaimanu.AsServiceClaimanuService
+ * Description: 索赔厂家管理 业务逻辑.
+ * Copyright: Copyright (c) 2011
+ * Company: https://gitee.com/liuzp315
+ * Makedate: 2024-07-11 10:25:03
+ * + * @author liupopo + * @version 1.0 + * @since 1.0 + */ +@Service +public class AsServiceClaimanuService extends MybatisBaseService { + + @Autowired + private SysStaffOrgFeign sysStaffOrgFeign; + @Autowired + private SysOrganizationFeign sysOrganizationFeign; + @Autowired + private SysUserFeign sysUserFeign; + + public PagerVo listPageVo(PagerQuery pq) { + AsServiceClaimanuQuery query = pq.getParams(); + QueryWrapper qw = new QueryWrapper<>(); + //========================================数据授权开始 + if (StringUtils.isNotBlank(query.getMenuUrl())) { + PrivilegeQuery privilegeQuery = new PrivilegeQuery(); + privilegeQuery.setOrgPath(query.getOrgPath()); + privilegeQuery.setMenuUrl(query.getMenuUrl()); + privilegeQuery.setUserSid(query.getUserSid()); + ResultBean defaultIdReltBean = sysUserFeign.selectPrivilegeLevel(privilegeQuery); + if (StringUtils.isNotBlank(defaultIdReltBean.getData())) { + //数据权限ID(1集团、2事业部、3分公司、4部门、5个人) + String orgSidPath = query.getOrgPath(); + orgSidPath = orgSidPath + "/"; + int i1 = orgSidPath.indexOf("/"); + int i2 = orgSidPath.indexOf("/", i1 + 1); + int i3 = orgSidPath.indexOf("/", i2 + 1); + int i4 = orgSidPath.indexOf("/", i3 + 1); + String orgLevelKey = defaultIdReltBean.getData(); + if ("1".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i1); + qw.like("s.orgSidPath", orgSidPath); + } else if ("2".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i2); + qw.like("s.orgSidPath", orgSidPath); + } else if ("3".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i3); + qw.like("s.orgSidPath", orgSidPath); + } else if ("4".equals(orgLevelKey)) { + orgSidPath = orgSidPath.substring(0, i4); + qw.like("s.orgSidPath", orgSidPath); + } else if ("5".equals(orgLevelKey)) { + qw.eq("ac.createBySid", query.getUserSid()); + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } else { + PagerVo p = new PagerVo<>(); + return p; + } + } + if (StringUtils.isNotBlank(query.getClaiManuName())) { + qw.like("ac.claiManuName", query.getClaiManuName()); + } + qw.orderByAsc("ac.sortNo"); + qw.eq("ac.isDelete", 0); + IPage page = PagerUtil.queryToPage(pq); + IPage pagging = baseMapper.selectPageVo(page, qw); + PagerVo p = PagerUtil.pageToVo(pagging, null); + return p; + } + + public ResultBean saveOrUpdateDto(AsServiceClaimanuDto dto){ + ResultBean rb = ResultBean.fireFail(); + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + String deptName = ""; + String deptSid = ""; + String createOrgSid = ""; + String orgPath = dto.getOrgPath(); + if (StringUtils.isNotBlank(orgPath)) { + List split = Arrays.asList(orgPath.split("/")); + if (split.size() > 1) { + //获取本级sid获取本级部门信息 + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(split.size() - 1)).getData(); + deptName = sysOrganization.getName(); + deptSid = sysOrganization.getSid(); + } else { + SysOrganizationVo sysOrganization = sysOrganizationFeign.fetchBySid(split.get(0)).getData(); + deptName = sysOrganization.getName(); + deptSid = sysOrganization.getSid(); + } + dto.setUseOrgSid(deptSid); + dto.setUseOrgName(deptName); + createOrgSid = sysStaffOrgFeign.getOrgSidByPath(orgPath).getData(); + //创建组织使用组织 + ResultBean organizationResultBean = sysOrganizationFeign.fetchBySid(createOrgSid); + if (organizationResultBean.getData() != null) { + dto.setCreateOrgSid(createOrgSid); + dto.setCreateOrgName(organizationResultBean.getData().getName()); + } + } + int i = baseMapper.checkByCodeAndUseOrgSid(dto.getClaiManuNo(), dto.getUseOrgSid()); + if (i > 0) { + return rb.setMsg("编码已存在"); + } + this.insertByDto(dto); + return rb.success(); + } + int i = baseMapper.checkSidByCodeAndUseOrgSid(dto.getClaiManuNo(), dto.getUseOrgSid(), dtoSid); + if (i > 0) { + return rb.setMsg("编码已存在"); + } + this.updateByDto(dto); + return rb.success(); + } + + public void insertByDto(AsServiceClaimanuDto dto){ + AsServiceClaimanu entity = new AsServiceClaimanu(); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.insert(entity); + } + + public void updateByDto(AsServiceClaimanuDto dto){ + String dtoSid = dto.getSid(); + if (StringUtils.isBlank(dtoSid)) { + return; + } + AsServiceClaimanu entity = fetchBySid(dtoSid); + BeanUtil.copyProperties(dto, entity, "id", "sid"); + baseMapper.updateById(entity); + } + + public AsServiceClaimanuDetailsVo fetchDetailsVoBySid(String sid){ + AsServiceClaimanu entity = baseMapper.fetchIsDeleteBySid(sid); + AsServiceClaimanuDetailsVo vo = new AsServiceClaimanuDetailsVo(); + BeanUtil.copyProperties(entity, vo); + return vo; + } + + public void updateIsDel(String[] sids) { + for (String sid : sids) { + baseMapper.updateIsDel(sid); + } + } +} \ No newline at end of file