张同海 11 months ago
commit 17999aa49b

@ -1223,4 +1223,28 @@ export function DownloadVOLTAEdiSI(parameter) {
data: parameter,
responseType: 'blob'
})
}
export function BachUpdateShipagency(parameter) {
return axios({
url: '/BookingOrder/BachUpdateShipagency',
method: 'post',
data: parameter
})
}
export function ListAgentByCarrier(parameter) {
return axios({
url: '/BookingCarrierRelation/ListAgentByCarrier',
method: 'get',
params: parameter
})
}
export function listYardBwCarrier(parameter) {
return axios({
url: '/BookingCarrierRelation/ListYardByCarrier',
method: 'get',
params: parameter
})
}

@ -55,3 +55,51 @@ export function commondbCarrierlist(parameter) {
params: parameter
})
}
export function pageYard(parameter) {
return axios({
url: '/BookingCarrierRelation/pageYard',
method: 'get',
params: parameter
})
}
export function saveYard(parameter) {
return axios({
url: '/BookingCarrierRelation/saveYard',
method: 'post',
data: parameter
})
}
export function deleteYard(parameter) {
return axios({
url: '/BookingCarrierRelation/deleteYard',
method: 'post',
params: parameter
})
}
export function pageAgent(parameter) {
return axios({
url: '/BookingCarrierRelation/pageAgent',
method: 'get',
params: parameter
})
}
export function saveAgent(parameter) {
return axios({
url: '/BookingCarrierRelation/saveAgent',
method: 'post',
data: parameter
})
}
export function deleteAgent(parameter) {
return axios({
url: '/BookingCarrierRelation/deleteAgent',
method: 'post',
params: parameter
})
}

@ -31,6 +31,8 @@ const getters = {
deleteId: state => state.booking.deleteId,
saveNeedCar: state => state.booking.saveNeedCar,
lineList: state => state.booking.lineList,
agentFilter: state => state.booking.agentFilter,
yardFilter: state => state.booking.yardFilter,
bookingInitData: state => state.booking.bookingInitData,
sourceList: state => state.booking.sourceList,
countryList: state => state.booking.countryList,

@ -21,6 +21,7 @@ const booking = {
dpTreeList: [],
copyPages: { number: 0, path: '' },
yardList: [],
yardFilter: {},
statusDIct: [],
projectDict: [],
saveNeedNumber: '',
@ -34,6 +35,7 @@ const booking = {
lineList: [],
sourceList: [],
countryList: [],
agentFilter: {},
saveNeedCar: '',
bookingInitData: {
customernameInitList: [],
@ -129,6 +131,12 @@ const booking = {
},
SET_PROJECTDICT: (state, list) => {
state.projectDict = list
},
SET_AgentFilter: (state, list) => {
state.agentFilter = list
},
SET_YardFilter: (state, list) => {
state.yardFilter = list
}
},
@ -459,23 +467,23 @@ const booking = {
setdpTreeList({ commit }, obj) {
return new Promise(resolve => {
sysOrgTreeList().then(response => {
if (response.success) {
const data = response.data
commit('SET_DPTREELIST', data)
resolve(response.data)
} else {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
})
if (response.success) {
const data = response.data
commit('SET_DPTREELIST', data)
resolve(response.data)
} else {
// eslint-disable-next-line no-undef
reject(new Error(data.message))
}
})
.catch(error => {
// eslint-disable-next-line no-undef
reject(error)
})
})
},
// 设置需要保存页面
setSET_SAVEFLAG({ commit }, type) {
// 设置需要保存页面
setSET_SAVEFLAG({ commit }, type) {
return new Promise(resolve => {
commit('SET_SAVEFLAG', type)
resolve()

@ -102,6 +102,10 @@ const user = {
reject(response.message)
return
}
if (response.needPassWord) {
reject(response)
return
}
const result = response.data
Vue.ls.set(ACCESS_TOKEN, result, 7 * 24 * 60 * 60 * 1000)
commit('SET_TOKEN', result)

@ -49,18 +49,10 @@ const err = error => {
// request interceptor
service.interceptors.request.use(config => {
const token = Vue.ls.get(ACCESS_TOKEN)
// const XToken = Vue.ls.get(X_ACCESS_TOKEN)
const XToken = Vue.ls.get(X_ACCESS_TOKEN)
if (token) {
config.headers['Authorization'] = 'Bearer ' + token
// const tokenX = token.replace(/_/g, "/").replace(/-/g, "+");
// var json = decodeURIComponent(escape(window.atob(tokenX.split(".")[1])));
// const data = JSON.parse(json)
// const expire = data.exp
// const nowTime = Math.floor(Date.now() / 1000);
// const time = expire - nowTime
// if (time <= 50000) {
// config.headers['X-Authorization'] = 'Bearer ' + XToken
// }
config.headers['X-Authorization'] = 'Bearer ' + XToken
}
return config
}, err)
@ -76,6 +68,9 @@ service.interceptors.response.use(response => {
if (response.headers['x-access-token']) {
Vue.ls.set(X_ACCESS_TOKEN, response.headers['x-access-token'])
}
if (response.headers['access-token']) {
Vue.ls.set(ACCESS_TOKEN, response.headers['access-token'])
}
const code = response.data.code
if (code === 1011006 || code === 1011007 || code === 1011008 || code === 1011009 || code === 401) {
Vue.ls.remove(ACCESS_TOKEN)
@ -84,6 +79,9 @@ service.interceptors.response.use(response => {
message.error(response.data.message)
return response.data
} else {
if (response.headers['need-modify-password']) {
response.data.needPassWord = true
}
return response.data
}
}, err)

@ -19,14 +19,12 @@
@blur="getSelectBlur"
@select="selectOption"
@change="(value, option) => debounce(this.handleChange, 200, option)"
@search="debounce(handleSearch, 300, $event)"
>
@search="debounce(handleSearch, 300, $event)">
<a-select-option
v-for="(item, index) in selectList"
:key="index"
:value="item[showLabel[0]] + index + 3"
:label="item[showLabel[0]]"
>
:label="item[showLabel[0]]">
<template v-if="type === 'contractno'">
<div class="contractno-label">
<div class="title">{{ item.contractNo }} / {{ item.contractName || '--' }}</div>
@ -140,7 +138,9 @@ export default {
'lineList',
'bookingInitData',
'sourceList',
'countryList'
'countryList',
'agentFilter',
'yardFilter'
])
},
watch: {
@ -418,12 +418,12 @@ export default {
} else {
setTimeout(() => {
const num = op.data.key
this.value = this.selectList[num][this.showLabel[0]]
this.$emit('change', {
type: this.type,
res: this.selectList[num]
})
}, 100)
this.value = this.selectList[num][this.showLabel[0]]
this.$emit('change', {
type: this.type,
res: this.selectList[num]
})
}, 100)
}
},
getSelectFirst(e, canClick = true) {
@ -453,8 +453,25 @@ export default {
'shippercountry'
].includes(this.type)
) {
this.selectList = this.emnuData(this.type)
this.inLoading = false
if (this.type === 'yard') {
if (this.yardFilter.length === 0) {
this.selectList = this.yardList
} else {
const arr = []
this.yardFilter.forEach(item => {
this.yardList.forEach(ite => {
if (ite.code == item.yardCode) {
arr.push(ite)
}
})
})
this.selectList = arr
}
} else {
this.selectList = this.emnuData(this.type)
this.inLoading = false
}
return false
}
// 线lineName,
@ -464,8 +481,27 @@ export default {
this.setLineList()
return false
}
if (this.type === 'forwarder') {
this.selectList = []
}
if (!e) {
console.log('首次搜索内容', e, this.type, this.bookingInitData)
if (this.type === 'forwarder') {
this.inLoading = true
if (this.agentFilter.length === 0) {
this.inLoading = false
this.selectList = this.bookingInitData[`${this.type}InitList`]
} else {
setTimeout(() => {
this.agentFilter.forEach(item => {
item.shortName = item.agent
item.codeName = item.agentCode
})
this.selectList = this.agentFilter
}, 500);
}
return false
}
if (
![
'vessel',
@ -479,7 +515,6 @@ export default {
].includes(this.type) &&
this.bookingInitData[`${this.type}InitList`].length > 0
) {
console.log(this.bookingInitData[`${this.type}InitList`])
this.selectList = this.bookingInitData[`${this.type}InitList`]
return false
}
@ -496,7 +531,23 @@ export default {
this.inLoading = true
this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then(data => {
if (data.rows) {
this.selectList = data.rows
if (this.type === 'forwarder') {
if (this.agentFilter.length === 0) {
this.selectList = data.rows
} else {
const arr = []
this.agentFilter.forEach(item => {
data.rows.forEach(ite => {
if (ite.codeName == item.agentCode) {
arr.push(ite)
}
})
})
this.selectList = arr
}
} else {
this.selectList = data.rows
}
} else {
this.selectList = data
}
@ -524,12 +575,30 @@ export default {
}
})
}
this.inLoading = true
this.getFromSelectData(this.emnuSelectApi(this.searchApi), this.searchQuery).then(data => {
if (data.rows) {
this.selectList = data.rows
if (this.type === 'forwarder') {
if (this.agentFilter.length === 0) {
this.selectList = data.rows
} else {
const arr = []
this.agentFilter.forEach(item => {
data.rows.forEach(ite => {
if (ite.codeName == item.agentCode) {
arr.push(ite)
}
})
})
this.selectList = arr
}
} else {
this.selectList = data.rows
}
} else {
this.selectList = data
}
this.inLoading = false
})
}
},
@ -580,6 +649,7 @@ export default {
font-weight: 600;
color: #666;
}
.note {
height: 22px;
line-height: 22px;
@ -598,6 +668,7 @@ export default {
border-bottom: 1px dashed #ddd;
margin-bottom: 4px;
}
.voyno,
.etd {
height: 22px;
@ -609,10 +680,12 @@ export default {
.select-content {
display: flex;
.select-input {
flex: 1;
position: relative;
overflow: hidden;
.select_overlap {
cursor: pointer;
height: 32px;
@ -625,11 +698,13 @@ export default {
opacity: 0;
}
}
.copy-btn {
width: 24px;
text-align: center;
color: #bbb;
font-size: 13px;
&:hover {
color: @primary-color;
}

@ -24,7 +24,8 @@
@copy="copyBookingFun"
@addSedList="addSedList"
@removeOrder="removeOrderFun"
@frompre="frompre"></operationArea>
@frompre="frompre">
</operationArea>
<ul class="parent-tabs-box">
<div class="parents-tabs-top">
@ -48,8 +49,7 @@
:inPageLoading="inPageLoading"
:isLockBooking="isLockBooking"
isParent="parent"
@changeDetail="changeDetailFun"
></basicInfo>
@changeDetail="changeDetailFun"></basicInfo>
<mailingInfo
ref="mailingInfo"
:details="bookingDetails"
@ -58,8 +58,7 @@
isParent="parent"
@changeDetail="changeDetailFun"
@spliceMore="spliceMorefun"
@editLineName="editLineNameFun"
>
@editLineName="editLineNameFun">
</mailingInfo>
<cargoInfo
ref="cargoInfo"
@ -164,7 +163,8 @@ import {
getDjyTenantConfig,
GetAllData,
DeleteBookingOrder,
DeleteLetterYard
listYardBwCarrier,
ListAgentByCarrier
} from '@/api/modular/main/BookingLedger'
import { mapActions, mapGetters } from 'vuex'
import rules from './rulesTest'
@ -418,6 +418,7 @@ export default {
hasTableRules: false,
inAddSave: false,
hasHbList: false,
oldBookingDetails: {},
detailsLoadOver: false,
inGoodsSave: false,
ctnDefaultData: {},
@ -613,10 +614,11 @@ export default {
this.inChildLoading = true
const newId = this.$route.query.id ? this.$route.query.id.toString() : ''
if ((Object.keys(this.historyData).includes(`copy-${newId}`) || Object.keys(this.historyData).includes(`copy-${newId}-${this.$route.query.copyId}`)) &&
this.$route.query.isCopy === 'true') {
this.$route.query.isCopy === 'true') {
if (!this.$route.query.copyId) {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
@ -625,6 +627,7 @@ export default {
} else {
const $data = JSON.parse(JSON.stringify(this.historyData[`copy-${newId}-${this.$route.query.copyId}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
@ -662,6 +665,7 @@ export default {
this.inChildLoading = false
}, 500)
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if (
Object.keys(this.historyData).includes(`add-${this.$route.query.addNum}`) &&
@ -669,6 +673,7 @@ export default {
) {
const $data = JSON.parse(JSON.stringify(this.historyData[`add-${this.$route.query.addNum}`]))
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
this.excuteRules = $data.excuteRules
this.excuteRulesType = $data.excuteRulesType
this.isAdd = $data.isAdd
@ -708,6 +713,7 @@ export default {
this.inChildLoading = false
}, 500)
this.isLockBooking = false
this.getFilter()
this.$forceUpdate()
} else if (Object.keys(this.historyData).includes(newId)) {
this.id = this.$route.query.id
@ -747,8 +753,10 @@ export default {
sale: $data.bookingDetails.sale
}
this.bookingDetails = { ...JSON.parse(JSON.stringify(initDetail)), ...copyData }
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
} else {
this.bookingDetails = $data.bookingDetails
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
if (this.topDown) {
this.getDetail()
}
@ -775,18 +783,19 @@ export default {
setTimeout(() => {
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: false })
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
}, 1300);
}, 500)
this.getFilter()
if (!this.bookingDetails.extendState) {
this.isLockBooking = false
this.isLockBooking = false
} else {
this.isLockBooking = this.bookingDetails.extendState.isLockBooking
this.isLockBooking = this.bookingDetails.extendState.isLockBooking
}
this.$forceUpdate()
} else {
@ -813,8 +822,6 @@ export default {
this.$refs.basicInfo.$refs.basicFrom.clearValidate()
this.$refs.mailingInfo.$refs.mailingFrom.clearValidate()
this.$refs.cargoInfo.$refs.cargoFrom.clearValidate()
// this.$refs.billInfo.$refs.billFrom.clearValidate()
// this.$refs.remarksInfo.$refs.remarkFrom.clearValidate()
},
init() {
this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
@ -831,6 +838,7 @@ export default {
this.bookingDetails.carrierid = this.type
this.bookingDetails.carrier = this.type
this.isLockBooking = false
this.getFilter()
this.getDefaultVal()
setTimeout(() => {
if (Object.keys(this.$refs).includes('sedOrder')) {
@ -846,7 +854,6 @@ export default {
},
handleComplete() {
this.checkSaveFun({ type: 'details', hasChange: false })
console.log(111)
},
getDefaultVal() {
getDjyTenantConfig({
@ -855,7 +862,6 @@ export default {
.then(res => {
const defaultData = JSON.parse(res.data.configJson)
this.defaultData = defaultData
console.log(defaultData)
const Fn = item => {
const field = item.field.split('.')
let label = field[1].toLowerCase()
@ -1040,14 +1046,20 @@ export default {
this.hasTableRules = true
}
})
console.log(this.tableRules,this.checkFrom)
this.$forceUpdate()
})
.catch(err => {
console.log(err)
})
},
getFilter() {
ListAgentByCarrier({ carrierCode: this.bookingDetails.carrierid }).then(res => {
this.$store.commit('SET_AgentFilter', res.data)
})
listYardBwCarrier({ carrierCode: this.bookingDetails.carrierid }).then(res => {
this.$store.commit('SET_YardFilter', res.data)
})
},
enmuCarrier(type) {
switch (type) {
case 'CMA':
@ -1101,7 +1113,6 @@ export default {
this.$store.commit('SET_SAVETOPDOWN', false)
})
.catch(err => {
console.log(err)
this.$store.commit('SET_SAVETOPDOWN', false)
})
},
@ -1182,7 +1193,7 @@ export default {
}
const $BookingEDIExt = { ...JSON.parse(JSON.stringify(bookingEDIExt)), ...res.data.bookingEDIExt }
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...newData, ...{ bookingEDIExt: $BookingEDIExt } })
console.log(this.bookingDetails)
this.oldBookingDetails = JSON.parse(JSON.stringify(this.bookingDetails))
if (this.$route.query.isCopy && this.$route.query.copyId) {
const hisData = {
bookingDetails: this.bookingDetails,
@ -1202,6 +1213,7 @@ export default {
this.$set(this.historyData, `copyMore-${this.id}`, hisData)
}
// this.getDefaultVal()
this.getFilter()
this.inPageLoading = false
setTimeout(() => {
setTimeout(() => {
@ -1244,7 +1256,7 @@ export default {
.then(res => {
if (res.success) {
if (res.data.statuslog) {
res.data.statuslog = res.data.statuslog.reverse()
res.data.statuslog = res.data.statuslog.reverse()
}
this.$set(this, 'bookingDetails', { ...this.bookingDetails, ...res.data })
setTimeout(() => {
@ -1375,17 +1387,51 @@ export default {
this.$message.loading({ content: '保存中, 请勿切换页面...' })
this.setSET_SAVEFLAG(true)
_data.ctnInputs.map((item, index) => {
if (!item.ctncode) {
if (this.ctnallList) {
this.ctnallList.forEach(ite => {
if (!item.ctncode) {
if (this.ctnallList) {
this.ctnallList.forEach(ite => {
if (item.ctnall === ite.name) {
item.ctncode = ite.code
}
})
}
}
}
})
this.saveBtnFlag = true
if (this.oldBookingDetails.log) {
delete this.oldBookingDetails.log
}
if (this.oldBookingDetails.goodsStatus) {
delete this.oldBookingDetails.goodsStatus
}
if (_data.log) {
delete _data.log
}
if (_data.goodsStatus) {
delete _data.goodsStatus
}
const changedFields = this.diffObj(this.oldBookingDetails, _data)
if (changedFields) {
if (changedFields.new_val.bookingEDIExt) {
delete changedFields.new_val.bookingEDIExt
}
if (changedFields.new_val.ctnInputs) {
delete changedFields.new_val.ctnInputs
}
if (changedFields.new_val.extendState) {
delete changedFields.new_val.extendState
}
if (changedFields.new_val.item) {
delete changedFields.new_val.item
}
if (changedFields.new_val.hbList) {
delete changedFields.new_val.hbList
}
}
if (changedFields) {
_data.changedFields = Object.keys(changedFields.new_val)
}
console.log(changedFields, this.oldBookingDetails, 'changedFields')
BookingOrderSave(_data)
.then(res => {
if (res.success) {
@ -1563,7 +1609,52 @@ export default {
changeMainTab(e) {
this.mainOrderActiveKey = e
},
diffObj(obj1, obj2) {
function getTypeByObj(obj) {
return Object.prototype.toString.call(obj).match(/^\[object ([a-zA-Z]*)\]$/)[1];
}
function isEmptyObject(obj) {
for (const key in obj) {
return false;
};
return true;
}
if (!obj1 || isEmptyObject(obj1) || !obj2 || isEmptyObject(obj2)) {
return null;
}
const diffRes = {
old_val: {},
new_val: {}
};
for (const k in obj2) {
//
if (getTypeByObj(obj2[k]) === getTypeByObj(obj1[k])) {
// ArrayObject
if (getTypeByObj(obj2[k]) === 'Array' || getTypeByObj(obj2[k]) === 'Object') {
const diffData = this.diffObj(obj1[k], obj2[k]);
if (!isEmptyObject(diffData)) {
diffRes.old_val[k] = diffData.old_val;
diffRes.new_val[k] = diffData.new_val;
}
} else if (obj1[k] !== obj2[k]) { //
diffRes.old_val[k] = obj1[k];
diffRes.new_val[k] = obj2[k];
}
} else {
if ([undefined, null, ''].includes(obj1[k]) && [undefined, null, ''].includes(obj2[k])) {
//
} else {
diffRes.old_val[k] = obj1[k];
diffRes.new_val[k] = obj2[k];
}
}
}
// null
if (isEmptyObject(diffRes.old_val) || isEmptyObject(diffRes.new_val)) {
return null;
}
return diffRes;
},
refreshPage() {
this.init()
this.$refs.rightContent.init()
@ -1638,9 +1729,9 @@ export default {
copyBookingFun() {
if (!this.saveBtnFlag) {
this.$router.push({
name: 'BookingDetail',
query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid }
})
name: 'BookingDetail',
query: { id: this.id, isCopy: true, type: this.bookingDetails.carrierid }
})
}
},
changeTab(e) {
@ -1878,4 +1969,3 @@ export default {
}
}
</style>

@ -8,19 +8,17 @@
ref="basicFrom"
:selfUpdate="true"
:model="details"
:rules="rules"
>
<a-row class="from-box" >
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
:rules="rules">
<a-row class="from-box">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
prop="customername"
label="委托单位"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"
has-feedback
>
<div class="customer-box" >
has-feedback>
<div class="customer-box">
<selectView
type="customername"
:defaultVal="details.customername"
@ -31,27 +29,24 @@
:disabled="BookingLockOrder['CUSTOMERNAME'] && isLockBooking"
:isCopy="true"
@change="getSelectViewRes"
style="flex: 1; margin-top: -4px"
></selectView>
style="flex: 1; margin-top: -4px"></selectView>
<span
class="customer-btn iconfont icon-touxiang"
@click.stop="changeCustomer('select')"
:style="{ paddingRight: '0px' }"
></span>
:style="{ paddingRight: '0px' }"></span>
<span class="customer-btn iconfont icon-jiahao2fill" @click.stop="changeCustomer('add')"></span>
</div>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
prop="thirdPay"
label="第三方"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
>
<div class="customer-box" >
has-feedback>
<div class="customer-box">
<selectView
type="thirdPay"
:defaultVal="details.thirdPay"
@ -62,32 +57,33 @@
:openSearch="true"
:isCopy="true"
@change="getSelectViewRes"
style="flex: 1; margin-top: -4px"
></selectView>
style="flex: 1; margin-top: -4px"></selectView>
</div>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="PO NO"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="pono"
>
<inputView :ishd="BookingLockOrder['pono'] && isLockBooking" type="pono" :parentVal="details.pono" @getInputChange="inputChange" />
prop="pono">
<inputView
:ishd="BookingLockOrder['pono'] && isLockBooking"
type="pono"
:parentVal="details.pono"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="船公司"
prop="carrierid"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
>
has-feedback>
<selectView
ref="carrierid"
type="carrierid"
@ -98,91 +94,104 @@
:disabled="BookingLockOrder['carrier'] && isLockBooking"
:openSearch="false"
@change="getSelectViewRes"
style="flex: 1; margin-top: -4px"
></selectView>
style="flex: 1; margin-top: -4px"></selectView>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="是否占舱"
:labelCol="{ xs: { span: 24 },
sm: { span: 9 },
md: { span: 9 }}"
:wrapperCol="{ xs: { span: 24 },
sm: { span: 12 },
md: { span: 12 }}"
:labelCol="{
xs: { span: 24 },
sm: { span: 9 },
md: { span: 9 }
}"
:wrapperCol="{
xs: { span: 24 },
sm: { span: 12 },
md: { span: 12 }
}"
has-feedback
prop="zhanCangFlag"
>
prop="zhanCangFlag">
<div class="date-box">
<a-radio-group :disabled="BookingLockOrder['zhanCangFlag'] && isLockBooking" size="small" v-model="details.zhanCangFlag">
<a-radio-group
:disabled="BookingLockOrder['zhanCangFlag'] && isLockBooking"
size="small"
v-model="details.zhanCangFlag">
<a-radio size="small" value="是"> </a-radio>
<a-radio size="small" value="否"> </a-radio>
</a-radio-group>
</div>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="订舱编号"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"
has-feedback
prop="custno"
>
<inputView :ishd="BookingLockOrder['custno'] && isLockBooking" type="custno" :parentVal="details.custno" @getInputChange="inputChange" />
prop="custno">
<inputView
:ishd="BookingLockOrder['custno'] && isLockBooking"
type="custno"
:parentVal="details.custno"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="提单号"
prop="mblno"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
>
<inputView type="mblno" :parentVal="details.mblno" :ishd="BookingLockOrder['mblno'] && isLockBooking" @getInputChange="inputChange" />
has-feedback>
<inputView
type="mblno"
:parentVal="details.mblno"
:ishd="BookingLockOrder['mblno'] && isLockBooking"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="分提单号"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="hblno"
>
<inputView :ishd="BookingLockOrder['hblno'] && isLockBooking" type="hblno" :parentVal="details.hblno" @getInputChange="inputChange" />
prop="hblno">
<inputView
:ishd="BookingLockOrder['hblno'] && isLockBooking"
type="hblno"
:parentVal="details.hblno"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="订舱代理"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="forwarder"
>
prop="forwarder">
<selectView
type="forwarder"
:defaultVal="details.forwarder"
:agentFilter="agentFilter"
searchApi="DjyCustomerSuggest"
:disabled="BookingLockOrder['forwarder'] && isLockBooking"
:searchQuery="{ keyword: '', type: 'booking_agent' }"
:showLabel="['shortName']"
:openSearch="true"
@change="getSelectViewRes"
style="flex: 1; margin-top: -4px"
></selectView>
style="flex: 1; margin-top: -4px"></selectView>
</a-form-model-item>
</a-col>
<template v-if="details.carrierid != 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="运费协议号"
@ -197,10 +206,9 @@
md: { span: 14 }
}"
has-feedback
prop="contractno"
>
prop="contractno">
<div class="copy-box">
<template >
<template>
<autoView
class="copy-input"
type="contractno"
@ -208,17 +216,16 @@
:defaultVal="details.contractno"
:dropdownStyle="{ width: '300px' }"
searchApi="getContractno"
:searchQuery="{ queryItem: '', top: 50, laneCName: this.details.lineName,carrier: this.details.carrierid,pod: this.details.destinationid }"
:searchQuery="{ queryItem: '', top: 50, laneCName: this.details.lineName, carrier: this.details.carrierid, pod: this.details.destinationid }"
:showLabel="['contractNo']"
@select="getAutoViewRes"
></autoView>
@select="getAutoViewRes"></autoView>
</template>
</div>
</a-form-model-item>
</a-col>
</template>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="运费协议号"
@ -233,10 +240,9 @@
md: { span: 12 }
}"
has-feedback
prop="contractno"
>
prop="contractno">
<div class="copy-box">
<template >
<template>
<autoView
class="copy-input"
type="contractno"
@ -244,55 +250,59 @@
:disabled="BookingLockOrder['contractno'] && isLockBooking"
:dropdownStyle="{ width: '300px' }"
searchApi="getContractno"
:searchQuery="{ queryItem: '', top: 50, laneCName: this.details.lineName,carrier: this.details.carrierid,pod: this.details.destinationid }"
:searchQuery="{ queryItem: '', top: 50, laneCName: this.details.lineName, carrier: this.details.carrierid, pod: this.details.destinationid }"
:showLabel="['contractNo']"
@select="getAutoViewRes"
></autoView>
@select="getAutoViewRes"></autoView>
</template>
</div>
</a-form-model-item>
</a-col>
</template>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="EP号"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"
has-feedback
prop="epCode"
>
<inputView :ishd="BookingLockOrder['epCode'] && isLockBooking" type="epCode" :parentVal="details.epCode" @getInputChange="inputChange" />
prop="epCode">
<inputView
:ishd="BookingLockOrder['epCode'] && isLockBooking"
type="epCode"
:parentVal="details.epCode"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
<template v-if="['VOLTA', 'WHL', 'CSL', 'MSC','VOL'].includes(details.carrierid)">
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="{span: '4-8'}">
<template v-if="['VOLTA', 'WHL', 'CSL', 'MSC', 'VOL'].includes(details.carrierid)">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="{ span: '4-8' }">
<a-form-model-item
class="from-label"
label="真提单号"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"
has-feedback
prop="tmblno"
>
<inputView :ishd="BookingLockOrder['tmblno'] && isLockBooking" type="tmblno" :parentVal="details.tmblno" @getInputChange="inputChange" />
prop="tmblno">
<inputView
:ishd="BookingLockOrder['tmblno'] && isLockBooking"
type="tmblno"
:parentVal="details.tmblno"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
</a-row>
<div class="from-box2">
<a-row >
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="5">
<a-row>
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="5">
<a-form-model-item
class="from-label"
label="开船日期"
:labelCol="labelCol4"
:wrapperCol="wrapperCol4"
has-feedback
prop="etd"
>
prop="etd">
<div class="date-box">
<datePickerView
class="date-picker"
@ -301,29 +311,27 @@
type="etd"
format="YYYY-MM-DD"
@dateChange="dateChangeFun"
style="margin-top: -5px"
></datePickerView>
style="margin-top: -5px"></datePickerView>
<span class="week" v-if="etdWeek && etdWeek !== 'NaN'">W{{ etdWeek || '--' }}</span>
</div>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="6">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="6">
<a-form-model-item
class="from-label"
label="船名"
:labelCol=" {
:labelCol="{
xs: { span: 24 },
sm: { span: 4 },
md: { span: 4 }
}"
:wrapperCol=" {
:wrapperCol="{
xs: { span: 24 },
sm: { span: 20 },
md: { span: 20 }
}"
has-feedback
prop="vessel"
>
prop="vessel">
<div class="copy-box">
<selectView
class="copy-input"
@ -339,80 +347,91 @@
}"
:showLabel="['vessel']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes"></selectView>
</div>
</a-form-model-item>
</a-col>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="8" :lg="{span: '4-8'}" :xl="4">
<a-col :xs="12" :sm="12" :md="8" :lg="{ span: '4-8' }" :xl="4">
<a-form-model-item
class="from-label"
label="内部航次"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="voynoinner"
>
prop="voynoinner">
<!-- 内部航次暂无接口 暂时改为输入框 -->
<inputView :ishd="true" type="voynoinner" :parentVal="details.voynoinner" @getInputChange="inputChange" />
<inputView
:ishd="true"
type="voynoinner"
:parentVal="details.voynoinner"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
<template v-else>
<a-col :xs="12" :sm="12" :md="8" :lg="{span: '4-8'}" :xl="4">
<a-col :xs="12" :sm="12" :md="8" :lg="{ span: '4-8' }" :xl="4">
<a-form-model-item
class="from-label"
label="内部航次"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="voynoinner"
>
prop="voynoinner">
<!-- 内部航次暂无接口 暂时改为输入框 -->
<inputView :ishd="true" type="voynoinner" :parentVal="details.voynoinner" @getInputChange="inputChange" />
<inputView
:ishd="true"
type="voynoinner"
:parentVal="details.voynoinner"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
<template v-if="details.carrierid === 'ESL'">
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="4">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="4">
<a-form-model-item
class="from-label"
label="航次"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="voyno"
>
prop="voyno">
<inputView :ishd="true" type="voyno" :parentVal="details.voyno" @getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
<template v-else>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="4">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="4">
<a-form-model-item
class="from-label"
label="海关航次"
:labelCol="labelCol2"
:wrapperCol="wrapperCol2"
has-feedback
prop="voyno"
>
<inputView :ishd="true" ref="voyno" type="voyno" :parentVal="details.voyno" @getInputChange="inputChange" />
prop="voyno">
<inputView
:ishd="true"
ref="voyno"
type="voyno"
:parentVal="details.voyno"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</template>
<a-col :xs="12" :sm="12" :md="12" :lg="{span: '4-8'}" :xl="4">
<a-col :xs="12" :sm="12" :md="12" :lg="{ span: '4-8' }" :xl="4">
<a-form-model-item
class="from-label"
label="船司航线"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="lanename"
>
prop="lanename">
<!-- 航线暂无接口 暂时改为输入框-->
<inputView :ishd="BookingLockOrder['lanename'] && isLockBooking" type="lanename" :parentVal="details.lanename" @getInputChange="inputChange" />
<inputView
:ishd="BookingLockOrder['lanename'] && isLockBooking"
type="lanename"
:parentVal="details.lanename"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</a-row>
@ -424,8 +443,7 @@
:labelCol="userLabelCol"
:wrapperCol="userWrapperCol"
has-feedback
prop="sale"
>
prop="sale">
<selectView
type="sale"
:disabled="true"
@ -434,8 +452,8 @@
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
@ -445,8 +463,7 @@
:labelCol="userLabelCol1"
:wrapperCol="userWrapperCol1"
has-feedback
prop="custservice"
>
prop="custservice">
<selectView
type="custservice"
:defaultVal="details.custservice"
@ -455,8 +472,8 @@
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
@ -466,8 +483,7 @@
:labelCol="userLabelCol1"
:wrapperCol="userWrapperCol1"
has-feedback
prop="op"
>
prop="op">
<selectView
type="op"
:defaultVal="details.op"
@ -476,8 +492,7 @@
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes"></selectView>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
@ -487,8 +502,7 @@
:labelCol="userLabelCol1"
:wrapperCol="userWrapperCol1"
has-feedback
prop="doc"
>
prop="doc">
<selectView
type="doc"
:defaultVal="details.doc"
@ -497,8 +511,7 @@
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes"></selectView>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
@ -508,8 +521,7 @@
:labelCol="userLabelCol"
:wrapperCol="userWrapperCol"
has-feedback
prop="route"
>
prop="route">
<selectView
type="route"
:defaultVal="details.route"
@ -519,8 +531,7 @@
:showLabel="['name']"
:openSearch="true"
:isCopy="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes"></selectView>
</a-form-model-item>
</a-col>
<a-col :xs="12" :sm="12" :md="12" :lg="8" :xl="4">
@ -530,8 +541,7 @@
:labelCol="userLabelCol"
:wrapperCol="userWrapperCol"
has-feedback
prop="lineManage"
>
prop="lineManage">
<selectView
type="lineManage"
:defaultVal="details.lineManage"
@ -540,8 +550,8 @@
:searchQuery="{ name: '' }"
:showLabel="['name']"
:openSearch="true"
@change="getSelectViewRes"
></selectView>
@change="getSelectViewRes">
</selectView>
</a-form-model-item>
</a-col>
</a-row>
@ -553,9 +563,12 @@
:labelCol="labelCol3"
:wrapperCol="wrapperCol3"
has-feedback
prop="czRemark"
>
<inputView :ishd="BookingLockOrder['czRemark'] && isLockBooking" type="czRemark" :parentVal="details.czRemark" @getInputChange="inputChange" />
prop="czRemark">
<inputView
:ishd="BookingLockOrder['czRemark'] && isLockBooking"
type="czRemark"
:parentVal="details.czRemark"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="24" :sm="9" :md="9" :lg="9" :xl="8">
@ -565,9 +578,12 @@
:labelCol="labelCol3"
:wrapperCol="wrapperCol3"
has-feedback
prop="dzRemark"
>
<inputView :ishd="BookingLockOrder['dzRemark'] && isLockBooking" type="dzRemark" :parentVal="details.dzRemark" @getInputChange="inputChange" />
prop="dzRemark">
<inputView
:ishd="BookingLockOrder['dzRemark'] && isLockBooking"
type="dzRemark"
:parentVal="details.dzRemark"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
<a-col :xs="24" :sm="6" :md="6" :lg="6" :xl="8">
@ -577,9 +593,12 @@
:labelCol="labelCol3"
:wrapperCol="wrapperCol3"
has-feedback
prop="shenQingXiangShi"
>
<inputView :ishd="BookingLockOrder['shenQingXiangShi'] && isLockBooking" type="shenQingXiangShi" :parentVal="details.shenQingXiangShi" @getInputChange="inputChange" />
prop="shenQingXiangShi">
<inputView
:ishd="BookingLockOrder['shenQingXiangShi'] && isLockBooking"
type="shenQingXiangShi"
:parentVal="details.shenQingXiangShi"
@getInputChange="inputChange" />
</a-form-model-item>
</a-col>
</a-row>
@ -594,8 +613,7 @@
:confirmLoading="customerModelconfirm"
:maskClosable="false"
@ok="handleModelSubmit"
@cancel="handleModelCancel"
>
@cancel="handleModelCancel">
<template slot="footer">
<a-button key="back" @click="handleModelCancel"> </a-button>
</template>
@ -618,8 +636,7 @@
rowKeyFieldName="rowKey"
:rowStyleOption="rowStyleOption"
:checkbox-option="checkboxOption"
:clipboard-option="clipboardOption"
/>
:clipboard-option="clipboardOption" />
<div class="table-no-data" v-if="tableData.length == 0"></div>
</div>
</template>
@ -637,7 +654,9 @@ import {
DjyCustomerdetail,
BookingOrderContactSavebatch,
BookingOrderContactPage,
DjyCustomerContacts
DjyCustomerContacts,
listYardBwCarrier,
ListAgentByCarrier
} from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
let timer
@ -681,6 +700,12 @@ export default {
isLockBooking: {
type: Boolean,
default: false
},
agentFilter: {
type: Array,
default: () => {
return []
}
}
},
data() {
@ -760,7 +785,7 @@ export default {
},
cellAutofillOption: true,
editOption: {
cellValueChange: ({ row, column }) => {}
cellValueChange: ({ row, column }) => { }
},
checkboxOption: {
hideSelectAll: false,
@ -1217,6 +1242,12 @@ export default {
} else if (type === 'carrierid') {
this.details.carrier = res.enName || ''
this.details.carrierid = res.code || ''
ListAgentByCarrier({ carrierCode: this.details.carrierid }).then(res => {
this.$store.commit('SET_AgentFilter', res.data)
})
listYardBwCarrier({ carrierCode: this.details.carrierid }).then(res => {
this.$store.commit('SET_YardFilter', res.data)
})
setTimeout(() => {
this.$refs.vesselView.handleSearch('')
}, 600)
@ -1229,21 +1260,23 @@ export default {
this.details.vessel = res.vessel || ''
this.details.atd = res.atd || ''
this.details.etd = res.etd || ''
this.details.closingdate = res.closingDate || ''
this.details.closedocdate = res.closeDocTime || ''
if (Object.keys(res).length == 0) {
this.details.voyno = ''
this.details.voynoinner = ''
}
if (res.voyno) {
if (res.voyno.includes('1MA')) {
this.details.voyno = res.voyno.replace('1MA', '') || ''
} else {
if (res.voyno.includes('1NC')) {
this.details.voyno = res.voyno.replace('1NC', '') || ''
this.details.voyno = res.voyno.replace('1MA', '') || ''
} else {
this.details.voyno = res.voyno || ''
if (res.voyno.includes('1NC')) {
this.details.voyno = res.voyno.replace('1NC', '') || ''
} else {
this.details.voyno = res.voyno || ''
}
}
}
}
this.details.voynoinner = res.voynoInside || ''
} else if (type === 'shipagency') {
this.details.shipagency = res.name || ''
@ -1289,6 +1322,7 @@ export default {
/deep/ .ant-form-explain {
display: none !important;
}
/deep/ .ant-form-item-children-icon .anticon-check-circle {
display: none;
}
@ -1296,10 +1330,12 @@ export default {
<style lang="less" scoped>
@import url('../index.less');
@import url('../style/basicInfo.less');
.ant-col-xl-4-8{
.ant-col-xl-4-8 {
width: 20%;
}
/deep/ .ant-card-body{
padding-left: 10px !important;
}
/deep/ .ant-card-body {
padding-left: 10px !important;
}
</style>

@ -478,7 +478,7 @@
type="trucker"
:defaultVal="details.trucker"
searchApi="DjyCustomerpage"
:disabled="true"
:disabled="BookingLockOrder['trucker'] && isLockBooking"
:searchQuery="{ SearchValue: '', PropString: 'fleet' }"
:showLabel="['shortName']"
:openSearch="true"

@ -28,13 +28,31 @@
<button @click="openModel('cutOff')" :style="{ marginLeft: '4px' }">
<span class="iconfont icon-daibanshixiang"></span>截单
</button>
<button @click="openModel('vgm')"><span class="iconfont icon-dingdan"></span>VGM</button>
<a-popconfirm
title="您当前未选择服务项目,是否继续操作?"
:visible="visible1"
ok-text="是"
cancel-text="否"
@visibleChange="handleVisibleChange1"
@confirm="openModel('vgm')"
>
<button ><span class="iconfont icon-dingdan"></span>VGM</button>
</a-popconfirm>
<button @click="openModel('trace')">
<span class="iconfont icon-yunshu1" style="font-size:18px;"></span>运踪
</button>
<button @click="openPreOrderFun">
<span class="iconfont icon-yunshu1" style="font-size:18px;"></span>舱单
</button>
<a-popconfirm
title="您当前未选择服务项目,是否继续操作?"
:visible="visible"
ok-text="是"
cancel-text="否"
@visibleChange="handleVisibleChange"
@confirm="openPreOrderFun"
>
<button >
<span class="iconfont icon-yunshu1" style="font-size:18px;"></span>舱单
</button>
</a-popconfirm>
<button @click="openModel('paper')">
<span class="iconfont icon-zhizhishu" style="font-size:18px;"></span>下货纸
</button>
@ -1157,6 +1175,7 @@ export default {
id: this.$route.query.id,
labelCol: { span: 6 },
voltaData: [],
visible1: false,
voltaColumns: [
{
dataIndex: 'sNo',
@ -1538,14 +1557,20 @@ export default {
],
traceValue: [],
traceModalVisible: false,
visible: false,
cateCode: '',
spinning: false,
yardSelectData: null,
initCabinSendData: []
initCabinSendData: [],
serviceItem: []
}
},
mounted() {
this.BCvData = [...this.CvData]
this.serviceItem = []
this.$bus.$on('bookingServiceItem', val => {
this.serviceItem = val
})
},
watch: {
scale() {
@ -1734,6 +1759,40 @@ export default {
}
})
},
handleVisibleChange(visible) {
if (!visible) {
this.visible = false;
return;
}
const arr = []
this.serviceItem.forEach(item => {
if (item.isYield) {
arr.push(1)
}
})
if (arr.length === 0) {
this.visible = true;
} else {
this.openPreOrderFun()
}
},
handleVisibleChange1(visible) {
if (!visible) {
this.visible1 = false;
return;
}
const arr = []
this.serviceItem.forEach(item => {
if (item.isYield) {
arr.push(1)
}
})
if (arr.length === 0) {
this.visible1 = true;
} else {
this.openModel('vgm')
}
},
getSelectViewRes({ type, res }) {
if (type === 'customername') {
this.hisSearch.customername = res.shortName || ''

@ -153,7 +153,7 @@
<div v-if="changeGoods && !serive.isBr" class="goods-box">
<div class="goods-content" :class="{ active: serive.isYield }" @click="saveGoodsStatus(serive)">
<!-- <a-icon type="check-circle" /> -->
<a-icon v-if="serive.isYield" class="serve-icon" type="check-circle" theme="filled" />
<a-icon v-if="serive.isYield" class="serve-icon" type="check-circle" theme="filled" />
<div v-else class="round">
</div>
<div class="showName">{{ serive.showName }}</div>
@ -761,6 +761,7 @@ export default {
GetSeryiceProjectList(data).then(res => {
if (res.data.succ) {
this.bookingServiceItem = res.data.ext
this.$bus.$emit('bookingServiceItem', res.data.ext)
} else {
this.$message.error(res.data.msg)
}

@ -5,16 +5,16 @@
<a-col :span="showSecNav ? 5 : 0" v-if="showSecNav">
<div class="sed-order-list">
<div class="sed-order-title">
<i class="iconfont icon-liebiao"></i><span class="tit">分提单列表</span
><span class="right" @click="openNav"></span>
<i class="iconfont icon-liebiao"></i><span class="tit">分提单列表</span><span
class="right"
@click="openNav">收起</span>
</div>
<div class="sec-order">
<div
class="sed-order-label"
v-for="(sedDetail, sindex) in sedOrderList"
:key="sindex"
:class="{ active: editIndex === sindex }"
>
:class="{ active: editIndex === sindex }">
<div class="left" @click.stop="changeOrder(sindex)">
<i class="iconfont icon-dingdan"></i>分单{{ sindex + 1 }}: {{ sedDetail.hblno || '请填写分单号' }}
</div>
@ -24,8 +24,7 @@
ok-text="是"
cancel-text="否"
@confirm.stop="removeSedOrderFun(sedDetail, sindex)"
@cancel="cancelRemove"
>
@cancel="cancelRemove">
<span class="remove-btn iconfont icon-shanchu1"></span>
</a-popconfirm>
</div>
@ -44,8 +43,8 @@
:class="scrollTop < 100 ? 'normal-nav' : 'fixed-nav'"
@save="saveFun"
@copy="copyFun"
@remove="removeFun"
></sedOperationArea>
@remove="removeFun">
</sedOperationArea>
<ul class="sec-parent-tabs-box">
<div class="parents-tabs-top">
<li @click="changeParentTabs('1')" :class="{ active: mainOrderActiveKey === '1' }">
@ -69,8 +68,7 @@
:ishd="true"
:inSave="inSave"
isParent="child"
@changeDetail="changeDetailFun"
></basicInfo>
@changeDetail="changeDetailFun"></basicInfo>
<!-- 收发通信息 -->
<mailingInfo
ref="mailingInfo"
@ -79,8 +77,7 @@
:inSave="inSave"
:ishd="true"
isParent="child"
@changeDetail="changeDetailFun"
></mailingInfo>
@changeDetail="changeDetailFun"></mailingInfo>
<!-- 货物信息 -->
<cargoInfo
ref="cargoInfo"
@ -89,8 +86,7 @@
:inSave="inSave"
isParent="child"
@pkgsEnCapital="pkgsEnCapitalFun"
@changeDetail="changeDetailFun"
></cargoInfo>
@changeDetail="changeDetailFun"></cargoInfo>
<!-- 箱型 -->
<goodsTable
ref="goodsTable"
@ -113,8 +109,7 @@
:inSave="inSave"
isParent="child"
@changeDetail="changeDetailFun"
v-if="!inPageLoading"
></ediMore>
v-if="!inPageLoading"></ediMore>
</div>
</div>
</ul>
@ -379,6 +374,7 @@ export default {
editDetails: null,
editIndex: 0,
showSecNav: true,
oldBookingDetails: {},
inSecLoad: false,
mainOrderActiveKey: '1',
basicRules: rules.basicRules,
@ -396,11 +392,11 @@ export default {
},
watch: {
parSedOrderList: {
handler(nval, oval) {},
handler(nval, oval) { },
deep: true
},
editDetails: {
handler(nval, oval) {},
handler(nval, oval) { },
deep: true
},
'$route.query': {
@ -424,7 +420,7 @@ export default {
this.checkFromInit()
}
},
created() {},
created() { },
mounted() {
this.checkFromInit()
},
@ -446,6 +442,7 @@ export default {
$data.bookingEDIExt = bookingEDIExt
}
this.editDetails = $data
this.oldBookingDetails = JSON.parse(JSON.stringify($data))
setTimeout(() => {
this.$refs.goodsTable.init()
}, 1000)
@ -454,6 +451,7 @@ export default {
}, 2000)
} else {
this.editDetails = JSON.parse(JSON.stringify(sedDetail))
this.oldBookingDetails = JSON.parse(JSON.stringify(sedDetail))
setTimeout(() => {
this.inSecLoad = false
}, 2000)
@ -465,6 +463,52 @@ export default {
pkgsEnCapitalFun(data) {
this.bookingDetails.totalno = data
},
diffObj(obj1, obj2) {
function getTypeByObj(obj) {
return Object.prototype.toString.call(obj).match(/^\[object ([a-zA-Z]*)\]$/)[1];
}
function isEmptyObject(obj) {
for (const key in obj) {
return false;
};
return true;
}
if (!obj1 || isEmptyObject(obj1) || !obj2 || isEmptyObject(obj2)) {
return null;
}
const diffRes = {
old_val: {},
new_val: {}
};
for (const k in obj2) {
//
if (getTypeByObj(obj2[k]) === getTypeByObj(obj1[k])) {
// ArrayObject
if (getTypeByObj(obj2[k]) === 'Array' || getTypeByObj(obj2[k]) === 'Object') {
const diffData = this.diffObj(obj1[k], obj2[k]);
if (!isEmptyObject(diffData)) {
diffRes.old_val[k] = diffData.old_val;
diffRes.new_val[k] = diffData.new_val;
}
} else if (obj1[k] !== obj2[k]) { //
diffRes.old_val[k] = obj1[k];
diffRes.new_val[k] = obj2[k];
}
} else {
if ([undefined, null, ''].includes(obj1[k]) && [undefined, null, ''].includes(obj2[k])) {
//
} else {
diffRes.old_val[k] = obj1[k];
diffRes.new_val[k] = obj2[k];
}
}
}
// null
if (isEmptyObject(diffRes.old_val) || isEmptyObject(diffRes.new_val)) {
return null;
}
return diffRes;
},
checkFromInit() {
Object.keys(this.basicRules).map((item, index) => {
@ -696,6 +740,22 @@ export default {
item.id = 0
})
}
const changedFields = this.diffObj(this.oldBookingDetails, data)
if (changedFields) {
if (changedFields.new_val.bookingEDIExt) {
delete changedFields.new_val.bookingEDIExt
}
if (changedFields.new_val.ctnInputs) {
delete changedFields.new_val.ctnInputs
}
if (changedFields.new_val.extendState) {
delete changedFields.new_val.extendState
}
}
if (changedFields) {
data.changedFields = Object.keys(changedFields.new_val)
}
console.log(changedFields, this.oldBookingDetails, 'changedFields')
BookingOrderSave(data)
.then(res => {
if (res.success) {

File diff suppressed because it is too large Load Diff

@ -508,6 +508,14 @@ export default {
showHeaderOverflow: true,
slots: { default: 'fangdan' }
},
{
field: 'txxp',
label: 'txxp',
width: 190,
title: '提箱小票',
showHeaderOverflow: true,
slots: { default: 'txxp' }
},
{ field: 'startETA', label: 'startETA', width: 120, title: '起始港ETA', showHeaderOverflow: true, sortable: true },
{ field: 'startATA', label: 'startATA', width: 120, title: '起始港ATA', showHeaderOverflow: true, sortable: true }
],

@ -11,6 +11,11 @@
<a-input allow-clear v-model="SearchContent" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item :label="`创建人`">
<a-input allow-clear v-model="createdUserName" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="删除时间">
<a-range-picker
@ -268,6 +273,7 @@ export default {
formRes: {},
searchData: {},
formAllData: null,
createdUserName:'',
formMoreData: null,
formBtnCol: 8,
delDate: [],
@ -917,6 +923,7 @@ export default {
},
tableRefresh() {
this.formRes.MBLNO = this.SearchContent
this.formRes.createdUserName = this.createdUserName
const data = { ...this.formRes }
this.searchData = JSON.parse(JSON.stringify(data))
if (this.delDate) {
@ -964,6 +971,7 @@ export default {
tableReset() {
this.SearchContent = ''
this.createdUserName = ''
this.delDate = []
},

@ -0,0 +1,426 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div
class="table-page-search-wrapper"
v-if="hasPerm('BookingTemplate:page')"
:class="advanced ? 'Open' : 'Close'">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="船公司:">
<a-select v-model="queryParam.carrierCode">
<a-select-option
v-for="(item, index) in carrierList"
:key="index"
:value="item.code">
{{ item.cnName }}/{{ item.code }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="订舱代理:">
<a-select
show-search
:filter-option="false"
@search="handleSearch"
v-model="queryParam.agentCode">
<a-select-option v-for="(item, index) in agentList" :key="index" :value="item.codeName">{{
item.shortName }}</a-select-option>
</a-select>
</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="getList"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
</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="handleOpenAdd"><i class="iconfont icon-jiahao2fill"></i>新建</div>
</div>
</template>
</vxe-toolbar>
<vxe-table
:data="loadData"
stripe
resizable
round
:loading="loading"
height="546"
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">
</vxe-column>
<vxe-column title="操作" fixed="right" align="center">
<template #default="{ row }">
<a-icon
style="margin-right: 10px;cursor: pointer;"
type="form"
@click="handleEdit(row)"
:style="{ color: '#13c2c2' }" />
<a-popconfirm title="确定删除吗?" ok-text="" cancel-text="" @confirm="handleDel(row)">
<a-icon style="cursor: pointer;" type="delete" :style="{ color: '#13c2c2' }" />
</a-popconfirm>
</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>
</a-card>
<a-modal :title="title" :width="800" :visible="addFlag" @ok="handleSubimt" @cancel="addFlag = false">
<div>
<a-spin :spinning="addLoad">
<span>船公司</span>
<a-select show-search :filter-option="filterOption" v-model="form.carrierCode" style="width: 200px">
<a-select-option v-for="(item, index) in carrierList" :key="index" :value="item.code">{{ item.cnName
}}/{{ item.code }}</a-select-option>
</a-select>
<span style="margin-left: 20px;">订舱代理</span>
<a-select
show-search
:filter-option="false"
@search="handleSearch"
v-model="form.agentCode"
style="width: 200px">
<a-select-option v-for="(item, index) in agentList" :key="index" :value="item.codeName">{{ item.shortName }}</a-select-option>
</a-select>
</a-spin>
</div>
</a-modal>
</div>
</template>
<script>
import { pageAgent, saveAgent, deleteAgent } from '@/api/modular/main/CommondbCtnlist'
import { DjyCustomerSuggest } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex'
export default {
data() {
return {
queryParam: {
PageNo: 1,
PageSize: 10,
totalCount: 0
},
advanced: false,
loading: false,
title: '',
form: {
carrierCode: '',
yardCode: ''
},
loadData: [],
addLoad: false,
agentList: [],
columns: [
{
title: '船公司',
align: 'center',
dataIndex: 'carrier'
},
{
title: '船公司代码',
align: 'center',
dataIndex: 'carrierCode'
},
{
title: '订舱代理',
align: 'center',
dataIndex: 'agent'
},
{
title: '订舱代理代码',
align: 'center',
dataIndex: 'agentCode'
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createdTime'
},
{
title: '更新时间',
align: 'center',
dataIndex: 'updatedTime'
},
{
title: '创建者名称',
align: 'center',
dataIndex: 'createdUserName'
},
{
title: '修改者名称',
align: 'center',
dataIndex: 'updatedUserName'
}
],
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
addFlag: false
}
},
created() { },
computed: {
...mapGetters([
'carrierList', 'yardList'
])
},
mounted() {
this.getList()
DjyCustomerSuggest({ keyword: '', type: 'booking_agent' }).then(res => {
this.agentList = res.data.rows
})
},
methods: {
handlePageChange1({ currentPage, pageSize }) {
this.queryParam.PageNo = currentPage
this.queryParam.PageSize = pageSize
this.getList()
},
handleSearch(e) {
DjyCustomerSuggest({ keyword: e, type: 'booking_agent' }).then(res => {
this.agentList = res.data.rows
})
},
handleOpenAdd() {
this.addFlag = true
this.title = '新增对应关系'
this.form = {}
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
handleDel(row) {
const data = {
id: row.id
}
deleteAgent(data).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.message)
}
})
},
handleEdit(row) {
this.addFlag = true
this.title = '编辑对应关系'
this.form = row
},
handleSubimt() {
if (this.form.carrierCode && this.form.agentCode) {
let carrier = ''
let agent = ''
this.carrierList.forEach(item => {
if (item.code === this.form.carrierCode) {
carrier = item.cnName
}
})
this.agentList.forEach(item => {
if (item.codeName === this.form.agentCode) {
agent = item.shortName
}
})
const data = {
agentCode: this.form.agentCode,
carrierCode: this.form.carrierCode,
agent: agent,
carrier: carrier
}
if (this.form.id) {
data.id = this.form.id
}
this.addLoad = true
saveAgent(data).then(res => {
if (res.code == 200) {
this.$message.success('操作成功')
this.addFlag = false
this.getList()
} else {
this.$message.error(res.message)
}
this.addLoad = false
})
} else {
this.$message.warning('请先选择船公司与订舱代理')
}
},
init() {
this.queryParam.yardCode = ''
this.queryParam.carrierCode = ''
},
getList() {
this.loading = true
pageAgent(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
})
}
}
}
</script>
<style lang="less">
.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>

@ -0,0 +1,411 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div
class="table-page-search-wrapper"
v-if="hasPerm('BookingTemplate:page')"
:class="advanced ? 'Open' : 'Close'">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="船公司:">
<a-select v-model="queryParam.carrierCode">
<a-select-option
v-for="(item, index) in carrierList"
:key="index"
:value="item.code">
{{ item.cnName }}/{{ item.code }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="场站:">
<a-select v-model="queryParam.yardCode">
<a-select-option
v-for="(item, index) in yardList"
:key="index"
:value="item.code">{{ item.name }}/{{ item.showCode }}</a-select-option>
</a-select>
</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="getList"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
</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="handleOpenAdd"><i class="iconfont icon-jiahao2fill"></i>新建</div>
</div>
</template>
</vxe-toolbar>
<vxe-table
:data="loadData"
stripe
resizable
round
:loading="loading"
height="546"
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">
</vxe-column>
<vxe-column title="操作" fixed="right" align="center">
<template #default="{ row }">
<a-icon
style="margin-right: 10px;cursor: pointer;"
type="form"
@click="handleEdit(row)"
:style="{ color: '#13c2c2' }" />
<a-popconfirm title="确定删除吗?" ok-text="" cancel-text="" @confirm="handleDel(row)">
<a-icon style="cursor: pointer;" type="delete" :style="{ color: '#13c2c2' }" />
</a-popconfirm>
</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>
</a-card>
<a-modal :title="title" :width="800" :visible="addFlag" @ok="handleSubimt" @cancel="addFlag = false">
<div>
<a-spin :spinning="addLoad">
<span>船公司</span>
<a-select show-search :filter-option="filterOption" v-model="form.carrierCode" style="width: 200px">
<a-select-option v-for="(item, index) in carrierList" :key="index" :value="item.code">{{ item.cnName
}}/{{ item.code }}</a-select-option>
</a-select>
<span style="margin-left: 20px;">场站</span>
<a-select show-search :filter-option="filterOption" v-model="form.yardCode" style="width: 200px">
<a-select-option v-for="(item, index) in yardList" :key="index" :value="item.code">{{ item.name
}}/{{
item.showCode }}</a-select-option>
</a-select>
</a-spin>
</div>
</a-modal>
</div>
</template>
<script>
import { pageYard, saveYard, deleteYard } from '@/api/modular/main/CommondbCtnlist'
import { mapGetters } from 'vuex'
export default {
data() {
return {
queryParam: {
PageNo: 1,
PageSize: 10,
totalCount: 0
},
advanced: false,
loading: false,
title: '',
form: {
carrierCode: '',
yardCode: ''
},
loadData: [],
addLoad: false,
columns: [
{
title: '船公司',
align: 'center',
dataIndex: 'carrier'
},
{
title: '船公司代码',
align: 'center',
dataIndex: 'carrierCode'
},
{
title: '场站',
align: 'center',
dataIndex: 'yard'
},
{
title: '场站代码',
align: 'center',
dataIndex: 'yardCode'
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createdTime'
},
{
title: '更新时间',
align: 'center',
dataIndex: 'updatedTime'
},
{
title: '创建者名称',
align: 'center',
dataIndex: 'createdUserName'
},
{
title: '修改者名称',
align: 'center',
dataIndex: 'updatedUserName'
}
],
tstyle: { 'padding-top': '12px', 'padding-bottom': '0px', 'margin-bottom': '10px' },
addFlag: false
}
},
created() { },
computed: {
...mapGetters([
'carrierList', 'yardList'
])
},
mounted() {
this.getList()
},
methods: {
handlePageChange1({ currentPage, pageSize }) {
this.queryParam.PageNo = currentPage
this.queryParam.PageSize = pageSize
this.getList()
},
handleOpenAdd() {
this.addFlag = true
this.title = '新增对应关系'
this.form = {}
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
handleDel(row) {
const data = {
id: row.id
}
deleteYard(data).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.getList()
} else {
this.$message.error(res.message)
}
})
},
handleEdit(row) {
this.addFlag = true
this.title = '编辑对应关系'
this.form = row
},
handleSubimt() {
if (this.form.carrierCode && this.form.yardCode) {
let carrier = ''
let yard = ''
this.carrierList.forEach(item => {
if (item.code === this.form.carrierCode) {
carrier = item.cnName
}
})
this.yardList.forEach(item => {
if (item.code === this.form.yardCode) {
yard = item.name
}
})
const data = {
yardCode: this.form.yardCode,
carrierCode: this.form.carrierCode,
yard: yard,
carrier: carrier
}
if (this.form.id) {
data.id = this.form.id
}
this.addLoad = true
saveYard(data).then(res => {
if (res.code == 200) {
this.$message.success('操作成功')
this.addFlag = false
this.getList()
} else {
this.$message.error(res.message)
}
this.addLoad = false
})
} else {
this.$message.warning('请先选择船公司与场站')
}
},
init() {
this.queryParam.yardCode = ''
this.queryParam.carrierCode = ''
},
getList() {
this.loading = true
pageYard(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
})
}
}
}
</script>
<style lang="less">
.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>

@ -116,11 +116,12 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-form-item label="截单时间" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
show-time
placeholder="请选择截单时间"
v-decorator="['closeDocTime']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
@ -195,10 +196,6 @@
</a-col>
<a-col :span="12">
<a-form-item label="默认场站" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<!-- <a-input
placeholder="请输入默认场站"
v-decorator="['yard', { rules: [{ required: true, message: '请输入默认场站!' }] }]"
/> -->
<a-select
placeholder="请选择默认场站"
v-decorator="['yardCode']"
@ -216,6 +213,16 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>

@ -116,11 +116,12 @@
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-form-item label="截单时间" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
placeholder="请选择截单时间"
show-time
v-decorator="['closeDocTime']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
@ -213,6 +214,16 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
@ -287,7 +298,8 @@ export default {
yardCode: record.yardCode,
atd: record.atd,
carrierid: record.carrierid,
voynoInside: record.voynoInside
voynoInside: record.voynoInside,
closeDocTime: record.closeDocTime
})
console.log(this.form.getFieldsValue())
}, 100)

@ -260,6 +260,12 @@ export default {
dataIndex: 'yard',
width: 150
},
{
title: '截单时间',
align: 'center',
dataIndex: 'closeDocTime',
width: 150
},
{
title: '创建人',
align: 'center',

@ -10,109 +10,111 @@
<a-input
placeholder="请输入原密码"
type="password"
v-decorator="['password', {rules: [{required: true, message: '请输入原密码!'}]}]" />
v-decorator="['password', { rules: [{ required: true, message: '请输入原密码!' }] }]" />
</a-form-item>
<a-form-item label="新密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入新密码"
type="password"
v-decorator="['newPassword', {rules: [{required: true, min: 5, message: '请输入至少五个字符的账号!'},{
validator: validateToNextPassword,
},]}]" />
v-decorator="['newPassword', {rules: [{required: true, message: '请输入新密码!'},{validator: validateToNextPassword},]}]"
/>
</a-form-item>
<a-form-item label="重复新密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请再次输入新密码"
type="password"
v-decorator="['confirm', {rules: [{required: true, message: '请再次输入新密码!'},
{
validator: compareToFirstPassword,
}]}]" />
v-decorator="['confirm', {
rules: [{ required: true, message: '请再次输入新密码!' },
{
validator: compareToFirstPassword,
}]
}]" />
</a-form-item>
</a-form>
</a-modal>
</template>
<script>
import {
sysUserUpdatePwd
} from '@/api/modular/system/userManage'
export default {
data() {
return {
labelCol: {
xs: {
span: 24
},
sm: {
span: 5
}
},
wrapperCol: {
xs: {
span: 24
},
sm: {
span: 16
}
import {
sysUserUpdatePwd
} from '@/api/modular/system/userManage'
export default {
data() {
return {
labelCol: {
xs: {
span: 24
},
confirmLoading: false,
visible_updPwd: false,
userId: '',
formUpdPwd: this.$form.createForm(this)
}
},
methods: {
open(id) {
this.userId = id
this.visible_updPwd = true
},
handleOkUpdPwd() {
const {
formUpdPwd: {
validateFields
}
} = this
validateFields((errors, values) => {
if (!errors) {
this.confirmLoading = true
values.id = this.userId
sysUserUpdatePwd(values).then((res) => {
if (res.success) {
this.$message.success('修改成功')
this.handleCancel()
} else {
this.$message.error('修改失败:' + res.message)
}
// eslint-disable-next-line handle-callback-err
}).finally((err) => {
this.confirmLoading = false
})
}
})
},
handleCancel() {
this.visible_updPwd = false
sm: {
span: 5
}
},
compareToFirstPassword(rule, value, callback) {
const formUpdPwd = this.formUpdPwd
if (value && value !== formUpdPwd.getFieldValue('newPassword')) {
// eslint-disable-next-line standard/no-callback-literal
callback('请确认两次输入密码的一致性!')
} else {
callback()
wrapperCol: {
xs: {
span: 24
},
sm: {
span: 16
}
},
validateToNextPassword(rule, value, callback) {
const formUpdPwd = this.formUpdPwd
if (value && this.confirmDirty) {
formUpdPwd.validateFields(['confirm'], {
force: true
confirmLoading: false,
visible_updPwd: false,
userId: '',
formUpdPwd: this.$form.createForm(this)
}
},
methods: {
open(id) {
this.userId = id
this.visible_updPwd = true
},
handleOkUpdPwd() {
const {
formUpdPwd: {
validateFields
}
} = this
validateFields((errors, values) => {
if (!errors) {
this.confirmLoading = true
values.id = this.userId
sysUserUpdatePwd(values).then((res) => {
if (res.success) {
this.$message.success('修改成功')
this.handleCancel()
} else {
this.$message.error('修改失败:' + res.message)
}
// eslint-disable-next-line handle-callback-err
}).finally((err) => {
this.confirmLoading = false
})
}
})
},
handleCancel() {
this.visible_updPwd = false
},
validPassword(value) {
var reg = /^(?![0-9]+$)(?![^0-9]+$)(?![a-zA-Z]+$)(?![^a-zA-Z]+$)(?![a-zA-Z0-9]+$)[a-zA-Z0-9\S]{8,30}$/;
if (value.match(reg)) {
return true;
}
return false;
},
compareToFirstPassword(rule, value, callback) {
const formUpdPwd = this.formUpdPwd
if (value && value !== formUpdPwd.getFieldValue('newPassword')) {
// eslint-disable-next-line standard/no-callback-literal
callback('请确认两次输入密码的一致性!')
} else {
callback()
}
}
},
validateToNextPassword (rule, value, callback) {
if (this.validPassword(value)) callback()
else callback(new Error('密码8-30位且包含字母、数字、特殊符号'))
}
}
}
</script>

@ -152,6 +152,20 @@
</a-form>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="12" :sm="24">
<a-form :form="form">
<a-form-item
label="用户代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入用户代码" v-decorator="['userCode']" />
</a-form-item>
</a-form>
</a-col>
</a-row>
<a-divider orientation="left">员工信息</a-divider>
<a-row :gutter="24">
<a-col :md="12" :sm="24">

@ -121,6 +121,20 @@
</a-form>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :md="12" :sm="24">
<a-form :form="form">
<a-form-item
label="用户代码"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
>
<a-input placeholder="请输入用户代码" v-decorator="['userCode']" />
</a-form-item>
</a-form>
</a-col>
</a-row>
<a-divider orientation="left">员工信息</a-divider>
<a-row :gutter="24">
<a-col :md="12" :sm="24">
@ -340,7 +354,8 @@
sex: record.sex,
email: record.email,
phone: record.phone,
tel: record.tel
tel: record.tel,
userCode: record.userCode
}
)
}, 100)

@ -1,53 +1,51 @@
<template>
<div class="main">
<a-form id="formLogin" class="user-layout-login" ref="formLogin" :form="form" @submit="handleSubmit">
<!-- <a-tabs
<a-spin :spinning="loading">
<a-form id="formLogin" class="user-layout-login" ref="formLogin" :form="form" @submit="handleSubmit">
<!-- <a-tabs
:activeKey="customActiveKey"
:tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"
@change="handleTabClick"
> -->
<!-- <a-tab-pane key="tab1" tab="账号密码登录"> -->
<a-alert
v-if="isLoginError"
type="error"
showIcon
style="margin-bottom: 24px;"
:message="this.accountLoginErrMsg"
/>
<a-form-item>
<a-input
size="large"
type="text"
placeholder="账号"
v-decorator="[
'account',
{
initialValue: '',
rules: [{ required: true, message: '请输入帐户名' }, { validator: handleUsernameOrEmail }],
validateTrigger: 'change'
}
]"
>
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-item>
<!-- <a-tab-pane key="tab1" tab="账号密码登录"> -->
<a-alert
v-if="isLoginError"
type="error"
showIcon
style="margin-bottom: 24px;"
:message="this.accountLoginErrMsg" />
<a-form-item>
<a-input
size="large"
type="text"
placeholder="账号"
v-decorator="[
'account',
{
initialValue: '',
rules: [{ required: true, message: '请输入帐户名' }, { validator: handleUsernameOrEmail }],
validateTrigger: 'change'
}
]">
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-item>
<a-form-item>
<a-input
size="large"
type="password"
autocomplete="false"
placeholder="密码"
v-decorator="[
'password',
{ initialValue: '', rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur' }
]"
>
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-item>
<!-- </a-tab-pane> -->
<!-- <a-tab-pane key="tab2" tab="手机号登录">
<a-form-item>
<a-input
size="large"
type="password"
autocomplete="false"
placeholder="密码"
v-decorator="[
'password',
{ initialValue: '', rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur' }
]">
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }" />
</a-input>
</a-form-item>
<!-- </a-tab-pane> -->
<!-- <a-tab-pane key="tab2" tab="手机号登录">
<a-alert
v-if="isLoginError"
type="error"
@ -99,16 +97,16 @@
</a-col>
</a-row>
</a-tab-pane> -->
<!-- </a-tabs> -->
<!-- </a-tabs> -->
<a-form-item>
<a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]"></a-checkbox>
<a @click="FnGo" class="forge-password" style="float: right;">
忘记密码
</a>
</a-form-item>
<a-form-item>
<a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]"></a-checkbox>
<a @click="FnGo" class="forge-password" style="float: right;">
忘记密码
</a>
</a-form-item>
<a-form-item>
<a-form-item>
<!-- <Verify
@success="verifySuccess"
:mode="'pop'"
@ -116,22 +114,20 @@
:imgSize="{ width: '330px', height: '155px' }"
ref="verify"
></Verify> -->
</a-form-item>
</a-form-item>
<a-form-item style="margin-top:24px">
<a-button
size="large"
type="primary"
htmlType="submit"
class="login-button"
:loading="state.loginBtn"
:disabled="state.loginBtn"
>确定</a-button
>
</a-form-item>
<a-form-item style="margin-top:24px">
<a-button
size="large"
type="primary"
htmlType="submit"
class="login-button"
:loading="state.loginBtn"
:disabled="state.loginBtn">确定</a-button>
</a-form-item>
<div class="user-login-other">
<!-- <span>其他登录方式</span>
<div class="user-login-other">
<!-- <span>其他登录方式</span>
<a>
<a-icon class="item-icon" type="alipay-circle"></a-icon>
</a>
@ -141,16 +137,17 @@
<a>
<a-icon class="item-icon" type="weibo-circle"></a-icon>
</a> -->
<a class="register" @click="FnGo"></a>
</div>
</a-form>
<a class="register" @click="FnGo"></a>
</div>
</a-form>
</a-spin>
<upd-pwd ref="updPwd" />
<two-step-captcha
v-if="requiredTwoStepCaptcha"
:visible="stepCaptchaVisible"
@success="stepCaptchaSuccess"
@cancel="stepCaptchaCancel"
></two-step-captcha>
@cancel="stepCaptchaCancel"></two-step-captcha>
</div>
</template>
@ -158,12 +155,14 @@
import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
import { mapActions } from 'vuex'
import { getSmsCaptcha, getCaptchaOpen } from '@/api/modular/system/loginManage'
import { ACCESS_TOKEN, ALL_APPS_MENU, DICT_TYPE_TREE_DATA } from '@/store/mutation-types'
import UpdPwd from './updPwd.vue'
import Verify from '@/components/verifition/Verify'
import store from '@/store'
export default {
components: {
TwoStepCaptcha,
Verify
Verify,
UpdPwd
},
data() {
return {
@ -171,9 +170,11 @@ export default {
loginBtn: false,
// login type: 0 email, 1 username, 2 telephone
loginType: 0,
needPassWord: false,
isLoginError: false,
requiredTwoStepCaptcha: false,
stepCaptchaVisible: false,
loading: false,
form: this.$form.createForm(this),
state: {
time: 60,
@ -191,6 +192,10 @@ export default {
created() {
// this.getCaptchaOpen()
},
mounted() {
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
},
methods: {
...mapActions(['Login', 'Logout', 'dictTypeData', 'getNoticReceiveList']),
FnGo() {
@ -247,9 +252,25 @@ export default {
loginParams[!state.loginType ? 'account' : 'account'] = values.account
loginParams.password = values.password
Login(loginParams)
.then(res => this.loginSuccess(res))
.catch(err => this.requestFailed(err))
.finally(() => {
.then(res => {
this.loginSuccess(res)
this.needPassWord = false
}).catch(err => {
if (err.needPassWord) {
this.$message.warning('需要更换密码')
this.needPassWord = true
this.loading = true
this.$store.dispatch('GetInfo').then(res => {
this.$refs.updPwd.open(res.id)
this.loading = false
}).catch(() => {
this.$message.error('获取个人信息失败')
this.loading = false
})
} else {
this.requestFailed(err)
}
}).finally(() => {
state.loginBtn = false
})
} else {
@ -323,12 +344,29 @@ export default {
this.$router.push({ path: '/' })
this.isLoginError = false
//
this.dictTypeData().then(res => {})
this.dictTypeData().then(res => { })
},
requestFailed(err) {
this.accountLoginErrMsg = err
this.isLoginError = true
},
beforeunloadHandler(e) {
if (this.needPassWord) {
this.$store.commit('SET_TOKEN', '')
this.$store.commit('SET_ROLES', [])
this.$store.commit('SET_BUTTONS', [])
this.$store.commit('SET_ADMINTYPE', '')
this.$store.commit('SET_INFO', null)
this.$ls.remove(ACCESS_TOKEN)
this.$ls.remove(ALL_APPS_MENU)
this.$ls.remove(DICT_TYPE_TREE_DATA)
this.$ls.remove('FIRSTFLAG')
}
}
},
deactivated() {
window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
}
}
</script>
@ -336,6 +374,7 @@ export default {
<style lang="less" scoped>
.user-layout-login {
margin-top: 100px;
label {
font-size: 14px;
}

@ -0,0 +1,123 @@
<template>
<a-modal title="修改密码" @cancel="handleCancel" :visible="visible_updPwd" :confirm-loading="confirmLoading">
<a-form :form="formUpdPwd">
<a-form-item label="原密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入原密码"
type="password"
v-decorator="['password', { rules: [{ required: true, message: '请输入原密码!' }] }]" />
</a-form-item>
<a-form-item label="新密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入新密码"
type="password"
v-decorator="['newPassword', { rules: [{ required: true, message: '请输入新密码!' }, { validator: validateToNextPassword },] }]" />
</a-form-item>
<a-form-item label="重复新密码" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请再次输入新密码"
type="password"
v-decorator="['confirm', {
rules: [{ required: true, message: '请再次输入新密码!' },
{
validator: compareToFirstPassword,
}]
}]" />
</a-form-item>
</a-form>
<template slot="footer">
<a-button @click="handleCancel"></a-button>
<a-button type="primary" :loading="confirmLoading" @click="handleOkUpdPwd"></a-button>
</template>
</a-modal>
</template>
<script>
import {
sysUserUpdatePwd
} from '@/api/modular/system/userManage'
import { ACCESS_TOKEN, ALL_APPS_MENU, DICT_TYPE_TREE_DATA } from '@/store/mutation-types'
export default {
data() {
return {
labelCol: {
xs: {
span: 24
},
sm: {
span: 5
}
},
wrapperCol: {
xs: {
span: 24
},
sm: {
span: 16
}
},
confirmLoading: false,
visible_updPwd: false,
userId: '',
formUpdPwd: this.$form.createForm(this)
}
},
methods: {
open(id) {
this.userId = id
this.visible_updPwd = true
},
handleOkUpdPwd() {
this.formUpdPwd.validateFields((errors, values) => {
if (!errors) {
// this.confirmLoading = true
values.id = this.userId
sysUserUpdatePwd(values).then((res) => {
if (res.success) {
this.$message.success('修改成功,请重新登陆')
this.handleCancel()
this.$store.commit('SET_TOKEN', '')
this.$store.commit('SET_ROLES', [])
this.$store.commit('SET_BUTTONS', [])
this.$store.commit('SET_ADMINTYPE', '')
this.$store.commit('SET_INFO', null)
this.$ls.remove(ACCESS_TOKEN)
this.$ls.remove(ALL_APPS_MENU)
this.$ls.remove(DICT_TYPE_TREE_DATA)
this.$ls.remove('FIRSTFLAG')
} else {
this.$message.error('修改失败:' + res.message)
}
// eslint-disable-next-line handle-callback-err
}).finally((err) => {
this.confirmLoading = false
})
}
})
},
handleCancel() {
this.visible_updPwd = false
},
validPassword(value) {
var reg = /^(?![0-9]+$)(?![^0-9]+$)(?![a-zA-Z]+$)(?![^a-zA-Z]+$)(?![a-zA-Z0-9]+$)[a-zA-Z0-9\S]{8,30}$/;
if (value.match(reg)) {
return true;
}
return false;
},
compareToFirstPassword(rule, value, callback) {
const formUpdPwd = this.formUpdPwd
if (value && value !== formUpdPwd.getFieldValue('newPassword')) {
// eslint-disable-next-line standard/no-callback-literal
callback('请确认两次输入密码的一致性!')
} else {
callback()
}
},
validateToNextPassword(rule, value, callback) {
if (this.validPassword(value)) callback()
else callback(new Error('密码8-30位且包含字母、数字、特殊符号'))
}
}
}
</script>
Loading…
Cancel
Save