|
|
|
@ -55,14 +55,14 @@
|
|
|
|
|
<div v-if="type == 'Add' || 'Edit'" class="nav" @click="handleSubmit">
|
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>保存
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="taskPKId" class="nav" @click="handleSubmit">
|
|
|
|
|
<!-- <div v-if="taskPKId" class="nav" @click="handleSubmit">
|
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>分拆派车
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div v-if="type == 'Edit' && !taskPKId" class="nav" @click="FnSubmit">
|
|
|
|
|
<i class="iconfont icon-yunshu1"></i>提交派车
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="taskPKId" class="nav" @click="FnSendCar"><i class="iconfont icon-icon_baocun"></i>派车</div>
|
|
|
|
|
<div v-if="taskPKId" class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i>发单</div>
|
|
|
|
|
<!-- <div v-if="taskPKId" class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i>发单</div> -->
|
|
|
|
|
<div v-if="taskPKId" class="nav" @click="CancelSendCar">
|
|
|
|
|
<i class="iconfont icon-icon_baocun"></i>取消派车
|
|
|
|
|
</div>
|
|
|
|
@ -95,6 +95,7 @@
|
|
|
|
|
@focus="gettruckIdData"
|
|
|
|
|
@change="ChangetruckId"
|
|
|
|
|
allowClear
|
|
|
|
|
:disabled="taskPKId ? false : true"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in truckIdData" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.shortName }}
|
|
|
|
@ -106,22 +107,28 @@
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item label="ATTN:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-select v-decorator="['attn']" v-if="attnData.length" @change="Changeattn" allowClear>
|
|
|
|
|
<a-select
|
|
|
|
|
v-decorator="['attn']"
|
|
|
|
|
v-if="attnData.length"
|
|
|
|
|
@change="Changeattn"
|
|
|
|
|
allowClear
|
|
|
|
|
:disabled="taskPKId ? false : true"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in attnData" :key="item.id" :value="item.id">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
<a-input v-decorator="['attn']" v-else />
|
|
|
|
|
<a-input v-decorator="['attn']" v-else :disabled="taskPKId ? false : true" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item label="ATTN电话:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input v-decorator="['attnTel']" allowClear />
|
|
|
|
|
<a-input v-decorator="['attnTel']" allowClear :disabled="taskPKId ? false : true" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
|
<a-form-item label="ATTN传真:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-input v-decorator="['attnFax']" allowClear />
|
|
|
|
|
<a-input v-decorator="['attnFax']" allowClear :disabled="taskPKId ? false : true" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="6">
|
|
|
|
@ -298,7 +305,7 @@
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="要求到达时间:" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
|
|
|
|
|
<a-date-picker v-decorator="['needArriveTime']" />
|
|
|
|
|
<a-date-picker v-decorator="['needArriveTime']" show-time />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
@ -369,12 +376,12 @@
|
|
|
|
|
<a-row>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="截港日期:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
|
|
|
|
|
<a-date-picker v-decorator="['closingTime']" />
|
|
|
|
|
<a-date-picker v-decorator="['closingTime']" show-time />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
|
<a-form-item label="提货日期:" :labelCol="labelCol8" :wrapperCol="wrapperCol8" has-feedback>
|
|
|
|
|
<a-date-picker v-decorator="['pickUpTime']" />
|
|
|
|
|
<a-date-picker v-decorator="['pickUpTime']" show-time />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="8">
|
|
|
|
@ -551,7 +558,9 @@ import {
|
|
|
|
|
TaskManageTruckPrint,
|
|
|
|
|
TaskManageTruckCancelDispatch,
|
|
|
|
|
TaskManageTruckSendDispatchBatch,
|
|
|
|
|
BookingTruckPrintTemplateWithHistoryList
|
|
|
|
|
BookingTruckPrintTemplateWithHistoryList,
|
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList,
|
|
|
|
|
BookingTruckInitFromBookingOrder
|
|
|
|
|
} from '@/api/modular/main/SendCar'
|
|
|
|
|
import { GetCtn } from '@/api/modular/main/BookingLedger'
|
|
|
|
|
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
|
|
|
|
@ -720,22 +729,44 @@ export default {
|
|
|
|
|
printType
|
|
|
|
|
}
|
|
|
|
|
this.spinning = true
|
|
|
|
|
BookingTruckPrintTemplateWithHistoryList(Data).then(res => {
|
|
|
|
|
this.templateType = res.data
|
|
|
|
|
this.spinning = false
|
|
|
|
|
this.PrintModalVisible = true
|
|
|
|
|
})
|
|
|
|
|
if (this.taskPKId) {
|
|
|
|
|
TaskManageTruckPrintTemplateWithHistoryList(Data).then(res => {
|
|
|
|
|
this.templateType = res.data
|
|
|
|
|
this.spinning = false
|
|
|
|
|
this.PrintModalVisible = true
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
BookingTruckPrintTemplateWithHistoryList(Data).then(res => {
|
|
|
|
|
this.templateType = res.data
|
|
|
|
|
this.spinning = false
|
|
|
|
|
this.PrintModalVisible = true
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 打印
|
|
|
|
|
FnCilckTemplateType(templateId) {
|
|
|
|
|
this.$message.success(`搜索文件中...`)
|
|
|
|
|
let printType = this.PrintType == 4 ? 20 : 10
|
|
|
|
|
if (this.taskPKId) {
|
|
|
|
|
TaskManageTruckPrint({ pkId: this.WebData.pK_ID }).then(res => {
|
|
|
|
|
if (res.data.succ) {
|
|
|
|
|
this.$message.success('打印成功')
|
|
|
|
|
TaskManageTruckPrint({
|
|
|
|
|
taskPKId: this.WebData.pK_ID,
|
|
|
|
|
templateId,
|
|
|
|
|
cateCode: 'truckBill',
|
|
|
|
|
type: this.PrintType,
|
|
|
|
|
printType
|
|
|
|
|
}).then(res => {
|
|
|
|
|
if (!res.success) {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(`打印失败,${res.data.msg}`)
|
|
|
|
|
// this.$message.success(res.data)
|
|
|
|
|
if (this.PrintType == 1) {
|
|
|
|
|
window.open(` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/ViewPrintPdf/${res.data}`, '_blank')
|
|
|
|
|
} else {
|
|
|
|
|
window.open(
|
|
|
|
|
` ${process.env.VUE_APP_API_BASE_URL}/BookingOrder/downloadPrint?filename=${res.data}`,
|
|
|
|
|
'_blank'
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
@ -861,23 +892,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
this.PrintType = '1'
|
|
|
|
|
this.GetPrintData('truckBill', printType)
|
|
|
|
|
// if (this.taskPKId) {
|
|
|
|
|
// TaskManageTruckPrint({ pkId: this.WebData.pK_ID }).then(res => {
|
|
|
|
|
// if (res.data.succ) {
|
|
|
|
|
// this.$message.success('打印成功')
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message.error(`打印失败,${res.data.msg}`)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// } else {
|
|
|
|
|
// BookingTruckPrint({ id: this.WebData.id }).then(res => {
|
|
|
|
|
// if (res.data.succ) {
|
|
|
|
|
// this.$message.success('打印成功')
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message.error(`打印失败,${res.data.msg}`)
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
},
|
|
|
|
|
FnCancel() {
|
|
|
|
|
BookingTruckCancel({ id: this.WebData.id }).then(res => {
|
|
|
|
@ -923,6 +937,19 @@ export default {
|
|
|
|
|
console.log('init')
|
|
|
|
|
this.ContactsData = []
|
|
|
|
|
this.form = this.$form.createForm(this)
|
|
|
|
|
if (this.BookingId) {
|
|
|
|
|
BookingTruckInitFromBookingOrder({ bookingId: this.BookingId }).then(res => {
|
|
|
|
|
console.log(res, 'BookingTruckInitFromBookingOrder')
|
|
|
|
|
this.form.setFieldsValue({ ...res.data.ext })
|
|
|
|
|
if (res.data.ext.contaList) {
|
|
|
|
|
res.data.ext.contaList.forEach((item, index) => {
|
|
|
|
|
item.WebKey = index + 1
|
|
|
|
|
})
|
|
|
|
|
this.ContactsData = res.data.ext.contaList
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.BookingId && this.type == 'Edit') {
|
|
|
|
|
BookingTruckGetTruckListByBooking({ bookingId: this.BookingId }).then(res => {
|
|
|
|
|
this.Bookingdata = res.data
|
|
|
|
@ -986,7 +1013,7 @@ export default {
|
|
|
|
|
this.confirmLoading = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(this.BookingId, this.type)
|
|
|
|
|
// this.$data = this.$options.data()
|
|
|
|
|
|
|
|
|
|
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet' }).then(res => {
|
|
|
|
@ -1178,7 +1205,14 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 补全数据Name
|
|
|
|
|
FnCompleteName(data) {
|
|
|
|
|
console.log('11')
|
|
|
|
|
if (data.dispatcherId) {
|
|
|
|
|
this.dispatcherIdData.forEach(item => {
|
|
|
|
|
console.log(item)
|
|
|
|
|
if (data.dispatcherId == item.sysEmpId) {
|
|
|
|
|
data['dispatcherName'] = item.sysEmpName
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if (data.contaList) {
|
|
|
|
|
data.contaList.forEach(item => {
|
|
|
|
|
this.ctnList.forEach(item2 => {
|
|
|
|
@ -1188,7 +1222,6 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
console.log('12')
|
|
|
|
|
if (data.truckId) {
|
|
|
|
|
this.truckIdData.forEach(item => {
|
|
|
|
|
if (data.truckId == item.id) {
|
|
|
|
|