Commit 57aa51a9 authored by sheng du's avatar sheng du
Browse files

修复提出的问题

parent e3e3ed72
......@@ -10,6 +10,10 @@
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
......
/**
* http 求封装
* http 求封装
* @author tangsj
* @param {*} url 求地址
* @param {*} options 求参数
* @param {*} url 求地址
* @param {*} options 求参数
*/
import config from '../config';
import utils from '../utils';
// 记录求中的求数,控制loading显示
// 记录求中的求数,控制loading显示
let requestCount = 0;
let hasError = false;
......@@ -44,21 +44,41 @@ export function fetch(url, options) {
success: (res) => {
// console.log(res)
// console.log(res.data)
// 【500 错误,401用户不存在,301用户密码不匹配,302密码过期】
if (res.data.status != 200) {
if (res.data.message === '登录过期,请重新登录!') {
console.log("fdsa")
uni.removeStorageSync('token');
uni.reLaunch({
url: '/basicsPage/login/index',
// if (res.data.message === '登錄過期,請重新登錄!') {
// console.log("fdsa")
// uni.removeStorageSync('token');
// uni.reLaunch({
// url: '/basicsPage/login/index',
// });
// }
if (res.data.status == '401') {
uni.showToast({
title: '用戶不存在',
icon: 'none',
});
}
if (!options.holdTip) {
hasError = true;
} else if (res.data.status == '301') {
uni.showToast({
title: res.message || '服务器异常!',
title: '用戶密碼不匹配',
icon: 'none',
});
hasError = true;
} else if (res.data.status == '302') {
uni.showToast({
title: '密碼過期',
icon: 'none',
});
hasError = true;
} else {
if (!options.holdTip) {
uni.showToast({
title: res.message || '服務器異常!',
icon: 'none',
});
hasError = true;
}
}
return reject(res.data || {});
}
......
......@@ -220,6 +220,13 @@ export default {
...data,
});
},
//修改跟进
UpdateCPRByHPSUser(data) {
return http.post('/home/hps/curl', {
uri: 'UpdateCPRByHPSUser',
...data,
});
},
// /**
// * 获取用户信息
......
......@@ -2,7 +2,7 @@
<view class="file-upload">
<view class="upload-btn flex-center" @click="selectFile">
<image src="../../static/images/upload.png" style="width: 30rpx;height: 20rpx;" mode=""></image>
<text>选择文件</text>
<text>選擇文件</text>
</view>
<view class="file-list">
......@@ -76,7 +76,7 @@
uni.chooseImage({
count: 1, //默认9Z
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], //从相册选择
sourceType: ['album', 'camera'], //从相册選擇
success: (res) => {
this.upload(res.tempFilePaths[0])
},
......@@ -113,7 +113,7 @@
permision.gotoAppPermissionSetting()
}, 1000);
} else {
strStatus = '您未开启相机权限,前往手机“设置”开启';
strStatus = '您未开启相机权限,前往手机“设置”开启';
uni.showToast({
icon: 'none',
title: strStatus,
......
<template>
<view class="mask-selecter" v-if="show">
<view v-if="type == 'select'" class="select">
<view class="mask-selecter" v-if="show" @click="close">
<view v-if="type == 'select'" class="select" @click.stop="clickStop">
<view class="item flex-center" :class="item.value == defaultValue ? 'active': ''"
v-for="(item,index) in options" :key="index" @click="$emit('change',item)">
v-for="(item,index) in options" :key="index" @click.stop="$emit('change',item)">
{{item.label}}
</view>
</view>
<view v-if="type == 'tag'" class="select tag-select">
<view v-if="type == 'tag'" class="select tag-select" @click.stop="clickStop">
<view class="tag-item flex-center" :class="item.value == defaultValue ? 'active': ''"
v-for="(item,index) in options" :key="index" @click="$emit('change',item)">
v-for="(item,index) in options" :key="index" @click.stop="$emit('change',item)">
{{item.label}}
</view>
</view>
<view v-if="type == 'children'" class="select children-select">
<view v-if="type == 'children'" class="select children-select" @click.stop="clickStop">
<view class="left">
<view class="left-item item flex-center" :class="leftItem.value == item.value ? 'active' : ''"
v-for="(item,index) in options" @click="selectLeft(item)">{{item.label}}
v-for="(item,index) in options" @click.stop="selectLeft(item)">{{item.label}}
</view>
</view>
<view class="right">
<template v-if="rightOptions.length">
<view class="right-item item flex-center" v-for="(item,index) in rightOptions" :key="index"
@click="$emit('change',item)">
@click.stop="$emit('change',item)">
{{item.label}}
</view>
</template>
......@@ -33,10 +33,20 @@
{{item.label}}
</view> -->
</view>
<view v-if="type == 'dateRange'" class="select time-range" @click.stop="clickStop">
<uni-datetime-picker v-model="datetimerange" type="daterange" rangeSeparator="至"
@change="datetimerangeChange" :startPlaceholder="defaultValue[0] || '开始日期'"
:endPlaceholder="defaultValue[1] || '结束日期'" />
<view class="pub-btn time-confirm" @click.stop="$emit('change',datetimerange)">
确认
</view>
</view>
</view>
</template>
<script>
import dayjs from 'dayjs';
export default {
name: "MaskSelecter",
props: {
......@@ -45,7 +55,7 @@
default: () => false
},
type: {
//children 联动 ,select选择 tag 标签选择
//children 联动 ,select選擇 tag 标签選擇
type: String,
default: () => 'select'
},
......@@ -54,13 +64,16 @@
default: () => []
},
defaultValue: {
type: [String, Number],
type: [String, Number, Array],
default: () => ''
},
},
computed: {
show: {
get() {
// if (this.value == true && this.type == 'dateRange' && !this.datetimerange.length) {
// this.datetimerange = [...this.defaultValue]
// }
return this.value
},
set(newVal) {
......@@ -71,14 +84,24 @@
data() {
return {
leftItem: {},
rightOptions: []
rightOptions: [],
datetimerange: []
};
},
methods: {
clickStop() {},
selectLeft(leftItem) {
this.leftItem = leftItem
this.rightOptions = leftItem.children || []
}
},
datetimerangeChange(timeRange) {
// console.log(timeRange);
this.datetimerange = [...timeRange]
// this.$emit('change', timeRange)
},
close() {
this.$emit('close')
},
}
}
</script>
......@@ -89,7 +112,8 @@
.mask-selecter {
height: calc(100vh - 188rpx);
// #ifdef APP
height: 100vh;
// height: 100vh;
height: calc(100vh - 104rpx);
// #endif
position: fixed;
bottom: 0;
......@@ -161,4 +185,12 @@
height: 84rpx;
}
}
.time-range {
padding: 30rpx;
}
.time-confirm {
margin: 30rpx 0;
}
</style>
\ No newline at end of file
......@@ -9,7 +9,8 @@
</picker>
</template>
<template v-if="type == 'date'">
<picker mode="date" :value="pickerValue" :start="startDate" :end="endDate" @change="bindDateChange" :disabled="readonly">
<picker mode="date" :value="pickerValue" :start="startDate" :end="endDate" @change="bindDateChange"
:disabled="readonly" fields="day">
<view class="flex flex-between">
<view class="uni-input">{{showTextDate}}</view>
<uni-icons type="right" size="18" style="margin-left: 10rpx;"></uni-icons>
......@@ -39,7 +40,7 @@
},
placeholder: {
type: String,
default: () => '请选择'
default: () => '請選擇'
},
type: {
type: String,
......@@ -69,7 +70,7 @@
return this.placeholder || ''
},
showTextDate() {
return this.pickerValue || '请选择日期'
return this.pickerValue || '請選擇日期'
},
},
data() {
......@@ -82,7 +83,7 @@
},
methods: {
bindPickerChange(val) {
// console.log(val.detail.value);
this.index = val.detail.value
this.pickerItem = this.range[this.index]
......@@ -92,7 +93,7 @@
this.pickerValue = e.detail.value
},
selectTag(e) {
if(this.readonly){
if (this.readonly) {
return
}
this.pickerItem = e
......
{
"name" : "hehuangApp",
"appid" : "__UNI__27F5A0B",
"appid" : "__UNI__E6A1DF0",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
......@@ -20,7 +20,9 @@
"delay" : 0
},
/* 模块配置 */
"modules" : {},
"modules" : {
"Camera" : {}
},
/* 应用发布信息 */
"distribute" : {
/* android打包配置 */
......
......@@ -21,12 +21,19 @@
<view class="step-item" v-for="(item,index) in stepList" :key="index">
<view class="step-item-content">
<view class="">跟進時間:{{item.cpr_createdate}}</view>
<!-- <view class="">跟進人:張三</view> -->
<view class="">跟進人:{{item.cpr_createusrname}}</view>
<view class="text-primary" v-if="item.cpr_cmsstatus=='P'">審批狀態:待審批</view>
<view class="text-primary" v-if="item.cpr_cmsstatus=='A'">審批狀態:審批通過</view>
<view class="text-danger" v-if="item.cpr_cmsstatus=='R'">審批狀態:審批不通過</view>
<!-- <view class="text-danger" v-if="index==2">未通过原因:原因原因原因原因原因原因原因原因</view> -->
<template v-if="item.cpr_cmsstatus=='R'">
<view class="flex flex-between">
<view class="text-danger">審批狀態:審批不通過</view>
<view class="pub-btn mini" @click="reSubmit(item)" v-if="detail.cpl_status != 3">重新提交
</view>
</view>
</template>
<view class="text-danger" v-if="item.cpr_cmsstatus=='R'">不通過原因:{{item.cpr_cmsapprovalcomments}}
</view>
<view class="flex-between">
<text>跟進內容</text>
......@@ -137,6 +144,11 @@
this.stepList = [...res.show_data]
}
},
//重新提交
reSubmit(item) {
uni.setStorageSync('reSubmitFollow', item)
uni.navigateBack(-1)
},
}
}
</script>
......
......@@ -56,7 +56,7 @@
// console.log(this.listIndex);
this.active = item.code
},
//选择物业
//選擇物业
selected(item) {
uni.setStorageSync('project', item)
uni.setStorageSync('projectId', item.project_id)
......
......@@ -2,7 +2,7 @@
<view class="page full">
<view class="pub-card">
<view class="pub-form card-form">
<view class="form-item flex-between bd-bt">
<!-- <view class="form-item flex-between bd-bt">
<view class="label">投訴人性質</view>
<view class="pub-form-content">
......@@ -13,7 +13,7 @@
<radio :checked="form.nature == 2" />非住客
</label>
</view>
</view>
</view> -->
<template v-if="form.nature == 1">
<view class="form-item flex-between bd-bt">
<view class="label must">小區</view>
......@@ -28,7 +28,7 @@
@change="getZoneList"></PubPicker>
</view>
</view>
<view class="form-item flex-between bd-bt">
<view class="form-item flex-between bd-bt" v-show="false">
<view class="label must"></view>
<view class="pub-form-content">
<PubPicker :range="ranges.zone_id" v-model="form.zone_id" placeholder="請選擇園"
......@@ -67,7 +67,7 @@
<!-- <view class="form-item flex-between bd-bt">
<view class="label">具体位置</view>
<view class="pub-form-content">
<input type="text" v-model="form.address" placeholder="输入具体位置">
<input type="text" v-model="form.address" placeholder="输入具体位置">
</view>
</view> -->
</template>
......@@ -131,6 +131,19 @@
<input type="text" v-model="form.cpl_usremail" placeholder="請輸入郵箱">
</view>
</view>
<view class="form-item bd-bt">
<view class="label">員工備注</view>
<textarea v-model="form.cpl_beremarks" placeholder="請輸入員工備注" cols="20" rows="10"></textarea>
</view>
<view class="form-item bd-bt">
<view class="label">員工內部備注</view>
<textarea v-model="form.cpl_feremarks" placeholder="請輸入員工內部備注" cols="20" rows="10"></textarea>
</view>
<view class="form-item bd-bt">
<view class="label">投訴人備注</view>
<textarea v-model="form.cpl_complainerrmk" placeholder="請輸入投訴人備注" cols="20" rows="10"></textarea>
</view>
</view>
</view>
......@@ -178,6 +191,10 @@
cpl_priority: '', //优先级
cpl_deadline: '', //处理截止日期
cpl_beremarks: '', //员工备注-业主可见内容
cpl_feremarks: '', //员工内部备注
cpl_complainerrmk: '' //投诉人备注
},
fileList: [],
options: {
......@@ -212,7 +229,7 @@
cpl_otpid: this.options.cpl_otpid,
cpl_catid: cpl_catid.filter(item => item.value),
cpl_method: cpl_method.filter(item => item.value),
cpl_method: cpl_method.filter(item => item.value).filter(item => item.type_name != 'APP'),
cpl_priority: cpl_priority.filter(item => item.value),
}
},
......@@ -257,10 +274,15 @@
phase_id: ''
})
this.options.phase_id = this.typeToFilter(res.show_data, 'phase_id', 'phase_name')
let cpl_phaid_select = uni.getStorageSync('cpl_phaid_select')
if (cpl_phaid_select?.phase_id) {
this.form.phase_id = cpl_phaid_select.phase_id
this.getZoneList(cpl_phaid_select)
}
},
async getZoneList(val) {
this.address.apt_phadesc = val.label
this.address.apt_phadesc = val.label || val.phase_name
this.resetSelect(['cpl_otpid', 'unit_id', 'floor_id', 'block_id', 'zone_id'])
let res = await api.main.getZoneList({
......@@ -269,6 +291,12 @@
phase_id: this.form.phase_id,
})
this.options.zone_id = this.typeToFilter(res.show_data, 'zone_id', 'zone_name')
this.$nextTick(() => {
if (this.options.zone_id?.length) {
this.form.zone_id = this.options.zone_id[0].zone_id
this.getBlockList(this.options.zone_id[0])
}
})
},
async getBlockList(val) {
......@@ -281,6 +309,12 @@
zone_id: this.form.zone_id
})
this.options.block_id = this.typeToFilter(res.show_data, 'block_id', 'block_name')
this.$nextTick(() => {
if (this.options.block_id?.length == 1) {
this.form.block_id = this.options.block_id[0].block_id
this.getFloorList(this.options.block_id[0])
}
})
},
async getFloorList(val) {
......@@ -294,6 +328,13 @@
block_id: this.form.block_id,
})
this.options.floor_id = this.typeToFilter(res.show_data, 'floor_id', 'floor_name')
this.$nextTick(() => {
if (this.options.floor_id?.length == 1) {
this.form.floor_id = this.options.floor_id[0].floor_id
this.getUnitList(this.options.floor_id[0])
}
})
},
......@@ -310,6 +351,12 @@
floor_id: this.form.floor_id,
})
this.options.unit_id = this.typeToFilter(res.show_data, 'unit_id', 'unit_name')
this.$nextTick(() => {
if (this.options.unit_id?.length == 1) {
this.form.unit_id = this.options.unit_id[0].unit_id
this.getUnitOwnerAccountList(this.options.unit_id[0])
}
})
},
async getUnitOwnerAccountList(val) {
......@@ -325,6 +372,14 @@
})
this.options.cpl_otpid = this.typeToFilter(res.show_data, 'otp_otpid', 'otp_name')
this.$nextTick(() => {
if (this.options.cpl_otpid?.length == 1) {
this.form.cpl_otpid = this.options.cpl_otpid[0].otp_otpid
this.changeOpt(this.options.cpl_otpid[0])
// this.form.cpl_otpid = this.options.cpl_otpid?[0].otp_otpid
}
})
// mem_usrid 业主ID
// otp_otpid 业主策略ID
// otp_seqno 业主策略序号
......@@ -340,9 +395,9 @@
if (item.value == 'H') {
this.form.cpl_deadline = dayjs().add(1, 'day').format('YYYY-MM-DD')
} else if (item.value == 'N') {
this.form.cpl_deadline = dayjs().add(3, 'day').format('YYYY-MM-DD')
} else {
this.form.cpl_deadline = dayjs().add(7, 'day').format('YYYY-MM-DD')
} else {
this.form.cpl_deadline = dayjs().add(14, 'day').format('YYYY-MM-DD')
}
},
changeOpt(item) {
......@@ -478,6 +533,11 @@
imgs_url3: '',
imgs_url4: '',
imgs_url5: '',
cpl_beremarks: this.form.cpl_beremarks, //员工备注-业主可见内容
cpl_feremarks: this.form.cpl_feremarks, //员工内部备注
cpl_complainerrmk: this.form.cpl_complainerrmk //投诉人备注
}
if (this.form.nature == 1) {
datas = {
......@@ -517,7 +577,7 @@
},
toSuccess(id) {
uni.redirectTo({
url: `/pages/opinion/opinionSuccess?id=${id}`
url: `/pages/opinion/opinionSuccess?id=${id}`
})
},
}
......
......@@ -16,6 +16,10 @@
{{$utils.getDictName('cpl_priority',detail.cpl_priority)}}
</view>
<view class="room" v-if="detail.cpl_otpid">
{{detail.apt_phadesc}}{{detail.apt_zondesc}}{{detail.apt_blkdesc}}{{detail.apt_floor}}
{{detail.apt_flat}}
</view>
<view class="pub-tag success" v-if="!detail.cpl_otpid">非住客投訴</view>
</view>
</view>
......@@ -53,7 +57,7 @@
<view class="content">{{detail.cpl_usremail}}</view>
</view>
</view>
<view class="pub-card">
<view class="pub-card" v-if="!edit">
<view class="card-title">職員跟進</view>
<view class="card-content">
......@@ -98,6 +102,61 @@
<view class="content">{{cpr_detail.cpr_contentcms}}</view>
</view>
</view>
<view class="pub-card" v-if="edit">
<view class="card-title">意見跟進</view>
<view class="pub-form card-form">
<!-- <view class="form-item flex-between bd-bt">
<view class="label">跟進類型</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpl_type" v-model="editForm.cpl_type"></PubPicker>
</view>
</view> -->
<!-- <view class="form-item flex-between bd-bt" v-if="editForm.cpl_type == '2'">
<view class="label">意見來源</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpl_method" v-model="editForm.cpr_method"></PubPicker>
</view>
</view> -->
<view class="form-item bd-bt">
<view class="label">內容</view>
<textarea v-model="editForm.cpr_content" placeholder="請輸入您的意見內容" cols="30" rows="10"></textarea>
</view>
<!-- <view class="form-item bd-bt">
<view class="label">上传凭证<text class="tip">(支持png、jpg、pdf格式,最多可傳9个)</text></view>
<FileUploader v-model="fileList"></FileUploader>
</view> -->
<!-- <view class="form-item flex-between bd-bt">
<view class="label">是否可见</view>
<view class="pub-form-content">
{{cpr_detail.cpr_confidential =='Y'?'':''}}
<PubPicker :range="ranges.cpr_confidential" v-model="cpr_detail.cpr_confidential" readonly>
</PubPicker>
</view>
</view> -->
<!-- <view class="form-item flex-between bd-bt">
<view class="label">跟進截至日期</view>
<view class="pub-form-content">
<PubPicker type="date" v-model="editForm.cpr_deadline"></PubPicker>
</view>
</view> -->
<view class="form-item flex-between bd-bt">
<view class="label">前台展示</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpr_fedisplay" v-model="editForm.cpr_fedisplay"></PubPicker>
</view>
</view>
<view class="form-item bd-bt">
<view class="label">前台內容</view>
<textarea v-model="editForm.cpr_contentcms" placeholder="請描述前台內容" cols="30" rows="10"></textarea>
</view>
</view>
</view>
<!-- 审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况 -->
<!-- <view class="pub-card">
<view class="card-title">审批情况</view>
......@@ -124,8 +183,16 @@
<view class="page-bottom-btns">
<view class="btn pub-btn" @click="checkOpen('A')">審批通過</view>
<view class="btn pub-btn plain" @click="checkOpen('R')">審批不通過</view>
<template v-if="edit">
<view class="btn pub-btn" style="width:510rpx" @click="editSubmit">保存</view>
<view class="btn pub-btn info plain" style="width:160rpx" @click="edit = false">取消</view>
</template>
<template v-else>
<view class="btn pub-btn" @click="editFollow()">编辑</view>
<view class="btn pub-btn" @click="checkOpen('A')">審批通過</view>
<view class="btn pub-btn plain" @click="checkOpen('R')">審批不通過</view>
</template>
</view>
......@@ -133,7 +200,17 @@
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" :mode="form.cpr_cmsstatus == 'A' ? 'base' : 'input'"
:title="form.cpr_cmsstatus == 'A' ? '審批通過' : '審批不通過'" content="確認審批通過嗎?" value="" placeholder="請輸入不通過原因"
@confirm="dialogInputConfirm"></uni-popup-dialog>
@confirm="dialogInputConfirm">
<template v-if="form.cpr_cmsstatus == 'A'">
<view class="flex-col flex-items-center">
<view>確認審批通過嗎?</view>
<view class="mt-20">
<checkbox value="isAutoSuccess" :checked="isAutoSuccess" @click='isAutoSuccessChange' />
審批後自動完成意見
</view>
</view>
</template>
</uni-popup-dialog>
</uni-popup>
</view>
</template>
......@@ -151,6 +228,7 @@
},
data() {
return {
isAutoSuccess: false,
cpl_cplid: '',
cpr_cprid: '',
......@@ -161,15 +239,27 @@
form: {
cpr_cmsstatus: 'A'
},
edit: false,
editForm: {
cpr_method: '',
cpr_content: '',
cpr_confidential: '',
cpr_deadline: '',
cpr_fedisplay: '',
cpr_contentcms: '',
cpl_type: ''
}
}
},
computed: {
ranges() {
const cpl_method = uni.getStorageSync('cpl_method') || []
return {
cpl_method: cpl_method.filter(item => item.value),
cpl_method: cpl_method.filter(item => item.value).filter(item => item.type_name != 'APP'),
cpr_confidential: [{
label: '',
value: 'Y'
......@@ -183,7 +273,14 @@
}, {
label: '',
value: 'N'
}]
}],
cpl_type: [{
label: '職員跟進',
value: '1'
}, {
label: '住客回應',
value: '2'
}],
}
},
},
......@@ -241,25 +338,106 @@
// // console.log(res.show_data);
// this.stepList = [...res.show_data]
}
},
//编辑
editFollow() {
// uni.setStorageSync('editFollow', this.)
for (let key in this.editForm) {
if (this.cpr_detail[key]) {
this.editForm[key] = this.cpr_detail[key]
}
}
this.editForm.cpr_deadline = dayjs(this.cpr_detail.cpl_deadline).format('YYYY-MM-DD')
// console.log(this.editForm);
this.edit = true
// this.isFollow = true
},
//编辑保存
editSubmit() {
let userInfo = uni.getStorageSync('userInfo');
let datas = {
project_id: uni.getStorageSync('projectId'),
HPSUser_id: userInfo.stf_usrid,
cpr_cprid: this.cpr_cprid,
cpr_cplid: this.cpl_cplid,
cpr_content: this.editForm.cpr_content,
cpr_fedisplay: this.editForm.cpr_fedisplay,
cpr_contentcms: this.editForm.cpr_contentcms,
}
uni.showLoading({
title: '提交中...'
})
api.main.UpdateCPRByHPSUser(datas).then(res => {
if (res) {
uni.showToast({
title: '修改成功'
})
setTimeout(() => {
this.edit = false
this.getDetail()
this.getCplComplaintReplyByCPLID()
}, 600)
}
})
},
checkOpen(val) {
this.form.cpr_cmsstatus = val
this.$refs.inputDialog.open()
},
isAutoSuccessChange(e) {
console.log(e);
this.isAutoSuccess = !this.isAutoSuccess
},
dialogInputConfirm(val) {
let that = this
let userInfo = uni.getStorageSync('userInfo');
const datas = {
project_id: uni.getStorageSync('projectId'),
HPSUser_id: userInfo.stf_usrid,
cpr_cprid: this.cpr_cprid,
cpr_cplid: this.cpl_cplid,
cpr_cmsstatus: this.form.cpr_cmsstatus
cpr_cmsstatus: this.form.cpr_cmsstatus,
cpr_cmsapprovalcomments: val || ''
}
api.main.ApprovalCPRByHPSUser(datas).then(res => {
if (res) {
uni.showToast({
title: '審批成功'
})
setTimeout(() => {
if (that.form.cpr_cmsstatus == 'A' && that.isAutoSuccess === true) {
that.overOpinion()
} else {
uni.navigateBack(-1)
}
}, 600)
}
})
},
//完成
overOpinion() {
let that = this
let userInfo = uni.getStorageSync('userInfo');
uni.showLoading({
title: "正在完成"
})
let datas = {
project_id: uni.getStorageSync('projectId'),
HPSUser_id: userInfo.stf_usrid,
cpl_cplid: this.cpl_cplid,
}
api.main.CompleteCPLByHPSUser(datas).then(res => {
if (res) {
uni.showToast({
title: '意見已完成'
})
setTimeout(() => {
uni.navigateBack(-1)
}, 600)
......
<template>
<view class="page">
<view class="filters flex">
<view class="filter-item flex-items-center" :class="filterValue == item.value? 'active' :''"
v-for="(item,index) in filters" :key="index" @click="chaneSelect(item)">
<text>{{item.label}}</text>
<view class="filter-item flex-items-center" :class="showSelect && selectKey == item.field ? 'active' :''"
v-for="(item,index) in filters" :key="index" @click="openSelect(item)">
<text v-if="filterValues[item.field]">{{filterNames[item.field]}}</text>
<text v-else>{{item.name}}</text>
<image v-if="showSelect && selectKey == item.field" src="../../static/images/down-active.png"
style="width:16rpx;height: 12rpx;" mode=""></image>
<image v-else src="../../static/images/down.png" style="width:16rpx;height: 12rpx;" mode=""></image>
</view>
</view>
<view class="list" ref="list">
......@@ -23,6 +27,12 @@
:class="item.cpl_priority == 'H'? 'warning' : item.cpl_priority == 'L' ? 'success' : ''">
{{$utils.getDictName('cpl_priority',item.cpl_priority)}}
</view>
<view class="room" v-if="item.apt_flat">
{{item.apt_phadesc}}{{item.apt_zondesc}}{{item.apt_blkdesc}}{{item.apt_floor}}
{{item.apt_flat}}
</view>
<view class="pub-tag success" v-else>非住客投訴</view>
<!-- <view class="room" v-if="index == 0">一期-8幢2單元座 6樓XXXX</view>
<view class="pub-tag success" v-else>非住客投诉</view> -->
</view>
......@@ -35,6 +45,10 @@
<!-- <div class="bottom-block" style="width: 100%;height: 180rpx;"></div> -->
</scroll-view>
</view>
<MaskSelecter v-model="showSelect" :defaultValue="filterValues[selectKey]" :type="selectType"
:options="options[selectKey]" @change="changeFilter">
</MaskSelecter>
</view>
</template>
......@@ -42,6 +56,10 @@
import MaskSelecter from '@/components/MaskSelecter/MaskSelecter.vue'
import config from '@/config';
import api from '@/api'
import {
mapState,
mapActions
} from 'vuex'
export default {
components: {
MaskSelecter
......@@ -51,27 +69,54 @@
value: '',
scrollTop: 0,
filterValue: 1,
list: []
list: [],
cpl_phaid_select: {},
showSelect: false,
selectKey: '',
selectType: 'select',
filterValues: {
cpl_phaid: ''
},
filterNames: {
cpl_phaid: '',
},
}
},
computed: {
...mapState([
'cpl_phaid'
]),
filters() {
return [{
label: '待審批',
value: 1,
}
// , {
// label: '已通過',
// value: 2,
// }, {
// label: '未通過',
// value: 3,
// }, {
// label: '全部',
// value: 4,
// },
]
name: '期數',
field: 'cpl_phaid',
type: 'select',
}]
},
options() {
return {
cpl_phaid: this.cpl_phaid,
}
},
// filters() {
// return [{
// label: '待審批',
// value: 1,
// }
// // , {
// // label: '已通過',
// // value: 2,
// // }, {
// // label: '未通過',
// // value: 3,
// // }, {
// // label: '全部',
// // value: 4,
// // },
// ]
// },
},
onLoad() {
this.$nextTick(() => {
......@@ -81,14 +126,48 @@
},
onShow() {
let cpl_phaid_select = uni.getStorageSync('cpl_phaid_select')
if (cpl_phaid_select) {
this.filterNames.cpl_phaid = cpl_phaid_select.label
this.filterValues.cpl_phaid = cpl_phaid_select.value
}
this.GetCPRWaitForApproval()
},
methods: {
openSelect(item) {
this.selectKey = item.field
this.selectType = item.type
// if (item.field == 'room') {
this.showSelect = !this.showSelect
// }
},
changeFilter(val) {
this.showSelect = false
// if (this.selectKey == 'cpl_phaid') {
// uni.setStorageSync('cpl_phaid_select', val)
// }
if (!val.value) {
this.filterNames[this.selectKey] = ''
this.filterValues[this.selectKey] = ''
} else {
this.filterNames[this.selectKey] = val.label
this.filterValues[this.selectKey] = val.value
}
this.GetCPRWaitForApproval()
},
async GetCPRWaitForApproval() {
const {
cpl_phaid
} = this.filterValues
let res = await api.main.GetCPRWaitForApproval({
project_id: uni.getStorageSync('projectId'),
lang: config.lang,
cpl_phaid: cpl_phaid || ''
})
if (res.show_data) {
console.log(res.show_data);
......@@ -121,34 +200,20 @@
.filters {
justify-content: flex-start;
padding-left: 30rpx;
background-color: @uni-bg-color;
flex-shrink: 0;
height: 100rpx;
font-size: 24rpx;
.filter-item {
margin: 0 30rpx;
position: relative;
&.active {
color: @uni-color-primary;
&::after {
content: '';
width: 100%;
height: 8rpx;
opacity: 1;
border-radius: 4rpx;
background: #32BAEC;
position: absolute;
bottom: 20rpx;
}
}
text {
display: inline-block;
max-width: 110rpx;
// max-width: 110rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
......@@ -160,6 +225,47 @@
}
}
// .filters {
// justify-content: flex-start;
// background-color: @uni-bg-color;
// flex-shrink: 0;
// height: 100rpx;
// font-size: 24rpx;
// .filter-item {
// margin: 0 30rpx;
// position: relative;
// &.active {
// color: @uni-color-primary;
// &::after {
// content: '';
// width: 100%;
// height: 8rpx;
// opacity: 1;
// border-radius: 4rpx;
// background: #32BAEC;
// position: absolute;
// bottom: 20rpx;
// }
// }
// text {
// display: inline-block;
// max-width: 110rpx;
// overflow: hidden;
// text-overflow: ellipsis;
// white-space: nowrap;
// }
// image {
// margin-left: 16rpx;
// }
// }
// }
::v-deep {
.uni-select {
font-size: 24rpx;
......
......@@ -51,8 +51,8 @@
<view class="content">{{$utils.getDictName('cpl_catid',detail.cpl_catid)}}</view>
</view>
<view class="card-content">
<view class="label">意見負責</view>
<view class="content">--</view>
<view class="label">意見負責</view>
<view class="content">{{getGroupNameById(detail.cpl_sgpid2 || detail.cpl_sgpid)}}</view>
</view>
<view class="card-content">
<view class="label">意見來源</view>
......@@ -82,20 +82,20 @@
</view>
<view class="card-content">
<view class="label">最後更改日期</view>
<view class="content">--</view>
<view class="content">{{detail.cpl_lastmoddate}}</view>
</view>
<view class="card-content">
<view class="label">最後更改者</view>
<view class="content">--</view>
<view class="content">{{detail.cpl_lastmodusrid}}</view>
</view>
<view class="card-content">
<view class="label">完成时间</view>
<view class="content">--</view>
<!-- <view class="card-content">
<view class="label">创建时间</view>
<view class="content">{{detail.cpl_createdate}}</view>
</view>
<view class="card-content">
<view class="label">完成操作者</view>
<view class="content">--</view>
</view>
<view class="label">创建操作者</view>
<view class="content">{{detail.cpl_createusrid}}</view>
</view> -->
</template>
</view>
<!-- 审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况审批情况 -->
......@@ -123,9 +123,17 @@
</view>
<view class="pub-card" v-if="isFollow">
<view class="card-title">職員跟進</view>
<view class="card-title">意見跟進</view>
<view class="pub-form card-form">
<view class="form-item flex-between bd-bt">
<view class="label">跟進類型</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpl_type" v-model="form.cpl_type" @change="changeType"></PubPicker>
</view>
</view>
<view class="form-item flex-between bd-bt" v-if="form.cpl_type == '2'">
<view class="label">意見來源</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpl_method" v-model="form.cpr_method"></PubPicker>
......@@ -140,7 +148,7 @@
<FileUploader v-model="fileList"></FileUploader>
</view> -->
<view class="form-item flex-between bd-bt">
<view class="form-item flex-between bd-bt" v-show="false">
<view class="label">是否機密</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpr_confidential" v-model="form.cpr_confidential"></PubPicker>
......@@ -231,10 +239,11 @@
form: {
cpr_method: '',
cpr_content: '',
cpr_confidential: '',
cpr_confidential: 'Y',
cpr_deadline: '',
cpr_fedisplay: '',
cpr_contentcms: ''
cpr_contentcms: '',
cpl_type: '1'
},
stepList: [],
canOver: false,
......@@ -247,7 +256,7 @@
ranges() {
const cpl_method = uni.getStorageSync('cpl_method') || []
return {
cpl_method: cpl_method.filter(item => item.value),
cpl_method: cpl_method.filter(item => item.value).filter(item => item.type_name != 'APP'),
cpr_confidential: [{
label: '',
value: 'Y'
......@@ -261,7 +270,14 @@
}, {
label: '',
value: 'N'
}]
}],
cpl_type: [{
label: '職員跟進',
value: '1'
}, {
label: '住客回應',
value: '2'
}],
}
},
},
......@@ -276,10 +292,21 @@
},
onShow() {
if (this.id) {
this.getGroupList()
this.getDetail()
this.getCplComplaintReplyByCPLID()
}
let reSubmitFollow = uni.getStorageSync('reSubmitFollow')
this.isFollow = false
if (reSubmitFollow) {
for (let key in this.form) {
if (reSubmitFollow[key]) {
this.form[key] = reSubmitFollow[key]
}
}
this.isFollow = true
uni.removeStorageSync('reSubmitFollow')
}
},
methods: {
async getDetail() {
......@@ -330,10 +357,11 @@
this.form = {
cpr_method: '',
cpr_content: '',
cpr_confidential: '',
cpr_confidential: 'Y',
cpr_deadline: '',
cpr_fedisplay: '',
cpr_contentcms: ''
cpr_contentcms: '',
cpl_type: '1'
}
this.form.cpr_method = this.detail.cpl_method
......@@ -342,9 +370,26 @@
this.isFollow = true
},
//变更跟进类型
changeType(e) {
console.log(e);
if (e.value == '1') {
this.form.cpr_confidential = 'Y'
} else {
this.form.cpr_confidential = 'N'
}
},
//提交跟进
submit() {
let userInfo = uni.getStorageSync('userInfo');
if (!this.form.cpl_type) {
uni.showToast({
title: '請選擇跟進類型',
icon: 'none'
})
return
}
if (!this.form.cpr_content) {
uni.showToast({
title: '請輸入跟進內容',
......@@ -379,12 +424,14 @@
cpr_cplid: this.id,
cpr_title: '',
cpr_content: this.form.cpr_content,
cpr_method: this.form.cpr_method,
cpr_method: this.form.cpl_type == '1' ? '' : this.form.cpr_method,
cpr_seqno: this.stepList.length + 1,
cpr_confidential: this.form.cpr_confidential,
cpr_deadline: this.form.cpr_deadline,
cpr_fedisplay: this.form.cpr_fedisplay,
cpr_contentcms: this.form.cpr_contentcms,
HardCode: this.form.cpl_type == '1' ? 'S' : ''
}
......@@ -424,10 +471,13 @@
//打开转单
async openTurn() {
this.$refs.popup.open('bottom')
this.getGroupList()
},
async getGroupList() {
let res = await api.main.GetHPSGroupsCanFollowCPL({
project_id: uni.getStorageSync('projectId'),
})
console.log(res.show_data);
// console.log(res.show_data);
res.show_data = res.show_data.map(item => {
return {
...item,
......@@ -438,6 +488,17 @@
this.groupList = [...res.show_data]
this.selectGroup = [0]
},
getGroupNameById(id) {
if (this.groupList?.length) {
let findItem = this.groupList.find(item => item.sgp_sgpid == id)
if (findItem) {
return findItem.sgp_desc
}
return '--'
}
return '--'
},
bindChangeGroup(e) {
console.log(e.detail.value);
this.selectGroup = e.detail.value
......
......@@ -39,13 +39,13 @@
<view class="form-item flex-between bd-bt">
<view class="label must">意見類別</view>
<view class="pub-form-content">
<PubPicker :range="ranges.cpl_catid" v-model="form.cpl_catid" readonly></PubPicker>
<PubPicker :range="ranges.cpl_catid" v-model="form.cpl_catid"></PubPicker>
</view>
</view>
<view class="form-item bd-bt">
<view class="label must">重要情況</view>
<view class="pub-form-content">
<PubPicker type="tagSelect" :range="ranges.cpl_priority" v-model="form.cpl_priority"
<PubPicker type="tagSelect" :range="ranges.cpl_priority" v-model="form.cpl_priority" readonly
@change="priorityChange">
</PubPicker>
</view>
......@@ -53,7 +53,7 @@
<view class="form-item flex-between bd-bt">
<view class="label">處理截止日期</view>
<view class="pub-form-content">
<PubPicker type="date" v-model="form.cpl_deadline"></PubPicker>
<PubPicker type="date" v-model="form.cpl_deadline" readonly></PubPicker>
</view>
</view>
<!-- <view class="form-item flex-between bd-bt">
......@@ -89,6 +89,20 @@
<input type="text" v-model="form.cpl_usremail" placeholder="請輸入郵箱" disabled>
</view>
</view>
<view class="form-item bd-bt">
<view class="label">員工備注</view>
<textarea v-model="form.cpl_beremarks" placeholder="請輸入員工備注" cols="20" rows="10"></textarea>
</view>
<view class="form-item bd-bt">
<view class="label">員工內部備注</view>
<textarea v-model="form.cpl_feremarks" placeholder="請輸入員工內部備注" cols="20" rows="10"></textarea>
</view>
<view class="form-item bd-bt">
<view class="label">投訴人備注</view>
<textarea v-model="form.cpl_complainerrmk" placeholder="請輸入投訴人備注" cols="20" rows="10"></textarea>
</view>
</view>
</view>
......@@ -138,6 +152,11 @@
cpl_priority: '', //优先级
cpl_deadline: '', //处理截止日期
cpl_beremarks: '', //员工备注-业主可见内容
cpl_feremarks: '', //员工内部备注
cpl_complainerrmk: '' //投诉人备注
},
fileList: [],
options: {
......@@ -165,7 +184,7 @@
cpl_otpid: this.options.cpl_otpid,
cpl_catid: cpl_catid.filter(item => item.value),
cpl_method: cpl_method.filter(item => item.value),
cpl_method: cpl_method.filter(item => item.value).filter(item => item.type_name != 'APP'),
cpl_priority: cpl_priority.filter(item => item.value),
}
},
......@@ -226,12 +245,14 @@
project_id: uni.getStorageSync('projectId'),
cpl_cplid: this.id,
HPSUser_id: userInfo.stf_usrid,
cpl_feremarks: '',
cpl_beremarks: '',
cpl_complainerrmk: '',
cpl_beremarks: this.form.cpl_beremarks, //员工备注-业主可见内容
cpl_feremarks: this.form.cpl_feremarks, //员工内部备注
cpl_complainerrmk: this.form.cpl_complainerrmk, //投诉人备注
cpl_priority: this.form.cpl_priority,
cpl_deadline: this.form.cpl_deadline,
cpl_stage: this.form.cpl_stage,
cpl_catid: this.form.cpl_stage,
}
uni.showLoading({
title: '提交中...'
......
......@@ -3,7 +3,7 @@
<view class="filters flex">
<view class="filter-item flex-items-center" :class="showSelect && selectKey == item.field ? 'active' :''"
v-for="(item,index) in filters" :key="index" @click="openSelect(item)">
<text v-if="filterValues[item.field]">{{filterNames[item.field]}}</text>
<text v-if="filterValues[item.field] && item.type!='dateRange'">{{filterNames[item.field]}}</text>
<text v-else>{{item.name}}</text>
<image v-if="showSelect && selectKey == item.field" src="../../static/images/down-active.png"
style="width:16rpx;height: 12rpx;" mode=""></image>
......@@ -55,7 +55,7 @@
</view>
<MaskSelecter v-model="showSelect" :defaultValue="filterValues[selectKey]" :type="selectType"
:options="options[selectKey]" @change="changeFilter">
:options="options[selectKey]" @change="changeFilter" @close="closeMaskSelecter">
</MaskSelecter>
<view class="check-list" @click="toCheckList" v-if="userInfo.sgp_iscplapproval == 'Y'">
<image src="../../static/images/check-list.png" style="width: 80rpx;height: 80rpx;" mode=""></image>
......@@ -94,6 +94,8 @@
cpl_priority: '',
cpl_catid: '',
sort: '',
cpl_phaid: '',
submitTime: [dayjs().subtract(3, 'month').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]
},
filterNames: {
cpl_method: '',
......@@ -101,8 +103,10 @@
cpl_priority: '',
cpl_catid: '',
sort: '',
cpl_phaid: '',
},
cpl_datefrom: dayjs().subtract(3, 'month').format('YYYY-MM-DD'),
cpl_dateto: dayjs().format('YYYY-MM-DD'),
list: [],
page: 1,
}
......@@ -115,6 +119,7 @@
'cpl_status',
'cpl_catid',
'cpl_method',
'cpl_phaid'
]),
options() {
......@@ -124,29 +129,33 @@
cpl_status: this.cpl_status,
cpl_catid: this.cpl_catid,
cpl_method: this.cpl_method,
sort: [{
label: '按遞交日期由近到遠',
value: 1
}, {
label: '按遞交日期由遠到近',
value: 2
},
// {
// label: '按最後期限由近到遠',
// value: 3
// }, {
// label: '按最後期限由遠到近',
// value: 4
// },
]
cpl_phaid: this.cpl_phaid,
// sort: [{
// label: '按遞交日期由近到遠',
// value: 1
// }, {
// label: '按遞交日期由遠到近',
// value: 2
// },
// // {
// // label: '按最後期限由近到遠',
// // value: 3
// // }, {
// // label: '按最後期限由遠到近',
// // value: 4
// // },
// ]
}
},
filters() {
return [{
name: '意見來源',
field: 'cpl_method',
type: 'tag',
name: '期數',
field: 'cpl_phaid',
type: 'select',
// name: '意見來源',
// field: 'cpl_method',
// type: 'tag',
}, {
name: '完成情況',
field: 'cpl_status',
......@@ -160,9 +169,9 @@
field: 'cpl_catid',
type: 'tag',
}, {
name: '排序選擇',
field: 'sort',
type: 'select',
name: '提交时间',
field: 'submitTime',
type: 'dateRange',
}]
},
},
......@@ -176,6 +185,11 @@
},
onShow() {
// this.userInfo = uni.getStorageSync('userInfo')
let cpl_phaid_select = uni.getStorageSync('cpl_phaid_select')
if (cpl_phaid_select) {
this.filterNames.cpl_phaid = cpl_phaid_select.label
this.filterValues.cpl_phaid = cpl_phaid_select.value
}
if (this.filterOver) {
this.getList()
}
......@@ -188,24 +202,26 @@
async updateDict() {
this.getAllCpl(() => {
this.filterOver = true
this.setDetaultFilter()
this.getList()
// this.setDetaultFilter()
})
},
//设置默认筛选项
setDetaultFilter() {
this.filterValues = {
...this.filterValues,
cpl_status: '1,2',
sort: '1'
}
this.filterNames = {
...this.filterNames,
cpl_status: '未完成',
sort: '按遞交日期由近到遠'
}
this.getList()
},
// setDetaultFilter() {
// this.filterValues = {
// ...this.filterValues,
// cpl_status: '1,2',
// sort: '1'
// }
// this.filterNames = {
// ...this.filterNames,
// cpl_status: '未完成',
// sort: '按遞交日期由近到遠'
// }
// this.getList()
// },
typeToFilter(list) {
if (!list || !list.length) {
return []
......@@ -233,6 +249,18 @@
},
changeFilter(val) {
this.showSelect = false
if (this.selectType == 'dateRange') {
let [cpl_datefrom, cpl_dateto] = val
this.cpl_datefrom = cpl_datefrom || dayjs().subtract(3, 'month').format('YYYY-MM-DD')
this.cpl_dateto = cpl_dateto || ''
this.getList()
return
}
if (this.selectKey == 'cpl_phaid') {
uni.setStorageSync('cpl_phaid_select', val)
}
if (!val.value) {
this.filterNames[this.selectKey] = ''
this.filterValues[this.selectKey] = ''
......@@ -242,6 +270,9 @@
}
this.getList()
},
closeMaskSelecter() {
this.showSelect = false
},
async getList() {
let userInfo = uni.getStorageSync('userInfo')
// project_id 14 是 string 小区编号
......@@ -254,7 +285,8 @@
cpl_catid,
cpl_status,
cpl_priority,
cpl_method
cpl_method,
cpl_phaid
} = this.filterValues
let datas = {
project_id: uni.getStorageSync('projectId'),
......@@ -265,11 +297,13 @@
cpl_priority,
cpl_method,
cpl_datefrom: this.cpl_datefrom,
cpl_dateto: ''
cpl_dateto: this.cpl_dateto,
cpl_phaid
}
let res = await api.main.getCPLListByHPSUserGroup(datas)
let list = res.show_data
list.sort((a, b) => {
return Date.parse(b.cpl_date) - Date.parse(a.cpl_date);
// sort: [{
// label: '按遞交日期由近到遠',
......@@ -284,22 +318,22 @@
// label: '按最後期限由遠到近',
// value: 4
// }]
if (this.filterValues.sort == 1) {
//提交时间倒序
return Date.parse(b.cpl_date) - Date.parse(a.cpl_date);
}
if (this.filterValues.sort == 2) {
//提交时间正序
return Date.parse(a.cpl_date) - Date.parse(b.cpl_date);
}
if (this.filterValues.sort == 3) {
//截至时间倒序
return Date.parse(b.cpl_deadline) - Date.parse(a.cpl_deadline);
}
if (this.filterValues.sort == 4) {
//截至时间正序
return Date.parse(a.cpl_deadline) - Date.parse(b.cpl_deadline);
}
// if (this.filterValues.sort == 1) {
// //提交时间倒序
// return Date.parse(b.cpl_date) - Date.parse(a.cpl_date);
// }
// if (this.filterValues.sort == 2) {
// //提交时间正序
// return Date.parse(a.cpl_date) - Date.parse(b.cpl_date);
// }
// if (this.filterValues.sort == 3) {
// //截至时间倒序
// return Date.parse(b.cpl_deadline) - Date.parse(a.cpl_deadline);
// }
// if (this.filterValues.sort == 4) {
// //截至时间正序
// return Date.parse(a.cpl_deadline) - Date.parse(b.cpl_deadline);
// }
})
this.list = list
uni.stopPullDownRefresh();
......
......@@ -47,7 +47,7 @@
<view class="content">{{$utils.getDictName('cpl_priority',detail.cpl_priority)}}</view>
</view>
<view class="card-content">
<view class="label">意見負責</view>
<view class="label">意見負責</view>
<view class="content">--</view>
</view>
<view class="card-content">
......
......@@ -83,6 +83,8 @@
if (res.confirm) {
uni.removeStorageSync('userInfo')
uni.removeStorageSync('userAuth')
uni.removeStorageSync('cpl_phaid_select')
uni.reLaunch({
url: '/pages/login/login/login'
})
......
......@@ -11,8 +11,8 @@ const typeToFilter = (list) => {
let res = list.map(item => {
return {
...item,
value: item.type_id,
label: item.type_name
value: item.type_id || item.phase_id,
label: item.type_name || item.phase_name
}
})
return [{
......@@ -22,12 +22,14 @@ const typeToFilter = (list) => {
}
let [priority, stage, sta, type, source] = [
let [priority, stage, sta, type, source, cpl_phaid] = [
uni.getStorageSync('cpl_priority'),
uni.getStorageSync('cpl_stage'),
uni.getStorageSync('cpl_status'),
uni.getStorageSync('cpl_catid'),
uni.getStorageSync('cpl_method'),
uni.getStorageSync('cpl_phaid'),
]
const store = new Vuex.Store({
......@@ -38,6 +40,7 @@ const store = new Vuex.Store({
cpl_status: sta && sta.length ? sta : [],
cpl_catid: type && type.length ? type : [],
cpl_method: source && source.length ? source : [],
cpl_phaid: cpl_phaid && cpl_phaid.length ? cpl_phaid : [],
},
mutations: {
//设置所有筛选项
......@@ -46,7 +49,7 @@ const store = new Vuex.Store({
state.cpl_stage = data.cpl_stage
state.cpl_status = data.cpl_status
state.cpl_catid = data.cpl_catid
state.cpl_method = data.cpl_method
state.cpl_phaid = data.cpl_phaid
},
// import { mapState, mapMutations } from 'vuex';
......@@ -75,10 +78,13 @@ const store = new Vuex.Store({
let p = Promise.all([api.main.getCPLPriority(datas), api
.main
.getCPLStage(datas), api.main.getCPLSTA(datas), api.main.getCPLType(datas), api.main
.getCPLSource(datas)
.getCPLSource(datas), api.main.getPhaseList({
...datas,
phase_id: ''
})
])
p.then(([priority, stage, sta, type, source]) => {
p.then(([priority, stage, sta, type, source, phaid]) => {
console.log(priority, stage, sta, type, source) // ['data1', 'data2', 'data3', 'data4']
uni.hideLoading()
......@@ -89,12 +95,15 @@ const store = new Vuex.Store({
const cpl_status = typeToFilter(sta.show_data)
const cpl_catid = typeToFilter(type.show_data)
const cpl_method = typeToFilter(source.show_data)
const cpl_phaid = typeToFilter(phaid.show_data)
commit('SET_ALL_CPL', {
cpl_priority: cpl_priority,
cpl_stage: cpl_stage,
cpl_status: cpl_status,
cpl_catid: cpl_catid,
cpl_method: cpl_method,
cpl_phaid: cpl_phaid,
})
uni.setStorageSync('cpl_priority', cpl_priority)
......@@ -102,6 +111,7 @@ const store = new Vuex.Store({
uni.setStorageSync('cpl_status', cpl_status)
uni.setStorageSync('cpl_catid', cpl_catid)
uni.setStorageSync('cpl_method', cpl_method)
uni.setStorageSync('cpl_phaid', cpl_phaid)
if (callback) {
callback()
......
......@@ -29,6 +29,9 @@
.bd-bt{
border-bottom: 1px solid @uni-border-color;
}
.mt-20{
margin-top: 20rpx;
}
.bd-card{
border: 1px solid @uni-border-color;
border-radius: 8rpx;
......@@ -256,6 +259,10 @@
color: #A6A6A6;
border-color: #A6A6A6;
}
&.mini{
height: 48rpx;
font-size: 24rpx;
}
}
.text-primary{
color: @uni-color-primary;
......
## 1.0.6(2023-04-12)
- 修复 微信小程序点击时会改变背景颜色的 bug
## 1.0.5(2023-02-03)
- 修复 禁用时会显示清空按钮
## 1.0.4(2023-02-02)
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
## 1.0.3(2023-01-16)
- 修复 不关联服务空间报错的问题
## 1.0.2(2023-01-14)
- 新增 属性 `format` 可用于格式化显示选项内容
## 1.0.1(2022-12-06)
- 修复 当where变化时,数据不会自动更新的问题
## 0.1.9(2022-09-05)
- 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
## 0.1.8(2022-08-29)
- 修复 点击的位置不准确
## 0.1.7(2022-08-12)
- 新增 支持 disabled 属性
## 0.1.6(2022-07-06)
- 修复 pc端宽度异常的bug
## 0.1.5
- 修复 pc端宽度异常的bug
## 0.1.4(2022-07-05)
- 优化 显示样式
## 0.1.3(2022-06-02)
- 修复 localdata 赋值不生效的 bug
- 新增 支持 uni.scss 修改颜色
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
## 0.1.2(2022-05-08)
- 修复 当 value 为 0 时选择不生效的 bug
## 0.1.1(2022-05-07)
- 新增 记住上次的选项(仅 collection 存在时有效)
## 0.1.0(2022-04-22)
- 初始化
## 1.0.6(2023-04-12)
- 修复 微信小程序点击时会改变背景颜色的 bug
## 1.0.5(2023-02-03)
- 修复 禁用时会显示清空按钮
## 1.0.4(2023-02-02)
- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
## 1.0.3(2023-01-16)
- 修复 不关联服务空间报错的问题
## 1.0.2(2023-01-14)
- 新增 属性 `format` 可用于格式化显示选项内容
## 1.0.1(2022-12-06)
- 修复 当where变化时,数据不会自动更新的问题
## 0.1.9(2022-09-05)
- 修复 微信小程序下拉框出现后選擇会点击到蒙板后面的输入框
## 0.1.8(2022-08-29)
- 修复 点击的位置不准确
## 0.1.7(2022-08-12)
- 新增 支持 disabled 属性
## 0.1.6(2022-07-06)
- 修复 pc端宽度异常的bug
## 0.1.5
- 修复 pc端宽度异常的bug
## 0.1.4(2022-07-05)
- 优化 显示样式
## 0.1.3(2022-06-02)
- 修复 localdata 赋值不生效的 bug
- 新增 支持 uni.scss 修改颜色
- 新增 支持选项禁用(数据选项设置 disabled: true 即禁用)
## 0.1.2(2022-05-08)
- 修复 当 value 为 0 时選擇不生效的 bug
## 0.1.1(2022-05-07)
- 新增 记住上次的选项(仅 collection 存在时有效)
## 0.1.0(2022-04-22)
- 初始化
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