-
- 打印
-
-
+
打印
+
保存
-
+
提交派车
-
@@ -158,7 +159,7 @@
派车通知详细信息
-
+
@@ -377,7 +378,7 @@
新增
删除选中
- 引入
+ 引入
{
+ if (res.success) {
+ this.$message.success('删除成功')
+ this.init()
+ } else {
+ this.$message.error(`删除失败,${res.message}`)
}
})
},
+ FnAdd() {
+ this.type = 'Add'
+ this.init()
+ },
radioChangeEvent({ row }) {
- this.selectRow = row
this.SData(row.id)
},
cellClickEvent({ row }) {
@@ -629,7 +655,11 @@ export default {
this.form = this.$form.createForm(this)
BookingTruckGetInfo({ id })
.then(res => {
+ this.id = id
if (res.data.ext.contaList) {
+ res.data.ext.contaList.forEach((item, index) => {
+ item.WebKey = index + 1
+ })
this.ContactsData = res.data.ext.contaList
}
setTimeout(() => {
@@ -690,7 +720,7 @@ export default {
validateFields((errors, values) => {
if (!errors) {
values.contaList = this.ContactsData
- if (this.$route.query.type == 'Edit') {
+ if (this.type == 'Edit') {
values.id = this.WebData.id
}
BookingTruckSubmit({ ...values })
@@ -711,56 +741,56 @@ export default {
})
},
init() {
- if (this.$route.query.BookingId) {
- BookingTruckGetTruckListByBooking({ bookingId: this.$route.query.BookingId }).then(res => {
+ console.log('init')
+ this.ContactsData = []
+ this.form = this.$form.createForm(this)
+ if (this.BookingId && this.type == 'Edit') {
+ BookingTruckGetTruckListByBooking({ bookingId: this.BookingId }).then(res => {
this.Bookingdata = res.data
this.$refs.xTable1.setRadioRow(res.data[0])
this.SData(res.data[0].id)
})
}
- if (this.$route.query.type == 'Add' || this.$route.query.type == 'Edit') {
- // this.$data = this.$options.data()
- this.ContactsData = []
- this.form = this.$form.createForm(this)
- DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet' }).then(res => {
- this.truckIdData = res.data
- this.AlltruckIdData = res.data
- })
- DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard' }).then(res => {
- this.yardidData = res.data
- this.inYardIDData = res.data
- })
- sysUserQueryUserByPos({ pos: 'PCDD' }).then(res => {
- this.dispatcherIdData = res.data
- })
- GetCtn({ KeyWord: '' }).then(res => {
- this.ctnList = res.data
- })
- if (this.$route.query.type == 'Edit' && !this.$route.query.id) {
- this.SData(this.$route.query.id)
- // BookingTruckGetInfo({ id: this.$route.query.id }).then(res => {
- // if (res.data.ext.contaList) {
- // this.ContactsData = res.data.ext.contaList
- // }
- // setTimeout(() => {
- // this.form.setFieldsValue({ ...res.data.ext })
- // this.WebData = res.data.ext
- // this.ChangetruckId(res.data.ext.truckId)
- // setTimeout(() => {
- // this.Changeattn(res.data.ext.attn)
- // }, 110)
- // this.Changeyardid(res.data.ext.yardid)
- // setTimeout(() => {
- // this.Changeyardcontract(res.data.ext.yardcontract)
- // }, 110)
- // this.ChangeinYardID(res.data.ext.inYardID)
- // setTimeout(() => {
- // this.ChangeinYardContact(res.data.ext.inYardContact)
- // }, 110)
- // }, 100)
- // })
- }
+ // this.$data = this.$options.data()
+
+ DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet' }).then(res => {
+ this.truckIdData = res.data
+ this.AlltruckIdData = res.data
+ })
+ DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard' }).then(res => {
+ this.yardidData = res.data
+ this.inYardIDData = res.data
+ })
+ sysUserQueryUserByPos({ pos: 'PCDD' }).then(res => {
+ this.dispatcherIdData = res.data
+ })
+ GetCtn({ KeyWord: '' }).then(res => {
+ this.ctnList = res.data
+ })
+ if (this.type == 'Edit' && this.id) {
+ this.SData(this.id)
+ // BookingTruckGetInfo({ id: this.id }).then(res => {
+ // if (res.data.ext.contaList) {
+ // this.ContactsData = res.data.ext.contaList
+ // }
+ // setTimeout(() => {
+ // this.form.setFieldsValue({ ...res.data.ext })
+ // this.WebData = res.data.ext
+ // this.ChangetruckId(res.data.ext.truckId)
+ // setTimeout(() => {
+ // this.Changeattn(res.data.ext.attn)
+ // }, 110)
+ // this.Changeyardid(res.data.ext.yardid)
+ // setTimeout(() => {
+ // this.Changeyardcontract(res.data.ext.yardcontract)
+ // }, 110)
+ // this.ChangeinYardID(res.data.ext.inYardID)
+ // setTimeout(() => {
+ // this.ChangeinYardContact(res.data.ext.inYardContact)
+ // }, 110)
+ // }, 100)
+ // })
}
},
FnRctncode(value) {
@@ -875,7 +905,18 @@ export default {
filterOption(value, option) {
return option.componentOptions.children[0].text.indexOf(value) >= 0
},
+ introduce() {
+ BookingTruckPullInBookingOrderConta({ bookingId: this.BookingId }).then(res => {
+ res.data.ext.forEach(item => {
+ this.ContactsData.push({
+ ...item,
+ WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1
+ })
+ })
+ })
+ },
removeCheckboxRow() {
+ console.log(this.$refs.xTable.selection)
this.$refs.xTable.selection.forEach(item => {
this.ContactsData.forEach((item2, index2) => {
if (item.WebKey == item2.WebKey) {
@@ -885,17 +926,11 @@ export default {
})
},
insertEvent() {
- if (this.ContactsData) {
+ if (!this.ContactsData) {
this.ContactsData = []
}
this.ContactsData.push({
- WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1,
- roleName: '',
- name: '',
- tel: '',
- email: '',
- qq: '',
- remark: ''
+ WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1
})
},
formatRole(value) {
@@ -926,23 +961,31 @@ export default {
validateFields((errors, values) => {
if (!errors) {
values.contaList = this.ContactsData
- if (this.$route.query.type == 'Edit') {
+ if (this.type == 'Edit') {
values.id = this.WebData.id
}
+ if (this.type == 'Add' && this.BookingId) {
+ values.bookingId = this.BookingId
+ }
BookingTruckSave({ ...values })
.then(res => {
- if (this.$route.query.type == 'Add') {
- this.$router.push({
- query: {
- type: 'Edit',
- id: res.data.ext
- }
- })
+ if (res.data.succ) {
+ this.$message.success('保存成功')
+ if (this.type == 'Add' && !this.BookingId) {
+ this.type = 'Edit'
+ this.id = res.data.ext
+ } else if (this.type == 'Add' && this.BookingId) {
+ this.type = 'Edit'
+ }
+ this.init()
+ } else {
+ this.$message.error(`保存失败,${res.data.msg}`)
}
this.confirmLoading = false
})
.catch(() => {
+ this.init()
this.confirmLoading = false
})
} else {
diff --git a/src/views/main/SendCar/index.vue b/src/views/main/SendCar/index.vue
index ad0c8b9..6ddef76 100644
--- a/src/views/main/SendCar/index.vue
+++ b/src/views/main/SendCar/index.vue
@@ -7,11 +7,65 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.shortName }}
+
+
+
+
+
+
+
@@ -35,14 +89,14 @@
-
+
@@ -51,8 +105,8 @@
@@ -88,8 +142,13 @@
:align="item.align"
v-if="item.checked"
>
-
- {{ row.truckCode }}-{{ row.truckName }}
+
+
+ {{ row.truckCode }}-{{ row.truckName }}
+ {{ FnRstatus(row.status) }}
+ {{ row[item.dataIndex] }}
@@ -138,21 +197,22 @@ import {
BookingTruckCancel,
DjyCustomerGet,
DjyUserConfigAdd,
- apibookingtruck
+ apibookingtruck,
+ DjyCustomerQuerytDjyCustomerInfo
} from '@/api/modular/main/SendCar'
import columnSetting from '@/components/tableColumnSetting'
const columns = [
{
title: '派车单号',
align: 'center',
- width: '90',
+ width: '100',
dataIndex: 'id'
},
{
title: '任务流水号',
align: 'center',
width: '120',
- dataIndex: 'shortName'
+ dataIndex: 'TaskNo'
},
{
title: '状态',
@@ -182,7 +242,7 @@ const columns = [
title: '指定到厂时间',
align: 'center',
width: '180',
- dataIndex: 'closingTime'
+ dataIndex: 'needArriveTime'
},
{
title: '提箱日期',
@@ -201,6 +261,19 @@ export default {
// { title: 'Tab 2', content: 'Content of Tab 2', key: '2' }
]
return {
+ truckIdData: [],
+ payMethodData: [
+ { id: 'NO_INVOICE', name: '不开票' },
+ { id: 'OWN_COMPANY', name: '本公司发票' },
+ { id: 'LAND_TRANS_INVOICE', name: '陆运发票' }
+ ],
+ statusData: [
+ { id: 'TEMP', name: '暂存' },
+ { id: 'SUBMITED', name: '已提交' },
+ { id: 'CANCELED', name: '已撤销' },
+ { id: 'SEND_DISPATCH', name: '已派车' },
+ { id: 'CANCEL_DISPATCH', name: '已撤销派车' }
+ ],
activeKey: 0,
panes,
// 高级搜索 展开/关闭
@@ -233,7 +306,33 @@ export default {
mounted() {
this.init()
},
+ computed: {},
methods: {
+ filterOption(value, option) {
+ return option.componentOptions.children[0].text.indexOf(value) >= 0
+ },
+ gettruckIdData(name = '', type) {
+ DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then(res => {
+ this.truckIdData = res.data
+ })
+ },
+ OnChangeCreate(date, dateString) {
+ this.queryParam.createBegin = dateString[0]
+ this.queryParam.createEnd = dateString[1]
+ },
+ OnChangetruckTime(date, dateString) {
+ this.queryParam.truckTimeBegin = dateString[0]
+ this.queryParam.truckTimeEnd = dateString[1]
+ },
+ FnRstatus(data) {
+ let RData = ''
+ this.statusData.forEach(item => {
+ if (item.id == data) {
+ RData = item.name
+ }
+ })
+ return RData
+ },
init() {
Object.assign(this.$data, this.$options.data())
columns.forEach(item => {
diff --git a/src/views/main/Taskmanage/TaskmanageList/index.vue b/src/views/main/Taskmanage/TaskmanageList/index.vue
index dfe5d73..638d3e6 100644
--- a/src/views/main/Taskmanage/TaskmanageList/index.vue
+++ b/src/views/main/Taskmanage/TaskmanageList/index.vue
@@ -10,7 +10,9 @@
- {{ item.name }}({{ item.total }})
+ {{ item.name }}({{ item.total }})
@@ -37,7 +39,8 @@
class="icon"
:icon="levelreLoading ? 'loading' : 'reload'"
size="small"
- @click="getCurrentTotalStat">
+ @click="getCurrentTotalStat"
+ >
点击重新加载
@@ -71,11 +74,7 @@
:dropdownMatchSelectWidth="false"
v-decorator="['taskType', { rules: [{ required: false, message: '请输入任务类型' }] }]"
>
-
+
{{ taskItem.name }}
@@ -272,7 +271,9 @@
>
LARA登记
- LARA记录
+ LARA记录
@@ -284,9 +285,7 @@
@confirm="tableRefresh"
@cancel="cancelFun"
>
-
- 刷新
-
+ 刷新
@@ -352,7 +351,9 @@
预览附件
-
+
@@ -538,7 +539,7 @@ export default {
align: 'center'
}
],
- paperCalcExtras: '',
+ paperCalcExtras: ''
// downLoadErrTip: '',
// showdownLoadErr: false
}
@@ -729,32 +730,34 @@ export default {
this.activeTreeKey = ['0-0-0']
GetCurrentTotalStat({
isReCalc: false
- }).then(res => {
- this.levelLoading = false
- this.levelreLoading = false
- if (res.success) {
- this.levelTop = res.data.levelTop
- this.levelNextAll = res.data.levelNext
- this.levelTreeAll = res.data.levelTree
- if (this.levelTop.length > 0) {
- this.activeTopKey = this.levelTop[0].key
- this.levelNext = this.selectNextLevel(this.levelNextAll, this.activeTopKey)
- if (this.levelNext.length > 0) {
- this.activeNextKey = this.levelNext[0].key
- this.levelTree = this.selectTreeLevel(this.levelTreeAll, this.activeNextKey, this.activeTopKey)
+ })
+ .then(res => {
+ this.levelLoading = false
+ this.levelreLoading = false
+ if (res.success) {
+ this.levelTop = res.data.levelTop
+ this.levelNextAll = res.data.levelNext
+ this.levelTreeAll = res.data.levelTree
+ if (this.levelTop.length > 0) {
+ this.activeTopKey = this.levelTop[0].key
+ this.levelNext = this.selectNextLevel(this.levelNextAll, this.activeTopKey)
+ if (this.levelNext.length > 0) {
+ this.activeNextKey = this.levelNext[0].key
+ this.levelTree = this.selectTreeLevel(this.levelTreeAll, this.activeNextKey, this.activeTopKey)
+ }
}
+ this.activeTreeKey = []
+ this.form.resetFields()
+ this.taskType = ''
+ this.init()
+ } else {
+ this.init()
+ this.$message.error(res.message)
}
- this.activeTreeKey = []
- this.form.resetFields()
- this.taskType = ''
- this.init()
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(err => {
- console.log(err)
- })
+ })
+ .catch(err => {
+ console.log(err)
+ })
},
selectNextLevel(list, key) {
const arr = []
@@ -832,6 +835,7 @@ export default {
this.$set(this.gridOptions, 'loading', false)
this.$forceUpdate()
} else {
+ this.$set(this.gridOptions, 'loading', false)
this.$message.error(res.message)
}
})
@@ -872,23 +876,48 @@ export default {
this.advanced = !this.advanced
},
changePage(data) {
- if (data.taskType === 'VGM_COMPARE') { // VGM比对查看页面
- this.$router.push({ path: '/commontaskmanage/TaskVgmContrast', query: { taskPKId: data.pkId, type: data.status } })
- } else if (data.taskType === 'INVOICE_BILL_MAIL') { // 航次账单查看
+ console.log(data)
+ if (data.taskType === 'VGM_COMPARE') {
+ // VGM比对查看页面
+ this.$router.push({
+ path: '/commontaskmanage/TaskVgmContrast',
+ query: { taskPKId: data.pkId, type: data.status }
+ })
+ } else if (data.taskType === 'INVOICE_BILL_MAIL') {
+ // 航次账单查看
this.$router.push({ path: '/commontaskmanage/VoyageBill', query: { taskPKId: data.pkId } })
- } else if (data.taskType === 'PER_BILL') { // 单票账单查看
+ } else if (data.taskType === 'PER_BILL') {
+ // 单票账单查看
this.$router.push({ path: '/commontaskmanage/singleTicket', query: { taskPKId: data.pkId } })
- } else if (data.taskType === 'CHANGE_SHIP') { // 换船通知查看
+ } else if (data.taskType === 'CHANGE_SHIP') {
+ // 换船通知查看
this.$router.push({ path: '/commontaskmanage/TaskChangeShip', query: { taskPKId: data.pkId, type: 'change' } })
- } else if (data.taskType === 'ABORT_CHANGE_SHIP') { // 取消换船通知查看
- this.$router.push({ path: '/commontaskmanage/TaskChangeShip', query: { taskPKId: data.pkId, type: 'abortChange' } })
- } else if (data.taskType === 'ORIGINAL_LOST') { // 正本缺失查看
+ } else if (data.taskType === 'ABORT_CHANGE_SHIP') {
+ // 取消换船通知查看
+ this.$router.push({
+ path: '/commontaskmanage/TaskChangeShip',
+ query: { taskPKId: data.pkId, type: 'abortChange' }
+ })
+ } else if (data.taskType === 'ORIGINAL_LOST') {
+ // 正本缺失查看
this.$router.push({ path: '/commontaskmanage/TaskOriginalLost', query: { taskPKId: data.pkId } })
- } else if (data.taskType === 'SHIPPING_ORDER') { // 订舱详情查看
+ } else if (data.taskType === 'SHIPPING_ORDER') {
+ // 订舱详情查看
this.$router.push({ path: '/commontaskmanage/BookingDetails', query: { taskPKId: data.pkId } })
- } else if (data.taskType === 'SI_FEEDBACK') { // 订舱详情编辑
+ } else if (data.taskType === 'SI_FEEDBACK') {
+ // 订舱详情编辑
this.$router.push({ path: '/commontaskmanage/TaskmanageDetail', query: { taskPKId: data.pkId } })
- } else { // 订舱详情查看
+ } else if (data.taskType === 'TRUCK_DISPATCH') {
+ // 派车编辑
+ // this.$router.push({ path: '/commontaskmanage/TaskmanageDetail', query: { taskPKId: data.pkId } })
+ this.$router.push({
+ name: 'SendCarAdd',
+ query: {
+ type: 'Edit'
+ }
+ })
+ } else {
+ // 订舱详情查看
this.$router.push({ path: '/commontaskmanage/BookingDetails', query: { taskPKId: data.pkId } })
}
},
@@ -969,27 +998,27 @@ export default {
DownloadTaskAttach({
taskPKId: id
})
- .then(res => {
- if (res.message) {
- // this.showdownLoadErr = true
- this.downLoadErrTip = `${name}下载失败:${res.message}`
+ .then(res => {
+ if (res.message) {
+ // this.showdownLoadErr = true
+ this.downLoadErrTip = `${name}下载失败:${res.message}`
- message.error(`${name}下载失败:${res.message}`, 0)
- return false
- }
- const blob = new Blob([res], { type: `application/pdf;chartset=UTF-8` })
- const link = document.createElement('a')
- link.style.display = 'none'
- link.href = URL.createObjectURL(blob)
- link.download = name
- document.body.appendChild(link)
- link.click()
- URL.revokeObjectURL(link.href) // 释放URL对象
- document.body.removeChild(link)
- })
- .catch(err => {
- console.log(err)
- })
+ message.error(`${name}下载失败:${res.message}`, 0)
+ return false
+ }
+ const blob = new Blob([res], { type: `application/pdf;chartset=UTF-8` })
+ const link = document.createElement('a')
+ link.style.display = 'none'
+ link.href = URL.createObjectURL(blob)
+ link.download = name
+ document.body.appendChild(link)
+ link.click()
+ URL.revokeObjectURL(link.href) // 释放URL对象
+ document.body.removeChild(link)
+ })
+ .catch(err => {
+ console.log(err)
+ })
},
// 重新比对
reComparisonFun() {
@@ -1003,16 +1032,17 @@ export default {
return false
}
const query = this.$qs.stringify({ PKIds: pkIdArr }, { arrayFormat: 'repeat' })
- ManualReCompareBC(query).then(res => {
- if (res.success) {
- this.$message.success('重新比对完成')
- } else {
- this.$message.error(res.message)
- }
- })
- .catch(err => {
- console.log(err)
- })
+ ManualReCompareBC(query)
+ .then(res => {
+ if (res.success) {
+ this.$message.success('重新比对完成')
+ } else {
+ this.$message.error(res.message)
+ }
+ })
+ .catch(err => {
+ console.log(err)
+ })
},
// 批量转发
SendEmailFun() {
@@ -1105,7 +1135,7 @@ export default {
PKIds: pkIdArr
})
.then(res => {
- // 接口暂时报错
+ // 接口暂时报错
if (res.message) {
const downLoadErrTip = `COPY打印失败:${res.message}`
this.$message.error(downLoadErrTip)
@@ -1220,7 +1250,7 @@ export default {
taskDownloadFun(data) {
// 非DRAFT 任务类型下,接口报错。
this.DownloadTaskAttach(data.pkId, data.taskTitle)
- },
+ }
// onDownloadErrClose() {
// console.log('关闭')
// this.showdownLoadErr = false
@@ -1285,21 +1315,21 @@ export default {
color: @primary-color;
}
}
-.icon-tip{
+.icon-tip {
font-size: 12px;
color: @primary-color;
}
-.nav-title{
- .ant-radio-button-wrapper{
+.nav-title {
+ .ant-radio-button-wrapper {
padding: 0 10px;
text-align: center;
}
}
-.nav-top{
- width:100%;
+.nav-top {
+ width: 100%;
height: 100%;
// position: relative;
- .nav-top-tip{
+ .nav-top-tip {
// position: absolute;
// top: 0;right: 10px;
// width: 20px;
@@ -1314,29 +1344,29 @@ export default {
// border-radius: 50%;
}
}
-.nav-box{
- padding:20px 14px;
+.nav-box {
+ padding: 20px 14px;
background: #fff;
border-radius: 2px;
}
-.nav-no-data{
+.nav-no-data {
height: 84px;
line-height: 84px;
text-align: center;
margin-top: 20px;
- i{
+ i {
display: block;
line-height: 60px;
font-size: 32px;
color: #aaa;
}
- span{
+ span {
display: block;
line-height: 24px;
color: #999;
}
}
-.tab-btn{
+.tab-btn {
cursor: pointer;
}
// .downLoad-err-alert{
From ad54c86462c0d8e2ed25943f48ac47ad90353f1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com>
Date: Thu, 20 Apr 2023 18:28:28 +0800
Subject: [PATCH 8/8] 4/20
---
src/api/modular/main/SendCar.js | 50 +++++
.../detail/modules/operationArea.vue | 18 +-
src/views/main/SendCar/addForm.vue | 208 +++++++++++++-----
.../main/Taskmanage/TaskmanageList/index.vue | 3 +-
4 files changed, 207 insertions(+), 72 deletions(-)
diff --git a/src/api/modular/main/SendCar.js b/src/api/modular/main/SendCar.js
index 391d2c3..244ea20 100644
--- a/src/api/modular/main/SendCar.js
+++ b/src/api/modular/main/SendCar.js
@@ -129,6 +129,56 @@ export function BookingTruckPullInBookingOrderConta(parameter) {
params: parameter
})
}
+/**
+ * 通过任务主键获取派车详情
+ */
+export function TaskManageTruckGetInfoByTaskId(parameter) {
+ return axios({
+ url: '/TaskManageTruck/GetInfoByTaskId',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 保存派车
+ */
+export function TaskManageTruckSave(parameter) {
+ return axios({
+ url: '/TaskManageTruck/Save',
+ method: 'post',
+ data: parameter
+ })
+}
+/**
+ * 打印派车
+ */
+export function TaskManageTruckPrint(parameter) {
+ return axios({
+ url: '/TaskManageTruck/Print',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 取消派车
+ */
+export function TaskManageTruckCancelDispatch(parameter) {
+ return axios({
+ url: '/TaskManageTruck/CancelDispatch',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 批量派车
+ */
+export function TaskManageTruckSendDispatchBatch(parameter) {
+ return axios({
+ url: '/TaskManageTruck/SendDispatchBatch',
+ method: 'post',
+ data: parameter
+ })
+}
/**
* 添加订舱模板
*
diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue
index 2fcd4ec..fc6d41e 100644
--- a/src/views/main/BookingLedger/detail/modules/operationArea.vue
+++ b/src/views/main/BookingLedger/detail/modules/operationArea.vue
@@ -873,17 +873,13 @@ export default {
FnGoSendCar() {
BookingTruckGetTruckListByBooking({ bookingId: this.id }).then(res => {
console.log(res)
- if (res.data.length) {
- this.$router.push({
- name: 'SendCarAdd',
- query: {
- type: 'Edit',
- BookingId: this.id
- }
- })
- } else {
- this.$message.error('暂无派车数据')
- }
+ this.$router.push({
+ name: 'SendCarAdd',
+ query: {
+ type: 'Edit',
+ BookingId: this.id
+ }
+ })
})
},
// ========== OCR ==========
diff --git a/src/views/main/SendCar/addForm.vue b/src/views/main/SendCar/addForm.vue
index dff0f93..5765f24 100644
--- a/src/views/main/SendCar/addForm.vue
+++ b/src/views/main/SendCar/addForm.vue
@@ -55,10 +55,18 @@
保存
-
+
+ 分拆派车
+
+
提交派车
-
+
派车
+
发单
+
+ 取消派车
+
+
撤销派车
@@ -159,7 +167,7 @@
派车通知详细信息
-
+
@@ -485,7 +493,12 @@ import {
BookingTruckCancel,
BookingTruckGetTruckListByBooking,
apibookingtruck,
- BookingTruckPullInBookingOrderConta
+ BookingTruckPullInBookingOrderConta,
+ TaskManageTruckGetInfoByTaskId,
+ TaskManageTruckSave,
+ TaskManageTruckPrint,
+ TaskManageTruckCancelDispatch,
+ TaskManageTruckSendDispatchBatch
} from '@/api/modular/main/SendCar'
import { GetCtn } from '@/api/modular/main/BookingLedger'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
@@ -606,7 +619,8 @@ export default {
if (
this.id == this.$route.query.id &&
this.type == this.$route.query.type &&
- this.BookingId == this.$route.query.BookingId
+ this.BookingId == this.$route.query.BookingId &&
+ this.taskPKId == this.$route.query.taskPKId
) {
console.log(
this.id,
@@ -617,6 +631,7 @@ export default {
this.$route.query.BookingId
)
} else {
+ this.taskPKId = this.$route.query.taskPKId
this.id = this.$route.query.id
this.type = this.$route.query.type
this.BookingId = this.$route.query.BookingId
@@ -628,6 +643,26 @@ export default {
},
mounted() {},
methods: {
+ // 调度派车
+ FnSendCar() {
+ TaskManageTruckSendDispatchBatch([this.WebData.pK_ID]).then(res => {
+ if (res.data.succ) {
+ this.$message.success('派车成功')
+ } else {
+ this.$message.error(`派车失败,${res.data.msg}`)
+ }
+ })
+ },
+ // 调度取消派车
+ CancelSendCar() {
+ TaskManageTruckCancelDispatch({ pkId: this.WebData.pK_ID }).then(res => {
+ if (res.data.succ) {
+ this.$message.success('取消成功')
+ } else {
+ this.$message.error(`取消失败,${res.data.msg}`)
+ }
+ })
+ },
FnDelete() {
apibookingtruck(this.WebData.id).then(res => {
if (res.success) {
@@ -694,13 +729,23 @@ export default {
return Rdata
},
FnPrint() {
- BookingTruckPrint({ id: this.WebData.id }).then(res => {
- if (res.data.succ) {
- this.$message.success('打印成功')
- } else {
- this.$message.error(`打印失败,${res.data.msg}`)
- }
- })
+ 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 => {
@@ -747,9 +792,47 @@ export default {
if (this.BookingId && this.type == 'Edit') {
BookingTruckGetTruckListByBooking({ bookingId: this.BookingId }).then(res => {
this.Bookingdata = res.data
- this.$refs.xTable1.setRadioRow(res.data[0])
- this.SData(res.data[0].id)
+ if (res.data.length) {
+ this.$refs.xTable1.setRadioRow(res.data[0])
+ this.SData(res.data[0].id)
+ } else {
+ this.type = 'Add'
+ }
})
+ } else if (this.taskPKId) {
+ TaskManageTruckGetInfoByTaskId({ taskPkId: this.taskPKId })
+ .then(res => {
+ if (res.data.succ) {
+ if (res.data.ext.contaList) {
+ res.data.ext.contaList.forEach((item, index) => {
+ item.WebKey = index + 1
+ })
+ this.ContactsData = res.data.ext.contaList
+ }
+ setTimeout(() => {
+ this.form.setFieldsValue({ ...res.data.ext })
+ this.WebData = res.data.ext
+ this.ChangetruckId(res.data.ext.truckId)
+ setTimeout(() => {
+ this.Changeattn(res.data.ext.attn)
+ }, 110)
+ this.Changeyardid(res.data.ext.yardid)
+ setTimeout(() => {
+ this.Changeyardcontract(res.data.ext.yardcontract)
+ }, 110)
+ this.ChangeinYardID(res.data.ext.inYardID)
+ setTimeout(() => {
+ this.ChangeinYardContact(res.data.ext.inYardContact)
+ }, 110)
+ }, 100)
+ } else {
+ this.$message.error(`${res.data.msg}`)
+ }
+ this.confirmLoading = false
+ })
+ .catch(() => {
+ this.confirmLoading = false
+ })
}
// this.$data = this.$options.data()
@@ -770,27 +853,6 @@ export default {
})
if (this.type == 'Edit' && this.id) {
this.SData(this.id)
- // BookingTruckGetInfo({ id: this.id }).then(res => {
- // if (res.data.ext.contaList) {
- // this.ContactsData = res.data.ext.contaList
- // }
- // setTimeout(() => {
- // this.form.setFieldsValue({ ...res.data.ext })
- // this.WebData = res.data.ext
- // this.ChangetruckId(res.data.ext.truckId)
- // setTimeout(() => {
- // this.Changeattn(res.data.ext.attn)
- // }, 110)
- // this.Changeyardid(res.data.ext.yardid)
- // setTimeout(() => {
- // this.Changeyardcontract(res.data.ext.yardcontract)
- // }, 110)
- // this.ChangeinYardID(res.data.ext.inYardID)
- // setTimeout(() => {
- // this.ChangeinYardContact(res.data.ext.inYardContact)
- // }, 110)
- // }, 100)
- // })
}
},
FnRctncode(value) {
@@ -952,7 +1014,7 @@ export default {
/**
* 提交表单
*/
- handleSubmit(WebType) {
+ handleSubmit() {
const {
form: { validateFields }
} = this
@@ -961,33 +1023,59 @@ export default {
validateFields((errors, values) => {
if (!errors) {
values.contaList = this.ContactsData
- if (this.type == 'Edit') {
- values.id = this.WebData.id
- }
- if (this.type == 'Add' && this.BookingId) {
- values.bookingId = this.BookingId
- }
- BookingTruckSave({ ...values })
- .then(res => {
- if (res.data.succ) {
- this.$message.success('保存成功')
- if (this.type == 'Add' && !this.BookingId) {
- this.type = 'Edit'
- this.id = res.data.ext
- } else if (this.type == 'Add' && this.BookingId) {
- this.type = 'Edit'
+ if (this.taskPKId) {
+ values.pK_ID = this.WebData.pK_ID
+ TaskManageTruckSave({ ...values })
+ .then(res => {
+ console.log(res.data)
+ if (res.data.succ) {
+ this.$message.success('保存成功')
+ // if (this.type == 'Add' && !this.BookingId) {
+ // this.type = 'Edit'
+ // this.id = res.data.ext
+ // } else if (this.type == 'Add' && this.BookingId) {
+ // this.type = 'Edit'
+ // }
+ this.init()
+ } else {
+ this.$message.error(`保存失败,${res.data.msg}`)
}
+
+ this.confirmLoading = false
+ })
+ .catch(() => {
this.init()
- } else {
- this.$message.error(`保存失败,${res.data.msg}`)
- }
+ this.confirmLoading = false
+ })
+ } else {
+ if (this.type == 'Edit') {
+ values.id = this.WebData.id
+ }
+ if (this.type == 'Add' && this.BookingId) {
+ values.bookingId = this.BookingId
+ }
+ BookingTruckSave({ ...values })
+ .then(res => {
+ if (res.data.succ) {
+ this.$message.success('保存成功')
+ if (this.type == 'Add' && !this.BookingId) {
+ this.type = 'Edit'
+ this.id = res.data.ext
+ } else if (this.type == 'Add' && this.BookingId) {
+ this.type = 'Edit'
+ }
+ this.init()
+ } else {
+ this.$message.error(`保存失败,${res.data.msg}`)
+ }
- this.confirmLoading = false
- })
- .catch(() => {
- this.init()
- this.confirmLoading = false
- })
+ this.confirmLoading = false
+ })
+ .catch(() => {
+ this.init()
+ this.confirmLoading = false
+ })
+ }
} else {
this.confirmLoading = false
}
diff --git a/src/views/main/Taskmanage/TaskmanageList/index.vue b/src/views/main/Taskmanage/TaskmanageList/index.vue
index 638d3e6..fdb11ad 100644
--- a/src/views/main/Taskmanage/TaskmanageList/index.vue
+++ b/src/views/main/Taskmanage/TaskmanageList/index.vue
@@ -913,7 +913,8 @@ export default {
this.$router.push({
name: 'SendCarAdd',
query: {
- type: 'Edit'
+ type: 'Edit',
+ taskPKId: data.pkId
}
})
} else {