sunzehua 1 year ago
commit 39ef981065

@ -0,0 +1,122 @@
import { axios } from '@/utils/request'
// 分页查询快递主表
export function BookingOrderSFPage(parameter) {
return axios({
url: '/BookingOrderSF/Page',
method: 'get',
params: parameter
})
}
// 保存并返回数据
export function BookingOrderSFSave(parameter) {
return axios({
url: '/BookingOrderSF/Save',
method: 'post',
data: parameter
})
}
// 删除单据
export function BookingOrderSFDelete(parameter) {
return axios({
url: '/BookingOrderSF/Delete',
method: 'post',
params: parameter
})
}
// 获取详情
export function BookingOrderSFGet(parameter) {
return axios({
url: '/BookingOrderSF/Get',
method: 'post',
params: parameter
})
}
// 发送快递
export function BookingOrderSFSendBooking(parameter) {
return axios({
url: '/BookingOrderSF/SendBooking',
method: 'post',
params: parameter
})
}
// 获取省份信息
export function commondbCodeProvinceList(parameter) {
return axios({
url: '/commondb/CodeProvinceList',
method: 'get',
params: parameter
})
}
// 获取城市信息
export function commondbCodeCityList(parameter) {
return axios({
url: '/commondb/CodeCityList',
method: 'get',
params: parameter
})
}
// 查询快递进度
export function BookingOrderSFQueryKDSchedule(parameter) {
return axios({
url: `/BookingOrderSF/QueryKDSchedule`,
method: 'post',
params: parameter
})
}
// -------------------------------------------------
/**
* 获取目的港映射
*
* @author Myshipping
*/
export function CommondbMappingportlist(parameter) {
return axios({
url: '/commondb/mappingportlist',
method: 'get',
params: parameter
})
}
export function CommondbPageMappingportlist(parameter) {
return axios({
url: '/commondbpage/mappingportlist',
method: 'get',
params: parameter
})
}
/**
* 新增编辑目的港映射信息
*
* @author Myshipping
*/
export function CommondbAddorupdatemappingport(parameter) {
return axios({
url: '/commondb/addorupdatemappingport',
method: 'post',
data: parameter
})
}
/**
* 获取目的港信息
*
* @author Myshipping
*/
export function commondbPortlist(parameter) {
return axios({
url: '/commondb/portlist',
method: 'get',
params: parameter
})
}
/**
* 获取船公司列表信息
*
* @author Myshipping
*/
export function commondbCarrierlist(parameter) {
return axios({
url: '/commondb/carrierlist',
method: 'get',
params: parameter
})
}

@ -37,7 +37,8 @@ const getters = {
saveFlag: state => state.booking.saveFlag,
firstFlag: state => state.user.firstFlag,
dpTreeList: state => state.booking.dpTreeList,
inBookingDetailsSave: state => state.booking.inBookingDetailsSave
inBookingDetailsSave: state => state.booking.inBookingDetailsSave,
kdAddData: state => state.KD.kdAddData
}
export default getters

@ -4,7 +4,7 @@ import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
import booking from './modules/booking'
import KD from './modules/KD'
// default router permission control
// import permission from './modules/permission'
@ -19,16 +19,11 @@ export default new Vuex.Store({
app,
user,
booking,
KD,
permission
},
state: {
},
mutations: {
},
actions: {
},
state: {},
mutations: {},
actions: {},
getters
})

@ -0,0 +1,22 @@
const KD = {
state: {
kdAddData: {}
},
mutations: {
SET_KDADDDATA: (state, list) => {
state.kdAddData[list.WebId] = list
}
},
actions: {
setTmsAddData({ commit }, obj) {
return new Promise(resolve => {
commit('SET_KDADDDATA', obj)
resolve()
})
}
}
}
export default KD

@ -0,0 +1,126 @@
<template>
<a-modal title="派车日志" :width="1100" :visible="visible" @cancel="handleCancel">
<vxe-table :data="loadData" stripe resizable round height="546" empty-text="">
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}_Check`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
<template #default="{ row }">
<span v-if="item.dataIndex == 'orderStatus'">{{ FnOrderStatus(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
</vxe-table>
<template slot="footer">
<a-button key="back" @click="handleCancel">
关闭
</a-button>
</template>
</a-modal>
</template>
<script>
// import { TmsForwarderOrderInfo } from '@/api/modular/main/tmsaip/ExpressModule'
export default {
data() {
return {
loadData: [],
columns: [
{
title: '派车状态',
align: 'center',
dataIndex: 'orderStatus'
},
{
title: '派车日期',
align: 'center',
dataIndex: 'dealTime'
},
{
title: '操作人',
align: 'center',
dataIndex: 'dealByName'
},
{
title: '备注',
align: 'center',
dataIndex: 'remark'
}
],
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false
}
},
mounted() {},
methods: {
FnOrderStatus(data) {
let Rdata = ''
switch (data) {
case '0':
Rdata = '已录入'
break
case '1':
Rdata = '已发送'
break
case '2':
Rdata = '已派车'
break
case '3':
Rdata = '订单完成'
break
case '9':
Rdata = '订单取消'
break
default:
Rdata = '-'
break
}
return Rdata
},
//
open(record) {
console.log(record)
TmsForwarderOrderInfo(record).then(res => {
if (res.code == 200) {
this.visible = true
this.loadData = res.data.orderStatusLogList
} else {
this.$message.warning(res.message)
}
console.log(res.data)
})
},
/**
* 提交表单
*/
FnChangeCtnCategory(e) {
console.log(e)
},
handleCancel() {
this.visible = false
}
}
}
</script>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,147 @@
<template>
<a-modal
title="编辑配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="代码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入代码"
:disabled="true"
v-decorator="['code', { rules: [{ required: true, message: '请输入代码!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="英文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入英文名称"
v-decorator="['enName', { rules: [{ required: true, message: '请输入英文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中文名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入中文名称"
v-decorator="['cnName', { rules: [{ required: true, message: '请输入中文名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input placeholder="请输入备注" v-decorator="['remark']" />
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="排序" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input-number placeholder="请输入排序" v-decorator="['sort']" />
</a-form-item>
</a-col> -->
<a-col :span="24">
<a-form-item label="描述" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-textarea :autosize="{ minRows: 3 }" placeholder="请输入描述" v-decorator="['description']" />
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { CommondbAdd } from '@/api/modular/main/CommondbCodeIssueType'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 20 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
code: record.code,
enName: record.enName,
cnName: record.cnName,
description: record.description,
sort: record.sort,
remark: record.remark
})
console.log(this.form.getFieldsValue())
}, 100)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
for (const key in values) {
console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
console.log(this.form, values.gid)
values.gid = this.data.gid
console.log(values)
CommondbAdd(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,539 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="6" :sm="24">
<a-form-item label="快递号:">
<a-input v-model="queryParam.KDNO" allow-clear placeholder="请输入快递号" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="快递日期:">
<div class="picker-box" style="display:flex;padding-right: 2px;">
<a-date-picker
style="min-width:30px; flex: 1;"
v-model="queryParam.BDate"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
suffixIcon=" "
placeholder="开始时间"
/>
<span style="margin:0 4px;">-</span>
<a-date-picker
style="min-width:30px;flex: 1;"
v-model="queryParam.EDate"
format="YYYY-MM-DD"
valueFormat="YYYY-MM-DD"
placeholder="结束时间"
suffixIcon=" "
/>
</div>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="收件公司:">
<a-input v-model="queryParam.SJCompany" allow-clear placeholder="请输入收件公司" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="收件人:">
<a-input v-model="queryParam.SJPeople" allow-clear placeholder="请输入收件人" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="发件电话:">
<a-input v-model="queryParam.FJTel" allow-clear placeholder="请输入发件电话" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="船名:">
<a-input v-model="queryParam.VESSEL" allow-clear placeholder="请输入船名" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="航次:">
<a-input v-model="queryParam.VOYNO" allow-clear placeholder="请输入航次" />
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
<a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
</a-card>
<a-card :bordered="false">
<vxe-toolbar>
<template #buttons>
<div class="nav-box">
<div class="nav" @click="FnAdd"><i class="iconfont icon-jiahao2fill"></i>新增</div>
</div>
<div class="nav-box">
<div class="nav" @click="FnDelete"><i class="iconfont icon-shanchu2"></i>删除</div>
</div>
<div class="nav-box">
<div class="nav" @click="FnCopy"><i class="iconfont icon-fuzhi"></i>复制</div>
</div>
</template>
</vxe-toolbar>
<vxe-table
:data="loadData"
ref="xTable1"
stripe
resizable
round
:loading="loading"
height="546"
empty-text="没有更多数据了!"
>
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
<template #default="{ row }">
<span v-if="item.dataIndex == 'orderStatus'">{{ FnOrderStatus(row[item.dataIndex]) }}</span>
<span v-else-if="item.dataIndex == 'billNo'" @click="FnGoDetails(row)" class="GoDetails">{{
row[item.dataIndex]
}}</span>
<span v-else-if="item.dataIndex == 'carGroupId'">{{ FnCarGroupId(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="120" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="FnGoDetails(row)">
<a-icon type="form" :style="{ color: '#13c2c2' }" />
</vxe-button>
<vxe-button type="text" @click="FnKdSchedule(row)">
<a-icon type="compass" :style="{ color: '#13c2c2' }" />
</vxe-button>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:current-page="queryParam.PageNo"
:page-size="queryParam.PageSize"
:total="queryParam.totalCount"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange1"
>
</vxe-pager>
<check ref="check" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { mapActions } from 'vuex'
// import {
// TmsForwarderOrderDelete,
// listCarGroup,
// listAll,
// forwarderOrderTransTime,
// TmsForwarderOrderCancel
// } from '@/api/modular/main/tmsaip/ExpressModule'
// import { tmsTenantRelationList } from '@/api/modular/main/tmsaip/tmsTenantRelationTF'
import {
BookingOrderSFPage,
BookingOrderSFDelete,
BookingOrderSFQueryKDSchedule
} from '@/api/modular/main/ExpressModule'
// import { tmsTenantRelationList } from '@/api/modular/main/tmsaip/tmsTenantRelationTF'
import check from './check.vue'
import editForm from './editForm.vue'
export default {
components: {
check,
editForm
},
data() {
return {
MapTimeA: [],
MapTimeVisible: false,
MapData: {},
map: '',
MapType: true,
MapState: true,
MapBLoading: false,
start: {},
end: {},
waypoints: [],
point: '',
center: { lng: 0, lat: 0, adr: '' },
zoom: 3,
MapVisible: false,
orderStatusData: [
{ code: '0', name: '已录入' },
{ code: '1', name: '已发送' },
{ code: '2', name: '已派车' },
{ code: '3', name: '订单完成' },
{ code: '9', name: '订单取消' },
{ code: '21', name: '部分派车' }
],
carGroupIdData: [],
listAllData: [],
TypeData: [],
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
PageNo: 1,
PageSize: 10,
totalCount: 0
},
ColumnsQuery: [],
columns: [
{
title: '快递号',
align: 'center',
width: '80',
dataIndex: 'kdno'
},
{
title: '快递状态',
align: 'center',
width: '80',
dataIndex: 'state'
},
{
title: '快递公司',
align: 'center',
width: '80',
dataIndex: 'kdCompany'
},
{
title: '快递类型',
align: 'center',
width: '80',
dataIndex: 'type'
},
{
title: '收件公司',
align: 'center',
width: '80',
dataIndex: 'sjCompany'
},
{
title: '收件人',
align: 'center',
width: '80',
dataIndex: 'sjPeople'
},
{
title: '收件省份',
align: 'center',
width: '80',
dataIndex: 'sjProvinceId'
},
{
title: '收件城市',
align: 'center',
width: '80',
dataIndex: 'sjCity'
},
{
title: '寄件公司',
align: 'center',
width: '80',
dataIndex: 'fjCompany'
},
{
title: '寄件人',
align: 'center',
width: '80',
dataIndex: 'fjPeople'
},
{
title: '寄件省份',
align: 'center',
width: '80',
dataIndex: 'fjProvinceId'
},
{
title: '寄件城市',
align: 'center',
width: '80',
dataIndex: 'fjCity'
}
],
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: []
}
},
created() {},
mounted() {
this.init()
},
methods: {
...mapActions(['setIssuetypeList']),
handleOk() {
console.log('ok')
},
FnCopy() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
if (selectRecords.length == 1) {
this.$router.push({
name: 'ExpressModuleDetails',
query: {
type: 'Copy',
id: selectRecords[0].id
}
})
} else {
this.$message.warning('请选择一条数据!')
}
},
FnGoDetails(row) {
console.log(row)
this.$router.push({
name: 'ExpressModuleDetails',
query: {
type: 'Details',
id: row.id,
billNo: row.billNo
}
})
},
FnKdSchedule(row) {
console.log(row)
BookingOrderSFQueryKDSchedule({ Id: row.id }).then(res => {
console.log(res)
})
},
FnAdd() {
this.$router.push({
name: 'ExpressModuleDetails',
query: {
type: 'Add',
WebId: Date.parse(new Date()) / 1000
}
})
},
FnDelete() {
let selectRecords = this.$refs.xTable1.getCheckboxRecords()
let Api = (data, num) => {
console.log(data[num])
BookingOrderSFDelete({ Ids: data[num].id }).then(res => {
console.log(res)
if (res.code == 204) {
if (selectRecords.length > num + 1) {
Api(data, num + 1)
} else if (selectRecords.length == num + 1) {
this.$message.success('已完成删除')
this.FnGetData()
}
} else {
this.$message.warning(res.message)
}
})
}
if (selectRecords.length) {
Api(selectRecords, 0)
} else {
this.$message.warning('请至少选择一条数据')
}
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 => {
if (item.relationId == data) {
Rdata = item.relationName
}
})
return Rdata
},
handlePageChange1({ PageNo, pageSize }) {
this.queryParam.PageNo = PageNo
this.queryParam.PageSize = pageSize
this.FnGetData()
},
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
},
FnGetData() {
this.loading = true
BookingOrderSFPage(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.items
this.queryParam.totalCount = res.data.totalCount
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
})
},
handleOk() {
this.setIssuetypeList()
this.FnGetData()
}
}
}
</script>
<style lang="less">
.GoDetails {
color: @primary-color;
cursor: pointer;
}
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
.vxe-table--render-default .vxe-body--row.row--stripe {
background: #f5f9fe;
}
.ant-card-body {
padding-top: 10px;
}
.nav-box {
padding: 0 10px;
.nav {
display: inline-block;
margin-right: 8px;
cursor: pointer;
border: 1px solid rgba(255, 255, 255, 0);
padding: 0 10px;
height: 28px;
line-height: 26px;
.iconfont {
margin-right: 6px;
}
&:hover {
border: 1px solid rgba(255, 255, 255, 0);
border-radius: 4px;
}
&:nth-of-type(1) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(2) {
.iconfont {
color: #865ef8;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(3) {
.iconfont {
color: #ff9702;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(4) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(5) {
.iconfont {
color: #ff1062;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(6) {
.iconfont {
color: #1ebeca;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(7) {
.iconfont {
color: #82c93d;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
&:nth-of-type(8) {
.iconfont {
color: #1d8aff;
}
&:hover {
background: #fff;
box-shadow: 0 0 10px #eee;
}
}
}
}
</style>
Loading…
Cancel
Save