From 563f1f49568434f631a5b31273d9d4fc4b86d4c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com>
Date: Wed, 29 Nov 2023 09:01:03 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BF=AB=E9=80=92=E6=A8=A1=E5=9D=97=20?=
=?UTF-8?q?=E6=9B=B4=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/MultiTab/MultiTab.vue | 20 +-
.../detail/modules/operationArea.vue | 2 +-
src/views/main/BookingLedger/list/index.vue | 2 +-
src/views/main/ExpressModule/details.vue | 331 ++----------------
src/views/main/ExpressModule/index.vue | 28 +-
src/views/main/ExpressMonthlyPay/addForm.vue | 2 +-
src/views/main/ExpressMonthlyPay/editForm.vue | 2 +-
src/views/main/ExpressTemplate/addForm.vue | 155 ++++----
src/views/main/ExpressTemplate/editForm.vue | 78 ++---
src/views/main/ExpressTemplate/index.vue | 86 ++---
10 files changed, 187 insertions(+), 519 deletions(-)
diff --git a/src/components/MultiTab/MultiTab.vue b/src/components/MultiTab/MultiTab.vue
index 30372d6..99b2a3b 100644
--- a/src/components/MultiTab/MultiTab.vue
+++ b/src/components/MultiTab/MultiTab.vue
@@ -37,7 +37,7 @@ export default {
const item = this.pages.find(item => item.path === key)
item.meta.customTitle = name
this.$forceUpdate()
- } catch (e) { }
+ } catch (e) {}
})
this.pages.push(this.$route)
this.fullPathList.push(this.$route.fullPath)
@@ -48,7 +48,11 @@ export default {
onEdit(targetKey, action) {
const _that = this
if (targetKey.includes('BookingDetail')) {
- console.log(Object.keys(this.needSavePages).includes(targetKey), this.needSavePages[targetKey].details, this.needSavePages[targetKey].hbList)
+ console.log(
+ Object.keys(this.needSavePages).includes(targetKey),
+ this.needSavePages[targetKey].details,
+ this.needSavePages[targetKey].hbList
+ )
if (
Object.keys(this.needSavePages).includes(targetKey) &&
(this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)
@@ -70,9 +74,9 @@ export default {
} else {
if (!this.inBookingDetailsSave) {
this[action](targetKey)
- const $data = this.needSavePages
- delete $data[targetKey]
- this.setNeedSavePages($data)
+ const $data = this.needSavePages
+ delete $data[targetKey]
+ this.setNeedSavePages($data)
}
}
} else {
@@ -187,7 +191,7 @@ export default {
}
},
watch: {
- $route: function (newVal) {
+ $route: function(newVal) {
if (!newVal.query.noOpenTab) {
this.activeKey = newVal.fullPath
if (this.fullPathList.indexOf(newVal.fullPath) < 0) {
@@ -220,7 +224,7 @@ export default {
return item.fullPath
})
},
- 'copyPages': {
+ copyPages: {
immediate: true,
deep: true,
handler(nD, oD) {
@@ -243,7 +247,7 @@ export default {
}
}
},
- activeKey: function (newPathKey) {
+ activeKey: function(newPathKey) {
this.$router.push({ path: newPathKey })
},
pages(newForm, oldForm) {
diff --git a/src/views/main/BookingLedger/detail/modules/operationArea.vue b/src/views/main/BookingLedger/detail/modules/operationArea.vue
index 435c934..7d7a793 100644
--- a/src/views/main/BookingLedger/detail/modules/operationArea.vue
+++ b/src/views/main/BookingLedger/detail/modules/operationArea.vue
@@ -70,7 +70,7 @@
-
+
diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue
index 6f0608a..b15c7d6 100644
--- a/src/views/main/BookingLedger/list/index.vue
+++ b/src/views/main/BookingLedger/list/index.vue
@@ -130,7 +130,7 @@
- 快递
+
diff --git a/src/views/main/ExpressModule/details.vue b/src/views/main/ExpressModule/details.vue
index 17d0030..eb02292 100644
--- a/src/views/main/ExpressModule/details.vue
+++ b/src/views/main/ExpressModule/details.vue
@@ -64,7 +64,7 @@
-
+
{
if (item.cardNo == value.cardNo) {
- console.log(item)
let values = { ...this.form.getFieldsValue() }
let Data = {
monthlyCard: item.cardNo
@@ -1153,16 +1147,21 @@ export default {
this.TemplateVisible = true
this.loading = true
ExpressDeliveryGetAddressList().then(res => {
- this.loadData = res.data
+ this.loadData = []
+ res.data.forEach(item => {
+ if (this.TemplateType == 'sj' && item.type == 1) {
+ this.loadData.push(item)
+ } else if (this.TemplateType == 'fj' && item.type == 2) {
+ this.loadData.push(item)
+ }
+ })
this.loading = false
})
},
PeopleDataSelect(value) {
let type = this.TemplateType
- console.log(value, type)
this.loadData.forEach(item => {
if (item.people == value.people) {
- console.log(item)
let values = { ...this.form.getFieldsValue() }
let Data = {}
Data[`${type}Company`] = item.company
@@ -1188,33 +1187,9 @@ export default {
}
})
},
- // UseData(data, type) {
- // this.TemplateCancel()
- // },
TemplateCancel() {
this.TemplateVisible = false
},
- PeopleDataSearch(searchText) {
- this.PeopleDataB = []
- let Rdata = []
- this.PeopleData.forEach(item => {
- if (item.people.indexOf(searchText) != -1) {
- Rdata.push(item.people)
- }
- })
- this.PeopleDataB = !searchText ? [] : Rdata
- },
-
- monthlyCardDataBSearch(searchText) {
- this.monthlyCardDataB = []
- let Rdata = []
- this.monthlyCardData.forEach(item => {
- if (item.cardNo.indexOf(searchText) != -1) {
- Rdata.push(item.cardNo)
- }
- })
- this.monthlyCardDataB = !searchText ? [] : Rdata
- },
getListData() {
this.BusinessLoading = true
@@ -1239,10 +1214,10 @@ export default {
})
})
}
- console.log(arr)
setTimeout(() => {
this.$refs.xTable2.setCheckboxRow(arr, true)
this.BusinessLoading = false
+ this.insertEvent2()
}, 100)
})
.catch(err => {
@@ -1278,7 +1253,6 @@ export default {
fjPostCode: item.postCode
}
}
- console.log(Obj)
this.form.setFieldsValue({
...values,
...Obj
@@ -1287,166 +1261,6 @@ export default {
}
})
},
- TemplateFilterOption(input, option) {
- return option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
- },
- TemplateSelect(value, option, data) {
- this.dataSourceA.forEach(item => {
- if (item.templateName == value || item.name == value) {
- console.log(item)
- data.name = item.name
- data.contact = item.contact
- data.address = item.address
- data.tel = item.tel
- }
- })
- console.log(value, option)
- },
- CopyFromToReturn() {
- // fromYardId fromContract fromTel returnYardId returnContract returnTel
- let values = { ...this.form.getFieldsValue() }
- console.log(values)
- setTimeout(() => {
- this.form.setFieldsValue({
- ...values,
- returnYardId: values.fromYardId,
- returnContract: values.fromContract,
- returnTel: values.fromTel
- })
- }, 100)
- },
- FnImgs(data) {
- imgList(data).then(res => {
- if (res.code == 200) {
- if (res.data.length) {
- this.ImgsVisible = true
- this.ImgsData = res.data
- } else {
- this.$message.warning('暂无照片')
- }
- } else {
- this.$message.warning(res.message)
- }
- })
- },
- MapTimeChange(date, dateString) {
- this.MapTimeA = dateString
- },
- MapTimeHandleOk() {
- this.MapBLoading = true
- this.MapTimeVisible = false
- // forwarderRouterPath({
- // bodyId: this.MapData.id,
- // qryBtm: this.MapTimeA[0],
- // qryEtm: this.MapTimeA[1]
- // })
- forwarderRouterPath({
- bodyId: '1671454297131257858',
- qryBtm: '2023-07-03 00:59:40',
- qryEtm: '2023-07-05 00:59:40'
- })
- .then(res => {
- if (res.code == 200) {
- let waypoints = []
- res.data.trackArray.forEach((item, index) => {
- if (index < 25) {
- waypoints.push({ lng: item.lon / 600000, lat: item.lat / 600000 })
- }
- })
- this.start = waypoints[0]
- this.end = waypoints[waypoints.length - 1]
- this.waypoints = waypoints
- this.MapType = false
- this.MapState = false
- setTimeout(() => {
- this.MapState = true
- }, 100)
- console.log(this.waypoints)
- } else {
- this.$message.warning(res.message)
- }
- this.MapBLoading = false
- })
- .catch(err => {
- this.MapBLoading = false
- })
- },
- FnSgj() {
- this.MapTimeVisible = true
- this.MapTimeA = []
- },
- Mapinit({ BMap, map }) {
- this.map = map
- console.log(BMap, map)
- this.point = new BMap.Point(this.center.lng, this.center.lat)
- map.centerAndZoom(this.point, 12)
- },
- FnCarLocate(data) {
- if (data) {
- this.MapData = data
- }
- this.MapBLoading = true
-
- // forwarderTransTime({ bodyId: this.MapData.id })
- forwarderTransTime({ bodyId: '1671454297131257858' })
- .then(res => {
- this.MapType = true
- console.log(res)
- if (res.code == 200) {
- this.center.lng = res.data.lon / 600000
- this.center.lat = res.data.lat / 600000
- this.center.adr = res.data.adr
- let date = new Date(parseInt(res.data.utc))
- let Year = date.getFullYear()
- let Moth = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
- let Day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
- let Hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
- let Minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
- let Sechond = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
- let utc = Year + '-' + Moth + '-' + Day + ' ' + Hour + ':' + Minute + ':' + Sechond
- this.center.utc = utc
- // setTimeout(() => {
- this.MapVisible = true
- // }, 1000)
- } else {
- this.$message.warning(res.message)
- }
- this.MapBLoading = false
- })
- .catch(err => {
- this.MapBLoading = false
- })
- },
- FnChangeYard(type, e) {
- DjyCustomerQuerytDjyCustomerInfo({ queryItem: e }).then(res => {
- console.log(res)
- if (res.data[0] && res.data[0].contacts) {
- console.log(res.data[0].contacts)
- // this.yardcontractaData = res.data[0].contacts
- if (res.data[0].contacts.length) {
- let data = {}
- if (type == 'return') {
- data = {
- returnContract: res.data[0].contacts[0].name,
- returnTel: res.data[0].contacts[0].tel
- }
- } else {
- data = {
- fromContract: res.data[0].contacts[0].name,
- fromTel: res.data[0].contacts[0].tel
- }
- }
- setTimeout(() => {
- this.form.setFieldsValue(data)
- }, 100)
- }
- }
- })
- console.log(type, e)
- },
- filterOption(input, option) {
- return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
- },
/**
* 提交表单
*/
@@ -1481,19 +1295,17 @@ export default {
// values.tmsForwarderOrderLoadingPlaceEntityList = this.tmsForwarderOrderLoadingPlaceEntityList
if (this.id && this.type != 'Copy') {
- console.log('更新')
BookingOrderSFSave({ ...values, id: this.id }).then(res => {
if (res.success) {
- this.$message.success(res.message)
+ this.$message.success('保存成功')
if (FnType == 'FnSendBooking') {
BookingOrderSFSendBooking({ Id: this.id }).then(res => {
if (res.success) {
- this.$message.success('发送成功')
+ this.$message.success('下单成功')
setTimeout(() => {
this.form.setFieldsValue({
...this.form.getFieldsValue(),
- ...res.extras,
- ASD: 123
+ ...res.extras
})
}, 100)
} else {
@@ -1521,7 +1333,6 @@ export default {
delete item.WebKey
Arr.push(item)
})
- console.log(Arr)
}
if (values.business && values.business.length) {
let Arr = []
@@ -1535,15 +1346,12 @@ export default {
delete item.WebKey
Arr.push(item)
})
- console.log(Arr)
}
}
- console.log('新增')
BookingOrderSFSave(values)
.then(res => {
- console.log(res)
if (res.success) {
- this.$message.success(res.message)
+ this.$message.success('新增成功')
this.type = 'Details'
this.id = res.data.result.id
this.WebId = ''
@@ -1560,7 +1368,6 @@ export default {
})
.catch(err => {
this.confirmLoading = false
- console.log(err)
})
}
} else {
@@ -1571,61 +1378,21 @@ export default {
handleCancel() {
BookingOrderSFCancelBooking({ Id: this.id }).then(res => {
if (res.success) {
- console.log(res)
+ this.$message.success(res.data)
+
+ this.form.setFieldsValue({
+ ...this.form.getFieldsValue(),
+ currentStateDesc: '快递已消单'
+ })
} else {
this.$message.error(res.message)
}
})
},
- FnFactoryAdd() {
- this.tmsForwarderOrderLoadingPlaceEntityList.push({
- name: '',
- contact: '',
- tel: '',
- address: ''
- })
- },
- FnFactoryDelete(index) {
- this.tmsForwarderOrderLoadingPlaceEntityList.splice(index, 1)
- },
- FnSaveTemplate(data) {
- this.$refs.addForm.add(data)
- },
handleOk() {
this.FnGetTemplateData()
// this.FnGetData()
},
- FnCopy() {
- this.$router.push({
- name: 'ExpressModuleDetails',
- query: {
- type: 'Copy',
- id: this.id
- }
- })
- },
-
- FnCancel() {
- TmsForwarderOrderCancel({ id: this.id }).then(res => {
- if (res.success) {
- this.$message.success('终止成功')
- this.init()
- } else {
- this.$message.error(`终止失败,${res.message}`)
- }
- })
- },
- FnDelete() {
- TmsForwarderOrderDelete({ id: this.id }).then(res => {
- if (res.success) {
- this.$message.success('删除成功')
- this.init()
- } else {
- this.$message.error(`删除失败,${res.message}`)
- }
- })
- },
-
FnGetTemplateData() {
let Arr = []
tmsCobLoadingPlacelist({
@@ -1645,14 +1412,15 @@ export default {
if (this.initTime) {
this.DetailData = []
this.form.resetFields()
-
+ this.getListData()
if (this.id) {
BookingOrderSFGet({ id: this.id }).then(res => {
- if (res.success) {
+ if (res.success && res.data.id != 0) {
setTimeout(() => {
this.form.setFieldsValue({
...res.data
})
+ this.DetailData = res.data.business
// if (this.type == 'Copy') {
// this.form.setFieldsValue({
// orderStatus: '0'
@@ -1675,9 +1443,7 @@ export default {
res.data.detail.forEach((item, index) => {
item.WebKey = index + 1
})
- this.DetailData = res.data.detail
}, 100)
- } else {
}
})
} else if (this.WebId || this.Ids) {
@@ -1687,7 +1453,8 @@ export default {
goodsname: '文件',
fjCompany: this.userInfo.loginEmpInfo.orgName,
kdNum: 1,
- currentStateDesc: '新建'
+ currentStateDesc: '新建',
+ kdCompany: 'sf'
})
})
if (this.kdAddData[this.WebId]) {
@@ -1713,42 +1480,15 @@ export default {
commondbCodeProvinceList().then(res => {
this.ProvinceData = res.data
})
- GetCarrierlist().then(res => {
- // console.log(res.data, '船公司')
- this.CarrierData = res.data
- })
- GetPortloadlist().then(res => {
- console.log(res.data, '起始港')
- this.PortloadData = res.data
- })
- GetPortlist().then(res => {
- console.log(res.data, '目的港')
- this.PortData = res.data
- })
- this.getListData()
- console.log('init')
setTimeout(() => {
this.initTime = true
}, 100)
}
},
- FnRdispatchStatus(value) {
- let RData = ''
- if (value) {
- this.dispatchStatusList.forEach(item => {
- if (item.code == value) {
- RData = item.name
- }
- })
- }
- return RData
- },
removeCheckboxRow() {
- console.log(this.$refs.xTable.selection)
this.$refs.xTable.selection.forEach(item => {
this.DetailData.forEach((item2, index2) => {
- console.log(item._X_ROW_KEY, item2._X_ROW_KEY)
if (item._X_ROW_KEY == item2._X_ROW_KEY) {
this.DetailData.splice(index2, 1)
}
@@ -1759,20 +1499,17 @@ export default {
if (!this.DetailData) {
this.DetailData = []
}
- console.log(this.DetailData, this.DetailData.length ? this.DetailData[this.DetailData.length - 1].WebKey + 1 : 1)
this.DetailData.push({
WebKey: this.DetailData.length ? this.DetailData[this.DetailData.length - 1].WebKey + 1 : 1,
dispatchStatus: '0'
})
},
insertEvent2() {
- console.log(this.BusinessData)
this.$refs.xTable2.selection.forEach(item => {
delete item.id
let type = true
this.DetailData.forEach(item2 => {
if (item._X_ROW_KEY == item2._X_ROW_KEY) {
- console.log(item._X_ROW_KEY)
type = false
}
})
@@ -1782,12 +1519,10 @@ export default {
...item
})
} else {
- this.$message.warning(`主题单号:${item.mblno},已添加。请勿重复添加数据!`)
+ this.$message.warning(`主提单号:${item.mblno},已添加。请勿重复添加数据!`)
}
- console.log(item)
})
this.$refs.xTable2.clearCheckboxRow()
- console.log(this.DetailData)
// if (!this.BusinessDataBackup) {
// this.BusinessDataBackup = []
// }
@@ -1802,20 +1537,6 @@ export default {
// dispatchStatus: '0'
// })
// this.BusinessData = this.BusinessDataBackup
- },
- AddShandleSubmit() {
- console.log(this.AddsData)
- if (!this.ContactsData) {
- this.ContactsData = []
- }
- for (let index = 0; index < this.AddsData.num; index++) {
- this.ContactsData.push({
- WebKey: this.ContactsData.length ? this.ContactsData[this.ContactsData.length - 1].WebKey + 1 : 1,
- dispatchStatus: '0',
- cntCode: this.AddsData.driverId
- })
- }
- this.AddSVisible = false
}
}
}
diff --git a/src/views/main/ExpressModule/index.vue b/src/views/main/ExpressModule/index.vue
index 4424542..14f231f 100644
--- a/src/views/main/ExpressModule/index.vue
+++ b/src/views/main/ExpressModule/index.vue
@@ -113,11 +113,11 @@
:show-overflow="true"
>
- {{ FnOrderStatus(row[item.dataIndex]) }}
- {{
+ {{ FnkdCompany(row[item.dataIndex]) }}
+
{{ row[item.dataIndex] }}
@@ -309,7 +309,8 @@ export default {
loadData: [],
CodeData: [],
WCodeData: [],
- ModulesData: []
+ ModulesData: [],
+ kdCompanyData: [{ code: 'sf', name: '顺丰' }]
}
},
created() {},
@@ -318,6 +319,15 @@ export default {
},
methods: {
...mapActions(['setIssuetypeList']),
+ FnkdCompany(data) {
+ let Rdata = '-'
+ this.kdCompanyData.forEach(item => {
+ if (item.code == data) {
+ Rdata = item.name
+ }
+ })
+ return Rdata
+ },
FnExpressTemplate() {
this.TemplateVisible = true
},
@@ -406,15 +416,7 @@ export default {
}
console.log(selectRecords)
},
- FnOrderStatus(data) {
- let Rdata = '-'
- this.orderStatusData.forEach(item => {
- if (item.code == data) {
- Rdata = item.name
- }
- })
- return Rdata
- },
+
FnCarGroupId(data) {
let Rdata = '-'
this.carGroupIdData.forEach(item => {
diff --git a/src/views/main/ExpressMonthlyPay/addForm.vue b/src/views/main/ExpressMonthlyPay/addForm.vue
index 778db30..4602d5e 100644
--- a/src/views/main/ExpressMonthlyPay/addForm.vue
+++ b/src/views/main/ExpressMonthlyPay/addForm.vue
@@ -1,6 +1,6 @@
-
-
-
-
+
+
-
- {{ item.name }}
+
+ 收件人
+
+
+ 寄件人
-
-
+
+
-
-
+
+
-
-
+
+ {
+ FnChangeProvince(e)
+ }
+ "
+ >
+
+ {{ item.cnName }}
+
+
-
-
+
+
+
+ {{ item.cnName }}
+
+
-
-
+
+
-
-
+
+
@@ -51,8 +76,8 @@