This commit is contained in:
xd 2024-08-09 14:30:45 +08:00
parent bbac15dbac
commit c4db16795d
8 changed files with 115 additions and 47 deletions

View File

@ -446,6 +446,18 @@ public class QuotController extends BaseController
} }
} }
//根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
Boolean isExist = false;
String quotCustomerBm = quot.getQuotCustomerBm();
String tax = SapHanaUtils.selectTaxByBm(quotCustomerBm);
if(StringUtils.isNotEmpty(tax)){
isExist = quotService.selectRegisteredCompanyByTax2(tax);
}
if(isExist){
return error("该单位有不良记录,暂停报价");
}
String quot_id = quot.getQuotId(); String quot_id = quot.getQuotId();
quot.setUpdateBy(getUsername()); quot.setUpdateBy(getUsername());
@ -749,7 +761,7 @@ public class QuotController extends BaseController
} }
/** /**
* 校验该客户税号是否在经营部注册公司名单里 * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param quot * @param quot
* @return * @return
*/ */

View File

@ -160,12 +160,19 @@ public interface QuotMapper
void saveQuotFeedbackExplanation(Quot quot); void saveQuotFeedbackExplanation(Quot quot);
/** /**
* 根据客户税号查询经营部注册公司名单里是否存在 * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param tax * @param tax
* @return * @return
*/ */
String selectRegisteredCompanyByTax(String tax); String selectRegisteredCompanyByTax(String tax);
/**
* 根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
* @param tax
* @return
*/
String selectRegisteredCompanyByTax2(String tax);
/** /**
* 统计有效报价单模块-获取报价单数据 * 统计有效报价单模块-获取报价单数据
* @param quot * @param quot

View File

@ -145,12 +145,19 @@ public interface IQuotService
void saveQuotFeedbackExplanation(Quot quot); void saveQuotFeedbackExplanation(Quot quot);
/** /**
* 根据客户税号查询经营部注册公司名单里是否存在 * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param tax * @param tax
* @return * @return
*/ */
Boolean selectRegisteredCompanyByTax(String tax); Boolean selectRegisteredCompanyByTax(String tax);
/**
* 根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
* @param tax
* @return
*/
Boolean selectRegisteredCompanyByTax2(String tax);
/** /**
* 统计有效报价单模块-获取报价单数据 * 统计有效报价单模块-获取报价单数据
* @param quot * @param quot

View File

@ -325,7 +325,7 @@ public class QuotServiceImpl implements IQuotService
} }
/** /**
* 根据客户税号查询经营部注册公司名单里是否存在 * 根据该客户税号是否在客户单位表名单里-是否允许特批报价 是否是禁止
* @param tax * @param tax
* @return * @return
*/ */
@ -334,4 +334,15 @@ public class QuotServiceImpl implements IQuotService
String count = quotMapper.selectRegisteredCompanyByTax(tax); String count = quotMapper.selectRegisteredCompanyByTax(tax);
return !"0".equals(count); return !"0".equals(count);
} }
/**
* 根据该客户税号是否在客户单位表名单里-是否允许询价 是否是禁止
* @param tax
* @return
*/
@Override
public Boolean selectRegisteredCompanyByTax2(String tax) {
String count = quotMapper.selectRegisteredCompanyByTax2(tax);
return !"0".equals(count);
}
} }

View File

@ -38,6 +38,14 @@ public class RegisteredCompany extends BaseEntity
@Excel(name = "状态",dictType = "common_state") @Excel(name = "状态",dictType = "common_state")
private String regState; private String regState;
/** 是否允许特批报价-报价组提交OA(0-允许,1-禁止) */
@Excel(name = "是否允许特批报价",dictType = "allow_tp_state")
private String regAllowTpState;
/** 是否允许询价-业务员提交询价单(0-允许,1-禁止) */
@Excel(name = "是否允许询价",dictType = "allow_quot_state")
private String regAllowQuotState;
public void setRegId(String regId) public void setRegId(String regId)
{ {
this.regId = regId; this.regId = regId;
@ -92,20 +100,10 @@ public class RegisteredCompany extends BaseEntity
{ {
return regState; return regState;
} }
public String getRegAllowTpState() { return regAllowTpState; }
@Override public void setRegAllowTpState(String regAllowTpState) { this.regAllowTpState = regAllowTpState; }
public String toString() { public String getRegAllowQuotState() { return regAllowQuotState; }
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("regId", getRegId()) public void setRegAllowQuotState(String regAllowQuotState) { this.regAllowQuotState = regAllowQuotState; }
.append("regSalesmanCode", getRegSalesmanCode())
.append("regSalesmanName", getRegSalesmanName())
.append("regCompany", getRegCompany())
.append("regTax", getRegTax())
.append("regState", getRegState())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
} }

View File

@ -223,7 +223,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectRegisteredCompanyByTax" parameterType="String" resultType="String"> <select id="selectRegisteredCompanyByTax" parameterType="String" resultType="String">
select count(1) from registered_company where reg_tax = #{tax} and reg_state = '0' select count(1) from registered_company where reg_tax = #{tax} and reg_state = '0' and reg_allow_tp_state = '1'
</select>
<select id="selectRegisteredCompanyByTax2" parameterType="String" resultType="String">
select count(1) from registered_company where reg_tax = #{tax} and reg_state = '0' and reg_allow_quot_state = '1'
</select> </select>
<insert id="insertQuot" parameterType="Quot"> <insert id="insertQuot" parameterType="Quot">

View File

@ -11,6 +11,8 @@
<result property="regCompany" column="reg_company" /> <result property="regCompany" column="reg_company" />
<result property="regTax" column="reg_tax" /> <result property="regTax" column="reg_tax" />
<result property="regState" column="reg_state" /> <result property="regState" column="reg_state" />
<result property="regAllowTpState" column="reg_allow_tp_state" />
<result property="regAllowQuotState" column="reg_allow_quot_state" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
@ -18,7 +20,9 @@
</resultMap> </resultMap>
<sql id="selectRegisteredCompanyVo"> <sql id="selectRegisteredCompanyVo">
select reg_id, reg_salesman_code, reg_salesman_name, reg_company, reg_tax, reg_state, create_by, create_time, update_by, update_time from registered_company select reg_id, reg_salesman_code, reg_salesman_name, reg_company, reg_tax,
reg_state, reg_allow_tp_state, reg_allow_quot_state, create_by, create_time, update_by, update_time
from registered_company
</sql> </sql>
<select id="selectRegisteredCompanyList" parameterType="RegisteredCompany" resultMap="RegisteredCompanyResult"> <select id="selectRegisteredCompanyList" parameterType="RegisteredCompany" resultMap="RegisteredCompanyResult">
@ -45,6 +49,8 @@
<if test="regCompany != null and regCompany != ''">reg_company,</if> <if test="regCompany != null and regCompany != ''">reg_company,</if>
<if test="regTax != null and regTax != ''">reg_tax,</if> <if test="regTax != null and regTax != ''">reg_tax,</if>
<if test="regState != null">reg_state,</if> <if test="regState != null">reg_state,</if>
<if test="regAllowTpState != null">reg_allow_tp_state,</if>
<if test="regAllowQuotState != null">reg_allow_quot_state,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if> <if test="updateBy != null">update_by,</if>
@ -57,6 +63,8 @@
<if test="regCompany != null and regCompany != ''">#{regCompany},</if> <if test="regCompany != null and regCompany != ''">#{regCompany},</if>
<if test="regTax != null and regTax != ''">#{regTax},</if> <if test="regTax != null and regTax != ''">#{regTax},</if>
<if test="regState != null">#{regState},</if> <if test="regState != null">#{regState},</if>
<if test="regAllowTpState != null">#{regAllowTpState},</if>
<if test="regAllowQuotState != null">#{regAllowQuotState},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
@ -72,6 +80,8 @@
<if test="regCompany != null and regCompany != ''">reg_company = #{regCompany},</if> <if test="regCompany != null and regCompany != ''">reg_company = #{regCompany},</if>
<if test="regTax != null and regTax != ''">reg_tax = #{regTax},</if> <if test="regTax != null and regTax != ''">reg_tax = #{regTax},</if>
<if test="regState != null">reg_state = #{regState},</if> <if test="regState != null">reg_state = #{regState},</if>
<if test="regAllowTpState != null">reg_allow_tp_state = #{regAllowTpState},</if>
<if test="regAllowQuotState != null">reg_allow_quot_state = #{regAllowQuotState},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateBy != null">update_by = #{updateBy},</if>

View File

@ -90,31 +90,23 @@
<el-table height="100%" v-loading="loading" :data="registeredCompanyList" @selection-change="handleSelectionChange"> <el-table height="100%" v-loading="loading" :data="registeredCompanyList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label=" id" align="center" prop="regId" v-if="false"/> <el-table-column label=" id" align="center" prop="regId" v-if="false"/>
<el-table-column label="状态" align="center" prop="regState" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.common_state" :value="scope.row.regState"/>
</template>
</el-table-column>
<el-table-column label="业务员账号" align="center" prop="regSalesmanCode" /> <el-table-column label="业务员账号" align="center" prop="regSalesmanCode" />
<el-table-column label="业务员" align="center" prop="regSalesmanName" /> <el-table-column label="业务员" align="center" prop="regSalesmanName" />
<el-table-column label="注册公司" align="center" prop="regCompany" width="350" /> <el-table-column label="注册公司" align="center" prop="regCompany" width="350" />
<el-table-column label="税号" align="center" prop="regTax" width="200"/> <el-table-column label="税号" align="center" prop="regTax" width="200"/>
<el-table-column label="状态" align="center" prop="regState" width="100"> <el-table-column label="是否允许询价" align="center" prop="regAllowQuotState" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.common_state" :value="scope.row.regState"/> <dict-tag :options="dict.type.allow_quot_state" :value="scope.row.regAllowQuotState"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150"> <el-table-column label="是否允许特批报价" align="center" prop="regAllowTpState" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <dict-tag :options="dict.type.allow_tp_state" :value="scope.row.regAllowTpState"/>
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['registeredCompany:registeredCompany:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['registeredCompany:registeredCompany:remove']"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -128,9 +120,9 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改经营部注册公司对话框 --> <!-- 添加或修改客户单位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-row :gutter="8"> <el-row :gutter="8">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="业务员账号" prop="regSalesmanCode"> <el-form-item label="业务员账号" prop="regSalesmanCode">
@ -168,6 +160,30 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="是否允许询价" prop="regAllowQuotState">
<el-select v-model="form.regAllowQuotState" placeholder="请选择状态">
<el-option
v-for="dict in dict.type.allow_quot_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否允许特批报价" prop="regAllowTpState">
<el-select v-model="form.regAllowTpState" placeholder="请选择状态">
<el-option
v-for="dict in dict.type.allow_tp_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -183,7 +199,7 @@ import { listRegisteredCompany, getRegisteredCompany, delRegisteredCompany, addR
export default { export default {
name: "RegisteredCompany", name: "RegisteredCompany",
dicts: ['common_state'], dicts: ['common_state','allow_quot_state','allow_tp_state'],
data() { data() {
return { return {
// //
@ -198,7 +214,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
registeredCompanyList: [], registeredCompanyList: [],
// //
title: "", title: "",
@ -230,7 +246,7 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
/** 查询经营部注册公司列表 */ /** 查询客户单位列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listRegisteredCompany(this.queryParams).then(response => { listRegisteredCompany(this.queryParams).then(response => {
@ -253,6 +269,8 @@ export default {
regCompany: null, regCompany: null,
regTax: null, regTax: null,
regState: null, regState: null,
regAllowTpState: null,
regAllowQuotState: null,
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
@ -280,8 +298,10 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "经营部注册公司"; this.title = "客户单位";
this.form.regState = '0'; this.form.regState = '0';
this.form.regAllowTpState = '0';
this.form.regAllowQuotState = '0';
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
@ -290,7 +310,7 @@ export default {
getRegisteredCompany(regId).then(response => { getRegisteredCompany(regId).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "经营部注册公司"; this.title = "客户单位";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
@ -316,7 +336,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const regIds = row.regId || this.ids; const regIds = row.regId || this.ids;
this.$modal.confirm('是否确认删除该经营部注册公司').then(function() { this.$modal.confirm('是否确认删除该客户单位').then(function() {
return delRegisteredCompany(regIds); return delRegisteredCompany(regIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();