张同海 11 months ago
commit 9caa16f3b9

@ -1247,4 +1247,13 @@ export function listYardBwCarrier(parameter) {
method: 'get', method: 'get',
params: parameter params: parameter
}) })
} }
export function SendTruckAfterDispatch(parameter) {
return axios({
url: '/TaskManageTruck/SendTruckAfterDispatch',
method: 'post',
data: parameter
})
}

@ -515,6 +515,7 @@
<vxe-button @click="removeCheckboxRow()"></vxe-button> <vxe-button @click="removeCheckboxRow()"></vxe-button>
<vxe-button v-if="BookingId" @click="introduce()"></vxe-button> <vxe-button v-if="BookingId" @click="introduce()"></vxe-button>
<vxe-button @click="introduceData()"></vxe-button> <vxe-button @click="introduceData()"></vxe-button>
<vxe-button v-if="taskPKId" @click="synchronous"></vxe-button>
</template> </template>
</vxe-toolbar> </vxe-toolbar>
<vxe-table <vxe-table
@ -688,7 +689,7 @@ import {
BookingTruckGetYardData, BookingTruckGetYardData,
TaskManageTruckGetYardData TaskManageTruckGetYardData
} from '@/api/modular/main/SendCar' } from '@/api/modular/main/SendCar'
import { GetCtn, GetSysUserPage } from '@/api/modular/main/BookingLedger' import { GetCtn, GetSysUserPage,SendTruckAfterDispatch } from '@/api/modular/main/BookingLedger'
import { merge, values } from 'xe-utils' import { merge, values } from 'xe-utils'
export default { export default {
@ -946,6 +947,34 @@ export default {
}) })
} }
}, },
synchronous() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
values.contaList = this.ContactsData
values = this.FnCompleteName(values)
values.pK_ID = this.WebData.pK_ID
values.bookingId = this.BookingId
SendTruckAfterDispatch({ ...values })
.then((res) => {
if (res.data.succ) {
this.$message.success('同步成功')
} else {
this.$message.error(`同步失败,${res.data.msg}`)
}
this.confirmLoading = false
})
.catch(() => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
// //
FnCilckTemplateType(templateId) { FnCilckTemplateType(templateId) {
this.$message.success(`搜索文件中...`) this.$message.success(`搜索文件中...`)
@ -1176,14 +1205,14 @@ export default {
this.$message.success('提交成功') this.$message.success('提交成功')
const type = this.type const type = this.type
if (this.type == 'Add' && !this.BookingId) { if (this.type == 'Add' && !this.BookingId) {
this.type = 'Edit' this.type = 'Edit'
this.id = res.data.ext this.id = res.data.ext
} else if (this.type == 'Add' && this.BookingId) { } else if (this.type == 'Add' && this.BookingId) {
this.type = 'Edit' this.type = 'Edit'
} }
if (type == 'Add') { if (type == 'Add') {
this.init() this.init()
} }
} else { } else {
this.$message.error(`提交失败,${res.data.msg}`) this.$message.error(`提交失败,${res.data.msg}`)
} }

Loading…
Cancel
Save