sale-client 3.4.196 → 3.4.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/.babelrc +5 -5
  2. package/.gradle/{3.5.1/file-changes → 4.4/fileChanges}/last-build.bin +0 -0
  3. package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
  4. package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
  5. package/build/dev-server.js +2 -2
  6. package/build/webpack.base.conf.js +0 -1
  7. package/build/webpack.prod.conf.js +88 -40
  8. package/{.gradle/buildOutputCleanup/built.bin → npm} +0 -0
  9. package/package.json +5 -3
  10. package/src/components/FilesManage/MeterinfoTest.vue +24 -1
  11. package/src/components/FilesManage/TemplateManage.vue +167 -167
  12. package/src/components/FilesManageNew/UserEssentialInfoTest.vue +5 -0
  13. package/src/components/charge/business/FilesComplete.vue +253 -253
  14. package/src/components/charge/business/OtherChargeNew.vue +1 -1
  15. package/src/components/charge/business/PriceChangeCompensation/JbCompensation.vue +342 -342
  16. package/src/components/charge/business/ShowCardSellGas.vue +8 -1
  17. package/src/components/charge/business/refund/RefundManage.vue +28 -28
  18. package/src/components/charge/gasloss/gasLossOperate.vue +5 -1
  19. package/src/components/chargeNew/thirdSurplus.vue +1 -1
  20. package/src/components/common/userinfo_detail/UserBaseInfo.vue +1 -1
  21. package/src/components/common/userinfo_detail/UserBaseInfoNew.vue +1 -1
  22. package/src/components/revenue/Common/MeterMessage.vue +184 -184
  23. package/src/components/revenue/Common/PaymentCode.vue +1 -1
  24. package/src/components/revenue/base/leftview/Stairinfo.vue +156 -156
  25. package/src/components/revenue/comprehen/ComprehenOperation/BankPayment/BankPayment.vue +2 -2
  26. package/src/components/revenue/comprehen/ComprehenOperation/ChangeAccount/TransferManage.vue +2 -2
  27. package/src/components/revenue/comprehen/ComprehenOperation/ChangeAccount/TransferRecords.vue +26 -26
  28. package/src/components/revenue/comprehen/Maintenance/otherRecords/Otherrecordmaintenance.vue +0 -1
  29. package/src/components/revenue/comprehen/Maintenance/otherRecords/specificInformation.vue +21 -1
  30. package/src/components/revenue/comprehen/Maintenance/revenue/MeterOperatemain.vue +392 -392
  31. package/src/components/revenue/comprehen/Message/AllUserNew.vue +17 -1
  32. package/src/components/revenue/comprehen/StairPrice/GasPrice.vue +514 -514
  33. package/src/components/revenue/comprehen/common/ImportExcel.vue +20 -22
  34. package/src/components/revenue/comprehen/replacement/replacementHandInfoRecord.vue +155 -155
  35. package/src/components/revenue/comprehen/wechatpay/WeChat.vue +62 -62
  36. package/src/components/revenue/concentrator/archivesuserfilesmanage.vue +113 -116
  37. package/src/components/revenue/concentrator/ncArchivesList.vue +33 -33
  38. package/src/components/revenue/concentrator/ncUserfilesList.vue +218 -188
  39. package/src/components/revenue/concentrator/ncUserfilesList2.vue +240 -196
  40. package/src/components/revenue/concentrator/ncarchivesmanage.vue +48 -49
  41. package/src/components/revenue/machineHandManage/machineHand.vue +12 -0
  42. package/src/components/revenue/machineHandManage/machineHandManager.vue +78 -78
  43. package/src/components/webMeter/MeterManage/WebMeterBatchOperate.vue +1 -1
  44. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +5 -5
  45. package/src/components/webMeter/WebBalanceQuery.vue +6 -6
  46. package/src/components/webMeter/approvalHandleList.vue +6 -6
  47. package/src/components/webMeter/common/MeterMsg.vue +2 -2
  48. package/src/components/webMeter/common/NewWatchMsg.vue +3 -3
  49. package/src/components/webMeter/common/SignParameter.vue +1 -1
  50. package/src/components/webMeter/webInfo/WebMeterList.vue +1 -1
  51. package/src/components/webMeter/webInfo/qinhua/WebMeterList.vue +1 -1
  52. package/src/filiale/WEINAN/UserBaseInfoNew.vue +1 -1
  53. package/src/filiale/alashan/PrintBill.vue +116 -116
  54. package/src/filiale/gongyi/common/userinfo_detail/UserBaseInfo.vue +1 -1
  55. package/src/filiale/gongyi/common/userinfo_detail/UserBaseInfoNew.vue +1 -1
  56. package/src/filiale/macheng/FilesManageNew/UserEssentialInfoTest.vue +373 -373
  57. package/src/filiale/macheng/UserBaseInfoNew.vue +1 -1
  58. package/src/filiale/macheng/UserDeviceInfoTest.vue +412 -412
  59. package/src/filiale/meihekou/HandManager.vue +25 -5
  60. package/src/filiale/meihekou/MessageList.vue +631 -0
  61. package/src/filiale/meihekou/PrintBill.vue +140 -140
  62. package/src/filiale/meihekou/ReissueBill.vue +322 -322
  63. package/src/filiale/meihekou/sale.js +2 -0
  64. package/src/filiale/qianneng/GasPriceList.vue +330 -330
  65. package/src/filiale/qianneng/OtherChargeNew.vue +13 -63
  66. package/src/filiale/qianneng/eticket/EticketModal.vue +90 -0
  67. package/src/filiale/qianneng/eticket/EticketPrint.vue +367 -0
  68. package/src/filiale/qianneng/machine/MachineMeterCenter.vue +4 -58
  69. package/src/filiale/qianneng/revenue/ChargeManage.vue +3 -6
  70. package/src/filiale/qianneng/sale.js +6 -1
  71. package/src/filiale/qingtongxia/CardMeterCenter.vue +743 -743
  72. package/src/filiale/qingtongxia/UserGeneralInfoTest.vue +538 -538
  73. package/src/filiale/rongcheng/FilesManageNew/UserGeneralInfoTest.vue +608 -608
  74. package/src/filiale/rongchuang/OtherGas.vue +329 -329
  75. package/src/filiale/shanggao/HighMeterIdCard.vue +1061 -0
  76. package/src/filiale/shanggao/sale.js +1 -0
  77. package/src/filiale/tongchuan/CardList.vue +482 -482
  78. package/src/filiale/tongchuan/UserBaseInfoNew.vue +1 -1
  79. package/src/filiale/xinkang/base/leftview/Userinfo.vue +176 -176
  80. package/src/filiale/xinkang/sale.js +8 -8
  81. package/src/main.js +18 -23
  82. package/src/sale.js +1062 -1058
  83. package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
  84. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  85. package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
package/.babelrc CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "presets": ["es2015", "stage-2"],
3
- "plugins": ["transform-runtime"],
4
- "comments": false
5
- }
1
+ {
2
+ "presets": ["es2015", "stage-2"],
3
+ "plugins": ["transform-runtime"],
4
+ "comments": false
5
+ }
@@ -10,7 +10,7 @@ var compiler = webpack(config)
10
10
 
11
11
  // Define HTTP proxies to your custom API backend
12
12
  // https://github.com/chimurai/http-proxy-middleware
13
- var bendi = 'http://192.168.50.4:8400',bendi1 = 'http://121.36.106.17:8400/'
13
+ var bendi = 'http://127.0.0.1:8080',bendi1 = 'http://121.36.106.17:8400/'
14
14
  // 公司测试服务
15
15
  var fuwu = 'http://192.168.50.4:8400'
16
16
  // var fuwu = 'http://121.36.106.17:8400/'
@@ -100,7 +100,7 @@ var proxyTable = {
100
100
  '/rs': {
101
101
  // target: 'http://192.168.30.63:8081/'
102
102
  // target: 'http://121.36.106.17:8400/'
103
- target: bendi
103
+ target: fuwu
104
104
  }
105
105
  }
106
106
 
@@ -1,6 +1,5 @@
1
1
  var path = require('path')
2
2
  var cssLoaders = require('./css-loaders')
3
- var projectRoot = path.resolve(__dirname, '../')
4
3
 
5
4
  module.exports = {
6
5
  entry: {
@@ -1,42 +1,59 @@
1
- var fs = require('fs')
2
- var webpack = require('webpack')
3
- var merge = require('webpack-merge')
4
- var baseConfig = require('./webpack.base.conf')
5
- var cssLoaders = require('./css-loaders')
6
- var ExtractTextPlugin = require('extract-text-webpack-plugin')
7
- var HtmlWebpackPlugin = require('html-webpack-plugin')
1
+ const webpack = require('webpack')
2
+ const merge = require('webpack-merge')
3
+ const baseConfig = require('./webpack.base.conf')
4
+ const cssLoaders = require('./css-loaders')
5
+ const ExtractTextPlugin = require('extract-text-webpack-plugin')
6
+ // const HtmlWebpackPlugin = require('html-webpack-plugin')
7
+ const FileManagerPlugin = require('filemanager-webpack-plugin')
8
+ const ParallelUglifyPlugin = require('webpack-parallel-uglify-plugin')
9
+ const path = require('path')
10
+
11
+ // 将日期时间进行格式化
12
+ function formatDate (date, format) {
13
+ // name="date" type="Date" 要格式化的日期时间
14
+ // name="format" type="String" 格式类型,形如 yyyy-MM-dd hh:mm:ss
15
+ var o = {
16
+ 'M+': date.getMonth() + 1,
17
+ // 月份
18
+ 'd+': date.getDate(),
19
+ // 日
20
+ 'h+': date.getHours(),
21
+ // 小时
22
+ 'm+': date.getMinutes(),
23
+ // 分
24
+ 's+': date.getSeconds() // 秒
25
+ }
26
+ if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
27
+ for (var k in o) if (new RegExp('(' + k + ')').test(format)) format = format.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
28
+ return format
29
+ }
30
+ const timeStamp = formatDate(new Date(), 'yyyy-MM-dd-hh-mm-ss')
31
+ console.log('开始打包:', timeStamp)
8
32
 
9
33
  // whether to generate source map for production files.
10
34
  // disabling this can speed up the build.
11
- var SOURCE_MAP = false
12
-
13
- // 把examples下所有的index.html转换成测试例子.html
14
- fs.readdirSync('./examples').forEach((file) => {
15
- baseConfig.plugins.push(
16
- new HtmlWebpackPlugin({
17
- filename: file + '.html',
18
- template: `examples/${file}/index.html`,
19
- inject: false
20
- })
21
- )
22
- })
23
- // 把examples下子目录的main.js打包成对应组件名的App.js
24
- baseConfig.entry = {}
25
- fs.readdirSync('./examples').forEach((file) => {
26
- baseConfig.entry[file + 'App'] = `./examples/${file}/main.js`
27
- })
35
+ const SOURCE_MAP = false
28
36
 
29
37
  module.exports = merge(baseConfig, {
38
+ externals: {
39
+ 'vue-client': 'vue-client',
40
+ 'system-clients': 'system-clients',
41
+ 'vue': 'vue'
42
+ },
30
43
  stats: {
31
44
  children: false
32
45
  },
33
46
  devtool: SOURCE_MAP ? '#source-map' : false,
47
+ entry: {
48
+ app: './src/sale.js'
49
+ },
34
50
  output: {
35
51
  // naming output files with hashes for better caching.
36
52
  // dist/index.html will be auto-generated with correct URLs.
37
- publicPath: './',
38
- filename: '[name].js',
39
- chunkFilename: '[id].js'
53
+ publicPath: 'library/sale/lib/',
54
+ path: path.resolve(__dirname, '../lib/lib'),
55
+ filename: 'lib.js',
56
+ libraryTarget: 'umd' // 不管在commonJS环境还是在AMD环境,能让任何形式引入都可以引入
40
57
  },
41
58
  vue: {
42
59
  loaders: cssLoaders({
@@ -51,27 +68,58 @@ module.exports = merge(baseConfig, {
51
68
  NODE_ENV: '"production"'
52
69
  }
53
70
  }),
54
- new webpack.optimize.UglifyJsPlugin({
55
- compress: {
56
- warnings: false
71
+ new ParallelUglifyPlugin({
72
+ // 用作缓存的可选绝对路径。如果未提供,则不使用缓存。
73
+ cacheDir: '.cache/',
74
+ uglifyJS: {
75
+ output: {
76
+ // 是否保留代码中的注释,默认为保留
77
+ comments: false
78
+ },
79
+ // 是否在UglifyJS删除没有用到的代码时输出警告信息,默认为false
80
+ warnings: false,
81
+ compress: {
82
+ // 是否删除代码中所有的console语句,默认为false
83
+ drop_console: true,
84
+ // 是否内嵌虽然已经定义了,但是只用到一次的变量, 默认值false
85
+ collapse_vars: true,
86
+ // 是否提取出现了多次但是没有定义成变量去引用的静态值,默认为false
87
+ reduce_vars: true
88
+ }
57
89
  }
58
90
  }),
91
+ // new webpack.optimize.UglifyJsPlugin({
92
+ // compress: {
93
+ // warnings: false
94
+ // }
95
+ // }),
59
96
  new webpack.optimize.OccurenceOrderPlugin(),
60
97
  // extract css into its own file
61
98
  new ExtractTextPlugin('[name].css'),
62
99
  // generate dist index.html with correct asset hash for caching.
63
100
  // you can customize output by editing /index.html
64
101
  // see https://github.com/ampedandwired/html-webpack-plugin
65
- new HtmlWebpackPlugin({
66
- filename: '../index.html',
67
- template: 'index.html',
68
- inject: true,
69
- minify: {
70
- removeComments: true,
71
- collapseWhitespace: true,
72
- removeAttributeQuotes: true
73
- // more options:
74
- // https://github.com/kangax/html-minifier#options-quick-reference
102
+ // new HtmlWebpackPlugin({
103
+ // filename: '../index.html',
104
+ // template: 'index.html',
105
+ // inject: true,
106
+ // minify: {
107
+ // removeComments: true,
108
+ // collapseWhitespace: true,
109
+ // removeAttributeQuotes: true
110
+ // // more options:
111
+ // // https://github.com/kangax/html-minifier#options-quick-reference
112
+ // }
113
+ // }),
114
+ // 打包文件压缩
115
+ new FileManagerPlugin({
116
+ onEnd: {
117
+ copy: [
118
+ {source: './package.json', destination: './lib/package_' + timeStamp + '.json'}
119
+ ],
120
+ archive: [
121
+ { source: './lib', destination: './sale_lib' + timeStamp + '.zip' }
122
+ ]
75
123
  }
76
124
  })
77
125
  ]
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.4.196",
3
+ "version": "3.4.197",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "dev": "node build/dev-server.js",
9
9
  "lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
10
10
  "unit": "karma start test/unit/karma.conf.js",
11
- "build": "rimraf dist && mkdirp dist && ncp static dist/mergeUser && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
11
+ "build": "rimraf lib && mkdirp lib && cross-env webpack --progress --hide-modules --config build/webpack.prod.conf.js",
12
12
  "e2e": "node test/e2e/runner.js",
13
13
  "release": "bash build/release.sh"
14
14
  },
@@ -34,8 +34,8 @@
34
34
  "babel-preset-stage-2": "^6.0.0",
35
35
  "chai": "^3.5.0",
36
36
  "co": "^4.6.0",
37
- "connect-history-api-fallback": "^1.1.0",
38
37
  "compression-webpack-plugin": "1.1.2",
38
+ "connect-history-api-fallback": "^1.1.0",
39
39
  "cross-env": "^1.0.7",
40
40
  "cross-spawn": "^2.1.5",
41
41
  "css-loader": "^0.23.0",
@@ -53,6 +53,7 @@
53
53
  "express": "^4.13.3",
54
54
  "extract-text-webpack-plugin": "^1.0.1",
55
55
  "file-loader": "^0.8.4",
56
+ "filemanager-webpack-plugin": "^2.0.5",
56
57
  "function-bind": "^1.0.2",
57
58
  "html-webpack-plugin": "^2.8.1",
58
59
  "http-proxy-middleware": "^0.11.0",
@@ -101,6 +102,7 @@
101
102
  "webpack-dev-middleware": "^1.4.0",
102
103
  "webpack-hot-middleware": "^2.6.0",
103
104
  "webpack-merge": "^0.8.3",
105
+ "webpack-parallel-uglify-plugin": "^1.0.0",
104
106
  "weixin-js-sdk": "^1.2.0"
105
107
  },
106
108
  "keywords": [
@@ -106,6 +106,13 @@
106
106
  <v-select :value.sync="row.f_open_way" :options='openWay' value-single placeholder='开户方式' close-on-select v-else
107
107
  search v-model='row.f_open_way' :disabled="false"></v-select>
108
108
  </div>
109
+ <div class="col-sm-4 form-group" v-show="row.gasbrand.length > 0 && row.gasbrand[0].f_meter_brand.indexOf('集中器') !== -1">
110
+ <label class="font_normal_body" title="集中器">集&ensp;中&ensp;器</label>
111
+ <v-select :value.sync="row.f_concentrator_id" :options='concentrators' value-single placeholder='集中器' close-on-select v-if="row.f_userfiles_id"
112
+ search v-model='row.f_concentrator_id' :disabled="true"></v-select>
113
+ <v-select :value.sync="row.f_concentrator_id" :options='concentrators' value-single placeholder='集中器' close-on-select v-else
114
+ search v-model='row.f_concentrator_id' :disabled="false"></v-select>
115
+ </div>
109
116
  </div>
110
117
  <div>
111
118
  <a style="font-size: 16px;font-weight: 500;">气价信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
@@ -548,6 +555,7 @@
548
555
  pricetypes: this.$appdata.getParam('气价类型'),
549
556
  industrycomments: this.$appdata.getParam('工业备注'),
550
557
  openWay: [{label: '指令开户', value: '指令开户'}, {label: '发卡开户', value: '发卡开户'}],
558
+ concentrators: [],
551
559
  meterbookoptions: [], // 抄表册选项
552
560
  opteratormetrbook: false, // 抄表册操作
553
561
  oldrow: [],
@@ -558,7 +566,7 @@
558
566
  }
559
567
  },
560
568
  props: ['f_filialeid', 'meter', 'isdecimal', 'valid', 'f_userinfo_id','overdueset'],
561
- ready () {
569
+ async ready () {
562
570
  console.log('看看meter里面的数据', this.meter, this.row)
563
571
  this.row = Object.assign(this.row, this.meter, {})
564
572
  if(this.row.f_meter_classify){
@@ -574,9 +582,24 @@
574
582
  if (this.row.pricetype === '混合气价') {
575
583
  this.ratioshow = true
576
584
  }
585
+ await this.getConcentrators()
577
586
  co(meterBookGen(this))
578
587
  },
579
588
  methods: {
589
+ // 获取集中器下拉框
590
+ async getConcentrators () {
591
+ let condition = {
592
+ items: 'id,f_mpc_alias',
593
+ tablename: 't_concentrator',
594
+ condition: `f_mpc_state !='删除'`,
595
+ orderitem: 'id'
596
+ }
597
+ let data = await this.$resetpost('rs/sql/saleSingleTable', {data: condition}, {resolveMsg: null, rejectMsg: '获取集中器失败!'})
598
+ this.concentrators = []
599
+ for (let row of data.data) {
600
+ this.concentrators.push({label: row.f_mpc_alias, value: row.id})
601
+ }
602
+ },
580
603
  async confirmUserfiles () {
581
604
  if (this.$refs.addparamlist.confirm()) {
582
605
  var paramlist = this.$refs.addparamlist.addGasParameter
@@ -1,167 +1,167 @@
1
- <template>
2
- <div style="flex: 1.5" class="datapanel">
3
- <div class="flex" >
4
- <criteria-paged :model="model" v-ref:paged>
5
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
6
- <div novalidate class="form-inline auto" partial>
7
- <div class="row">
8
- <div class="form-group">
9
- <div class="col-sm-2 form-group">
10
- <label for="startDate">开始日期:</label>
11
- <datepicker id="startDate" placeholder="开始日期"
12
- v-model="model.startDate"
13
- :value.sync="model.startDate"
14
- :disabled-days-of-Week="[]"
15
- :format="'yyyy-MM-dd'"
16
- condition=""
17
- :show-reset-button="reset">
18
- </datepicker>
19
- </div>
20
- <div class="col-sm-2 form-group">
21
- <label for="endDate">结束日期:</label>
22
- <datepicker id="endDate" placeholder="结束日期"
23
- v-model="model.endDate"
24
- :value.sync="model.endDate"
25
- :disabled-days-of-Week="[]"
26
- :format="'yyyy-MM-dd'"
27
- :show-reset-button="reset">
28
- </datepicker>
29
- </div>
30
- <div class="span" style="float:right;">
31
- <button class="button_search" @click="$parent.$parent.selfSearch()">查询</button>
32
- <button class="button_search" style="transform: translate(0px, 2px);" @click=" $parent.$parent.splitInfo= true">模板上传</button>
33
- </div>
34
- </div>
35
- </div>
36
- </div>
37
- </criteria>
38
- <accordion :one-at-atime="true" type="info" partial="list">
39
- <div class="col-sm-12">
40
- <div class="col-sm-2" v-for="row in model.rows">
41
- <div class="row" style="padding-bottom: 8px">
42
- <img src="../../assets/template.png" style="height: 200px;width: 150px">
43
- <div class="title">
44
- <label>模板名称:{{row.f_filename.split("_")[0]}}</label>
45
- </div>
46
- <div class="buttion" style="display: flex-row">
47
- <button class=" button_search" style="transform: translate(0px, 2px);" @click=" $parent.$parent.getFiles(row)">下载模板</button>
48
- <button class="button_delete" title="权限名称:删除模板" style="transform: translate(0px, 2px);" @click=" $parent.$parent.deleteFiles(row)">删除模板</button>
49
- </div>
50
- </div>
51
- </div>
52
-
53
- </div>
54
- </accordion>
55
- </criteria-paged>
56
- <modal :show.sync="splitInfo" width="480px"
57
- title="请输入模板类型并选择上传的文件" v-ref:modal large backdrop="false">
58
- <article slot="modal-body" class="modal-body">
59
- <div class="col-sm-12" style="display: flex;margin-bottom: 1em">
60
- <label style="width: 20%">模板名称</label>
61
- <input type="text" class="form-control _zoom6" v-model="headers.fusetype"
62
- placeholder='模板名称'>
63
- </div>
64
- <file-upload class="my-file-uploader" name="my-file"
65
- accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
66
- action="rs/file/uploadFile" :headers="headers" tagname="确定" v-ref:file>
67
- </file-upload>
68
- </article>
69
- <footer slot="modal-footer" style="display: none">
70
- </footer>
71
- </modal>
72
- <work-busy :is-busy="iswork"></work-busy>
73
- </div>
74
- </div>
75
- </template>
76
-
77
- <script>
78
- import {PagedList} from 'vue-client'
79
- import axios from 'axios'
80
- import fileDownload from 'js-file-download'
81
- export default {
82
- title: '模板管理',
83
- data () {
84
- return {
85
- model: new PagedList('rs/sql/singleTable_OrderBy', 8, {
86
- items: '"*"',
87
- tablename: '"t_files"',
88
- orderitem: '"id"'
89
- }),
90
- iswork: false,
91
- headers: {'username': this.$login.f.name, 'blodid': '模板管理', 'fusetype': ''},
92
- splitInfo: false
93
- }
94
- },
95
- ready () {
96
- },
97
- events: {
98
- 'onFileError' (file, error) {
99
- this.iswork = false
100
- this.$showAlert('文件上传失败请检查格式' + JSON.stringify(error), 'warning', 3000)
101
- },
102
- 'beforeFileUpload' () {
103
- this.iswork = true
104
- },
105
- 'closeFileUpload' () {
106
- this.iswork = false
107
- },
108
- onFileChange: function (file) {
109
- console.log('onFileChange', file)
110
- },
111
- onFileUpload: function (file, res) {
112
- console.log('上传完毕' + JSON.stringify(res))
113
- this.headers.f_usetype = ''
114
- this.iswork = false
115
- this.splitInfo = false
116
- console.log(res)
117
- this.$showMessage('成功上传')
118
- setTimeout(() => {
119
- this.selfSearch()
120
- }, 1000)
121
- }
122
- },
123
- methods: {
124
- // 下载文件
125
- getFiles (row) {
126
- let data = {filepath: row.f_downloadpath}
127
- let name = `${row.f_filename.split('_')[0]}.xlsx`
128
- axios.post('rs/file/getUploadFile', data, {responseType: 'arraybuffer'}).then(res => {
129
- fileDownload(res.data, name)
130
- this.iswork = false
131
- })
132
- },
133
- // 删除部分需要调整,这块是删除文件,还需要在t_files中删除记录。目前未完成
134
- deleteFiles (row) {
135
- if(this.$login.r.includes('删除模板')){
136
- row.path = row.f_downloadpath
137
- row.blobid = row.f_blobid
138
- this.$resetpost('rs/logic/deletefiles', row).then((res) => {
139
- setTimeout(() => {
140
- this.selfSearch()
141
- }, 1000)
142
- })
143
- }else{
144
- this.$showMessage('当前登录用户没有删除模板权限, 请联系管理员!')
145
- }
146
- },
147
- // 查询条件这块后面根据需求调整
148
- selfSearch () {
149
- this.model.search("f_blobid= '模板管理'")
150
- }
151
- }
152
- }
153
- </script>
154
- <style scoped>
155
- .title-td{
156
- font-weight: bold;
157
- }
158
- .content-td{
159
- padding-left: 2em;
160
- }
161
- .datapanel {
162
- color: #333;
163
- background-color: white;
164
- padding: 10px 20px;
165
- border-radius: 15px;
166
- }
167
- </style>
1
+ <template>
2
+ <div style="flex: 1.5" class="datapanel">
3
+ <div class="flex" >
4
+ <criteria-paged :model="model" v-ref:paged>
5
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
6
+ <div novalidate class="form-inline auto" partial>
7
+ <div class="row">
8
+ <div class="form-group">
9
+ <div class="col-sm-2 form-group">
10
+ <label for="startDate">开始日期:</label>
11
+ <datepicker id="startDate" placeholder="开始日期"
12
+ v-model="model.startDate"
13
+ :value.sync="model.startDate"
14
+ :disabled-days-of-Week="[]"
15
+ :format="'yyyy-MM-dd'"
16
+ condition=""
17
+ :show-reset-button="reset">
18
+ </datepicker>
19
+ </div>
20
+ <div class="col-sm-2 form-group">
21
+ <label for="endDate">结束日期:</label>
22
+ <datepicker id="endDate" placeholder="结束日期"
23
+ v-model="model.endDate"
24
+ :value.sync="model.endDate"
25
+ :disabled-days-of-Week="[]"
26
+ :format="'yyyy-MM-dd'"
27
+ :show-reset-button="reset">
28
+ </datepicker>
29
+ </div>
30
+ <div class="span" style="float:right;">
31
+ <button class="button_search" @click="$parent.$parent.selfSearch()">查询</button>
32
+ <button class="button_search" style="transform: translate(0px, 2px);" @click=" $parent.$parent.splitInfo= true">模板上传</button>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </div>
37
+ </criteria>
38
+ <accordion :one-at-atime="true" type="info" partial="list">
39
+ <div class="col-sm-12">
40
+ <div class="col-sm-2" v-for="row in model.rows">
41
+ <div class="row" style="padding-bottom: 8px">
42
+ <img src="../../assets/template.png" style="height: 200px;width: 150px">
43
+ <div class="title">
44
+ <label>模板名称:{{row.f_filename.split("_")[0]}}</label>
45
+ </div>
46
+ <div class="buttion" style="display: flex-row">
47
+ <button class=" button_search" style="transform: translate(0px, 2px);" @click=" $parent.$parent.getFiles(row)">下载模板</button>
48
+ <button class="button_delete" title="权限名称:删除模板" style="transform: translate(0px, 2px);" @click=" $parent.$parent.deleteFiles(row)">删除模板</button>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ </div>
54
+ </accordion>
55
+ </criteria-paged>
56
+ <modal :show.sync="splitInfo" width="480px"
57
+ title="请输入模板类型并选择上传的文件" v-ref:modal large backdrop="false">
58
+ <article slot="modal-body" class="modal-body">
59
+ <div class="col-sm-12" style="display: flex;margin-bottom: 1em">
60
+ <label style="width: 20%">模板名称</label>
61
+ <input type="text" class="form-control _zoom6" v-model="headers.fusetype"
62
+ placeholder='模板名称'>
63
+ </div>
64
+ <file-upload class="my-file-uploader" name="my-file"
65
+ accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
66
+ action="rs/file/uploadFile" :headers="headers" tagname="确定" v-ref:file>
67
+ </file-upload>
68
+ </article>
69
+ <footer slot="modal-footer" style="display: none">
70
+ </footer>
71
+ </modal>
72
+ <work-busy :is-busy="iswork"></work-busy>
73
+ </div>
74
+ </div>
75
+ </template>
76
+
77
+ <script>
78
+ import {PagedList} from 'vue-client'
79
+ import axios from 'axios'
80
+ import fileDownload from 'js-file-download'
81
+ export default {
82
+ title: '模板管理',
83
+ data () {
84
+ return {
85
+ model: new PagedList('rs/sql/singleTable_OrderBy', 8, {
86
+ items: '"*"',
87
+ tablename: '"t_files"',
88
+ orderitem: '"id"'
89
+ }),
90
+ iswork: false,
91
+ headers: {'username': this.$login.f.name, 'blodid': '模板管理', 'fusetype': ''},
92
+ splitInfo: false
93
+ }
94
+ },
95
+ ready () {
96
+ },
97
+ events: {
98
+ 'onFileError' (file, error) {
99
+ this.iswork = false
100
+ this.$showAlert('文件上传失败请检查格式' + JSON.stringify(error), 'warning', 3000)
101
+ },
102
+ 'beforeFileUpload' () {
103
+ this.iswork = true
104
+ },
105
+ 'closeFileUpload' () {
106
+ this.iswork = false
107
+ },
108
+ onFileChange: function (file) {
109
+ console.log('onFileChange', file)
110
+ },
111
+ onFileUpload: function (file, res) {
112
+ console.log('上传完毕' + JSON.stringify(res))
113
+ this.headers.f_usetype = ''
114
+ this.iswork = false
115
+ this.splitInfo = false
116
+ console.log(res)
117
+ this.$showMessage('成功上传')
118
+ setTimeout(() => {
119
+ this.selfSearch()
120
+ }, 1000)
121
+ }
122
+ },
123
+ methods: {
124
+ // 下载文件
125
+ getFiles (row) {
126
+ let data = {filepath: row.f_downloadpath}
127
+ let name = `${row.f_filename.split('_')[0]}.xlsx`
128
+ axios.post('rs/file/getUploadFile', data, {responseType: 'arraybuffer'}).then(res => {
129
+ fileDownload(res.data, name)
130
+ this.iswork = false
131
+ })
132
+ },
133
+ // 删除部分需要调整,这块是删除文件,还需要在t_files中删除记录。目前未完成
134
+ deleteFiles (row) {
135
+ if(this.$login.r.includes('删除模板')){
136
+ row.path = row.f_downloadpath
137
+ row.blobid = row.f_blobid
138
+ this.$resetpost('rs/logic/deletefiles', row).then((res) => {
139
+ setTimeout(() => {
140
+ this.selfSearch()
141
+ }, 1000)
142
+ })
143
+ }else{
144
+ this.$showMessage('当前登录用户没有删除模板权限, 请联系管理员!')
145
+ }
146
+ },
147
+ // 查询条件这块后面根据需求调整
148
+ selfSearch () {
149
+ this.model.search("f_blobid= '模板管理'")
150
+ }
151
+ }
152
+ }
153
+ </script>
154
+ <style scoped>
155
+ .title-td{
156
+ font-weight: bold;
157
+ }
158
+ .content-td{
159
+ padding-left: 2em;
160
+ }
161
+ .datapanel {
162
+ color: #333;
163
+ background-color: white;
164
+ padding: 10px 20px;
165
+ border-radius: 15px;
166
+ }
167
+ </style>