This commit is contained in:
xd 2024-07-03 09:23:03 +08:00
parent 4278bd577a
commit c4d7963465
5 changed files with 115 additions and 57 deletions

View File

@ -136,9 +136,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<insert id="batchOAQuotProduct">
insert into OAQuotProduct(quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id,number) values
insert into OAQuotProduct(uid_0,quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id,number) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}, #{item.index})
(#{item.uid_0}, #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}, #{item.index})
</foreach>
</insert>
@ -239,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<resultMap type="OAQuotProduct" id="QuotMaterialResult">
<result property="uid_0" column="uid_0" />
<result property="quot_product_id" column="quot_product_id" />
<result property="name_0" column="name_0" />
<result property="name_1" column="name_1" />
@ -257,9 +258,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.quot_id, a.quotCode, a.quotCustomer, a.quotProject, a.quotLxr,
a.quotLxrdh, a.totalPrice,a.rbDateUid,a.quotApprovalStatus,
b.quot_product_id, b.name_0, b.name_1,
b.uid_0,b.quot_product_id, b.name_0, b.name_1,
b.spec, b.voltage, b.stu,
b.per,b.per2,b.price,b.setPrice,b.count,b.allPrice,b.quot_id
isnull(b.per,1) per,isnull(b.per2,1) per2,b.price,b.setPrice,b.count,b.allPrice,b.quot_id
from OAQuot a
left join OAQuotProduct b on b.quot_id = a.quot_id
where a.quot_id = #{quotId} order by b.number

View File

@ -100,6 +100,19 @@ export const constantRoutes = [
}
]
},
{
path: '/oaQuote',
component: Layout,
hidden: true,
children: [
{
path: 'oaQuoteEdit',
component: () => import('@/views/redBook/productSelect'),
name: 'productSelect',
meta: { title: '报价单转报价', activeMenu: '/oaQuote/oaQuoteEdit'}
}
]
},
{
path: '/hainanOrder/index',
component: Layout,

View File

@ -187,6 +187,7 @@
<el-table-column label="业务员" align="center" prop="quotSalesmanName" width="150px"/>
<el-table-column label="客户名称" align="center" prop="quotCustomerName" width="250px"/>
<el-table-column label="项目名称" align="center" prop="quotProject" width="250px"/>
<el-table-column label="报价要求" align="center" prop="quotQuotationRequire" width="250px"/>
<el-table-column label="金思维提交状态" align="center" prop="quotJswApprovalStatus" width="150px" v-if="checkRole(['QUOT','PRICE_VERIFICATION'])">
<template slot-scope="scope">
<dict-tag :options="dict.type.quot_jsw_approval_status" :value="scope.row.quotJswApprovalStatus" v-if="scope.row.quotJswApprovalStatus!=0"/>

View File

@ -92,56 +92,58 @@
<pane>
<el-card id="scroll" class="box-card scrollable" :style="{'overflow': 'auto','max-height': scrollableHeight,'height': scrollableHeight}">
<div style="min-width: 650px">
<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-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
</el-form-item>
</el-col>
</el-row>
<el-form ref="form" :model="form" label-width="100px">
<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-button style="float: right;" size="mini" type="info" plain icon="el-icon-upload2" @click="handleExport">导出</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<!--
<p v-if="isColumn1ValuesEqual">存在与当前调价版本不一致的产品,请选择调价日期批量刷新</p>
@ -265,7 +267,7 @@
</style>
<script>
import {toDecimal, productList,versionList,productRemarkList,productXinghList,judgeparent,productZlList,productYsxhListCheck,productYsxhList,productJmListCheck,productJmList,searchData,handleSearchData,saveQuot, madeQuot, madeXjQuot, updateSelectedResultData} from "@/api/redBook/redBook";
import {toDecimal, productList,versionList,getQuotDetail,productRemarkList,productXinghList,judgeparent,productZlList,productYsxhListCheck,productYsxhList,productJmListCheck,productJmList,searchData,handleSearchData,saveQuot, madeQuot, madeXjQuot, updateSelectedResultData} from "@/api/redBook/redBook";
import { getToken } from "@/utils/auth";
export default {
name: "productSelect",
@ -366,6 +368,14 @@
created() {
this.productList();
this.getVersionList();
const param = this.$route.query;
if (param.quotId !== undefined && param.quotId !== null) {
const row = {'quotId':param.quotId}
this.handleQuotInfo(row);
}
},
mounted(){
/*设置内容高度*/
@ -374,6 +384,25 @@
this.tableHeight = (window.innerHeight - 340) + 'px';
},
methods: {
/** 查看报价单转报价操作 */
handleQuotInfo(row) {
const quotId = row.quotId;
getQuotDetail(quotId).then(response => {
this.form = response.data;
this.selectedResultData = response.data.selectedResultData;
console.log(this.selectedResultData)
})
},
// ||
toggleText(id) {
if (this.expandedIndex === id) {
@ -745,7 +774,12 @@
this.form.totalPrice = toDecimal(allPrice);
this.form.selectedResultData = this.selectedResultData;
saveQuot(this.form).then(response => {
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
if(this.form.quot_id){
this.$modal.msgSuccess("修改报价单成功,单号:"+response.data.quotCode);
}else{
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
}
})
}
},

View File

@ -28,9 +28,11 @@
<el-table width="100%" v-loading="loading" :data="quotsList" :row-class-name="rowQuotsIndex">
<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">
<el-table-column fixed="left" label="操作" align="center" width="100" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button type="text" @click="handleDeleteClick(scope.row)">删除</el-button>
<el-button type="text" @click="handleToOAQuotClick(scope.row)">转报价</el-button>
</template>
</el-table-column>
<el-table-column fixed="left" label="quot_id" align="center" prop="quot_id" v-if="false"/>
@ -274,6 +276,7 @@
getQuotDetail(quotId).then(response => {
this.form = response.data;
this.selectedResultData = response.data.selectedResultData;
console.log(this.selectedResultData)
this.open = true;
this.title = "报价单信息";
})
@ -292,6 +295,12 @@
})
},
/** 转报价 */
handleToOAQuotClick(row) {
const info = {quotId : row.quot_id}
this.$router.push({ path: '/oaQuote/oaQuoteEdit', query: info});
},
//
changeData() {
//