Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
8f30705c
Commit
8f30705c
authored
Oct 29, 2021
by
季圣华
Browse files
给文本框增加回车跳转下一个的事件
parent
deead4b3
Changes
17
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/utils/util.js
View file @
8f30705c
...
...
@@ -684,4 +684,29 @@ export function handleIntroJs(module, cur_version) {
//点击结束按钮后, 执行的事件
Vue
.
ls
.
set
(
'
intro_cache_
'
+
module
,
cur_version
,
100
*
24
*
60
*
60
*
1000
);
}).
start
()
}
/**
* 回车后自动跳到下一个input
*/
export
function
autoJumpNextInput
(
domInfo
)
{
let
domIndex
=
0
let
inputs
=
document
.
getElementById
(
domInfo
).
getElementsByTagName
(
'
input
'
)
inputs
[
domIndex
].
focus
()
document
.
getElementById
(
domInfo
).
addEventListener
(
'
keydown
'
,
function
(
e
){
if
(
e
.
keyCode
===
13
){
domIndex
++
if
(
domIndex
===
inputs
.
length
)
{
domIndex
=
0
}
inputs
[
domIndex
].
focus
()
}
})
for
(
let
i
=
0
;
i
<
inputs
.
length
;
i
++
){
//这个index就是做个介质,来获取当前的i是第几个
inputs
[
i
].
index
=
i
;
inputs
[
i
].
onclick
=
function
()
{
domIndex
=
this
.
index
}
}
}
\ No newline at end of file
jshERP-web/src/views/bill/modules/PurchaseInModal.vue
View file @
8f30705c
...
...
@@ -51,7 +51,7 @@
</a-form-item>
</a-col>
</a-row>
<j-editable-table
<j-editable-table
id=
"purchaseInModal"
:ref=
"refKeys[0]"
:loading=
"materialTable.loading"
:columns=
"materialTable.columns"
...
...
@@ -178,7 +178,7 @@
import
{
FormTypes
}
from
'
@/utils/JEditableTableUtil
'
import
{
JEditableTableMixin
}
from
'
@/mixins/JEditableTableMixin
'
import
{
BillModalMixin
}
from
'
../mixins/BillModalMixin
'
import
{
getMpListShort
,
changeListFmtMinus
,
handleIntroJs
}
from
"
@/utils/util
"
import
{
getMpListShort
,
changeListFmtMinus
,
handleIntroJs
,
autoJumpNextInput
}
from
"
@/utils/util
"
import
{
getAction
}
from
'
@/api/manage
'
import
JUpload
from
'
@/components/jeecg/JUpload
'
import
JDate
from
'
@/components/jeecg/JDate
'
...
...
@@ -324,6 +324,9 @@
let
url
=
this
.
readOnly
?
this
.
url
.
detailList
:
this
.
url
.
detailList
;
this
.
requestSubTableData
(
url
,
params
,
this
.
materialTable
);
}
this
.
$nextTick
(()
=>
{
autoJumpNextInput
(
'
purchaseInModal
'
)
})
//复制新增单据-初始化单号和日期
if
(
this
.
action
===
'
copyAdd
'
)
{
this
.
model
.
id
=
''
...
...
jshERP-web/src/views/material/modules/MaterialModal.vue
View file @
8f30705c
...
...
@@ -18,7 +18,7 @@
<a-form
:form=
"form"
>
<a-tabs
default-active-key=
"1"
>
<a-tab-pane
key=
"1"
tab=
"基本信息"
forceRender
>
<a-row
class=
"form-row"
:gutter=
"24"
>
<a-row
class=
"form-row"
:gutter=
"24"
id=
"materialHeadModal"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
data-step=
"1"
data-title=
"名称"
data-intro=
"名称必填,可以重复"
>
<a-input
placeholder=
"请输入名称"
v-decorator.trim=
"[ 'name', validatorRules.name]"
/>
...
...
@@ -167,7 +167,7 @@
</a-col>
</a-row>
</a-card>
<div
style=
"margin-top:8px;"
>
<div
style=
"margin-top:8px;"
id=
"materialDetailModal"
>
<j-editable-table
ref=
"editableMeTable"
:loading=
"meTable.loading"
...
...
@@ -262,7 +262,7 @@
import
JEditableTable
from
'
@/components/jeecg/JEditableTable
'
import
{
FormTypes
,
VALIDATE_NO_PASSED
,
getRefPromise
,
validateFormAndTables
}
from
'
@/utils/JEditableTableUtil
'
import
{
queryMaterialCategoryTreeList
,
checkMaterial
,
checkMaterialBarCode
,
getAllMaterialAttribute
,
getMaxBarCode
}
from
'
@/api/api
'
import
{
handleIntroJs
}
from
"
@/utils/util
"
import
{
handleIntroJs
,
autoJumpNextInput
}
from
"
@/utils/util
"
import
{
httpAction
,
getAction
}
from
'
@/api/manage
'
import
JImageUpload
from
'
@/components/jeecg/JImageUpload
'
import
JDate
from
'
@/components/jeecg/JDate
'
...
...
@@ -433,6 +433,8 @@
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
name
'
,
'
standard
'
,
'
unit
'
,
'
unitId
'
,
'
model
'
,
'
color
'
,
'
categoryId
'
,
'
enableSerialNumber
'
,
'
enableBatchNumber
'
,
'
expiryNum
'
,
'
safetyStock
'
,
'
remark
'
,
'
mfrs
'
,
'
otherField1
'
,
'
otherField2
'
,
'
otherField3
'
))
autoJumpNextInput
(
'
materialHeadModal
'
)
autoJumpNextInput
(
'
materialDetailModal
'
)
});
this
.
initMaterialAttribute
()
// 加载子表数据
...
...
jshERP-web/src/views/system/modules/AccountModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"accountModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
>
<a-input
placeholder=
"请输入名称"
v-decorator.trim=
"[ 'name', validatorRules.name]"
/>
</a-form-item>
...
...
@@ -38,6 +38,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addAccount
,
editAccount
,
checkAccount
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
AccountModal
"
,
data
()
{
...
...
@@ -84,6 +85,7 @@
this
.
visible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
name
'
,
'
serialNo
'
,
'
initialAmount
'
,
'
currentAmount
'
,
'
remark
'
))
autoJumpNextInput
(
'
accountModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/CustomerModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"customerModal"
>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
>
<a-input
placeholder=
"请输入名称"
v-decorator.trim=
"[ 'supplier', validatorRules.supplier]"
/>
...
...
@@ -93,6 +93,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addSupplier
,
editSupplier
,
checkSupplier
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
CustomerModal
"
,
data
()
{
...
...
@@ -136,6 +137,7 @@
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
supplier
'
,
'
contacts
'
,
'
telephone
'
,
'
email
'
,
'
telephone
'
,
'
phoneNum
'
,
'
fax
'
,
'
beginNeedGet
'
,
'
beginNeedPay
'
,
'
allNeedGet
'
,
'
allNeedPay
'
,
'
taxNum
'
,
'
taxRate
'
,
'
bankName
'
,
'
accountNumber
'
,
'
address
'
,
'
description
'
))
autoJumpNextInput
(
'
customerModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/DepotModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"depotModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"仓库名称"
>
<a-input
placeholder=
"请输入仓库名称"
v-decorator.trim=
"[ 'name', validatorRules.name]"
/>
</a-form-item>
...
...
@@ -48,6 +48,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addDepot
,
editDepot
,
checkDepot
,
getUserList
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
DepotModal
"
,
data
()
{
...
...
@@ -91,6 +92,7 @@
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
name
'
,
'
address
'
,
'
warehousing
'
,
'
truckage
'
,
'
principal
'
,
'
sort
'
,
'
remark
'
))
autoJumpNextInput
(
'
depotModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/FunctionModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"functionModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"编号"
>
<a-input
placeholder=
"请输入编号"
v-decorator.trim=
"[ 'number', validatorRules.number]"
/>
</a-form-item>
...
...
@@ -50,6 +50,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addFunction
,
editFunction
,
checkFunction
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
import
JSelectMultiple
from
'
@/components/jeecg/JSelectMultiple
'
export
default
{
name
:
"
FunctionModal
"
,
...
...
@@ -123,6 +124,7 @@
}
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
number
'
,
'
name
'
,
'
parentNumber
'
,
'
url
'
,
'
component
'
,
'
sort
'
,
'
pushBtn
'
,
'
icon
'
,
'
enabled
'
))
autoJumpNextInput
(
'
functionModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/InOutItemModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"inOutItemModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
>
<a-input
placeholder=
"请输入名称"
v-decorator.trim=
"[ 'name', validatorRules.name]"
/>
</a-form-item>
...
...
@@ -35,6 +35,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addInOutItem
,
editInOutItem
,
checkInOutItem
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
InOutItemModal
"
,
data
()
{
...
...
@@ -80,6 +81,7 @@
this
.
visible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
name
'
,
'
type
'
,
'
remark
'
))
autoJumpNextInput
(
'
inOutItemModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/MemberModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"memberModal"
>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
>
<a-input
placeholder=
"请输入名称"
v-decorator.trim=
"[ 'supplier', validatorRules.supplier]"
/>
...
...
@@ -53,6 +53,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addSupplier
,
editSupplier
,
checkSupplier
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
MemberModal
"
,
data
()
{
...
...
@@ -95,6 +96,7 @@
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
supplier
'
,
'
contacts
'
,
'
telephone
'
,
'
email
'
,
'
telephone
'
,
'
phoneNum
'
,
'
description
'
))
autoJumpNextInput
(
'
memberModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/OrganizationModal.vue
View file @
8f30705c
...
...
@@ -11,7 +11,7 @@
cancelText="关闭">
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"organizationModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
>
<a-input
placeholder=
"请输入名称"
v-decorator=
"['orgAbr', validatorRules.orgAbr ]"
/>
</a-form-item>
...
...
@@ -38,6 +38,7 @@
<
script
>
import
{
httpAction
}
from
'
@/api/manage
'
import
{
queryOrganizationTreeList
,
checkOrganization
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
import
pick
from
'
lodash.pick
'
import
ATextarea
from
'
ant-design-vue/es/input/TextArea
'
export
default
{
...
...
@@ -107,6 +108,7 @@
this
.
loadTreeData
();
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
record
,
'
orgAbr
'
,
'
orgNo
'
,
'
parentId
'
,
'
sort
'
,
'
remark
'
))
autoJumpNextInput
(
'
organizationModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/PasswordModal.vue
View file @
8f30705c
<
template
>
<a-modal
title=
"重新设定密码"
:width=
"800"
:visible=
"visible"
:confirmLoading=
"confirmLoading"
@
ok=
"handleSubmit"
@
cancel=
"handleCancel"
cancelText=
"关闭"
style=
"top:20px;"
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form-item
label=
"用户账号"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-input
placeholder=
"请输入用户账号"
v-decorator=
"[ 'username',
{}]" :readOnly="true"/>
</a-form-item>
<a-form-item
label=
"登陆密码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
hasFeedback
>
<a-input
type=
"password"
placeholder=
"请输入登陆密码"
v-decorator=
"[ 'password', validatorRules.password]"
/>
</a-form-item>
<a-form-item
label=
"确认密码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
hasFeedback
>
<a-input
type=
"password"
@
blur=
"handleConfirmBlur"
placeholder=
"请重新输入登陆密码"
v-decorator=
"[ 'confirmpassword', validatorRules.confirmpassword]"
/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</
template
>
<
script
>
import
{
changePassword
}
from
'
@/api/api
'
export
default
{
name
:
"
PasswordModal
"
,
data
()
{
return
{
visible
:
false
,
confirmLoading
:
false
,
confirmDirty
:
false
,
validatorRules
:{
password
:{
rules
:
[{
required
:
true
,
pattern
:
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)(?=
.*
[
~!@#$%^&*()_+`
\-
={}:";'<>?,.
/])
.
{8,}
$/
,
message
:
'
密码由8位数字、大小写字母和特殊符号组成!
'
},
{
validator
:
this
.
validateToNextPassword
,
}],
},
confirmpassword
:{
rules
:
[{
required
:
true
,
message
:
'
请重新输入登陆密码!
'
,
},
{
validator
:
this
.
compareToFirstPassword
,
}],
},
},
model
:
{},
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
},
form
:
this
.
$form
.
createForm
(
this
)
}
},
created
()
{
console
.
log
(
"
created
"
);
},
methods
:
{
show
(
username
)
{
this
.
form
.
resetFields
();
this
.
visible
=
true
;
this
.
model
.
username
=
username
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
username
:
username
});
});
},
close
()
{
this
.
$emit
(
'
close
'
);
this
.
visible
=
false
;
this
.
disableSubmit
=
false
;
this
.
selectedRole
=
[];
},
handleSubmit
()
{
// 触发表单验证
this
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
this
.
confirmLoading
=
true
;
let
formData
=
Object
.
assign
(
this
.
model
,
values
);
changePassword
(
formData
).
then
((
res
)
=>
{
if
(
res
.
success
){
this
.
$message
.
success
(
res
.
message
);
this
.
$emit
(
'
ok
'
);
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
}).
finally
(()
=>
{
this
.
confirmLoading
=
false
;
this
.
close
();
});
}
})
},
handleCancel
()
{
this
.
close
()
},
validateToNextPassword
(
rule
,
value
,
callback
)
{
const
form
=
this
.
form
;
const
confirmpassword
=
form
.
getFieldValue
(
'
confirmpassword
'
);
console
.
log
(
"
confirmpassword==>
"
,
confirmpassword
);
if
(
value
&&
confirmpassword
&&
value
!==
confirmpassword
)
{
callback
(
'
两次输入的密码不一样!
'
);
}
if
(
value
&&
this
.
confirmDirty
)
{
form
.
validateFields
([
'
confirm
'
],
{
force
:
true
})
}
callback
();
},
compareToFirstPassword
(
rule
,
value
,
callback
)
{
const
form
=
this
.
form
;
if
(
value
&&
value
!==
form
.
getFieldValue
(
'
password
'
))
{
callback
(
'
两次输入的密码不一样!
'
);
}
else
{
callback
()
}
},
handleConfirmBlur
(
e
)
{
const
value
=
e
.
target
.
value
this
.
confirmDirty
=
this
.
confirmDirty
||
!!
value
}
}
}
<
template
>
<a-modal
title=
"重新设定密码"
:width=
"800"
:visible=
"visible"
:confirmLoading=
"confirmLoading"
@
ok=
"handleSubmit"
@
cancel=
"handleCancel"
cancelText=
"关闭"
style=
"top:20px;"
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
id=
"passwordModal"
>
<a-form-item
label=
"用户账号"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-input
placeholder=
"请输入用户账号"
v-decorator=
"[ 'username',
{}]" :readOnly="true"/>
</a-form-item>
<a-form-item
label=
"登陆密码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
hasFeedback
>
<a-input
type=
"password"
placeholder=
"请输入登陆密码"
v-decorator=
"[ 'password', validatorRules.password]"
/>
</a-form-item>
<a-form-item
label=
"确认密码"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
hasFeedback
>
<a-input
type=
"password"
@
blur=
"handleConfirmBlur"
placeholder=
"请重新输入登陆密码"
v-decorator=
"[ 'confirmpassword', validatorRules.confirmpassword]"
/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</
template
>
<
script
>
import
{
changePassword
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
PasswordModal
"
,
data
()
{
return
{
visible
:
false
,
confirmLoading
:
false
,
confirmDirty
:
false
,
validatorRules
:{
password
:{
rules
:
[{
required
:
true
,
pattern
:
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)(?=
.*
[
~!@#$%^&*()_+`
\-
={}:";'<>?,.
/])
.
{8,}
$/
,
message
:
'
密码由8位数字、大小写字母和特殊符号组成!
'
},
{
validator
:
this
.
validateToNextPassword
,
}],
},
confirmpassword
:{
rules
:
[{
required
:
true
,
message
:
'
请重新输入登陆密码!
'
,
},
{
validator
:
this
.
compareToFirstPassword
,
}],
},
},
model
:
{},
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
16
},
},
form
:
this
.
$form
.
createForm
(
this
)
}
},
created
()
{
console
.
log
(
"
created
"
);
},
methods
:
{
show
(
username
)
{
this
.
form
.
resetFields
();
this
.
visible
=
true
;
this
.
model
.
username
=
username
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
({
username
:
username
});
autoJumpNextInput
(
'
passwordModal
'
)
});
},
close
()
{
this
.
$emit
(
'
close
'
);
this
.
visible
=
false
;
this
.
disableSubmit
=
false
;
this
.
selectedRole
=
[];
},
handleSubmit
()
{
// 触发表单验证
this
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
this
.
confirmLoading
=
true
;
let
formData
=
Object
.
assign
(
this
.
model
,
values
);
changePassword
(
formData
).
then
((
res
)
=>
{
if
(
res
.
success
){
this
.
$message
.
success
(
res
.
message
);
this
.
$emit
(
'
ok
'
);
}
else
{
this
.
$message
.
warning
(
res
.
message
);
}
}).
finally
(()
=>
{
this
.
confirmLoading
=
false
;
this
.
close
();
});
}
})
},
handleCancel
()
{
this
.
close
()
},
validateToNextPassword
(
rule
,
value
,
callback
)
{
const
form
=
this
.
form
;
const
confirmpassword
=
form
.
getFieldValue
(
'
confirmpassword
'
);
console
.
log
(
"
confirmpassword==>
"
,
confirmpassword
);
if
(
value
&&
confirmpassword
&&
value
!==
confirmpassword
)
{
callback
(
'
两次输入的密码不一样!
'
);
}
if
(
value
&&
this
.
confirmDirty
)
{
form
.
validateFields
([
'
confirm
'
],
{
force
:
true
})
}
callback
();
},
compareToFirstPassword
(
rule
,
value
,
callback
)
{
const
form
=
this
.
form
;
if
(
value
&&
value
!==
form
.
getFieldValue
(
'
password
'
))
{
callback
(
'
两次输入的密码不一样!
'
);
}
else
{
callback
()
}
},
handleConfirmBlur
(
e
)
{
const
value
=
e
.
target
.
value
this
.
confirmDirty
=
this
.
confirmDirty
||
!!
value
}
}
}
</
script
>
\ No newline at end of file
jshERP-web/src/views/system/modules/PersonModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"personModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"姓名"
>
<a-input
placeholder=
"请输入姓名"
v-decorator.trim=
"[ 'name', validatorRules.name]"
/>
</a-form-item>
...
...
@@ -33,6 +33,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addPerson
,
editPerson
,
checkPerson
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
PersonModal
"
,
data
()
{
...
...
@@ -78,6 +79,7 @@
this
.
visible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
name
'
,
'
type
'
,
'
description
'
))
autoJumpNextInput
(
'
personModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/RoleModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"roleModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"角色名称"
>
<a-input
placeholder=
"请输入角色名称"
v-decorator.trim=
"[ 'name', validatorRules.name]"
/>
</a-form-item>
...
...
@@ -36,6 +36,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addRole
,
editRole
,
checkRole
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
RoleModal
"
,
data
()
{
...
...
@@ -87,6 +88,7 @@
this
.
visible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
name
'
,
'
type
'
,
'
description
'
))
autoJumpNextInput
(
'
roleModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/SystemConfigModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"systemConfigModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"公司名称"
>
<a-input
placeholder=
"请输入公司名称"
v-decorator.trim=
"[ 'companyName', validatorRules.companyName]"
/>
</a-form-item>
...
...
@@ -53,6 +53,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addSystemConfig
,
editSystemConfig
,
checkSystemConfig
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
SystemConfigModal
"
,
data
()
{
...
...
@@ -110,6 +111,7 @@
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
companyName
'
,
'
companyContacts
'
,
'
companyAddress
'
,
'
companyTel
'
,
'
companyFax
'
,
'
companyPostCode
'
,
'
depotFlag
'
,
'
customerFlag
'
,
'
minusStockFlag
'
))
autoJumpNextInput
(
'
systemConfigModal
'
)
});
if
(
record
.
id
)
{
if
(
record
.
depotFlag
!=
null
)
{
...
...
jshERP-web/src/views/system/modules/UnitModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"unitModal"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"基本单位"
>
<a-input
placeholder=
"请输入基本单位(小单位)"
v-decorator.trim=
"[ 'basicUnit', validatorRules.basicUnit]"
/>
</a-form-item>
...
...
@@ -36,6 +36,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addUnit
,
editUnit
,
checkUnit
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
UnitModal
"
,
data
()
{
...
...
@@ -85,6 +86,7 @@
this
.
visible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
basicUnit
'
,
'
otherUnit
'
,
'
ratio
'
))
autoJumpNextInput
(
'
unitModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/UserModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"userModal"
>
<a-form-item
label=
"登录名称"
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
>
<a-input
placeholder=
"请输入登录名称"
v-decorator.trim=
"[ 'loginName', validatorRules.loginName]"
:readOnly=
"!!model.id"
suffix=
"初始密码:123456"
/>
...
...
@@ -64,6 +64,7 @@
import
{
addUser
,
editUser
,
queryOrganizationTreeList
,
roleAllList
}
from
'
@/api/api
'
import
{
disabledAuthFilter
}
from
"
@/utils/authFilter
"
import
{
duplicateCheck
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
import
JImageUpload
from
'
../../../components/jeecg/JImageUpload
'
export
default
{
name
:
"
UserModal
"
,
...
...
@@ -133,6 +134,7 @@
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
loginName
'
,
'
username
'
,
'
roleId
'
,
'
orgaId
'
,
'
position
'
,
'
phonenum
'
,
'
email
'
,
'
userBlngOrgaDsplSeq
'
,
'
description
'
))
autoJumpNextInput
(
'
userModal
'
)
});
},
close
()
{
...
...
jshERP-web/src/views/system/modules/VendorModal.vue
View file @
8f30705c
...
...
@@ -15,7 +15,7 @@
</a-button>
</
template
>
<a-spin
:spinning=
"confirmLoading"
>
<a-form
:form=
"form"
>
<a-form
:form=
"form"
id=
"vendorModal"
>
<a-col
:span=
"24/2"
>
<a-form-item
:labelCol=
"labelCol"
:wrapperCol=
"wrapperCol"
label=
"名称"
>
<a-input
placeholder=
"请输入名称"
v-decorator.trim=
"[ 'supplier', validatorRules.supplier]"
/>
...
...
@@ -93,6 +93,7 @@
<
script
>
import
pick
from
'
lodash.pick
'
import
{
addSupplier
,
editSupplier
,
checkSupplier
}
from
'
@/api/api
'
import
{
autoJumpNextInput
}
from
"
@/utils/util
"
export
default
{
name
:
"
VendorModal
"
,
data
()
{
...
...
@@ -136,6 +137,7 @@
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
supplier
'
,
'
contacts
'
,
'
telephone
'
,
'
email
'
,
'
telephone
'
,
'
phoneNum
'
,
'
fax
'
,
'
beginNeedGet
'
,
'
beginNeedPay
'
,
'
allNeedGet
'
,
'
allNeedPay
'
,
'
taxNum
'
,
'
taxRate
'
,
'
bankName
'
,
'
accountNumber
'
,
'
address
'
,
'
description
'
))
autoJumpNextInput
(
'
vendorModal
'
)
});
},
close
()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment