修改问题

master
sunzehua 12 months ago
commit 808dd0d99a

@ -31,6 +31,8 @@ import 'vue-easytable/libs/theme-default/index.css'
import VueEasytable from 'vue-easytable'
import qs from 'qs'
import '@/utils/drag'
import VueClipBoard from 'vue-clipboard2'
Vue.use(VueClipBoard)
Vue.use(VXETable)
Vue.use(VueContextMenu)

@ -497,17 +497,22 @@ export default {
}
this.inLoading = true
this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then(data => {
console.log(data, this.agentFilter,4444444)
if (data.rows) {
if (this.searchApi === 'DjyCustomerSuggest') {
if (this.agentFilter.length === 0) {
this.selectList = data.rows
} else {
console.log(this.selectList, data.rows)
}
} else {
this.selectList = data.rows
}
// if (this.searchApi === 'DjyCustomerSuggest') {
// if (this.agentFilter.length === 0) {
// this.selectList = data.rows
// } else {
// this.agentFilter.forEach(item=>{
// data.rows.forEach(ite=>{
// if(ite.codeName==item.shortName)
// })
// })
// console.log(this.selectList, data.rows)
// }
// } else {
// this.selectList = data.rows
// }
this.selectList = data.rows
} else {
this.selectList = data
}

@ -70,7 +70,7 @@
</div>
<div class="btn-list single-view-4">
<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 class="btn-list single-view-1" :class="{ inLoad: inChildLoading || !changeFlag }">
<button @click="changePage('prev')"><span class="iconfont icon-shang"></span>上一票</button>

@ -141,7 +141,7 @@
</a-menu>
</a-dropdown>
</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>
</template>
<template #tools>
@ -3225,10 +3225,10 @@ export default {
if (['CUSTOMERNAME', 'FORWARDER', 'CUSTOMSER', 'AGENTID', 'TRUCKER'].includes(form.label)) {
this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = data.rows
} else if (['VESSEL'].includes(form.label)) {
const map = new Map();
const map = new Map()
for (const item of data) {
if (!map.has(item.vessel)) {
map.set(item.vessel, item);
map.set(item.vessel, item)
}
}
this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = [...map.values()]

@ -1,26 +1,27 @@
<template>
<div class="SendCarMain">
<a-spin class="SendCarMainRight" :spinning="confirmLoading">
<a-form :form="form" class="CsForm">
<a-row class="HeaderBox" type="flex" :gutter="16">
<a-col>
<div class="nav-box">
<div class="nav" @click="handleSubmit">
<i class="iconfont icon-icon_baocun"></i>{{ type == 'Details' ? '保存' : '新建' }}
</div>
<div class="CutOff" v-if="type == 'Details'"></div>
<div class="nav" @click="handleSubmit('FnSendBooking')" v-if="type == 'Details'"></div>
<div class="CutOff" v-if="type == 'Details' && form.getFieldsValue().currentStateCode != 'DJY01'"></div>
<div
class="nav"
@click="handleCancel"
v-if="type == 'Details' && form.getFieldsValue().currentStateCode != 'DJY01'"
>
<i class="iconfont icon-return"></i>取消
</div>
<a-row class="HeaderBox" type="flex">
<a-col>
<div class="nav-box">
<div class="nav" @click="handleSubmit"><i class="iconfont icon-icon_baocun"></i>暂存</div>
<div class="nav" @click="handleSubmit('FnSendBooking')">
<i class="iconfont icon-icon_baocun"></i>暂存并提交
</div>
</a-col>
</a-row>
<div class="CutOff" v-if="type == 'Details'"></div>
<div class="nav" @click="handleSubmit('FnSendBooking')" v-if="type == 'Details'"></div>
<div class="CutOff" v-if="type == 'Details' && form.getFieldsValue().currentStateCode != 'DJY01'"></div>
<div
class="nav"
@click="handleCancel"
v-if="type == 'Details' && form.getFieldsValue().currentStateCode != 'DJY01'"
>
<i class="iconfont icon-return"></i>取消
</div>
</div>
</a-col>
</a-row>
<a-form :form="form" class="CsForm">
<a-row :style="{ marginTop: '10px' }">
<a-col :span="5">
<a-form-item
@ -72,8 +73,8 @@
>
<!-- has-feedback -->
<!-- <a-select v-decorator="['state']" allow-clear>
<a-select-option value="新建">
新建
<a-select-option value="发件">
发件
</a-select-option>
<a-select-option value="顺丰">
顺丰
@ -102,57 +103,6 @@
<a-col :span="11">
<p class="CsFormTitle">
<span><i class="iconfont icon-shiyongwendang"></i>收件人信息</span>
<span class="Template" @click="Template('sj')">簿</span>
<a-modal :visible="TemplateVisible" width="50vw" title="地址簿" @cancel="TemplateCancel">
<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
v-for="item in columns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
>
<template #default="{ row }">
<span>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="160" align="center">
<template #default="{ row }">
<vxe-button type="text" status="primary" @click="PeopleDataSelect(row)">
使用
</vxe-button>
<!-- <vxe-button type="text" @click="$refs.editForm.edit(row)">
<a-icon type="form" :style="{ color: '#13c2c2' }" />
</vxe-button> -->
<!-- <a-popconfirm
title="请确认删除?"
ok-text="是"
cancel-text="否"
@confirm="
e => {
BookingTemplateDelete(row)
}
"
>
<vxe-button type="text">
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
</vxe-button>
</a-popconfirm> -->
</template>
</vxe-column>
</vxe-table>
<template #footer> </template>
</a-modal>
</p>
<a-col :span="12">
<a-form-item
@ -171,19 +121,23 @@
:wrapperCol="{ xs: { span: 25 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-decorator="['sjPeople']" allowClear />
<!-- <a-auto-complete
<!-- <a-input v-decorator="['sjPeople']" allowClear /> -->
<a-auto-complete
v-decorator="['sjPeople']"
allowClear
:data-source="PeopleDataB"
:data-source="PeopleDataSjB"
style="width: 100%"
@select="
e => {
PeopleDataSelect(e, 'sj')
}
"
@search="PeopleDataSearch"
/> -->
@search="
e => {
PeopleDataSearch(e, 'sj')
}
"
/>
</a-form-item>
</a-col>
<a-col :span="12">
@ -265,7 +219,6 @@
<a-col :span="11">
<p class="CsFormTitle">
<span><i class="iconfont icon-shiyongwendang"></i>寄件人信息</span>
<span class="Template" @click="Template('fj')">簿</span>
</p>
<a-col :span="12">
<a-form-item
@ -284,19 +237,23 @@
:wrapperCol="{ xs: { span: 25 }, sm: { span: 18 } }"
has-feedback
>
<a-input v-decorator="['fjPeople']" allowClear />
<!-- <a-auto-complete
<!-- <a-input v-decorator="['fjPeople']" allowClear /> -->
<a-auto-complete
v-decorator="['fjPeople']"
allowClear
:data-source="PeopleDataB"
:data-source="PeopleDataFjB"
style="width: 100%"
@select="
e => {
PeopleDataSelect(e, 'fj')
}
"
@search="PeopleDataSearch"
/> -->
@search="
e => {
PeopleDataSearch(e, 'fj')
}
"
/>
</a-form-item>
</a-col>
<a-col :span="12">
@ -431,7 +388,7 @@
allow-clear
@change="
e => {
FnChangeProvince(e, 'fj')
FnChangesettleAccountsTypeCode(e)
}
"
>
@ -445,14 +402,14 @@
</a-form-item>
</a-col>
<a-col :span="5" v-show="form.getFieldsValue().settleAccountsTypeCode == 2">
<a-col :span="10" v-show="form.getFieldsValue().settleAccountsTypeCode == 2">
<a-form-item
label="月结卡号:"
:labelCol="{ xs: { span: 25 }, sm: { span: 7 } }"
:wrapperCol="{ xs: { span: 25 }, sm: { span: 17 } }"
:labelCol="{ xs: { span: 25 }, sm: { span: 3 } }"
:wrapperCol="{ xs: { span: 25 }, sm: { span: 21 } }"
has-feedback
>
<a-input v-decorator="['monthlyCard']" allowClear />
<!-- <a-input v-decorator="['monthlyCard']" allowClear /> -->
<!-- <a-auto-complete
v-decorator="['monthlyCard']"
allowClear
@ -461,61 +418,13 @@
@select="monthlyCardDataSelect"
@search="monthlyCardDataBSearch"
/> -->
<a-select ref="select" v-decorator="['monthlyCard']" style="width: 100%" allowClear>
<a-select-option :value="item.cardNo" v-for="item in monthlyCardData" :key="item.id">
{{ `${item.account}-${item.cardNo}` }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="2" v-show="form.getFieldsValue().settleAccountsTypeCode == 2">
<p class="MonthlyPay" @click="MonthlyPay">簿</p>
<a-modal :visible="MonthlyPayVisible" width="50vw" title="卡号簿" @cancel="MonthlyPayCancel">
<vxe-table
:data="MonthlyPayloadData"
stripe
resizable
round
:loading="MonthlyPayloading"
height="520"
empty-text="没有更多数据了!"
>
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column
v-for="item in MonthlyPayColumns"
:key="`${item.dataIndex}`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
>
<template #default="{ row }">
<span>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="160" align="center">
<template #default="{ row }">
<vxe-button type="text" status="primary" @click="monthlyCardDataSelect(row)">
使用
</vxe-button>
<!-- <vxe-button type="text" @click="$refs.editForm.edit(row)">
<a-icon type="form" :style="{ color: '#13c2c2' }" />
</vxe-button> -->
<!-- <a-popconfirm
title="请确认删除?"
ok-text="是"
cancel-text="否"
@confirm="
e => {
BookingTemplateDelete(row)
}
"
>
<vxe-button type="text">
<a-icon type="delete" :style="{ color: '#13c2c2' }" />
</vxe-button>
</a-popconfirm> -->
</template>
</vxe-column>
</vxe-table>
<template #footer> </template>
</a-modal>
</a-col>
</a-row>
<p class="CsFormTitle">
<span><i class="iconfont icon-tuandui"></i>关联业务明细</span>
@ -1023,42 +932,12 @@ export default {
eetd: 'etd'
},
PeopleData: [],
PeopleDataB: [],
PeopleDataFj: [],
PeopleDataSj: [],
PeopleDataFjB: [],
PeopleDataSjB: [],
monthlyCardData: [],
monthlyCardDataB: [],
TemplateVisible: false,
columns: [
{
title: '公司名称',
align: 'center',
dataIndex: 'company'
},
{
title: '联系人姓名',
align: 'center',
dataIndex: 'people'
},
{
title: '省份',
align: 'center',
dataIndex: 'province'
},
{
title: '城市',
align: 'center',
dataIndex: 'city'
},
{
title: '详细地址',
align: 'center',
dataIndex: 'address'
},
{
title: '联系电话',
align: 'center',
dataIndex: 'tel'
}
],
MonthlyPayColumns: [
{
title: '月结户头',
@ -1109,21 +988,19 @@ export default {
// value: str.repeat(repeat)
// }
// },
MonthlyPay() {
this.MonthlyPayVisible = true
this.MonthlyPayloading = true
MonthlyPayAccountList().then(res => {
this.MonthlyPayloadData = res.data
this.MonthlyPayloading = false
monthlyCardDataBSearch(value) {
let Arr = []
this.monthlyCardData.forEach(item => {
if (item.cardNo.indexOf(value) != -1) {
Arr.push(item.cardNo)
}
})
// ExpressDeliveryGetAddressList().then(res => {
// this.loadData = res.data
// this.loading = false
// })
this.monthlyCardDataB = Arr
},
monthlyCardDataSelect(value) {
this.MonthlyPayloadData.forEach(item => {
if (item.cardNo == value.cardNo) {
this.monthlyCardData.forEach(item => {
if (item.cardNo == value) {
let values = { ...this.form.getFieldsValue() }
let Data = {
monthlyCard: item.cardNo
@ -1134,35 +1011,35 @@ export default {
...values,
...Data
})
this.MonthlyPayCancel()
}, 100)
}
})
},
MonthlyPayCancel() {
this.MonthlyPayVisible = false
},
Template(type) {
this.TemplateType = type
this.TemplateVisible = true
this.loading = true
ExpressDeliveryGetAddressList().then(res => {
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)
PeopleDataSearch(value, type) {
console.log(value, type, 'Search')
let Arr = []
if (type == 'fj') {
this.PeopleDataFj.forEach(item => {
if (item.people.indexOf(value) != -1) {
Arr.push(item.people)
}
})
this.loading = false
})
this.PeopleDataFjB = Arr
} else {
this.PeopleDataSj.forEach(item => {
if (item.people.indexOf(value) != -1) {
Arr.push(item.people)
}
})
this.PeopleDataSjB = Arr
}
},
PeopleDataSelect(value) {
let type = this.TemplateType
this.loadData.forEach(item => {
if (item.people == value.people) {
PeopleDataSelect(value, type) {
this.PeopleData.forEach(item => {
if (item.people == value) {
let values = { ...this.form.getFieldsValue() }
console.log(values)
let Data = {}
Data[`${type}Company`] = item.company
Data[`${type}Address`] = item.address
@ -1176,23 +1053,34 @@ export default {
Data[`${type}ProvinceId`] = ''
}
Data[`${type}Tel`] = item.tel
console.log(Data)
setTimeout(() => {
this.form.setFieldsValue({
...values,
...Data
})
this.TemplateCancel()
}, 100)
}
})
},
TemplateCancel() {
this.TemplateVisible = false
},
getListData() {
this.BusinessLoading = true
MonthlyPayAccountList().then(res => {
this.monthlyCardData = res.data
})
ExpressDeliveryGetAddressList().then(res => {
this.PeopleData = res.data
this.PeopleDataFj = []
this.PeopleDataSj = []
res.data.forEach(item => {
if (item.type == 1) {
this.PeopleDataSj.push(item)
} else if (item.type == 2) {
this.PeopleDataFj.push(item)
}
})
})
PageDataByBooking({
multisort: [
{ sortField: 'bsstatusname', descSort: true },
@ -1231,6 +1119,22 @@ export default {
this.SearchData = {}
this.getListData()
},
FnChangesettleAccountsTypeCode(data) {
if (data == 2 && this.monthlyCardData.length == 1) {
let values = { ...this.form.getFieldsValue() }
let Data = {
monthlyCard: this.monthlyCardData[0].cardNo,
settleAccountsTypeCode: data
}
setTimeout(() => {
this.form.setFieldsValue({
...values,
...Data
})
}, 100)
}
},
FnChangeProvince(data, type) {
commondbCodeCityList({ Provincecode: data }).then(res => {
this[`${type}CityData`] = res.data
@ -1272,6 +1176,7 @@ export default {
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
// dispatchTime
values.business = this.DetailData
@ -1293,7 +1198,7 @@ export default {
// })
// })
// values.tmsForwarderOrderLoadingPlaceEntityList = this.tmsForwarderOrderLoadingPlaceEntityList
console.log(this.id, this.type)
if (this.id && this.type != 'Copy') {
BookingOrderSFSave({ ...values, id: this.id }).then(res => {
if (res.success) {
@ -1320,34 +1225,39 @@ export default {
this.confirmLoading = false
})
} else {
if (this.type == 'Copy') {
if (values.business && values.detail.length) {
let Arr = []
values.detail.forEach(item => {
delete item.id
delete item.createdUserId
delete item.createdTime
delete item.createdUserName
delete item.pId
delete item.tenantId
delete item.WebKey
Arr.push(item)
})
}
if (values.business && values.business.length) {
let Arr = []
values.business.forEach(item => {
delete item.id
delete item.createdUserId
delete item.createdTime
delete item.createdUserName
delete item.pId
delete item.tenantId
delete item.WebKey
Arr.push(item)
})
}
}
console.log(this.type)
// if (this.type == 'Copy') {
// if (values.business && values.detail.length) {
// console.log(values.business, values.detail.length)
// // let Arr = []
// values.detail.forEach(item => {
// delete item.id
// delete item.kdno
// delete item.createdUserId
// delete item.createdTime
// delete item.createdUserName
// delete item.pId
// delete item.tenantId
// delete item.WebKey
// // Arr.push(item)
// })
// }
// if (values.business && values.business.length) {
// console.log(values.business, values.business.length)
// // let Arr = []
// values.business.forEach(item => {
// delete item.id
// delete item.createdUserId
// delete item.createdTime
// delete item.createdUserName
// delete item.pId
// delete item.tenantId
// delete item.WebKey
// // Arr.push(item)
// })
// }
// }
console.log(values)
BookingOrderSFSave(values)
.then(res => {
if (res.success) {
@ -1417,26 +1327,22 @@ export default {
BookingOrderSFGet({ id: this.id }).then(res => {
if (res.success && res.data.id != 0) {
setTimeout(() => {
console.log(res.data)
let Data = { ...res.data }
if (this.type == 'Copy') {
delete Data.id
delete Data.kdno
delete Data.createdUserId
delete Data.createdTime
delete Data.createdUserName
delete Data.pId
delete Data.tenantId
delete Data.WebKey
}
this.form.setFieldsValue({
...res.data
...Data
})
this.DetailData = res.data.business
// if (this.type == 'Copy') {
// this.form.setFieldsValue({
// orderStatus: '0'
// })
// this.tmsForwarderOrderLoadingPlaceEntityList = []
// res.data.orderLoadingPlaceList.forEach(item => {
// this.tmsForwarderOrderLoadingPlaceEntityList.push({
// name: item.name,
// contact: item.contact,
// tel: item.tel,
// address: item.address
// })
// })
// } else {
// this.tmsForwarderOrderLoadingPlaceEntityList = res.data.orderLoadingPlaceList
// }
res.data.business.forEach((item, index) => {
item.WebKey = index + 1
})
@ -1453,8 +1359,9 @@ export default {
goodsname: '文件',
fjCompany: this.userInfo.loginEmpInfo.orgName,
kdNum: 1,
currentStateDesc: '新建',
kdCompany: 'sf'
currentStateDesc: '发件',
kdCompany: 'sf',
date: this.GetDate()
})
})
if (this.kdAddData[this.WebId]) {
@ -1486,6 +1393,27 @@ export default {
}, 100)
}
},
GetDate() {
let Rdata = ''
let date = new Date()
date
.toLocaleDateString()
.split('/')
.forEach((item, index) => {
switch (index) {
case 0:
Rdata = `${item}-`
break
case 1:
Rdata = `${Rdata}${item < 10 ? '0' + item : item}-`
break
default:
Rdata = `${Rdata}${item < 10 ? '0' + item : item}`
break
}
})
return Rdata
},
removeCheckboxRow() {
this.$refs.xTable.selection.forEach(item => {
this.DetailData.forEach((item2, index2) => {
@ -1566,16 +1494,18 @@ export default {
background: #fff;
}
.SendCarMainRight {
flex: 4;
background: #fff;
padding-top: 25px;
}
}
.HeaderBox {
border-bottom: 1px solid #d9d9d9;
padding-bottom: 5px;
margin: 0 25px;
}
.CsForm {
background: #fff;
padding: 25px;
padding-top: 0px;
height: 760px;
overflow-y: auto !important;
}
@ -1591,23 +1521,7 @@ export default {
color: #333;
margin-bottom: 25px;
}
.MonthlyPay {
cursor: pointer;
font-weight: bold;
margin: 0;
height: 36px;
line-height: 36px;
margin-left: 10px;
&:hover {
color: #1d8aff;
}
}
.CsFormTitle > .Template {
cursor: pointer;
&:hover {
color: #1d8aff;
}
}
.CsFormTitle > span {
font-weight: bolder;
padding: 0.25rem 0.5rem 0 20px;

@ -79,7 +79,7 @@
<vxe-toolbar>
<template #buttons>
<div class="nav-box">
<div class="nav" @click="FnAdd"><i class="iconfont icon-jiahao2fill"></i>新增</div>
<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>
@ -114,10 +114,15 @@
>
<template #default="{ row }">
<span v-if="item.dataIndex == 'kdCompany'">{{ FnkdCompany(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-if="item.dataIndex == 'kdno'" @click="FnGoDetails(row)" class="GoDetails">
<i
class="iconfont icon-fuzhi"
@click.stop="CopyKdno(row[item.dataIndex])"
v-show="row[item.dataIndex]"
></i>
{{ 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>
@ -348,6 +353,11 @@ export default {
this.$message.warning('请选择一条数据!')
}
},
CopyKdno(data) {
this.$copyText(data).then(() => {
this.$message.success(`复制成功:${data}`)
})
},
FnGoDetails(row) {
console.log(row)
this.$router.push({

Loading…
Cancel
Save