diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 8f2112c..5dac109 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -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)
diff --git a/src/utils/request.js b/src/utils/request.js
index fb35104..50a75a1 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -79,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)
diff --git a/src/views/main/BookingLedger/detail/components/selectView.vue b/src/views/main/BookingLedger/detail/components/selectView.vue
index d9c73b4..0a37b2b 100644
--- a/src/views/main/BookingLedger/detail/components/selectView.vue
+++ b/src/views/main/BookingLedger/detail/components/selectView.vue
@@ -488,28 +488,18 @@ export default {
console.log('首次搜索内容', e, this.type, this.bookingInitData)
if (this.type === 'forwarder') {
this.inLoading = true
- const arr = []
- this.selectList = []
- setTimeout(() => {
- if (this.agentFilter.length === 0) {
- setTimeout(() => {
- this.inLoading = false
- this.selectList = this.bookingInitData[`${this.type}InitList`]
- }, 100);
+ if (this.agentFilter.length === 0) {
+ this.inLoading = false
+ this.selectList = this.bookingInitData[`${this.type}InitList`]
} else {
- this.agentFilter.forEach(item => {
- this.bookingInitData[`${this.type}InitList`].forEach(ite => {
- if (ite.codeName == item.agentCode) {
- arr.push(ite)
- }
- })
- })
setTimeout(() => {
- this.inLoading = false
- this.selectList = arr
- }, 100);
+ this.agentFilter.forEach(item => {
+ item.shortName = item.agent
+ item.codeName = item.agentCode
+ })
+ this.selectList = this.agentFilter
+ }, 500);
}
- }, 900);
return false
}
if (
diff --git a/src/views/main/BookingLedger/list/index.vue b/src/views/main/BookingLedger/list/index.vue
index fbe77d7..16bc671 100644
--- a/src/views/main/BookingLedger/list/index.vue
+++ b/src/views/main/BookingLedger/list/index.vue
@@ -76,8 +76,7 @@
- 批量操作
+ 批量操作
@@ -344,6 +343,18 @@
+
+
+
+
+
+
{{ row.extendState.txxpBeginTime.substring(0,16) }}
+
{{ row.extendState.txxpEndTime.substring(0,16) }}
+
+
查看
+
+
+
@@ -1212,6 +1223,9 @@
+
+
+
@@ -1282,7 +1296,8 @@ import {
GetWebData,
CancelServiceStatusByList,
SaveServiceStatusByList,
- BachUpdateShipagency
+ BachUpdateShipagency,
+ TxxpLink
} from '@/api/modular/main/BookingLedger'
import initData from './modules/initData'
@@ -1406,6 +1421,8 @@ export default {
goodStatusShow: false,
goodStatusScreenX: 0,
goodStatusScreenY: 0,
+ txxpUrl: '',
+ txxpUrlFlag: false,
goodStatusData: null,
goodStatusSeat: 'bottom',
editingForm: this.$form.createForm(this),
@@ -2372,7 +2389,9 @@ export default {
console.log('页码设置成功')
})
},
-
+ handleLookPdf(row) {
+ window.open(row.extendState.txxpPdfUrl);
+ },
toggleAdvanced() {
this.advanced = !this.advanced
this.$forceUpdate()
@@ -2452,6 +2471,19 @@ export default {
})
}
},
+ TxxpLink(row) {
+ TxxpLink(row.id)
+ .then(res => {
+ if (res.success) {
+ window.open(res.data);
+ } else {
+ this.$message.error(res.message)
+ }
+ })
+ .catch(err => {
+ console.log(err)
+ })
+ },
handleSearchTxxp() {
const select = this.$refs.xGrid.getCheckboxRecords()
const pkIdArr = select.map((item, index) => {
@@ -4404,7 +4436,8 @@ export default {
.vxe-table--render-default {
color: black;
}
-.fangdan-modal{
+
+.fangdan-modal {
position: fixed;
top: 100px;
left: 36%;
diff --git a/src/views/main/BookingLedger/list/modules/initData.js b/src/views/main/BookingLedger/list/modules/initData.js
index 6818e20..56992b0 100644
--- a/src/views/main/BookingLedger/list/modules/initData.js
+++ b/src/views/main/BookingLedger/list/modules/initData.js
@@ -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 }
],
diff --git a/src/views/main/carrierAgent/index.vue b/src/views/main/carrierAgent/index.vue
index 80eef2e..ee6acc4 100644
--- a/src/views/main/carrierAgent/index.vue
+++ b/src/views/main/carrierAgent/index.vue
@@ -105,7 +105,7 @@
@search="handleSearch"
v-model="form.agentCode"
style="width: 200px">
- {{item.shortName }}
+ {{ item.shortName }}
@@ -188,7 +188,7 @@ export default {
},
mounted() {
this.getList()
- DjyCustomerSuggest({ keyword: '' }).then(res => {
+ DjyCustomerSuggest({ keyword: '', type: 'booking_agent' }).then(res => {
this.agentList = res.data.rows
})
},
@@ -199,7 +199,7 @@ export default {
this.getList()
},
handleSearch(e) {
- DjyCustomerSuggest({ keyword: e }).then(res => {
+ DjyCustomerSuggest({ keyword: e, type: 'booking_agent' }).then(res => {
this.agentList = res.data.rows
})
},
diff --git a/src/views/system/account/settings/securityItem/updPwd.vue b/src/views/system/account/settings/securityItem/updPwd.vue
index 62f4ee5..7a47ab3 100644
--- a/src/views/system/account/settings/securityItem/updPwd.vue
+++ b/src/views/system/account/settings/securityItem/updPwd.vue
@@ -10,109 +10,111 @@
+ v-decorator="['password', { rules: [{ required: true, message: '请输入原密码!' }] }]" />
+ v-decorator="['newPassword', {rules: [{required: true, message: '请输入新密码!'},{validator: validateToNextPassword},]}]"
+ />
+ v-decorator="['confirm', {
+ rules: [{ required: true, message: '请再次输入新密码!' },
+ {
+ validator: compareToFirstPassword,
+ }]
+ }]" />
-
diff --git a/src/views/userLoginReg/Login.vue b/src/views/userLoginReg/Login.vue
index b80f1bf..15460d6 100644
--- a/src/views/userLoginReg/Login.vue
+++ b/src/views/userLoginReg/Login.vue
@@ -1,53 +1,51 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
-
+
-
- 自动登录
-
- 忘记密码
-
-
+
+ 自动登录
+
+ 忘记密码
+
+
-
+
-
+
-
- 确定
-
+
+ 确定
+
-
-
+
注册账户
+
+
+
+
+ @cancel="stepCaptchaCancel">
@@ -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))
}
}
@@ -336,6 +374,7 @@ export default {