|
|
@ -185,7 +185,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="temp.busSalesOrderModel.finalPrice" class="addinputw" clearable |
|
|
|
<el-input oninput="value = value.replace(/[^\d.]/g,'')" v-model.number="temp.busSalesOrderModel.finalPrice" class="addinputw" clearable |
|
|
|
maxlength="125" placeholder="请输入单台成交价"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -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 class="linkNoSty" 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 class="linkNoSty" 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> |
|
|
@ -311,7 +311,8 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="temp.busSalesOrderMakeup.topPrice" class="addinputw" clearable |
|
|
|
<el-input oninput="value = value.replace(/[^0-9.]/g, '')" v-model.number="temp.busSalesOrderMakeup.topPrice" class="addinputw" |
|
|
|
clearable |
|
|
|
placeholder="请输入上装价格"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -380,10 +381,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 v-show="isXuanzeShow == '1' || isXuanzeShow == '2'">{{ NumberMulThree() }}</span> |
|
|
|
<el-input v-show="isXuanzeShow == '3'" v-model="temp.busSalesOrderPrice.quantity" class="addinputw" |
|
|
|
<span>{{ NumberMulThree() }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col v-show="isXuanzeShow == '3'" :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<el-input oninput="value = value.replace(/[^0-9.]/g, '')" v-model.number="quantity" class="addinputw" |
|
|
|
placeholder="请输入台数" |
|
|
|
clearable/> |
|
|
|
</el-form-item> |
|
|
@ -433,7 +438,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="handleDelete(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"> |
|
|
@ -486,7 +494,8 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="baoxianInput"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="temp.busSalesOrderInsurance.insuranceCarMoney" class="addinputw" |
|
|
|
<el-input oninput="value = value.replace(/[^0-9.]/g, '')" v-model.number="temp.busSalesOrderInsurance.insuranceCarMoney" |
|
|
|
class="addinputw" |
|
|
|
clearable placeholder="请输入单台车保费预估金额"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -530,7 +539,8 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="temp.busSalesOrderDeposit.deposit" class="addinputw" clearable |
|
|
|
<el-input oninput="value = value.replace(/[^0-9.]/g, '')" v-model.number="temp.busSalesOrderDeposit.deposit" class="addinputw" |
|
|
|
clearable |
|
|
|
placeholder="请输入单台订金"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -553,18 +563,18 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
<span>需补交定金</span> |
|
|
|
<span>需补交订金</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ temp.busSalesOrderDeposit.makeUpDeposit }}</span> |
|
|
|
<span>{{ NumberMakeUpDeposit() }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</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 +585,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="handleDelete(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> |
|
|
@ -593,7 +605,8 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="本次结转金额" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input @blur="handleJiezhuan(scope.row,scope.row.price)" v-model="scope.row.price" |
|
|
|
<el-input oninput="value = value.replace(/[^0-9.]/g, '')" @blur="handleJiezhuan(scope.row,scope.row.price)" |
|
|
|
v-model.number="scope.row.price" |
|
|
|
placeholder="请输入本次结转金额" |
|
|
|
class="addinputw" |
|
|
|
clearable/> |
|
|
@ -612,12 +625,13 @@ |
|
|
|
<span>补充说明</span> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-input v-model="temp.remarks" type="textarea" placeholder="补充说明" class="addinputw"/> |
|
|
|
<el-input v-model="temp.notes" type="textarea" placeholder="补充说明" class="addinputw"/> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 打开新增客户 --> |
|
|
|
<el-dialog :visible.sync="customerVisible" title="客户登记-类型" top="13%" width="28%"> |
|
|
|
<el-form :model="customerTypeList"> |
|
|
@ -663,19 +677,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 +728,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 +744,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 +757,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 +795,9 @@ import { |
|
|
|
getPdfByOrderSid, |
|
|
|
getXianList, |
|
|
|
saveOrderForm, |
|
|
|
selectCount, |
|
|
|
fetchDetailsBySid |
|
|
|
} 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 +885,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: '', //保险公司名称 |
|
|
@ -942,6 +958,7 @@ export default { |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //销售专员sid |
|
|
|
type: '', //销售订单车辆类型 1现车、2订单、3排产 |
|
|
|
}, // 添加和修改 |
|
|
|
quantity: '', // 台数 |
|
|
|
// 客户块信息 |
|
|
|
customerList: {}, |
|
|
|
// 车型确认块信息 |
|
|
@ -950,6 +967,7 @@ export default { |
|
|
|
// 现车列表 |
|
|
|
xianchetotal: 1, |
|
|
|
xiancheLoading: false, |
|
|
|
xiancheCount: 0, |
|
|
|
xiancheList: { |
|
|
|
current: 1, |
|
|
|
size: 20, |
|
|
@ -965,6 +983,7 @@ export default { |
|
|
|
// 采购订单列表 |
|
|
|
caigoutotal: 1, |
|
|
|
caigouLoading: false, |
|
|
|
caigouCount: 0, |
|
|
|
caigouList: { |
|
|
|
current: 1, |
|
|
|
size: 20, |
|
|
@ -1153,8 +1172,8 @@ export default { |
|
|
|
billingTypeKey: '', //开票类型key |
|
|
|
busDepositFictitiousList: [], //虚拟订单和订金关联 |
|
|
|
busSalesOrderDeposit: { |
|
|
|
deposit: '111222', // 单台订金 |
|
|
|
depositAll: '111222', // 订金合计 |
|
|
|
deposit: '', // 单台订金 |
|
|
|
depositAll: '', // 订金合计 |
|
|
|
depositType: '', // 订金交纳方式 |
|
|
|
depositTypeKey: '', // 订金交纳方式key |
|
|
|
makeUpDeposit: '', // 需补交订金 |
|
|
@ -1184,7 +1203,7 @@ export default { |
|
|
|
guildPrice: '', //单台指导价 |
|
|
|
modelConfig: '', //车型配置名称 |
|
|
|
modelConfigSid: '', //配置sid |
|
|
|
modelName: '111122222', //车型名称 |
|
|
|
modelName: '', //车型名称 |
|
|
|
modelSid: '', //车型sid |
|
|
|
moreConfig: '', //更多配置 |
|
|
|
specialConfig: '', //特殊配置说明 |
|
|
@ -1215,33 +1234,27 @@ export default { |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //销售专员sid |
|
|
|
type: '', //销售订单车辆类型 1现车、2订单、3排产 |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.relState = '1' |
|
|
|
this.dialogStatus = 'add' |
|
|
|
}, |
|
|
|
showEdit(data) { |
|
|
|
showEdit(sid) { |
|
|
|
this.relState = '1' |
|
|
|
this.dialogStatus = 'edit' |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].clearValidate() |
|
|
|
this.resetTemp() |
|
|
|
}) |
|
|
|
// this.getpayTypeList() |
|
|
|
// this.getManufacturerList() |
|
|
|
this.getCustomerInfo() |
|
|
|
getOneOrder({ |
|
|
|
busOrderSid: data, |
|
|
|
fetchDetailsBySid({ |
|
|
|
sid: sid, |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
// this.$refs['dataForm'].clearValidate() |
|
|
|
this.nodeState = response.data.busOrderDto.nodeState |
|
|
|
this.getBrand(response.data.modelDto.manufacturerSid) |
|
|
|
this.getCarModel(response.data.modelDto.brandSid) |
|
|
|
if (response.success) { |
|
|
|
this.temp = response.data |
|
|
|
this.orderSid = data |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// ---------------- 计算属性 ---------------- |
|
|
|
// 单台指导价 |
|
|
@ -1276,31 +1289,22 @@ 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; |
|
|
|
}, |
|
|
|
// 台数 |
|
|
|
NumberMulThree() { |
|
|
|
// 选择现车时 |
|
|
|
if (this.isXuanzeShow == '1') { |
|
|
|
if (this.temp.busSalesOrderVehicleList.length > 0) { |
|
|
|
this.temp.busSalesOrderPrice.quantity = this.temp.busSalesOrderVehicleList.length |
|
|
|
return this.temp.busSalesOrderPrice.quantity.toString() |
|
|
|
} |
|
|
|
} |
|
|
|
// 选择采购订单时 |
|
|
|
if (this.isXuanzeShow == '2') { |
|
|
|
if (this.temp.busSalesVehicleOrderList.length > 0) { |
|
|
|
const taishu = [] |
|
|
|
this.temp.busSalesVehicleOrderList.forEach((element) => { |
|
|
|
taishu.push(element.usingNum) |
|
|
@ -1308,32 +1312,46 @@ 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) |
|
|
|
if (this.isXuanzeShow == '3') { |
|
|
|
quantity = parseFloat(this.quantity) |
|
|
|
} else { |
|
|
|
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) |
|
|
|
} |
|
|
|
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 |
|
|
|
}, |
|
|
|
// 订金合计 |
|
|
@ -1343,9 +1361,24 @@ export default { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
// 台数 |
|
|
|
if (this.temp.busSalesOrderPrice.quantity == '') { |
|
|
|
if (this.temp.busSalesOrderPrice.quantity == '' && this.quantity == '') { |
|
|
|
return 0 |
|
|
|
} |
|
|
|
if (this.quantity !== '') { |
|
|
|
var deposit = 0 |
|
|
|
var quantity = 0 |
|
|
|
deposit = parseFloat(this.temp.busSalesOrderDeposit.deposit) |
|
|
|
quantity = parseFloat(this.quantity) |
|
|
|
const s1 = deposit.toString() |
|
|
|
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 |
|
|
|
} else if (this.temp.busSalesOrderPrice.quantity !== '') { |
|
|
|
var deposit = 0 |
|
|
|
var quantity = 0 |
|
|
|
deposit = parseFloat(this.temp.busSalesOrderDeposit.deposit) |
|
|
@ -1354,7 +1387,13 @@ 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 |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
// 主车优惠数量变化 |
|
|
|
handleChangeNum(num, row) { |
|
|
@ -1387,6 +1426,41 @@ export default { |
|
|
|
return usingNum |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//需补交订金 |
|
|
|
NumberMakeUpDeposit() { |
|
|
|
var depositAll = 0 |
|
|
|
var jiezhuan = 0 |
|
|
|
if (this.temp.busSalesOrderDeposit.depositAll !== '') { |
|
|
|
depositAll = parseFloat(this.temp.busSalesOrderDeposit.depositAll) |
|
|
|
} else { |
|
|
|
depositAll = 0 |
|
|
|
} |
|
|
|
console.log('aaaaaaaa', depositAll) |
|
|
|
if (this.temp.busDepositFictitiousList.length > 0) { |
|
|
|
const jiezhuanAll = [] |
|
|
|
this.temp.busDepositFictitiousList.forEach((element) => { |
|
|
|
jiezhuanAll.push(element.price) |
|
|
|
}) |
|
|
|
console.log('bbbbbbbb020202', jiezhuanAll) |
|
|
|
if (jiezhuanAll[0] == '') { |
|
|
|
jiezhuan = 0 |
|
|
|
} else { |
|
|
|
jiezhuan = parseFloat(jiezhuanAll.reduce(this.getSum)) |
|
|
|
} |
|
|
|
// jiezhuan = parseFloat(this.temp.busSalesOrderMakeup.topPrice) |
|
|
|
} else { |
|
|
|
jiezhuan = 0 |
|
|
|
} |
|
|
|
console.log('bbbbbbbb', jiezhuan) |
|
|
|
const s1 = depositAll.toString() |
|
|
|
const s2 = jiezhuan.toString() |
|
|
|
console.log('cccccccc', s1, s2) |
|
|
|
const value = Number(s1.replace(',', '')) - Number(s2.replace(',', '')) |
|
|
|
this.temp.busSalesOrderDeposit.makeUpDeposit = value.toString() |
|
|
|
return this.temp.busSalesOrderDeposit.makeUpDeposit |
|
|
|
}, |
|
|
|
|
|
|
|
// ---------------- 主功能实现 ---------------- |
|
|
|
// 添加数据 |
|
|
|
handleCreate() { |
|
|
@ -1395,11 +1469,22 @@ 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.temp.busSalesOrderPrice.quantity = Number(this.quantity) |
|
|
|
} else { |
|
|
|
this.temp.busSalesOrderPrice.quantity = Number(this.temp.busSalesOrderPrice.quantity) |
|
|
|
} |
|
|
|
console.log('type', this.isXuanzeShow) |
|
|
|
this.temp.type = this.isXuanzeShow |
|
|
|
const priceList = [] |
|
|
@ -1416,39 +1501,26 @@ export default { |
|
|
|
this.FormLoading = false |
|
|
|
if (response.code === '200') { |
|
|
|
this.orderSid = response.data |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '添加成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '添加失败', |
|
|
|
type: 'error', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '添加失败!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
saveOrderForm(this.temp).then((response) => { |
|
|
|
this.FormLoading = false |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '修改成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '失败', |
|
|
|
message: '修改失败', |
|
|
|
type: 'error', |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '修改失败!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
@ -1599,7 +1671,6 @@ export default { |
|
|
|
message: '请选择一个客户!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// 打开现车 |
|
|
@ -1618,14 +1689,14 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// 删除现车数据 |
|
|
|
delXianche() { |
|
|
|
|
|
|
|
}, |
|
|
|
// 打开采购订单 |
|
|
|
openCaigou() { |
|
|
|
if (this.temp.busSalesOrderModel.modelSid) { |
|
|
|
this.caigouVisible = true |
|
|
|
this.$nextTick(() => { |
|
|
|
this.handleCaigou() |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
@ -1635,17 +1706,18 @@ export default { |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// 删除采购订单数据 |
|
|
|
delCaigou() { |
|
|
|
|
|
|
|
}, |
|
|
|
// 主车优惠 |
|
|
|
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() { |
|
|
@ -1658,7 +1730,6 @@ export default { |
|
|
|
message: '请选择一个客户!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
// ---------------- 弹窗上列表数据加载 ---------------- |
|
|
@ -1681,7 +1752,11 @@ export default { |
|
|
|
this.xiancheList.params.customerSid = this.temp.customerSid |
|
|
|
this.xiancheList.params.modelConfigSid = this.temp.busSalesOrderModel.modelConfigSid |
|
|
|
this.xiancheList.params.modelSid = this.temp.busSalesOrderModel.modelSid |
|
|
|
this.xiancheList.params.sidList = this.temp.busSalesOrderVehicleList |
|
|
|
const aa = [] |
|
|
|
this.temp.busSalesOrderVehicleList.forEach((element) => { |
|
|
|
aa.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.xiancheList.params.sidList = aa |
|
|
|
getXianList(this.xiancheList).then((response) => { |
|
|
|
this.xiancheLoading = false |
|
|
|
if ( |
|
|
@ -1691,6 +1766,11 @@ export default { |
|
|
|
) { |
|
|
|
this.listXianche = response.data.records |
|
|
|
this.xianchetotal = response.data.total |
|
|
|
if (this.listXianche.isFictitious == '1') { |
|
|
|
this.listXianche.isFictitious = '是' |
|
|
|
} else if (this.listXianche.isFictitious == '0') { |
|
|
|
this.listXianche.isFictitious = '否' |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.listXianche = [] |
|
|
|
this.xianchetotal = 0 |
|
|
@ -1712,7 +1792,11 @@ export default { |
|
|
|
this.caigouLoading = true |
|
|
|
this.caigouList.params.configSid = this.temp.busSalesOrderModel.modelConfigSid |
|
|
|
this.caigouList.params.modelSid = this.temp.busSalesOrderModel.modelSid |
|
|
|
this.caigouList.params.sidList = this.temp.busSalesVehicleOrderList |
|
|
|
const aa = [] |
|
|
|
this.temp.busSalesVehicleOrderList.forEach((element) => { |
|
|
|
aa.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.caigouList.params.sidList = aa |
|
|
|
getXianList(this.caigouList).then((response) => { |
|
|
|
this.caigouLoading = false |
|
|
|
if ( |
|
|
@ -1741,26 +1825,41 @@ export default { |
|
|
|
// ---------------- 下级页面返回数据 ---------------- |
|
|
|
// 确当选择现车 |
|
|
|
selectionXianche() { |
|
|
|
if (this.xiancheChoice.length > 0) { |
|
|
|
this.temp.busSalesOrderVehicleList = this.xiancheChoice |
|
|
|
const xincheSids = [] |
|
|
|
this.row.forEach((element) => { |
|
|
|
this.xiancheChoice.forEach((element) => { |
|
|
|
xincheSids.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.xiancheList.params.sidList = xincheSids |
|
|
|
this.vehicleList = xincheSids |
|
|
|
this.xiancheLoading = false |
|
|
|
console.log('确认选择现车:', this.temp.busSalesOrderVehicleList, this.vehicleList) |
|
|
|
this.xiancheVisible = false |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请选择车架号!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 确定选择采购 |
|
|
|
selectionCaigou() { |
|
|
|
if (this.caigouChoice.length > 0) { |
|
|
|
this.temp.busSalesVehicleOrderList = this.caigouChoice |
|
|
|
const caigouSids = [] |
|
|
|
this.row.forEach((element) => { |
|
|
|
this.caigouChoice.forEach((element) => { |
|
|
|
caigouSids.push(element.linkSid) |
|
|
|
}) |
|
|
|
this.caigouList.params.sidList = caigouSids |
|
|
|
this.caigouLoading = false |
|
|
|
this.caigouVisible = false |
|
|
|
console.log('确认选择采购', this.temp.busSalesVehicleOrderList, caigouSids) |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请选择车架号!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 切换回新增页面 |
|
|
|
changeState() { |
|
|
@ -1776,6 +1875,7 @@ export default { |
|
|
|
this.temp.customerClassKey = row.customerTypeKey |
|
|
|
this.temp.customerPhoto = row.customerPhoto |
|
|
|
this.customerList = row |
|
|
|
console.log('选择客户',this.temp) |
|
|
|
}, |
|
|
|
// 新增客户 |
|
|
|
addCustomer() { |
|
|
@ -1796,7 +1896,22 @@ export default { |
|
|
|
modelName: modelData.modelAlias, //车型名称 |
|
|
|
modelSid: modelData.modelSid, //车型sid |
|
|
|
moreConfig: modelData.otherConfig, //更多配置 |
|
|
|
specialConfig: '', |
|
|
|
finalPrice: '', |
|
|
|
} |
|
|
|
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) { |
|
|
@ -1813,7 +1928,22 @@ export default { |
|
|
|
modelName: modelData.modelAlias, //车型名称 |
|
|
|
modelSid: modelData.modelSid, //车型sid |
|
|
|
moreConfig: modelData.otherConfig, //更多配置 |
|
|
|
specialConfig: '', |
|
|
|
finalPrice: '', |
|
|
|
} |
|
|
|
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) { |
|
|
@ -1830,8 +1960,25 @@ export default { |
|
|
|
modelName: modelData.modelName, //车型名称 |
|
|
|
modelSid: modelData.modelSid, //车型sid |
|
|
|
moreConfig: modelData.moreConfig, //更多配置 |
|
|
|
specialConfig: '', |
|
|
|
finalPrice: '', |
|
|
|
} |
|
|
|
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) |
|
|
|
row.forEach((element) => { |
|
|
@ -1844,14 +1991,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 |
|
|
|
// }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 提交补充页面 |
|
|
@ -1859,19 +2009,41 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
// ----------------------------------方法-------------------- |
|
|
|
//删除 |
|
|
|
handleDelete(row) { |
|
|
|
getDelDis(row.orderSid).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.temp.busOrderDiscountDtoList = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
// 删除主车优惠数据 |
|
|
|
deleteZhuche(row, index) { |
|
|
|
this.temp.busSalesOrderDiscountList.splice(index, 1) |
|
|
|
}, |
|
|
|
// 删除虚拟订单 |
|
|
|
deleteXuni(row, index) { |
|
|
|
this.temp.busDepositFictitiousList.splice(index, 1) |
|
|
|
}, |
|
|
|
// 删除现车数据 |
|
|
|
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() { |
|
|
|
|
|
|
|
this.temp.busDepositFictitiousList.push({ |
|
|
|
depositBillNo: '', //虚拟订单编号 |
|
|
|
depositPrice: '', //订金剩余金额 |
|
|
|
depositSid: '', //订金信息sid |
|
|
|
payPath: '', //款项支付委托书 |
|
|
|
price: '', //本次结转金额 |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 待使用代码 |
|
|
|
// 预览销售合同 |
|
|
|
previewHeTong() { |
|
|
@ -2045,4 +2217,9 @@ export default { |
|
|
|
.dialogBtn { |
|
|
|
text-align: left; |
|
|
|
} |
|
|
|
|
|
|
|
.linkNoSty { |
|
|
|
display: inline-block; |
|
|
|
padding-right: 20px; |
|
|
|
} |
|
|
|
</style> |
|
|
|