14 changed files with 1060 additions and 41 deletions
@ -0,0 +1,119 @@ |
|||||
|
@import './variables.scss'; |
||||
|
@import './basicData.scss'; |
||||
|
.padpageBox { |
||||
|
background:#fff; |
||||
|
margin:10px; |
||||
|
height:calc(100% - 20px); |
||||
|
min-width:800px; |
||||
|
overflow:auto; |
||||
|
// ::v-deep .el-dialog { |
||||
|
// .el-dialog__body { |
||||
|
// padding-bottom: 20px; |
||||
|
// } |
||||
|
// .form1, |
||||
|
// .form2 { |
||||
|
// display: flex; |
||||
|
// flex-direction: column; |
||||
|
// width: 100%; |
||||
|
// height: 100%; |
||||
|
// } |
||||
|
|
||||
|
// .form1 .el-form { |
||||
|
// flex: 1; |
||||
|
// padding-left: 70px; |
||||
|
// padding-right: 70px; |
||||
|
// display: flex; |
||||
|
// flex-direction: column; |
||||
|
// overflow: hidden; |
||||
|
|
||||
|
|
||||
|
// .el-row { |
||||
|
// flex: 2; |
||||
|
// padding-left: 30px; |
||||
|
// padding-right: 30px; |
||||
|
// flex-wrap: wrap; |
||||
|
// overflow: hidden; |
||||
|
// overflow-y: auto; |
||||
|
// } |
||||
|
|
||||
|
// .formTable-box { |
||||
|
// flex: 2; |
||||
|
// overflow: hidden; |
||||
|
|
||||
|
// .el-form-item__content { |
||||
|
// width: 100%; |
||||
|
// height: 100%; |
||||
|
// display: flex; |
||||
|
// flex-direction: column; |
||||
|
// overflow: hidden; |
||||
|
// margin: 0 !important; |
||||
|
// } |
||||
|
|
||||
|
// .heder { |
||||
|
// padding: 5px 0; |
||||
|
// text-align: end; |
||||
|
|
||||
|
// span { |
||||
|
// color: rgb(64, 158, 255); |
||||
|
// cursor: pointer; |
||||
|
|
||||
|
// &:hover { |
||||
|
// color: blue; |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// .el-table { |
||||
|
// flex: 1; |
||||
|
|
||||
|
// // white-space: nowrap; |
||||
|
// // display: flex; |
||||
|
// .childTable { |
||||
|
// display: flex; |
||||
|
// justify-content: space-around; |
||||
|
|
||||
|
// span { |
||||
|
// cursor: pointer; |
||||
|
|
||||
|
// &:nth-child(1) { |
||||
|
// color: red; |
||||
|
// } |
||||
|
|
||||
|
// &:nth-child(2) { |
||||
|
// color: green; |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// .form2 .el-form { |
||||
|
// flex: 1; |
||||
|
// padding-left: 100px; |
||||
|
// padding-right: 100px; |
||||
|
// display: flex; |
||||
|
// justify-content: flex-start; |
||||
|
// align-content: flex-start; |
||||
|
// flex-wrap: wrap; |
||||
|
// overflow: hidden; |
||||
|
// overflow-y: auto; |
||||
|
// } |
||||
|
|
||||
|
// .screen-push { |
||||
|
// color: rgb(64, 158, 255); |
||||
|
|
||||
|
// span { |
||||
|
// cursor: pointer; |
||||
|
|
||||
|
// &:hover { |
||||
|
// color: blue; |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// .formButton { |
||||
|
// padding: 20px 20px 20px 0; |
||||
|
// } |
||||
|
} |
@ -0,0 +1,513 @@ |
|||||
|
<template> |
||||
|
<div class="login-container"> |
||||
|
<img class="loginLogoImg" src="../../../public/login_logo.png" alt=""> |
||||
|
<div class="login-form-wrapper"> |
||||
|
<div class="left"></div> |
||||
|
<div class="right" id="right"> |
||||
|
<el-form |
||||
|
ref="loginForm" |
||||
|
:model="loginForm" |
||||
|
:rules="loginRules" |
||||
|
class="login-form" |
||||
|
autocomplete="on" |
||||
|
label-position="left" |
||||
|
> |
||||
|
<div class="title-container"> |
||||
|
<h3 class="title">欢迎登录</h3> |
||||
|
</div> |
||||
|
<el-form-item prop="username"> |
||||
|
<span class="svg-container"> |
||||
|
<svg-icon icon-class="user" /> |
||||
|
</span> |
||||
|
<el-input |
||||
|
ref="username" |
||||
|
v-model="loginForm.username" |
||||
|
placeholder="用户名" |
||||
|
name="username" |
||||
|
type="text" |
||||
|
tabindex="1" |
||||
|
autocomplete="on" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-tooltip |
||||
|
v-model="capsTooltip" |
||||
|
content="Caps lock is On" |
||||
|
placement="right" |
||||
|
manual |
||||
|
> |
||||
|
<el-form-item prop="password"> |
||||
|
<span class="svg-container"> |
||||
|
<svg-icon icon-class="password" /> |
||||
|
</span> |
||||
|
<el-input |
||||
|
:key="passwordType" |
||||
|
ref="password" |
||||
|
v-model="loginForm.password" |
||||
|
:type="passwordType" |
||||
|
placeholder="密码" |
||||
|
name="password" |
||||
|
tabindex="2" |
||||
|
autocomplete="on" |
||||
|
@keyup.native="checkCapslock" |
||||
|
@blur="capsTooltip = false" |
||||
|
@keyup.enter.native="handleLogin" |
||||
|
/> |
||||
|
<span class="show-pwd" @click="showPwd"> |
||||
|
<svg-icon |
||||
|
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" |
||||
|
/> |
||||
|
</span> |
||||
|
</el-form-item> |
||||
|
</el-tooltip> |
||||
|
|
||||
|
<el-button |
||||
|
class="loginButton" |
||||
|
:loading="loading" |
||||
|
type="primary" |
||||
|
@click.native.prevent="handleLogin" |
||||
|
>登 录</el-button |
||||
|
> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'Login', |
||||
|
data () { |
||||
|
const validateUsername = (rule, value, callback) => { |
||||
|
if (!value) { |
||||
|
callback(new Error('请输入正确的用户名')) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
const validatePassword = (rule, value, callback) => { |
||||
|
if (value.length < 6) { |
||||
|
callback(new Error('密码不能少于6位')) |
||||
|
} else { |
||||
|
callback() |
||||
|
} |
||||
|
} |
||||
|
return { |
||||
|
loginForm: { |
||||
|
grant_type: 'password', |
||||
|
client_id: 'Auth_App', |
||||
|
warehouseCode: localStorage.getItem("warehouseCode"), |
||||
|
company: localStorage.getItem("company"), |
||||
|
username: '', |
||||
|
password: '' |
||||
|
}, |
||||
|
loginRules: { |
||||
|
username: [{ required: true, trigger: 'blur', validator: validateUsername }], |
||||
|
password: [{ required: true, trigger: 'blur', validator: validatePassword }] |
||||
|
}, |
||||
|
passwordType: 'password', |
||||
|
capsTooltip: false, |
||||
|
loading: false, |
||||
|
redirect: undefined, |
||||
|
otherQuery: {} |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
$route: { |
||||
|
handler: function (route) { |
||||
|
const query = route.query |
||||
|
if (query) { |
||||
|
this.redirect = query.redirect |
||||
|
this.otherQuery = this.getOtherQuery(query) |
||||
|
} |
||||
|
}, |
||||
|
immediate: true |
||||
|
} |
||||
|
}, |
||||
|
created () { |
||||
|
// window.addEventListener('storage', this.afterQRScan) |
||||
|
// 禁止缩放 |
||||
|
document.addEventListener('mousewheel', function (e) { |
||||
|
e = e || window.event; |
||||
|
if ((e.wheelDelta && event.ctrlKey) || e.detail) { |
||||
|
event.preventDefault(); |
||||
|
} |
||||
|
}, { |
||||
|
capture: false, |
||||
|
passive: false |
||||
|
}); |
||||
|
}, |
||||
|
mounted () { |
||||
|
window.showInfoFromJava = this.showInfoFromJava |
||||
|
if (this.loginForm.username === '') { |
||||
|
this.$refs.username.focus() |
||||
|
} else if (this.loginForm.password === '') { |
||||
|
this.$refs.password.focus() |
||||
|
} |
||||
|
}, |
||||
|
destroyed () { |
||||
|
// window.removeEventListener('storage', this.afterQRScan) |
||||
|
}, |
||||
|
methods: { |
||||
|
showInfoFromJava(msg){ |
||||
|
console.log("showInfoFromJava") |
||||
|
alert(msg) |
||||
|
}, |
||||
|
checkCapslock (e) { |
||||
|
const { key } = e |
||||
|
this.capsTooltip = key && key.length === 1 && (key >= 'A' && key <= 'Z') |
||||
|
}, |
||||
|
showPwd () { |
||||
|
if (this.passwordType === 'password') { |
||||
|
this.passwordType = '' |
||||
|
} else { |
||||
|
this.passwordType = 'password' |
||||
|
} |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs.password.focus() |
||||
|
}) |
||||
|
}, |
||||
|
handleLogin () { |
||||
|
this.$refs.loginForm.validate(valid => { |
||||
|
if (valid) { |
||||
|
this.loading = true |
||||
|
this.$store.dispatch('user/login', this.loginForm) |
||||
|
.then(() => { |
||||
|
if(this.$route.query && this.$route.query.redirect){ |
||||
|
this.$router.push({ path: this.$route.query.redirect}) |
||||
|
}else{ |
||||
|
this.$router.push({ path: '/isPadForMenuPage'}) |
||||
|
} |
||||
|
}) |
||||
|
.catch((error) => { |
||||
|
this.$message.error('用户名或密码错误!') |
||||
|
this.loading = false |
||||
|
}) |
||||
|
} else { |
||||
|
console.log('error submit!!') |
||||
|
return false |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getOtherQuery (query) { |
||||
|
return Object.keys(query).reduce((acc, cur) => { |
||||
|
if (cur !== 'redirect') { |
||||
|
acc[cur] = query[cur] |
||||
|
} |
||||
|
return acc |
||||
|
}, {}) |
||||
|
}, |
||||
|
// afterQRScan() { |
||||
|
// if (e.key === 'x-admin-oauth-code') { |
||||
|
// const code = getQueryObject(e.newValue) |
||||
|
// const codeMap = { |
||||
|
// wechat: 'code', |
||||
|
// tencent: 'code' |
||||
|
// } |
||||
|
// const type = codeMap[this.auth_type] |
||||
|
// const codeName = code[type] |
||||
|
// if (codeName) { |
||||
|
// this.$store.dispatch('LoginByThirdparty', codeName).then(() => { |
||||
|
// this.$router.push({ path: this.redirect || '/' }) |
||||
|
// }) |
||||
|
// } else { |
||||
|
// alert('第三方登录失败') |
||||
|
// } |
||||
|
// } |
||||
|
// } |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
/* 修复input 背景不协调 和光标变色 */ |
||||
|
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */ |
||||
|
|
||||
|
$bg: #283443; |
||||
|
$bg_gray: #ececec; |
||||
|
$light_gray: #fff; |
||||
|
$cursor: #fff; |
||||
|
$dark_gray: #889aa4; |
||||
|
|
||||
|
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) { |
||||
|
.login-container .el-input input { |
||||
|
color: $cursor; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* reset element-ui css */ |
||||
|
.login-container { |
||||
|
.el-select { |
||||
|
display: inline-block; |
||||
|
height: 47px; |
||||
|
width: calc(100% - 30px); |
||||
|
.el-input { |
||||
|
width: 100%; |
||||
|
} |
||||
|
} |
||||
|
.el-input { |
||||
|
display: inline-block; |
||||
|
height: 47px; |
||||
|
width: 85%; |
||||
|
|
||||
|
input { |
||||
|
background: transparent; |
||||
|
border: 0px; |
||||
|
appearance: none; |
||||
|
-webkit-appearance: none; |
||||
|
border-radius: 0px; |
||||
|
padding: 12px 5px 12px 15px; |
||||
|
color: $dark_gray; |
||||
|
height: 47px; |
||||
|
caret-color: $dark_gray; |
||||
|
|
||||
|
&:-webkit-autofill { |
||||
|
box-shadow: 0 0 0px 1000px $bg_gray inset !important; |
||||
|
-webkit-text-fill-color: $dark_gray !important; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.el-form-item { |
||||
|
border: 1px solid rgba(255, 255, 255, 0.1); |
||||
|
// background: rgba(0, 0, 0, 0.1); |
||||
|
// background-color: $bg; |
||||
|
background-color: $bg_gray; |
||||
|
border-radius: 5px; |
||||
|
color: #454545; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
$bg: #2d3a4b; |
||||
|
$dark_gray: #889aa4; |
||||
|
$light_gray: #eee; |
||||
|
|
||||
|
.login-container { |
||||
|
background: url('../../../public/LoginBackground.png') no-repeat; |
||||
|
background-size: cover; |
||||
|
background-position: center 0; |
||||
|
height: 100vh; |
||||
|
width: 100vw; |
||||
|
overflow: hidden; |
||||
|
.loginLogoImg{ |
||||
|
position: fixed; |
||||
|
left: 30px; |
||||
|
top: 30px; |
||||
|
// width:600px; |
||||
|
height: 110px; |
||||
|
} |
||||
|
// .login-bg-wrapper { |
||||
|
// position: absolute; |
||||
|
// top: 0; |
||||
|
// left: 0; |
||||
|
// height: 100%; |
||||
|
// width: 100%; |
||||
|
// img { |
||||
|
// width: 100%; |
||||
|
// height: 100%; |
||||
|
// // -o-object-fit: cover; |
||||
|
// object-fit: cover; |
||||
|
// } |
||||
|
// } |
||||
|
.login-form-wrapper { |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.login-form { |
||||
|
padding-top: 30px; |
||||
|
overflow: hidden; |
||||
|
// position: relative; |
||||
|
// width: 520px; |
||||
|
// max-width: 100%; |
||||
|
// padding: 160px 35px 0; |
||||
|
// margin: 0 auto; |
||||
|
// overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.tips { |
||||
|
font-size: 14px; |
||||
|
color: #fff; |
||||
|
margin-bottom: 10px; |
||||
|
|
||||
|
span { |
||||
|
&:first-of-type { |
||||
|
margin-right: 16px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.svg-container { |
||||
|
padding: 6px 5px 6px 15px; |
||||
|
color: $dark_gray; |
||||
|
vertical-align: middle; |
||||
|
width: 30px; |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.title-container { |
||||
|
position: relative; |
||||
|
|
||||
|
.title { |
||||
|
font-size: 30px; |
||||
|
letter-spacing:19px; |
||||
|
// color: $light_gray; |
||||
|
color: $bg; |
||||
|
margin: 0px auto 40px auto; |
||||
|
text-align: center; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.loginButton{ |
||||
|
width: 100%; |
||||
|
margin-top: 100px; |
||||
|
height:50px; |
||||
|
font-size:18px |
||||
|
} |
||||
|
|
||||
|
.show-pwd { |
||||
|
position: absolute; |
||||
|
right: 10px; |
||||
|
top: 7px; |
||||
|
font-size: 16px; |
||||
|
color: $dark_gray; |
||||
|
cursor: pointer; |
||||
|
user-select: none; |
||||
|
} |
||||
|
|
||||
|
.thirdparty-button { |
||||
|
position: absolute; |
||||
|
right: 0; |
||||
|
bottom: 6px; |
||||
|
} |
||||
|
|
||||
|
@media only screen and (max-width: 470px) { |
||||
|
.thirdparty-button { |
||||
|
display: none; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
@media screen and (min-width: 992px) { |
||||
|
// @media screen and (min-width: 992px) { |
||||
|
.left { |
||||
|
// background-position: center 0; |
||||
|
// background-size: cover; |
||||
|
width: 100%; |
||||
|
height: 100%; |
||||
|
// display: block; |
||||
|
// flex: 1; |
||||
|
} |
||||
|
.right { |
||||
|
height: 100%; |
||||
|
// background-position: center -15px; |
||||
|
// min-width: 650px; |
||||
|
// width: 35%; |
||||
|
width: 440px; |
||||
|
margin-right: 11%; |
||||
|
flex-shrink: 0; |
||||
|
// flex: 1; |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
.login-form { |
||||
|
width: 100%; |
||||
|
overflow: hidden; |
||||
|
background: #fff; |
||||
|
padding: 80px 40px; |
||||
|
border-radius: 8px; |
||||
|
// position: relative; |
||||
|
// width: 520px; |
||||
|
// max-width: 100%; |
||||
|
// padding: 160px 35px 0; |
||||
|
// margin: 0 auto; |
||||
|
// overflow: hidden; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
// @media screen and (max-height: 750px) { |
||||
|
// .login-container { |
||||
|
// background: url('../../../public/LoginBackground-right.png') no-repeat; |
||||
|
// background-size: cover; |
||||
|
// // background-image: none; |
||||
|
// // background-color: $bg; |
||||
|
// } |
||||
|
// .left { |
||||
|
// display: none; |
||||
|
// } |
||||
|
// .right{ |
||||
|
// width: 100%; |
||||
|
// .login-form { |
||||
|
// width: 76%; |
||||
|
// margin: 0 auto; |
||||
|
// } |
||||
|
// // background-size: cover; |
||||
|
// // background-position: center 0; |
||||
|
// } |
||||
|
// } |
||||
|
|
||||
|
// @media screen and (min-width: 768px) and (max-width: 992px) { |
||||
|
// .login-container { |
||||
|
// background: url('../../../public/LoginBackground-right.png') no-repeat; |
||||
|
// background-size: cover; |
||||
|
// // background-image: none; |
||||
|
// // background-color: $bg; |
||||
|
// } |
||||
|
// .left { |
||||
|
// display: none; |
||||
|
// } |
||||
|
// .right { |
||||
|
// width: 100%; |
||||
|
// .login-form { |
||||
|
// width: 76%; |
||||
|
// margin: 0 auto; |
||||
|
|
||||
|
// .title{ |
||||
|
// color: $light_gray; |
||||
|
// } |
||||
|
// } |
||||
|
// // flex: 1; |
||||
|
// // display: flex; |
||||
|
// // justify-content: center; |
||||
|
// // align-items: center; |
||||
|
// // .login-form { |
||||
|
// // width: 70%; |
||||
|
// // } |
||||
|
// } |
||||
|
// } |
||||
|
@media screen and (max-width: 992px) { |
||||
|
.login-container { |
||||
|
background: url('../../../public/LoginBackground-right.png') no-repeat; |
||||
|
background-size: cover; |
||||
|
// background-image: none; |
||||
|
// background-color: $bg; |
||||
|
// .loginLogoImg{ |
||||
|
// width: 80%; |
||||
|
// } |
||||
|
} |
||||
|
.left { |
||||
|
display: none; |
||||
|
} |
||||
|
.right { |
||||
|
width: 100%; |
||||
|
.login-form { |
||||
|
width: 76%; |
||||
|
margin: 0 auto; |
||||
|
.title{ |
||||
|
color: $light_gray; |
||||
|
} |
||||
|
} |
||||
|
// flex: 1; |
||||
|
// min-width: 250px; |
||||
|
// display: flex; |
||||
|
// justify-content: center; |
||||
|
// align-items: center; |
||||
|
// .login-form { |
||||
|
// width: 90%; |
||||
|
// } |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,26 @@ |
|||||
|
<template> |
||||
|
<div class="isPadForTransferLibJobPage"> |
||||
|
<div class="padListHeader"> |
||||
|
|
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
export default { |
||||
|
name: 'isPadForTransferLibJob', |
||||
|
data () { |
||||
|
return {} |
||||
|
}, |
||||
|
methods: {} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
.isPadForTransferLibJobPage{ |
||||
|
background:#fff; |
||||
|
margin:15px; |
||||
|
height:calc(100% - 30px); |
||||
|
min-width:800px; |
||||
|
overflow:auto; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,278 @@ |
|||||
|
<template> |
||||
|
<div class="page-box" v-loading="Loading.appMainLoading"> |
||||
|
<tablePagination |
||||
|
:currenButtonData="currenButtonData" |
||||
|
:tableData="tableData" |
||||
|
:tableLoading="Loading.tableLoading" |
||||
|
:tableColumns="tableColumns" |
||||
|
@rowDrop="rowDrop" |
||||
|
:totalCount="totalCount" |
||||
|
:multipleSelection="multipleSelection" |
||||
|
:MaxResultCount="PageListParams.MaxResultCount" |
||||
|
@topbutton="topbuttonHandle" |
||||
|
@inlineDialog="inlineDialog" |
||||
|
@sortChange="sortChange" |
||||
|
@alertoldSkipCount="alertoldSkipCount" |
||||
|
@alterResultCount="alterResultCount" |
||||
|
@handleSelectionChange="handleSelectionChange" |
||||
|
:currentPageProps="oldSkipCount" |
||||
|
:quicklySearchOption="quicklySearchOption" |
||||
|
@quicklySearchClick="quicklySearchClick" |
||||
|
@quicklySearchClear="quicklySearchClear" |
||||
|
:primarySearchOption="primarySearchOption" |
||||
|
@overallSearchFormClick="overallSearchFormClick" |
||||
|
:httpOverallSearchData="httpOverallSearchData" |
||||
|
:setUTableHeight="140" |
||||
|
> |
||||
|
</tablePagination> |
||||
|
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
||||
|
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
||||
|
<importFile |
||||
|
:loading="Loading.importLoading" |
||||
|
:show="displayDialog.importDialog" |
||||
|
:URL="URL" |
||||
|
:disabledMethod = {method1:false,method2:false,method3:false} |
||||
|
:disabledIsAllowPartImport = {isAllowPartImport1:false,isAllowPartImport2:false} |
||||
|
isAllowPartImportValue="1" |
||||
|
@importClick="postImportMergeClick(arguments)" |
||||
|
@postImportDown="importDown" |
||||
|
></importFile> |
||||
|
<!--抽屉--> |
||||
|
<curren-Drawer |
||||
|
:title="tableColumns" |
||||
|
:DrawerLoading="Loading.DrawerLoading" |
||||
|
:drawer="displayDialog.detailsDialog" |
||||
|
:propsData="propsData" |
||||
|
:tabsDesTions="tabsDesTions" |
||||
|
:Butttondata="DrawerButtonData" |
||||
|
@drawerbutton="drawerbutton" |
||||
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
||||
|
@handleCommand="drawerHandle" |
||||
|
@close-value="closeValue" |
||||
|
:tableColumns="detailsTableColumns" |
||||
|
:totalCount="totalCountDetails" |
||||
|
:MaxResultCount="MaxResultCountDetails" |
||||
|
@alterResultCountDetails="alterResultCountDetails" |
||||
|
@alertoldSkipCountDetails="alertoldSkipCountDetails" |
||||
|
></curren-Drawer> |
||||
|
<!-- 新增与编辑 --> |
||||
|
<newAndEdiDialog |
||||
|
:loading="Loading.newAndEdiLoading" |
||||
|
:active="active" |
||||
|
:pageStatus="pageStatus" |
||||
|
:formReveal="formReveal" |
||||
|
:formTitle="formTitle" |
||||
|
:displayDialog="editDialog" |
||||
|
:FormData="formReveal ? CreateFormData : editFormData" |
||||
|
:Form="formReveal ? CreateForm : editForm" |
||||
|
:Options="editOptions" |
||||
|
:Handle="editHandle" |
||||
|
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
||||
|
@FormSubmit="FormSubmitHandle" |
||||
|
@close="FormCloseHandle" |
||||
|
@goBack="goBack" |
||||
|
> |
||||
|
<template> |
||||
|
<curren-descriptions |
||||
|
v-if="this.displayDialog.newDialog" |
||||
|
:border="true" |
||||
|
:column="3" |
||||
|
:direction="'horizontal'" |
||||
|
:colon="false" |
||||
|
:tabsDesTions="detailsTableColumns" |
||||
|
:propsData="propsData.details[0]" |
||||
|
class="drawerDescriptionsFirst" |
||||
|
style="width:100%;padding-top:20px" |
||||
|
> |
||||
|
</curren-descriptions> |
||||
|
</template> |
||||
|
</newAndEdiDialog> |
||||
|
<!-- 搜索按钮——窗体组件 --> |
||||
|
<searchPage |
||||
|
ref="searchTable" |
||||
|
:tableLoading="Loading.autoTableLoading" |
||||
|
:advancedFilter="advancedFilter()" |
||||
|
:filterPageListParams="filterPageListParams" |
||||
|
:formTitle="searchTitle" |
||||
|
:displayDialog="displayDialog.AddNewDialog" |
||||
|
:searchTableData="searchData" |
||||
|
:searchTableColumns="searchColumns" |
||||
|
:searchTotalCount="searchTotalCount" |
||||
|
:supplierItemPage="searchPageListParams" |
||||
|
@handleSelectionChange="prepareFormData" |
||||
|
@SizeChange="searchAlterResultCount($event, searchPageListParams)" |
||||
|
@CurrentChange="searchAlertoldSkipCount($event, searchPageListParams)" |
||||
|
@tableButtonClick="searchSubmit(arguments)" |
||||
|
></searchPage> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { tableMixins } from "@/mixins/TableMixins"; |
||||
|
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
||||
|
import { drawerMixins } from "@/mixins/drawerMixins"; |
||||
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"; |
||||
|
import { mixins } from "@/mixins/mixins"; |
||||
|
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
||||
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
||||
|
import { transferLibJobHandel } from '@/api/wms-job' |
||||
|
import { getInventoryByPackingCode,getDetailed } from '@/api/wms-api' |
||||
|
import currenDescriptions from "@/components/currenDescriptions" |
||||
|
export default { |
||||
|
name: "isPadForTransferLibJob", |
||||
|
components: { |
||||
|
currenDescriptions, |
||||
|
}, |
||||
|
mixins: [ |
||||
|
tableMixins, |
||||
|
LoadingMixins, |
||||
|
drawerMixins, |
||||
|
TableHeaderMixins, |
||||
|
mixins, |
||||
|
filterSelectMixins, |
||||
|
newAndEdiDialogMixins |
||||
|
], |
||||
|
computed: { |
||||
|
editDialog: { |
||||
|
get: function () { |
||||
|
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
||||
|
}, |
||||
|
}, |
||||
|
//按钮显示 |
||||
|
hideButton: function () { |
||||
|
return function (val) { |
||||
|
let data = true |
||||
|
val.forEach(key => { |
||||
|
if (this.propsData.jobStatus == key) { |
||||
|
data = false |
||||
|
} |
||||
|
}) |
||||
|
return data |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
URL: "wms/store/transfer-lib-job", |
||||
|
//常用按钮数据 |
||||
|
currenButtonData: [ |
||||
|
// this.defaultImportBtn(),//导入 |
||||
|
{ |
||||
|
type: 'warning', |
||||
|
label: '查看待执行数据', |
||||
|
name: "showCanHandle", |
||||
|
size: 'mini' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'success', |
||||
|
label: '查看所有数据', |
||||
|
name: "showAllData", |
||||
|
size: 'mini' |
||||
|
}, |
||||
|
this.defaultFieldSettingBtn(),//字段设置 |
||||
|
this.defaultFreshBtn(),//刷新 |
||||
|
this.defaultFilterBtn(),//筛选 |
||||
|
], |
||||
|
DrawerButtonData:[ |
||||
|
{ |
||||
|
type:'success', |
||||
|
label: '完成库移', |
||||
|
name: "handle", |
||||
|
hide: () => { return this.hideButton([1,2,4]) }, |
||||
|
size:"mini" |
||||
|
}, |
||||
|
], |
||||
|
CreateFormData: { |
||||
|
packingCode:"", |
||||
|
fromLocationCode:"", |
||||
|
toLocationCode:"", |
||||
|
}, |
||||
|
CreateForm: [ |
||||
|
{ type: "input", label: "箱码", prop: 'packingCode', colSpan: 12, }, |
||||
|
{ type: "input", label: "来源库位", prop: 'fromLocationCode', colSpan: 12, }, |
||||
|
{ type: "input", label: "目标库位", prop: 'toLocationCode', colSpan: 12, }, |
||||
|
], |
||||
|
editRules: { |
||||
|
cerateRule: { |
||||
|
packingCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
fromLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
toLocationCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.paging(); |
||||
|
}, |
||||
|
methods:{ |
||||
|
topbuttonHandle(val,item){ |
||||
|
if(val == 'showCanHandle'){ |
||||
|
this.PageListParams.condition.filters.push({ |
||||
|
logic:"And", |
||||
|
column:"jobStatus", |
||||
|
action:"In", |
||||
|
value: JSON.stringify([1,2,4,30]) |
||||
|
}) |
||||
|
this.paging(); |
||||
|
} |
||||
|
else if(val == 'showAllData'){ |
||||
|
this.PageListParams.condition.filters = this.PageListParams.condition.filters.filter(obj => obj.column != 'jobStatus'); |
||||
|
this.paging(); |
||||
|
} |
||||
|
else{ |
||||
|
this.topbutton(val,item) |
||||
|
} |
||||
|
}, |
||||
|
drawerbutton(val){ |
||||
|
// 完成库移 |
||||
|
if(val == "handle"){ |
||||
|
this.formTitle = "完成库移"; |
||||
|
this.formReveal = true |
||||
|
this.theEvent = "newly" |
||||
|
this.displayDialog.newDialog = true; |
||||
|
} |
||||
|
}, |
||||
|
FormSubmitHandle(val){ |
||||
|
this.Loading.newAndEdiLoading = true |
||||
|
// 先获取库存余额进行部分项赋值 |
||||
|
getInventoryByPackingCode(this.CreateFormData.packingCode).then(inventory => { |
||||
|
// 目前定的需求为:details中只有一条明细,所以按钮写在最外层,默认赋值第一位 |
||||
|
let _data = this.propsData |
||||
|
_data.details[0].handledFromPackingCode = this.CreateFormData.packingCode |
||||
|
_data.details[0].handledToPackingCode = this.CreateFormData.packingCode |
||||
|
_data.details[0].handledFromLocationCode = this.CreateFormData.fromLocationCode |
||||
|
_data.details[0].handledToLocationCode = this.CreateFormData.toLocationCode |
||||
|
_data.details[0].handledToLot = inventory.lot |
||||
|
_data.details[0].handledFromLot = inventory.lot |
||||
|
_data.details[0].handledFromSupplierBatch = inventory.supplierBatch |
||||
|
_data.details[0].handledToSupplierBatch = inventory.supplierBatch |
||||
|
_data.details[0].handledFromQty = inventory.qty |
||||
|
_data.details[0].handledToQty = inventory.qty |
||||
|
transferLibJobHandel(this.propsData.id, _data).then(res => { |
||||
|
this.Loading.newAndEdiLoading = false |
||||
|
this.FormResult("success") |
||||
|
}).catch(err => { |
||||
|
this.Loading.newAndEdiLoading = false |
||||
|
this.FormResult("error") |
||||
|
}) |
||||
|
}).catch(err => { |
||||
|
this.Loading.newAndEdiLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
FormCloseHandle(val){ |
||||
|
this.FormClose(val) |
||||
|
this.Loading.appMainLoading = true |
||||
|
getDetailed(this.propsData.id, this.URL) |
||||
|
.then(res => { |
||||
|
this.propsData = res |
||||
|
this.Loading.appMainLoading = false |
||||
|
}) |
||||
|
.catch(err=>{ |
||||
|
this.Loading.appMainLoading = false |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
@import "@/styles/mainbasicData.scss"; |
||||
|
</style> |
Loading…
Reference in new issue