|
|
@ -195,15 +195,15 @@ |
|
|
|
<div class="chosseBtn"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-radio v-model="isXuanzeShow" label="1">现车()</el-radio> |
|
|
|
<el-radio v-model="isXuanzeShow" label="1">现车({{ xiancheCount }})</el-radio> |
|
|
|
<span v-show="isXuanzeShow == '1'" class="bluezi" @click="openXianche()">选择</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<!--放置五个车架号--> |
|
|
|
<el-form-item> |
|
|
|
<div v-for="item in temp.busSalesOrderVehicleList"> |
|
|
|
<div v-for="(item,index) in temp.busSalesOrderVehicleList"> |
|
|
|
<span>{{ item.linkNo }}</span> |
|
|
|
<el-button size="small" type="danger" @click="delXianche()">删除 |
|
|
|
<el-button size="small" type="danger" @click="delXianche(index)">删除 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
@ -211,14 +211,14 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-radio v-model="isXuanzeShow" label="2">采购订单()</el-radio> |
|
|
|
<el-radio v-model="isXuanzeShow" label="2">采购订单({{ caigouCount }})</el-radio> |
|
|
|
<span v-show="isXuanzeShow == '2'" class="bluezi" @click="openCaigou()">选择</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<div v-for="item in temp.busSalesVehicleOrderList"> |
|
|
|
<div v-for="(item,index) in temp.busSalesVehicleOrderList"> |
|
|
|
<span>{{ item.linkNo }}</span> |
|
|
|
<el-button size="small" type="danger" @click="delCaigou()">删除 |
|
|
|
<el-button size="small" type="danger" @click="delCaigou(index)">删除 |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
@ -433,7 +433,7 @@ |
|
|
|
<el-table-column label="序号" type="index" width="80" align="center"/> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
<el-button type="danger" size="small" @click="deleteZhuche(scope.row)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="优惠名称" align="center"> |
|
|
@ -575,7 +575,7 @@ |
|
|
|
<el-table-column label="序号" type="index" width="80" align="center"/> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button> |
|
|
|
<el-button type="danger" size="small" @click="deleteXuni(scope.row)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="虚拟订单编号" align="center"> |
|
|
@ -663,19 +663,19 @@ |
|
|
|
style="width: 100%;" @selection-change="handleSelectionXianche"> |
|
|
|
<el-table-column align="center" type="selection" width="50"/> |
|
|
|
<el-table-column :index="xiancheindexMethod" align="center" label="序号" type="index" width="80"/> |
|
|
|
<el-table-column align="center" label="订单编号" prop="billNo"> |
|
|
|
<el-table-column align="center" label="车架号" prop="billNo"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.billNo }}</span> |
|
|
|
<span>{{ scope.row.linkNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="制单日期"> |
|
|
|
<el-table-column align="center" label="存放地点"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.createDate }}</span> |
|
|
|
<span>{{ scope.row.linkText }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="客户名称"> |
|
|
|
<el-table-column align="center" label="是否为虚拟订单"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.customerName }}</span> |
|
|
|
<span>{{ scope.row.isFictitious }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -714,7 +714,7 @@ |
|
|
|
<el-table-column :index="caigouindexMethod" align="center" label="序号" type="index" width="80"/> |
|
|
|
<el-table-column align="center" label="采购订单编号" prop="billNo"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.billNo }}</span> |
|
|
|
<span>{{ scope.row.linkNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="可使用台数" prop="billNo"> |
|
|
@ -730,7 +730,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="采购订单日期"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.createDate }}</span> |
|
|
|
<span>{{ scope.row.linkText }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -743,30 +743,30 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 新增客户 --> |
|
|
|
<xuanzekehu v-show="relState == '1.1'" ref="xuanzekehu" @doReturn="changeState" |
|
|
|
<xuanzekehu v-show="relState == '1.1'" ref="xuanzekehu" @handleReturn="changeState" |
|
|
|
@handleCustomerList="selectCustomer"/> |
|
|
|
<xuanzekehu-add v-show="relState == '1.2'" ref="xuanzekehuAdd" @doReturn="changeState" |
|
|
|
<xuanzekehu-add v-show="relState == '1.2'" ref="xuanzekehuAdd" @handleReturn="changeState" |
|
|
|
@handleCustomerAdd="addCustomer"/> |
|
|
|
<!-- 选择意向车型 --> |
|
|
|
<yixiangchexingxuanze v-show="relState == '2.1'" ref="yixiangchexing" @doReturn="changeState" |
|
|
|
<yixiangchexingxuanze v-show="relState == '2.1'" ref="yixiangchexing" @handleReturn="changeState" |
|
|
|
@handleyixiangList="selectYixiang"/> |
|
|
|
<!-- 选择虚拟订单 --> |
|
|
|
<xunidingdanxuanze v-show="relState == '2.2'" ref="xunidingdan" @doReturn="changeState" |
|
|
|
<xunidingdanxuanze v-show="relState == '2.2'" ref="xunidingdan" @handleReturn="changeState" |
|
|
|
@handlexuniList="selectXuni"/> |
|
|
|
<!-- 车型选择 --> |
|
|
|
<modellibrary v-show="relState == '2.3'" ref="chexingxuanze" @doReturn="changeState" |
|
|
|
<modellibrary v-show="relState == '2.3'" ref="chexingxuanze" @handleReturn="changeState" |
|
|
|
@handleChexing="selectChexing"/> |
|
|
|
<!-- 车型配置选择 --> |
|
|
|
<vehiclelibraryconfiguration v-show="relState == '6.6'" ref="chexingxuanze" @doReturn="changeState" |
|
|
|
<vehiclelibraryconfiguration v-show="relState == '6.6'" ref="chexingxuanze" @handleReturn="changeState" |
|
|
|
@handleChexing="selectChexing"/> |
|
|
|
<!-- 销售政策 --> |
|
|
|
<xiao-shou-zheng-ce v-show="relState == '4.1'" ref="zhucheyouhui" @doReturn="changeState" |
|
|
|
<!-- 主车优惠、销售政策 --> |
|
|
|
<xiao-shou-zheng-ce v-show="relState == '4.1'" ref="zhucheyouhui" @handleReturn="changeState" |
|
|
|
@handleYouhui="selectYouhui"/> |
|
|
|
<!-- 虚拟订单 --> |
|
|
|
<xunidingdanguanli v-show="relState == '5.1'" ref="xuniList" @doReturn="changeState" |
|
|
|
<xunidingdanguanli v-show="relState == '5.1'" ref="xuniList" @handleReturn="changeState" |
|
|
|
@handleXuniList="selectXuniList"/> |
|
|
|
<!-- 提交补充页面--> |
|
|
|
<xiaoshoudingdan-submit v-show="relState == '3'" ref="divsubmit" @doReturn="changeState" |
|
|
|
<xiaoshoudingdan-submit v-show="relState == '3'" ref="divsubmit" @handleReturn="changeState" |
|
|
|
@handleSubmit="submitPage"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -781,8 +781,8 @@ import { |
|
|
|
getPdfByOrderSid, |
|
|
|
getXianList, |
|
|
|
saveOrderForm, |
|
|
|
selectCount |
|
|
|
} from '@/api/salesManagement/orderManagement' |
|
|
|
import {getDelDis} from '@/api/jichuxinxi/busdeposit' |
|
|
|
import {getNamesDown,} from '@/api/dictcommons/basemanufacturer' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
@ -870,14 +870,15 @@ export default { |
|
|
|
depositTypeKey: '', // 订金交纳方式key |
|
|
|
makeUpDeposit: '', // 需补交订金 |
|
|
|
}, //订金信息 |
|
|
|
busSalesOrderDiscountList: [{ |
|
|
|
discountExplain: '', //优惠项目明细 |
|
|
|
name: '', //优惠名称 |
|
|
|
num: '', //数量 |
|
|
|
price: '', //价值 |
|
|
|
salesPolicySid: '', //销售政策sid |
|
|
|
totalValue: '', //总价值 |
|
|
|
}], //主车优惠明细 |
|
|
|
busSalesOrderDiscountList: [], //主车优惠明细 |
|
|
|
// { |
|
|
|
// discountExplain: '', //优惠项目明细 |
|
|
|
// name: '', //优惠名称 |
|
|
|
// num: '', //数量 |
|
|
|
// price: '', //价值 |
|
|
|
// salesPolicySid: '', //销售政策sid |
|
|
|
// totalValue: '', //总价值 |
|
|
|
// } |
|
|
|
busSalesOrderInsurance: { |
|
|
|
insuranceCarMoney: '', //单台车保费预估金额 |
|
|
|
insuranceName: '', //保险公司名称 |
|
|
@ -950,6 +951,7 @@ export default { |
|
|
|
// 现车列表 |
|
|
|
xianchetotal: 1, |
|
|
|
xiancheLoading: false, |
|
|
|
xiancheCount: 0, |
|
|
|
xiancheList: { |
|
|
|
current: 1, |
|
|
|
size: 20, |
|
|
@ -965,6 +967,7 @@ export default { |
|
|
|
// 采购订单列表 |
|
|
|
caigoutotal: 1, |
|
|
|
caigouLoading: false, |
|
|
|
caigouCount: 0, |
|
|
|
caigouList: { |
|
|
|
current: 1, |
|
|
|
size: 20, |
|
|
@ -1153,8 +1156,8 @@ export default { |
|
|
|
billingTypeKey: '', //开票类型key |
|
|
|
busDepositFictitiousList: [], //虚拟订单和订金关联 |
|
|
|
busSalesOrderDeposit: { |
|
|
|
deposit: '111222', // 单台订金 |
|
|
|
depositAll: '111222', // 订金合计 |
|
|
|
deposit: '', // 单台订金 |
|
|
|
depositAll: '', // 订金合计 |
|
|
|
depositType: '', // 订金交纳方式 |
|
|
|
depositTypeKey: '', // 订金交纳方式key |
|
|
|
makeUpDeposit: '', // 需补交订金 |
|
|
@ -1184,7 +1187,7 @@ export default { |
|
|
|
guildPrice: '', //单台指导价 |
|
|
|
modelConfig: '', //车型配置名称 |
|
|
|
modelConfigSid: '', //配置sid |
|
|
|
modelName: '111122222', //车型名称 |
|
|
|
modelName: '', //车型名称 |
|
|
|
modelSid: '', //车型sid |
|
|
|
moreConfig: '', //更多配置 |
|
|
|
specialConfig: '', //特殊配置说明 |
|
|
@ -1276,25 +1279,6 @@ export default { |
|
|
|
const value = Number(aaa.replace(',', '')) + Number(bbb.replace(',', '')) |
|
|
|
this.temp.busSalesOrderPrice.singleFinalPrice = value.toString() |
|
|
|
return this.temp.busSalesOrderPrice.singleFinalPrice |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// var finalPrice = 0 |
|
|
|
// var topPrice = 0 |
|
|
|
// finalPrice = parseFloat(this.temp.busSalesOrderModel.finalPrice) |
|
|
|
// topPrice = parseFloat(this.temp.busSalesOrderMakeup.topPrice) |
|
|
|
// if (this.temp.busSalesOrderModel.finalPrice !== '') { |
|
|
|
// return finalPrice |
|
|
|
// } |
|
|
|
// if (this.temp.busSalesOrderMakeup.topPrice !== '') { |
|
|
|
// return topPrice |
|
|
|
// } |
|
|
|
// |
|
|
|
// var s1 = finalPrice.toString() |
|
|
|
// var s2 = topPrice.toString() |
|
|
|
// const value = Number(s1.replace(',', '')) + Number(s2.replace(',', '')) |
|
|
|
// this.temp.busSalesOrderPrice.singleFinalPrice = value.toString() |
|
|
|
// return this.temp.busSalesOrderPrice.singleFinalPrice |
|
|
|
}, |
|
|
|
getSum(total, num) { |
|
|
|
return total + num; |
|
|
@ -1618,14 +1602,14 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// 删除现车数据 |
|
|
|
delXianche() { |
|
|
|
|
|
|
|
}, |
|
|
|
// 打开采购订单 |
|
|
|
openCaigou() { |
|
|
|
if (this.temp.busSalesOrderModel.modelSid) { |
|
|
|
this.caigouVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.handleCaigou() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
@ -1635,13 +1619,11 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// 删除采购订单数据 |
|
|
|
delCaigou() { |
|
|
|
|
|
|
|
}, |
|
|
|
// 主车优惠 |
|
|
|
openZhuche() { |
|
|
|
this.relState = '4.1' |
|
|
|
this.$refs['zhucheyouhui'].showZhuche(this.temp.busSalesOrderDiscountList) |
|
|
|
}, |
|
|
|
// 虚拟订单列表 |
|
|
|
openXunidingdanList() { |
|
|
@ -1741,26 +1723,42 @@ export default { |
|
|
|
// ---------------- 下级页面返回数据 ---------------- |
|
|
|
// 确当选择现车 |
|
|
|
selectionXianche() { |
|
|
|
this.temp.busSalesOrderVehicleList = this.xiancheChoice |
|
|
|
const xincheSids = [] |
|
|
|
this.row.forEach((element) => { |
|
|
|
xincheSids.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.xiancheList.params.sidList = xincheSids |
|
|
|
this.vehicleList = xincheSids |
|
|
|
this.xiancheLoading = false |
|
|
|
console.log('确认选择现车:', this.temp.busSalesOrderVehicleList, this.vehicleList) |
|
|
|
if (this.xiancheChoice.length > 0) { |
|
|
|
this.temp.busSalesOrderVehicleList = this.xiancheChoice |
|
|
|
const xincheSids = [] |
|
|
|
this.xiancheChoice.forEach((element) => { |
|
|
|
xincheSids.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.xiancheList.params.sidList = xincheSids |
|
|
|
this.vehicleList = xincheSids |
|
|
|
this.xiancheVisible = false |
|
|
|
console.log('确认选择现车:', this.temp.busSalesOrderVehicleList, this.vehicleList) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请选择车架号!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 确定选择采购 |
|
|
|
selectionCaigou() { |
|
|
|
this.temp.busSalesVehicleOrderList = this.caigouChoice |
|
|
|
const caigouSids = [] |
|
|
|
this.row.forEach((element) => { |
|
|
|
caigouSids.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.caigouList.params.sidList = caigouSids |
|
|
|
this.caigouLoading = false |
|
|
|
console.log('确认选择采购', this.temp.busSalesVehicleOrderList, caigouSids) |
|
|
|
if (this.caigouChoice.length > 0) { |
|
|
|
this.temp.busSalesVehicleOrderList = this.caigouChoice |
|
|
|
const caigouSids = [] |
|
|
|
this.caigouChoice.forEach((element) => { |
|
|
|
caigouSids.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.caigouList.params.sidList = caigouSids |
|
|
|
this.caigouVisible = false |
|
|
|
console.log('确认选择采购', this.temp.busSalesVehicleOrderList, caigouSids) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请选择车架号!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 切换回新增页面 |
|
|
|
changeState() { |
|
|
@ -1797,6 +1795,19 @@ export default { |
|
|
|
modelSid: modelData.modelSid, //车型sid |
|
|
|
moreConfig: modelData.otherConfig, //更多配置 |
|
|
|
} |
|
|
|
const countList = { |
|
|
|
customerSid: this.temp.customerSid, //客户sid |
|
|
|
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //配置sid |
|
|
|
modelSid: this.temp.busSalesOrderModel.modelSid, //车型sid |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //业务员sid |
|
|
|
type: 1, // 类型 |
|
|
|
} |
|
|
|
selectCount(countList).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.xiancheCount = response.data |
|
|
|
console.log('数量', response.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 选择虚拟订单 |
|
|
|
selectXuni(modelData, type) { |
|
|
@ -1814,6 +1825,19 @@ export default { |
|
|
|
modelSid: modelData.modelSid, //车型sid |
|
|
|
moreConfig: modelData.otherConfig, //更多配置 |
|
|
|
} |
|
|
|
const countList = { |
|
|
|
customerSid: this.temp.customerSid, //客户sid |
|
|
|
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //配置sid |
|
|
|
modelSid: this.temp.busSalesOrderModel.modelSid, //车型sid |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //业务员sid |
|
|
|
type: 2, // 类型 |
|
|
|
} |
|
|
|
selectCount(countList).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.xiancheCount = response.data |
|
|
|
console.log('数量', response.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 选择车型 |
|
|
|
selectChexing(modelData, type) { |
|
|
@ -1831,6 +1855,20 @@ export default { |
|
|
|
modelSid: modelData.modelSid, //车型sid |
|
|
|
moreConfig: modelData.moreConfig, //更多配置 |
|
|
|
} |
|
|
|
const countList = { |
|
|
|
customerSid: this.temp.customerSid, //客户sid |
|
|
|
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //配置sid |
|
|
|
modelSid: this.temp.busSalesOrderModel.modelSid, //车型sid |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //业务员sid |
|
|
|
type: 3, // 类型 |
|
|
|
} |
|
|
|
selectCount(countList).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.xiancheCount = response.data |
|
|
|
console.log('数量', response.data) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
selectYouhui(row) { |
|
|
|
console.log('所选优惠包', row) |
|
|
@ -1859,18 +1897,34 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
//删除 |
|
|
|
handleDelete(row) { |
|
|
|
getDelDis(row.orderSid).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.temp.busOrderDiscountDtoList = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
// 删除主车优惠数据 |
|
|
|
deleteZhuche() { |
|
|
|
|
|
|
|
}, |
|
|
|
addXunidingjin() { |
|
|
|
// 删除虚拟订单 |
|
|
|
deleteXuni() { |
|
|
|
|
|
|
|
}, |
|
|
|
// 删除现车数据 |
|
|
|
delXianche(index) { |
|
|
|
console.log('对应索引', index) |
|
|
|
this.temp.busSalesOrderVehicleList.splice(index, 1) |
|
|
|
}, |
|
|
|
// 删除采购订单数据 |
|
|
|
delCaigou(index) { |
|
|
|
console.log('对应索引', index) |
|
|
|
this.temp.busSalesOrderVehicleList.splice(index, 1) |
|
|
|
}, |
|
|
|
// handleDelete(row) { |
|
|
|
// getDelDis(row.orderSid).then((response) => { |
|
|
|
// if (response.code === '200') { |
|
|
|
// this.temp.busOrderDiscountDtoList = response.data |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
addXunidingjin() { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 待使用代码 |
|
|
|
// 预览销售合同 |
|
|
|