|
|
@ -2,6 +2,7 @@ |
|
|
|
<!-- width="55%" --> |
|
|
|
<!-- width="55%" --> |
|
|
|
<!-- class="2xl:w-screen xl:w-screen lg:w-full md:w-full h-auto 2xl:left-72" --> |
|
|
|
<!-- class="2xl:w-screen xl:w-screen lg:w-full md:w-full h-auto 2xl:left-72" --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 这个是自己封装的提示组件, 用于系统录入中弹出的授权弹框 业务需求是:有些业务需要授权,有些业务不需要授权。 --> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
<el-dialog |
|
|
|
:visible="visible" |
|
|
|
:visible="visible" |
|
|
@ -19,12 +20,15 @@ |
|
|
|
<div class="data-title" v-else-if="flow === 4">提交</div> |
|
|
|
<div class="data-title" v-else-if="flow === 4">提交</div> |
|
|
|
<div class="data-title" v-else>{{ successName }}</div> |
|
|
|
<div class="data-title" v-else>{{ successName }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 需要授权时,父组件传进的flow为1 --> |
|
|
|
<div class="popBody" v-if="flow === 1"> |
|
|
|
<div class="popBody" v-if="flow === 1"> |
|
|
|
<h2 class="text-red-500 text-2xl">本业务需要授权</h2> |
|
|
|
<h2 class="text-red-500 text-2xl">本业务需要授权</h2> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 不需要授权时,父组件传进的flow为4 --> |
|
|
|
<div class="popBody" v-else-if="flow === 4"> |
|
|
|
<div class="popBody" v-else-if="flow === 4"> |
|
|
|
<h2 class="text-red-500 text-2xl">提交后将不可更改,您确定要提交吗?</h2> |
|
|
|
<h2 class="text-red-500 text-2xl">提交后将不可更改,您确定要提交吗?</h2> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 上面说的需要授权的flow为1,点击确认后flow变为2,弹出授权柜员的账号和密码 --> |
|
|
|
<div class="popBody" v-else-if="flow === 2"> |
|
|
|
<div class="popBody" v-else-if="flow === 2"> |
|
|
|
<el-form ref="form2" :model="disForm" label-width="200px" > |
|
|
|
<el-form ref="form2" :model="disForm" label-width="200px" > |
|
|
|
<el-form-item label="授权柜员"> |
|
|
|
<el-form-item label="授权柜员"> |
|
|
@ -35,6 +39,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 不管授权与否,最后一步都是展示提交的信息。 --> |
|
|
|
<div class="popBody w-full" v-else> |
|
|
|
<div class="popBody w-full" v-else> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-form label-width="200px"> |
|
|
|
<el-form label-width="200px"> |
|
|
@ -51,66 +57,16 @@ |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
|
</el-row> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 不是最后的提交信息有取消按钮,只要点击取消就不会发送请求给后端 --> |
|
|
|
<div class="popBtns" v-if="flow === 1 || flow === 2 || flow === 4"> |
|
|
|
<div class="popBtns" v-if="flow === 1 || flow === 2 || flow === 4"> |
|
|
|
<el-button class="close btn hover:bg-blue-100 " @click="cancelIt">取 消</el-button> |
|
|
|
<el-button class="close btn hover:bg-blue-100 " @click="cancelIt">取 消</el-button> |
|
|
|
<el-button class="sure btn hover:bg-blue-700 " type="primary" @click="sureIt">确 定</el-button> |
|
|
|
<el-button class="sure btn hover:bg-blue-700 " type="primary" @click="sureIt">确 定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 展示信息的弹框没有取消按钮,此时已经发送请求给后端了 --> |
|
|
|
<div class="myPopBtns" v-else> |
|
|
|
<div class="myPopBtns" v-else> |
|
|
|
<el-button class="sure btn hover:bg-blue-700 " type="primary" @click="sureIt">确 定</el-button> |
|
|
|
<el-button class="sure btn hover:bg-blue-700 " type="primary" @click="sureIt">确 定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <div width="900px" class="data-dia23 max-h-screen 2xl:-mt-20;" ref="dataDia" v-drag> |
|
|
|
|
|
|
|
<div class="dia-header"> |
|
|
|
|
|
|
|
<div class="data-title" v-if="flow === 1 || flow === 2">授权</div> |
|
|
|
|
|
|
|
<div class="data-title" v-else>提交成功</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="popBody w-full" v-if="flow === 1"> |
|
|
|
|
|
|
|
<h2 class="text-red-500 text-2xl">本业务需要授权</h2> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="popBody" v-else-if="flow === 4"> |
|
|
|
|
|
|
|
<h2 class="text-red-500 text-2xl">提交后将不可更改,您确认提交吗?</h2> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="popBody" v-else-if="flow === 2"> |
|
|
|
|
|
|
|
<el-form ref="form2" :model="disForm" label-width="80px"> |
|
|
|
|
|
|
|
<el-form-item label="授权柜员"> |
|
|
|
|
|
|
|
<el-input disabled v-model="disForm.name"></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label="授权柜员"> |
|
|
|
|
|
|
|
<el-input type="password" disabled v-model="disForm.pass"></el-input> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="popBody w-full" v-else> |
|
|
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
|
|
<el-form label-width="100px"> |
|
|
|
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
|
|
|
<el-form-item v-for="(val, key) in leftObj" :key="key" :label="key + ':'"> |
|
|
|
|
|
|
|
<div>{{ val }}</div> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="10" :offset="1"> |
|
|
|
|
|
|
|
<el-form-item v-for="(val, key) in rightObj" :key="key" :label="key + ':'"> |
|
|
|
|
|
|
|
<div>{{ val }}</div> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="popBtns" v-if="flow === 1 || flow === 2 || flow === 4"> |
|
|
|
|
|
|
|
<el-button class="close btn hover:bg-blue-100 " @click="cancelIt">取 消</el-button> |
|
|
|
|
|
|
|
<el-button class="sure btn hover:bg-blue-700 " type="primary" @click="sureIt">确 定</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="myPopBtns" v-else> |
|
|
|
|
|
|
|
<el-button class="sure btn hover:bg-blue-700 " type="primary" @click="sureIt">确 定</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -123,6 +79,8 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 这个obj用来识别父组件的业务名字,也就是父组件的moduleName,这样展示提交信息的框中就可以展示父组件的名字。这个组件被下列组件复用着。 |
|
|
|
const obj = { |
|
|
|
const obj = { |
|
|
|
// 'consumerClient': '/counter/list/manage/consumerClient', |
|
|
|
// 'consumerClient': '/counter/list/manage/consumerClient', |
|
|
|
// 'currentAccount/openAccount': '/counter/list/manage/currentAccount', |
|
|
|
// 'currentAccount/openAccount': '/counter/list/manage/currentAccount', |
|
|
@ -151,6 +109,8 @@ const obj = { |
|
|
|
'controlCash/cashTransferInto': '现金上缴', |
|
|
|
'controlCash/cashTransferInto': '现金上缴', |
|
|
|
'spacial': '提交' |
|
|
|
'spacial': '提交' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// nameMap对象用来展示表单中的值,因为有些值是数字,比如1代表男,2代表女,要展示给用户看。 |
|
|
|
const nameMap = { |
|
|
|
const nameMap = { |
|
|
|
sex: { |
|
|
|
sex: { |
|
|
|
1: '男', |
|
|
|
1: '男', |
|
|
@ -355,10 +315,12 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
|
|
|
|
// 如果不需要授权,flow就是4,页面展示那个不需要授权的界面。 |
|
|
|
if(!this.needAuth) { |
|
|
|
if(!this.needAuth) { |
|
|
|
this.flow = 4 |
|
|
|
this.flow = 4 |
|
|
|
} |
|
|
|
} |
|
|
|
let num = 0; |
|
|
|
let num = 0; |
|
|
|
|
|
|
|
// 这个遍历可以让表单左右两边的展示的数量相差不大于1 |
|
|
|
for(const key in this.showForm) { |
|
|
|
for(const key in this.showForm) { |
|
|
|
if(!this.showForm[key]) { |
|
|
|
if(!this.showForm[key]) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
@ -386,10 +348,8 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
num++; |
|
|
|
num++; |
|
|
|
} |
|
|
|
} |
|
|
|
// 客户号:A100000001一个字母跟9位数字随机生成不可重复、证件类型:身份证 |
|
|
|
|
|
|
|
// 、证件号码、客户名称、联系电话、通讯地址、流水号:9位数字随机生成不可重 |
|
|
|
// 拿到一个随机在流水号 |
|
|
|
// 复、经办柜员:6位数字固定使用、经办机构:7位数字固定使用、会计日期:默认 |
|
|
|
|
|
|
|
// 示当前虚拟日期)点击确定按钮收起成功提示弹窗; |
|
|
|
|
|
|
|
const tmpFunc2 = () => { |
|
|
|
const tmpFunc2 = () => { |
|
|
|
const $chars2 = '1234567890' |
|
|
|
const $chars2 = '1234567890' |
|
|
|
const maxPos = $chars2.length; |
|
|
|
const maxPos = $chars2.length; |
|
|
@ -400,7 +360,9 @@ export default { |
|
|
|
return str; |
|
|
|
return str; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(num%2 === 1) { |
|
|
|
if(num%2 === 1) { |
|
|
|
|
|
|
|
// 如果左边的项目数量和右边的一样,则每边加多两个 |
|
|
|
this.leftObj['流水号'] = tmpFunc2() |
|
|
|
this.leftObj['流水号'] = tmpFunc2() |
|
|
|
this.leftObj['经办机构'] = '国税支行营业部' |
|
|
|
this.leftObj['经办机构'] = '国税支行营业部' |
|
|
|
this.rightObj['经办柜员'] = '002110' |
|
|
|
this.rightObj['经办柜员'] = '002110' |
|
|
@ -408,6 +370,7 @@ export default { |
|
|
|
this.rightObj['定存编号'] = this.depositNumber |
|
|
|
this.rightObj['定存编号'] = this.depositNumber |
|
|
|
} |
|
|
|
} |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
|
|
|
|
// 如果左边的项目数量比右边少,则左边加3个右边加1个 |
|
|
|
this.leftObj['流水号'] = tmpFunc2() |
|
|
|
this.leftObj['流水号'] = tmpFunc2() |
|
|
|
this.leftObj['经办机构'] = '国税支行营业部' |
|
|
|
this.leftObj['经办机构'] = '国税支行营业部' |
|
|
|
this.rightObj['经办柜员'] = '002110' |
|
|
|
this.rightObj['经办柜员'] = '002110' |
|
|
@ -415,6 +378,8 @@ export default { |
|
|
|
this.leftObj['定存编号'] = this.depositNumber |
|
|
|
this.leftObj['定存编号'] = this.depositNumber |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 拿到当天日期 |
|
|
|
const tmpFunc = () => { |
|
|
|
const tmpFunc = () => { |
|
|
|
const date = new Date() |
|
|
|
const date = new Date() |
|
|
|
var y = date.getFullYear(); |
|
|
|
var y = date.getFullYear(); |
|
|
@ -429,13 +394,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
flow: 1, |
|
|
|
flow: 1, // 影响页面展示授权或者不授权页面 |
|
|
|
disForm:{ |
|
|
|
disForm:{ // 展示授权柜员号和密码 |
|
|
|
name:'002288', |
|
|
|
name:'002288', |
|
|
|
pass:'123456' |
|
|
|
pass:'123456' |
|
|
|
}, |
|
|
|
}, |
|
|
|
leftObj: {}, |
|
|
|
leftObj: {}, // 左边展示的项目列表 |
|
|
|
rightObj: {} |
|
|
|
rightObj: {} // 右边展示的项目列表 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
@ -447,17 +412,16 @@ export default { |
|
|
|
if(this.flow === 1) { |
|
|
|
if(this.flow === 1) { |
|
|
|
this.flow = 2 |
|
|
|
this.flow = 2 |
|
|
|
}else if(this.flow === 2) { |
|
|
|
}else if(this.flow === 2) { |
|
|
|
|
|
|
|
// 这时调用父组件的提交逻辑,发送请求给后端。然后flow置3展示提交成功。 |
|
|
|
this.$emit('submitIt') |
|
|
|
this.$emit('submitIt') |
|
|
|
this.flow = 3 |
|
|
|
this.flow = 3 |
|
|
|
|
|
|
|
|
|
|
|
}else if(this.flow === 4) { |
|
|
|
}else if(this.flow === 4) { |
|
|
|
|
|
|
|
// 这时调用父组件的提交逻辑,发送请求给后端。然后flow置3展示提交成功。 |
|
|
|
this.flow = 3 |
|
|
|
this.flow = 3 |
|
|
|
this.$emit('submitIt') |
|
|
|
this.$emit('submitIt') |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
// 调用父函数 |
|
|
|
// 在父组件将visible改为false,关闭当前弹框。 |
|
|
|
// 然后关掉git |
|
|
|
|
|
|
|
// this.$emit('submitIt') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.cancelIt() |
|
|
|
this.cancelIt() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -466,11 +430,13 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
|
|
|
|
// 展示表单中的一项,传入键值。 |
|
|
|
showItem() { |
|
|
|
showItem() { |
|
|
|
return (val, key) => { |
|
|
|
return (val, key) => { |
|
|
|
return key + ': ' + val |
|
|
|
return key + ': ' + val |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 展示父组件名字+成功 |
|
|
|
successName() { |
|
|
|
successName() { |
|
|
|
return obj[ this.moduleName ] + '成功' |
|
|
|
return obj[ this.moduleName ] + '成功' |
|
|
|
} |
|
|
|
} |
|
|
|