diff --git a/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue b/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue
index 36e41f824c..1d02d2d53b 100644
--- a/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue
+++ b/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue
@@ -340,7 +340,17 @@
-
+
+ 合同上传
+
@@ -630,7 +640,20 @@
- 上传
+
+
+ 上传
+
+
@@ -753,7 +776,8 @@
-
@@ -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)
@@ -2094,10 +2156,10 @@ 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
@@ -2143,11 +2205,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 +2218,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 +2244,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 +2260,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 +2284,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 +2302,8 @@ export default {
moreConfig: modelData.moreConfig, //更多配置
specialConfig: '',
finalPrice: '',
+ type: 3,
}
- this.temp.type = 3
// 现车数量
const countList = {
customerSid: this.temp.customerSid, //客户sid
diff --git a/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanInfo.vue b/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanInfo.vue
index f5414ad5ef..4f9843b84c 100644
--- a/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanInfo.vue
+++ b/anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanInfo.vue
@@ -163,15 +163,20 @@
- {{ this.temp.vehicleType }}
+ {{ temp.vehicleType }}
-
+
{{ item.linkNo }}
+
+
+ {{ item.linkNo }}
+
+
@@ -423,10 +428,10 @@
消贷金融方案
-
- 单车方案编辑
- 预览总方案
-
+
+
+
+