快递模块 更改

master
张同海 1 year ago
parent 8f6c700753
commit 563f1f4956

@ -37,7 +37,7 @@ export default {
const item = this.pages.find(item => item.path === key) const item = this.pages.find(item => item.path === key)
item.meta.customTitle = name item.meta.customTitle = name
this.$forceUpdate() this.$forceUpdate()
} catch (e) { } } catch (e) {}
}) })
this.pages.push(this.$route) this.pages.push(this.$route)
this.fullPathList.push(this.$route.fullPath) this.fullPathList.push(this.$route.fullPath)
@ -48,7 +48,11 @@ export default {
onEdit(targetKey, action) { onEdit(targetKey, action) {
const _that = this const _that = this
if (targetKey.includes('BookingDetail')) { 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 ( if (
Object.keys(this.needSavePages).includes(targetKey) && Object.keys(this.needSavePages).includes(targetKey) &&
(this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList) (this.needSavePages[targetKey].details || this.needSavePages[targetKey].hbList)
@ -70,9 +74,9 @@ export default {
} else { } else {
if (!this.inBookingDetailsSave) { if (!this.inBookingDetailsSave) {
this[action](targetKey) this[action](targetKey)
const $data = this.needSavePages const $data = this.needSavePages
delete $data[targetKey] delete $data[targetKey]
this.setNeedSavePages($data) this.setNeedSavePages($data)
} }
} }
} else { } else {
@ -187,7 +191,7 @@ export default {
} }
}, },
watch: { watch: {
$route: function (newVal) { $route: function(newVal) {
if (!newVal.query.noOpenTab) { if (!newVal.query.noOpenTab) {
this.activeKey = newVal.fullPath this.activeKey = newVal.fullPath
if (this.fullPathList.indexOf(newVal.fullPath) < 0) { if (this.fullPathList.indexOf(newVal.fullPath) < 0) {
@ -220,7 +224,7 @@ export default {
return item.fullPath return item.fullPath
}) })
}, },
'copyPages': { copyPages: {
immediate: true, immediate: true,
deep: true, deep: true,
handler(nD, oD) { handler(nD, oD) {
@ -243,7 +247,7 @@ export default {
} }
} }
}, },
activeKey: function (newPathKey) { activeKey: function(newPathKey) {
this.$router.push({ path: newPathKey }) this.$router.push({ path: newPathKey })
}, },
pages(newForm, oldForm) { pages(newForm, oldForm) {

@ -70,7 +70,7 @@
</div> </div>
<div class="btn-list single-view-4"> <div class="btn-list single-view-4">
<button @click="FnGoSendCar"><span class="iconfont icon-yunshu1"></span>派车</button> <button @click="FnGoSendCar"><span class="iconfont icon-yunshu1"></span>派车</button>
<button @click="FnGoExpress"><span class="iconfont icon-goods"></span>快递</button> <!-- <button @click="FnGoExpress"><span class="iconfont icon-goods"></span>快递</button> -->
</div> </div>
<div class="btn-list single-view-1" :class="{ inLoad: inChildLoading || !changeFlag }"> <div class="btn-list single-view-1" :class="{ inLoad: inChildLoading || !changeFlag }">
<button @click="changePage('prev')"><span class="iconfont icon-shang"></span>上一票</button> <button @click="changePage('prev')"><span class="iconfont icon-shang"></span>上一票</button>

@ -130,7 +130,7 @@
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
</div> </div>
<div class="nav" @click="GoExpress"><i class="iconfont icon-goods"></i>快递</div> <!-- <div class="nav" @click="GoExpress"><i class="iconfont icon-goods"></i>快递</div> -->
</div> </div>
</template> </template>
<template #tools> <template #tools>

@ -64,7 +64,7 @@
<!-- <a-input v-decorator="['kdCompany']" allowClear /> --> <!-- <a-input v-decorator="['kdCompany']" allowClear /> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="5"> <a-col :span="9">
<a-form-item <a-form-item
label="快递状态:" label="快递状态:"
:labelCol="{ xs: { span: 25 }, sm: { span: 6 } }" :labelCol="{ xs: { span: 25 }, sm: { span: 6 } }"
@ -848,7 +848,6 @@ import {
commondbCodeCityList commondbCodeCityList
} from '@/api/modular/main/ExpressModule' } from '@/api/modular/main/ExpressModule'
import { ExpressDeliveryGetAddressList } from '@/api/modular/main/ExpressTemplate' import { ExpressDeliveryGetAddressList } from '@/api/modular/main/ExpressTemplate'
import { GetPortloadlist, GetCarrierlist, GetPortlist } from '@/api/modular/main/BookingLedger'
import { PageDataByBooking } from '@/api/modular/main/BookingLedger' import { PageDataByBooking } from '@/api/modular/main/BookingLedger'
import { MonthlyPayAccountList } from '@/api/modular/main/ExpressMonthlyPay' import { MonthlyPayAccountList } from '@/api/modular/main/ExpressMonthlyPay'
import AAutoComplete from 'ant-design-vue/es/auto-complete' import AAutoComplete from 'ant-design-vue/es/auto-complete'
@ -1012,9 +1011,6 @@ export default {
ProvinceData: [], ProvinceData: [],
sjCityData: [], sjCityData: [],
fjCityData: [], fjCityData: [],
CarrierData: [],
PortloadData: [],
PortData: [],
VesselData: [], VesselData: [],
SearchData: {}, SearchData: {},
SearchObj: { SearchObj: {
@ -1102,7 +1098,6 @@ export default {
values.tmsForwarderOrderLoadingPlaceEntityList = this.tmsForwarderOrderLoadingPlaceEntityList values.tmsForwarderOrderLoadingPlaceEntityList = this.tmsForwarderOrderLoadingPlaceEntityList
values.WebId = from.WebId values.WebId = from.WebId
this.setTmsAddData(values) this.setTmsAddData(values)
console.log(this.$store.state)
} }
} }
} }
@ -1129,7 +1124,6 @@ export default {
monthlyCardDataSelect(value) { monthlyCardDataSelect(value) {
this.MonthlyPayloadData.forEach(item => { this.MonthlyPayloadData.forEach(item => {
if (item.cardNo == value.cardNo) { if (item.cardNo == value.cardNo) {
console.log(item)
let values = { ...this.form.getFieldsValue() } let values = { ...this.form.getFieldsValue() }
let Data = { let Data = {
monthlyCard: item.cardNo monthlyCard: item.cardNo
@ -1153,16 +1147,21 @@ export default {
this.TemplateVisible = true this.TemplateVisible = true
this.loading = true this.loading = true
ExpressDeliveryGetAddressList().then(res => { 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 this.loading = false
}) })
}, },
PeopleDataSelect(value) { PeopleDataSelect(value) {
let type = this.TemplateType let type = this.TemplateType
console.log(value, type)
this.loadData.forEach(item => { this.loadData.forEach(item => {
if (item.people == value.people) { if (item.people == value.people) {
console.log(item)
let values = { ...this.form.getFieldsValue() } let values = { ...this.form.getFieldsValue() }
let Data = {} let Data = {}
Data[`${type}Company`] = item.company Data[`${type}Company`] = item.company
@ -1188,33 +1187,9 @@ export default {
} }
}) })
}, },
// UseData(data, type) {
// this.TemplateCancel()
// },
TemplateCancel() { TemplateCancel() {
this.TemplateVisible = false 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() { getListData() {
this.BusinessLoading = true this.BusinessLoading = true
@ -1239,10 +1214,10 @@ export default {
}) })
}) })
} }
console.log(arr)
setTimeout(() => { setTimeout(() => {
this.$refs.xTable2.setCheckboxRow(arr, true) this.$refs.xTable2.setCheckboxRow(arr, true)
this.BusinessLoading = false this.BusinessLoading = false
this.insertEvent2()
}, 100) }, 100)
}) })
.catch(err => { .catch(err => {
@ -1278,7 +1253,6 @@ export default {
fjPostCode: item.postCode fjPostCode: item.postCode
} }
} }
console.log(Obj)
this.form.setFieldsValue({ this.form.setFieldsValue({
...values, ...values,
...Obj ...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 // values.tmsForwarderOrderLoadingPlaceEntityList = this.tmsForwarderOrderLoadingPlaceEntityList
if (this.id && this.type != 'Copy') { if (this.id && this.type != 'Copy') {
console.log('更新')
BookingOrderSFSave({ ...values, id: this.id }).then(res => { BookingOrderSFSave({ ...values, id: this.id }).then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success('保存成功')
if (FnType == 'FnSendBooking') { if (FnType == 'FnSendBooking') {
BookingOrderSFSendBooking({ Id: this.id }).then(res => { BookingOrderSFSendBooking({ Id: this.id }).then(res => {
if (res.success) { if (res.success) {
this.$message.success('发送成功') this.$message.success('下单成功')
setTimeout(() => { setTimeout(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
...this.form.getFieldsValue(), ...this.form.getFieldsValue(),
...res.extras, ...res.extras
ASD: 123
}) })
}, 100) }, 100)
} else { } else {
@ -1521,7 +1333,6 @@ export default {
delete item.WebKey delete item.WebKey
Arr.push(item) Arr.push(item)
}) })
console.log(Arr)
} }
if (values.business && values.business.length) { if (values.business && values.business.length) {
let Arr = [] let Arr = []
@ -1535,15 +1346,12 @@ export default {
delete item.WebKey delete item.WebKey
Arr.push(item) Arr.push(item)
}) })
console.log(Arr)
} }
} }
console.log('新增')
BookingOrderSFSave(values) BookingOrderSFSave(values)
.then(res => { .then(res => {
console.log(res)
if (res.success) { if (res.success) {
this.$message.success(res.message) this.$message.success('新增成功')
this.type = 'Details' this.type = 'Details'
this.id = res.data.result.id this.id = res.data.result.id
this.WebId = '' this.WebId = ''
@ -1560,7 +1368,6 @@ export default {
}) })
.catch(err => { .catch(err => {
this.confirmLoading = false this.confirmLoading = false
console.log(err)
}) })
} }
} else { } else {
@ -1571,61 +1378,21 @@ export default {
handleCancel() { handleCancel() {
BookingOrderSFCancelBooking({ Id: this.id }).then(res => { BookingOrderSFCancelBooking({ Id: this.id }).then(res => {
if (res.success) { if (res.success) {
console.log(res) this.$message.success(res.data)
this.form.setFieldsValue({
...this.form.getFieldsValue(),
currentStateDesc: '快递已消单'
})
} else { } else {
this.$message.error(res.message) 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() { handleOk() {
this.FnGetTemplateData() this.FnGetTemplateData()
// this.FnGetData() // 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() { FnGetTemplateData() {
let Arr = [] let Arr = []
tmsCobLoadingPlacelist({ tmsCobLoadingPlacelist({
@ -1645,14 +1412,15 @@ export default {
if (this.initTime) { if (this.initTime) {
this.DetailData = [] this.DetailData = []
this.form.resetFields() this.form.resetFields()
this.getListData()
if (this.id) { if (this.id) {
BookingOrderSFGet({ id: this.id }).then(res => { BookingOrderSFGet({ id: this.id }).then(res => {
if (res.success) { if (res.success && res.data.id != 0) {
setTimeout(() => { setTimeout(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
...res.data ...res.data
}) })
this.DetailData = res.data.business
// if (this.type == 'Copy') { // if (this.type == 'Copy') {
// this.form.setFieldsValue({ // this.form.setFieldsValue({
// orderStatus: '0' // orderStatus: '0'
@ -1675,9 +1443,7 @@ export default {
res.data.detail.forEach((item, index) => { res.data.detail.forEach((item, index) => {
item.WebKey = index + 1 item.WebKey = index + 1
}) })
this.DetailData = res.data.detail
}, 100) }, 100)
} else {
} }
}) })
} else if (this.WebId || this.Ids) { } else if (this.WebId || this.Ids) {
@ -1687,7 +1453,8 @@ export default {
goodsname: '文件', goodsname: '文件',
fjCompany: this.userInfo.loginEmpInfo.orgName, fjCompany: this.userInfo.loginEmpInfo.orgName,
kdNum: 1, kdNum: 1,
currentStateDesc: '新建' currentStateDesc: '新建',
kdCompany: 'sf'
}) })
}) })
if (this.kdAddData[this.WebId]) { if (this.kdAddData[this.WebId]) {
@ -1713,42 +1480,15 @@ export default {
commondbCodeProvinceList().then(res => { commondbCodeProvinceList().then(res => {
this.ProvinceData = res.data 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(() => { setTimeout(() => {
this.initTime = true this.initTime = true
}, 100) }, 100)
} }
}, },
FnRdispatchStatus(value) {
let RData = ''
if (value) {
this.dispatchStatusList.forEach(item => {
if (item.code == value) {
RData = item.name
}
})
}
return RData
},
removeCheckboxRow() { removeCheckboxRow() {
console.log(this.$refs.xTable.selection)
this.$refs.xTable.selection.forEach(item => { this.$refs.xTable.selection.forEach(item => {
this.DetailData.forEach((item2, index2) => { this.DetailData.forEach((item2, index2) => {
console.log(item._X_ROW_KEY, item2._X_ROW_KEY)
if (item._X_ROW_KEY == item2._X_ROW_KEY) { if (item._X_ROW_KEY == item2._X_ROW_KEY) {
this.DetailData.splice(index2, 1) this.DetailData.splice(index2, 1)
} }
@ -1759,20 +1499,17 @@ export default {
if (!this.DetailData) { if (!this.DetailData) {
this.DetailData = [] this.DetailData = []
} }
console.log(this.DetailData, this.DetailData.length ? this.DetailData[this.DetailData.length - 1].WebKey + 1 : 1)
this.DetailData.push({ this.DetailData.push({
WebKey: this.DetailData.length ? this.DetailData[this.DetailData.length - 1].WebKey + 1 : 1, WebKey: this.DetailData.length ? this.DetailData[this.DetailData.length - 1].WebKey + 1 : 1,
dispatchStatus: '0' dispatchStatus: '0'
}) })
}, },
insertEvent2() { insertEvent2() {
console.log(this.BusinessData)
this.$refs.xTable2.selection.forEach(item => { this.$refs.xTable2.selection.forEach(item => {
delete item.id delete item.id
let type = true let type = true
this.DetailData.forEach(item2 => { this.DetailData.forEach(item2 => {
if (item._X_ROW_KEY == item2._X_ROW_KEY) { if (item._X_ROW_KEY == item2._X_ROW_KEY) {
console.log(item._X_ROW_KEY)
type = false type = false
} }
}) })
@ -1782,12 +1519,10 @@ export default {
...item ...item
}) })
} else { } else {
this.$message.warning(`单号:${item.mblno},已添加。请勿重复添加数据!`) this.$message.warning(`单号:${item.mblno},已添加。请勿重复添加数据!`)
} }
console.log(item)
}) })
this.$refs.xTable2.clearCheckboxRow() this.$refs.xTable2.clearCheckboxRow()
console.log(this.DetailData)
// if (!this.BusinessDataBackup) { // if (!this.BusinessDataBackup) {
// this.BusinessDataBackup = [] // this.BusinessDataBackup = []
// } // }
@ -1802,20 +1537,6 @@ export default {
// dispatchStatus: '0' // dispatchStatus: '0'
// }) // })
// this.BusinessData = this.BusinessDataBackup // 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
} }
} }
} }

@ -113,11 +113,11 @@
:show-overflow="true" :show-overflow="true"
> >
<template #default="{ row }"> <template #default="{ row }">
<span v-if="item.dataIndex == 'orderStatus'">{{ FnOrderStatus(row[item.dataIndex]) }}</span> <span v-if="item.dataIndex == 'kdCompany'">{{ FnkdCompany(row[item.dataIndex]) }}</span>
<span v-else-if="item.dataIndex == 'billNo'" @click="FnGoDetails(row)" class="GoDetails">{{ <!-- <span v-else-if="item.dataIndex == 'billNo'" @click="FnGoDetails(row)" class="GoDetails">{{
row[item.dataIndex] row[item.dataIndex]
}}</span> }}</span>
<span v-else-if="item.dataIndex == 'carGroupId'">{{ FnCarGroupId(row[item.dataIndex]) }}</span> <span v-else-if="item.dataIndex == 'carGroupId'">{{ FnCarGroupId(row[item.dataIndex]) }}</span> -->
<span v-else>{{ row[item.dataIndex] }}</span> <span v-else>{{ row[item.dataIndex] }}</span>
</template> </template>
</vxe-column> </vxe-column>
@ -309,7 +309,8 @@ export default {
loadData: [], loadData: [],
CodeData: [], CodeData: [],
WCodeData: [], WCodeData: [],
ModulesData: [] ModulesData: [],
kdCompanyData: [{ code: 'sf', name: '顺丰' }]
} }
}, },
created() {}, created() {},
@ -318,6 +319,15 @@ export default {
}, },
methods: { methods: {
...mapActions(['setIssuetypeList']), ...mapActions(['setIssuetypeList']),
FnkdCompany(data) {
let Rdata = '-'
this.kdCompanyData.forEach(item => {
if (item.code == data) {
Rdata = item.name
}
})
return Rdata
},
FnExpressTemplate() { FnExpressTemplate() {
this.TemplateVisible = true this.TemplateVisible = true
}, },
@ -406,15 +416,7 @@ export default {
} }
console.log(selectRecords) console.log(selectRecords)
}, },
FnOrderStatus(data) {
let Rdata = '-'
this.orderStatusData.forEach(item => {
if (item.code == data) {
Rdata = item.name
}
})
return Rdata
},
FnCarGroupId(data) { FnCarGroupId(data) {
let Rdata = '-' let Rdata = '-'
this.carGroupIdData.forEach(item => { this.carGroupIdData.forEach(item => {

@ -1,6 +1,6 @@
<template> <template>
<a-modal <a-modal
title="新增收发通模板" title="新增月结卡号"
:width="900" :width="900"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"

@ -1,6 +1,6 @@
<template> <template>
<a-modal <a-modal
title="编辑收发通模板" title="编辑月结卡号"
:width="900" :width="900"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"

@ -1,6 +1,6 @@
<template> <template>
<a-modal <a-modal
title="新增收发通模板" title="新增收寄件人信息"
:width="900" :width="900"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
@ -9,41 +9,66 @@
> >
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item v-show="false"><a-input v-decorator="['id']"/></a-form-item>
<a-input <a-form-item label="类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
placeholder="请输入代码"
v-decorator="['title', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
<a-form-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select <a-select
mode="multiple"
style="width: 100%" style="width: 100%"
placeholder="请选择类" placeholder="请选择类别"
v-decorator="['type', { rules: [{ required: true, message: '请选择类' }] }]" v-decorator="['type', { rules: [{ required: true, message: '请选择类别!' }] }]"
> >
<a-select-option v-for="(item, index) in typeData" :key="index" :value="item.code"> <a-select-option :value="1">
{{ item.name }} 收件人
</a-select-option>
<a-select-option :value="2">
寄件人
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入名称" v-decorator="['name']" /> <a-input
placeholder="请输入公司名称"
v-decorator="['company', { rules: [{ required: true, message: '请输入公司名称!' }] }]"
/>
</a-form-item> </a-form-item>
<a-form-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="联系人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入地址" v-decorator="['addr']" /> <a-input
placeholder="请输入联系人姓名"
v-decorator="['people', { rules: [{ required: true, message: '请输入联系人姓名!' }] }]"
/>
</a-form-item> </a-form-item>
<a-form-item label="国家" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="省份" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入国家" v-decorator="['country']" /> <a-select
style="width: 100%"
placeholder="请选择省份"
v-decorator="['provinceId', { rules: [{ required: true, message: '请选择省份!' }] }]"
@change="
e => {
FnChangeProvince(e)
}
"
>
<a-select-option v-for="item in ProvinceData" :key="item.code" :value="item.code">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item> </a-form-item>
<a-form-item label="电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="城市" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input placeholder="请输入电话" v-decorator="['tel']" /> <a-select
style="width: 100%"
placeholder="请选择城市"
v-decorator="['city', { rules: [{ required: true, message: '请选择城市!' }] }]"
:disabled="cityDisabled"
>
<a-select-option v-for="item in CityData" :key="item.cnName" :value="item.cnName">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item> </a-form-item>
<a-form-item label="模板内容" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="详细地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea placeholder="请输入模板内容" :auto-size="{ minRows: 3, maxRows: 5 }" v-decorator="['content']" /> <a-input placeholder="请输入详细地址" v-decorator="['address']" />
</a-form-item> </a-form-item>
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" /> <a-input placeholder="请输入联系电话" v-decorator="['tel']" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
@ -51,8 +76,8 @@
</template> </template>
<script> <script>
import { BookingTemplateAdd } from '@/api/modular/main/BookingTemplateManage' import { ExpressDeliverySaveOrUpdateAddress } from '@/api/modular/main/ExpressTemplate'
import { commondbCodeProvinceList, commondbCodeCityList } from '@/api/modular/main/ExpressModule'
export default { export default {
data() { data() {
return { return {
@ -64,38 +89,32 @@ export default {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 15 } sm: { span: 15 }
}, },
typeData: [],
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this) form: this.$form.createForm(this),
CityData: [],
ProvinceData: [],
cityDisabled: false
} }
}, },
methods: { methods: {
// //
add(record) { add(record) {
commondbCodeProvinceList().then(res => {
this.ProvinceData = res.data
})
this.visible = true this.visible = true
this.typeData = [ },
{ FnChangeProvince(data) {
code: '10', this.cityDisabled = true
name: '收货人' this.form.setFieldsValue({
}, ...this.form.getFieldsValue(),
{ city: ''
code: '20', })
name: '发货人' commondbCodeCityList({ Provincecode: data }).then(res => {
}, this.CityData = res.data
{ this.cityDisabled = false
code: '30', })
name: '通知人'
},
{
code: '40',
name: '第二通知人'
},
{
code: '50',
name: '境外代理'
}
]
}, },
/** /**
* 提交表单 * 提交表单
@ -104,33 +123,19 @@ export default {
const { const {
form: { validateFields } form: { validateFields }
} = this } = this
// this.confirmLoading = true this.confirmLoading = true
validateFields((errors, values) => { validateFields((errors, values) => {
if (!errors) { if (!errors) {
for (const key in values) { this.ProvinceData.forEach(item => {
if (key == 'type') { if (item.code == values.provinceId) {
let Wtype = '' console.log(item.cnName)
values[key].forEach((item, index) => { values = {
if (index == 0) { ...values,
Wtype = item province: item.cnName
} else { }
Wtype = `${Wtype},${item}`
}
})
values[key] = Wtype
}
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
} }
} })
let type = '' ExpressDeliverySaveOrUpdateAddress({ ...values })
console.log(values)
if (values.type) {
values.type.split(',').forEach(item2 => {
type == '' ? (type = `[${item2}]`) : (type = `${type}[${item2}]`)
})
}
BookingTemplateAdd({ ...values, type })
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$message.success('新增成功') this.$message.success('新增成功')

@ -1,6 +1,6 @@
<template> <template>
<a-modal <a-modal
title="编辑收发通模板" title="编辑收寄件人信息"
:width="900" :width="900"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :confirmLoading="confirmLoading"
@ -10,6 +10,20 @@
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form">
<a-form-item v-show="false"><a-input v-decorator="['id']"/></a-form-item> <a-form-item v-show="false"><a-input v-decorator="['id']"/></a-form-item>
<a-form-item label="类别" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select
style="width: 100%"
placeholder="请选择类别"
v-decorator="['type', { rules: [{ required: true, message: '请选择类别!' }] }]"
>
<a-select-option :value="1">
收件人
</a-select-option>
<a-select-option :value="2">
寄件人
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input <a-input
placeholder="请输入公司名称" placeholder="请输入公司名称"
@ -19,7 +33,6 @@
<a-form-item label="联系人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="联系人姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input <a-input
placeholder="请输入联系人姓名" placeholder="请输入联系人姓名"
disabled
v-decorator="['people', { rules: [{ required: true, message: '请输入联系人姓名!' }] }]" v-decorator="['people', { rules: [{ required: true, message: '请输入联系人姓名!' }] }]"
/> />
</a-form-item> </a-form-item>
@ -44,12 +57,8 @@
style="width: 100%" style="width: 100%"
placeholder="请选择城市" placeholder="请选择城市"
v-decorator="['city', { rules: [{ required: true, message: '请选择城市!' }] }]" v-decorator="['city', { rules: [{ required: true, message: '请选择城市!' }] }]"
:disabled="cityDisabled"
> >
<!-- @change="
e => {
FnChangeProvince(e)
}
" -->
<a-select-option v-for="item in CityData" :key="item.cnName" :value="item.cnName"> <a-select-option v-for="item in CityData" :key="item.cnName" :value="item.cnName">
{{ item.cnName }} {{ item.cnName }}
</a-select-option> </a-select-option>
@ -59,7 +68,7 @@
<a-input placeholder="请输入详细地址" v-decorator="['address']" /> <a-input placeholder="请输入详细地址" v-decorator="['address']" />
</a-form-item> </a-form-item>
<a-form-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback> <a-form-item label="联系电话" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入联系电话" disabled v-decorator="['tel']" /> <a-input placeholder="请输入联系电话" v-decorator="['tel']" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
@ -81,12 +90,12 @@ export default {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 15 } sm: { span: 15 }
}, },
typeData: [],
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
form: this.$form.createForm(this), form: this.$form.createForm(this),
ProvinceData: [], ProvinceData: [],
CityData: [] CityData: [],
cityDisabled: false
} }
}, },
methods: { methods: {
@ -95,47 +104,7 @@ export default {
commondbCodeProvinceList().then(res => { commondbCodeProvinceList().then(res => {
this.ProvinceData = res.data this.ProvinceData = res.data
}) })
// BookingTemplate({ pageSize: 99999 }).then(res => {
// console.log(res)
// })
this.visible = true this.visible = true
this.typeData = [
{
code: '10',
name: '收货人'
},
{
code: '20',
name: '发货人'
},
{
code: '30',
name: '通知人'
},
{
code: '40',
name: '第二通知人'
},
{
code: '50',
name: '境外代理'
}
]
let WpropString = []
if (record.type) {
if (record.type.includes(']')) {
record.type.split(']').forEach(item => {
if (item.split('[')[1]) {
WpropString.push(item.split('[')[1])
}
})
} else {
WpropString.push(record.type)
}
}
console.log(WpropString)
// const typeOption = this.$options
// this.typeData = typeOption.filters['dictData']('edi_type')
setTimeout(() => { setTimeout(() => {
this.form.setFieldsValue({ this.form.setFieldsValue({
id: record.id, id: record.id,
@ -145,13 +114,20 @@ export default {
province: record.province, province: record.province,
city: record.city, city: record.city,
address: record.address, address: record.address,
tel: record.tel tel: record.tel,
type: record.type
}) })
}, 100) }, 100)
}, },
FnChangeProvince(data) { FnChangeProvince(data) {
this.cityDisabled = true
this.form.setFieldsValue({
...this.form.getFieldsValue(),
city: ''
})
commondbCodeCityList({ Provincecode: data }).then(res => { commondbCodeCityList({ Provincecode: data }).then(res => {
this.CityData = res.data this.CityData = res.data
this.cityDisabled = false
}) })
}, },
handleSubmit() { handleSubmit() {

@ -33,13 +33,13 @@
</div> </div>
</a-card> --> </a-card> -->
<a-card :bordered="false"> <a-card :bordered="false">
<!-- <vxe-toolbar> <vxe-toolbar>
<template #buttons> <template #buttons>
<div class="nav-box"> <div class="nav-box">
<div class="nav" @click="$refs.addForm.add()"><i class="iconfont icon-jiahao2fill"></i>新建</div> <div class="nav" @click="$refs.addForm.add()"><i class="iconfont icon-jiahao2fill"></i>新建</div>
</div> </div>
</template> </template>
</vxe-toolbar> --> </vxe-toolbar>
<vxe-table :data="loadData" stripe resizable round :loading="loading" height="520" empty-text=""> <vxe-table :data="loadData" stripe resizable round :loading="loading" height="520" empty-text="">
<vxe-column type="seq" width="40" fixed="left"></vxe-column> <vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column <vxe-column
@ -51,7 +51,8 @@
:align="item.align" :align="item.align"
> >
<template #default="{ row }"> <template #default="{ row }">
<span>{{ row[item.dataIndex] }}</span> <span v-if="item.dataIndex == 'type'">{{ FnRType(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="操作" fixed="right" width="160" align="center"> <vxe-column title="操作" fixed="right" width="160" align="center">
@ -85,27 +86,17 @@
@page-change="handlePageChange" @page-change="handlePageChange"
> >
</vxe-pager> --> </vxe-pager> -->
<!-- <add-form ref="addForm" @ok="handleOk" /> --> <add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" /> <edit-form ref="editForm" @ok="handleOk" />
</a-card> </a-card>
</div> </div>
</template> </template>
<script> <script>
import { STable } from '@/components' import { ExpressDeliveryDeleteAddress, ExpressDeliveryGetAddressList } from '@/api/modular/main/ExpressTemplate'
import {
ExpressDeliveryDeleteAddress,
ExpressDeliveryGetAddressList,
ShareToAll,
CancelShare
} from '@/api/modular/main/ExpressTemplate'
import { GetSysUserPage } from '@/api/modular/main/BookingLedger'
import addForm from './addForm.vue' import addForm from './addForm.vue'
import editForm from './editForm.vue' import editForm from './editForm.vue'
import { mapGetters } from 'vuex'
let timer
export default { export default {
components: { components: {
STable,
addForm, addForm,
editForm editForm
}, },
@ -120,6 +111,11 @@ export default {
confirmLoading: false, confirmLoading: false,
selectUserName: [], selectUserName: [],
columns: [ columns: [
{
title: '类别',
align: 'center',
dataIndex: 'type'
},
{ {
title: '公司名称', title: '公司名称',
align: 'center', align: 'center',
@ -155,45 +151,21 @@ export default {
visible: false, visible: false,
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
loadData: [], loadData: [],
typeData: [], typeData: []
searchQuery: { name: '' },
selectedRowKeys: [],
selectedRows: []
} }
}, },
created() { created() {
this.init() this.init()
}, },
computed: {
...mapGetters(['bookingInitData'])
},
methods: { methods: {
FnRType(e) { FnRType(e) {
const fn = e => { let Rdata = ''
let Rdata = '' this.typeData.forEach(item => {
this.typeData.forEach(item => { if (item.code == e) {
if (item.code == e) { Rdata = item.name
Rdata = item.name }
} })
}) return Rdata
return Rdata
}
let RData = ''
if (e.split(']').length == 1) {
RData = fn(e.split(']')[0])
} else {
e.split(']').forEach(item => {
if (item) {
if (RData == '') {
RData = fn(item.split('[')[1])
} else {
RData = `${RData},${fn(item.split('[')[1])}`
}
}
})
}
return RData
}, },
init() { init() {
Object.assign(this.$data, this.$options.data()) Object.assign(this.$data, this.$options.data())
@ -206,24 +178,12 @@ export default {
this.typeData = [ this.typeData = [
{ {
code: 10, code: 1,
name: '收货人' name: '收件人'
},
{
code: 20,
name: '发货人'
},
{
code: 30,
name: '通知人'
},
{
code: 40,
name: '第二通知人'
}, },
{ {
code: 50, code: 2,
name: '境外代理' name: '寄件人'
} }
] ]
this.FnGetData() this.FnGetData()

Loading…
Cancel
Save