diff --git a/src/api/modular/main/BookingLedger.js b/src/api/modular/main/BookingLedger.js
index 12e7b22..9a07987 100644
--- a/src/api/modular/main/BookingLedger.js
+++ b/src/api/modular/main/BookingLedger.js
@@ -297,6 +297,7 @@ export function GetYardData(parameter) {
return axios({
url: '/BookingOrder/GetYardData',
method: 'get',
+ timeout: 30 * 1000,
params: parameter
})
}
diff --git a/src/api/modular/main/SendCar.js b/src/api/modular/main/SendCar.js
index 12b884d..138ef7c 100644
--- a/src/api/modular/main/SendCar.js
+++ b/src/api/modular/main/SendCar.js
@@ -36,6 +36,66 @@ export function DjyCustomerQuerytDjyCustomerInfo(parameter) {
params: parameter
})
}
+/**
+ * 通过职位获取用户信息
+ *
+ * @author Myshipping
+ */
+export function sysUserQueryUserByPos(parameter) {
+ return axios({
+ url: '/sysUser/QueryUserByPos',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 获取派车详情
+ *
+ * @author Myshipping
+ */
+export function BookingTruckGetInfo(parameter) {
+ return axios({
+ url: '/BookingTruck/GetInfo',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 撤销派车
+ *
+ * @author Myshipping
+ */
+export function BookingTruckCancel(parameter) {
+ return axios({
+ url: '/BookingTruck/Cancel',
+ method: 'get',
+ params: parameter
+ })
+}
+/**
+ * 删除派车
+ *
+ * @author Myshipping
+ */
+export function apibookingtruck(parameter) {
+ return axios({
+ url: `/api/bookingtruck/${parameter}`,
+ method: 'DELETE'
+ })
+}
+/**
+ * 打印派车
+ *
+ * @author Myshipping
+ */
+export function BookingTruckPrint(parameter) {
+ return axios({
+ url: '/BookingTruck/Print',
+ method: 'get',
+ params: parameter
+ })
+}
+
/**
* 添加订舱模板
*
diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue
index a1fb495..93364ed 100644
--- a/src/views/main/BookingLedger/list/index.vue
+++ b/src/views/main/BookingLedger/list/index.vue
@@ -79,7 +79,7 @@
批量编辑
批量VGM
-
下货纸比对
-
+ -->
-
-
+
+
打印
-
+
保存
-
+
提交派车
-
+
撤销派车
-
+
车队信息
@@ -109,37 +109,37 @@
派车通知详细信息
-
+
-
+
-
-
+
+
-
+
-
-
-
+
+
+
-
+
-
+
@@ -160,23 +160,19 @@
-
-
+
{{ item.shortName }}
@@ -184,8 +180,13 @@
-
-
+
+
{{ item.name }}
@@ -247,23 +248,19 @@
-
-
+
{{ item.shortName }}
@@ -271,8 +268,13 @@
-
-
+
+
{{ item.name }}
@@ -299,7 +301,7 @@
-
+
{{ item.name }}
@@ -311,7 +313,7 @@
箱信息
-
+
新增
@@ -331,12 +333,12 @@
- {{ formatRole(row.ctncode) }}
+ {{ FnRctncode(row.ctncode) }}
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{ item.sysEmpName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -416,14 +425,36 @@ import {
DjyCustomerAdd,
DjyCustomerQuerytDjyCustomerInfo,
BookingTruckSave,
+ sysUserQueryUserByPos,
+ BookingTruckGetInfo,
+ BookingTruckPrint,
DjyCustomerEdit
} from '@/api/modular/main/SendCar'
+import { GetCtn } from '@/api/modular/main/BookingLedger'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
+import { values } from 'xe-utils'
export default {
data() {
return {
- YardCodeData: [],
- payMethodData: [],
+ WebData: {},
+ dispatcherIdData: [],
+ ctnList: [],
+ yardidData: [],
+ inYardIDData: [],
+ yardcontractaData: [],
+ inYardContactData: [],
+ 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: '已撤销派车' }
+ ],
truckIdData: [],
attnData: [],
sexList: [
@@ -483,63 +514,155 @@ export default {
bookingServiceItem: []
}
},
+ computed: {
+ path() {
+ console.log(location.pathname)
+ return location.pathname
+ }
+ },
watch: {
- $route() {
- if (this.$route.query.type == 'Add') {
- this.$data = this.$options.data()
- DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet' }).then(res => {
- console.log(res)
- this.truckIdData = res.data
- })
- DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard' }).then(res => {
- console.log(res)
- this.YardCodeData = res.data
- })
- // commondbYardlist().then(res => {
- // this.YardCodeData = res.data
- // })
+ $route: {
+ immediate: true,
+ deep: true,
+ handler(To, from) {
+ if (To.path == '/SendCarAdd') {
+ this.init()
+ }
}
}
},
mounted() {
- this.TypeData = this.$options.filters['dictData']('djy_cust_contact_role')
- // this.propStringData = this.$options.filters['dictData']('djy_cust_prop')
- this.bookingServiceItem = this.$options.filters['dictData']('booking_service_item')
+ // this.init()
},
methods: {
- YardCodeSearch(data) {
+ FnPrint() {
+ BookingTruckPrint({ id: this.WebData.id }).then(res => {
+ console.log(res)
+ })
+ },
+ init() {
+ 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
+ })
+ 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') {
+ 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)
+ })
+ }
+ }
+ },
+ FnRctncode(value) {
+ let RData = ''
+ if (value) {
+ this.ctnList.forEach(item => {
+ if (item.code == value) {
+ RData = item.name
+ }
+ })
+ }
+ return RData
+ },
+ yardidSearch(data) {
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard', queryItem: data }).then(res => {
- this.YardCodeData = res.data
+ this.yardidData = res.data
+ })
+ },
+ inYardIDSearch(data) {
+ DjyCustomerQuerytDjyCustomerInfo({ queryType: 'yard', queryItem: data }).then(res => {
+ this.inYardIDData = res.data
})
- // commondbYardlist({ KeyWord: data }).then(res => {
- // this.YardCodeData = res.data
- // })
},
ChangeinYardContact(e) {
- this.attnData.forEach(item => {
+ this.inYardContactData.forEach(item => {
if (item.id == e) {
- console.log(item)
this.form.setFieldsValue({
+ inYardContact: item.id,
inYardContractTel: item.tel
})
}
})
},
Changeyardcontract(e) {
- this.attnData.forEach(item => {
+ this.yardcontractaData.forEach(item => {
if (item.id == e) {
- console.log(item)
this.form.setFieldsValue({
+ yardcontract: item.id,
yardcontracttel: item.tel
})
}
})
},
+ ChangeinYardID(e) {
+ setTimeout(() => {
+ this.form.setFieldsValue({
+ inYardContact: '',
+ inYardContractTel: ''
+ })
+ }, 100)
+ this.inYardIDData.forEach(item => {
+ if (item.codeName == e) {
+ if (item.contacts && item.contacts.length) {
+ this.inYardContactData = item.contacts
+ } else {
+ this.inYardContactData = []
+ }
+ }
+ })
+ },
+ Changeyardid(e) {
+ setTimeout(() => {
+ this.form.setFieldsValue({
+ yardcontract: '',
+ yardcontracttel: ''
+ })
+ }, 100)
+ this.yardidData.forEach(item => {
+ if (item.codeName == e) {
+ if (item.contacts && item.contacts.length) {
+ this.yardcontractaData = item.contacts
+ } else {
+ this.yardcontractaData = []
+ }
+ }
+ })
+ },
Changeattn(e) {
this.attnData.forEach(item => {
if (item.id == e) {
- console.log(item)
this.form.setFieldsValue({
+ attn: item.id,
attnTel: item.tel,
attnMail: item.email
})
@@ -566,7 +689,6 @@ export default {
},
gettruckIdData(name = '', type) {
DjyCustomerQuerytDjyCustomerInfo({ queryType: 'fleet', queryItem: name }).then(res => {
- console.log(res)
this.truckIdData = res.data
})
},
@@ -583,6 +705,9 @@ export default {
})
},
insertEvent() {
+ if (this.ContactsData) {
+ this.ContactsData = []
+ }
this.ContactsData.push({
WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1,
roleName: '',
@@ -620,9 +745,21 @@ export default {
validateFields((errors, values) => {
if (!errors) {
+ values.contaList = this.ContactsData
+ if (this.$route.query.type == 'Edit') {
+ values.id = this.WebData.id
+ }
BookingTruckSave({ ...values })
.then(res => {
- console.log(res)
+ if (this.$route.query.type == 'Add') {
+ this.$router.push({
+ query: {
+ type: 'Edit',
+ id: res.data.ext
+ }
+ })
+ }
+
this.confirmLoading = false
})
.catch(() => {
diff --git a/src/views/main/SendCar/index.vue b/src/views/main/SendCar/index.vue
index f47478b..ad0c8b9 100644
--- a/src/views/main/SendCar/index.vue
+++ b/src/views/main/SendCar/index.vue
@@ -74,6 +74,7 @@
resizable
round
:loading="loading"
+ height="600"
empty-text="没有更多数据了!"
v-if="!TableType"
>
@@ -132,11 +133,13 @@