Browse Source

销售订单(修改过新增、编辑回显问题后得提交)

master
Zhao Qiqi 3 years ago
parent
commit
0af9f544ba
  1. 113
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue
  2. 17
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanInfo.vue

113
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanAdd.vue

@ -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>
@ -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: '', // 123
}
},
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

17
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdanInfo.vue

@ -163,15 +163,20 @@
<div class="chosseBtn">
<el-row>
<el-col :span="4">
<span>{{ this.temp.vehicleType }}</span>
<span>{{ temp.vehicleType }}</span>
</el-col>
<el-col :span="20">
<!--放置五个车架号-->
<el-form-item>
<el-form-item v-if="temp.type == '1'">
<div class="linkNoSty" v-for="(item,index) in temp.busSalesOrderVehicleList">
<span>{{ item.linkNo }}</span>
</div>
</el-form-item>
<el-form-item v-if="temp.type == '2'">
<div class="linkNoSty" v-for="(item,index) in temp.busSalesVehicleOrderList">
<span>{{ item.linkNo }}</span>
</div>
</el-form-item>
</el-col>
</el-row>
</div>
@ -423,10 +428,10 @@
<!-- ==================== 消贷金融方案(暂不考虑) ======================================== -->
<div class="titleleft">
<span>消贷金融方案</span>
<div class="jinrongTit">
<span>单车方案编辑</span>
<span> 预览总方案</span>
</div>
<!-- <div class="jinrongTit">-->
<!-- <span>单车方案编辑</span>-->
<!-- <span> 预览总方案</span>-->
<!-- </div>-->
</div>
<!-- ==================== 订金信息 ======================================== -->
<div class="titleleft space_up">

Loading…
Cancel
Save