Showing
4 changed files
with
784 additions
and
243 deletions
api/message.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +const baseUrl = '/system/message/site'; | |
| 4 | + | |
| 5 | +// 查询列表 | |
| 6 | +export function queryApi(params) { | |
| 7 | + return request({ | |
| 8 | + url: `${baseUrl}/query/my`, | |
| 9 | + method: 'get', | |
| 10 | + params | |
| 11 | + }) | |
| 12 | +} | |
| 13 | + | |
| 14 | +// 查询内容 | |
| 15 | +export function getContentApi(id) { | |
| 16 | + return request({ | |
| 17 | + url: `${baseUrl}/content`, | |
| 18 | + method: 'get', | |
| 19 | + params: { id } | |
| 20 | + }) | |
| 21 | +} | ... | ... |
| 1 | 1 | { |
| 2 | - "pages": [{ | |
| 2 | + "pages": [ | |
| 3 | + { | |
| 3 | 4 | "path": "pages/login", |
| 4 | 5 | "style": { |
| 5 | 6 | "navigationBarTitleText": "登录", |
| 6 | 7 | "navigationStyle": "custom" |
| 7 | 8 | } |
| 8 | - }, { | |
| 9 | + }, | |
| 10 | + { | |
| 9 | 11 | "path": "pages/register", |
| 10 | 12 | "style": { |
| 11 | 13 | "navigationBarTitleText": "注册" |
| 12 | 14 | } |
| 13 | - }, { | |
| 15 | + }, | |
| 16 | + { | |
| 14 | 17 | "path": "pages/index", |
| 15 | 18 | "style": { |
| 16 | 19 | "navigationBarTitleText": "首页", |
| 17 | 20 | "navigationStyle": "custom" |
| 18 | 21 | } |
| 19 | - }, { | |
| 22 | + }, | |
| 23 | + { | |
| 20 | 24 | "path": "pages/mine/index", |
| 21 | 25 | "style": { |
| 22 | 26 | "navigationBarTitleText": "我的", |
| 23 | 27 | "navigationBarTextStyle": "white" |
| 24 | 28 | } |
| 25 | - }, { | |
| 29 | + }, | |
| 30 | + { | |
| 26 | 31 | "path": "pages/mine/index2", |
| 27 | 32 | "style": { |
| 28 | 33 | "navigationBarTitleText": "我的2" |
| 29 | 34 | } |
| 30 | - }, { | |
| 35 | + }, | |
| 36 | + { | |
| 31 | 37 | "path": "pages/mine/info/index", |
| 32 | 38 | "style": { |
| 33 | 39 | "navigationBarTitleText": "个人信息" |
| 34 | 40 | } |
| 35 | - }, { | |
| 41 | + }, | |
| 42 | + { | |
| 36 | 43 | "path": "pages/mine/pwd/index", |
| 37 | 44 | "style": { |
| 38 | 45 | "navigationBarTitleText": "修改密码" |
| 39 | 46 | } |
| 40 | - }, { | |
| 47 | + }, | |
| 48 | + { | |
| 41 | 49 | "path": "pages/mine/setting/index", |
| 42 | 50 | "style": { |
| 43 | 51 | "navigationBarTitleText": "应用设置" |
| 44 | 52 | } |
| 45 | - }, { | |
| 53 | + }, | |
| 54 | + { | |
| 46 | 55 | "path": "pages/mine/about/index", |
| 47 | 56 | "style": { |
| 48 | 57 | "navigationBarTitleText": "关于我们" |
| 49 | 58 | } |
| 50 | - }, { | |
| 59 | + }, | |
| 60 | + { | |
| 51 | 61 | "path": "pages/dev_manage/index", |
| 52 | 62 | "style": { |
| 53 | 63 | "navigationBarTitleText": "客户开发管理", |
| 54 | 64 | "navigationBarBackgroundColor": "#ffffff", |
| 55 | 65 | "navigationBarTextStyle": "black" |
| 56 | 66 | } |
| 57 | - }, { | |
| 67 | + }, | |
| 68 | + { | |
| 58 | 69 | "path": "pages/dev_manage/add", |
| 59 | 70 | "style": { |
| 60 | 71 | "navigationBarTitleText": "新增客户开发", |
| 61 | 72 | "navigationBarBackgroundColor": "#ffffff", |
| 62 | 73 | "navigationBarTextStyle": "black" |
| 63 | 74 | } |
| 64 | - }, { | |
| 75 | + }, | |
| 76 | + { | |
| 65 | 77 | "path": "pages/dev_manage/modify", |
| 66 | 78 | "style": { |
| 67 | 79 | "navigationBarTitleText": "编辑客户开发", |
| 68 | 80 | "navigationBarBackgroundColor": "#ffffff", |
| 69 | 81 | "navigationBarTextStyle": "black" |
| 70 | 82 | } |
| 71 | - }, { | |
| 83 | + }, | |
| 84 | + { | |
| 72 | 85 | "path": "pages/dev_manage/add", |
| 73 | 86 | "style": { |
| 74 | 87 | "navigationBarTitleText": "新增客户开发", |
| 75 | 88 | "navigationBarBackgroundColor": "#ffffff", |
| 76 | 89 | "navigationBarTextStyle": "black" |
| 77 | 90 | } |
| 78 | - }, { | |
| 79 | - "path": "pages/dev_manage/detail", | |
| 80 | - "style": { | |
| 81 | - "navigationBarTitleText": "查看客户开发", | |
| 82 | - "navigationBarBackgroundColor": "#ffffff", | |
| 83 | - "navigationBarTextStyle": "black" | |
| 84 | - } | |
| 85 | - }, { | |
| 86 | - "path": "pages/credit_manage/index", | |
| 87 | - "style": { | |
| 88 | - "navigationBarTitleText": "客户资信管理", | |
| 89 | - "navigationBarBackgroundColor": "#ffffff", | |
| 90 | - "navigationBarTextStyle": "black" | |
| 91 | - } | |
| 92 | - }, { | |
| 93 | - "path": "pages/credit_manage/add", | |
| 94 | - "style": { | |
| 95 | - "navigationBarTitleText": "新增客户资信", | |
| 96 | - "navigationBarBackgroundColor": "#ffffff", | |
| 97 | - "navigationBarTextStyle": "black" | |
| 98 | - } | |
| 99 | - }, { | |
| 100 | - "path": "pages/credit_manage/detail", | |
| 101 | - "style": { | |
| 102 | - "navigationBarTitleText": "查看客户资信", | |
| 103 | - "navigationBarBackgroundColor": "#ffffff", | |
| 104 | - "navigationBarTextStyle": "black" | |
| 105 | - } | |
| 106 | - }, { | |
| 107 | - "path": "pages/credit_manage/modify", | |
| 108 | - "style": { | |
| 109 | - "navigationBarTitleText": "编辑客户资信", | |
| 110 | - "navigationBarBackgroundColor": "#ffffff", | |
| 111 | - "navigationBarTextStyle": "black" | |
| 112 | - } | |
| 113 | - }, { | |
| 114 | - "path": "pages/credit_manage/change", | |
| 115 | - "style": { | |
| 116 | - "navigationBarTitleText": "申请客户资信变更", | |
| 117 | - "navigationBarBackgroundColor": "#ffffff", | |
| 118 | - "navigationBarTextStyle": "black" | |
| 119 | - } | |
| 120 | - }, { | |
| 121 | - "path": "pages/credit_manage/history_detail", | |
| 122 | - "style": { | |
| 123 | - "navigationBarTitleText": "变更记录详情", | |
| 124 | - "navigationBarBackgroundColor": "#ffffff", | |
| 125 | - "navigationBarTextStyle": "black" | |
| 126 | - } | |
| 127 | - }, | |
| 128 | - { | |
| 129 | - "path": "pages/flow/myflow", | |
| 130 | - "style": { | |
| 131 | - "navigationBarTitleText": "我发起的", | |
| 132 | - "navigationBarBackgroundColor": "#ffffff", | |
| 91 | + }, | |
| 92 | + { | |
| 93 | + "path": "pages/dev_manage/detail", | |
| 94 | + "style": { | |
| 95 | + "navigationBarTitleText": "查看客户开发", | |
| 96 | + "navigationBarBackgroundColor": "#ffffff", | |
| 97 | + "navigationBarTextStyle": "black" | |
| 98 | + } | |
| 99 | + }, | |
| 100 | + { | |
| 101 | + "path": "pages/credit_manage/index", | |
| 102 | + "style": { | |
| 103 | + "navigationBarTitleText": "客户资信管理", | |
| 104 | + "navigationBarBackgroundColor": "#ffffff", | |
| 105 | + "navigationBarTextStyle": "black" | |
| 106 | + } | |
| 107 | + }, | |
| 108 | + { | |
| 109 | + "path": "pages/credit_manage/add", | |
| 110 | + "style": { | |
| 111 | + "navigationBarTitleText": "新增客户资信", | |
| 112 | + "navigationBarBackgroundColor": "#ffffff", | |
| 113 | + "navigationBarTextStyle": "black" | |
| 114 | + } | |
| 115 | + }, | |
| 116 | + { | |
| 117 | + "path": "pages/credit_manage/detail", | |
| 118 | + "style": { | |
| 119 | + "navigationBarTitleText": "查看客户资信", | |
| 120 | + "navigationBarBackgroundColor": "#ffffff", | |
| 121 | + "navigationBarTextStyle": "black" | |
| 122 | + } | |
| 123 | + }, | |
| 124 | + { | |
| 125 | + "path": "pages/credit_manage/modify", | |
| 126 | + "style": { | |
| 127 | + "navigationBarTitleText": "编辑客户资信", | |
| 128 | + "navigationBarBackgroundColor": "#ffffff", | |
| 129 | + "navigationBarTextStyle": "black" | |
| 130 | + } | |
| 131 | + }, | |
| 132 | + { | |
| 133 | + "path": "pages/credit_manage/change", | |
| 134 | + "style": { | |
| 135 | + "navigationBarTitleText": "申请客户资信变更", | |
| 136 | + "navigationBarBackgroundColor": "#ffffff", | |
| 137 | + "navigationBarTextStyle": "black" | |
| 138 | + } | |
| 139 | + }, | |
| 140 | + { | |
| 141 | + "path": "pages/credit_manage/history_detail", | |
| 142 | + "style": { | |
| 143 | + "navigationBarTitleText": "变更记录详情", | |
| 144 | + "navigationBarBackgroundColor": "#ffffff", | |
| 145 | + "navigationBarTextStyle": "black" | |
| 146 | + } | |
| 147 | + }, | |
| 148 | + { | |
| 149 | + "path": "pages/flow/myflow", | |
| 150 | + "style": { | |
| 151 | + "navigationBarTitleText": "我发起的", | |
| 152 | + "navigationBarBackgroundColor": "#ffffff", | |
| 133 | 153 | "navigationBarTextStyle": "black" |
| 134 | 154 | } |
| 135 | 155 | }, |
| ... | ... | @@ -149,395 +169,458 @@ |
| 149 | 169 | "navigationBarTextStyle": "black" |
| 150 | 170 | } |
| 151 | 171 | }, |
| 152 | - { | |
| 153 | - "path": "pages/flow/audit", | |
| 154 | - "style": { | |
| 155 | - "navigationBarTitleText": "审核", | |
| 156 | - "navigationBarBackgroundColor": "#ffffff", | |
| 157 | - "navigationBarTextStyle": "black" | |
| 158 | - } | |
| 159 | - }, | |
| 160 | - { | |
| 161 | - "path": "pages/order_list/index", | |
| 162 | - "style": { | |
| 163 | - "navigationBarTitleText": "订货单列表", | |
| 164 | - "navigationBarBackgroundColor": "#ffffff", | |
| 165 | - "navigationBarTextStyle": "black" | |
| 166 | - } | |
| 167 | - },{ | |
| 168 | - "path": "pages/order_list/detail", | |
| 169 | - "style": { | |
| 170 | - "navigationBarTitleText": "查看订货单", | |
| 171 | - "navigationBarBackgroundColor": "#ffffff", | |
| 172 | - "navigationBarTextStyle": "black" | |
| 173 | - } | |
| 174 | - }, | |
| 175 | - { | |
| 176 | - "path": "pages/order_list/modify", | |
| 177 | - "style": { | |
| 178 | - "navigationBarTitleText": "编辑订货单", | |
| 179 | - "navigationBarBackgroundColor": "#ffffff", | |
| 180 | - "navigationBarTextStyle": "black" | |
| 181 | - } | |
| 182 | - }, | |
| 183 | - { | |
| 184 | - "path": "pages/order_list/shipment_apply", | |
| 185 | - "style": { | |
| 186 | - "navigationBarTitleText": "申请发货", | |
| 187 | - "navigationBarBackgroundColor": "#ffffff", | |
| 188 | - "navigationBarTextStyle": "black" | |
| 189 | - } | |
| 190 | - }, | |
| 191 | - { | |
| 192 | - "path": "pages/revoke_list/index", | |
| 193 | - "style": { | |
| 194 | - "navigationBarTitleText": "撤销单列表", | |
| 195 | - "navigationBarBackgroundColor": "#ffffff", | |
| 196 | - "navigationBarTextStyle": "black" | |
| 197 | - } | |
| 198 | - },{ | |
| 199 | - "path": "pages/revoke_list/add", | |
| 200 | - "style": { | |
| 201 | - "navigationBarTitleText": "新增撤销单", | |
| 202 | - "navigationBarBackgroundColor": "#ffffff", | |
| 203 | - "navigationBarTextStyle": "black" | |
| 204 | - } | |
| 205 | - },{ | |
| 206 | - "path": "pages/revoke_list/detail", | |
| 207 | - "style": { | |
| 208 | - "navigationBarTitleText": "查看撤销单", | |
| 209 | - "navigationBarBackgroundColor": "#ffffff", | |
| 210 | - "navigationBarTextStyle": "black" | |
| 211 | - } | |
| 212 | - },{ | |
| 213 | - "path": "pages/revoke_list/modify", | |
| 214 | - "style": { | |
| 215 | - "navigationBarTitleText": "编辑撤销单", | |
| 216 | - "navigationBarBackgroundColor": "#ffffff", | |
| 217 | - "navigationBarTextStyle": "black" | |
| 218 | - } | |
| 219 | - }, | |
| 220 | - { | |
| 221 | - "path": "pages/change_list/index", | |
| 222 | - "style": { | |
| 223 | - "navigationBarTitleText": "规格变更单", | |
| 224 | - "navigationBarBackgroundColor": "#ffffff", | |
| 225 | - "navigationBarTextStyle": "black" | |
| 226 | - } | |
| 227 | - },{ | |
| 228 | - "path": "pages/change_list/add", | |
| 229 | - "style": { | |
| 230 | - "navigationBarTitleText": "新增规格变更单", | |
| 231 | - "navigationBarBackgroundColor": "#ffffff", | |
| 232 | - "navigationBarTextStyle": "black" | |
| 233 | - } | |
| 234 | - },{ | |
| 235 | - "path": "pages/change_list/detail", | |
| 236 | - "style": { | |
| 237 | - "navigationBarTitleText": "查看规格变更单", | |
| 238 | - "navigationBarBackgroundColor": "#ffffff", | |
| 239 | - "navigationBarTextStyle": "black" | |
| 240 | - } | |
| 241 | - },{ | |
| 242 | - "path": "pages/change_list/modify", | |
| 243 | - "style": { | |
| 244 | - "navigationBarTitleText": "编辑规格变更单", | |
| 245 | - "navigationBarBackgroundColor": "#ffffff", | |
| 246 | - "navigationBarTextStyle": "black" | |
| 247 | - } | |
| 248 | - }, | |
| 249 | - { | |
| 250 | - "path": "pages/contract_framework/index", | |
| 251 | - "style": { | |
| 252 | - "navigationBarTitleText": "框架合同", | |
| 253 | - "navigationBarBackgroundColor": "#ffffff", | |
| 172 | + { | |
| 173 | + "path": "pages/flow/audit", | |
| 174 | + "style": { | |
| 175 | + "navigationBarTitleText": "审核", | |
| 176 | + "navigationBarBackgroundColor": "#ffffff", | |
| 254 | 177 | "navigationBarTextStyle": "black" |
| 255 | 178 | } |
| 256 | - }, { | |
| 179 | + }, | |
| 180 | + { | |
| 181 | + "path": "pages/order_list/index", | |
| 182 | + "style": { | |
| 183 | + "navigationBarTitleText": "订货单列表", | |
| 184 | + "navigationBarBackgroundColor": "#ffffff", | |
| 185 | + "navigationBarTextStyle": "black" | |
| 186 | + } | |
| 187 | + }, | |
| 188 | + { | |
| 189 | + "path": "pages/order_list/detail", | |
| 190 | + "style": { | |
| 191 | + "navigationBarTitleText": "查看订货单", | |
| 192 | + "navigationBarBackgroundColor": "#ffffff", | |
| 193 | + "navigationBarTextStyle": "black" | |
| 194 | + } | |
| 195 | + }, | |
| 196 | + { | |
| 197 | + "path": "pages/order_list/modify", | |
| 198 | + "style": { | |
| 199 | + "navigationBarTitleText": "编辑订货单", | |
| 200 | + "navigationBarBackgroundColor": "#ffffff", | |
| 201 | + "navigationBarTextStyle": "black" | |
| 202 | + } | |
| 203 | + }, | |
| 204 | + { | |
| 205 | + "path": "pages/order_list/shipment_apply", | |
| 206 | + "style": { | |
| 207 | + "navigationBarTitleText": "申请发货", | |
| 208 | + "navigationBarBackgroundColor": "#ffffff", | |
| 209 | + "navigationBarTextStyle": "black" | |
| 210 | + } | |
| 211 | + }, | |
| 212 | + { | |
| 213 | + "path": "pages/revoke_list/index", | |
| 214 | + "style": { | |
| 215 | + "navigationBarTitleText": "撤销单列表", | |
| 216 | + "navigationBarBackgroundColor": "#ffffff", | |
| 217 | + "navigationBarTextStyle": "black" | |
| 218 | + } | |
| 219 | + }, | |
| 220 | + { | |
| 221 | + "path": "pages/revoke_list/add", | |
| 222 | + "style": { | |
| 223 | + "navigationBarTitleText": "新增撤销单", | |
| 224 | + "navigationBarBackgroundColor": "#ffffff", | |
| 225 | + "navigationBarTextStyle": "black" | |
| 226 | + } | |
| 227 | + }, | |
| 228 | + { | |
| 229 | + "path": "pages/revoke_list/detail", | |
| 230 | + "style": { | |
| 231 | + "navigationBarTitleText": "查看撤销单", | |
| 232 | + "navigationBarBackgroundColor": "#ffffff", | |
| 233 | + "navigationBarTextStyle": "black" | |
| 234 | + } | |
| 235 | + }, | |
| 236 | + { | |
| 237 | + "path": "pages/revoke_list/modify", | |
| 238 | + "style": { | |
| 239 | + "navigationBarTitleText": "编辑撤销单", | |
| 240 | + "navigationBarBackgroundColor": "#ffffff", | |
| 241 | + "navigationBarTextStyle": "black" | |
| 242 | + } | |
| 243 | + }, | |
| 244 | + { | |
| 245 | + "path": "pages/change_list/index", | |
| 246 | + "style": { | |
| 247 | + "navigationBarTitleText": "规格变更单", | |
| 248 | + "navigationBarBackgroundColor": "#ffffff", | |
| 249 | + "navigationBarTextStyle": "black" | |
| 250 | + } | |
| 251 | + }, | |
| 252 | + { | |
| 253 | + "path": "pages/change_list/add", | |
| 254 | + "style": { | |
| 255 | + "navigationBarTitleText": "新增规格变更单", | |
| 256 | + "navigationBarBackgroundColor": "#ffffff", | |
| 257 | + "navigationBarTextStyle": "black" | |
| 258 | + } | |
| 259 | + }, | |
| 260 | + { | |
| 261 | + "path": "pages/change_list/detail", | |
| 262 | + "style": { | |
| 263 | + "navigationBarTitleText": "查看规格变更单", | |
| 264 | + "navigationBarBackgroundColor": "#ffffff", | |
| 265 | + "navigationBarTextStyle": "black" | |
| 266 | + } | |
| 267 | + }, | |
| 268 | + { | |
| 269 | + "path": "pages/change_list/modify", | |
| 270 | + "style": { | |
| 271 | + "navigationBarTitleText": "编辑规格变更单", | |
| 272 | + "navigationBarBackgroundColor": "#ffffff", | |
| 273 | + "navigationBarTextStyle": "black" | |
| 274 | + } | |
| 275 | + }, | |
| 276 | + { | |
| 277 | + "path": "pages/contract_framework/index", | |
| 278 | + "style": { | |
| 279 | + "navigationBarTitleText": "框架合同", | |
| 280 | + "navigationBarBackgroundColor": "#ffffff", | |
| 281 | + "navigationBarTextStyle": "black" | |
| 282 | + } | |
| 283 | + }, | |
| 284 | + { | |
| 257 | 285 | "path": "pages/contract_framework/add", |
| 258 | 286 | "style": { |
| 259 | 287 | "navigationBarTitleText": "新增框架合同", |
| 260 | 288 | "navigationBarBackgroundColor": "#ffffff", |
| 261 | 289 | "navigationBarTextStyle": "black" |
| 262 | 290 | } |
| 263 | - }, { | |
| 264 | - "path": "pages/contract_framework/detail", | |
| 265 | - "style": { | |
| 266 | - "navigationBarTitleText": "框架合同详情", | |
| 267 | - "navigationBarBackgroundColor": "#ffffff", | |
| 268 | - "navigationBarTextStyle": "black" | |
| 269 | - } | |
| 270 | - }, { | |
| 271 | - "path": "pages/contract_framework/modify", | |
| 272 | - "style": { | |
| 273 | - "navigationBarTitleText": "编辑框架合同", | |
| 274 | - "navigationBarBackgroundColor": "#ffffff", | |
| 275 | - "navigationBarTextStyle": "black" | |
| 276 | - } | |
| 277 | - },{ | |
| 278 | - "path": "pages/contract_retail/index", | |
| 279 | - "style": { | |
| 280 | - "navigationBarTitleText": "经销标准合同", | |
| 281 | - "navigationBarBackgroundColor": "#ffffff", | |
| 282 | - "navigationBarTextStyle": "black" | |
| 283 | - } | |
| 284 | - }, { | |
| 291 | + }, | |
| 292 | + { | |
| 293 | + "path": "pages/contract_framework/detail", | |
| 294 | + "style": { | |
| 295 | + "navigationBarTitleText": "框架合同详情", | |
| 296 | + "navigationBarBackgroundColor": "#ffffff", | |
| 297 | + "navigationBarTextStyle": "black" | |
| 298 | + } | |
| 299 | + }, | |
| 300 | + { | |
| 301 | + "path": "pages/contract_framework/modify", | |
| 302 | + "style": { | |
| 303 | + "navigationBarTitleText": "编辑框架合同", | |
| 304 | + "navigationBarBackgroundColor": "#ffffff", | |
| 305 | + "navigationBarTextStyle": "black" | |
| 306 | + } | |
| 307 | + }, | |
| 308 | + { | |
| 309 | + "path": "pages/contract_retail/index", | |
| 310 | + "style": { | |
| 311 | + "navigationBarTitleText": "经销标准合同", | |
| 312 | + "navigationBarBackgroundColor": "#ffffff", | |
| 313 | + "navigationBarTextStyle": "black" | |
| 314 | + } | |
| 315 | + }, | |
| 316 | + { | |
| 285 | 317 | "path": "pages/contract_retail/add", |
| 286 | 318 | "style": { |
| 287 | 319 | "navigationBarTitleText": "新增经销标准合同", |
| 288 | 320 | "navigationBarBackgroundColor": "#ffffff", |
| 289 | 321 | "navigationBarTextStyle": "black" |
| 290 | 322 | } |
| 291 | - },{ | |
| 323 | + }, | |
| 324 | + { | |
| 292 | 325 | "path": "pages/contract_retail/detail", |
| 293 | 326 | "style": { |
| 294 | 327 | "navigationBarTitleText": "经销标准合同详情", |
| 295 | 328 | "navigationBarBackgroundColor": "#ffffff", |
| 296 | 329 | "navigationBarTextStyle": "black" |
| 297 | 330 | } |
| 298 | - },{ | |
| 331 | + }, | |
| 332 | + { | |
| 299 | 333 | "path": "pages/contract_retail/modify", |
| 300 | 334 | "style": { |
| 301 | 335 | "navigationBarTitleText": "编辑经销标准合同", |
| 302 | 336 | "navigationBarBackgroundColor": "#ffffff", |
| 303 | 337 | "navigationBarTextStyle": "black" |
| 304 | 338 | } |
| 305 | - },{ | |
| 339 | + }, | |
| 340 | + { | |
| 306 | 341 | "path": "pages/contract_stock/index", |
| 307 | 342 | "style": { |
| 308 | 343 | "navigationBarTitleText": "经销库存合同", |
| 309 | 344 | "navigationBarBackgroundColor": "#ffffff", |
| 310 | 345 | "navigationBarTextStyle": "black" |
| 311 | 346 | } |
| 312 | - }, { | |
| 347 | + }, | |
| 348 | + { | |
| 313 | 349 | "path": "pages/contract_stock/add", |
| 314 | 350 | "style": { |
| 315 | 351 | "navigationBarTitleText": "新增经销库存合同", |
| 316 | 352 | "navigationBarBackgroundColor": "#ffffff", |
| 317 | 353 | "navigationBarTextStyle": "black" |
| 318 | 354 | } |
| 319 | - },{ | |
| 355 | + }, | |
| 356 | + { | |
| 320 | 357 | "path": "pages/contract_stock/detail", |
| 321 | 358 | "style": { |
| 322 | 359 | "navigationBarTitleText": "经销库存合同详情", |
| 323 | 360 | "navigationBarBackgroundColor": "#ffffff", |
| 324 | 361 | "navigationBarTextStyle": "black" |
| 325 | 362 | } |
| 326 | - },{ | |
| 363 | + }, | |
| 364 | + { | |
| 327 | 365 | "path": "pages/contract_stock/modify", |
| 328 | 366 | "style": { |
| 329 | 367 | "navigationBarTitleText": "编辑经销库存合同", |
| 330 | 368 | "navigationBarBackgroundColor": "#ffffff", |
| 331 | 369 | "navigationBarTextStyle": "black" |
| 332 | 370 | } |
| 333 | - },{ | |
| 371 | + }, | |
| 372 | + { | |
| 334 | 373 | "path": "pages/contract_stock/lock", |
| 335 | 374 | "style": { |
| 336 | 375 | "navigationBarTitleText": "锁价", |
| 337 | 376 | "navigationBarBackgroundColor": "#ffffff", |
| 338 | 377 | "navigationBarTextStyle": "black" |
| 339 | 378 | } |
| 340 | - },{ | |
| 379 | + }, | |
| 380 | + { | |
| 341 | 381 | "path": "pages/contract_unplan/index", |
| 342 | 382 | "style": { |
| 343 | 383 | "navigationBarTitleText": "经销未锁规合同", |
| 344 | 384 | "navigationBarBackgroundColor": "#ffffff", |
| 345 | 385 | "navigationBarTextStyle": "black" |
| 346 | 386 | } |
| 347 | - },{ | |
| 387 | + }, | |
| 388 | + { | |
| 348 | 389 | "path": "pages/contract_unplan/add", |
| 349 | 390 | "style": { |
| 350 | 391 | "navigationBarTitleText": "新增经销未锁规合同", |
| 351 | 392 | "navigationBarBackgroundColor": "#ffffff", |
| 352 | 393 | "navigationBarTextStyle": "black" |
| 353 | 394 | } |
| 354 | - },{ | |
| 395 | + }, | |
| 396 | + { | |
| 355 | 397 | "path": "pages/contract_unplan/detail", |
| 356 | 398 | "style": { |
| 357 | 399 | "navigationBarTitleText": "经销未锁规合同详情", |
| 358 | 400 | "navigationBarBackgroundColor": "#ffffff", |
| 359 | 401 | "navigationBarTextStyle": "black" |
| 360 | 402 | } |
| 361 | - },{ | |
| 403 | + }, | |
| 404 | + { | |
| 362 | 405 | "path": "pages/contract_unplan/modify", |
| 363 | 406 | "style": { |
| 364 | 407 | "navigationBarTitleText": "编辑经销未锁规合同", |
| 365 | 408 | "navigationBarBackgroundColor": "#ffffff", |
| 366 | 409 | "navigationBarTextStyle": "black" |
| 367 | 410 | } |
| 368 | - },{ | |
| 411 | + }, | |
| 412 | + { | |
| 369 | 413 | "path": "pages/contract_unplan/lock", |
| 370 | 414 | "style": { |
| 371 | 415 | "navigationBarTitleText": "锁规", |
| 372 | 416 | "navigationBarBackgroundColor": "#ffffff", |
| 373 | 417 | "navigationBarTextStyle": "black" |
| 374 | 418 | } |
| 375 | - }, { | |
| 419 | + }, | |
| 420 | + { | |
| 376 | 421 | "path": "pages/contract_unplan/lock_apply", |
| 377 | 422 | "style": { |
| 378 | 423 | "navigationBarTitleText": "锁规延期申请", |
| 379 | 424 | "navigationBarBackgroundColor": "#ffffff", |
| 380 | 425 | "navigationBarTextStyle": "black" |
| 381 | 426 | } |
| 382 | - },{ | |
| 427 | + }, | |
| 428 | + { | |
| 383 | 429 | "path": "pages/contract_process/index", |
| 384 | 430 | "style": { |
| 385 | 431 | "navigationBarTitleText": "加工标准合同", |
| 386 | 432 | "navigationBarBackgroundColor": "#ffffff", |
| 387 | 433 | "navigationBarTextStyle": "black" |
| 388 | 434 | } |
| 389 | - },{ | |
| 435 | + }, | |
| 436 | + { | |
| 390 | 437 | "path": "pages/contract_process/add", |
| 391 | 438 | "style": { |
| 392 | 439 | "navigationBarTitleText": "新增加工标准合同", |
| 393 | 440 | "navigationBarBackgroundColor": "#ffffff", |
| 394 | 441 | "navigationBarTextStyle": "black" |
| 395 | 442 | } |
| 396 | - },{ | |
| 443 | + }, | |
| 444 | + { | |
| 397 | 445 | "path": "pages/contract_process/detail", |
| 398 | 446 | "style": { |
| 399 | 447 | "navigationBarTitleText": "加工标准合同详情", |
| 400 | 448 | "navigationBarBackgroundColor": "#ffffff", |
| 401 | 449 | "navigationBarTextStyle": "black" |
| 402 | 450 | } |
| 403 | - },{ | |
| 451 | + }, | |
| 452 | + { | |
| 404 | 453 | "path": "pages/contract_process/modify", |
| 405 | 454 | "style": { |
| 406 | 455 | "navigationBarTitleText": "编辑加工标准合同", |
| 407 | 456 | "navigationBarBackgroundColor": "#ffffff", |
| 408 | 457 | "navigationBarTextStyle": "black" |
| 409 | 458 | } |
| 410 | - }, { | |
| 459 | + }, | |
| 460 | + { | |
| 411 | 461 | "path": "pages/contract_foreign_std/index", |
| 412 | 462 | "style": { |
| 413 | 463 | "navigationBarTitleText": "外贸标准合同", |
| 414 | 464 | "navigationBarBackgroundColor": "#ffffff", |
| 415 | 465 | "navigationBarTextStyle": "black" |
| 416 | 466 | } |
| 417 | - },{ | |
| 467 | + }, | |
| 468 | + { | |
| 418 | 469 | "path": "pages/contract_foreign_std/add", |
| 419 | 470 | "style": { |
| 420 | 471 | "navigationBarTitleText": "新增外贸标准合同", |
| 421 | 472 | "navigationBarBackgroundColor": "#ffffff", |
| 422 | 473 | "navigationBarTextStyle": "black" |
| 423 | 474 | } |
| 424 | - },{ | |
| 475 | + }, | |
| 476 | + { | |
| 425 | 477 | "path": "pages/contract_foreign_std/detail", |
| 426 | 478 | "style": { |
| 427 | 479 | "navigationBarTitleText": "外贸标准合同详情", |
| 428 | 480 | "navigationBarBackgroundColor": "#ffffff", |
| 429 | 481 | "navigationBarTextStyle": "black" |
| 430 | 482 | } |
| 431 | - },{ | |
| 483 | + }, | |
| 484 | + { | |
| 432 | 485 | "path": "pages/contract_foreign_std/modify", |
| 433 | 486 | "style": { |
| 434 | 487 | "navigationBarTitleText": "编辑外贸标准合同", |
| 435 | 488 | "navigationBarBackgroundColor": "#ffffff", |
| 436 | 489 | "navigationBarTextStyle": "black" |
| 437 | 490 | } |
| 438 | - }, { | |
| 491 | + }, | |
| 492 | + { | |
| 439 | 493 | "path": "pages/contract_foreign_stock/index", |
| 440 | 494 | "style": { |
| 441 | 495 | "navigationBarTitleText": "外贸库存合同", |
| 442 | 496 | "navigationBarBackgroundColor": "#ffffff", |
| 443 | 497 | "navigationBarTextStyle": "black" |
| 444 | 498 | } |
| 445 | - },{ | |
| 499 | + }, | |
| 500 | + { | |
| 446 | 501 | "path": "pages/contract_foreign_stock/add", |
| 447 | 502 | "style": { |
| 448 | 503 | "navigationBarTitleText": "新增外贸库存合同", |
| 449 | 504 | "navigationBarBackgroundColor": "#ffffff", |
| 450 | 505 | "navigationBarTextStyle": "black" |
| 451 | 506 | } |
| 452 | - },{ | |
| 507 | + }, | |
| 508 | + { | |
| 453 | 509 | "path": "pages/contract_foreign_stock/detail", |
| 454 | 510 | "style": { |
| 455 | 511 | "navigationBarTitleText": "外贸库存合同详情", |
| 456 | 512 | "navigationBarBackgroundColor": "#ffffff", |
| 457 | 513 | "navigationBarTextStyle": "black" |
| 458 | 514 | } |
| 459 | - },{ | |
| 515 | + }, | |
| 516 | + { | |
| 460 | 517 | "path": "pages/contract_foreign_stock/modify", |
| 461 | 518 | "style": { |
| 462 | 519 | "navigationBarTitleText": "编辑外贸库存合同", |
| 463 | 520 | "navigationBarBackgroundColor": "#ffffff", |
| 464 | 521 | "navigationBarTextStyle": "black" |
| 465 | 522 | } |
| 466 | - },{ | |
| 523 | + }, | |
| 524 | + { | |
| 467 | 525 | "path": "pages/contract_foreign_stock/lock", |
| 468 | 526 | "style": { |
| 469 | 527 | "navigationBarTitleText": "锁价", |
| 470 | 528 | "navigationBarBackgroundColor": "#ffffff", |
| 471 | 529 | "navigationBarTextStyle": "black" |
| 472 | 530 | } |
| 473 | - },{ | |
| 531 | + }, | |
| 532 | + { | |
| 474 | 533 | "path": "pages/contract_foreign_unplan/index", |
| 475 | 534 | "style": { |
| 476 | 535 | "navigationBarTitleText": "外贸未锁规合同", |
| 477 | 536 | "navigationBarBackgroundColor": "#ffffff", |
| 478 | 537 | "navigationBarTextStyle": "black" |
| 479 | 538 | } |
| 480 | - },{ | |
| 539 | + }, | |
| 540 | + { | |
| 481 | 541 | "path": "pages/contract_foreign_unplan/add", |
| 482 | 542 | "style": { |
| 483 | 543 | "navigationBarTitleText": "新增外贸未锁规合同", |
| 484 | 544 | "navigationBarBackgroundColor": "#ffffff", |
| 485 | 545 | "navigationBarTextStyle": "black" |
| 486 | 546 | } |
| 487 | - },{ | |
| 547 | + }, | |
| 548 | + { | |
| 488 | 549 | "path": "pages/contract_foreign_unplan/detail", |
| 489 | 550 | "style": { |
| 490 | 551 | "navigationBarTitleText": "外贸未锁规合同详情", |
| 491 | 552 | "navigationBarBackgroundColor": "#ffffff", |
| 492 | 553 | "navigationBarTextStyle": "black" |
| 493 | 554 | } |
| 494 | - },{ | |
| 555 | + }, | |
| 556 | + { | |
| 495 | 557 | "path": "pages/contract_foreign_unplan/modify", |
| 496 | 558 | "style": { |
| 497 | 559 | "navigationBarTitleText": "编辑外贸未锁规合同", |
| 498 | 560 | "navigationBarBackgroundColor": "#ffffff", |
| 499 | 561 | "navigationBarTextStyle": "black" |
| 500 | 562 | } |
| 501 | - },{ | |
| 563 | + }, | |
| 564 | + { | |
| 502 | 565 | "path": "pages/contract_foreign_unplan/lock", |
| 503 | 566 | "style": { |
| 504 | 567 | "navigationBarTitleText": "锁规", |
| 505 | 568 | "navigationBarBackgroundColor": "#ffffff", |
| 506 | 569 | "navigationBarTextStyle": "black" |
| 507 | 570 | } |
| 508 | - },{ | |
| 571 | + }, | |
| 572 | + { | |
| 509 | 573 | "path": "pages/contract_foreign_unplan/lock_apply", |
| 510 | 574 | "style": { |
| 511 | 575 | "navigationBarTitleText": "锁规延期申请", |
| 512 | 576 | "navigationBarBackgroundColor": "#ffffff", |
| 513 | 577 | "navigationBarTextStyle": "black" |
| 514 | 578 | } |
| 515 | - },{ | |
| 579 | + }, | |
| 580 | + { | |
| 516 | 581 | "path": "pages/contract_unlocked_operation/detail", |
| 517 | 582 | "style": { |
| 518 | 583 | "navigationBarTitleText": "锁价无规格操作申请单详情", |
| 519 | 584 | "navigationBarBackgroundColor": "#ffffff", |
| 520 | 585 | "navigationBarTextStyle": "black" |
| 521 | 586 | } |
| 522 | - },{ | |
| 587 | + }, | |
| 588 | + { | |
| 523 | 589 | "path": "pages/contract_unlocked_operation/modify", |
| 524 | 590 | "style": { |
| 525 | 591 | "navigationBarTitleText": "编辑锁价无规格操作申请单", |
| 526 | 592 | "navigationBarBackgroundColor": "#ffffff", |
| 527 | 593 | "navigationBarTextStyle": "black" |
| 528 | 594 | } |
| 529 | - },{ | |
| 595 | + }, | |
| 596 | + { | |
| 530 | 597 | "path": "pages/contract_unlocked_operation/index", |
| 531 | 598 | "style": { |
| 532 | 599 | "navigationBarTitleText": "锁价无规格操作申请单", |
| 533 | 600 | "navigationBarBackgroundColor": "#ffffff", |
| 534 | 601 | "navigationBarTextStyle": "black" |
| 535 | 602 | } |
| 603 | + }, { | |
| 604 | + "path": "pages/message/index", | |
| 605 | + "style": { | |
| 606 | + "navigationBarTitleText": "消息列表", | |
| 607 | + "navigationBarBackgroundColor": "#ffffff", | |
| 608 | + "navigationBarTextStyle": "black" | |
| 609 | + } | |
| 610 | + }, { | |
| 611 | + "path": "pages/message/detail", | |
| 612 | + "style": { | |
| 613 | + "navigationBarTitleText": "消息详情", | |
| 614 | + "navigationBarBackgroundColor": "#ffffff", | |
| 615 | + "navigationBarTextStyle": "black" | |
| 616 | + } | |
| 536 | 617 | } |
| 537 | - ], | |
| 538 | - "subPackages": [{ | |
| 618 | + ], | |
| 619 | + "subPackages": [ | |
| 620 | + { | |
| 539 | 621 | "root": "pages-business", |
| 540 | - "pages": [{ | |
| 622 | + "pages": [ | |
| 623 | + { | |
| 541 | 624 | "path": "purchase/config", |
| 542 | 625 | "style": { |
| 543 | 626 | "navigationBarTitleText": "采购设置" |
| ... | ... | @@ -571,7 +654,8 @@ |
| 571 | 654 | }, |
| 572 | 655 | { |
| 573 | 656 | "root": "pages-data", |
| 574 | - "pages": [{ | |
| 657 | + "pages": [ | |
| 658 | + { | |
| 575 | 659 | "path": "address/index", |
| 576 | 660 | "style": { |
| 577 | 661 | "navigationBarTitleText": "地址管理" |
| ... | ... | @@ -656,17 +740,20 @@ |
| 656 | 740 | "color": "rgba(0,0,0,0.9)", |
| 657 | 741 | "backgroundColor": "#ffffff", |
| 658 | 742 | "borderStyle": "white", |
| 659 | - "list": [{ | |
| 660 | - "pagePath": "pages/index", | |
| 661 | - "iconPath": "static/images/tabbar/home.png", | |
| 662 | - "selectedIconPath": "static/images/tabbar/home_act.png", | |
| 663 | - "text": "首页" | |
| 664 | - }, { | |
| 665 | - "pagePath": "pages/mine/index", | |
| 666 | - "iconPath": "static/images/tabbar/mine.png", | |
| 667 | - "selectedIconPath": "static/images/tabbar/mine_act.png", | |
| 668 | - "text": "我的" | |
| 669 | - }] | |
| 743 | + "list": [ | |
| 744 | + { | |
| 745 | + "pagePath": "pages/index", | |
| 746 | + "iconPath": "static/images/tabbar/home.png", | |
| 747 | + "selectedIconPath": "static/images/tabbar/home_act.png", | |
| 748 | + "text": "首页" | |
| 749 | + }, | |
| 750 | + { | |
| 751 | + "pagePath": "pages/mine/index", | |
| 752 | + "iconPath": "static/images/tabbar/mine.png", | |
| 753 | + "selectedIconPath": "static/images/tabbar/mine_act.png", | |
| 754 | + "text": "我的" | |
| 755 | + } | |
| 756 | + ] | |
| 670 | 757 | }, |
| 671 | 758 | "globalStyle": { |
| 672 | 759 | "navigationBarTitleText": "ERP", | ... | ... |
pages/message/detail.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="page"> | |
| 3 | + <scroll-view class="scroll" scroll-y> | |
| 4 | + <view class="detail-page"> | |
| 5 | + <view class="section"> | |
| 6 | + <text class="row company">{{ detail.title }}</text> | |
| 7 | + <view class="row"><text class="label">内容</text><text class="value">{{ detail.content }}</text></view> | |
| 8 | + </view> | |
| 9 | + </view> | |
| 10 | + </scroll-view> | |
| 11 | + </view> | |
| 12 | +</template> | |
| 13 | + | |
| 14 | +<script> | |
| 15 | +import { getContentApi } from '@/api/message.js' | |
| 16 | + | |
| 17 | +export default { | |
| 18 | + data() { | |
| 19 | + return { | |
| 20 | + detail: { title: '', content: '' } | |
| 21 | + } | |
| 22 | + }, | |
| 23 | + onLoad(options) { | |
| 24 | + const id = options && (options.id || options.code) || '' | |
| 25 | + if (!id) return | |
| 26 | + this.loadDetail(id) | |
| 27 | + }, | |
| 28 | + methods: { | |
| 29 | + loadDetail(id) { | |
| 30 | + getContentApi(id) | |
| 31 | + .then(res => { | |
| 32 | + const d = res && res.data ? res.data : {} | |
| 33 | + this.detail = { title: d.title || '', content: d.content || '' } | |
| 34 | + }) | |
| 35 | + .catch(() => { | |
| 36 | + this.detail = { title: '', content: '' } | |
| 37 | + uni.showToast({ title: '加载失败', icon: 'none' }) | |
| 38 | + }) | |
| 39 | + } | |
| 40 | + } | |
| 41 | +} | |
| 42 | +</script> | |
| 43 | + | |
| 44 | +<style lang="scss" scoped> | |
| 45 | +.page { display: flex; flex-direction: column; height: 100%; } | |
| 46 | +.scroll { flex: 1; padding: 8rpx 0 0; } | |
| 47 | +.detail-page { background: #f3f3f3; } | |
| 48 | +.section { padding: 32rpx; background: #fff; } | |
| 49 | +.row { | |
| 50 | + display: flex; | |
| 51 | + margin-bottom: 28rpx; | |
| 52 | + | |
| 53 | + &:last-child { | |
| 54 | + margin-bottom: 0; | |
| 55 | + } | |
| 56 | + | |
| 57 | + &.company { | |
| 58 | + font-size: 36rpx; | |
| 59 | + font-weight: 600; | |
| 60 | + color: rgba(0, 0, 0, 0.9); | |
| 61 | + padding-top: 32rpx; | |
| 62 | + line-height: 50rpx; | |
| 63 | + } | |
| 64 | + | |
| 65 | + .label { | |
| 66 | + max-width: 420rpx; | |
| 67 | + line-height: 32rpx; | |
| 68 | + font-size: 28rpx; | |
| 69 | + color: rgba(0, 0, 0, 0.6); | |
| 70 | + } | |
| 71 | + | |
| 72 | + .value { | |
| 73 | + flex: 1; | |
| 74 | + line-height: 32rpx; | |
| 75 | + font-size: 28rpx; | |
| 76 | + color: rgba(0, 0, 0, 0.9); | |
| 77 | + text-align: right; | |
| 78 | + | |
| 79 | + &.act { | |
| 80 | + color: $theme-primary; | |
| 81 | + } | |
| 82 | + } | |
| 83 | +} | |
| 84 | +</style> | |
| 85 | + | ... | ... |
pages/message/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <view class="page"> | |
| 3 | + <view class="message-list-fixed"> | |
| 4 | + <view class="search-row"> | |
| 5 | + <uni-search-bar v-model="searchKeyword" radius="6" placeholder="请输入标题" clearButton="auto" | |
| 6 | + cancelButton="none" bgColor="#F3F3F3" textColor="rgba(0,0,0,0.4)" @confirm="search" | |
| 7 | + @input="onSearchInput" /> | |
| 8 | + <view class="tool-icons"> | |
| 9 | + <image class="tool-icon" src="/static/images/dev_manage/filter_icon.png" @click="openFilter" /> | |
| 10 | + </view> | |
| 11 | + </view> | |
| 12 | + </view> | |
| 13 | + | |
| 14 | + <view class="list-box"> | |
| 15 | + <card-list ref="cardRef" :fetch-fn="fetchList" :query="query" :extra="extraParams" row-key="id" | |
| 16 | + :enable-refresh="true" :enable-load-more="true" @loaded="onCardLoaded" @error="onCardError"> | |
| 17 | + <template v-slot="{ item }"> | |
| 18 | + <view class="card" @click.stop="onCardClick(item)"> | |
| 19 | + <view class="card-header"> | |
| 20 | + <text class="title omit2">{{ item.title || '-' }}</text> | |
| 21 | + </view> | |
| 22 | + <view class="info-row"> | |
| 23 | + <text>是否已读</text><text>{{ item.readed ? '是' : '否' }}</text> | |
| 24 | + </view> | |
| 25 | + <view class="info-row"> | |
| 26 | + <text>创建时间</text><text>{{ item.createTime || '-' }}</text> | |
| 27 | + </view> | |
| 28 | + </view> | |
| 29 | + </template> | |
| 30 | + </card-list> | |
| 31 | + </view> | |
| 32 | + | |
| 33 | + <filter-modal :visible.sync="filterVisible" :value.sync="filterForm" title="筛选" @reset="onFilterReset" | |
| 34 | + @confirm="onFilterConfirm"> | |
| 35 | + <template v-slot="{ model }"> | |
| 36 | + <view class="filter-form"> | |
| 37 | + <view class="form-item"> | |
| 38 | + <view class="label">是否已读</view> | |
| 39 | + <uni-data-checkbox mode="tag" :multiple="false" :value-field="'value'" :text-field="'text'" | |
| 40 | + v-model="model.readed" :localdata="readOptions" /> | |
| 41 | + </view> | |
| 42 | + <view class="form-item"> | |
| 43 | + <view class="label">创建时间</view> | |
| 44 | + <uni-datetime-picker type="daterange" v-model="model.dateRange" start="2023-01-01" /> | |
| 45 | + </view> | |
| 46 | + </view> | |
| 47 | + </template> | |
| 48 | + </filter-modal> | |
| 49 | + </view> | |
| 50 | +</template> | |
| 51 | + | |
| 52 | +<script> | |
| 53 | +import CardList from '@/components/card/index.vue' | |
| 54 | +import FilterModal from '@/components/filter/index.vue' | |
| 55 | +import { queryApi as messageQueryApi } from '@/api/message.js' | |
| 56 | + | |
| 57 | +export default { | |
| 58 | + name: 'MessageList', | |
| 59 | + components: { CardList, FilterModal }, | |
| 60 | + data() { | |
| 61 | + return { | |
| 62 | + searchKeyword: '', | |
| 63 | + searchKeywordDebounced: '', | |
| 64 | + searchDebounceTimer: null, | |
| 65 | + | |
| 66 | + // 给到 card 的筛选值 | |
| 67 | + query: { readed: '', dateRange: [] }, | |
| 68 | + extraParams: {}, | |
| 69 | + | |
| 70 | + // 筛选弹框 | |
| 71 | + filterVisible: false, | |
| 72 | + filterForm: { readed: false, dateRange: [] }, | |
| 73 | + readOptions: [ | |
| 74 | + { value: true, text: '是' }, | |
| 75 | + { value: false, text: '否' } | |
| 76 | + ], | |
| 77 | + | |
| 78 | + currentItems: [] | |
| 79 | + } | |
| 80 | + }, | |
| 81 | + computed: { | |
| 82 | + extraCombined() { | |
| 83 | + return { | |
| 84 | + title: this.searchKeywordDebounced || undefined | |
| 85 | + } | |
| 86 | + } | |
| 87 | + }, | |
| 88 | + watch: { | |
| 89 | + extraCombined: { | |
| 90 | + deep: true, | |
| 91 | + handler(v) { | |
| 92 | + this.extraParams = v | |
| 93 | + }, | |
| 94 | + immediate: true | |
| 95 | + } | |
| 96 | + }, | |
| 97 | + created() { | |
| 98 | + const [start, end] = this.getDefaultDateRange() | |
| 99 | + this.filterForm.dateRange = [start, end] | |
| 100 | + this.query = { readed: this.filterForm.readed, dateRange: [start, end] } | |
| 101 | + }, | |
| 102 | + onReachBottom() { | |
| 103 | + if (this.$refs && this.$refs.cardRef && this.$refs.cardRef.onLoadMore) { | |
| 104 | + this.$refs.cardRef.onLoadMore() | |
| 105 | + } | |
| 106 | + }, | |
| 107 | + beforeDestroy() { | |
| 108 | + if (this.searchDebounceTimer) { | |
| 109 | + clearTimeout(this.searchDebounceTimer) | |
| 110 | + this.searchDebounceTimer = null | |
| 111 | + } | |
| 112 | + }, | |
| 113 | + methods: { | |
| 114 | + // 默认日期范围:当前日期前一个月到今日 | |
| 115 | + getDefaultDateRange() { | |
| 116 | + const fmt = d => { | |
| 117 | + const y = d.getFullYear() | |
| 118 | + const m = String(d.getMonth() + 1).padStart(2, '0') | |
| 119 | + const dd = String(d.getDate()).padStart(2, '0') | |
| 120 | + return `${y}-${m}-${dd}` | |
| 121 | + } | |
| 122 | + const end = new Date() | |
| 123 | + const start = new Date(end) | |
| 124 | + start.setMonth(start.getMonth() - 1) | |
| 125 | + return [fmt(start), fmt(end)] | |
| 126 | + }, | |
| 127 | + onCardLoaded({ items }) { | |
| 128 | + this.currentItems = items | |
| 129 | + }, | |
| 130 | + onCardError() { | |
| 131 | + uni.showToast({ title: '列表加载失败', icon: 'none' }) | |
| 132 | + }, | |
| 133 | + onCardClick(item) { | |
| 134 | + const id = (item && (item.id || item.code)) || '' | |
| 135 | + if (!id) return | |
| 136 | + const query = '?id=' + encodeURIComponent(id) | |
| 137 | + uni.navigateTo({ url: '/pages/message/detail' + query }) | |
| 138 | + }, | |
| 139 | + // 输入实时搜索:1200ms 防抖 | |
| 140 | + onSearchInput(val) { | |
| 141 | + if (this.searchDebounceTimer) clearTimeout(this.searchDebounceTimer) | |
| 142 | + this.searchDebounceTimer = setTimeout(() => { | |
| 143 | + this.searchKeywordDebounced = this.searchKeyword | |
| 144 | + this.searchDebounceTimer = null | |
| 145 | + }, 1200) | |
| 146 | + }, | |
| 147 | + // 确认搜索 | |
| 148 | + search(e) { | |
| 149 | + const val = e && e.value != null ? e.value : this.searchKeyword | |
| 150 | + this.searchKeyword = val | |
| 151 | + this.searchKeywordDebounced = val | |
| 152 | + }, | |
| 153 | + openFilter() { | |
| 154 | + this.filterVisible = true | |
| 155 | + }, | |
| 156 | + onFilterReset(payload) { | |
| 157 | + this.filterForm = payload | |
| 158 | + }, | |
| 159 | + onFilterConfirm(payload) { | |
| 160 | + if ((payload.readed === '' || payload.readed == null) && this.filterForm.readed !== '') { | |
| 161 | + payload.readed = this.filterForm.readed | |
| 162 | + } | |
| 163 | + this.query = { ...payload } | |
| 164 | + }, | |
| 165 | + // 列表接口 | |
| 166 | + fetchList({ pageIndex, pageSize, query, extra }) { | |
| 167 | + const params = { | |
| 168 | + pageIndex, | |
| 169 | + pageSize, | |
| 170 | + ...extra, | |
| 171 | + ...query | |
| 172 | + } | |
| 173 | + if (Array.isArray(params.dateRange) && params.dateRange.length === 2) { | |
| 174 | + params.createTimeStart = params.dateRange[0] + ' 00:00:00' | |
| 175 | + params.createTimeEnd = params.dateRange[1] + ' 23:59:59' | |
| 176 | + delete params.dateRange | |
| 177 | + } | |
| 178 | + if (this.searchKeywordDebounced) { | |
| 179 | + params.title = this.searchKeywordDebounced | |
| 180 | + } | |
| 181 | + return messageQueryApi(params) | |
| 182 | + .then(res => { | |
| 183 | + const _data = res.data || {} | |
| 184 | + const records = _data.datas || [] | |
| 185 | + const totalCount = _data.totalCount || 0 | |
| 186 | + const hasNext = _data.hasNext || false | |
| 187 | + return { records, totalCount, hasNext } | |
| 188 | + }) | |
| 189 | + .catch(err => { | |
| 190 | + console.error('fetchList error', err) | |
| 191 | + this.onCardError() | |
| 192 | + return { records: [], totalCount: 0, hasNext: false } | |
| 193 | + }) | |
| 194 | + } | |
| 195 | + } | |
| 196 | +} | |
| 197 | +</script> | |
| 198 | + | |
| 199 | +<style lang="scss" scoped> | |
| 200 | +.page { | |
| 201 | + display: flex; | |
| 202 | + flex-direction: column; | |
| 203 | + height: 100vh; | |
| 204 | +} | |
| 205 | + | |
| 206 | +.message-list-fixed { | |
| 207 | + position: fixed; | |
| 208 | + top: 96rpx; | |
| 209 | + left: 0; | |
| 210 | + right: 0; | |
| 211 | + z-index: 2; | |
| 212 | + background: #fff; | |
| 213 | + | |
| 214 | + .search-row { | |
| 215 | + display: flex; | |
| 216 | + align-items: center; | |
| 217 | + padding: 16rpx 32rpx; | |
| 218 | + | |
| 219 | + .uni-searchbar { | |
| 220 | + padding: 0; | |
| 221 | + flex: 1; | |
| 222 | + } | |
| 223 | + | |
| 224 | + .tool-icons { | |
| 225 | + display: flex; | |
| 226 | + | |
| 227 | + .tool-icon { | |
| 228 | + width: 48rpx; | |
| 229 | + height: 48rpx; | |
| 230 | + display: block; | |
| 231 | + margin-left: 32rpx; | |
| 232 | + } | |
| 233 | + } | |
| 234 | + } | |
| 235 | +} | |
| 236 | + | |
| 237 | +/* 仅当前页覆盖 uni-search-bar 盒子高度 */ | |
| 238 | +::v-deep .uni-searchbar__box { | |
| 239 | + height: 80rpx !important; | |
| 240 | + justify-content: start; | |
| 241 | + | |
| 242 | + .uni-searchbar__box-search-input { | |
| 243 | + font-size: 32rpx !important; | |
| 244 | + } | |
| 245 | +} | |
| 246 | + | |
| 247 | +.list-box { | |
| 248 | + flex: 1; | |
| 249 | + padding-top: 132rpx; | |
| 250 | + | |
| 251 | + .card { | |
| 252 | + position: relative; | |
| 253 | + } | |
| 254 | + | |
| 255 | + .card-header { | |
| 256 | + margin-bottom: 28rpx; | |
| 257 | + | |
| 258 | + .title { | |
| 259 | + font-size: 36rpx; | |
| 260 | + font-weight: 600; | |
| 261 | + line-height: 50rpx; | |
| 262 | + color: rgba(0, 0, 0, 0.9); | |
| 263 | + } | |
| 264 | + } | |
| 265 | + | |
| 266 | + .info-row { | |
| 267 | + display: flex; | |
| 268 | + align-items: center; | |
| 269 | + color: rgba(0, 0, 0, 0.6); | |
| 270 | + font-size: 28rpx; | |
| 271 | + margin-bottom: 24rpx; | |
| 272 | + | |
| 273 | + &:last-child { | |
| 274 | + margin-bottom: 0; | |
| 275 | + } | |
| 276 | + | |
| 277 | + text { | |
| 278 | + width: 60%; | |
| 279 | + line-height: 32rpx; | |
| 280 | + | |
| 281 | + &:last-child { | |
| 282 | + color: rgba(0, 0, 0, 0.9); | |
| 283 | + width: 40%; | |
| 284 | + } | |
| 285 | + } | |
| 286 | + } | |
| 287 | +} | |
| 288 | + | |
| 289 | +.filter-form { | |
| 290 | + .form-item { | |
| 291 | + margin-bottom: 24rpx; | |
| 292 | + } | |
| 293 | + | |
| 294 | + .label { | |
| 295 | + margin-bottom: 20rpx; | |
| 296 | + color: rgba(0, 0, 0, 0.9); | |
| 297 | + height: 44rpx; | |
| 298 | + line-height: 44rpx; | |
| 299 | + font-size: 30rpx; | |
| 300 | + } | |
| 301 | + | |
| 302 | + .uni-easyinput { | |
| 303 | + border: 1rpx solid #f3f3f3; | |
| 304 | + } | |
| 305 | + | |
| 306 | +} | |
| 307 | + | |
| 308 | +/* 深度覆盖 uni-data-checkbox(mode=tag)内部的 tag 展示与间距 */ | |
| 309 | +::v-deep .filter-form .uni-data-checklist .checklist-group { | |
| 310 | + .checklist-box { | |
| 311 | + &.is--tag { | |
| 312 | + width: 212rpx; | |
| 313 | + margin-top: 0; | |
| 314 | + margin-bottom: 24rpx; | |
| 315 | + margin-right: 24rpx; | |
| 316 | + height: 80rpx; | |
| 317 | + padding: 0; | |
| 318 | + border-radius: 12rpx; | |
| 319 | + background-color: #f3f3f3; | |
| 320 | + border-color: #f3f3f3; | |
| 321 | + | |
| 322 | + &:nth-child(3n) { | |
| 323 | + margin-right: 0; | |
| 324 | + } | |
| 325 | + | |
| 326 | + .checklist-content { | |
| 327 | + display: flex; | |
| 328 | + justify-content: center; | |
| 329 | + } | |
| 330 | + | |
| 331 | + .checklist-text { | |
| 332 | + color: rgba(0, 0, 0, 0.9); | |
| 333 | + font-size: 28rpx; | |
| 334 | + } | |
| 335 | + } | |
| 336 | + | |
| 337 | + &.is-checked { | |
| 338 | + background-color: $theme-primary-plain-bg !important; | |
| 339 | + border-color: $theme-primary-plain-bg !important; | |
| 340 | + | |
| 341 | + .checklist-text { | |
| 342 | + color: $theme-primary !important; | |
| 343 | + } | |
| 344 | + } | |
| 345 | + } | |
| 346 | + | |
| 347 | +} | |
| 348 | +</style> | ... | ... |