批量开票、开票邮寄图标需求变更,密码禁止粘贴
This commit is contained in:
@@ -7,8 +7,7 @@
|
||||
:title="currentTitle"
|
||||
arrow-point-at-center
|
||||
:mouse-enter-delay="0.1"
|
||||
@visibleChange="visibleChange"
|
||||
>
|
||||
@visibleChange="visibleChange">
|
||||
<img :src="status" @click="s"/>
|
||||
</a-tooltip>
|
||||
</template>
|
||||
@@ -32,7 +31,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
currentTitle: ' ', // 气泡中显示的文字,必须有内容,否则dom选择时不会解析
|
||||
hasInfo: false, // 是否有详情信息可以显示,即是否通过接口请求过数据
|
||||
hasInfo: false // 是否有详情信息可以显示,即是否通过接口请求过数据
|
||||
}
|
||||
},
|
||||
props: {
|
||||
@@ -50,7 +49,7 @@ export default {
|
||||
statusType: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default:false
|
||||
default: false
|
||||
},
|
||||
/*
|
||||
* 具体的状态值
|
||||
@@ -60,8 +59,8 @@ export default {
|
||||
required: false
|
||||
},
|
||||
// 当前需要转换key的属性, 悬浮显示实际具体内容信息时需要
|
||||
// paymentRecord 来款 mail -- 邮寄 bill--邮寄
|
||||
statusKey:{
|
||||
// paymentRecord 来款 mail -- 邮寄 bill--开票
|
||||
statusKey: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'paymentRecord'
|
||||
@@ -76,32 +75,37 @@ export default {
|
||||
computed: {
|
||||
// eslint-disable-next-line vue/return-in-computed-property
|
||||
status() {
|
||||
if (this.statuObj.amountReceivable === '0.00' || this.statuObj.receivableAmount === '0.00' ) {
|
||||
if(this.statusType){
|
||||
if (this.statuObj.amountReceivable === '0.00' || this.statuObj.receivableAmount === '0.00') {
|
||||
if (this.statusType) {
|
||||
// 应收金额为0 未到账 未邮寄 未开票的状态
|
||||
return zero
|
||||
}else {
|
||||
} else {
|
||||
// 应收金额为0 打包 与需要开票的状态
|
||||
if(this.statusNo === 0 ){
|
||||
if (this.statusNo === 0) {
|
||||
return error
|
||||
}else if(this.statusNo === 1){
|
||||
} else if (this.statusNo === 1) {
|
||||
return finished
|
||||
}else if(this.statusNo === 2){
|
||||
} else if (this.statusNo === 2) {
|
||||
return half
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
} else {
|
||||
// 应收金额不为0 都正常判断
|
||||
if(this.statusNo === 0 ){
|
||||
return error
|
||||
}else if(this.statusNo === 1){
|
||||
if (this.statusNo === 0) {
|
||||
// 开票或邮寄时,不需要发票
|
||||
if ((this.statusKey === 'bill' || this.statusKey === 'mail') && this.statuObj.needInvoice === 0) {
|
||||
return zero
|
||||
} else {
|
||||
return error
|
||||
}
|
||||
} else if (this.statusNo === 1) {
|
||||
return finished
|
||||
}else if(this.statusNo === 2){
|
||||
} else if (this.statusNo === 2) {
|
||||
// 如果不是打包和需要发票
|
||||
if(this.statusType){
|
||||
if (this.statusType) {
|
||||
return half
|
||||
}else {
|
||||
} else {
|
||||
return finished
|
||||
}
|
||||
}
|
||||
@@ -110,11 +114,14 @@ export default {
|
||||
// 操作返回数据的key值,此处是根据业务逻辑处理的
|
||||
opeStatusKey() {
|
||||
let result = this.statusKey
|
||||
if(this.statusKey === 'mail' || this.statusKey === 'bill') {
|
||||
if (this.statusKey === 'mail' || this.statusKey === 'bill') {
|
||||
result = 'mailBill'
|
||||
}
|
||||
return result
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
s() {
|
||||
@@ -123,9 +130,9 @@ export default {
|
||||
visibleChange(visible) {
|
||||
// 到账、开票、邮寄 的时候,请求接口获得相应的数据
|
||||
// 判断条件 tooltip显示、 有不同的统计状态,统计状态值不为0 没有请求过详情数据
|
||||
if(visible && this.statusType && this.statusNo && !this.hasInfo) {
|
||||
this.getInfoFunc({id: this.statuObj.id}).then(res =>{
|
||||
if(res.success) {
|
||||
if (visible && this.statusType && this.statusNo && !this.hasInfo) {
|
||||
this.getInfoFunc({ id: this.statuObj.id }).then(res => {
|
||||
if (res.success) {
|
||||
let arr = res.result[this.opeStatusKey] || []
|
||||
let result = []
|
||||
arr.map(tt => {
|
||||
@@ -147,12 +154,12 @@ export default {
|
||||
let result = ''
|
||||
console.log(item)
|
||||
// 来款
|
||||
if(this.statusKey === 'paymentRecord') {
|
||||
result = `${item.paymentDate}到账${item.amountReceived}`
|
||||
} else if(this.statusKey === 'bill') {
|
||||
result = `${item.billDate}新增发票,发票单号:${item.billNo}`
|
||||
} else if(this.statusKey === 'mail') {
|
||||
result = `${item.sendDate}新增邮寄信息,邮寄单号:${item.postNo}`
|
||||
if (this.statusKey === 'paymentRecord') {
|
||||
result = `${ item.paymentDate }到账${ item.amountReceived }`
|
||||
} else if (this.statusKey === 'bill') {
|
||||
result = `${ item.billDate }新增发票,发票单号:${ item.billNo }`
|
||||
} else if (this.statusKey === 'mail') {
|
||||
result = `${ item.sendDate }新增邮寄信息,邮寄单号:${ item.postNo }`
|
||||
}
|
||||
return result
|
||||
}
|
||||
@@ -165,7 +172,7 @@ export default {
|
||||
</style>
|
||||
<style>
|
||||
/* 自定义tooltip下样式问题*/
|
||||
.status-tooltip .ant-tooltip-inner{
|
||||
white-space: pre-wrap!important;
|
||||
.status-tooltip .ant-tooltip-inner {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -14,22 +14,35 @@
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
label="旧密码">
|
||||
<a-input type="password" placeholder="请输入旧密码" v-decorator="[ 'oldpassword', validatorRules.oldpassword]" />
|
||||
<a-input type="password" placeholder="请输入旧密码" v-decorator="[ 'oldpassword', validatorRules.oldpassword]"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="新密码">
|
||||
<a-input type="password" placeholder="请输入新密码" v-decorator="[ 'password', validatorRules.password]" />
|
||||
<a-input
|
||||
type="password"
|
||||
placeholder="请输入新密码"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
v-decorator="[ 'password', validatorRules.password]"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="确认新密码">
|
||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请确认新密码" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
||||
<a-input
|
||||
type="password"
|
||||
@blur="handleConfirmBlur"
|
||||
placeholder="请确认新密码"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
||||
</a-form-item>
|
||||
|
||||
</a-form>
|
||||
@@ -39,116 +52,125 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { putAction } from '@/api/manage'
|
||||
import { putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'UserPassword',
|
||||
data () {
|
||||
return {
|
||||
title:'修改密码',
|
||||
modalWidth:800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
validatorRules:{
|
||||
oldpassword:{
|
||||
rules: [{
|
||||
required: true, message: '请输入旧密码!',
|
||||
}],
|
||||
},
|
||||
password:{
|
||||
rules: [
|
||||
{ required: true, message: '请输入新密码!' },
|
||||
{ pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!'},
|
||||
{ validator: this.validateToNextPassword }
|
||||
]
|
||||
},
|
||||
confirmpassword:{
|
||||
rules: [
|
||||
{ required: true, message: '请确认新密码!' },
|
||||
{ pattern:/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/, message: '密码由8位数字、大小写字母和特殊符号组成!'},
|
||||
{ validator: this.validateToNextPassword }
|
||||
]
|
||||
}
|
||||
export default {
|
||||
name: 'UserPassword',
|
||||
data() {
|
||||
return {
|
||||
title: '修改密码',
|
||||
modalWidth: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
validatorRules: {
|
||||
oldpassword: {
|
||||
rules: [{
|
||||
required: true, message: '请输入旧密码!'
|
||||
}]
|
||||
},
|
||||
confirmDirty:false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 },
|
||||
password: {
|
||||
rules: [
|
||||
{ required: true, message: '请输入新密码!' },
|
||||
{
|
||||
pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||
message: '密码由8位数字、大小写字母和特殊符号组成!'
|
||||
},
|
||||
{ validator: this.validateToNextPassword }
|
||||
]
|
||||
},
|
||||
confirmpassword: {
|
||||
rules: [
|
||||
{ required: true, message: '请确认新密码!' },
|
||||
{
|
||||
pattern: /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,./]).{8,}$/,
|
||||
message: '密码由8位数字、大小写字母和特殊符号组成!'
|
||||
},
|
||||
{ validator: this.validateToNextPassword }
|
||||
]
|
||||
}
|
||||
},
|
||||
confirmDirty: false,
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
},
|
||||
|
||||
form:this.$form.createForm(this),
|
||||
url: 'sys/user/updatePassword',
|
||||
username:'',
|
||||
form: this.$form.createForm(this),
|
||||
url: 'sys/user/updatePassword',
|
||||
username: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(uname) {
|
||||
if (!uname) {
|
||||
this.$message.warning('当前系统无登录用户!')
|
||||
return
|
||||
} else {
|
||||
this.username = uname
|
||||
this.form.resetFields()
|
||||
this.visible = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(uname){
|
||||
if(!uname){
|
||||
this.$message.warning('当前系统无登录用户!')
|
||||
return
|
||||
}else{
|
||||
this.username = uname
|
||||
this.form.resetFields()
|
||||
this.visible = true
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.disableSubmit = false
|
||||
this.selectedRole = []
|
||||
},
|
||||
handleOk() {
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let params = Object.assign({ username: this.username }, values)
|
||||
console.log('修改密码提交数据', params)
|
||||
putAction(this.url, params).then((res) => {
|
||||
if (res.success) {
|
||||
console.log(res)
|
||||
that.$message.success(res.message)
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.disableSubmit = false
|
||||
this.selectedRole = []
|
||||
},
|
||||
handleOk () {
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let params = Object.assign({username:this.username},values)
|
||||
console.log('修改密码提交数据',params)
|
||||
putAction(this.url,params).then((res)=>{
|
||||
if(res.success){
|
||||
console.log(res)
|
||||
that.$message.success(res.message)
|
||||
that.close()
|
||||
}else{
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
validateToNextPassword (rule, value, callback) {
|
||||
const form = this.form
|
||||
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
|
||||
})
|
||||
},
|
||||
validateToNextPassword(rule, value, callback) {
|
||||
const form = this.form
|
||||
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
|
||||
},
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -339,7 +339,10 @@ export default {
|
||||
})
|
||||
// 选中项目非同一企业
|
||||
if (!isAllEqual(companyArr)) {
|
||||
reject('请选择来款单位为同一企业的项目合并开票')
|
||||
reject('请选择来款单位为同一企业的项目合并开票!')
|
||||
}
|
||||
if (arr.some(item => item.invoiceAmount && Number(item.invoiceAmount) === Number(item.receivableAmount))) {
|
||||
reject('存在已完成开票的项目!')
|
||||
}
|
||||
this.selectedCompany = {
|
||||
id: arr[0].chargeCompanyId,
|
||||
|
||||
@@ -30,11 +30,13 @@
|
||||
<template v-if="!model.id">
|
||||
<a-form-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input type="password" placeholder="请输入登录密码" :maxLength="50" autocomplete='new-password'
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
@change="event => event.target.value = event.target.value.trim()" :disabled="disableSubmit" v-decorator="[ 'password',validatorRules.password]"/>
|
||||
</a-form-item>
|
||||
|
||||
<a-form-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input type="password" @blur="handleConfirmBlur" :maxLength="50" placeholder="请输入确认密码" :disabled="disableSubmit"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
@change="event => event.target.value = event.target.value.trim()" v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>
|
||||
</a-form-item>
|
||||
</template>
|
||||
@@ -699,6 +701,10 @@ export default {
|
||||
} else {
|
||||
this.departIdShow = true
|
||||
}
|
||||
},
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
type="password"
|
||||
autocomplete="false"
|
||||
placeholder="请输入密码"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
>
|
||||
<a-icon slot="prefix" type="lock" :style="{ color: '#B3B7C2',fontSize:'20px' }"/>
|
||||
</a-input>
|
||||
@@ -307,6 +308,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
<a-input
|
||||
placeholder="请输入新密码"
|
||||
v-decorator="['password', { rules: validatorRules.password.rules}]"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
type="password">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -89,6 +91,7 @@
|
||||
placeholder="请输入确认密码"
|
||||
v-decorator="['confirmPassword', { rules: validatorRules.confirmPassword.rules}]"
|
||||
type="password"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -265,7 +268,11 @@ export default {
|
||||
getRSAPublicKey().then(res => {
|
||||
this.rsaPublicKey = res.result
|
||||
})
|
||||
}
|
||||
},
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user