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

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

parent a064d926
...@@ -11,5 +11,5 @@ module.exports = { ...@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"', ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="', fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_DEV&apiName="',
appId: '"com.xcmg.app.dev"', appId: '"com.xcmg.app.dev"',
currentVersion: '"3.7.9"' currentVersion: '"3.8.0"'
} }
...@@ -67,39 +67,39 @@ export default { ...@@ -67,39 +67,39 @@ export default {
let res = await vm.$post(url, param) let res = await vm.$post(url, param)
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { // if (res.result === 'S') {
let checkList = res.lists.filter(ele => ele.signed_flag === 'Y').map(ele => ele.confirm_id) // 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)) // let submitList = list.filter(ele => checkList.includes(ele.confirm_id))
if (!submitList.length) return // if (!submitList.length) return
let confirm_list = submitList.map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED' })) // let confirm_list = submitList.map(item => ({ confirm_id: item.confirm_id, data_class, confirm_status: 'APPROVED' }))
if (!confirm_list.length) return // if (!confirm_list.length) return
let url2 = process.env.basePath + 'batch_do_confirm_bp' // let url2 = process.env.basePath + 'batch_do_confirm_bp'
let param2 = { master: { confirm_list } } // let param2 = { master: { confirm_list } }
hlsPopup.showLoading('提交数据中') // hlsPopup.showLoading('提交数据中')
let res2 = await vm.$post(url2, param2) // let res2 = await vm.$post(url2, param2)
vm.hlsPopup.hideLoading() // vm.hlsPopup.hideLoading()
if (res2.result === 'S') { // if (res2.result === 'S') {
vm.hlsPopup.showSuccess('提交成功') // 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() // await vm.checkSigned()
} else { // } else {
this.hlsPopup.showLongCenter(res2.message) // this.hlsPopup.showLongCenter(res2.message)
} // }
} else { // } else {
hlsPopup.showLongCenter(res.message) // hlsPopup.showLongCenter(res.message)
} // }
// vm.confirm() // vm.confirm()
} }
}) })
......
...@@ -292,13 +292,13 @@ export default { ...@@ -292,13 +292,13 @@ export default {
vm.hlsPopup.showLoading('请稍候!') vm.hlsPopup.showLoading('请稍候!')
let res = await vm.hlsHttp.post(url, param) let res = await vm.hlsHttp.post(url, param)
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { // if (res.result === 'S') {
vm.signFlag = true // vm.signFlag = true
await vm.confirm() // await vm.confirm()
} else { // } else {
vm.signMsg = res.message // vm.signMsg = res.message
vm.signFlag = false // vm.signFlag = false
} // }
} }
// if (from.name === 'ContractRepayPlan') { // if (from.name === 'ContractRepayPlan') {
vm.signCheck() vm.signCheck()
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
</item> </item>
<item> <item>
<div slot="name" class="font-color">保险押金</div> <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>
<item> <item>
<div slot="name" class="font-color">GPS费用</div> <div slot="name" class="font-color">GPS费用</div>
...@@ -416,14 +416,14 @@ export default { ...@@ -416,14 +416,14 @@ export default {
} }
let res = await vm.hlsHttp.post(url, param) let res = await vm.hlsHttp.post(url, param)
hlsPopup.hideLoading() hlsPopup.hideLoading()
if (res.result === 'S') { // if (res.result === 'S') {
vm.signFlag = true // vm.signFlag = true
vm.confirm_note = '同意' // vm.confirm_note = '同意'
vm.doConfirm('APPROVED') // vm.doConfirm('APPROVED')
} else { // } else {
vm.signMsg = res.message // vm.signMsg = res.message
vm.signFlag = false // vm.signFlag = false
} // }
} }
}) })
}, },
......
...@@ -118,8 +118,7 @@ export default { ...@@ -118,8 +118,7 @@ export default {
return 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 (!this.hlsUtil.isCardID(obj.contact_card_no)) {
if (!idcardReg.test(obj.contact_card_no)) {
hlsPopup.showLongCenter('联系人身份证格式错误!') hlsPopup.showLongCenter('联系人身份证格式错误!')
return return
} }
......
...@@ -9,21 +9,37 @@ ...@@ -9,21 +9,37 @@
<div class="wrap has-header"> <div class="wrap has-header">
<div class="tab"> <div class="tab">
<p> <p>
<span :class="{ selected: selected === 'todo' }" @click="isSelected('todo')"><img v-if="selected === 'todo'" <span :class="{ selected: selected === 'todo' }" @click="isSelected('todo')"><img
src="@/assets/functionCenter/todo-check.png"><img v-if="selected === 'done'" v-if="selected === 'todo'"
src="@/assets/functionCenter/todo-check.png"><img
v-if="selected === 'done'"
src="@/assets/functionCenter/todo.png">待办</span> src="@/assets/functionCenter/todo.png">待办</span>
</p> </p>
<p> <p>
<span :class="{ selected: selected === 'done' }" @click="isSelected('done')"><img v-if="selected === 'done'" <span :class="{ selected: selected === 'done' }" @click="isSelected('done')"><img
src="@/assets/functionCenter/done-check.png"><img v-if="selected === 'todo'" v-if="selected === 'done'"
src="@/assets/functionCenter/done-check.png"><img
v-if="selected === 'todo'"
src="@/assets/functionCenter/done.png">已办</span> src="@/assets/functionCenter/done.png">已办</span>
</p> </p>
</div> </div>
<div class="search"> <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> </div>
<div v-if=" <div
v-if="
(todoList.length === 0 && selected === 'todo') || (todoList.length === 0 && selected === 'todo') ||
(doneList.length === 0 && selected === 'done') (doneList.length === 0 && selected === 'done')
"> ">
...@@ -32,7 +48,8 @@ ...@@ -32,7 +48,8 @@
</div> </div>
</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()"> :autoUpdate="true" :listenScroll="true" class="scroll-content" @pullingUp="loadMore()">
<div class="pay-content"> <div class="pay-content">
<div v-for="(item, index) in todoList" :key="index" class="contract-item"> <div v-for="(item, index) in todoList" :key="index" class="contract-item">
...@@ -40,7 +57,8 @@ ...@@ -40,7 +57,8 @@
<img src="@/assets/contractRepayment/contract.png" alt=""> <img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.workflow_desc }}</h2> <h2>{{ item.workflow_desc }}</h2>
<p> <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> </p>
</div> </div>
...@@ -52,7 +70,8 @@ ...@@ -52,7 +70,8 @@
</div> </div>
</scroll> </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()"> :autoUpdate="true" :listenScroll="true" @pullingUp="loadMore()">
<div class="pay-content"> <div class="pay-content">
<div v-for="(item, index) in doneList" :key="index" class="contract-item"> <div v-for="(item, index) in doneList" :key="index" class="contract-item">
...@@ -60,7 +79,8 @@ ...@@ -60,7 +79,8 @@
<img src="@/assets/contractRepayment/contract.png" alt=""> <img src="@/assets/contractRepayment/contract.png" alt="">
<h2>{{ item.workflow_desc }}</h2> <h2>{{ item.workflow_desc }}</h2>
<p> <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> </p>
</div> </div>
...@@ -75,10 +95,14 @@ ...@@ -75,10 +95,14 @@
</template> </template>
<script> <script>
import noImg from '../../assets/productQuery/none.png' import noImg from '../../assets/productQuery/none.png'
import { Search } from 'vant'
import 'vant/lib/search/style'
export default { export default {
name: 'ToDoList', name: 'ToDoList',
data() { components: {
Search,
},
data () {
return { return {
selected: 'todo', selected: 'todo',
searchInput: '', searchInput: '',
...@@ -86,24 +110,49 @@ export default { ...@@ -86,24 +110,49 @@ export default {
doneList: [], doneList: [],
pageNum: 1, pageNum: 1,
pageNum_1: 1, pageNum_1: 1,
search_flag: false,
mysetTimeout: null, mysetTimeout: null,
} }
}, },
// watch: {}, watch: {
selected (newVal, oldVal) {
if (newVal === 'todo') {
this.getTodoList()
} else if (newVal === 'done') {
this.getDoneList()
}
},
},
// created () { // created () {
// this.getTodoList() // this.getTodoList()
// this.getDoneList() // this.getDoneList()
// }, // },
activated() { activated () {
this.pageNum = 1
this.pageNum_1 = 1
this.search_flag = false
if (this.selected === 'todo') {
this.getTodoList() this.getTodoList()
} else if (this.selected === 'done') {
this.getDoneList() this.getDoneList()
}
// this.getTodoList()
// this.getDoneList()
}, },
methods: { methods: {
// tab切换 // tab切换
isSelected(name) { isSelected (name) {
this.selected = 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) { if (this.mysetTimeout !== null) {
clearTimeout(this.mysetTimeout) clearTimeout(this.mysetTimeout)
this.mysetTimeout = setTimeout(() => { this.mysetTimeout = setTimeout(() => {
...@@ -115,7 +164,7 @@ export default { ...@@ -115,7 +164,7 @@ export default {
}, 1000) }, 1000)
} }
}, },
getTodoList() { getTodoList () {
this.pageNum = 1 this.pageNum = 1
this.todoList = [] this.todoList = []
let param = { let param = {
...@@ -140,7 +189,7 @@ export default { ...@@ -140,7 +189,7 @@ export default {
} }
}) })
}, },
getDoneList() { getDoneList () {
this.pageNum_1 = 1 this.pageNum_1 = 1
this.doneList = [] this.doneList = []
let param = { let param = {
...@@ -165,7 +214,7 @@ export default { ...@@ -165,7 +214,7 @@ export default {
} }
}) })
}, },
loadMore() { loadMore () {
let url let url
let param let param
if (this.selected === 'todo') { if (this.selected === 'todo') {
...@@ -195,6 +244,7 @@ export default { ...@@ -195,6 +244,7 @@ export default {
let returnData = [] let returnData = []
if (res.result === 'S') { if (res.result === 'S') {
returnData = res.lists returnData = res.lists
if (!this.search_flag) {
if (returnData.length === 0) { if (returnData.length === 0) {
this.$refs.scroll.update(true) this.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) { } else if (returnData.length > 0 && returnData.length < 10) {
...@@ -202,6 +252,9 @@ export default { ...@@ -202,6 +252,9 @@ export default {
} else if (returnData.length === 10) { } else if (returnData.length === 10) {
// this.$refs.scroll.update(true) // this.$refs.scroll.update(true)
} }
} else {
this.search_flag = false
}
this.showLists = returnData this.showLists = returnData
if (this.selected === 'todo') { if (this.selected === 'todo') {
returnData.forEach((data, index, array) => { returnData.forEach((data, index, array) => {
...@@ -227,7 +280,7 @@ export default { ...@@ -227,7 +280,7 @@ export default {
if (routerName) { if (routerName) {
this.$router.push({ this.$router.push({
name: routerName, params: { type: type, ...flow } name: routerName, params: { type: type, ...flow },
}) })
} else { } else {
hlsPopup.showLongCenter('当前app不支持审批工作流') hlsPopup.showLongCenter('当前app不支持审批工作流')
...@@ -299,7 +352,8 @@ export default { ...@@ -299,7 +352,8 @@ export default {
.search { .search {
background-color: #fff; background-color: #fff;
padding: 8px 12px; height: 36px;
// padding: 8px 12px;
position: relative; position: relative;
input { 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