|
|
@ -201,7 +201,7 @@ |
|
|
|
<el-col :span="20"> |
|
|
|
<!--放置五个车架号--> |
|
|
|
<el-form-item> |
|
|
|
<div v-for="(item,index) in temp.busSalesOrderVehicleList"> |
|
|
|
<div class="linkNoSty" v-for="(item,index) in temp.busSalesOrderVehicleList"> |
|
|
|
<span>{{ item.linkNo }}</span> |
|
|
|
<el-button size="small" type="danger" @click="delXianche(index)">删除 |
|
|
|
</el-button> |
|
|
@ -216,7 +216,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<div v-for="(item,index) in temp.busSalesVehicleOrderList"> |
|
|
|
<div class="linkNoSty" v-for="(item,index) in temp.busSalesVehicleOrderList"> |
|
|
|
<span>{{ item.linkNo }}</span> |
|
|
|
<el-button size="small" type="danger" @click="delCaigou(index)">删除 |
|
|
|
</el-button> |
|
|
@ -380,10 +380,14 @@ |
|
|
|
<el-col :span="2"> |
|
|
|
<span>台数</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col v-show="isXuanzeShow == '1' || isXuanzeShow == '2'" :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ NumberMulThree() }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col v-show="isXuanzeShow == '3'" :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<span v-show="isXuanzeShow == '1' || isXuanzeShow == '2'">{{ NumberMulThree() }}</span> |
|
|
|
<el-input v-show="isXuanzeShow == '3'" v-model="temp.busSalesOrderPrice.quantity" class="addinputw" |
|
|
|
<el-input v-model="quantity" class="addinputw" |
|
|
|
placeholder="请输入台数" |
|
|
|
clearable/> |
|
|
|
</el-form-item> |
|
|
@ -433,7 +437,10 @@ |
|
|
|
<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="deleteZhuche(scope.row)">删除</el-button> |
|
|
|
<el-button type="danger" size="small" |
|
|
|
@click="deleteZhuche(scope.row,scope.$index,temp.busSalesOrderDiscountList[scope.$index])"> |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="优惠名称" align="center"> |
|
|
@ -564,7 +571,7 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- ==================== 虚拟订单列表 ======================================== --> |
|
|
|
<div v-show="temp.busSalesOrderDeposit.depositTypeKey == '2'"> |
|
|
|
<div v-show="temp.busSalesOrderDeposit.depositTypeKey == '02'"> |
|
|
|
<div class="titleleft"> |
|
|
|
<span>虚拟订单列表</span> |
|
|
|
<el-button class="btntopblueline chooseForm" size="small" type="primary" @click="addXunidingjin()">添加 |
|
|
@ -575,14 +582,16 @@ |
|
|
|
<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="deleteXuni(scope.row)">删除</el-button> |
|
|
|
<el-button type="danger" size="small" |
|
|
|
@click="deleteXuni(scope.row,scope.$index,temp.busDepositFictitiousList[scope.$index])">删除 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="虚拟订单编号" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.depositBillNo }}</span> |
|
|
|
<el-button type="primary" size="small" class="btntopblueline chooseForm" |
|
|
|
@click="openXunidingdanList()">选择 |
|
|
|
@click="openXunidingdanList(scope.$index)">选择 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -943,6 +952,7 @@ export default { |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //销售专员sid |
|
|
|
type: '', //销售订单车辆类型 1现车、2订单、3排产 |
|
|
|
}, // 添加和修改 |
|
|
|
quantity: '', // 台数 |
|
|
|
// 客户块信息 |
|
|
|
customerList: {}, |
|
|
|
// 车型确认块信息 |
|
|
@ -1218,6 +1228,7 @@ export default { |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //销售专员sid |
|
|
|
type: '', //销售订单车辆类型 1现车、2订单、3排产 |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.relState = '1' |
|
|
@ -1292,32 +1303,43 @@ export default { |
|
|
|
if (taishu.length > 0) { |
|
|
|
this.temp.busSalesOrderPrice.quantity = taishu.reduce(this.getSum); |
|
|
|
} else { |
|
|
|
return 0 |
|
|
|
this.temp.busSalesOrderPrice.quantity = 0 |
|
|
|
return this.temp.busSalesOrderPrice.quantity |
|
|
|
} |
|
|
|
}, |
|
|
|
// 车架合计 |
|
|
|
NumberMulFour() { |
|
|
|
|
|
|
|
console.log('tai shu',111111) |
|
|
|
// 单台成交价 |
|
|
|
if (this.temp.busSalesOrderPrice.singleFinalPrice == '') { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
// 台数 |
|
|
|
if (this.temp.busSalesOrderPrice.quantity == '') { |
|
|
|
if (this.temp.busSalesOrderPrice.quantity == '' && this.quantity == '') { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
console.log('tai shu',222222) |
|
|
|
var singleFinalPrice = 0 |
|
|
|
var quantity = 0 |
|
|
|
singleFinalPrice = parseFloat(this.temp.busSalesOrderPrice.singleFinalPrice) |
|
|
|
quantity = parseFloat(this.temp.busSalesOrderPrice.quantity) |
|
|
|
console.log('11111',this.temp.busSalesOrderPrice.singleFinalPrice,singleFinalPrice,quantity) |
|
|
|
console.log('11111.22',this.temp.busSalesOrderPrice.singleFinalPrice,singleFinalPrice,quantity) |
|
|
|
if (this.isXuanzeShow == '3') { |
|
|
|
quantity = parseFloat(this.quantity) |
|
|
|
} else { |
|
|
|
quantity = parseFloat(this.temp.busSalesOrderPrice.quantity) |
|
|
|
} |
|
|
|
console.log('tai shu', quantity) |
|
|
|
console.log('11111', this.temp.busSalesOrderPrice.singleFinalPrice, singleFinalPrice, quantity) |
|
|
|
console.log('11111.22', this.temp.busSalesOrderPrice.singleFinalPrice, singleFinalPrice, quantity) |
|
|
|
const chejia1 = singleFinalPrice.toString() |
|
|
|
const chejia2 = quantity.toString() |
|
|
|
console.log('22222',chejia1,chejia2) |
|
|
|
console.log('22222', chejia1, chejia2) |
|
|
|
const value = Number(chejia1.replace(',', '')) * Number(chejia2.replace(',', '')) |
|
|
|
this.temp.busSalesOrderPrice.priceSum = value.toString() |
|
|
|
console.log('33333',value) |
|
|
|
console.log('33333', value) |
|
|
|
if (this.temp.busSalesOrderPrice.priceSum == 0) { |
|
|
|
this.temp.busSalesOrderPrice.priceSum = 0 |
|
|
|
return this.temp.busSalesOrderPrice.priceSum |
|
|
|
} |
|
|
|
return this.temp.busSalesOrderPrice.priceSum |
|
|
|
}, |
|
|
|
// 订金合计 |
|
|
@ -1338,6 +1360,10 @@ export default { |
|
|
|
const s2 = quantity.toString() |
|
|
|
const value = Number(s1.replace(',', '')) * Number(s2.replace(',', '')) |
|
|
|
this.temp.busSalesOrderDeposit.depositAll = value.toString() |
|
|
|
if (this.temp.busSalesOrderDeposit.depositAl == '') { |
|
|
|
this.temp.busSalesOrderDeposit.depositAl = 0 |
|
|
|
return this.temp.busSalesOrderDeposit.depositAl |
|
|
|
} |
|
|
|
return this.temp.busSalesOrderDeposit.depositAll |
|
|
|
}, |
|
|
|
// 主车优惠数量变化 |
|
|
@ -1379,16 +1405,26 @@ export default { |
|
|
|
} else { |
|
|
|
this.temp.isTop = '0' |
|
|
|
} |
|
|
|
if (this.checkedBaoxian) { |
|
|
|
this.temp.isInsurance = '1' |
|
|
|
} else { |
|
|
|
this.temp.isInsurance = '0' |
|
|
|
} |
|
|
|
if (this.temp.busSalesOrderDeposit.depositTypeKey == '01') { |
|
|
|
this.temp.busSalesOrderDeposit.depositType = '现交订金' |
|
|
|
} else { |
|
|
|
this.temp.busSalesOrderDeposit.depositType = '订金结转' |
|
|
|
} |
|
|
|
if (this.isXuanzeShow == '3') { |
|
|
|
this.busSalesOrderPrice.quantity = Number(this.quantity) |
|
|
|
} else { |
|
|
|
this.busSalesOrderPrice.quantity = Number(this.busSalesOrderPrice.quantity) |
|
|
|
} |
|
|
|
console.log('type', this.isXuanzeShow) |
|
|
|
this.temp.type = this.isXuanzeShow |
|
|
|
const priceList = [] |
|
|
|
this.temp.busSalesOrderDiscountList.forEach((element) => { |
|
|
|
priceList.push(element.totalValue) |
|
|
|
priceList.push(toString(element.totalValue)) |
|
|
|
}) |
|
|
|
this.temp.priceList = priceList |
|
|
|
console.log(this.temp) |
|
|
@ -1623,11 +1659,14 @@ export default { |
|
|
|
// 主车优惠 |
|
|
|
openZhuche() { |
|
|
|
this.relState = '4.1' |
|
|
|
|
|
|
|
this.$refs['zhucheyouhui'].showZhuche(this.temp.busSalesOrderDiscountList) |
|
|
|
}, |
|
|
|
// 虚拟订单列表 |
|
|
|
openXunidingdanList() { |
|
|
|
openXunidingdanList(index) { |
|
|
|
console.log('虚拟订单', index) |
|
|
|
this.relState = '5.1' |
|
|
|
this.$refs['xuniList'].showXuni(this.temp.customerSid, index) |
|
|
|
}, |
|
|
|
// 打开提交页面 |
|
|
|
handleSubmit() { |
|
|
@ -1640,7 +1679,6 @@ export default { |
|
|
|
message: '请选择一个客户!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// ---------------- 弹窗上列表数据加载 ---------------- |
|
|
@ -1882,14 +1920,17 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 虚拟订单订金 |
|
|
|
selectXuniList(row) { |
|
|
|
selectXuniList(row, index) { |
|
|
|
console.log('所选虚拟顶金', row) |
|
|
|
row.forEach((element) => { |
|
|
|
this.temp.busDepositFictitiousList.push({ |
|
|
|
depositBillNo: element.billNo, //虚拟订单编号 |
|
|
|
depositPrice: element.deposit - element.usedDeposit, //订金剩余金额 |
|
|
|
depositSid: element.sid, //订金信息sid |
|
|
|
}) |
|
|
|
this.temp.busDepositFictitiousList[index].depositBillNo = element.billNo |
|
|
|
this.temp.busDepositFictitiousList[index].depositPrice = element.deposit - element.usedDeposit |
|
|
|
this.temp.busDepositFictitiousList[index].depositSid = element.sid |
|
|
|
// this.temp.busDepositFictitiousList.push({ |
|
|
|
// depositBillNo: element.billNo, //虚拟订单编号 |
|
|
|
// depositPrice: element.deposit - element.usedDeposit, //订金剩余金额 |
|
|
|
// depositSid: element.sid, //订金信息sid |
|
|
|
// }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 提交补充页面 |
|
|
@ -1898,12 +1939,12 @@ export default { |
|
|
|
}, |
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
// 删除主车优惠数据 |
|
|
|
deleteZhuche() { |
|
|
|
|
|
|
|
deleteZhuche(row, index) { |
|
|
|
this.temp.busSalesOrderDiscountList.splice(index, 1) |
|
|
|
}, |
|
|
|
// 删除虚拟订单 |
|
|
|
deleteXuni() { |
|
|
|
|
|
|
|
deleteXuni(row, index) { |
|
|
|
this.temp.busDepositFictitiousList.splice(index, 1) |
|
|
|
}, |
|
|
|
// 删除现车数据 |
|
|
|
delXianche(index) { |
|
|
@ -1923,7 +1964,13 @@ export default { |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
addXunidingjin() { |
|
|
|
|
|
|
|
this.temp.busDepositFictitiousList.push({ |
|
|
|
depositBillNo: '', //虚拟订单编号 |
|
|
|
depositPrice: '', //订金剩余金额 |
|
|
|
depositSid: '', //订金信息sid |
|
|
|
payPath: '', //款项支付委托书 |
|
|
|
price: '', //本次结转金额 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 待使用代码 |
|
|
@ -2099,4 +2146,9 @@ export default { |
|
|
|
.dialogBtn { |
|
|
|
text-align: left; |
|
|
|
} |
|
|
|
|
|
|
|
.linkNoSty { |
|
|
|
display: inline-block; |
|
|
|
padding-right: 20px; |
|
|
|
} |
|
|
|
</style> |
|
|
|