Commit 1043ee93 authored by 白日依山山山's avatar 白日依山山山

注释自动提交、待办已办搜索栏和加载列表、商务政策里的保证押金数据格式

parent a064d926
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"3.7.9"'
currentVersion: '"3.8.0"'
}
......@@ -67,39 +67,39 @@ export default {
let res = await vm.$post(url, param)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let checkList = res.lists.filter(ele => ele.signed_flag === 'Y').map(ele => ele.confirm_id)
// if (res.result === 'S') {
// let checkList = res.lists.filter(ele => ele.signed_flag === 'Y').map(ele => ele.confirm_id)
let submitList = list.filter(ele => checkList.includes(ele.confirm_id))
if (!submitList.length) return
let confirm_list = submitList.map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED' }))
if (!confirm_list.length) return
// let submitList = list.filter(ele => checkList.includes(ele.confirm_id))
// if (!submitList.length) return
// let confirm_list = submitList.map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED' }))
// if (!confirm_list.length) return
let url2 = process.env.basePath + 'batch_do_confirm_bp'
let param2 = { master: { confirm_list } }
// let url2 = process.env.basePath + 'batch_do_confirm_bp'
// let param2 = { master: { confirm_list } }
hlsPopup.showLoading('提交数据中')
let res2 = await vm.$post(url2, param2)
vm.hlsPopup.hideLoading()
// hlsPopup.showLoading('提交数据中')
// let res2 = await vm.$post(url2, param2)
// vm.hlsPopup.hideLoading()
if (res2.result === 'S') {
vm.hlsPopup.showSuccess('提交成功')
// if (res2.result === 'S') {
// vm.hlsPopup.showSuccess('提交成功')
let successList = res2.info.filter(item => item.status === 'S').map(item => item.confirm_id)
// let successList = res2.info.filter(item => item.status === 'S').map(item => item.confirm_id)
vm.list = vm.list.filter(item => !successList.includes(item.confirm_id))
// vm.list = vm.list.filter(item => !successList.includes(item.confirm_id))
if (!vm.list.length) vm.goBack()
// if (!vm.list.length) vm.goBack()
window.localStorage.setItem('handleContact', JSON.stringify(vm.list))
// window.localStorage.setItem('handleContact', JSON.stringify(vm.list))
await vm.checkSigned()
} else {
this.hlsPopup.showLongCenter(res2.message)
}
} else {
hlsPopup.showLongCenter(res.message)
}
// await vm.checkSigned()
// } else {
// this.hlsPopup.showLongCenter(res2.message)
// }
// } else {
// hlsPopup.showLongCenter(res.message)
// }
// vm.confirm()
}
})
......
......@@ -292,13 +292,13 @@ export default {
vm.hlsPopup.showLoading('请稍候!')
let res = await vm.hlsHttp.post(url, param)
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.signFlag = true
await vm.confirm()
} else {
vm.signMsg = res.message
vm.signFlag = false
}
// if (res.result === 'S') {
// vm.signFlag = true
// await vm.confirm()
// } else {
// vm.signMsg = res.message
// vm.signFlag = false
// }
}
// if (from.name === 'ContractRepayPlan') {
vm.signCheck()
......
......@@ -159,7 +159,7 @@
</item>
<item>
<div slot="name" class="font-color">保险押金</div>
<span slot="content">{{ itemInfo.insurance_fee * itemInfo.product_num | currency }}</span>
<span slot="content">{{ parseFloat(itemInfo.insurance_fee * itemInfo.product_num).toFixed(2) | currency }}</span>
</item>
<item>
<div slot="name" class="font-color">GPS费用</div>
......@@ -416,14 +416,14 @@ export default {
}
let res = await vm.hlsHttp.post(url, param)
hlsPopup.hideLoading()
if (res.result === 'S') {
vm.signFlag = true
vm.confirm_note = '同意'
vm.doConfirm('APPROVED')
} else {
vm.signMsg = res.message
vm.signFlag = false
}
// if (res.result === 'S') {
// vm.signFlag = true
// vm.confirm_note = '同意'
// vm.doConfirm('APPROVED')
// } else {
// vm.signMsg = res.message
// vm.signFlag = false
// }
}
})
},
......
......@@ -118,8 +118,7 @@ export default {
return
}
// 身份证校验
let idcardReg = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
if (!idcardReg.test(obj.contact_card_no)) {
if (!this.hlsUtil.isCardID(obj.contact_card_no)) {
hlsPopup.showLongCenter('联系人身份证格式错误!')
return
}
......
......@@ -9,30 +9,47 @@
<div class="wrap has-header">
<div class="tab">
<p>
<span :class="{ selected: selected === 'todo' }" @click="isSelected('todo')"><img v-if="selected === 'todo'"
src="@/assets/functionCenter/todo-check.png"><img v-if="selected === 'done'"
<span :class="{ selected: selected === 'todo' }" @click="isSelected('todo')"><img
v-if="selected === 'todo'"
src="@/assets/functionCenter/todo-check.png"><img
v-if="selected === 'done'"
src="@/assets/functionCenter/todo.png">待办</span>
</p>
<p>
<span :class="{ selected: selected === 'done' }" @click="isSelected('done')"><img v-if="selected === 'done'"
src="@/assets/functionCenter/done-check.png"><img v-if="selected === 'todo'"
<span :class="{ selected: selected === 'done' }" @click="isSelected('done')"><img
v-if="selected === 'done'"
src="@/assets/functionCenter/done-check.png"><img
v-if="selected === 'todo'"
src="@/assets/functionCenter/done.png">已办</span>
</p>
</div>
<div class="search">
<input v-model="searchInput" type="text" placeholder="请输入用户名称" @input="searchList()">
<!-- <input v-model="searchInput" type="text" placeholder="请输入客户名称/合同编号查询" @input="searchList()"> -->
<!-- <Search v-model="searchInput" placeholder="请输入客户名称/合同编号查询" @search="searchList"/> -->
<Search
v-model="searchInput"
show-action
placeholder="请请输入客户名称/合同编号查询"
@search="searchList"
>
<template #action>
<div @click="searchList">搜索</div>
</template>
</Search>
</div>
</div>
<div v-if="
(todoList.length === 0 && selected === 'todo') ||
(doneList.length === 0 && selected === 'done')
">
<div
v-if="
(todoList.length === 0 && selected === 'todo') ||
(doneList.length === 0 && selected === 'done')
">
<div class="display">
<img src="@/assets/messageCenter/noMsg.png" alt="">
</div>
</div>
<scroll v-if="selected === 'todo' && todoList.length > 0" ref="scroll" :updateData="todoList" :pullUp="true"
<scroll
v-if="selected === 'todo' && todoList.length > 0" ref="scroll" :updateData="todoList" :pullUp="true"
:autoUpdate="true" :listenScroll="true" class="scroll-content" @pullingUp="loadMore()">
<div class="pay-content">
<div v-for="(item, index) in todoList" :key="index" class="contract-item">
......@@ -40,8 +57,9 @@
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.workflow_desc }}</h2>
<p>
<img src="@/assets/functionCenter/in@2x.png" alt="" @click="approvalInfo(item, 'todo')
">
<img
src="@/assets/functionCenter/in@2x.png" alt="" @click="approvalInfo(item, 'todo')
">
</p>
</div>
<div class="center">
......@@ -52,7 +70,8 @@
</div>
</scroll>
<scroll v-if="selected === 'done' && doneList.length > 0" ref="scroll" :updateData="doneList" :pullUp="true"
<scroll
v-if="selected === 'done' && doneList.length > 0" ref="scroll" :updateData="doneList" :pullUp="true"
:autoUpdate="true" :listenScroll="true" @pullingUp="loadMore()">
<div class="pay-content">
<div v-for="(item, index) in doneList" :key="index" class="contract-item">
......@@ -60,8 +79,9 @@
<img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.workflow_desc }}</h2>
<p>
<img src="@/assets/functionCenter/in@2x.png" alt="" @click="approvalInfo(item, 'done')
">
<img
src="@/assets/functionCenter/in@2x.png" alt="" @click="approvalInfo(item, 'done')
">
</p>
</div>
<div class="center">
......@@ -75,10 +95,14 @@
</template>
<script>
import noImg from '../../assets/productQuery/none.png'
import { Search } from 'vant'
import 'vant/lib/search/style'
export default {
name: 'ToDoList',
data() {
components: {
Search,
},
data () {
return {
selected: 'todo',
searchInput: '',
......@@ -86,24 +110,49 @@ export default {
doneList: [],
pageNum: 1,
pageNum_1: 1,
search_flag: false,
mysetTimeout: null,
}
},
// watch: {},
watch: {
selected (newVal, oldVal) {
if (newVal === 'todo') {
this.getTodoList()
} else if (newVal === 'done') {
this.getDoneList()
}
},
},
// created () {
// this.getTodoList()
// this.getDoneList()
// },
activated() {
this.getTodoList()
this.getDoneList()
activated () {
this.pageNum = 1
this.pageNum_1 = 1
this.search_flag = false
if (this.selected === 'todo') {
this.getTodoList()
} else if (this.selected === 'done') {
this.getDoneList()
}
// this.getTodoList()
// this.getDoneList()
},
methods: {
// tab切换
isSelected(name) {
isSelected (name) {
this.selected = name
},
searchList() {
searchList () {
this.search_flag = true
if (this.selected === 'todo') {
this.pageNum = 0
this.todoList = []
} else if (this.selected === 'done') {
this.pageNum_1 = 0
this.doneList = []
}
if (this.mysetTimeout !== null) {
clearTimeout(this.mysetTimeout)
this.mysetTimeout = setTimeout(() => {
......@@ -115,7 +164,7 @@ export default {
}, 1000)
}
},
getTodoList() {
getTodoList () {
this.pageNum = 1
this.todoList = []
let param = {
......@@ -140,7 +189,7 @@ export default {
}
})
},
getDoneList() {
getDoneList () {
this.pageNum_1 = 1
this.doneList = []
let param = {
......@@ -165,7 +214,7 @@ export default {
}
})
},
loadMore() {
loadMore () {
let url
let param
if (this.selected === 'todo') {
......@@ -195,12 +244,16 @@ export default {
let returnData = []
if (res.result === 'S') {
returnData = res.lists
if (returnData.length === 0) {
this.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
this.$refs.scroll.update(true)
} else if (returnData.length === 10) {
// this.$refs.scroll.update(true)
if (!this.search_flag) {
if (returnData.length === 0) {
this.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
this.$refs.scroll.update(true)
} else if (returnData.length === 10) {
// this.$refs.scroll.update(true)
}
} else {
this.search_flag = false
}
this.showLists = returnData
if (this.selected === 'todo') {
......@@ -227,7 +280,7 @@ export default {
if (routerName) {
this.$router.push({
name: routerName, params: { type: type, ...flow }
name: routerName, params: { type: type, ...flow },
})
} else {
hlsPopup.showLongCenter('当前app不支持审批工作流')
......@@ -299,7 +352,8 @@ export default {
.search {
background-color: #fff;
padding: 8px 12px;
height: 36px;
// padding: 8px 12px;
position: relative;
input {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment