Commit 9576a41a by 张权

缺陷修复

1 parent 31dab29c
...@@ -399,6 +399,7 @@ export default { ...@@ -399,6 +399,7 @@ export default {
type: 'datePicker', type: 'datePicker',
dateType: 'date', dateType: 'date',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterRangePickerOptions',
customPickerOptions: { customPickerOptions: {
disabledDate(date) { disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate())) const yesterday = new Date(new Date().setDate(new Date().getDate()))
...@@ -520,6 +521,9 @@ export default { ...@@ -520,6 +521,9 @@ export default {
}, },
'editFormPro.additional_price'(newValue, oldValue) { 'editFormPro.additional_price'(newValue, oldValue) {
this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2) this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2)
},
'editForm.vehicle.invoicePrice'(newValue, oldValue) {
this.packageToPrice()
} }
}, },
...@@ -544,7 +548,7 @@ export default { ...@@ -544,7 +548,7 @@ export default {
this.routeInfo.addOrEdit = `${this.routeInfo.addOrEdit}` this.routeInfo.addOrEdit = `${this.routeInfo.addOrEdit}`
this.disabled = this.routeInfo.addOrEdit == '5' this.disabled = this.routeInfo.addOrEdit == '5'
// 提单成功 - 修改 // 提单成功 - 修改
if (this.routeInfo.isSuper != 'true') { if (!this.routeInfo.isSuper) {
this.successDisable = this.routeInfo.addOrEdit == '3' this.successDisable = this.routeInfo.addOrEdit == '3'
} }
this.getOptionsList('editFormDataCar', false) this.getOptionsList('editFormDataCar', false)
...@@ -553,7 +557,6 @@ export default { ...@@ -553,7 +557,6 @@ export default {
this.disabled && this.setDisabled() this.disabled && this.setDisabled()
this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate']) this.successDisable && this.setDisabled(['invoicePrice', 'billingDate', 'packageCode', 'actualSalesPrice', 'servicePeriod', 'effectiveDate'])
// this.title = this.titleObj[this.routeInfo.addOrEdit] // this.title = this.titleObj[this.routeInfo.addOrEdit]
// console.log(this.routeInfo, '-------------')
// 获取套餐列表 // 获取套餐列表
// this.getPackageList() // this.getPackageList()
}, },
...@@ -632,6 +635,14 @@ export default { ...@@ -632,6 +635,14 @@ export default {
}, },
getInfo() { getInfo() {
this.$apis.ghBeforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => { 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 = { this.editForm = {
...res ...res
} }
...@@ -739,7 +750,37 @@ export default { ...@@ -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) { if (recovery) {
this.recoveryEditFormPro() this.recoveryEditFormPro()
} }
...@@ -752,7 +793,6 @@ export default { ...@@ -752,7 +793,6 @@ export default {
}) })
this.$set(this.editFormPro, hashObj[item.attributeName] != 1 ? (item.attributeName + item.sort) : item.attributeName, item.attributeValue) this.$set(this.editFormPro, hashObj[item.attributeName] != 1 ? (item.attributeName + item.sort) : item.attributeName, item.attributeValue)
}) })
// console.log(this.editFormPro)
}, },
autoGenerate() { autoGenerate() {
var tempList = [] var tempList = []
...@@ -993,27 +1033,27 @@ export default { ...@@ -993,27 +1033,27 @@ export default {
}) })
}, },
handleConfirm() { handleConfirm() {
// if (this.submit) { if (this.submit) {
// return true return true
// } }
// this.submit = true this.submit = true
// var list = ['Car', 'Brand', 'User', 'Pro', 'Other'] var list = ['Car', 'Brand', 'User', 'Pro', 'Other']
// var flag = true var flag = true
// var errorObjList = [] var errorObjList = []
// for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
// if (this.$refs['editFormRef' + list[i]]) { if (this.$refs['editFormRef' + list[i]]) {
// var pRef = list[i] == 'Pro' ? this.$refs['editFormRef' + list[i]][0] : 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) => { pRef.$refs['editChildRef' + list[i]].validate((valid, errorObj) => {
// !valid && errorObjList.push(errorObj) !valid && errorObjList.push(errorObj)
// flag && (flag = valid) flag && (flag = valid)
// }) })
// } }
// } }
// if (!flag) { if (!flag) {
// this.whereToGo(Object.keys(errorObjList[0])[0]) this.whereToGo(Object.keys(errorObjList[0])[0])
// this.submit = false this.submit = false
// return true return true
// } }
var params = this.getParams() var params = this.getParams()
params.operationType = 1 params.operationType = 1
if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) { if (['2', '3', '4'].includes(this.routeInfo.addOrEdit)) {
......
...@@ -282,8 +282,7 @@ export default { ...@@ -282,8 +282,7 @@ export default {
{ {
label: '合同号', label: '合同号',
prop: 'contractNo', prop: 'contractNo',
width: '130px', width: '200px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-' return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
} }
...@@ -438,7 +437,7 @@ export default { ...@@ -438,7 +437,7 @@ export default {
{ {
label: '大区', label: '大区',
prop: 'provinceMerchantName', prop: 'provinceMerchantName',
line: 1, width: '200',
formatter: cellValue => { formatter: cellValue => {
return cellValue.provinceMerchantName || '-' return cellValue.provinceMerchantName || '-'
} }
...@@ -446,7 +445,7 @@ export default { ...@@ -446,7 +445,7 @@ export default {
{ {
label: '片区', label: '片区',
prop: 'cityMerchantName', prop: 'cityMerchantName',
line: 1, width: '200',
formatter: cellValue => { formatter: cellValue => {
return cellValue.cityMerchantName || '-' return cellValue.cityMerchantName || '-'
} }
......
...@@ -240,8 +240,7 @@ export default { ...@@ -240,8 +240,7 @@ export default {
{ {
label: '合同号', label: '合同号',
prop: 'contractNo', prop: 'contractNo',
width: '130px', width: '200px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-' return [2, 4, 5].includes(cellValue.orderStatus) ? (cellValue.contractNo || '-') : '-'
} }
...@@ -395,7 +394,7 @@ export default { ...@@ -395,7 +394,7 @@ export default {
{ {
label: '大区', label: '大区',
prop: 'provinceMerchantName', prop: 'provinceMerchantName',
line: 1, width: '200',
formatter: cellValue => { formatter: cellValue => {
return cellValue.provinceMerchantName || '-' return cellValue.provinceMerchantName || '-'
} }
...@@ -403,7 +402,7 @@ export default { ...@@ -403,7 +402,7 @@ export default {
{ {
label: '片区', label: '片区',
prop: 'cityMerchantName', prop: 'cityMerchantName',
line: 1, width: '200',
formatter: cellValue => { formatter: cellValue => {
return cellValue.cityMerchantName || '-' return cellValue.cityMerchantName || '-'
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!