|
|
@ -340,7 +340,17 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item> |
|
|
|
|
|
|
|
<el-upload |
|
|
|
:action="uploadAction" |
|
|
|
:data="requestData" |
|
|
|
:headers="accessToken" |
|
|
|
:multiple="false" |
|
|
|
:on-success="uploadSuccessHetong" |
|
|
|
:show-file-list="false" |
|
|
|
class="upload-demo" |
|
|
|
> |
|
|
|
<el-button size="small" type="primary">合同上传</el-button> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -630,7 +640,20 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="款项支付委托书" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>上传</span> |
|
|
|
<el-form-item> |
|
|
|
<el-upload |
|
|
|
:action="uploadAction" |
|
|
|
:data="requestData" |
|
|
|
:headers="accessToken" |
|
|
|
:multiple="false" |
|
|
|
:on-success="uploadSuccessKuanxiang" |
|
|
|
:show-file-list="false" |
|
|
|
class="upload-demo" |
|
|
|
v-model="scope.row.payPath" |
|
|
|
> |
|
|
|
<span class="bluezi">上传</span> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -753,7 +776,8 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="本次使用台数" prop="billNo"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input-number v-model="scope.row.usingNum" @change="changeUsingNum(scope.row,scope.row.usingNum)" |
|
|
|
<el-input-number v-model="scope.row.usingNum" |
|
|
|
@change="changeUsingNum(scope.row,scope.row.usingNum)" |
|
|
|
:min="1" :max="100" label="描述文字"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -796,7 +820,7 @@ |
|
|
|
@handleXuniList="selectXuniList"/> |
|
|
|
<!-- 提交补充页面--> |
|
|
|
<xiaoshoudingdan-submit v-show="relState == '3'" ref="divsubmit" @handleReturn="changeState" |
|
|
|
@handleSubmit="submitPage" @returnHome="handleReturn"/> |
|
|
|
@handleSubmit="submitPage" @returnHome="handleReturn('true')"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -814,6 +838,7 @@ import { |
|
|
|
selectCount, |
|
|
|
selectOrderCount |
|
|
|
} from '@/api/salesManagement/orderManagement' |
|
|
|
import {getStorage} from '@/utils/auth' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import xuanzekehu from "./relation/xuanzekehu"; |
|
|
@ -850,13 +875,25 @@ export default { |
|
|
|
return time.getTime() < Date.now() - oneDay; |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 能确定有用的 |
|
|
|
viewTitle: '', |
|
|
|
state: '', |
|
|
|
relState: '', // 1添加页面 2详情页面 3提交页面 1.1选择客户页面 1.2新增客户页面 2.1意向车型 2.2虚拟订单 2.3车型选择 |
|
|
|
// 4.1优惠明细 5.1虚拟订单 |
|
|
|
dialogStatus: 'add', |
|
|
|
index: 0, |
|
|
|
// Start 上传附件 |
|
|
|
userName: sessionStorage.getItem('name'), |
|
|
|
// 请求头部 |
|
|
|
accessToken: { |
|
|
|
token: getStorage() |
|
|
|
}, |
|
|
|
// 请求路径 |
|
|
|
uploadAction: process.env.VUE_APP_BASE_API + '/base/file/upload', |
|
|
|
requestData: { |
|
|
|
departmentName: window.sessionStorage.getItem('userSid'), |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid') |
|
|
|
}, |
|
|
|
// End 上传附件 |
|
|
|
customerVisible: false, |
|
|
|
xiancheVisible: false, |
|
|
|
caigouVisible: false, |
|
|
@ -946,6 +983,7 @@ export default { |
|
|
|
modelSid: '', //车型sid |
|
|
|
moreConfig: '', //更多配置 |
|
|
|
specialConfig: '', //特殊配置说明 |
|
|
|
type: 0, |
|
|
|
}, //主车车型信息 |
|
|
|
busSalesOrderPrice: { |
|
|
|
plannedPickUpDate: '', //计划提车日期 |
|
|
@ -1112,7 +1150,9 @@ export default { |
|
|
|
// 挂靠 |
|
|
|
affiliatedCompanyChange(val) { |
|
|
|
const choosetItem = this.guaKaoCompanyList.filter((item) => item.sid == val) |
|
|
|
this.temp.affiliatedCompany = choosetItem[0].orgName |
|
|
|
if (choosetItem.length > 0){ |
|
|
|
this.temp.affiliatedCompany = choosetItem[0].orgName |
|
|
|
} |
|
|
|
console.log('挂靠', this.temp.affiliatedCompany, '挂靠sid:', this.temp.affiliatedCompanySid) |
|
|
|
}, |
|
|
|
// 付款方式 |
|
|
@ -1261,7 +1301,6 @@ export default { |
|
|
|
staffSid: window.sessionStorage.getItem('staffSid'), //销售专员sid |
|
|
|
type: '', //销售订单车辆类型 1现车、2订单、3排产 |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.relState = '1' |
|
|
@ -1306,7 +1345,7 @@ export default { |
|
|
|
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //配置sid |
|
|
|
modelSid: this.temp.busSalesOrderModel.modelSid, //车型sid |
|
|
|
staffSid: this.temp.staffSid, //业务员sid |
|
|
|
type: this.temp.type // 类型 |
|
|
|
type: this.temp.busSalesOrderModel.type // 类型 |
|
|
|
} |
|
|
|
const caigouCount = { |
|
|
|
configSid: this.temp.busSalesOrderModel.modelConfigSid, // 配置sid |
|
|
@ -1329,10 +1368,24 @@ export default { |
|
|
|
this.getType() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleChange(val) { |
|
|
|
console.log(val); |
|
|
|
}, |
|
|
|
// // ---------------- 上传附件 ---------------- |
|
|
|
// 上传附件 服务器返回的内容 |
|
|
|
uploadSuccessHetong(response, file) { |
|
|
|
console.log('上传合同附件response:', response) |
|
|
|
console.log('上传合同附件file:', file) |
|
|
|
this.temp.busSalesOrderMakeup.contractPath = response.data.fullUrl |
|
|
|
}, |
|
|
|
uploadSuccessKuanxiang(response, file) { |
|
|
|
console.log('112233', scope.row.payPath) |
|
|
|
console.log('上传款项附件response:', response) |
|
|
|
console.log('上传款项附件file:', file) |
|
|
|
// row.payPath = response.data.fullUrl |
|
|
|
// console.log('款项payPath',row.payPath) |
|
|
|
}, |
|
|
|
|
|
|
|
// ---------------- 计算属性 ---------------- |
|
|
|
// 输入数字正则 |
|
|
|
oninput(val, limit = 0) { |
|
|
@ -1364,9 +1417,11 @@ export default { |
|
|
|
} |
|
|
|
// 选择采购订单时 |
|
|
|
if (this.isXuanzeShow == '2') { |
|
|
|
console.log('采购订单长度',this.temp.busSalesVehicleOrderList) |
|
|
|
if (this.temp.busSalesVehicleOrderList.length > 0) { |
|
|
|
const taishu = [] |
|
|
|
this.temp.busSalesVehicleOrderList.forEach((element) => { |
|
|
|
console.log('采购订单本次使用的台数',element.usingNum) |
|
|
|
if (element.usingNum !== undefined) { |
|
|
|
taishu.push(element.usingNum) |
|
|
|
} |
|
|
@ -1542,19 +1597,24 @@ export default { |
|
|
|
}, |
|
|
|
// 本次使用台数 |
|
|
|
changeUsingNum(row, usingNum) { |
|
|
|
if (usingNum !== undefined) { |
|
|
|
if (Number(row.useNum) < Number(usingNum)) { |
|
|
|
if (usingNum !== undefined && usingNum !== 0) { |
|
|
|
if (Number(row.useNum) > Number(usingNum)) { |
|
|
|
return usingNum |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '本次使用台数大于可使用台数,请重新输入!', |
|
|
|
type: 'error' |
|
|
|
}); |
|
|
|
return row.usingNum = 0 |
|
|
|
} else { |
|
|
|
return usingNum |
|
|
|
return |
|
|
|
} |
|
|
|
} else { |
|
|
|
return row.usingNum = 0 |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请填写本次使用台数!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -1654,6 +1714,7 @@ export default { |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
|
this.relState = '' |
|
|
|
this.isXuanzeShow = '' |
|
|
|
this.temp = { |
|
|
|
affiliatedCompany: '', //挂靠公司名称 |
|
|
|
affiliatedCompanySid: '', //挂靠公司sid |
|
|
@ -1992,11 +2053,12 @@ export default { |
|
|
|
}, |
|
|
|
// 现车查询 |
|
|
|
getXiancheList() { |
|
|
|
console.log('type',this.temp.busSalesOrderModel.type) |
|
|
|
this.xiancheLoading = true |
|
|
|
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.type = this.temp.type |
|
|
|
this.xiancheList.params.type = this.temp.busSalesOrderModel.type |
|
|
|
const aa = [] |
|
|
|
this.temp.busSalesOrderVehicleList.forEach((element) => { |
|
|
|
aa.push(element.linkSid) |
|
|
@ -2063,6 +2125,7 @@ export default { |
|
|
|
handleSelectionXianche(row) { |
|
|
|
console.log('勾选现车数据', row) |
|
|
|
this.xiancheChoice = row |
|
|
|
|
|
|
|
}, |
|
|
|
// 采购订单勾选数据 |
|
|
|
handleSelectionCaigou(row) { |
|
|
@ -2094,16 +2157,23 @@ export default { |
|
|
|
selectionCaigou() { |
|
|
|
if (this.caigouChoice.length > 0) { |
|
|
|
for (var i = 0; i < this.caigouChoice.length; i++) { |
|
|
|
if (this.caigouChoice[i].usingNum == 0 || this.caigouChoice[i].usingNum == undefined) { |
|
|
|
if (this.caigouChoice[i].usingNum == 0 || this.caigouChoice[i].usingNum == undefined || this.caigouChoice[i].usingNum > this.caigouChoice[i].useNum) { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请填写本次使用台数!', |
|
|
|
message: '本次使用台数填写不正确,请重新填写!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
return |
|
|
|
} else { |
|
|
|
const caigouSids = [] |
|
|
|
this.temp.busSalesVehicleOrderList.push(this.caigouChoice[i]) |
|
|
|
console.log('123',this.caigouChoice[i]) |
|
|
|
// this.temp.busSalesVehicleOrderList.push(this.caigouChoice[i]) |
|
|
|
this.temp.busSalesVehicleOrderList.push({ |
|
|
|
linkNo: this.caigouChoice[i].linkNo, |
|
|
|
linkSid: this.caigouChoice[i].linkSid, |
|
|
|
linkText: this.caigouChoice[i].linkText, |
|
|
|
usingNum: this.caigouChoice[i].usingNum |
|
|
|
}) |
|
|
|
caigouSids.push(this.caigouChoice[i].linkSid) |
|
|
|
this.caigouList.params.sidList = caigouSids |
|
|
|
this.caigouVisible = false |
|
|
@ -2143,11 +2213,10 @@ export default { |
|
|
|
// 选择意向车型 |
|
|
|
selectYixiang(modelData, type) { |
|
|
|
console.log('意向车型', modelData) |
|
|
|
this.xiancheList.params.type = type |
|
|
|
this.modelData = modelData |
|
|
|
this.temp.busSalesOrderModel = { |
|
|
|
brandName: modelData.brandName, |
|
|
|
brandSid: modelData.brandSid, |
|
|
|
brandName: modelData.brandName, // 品牌 |
|
|
|
brandSid: modelData.brandSid, // 品牌sid |
|
|
|
config: modelData.config, //常用配置 |
|
|
|
guildPrice: modelData.guidedPrice, //单台指导价 |
|
|
|
modelConfig: modelData.modelName, //车型配置名称 |
|
|
@ -2157,8 +2226,8 @@ export default { |
|
|
|
moreConfig: modelData.otherConfig, //更多配置 |
|
|
|
specialConfig: '', |
|
|
|
finalPrice: '', |
|
|
|
type: type, |
|
|
|
} |
|
|
|
this.temp.type = 1 |
|
|
|
const countList = { |
|
|
|
customerSid: this.temp.customerSid, //客户sid |
|
|
|
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //配置sid |
|
|
@ -2183,12 +2252,9 @@ export default { |
|
|
|
this.caigouCount = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 选择虚拟订单 |
|
|
|
selectXuni(modelData, type) { |
|
|
|
console.log('确定选择车型', modelData) |
|
|
|
this.xiancheList.params.type = type |
|
|
|
this.modelData = modelData |
|
|
|
this.temp.busSalesOrderModel = { |
|
|
|
brandName: modelData.brandName, |
|
|
@ -2202,8 +2268,8 @@ export default { |
|
|
|
moreConfig: modelData.otherConfig, //更多配置 |
|
|
|
specialConfig: '', |
|
|
|
finalPrice: '', |
|
|
|
type: type, |
|
|
|
} |
|
|
|
this.temp.type = 2 |
|
|
|
const countList = { |
|
|
|
customerSid: this.temp.customerSid, //客户sid |
|
|
|
modelConfigSid: this.temp.busSalesOrderModel.modelConfigSid, //配置sid |
|
|
@ -2226,12 +2292,11 @@ export default { |
|
|
|
this.caigouCount = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 选择车型 |
|
|
|
selectChexing(modelData) { |
|
|
|
console.log('选择车型', modelData) |
|
|
|
this.xiancheList.params.type = 3 |
|
|
|
this.modelData = modelData |
|
|
|
this.temp.busSalesOrderModel = { |
|
|
|
brandName: modelData.brandName, |
|
|
@ -2245,8 +2310,8 @@ export default { |
|
|
|
moreConfig: modelData.moreConfig, //更多配置 |
|
|
|
specialConfig: '', |
|
|
|
finalPrice: '', |
|
|
|
type: 3, |
|
|
|
} |
|
|
|
this.temp.type = 3 |
|
|
|
// 现车数量 |
|
|
|
const countList = { |
|
|
|
customerSid: this.temp.customerSid, //客户sid |
|
|
|