This commit is contained in:
cclu 2023-05-17 19:38:46 +08:00
parent f612ac80e7
commit e7025feed3
6 changed files with 790 additions and 8 deletions

View File

@ -400,6 +400,23 @@
}
]
},
{
"root": "pages/projectWarning",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "经营项目预警审批"
}
},
{
"path": "detail",
"style": {
"navigationBarTitleText": "经营项目预警审批"
}
}
]
},
{
"root": "pages/contract",
"pages": [

View File

@ -264,7 +264,6 @@
AppletMenuStatus: this.membershipType === 9999 ? '1,2' : '1'
})
this.modelMenu = res.Result_Data.List
console.log('modelMenu',this.modelMenu)
}
},
onReady() {

View File

@ -0,0 +1,117 @@
<template>
<view class="card cardBorder" @tap='goDetail' >
<!-- 卡片第一行数据 -->
<view class="uni-flex jc-between">
<!-- 左侧 -->
<!-- 商品名称 -->
<p class="contentName">{{item.BUSINESSPROJECT_NAME}}</p>
<!-- 右侧 -->
<!-- 有效状态 -->
<p class="other-coast">{{item.PROJECTWARNING_STATE===1000?'待切换':item.PROJECTWARNING_STATE===2000?'审核中':item.PROJECTWARNING_STATE===9000?'已切换':item.PROJECTWARNING_STATE===0?'':''}}</p>
</view>
<!-- 卡片第一行角标 -->
<view class="content-index" style="background-color:#FB8B56">{{i+1}}</view>
<!-- 卡片第二行数据 -->
<view style="line-height: 1;">
<!-- 服务区名称 -->
<p class="content-type-text">{{item.SERVERPART_NAME}}</p>
</view>
<!-- 卡片第三行数据 -->
<view class="uni-flex content-box-cashpay">
<!-- 中间 -->
<!-- 资质到期时间 -->
<p class="titleStyle" ><text :style="{fontSize:item.EXPIREDAYS!==0?'28px':'18px',lineHeight:'50px'}">{{item.EXPIREDAYS!==0?`${item.EXPIREDAYS}`:'已到期'}}</text><text style="font-size: 12px" v-if="item.EXPIREDAYS!==0"></text></p>
</view>
<!-- 分割线 -->
<view class="bb1"></view>
<!-- 卡片第四行第一项数据 -->
<!-- 操作人员 -->
<view class="cellBetweenStyle" >
<view class="cellLeftStyle">
<!-- 圆点 -->
<p class="G-icon A-icon" style="margin: 0 8px 0 5px"></p>
<span class="content-span">{{item.BUSINESS_TYPE===1000?'合作经营':item.BUSINESS_TYPE===2000?'固定租金':''}}</span>
</view>
<!-- 卡片第四行第一项右侧数据 -->
<text class="content-span lh15">{{item.WARNING_DATE}}</text>
</view>
</view>
</template>
<script>
export default {
props: {//
item: {
type: Object,
required: true
},
i: {
type: Number,
required: true
}
},
data() {//
return {
}
},
computed: {},
methods: {//
goDetail() {
this.$emit('goDetail', this.item)
},
dateEmpty(v) {
return this.$util.cutDate(v, 'YYYY/MM/DD')
}
}
}
</script>
<!-- 注意style样式增加scoped私有属性标记后组件样式不能在引用的地方进行修改 -->
<style scoped>
@import url('/common/css/listUnit.css');
.cardBorder {//
box-shadow: 0 0px 6rpx #E2E2E2;
}
.titleStyle {//
margin-right: 10rpx;
font-size: 36rpx;
color: #111;
font-family: Bahnschrift Regular;
}
.typeText {
padding: 0 10rpx;
margin-right: 16rpx;
margin-top: 40rpx;
position: absolute;
right: 0rpx;
}
.other-coast {//
color: #D1A271;
background: linear-gradient(to top, #EBDDCF, #FCFBF8);
border-radius: 6rpx;
font-size: 24rpx;
padding: 0 10rpx;
height: 40rpx;
}
.cellLeftStyle{//
line-height: 45rpx;
display: flex;
flex-wrap : wrap;
align-items: center; //
justify-content: flex-start; //
}
.cellBetweenStyle {//
line-height: 45rpx;
width: 100%;
display: flex;
flex-wrap : wrap;
align-items: center; //
justify-content: space-between; //
}
</style>

View File

@ -0,0 +1,258 @@
<template>
<view class="page-body">
<!-- 顶部信息卡片 -->
<view class="card-header">
<!-- 顶部信息卡片第一行 -->
<view style="display: flex;align-items: center;justify-content: space-between">
<h3 style="padding-bottom: 0">{{dataDetail.SERVERPARTSHOP_NAME}}</h3>
<span style="font-size: 15px">{{dataDetail.BUSINESS_TYPE===1000?'合作经营':dataDetail.BUSINESS_TYPE===2000?'固定租金':''}}</span>
</view>
<!-- 顶部信息卡片第二行 -->
<view style="text-align: right">
<!-- 左侧 -->
<span style="font-size: 15px">{{dataDetail.SERVERPART_NAME}}</span>
</view>
</view>
<view class="content-detail-box main-card ino-flex ai-center uni-column" style="margin-top: 12px">
<view class="cellTopStyle" >
<view class="item">
<span class="fourth-name" style="font-size: 16px;">合同期限</span>
<span class="fourth-value" >{{dataDetail.STARTDATE}} - {{dataDetail.ENDDATE}}</span>
</view>
</view>
<view class="cellTopStyle" >
<view class="item">
<span class="fourth-name" style="font-size: 16px;">保底租金</span>
<span class="fourth-value" ><span class="unit" v-if="dataDetail.MINTURNOVER"></span>{{dataDetail.MINTURNOVER?dataDetail.MINTURNOVER:''}}</span>
</view>
</view>
</view>
<view class="content">
<p class="text">本项目驿达累计分润已达<span style="font-size: 18px;color: orangered">{{ dataDetail.ROYALTY_PRICE }}</span>
<span v-if="dataDetail.EXPIREDAYS">预计<span style="font-size: 22px;color: orangered">{{ dataDetail.EXPIREDAYS }}</span>天后完成保底</span>
<span v-if="!dataDetail.EXPIREDAYS" ><span style="font-size: 18px;color: orangered">已完成</span>保底</span></p>
<p class="text">是否依合同将分润比例进行切换驿达<span style="font-size: 18px;color: orangered">{{YDValue}}%</span>商家<span style="font-size: 18px;color: orangered">{{SJValue}}%</span></p>
</view>
<!-- <view v-if="dataDetail.PROJECTWARNING_STATE===1000" style="display: flex;align-items: center;justify-content:flex-start;margin:10px 0">-->
<!-- <span class="fourth-name">分润比例</span>-->
<!-- <input type="number" style="flex: 1" placeholder="请输入分润比例" :value="inputValue" @input="handleInput"/>-->
<!-- <span>(500-9500)</span>-->
<!-- </view>-->
<!-- <view v-if="dataDetail.PROJECTWARNING_STATE>1000">-->
<!-- <view class="modle-title">-->
<!-- <h4>切换信息</h4>-->
<!-- </view>-->
<!-- <view class="content-detail-box main-card ino-flex ai-center uni-column">-->
<!-- <view class="cellTopStyle" style="margin-right: 6%">-->
<!-- <view class="item">-->
<!-- <span class="fourth-name">分润比例</span>-->
<!-- <span class="fourth-value">{{dataDetail.ROYALTY_CRATE / 100}}%</span>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<view class="position">
<button class="change" v-if="dataDetail.PROJECTWARNING_STATE===1000" type="primary" @click="handleChange">切换比例</button>
<button class="noChange" v-if="dataDetail.PROJECTWARNING_STATE===1000" type="primary" @click="handleNoChange">暂不切换</button>
</view>
</view>
</template>
<script>
import Store from "../../store/store";
export default {
data() {
return {
PROJECTWARNING_ID:'',
dataDetail:{},
inputValue:'',//
useDate:{},
YDValue:'',// 驿
SJValue:'',//
}
},
onLoad(query){
this.PROJECTWARNING_ID = query.id
this.handleGetDetail()
this.useDate = Store.state.userData
console.log('this.useDate',this.useDate)
},
methods:{
//
handleGetDetail(){
this.$request.$webGet('EShangApiMain/BusinessProject/GetPROJECTWARNINGDetail',{
PROJECTWARNINGId:this.PROJECTWARNING_ID
}).then(res=>{
this.dataDetail = res.Result_Data
//
for (let key in this.dataDetail){
if (key==='REVENUEDAILY_AMOUNT' || key==='REVENUE_AMOUNT' || key==='ROYALTY_PRICE' || key==='SUBROYALTY_PRICE' || key==='TICKET_FEE' || key==='MINTURNOVER'){
this.dataDetail[key] = this.$util.fmoney(this.dataDetail[key])
}
}
this.YDValue = this.dataDetail.MerchantRatio.split(':')[0]
this.SJValue = this.dataDetail.MerchantRatio.split(':')[1]
// this.dataDetail.SERVERPART_NAME = this.dataDetail.SERVERPART_NAME.split('')[0]
})
},
handleInput(e){
this.inputValue = e.target.value
},
handleNoChange(){
this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{
BusinessId: this.PROJECTWARNING_ID, //
StaffId:this.useDate.UserId,//
StaffName:this.useDate.UserName,//
SwitchRate:this.dataDetail.ROYALTY_RATE * 100,//
ApproveState:'0',//
}).then(res=>{
console.log('res')
uni.showToast({
title: res.Result_Desc,
icon: 'none'
})
this.handleGetDetail()
})
},
//
handleChange(){
this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{
BusinessId: this.PROJECTWARNING_ID, //
StaffId:this.useDate.UserId,//
StaffName:this.useDate.UserName,//
SwitchRate:this.dataDetail.ROYALTY_CRATE,//
ApproveState:this.dataDetail.PROJECTWARNING_STATE===1000?'2000':'9000',//
}).then(res=>{
console.log('res')
uni.showToast({
title: res.Result_Desc,
icon: 'none'
})
this.handleGetDetail()
})
}
}
}
</script>
<style scoped>
.page-body {
min-height: 100%;
padding: 40rpx 25rpx;
background-color: #fff;
box-sizing: border-box;
padding-bottom: 196rpx;
}
.card-header {
border-radius: 10rpx;
background: linear-gradient(to right, #8998bb 0%, #a9b5d2 100%);
color: #FFFFFF;
box-sizing: border-box;
width: 100%;
padding: 24rpx 16rpx;
}
.card-header h3 {
padding-bottom: 10rpx;
font-size: 30rpx;
}
.card-header .fs12>text {
font-size: 24rpx;
}
.cellTopStyle {
line-height: 45rpx;
width: 100%;
display: inline-block;
}
.cellTopStyle .item{
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
}
.cellTopStyle .item .fourth-value{
display: inline-block;
width: 200px;
text-align: left;
font-size: 16px;
}
.content{
margin-top: 12px;
}
.content .text{
font-size: 13px;
text-indent: 2rem;
}
.cellTopStyle .noSpace{
width: 100%;
display: flex;
align-items: center;
}
.fourth-name {
min-width: 120rpx;
max-width: 185rpx;
color: #ADB2BF;
font-size: 16px;
}
.position{
position: fixed;
width: calc(100% - 24px);
bottom: 44px;
color: #fff;
display: flex;
justify-content: space-between;
}
.position .change{
width: 48%;
height: 44px;
border-radius: 22px;
line-height: 44px;
text-align: center;
font-size: 13px;
}
.position .noChange{
width: 48%;
height: 44px;
border-radius: 22px;
line-height: 44px;
text-align: center;
background: linear-gradient( to right ,#8998bb 0%, #8a99bc 100%);
font-size: 13px;
}
.modle-title {
color: #000;
padding: 14px 15px 10px 0;
font-size: 26rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
h4 {
font-weight: bolder;
}
.content-detail-box {
background: #f8f9fa;
border-radius: 8rpx;
overflow: hidden;
position: relative;
padding: 10rpx 30rpx 16rpx 30rpx;
font-size: 26rpx;
}
.content-detail-box span {
font-size: 26rpx;
}
</style>

View File

@ -0,0 +1,385 @@
<template>
<view class="content">
<!-- 顶部筛选菜单 -->
<view class="uni-flex ai-center screen-box menu-list">
<view class="menu" v-for="(item,index) in menuList" :key="index" @click="handleClick(item)">
<view class="menu-image round" style="height:75rpx;width:75rpx;padding: 18rpx;"
:style="activeType==item.id ? 'background:#f0f7fe;' : 'background:#f6f7f8;'">
<image :src="activeType==item.id? item.active: item.src" mode="aspectFit" style="height:100%;">
</image>
</view>
<view class="menuName" :style="activeType==item.id ? 'color:#5B96E9' :'color:#808D97'">{{item.name}}
</view>
</view>
</view>
<view v-if="pageList.length>0">
<list-unit v-for="(item,index) in pageList" :key="index" :item="item" :i="index" @goDetail="goDetail"></list-unit>
</view>
<!-- 无数据时的页面显示 -->
<view v-else-if="pageData.isLoading===false">
<noFound :nodata="pageList.length>0 ? false : true" :text="searchTime[1]+'无数据,'">
<text name="other">请选择其它日期进行查询</text>
</noFound>
</view>
<!-- 底部提示 -->
<view class="load-more" v-if="pageList.length>0">
<text>{{!pageData.isEnd ? '正在加载,请稍后...':'——— 我是有底线的 ———'}}</text>
</view>
<UniPop :show="showPop" @hidePopup="closePop" type="bottom" @touchmove.prevent round="true">
<view class="pop">
<p class="title">服务区名称</p>
<picker class="title-clock" mode="selector" @change="pickerChange" :value="pickerIndex"
range-key="label" :range="severpartList">
<view class="box-center-title">{{severpartList[pickerIndex].label}}</view>
</picker>
<p class="title" style="margin-top: 20px">日期</p>
<view class="selectTime">
<picker class="time" mode="date" @change="handlechangeTime($event,0)">
<text>{{searchTime[0]}}</text>
</picker>
-
<picker class="time" style="text-align: right" mode="date" @change="handlechangeTime($event,1)">
<text>{{searchTime[1]}}</text>
</picker>
</view>
<view class="popbtn" @click="reloadList">确定</view>
</view>
</UniPop>
</view>
</template>
<script>
import {
mapState,
mapGetters,
mapMutations
} from 'vuex'
import ListUnit from "./components/listUnit.vue";
import UniPop from '@/components/uni-popup.vue'
export default {
components: {ListUnit,UniPop},
data() {
let stime = this.$util.cutDate(new Date(), 'YYYY-MM-DD', -6)
let etime = this.$util.cutDate(new Date(), 'YYYY-MM-DD')
return {
menuList: [
{ //
name: '全部',
src: '/static/images/expense/type/yifq.png',
active: '/static/images/expense/type/yifqz.png',
id: 0
}, {
name: '待延期',
src: '/static/images/expense/type/shenp.png',
active: '/static/images/expense/type/shenpz.png',
id: 1
}, {
name: '已延期',
src: '/static/images/expense/type/yichl.png',
active: '/static/images/expense/type/yichlz.png',
id: 2
}, {
name: '更多筛选',
src: '/static/images/expense/type/shaix.png',
active: '/static/images/expense/type/shaixz.png',
id: 99
} ],
activeType: 0, //
showPop: false,
pageList:[],
severpartList:[],//
pickerIndex: 0,
searchTime: [stime, etime],
pageData: {
pageIndex: 1,
pageSize: 10,
isEnd: false,
isLoading: true,
endDate: etime
},
pushInto:false,//
TotalCount: '',
}
},
computed: { // data
...mapGetters({
reloading: 'shouldReLoadingList'
}),
...mapState({
user: (state) => {
console.log('state.userData',state.userData)
return state.userData
},
}),
},
onLoad(query){
if(query){
this.pushInto = true
}
},
onShow(){
this.pageData.pageIndex = 1
this.getSeverpart()
this.handleGetList()
},
onReachBottom () {
if (!this.pageData.isEnd){
this.pageData.pageIndex+=1
this.handleGetList()
}
},
methods:{
...mapMutations(['shouldReLoadingList']),
//
handleGetList(){
let data = {}
if (this.pushInto){
data = {
searchModel:{
QueryType: 0 , //01
SearchParameter:{
PROJECTWARNING_ID :'',//
BUSINESSPROJECTSPLIT_ID:'',//
BUSINESSPROJECT_NAME:'',//
SHOPROYALTY_ID:'',//
SERVERPART_ID:'',//
// SERVERPART_IDS:this.severpartList[this.pickerIndex].value||'',// ()
SERVERPART_IDS:'',// ()
SERVERPART_NAME:'',//
SERVERPARTSHOP_NAME:'',//
BUSINESS_TYPE:'',//
STARTDATE: '',//
ENDDATE: '',//
MINTURNOVER:'',//
ROYALTY_PRICE:'',//
ROYALTY_RATE:'',//
ROYALTY_CRATE:'',//
EXPIREDAYS:'',//
WARNING_DATE:'',//
WARNING_DATE_Start:this.searchTime[0],// ()
WARNING_DATE_End:this.searchTime[1],// ()
PROJECTWARNING_STATE:'',//
PROJECTWARNING_STATES:'1000,2000,9000',// ()
RECORD_DATE:'',//
PROJECTWARNING_DESC:'',//
REVENUE_AMOUNT:'',//
SUBROYALTY_PRICE:'',//
TICKET_FEE:'',//
BUSINESSDAYS:'',//
REVENUEDAILY_AMOUNT:'',//
},
keyWord:{
Key:'',//
Value:'',//
},
PageIndex: this.pageData.pageIndex,//
PageSize: this.pageData.pageSize,//
SortStr:'PROJECTWARNING_STATE,EXPIREDAYS,WARNING_DATE desc',//
}
}
}else{
}
console.log('data',data)
this.$request.$webPost("EShangApiMain/BusinessProject/GetPROJECTWARNINGList", data.searchModel).then(res=>{
console.log('res',res)
if (!res.Result_Code || res.Result_Code !== 100) {
this.pageData.isLoading = false
this.pageList = []
} else {
//
let list = res.Result_Data.List.filter(p => {
if (this.activeType === 1) {
return p.BUSINESS_TYPE === 1000
} else if (this.activeType === 2) {
return p.BUSINESS_TYPE === 9000
} else {
return true
}
})
if (list.length > 0) {
this.TotalCount = res.Result_Data.TotalCount
if (this.pageData.pageIndex === 1) {
this.pageList = list
} else {
if (this.pageList.length<this.TotalCount){
this.pageList = this.pageList.concat(list)
}else{
this.pageData.isEnd = true
}
}
}else{
this.pageData.isEnd = true
}
this.$forceUpdate()
}
uni.hideLoading()
let _this = this
setTimeout(function() {
_this.pageData.isLoading = false
}, 500)
})
},
//
getSeverpart() {
const _this = this
this.$request.$webGet('EShangApiMain/Logging/GetPassportInfoById', {
UserIdEncrypted: this.user.UserIdEncrypted
}).then(res => {
if (!res.Result_Code || res.Result_Code != '100') {
_this.severpartList = []
} else {
this.$request.$webGet('EShangApiMain/BaseInfo/GetServerpartDDL', {
ServerpartCodes: res.Result_Data.CityAuthority,
ServerpartType: 1000,
StatisticsType: '1000,2000'
}).then(res => {
_this.severpartList = res.Result_Data.List
this.handleGetList()
})
}
})
},
//
handlechangeTime(e, index){
console.log(111)
if (index===1){
let startTime = new Date(this.searchTime[0]).getTime()
let endTime = new Date(e.detail.value).getTime()
console.log('startTime',startTime)
console.log('endTime',endTime)
if (startTime>endTime){
uni.showToast({
title: '结束时间不能小于开始时间',
icon: 'none',
})
}else{
this.searchTime[index] = e.detail.value
this.$forceUpdate()
}
}else{
this.searchTime[index] = e.detail.value
this.$forceUpdate()
}
},
pickerChange(e) {
this.pickerIndex = e.detail.value
this.pageData.pageIndex = 1
},
reloadList() {
let startTime = new Date(this.searchTime[0]).getTime()
let endTime = new Date(this.searchTime[1]).getTime()
if (startTime>=endTime){
uni.showToast({
title: '结束时间不能小于等于开始时间',
icon: 'none',
})
}else{
this.showPop = false
this.pageData.pageIndex = 1
uni.showLoading({
title: '正在加载'
})
this.pageData.isLoading = true
this.pageData.isEnd = false
this.pageList = []
this.handleGetList()
this.$forceUpdate()
}
},
handleClick(item) { //
if (item.id === 99) { // id=99
this.showPop = true
} else {
this.activeType = item.id
this.reloadList()
}
},
goDetail(item){
this.$util.toNextRoute('navigateTo', `/pages/projectWarning/detail?id=${item.PROJECTWARNING_ID}`)
},
closePop(){
this.showPop = false
}
}
}
</script>
<style scoped>
.menu-list {
//
width: 100%;
background-color: #fff;
flex-wrap: wrap;
}
.menu {
text-align: center;
min-width: 185rpx;
padding: 24rpx 0;
}
.round {
border-radius: 50%;
}
.menuName {
color: #120E2B;
font-size: 24rpx;
text-align: center;
margin-top: 16rpx;
}
.menu-image {
padding: 12rpx 8rpx;
height: 80rpx;
box-sizing: border-box;
margin: 0 auto;
text-align: center;
}
.menu-image image {
max-width: 100%;
max-height: 100%;
}
.screen-box {
background-color: #fff;
padding: 0 0rpx;
position: sticky;
top: 0;
z-index: 1;
}
.pop{
width: 100%;
box-sizing: border-box;
padding: 16px;
text-align: left;
}
.pop .title{
font-size: 14px;
font-weight: 600;
}
.pop .title-clock{
display: inline-block;
}
.pop .selectTime{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.pop .selectTime .time{
width: 45%;
}
.pop .popbtn {
width: 639rpx;
height: 80rpx;
line-height: 80rpx;
color: #fff;
font-size: 28rpx;
background: #5b96e9;
border-radius: 8rpx;
margin: 48rpx auto 24rpx auto;
text-align: center;
}
</style>

View File

@ -7,10 +7,11 @@ const publicOptions = (() => { // 获取本机的信息
brand: systemInfo.brand || '', // 设备名称
model: encodeURIComponent(systemInfo.model), // 机型
os_version: systemInfo.system, // 安卓版本号
}
})()
export default {
/**
* 自定义post,get函数返回Promise
@ -42,14 +43,19 @@ export default {
data: data,
method: method,
}
if (method == 'POST' && !isWebApi) {
requstOptions.header = {
'content-type': 'application/x-www-form-urlencoded;charset=utf-8'
'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
'ServerpartCodes':Store.state.userData.UserCityAuthority,
'ProvinceCode': Store.state.userData.ProvinceCode
}
}else{
requstOptions.header = {
'ServerpartCodes':Store.state.userData.UserCityAuthority,
'ProvinceCode': Store.state.userData.ProvinceCode
}
}
requstOptions.success = (res) => {
//服务器返回数据
if (res && (res.statusCode === 200 || res.statusCode === 304 || res.statusCode === 400)) {
if (res.data && ((res.data.ResultCode != '999' && res.data.ResultCode != undefined) ||