|
|
@ -1273,23 +1273,20 @@ export default {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
handleSubmit() {
|
|
|
|
handleSubmit() {
|
|
|
|
console.log(1)
|
|
|
|
|
|
|
|
const {
|
|
|
|
const {
|
|
|
|
form: { validateFields }
|
|
|
|
form: { validateFields }
|
|
|
|
} = this
|
|
|
|
} = this
|
|
|
|
this.confirmLoading = true
|
|
|
|
this.confirmLoading = true
|
|
|
|
console.log(2)
|
|
|
|
|
|
|
|
validateFields((errors, values) => {
|
|
|
|
validateFields((errors, values) => {
|
|
|
|
if (!errors) {
|
|
|
|
if (!errors) {
|
|
|
|
console.log(3)
|
|
|
|
|
|
|
|
values.contaList = this.ContactsData
|
|
|
|
values.contaList = this.ContactsData
|
|
|
|
values = this.FnCompleteName(values)
|
|
|
|
values = this.FnCompleteName(values)
|
|
|
|
console.log(this.taskPKId)
|
|
|
|
|
|
|
|
if (this.taskPKId) {
|
|
|
|
if (this.taskPKId) {
|
|
|
|
values.pK_ID = this.WebData.pK_ID
|
|
|
|
values.pK_ID = this.WebData.pK_ID
|
|
|
|
TaskManageTruckSave({ ...values })
|
|
|
|
TaskManageTruckSave({ ...values })
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
console.log(res.data)
|
|
|
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
if (res.data.succ) {
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
// if (this.type == 'Add' && !this.BookingId) {
|
|
|
|
// if (this.type == 'Add' && !this.BookingId) {
|
|
|
@ -1298,7 +1295,9 @@ export default {
|
|
|
|
// } else if (this.type == 'Add' && this.BookingId) {
|
|
|
|
// } else if (this.type == 'Add' && this.BookingId) {
|
|
|
|
// this.type = 'Edit'
|
|
|
|
// this.type = 'Edit'
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
this.init()
|
|
|
|
if (this.type == 'Add') {
|
|
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`保存失败,${res.data.msg}`)
|
|
|
|
this.$message.error(`保存失败,${res.data.msg}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1319,6 +1318,8 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
BookingTruckSave({ ...values })
|
|
|
|
BookingTruckSave({ ...values })
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
|
|
|
|
let type = this.type
|
|
|
|
|
|
|
|
console.log(type)
|
|
|
|
if (res.data.succ) {
|
|
|
|
if (res.data.succ) {
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
this.$message.success('保存成功')
|
|
|
|
if (this.type == 'Add' && !this.BookingId) {
|
|
|
|
if (this.type == 'Add' && !this.BookingId) {
|
|
|
@ -1327,7 +1328,10 @@ export default {
|
|
|
|
} else if (this.type == 'Add' && this.BookingId) {
|
|
|
|
} else if (this.type == 'Add' && this.BookingId) {
|
|
|
|
this.type = 'Edit'
|
|
|
|
this.type = 'Edit'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.init()
|
|
|
|
console.log(type)
|
|
|
|
|
|
|
|
if (type == 'Add') {
|
|
|
|
|
|
|
|
this.init()
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.$message.error(`保存失败,${res.data.msg}`)
|
|
|
|
this.$message.error(`保存失败,${res.data.msg}`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|