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,7 +20,9 @@ | ||
20 | console.log(this); | 20 | console.log(this); |
21 | this.$store.dispatch('GetInfo') | 21 | this.$store.dispatch('GetInfo') |
22 | let workName = uni.getStorageSync('tabName'); | 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 | uni.hideTabBar(); | 26 | uni.hideTabBar(); |
25 | console.log('App Show') | 27 | console.log('App Show') |
26 | }, | 28 | }, |
pages/charge/visitsAndFees/createaVisit.vue
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 12 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
13 | v-if="item.type === 'date'" :prop="item.key"> | 13 | v-if="item.type === 'date'" :prop="item.key"> |
14 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" border="none" | 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 | <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> | 16 | <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> |
17 | <!-- <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> --> | 17 | <!-- <u-icon slot="right" name="calendar" size="20" @click="handleDateTime(item)"></u-icon> --> |
18 | </u-form-item> | 18 | </u-form-item> |
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | v-if="item.type === 'input'" :prop="item.key"> | 21 | v-if="item.type === 'input'" :prop="item.key"> |
22 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" | 22 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" |
23 | :disabled="operationStatus ==='YD' || item.key === 'billingPersonName'" :type="item.mode" | 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 | <view class="" style="width: 40rpx;height: 40rpx;"></view> | 25 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
26 | </u-form-item> | 26 | </u-form-item> |
27 | <!-- 选择类型 --> | 27 | <!-- 选择类型 --> |
@@ -29,8 +29,7 @@ | @@ -29,8 +29,7 @@ | ||
29 | v-if="item.type === 'select'" :disabled="operationStatus ==='YD'" :prop="item.key"> | 29 | v-if="item.type === 'select'" :disabled="operationStatus ==='YD'" :prop="item.key"> |
30 | <u-input v-model="model[item.key]" v-if="!item.dict" | 30 | <u-input v-model="model[item.key]" v-if="!item.dict" |
31 | :disabled="operationStatus ==='YD' || item.key === 'address' || item.key ==='company' || item.disabled" | 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 | <view class="" v-else>{{getDictDataLabel(item.dict,model[item.key])}}</view> | 33 | <view class="" v-else>{{getDictDataLabel(item.dict,model[item.key])}}</view> |
35 | <u-icon slot="right" class="margin-left-xs" name="arrow-down" size="20" | 34 | <u-icon slot="right" class="margin-left-xs" name="arrow-down" size="20" |
36 | @click="handleSelect(item)"></u-icon> | 35 | @click="handleSelect(item)"></u-icon> |
@@ -65,7 +64,7 @@ | @@ -65,7 +64,7 @@ | ||
65 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom | 64 | <u-form-item :required="item.required" :label="item.label" labelWidth="100" borderBottom |
66 | v-if="item.type === 'input' && item.show" :prop="item.key"> | 65 | v-if="item.type === 'input' && item.show" :prop="item.key"> |
67 | <u-input v-model="model[item.key]" inputAlign="right" :placeholder="item.placeholder" disabledColor="#fff" | 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 | <view class="" style="width: 40rpx;height: 40rpx;"></view> | 68 | <view class="" style="width: 40rpx;height: 40rpx;"></view> |
70 | </u-form-item> | 69 | </u-form-item> |
71 | <!-- 选择 --> | 70 | <!-- 选择 --> |
@@ -513,7 +512,7 @@ | @@ -513,7 +512,7 @@ | ||
513 | type: "select", | 512 | type: "select", |
514 | required: true, | 513 | required: true, |
515 | key: "vlgOrCmty", | 514 | key: "vlgOrCmty", |
516 | - disabled:true | 515 | + disabled: true |
517 | }, { | 516 | }, { |
518 | label: '户名', | 517 | label: '户名', |
519 | placeholder: "请选择或输入", | 518 | placeholder: "请选择或输入", |
@@ -631,10 +630,12 @@ | @@ -631,10 +630,12 @@ | ||
631 | }, { | 630 | }, { |
632 | label: '当前地址', | 631 | label: '当前地址', |
633 | required: true, | 632 | required: true, |
634 | - placeholder: "请输入", | 633 | + placeholder: "自动定位获取", |
634 | + // placeholder: "请输入", | ||
635 | type: "input", | 635 | type: "input", |
636 | key: "visitDetailedAddress", | 636 | key: "visitDetailedAddress", |
637 | show: true, | 637 | show: true, |
638 | + disabled:true | ||
638 | }, { | 639 | }, { |
639 | label: '上传图片', | 640 | label: '上传图片', |
640 | required: true, | 641 | required: true, |
@@ -785,9 +786,13 @@ | @@ -785,9 +786,13 @@ | ||
785 | this.model.address = | 786 | this.model.address = |
786 | `${this.model.userProvince}${this.model.userCity}${this.model.userDistrict}${this.model.userStreet}` | 787 | `${this.model.userProvince}${this.model.userCity}${this.model.userDistrict}${this.model.userStreet}` |
787 | this.model.isCharged = this.model.isCharged === 'Y' ? '是' : '否'; | 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 | this.model.isVisited = this.model.isVisited === 'Y' ? '是' : '否'; | 790 | this.model.isVisited = this.model.isVisited === 'Y' ? '是' : '否'; |
790 | this.model.hasDm = this.model.hasDm === 'Y' ? '是' : '否'; | 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 | if (this.model.isCharged === '否') { | 796 | if (this.model.isCharged === '否') { |
792 | this.chargeData.slice(1).map(item => { | 797 | this.chargeData.slice(1).map(item => { |
793 | item.show = false; | 798 | item.show = false; |
@@ -826,7 +831,7 @@ | @@ -826,7 +831,7 @@ | ||
826 | } | 831 | } |
827 | }) | 832 | }) |
828 | } | 833 | } |
829 | - | 834 | + console.log("填充数据", this.model); |
830 | }, | 835 | }, |
831 | async init() { | 836 | async init() { |
832 | console.log(this.$store); | 837 | console.log(this.$store); |
@@ -850,9 +855,12 @@ | @@ -850,9 +855,12 @@ | ||
850 | if (!this.$isDing) { | 855 | if (!this.$isDing) { |
851 | return | 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 | let data = { | 862 | let data = { |
855 | - url: "http://192.168.0.53:8001/" | 863 | + url: host |
856 | } | 864 | } |
857 | let that = this; | 865 | let that = this; |
858 | const result = await getDingtalkConfig(data); | 866 | const result = await getDingtalkConfig(data); |
@@ -979,7 +987,7 @@ | @@ -979,7 +987,7 @@ | ||
979 | let col = result.data.map(item => ({ | 987 | let col = result.data.map(item => ({ |
980 | value: item.vlgOrCmty, | 988 | value: item.vlgOrCmty, |
981 | label: item.vlgOrCmty, | 989 | label: item.vlgOrCmty, |
982 | - urbRurCls:item.urbRurCls | 990 | + urbRurCls: item.urbRurCls |
983 | })); | 991 | })); |
984 | this.columns = [col]; | 992 | this.columns = [col]; |
985 | } else if (item.key === 'userName') { | 993 | } else if (item.key === 'userName') { |
@@ -1327,11 +1335,11 @@ | @@ -1327,11 +1335,11 @@ | ||
1327 | copyMethods() { | 1335 | copyMethods() { |
1328 | // this.copyModel.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); | 1336 | // this.copyModel.fieldPhotoFile = this.fileList.map(item => item.uuid).join(","); |
1329 | this.copyModel.isCharged = this.copyModel.isCharged === '是' ? 'Y' : 'N'; | 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 | this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; | 1339 | this.copyModel.isVisited = this.copyModel.isVisited === '是' ? 'Y' : 'N'; |
1332 | this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; | 1340 | this.copyModel.hasDm = this.copyModel.hasDm === '是' ? 'Y' : 'N'; |
1333 | if (!this.copyModel.entryTime.includes(' 00:00:00')) { | 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 | // this.copyModel.attachmentFile = this.attachmentList.map(item => item.uuid).join(","); | 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,7 +85,7 @@ | ||
85 | </view> | 85 | </view> |
86 | </view> | 86 | </view> |
87 | <view class="flex justify-end margin-top"> | 87 | <view class="flex justify-end margin-top"> |
88 | - <view class="margin-right-xs"> | 88 | + <view class="w30 margin-right-xs"> |
89 | <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> | 89 | <zb-popover placement="bottom-start" theme="dark" ref="Popover1" class="item-popover"> |
90 | <view slot="content" class="popoverCss"> | 90 | <view slot="content" class="popoverCss"> |
91 | <view class="" v-if="publishChangePermission(item)"> | 91 | <view class="" v-if="publishChangePermission(item)"> |
@@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
108 | <u-button shape="circle">更多操作</u-button> | 108 | <u-button shape="circle">更多操作</u-button> |
109 | </zb-popover> | 109 | </zb-popover> |
110 | </view> | 110 | </view> |
111 | - <view class="w25 margin-right-xs" @click="handleDetail(item)"> | 111 | + <view class="w30 margin-right-xs" @click="handleDetail(item)"> |
112 | <u-button shape="circle">查看详情</u-button> | 112 | <u-button shape="circle">查看详情</u-button> |
113 | </view> | 113 | </view> |
114 | <view class="w25 margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)"> | 114 | <view class="w25 margin-right-xs" @click="handleEdit(item)" v-if="editPermission(item)"> |
@@ -318,9 +318,11 @@ | @@ -318,9 +318,11 @@ | ||
318 | onLoad() { | 318 | onLoad() { |
319 | this.initData(); | 319 | this.initData(); |
320 | this.getCompanyCascader(); | 320 | this.getCompanyCascader(); |
321 | + let that = this; | ||
321 | // 监听其他页面返回后刷新 | 322 | // 监听其他页面返回后刷新 |
322 | uni.$on('update', function(data) { | 323 | uni.$on('update', function(data) { |
323 | - this.initData(); | 324 | + console.log("检测刷新"); |
325 | + that.initData(); | ||
324 | }) | 326 | }) |
325 | }, | 327 | }, |
326 | onShow() {}, | 328 | onShow() {}, |
pages/charge/visitsAndFees/processFlow.vue
@@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
49 | }, | 49 | }, |
50 | methods: { | 50 | methods: { |
51 | descMethods(item){ | 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 | async init() { | 54 | async init() { |
55 | let data = { | 55 | let data = { |
@@ -62,7 +62,7 @@ | @@ -62,7 +62,7 @@ | ||
62 | rows | 62 | rows |
63 | } = await getMcOperationLogList(data); | 63 | } = await getMcOperationLogList(data); |
64 | console.log(rows); | 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 +7,7 @@ | ||
7 | <view class="text-xxl text-bold text-white">市场洞察平台</view> | 7 | <view class="text-xxl text-bold text-white">市场洞察平台</view> |
8 | <u-icon name="arrow-right" color="#fff"></u-icon> | 8 | <u-icon name="arrow-right" color="#fff"></u-icon> |
9 | </view> | 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 | @click="handleClick('charge')"> | 11 | @click="handleClick('charge')"> |
12 | <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image> | 12 | <u-image width="60rpx" height="60rpx" src="/static/images/icon/charge.png" shape="circle"></u-image> |
13 | <view class="text-xxl text-bold text-white">市场化收费工具</view> | 13 | <view class="text-xxl text-bold text-white">市场化收费工具</view> |
@@ -25,47 +25,46 @@ | @@ -25,47 +25,46 @@ | ||
25 | }, | 25 | }, |
26 | data() { | 26 | data() { |
27 | return { | 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 | onLoad() { | 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 | methods: { | 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 | handleClick(workName) { | 53 | handleClick(workName) { |
56 | console.log(workName); | 54 | console.log(workName); |
57 | this.$store.dispatch('setTab', { | 55 | this.$store.dispatch('setTab', { |
58 | data: workName | 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,10 +34,9 @@ const tabbar = { | ||
34 | }, { | 34 | }, { |
35 | data | 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 | uni.setStorageSync('tabName',data); | 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,6 +102,8 @@ const user = { | ||
102 | CLEAR_LOGIN_INFO(state) { | 102 | CLEAR_LOGIN_INFO(state) { |
103 | uni.removeStorageSync(AccessTokenKey) | 103 | uni.removeStorageSync(AccessTokenKey) |
104 | uni.removeStorageSync(RefreshTokenKey) | 104 | uni.removeStorageSync(RefreshTokenKey) |
105 | + uni.removeStorageSync('storage_data') | ||
106 | + uni.removeStorageSync('tabName') | ||
105 | state.accessToken = '' | 107 | state.accessToken = '' |
106 | state.refreshToken = '' | 108 | state.refreshToken = '' |
107 | state.userInfo = {} | 109 | state.userInfo = {} |