Commit 9576a41a by 张权

缺陷修复

1 parent 31dab29c
......@@ -399,6 +399,7 @@ export default {
type: 'datePicker',
dateType: 'date',
valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterRangePickerOptions',
customPickerOptions: {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
......@@ -520,6 +521,9 @@ export default {
},
'editFormPro.additional_price'(newValue, oldValue) {
this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2)
},
'editForm.vehicle.invoicePrice'(newValue, oldValue) {
this.packageToPrice()
}
},
......@@ -544,7 +548,7 @@ export default {
this.routeInfo.addOrEdit = `${this.routeInfo.addOrEdit}`
this.disabled = this.routeInfo.addOrEdit == '5'
// 提单成功 - 修改
if (this.routeInfo.isSuper != 'true') {
if (!this.routeInfo.isSuper) {
this.successDisable = this.routeInfo.addOrEdit == '3'
}
this.getOptionsList('editFormDataCar', false)
......@@ -553,7 +557,6 @@ export default {
this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate'])
// this.title = this.titleObj[this.routeInfo.addOrEdit]
// console.log(this.routeInfo, '-------------')
// 获取套餐列表
// this.getPackageList()
},
......@@ -632,6 +635,14 @@ export default {
},
getInfo() {
this.$apis.ghBeforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
if(this.routeInfo.isSuper){ //超管不能修改以及不能获取到全部员工的列表
const id = this.editFormDataOther.findIndex((item)=>{
return item.name == 'actualSalesPersonId'
})
this.editFormDataOther[id].optionList = [{userOneid: res?.actualSalesPersonId ,staffName: res?.actualSalesPerson}]
this.editFormDataOther[id].isDisabled = true
}
this.editForm = {
...res
}
......@@ -739,7 +750,37 @@ export default {
})
}
}
if (item.attributeList[0].attributeName === 'additional_price') {
this.editRulePro[item.attributeList[0].attributeName] = [
{
validator: (rule, value, callback) => {
return +this.editForm.vehicle.invoicePrice*0.1 < + value ? callback(new Error('输入价格有误')) : callback()
},
trigger: 'change'
}
]
}
})
// const targetObj = this.editFormDataPro[0].optionList.find(item => {
// return item.packageCode === this.editForm.packageCode
// })
// if(targetObj?.editFormData && Array.isArray(targetObj.editFormData) && targetObj.editFormData[targetObj.editFormData.length-1].addHtml ==='table'){
// const tableList = targetObj.editFormData[targetObj.editFormData.length-1].tableList
// tableList.forEach(item => {
// item.forEach(sonItem => {
// if(sonItem.required===1){
// this.editRulePro[sonItem.name] = [
// {
// required: true,
// message: '请输入',
// trigger: 'change'
// }
// ]
// }
// })
// })
// }
if (recovery) {
this.recoveryEditFormPro()
}
......@@ -752,7 +793,6 @@ export default {
})
this.$set(this.editFormPro, hashObj[item.attributeName] != 1 ? (item.attributeName + item.sort) : item.attributeName, item.attributeValue)
})
// console.log(this.editFormPro)
},
autoGenerate() {
var tempList = []
......@@ -993,27 +1033,27 @@ export default {
})
},
handleConfirm() {
// if (this.submit) {
// return true
// }
// this.submit = true
// var list = ['Car', 'Brand', 'User', 'Pro', 'Other']
// var flag = true
// var errorObjList = []
// for (var i = 0; i < list.length; i++) {
// if (this.$refs['editFormRef' + list[i]]) {
// var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
// pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
// !valid && errorObjList.push(errorObj)
// flag && (flag = valid)
// })
// }
// }
// if (!flag) {
// this.whereToGo(Object.keys(errorObjList[0])[0])
// this.submit = false
// return true
// }
if (this.submit) {
return true
}
this.submit = true
var list = ['Car', 'Brand', 'User', 'Pro', 'Other']
var flag = true
var errorObjList = []
for (var i = 0; i < list.length; i++) {
if (this.$refs['editFormRef' + list[i]]) {
var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : this.$refs['editFormRef' + list[i]]
pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
!valid && errorObjList.push(errorObj)
flag && (flag = valid)
})
}
}
if (!flag) {
this.whereToGo(Object.keys(errorObjList[0])[0])
this.submit = false
return true
}
var params = this.getParams()
params.operationType = 1
if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) {
......
......@@ -282,8 +282,7 @@ export default {
{
label: '合同号',
prop: 'contractNo',
width: '130px',
line: 1,
width: '200px',
formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
}
......@@ -438,7 +437,7 @@ export default {
{
label: '大区',
prop: 'provinceMerchantName',
line: 1,
width: '200',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
......@@ -446,7 +445,7 @@ export default {
{
label: '片区',
prop: 'cityMerchantName',
line: 1,
width: '200',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
......
......@@ -240,8 +240,7 @@ export default {
{
label: '合同号',
prop: 'contractNo',
width: '130px',
line: 1,
width: '200px',
formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
}
......@@ -395,7 +394,7 @@ export default {
{
label: '大区',
prop: 'provinceMerchantName',
line: 1,
width: '200',
formatter: cellValue => {
return cellValue.provinceMerchantName || '-'
}
......@@ -403,7 +402,7 @@ export default {
{
label: '片区',
prop: 'cityMerchantName',
line: 1,
width: '200',
formatter: cellValue => {
return cellValue.cityMerchantName || '-'
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!