合同优化|商品默认分类修改

jg-waiwang-pro
mhsnet 6 months ago
parent 9378b8d369
commit 5266d6d54a

@ -1,7 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.ContractLMapper">
<resultMap id="contractL" type="jnpf.entity.ContractLEntity">
<id column="id" property="id"></id>
<result column="contract_type" property="contractType"></result>
<result column="contract_template_id" property="contractTemplateId"></result>
<result column="contract_number" property="contractNumber"></result>
<result column="contract_name" property="contractName"></result>
<result column="contract_no" property="contractNo"></result>
<result column="contract_signed_time" property="contractSignedTime"></result>
<result column="business_id" property="businessId"></result>
<result column="contract_period_time" property="contractPeriodTime"></result>
<result column="contract_period_time_end" property="contractPeriodTimeEnd"></result>
<result column="delivery_time" property="deliveryTime"></result>
<result column="delivery_time_end" property="deliveryTimeEnd"></result>
<result column="dept_id" property="deptId"></result>
<result column="subject" property="subject"></result>
<result column="procurement_model" property="procurementModel"></result>
<result column="related_contract_id" property="relatedContractId"></result>
<result column="related_contract_name" property="relatedContractName"></result>
<result column="subject2" property="subject2"></result>
<result column="subject3" property="subject3"></result>
<result column="delivery_model" property="deliveryModel"></result>
<result column="delivery_location" property="deliveryLocation"></result>
<result column="mode_transport" property="modeTransport"></result>
<result column="cost_bearing_mian" property="costBearingMian"></result>
<result column="pricing_model" property="pricingModel"></result>
<result column="contract_requirement" property="contractRequirement"></result>
<result column="remark" property="remark"></result>
<result column="contract_label" property="contractLabel"></result>
<result column="flow_id" property="flowId"></result>
</resultMap>
<select id="getContractLList" resultMap="contractL">
SELECT
a.id AS id,
b.f_full_name AS contract_type,
c.NAME AS contract_template_id,
a.contract_number AS contract_number,
a.contract_name AS contract_name,
a.contract_no AS contract_no,
a.contract_signed_time AS contract_signed_time,
d.NAME AS business_id,
a.contract_period_time AS contract_period_time,
a.contract_period_time_end AS contract_period_time_end,
a.delivery_time AS delivery_time,
a.delivery_time_end AS delivery_time_end,
e.f_full_name AS dept_id,
f.NAME AS SUBJECT,
CASE
f.settlement_method
WHEN '1' THEN
'先货后款'
WHEN '2' THEN
'先款后货'
END settlement_method,
m.f_full_name as procurement_model,
a.related_contract_id as related_contract_id,
g.contract_name AS related_contract_name,
f2.NAME AS subject2,
f3.NAME AS subject3,
h.f_full_name AS delivery_model,
a.delivery_location AS delivery_location,
i.f_full_name as mode_transport,
l.f_full_name as cost_bearing_mian,
n.f_full_name as pricing_model,
a.contract_requirement as contract_requirement,
a.remark as remark,
a.contract_label as contract_label
FROM
jg_contract a
LEFT JOIN ( SELECT f_full_name, f_en_code FROM base_dictionary_data WHERE f_dictionary_type_id = "519483543638772229" ) b ON a.contract_type = b.f_en_code
LEFT JOIN ( SELECT id, NAME FROM jg_contract_template ) c ON a.contract_template_id = c.id
LEFT JOIN ( SELECT id, NAME FROM jg_business_line ) d ON a.business_id = d.id
LEFT JOIN ( SELECT f_id, f_full_name FROM base_organize ) e ON a.dept_id = e.f_id
LEFT JOIN ( SELECT id, NAME, settlement_method FROM jg_subject_basic ) f ON a.SUBJECT = f.id
LEFT JOIN ( SELECT id, NAME, settlement_method FROM jg_subject_basic ) f2 ON a.subject2 = f2.id
LEFT JOIN ( SELECT id, NAME, settlement_method FROM jg_subject_basic ) f3 ON a.subject3 = f3.id
LEFT JOIN ( SELECT id, contract_name FROM jg_contract ) g ON a.related_contract_id = g.id
LEFT JOIN ( SELECT f_full_name, f_en_code FROM base_dictionary_data WHERE f_dictionary_type_id = "528909902031093765" ) h ON a.delivery_model = h.f_en_code
LEFT JOIN ( SELECT f_full_name, f_en_code FROM base_dictionary_data WHERE f_dictionary_type_id = "528911662179155973" ) i ON a.mode_transport = i.f_en_code
LEFT JOIN ( SELECT f_full_name, f_en_code FROM base_dictionary_data WHERE f_dictionary_type_id = "528912119651893253" ) l ON a.cost_bearing_mian = l.f_en_code
LEFT JOIN ( SELECT f_full_name, f_en_code FROM base_dictionary_data WHERE f_dictionary_type_id = "528918479743483909" ) n ON a.pricing_model = n.f_en_code
LEFT JOIN ( SELECT f_full_name, f_en_code FROM base_dictionary_data WHERE f_dictionary_type_id = "528908998779338757" ) m ON a.procurement_model = m.f_en_code
${ew.customSqlSegment}
<if test="contractLPagination.sidx != null and contractLPagination.sidx != ''">
ORDER BY ${contractLPagination.sidx} ${contractLPagination.sort}
</if>
</select>
<!-- <select id="getContractLList" resultMap="contractL">-->
<!-- SELECT-->
<!-- *-->
<!-- FROM-->
<!-- jg_contract-->
<!-- ${ew.customSqlSegment}-->
<!-- <if test="contractLPagination.sidx != null and contractLPagination.sidx != ''">-->
<!-- ORDER BY ${contractLPagination.sidx} ${contractLPagination.sort}-->
<!-- </if>-->
<!-- </select>-->
</mapper>

@ -1,8 +1,15 @@
package jnpf.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.entity.ContractLEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.entity.WorkOrderEntity;
import jnpf.model.contractl.ContractLPagination;
import org.apache.ibatis.annotations.Param;
import jnpf.model.workorder.WorkOrderPagination;
/**
* ContractL
@ -12,5 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* 2024-02-27
*/
public interface ContractLMapper extends BaseMapper<ContractLEntity> {
//列表查询
IPage<ContractLEntity> getContractLList(@Param("page") Page<ContractLEntity> page, @Param("contractLPagination") ContractLPagination contractLPagination, @Param("ew") Wrapper<ContractLEntity> contractLQueryWrapper);
}

@ -1,7 +1,10 @@
package jnpf.service.impl;
import com.alibaba.fastjson.JSON;
import jnpf.entity.*;
import jnpf.mapper.ContractLMapper;
import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.service.OrganizeService;
import jnpf.service.*;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.model.contractl.*;
@ -30,6 +33,10 @@ import jnpf.util.*;
import java.util.*;
import jnpf.base.UserInfo;
import jnpf.permission.entity.UserEntity;
import javax.annotation.Resource;
/**
*
* ContractL
@ -54,6 +61,10 @@ public class ContractLServiceImpl extends ServiceImpl<ContractLMapper, ContractL
private ContractLFeeClauseService contractLFeeClauseService;
@Autowired
private ContractLPaymentService contractLPaymentService;
@Resource
private ContractLMapper contractLMapper;
@Autowired
private OrganizeService organizeService;
@Override
public List<ContractLEntity> getList(ContractLPagination contractLPagination){
return getTypeList(contractLPagination,contractLPagination.getDataType());
@ -418,7 +429,15 @@ public class ContractLServiceImpl extends ServiceImpl<ContractLMapper, ContractL
if("0".equals(dataType)){
if((total>0 && AllIdList.size()>0) || total==0){
Page<ContractLEntity> page=new Page<>(contractLPagination.getCurrentPage(), contractLPagination.getPageSize());
IPage<ContractLEntity> userIPage=this.page(page, contractLQueryWrapper);
//IPage<ContractLEntity> userIPage=this.page(page, contractLQueryWrapper);
UserInfo userInfo=userProvider.get();
OrganizeEntity organizeEntity = organizeService.getInfo(userInfo.getOrganizeId());
List<String> organizeJsonId = Arrays.stream(organizeEntity.getCompanyIdTree().split(",")).collect(Collectors.toList());
String organize = JSON.toJSONString(organizeJsonId);
organize = organize.replace("[","");
organize = organize.replace("]","");
contractLQueryWrapper.like("a.organize_json_id",organize);
IPage<ContractLEntity> userIPage=contractLMapper.getContractLList(page,contractLPagination, contractLQueryWrapper);
return contractLPagination.setData(userIPage.getRecords(),userIPage.getTotal());
}else{
List<ContractLEntity> list = new ArrayList();

@ -100,18 +100,18 @@ public class ContractLController {
contractLMap.put("id", contractLMap.get("id"));
//副表数据
//子表数据
List<ContractLPriceFormulaEntity> contractLPriceFormulaList = contractLService.getContractLPriceFormulaList(entity.getId(),contractLPagination);
contractLMap.put("tableField177",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLPriceFormulaList)));
List<ContractLCommodityEntity> contractLCommodityList = contractLService.getContractLCommodityList(entity.getId(),contractLPagination);
contractLMap.put("tableField135",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLCommodityList)));
List<ContractLFeeClauseEntity> contractLFeeClauseList = contractLService.getContractLFeeClauseList(entity.getId(),contractLPagination);
contractLMap.put("tableField147",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLFeeClauseList)));
List<ContractLPaymentEntity> contractLPaymentList = contractLService.getContractLPaymentList(entity.getId(),contractLPagination);
contractLMap.put("tableField153",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLPaymentList)));
// List<ContractLPriceFormulaEntity> contractLPriceFormulaList = contractLService.getContractLPriceFormulaList(entity.getId(),contractLPagination);
// contractLMap.put("tableField177",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLPriceFormulaList)));
// List<ContractLCommodityEntity> contractLCommodityList = contractLService.getContractLCommodityList(entity.getId(),contractLPagination);
// contractLMap.put("tableField135",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLCommodityList)));
// List<ContractLFeeClauseEntity> contractLFeeClauseList = contractLService.getContractLFeeClauseList(entity.getId(),contractLPagination);
// contractLMap.put("tableField147",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLFeeClauseList)));
// List<ContractLPaymentEntity> contractLPaymentList = contractLService.getContractLPaymentList(entity.getId(),contractLPagination);
// contractLMap.put("tableField153",JsonUtil.getJsonToList(JsonUtil.getListToJsonArray(contractLPaymentList)));
realList.add(contractLMap);
}
//数据转换
realList = generaterSwapUtil.swapDataList(realList, ContractLConstant.getFormData(), ContractLConstant.getColumnData(), contractLPagination.getModuleId(),false);
// realList = generaterSwapUtil.swapDataList(realList, ContractLConstant.getFormData(), ContractLConstant.getColumnData(), contractLPagination.getModuleId(),false);
//流程状态添加
for(Map<String, Object> vo:realList){

File diff suppressed because one or more lines are too long

@ -0,0 +1,15 @@
<template>
<div class="print-box">
采购合同
</div>
</template>
<script>
export default {
data() {
return {};
}
};
</script>
<style lang="scss" scoped></style>

@ -1,5 +1,15 @@
<template>
<div :style="{ margin: '0 auto', width: '100%' }">
<!-- <el-row :gutter="15" class=""
><div style="float:right;">
<el-button @click="print()" icon="el-icon-printer">
预览合同
</el-button>
</div>
<div ref="refPrintBox" v-show="true">
<PrintBoxContractL />
</div>
</el-row> -->
<el-row :gutter="15" class="">
<el-form
ref="formRef"
@ -12,6 +22,7 @@
>
<template v-if="!loading && formOperates">
<!-- 具体表单 -->
<el-col :span="24">
<div style="padding:15px 0px">
<span style="color: #409EFF;"></span>
@ -1742,9 +1753,11 @@ import {
} from "@/components/Generator/utils/index";
import dayjs from "dayjs";
import ProductListBox from "@/views/scm/publicPopup/ProductListBox";
import printStyle from "../components/printStyle";
import PrintBoxContractL from "./PrintBoxContractL";
export default {
mixins: [comMixin],
components: { ProductListBox },
components: { ProductListBox, PrintBoxContractL },
props: [],
data() {
return {
@ -2454,6 +2467,14 @@ export default {
},
mounted() {},
methods: {
print() {
let print = this.$refs.refPrintBox.innerHTML;
let printPart = print + printStyle;
let newTab = window.open("_blank");
newTab.document.body.innerHTML = printPart;
newTab.print();
newTab.close();
},
fnDataSet() {
const queryB = {
superQueryJson: "",

@ -147,6 +147,9 @@
align="center"
width="180"
>
<template slot-scope="scope">
{{ fnTimeStr(scope.row.contractSignedTime) }}
</template>
</el-table-column>
<el-table-column
prop="businessId"
@ -160,14 +163,18 @@
label="有效期开始 "
align="center"
width="180"
>
><template slot-scope="scope">
{{ fnTimeStr(scope.row.contractPeriodTime) }}
</template>
</el-table-column>
<el-table-column
prop="contractPeriodTimeEnd"
label="有效期结束 "
align="center"
width="180"
>
><template slot-scope="scope">
{{ fnTimeStr(scope.row.contractPeriodTimeEnd) }}
</template>
</el-table-column>
<el-table-column
prop="deliveryTime"
@ -219,7 +226,7 @@
>
</el-table-column>
<el-table-column
prop="relatedContractId"
prop="relatedContractName"
label="关联销售合同"
align="center"
width="180"
@ -288,13 +295,13 @@
width="180"
>
</el-table-column>
<el-table-column
<!-- <el-table-column
prop="contractLabel"
label="合同标签"
align="center"
width="180"
>
</el-table-column>
</el-table-column> -->
<el-table-column prop="flowState" label="状态" width="100">
<template slot-scope="scope" v-if="!scope.row.top">
<el-tag v-if="scope.row.flowState == 1"></el-tag>

@ -1604,8 +1604,8 @@ export default {
1,
"productCategoryId",
"productCategoryId",
index,
"532570567123927301"
index
//"532570567123927301"
);
});
},

@ -109,7 +109,12 @@
@sort-change="sortChange"
:span-method="arraySpanMethod"
>
<el-table-column align="center" width="230" fixed="left">
<el-table-column
align="center"
width="230"
fixed="left"
label="商品名称"
>
<template slot-scope="scope" v-if="!scope.row.top">
<el-row>
<el-col :span="8">

Loading…
Cancel
Save