Commit b9203dcca6cda96e568d4ba78a4705625c7f7345
1 parent
c2963af2
Exists in
charge
fix:修改bug
Showing
8 changed files
with
64 additions
and
52 deletions
Show diff stats
App.vue
... | ... | @@ -20,7 +20,9 @@ |
20 | 20 | console.log(this); |
21 | 21 | this.$store.dispatch('GetInfo') |
22 | 22 | let workName = uni.getStorageSync('tabName'); |
23 | - this.$store.dispatch('setTab', {data: workName}); | |
23 | + if(workName){ | |
24 | + this.$store.dispatch('setTab', {data: workName}); | |
25 | + } | |
24 | 26 | uni.hideTabBar(); |
25 | 27 | console.log('App Show') |
26 | 28 | }, | ... | ... |
pages/charge/visitsAndFees/createaVisit.vue
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
13 | 13 | v-if="item.type === 'date'" :prop="item.key"> |
14 | 14 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" border="none" |
15 | - disabled :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'"></u-input> | |
15 | + disabled disabledColor="#fff"></u-input> | |
16 | 16 | <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> |
17 | 17 | <!-- <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> --> |
18 | 18 | </u-form-item> |
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | v-if="item.type === 'input'" :prop="item.key"> |
22 | 22 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" |
23 | 23 | :disabled="operationStatus ==='YD' || item.key === 'billingPersonName'" :type="item.mode" |
24 | - :maxlength="item.max" :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" border="none"></u-input> | |
24 | + :maxlength="item.max" disabledColor="#fff" border="none"></u-input> | |
25 | 25 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
26 | 26 | </u-form-item> |
27 | 27 | <!-- 选择类型 --> |
... | ... | @@ -29,8 +29,7 @@ |
29 | 29 | v-if="item.type === 'select'" :disabled="operationStatus ==='YD'" :prop="item.key"> |
30 | 30 | <u-input v-model="model[item.key]" v-if="!item.dict" |
31 | 31 | :disabled="operationStatus ==='YD' || item.key === 'address' || item.key ==='company' || item.disabled" |
32 | - inputAlign="right" :placeholder="item.placeholder" | |
33 | - :disabledColor="operationStatus==='YD'?'#F5F7FA':'#fff'" border="none"></u-input> | |
32 | + inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" border="none"></u-input> | |
34 | 33 | <view class="" v-else>{{getDictDataLabel(item.dict,model[item.key])}}</view> |
35 | 34 | <u-icon slot="right" class="margin-left-xs" name="arrow-down" size="20" |
36 | 35 | @click="handleSelect(item)"></u-icon> |
... | ... | @@ -65,7 +64,7 @@ |
65 | 64 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
66 | 65 | v-if="item.type === 'input' && item.show" :prop="item.key"> |
67 | 66 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" |
68 | - :disabled="operationStatus ==='YD'" border="none"></u-input> | |
67 | + :disabled="operationStatus ==='YD' || item.disabled" border="none"></u-input> | |
69 | 68 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
70 | 69 | </u-form-item> |
71 | 70 | <!-- 选择 --> |
... | ... | @@ -513,7 +512,7 @@ |
513 | 512 | type: "select", |
514 | 513 | required: true, |
515 | 514 | key: "vlgOrCmty", |
516 | - disabled:true | |
515 | + disabled: true | |
517 | 516 | }, { |
518 | 517 | label: '户名', |
519 | 518 | placeholder: "请选择或输入", |
... | ... | @@ -631,10 +630,12 @@ |
631 | 630 | }, { |
632 | 631 | label: '当前地址', |
633 | 632 | required: true, |
634 | - placeholder: "请输入", | |
633 | + placeholder: "自动定位获取", | |
634 | + // placeholder: "请输入", | |
635 | 635 | type: "input", |
636 | 636 | key: "visitDetailedAddress", |
637 | 637 | show: true, |
638 | + disabled:true | |
638 | 639 | }, { |
639 | 640 | label: '上传图片', |
640 | 641 | required: true, |
... | ... | @@ -785,9 +786,13 @@ |
785 | 786 | this.model.address = |
786 | 787 | `${this.model.userProvince}${this.model.userCity}${this.model.userDistrict}${this.model.userStreet}` |
787 | 788 | this.model.isCharged = this.model.isCharged === 'Y' ? '是' : '否'; |
788 | - this.model.isIntent = this.model.isIntent === 'Y' ? '是' : '否'; | |
789 | + // this.model.isIntent = this.model.isIntent === 'Y' ? '是' : '否'; | |
789 | 790 | this.model.isVisited = this.model.isVisited === 'Y' ? '是' : '否'; |
790 | 791 | this.model.hasDm = this.model.hasDm === 'Y' ? '是' : '否'; |
792 | + this.model.chargeAmt = String(this.model.chargeAmt); | |
793 | + if (this.model.entryTime.includes(' 00:00:00')) { | |
794 | + this.model.entryTime = this.model.entryTime.slice(0, -9); | |
795 | + } | |
791 | 796 | if (this.model.isCharged === '否') { |
792 | 797 | this.chargeData.slice(1).map(item => { |
793 | 798 | item.show = false; |
... | ... | @@ -826,7 +831,7 @@ |
826 | 831 | } |
827 | 832 | }) |
828 | 833 | } |
829 | - | |
834 | + console.log("填充数据", this.model); | |
830 | 835 | }, |
831 | 836 | async init() { |
832 | 837 | console.log(this.$store); |
... | ... | @@ -850,9 +855,12 @@ |
850 | 855 | if (!this.$isDing) { |
851 | 856 | return |
852 | 857 | } |
853 | - console.log("钉钉定位") | |
858 | + var host= window.location.origin + '/'; | |
859 | + // let currentUrl = window.location.href; | |
860 | + console.log("钉钉定位",host) | |
861 | + // let currentUrl = "http://192.168.0.53:8001/" | |
854 | 862 | let data = { |
855 | - url: "http://192.168.0.53:8001/" | |
863 | + url: host | |
856 | 864 | } |
857 | 865 | let that = this; |
858 | 866 | const result = await getDingtalkConfig(data); |
... | ... | @@ -979,7 +987,7 @@ |
979 | 987 | let col = result.data.map(item => ({ |
980 | 988 | value: item.vlgOrCmty, |
981 | 989 | label: item.vlgOrCmty, |
982 | - urbRurCls:item.urbRurCls | |
990 | + urbRurCls: item.urbRurCls | |
983 | 991 | })); |
984 | 992 | this.columns = [col]; |
985 | 993 | } else if (item.key === 'userName') { |
... | ... | @@ -1327,11 +1335,11 @@ |
1327 | 1335 | copyMethods() { |
1328 | 1336 | // this.copyModel.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); |
1329 | 1337 | this.copyModel.isCharged = this.copyModel.isCharged === '是' ? 'Y' : 'N'; |
1330 | - this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; | |
1338 | + // this.copyModel.isIntent = this.copyModel.isIntent === '是' ? 'Y' : 'N'; | |
1331 | 1339 | this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; |
1332 | 1340 | this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; |
1333 | 1341 | if (!this.copyModel.entryTime.includes(' 00:00:00')) { |
1334 | - this.copyModel.entryTime += ' 00:00:00'; | |
1342 | + this.copyModel.entryTime += ' 00:00:00'; | |
1335 | 1343 | } |
1336 | 1344 | // this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(","); |
1337 | 1345 | }, | ... | ... |
pages/charge/visitsAndFees/detail.vue
pages/charge/visitsAndFees/index.vue
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | </view> |
86 | 86 | </view> |
87 | 87 | <view class="flex justify-end margin-top"> |
88 | - <view class="margin-right-xs"> | |
88 | + <view class="w30 margin-right-xs"> | |
89 | 89 | <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> |
90 | 90 | <view slot="content" class="popoverCss"> |
91 | 91 | <view class="" v-if="publishChangePermission(item)"> |
... | ... | @@ -108,7 +108,7 @@ |
108 | 108 | <u-button shape="circle">更多操作</u-button> |
109 | 109 | </zb-popover> |
110 | 110 | </view> |
111 | - <view class="w25 margin-right-xs" @click="handleDetail(item)"> | |
111 | + <view class="w30 margin-right-xs" @click="handleDetail(item)"> | |
112 | 112 | <u-button shape="circle">查看详情</u-button> |
113 | 113 | </view> |
114 | 114 | <view class="w25 margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)"> |
... | ... | @@ -318,9 +318,11 @@ |
318 | 318 | onLoad() { |
319 | 319 | this.initData(); |
320 | 320 | this.getCompanyCascader(); |
321 | + let that = this; | |
321 | 322 | // 监听其他页面返回后刷新 |
322 | 323 | uni.$on('update', function(data) { |
323 | - this.initData(); | |
324 | + console.log("检测刷新"); | |
325 | + that.initData(); | |
324 | 326 | }) |
325 | 327 | }, |
326 | 328 | onShow() {}, | ... | ... |
pages/charge/visitsAndFees/processFlow.vue
... | ... | @@ -49,7 +49,7 @@ |
49 | 49 | }, |
50 | 50 | methods: { |
51 | 51 | descMethods(item){ |
52 | - return `提交与${item.procTime}\n意见:${item.opRemark?item.opRemark:'无'}` | |
52 | + return `提交与${item.procTime}\n操作:${item.opName?item.opName:'无'}\n意见:${item.opRemark?item.opRemark:'无'}` | |
53 | 53 | }, |
54 | 54 | async init() { |
55 | 55 | let data = { |
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | rows |
63 | 63 | } = await getMcOperationLogList(data); |
64 | 64 | console.log(rows); |
65 | - this.list = rows | |
65 | + this.list = rows.reverse(); | |
66 | 66 | } |
67 | 67 | } |
68 | 68 | } | ... | ... |
pages/login/workbench.vue
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <view class="text-xxl text-bold text-white">市场洞察平台</view> |
8 | 8 | <u-icon name="arrow-right" color="#fff"></u-icon> |
9 | 9 | </view> |
10 | - <view class="chargeCss margin-tb-xl padding flex justify-between align-center" v-if="validate()" | |
10 | + <view class="chargeCss margin-tb-xl padding flex justify-between align-center" v-if="hasPermission" | |
11 | 11 | @click="handleClick('charge')"> |
12 | 12 | <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image> |
13 | 13 | <view class="text-xxl text-bold text-white">市场化收费工具</view> |
... | ... | @@ -25,47 +25,46 @@ |
25 | 25 | }, |
26 | 26 | data() { |
27 | 27 | return { |
28 | - | |
28 | + toolPermissions: ['schsf:mcVisit:list', 'schsf:mcIgnition:list', 'schsf:mcConstruction:list'] | |
29 | 29 | } |
30 | 30 | }, |
31 | - computed: { | |
31 | + onShow() { | |
32 | 32 | |
33 | 33 | }, |
34 | 34 | onLoad() { |
35 | - if (!this.validate()) { | |
36 | - this.handleClick('insight'); | |
37 | - // setTimeout(()=>{ | |
38 | - // uni.switchTab({ | |
39 | - // url: '/pages/market/index' | |
40 | - // }) | |
41 | - // },500) | |
35 | + this.$store.dispatch('GetInfo').then(()=>{ | |
36 | + console.log("getters",this.$store.getters); | |
37 | + const hasPermission = this.hasPermission; | |
38 | + console.log("是否有工具权限",hasPermission); | |
39 | + if (!hasPermission) { | |
40 | + this.handleClick('insight'); | |
41 | + } | |
42 | + }) | |
43 | + }, | |
44 | + computed: { | |
45 | + hasPermission() { | |
46 | + return this.toolPermissions.some(permission => { | |
47 | + return this.$checkPermi([permission]); | |
48 | + }); | |
42 | 49 | } |
43 | 50 | }, |
44 | 51 | methods: { |
45 | 52 | // 验证是否需要显示工具菜单 |
46 | - validate() { | |
47 | - let toolPermissions = ['schsf:mcVisit:list', 'schsf:mcIgnition:list', 'schsf:mcConstruction:list'] | |
48 | - console.log(this); | |
49 | - // 假设 this.$checkPermi 是一个返回布尔值的方法 | |
50 | - let hasPermission = toolPermissions.some(permission => { | |
51 | - return this.$checkPermi([permission]); | |
52 | - }); | |
53 | - return hasPermission | |
54 | - }, | |
55 | 53 | handleClick(workName) { |
56 | 54 | console.log(workName); |
57 | 55 | this.$store.dispatch('setTab', { |
58 | 56 | data: workName |
57 | + }).then(() => { | |
58 | + let tabList = this.$store.state.tabbar.list | |
59 | + let urls = tabList[0].pagePath | |
60 | + console.log("跳转", urls); | |
61 | + setTimeout(() => { | |
62 | + uni.switchTab({ | |
63 | + url: `/${urls}` | |
64 | + }) | |
65 | + console.log(this.$store.state); | |
66 | + }, 300) | |
59 | 67 | }); |
60 | - let tabList = this.$store.state.tabbar.list | |
61 | - let urls = tabList[0].pagePath | |
62 | - console.log("跳转", urls); | |
63 | - setTimeout(() => { | |
64 | - uni.switchTab({ | |
65 | - url: `/${urls}` | |
66 | - }) | |
67 | - console.log(this.$store.state); | |
68 | - }, 500) | |
69 | 68 | } |
70 | 69 | } |
71 | 70 | } | ... | ... |
store/mudules/tabBar.js
... | ... | @@ -34,10 +34,9 @@ const tabbar = { |
34 | 34 | }, { |
35 | 35 | data |
36 | 36 | }) { |
37 | - console.log(tabBars); | |
38 | - console.log(111,data); | |
37 | + console.log("设置tab",data); | |
38 | + commit('SET_USER_TAB', data); | |
39 | 39 | uni.setStorageSync('tabName',data); |
40 | - commit('SET_USER_TAB', data) | |
41 | 40 | } |
42 | 41 | } |
43 | 42 | } | ... | ... |
store/mudules/user.js
... | ... | @@ -102,6 +102,8 @@ const user = { |
102 | 102 | CLEAR_LOGIN_INFO(state) { |
103 | 103 | uni.removeStorageSync(AccessTokenKey) |
104 | 104 | uni.removeStorageSync(RefreshTokenKey) |
105 | + uni.removeStorageSync('storage_data') | |
106 | + uni.removeStorageSync('tabName') | |
105 | 107 | state.accessToken = '' |
106 | 108 | state.refreshToken = '' |
107 | 109 | state.userInfo = {} | ... | ... |