This commit is contained in:
xd 2024-05-17 08:55:04 +08:00
parent 35ae29ca49
commit c30010c017
3 changed files with 189 additions and 166 deletions

View File

@ -179,6 +179,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotCustomer != null and quotCustomer != ''"><!-- 客户检索 -->
and a.quotCustomer like '%${quotCustomer}%'
</if>
<if test="quotApprovalStatus != null and quotApprovalStatus != ''"><!-- 提交状态 -->
and a.quotApprovalStatus = #{quotApprovalStatus}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>

View File

@ -14,187 +14,188 @@
</el-col>
</el-row>
<el-row :gutter="5" class="mt5">
<splitpanes class="default-theme" split="vertical">
<pane :size="60">
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<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>
<splitpanes class="default-theme mt5" split="vertical">
<pane :size="60">
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<el-form-item label="目录:" class="customer-form-item">
<el-row>
<el-col :span="6" v-for="(item, index) in modelList" :key="index">
<el-link :underline="false" class="block" :style="selectedModelTag==item.name_0?'color:#ffba00;font-weight: bold;':'color:#1890ff;'" @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>
</el-row>
</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>
<div v-for="(item, index) in remarkList" :key="index" style="line-height: 25px">
{{index+1}}{{item.remark_0}}
</div>
</div>
<div v-else>
<el-button type="text" style="float: right" @click="toggleText(id)">更多</el-button>
<div class="text-preview">
<div v-for="(item, index) in remarkList" :key="index" style="line-height: 25px">
{{index+1}}{{item.remark_0}}
</div>
</div>
<div v-else>
<el-button type="text" style="float: right" @click="toggleText(id)">更多</el-button>
<div class="text-preview">
<div v-for="(item, index) in remarkList" :key="index" style="line-height: 25px">
{{index+1}}{{item.remark_0}}
</div>
</div>
</div>
</div>
</div>
</el-col>
</el-form-item>
<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" :style="selectedXinghTag==item.name_0?'color:#ffba00;font-weight: bold;':'color:#1890ff;'" @click="selXinghTag(item)">{{item.name_0}}</el-link>
</el-col>
</el-form-item>
<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" :style="selectedZlTag==item.name_0?'color:#ffba00;font-weight: bold;':'color:#1890ff;'" @click="selZlTag(item)">{{item.name_0}}</el-link>
</el-col>
</el-form-item>
<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" :style="selectedYsxhTag==item.name_0?'color:#ffba00;font-weight: bold;':'color:#1890ff;'" @click="selYsxhTag(item)">{{item.name_0}}</el-link>
</el-col>
</el-form-item>
<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" :style="selectedJmTag==item.section?'color:#ffba00;font-weight: bold;':'color:#1890ff;'" @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"/>
<el-table-column label="型号" align="center" prop="model" v-if="false"/>
<el-table-column label="规格" align="center" prop="spec" v-if="false"/>
<el-table-column label="电压" align="center" prop="voltage"/>
<el-table-column label="红本价(元)" align="center" prop="price"/>
<el-table-column label="单位" align="center" prop="stu"/>
</el-table>
<pagination
v-show="searchResultTotal>0"
:total="searchResultTotal"
:page.sync="searchResultCurrentPage"
:limit.sync="searchResultPageSize"
@size-change="handleSearchResultSizeChange"
@current-change="handleSearchResultCurrentChange"
:layout="'total, prev, pager, next'"
/>
</el-card>
</pane>
<pane>
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="询价单位" prop="quotCustomer" style="margin-bottom: 10px;">
<el-input v-model="form.quotCustomer" placeholder="请输入询价单位" />
</el-form-item>
</el-col>
</el-form-item>
<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 :span="12">
<el-form-item label="项目名称" prop="quotProject" style="margin-bottom: 10px;">
<el-input v-model="form.quotProject" placeholder="请输入项目名称"/>
</el-form-item>
</el-col>
</el-form-item>
<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-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="联系人" prop="quotLxr" style="margin-bottom: 10px;">
<el-input v-model="form.quotLxr" placeholder="请输入联系人" />
</el-form-item>
</el-col>
</el-form-item>
<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 :span="8">
<el-form-item label="联系电话" prop="quotLxrdh" style="margin-bottom: 10px;">
<el-input v-model="form.quotLxrdh" placeholder="请输入联系电话"/>
</el-form-item>
</el-col>
</el-form-item>
<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 :span="8">
<el-form-item label="总价" style="margin-bottom: 10px;">
<el-input class="totalPrice-input" v-model="sumSelectedResultData"/>
</el-form-item>
</el-col>
</el-form-item>
<el-table width="100%" v-loading="searchResultLoading" ref="searchResultTable" :data="searchResultPagedData" @row-dblclick="handleRowDblclick">
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="总金额" prop="totalPrice" v-if="false">
<el-input v-model="form.totalPrice"/>
</el-form-item>
<el-form-item label="设置折扣率" label-width="100px" style="margin-bottom: 10px;">
<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;margin-left: 5px" :disabled="selectedResultData.length==0">
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="selectRbDate(item.value)"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-table v-loading="selectedResultLoading" width="100%;" :height="tableHeight" :row-class-name="selectedResultIndex" style="margin-top:5px" ref="selectedResultTable" :data="selectedResultData">
<el-table-column label="" align="center" prop="index" width="50"/>
<el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="handleDeleteClick(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="版本uid" align="center" prop="uid_0" v-if="false"/>
<el-table-column label="产品型号" align="center" prop="name_0"/>
<el-table-column label="型号" align="center" prop="model" v-if="false"/>
<el-table-column label="产品型号" align="center" prop="name_0" width="200" />
<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"/>
<el-table-column label="红本价(元)" align="center" prop="price"/>
<el-table-column label="单位" align="center" prop="stu"/>
<el-table-column label="单位" align="center" prop="stu" />
<!--<el-table-column label="单位" align="center" prop="stu">
<template slot-scope="scope">
<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>-->
<el-table-column label="一次折扣" align="center" prop="per">
<template slot-scope="scope">
<el-input v-model="scope.row.per" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="二次折扣" align="center" prop="per2">
<template slot-scope="scope">
<el-input v-model="scope.row.per2" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="setPrice"/>
<el-table-column label="数量调整" align="center" prop="count">
<template slot-scope="scope">
<el-input v-model="scope.row.count" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="总价" align="center" prop="allPrice"/>
</el-table>
<pagination
v-show="searchResultTotal>0"
:total="searchResultTotal"
:page.sync="searchResultCurrentPage"
:limit.sync="searchResultPageSize"
@size-change="handleSearchResultSizeChange"
@current-change="handleSearchResultCurrentChange"
:layout="'total, prev, pager, next'"
/>
<!--<pagination
v-show="selectedResultTotal>0"
:total="selectedResultTotal"
:page.sync="selectedResultCurrentPage"
:page-sizes="[10,20,30,40]"
:limit.sync="selectedResultPageSize"
@size-change="handleSelectedResultSizeChange"
@current-change="handleSelectedResultCurrentChange"
/>-->
</el-card>
</pane>
<pane>
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="询价单位" prop="quotCustomer" style="margin-bottom: 10px;">
<el-input v-model="form.quotCustomer" placeholder="请输入询价单位" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="项目名称" prop="quotProject" style="margin-bottom: 10px;">
<el-input v-model="form.quotProject" placeholder="请输入项目名称"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="8">
<el-form-item label="联系人" prop="quotLxr" style="margin-bottom: 10px;">
<el-input v-model="form.quotLxr" placeholder="请输入联系人" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话" prop="quotLxrdh" style="margin-bottom: 10px;">
<el-input v-model="form.quotLxrdh" placeholder="请输入联系电话"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="总价" style="margin-bottom: 10px;">
<el-input class="totalPrice-input" v-model="sumSelectedResultData"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="8">
<el-col :span="24">
<el-form-item label="总金额" prop="totalPrice" v-if="false">
<el-input v-model="form.totalPrice"/>
</el-form-item>
<el-form-item label="设置折扣率" label-width="100px" style="margin-bottom: 10px;">
<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;margin-left: 5px" :disabled="selectedResultData.length==0">
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="selectRbDate(item.value)"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-table v-loading="selectedResultLoading" width="100%;" :height="tableHeight" :row-class-name="selectedResultIndex" style="margin-top:5px" ref="selectedResultTable" :data="selectedResultData">
<el-table-column fixed="left" label="" align="center" prop="index" width="50"/>
<el-table-column fixed="left" label="操作" align="center" width="60" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="handleDeleteClick(scope.$index)">删除</el-button>
</template>
</el-table-column>
<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 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"/>
<el-table-column label="红本价(元)" align="center" prop="price"/>
<el-table-column label="单位" align="center" prop="stu">
<template slot-scope="scope">
<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>
<el-table-column label="一次折扣" align="center" prop="per">
<template slot-scope="scope">
<el-input v-model="scope.row.per" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="二次折扣" align="center" prop="per2">
<template slot-scope="scope">
<el-input v-model="scope.row.per2" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="单价" align="center" prop="setPrice"/>
<el-table-column label="数量调整" align="center" prop="count">
<template slot-scope="scope">
<el-input v-model="scope.row.count" @blur="changeRowData" @keyup.enter.native="changeRowData"/>
</template>
</el-table-column>
<el-table-column label="总价" align="center" prop="allPrice"/>
</el-table>
<!--<pagination
v-show="selectedResultTotal>0"
:total="selectedResultTotal"
:page.sync="selectedResultCurrentPage"
:page-sizes="[10,20,30,40]"
:limit.sync="selectedResultPageSize"
@size-change="handleSelectedResultSizeChange"
@current-change="handleSelectedResultCurrentChange"
/>-->
</el-card>
</pane>
</splitpanes>
</el-row>
</pane>
</splitpanes>
</el-form>
</div>
</template>
<style>
/* 修改边框样式 */
.customer-form-item .el-form-item__content {
border: 1px solid #1682e645; /* 更改为蓝色边框 */
border: 1px solid #46a6ff63; /* 更改为蓝色边框 */
border-radius: 4px; /* 圆角 */
padding: 5px; /* 内边距 */
}

View File

@ -65,7 +65,7 @@
<!-- 报价详情对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1050px" append-to-body>
<el-form ref="form" :model="form" label-width="100px">
<el-form ref="form" :model="form":rules="rules" label-width="100px">
<el-row :gutter="8">
<el-col :span="12">
<el-form-item label="询价单位" prop="quotCustomer">
@ -192,6 +192,21 @@
//
form: {quotApprovalStatus:''},
//
rules: {
quotCustomer: [
{required: true, message: "询价单位不能为空", trigger: "blur"}
],
quotProject: [
{required: true, message: "项目名称不能为空", trigger: "blur"}
],
quotLxr: [
{required: true, message: "联系人不能为空", trigger: "blur"}
],
quotLxrdh: [
{required: true, message: "联系电话不能为空", trigger: "blur"}
],
},
//
title: "",
//
@ -351,13 +366,17 @@
//
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();
this.$refs["form"].validate(valid => {
if (valid) {
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();
})
}
})
},