sale-client 3.5.210 → 3.5.212

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 (29) hide show
  1. package/.babelrc +2 -1
  2. package/build/webpack.base.conf.js +65 -35
  3. package/build/webpack.dev.conf.js +4 -3
  4. package/build/webpack.prod.conf.js +46 -93
  5. package/package.json +4 -3
  6. package/src/components/common/userinfo_detail/ic_detail/PriceAdjustmentQueryUser.vue +10 -2
  7. package/src/components/revenue/base/leftview/CheckGas.vue +1 -1
  8. package/src/filiale/fugu/components/{BlackList.vue → BlackList/BlackList.vue} +1 -13
  9. package/src/filiale/fugu/components/BlackList/BlackListBatch.vue +221 -0
  10. package/src/filiale/fugu/components/BlackList/BlackListDetail.vue +71 -0
  11. package/src/filiale/fugu/components/{BlackListList.vue → BlackList/BlackListList.vue} +107 -30
  12. package/src/filiale/fugu/components/BlackList/BlackListManage.vue +138 -0
  13. package/src/filiale/fugu/components/BlackList/BlackListRecord.vue +62 -0
  14. package/src/filiale/fugu/components/FilesManage/UserGeneralInfoTest.vue +699 -0
  15. package/src/filiale/fugu/components/plugins/FileManageService.js +395 -0
  16. package/src/filiale/fugu/sale.js +6 -2
  17. package/src/filiale/macheng/CardMeterCenter.vue +939 -0
  18. package/src/filiale/macheng/sale.js +2 -1
  19. package/src/filiale/rizhao/UserPriceChangeManage.vue +662 -0
  20. package/src/filiale/rizhao/meterinfodetail.vue +247 -0
  21. package/src/filiale/rizhao/sale.js +5 -1
  22. package/src/filiale/tongchuan/ChargeList.vue +1 -0
  23. package/src/filiale/xiangyun/cardChargeQuery.vue +2 -0
  24. package/src/filiale/xiangyun/cardChargeQuery1.vue +2 -0
  25. package/src/filiale/xiangyun/machineChargeQuery.vue +4 -2
  26. package/src/filiale/xiangyun/machineChargeQuery1.vue +3 -1
  27. package/src/filiale/xiangyun/sale.js +20 -20
  28. package/src/main.js +22 -22
  29. package/src/sale.js +1151 -1151
package/.babelrc CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "presets": ["es2015", "stage-2"],
3
3
  "plugins": ["transform-runtime"],
4
- "comments": false
4
+ "comments": false,
5
+ "ignore": ["jsoneditor.min.js"]
5
6
  }
@@ -1,35 +1,59 @@
1
1
  var path = require('path')
2
- var cssLoaders = require('./css-loaders')
2
+ const ExtractTextPlugin = require('extract-text-webpack-plugin')
3
3
 
4
4
  module.exports = {
5
5
  entry: {
6
6
  app: './src/main.js'
7
7
  },
8
8
  output: {
9
- path: path.resolve(__dirname, '../dist/mergeUser'),
10
- publicPath: 'mergeUser/',
9
+ path: path.resolve(__dirname, '../dist/static'),
10
+ publicPath: 'static/',
11
11
  filename: '[name].js'
12
12
  },
13
13
  resolve: {
14
- extensions: ['', '.js', '.vue'],
15
- fallback: [path.join(__dirname, '../node_modules')],
16
- alias: {
17
- 'src': path.resolve(__dirname, '../src'),
18
- 'test': path.resolve(__dirname, '../test')
19
- }
14
+ extensions: ['.js', '.vue'],
15
+ modules: [
16
+ path.resolve(__dirname, 'src'),
17
+ 'node_modules'
18
+ ]
20
19
  },
21
20
  resolveLoader: {
22
- fallback: [path.join(__dirname, '../node_modules')]
21
+ modules: [
22
+ path.join(__dirname, 'loaders'),
23
+ 'node_modules'
24
+ ]
23
25
  },
24
26
  module: {
25
27
  loaders: [
26
28
  {
27
29
  test: /\.vue$/,
28
- loader: 'vue'
30
+ loader: 'vue-loader',
31
+ options: {
32
+ loaders: {
33
+ // 将所有的样式提取到一个文件中,而不是将其注入到JavaScript文件中
34
+ // 注意,这里提取样式的loader也需要使用ExtractTextPlugin.loader
35
+ css: ExtractTextPlugin.extract({
36
+ use: 'css-loader',
37
+ fallback: 'vue-style-loader'
38
+ }),
39
+ less: ExtractTextPlugin.extract({
40
+ use: ['css-loader', 'less-loader'],
41
+ fallback: 'vue-style-loader'
42
+ }),
43
+ stylus: ExtractTextPlugin.extract({
44
+ use: ['css-loader', 'stylus-loader'],
45
+ fallback: 'vue-style-loader'
46
+ }),
47
+ sass: ExtractTextPlugin.extract({
48
+ use: ['css-loader', 'sass-loader'],
49
+ fallback: 'vue-style-loader'
50
+ })
51
+ }
52
+ }
29
53
  },
30
54
  {
31
55
  test: /\.js$/,
32
- loader: 'babel',
56
+ loader: 'babel-loader',
33
57
  include: [
34
58
  /src/,
35
59
  /build/,
@@ -41,45 +65,51 @@ module.exports = {
41
65
  /node_modules\/system-clients\/src/,
42
66
  /node_modules\/ldap-clients\/src/,
43
67
  /node_modules\/address-client\/src/
44
- ],
45
- options: {
46
- presets: ['es2015']
47
- }
68
+ ]
48
69
  },
49
70
  {
50
- test: /\.json$/,
51
- loader: 'json'
71
+ test: /\.html$/,
72
+ loader: 'vue-html-loader'
52
73
  },
53
74
  {
54
- test: /\.html$/,
55
- loader: 'vue-html'
75
+ test: /\.css$/,
76
+ loader: ExtractTextPlugin.extract({
77
+ use: 'css-loader',
78
+ fallback: 'vue-style-loader'
79
+ })
56
80
  },
57
81
  {
58
82
  test: /\.less$/,
59
- loader: 'style!css!less'
83
+ loader: ExtractTextPlugin.extract({
84
+ use: ['css-loader', 'less-loader'],
85
+ fallback: 'vue-style-loader'
86
+ })
60
87
  },
61
88
  {
62
- test: /\.css$/,
63
- loader: 'style!css'
89
+ test: /\.stylus$/,
90
+ loader: ExtractTextPlugin.extract({
91
+ use: ['css-loader', 'stylus-loader'],
92
+ fallback: 'vue-style-loader'
93
+ })
94
+ },
95
+ {
96
+ test: /\.sass$/,
97
+ loader: ExtractTextPlugin.extract({
98
+ use: ['css-loader', 'sass-loader'],
99
+ fallback: 'vue-style-loader'
100
+ })
64
101
  },
65
102
  {
66
103
  test: /\.(png|jpg|gif|svg|woff2?|eot|ttf)(\?.*)?$/,
67
- loader: 'url',
104
+ loader: 'url-loader',
68
105
  query: {
69
106
  limit: 10000,
70
- name: '[name].[ext]?[hash:7]'
107
+ name: 'static/[name].[ext]?[hash:7]'
71
108
  }
72
109
  }
73
110
  ]
74
111
  },
75
- vue: {
76
- loaders: cssLoaders({
77
- sourceMap: false,
78
- extract: false
79
- })
80
- },
81
- plugins: [],
82
- eslint: {
83
- formatter: require('eslint-friendly-formatter')
84
- }
112
+ plugins: [
113
+ ]
85
114
  }
115
+
@@ -2,6 +2,7 @@ var webpack = require('webpack')
2
2
  var merge = require('webpack-merge')
3
3
  var baseConfig = require('./webpack.base.conf')
4
4
  var HtmlWebpackPlugin = require('html-webpack-plugin')
5
+ const ExtractTextPlugin = require("extract-text-webpack-plugin");
5
6
 
6
7
  // add hot-reload related code to entry chunks
7
8
  Object.keys(baseConfig.entry).forEach(function (name) {
@@ -17,15 +18,15 @@ module.exports = merge(baseConfig, {
17
18
  publicPath: '/'
18
19
  },
19
20
  plugins: [
20
- // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
21
- new webpack.optimize.OccurenceOrderPlugin(),
22
21
  new webpack.HotModuleReplacementPlugin(),
23
22
  new webpack.NoErrorsPlugin(),
23
+ new ExtractTextPlugin('[name].css'),
24
24
  // https://github.com/ampedandwired/html-webpack-plugin
25
25
  new HtmlWebpackPlugin({
26
26
  filename: 'index.html',
27
27
  template: 'index.html',
28
- inject: true
28
+ inject: true,
29
+ date: new Date().getTime()
29
30
  })
30
31
  ]
31
32
  })
@@ -1,65 +1,31 @@
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')
1
+ var webpack = require('webpack')
2
+ var merge = require('webpack-merge')
3
+ var baseConfig = require('./webpack.base.conf')
4
+ var ExtractTextPlugin = require('extract-text-webpack-plugin')
5
+ var HtmlWebpackPlugin = require('html-webpack-plugin')
6
+ const TerserPlugin = require('terser-webpack-plugin-legacy')
9
7
  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)
32
-
8
+ // const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
33
9
  // whether to generate source map for production files.
34
10
  // disabling this can speed up the build.
35
- const SOURCE_MAP = false
11
+ var SOURCE_MAP = false
12
+ if (process.env.VUE_APP_PAGE === 'true') {
13
+ console.log('page打包')
14
+ baseConfig.entry.app = './src/iotMain.js'
15
+ }
36
16
 
37
17
  module.exports = merge(baseConfig, {
38
- externals: {
39
- 'vue-client': 'vue-client',
40
- 'system-clients': 'system-clients',
41
- 'vue': 'vue'
42
- },
43
18
  stats: {
44
19
  children: false
45
20
  },
46
21
  devtool: SOURCE_MAP ? '#source-map' : false,
47
- entry: {
48
- app: './src/sale.js'
49
- },
50
22
  output: {
23
+ path: path.resolve(__dirname, '../dist'),
24
+ publicPath: './',
51
25
  // naming output files with hashes for better caching.
52
26
  // dist/index.html will be auto-generated with correct URLs.
53
- publicPath: 'library/sale/lib/',
54
- path: path.resolve(__dirname, '../lib/lib'),
55
- filename: 'lib.js',
56
- libraryTarget: 'umd' // 不管在commonJS环境还是在AMD环境,能让任何形式引入都可以引入
57
- },
58
- vue: {
59
- loaders: cssLoaders({
60
- sourceMap: SOURCE_MAP,
61
- extract: true
62
- })
27
+ filename: 'static/[name][chunkhash].js',
28
+ chunkFilename: 'static/[id].[chunkhash].js'
63
29
  },
64
30
  plugins: [
65
31
  // http://vuejs.github.io/vue-loader/workflow/production.html
@@ -68,59 +34,46 @@ module.exports = merge(baseConfig, {
68
34
  NODE_ENV: '"production"'
69
35
  }
70
36
  }),
71
- new ParallelUglifyPlugin({
72
- // 用作缓存的可选绝对路径。如果未提供,则不使用缓存。
73
- // cacheDir: '.cache/',
74
- uglifyJS: {
75
- output: {
76
- // 是否保留代码中的注释,默认为保留
77
- comments: false
37
+ new webpack.optimize.CommonsChunkPlugin({
38
+ name: 'vendor',
39
+ minChunks: Infinity
40
+ }),
41
+ new webpack.optimize.CommonsChunkPlugin({
42
+ name: 'runtime'
43
+ }),
44
+ // new BundleAnalyzerPlugin(),
45
+ new TerserPlugin({
46
+ parallel: true,
47
+ cache: true,
48
+ terserOptions: {
49
+ parse: {
50
+ ecma: 6
78
51
  },
79
- // 是否在UglifyJS删除没有用到的代码时输出警告信息,默认为false
80
- warnings: false,
81
52
  compress: {
82
- // 是否删除代码中所有的console语句,默认为false
83
- drop_console: true,
84
- // 是否内嵌虽然已经定义了,但是只用到一次的变量, 默认值false
85
- collapse_vars: true,
86
- // 是否提取出现了多次但是没有定义成变量去引用的静态值,默认为false
87
- reduce_vars: true
53
+ ecma: 5,
54
+ warnings: false,
55
+ comparisons: false,
56
+ inline: 2
88
57
  }
89
58
  }
90
59
  }),
91
- // new webpack.optimize.UglifyJsPlugin({
92
- // compress: {
93
- // warnings: false
94
- // }
95
- // }),
96
- new webpack.optimize.OccurenceOrderPlugin(),
97
60
  // extract css into its own file
98
61
  new ExtractTextPlugin('[name].css'),
99
62
  // generate dist index.html with correct asset hash for caching.
100
63
  // you can customize output by editing /index.html
101
64
  // see https://github.com/ampedandwired/html-webpack-plugin
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
- ]
123
- }
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
75
+ },
76
+ date: new Date().getTime()
124
77
  })
125
78
  ]
126
79
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.210",
3
+ "version": "3.5.212",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -52,7 +52,8 @@
52
52
  "eslint-plugin-standard": "^3.0.1",
53
53
  "eventsource-polyfill": "^0.9.6",
54
54
  "express": "^4.13.3",
55
- "extract-text-webpack-plugin": "^1.0.1",
55
+ "extract-text-webpack-plugin": "^3.0.2",
56
+ "terser-webpack-plugin-legacy": "^1.2.5",
56
57
  "file-loader": "^0.8.4",
57
58
  "filemanager-webpack-plugin": "^2.0.5",
58
59
  "function-bind": "^1.0.2",
@@ -99,7 +100,7 @@
99
100
  "vue-strap": "^1.0.9",
100
101
  "vue-style-loader": "^1.0.0",
101
102
  "vue-validator": "2.1.7",
102
- "webpack": "^1.12.2",
103
+ "webpack": "^3.12.0",
103
104
  "webpack-dev-middleware": "^1.4.0",
104
105
  "webpack-hot-middleware": "^2.6.0",
105
106
  "webpack-merge": "^0.8.3",
@@ -92,7 +92,11 @@
92
92
  <th>
93
93
  <nobr>操作日期</nobr>
94
94
  </th>
95
-
95
+ <th>
96
+ <nobr>
97
+ 收费记录时间
98
+ </nobr>
99
+ </th>
96
100
  <th>
97
101
  <nobr>人员</nobr>
98
102
  </th>
@@ -162,7 +166,11 @@
162
166
  <td style="text-align: center;">
163
167
  <nobr>{{row.f_operate_date}}</nobr>
164
168
  </td>
165
-
169
+ <td style="text-align: center;">
170
+ <nobr>
171
+ {{row.f_sfjl===null?"00:00:00.000":row.f_sfjl}}
172
+ </nobr>
173
+ </td>
166
174
  <td style="text-align: center;">
167
175
  <nobr>{{row.f_operator}}</nobr>
168
176
  </td>
@@ -20,7 +20,7 @@
20
20
  <script>
21
21
  import {HttpResetClass} from 'vue-client'
22
22
  let checkGas = async function (self) {
23
- let temp = []
23
+ let temp = {data:[]}
24
24
  try {
25
25
  let http = new HttpResetClass()
26
26
  temp = await http.load('POST', 'rs/sql/sale_checkGas', {data: {id: self.data.f_userinfo_id}}, {resolveMsg: null, rejectMsg: null})
@@ -30,7 +30,6 @@
30
30
  <input class="input_search" style="width:60%" type="text" class="input_search" style="width:60%" v-validate:f_user_name='{required: true }'
31
31
  v-model="model.f_user_name" readonly
32
32
  placeholder="用户姓名">
33
-
34
33
  </div>
35
34
  <div class="col-sm-4 form-group" id="phone" :class="[$v.f_user_phone.required ? 'has-error' : 'has-success']">
36
35
  <label for="f_user_phone" class=" font_normal_body">联系方式</label>
@@ -173,18 +172,7 @@
173
172
  }
174
173
  },
175
174
  ready () {
176
- if (this.data) {
177
- console.log(this.data + '*****************************')
178
- if(this.data.f_parameter_value){
179
- this.isBlackList = true
180
- initGen(this, this.data)
181
- } else {
182
- this.isBlackList = false
183
- this.initNormalModel(this.data,this)
184
- }
185
- } else {
186
- this.initModel()
187
- }
175
+
188
176
  },
189
177
  watch: {
190
178
  'data' (val) {
@@ -0,0 +1,221 @@
1
+ <template>
2
+ <div class="auto">
3
+ <modal :show.sync="blackbatchshow" v-ref:modal large backdrop="false">
4
+ <header slot="modal-header" class="modal-header">
5
+ <h4 class="modal-title">用户批量拉黑</h4>
6
+ </header>
7
+ <article slot="modal-body" class="modal-body">
8
+ <validator name='v'>
9
+ <form novalidate class="form-horizontal select-overspread ">
10
+ <div>
11
+ <div class="row">
12
+ <!-- <div class="col-sm-4 form-group" id="f_meternumber">-->
13
+ <!-- <label for="f_userinfo_code" class="font_normal_body">表&emsp;&emsp;号</label>-->
14
+ <!-- <input class="input_search" style="width:60%" type="text"-->
15
+ <!-- v-model="model.f_meternumber" readonly>-->
16
+ <!-- </div>-->
17
+ <!-- <div class="col-sm-4 form-group" id="f_card_id">-->
18
+ <!-- <label for="f_userinfo_code" class="font_normal_body">卡&emsp;&emsp;号</label>-->
19
+ <!-- <input class="input_search" style="width:60%" type="text"-->
20
+ <!-- v-model="model.f_card_id" readonly>-->
21
+ <!-- </div>-->
22
+ <!-- <div class="col-sm-4 form-group" id="f_userinfo_code">-->
23
+ <!-- <label for="f_userinfo_code" class="font_normal_body">用户编号</label>-->
24
+ <!-- <input class="input_search" style="width:60%" type="text" class="input_search" style="width:60%"-->
25
+ <!-- v-model="model.f_userinfo_code" readonly>-->
26
+ <!-- </div>-->
27
+ <!-- <div class="col-sm-4 form-group" id="name">-->
28
+ <!-- <label for="f_user_name" class=" font_normal_body">用户姓名</label>-->
29
+ <!-- <input class="input_search" style="width:60%" type="text" class="input_search" style="width:60%"-->
30
+ <!-- v-model="model.f_user_name" readonly-->
31
+ <!-- placeholder="用户姓名">-->
32
+ <!-- </div>-->
33
+ <!-- <div class="col-sm-4 form-group" id="phone">-->
34
+ <!-- <label for="f_user_phone" class=" font_normal_body">联系方式</label>-->
35
+ <!-- <input class="input_search" style="width:60%" type="text" class="input_search" style="width:60%"-->
36
+ <!-- v-model="model.f_user_phone" readonly-->
37
+ <!-- placeholder="联系方式">-->
38
+ <!-- </div>-->
39
+ <div class="col-sm-4 form-group" id="f_limit_times"
40
+ :class="[$v.f_limit_times.required ? 'has-error' : 'has-success']">
41
+ <label class="font_normal_body">限购次数</label>
42
+ <input class="input_search" style="width:60%" type="number"
43
+ v-model="model.f_limit_times" v-validate:f_limit_times='{required: true }'
44
+ placeholder="限购次数">
45
+ </div>
46
+ <div class="col-sm-2 form-group" id="f_limit">
47
+ <v-select
48
+ width="82%"
49
+ v-model="f_limit"
50
+ :value.sync="f_limit"
51
+ :options='limites'
52
+ close-on-select>
53
+ </v-select>
54
+ </div>
55
+ <div class="col-sm-3 form-group" id="f_limit_gas" style="right: 3%;">
56
+ <input class="input_search" style="width:60%" type="number" v-if="f_limit=='限购气量'"
57
+ v-model="model.f_limit_value"
58
+ v-scale="[model.f_limit_value, 2]"
59
+ @click="gg()"
60
+ placeholder="限购气量">
61
+ <input class="input_search" type="number" v-if="f_limit=='限购金额'"
62
+ v-model="model.f_limit_amount"
63
+ v-scale="[model.f_limit_amount, 2]"
64
+ @click="gg()"
65
+ placeholder="限购金额">
66
+
67
+ </div>
68
+ </div>
69
+ <div class="row">
70
+ <!-- <div class="col-sm-12 form-group" id="address">-->
71
+ <!-- <label for="f_address" class=" font_normal_body">地&emsp;&emsp;址</label>-->
72
+ <!-- <input class="input_search" type="text" class="input_search" style="width:87%"-->
73
+ <!-- v-model="model.f_address"-->
74
+ <!-- readonly-->
75
+ <!-- placeholder="地址">-->
76
+ <!-- </div>-->
77
+ <div class="col-sm-12 form-group" id="f_comments"
78
+ :class="[$v.f_comments.required ? 'has-error' : 'has-success']">
79
+ <label for="f_comments" class=" font_normal_body">原&emsp;&emsp;因</label>
80
+ <input class="input_search" type="text" class="input_search" style="width:87%"
81
+ v-model="model.f_comments"
82
+ placeholder="原因" v-validate:f_comments='{required: true }'>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </form>
87
+ </validator>
88
+ </article>
89
+ <footer slot="modal-footer" class="modal-footer">
90
+ <div style="text-align:right;height:auto;margin-top:6px;">
91
+ <button class="button_search" type="button" style="width:80px;" @click="confirm('拉黑')" :disabled='!$v.valid'>
92
+ 拉黑
93
+ </button>
94
+ <button class="button_search" type="button" style="width:80px;" @click="close()">
95
+ 取消
96
+ </button>
97
+ </div>
98
+ </footer>
99
+ </modal>
100
+ </div>
101
+ </template>
102
+
103
+ <script>
104
+ import {HttpResetClass} from "vue-client";
105
+
106
+ export default {
107
+ name: "BlackListBatch",
108
+ title: '黑名单批量管理',
109
+ props: {
110
+ blackbatchshow: {
111
+ type: Boolean,
112
+ default: false
113
+ },
114
+ data: {
115
+ type: Array,
116
+ default: []
117
+ }
118
+ },
119
+ data () {
120
+ return {
121
+ model: {
122
+ // 限购次数
123
+ f_limit_times: '',
124
+ // 限购气量
125
+ f_limit_value: '',
126
+ // 限购金额
127
+ f_limit_amount: ''
128
+ },
129
+ // 编辑控制
130
+ isBlackList: false,
131
+ f_filialeid: '', // 所属公司
132
+ f_filialename: '', // 所属公司名称
133
+ f_limit: '限购气量',
134
+ limites: [{label: '限购气量', value: '限购气量'}, {label: '限购金额', value: '限购金额'}]
135
+ }
136
+ },
137
+ ready () {
138
+ if (this.data) {
139
+ console.log(this.data + '*****************************')
140
+ } else {
141
+ this.initModel()
142
+ }
143
+ },
144
+ watch:{
145
+ 'data' () {
146
+ this.initModel()
147
+ }
148
+ },
149
+ methods: {
150
+ gg () {
151
+ if (this.f_limit[0] === '限购气量') {
152
+ this.model.f_limit_amount = ''
153
+ } else {
154
+ this.model.f_limit_value = ''
155
+ }
156
+ },
157
+ async confirm (type) {
158
+ console.log('所有要添加的数据',this.data)
159
+
160
+ let msg = this.data.map((value, index, array)=>{
161
+ let r = {}
162
+ r.f_operat_type = type
163
+ r.f_state = '有效'
164
+ r.f_user_id = value.f_user_id
165
+ r.f_user_name = value.f_user_name
166
+ r.f_comments = this.model.f_comments
167
+ r.f_operator = this.$login.f.name
168
+ r.f_operatorid = this.$login.f.id
169
+ r.f_orgid = this.$login.f.orgid
170
+ r.f_orgname = this.$login.f.orgs
171
+ r.f_depid = this.$login.f.depids
172
+ r.f_depname = this.$login.f.deps
173
+ r.f_operate_date = this.$login.toStandardTimeString()
174
+ r.f_describe = `${this.$login.f.name}对客户${value.f_user_name}进行${type}`
175
+ r.f_userinfo_code = value.f_userinfo_code
176
+ r.f_userinfo_id = {
177
+ f_userinfo_id: value.f_userinfo_id,
178
+ f_user_state: '正常',
179
+ version: 0
180
+ },
181
+ r.f_limit_times = this.model.f_limit_times
182
+ r.f_limit_value = this.model.f_limit_value
183
+ r.f_limit_amount = this.model.f_limit_amount
184
+ return r
185
+ })
186
+ console.log('查看参数msg', msg)
187
+ for (let i = 0; i < msg.length; i++) {
188
+ let v = await this.$resetpost('rs/sql/sale_getUserAndVersion', {data: {condition: `f_userinfo_code='${msg[i].f_userinfo_code}'`, f_orgid: this.$login.f.orgid}}, {
189
+ resolveMsg: null,
190
+ rejectMsg: null
191
+ })
192
+ msg[i].f_userinfo_id.version = v.data[0].version
193
+ let res = await this.$resetpost('rs/logic/backlistOperate', msg[i], {resolveMsg: null, rejectMsg: `${type}失败`})
194
+ if (res.data.code == 500) {
195
+ this.$showMessage(`${type}失败,名单中已拉黑用户无法再拉黑,请先取消拉黑`)
196
+ return
197
+ }
198
+ }
199
+ this.$showMessage(`${type}成功`)
200
+ this.$dispatch('success')
201
+ this.$dispatch('blackclose')
202
+ this.initModel()
203
+ },
204
+ initModel () {
205
+ if (this.data) {
206
+ console.log('initModel', this.data)
207
+ }
208
+ },
209
+ },
210
+ }
211
+ </script>
212
+
213
+ <style lang="less">
214
+ #gas-price-form {
215
+ .form-group {
216
+ margin-left: 0px;
217
+ margin-right: 0px;
218
+ }
219
+ }
220
+
221
+ </style>