派车管理
This commit is contained in:
parent
f1b51a78da
commit
5f062198bc
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name" : "若依移动端",
|
||||
"appid" : "__UNI__25A9D80",
|
||||
"name" : "贵州安全工机具",
|
||||
"appid" : "__UNI__81194DA",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.0",
|
||||
"versionCode" : "100",
|
||||
|
|
@ -14,7 +14,9 @@
|
|||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"modules" : {},
|
||||
"modules" : {
|
||||
"Camera" : {}
|
||||
},
|
||||
"distribute" : {
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
|
|
@ -33,10 +35,22 @@
|
|||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
],
|
||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
|
||||
},
|
||||
"ios" : {},
|
||||
"sdkConfigs" : {}
|
||||
"ios" : {
|
||||
"privacyDescription" : {
|
||||
"NSPhotoLibraryUsageDescription" : "该应用需要读取你的相册,以便为你编辑信息",
|
||||
"NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你编辑信息",
|
||||
"NSCameraUsageDescription" : "该应用需要你的相机,以便为你编辑信息",
|
||||
"NSLocalNetworkUsageDescription" : "该应用需要你的网络,以便为你编辑信息"
|
||||
},
|
||||
"idfa" : false,
|
||||
"dSYMs" : false
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"ad" : {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"quickapp" : {},
|
||||
|
|
@ -60,7 +74,7 @@
|
|||
"port" : 9090,
|
||||
"https" : false
|
||||
},
|
||||
"title" : "RuoYi-App",
|
||||
"title" : "贵州安全工机具",
|
||||
"router" : {
|
||||
"mode" : "hash",
|
||||
"base" : "./"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
></u-input>
|
||||
</div>
|
||||
<!-- 列表 -->
|
||||
<div class="list-cont" v-for="(item, index) in tableList" :key="index">
|
||||
<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.name }}</div>
|
||||
|
|
@ -193,6 +193,18 @@ export default {
|
|||
console.log('🚀 ~ selectImg ~ err:', err)
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDetail(item) {
|
||||
console.log('🚀 ~ handleDetail ~ item', item)
|
||||
const params = {
|
||||
isDetail: true,
|
||||
// 到货
|
||||
isArrival: true,
|
||||
active: 1,
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/sendACarSystem/details?params=${JSON.stringify(params)}`
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,128 @@
|
|||
<template>
|
||||
<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.company }}</span>
|
||||
</div>
|
||||
<div style="margin-bottom: 6px;">{{ item.content }}</div>
|
||||
<div>备注:{{ item.remark }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
export default {
|
||||
props: {
|
||||
opt: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableList: [
|
||||
{
|
||||
date: '08-01',
|
||||
time: '2021-08-01 08:00',
|
||||
content: '审核通过',
|
||||
remark: '这是备注111',
|
||||
name: '张三',
|
||||
phone: '13888888888',
|
||||
company: '机具公司'
|
||||
},
|
||||
{
|
||||
date: '08-01',
|
||||
time: '2021-08-01 08:00',
|
||||
content: '审核通过',
|
||||
remark: '这是备注222',
|
||||
name: '李四',
|
||||
phone: '13888888888',
|
||||
company: '机具公司'
|
||||
},
|
||||
{
|
||||
date: '08-01',
|
||||
time: '2021-08-01 08:00',
|
||||
content: '审核通过',
|
||||
remark: '这是备注333',
|
||||
name: '王五',
|
||||
phone: '13888888888',
|
||||
company: '机具公司'
|
||||
},
|
||||
{
|
||||
date: '08-01',
|
||||
time: '2021-08-01 08:00',
|
||||
content: '审核通过',
|
||||
remark: '这是备注444',
|
||||
name: '赵六',
|
||||
phone: '13888888888',
|
||||
company: '机具公司'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('🚀 ~ 详情 ~ this.opt', this.opt)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cont {
|
||||
padding: 15px;
|
||||
.top-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
|
||||
</style>
|
||||
.left-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.circle {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border: 3px solid #409eff;
|
||||
border-radius: 50%;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.time {
|
||||
margin-right: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.item-cont {
|
||||
margin: 20px 0 20px 50px;
|
||||
padding: 10px;
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,338 @@
|
|||
<template>
|
||||
<div>
|
||||
<uni-section title="派车明细" type="line"></uni-section>
|
||||
<div
|
||||
class="list-cont"
|
||||
v-for="(item, index) in tableList"
|
||||
:key="index"
|
||||
:style="{ background: index == 0 ? '#E3EDF5' : '#E4EAF5' }"
|
||||
>
|
||||
<div
|
||||
class="list-item top-item"
|
||||
:style="{ background: index == 0 ? '#71BFF0' : '#7D9FF3', color: '#fff', borderRadius: '8px 8px 0 0' }"
|
||||
>
|
||||
<span class="mr-15" style="font-size: 21px; font-weight: 800">{{ index + 1 }}</span>
|
||||
<u-icon
|
||||
class="mr-15"
|
||||
:color="index == 0 ? '#71BFF0' : '#7D9FF3'"
|
||||
:name="index == 0 ? '/static/images/car.png' : '/static/images/car2.png'"
|
||||
size="21"
|
||||
></u-icon>
|
||||
<span class="mr-15">{{ item.carName }}</span>
|
||||
<span>{{ item.carType }}</span>
|
||||
</div>
|
||||
<div style="padding-left: 20px">
|
||||
<div class="list-item">
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<div style="padding-left: 20px">
|
||||
<div class="list-item">
|
||||
<span class="mr-15">{{ item.carNum }}</span>
|
||||
<span class="mr-15">{{ item.carType }}</span>
|
||||
<span>{{ item.carLoad }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span>{{ item.tool }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span>{{ item.distance }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span>{{ item.company }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span>{{ item.address }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="mr-15">附件数量</span>
|
||||
<span class="mr-15" style="color: #3c9cff">{{ (item.fileList && item.fileList.length) || 0 }}</span>
|
||||
<span style="color: #3c9cff" @click="handleFile(item)">查看附件>></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- btn -->
|
||||
<div class="btn-wrap" v-if="opt.isAudit">
|
||||
<div style="margin: 0 15px">
|
||||
<u-button type="primary" @click="showModal = true">审 核</u-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<u-modal :show="showModal" title="派车审核" showCancelButton @cancel="showModal = false" @confirm="submit">
|
||||
<view class="slot-content">
|
||||
<div>
|
||||
<div class="item-wrap">
|
||||
<div class="item" :class="{ active: isPass }" @click="isPass = true">通过</div>
|
||||
<div class="item" :class="{ active: !isPass }" @click="isPass = false">不通过</div>
|
||||
</div>
|
||||
<u-textarea
|
||||
v-model="opinion"
|
||||
placeholder="不通过必须填写审核不通过意见"
|
||||
:rows="5"
|
||||
maxlength="200"
|
||||
count
|
||||
></u-textarea>
|
||||
</div>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<!-- 附件弹出层 -->
|
||||
<u-popup :show="showPop" mode="center" round="8" @close="showPop = false">
|
||||
<div class="uPopup">
|
||||
<div class="pop-title">{{ imgList && imgList.length > 0 ? imgList[current].title : '' }}</div>
|
||||
<div class="content">
|
||||
<u-swiper v-if="imgList.length > 0" :list="imgList" @change="e => (current = e.current)" :autoplay="false">
|
||||
<view slot="indicator" class="indicator">
|
||||
<view
|
||||
class="indicator__dot"
|
||||
v-for="(item, index) in imgList"
|
||||
:key="index"
|
||||
:class="[index === current && 'indicator__dot--active']"
|
||||
></view>
|
||||
</view>
|
||||
</u-swiper>
|
||||
</div>
|
||||
<u-empty v-if="imgList.length == 0 || !imgList" mode="data"></u-empty>
|
||||
</div>
|
||||
</u-popup>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="tableList.length == 0" mode="data"></u-empty>
|
||||
|
||||
<!-- loading -->
|
||||
<u-loading-page :loading="isLoading" icon-size="39" style="z-index: 99999"></u-loading-page>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
opt: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
isPass: true,
|
||||
opinion: '', // 审核意见
|
||||
isLoading: false,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
tableList: [
|
||||
{
|
||||
carName: '车辆名称',
|
||||
carType: '车辆类型',
|
||||
name: '姓名',
|
||||
carNum: '车牌号',
|
||||
carLoad: '车辆载重',
|
||||
tool: '工具',
|
||||
distance: '距离',
|
||||
company: '公司',
|
||||
address: '地址',
|
||||
fileList: []
|
||||
},
|
||||
{
|
||||
carName: '车辆名称',
|
||||
carType: '车辆类型',
|
||||
name: '姓名',
|
||||
carNum: '车牌号',
|
||||
carLoad: '车辆载重',
|
||||
tool: '工具',
|
||||
distance: '距离',
|
||||
company: '公司',
|
||||
address: '地址',
|
||||
fileList: [
|
||||
{
|
||||
url: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
},
|
||||
{
|
||||
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
||||
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
carName: '车辆名称',
|
||||
carType: '车辆类型',
|
||||
name: '姓名',
|
||||
carNum: '车牌号',
|
||||
carLoad: '车辆载重',
|
||||
tool: '工具',
|
||||
distance: '距离',
|
||||
company: '公司',
|
||||
address: '地址',
|
||||
fileList: [
|
||||
{
|
||||
url: 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
|
||||
title: '昨夜星辰昨夜风,画楼西畔桂堂东'
|
||||
},
|
||||
{
|
||||
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
|
||||
title: '身无彩凤双飞翼,心有灵犀一点通'
|
||||
},
|
||||
{
|
||||
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
|
||||
title: '谁念西风独自凉,萧萧黄叶闭疏窗,沉思往事立残阳'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
showPop: false,
|
||||
imgList: [],
|
||||
current: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('🚀 ~ 计划审核 ~ this.opt', this.opt)
|
||||
},
|
||||
methods: {
|
||||
// 查看附件
|
||||
handleFile(item) {
|
||||
this.imgList = item.fileList
|
||||
this.showPop = true
|
||||
this.current = 0
|
||||
console.log('🚀 ~ 查看附件 ~ item', item)
|
||||
},
|
||||
submit() {
|
||||
console.log('🚀 ~ 提交 ~ submit ~ this.isPass', this.isPass)
|
||||
console.log('🚀 ~ 提交 ~ submit ~ this.opinion', this.opinion)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
padding-bottom: 70px;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.list-cont {
|
||||
color: #666;
|
||||
margin: 15px;
|
||||
margin-bottom: 15px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
.list-item {
|
||||
padding: 5px 15px;
|
||||
.title {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
div {
|
||||
line-height: 1.9;
|
||||
}
|
||||
span {
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.top-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.btn-wrap {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
padding: 15px 0 20px;
|
||||
}
|
||||
.mr-15 {
|
||||
margin-right: 15px;
|
||||
}
|
||||
.slot-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.item-wrap {
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.item {
|
||||
width: 45%;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 30px;
|
||||
background-color: #f8f8f8;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
||||
|
||||
&.active {
|
||||
color: $u-primary;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid $u-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.uPopup {
|
||||
width: 90vw;
|
||||
/* min-height: 30vh; */
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
.pop-title {
|
||||
font-size: 16px;
|
||||
font-weight: 800;
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
color: #777;
|
||||
}
|
||||
.content {
|
||||
/* 居中*/
|
||||
margin: 5vh auto;
|
||||
}
|
||||
}
|
||||
.indicator {
|
||||
@include flex(row);
|
||||
justify-content: center;
|
||||
|
||||
&__dot {
|
||||
height: 6px;
|
||||
width: 6px;
|
||||
border-radius: 100px;
|
||||
background-color: rgba(255, 255, 255, 0.35);
|
||||
margin: 0 5px;
|
||||
transition: background-color 0.3s;
|
||||
|
||||
&--active {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.indicator-num {
|
||||
padding: 2px 0;
|
||||
background-color: rgba(0, 0, 0, 0.35);
|
||||
border-radius: 100px;
|
||||
width: 35px;
|
||||
@include flex;
|
||||
justify-content: center;
|
||||
|
||||
&__text {
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,25 +1,237 @@
|
|||
<template>
|
||||
<div>
|
||||
计划详情
|
||||
<uni-section title="基本信息" type="line"></uni-section>
|
||||
<div class="list-cont">
|
||||
<div class="list-item">
|
||||
<div class="title">计划类型:</div>
|
||||
<div>{{ formData.planType }}</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<div class="title">项目名称:</div>
|
||||
<div>{{ formData.proName }}</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<div class="title">项目部分:</div>
|
||||
<div>{{ formData.proPart }}</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<div class="title">工作内容:</div>
|
||||
<div>{{ formData.jobContent }}</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<div class="title">需要日期:</div>
|
||||
<div>{{ formData.needDate }}</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<div class="title">计划说明:</div>
|
||||
<div>{{ formData.explain }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<uni-section title="申请明细" type="line"></uni-section>
|
||||
<div class="list-cont" v-for="(item, index) in tableList" :key="index">
|
||||
<div class="list-item">
|
||||
<span class="title">类 型:</span>
|
||||
<span>{{ item.type }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="title">名 称:</span>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="title">规 格:</span>
|
||||
<span>{{ item.specification }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="title">单 位:</span>
|
||||
<span>{{ item.unit }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="title">需 用 量:</span>
|
||||
<span>{{ item.num }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="title">需要天数:</span>
|
||||
<span>{{ item.date }}</span>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span class="title">备 注:</span>
|
||||
<span>{{ item.remark }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- btn -->
|
||||
<div class="btn-wrap" v-if="opt.isPlan">
|
||||
<div style="margin: 0 15px">
|
||||
<u-button type="primary" @click="showModal = true">派 车 分 配</u-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 弹框 -->
|
||||
<u-modal :show="showModal" title="指定派车供应商" showCancelButton @cancel="showModal = false" @confirm="submit">
|
||||
<view class="slot-content">
|
||||
<div>
|
||||
<u-radio-group v-model="radioValue" placement="column">
|
||||
<u-radio
|
||||
:customStyle="{ marginBottom: '8px' }"
|
||||
v-for="(item, index) in radioList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:name="item.value"
|
||||
></u-radio>
|
||||
</u-radio-group>
|
||||
</div>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="tableList.length == 0" mode="data"></u-empty>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
export default {
|
||||
props: {
|
||||
opt: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
radioValue: '',
|
||||
formData: {
|
||||
planType: '计划类型', // 计划类型
|
||||
proName: '项目名称', // 项目名称
|
||||
proPart: '项目部分', // 项目部分
|
||||
jobContent: '工作内容', // 工作内容
|
||||
needDate: '2025-01-01', // 需要日期
|
||||
explain: '这是计划说明' // 计划说明
|
||||
},
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
tableList: [
|
||||
{
|
||||
type: '类型1',
|
||||
name: '名称1',
|
||||
specification: '规格1',
|
||||
unit: '单位1',
|
||||
num: '数量1',
|
||||
date: '需要天数1',
|
||||
remark: '备注1'
|
||||
},
|
||||
{
|
||||
type: '类型2',
|
||||
name: '名称2',
|
||||
specification: '规格2',
|
||||
unit: '单位2',
|
||||
num: '数量2',
|
||||
date: '需要天数2',
|
||||
remark: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
}
|
||||
],
|
||||
radioList: [
|
||||
{
|
||||
name: '苹果',
|
||||
value: '1',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '香蕉',
|
||||
value: '2',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '橙子',
|
||||
value: '3',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '榴莲',
|
||||
value: '4',
|
||||
disabled: false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('🚀 ~ 计划详情 ~ this.opt', this.opt)
|
||||
},
|
||||
methods: {
|
||||
submit() {
|
||||
console.log('🚀 ~ submit ~ this.radioValue', this.radioValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
padding-bottom: 70px;
|
||||
}
|
||||
.list-cont {
|
||||
margin: 15px;
|
||||
padding: 15px 0;
|
||||
margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
</style>
|
||||
.list-item {
|
||||
padding: 5px 15px;
|
||||
|
||||
.title {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
div {
|
||||
line-height: 1.9;
|
||||
}
|
||||
span {
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
.btn-wrap {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
padding: 15px 0 20px;
|
||||
}
|
||||
.slot-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.item-wrap {
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.item {
|
||||
width: 45%;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 30px;
|
||||
background-color: #f8f8f8;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
||||
|
||||
&.active {
|
||||
color: $u-primary;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid $u-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
派车详情
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
|
|
@ -1,290 +1,50 @@
|
|||
<template>
|
||||
<view>
|
||||
<Navbar :title="navbarTitle" />
|
||||
<div class="tabs">
|
||||
<div class="tabs" v-if="opt.isDetail">
|
||||
<div class="item" :class="{ active: active == 1 }" @click="handleTab(1)">计划详情</div>
|
||||
<div class="item" :class="{ active: active == 2 }" @click="handleTab(2)">派车详情</div>
|
||||
<div class="item" :class="{ active: active == 3 }" @click="handleTab(3)">审核记录</div>
|
||||
<div class="item" :class="{ active: active == 3 }" @click="handleTab(3)" v-if="!opt.isArrival">审核记录</div>
|
||||
</div>
|
||||
<div v-if="opt.isDetail" style="height: 45px"></div>
|
||||
|
||||
<!-- 列表 -->
|
||||
<div class="list-cont" v-for="(item, index) in tableList" :key="index">
|
||||
<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" v-if="active == 1">
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<u-tag text="已派车" type="success" v-if="item.isSend"></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>{{ item.plan }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<u-button v-if="active == 1 && !item.isSend" type="primary" size="small" @click="openModal">
|
||||
派车分配
|
||||
</u-button>
|
||||
<u-button v-else-if="active == 2 && item.status == 0" type="warning" size="small" @click="openModal">
|
||||
审核
|
||||
</u-button>
|
||||
<u-tag text="已通过" type="success" v-else-if="active == 2 && item.status == 1"></u-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-item">
|
||||
<span>供 应 商:</span>
|
||||
<span>{{ item.sub }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 弹框 -->
|
||||
<u-modal :show="showModal" :title="modalTitle" showCancelButton @cancel="showModal = false" @confirm="submit">
|
||||
<view class="slot-content">
|
||||
<div v-if="active == 1">
|
||||
<u-radio-group v-model="radioValue" placement="column" @change="groupChange">
|
||||
<u-radio
|
||||
:customStyle="{ marginBottom: '8px' }"
|
||||
v-for="(item, index) in radioList"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:name="item.value"
|
||||
></u-radio>
|
||||
</u-radio-group>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="item-wrap">
|
||||
<div class="item" :class="{ active: isPass }" @click="isPass = true">通过</div>
|
||||
<div class="item" :class="{ active: !isPass }" @click="isPass = false">不通过</div>
|
||||
</div>
|
||||
<u-textarea
|
||||
v-model="opinion"
|
||||
placeholder="不通过必须填写审核不通过意见"
|
||||
:rows="5"
|
||||
maxlength="200"
|
||||
count
|
||||
></u-textarea>
|
||||
</div>
|
||||
</view>
|
||||
</u-modal>
|
||||
|
||||
<!-- 选择器 -->
|
||||
<u-picker
|
||||
v-if="showPicker"
|
||||
:show="showPicker"
|
||||
:columns="[columns]"
|
||||
keyName="label"
|
||||
@cancel="showPicker = false"
|
||||
@confirm="confirm"
|
||||
></u-picker>
|
||||
|
||||
<u-loadmore :status="status" line v-if="tableList.length > 10" />
|
||||
|
||||
<!-- 空状态 -->
|
||||
<u-empty v-if="tableList.length == 0" mode="data"></u-empty>
|
||||
<PlanDetails v-if="active == 1" :opt="opt" />
|
||||
<PlanAuditDetails v-if="active == 2" :opt="opt" />
|
||||
<AuditRecord v-if="active == 3" :opt="opt" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventoryList } from '@/api/aqSafety'
|
||||
import AuditRecord from './components/AuditRecord'
|
||||
import PlanDetails from './components/PlanDetails'
|
||||
import SendCarDetails from './components/SendCarDetails'
|
||||
import PlanAuditDetails from './components/PlanAuditDetails'
|
||||
|
||||
export default {
|
||||
components: { AuditRecord, PlanDetails, SendCarDetails },
|
||||
components: { AuditRecord, PlanDetails, PlanAuditDetails },
|
||||
data() {
|
||||
return {
|
||||
opt: {},
|
||||
navbarTitle: '详情',
|
||||
active: 1,
|
||||
showModal: false,
|
||||
modalTitle: '',
|
||||
readonly: false,
|
||||
keyWord: '',
|
||||
status: 'loadmore',
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
tableList: [],
|
||||
checkStatus: '', // 审核状态
|
||||
checkStatusId: '', // 审核状态id
|
||||
showPicker: false,
|
||||
columns: [
|
||||
{
|
||||
label: '已审核',
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
label: '待审核',
|
||||
value: 0
|
||||
}
|
||||
],
|
||||
// 单选
|
||||
radioList: [
|
||||
{
|
||||
name: '苹果',
|
||||
value: '1',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '香蕉',
|
||||
value: '2',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '橙子',
|
||||
value: '3',
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
name: '榴莲',
|
||||
value: '4',
|
||||
disabled: false
|
||||
}
|
||||
],
|
||||
radioValue: '', // 选中的值
|
||||
opinion: '', // 审批意见
|
||||
isPass: true // 是否通过
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
justifyContent() {
|
||||
return this.active == 1 ? 'flex-start' : 'center'
|
||||
active: 1
|
||||
}
|
||||
},
|
||||
onLoad(opt) {
|
||||
this.opt = JSON.parse(opt.params)
|
||||
console.log('🚀 ~ onLoad ~ this.opt', this.opt)
|
||||
// this.getList()
|
||||
this.active = this.opt.active
|
||||
if (this.opt.isPlan) {
|
||||
this.navbarTitle = '计划详情'
|
||||
} else if (this.opt.isAudit) {
|
||||
this.navbarTitle = '派车详情'
|
||||
} else if (this.opt.isDetail && !this.opt.isArrival) {
|
||||
this.navbarTitle = '派车详情'
|
||||
} else {
|
||||
this.navbarTitle = '详情'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTab(index) {
|
||||
this.active = index
|
||||
if (index == 1) {
|
||||
this.tableList = [
|
||||
{
|
||||
code: '20210801',
|
||||
proName: '项目名称',
|
||||
plan: '计划1',
|
||||
sub: '供应商1',
|
||||
// 已派车
|
||||
isSend: true
|
||||
},
|
||||
{
|
||||
code: '20210802',
|
||||
proName: '项目名称',
|
||||
plan: '计划2',
|
||||
sub: '供应商2',
|
||||
// 待派车
|
||||
isSend: false
|
||||
}
|
||||
]
|
||||
} else {
|
||||
this.tableList = [
|
||||
{
|
||||
code: '20210803',
|
||||
proName: '项目名称',
|
||||
plan: '计划1',
|
||||
sub: '供应商1',
|
||||
status: 1
|
||||
},
|
||||
{
|
||||
code: '20210804',
|
||||
proName: '项目名称',
|
||||
plan: '计划2',
|
||||
sub: '供应商2',
|
||||
status: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
handleSearch() {
|
||||
this.pageSize = 10
|
||||
this.getList()
|
||||
},
|
||||
async getList() {
|
||||
try {
|
||||
const params = {
|
||||
encryptedData: JSON.stringify({ keyWord: this.keyWord }),
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize
|
||||
}
|
||||
console.log('🚀 ~ getList ~ params', params)
|
||||
const res = await getInventoryList(params)
|
||||
console.log('🚀 ~ getList ~ res', res)
|
||||
this.tableList = res.data.list
|
||||
this.total = res.data.total
|
||||
} catch (error) {
|
||||
console.log('🚀 ~ getList ~ error', error)
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('🚀 ~ onReachBottom ~ ')
|
||||
if (this.total < 10 || this.total == this.tableList.length) {
|
||||
this.status = 'nomore'
|
||||
return
|
||||
}
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageSize += 10
|
||||
this.getList()
|
||||
if (this.tableList.length != this.total) this.status = 'loadmore'
|
||||
else this.status = 'nomore'
|
||||
}, 500)
|
||||
console.log('加载..', this.pageSize)
|
||||
},
|
||||
// 打开弹窗
|
||||
openModal() {
|
||||
this.showModal = true
|
||||
if (this.active == 1) {
|
||||
this.modalTitle = '指定派车供应商'
|
||||
this.radioValue = ''
|
||||
} else {
|
||||
this.modalTitle = '派车审核'
|
||||
this.isPass = true
|
||||
this.opinion = ''
|
||||
}
|
||||
},
|
||||
confirm(e) {
|
||||
console.log('🚀 ~ confirm ~ e', e)
|
||||
this.checkStatus = e.value[0].label
|
||||
this.checkStatusId = e.value[0].value
|
||||
this.showPicker = false
|
||||
},
|
||||
groupChange() {
|
||||
console.log('🚀 ~ radioValue', this.radioValue)
|
||||
},
|
||||
submit() {
|
||||
console.log('提交')
|
||||
if (this.active == 1) {
|
||||
console.log('派车分配', this.radioValue)
|
||||
if (!this.radioValue) {
|
||||
uni.showToast({
|
||||
title: '请选择派车供应商',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
} else {
|
||||
console.log('派车审核', this.isPass, this.opinion)
|
||||
if (!this.isPass && !this.opinion) {
|
||||
uni.showToast({
|
||||
title: '请填写审核不通过意见',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
this.showModal = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -294,29 +54,13 @@ export default {
|
|||
page {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
.search {
|
||||
margin: 15px;
|
||||
display: flex;
|
||||
}
|
||||
.list-cont {
|
||||
margin: 15px;
|
||||
padding: 15px 0;
|
||||
margin-bottom: 15px;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
.list-item {
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.df-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
.tabs {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 44px;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
|
|
@ -327,7 +71,7 @@ page {
|
|||
color: #666;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
border-bottom: 2px solid transparent; // 添加透明边框
|
||||
border-bottom: 2px solid #dcdcdc; // 添加透明边框
|
||||
transition: color 0.3s ease, border-bottom 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
|
||||
|
||||
// 激活状态
|
||||
|
|
@ -338,37 +82,4 @@ page {
|
|||
}
|
||||
}
|
||||
}
|
||||
.slot-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.item-wrap {
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.item {
|
||||
width: 45%;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid #e8e8e8;
|
||||
border-radius: 30px;
|
||||
background-color: #f8f8f8;
|
||||
color: #666;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
|
||||
|
||||
&.active {
|
||||
color: $u-primary;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid $u-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<div class="item" :class="{ active: active == 1 }" @click="handleTab(1)">派车分配</div>
|
||||
<div class="item" :class="{ active: active == 2 }" @click="handleTab(2)">派车审核</div>
|
||||
</div>
|
||||
<div style="height: 45px;"></div>
|
||||
<!-- 搜索 -->
|
||||
<div class="search">
|
||||
<div v-if="active == 2" style="width: 30%">
|
||||
|
|
@ -272,20 +273,25 @@ export default {
|
|||
handleDetail(item) {
|
||||
console.log('查看详情', item)
|
||||
let isPlan = false
|
||||
let isSendCar = false
|
||||
let isAudit = false
|
||||
let isDetail = false
|
||||
if (this.active == 1 && item.isSend) {
|
||||
let active = null
|
||||
if (this.active == 1 && !item.isSend) {
|
||||
isPlan = true
|
||||
} else if (this.active == 1 && item.status == 0) {
|
||||
isSendCar = true
|
||||
} else if (!item.isSend || item.status == 1) {
|
||||
active = 1
|
||||
} else if (this.active == 2 && item.status == 0) {
|
||||
isAudit = true
|
||||
active = 2
|
||||
} else if (item.isSend || item.status == 1) {
|
||||
isDetail = true
|
||||
active = 1
|
||||
}
|
||||
const params = {
|
||||
...item,
|
||||
isPlan,
|
||||
isSendCar,
|
||||
isAudit,
|
||||
isDetail,
|
||||
active
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/sendACarSystem/details?params=${JSON.stringify(params)}`
|
||||
|
|
@ -346,6 +352,12 @@ page {
|
|||
}
|
||||
}
|
||||
.tabs {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
top: 44px;
|
||||
left: 0;
|
||||
background-color: #fff;
|
||||
z-index: 99;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
|
|
@ -356,7 +368,7 @@ page {
|
|||
color: #666;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
border-bottom: 2px solid transparent; // 添加透明边框
|
||||
border-bottom: 2px solid #dcdcdc; // 添加透明边框
|
||||
transition: color 0.3s ease, border-bottom 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
|
||||
|
||||
// 激活状态
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 KiB |
Loading…
Reference in New Issue