20240205
luoJunYong.123 3 years ago
parent 8d730ceb8e
commit d00963f86e
  1. 1
      src/assets/js/myConfig.js
  2. 15
      src/components/checkPhoto/index.vue
  3. 3
      src/components/dialogTwo/index.vue
  4. 3
      src/components/needBefore/index.vue
  5. 1
      src/components/sealName/index.vue
  6. 1
      src/components/selectBusiness/index.vue
  7. 1
      src/mixins/tipsBefore/index.js
  8. 34
      src/pages/counter/list/index.vue
  9. 48
      src/pages/manage/list/acceptanceDraft/invoice.vue
  10. 2
      src/pages/manage/list/business/deposit.vue
  11. 2
      src/pages/manage/list/business/transfer.vue
  12. 2
      src/pages/manage/list/business/withdrawal.vue
  13. 23
      src/pages/manage/list/personal/currentAccount/settle.vue
  14. 2
      src/pages/manage/list/personal/currentAccount/transferAccounts.vue
  15. 2
      src/pages/manage/list/personal/currentAccount/withdrawal.vue
  16. 95
      src/store/modules/system.js
  17. 13
      src/utils/utilFunction.js
  18. 3
      src/utils/verify.js

@ -4,6 +4,7 @@ const headerCellStyle = {
'font-weight': '700' 'font-weight': '700'
} }
// 动态控制表单斑马格颜色 主要是怕需求变更又得改很多。
const tableRowClassName = function({row, rowIndex}) { const tableRowClassName = function({row, rowIndex}) {
if (rowIndex % 2 === 1) { if (rowIndex % 2 === 1) {
return 'warning-row'; return 'warning-row';

@ -212,6 +212,21 @@ export default {
methods: { methods: {
closeIt() { closeIt() {
this.$emit('update:showImg', false) this.$emit('update:showImg', false)
},
test() {
const str = '2018年结束了,2019年开始了,2020年就也不远了'
const rex = /\d+/g // 1
const str1 = str.replace(rex, '****')
console.log(str1) // "********,****"
const str2 = str.replace(rex, function(item){
console.log(arguments) //
const arr = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖']
let newStr = ''
item.split('').map(function(i){
newStr += arr[i]
})
return newStr
})
} }
}, },

@ -60,6 +60,9 @@
</template> </template>
<script> <script>
// dialog使dialog
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',

@ -12,6 +12,8 @@
<script> <script>
// nmoduleName
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',
@ -59,6 +61,7 @@ export default {
}, },
methods: { methods: {
goto() { goto() {
//
// this.$router.push(obj[this.moduleName]) // this.$router.push(obj[this.moduleName])
this.$message({ this.$message({
message: '请先完成' + obj[this.moduleName], message: '请先完成' + obj[this.moduleName],

@ -3,6 +3,7 @@
<div class="relative"> <div class="relative">
<img :src="item.src" :alt="item.name" :title="item.name" style="height: 100px;width: 100px;" /> <img :src="item.src" :alt="item.name" :title="item.name" style="height: 100px;width: 100px;" />
<p v-if="!hasName" class="absolute subpixel-antialiased text-center sealDetail">{{ item.name }}</p> <p v-if="!hasName" class="absolute subpixel-antialiased text-center sealDetail">{{ item.name }}</p>
<!-- 一些印章图片比较不一样需要特殊处理 -->
<p v-else-if="item.name.includes('转讫')" class="absolute subpixel-antialiased text-center sealDetail" style="bottom: 6vh">{{ item.name }}</p> <p v-else-if="item.name.includes('转讫')" class="absolute subpixel-antialiased text-center sealDetail" style="bottom: 6vh">{{ item.name }}</p>
</div> </div>
</template> </template>

@ -57,6 +57,7 @@ export default {
closeData() { closeData() {
this.checkList = []; this.checkList = [];
}, },
// /
showBusinessSelect (judge) { showBusinessSelect (judge) {
// //
if(!judge && !this.businessKey) { if(!judge && !this.businessKey) {

@ -30,7 +30,6 @@ export default {
needBefore: false, needBefore: false,
tipsNefore: null tipsNefore: null
} }
}, },
created() { created() {

@ -1257,9 +1257,6 @@ export default {
replaceThings: 'system/replaceThings', replaceThings: 'system/replaceThings',
setShowBusiness: 'system/setShowBusiness', setShowBusiness: 'system/setShowBusiness',
changeShowGoods: 'system/changeShowGoods', changeShowGoods: 'system/changeShowGoods',
setGoodsOpen: 'system/setGoodsOpen',
removeGoodsOpen: 'system/removeGoodsOpen',
addGoodsOpen: 'system/addGoodsOpen',
setBusinessKey: 'system/setBusinessKey', setBusinessKey: 'system/setBusinessKey',
addGoods: 'system/addGoods', addGoods: 'system/addGoods',
deleteGoods: 'system/deleteGoods', deleteGoods: 'system/deleteGoods',
@ -1274,6 +1271,8 @@ export default {
outThingsGoods: 'system/outThingsGoods', outThingsGoods: 'system/outThingsGoods',
setTipsOperate: 'system/setTipsOperate' setTipsOperate: 'system/setTipsOperate'
}), }),
//
getThingsCache() { getThingsCache() {
// //
@ -1465,9 +1464,11 @@ export default {
} }
this.voucherCardGet = false this.voucherCardGet = false
}, },
//
changeTipsDialog(changeIt = false) { changeTipsDialog(changeIt = false) {
this.tipsDialog = changeIt this.tipsDialog = changeIt
}, },
//
getMoneyTotal(changeIt) { getMoneyTotal(changeIt) {
// 西 // 西
if(changeIt) { if(changeIt) {
@ -1478,12 +1479,15 @@ export default {
} }
this.tipsDialog = false this.tipsDialog = false
}, },
//
changePeopleJudge() { changePeopleJudge() {
this.peopleJudge = true; this.peopleJudge = true;
}, },
//
closePeopleJudge() { closePeopleJudge() {
this.peopleJudge = false; this.peopleJudge = false;
}, },
//
peopleDoing(peopleDo) { peopleDoing(peopleDo) {
this.peopleDo = peopleDo; this.peopleDo = peopleDo;
this.peopleJudge = false; this.peopleJudge = false;
@ -1493,11 +1497,12 @@ export default {
this.showData('返还资料',0) this.showData('返还资料',0)
} }
}, },
// myMap
//
dislodgeItem(index){ dislodgeItem(index){
// //
if(this.myMap) { if(this.myMap) {
const tmpId = this.goodState[index].id const tmpId = this.goodState[index].id
this.outThings2({ name: this.myMap, index }) // bug this.outThings2({ name: this.myMap, index }) // bug
this.pushThingsGoods([tmpId]) this.pushThingsGoods([tmpId])
@ -2396,6 +2401,7 @@ export default {
top: 38.5%; top: 38.5%;
left: 57.5%; left: 57.5%;
width: 3.5%; width: 3.5%;
z-index: 110;
} }
.seal-box { .seal-box {
top: 39.5%; top: 39.5%;
@ -2441,11 +2447,11 @@ export default {
top: 22%; top: 22%;
} }
.employeeText { .employeeText {
width: 120px; width: 60px;
height: 120px; height: 80px;
line-height: 120px; line-height: 80px;
top: 10vh; top: 8vh;
left: 12vw; left: 13vw;
} }
} }
@media screen and (max-width: 1440px) and (min-height: 650px) { @media screen and (max-width: 1440px) and (min-height: 650px) {
@ -2485,11 +2491,11 @@ export default {
top: -13%; top: -13%;
} }
.employeeText { .employeeText {
width: 100px; width: 50px;
height: 100px; height: 80px;
line-height: 100px; line-height: 80px;
top: 5vh; top: 7vh;
left: 12vw; left: 14vw;
} }
} }

@ -91,38 +91,6 @@
</el-row> </el-row>
</div> </div>
<el-button @click="submitForm" type="primary" class="submitBtn" v-throttle>提交</el-button> <el-button @click="submitForm" type="primary" class="submitBtn" v-throttle>提交</el-button>
<!-- <el-dialog
style="margin-top:10vh"
:visible.sync="visible"
:modal="false"
width="40%"
:close-on-click-modal="false"
:show-close="false"
custom-class="data-dia">
<div slot="title" class="dia-header">
<div class="data-title">提交</div>
</div>
<div class="popBody" v-if="!authorization&&!success">
<h2>本业务需要授权</h2>
</div>
<div class="popBody" v-if="authorization&&!success">
<el-form ref="form" :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" v-if="success">
<h2>完成表单form</h2>
</div>
<div class="popBtns">
<el-button class="close btn" @click="[visible = false,authorization=false,success=false]"> </el-button>
<el-button class="sure btn" type="primary" @click="popSure"> </el-button>
</div>
</el-dialog> -->
</div> </div>
</div> </div>
@ -140,6 +108,7 @@ export default {
}, },
data() { data() {
return { return {
// my-dialog
visible: false, visible: false,
form:{ form:{
// //
@ -253,19 +222,8 @@ export default {
} }
], ],
}, },
//
myTable2: { myTable2: {
// accountName: '', //
// collectionName: '', //
// currencyType: 'CNY', //
// moneyOrderMoney: '', //
// accountTradeName: '', //
// tradeAddress: '', //
// collectionTradeName: '', //
// billType: '', //
// drawBillDate: '', //
// isTransfer: '', //
// serviceCharge: '' //
376: { 376: {
prop: 'accountTradeName', // 1 prop: 'accountTradeName', // 1
type: '3', type: '3',
@ -364,10 +322,12 @@ export default {
} }
}, },
created() { created() {
//
this.form.moneyOrderMoney = '6.00' this.form.moneyOrderMoney = '6.00'
this.form.serviceCharge = '5.00' this.form.serviceCharge = '5.00'
}, },
mounted() { mounted() {
//
const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,30,374' const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,30,374'
autoPlay2(parentId, this.form, this.myTable2, this.myTable) autoPlay2(parentId, this.form, this.myTable2, this.myTable)
this.$refs.accountNumber.focus() this.$refs.accountNumber.focus()

@ -225,7 +225,7 @@ export default {
getSelectList: 'system/getSelectList' getSelectList: 'system/getSelectList'
}), }),
needAuth() { needAuth() {
return this.form.depositNum > 50000 return this.form.depositNum >= 50000
} }
} }
}; };

@ -302,7 +302,7 @@ export default {
getSelectList: 'system/getSelectList' getSelectList: 'system/getSelectList'
}), }),
needAuth() { needAuth() {
return this.form.money > 50000 return this.form.money >= 50000
} }
} }
}; };

@ -262,7 +262,7 @@ export default {
getSelectList: 'system/getSelectList' getSelectList: 'system/getSelectList'
}), }),
needAuth() { needAuth() {
return this.form.money > 50000 return this.form.money >= 50000
} }
} }
}; };

@ -15,14 +15,13 @@
<el-form-item label="币种" prop="currency"> <el-form-item label="币种" prop="currency">
<el-select v-model="form.currency" placeholder="请选择" ref="currency"> <el-select v-model="form.currency" placeholder="请选择" ref="currency">
<el-option v-for="item in getSelectList.currencySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option> <el-option v-for="item in getSelectList.currencySelectList" :label="item.options" :value="item.itemId" :key="item.itemId"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="余额"> <el-form-item label="余额">
<el-input :value="form.balance" maxlength="20" @input="val => ismoney(val, form, 'balance')"></el-input> <el-input :value="form.balance" maxlength="20" @input="val => ismoney(val, form, 'balance')"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="总金额"> <el-form-item label="总金额">
<el-input v-model="form.totalMoney" maxlength="20" placeholder="显示余额加利息总额"></el-input> <el-input v-model="form.totalMoney" disabled maxlength="20" placeholder="显示余额加利息总额"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取密码" required> <el-form-item label="支取密码" required>
<div v-if='!form.drawPassword' class="idCard" @click="popUp2('密码器')"> <div v-if='!form.drawPassword' class="idCard" @click="popUp2('密码器')">
@ -43,7 +42,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="利息"> <el-form-item label="利息">
<el-input v-model="form.interest" maxlength="20"></el-input> <el-input :value="form.interest" @input="val => ismoney(val, form, 'interest')" maxlength="20"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="支取方式" prop="drawWay"> <el-form-item label="支取方式" prop="drawWay">
<el-select v-model="form.drawWay" placeholder="请选择" ref="drawWay"> <el-select v-model="form.drawWay" placeholder="请选择" ref="drawWay">
@ -198,7 +197,7 @@ export default{
this.form.drawWay = 93 // this.form.drawWay = 93 //
this.form.interest = interest this.form.interest = interest
this.form.balance = balance this.form.balance = balance
this.form.totalMoney = totalMoney // this.form.totalMoney = totalMoney
} }
const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,57,66' const parentId = '285,' + this.$store.state.system.businessSelect[this.$store.state.system.businessKey].id + ',287,5,26,57,66'
@ -297,9 +296,23 @@ export default{
getSelectList: 'system/getSelectList' getSelectList: 'system/getSelectList'
}), }),
needAuth() { needAuth() {
return this.form.balance > 50000 || this.totalMoney > 50000 return this.form.balance >= 50000 || this.totalMoney >= 50000
} }
}, },
watch: {
'form.balance': {
handler(val) {
this.form.totalMoney = (Number(this.form.interest) + Number(val)).toFixed(2)
},
immediate: true
},
'form.interest': {
handler(val) {
this.form.totalMoney = (Number(this.form.balance) + Number(val)).toFixed(2)
},
immediate: true
}
}
} }
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>

@ -304,7 +304,7 @@ export default{
getSelectList: 'system/getSelectList' getSelectList: 'system/getSelectList'
}), }),
needAuth() { needAuth() {
return this.form.money > 50000 return this.form.money >= 50000
} }
}, },
} }

@ -302,7 +302,7 @@ export default{
getSelectList: 'system/getSelectList' getSelectList: 'system/getSelectList'
}), }),
needAuth() { needAuth() {
return this.form.money > 50000 return this.form.money >= 50000
} }
}, },
} }

@ -95,7 +95,7 @@ const allGoods = {
} }
// 这里的参数是全体的 具体要不一样可以在业务的dataFlow中设置进行覆盖 // 这里的参数是全体的 具体要不一样可以在业务的dataFlow中设置进行覆盖
const idNumber = '220602199202281234' const idNumber = '220602199202281229'
function getBirthday (idCard){ function getBirthday (idCard){
var birthday = ""; var birthday = "";
if (idCard != null && idCard != "") { if (idCard != null && idCard != "") {
@ -116,7 +116,7 @@ const capital = 100
const peopleNumber = '111222' const peopleNumber = '111222'
const collectingCompany = '袋鼠互联网科技有限公司' const collectingCompany = '袋鼠互联网科技有限公司'
const transMoney = '81100' const transMoney = '81100'
const phone = '13222223122' const phone = '1589017718'
const staticPhone = '0755-88281987' const staticPhone = '0755-88281987'
const mailNumber = '518052' const mailNumber = '518052'
const eMailAddress = '666@qq.com' const eMailAddress = '666@qq.com'
@ -2534,6 +2534,7 @@ export default {
} }
}, },
}, },
allDataFlow: { ...allDataFlow },
goods:[// 物品栏的物品 goods:[// 物品栏的物品
{ {
name:'身份证', name:'身份证',
@ -2561,12 +2562,6 @@ export default {
// id:'e' // id:'e'
// }, // },
], ],
goodsOpen:[// 物品栏的物品
{name:'身份证', src:require('@/assets/img/goods/idCard.png'), id:13},
{name:'身份证复印件',src:require('@/assets/img/idCard-copy-sm.png'),id:23},
{name:'银行卡',src:require('@/assets/img/goods/bankCard.png'),id:16},
{name:426,src:require('@/assets/img/goods/zzpt.png'),id:426},
],
}, },
mutations: { mutations: {
// 设置tipDialog组件提示的信息。这个组件是根据UI设计的。 // 设置tipDialog组件提示的信息。这个组件是根据UI设计的。
@ -2650,24 +2645,32 @@ export default {
}, },
// 数据流动,当前面模块的信息被后面的模块需要时,用这个方法可以将前面模块的数据存到后面去,毕竟服务器接口少。比如模块1 -> 模块2 模块1完成的数据可以流到模块2 // 数据流动,当前面模块的信息被后面的模块需要时,用这个方法可以将前面模块的数据存到后面去,毕竟服务器接口少。比如模块1 -> 模块2 模块1完成的数据可以流到模块2
setDataFlow(state, obj) { setDataFlow(state, obj) {
for(let key in obj) { // for(let key in obj) {
state.businessSelect[state.businessKey].dataFlow[key] = obj[key]
} // state.allDataFlow[key] = obj[key]
// // this.$set()
// }
state.businessSelect[state.businessKey].dataFlow = { ...state.businessSelect[state.businessKey].dataFlow, ...obj }
}, },
// 重置业务状态中的数据,用于重新开始。 // 重置业务状态中的数据,用于重新开始。
initState(state) { initState(state) {
state.businessSelect = JSON.parse(JSON.stringify(myInitState)) state.businessSelect = JSON.parse(JSON.stringify(myInitState))
state.allDataFlow = { ...allDataFlow }
state.businessKey = '' state.businessKey = ''
}, },
// 控制选择业务列表的展示状态
setShowBusiness(state, isShow) { setShowBusiness(state, isShow) {
state.showBusiness = isShow state.showBusiness = isShow
}, },
// 需求是:点击桌面上的物品显示交互状态,但如果点击关闭则回退到一开始的状态。
replaceThingsGoods(state, idArr) { replaceThingsGoods(state, idArr) {
state.businessSelect[state.businessKey].data.splice(0, state.businessSelect[state.businessKey].data.length, ...idArr) state.businessSelect[state.businessKey].data.splice(0, state.businessSelect[state.businessKey].data.length, ...idArr)
}, },
// 替换某个业务中的某个箱子中的物品状态
replaceThings(state, { name, idArr }) { replaceThings(state, { name, idArr }) {
state.businessSelect[state.businessKey][name].splice(0, state.businessSelect[state.businessKey][name].length, ...idArr) state.businessSelect[state.businessKey][name].splice(0, state.businessSelect[state.businessKey][name].length, ...idArr)
}, },
// 向某个箱子中放入东西
pushThings(state, { name, idArr}) { pushThings(state, { name, idArr}) {
if(name === 'sealBox') { // 印章盒只能放一个东西 if(name === 'sealBox') { // 印章盒只能放一个东西
const sealBox = state.businessSelect[state.businessKey][name] const sealBox = state.businessSelect[state.businessKey][name]
@ -2686,6 +2689,7 @@ export default {
} }
} }
}, },
// 向物品栏中放入东西
pushThingsGoods(state, idArr) { pushThingsGoods(state, idArr) {
for(let i=0; i<idArr.length; i++) { for(let i=0; i<idArr.length; i++) {
const index = state.businessSelect[state.businessKey].data.findIndex(item => item == idArr[i]) const index = state.businessSelect[state.businessKey].data.findIndex(item => item == idArr[i])
@ -2694,22 +2698,25 @@ export default {
} }
} }
}, },
// 将某个箱子中的一些物品删掉
outThings(state, { name, idArr}) { outThings(state, { name, idArr}) {
if(!(idArr instanceof Array)) { if(!(idArr instanceof Array)) {
const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id === idArr) const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id == idArr)
state.businessSelect[state.businessKey][name].splice(index, 1) state.businessSelect[state.businessKey][name].splice(index, 1)
}else { }else {
for(let i=0; i<idArr.length; i++) { for(let i=0; i<idArr.length; i++) {
const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id === idArr[i]) const index = state.businessSelect[state.businessKey][name].findIndex(item => item.id == idArr[i])
state.businessSelect[state.businessKey][name].splice(index, 1) state.businessSelect[state.businessKey][name].splice(index, 1)
} }
} }
}, },
// 将某个箱子中的一些物品删掉的方法2,更好用。
outThings2(state, { name, index}) { outThings2(state, { name, index}) {
if(state.businessSelect[state.businessKey][name].length > index) { if(state.businessSelect[state.businessKey][name].length > index) {
state.businessSelect[state.businessKey][name].splice(index, 1) state.businessSelect[state.businessKey][name].splice(index, 1)
} }
}, },
// 删掉物品栏中的物品,和pushThings一起用,拿掉物品栏中物品的同时向箱子中装入物品。
outThingsGoods(state, idArr) { outThingsGoods(state, idArr) {
for(let i=0; i<idArr.length; i++) { for(let i=0; i<idArr.length; i++) {
const index = state.businessSelect[state.businessKey].data.findIndex(item => item == idArr[i]) const index = state.businessSelect[state.businessKey].data.findIndex(item => item == idArr[i])
@ -2718,7 +2725,7 @@ export default {
} }
} }
}, },
// 将物品放入传票栏
backCulture(state, idArr) { backCulture(state, idArr) {
for(let i=0; i<idArr.length; i++) { for(let i=0; i<idArr.length; i++) {
const index = state.businessSelect[state.businessKey].cultureArr.findIndex(item => item === idArr[i]) const index = state.businessSelect[state.businessKey].cultureArr.findIndex(item => item === idArr[i])
@ -2730,6 +2737,7 @@ export default {
this.commit('system/outThingsGoods', [...idArr]) this.commit('system/outThingsGoods', [...idArr])
} }
}, },
// 将物品返还给客户
backPeople(state, idArr) { backPeople(state, idArr) {
for(let i=0; i<idArr.length; i++) { for(let i=0; i<idArr.length; i++) {
const index = state.businessSelect[state.businessKey].backPeople.findIndex(item => item === idArr[i]) const index = state.businessSelect[state.businessKey].backPeople.findIndex(item => item === idArr[i])
@ -2741,19 +2749,24 @@ export default {
} }
this.commit('system/outThingsGoods', [...idArr]) this.commit('system/outThingsGoods', [...idArr])
}, },
// 将现金放入钱箱
payMoney(state) { payMoney(state) {
const index = state.businessSelect[state.businessKey].data.findIndex(item => item === 15) const index = state.businessSelect[state.businessKey].data.findIndex(item => item === 15)
if(index !== -1) { if(index !== -1) {
state.businessSelect[state.businessKey].data.splice(index, 1) state.businessSelect[state.businessKey].data.splice(index, 1)
} }
}, },
// cb是回调函数 // 盖章逻辑(本来想着直接把审核资料、验钞等方法也写在这里的,因为直接物品也在这里。奈何时间不太够。没事) cb是回调函数
stampJudge(state, { sealArr, cb }) { stampJudge(state, { sealArr, cb }) {
// const needStamp = state.businessSelect[state.businessKey].isStamp // const needStamp = state.businessSelect[state.businessKey].isStamp
const id = state.businessSelect[state.businessKey].sealBox[0] const id = state.businessSelect[state.businessKey].sealBox[0]
let judgeDelete = true // 盖完章是否变化 为false的会删掉。。。 let judgeDelete = true // 盖完章是否变化 为false的会删掉。。。
let stampSuccess = '' // 盖章成功 let stampSuccess = '' // 盖章成功
// 以为要特定的章盖特定的物品,盖完后结果还不一样。有些东西盖了会消失,有些不会。
// 有些东西还要盖两个章。当时选择了最直接的if-else判断。其实用map结构也不是不行。
if(sealArr.length === 1) { if(sealArr.length === 1) {
const seal = sealArr[0] const seal = sealArr[0]
if(seal === '业务专用章') { if(seal === '业务专用章') {
@ -2867,6 +2880,7 @@ export default {
} }
} }
} }
if(stampSuccess) { if(stampSuccess) {
let projectId = sessionStorage.getItem('projectId') let projectId = sessionStorage.getItem('projectId')
let startTime = sessionStorage.getItem('startTime') let startTime = sessionStorage.getItem('startTime')
@ -2907,50 +2921,37 @@ export default {
// message: '盖章成功' // message: '盖章成功'
// }) // })
}, },
// 设置当前的业务
setBusinessKey: (state, val) => { setBusinessKey: (state, val) => {
// 这个是容错的 后面可以删掉
if(!state.businessSelect[val]) {
state.businessKey = '业务一'
return
}
state.businessKey = val state.businessKey = val
}, },
// 刷新的时候会在sessionStorage中保存system中的信息,刷新完成后赋值回来
setBusinessSelect(state, val) { setBusinessSelect(state, val) {
state.businessSelect = val state.businessSelect = val
}, },
// 将物品添加到物品栏中
addGoods: (state, goods) => { addGoods: (state, goods) => {
if(!(goods instanceof Array)) { if(!(goods instanceof Array)) {
goods = [ goods ] goods = [ goods ]
} }
const needArr = [...state.businessSelect[state.businessKey].needs] const needArr = [...state.businessSelect[state.businessKey].needs]
for(let i=0; i<goods.length; i++) { for(let i=0; i<goods.length; i++) {
// for(let j=0; j<needArr.length; j++) { const index = state.businessSelect[state.businessKey].data.findIndex(item => item == goods[i])
// // if(goods[i] === needArr[j]) {
// // console.log(goods[i] + '- -' + needArr[j])
// // // 如果这个物品是这个业务需要添加的 就加进去 否则不添加
// // state.businessSelect[state.businessKey].data.push(needArr[j])
// // // 加进去了 下次就添加不了了
// // state.businessSelect[state.businessKey].needs.splice(j,1)
// // break;
// // }else {
// // console.log('???')
// // }
// }
const index = state.businessSelect[state.businessKey].data.findIndex(item => item === goods[i])
if(index !== -1) { if(index !== -1) {
state.businessSelect[state.businessKey].data.push(needArr[j]) state.businessSelect[state.businessKey].data.push(needArr[j])
} }
} }
}, },
// 将物品栏中的某个物品删除掉
deleteGoods: (state, index) => { deleteGoods: (state, index) => {
// 传个物品对象过来 // 传个物品对象过来
state.businessSelect[state.businessKey].data.splice(index, 1) state.businessSelect[state.businessKey].data.splice(index, 1)
}, },
// 改变电脑屏幕的大小
changeFullscreen:(state,val) => { changeFullscreen:(state,val) => {
state.fullScreen = val state.fullScreen = val
}, },
// 更改弹窗 // 更改弹窗状态(显示、文字)
changePop:(state,val)=>{ changePop:(state,val)=>{
state.showPop = val.show state.showPop = val.show
state.popText = val.text? val.text: '' state.popText = val.text? val.text: ''
@ -2961,6 +2962,7 @@ export default {
state.showGoods = false; state.showGoods = false;
} }
}, },
// 改变物品栏中的物品
changeGoods:(state,obj)=>{/* 赋值/push/删除 */ changeGoods:(state,obj)=>{/* 赋值/push/删除 */
if(obj.goods&&obj.goods.length>0){ if(obj.goods&&obj.goods.length>0){
state.goods = obj.goods state.goods = obj.goods
@ -2985,21 +2987,6 @@ export default {
changeShowGoods(state, judge) { changeShowGoods(state, judge) {
state.showGoods = judge state.showGoods = judge
}, },
addGoodsOpen(state, arr) {
// 传来要做的事和数组
state.goodsOpen.push(...arr)
},
removeGoodsOpen(state, obj) {
// 传来要做的事和数组
state.goodsOpen.map((item, index) => {
if(item.name === obj.name) {
state.goodsOpen.splice(index, 1)
}
})
},
setGoodsOpen(state, arr) {
state.goodsOpen = arr
}
}, },
actions: { actions: {
}, },
@ -3016,6 +3003,7 @@ export default {
} }
return arr return arr
}, },
// 获取页面中的下拉框的选项
getSelectList(state) { getSelectList(state) {
return state.selectList return state.selectList
// currencySelectList: [], // currencySelectList: [],
@ -3029,6 +3017,7 @@ export default {
popId(state) { popId(state) {
return state.popId return state.popId
}, },
// 获得当前业务的id,用来发送请求/获取缓存
businessId(state) { businessId(state) {
return state.businessSelect[state.businessKey].id + ',' return state.businessSelect[state.businessKey].id + ','
}, },
@ -3050,10 +3039,11 @@ export default {
} }
} }
}, },
// 选择业务后合并信息 // 选择业务后合并信息,有些业务需要配置自己的信息
dataFlow(state) { dataFlow(state) {
return Object.assign(allDataFlow, state.businessSelect[state.businessKey].dataFlow) return Object.assign(state.allDataFlow, state.businessSelect[state.businessKey].dataFlow)
}, },
//
goods2(state) { goods2(state) {
// 调试容错采用if-else // 调试容错采用if-else
const arr = [] const arr = []
@ -3122,7 +3112,6 @@ export default {
}else { }else {
return false return false
} }
}, },
inMyWork(state) { inMyWork(state) {
return (moduleName) => { return (moduleName) => {

@ -43,12 +43,14 @@ const checkName = function(val, form, prop) {
form[prop] = val; form[prop] = val;
} }
// 检查证件号
const certificateNumber = function(val, form, prop) { const certificateNumber = function(val, form, prop) {
const charReg = /^(0|[0-9][0-9]*)$/; const charReg = /^(0|[0-9][0-9]*)$/;
if(val.length<form[prop].length) { if(val.length<form[prop].length) {
form[prop] = val; form[prop] = val;
return; return;
} }
if(charReg.test(val)) { if(charReg.test(val)) {
form[prop] = val; form[prop] = val;
} }
@ -83,6 +85,7 @@ const inputListen = function(val, row, prop) {
row[prop] = Number(val.replace(/\D+/, '')) row[prop] = Number(val.replace(/\D+/, ''))
} }
// 另一个监听数字的方法,根据需求不同来选。
const inputListen2 = function(val, row, prop) { const inputListen2 = function(val, row, prop) {
// 检查空格 // 检查空格
const tmpCheck = val.substr(val.length-1, 1); const tmpCheck = val.substr(val.length-1, 1);
@ -100,6 +103,7 @@ const inputListen2 = function(val, row, prop) {
} }
} }
// 验证是否金钱
const ismoney = function(val, row, prop) { const ismoney = function(val, row, prop) {
// 检查空格 // 检查空格
const tmpCheck = val.substr(val.length-1, 1); const tmpCheck = val.substr(val.length-1, 1);
@ -116,6 +120,7 @@ const ismoney = function(val, row, prop) {
} }
} }
// 检查某个空是否填写完成
const checkRequired = function(form, obj) { const checkRequired = function(form, obj) {
for(const prop in obj) { for(const prop in obj) {
if(form[prop] === '') { if(form[prop] === '') {
@ -129,6 +134,7 @@ const checkRequired = function(form, obj) {
return ''; return '';
} }
// 自己封装的验证方法,配合element-ui的validate使用
const myValidate = (callback, refs) => { const myValidate = (callback, refs) => {
return (valid, obj) => { return (valid, obj) => {
if (valid) { if (valid) {
@ -162,6 +168,7 @@ const myValidate = (callback, refs) => {
} }
} }
// 电脑的系统录入中提交表单
const autoPlay = (parentId, form, myTable2, myTable, cards=[]) => { const autoPlay = (parentId, form, myTable2, myTable, cards=[]) => {
let projectId = sessionStorage.getItem('projectId') || 11 // 默认11吧? let projectId = sessionStorage.getItem('projectId') || 11 // 默认11吧?
let startTime = sessionStorage.getItem('startTime') let startTime = sessionStorage.getItem('startTime')
@ -221,6 +228,7 @@ const autoPlay = (parentId, form, myTable2, myTable, cards=[]) => {
}) })
} }
// 电脑录入中获取缓存信息
const autoPlay2 = (parentId=11, form, myTable2, myTable, cardArr, callback) => { const autoPlay2 = (parentId=11, form, myTable2, myTable, cardArr, callback) => {
// 默认11吧? // 默认11吧?
let param= { let param= {
@ -271,6 +279,7 @@ const autoPlay3 = (name, allName, arr) => { // 要接收的, 所有的, 要
} }
} }
// 获取当前年月日并格式化
const getNowDate = () => { const getNowDate = () => {
const date = new Date() const date = new Date()
var y = date.getFullYear(); var y = date.getFullYear();
@ -281,6 +290,7 @@ const getNowDate = () => {
return y + '-' + m + '-' + d; return y + '-' + m + '-' + d;
} }
// 提示请刷身份证信息
const messageIdCard = (message='请刷身份证') => { const messageIdCard = (message='请刷身份证') => {
store.commit('system/setTipsOperate', message) store.commit('system/setTipsOperate', message)
// Message.warning({ // Message.warning({
@ -289,6 +299,7 @@ const messageIdCard = (message='请刷身份证') => {
// }) // })
} }
// 提示请刷银行卡信息
const messageCard = (message='请刷银行卡') => { const messageCard = (message='请刷银行卡') => {
store.commit('system/setTipsOperate', message) store.commit('system/setTipsOperate', message)
// Message.warning({ // Message.warning({
@ -297,6 +308,7 @@ const messageCard = (message='请刷银行卡') => {
// }) // })
} }
// 提示请填写支取密码信息
const messagePassword = (message='请填写支取密码') => { const messagePassword = (message='请填写支取密码') => {
store.commit('system/setTipsOperate', message) store.commit('system/setTipsOperate', message)
// Message.warning({ // Message.warning({
@ -305,6 +317,7 @@ const messagePassword = (message='请填写支取密码') => {
// }) // })
} }
// 随机生成10位客户号
const randomPeopleNumber = () => { const randomPeopleNumber = () => {
const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; const $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
const $chars2 = '1234567890' const $chars2 = '1234567890'

@ -7,6 +7,9 @@ const vermail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})
const mobPattern = /^1[3456789][0-9]{9}$/ const mobPattern = /^1[3456789][0-9]{9}$/
const namePattern = /(^[A-Z][a-z]*(\s[A-Z][a-z]*)*$)|(^[\u4e00-\u9fa5]{2,4}$)/ const namePattern = /(^[A-Z][a-z]*(\s[A-Z][a-z]*)*$)|(^[\u4e00-\u9fa5]{2,4}$)/
const ratePattern = /^(\d|[1-9]\d|100)(.\d{1,3})?%$|^(\d|[1-9]\d|100)(.\d{1,3})?$/ const ratePattern = /^(\d|[1-9]\d|100)(.\d{1,3})?%$|^(\d|[1-9]\d|100)(.\d{1,3})?$/
// 表单rules的验证规则,主要是需求老是变,所以全总结在这,改一个可以同时改很多个表单规则
const vercustomer = [ const vercustomer = [
{ {
required: true, required: true,

Loading…
Cancel
Save