派车审核
This commit is contained in:
parent
1e6792e009
commit
2d0e414191
|
|
@ -12,42 +12,44 @@
|
|||
></u-input>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<div class="list-cont" v-for="(item, index) in tableList" :key="index" @click="handleDetail(item)">
|
||||
<u-row justify="space-between" customStyle="margin-bottom: 10px; padding: 0 15px;">
|
||||
<u-col span="6">
|
||||
<div>{{ item.code }}</div>
|
||||
</u-col>
|
||||
<u-col span="6">
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<u-tag text="已上传" type="success" v-if="item.fileList && item.fileList.length > 0"></u-tag>
|
||||
<u-tag text="待上传" type="warning" v-else></u-tag>
|
||||
<div class="list">
|
||||
<div class="list-cont" v-for="(item, index) in tableList" :key="index" @click="handleDetail(item)">
|
||||
<u-row justify="space-between" customStyle="margin-bottom: 10px; padding: 0 15px;">
|
||||
<u-col span="6">
|
||||
<div>{{ item.code }}</div>
|
||||
</u-col>
|
||||
<u-col span="6">
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<u-tag text="已上传" type="success" v-if="item.fileList && item.fileList.length > 0"></u-tag>
|
||||
<u-tag text="待上传" type="warning" v-else></u-tag>
|
||||
</div>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="margin-bottom: 5px"></u-line>
|
||||
<div class="list-item">
|
||||
<span>工程名称:</span>
|
||||
<span>{{ item.proName }}</span>
|
||||
</div>
|
||||
<div class="list-item df-item">
|
||||
<div>
|
||||
<span>派车数量:</span>
|
||||
<span style="color: #5ae725">{{ item.dispatchNum }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<u-tag
|
||||
v-if="item.fileList && item.fileList.length > 0"
|
||||
text="查看到货确认单"
|
||||
type="info"
|
||||
@click="openImgModal(item, 1)"
|
||||
></u-tag>
|
||||
<u-tag v-else type="primary" text="上传到货确认单" @click="openImgModal(item, 2)"></u-tag>
|
||||
</div>
|
||||
</u-col>
|
||||
</u-row>
|
||||
<u-line style="margin-bottom: 5px"></u-line>
|
||||
<div class="list-item">
|
||||
<span>工程名称:</span>
|
||||
<span>{{ item.proName }}</span>
|
||||
</div>
|
||||
<div class="list-item df-item">
|
||||
<div>
|
||||
<span>派车数量:</span>
|
||||
<span style="color: #5ae725">{{ item.dispatchNum }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<u-tag
|
||||
v-if="item.fileList && item.fileList.length > 0"
|
||||
text="查看到货确认单"
|
||||
type="info"
|
||||
@click="openImgModal(item, 1)"
|
||||
></u-tag>
|
||||
<u-tag v-else type="primary" text="上传到货确认单" @click="openImgModal(item, 2)"></u-tag>
|
||||
<div class="list-item">
|
||||
<span>派车时间:</span>
|
||||
<span style="color: #f9ae3d">{{ item.outTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span>派车时间:</span>
|
||||
<span style="color: #f9ae3d">{{ item.outTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 上传图片 -->
|
||||
|
|
@ -74,7 +76,7 @@
|
|||
</view>
|
||||
</u-modal>
|
||||
|
||||
<u-loadmore :status="status" line v-if="tableList.length > 10" />
|
||||
<u-loadmore :status="status" line v-if="tableList.length > 0" />
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="tableList.length == 0" mode="data"></u-empty>
|
||||
|
|
@ -130,6 +132,8 @@ export default {
|
|||
console.log('🚀 ~ getList ~ res', res)
|
||||
this.tableList = res.list
|
||||
this.total = res.total
|
||||
if (this.tableList.length == this.total) this.status = 'nomore'
|
||||
else this.status = 'loadmore'
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getList ~ error', error)
|
||||
}
|
||||
|
|
@ -265,15 +269,25 @@ export default {
|
|||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.search {
|
||||
margin-bottom: 15px;
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
padding: 15px;
|
||||
}
|
||||
.list {
|
||||
margin-top: 70px;
|
||||
}
|
||||
.list-cont {
|
||||
margin: 0 15px;
|
||||
padding: 15px 0;
|
||||
margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
|
|
|
|||
|
|
@ -2,34 +2,43 @@
|
|||
<div>
|
||||
<uni-section title="审核记录" type="line"></uni-section>
|
||||
<div class="cont">
|
||||
<div class="list-cont" v-for="(item, index) in tableList" :key="index">
|
||||
<div class="top-item">
|
||||
<div class="left-item">
|
||||
<div class="circle"></div>
|
||||
<div class="date">{{ item.date }}</div>
|
||||
</div>
|
||||
|
||||
<div class="time">
|
||||
<u-icon name="clock" style="margin-right: 5px"></u-icon>
|
||||
{{ item.time }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-cont">
|
||||
<div><u-icon name="/static/images/user.png" size="36" style="margin-right: 5px"></u-icon></div>
|
||||
<div>
|
||||
<div style="margin-bottom: 15px">
|
||||
<span>{{ item.name }}</span>
|
||||
<span style="margin-right: 10px">({{ item.phone }})</span>
|
||||
<span style="color: #bbb">{{ item.supName }}</span>
|
||||
<div class="list" v-for="(list, listIndex) in tableList" :key="listIndex">
|
||||
<div v-if="opt.current == 1" style="margin-bottom: 10px">批次{{ listIndex + 1 }}</div>
|
||||
<div class="list-cont" v-for="(item, index) in list.recordVoList" :key="index">
|
||||
<div class="top-item">
|
||||
<div class="left-item">
|
||||
<div class="circle"></div>
|
||||
<div class="date">{{ formatDate(item.createTime) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="time">
|
||||
<u-icon name="clock" style="margin-right: 5px"></u-icon>
|
||||
{{ item.createTime }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-cont">
|
||||
<div><u-icon name="/static/images/user.png" size="36" style="margin-right: 5px"></u-icon></div>
|
||||
<div>
|
||||
<div style="margin-bottom: 15px">
|
||||
<span>{{ item.userName }}</span>
|
||||
<span style="margin-right: 10px">({{ item.phone }})</span>
|
||||
<span style="color: #bbb">{{ item.type == 2 ? '供应商' : '机具分公司' }}</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 6px">
|
||||
<span v-if="item.type == 2">提交派车</span>
|
||||
<span v-else>
|
||||
<span v-if="item.auditStatus == 1">完结-审核确认通过, 共耗时: {{ item.times }}</span>
|
||||
<span v-else>驳回-给发起人{{ list.recordVoList[index - 1].userName }}, 共间隔: {{ item.times }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div>备注:{{ item.remark || '无' }}</div>
|
||||
</div>
|
||||
<div style="margin-bottom: 6px">{{ item.content }}</div>
|
||||
<div>备注:{{ item.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="tableList.length == 0" mode="data"></u-empty>
|
||||
<u-empty v-if="tableList.length == 0" mode="data"></u-empty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -46,17 +55,7 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
tableList: [
|
||||
// {
|
||||
// date: '08-01',
|
||||
// time: '2021-08-01 08:00',
|
||||
// content: '审核通过',
|
||||
// remark: '这是备注111',
|
||||
// name: '张三',
|
||||
// phone: '13888888888',
|
||||
// company: '机具公司'
|
||||
// },
|
||||
]
|
||||
tableList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
@ -67,8 +66,15 @@ export default {
|
|||
// 获取审核记录
|
||||
async getAuditDetails() {
|
||||
try {
|
||||
const params = {
|
||||
encryptedData: JSON.stringify({ id: this.opt.planId })
|
||||
let params = {}
|
||||
if (this.opt.current == 1) {
|
||||
params = {
|
||||
encryptedData: JSON.stringify({ planId: this.opt.planId })
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
encryptedData: JSON.stringify({ outId: this.opt.outId })
|
||||
}
|
||||
}
|
||||
const res = await getAuditDetails(params)
|
||||
console.log('🚀 ~ 审核记录 ~ res', res)
|
||||
|
|
@ -76,6 +82,12 @@ export default {
|
|||
} catch (error) {
|
||||
console.log('🚀 ~ 审核记录 ~ error', error)
|
||||
}
|
||||
},
|
||||
formatDate(dateString) {
|
||||
const date = new Date(dateString)
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${month}-${day}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,27 @@
|
|||
<template>
|
||||
<view>
|
||||
<div class="tabs">
|
||||
<div class="item" :class="{ active: active == 1 }" @click="handleTab(1)">派车分配</div>
|
||||
<div class="item" :class="{ active: active == 2 }" @click="handleTab(2)">派车审核</div>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div class="search flex align-center">
|
||||
<div v-if="active == 2" style="width: 30%">
|
||||
<div class="search-item" @click="showPicker = true">
|
||||
{{ checkStatus || '审核状态' }}
|
||||
<u-icon name="arrow-down"></u-icon>
|
||||
</div>
|
||||
<div class="cont">
|
||||
<div class="tabs">
|
||||
<div class="item" :class="{ active: active == 1 }" @click="handleTab(1)">派车分配</div>
|
||||
<div class="item" :class="{ active: active == 2 }" @click="handleTab(2)">派车审核</div>
|
||||
</div>
|
||||
<!-- 搜索 -->
|
||||
<div class="search flex align-center">
|
||||
<div v-if="active == 2" style="width: 30%">
|
||||
<div class="search-item" @click="showPicker = true">
|
||||
{{ checkStatus || '审核状态' }}
|
||||
<u-icon name="arrow-down"></u-icon>
|
||||
</div>
|
||||
</div>
|
||||
<u-input
|
||||
v-model="keyWord"
|
||||
placeholder="请输入搜索工程或计划"
|
||||
suffixIcon="search"
|
||||
suffixIconStyle="color: #666"
|
||||
shape="circle"
|
||||
@blur="handleSearch"
|
||||
></u-input>
|
||||
</div>
|
||||
<u-input
|
||||
v-model="keyWord"
|
||||
placeholder="请输入搜索工程或计划"
|
||||
suffixIcon="search"
|
||||
suffixIconStyle="color: #666"
|
||||
shape="circle"
|
||||
@blur="handleSearch"
|
||||
></u-input>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<div class="list">
|
||||
|
|
@ -106,7 +108,7 @@
|
|||
@confirm="confirm"
|
||||
></u-picker>
|
||||
|
||||
<u-loadmore :status="status" line v-if="tableList.length > 10" />
|
||||
<u-loadmore :status="status" line v-if="tableList.length > 0" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -201,6 +203,8 @@ export default {
|
|||
console.log('🚀 ~ getList ~ res', res)
|
||||
this.tableList = res.list
|
||||
this.total = res.total
|
||||
if (this.tableList.length == this.total) this.status = 'nomore'
|
||||
else this.status = 'loadmore'
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getList ~ error', error)
|
||||
}
|
||||
|
|
@ -272,6 +276,7 @@ export default {
|
|||
let isAudit = false
|
||||
let isDetail = false
|
||||
let active = null
|
||||
let current = null
|
||||
if (this.active == 1 && !item.supId) {
|
||||
isPlan = true
|
||||
active = 1
|
||||
|
|
@ -281,13 +286,15 @@ export default {
|
|||
} else {
|
||||
isDetail = true
|
||||
active = 1
|
||||
current = this.active
|
||||
}
|
||||
const params = {
|
||||
...item,
|
||||
isPlan,
|
||||
isAudit,
|
||||
isDetail,
|
||||
active
|
||||
active,
|
||||
current
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/sendACarSystem/details?params=${JSON.stringify(params)}`
|
||||
|
|
@ -371,9 +378,16 @@ export default {
|
|||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.cont {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
}
|
||||
.search {
|
||||
margin: 15px;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
.search-item {
|
||||
margin-right: 10px;
|
||||
border: 1px solid #e8e8e8;
|
||||
|
|
@ -385,7 +399,8 @@ page {
|
|||
}
|
||||
}
|
||||
.list {
|
||||
height: calc(100vh - 112px);
|
||||
margin-top: 115px;
|
||||
/* height: calc(100vh - 112px); */
|
||||
overflow-y: auto;
|
||||
}
|
||||
.list-cont {
|
||||
|
|
|
|||
Loading…
Reference in New Issue