'20240516'
This commit is contained in:
parent
68e3dd3086
commit
a40d03899f
|
@ -208,7 +208,7 @@ public class RedBookController extends BaseController
|
|||
* @return
|
||||
*/
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
@Log(title = "保存报价单", businessType = BusinessType.INSERT)
|
||||
@Log(title = "保存红本报价单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/saveQuot")
|
||||
public AjaxResult saveQuot(HttpServletResponse response, @RequestBody OAQuot quot)
|
||||
{
|
||||
|
@ -223,7 +223,21 @@ public class RedBookController extends BaseController
|
|||
}
|
||||
return success(quot);
|
||||
}
|
||||
|
||||
/**
|
||||
* 报价单提交
|
||||
* @param quot
|
||||
* @return
|
||||
*/
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
@Log(title = "提交红本报价单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/commitQuot")
|
||||
public AjaxResult commitQuot(HttpServletResponse response, @RequestBody OAQuot quot)
|
||||
{
|
||||
quot.setQuotApprovalStatus("1");//提交状态更新为 待审核
|
||||
quot.setUpdateBy(getUsername());
|
||||
redBookService.updateOAQuot(quot);
|
||||
return success(quot);
|
||||
}
|
||||
/**
|
||||
* 报价单生成
|
||||
* @param quot
|
||||
|
|
|
@ -14,6 +14,7 @@ public class OAQuot extends BaseEntity {
|
|||
private String totalPrice;//总金额
|
||||
|
||||
private String rbDateUid;//调价版本
|
||||
private String quotApprovalStatus;//提交状态
|
||||
|
||||
private List<OAQuotProduct> selectedResultData;
|
||||
|
||||
|
@ -65,6 +66,10 @@ public class OAQuot extends BaseEntity {
|
|||
|
||||
public void setRbDateUid(String rbDateUid) { this.rbDateUid = rbDateUid; }
|
||||
|
||||
public String getQuotApprovalStatus() { return quotApprovalStatus; }
|
||||
|
||||
public void setQuotApprovalStatus(String quotApprovalStatus) { this.quotApprovalStatus = quotApprovalStatus; }
|
||||
|
||||
public List<OAQuotProduct> getSelectedResultData() {
|
||||
return selectedResultData;
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh = #{quotLxrdh},</if>
|
||||
<if test="totalPrice != null and totalPrice != ''">totalPrice = #{totalPrice},</if>
|
||||
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid = #{rbDateUid},</if>
|
||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quotApprovalStatus = #{quotApprovalStatus},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = getdate()
|
||||
</trim>
|
||||
|
@ -163,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
<select id="listQuots" parameterType="OAQuot" resultType="OAQuot">
|
||||
select a.quot_id,a.quotCode,a.quotCustomer,a.quotProject,a.quotLxr,a.quotLxrdh,a.totalPrice,
|
||||
select a.quot_id,a.quotCode,a.quotCustomer,a.quotProject,a.quotLxr,a.quotLxrdh,a.totalPrice,a.quotApprovalStatus,
|
||||
a.create_by,a.create_time createTime,
|
||||
a.update_by,a.update_time updateTime
|
||||
from OAQuot a
|
||||
|
@ -193,6 +194,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="quotLxrdh" column="quotLxrdh" />
|
||||
<result property="totalPrice" column="totalPrice" />
|
||||
<result property="rbDateUid" column="rbDateUid" />
|
||||
<result property="quotApprovalStatus" column="quotApprovalStatus" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="QuotQuotMaterialResult" type="OAQuot" extends="QuotResult">
|
||||
|
@ -216,7 +218,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">
|
||||
select a.quot_id, a.quotCode, a.quotCustomer, a.quotProject, a.quotLxr,
|
||||
a.quotLxrdh, a.totalPrice,a.rbDateUid,
|
||||
a.quotLxrdh, a.totalPrice,a.rbDateUid,a.quotApprovalStatus,
|
||||
|
||||
b.quot_product_id, b.name_0, b.name_1,
|
||||
b.spec, b.voltage, b.stu,
|
||||
|
|
|
@ -108,6 +108,14 @@ export function saveQuot(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
//提交报价单
|
||||
export function commitQuot(data) {
|
||||
return request({
|
||||
url: '/redBook/redBook/commitQuot',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
//生成报价单
|
||||
export function madeQuot(data) {
|
||||
return request({
|
||||
|
|
|
@ -13,14 +13,18 @@
|
|||
<el-button style="float: right;" size="mini" type="warning" icon="el-icon-folder" @click="handleSaveClick" :disabled="selectedResultData.length==0">保存</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="5" class="mt5">
|
||||
<splitpanes class="default-theme" split="vertical">
|
||||
<pane>
|
||||
<pane :size="60">
|
||||
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
|
||||
<el-form-item label="目录:">
|
||||
<el-link :underline="false" class="block" :type="selectedModelTag==item.name_0?'warning':'primary'" @click="selModelTag(item)" v-for="(item, index) in modelList" :key="index">{{item.name_0}}</el-link>
|
||||
<el-form-item label="目录:" class="customer-form-item">
|
||||
<el-col :span="6" v-for="(item, index) in modelList" :key="index" style="padding: 0px">
|
||||
<el-link :underline="false" class="block" :type="selectedModelTag==item.name_0?'warning':'primary'" @click="selModelTag(item)">{{item.name_0}}</el-link>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注:" v-if="showRemarkList">
|
||||
<el-col :span="24">
|
||||
<div class="text-content">
|
||||
<div v-if="expandedIndex === id">
|
||||
<el-button type="text" style="float: right" @click="toggleText(-1)">收起</el-button>
|
||||
|
@ -37,20 +41,28 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="型号:" v-if="showXinghList">
|
||||
<el-link :underline="false" class="block" :type="selectedXinghTag==item.name_0?'warning':'primary'" plain @click="selXinghTag(item)" v-for="(item, index) in xinghList" :key="index">{{item.name_0}}</el-link>
|
||||
<el-form-item label="型号:" v-if="showXinghList" class="customer-form-item">
|
||||
<el-col :span="6" v-for="(item, index) in xinghList" :key="index">
|
||||
<el-link :underline="false" class="block" :type="selectedXinghTag==item.name_0?'warning':'primary'" plain @click="selXinghTag(item)">{{item.name_0}}</el-link>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="子类:" v-if="showZlList">
|
||||
<el-link :underline="false" class="block" size="mini" :type="selectedZlTag==item.name_0?'warning':'primary'" plain @click="selZlTag(item)" v-for="(item, index) in zlList" :key="index">{{item.name_0}}</el-link>
|
||||
<el-form-item label="子类:" v-if="showZlList" class="customer-form-item">
|
||||
<el-col :span="6" v-for="(item, index) in zlList" :key="index">
|
||||
<el-link :underline="false" class="block" size="mini" :type="selectedZlTag==item.name_0?'warning':'primary'" plain @click="selZlTag(item)">{{item.name_0}}</el-link>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="衍生型号:" v-if="showYsxhList">
|
||||
<el-link :underline="false" class="block" :type="selectedYsxhTag==item.name_0?'warning':'primary'" plain @click="selYsxhTag(item)" v-for="(item, index) in ysxhList" :key="index">{{item.name_0}}</el-link>
|
||||
<el-form-item label="衍生型号:" v-if="showYsxhList" class="customer-form-item">
|
||||
<el-col :span="6" v-for="(item, index) in ysxhList" :key="index">
|
||||
<el-link :underline="false" class="block" :type="selectedYsxhTag==item.name_0?'warning':'primary'" plain @click="selYsxhTag(item)">{{item.name_0}}</el-link>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="截面:" v-if="showJmList">
|
||||
<el-link :underline="false"class="block" :type="selectedJmTag==item.section?'warning':'primary'" plain @click="selJmTag(item)" v-for="(item, index) in jmList" :key="index">{{item.section}}</el-link>
|
||||
<el-form-item label="截面:" v-if="showJmList" class="customer-form-item">
|
||||
<el-col :span="3" v-for="(item, index) in jmList" :key="index">
|
||||
<el-link :underline="false"class="block" :type="selectedJmTag==item.section?'warning':'primary'" plain @click="selJmTag(item)">{{item.section}}</el-link>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
|
||||
<el-table width="100%" v-loading="searchResultLoading" ref="searchResultTable" :data="searchResultPagedData" @row-dblclick="handleRowDblclick">
|
||||
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
|
||||
<el-table-column label="产品型号" align="center" prop="name_0"/>
|
||||
|
@ -111,7 +123,7 @@
|
|||
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
||||
<el-select v-model="form.rbDateUid" style="width: 235px;float: right" :disabled="selectedResultData.length==0">
|
||||
<el-select v-model="form.rbDateUid" style="width: 235px;margin-left: 5px" :disabled="selectedResultData.length==0">
|
||||
<el-option
|
||||
v-for="item in versionList"
|
||||
:key="item.value"
|
||||
|
@ -141,6 +153,7 @@
|
|||
<el-select v-model="scope.row.stu" @change="selectTypeChange(scope.row)">
|
||||
<el-option label="KM" value="KM"/>
|
||||
<el-option label="M" value="M"/>
|
||||
<el-option label="只" value="只"/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -179,6 +192,12 @@
|
|||
</div>
|
||||
</template>
|
||||
<style>
|
||||
/* 修改边框样式 */
|
||||
.customer-form-item .el-form-item__content {
|
||||
border: 1px solid #1682e645; /* 更改为蓝色边框 */
|
||||
border-radius: 4px; /* 圆角 */
|
||||
padding: 5px; /* 内边距 */
|
||||
}
|
||||
/* 设置间距 */
|
||||
.block {
|
||||
margin-left: 20px;
|
||||
|
|
|
@ -20,6 +20,16 @@
|
|||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交状态" prop="quotApprovalStatus">
|
||||
<el-select v-model="queryParams.quotApprovalStatus" placeholder="请选择提交状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.rb_quot_approval_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
|
@ -33,8 +43,8 @@
|
|||
<el-button type="text" @click="handleDeleteClick(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="quot_id" align="center" prop="quot_id" v-if="false"/>
|
||||
<el-table-column label="报价单号" width="260" align="center" prop="quotCode">
|
||||
<el-table-column fixed="left" label="quot_id" align="center" prop="quot_id" v-if="false"/>
|
||||
<el-table-column fixed="left" label="报价单号" width="260" align="center" prop="quotCode">
|
||||
<template slot-scope="scope">
|
||||
<el-link :underline="false" type="primary" @click="handleDetail(scope.row)">{{scope.row.quotCode}}</el-link>
|
||||
</template>
|
||||
|
@ -46,6 +56,11 @@
|
|||
<el-table-column label="联系人电话" width="100" align="center" prop="quotLxrdh" />
|
||||
<el-table-column label="创建日期" width="180" align="center" prop="createTime" />
|
||||
<el-table-column label="更新日期" width="180" align="center" prop="updateTime" />
|
||||
<el-table-column label="提交状态" align="center" prop="quotApprovalStatus" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.rb_quot_approval_status" :value="scope.row.quotApprovalStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 报价详情对话框 -->
|
||||
|
@ -89,7 +104,7 @@
|
|||
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
||||
<el-select v-model="form.rbDateUid" style="margin-left: 20px;width: 235px;" :disabled="selectedResultData.length==0">
|
||||
<el-select v-model="form.rbDateUid" style="margin-left: 20px;width: 235px;" :disabled="selectedResultData.length==0 || form.quotApprovalStatus!=0">
|
||||
<el-option
|
||||
v-for="item in versionList"
|
||||
:key="item.value"
|
||||
|
@ -98,7 +113,7 @@
|
|||
@click.native="selectRbDate(item.value)"/>
|
||||
</el-select>
|
||||
<el-button style="float: right;margin-left: 5px;" size="small" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0">生成报价单</el-button>
|
||||
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveClick" :disabled="selectedResultData.length==0">保存</el-button>
|
||||
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveClick" v-if="this.form.quotApprovalStatus==0" :disabled="selectedResultData.length==0">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -106,7 +121,7 @@
|
|||
<el-table v-loading="selectedResultLoading" width="100%;" :row-class-name="selectedResultIndex" :data="selectedResultData" height="350px">
|
||||
<el-table-column fixed="left" label="" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
|
||||
<el-table-column fixed="left" label="产品型号" align="center" prop="name_0" width="180" />
|
||||
<el-table-column fixed="left" label="产品型号" align="center" prop="name_0" width="180"/>
|
||||
<el-table-column label="型号" align="center" prop="name_1" v-if="false"/>
|
||||
<el-table-column label="规格" align="center" prop="spec" v-if="false"/>
|
||||
<el-table-column label="电压" align="center" prop="voltage"/>
|
||||
|
@ -131,6 +146,9 @@
|
|||
<el-table-column label="总价" align="center" prop="allPrice"/>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" v-if="this.form.quotApprovalStatus==0">
|
||||
<el-button type="primary" @click="handleCommitClick">提交报价</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
|
@ -147,10 +165,11 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
import {toDecimal, versionList,listQuots,getQuotDetail,deleteQuots,updateSelectedResultData,madeQuot,saveQuot } from "@/api/redBook/redBook";
|
||||
import {toDecimal, versionList,listQuots,getQuotDetail,deleteQuots,updateSelectedResultData,madeQuot,saveQuot,commitQuot } from "@/api/redBook/redBook";
|
||||
|
||||
export default {
|
||||
name: "quots",
|
||||
dicts:['rb_quot_approval_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
@ -172,7 +191,7 @@
|
|||
},
|
||||
|
||||
//表单
|
||||
form: {},
|
||||
form: {quotApprovalStatus:''},
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
|
@ -330,6 +349,18 @@
|
|||
})
|
||||
},
|
||||
|
||||
// 报价单提交报价组
|
||||
handleCommitClick() {
|
||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||
this.form.totalPrice = allPrice.toFixed(2);
|
||||
this.form.selectedResultData = this.selectedResultData;
|
||||
commitQuot(this.form).then(response => {
|
||||
this.$modal.msgSuccess("提交报价单成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
|
||||
// 报价单生成
|
||||
handleMadeQuotClick() {
|
||||
this.form.selectedResultData = this.selectedResultData;
|
||||
|
|
|
@ -322,7 +322,7 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const dictIds = row.dictId || this.ids;
|
||||
this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
||||
this.$modal.rbDateUid('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
|
||||
return delType(dictIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
|
|
Loading…
Reference in New Issue