Commit f77b2011629604ec0fb833055fdaf3f500f0da7f

Authored by 郭伟龙
1 parent f6acc049
Exists in charge

feat:页面调整

App.vue
... ... @@ -30,7 +30,6 @@ export default {
30 30 <style lang="scss">
31 31 /** 引入全局基本样式 */
32 32 @import 'styles/base.scss';
33   -
34 33 /* 引入 uView 基础样式 */
35 34 @import '@/uni_modules/uview-ui/index.scss';
36 35 /*每个页面公共scss */
... ...
api/charge.js 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +const { http } = uni.$u
  2 +
  3 +
  4 +
  5 +
... ...
app.scss
... ... @@ -29,20 +29,6 @@
29 29 }
30 30  
31 31  
32   -.overflow-one-lines {
33   - white-space: nowrap;
34   - overflow: hidden;
35   - text-overflow: ellipsis;
36   -}
37   -
38   -.overflow-two-lines {
39   - display: -webkit-box;
40   - -webkit-line-clamp: 2;
41   - -webkit-box-orient: vertical;
42   - overflow: hidden;
43   - text-overflow: ellipsis;
44   -}
45   -
46 32 .themeColor{
47 33 color:#EA5504;
48 34 }
... ...
common/config.js
1 1 module.exports = {
2 2 //后端接口地址
3 3 // baseUrl: 'http://10.11.38.240:9001', //内网开发环境
4   - baseUrl: 'http://172.17.56.37:18082/api', //测试环境
  4 + // baseUrl: 'http://172.17.56.37:18082/api', //测试环境
5 5 // baseUrl: 'http://172.17.56.16:18082/api', //ip正式环境
6   - // baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境
  6 + baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境
7 7 // 超时
8 8 timeout: 30000,
9 9 // 禁用 Cookie 等信息
... ...
components/popUpFillIn/popUpFillIn.vue
... ... @@ -11,7 +11,7 @@
11 11 <!-- 点火维护 -->
12 12 <u-form-item v-if="type==='dhwh'" required label="是否已点火" labelWidth="100">
13 13 <view class="flex justify-between margin-tb w100">
14   - <u-radio-group placement="row" v-model="radiovalueDHWH">
  14 + <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueDHWH">
15 15 <u-radio class="margin-right" name="是">是</u-radio>
16 16 <u-radio name="否">否</u-radio>
17 17 </u-radio-group>
... ... @@ -20,7 +20,7 @@
20 20 <!-- 工程维护 -->
21 21 <u-form-item v-if="type==='gcwh'" required label="是否竣工" labelWidth="100">
22 22 <view class="flex justify-between margin-tb w100">
23   - <u-radio-group placement="row" v-model="radiovalueGCWH">
  23 + <u-radio-group activeColor="#EA5504" placement="row" v-model="radiovalueGCWH">
24 24 <u-radio class="margin-right" name="是">是</u-radio>
25 25 <u-radio name="否">否</u-radio>
26 26 </u-radio-group>
... ...
js_sdk/g-gShowModal/components/G_show_modal/g_show_modal.js 0 → 100644
... ... @@ -0,0 +1,25 @@
  1 +import sj_show_modal from './index.js'
  2 +const g_show_modal = {
  3 + install: function(Vue) {
  4 + Vue.prototype.$showModal=function(op={}){
  5 + return new Promise((resolve, reject)=>{
  6 + let ssm=new sj_show_modal({
  7 + ...op,
  8 + $event:function(e){
  9 + if(e.res){
  10 + resolve(e);
  11 + }else{
  12 + reject(e);
  13 + }
  14 + }
  15 + })
  16 + ssm.show();
  17 + Vue.prototype.$hide=function(){
  18 + ssm.hide();
  19 + }
  20 + })
  21 + }
  22 + }
  23 +};
  24 +
  25 +export default g_show_modal
... ...
js_sdk/g-gShowModal/components/G_show_modal/index.js 0 → 100644
... ... @@ -0,0 +1,137 @@
  1 +/**
  2 + * author:G brother
  3 + * date:20200430
  4 + * Thank:chunLei所提供的思路和参照
  5 + * **/
  6 +export class show_model{
  7 + constructor(option={}) {
  8 +
  9 + this.bodyModel=null;
  10 + this.cancelModel=null;
  11 + this.confirmModel=null;
  12 + this.pageWidth=uni.getSystemInfoSync().screenWidth;
  13 + this.pageHeight=uni.getSystemInfoSync().screenHeight;
  14 + let opacity = option.opacity || 0.4;
  15 + let model_tit=option.title||'温馨提示';
  16 + let model_concent=option.concent||"请输入内容~"
  17 + let clickEvent=option.IsclickEvent||false;
  18 + let cancelVal=option.cancelVal||'取消';
  19 + let confirmVal=option.confirmVal||'确认';
  20 + let cancelColor=option.cancelColor||'#000000';
  21 + let confirmColor=option.confirmColor||'#EA5504';
  22 + let delCancel=option.delCancel||false;
  23 + let align=option.align||"center";
  24 + let fn = ()=>{};
  25 + this.$event = option.$event || fn;
  26 + let backOff=option.backOff||false;
  27 +
  28 + //#ifdef APP-PLUS
  29 + this.creatView({height:`${this.pageHeight}px`,top:0},opacity,clickEvent,{'tit':model_tit,'concent':model_concent,cancelVal,confirmVal,confirmColor,cancelColor,delCancel,align})
  30 + if(!backOff){
  31 + this.backbtn();
  32 + }
  33 + //#endif
  34 + }
  35 + backbtn(){
  36 + let that=this;
  37 + plus.key.addEventListener('backbutton', function (e) {
  38 + console.log(e,'back');
  39 + that.hide();
  40 + },false)
  41 + }
  42 + //生成提示框view
  43 + creatView(style,opa,clickEvent,modelInfo){
  44 + style = {
  45 + left:'0px',
  46 + width:'100%',
  47 + ...style
  48 + }
  49 +
  50 + let view = new plus.nativeObj.View('showModalView',style);
  51 + view.draw([
  52 + {tag:'rect',id:'modal',color:`rgba(0,0,0,${opa})`,position:{top:'0px',left:'0px',width:'100%',height:'100%'}},
  53 + {tag:'rect',id:'concent',color:`rgb(255,255,255)`,rectStyles:{borderWidth:'2px',radius:'8px'},position:{top:'42%',left:'10%',width:'80%',height:'16%'}},
  54 + {tag:'font',id:'title',text:modelInfo.tit,textStyles:{size:'16px',color:'#000'},position:{top:this.pageHeight*0.435+'px',left:'20%',width:'60%',height:'2%'}},
  55 + {tag:'font',id:'text',text:modelInfo.concent,textStyles:{size:'14px',color:'#999',whiteSpace:'normal',align:modelInfo.align},position:{top:this.pageHeight*0.455+'px',left:'23%',width:'54%',height:'8%'}},
  56 + {tag:'rect',id:'line',color:'#EAEAEC',position:{top:'53%',left:'10%',width:'80%',height:'1px'}},
  57 + {tag:'rect',id:'line2',color:'#EAEAEC',position:{top:'53%',left:'49%',width:modelInfo.delCancel?'0px':'1px',height:modelInfo.delCancel?'0px':'5%'}}
  58 +
  59 + ]);
  60 +
  61 + if(!modelInfo.delCancel){
  62 + // 取消
  63 + let viewCancel=new plus.nativeObj.View('cancel',{width:'30%',height:'8%',top:this.pageHeight*0.515+'px',left:'15%',backgroundColor:'rgba(255,255,255,0)'});
  64 + viewCancel.draw([
  65 + {tag:'font',id:'cancel',text:modelInfo.cancelVal,textStyles:{color:modelInfo.cancelColor,size:'14px'}},
  66 + ]);
  67 +
  68 + viewCancel.addEventListener("click",(e)=>{
  69 + this.$event({res:false,types:'cancel'});
  70 + this.hide();
  71 + },false);
  72 + this.cancelModel=viewCancel;
  73 + }
  74 +
  75 + // 确认
  76 + let viewconfirm=new plus.nativeObj.View('confirm',{width:modelInfo.delCancel?'60%':'30%',height:'8%',top:this.pageHeight*0.515+'px',left:modelInfo.delCancel?'20%':'55%',backgroundColor:'rgba(255,255,255,0)'});
  77 + viewconfirm.draw([
  78 + {tag:'font',id:'confirm',text:modelInfo.confirmVal,textStyles:{color:modelInfo.confirmColor,size:'14px'}},
  79 + ]);
  80 +
  81 + viewconfirm.addEventListener("click",(e)=>{
  82 + this.$event({res:true,types:'confirm'});
  83 + this.hide();
  84 +
  85 + },false);
  86 + //点击蒙布
  87 + if(clickEvent){
  88 +
  89 + view.addEventListener("click", (e) => {
  90 + this.$event({res:false,types:'cover'});
  91 + this.hide();
  92 + }, false);
  93 + }
  94 + this.bodyModel=view;
  95 + this.confirmModel=viewconfirm;
  96 + }
  97 + showModalAnimationClose(){
  98 + var options = {type:'pop-out',duration:300};
  99 + plus.nativeObj.View.startAnimation(options,{view:this.bodyModel},{view:this.cancelModel},{view:this.viewconfirm},function(){
  100 + console.log('plus.nativeObj.View.startAnimation动画结束');
  101 + // 关闭原生动画
  102 + plus.nativeObj.View.clearAnimation();
  103 + });
  104 + }
  105 + showModalAnimationOpen(){
  106 + var options = {type:'pop-in',duration:1000};
  107 +
  108 + plus.nativeObj.View.startAnimation(options,{view:this.bodyModel},{view:this.cancelModel},{view:this.viewconfirm},function(){
  109 + console.log('plus.nativeObj.View.startAnimation动画结束');
  110 + // 关闭原生动画
  111 + plus.nativeObj.View.clearAnimation();
  112 + });
  113 + }
  114 + show(){
  115 +
  116 + this.showModalAnimationOpen();
  117 + this.bodyModel.show();
  118 + if(this.cancelModel){
  119 + this.cancelModel.show();
  120 + }
  121 + this.confirmModel.show();
  122 +
  123 + }
  124 + hide(){
  125 + this.showModalAnimationClose();
  126 + this.bodyModel.hide();
  127 + if(this.cancelModel){
  128 + this.cancelModel.hide();
  129 + }
  130 + this.confirmModel.hide();
  131 +
  132 +
  133 +
  134 + }
  135 +}
  136 +
  137 +export default show_model
0 138 \ No newline at end of file
... ...
main.js
... ... @@ -6,7 +6,9 @@ import uView from &#39;@/uni_modules/uview-ui&#39;
6 6 import echarts from '@/components/echarts-uniapp/echarts-uniapp.vue';
7 7 import Navbar from '@/components/Navbar/index.vue'
8 8 import TabBar from '@/components/tabBar/tabBar.vue'
  9 +import plugins from './plugins' // plugins
9 10 import { numberToCurrencyNo, formatTime, goBack, formatDictLabel } from "@/utils/ruoyi";
  11 +import G_show_modal from '@/js_sdk/g-gShowModal/components/G_show_modal/g_show_modal.js'
10 12  
11 13 // vuex
12 14 import store from './store'
... ... @@ -47,6 +49,8 @@ Vue.component(&#39;TabBar&#39;, TabBar)
47 49  
48 50 App.mpType = 'app'
49 51  
  52 +Vue.use(G_show_modal)
  53 +Vue.use(plugins)
50 54 Vue.use(uView)
51 55  
52 56 const app = new Vue({
... ...
pages.json
... ... @@ -76,6 +76,13 @@
76 76 }
77 77 },
78 78 {
  79 + "path": "pages/charge/visitsAndFees/createaVisit",
  80 + "style": {
  81 + "navigationBarTitleText": "创建拜访/收费",
  82 + "navigationStyle": "custom"
  83 + }
  84 + },
  85 + {
79 86 "path": "pages/charge/ignitionMaintenance/index",
80 87 "style": {
81 88 "navigationBarTitleText": "点火维护",
... ...
pages/charge/ignitionMaintenance/index.vue
... ... @@ -49,7 +49,7 @@
49 49 当前审批节点:项目公司_市场负责人
50 50 </view> -->
51 51 </view>
52   - <popUpFillIn type="" title="点火维护" ref="popUpFillInRef"></popUpFillIn>
  52 + <popUpFillIn type="dhwh" title="点火维护" ref="popUpFillInRef"></popUpFillIn>
53 53 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar>
54 54 </view>
55 55 </template>
... ...
pages/charge/visitsAndFees/createaVisit.vue 0 → 100644
... ... @@ -0,0 +1,410 @@
  1 +<template>
  2 + <view class="container">
  3 + <Navbar title="创建拜访/收费" canBack></Navbar>
  4 + <u-form labelPosition="left" :model="model" :rules="rules" ref="uForm">
  5 + <view class="usuallyCard padding margin-sm">
  6 + <view class="text-lg padding-tb">
  7 + 基本信息
  8 + </view>
  9 + <view class="padding-lr-sm">
  10 + <!-- 日期选择 -->
  11 + <view class="" v-for="(item,index) in basisData" :key="index">
  12 + <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
  13 + v-if="item.type === 'date'">
  14 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  15 + disabledColor="#fff" border="none"></u-input>
  16 + <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon>
  17 + </u-form-item>
  18 + <!-- 输入类型 -->
  19 + <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
  20 + v-if="item.type === 'input'">
  21 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff"
  22 + border="none"></u-input>
  23 + <view class="" style="width: 40rpx;height: 40rpx;"></view>
  24 + </u-form-item>
  25 + <!-- 选择类型 -->
  26 + <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
  27 + v-if="item.type === 'select'">
  28 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  29 + disabledColor="#fff" border="none"></u-input>
  30 + <u-icon slot="right" name="arrow-down" size="20"></u-icon>
  31 + </u-form-item>
  32 + </view>
  33 + </view>
  34 + </view>
  35 +
  36 + <view class="usuallyCard padding margin-sm">
  37 + <view class="text-lg padding-tb">
  38 + 拜访信息
  39 + </view>
  40 + <view class="padding-lr-sm">
  41 + <view class="" v-for="(item,index) in visitData" :key="index">
  42 + <!-- 单选 -->
  43 + <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom
  44 + v-if="item.type === 'radio'">
  45 + <u-radio-group activeColor="#EA5504" placement="row" v-model="model.bf">
  46 + <u-radio class="margin-right" name="是">是</u-radio>
  47 + <u-radio name="否">否</u-radio>
  48 + </u-radio-group>
  49 + </u-form-item>
  50 + <!-- 日期 -->
  51 + <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
  52 + v-if="item.type === 'date'">
  53 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  54 + disabledColor="#fff" border="none"></u-input>
  55 + <u-icon slot="right" name="calendar" size="20" @click="calendarShow = true"></u-icon>
  56 + </u-form-item>
  57 + <!-- 输入 -->
  58 + <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
  59 + v-if="item.type === 'input'">
  60 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff"
  61 + border="none"></u-input>
  62 + <view class="" style="width: 40rpx;height: 40rpx;"></view>
  63 + </u-form-item>
  64 + <!-- 选择 -->
  65 + <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom
  66 + v-if="item.type === 'select'">
  67 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  68 + disabledColor="#fff" border="none"></u-input>
  69 + <u-icon slot="right" name="arrow-down" size="20"></u-icon>
  70 + </u-form-item>
  71 + <!-- 文件 -->
  72 + <u-form-item :required="item.required" :label="item.label" labelWidth="75%" borderBottom
  73 + v-if="item.type === 'file'">
  74 + <u-upload width="100rpx" height="100rpx"></u-upload>
  75 + </u-form-item>
  76 + </view>
  77 + </view>
  78 + </view>
  79 +
  80 + <view class="usuallyCard padding margin-sm">
  81 + <view class="text-lg padding-tb">
  82 + 决策人信息
  83 + </view>
  84 + <view class="padding-lr-sm">
  85 + <view class="" v-for="(item,index) in decisionMakersData" :key="index">
  86 + <!-- 单选 -->
  87 + <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom
  88 + v-if="item.type === 'radio'">
  89 + <u-radio-group activeColor="#EA5504" placement="row" v-model="model.bf">
  90 + <u-radio class="margin-right" name="是">是</u-radio>
  91 + <u-radio name="否">否</u-radio>
  92 + </u-radio-group>
  93 + </u-form-item>
  94 + <!-- 输入 -->
  95 + <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
  96 + v-if="item.type === 'input'">
  97 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff"
  98 + border="none"></u-input>
  99 + <view class="" style="width: 40rpx;height: 40rpx;"></view>
  100 + </u-form-item>
  101 + <!-- 选择 -->
  102 + <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
  103 + v-if="item.type === 'select'">
  104 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  105 + disabledColor="#fff" border="none"></u-input>
  106 + <u-icon slot="right" name="arrow-down" size="20"></u-icon>
  107 + </u-form-item>
  108 + </view>
  109 + </view>
  110 + </view>
  111 +
  112 + <view class="usuallyCard padding margin-sm">
  113 + <view class="text-lg padding-tb">
  114 + 收费信息
  115 + </view>
  116 + <view class="padding-lr-sm">
  117 + <view class="" v-for="(item,index) in chargeData" :key="index">
  118 + <!-- 单选 -->
  119 + <u-form-item :required="item.required" :label="item.label" labelWidth="70%" borderBottom
  120 + v-if="item.type === 'radio'">
  121 + <u-radio-group activeColor="#EA5504" placement="row" v-model="model.bf">
  122 + <u-radio class="margin-right" name="是">是</u-radio>
  123 + <u-radio name="否">否</u-radio>
  124 + </u-radio-group>
  125 + </u-form-item>
  126 + <!-- 输入 -->
  127 + <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
  128 + v-if="item.type === 'input'">
  129 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff"
  130 + border="none"></u-input>
  131 + <view class="" style="width: 40rpx;height: 40rpx;"></view>
  132 + </u-form-item>
  133 + <!-- 选择 -->
  134 + <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
  135 + v-if="item.type === 'select'">
  136 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  137 + disabledColor="#fff" border="none"></u-input>
  138 + <u-icon slot="right" name="arrow-down" size="20"></u-icon>
  139 + </u-form-item>
  140 + </view>
  141 + </view>
  142 + </view>
  143 +
  144 + <view class="usuallyCard padding margin-sm">
  145 + <view class="text-lg padding-tb">
  146 + 其他信息
  147 + </view>
  148 + <view class="padding-lr-sm">
  149 + <view class="" v-for="(item,index) in otherData" :key="index">
  150 + <!-- 输入 -->
  151 + <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
  152 + v-if="item.type === 'input'">
  153 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff"
  154 + border="none"></u-input>
  155 + <view class="" style="width: 40rpx;height: 40rpx;"></view>
  156 + </u-form-item>
  157 + <!-- 附件 -->
  158 + <view class="" v-if="item.type === 'attachment'">
  159 + <u-form-item :required="item.required" :label="item.label" labelWidth="120" borderBottom
  160 + v-if="item.type === 'attachment'">
  161 + <u-input v-model="model.time" inputAlign="right" :placeholder="item.placeholder" disabled
  162 + disabledColor="#fff" border="none"></u-input>
  163 + <view slot="right" class="text-blue">上传附件</view>
  164 + </u-form-item>
  165 + <view class="bg-gray">
  166 + 上传内容
  167 + </view>
  168 + </view>
  169 + </view>
  170 + </view>
  171 + </view>
  172 + </u-form>
  173 + <view class="fixedBtnCss" @click="handleConfirm">
  174 + <u-button shape="circle" color="#CF000D">立即发起</u-button>
  175 + </view>
  176 + </view>
  177 +</template>
  178 +
  179 +<script>
  180 + export default {
  181 + components: {},
  182 + props: {
  183 +
  184 + },
  185 + data() {
  186 + return {
  187 + model: {},
  188 + rules: {},
  189 + // 基本信息
  190 + basisData: [{
  191 + label: '财年',
  192 + placeholder: "请选择财年",
  193 + type: "date",
  194 + required: true
  195 + }, {
  196 + label: '收费人员',
  197 + placeholder: "请输入",
  198 + type: "input",
  199 + required: true
  200 + }, {
  201 + label: '兼职/全职',
  202 + placeholder: "请选择",
  203 + type: "select",
  204 + required: true
  205 + }, {
  206 + label: '入户时间',
  207 + placeholder: "请选择",
  208 + type: "date",
  209 + required: true
  210 + }, {
  211 + label: '项目公司/部门',
  212 + placeholder: "请选择",
  213 + type: "select",
  214 + required: true
  215 + }, {
  216 + label: '村(小区)',
  217 + placeholder: "请选择",
  218 + type: "select",
  219 + required: true
  220 + }, {
  221 + label: '户名',
  222 + placeholder: "请选择",
  223 + type: "select",
  224 + required: true
  225 + }, {
  226 + label: '联系电话',
  227 + placeholder: "请输入",
  228 + type: "input",
  229 + required: true
  230 + }, {
  231 + label: '省/市/区/街道',
  232 + placeholder: "请选择",
  233 + type: "select",
  234 + required: true
  235 + }, {
  236 + label: '详细地址',
  237 + placeholder: "请输入",
  238 + type: "input",
  239 + required: true
  240 + }],
  241 + // 拜访信息
  242 + visitData: [{
  243 + label: '本次是否拜访',
  244 + type: "radio",
  245 + required: true
  246 + }, {
  247 + label: '是否有意向',
  248 + placeholder: "请选择",
  249 + required: true,
  250 + type: "select"
  251 + }, {
  252 + label: '房屋情况',
  253 + placeholder: "请选择",
  254 + required: true,
  255 + type: "select"
  256 + }, {
  257 + label: '现用做饭能源',
  258 + placeholder: "请选择",
  259 + required: true,
  260 + type: "select"
  261 + }, {
  262 + label: '现用取暖能源',
  263 + placeholder: "请选择",
  264 + type: "select"
  265 + }, {
  266 + label: '家庭人口情况',
  267 + placeholder: "请选择",
  268 + type: "select"
  269 + }, {
  270 + label: '电冰箱',
  271 + placeholder: "请选择",
  272 + type: "select"
  273 + }, {
  274 + label: '空调',
  275 + placeholder: "请输入",
  276 + type: "input"
  277 + }, {
  278 + label: '电视',
  279 + placeholder: "请选择",
  280 + type: "select"
  281 + }, {
  282 + label: '洗衣机',
  283 + placeholder: "请选择",
  284 + type: "select"
  285 + }, {
  286 + label: '热水器',
  287 + placeholder: "请选择",
  288 + type: "select"
  289 + }, {
  290 + label: '光伏',
  291 + placeholder: "请选择",
  292 + type: "select"
  293 + }, {
  294 + label: '当前地址',
  295 + placeholder: "请输入",
  296 + type: "input"
  297 + }, {
  298 + label: '上传图片',
  299 + placeholder: "请选择",
  300 + type: "file"
  301 + }],
  302 + // 决策人信息
  303 + decisionMakersData: [{
  304 + label: '是否获取决策人信息',
  305 + type: "radio",
  306 + required: true
  307 + }, {
  308 + label: '决策人年龄',
  309 + placeholder: "请输入",
  310 + required: true,
  311 + type: "input"
  312 + }, {
  313 + label: '决策人收入来源',
  314 + placeholder: "请选择",
  315 + required: true,
  316 + type: "select"
  317 + }, {
  318 + label: '决策人联系方式',
  319 + placeholder: "请输入",
  320 + required: true,
  321 + type: "input"
  322 + }],
  323 + // 收费信息
  324 + chargeData: [{
  325 + label: '本次是否收费',
  326 + type: "radio",
  327 + required: true
  328 + }, {
  329 + label: '用户编号',
  330 + placeholder: "请输入",
  331 + required: true,
  332 + type: "input"
  333 + }, {
  334 + label: '身份证号',
  335 + placeholder: "请输入",
  336 + required: true,
  337 + type: "input"
  338 + }, {
  339 + label: '票据单号',
  340 + placeholder: "请输入",
  341 + required: true,
  342 + type: "input"
  343 + }, {
  344 + label: '收费金额',
  345 + placeholder: "请输入",
  346 + required: true,
  347 + type: "input"
  348 + }, {
  349 + label: '缴费方式',
  350 + placeholder: "请选择",
  351 + required: true,
  352 + type: "select"
  353 + }, {
  354 + label: '收费类型',
  355 + placeholder: "请选择",
  356 + required: true,
  357 + type: "select"
  358 + }],
  359 + // 其他信息
  360 + otherData: [{
  361 + label: '备注',
  362 + placeholder: "请输入",
  363 + type: "input",
  364 + }, {
  365 + label: '附件',
  366 + type: "attachment",
  367 + }, ]
  368 + }
  369 + },
  370 + computed: {
  371 +
  372 + },
  373 + onLoad() {
  374 +
  375 + },
  376 + methods: {
  377 + handleConfirm() {
  378 + this.$modal.confirm('确认发起当前这条记录?', '温馨提示').then(() => {
  379 + console.log('确定');
  380 + }).catch(() => {
  381 + console.log("取消");
  382 + });
  383 + }
  384 + }
  385 + }
  386 +</script>
  387 +
  388 +<style lang="scss" scoped>
  389 + .container {
  390 + padding-bottom: 100rpx;
  391 + background: #F2F4F3;
  392 + }
  393 +
  394 + /deep/.u-input__content__field-wrapper__field {
  395 + margin-right: 20rpx;
  396 + }
  397 +
  398 + /deep/.u-upload__button {
  399 + margin: 0;
  400 + }
  401 +
  402 + .fixedBtnCss {
  403 + position: fixed;
  404 + bottom: 0;
  405 + height: 100rpx;
  406 + width: 100%;
  407 + padding: 10rpx;
  408 + background: #fff;
  409 + }
  410 +</style>
... ...
pages/charge/visitsAndFees/index.vue
1 1 <template>
2 2 <view class="app-container">
3 3 <u-navbar :title="title" safeAreaInsetTop placeholder>
4   - <view slot="left" class="text-red" @click="loginOutMethod">退出</view>
  4 + <view class="flex justify-between" slot="left" @click="loginOut">
  5 + <u-icon size="15" name="/static/images/icon/login-out.png"></u-icon>
  6 + <view class="text-red margin-left-xs">
  7 + 退出
  8 + </view>
  9 + </view>
5 10 </u-navbar>
6 11 <view class="flex justify-between align-center padding-sm bg-white">
7 12 <view class="w70">
... ... @@ -9,7 +14,7 @@
9 14 :actionStyle="actionStyle" @custom="onSearch"></u-search>
10 15 </view>
11 16 <view class="w30 margin-left">
12   - <u-checkbox-group v-model="approvalValue" placement="column" @change="checkboxChange">
  17 + <u-checkbox-group activeColor="#EC1E19" v-model="approvalValue" placement="column" @change="checkboxChange">
13 18 <u-checkbox v-for="(item, index) in approval" :key="index" :label="item.name" :name="item.name">
14 19 </u-checkbox>
15 20 </u-checkbox-group>
... ... @@ -72,13 +77,11 @@
72 77 当前审批节点:项目公司_市场负责人
73 78 </view>
74 79 </view>
75   - <u-modal :show="loginOutShow" title="退出登录" showCancelButton confirmColor="red" @cancel="loginOutShow = false"
76   - @confirm="loginOut">
77   - <view class="slot-content text-gray">
78   - 您当前确定要退出吗?
79   - </view>
80   - </u-modal>
81   - <popUpComponent :title="title" ref="popUpComponentRef"></popUpComponent>
  80 +
  81 + <view class="fixBtnCss" @click="createaVisit">
  82 + <u-icon name="plus" color="#fff" size="30"></u-icon>
  83 + </view>
  84 + <popUpComponent :title="titles" ref="popUpComponentRef"></popUpComponent>
82 85 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar>
83 86 </view>
84 87 </template>
... ... @@ -109,7 +112,7 @@
109 112 approval: [{
110 113 name: "待我审批"
111 114 }],
112   - title:'同意'
  115 + titles: '同意'
113 116 }
114 117 },
115 118 computed: {
... ... @@ -131,38 +134,43 @@
131 134 })
132 135 },
133 136 // 拒绝按钮
134   - handleRefuse(){
135   - this.title = "拒绝";
  137 + handleRefuse() {
  138 + this.titles = "拒绝";
136 139 this.$refs.popUpComponentRef.open();
137 140 },
138 141 // 同意按钮
139   - handleAgree(){
140   - this.title = "同意";
  142 + handleAgree() {
  143 + this.titles = "同意";
141 144 this.$refs.popUpComponentRef.open();
142 145 },
143   - loginOutMethod() {
144   - this.loginOutShow = true
  146 + //创建拜访/收费
  147 + createaVisit() {
  148 + uni.navigateTo({
  149 + url: '/pages/charge/visitsAndFees/createaVisit'
  150 + })
145 151 },
146 152 loginOut() {
147   - // this.$modal.confirm('确定注销并退出系统吗?').then(() => {
148   - //钉钉直接退出微应用
149   - if (this.$isDing) {
150   - dd.biz.navigation.close({
151   - onSuccess: function(result) {
152   - console.log(result, 'result')
153   - },
154   - onFail: function(err) {
155   - console.log(err, 'err')
156   - }
157   - });
158   - } else {
159   - this.$store.dispatch('Logout').then((res) => {
160   - this.loginOutShow = false;
161   - uni.reLaunch({
162   - url: '/pages/login/mobile'
  153 + this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
  154 + //钉钉直接退出微应用
  155 + if (this.$isDing) {
  156 + dd.biz.navigation.close({
  157 + onSuccess: function(result) {
  158 + console.log(result, 'result')
  159 + },
  160 + onFail: function(err) {
  161 + console.log(err, 'err')
  162 + }
  163 + });
  164 + } else {
  165 + this.$store.dispatch('Logout').then((res) => {
  166 + uni.reLaunch({
  167 + url: '/pages/login/mobile'
  168 + })
163 169 })
164   - })
165   - }
  170 + }
  171 + }).catch(() => {
  172 + console.log("取消");
  173 + });
166 174 }
167 175 }
168 176 }
... ... @@ -206,4 +214,17 @@
206 214 border: 1px solid #EFF1FD;
207 215 border-style: none none solid solid;
208 216 }
  217 +
  218 + .fixBtnCss {
  219 + display: flex;
  220 + justify-content: center;
  221 + align-items: center;
  222 + border-radius: 50%;
  223 + width: 120rpx;
  224 + height: 120rpx;
  225 + position: fixed;
  226 + background: #5875EB;
  227 + right: 20rpx;
  228 + bottom: 150rpx;
  229 + }
209 230 </style>
... ...
pages/market/index.vue
... ... @@ -4,7 +4,7 @@
4 4 <view class="flexCss">
5 5 <view class="leftCss">
6 6 <u-icon size="15" name="/static/images/icon/login-out.png"></u-icon>
7   - <view class="loginOutCss" @click="loginOutMethod">
  7 + <view class="loginOutCss" @click="loginOut">
8 8 退出登录
9 9 </view>
10 10 </view>
... ... @@ -20,12 +20,6 @@
20 20 <newsList v-for="(item,index) in NewsList" :key="index" :newItem="item" v-else></newsList>
21 21 <u-loadmore :status="status" v-if="NewsList.length > 0" />
22 22 </view>
23   - <u-modal :show="loginOutShow" title="退出登录" showCancelButton confirmColor="red" @cancel="loginOutShow = false"
24   - @confirm="loginOut">
25   - <view class="slot-content">
26   - 您当前确定要退出吗?
27   - </view>
28   - </u-modal>
29 23 <TabBar :currentPagePath="this.$route.meta.pagePath"></TabBar>
30 24 </view>
31 25 </template>
... ... @@ -166,29 +160,28 @@
166 160 console.log(this.current);
167 161 this.updateList()
168 162 },
169   - loginOutMethod() {
170   - this.loginOutShow = true
171   - },
172 163 loginOut() {
173   - // this.$modal.confirm('确定注销并退出系统吗?').then(() => {
  164 + this.$modal.confirm('您当前确定要退出吗?', '退出登录').then(() => {
174 165 //钉钉直接退出微应用
175   - if (this.$isDing) {
176   - dd.biz.navigation.close({
177   - onSuccess: function(result) {
178   - console.log(result, 'result')
179   - },
180   - onFail: function(err) {
181   - console.log(err, 'err')
182   - }
183   - });
184   - } else {
185   - this.$store.dispatch('Logout').then((res) => {
186   - this.loginOutShow = false;
187   - uni.reLaunch({
188   - url: '/pages/login/mobile'
  166 + if (this.$isDing) {
  167 + dd.biz.navigation.close({
  168 + onSuccess: function(result) {
  169 + console.log(result, 'result')
  170 + },
  171 + onFail: function(err) {
  172 + console.log(err, 'err')
  173 + }
  174 + });
  175 + } else {
  176 + this.$store.dispatch('Logout').then((res) => {
  177 + uni.reLaunch({
  178 + url: '/pages/login/mobile'
  179 + })
189 180 })
190   - })
191   - }
  181 + }
  182 + }).catch(() => {
  183 + console.log("取消");
  184 + });
192 185 }
193 186 }
194 187 }
... ...
pages/market/insight.vue
... ... @@ -55,7 +55,7 @@
55 55 <view class="" v-if="!current">
56 56 <u-empty text="暂无报告" icon="/static/images/icon/nodata.png" v-if="newList1.length <= 0"></u-empty>
57 57 <view class="reportCss" v-for="(item,index) in newList1" :key="index">
58   - <view class="topTitleCss">
  58 + <view class="topTitleCss w80">
59 59 <view class="top1 overflow-one-lines"> {{item.reportName || ""}} </view>
60 60 <view class="top2 overflow-one-lines"> 预算主体:{{item.budgetSubject || ""}} </view>
61 61 <view class="top2 overflow-one-lines"> 填报人: {{item.createBy || ""}}</view>
... ... @@ -63,7 +63,7 @@
63 63 {{$u.timeFormat(item.validityTimeEnd, 'yyyy年mm月dd日 hh:MM:ss') || ""}}
64 64 </view>
65 65 </view>
66   - <view class="topStateCss">
  66 + <view class="topStateCss w20">
67 67 <view class="textCss" :style="{'color':statusCss(item.statusCode)}"> {{item.statusName}} </view>
68 68 <view class="btnCss">
69 69 <u-button color="#CF000D" style="width: 160rpx;height: 60rpx;" shape="circle" text="查看详情"
... ...
plugins/auth.js 0 → 100644
... ... @@ -0,0 +1,60 @@
  1 +import store from '@/store'
  2 +
  3 +function authPermission(permission) {
  4 + const all_permission = "*:*:*"
  5 + const permissions = store.getters && store.getters.permissions
  6 + if (permission && permission.length > 0) {
  7 + return permissions.some(v => {
  8 + return all_permission === v || v === permission
  9 + })
  10 + } else {
  11 + return false
  12 + }
  13 +}
  14 +
  15 +function authRole(role) {
  16 + const super_admin = "admin"
  17 + const roles = store.getters && store.getters.roles
  18 + if (role && role.length > 0) {
  19 + return roles.some(v => {
  20 + return super_admin === v || v === role
  21 + })
  22 + } else {
  23 + return false
  24 + }
  25 +}
  26 +
  27 +export default {
  28 + // 验证用户是否具备某权限
  29 + hasPermi(permission) {
  30 + return authPermission(permission)
  31 + },
  32 + // 验证用户是否含有指定权限,只需包含其中一个
  33 + hasPermiOr(permissions) {
  34 + return permissions.some(item => {
  35 + return authPermission(item)
  36 + })
  37 + },
  38 + // 验证用户是否含有指定权限,必须全部拥有
  39 + hasPermiAnd(permissions) {
  40 + return permissions.every(item => {
  41 + return authPermission(item)
  42 + })
  43 + },
  44 + // 验证用户是否具备某角色
  45 + hasRole(role) {
  46 + return authRole(role)
  47 + },
  48 + // 验证用户是否含有指定角色,只需包含其中一个
  49 + hasRoleOr(roles) {
  50 + return roles.some(item => {
  51 + return authRole(item)
  52 + })
  53 + },
  54 + // 验证用户是否含有指定角色,必须全部拥有
  55 + hasRoleAnd(roles) {
  56 + return roles.every(item => {
  57 + return authRole(item)
  58 + })
  59 + }
  60 +}
... ...
plugins/index.js 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +import tab from './tab'
  2 +import auth from './auth'
  3 +import modal from './modal'
  4 +
  5 +export default {
  6 + install(Vue) {
  7 + // 页签操作
  8 + Vue.prototype.$tab = tab
  9 + // 认证对象
  10 + Vue.prototype.$auth = auth
  11 + // 模态框对象
  12 + Vue.prototype.$modal = modal
  13 + }
  14 +}
... ...
plugins/modal.js 0 → 100644
... ... @@ -0,0 +1,112 @@
  1 +export default {
  2 + // 消息提示
  3 + msg(content) {
  4 + uni.showToast({
  5 + title: content,
  6 + icon: 'none'
  7 + })
  8 + },
  9 + // 错误消息
  10 + msgError(content) {
  11 + uni.showToast({
  12 + title: content,
  13 + icon: 'error'
  14 + })
  15 + },
  16 + // 成功消息
  17 + msgSuccess(content) {
  18 + uni.showToast({
  19 + title: content,
  20 + icon: 'success'
  21 + })
  22 + },
  23 + // 隐藏消息
  24 + hideMsg(content) {
  25 + uni.hideToast()
  26 + },
  27 + // 弹出提示
  28 + alert(content, title) {
  29 + uni.showModal({
  30 + title: title || '系统提示',
  31 + content: content,
  32 + showCancel: false
  33 + })
  34 + },
  35 + // 确认窗体
  36 + confirm(content, title, option = {
  37 + confirmText: "确认",
  38 + cancelText: "取消",
  39 + delCancel: false
  40 + }) {
  41 + return new Promise((resolve, reject) => {
  42 + // #ifdef APP
  43 + Vue.prototype.$showModal({
  44 + title: title || '系统提示',
  45 + concent: content,
  46 + cancelVal: option.cancelText,
  47 + confirmVal: option.confirmText,
  48 + delCancel: option.delCancel,
  49 + }).then(res => {
  50 + console.log(res);
  51 + // uni.hideLoading()
  52 + //确认
  53 + resolve(res)
  54 + }).catch(res => {
  55 + //取消
  56 + reject()
  57 + console.log(res);
  58 + })
  59 + // #endif
  60 +
  61 + // #ifndef APP
  62 + uni.showModal({
  63 + title: title || '系统提示',
  64 + content: content,
  65 + cancelText: option.cancelText,
  66 + confirmText: option.confirmText,
  67 + showCancel: option.showCancel,
  68 + confirmColor: "#EA5504",
  69 + success: function(res) {
  70 + if (res.confirm) {
  71 + resolve(res.confirm)
  72 + }
  73 +
  74 + if (res.cancel) {
  75 + reject()
  76 + }
  77 + }
  78 + })
  79 + // #endif
  80 + })
  81 + },
  82 +
  83 + // 提示信息
  84 + showToast(option) {
  85 + if (typeof option === "object") {
  86 + uni.showToast(option)
  87 + } else {
  88 + uni.showToast({
  89 + title: option,
  90 + icon: "none",
  91 + duration: 2500
  92 + })
  93 + }
  94 + },
  95 + // 打开遮罩层
  96 + loading(content) {
  97 + uni.showLoading({
  98 + title: content,
  99 + icon: 'none'
  100 + })
  101 + },
  102 + showLoading(content) {
  103 + uni.showLoading({
  104 + title: content,
  105 + icon: 'loading'
  106 + })
  107 + },
  108 + // 关闭遮罩层
  109 + closeLoading() {
  110 + uni.hideLoading()
  111 + }
  112 +}
0 113 \ No newline at end of file
... ...
plugins/tab.js 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +export default {
  2 + // 关闭所有页面,打开到应用内的某个页面
  3 + reLaunch(url) {
  4 + return uni.reLaunch({
  5 + url: url
  6 + })
  7 + },
  8 + // 跳转到tabBar页面,并关闭其他所有非tabBar页面
  9 + switchTab(url) {
  10 + return uni.switchTab({
  11 + url: url
  12 + })
  13 + },
  14 + // 关闭当前页面,跳转到应用内的某个页面
  15 + redirectTo(url) {
  16 + return uni.redirectTo({
  17 + url: url
  18 + })
  19 + },
  20 + // 保留当前页面,跳转到应用内的某个页面
  21 + navigateTo(url) {
  22 + return uni.navigateTo({
  23 + url: url
  24 + })
  25 + },
  26 + // 关闭当前页面,返回上一页面或多级页面
  27 + navigateBack() {
  28 + return uni.navigateBack()
  29 + }
  30 +}
... ...