Selaa lähdekoodia

Merge branch 'dev' into dev-2.19.1

* dev: (102 commits)
  fix bug
  修改bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  修改接口
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  fix bug
  添加 test 环境
  ...
WZQ 5 kuukautta sitten
vanhempi
commit
4de116a4ba
100 muutettua tiedostoa jossa 2230 lisäystä ja 972 poistoa
  1. 41 0
      build/build-test.js
  2. 145 0
      build/webpack.test.conf.js
  3. 1 0
      config/dev.env.js
  4. 21 1
      config/index.js
  5. 1 1
      config/prod.env.js
  6. 5 0
      config/test.env.js
  7. 1 1
      index.html
  8. 2 1
      package.json
  9. 34 1
      src/api/alerting/index.js
  10. 18 0
      src/api/base/clearance.js
  11. 8 0
      src/api/base/index.js
  12. 8 0
      src/api/comprehensiveSearch/index.js
  13. 21 15
      src/api/deviceManagement/index.js
  14. 16 20
      src/api/facilitiesManagement/index.js
  15. 1 0
      src/api/index.js
  16. 14 0
      src/api/settlementManagement/index.js
  17. 16 0
      src/api/statisticalReport/index.js
  18. 17 0
      src/api/storehouseAnalyze/index.js
  19. 32 0
      src/api/system/index.js
  20. 8 2
      src/api/user/index.js
  21. BIN
      src/assets/wisdom_images/bj.png
  22. BIN
      src/assets/wisdom_images/logins.png
  23. BIN
      src/assets/wisdom_images/logoDEl.png
  24. BIN
      src/assets/wisdom_images/zuo.png
  25. 2 1
      src/components/common/carInOutEdit.vue
  26. 42 0
      src/components/common/data.js
  27. 34 38
      src/components/common/header.vue
  28. 150 127
      src/components/common/topMenu.vue
  29. 1 1
      src/components/simpleList/index.js
  30. 2 0
      src/components/simpleList/simpleEdit.js
  31. 56 50
      src/components/system/customer/customerAdd.vue
  32. 1 0
      src/components/system/keeper/keeperListEdit.vue
  33. 1 0
      src/components/upload/v2.vue
  34. 36 11
      src/page/ACCinventory/index.vue
  35. 0 3
      src/page/Layout/layout.vue
  36. 10 69
      src/page/Layout/menuList/menuItem.vue
  37. 4 2
      src/page/Layout/menuList/menuList.vue
  38. 38 0
      src/page/Layout/menuList/myMenuItem.vue
  39. 1 1
      src/page/ProcurementAndSales/components/monthlyReport.vue
  40. 260 0
      src/page/StorehouseAnalyze/index.vue
  41. 37 0
      src/page/StorehouseView/view1.vue
  42. 37 0
      src/page/StorehouseView/view2.vue
  43. 29 6
      src/page/alerting/cameraAlerting.vue
  44. 13 8
      src/page/alerting/circleGrainAlerting.vue
  45. 22 8
      src/page/alerting/condensationAlerting.vue
  46. 41 8
      src/page/alerting/deviceAbnormalAlerting.vue
  47. 42 8
      src/page/alerting/humidityAlerting.vue
  48. 13 8
      src/page/alerting/illegalAlerting.vue
  49. 9 6
      src/page/alerting/innerControlAlerting.vue
  50. 3 6
      src/page/alerting/inspectionReportAlerting.vue
  51. 32 8
      src/page/alerting/intelligentAnalysisAlerting.vue
  52. 6 5
      src/page/alerting/inventoryEmptyAlerting.vue
  53. 1 1
      src/page/alerting/inventoryOverrunsAlerting.vue
  54. 3 5
      src/page/alerting/overheadAlerting.vue
  55. 4 3
      src/page/alerting/storageOverrunAlerting.vue
  56. 4 5
      src/page/alerting/temperatureMeasurementPoint.vue
  57. 16 13
      src/page/basicData/components/clearanceConfirmationListEdit.vue
  58. 4 3
      src/page/basicData/components/equipmentEquipmentPoolListEdit.vue
  59. 15 2
      src/page/basicData/components/warehouseListEdit.vue
  60. 20 2
      src/page/basicData/equipmentEquipmentPoolList.vue
  61. 32 51
      src/page/comprehensiveSearch/comprehensiveSearchInsect.vue
  62. 1 1
      src/page/comprehensiveSearch/comprehensiveSearchWarning.vue
  63. 12 1
      src/page/customerManagement/customerArchives.vue
  64. 2 2
      src/page/decisionSupport/inventorySupervisionStatistics.vue
  65. 8 7
      src/page/deviceManagement/components/edit/index.vue
  66. 35 9
      src/page/deviceManagement/inventory.vue
  67. 1 3
      src/page/facilitiesManagement/components/facilitiesMaintenanceEdit.vue
  68. 3 0
      src/page/facilitiesManagement/components/facilitiesRepairEdit.vue
  69. 3 3
      src/page/facilitiesManagement/facilitiesBaseInfo.vue
  70. 3 0
      src/page/grainCard/components/grainCardEdit.vue
  71. 52 13
      src/page/grainCountManagement/carInOut.vue
  72. 45 12
      src/page/grainCountManagement/index.vue
  73. 27 23
      src/page/intelligentStorage/components/deviceControlEdit.vue
  74. 30 22
      src/page/intelligentStorage/components/fumigationJobEdit.vue
  75. 7 1
      src/page/intelligentStorage/components/quantityDetectionDeviceConfigEdit.vue
  76. 7 5
      src/page/intelligentStorage/multifunctionalGrainInfo.vue
  77. 1 1
      src/page/intelligentStorage/pestChecking.vue
  78. 5 1
      src/page/intelligentStorage/pestDeviceConfig.vue
  79. 5 5
      src/page/intelligentStorage/quantityDetectionDeviceConfig.vue
  80. 6 2
      src/page/intelligentStorage/ventilationDeviceConfig.vue
  81. 72 35
      src/page/login/index.vue
  82. 14 14
      src/page/spillageLeakageLossCollection/components/spillageLeakageLossCollectionEdit.vue
  83. 21 58
      src/page/statisticalReport/detailsReport.vue
  84. 10 37
      src/page/statisticalReport/submitReport.vue
  85. 20 8
      src/page/storageForewarning/circle.vue
  86. 9 7
      src/page/storageForewarning/nonRotation.vue
  87. 55 51
      src/page/storageForewarning/tradeInList.vue
  88. 27 24
      src/page/storageQualificationData/components/informationChangesEdit.vue
  89. 18 22
      src/page/storageQualificationData/components/storageDataEdit.vue
  90. 30 28
      src/page/storageQualificationData/components/storageQualificationEdit.vue
  91. 6 1
      src/page/storageQualificationData/informationChanges.vue
  92. 7 1
      src/page/storageQualificationData/storageData.vue
  93. 6 1
      src/page/storageQualificationData/storageQualification.vue
  94. 86 32
      src/page/storehouseManagement/components/dailyInspectionEdit.vue
  95. 69 2
      src/page/storehouseManagement/components/hazardControlEdit.vue
  96. 3 3
      src/page/storehouseManagement/hazardControl.vue
  97. 19 11
      src/page/storehouseManagement/storehouseBaseInfo.vue
  98. 16 11
      src/page/storehouseManagement/temperatureInspection.vue
  99. 58 14
      src/page/system/authManagement.vue
  100. 0 0
      src/page/system/components/functionManagementEdit.vue

+ 41 - 0
build/build-test.js

@@ -0,0 +1,41 @@
1
+'use strict'
2
+require('./check-versions')()
3
+
4
+process.env.NODE_ENV = 'test'
5
+
6
+const ora = require('ora')
7
+const rm = require('rimraf')
8
+const path = require('path')
9
+const chalk = require('chalk')
10
+const webpack = require('webpack')
11
+const config = require('../config')
12
+const webpackConfig = require('./webpack.test.conf')
13
+
14
+const spinner = ora('building for test...')
15
+spinner.start()
16
+
17
+rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18
+  if (err) throw err
19
+  webpack(webpackConfig, (err, stats) => {
20
+    spinner.stop()
21
+    if (err) throw err
22
+    process.stdout.write(stats.toString({
23
+      colors: true,
24
+      modules: false,
25
+      children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26
+      chunks: false,
27
+      chunkModules: false
28
+    }) + '\n\n')
29
+
30
+    if (stats.hasErrors()) {
31
+      console.log(chalk.red('  Build failed with errors.\n'))
32
+      process.exit(1)
33
+    }
34
+
35
+    console.log(chalk.cyan('  Build complete.\n'))
36
+    console.log(chalk.yellow(
37
+      '  Tip: built files are meant to be served over an HTTP server.\n' +
38
+      '  Opening index.html over file:// won\'t work.\n'
39
+    ))
40
+  })
41
+})

+ 145 - 0
build/webpack.test.conf.js

@@ -0,0 +1,145 @@
1
+'use strict'
2
+const path = require('path')
3
+const utils = require('./utils')
4
+const webpack = require('webpack')
5
+const config = require('../config')
6
+const merge = require('webpack-merge')
7
+const baseWebpackConfig = require('./webpack.base.conf')
8
+const CopyWebpackPlugin = require('copy-webpack-plugin')
9
+const HtmlWebpackPlugin = require('html-webpack-plugin')
10
+const ExtractTextPlugin = require('extract-text-webpack-plugin')
11
+const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
12
+const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
13
+
14
+const env = require('../config/test.env')
15
+
16
+const webpackConfig = merge(baseWebpackConfig, {
17
+  module: {
18
+    rules: utils.styleLoaders({
19
+      sourceMap: config.build_test.productionSourceMap,
20
+      extract: true,
21
+      usePostCSS: true
22
+    })
23
+  },
24
+  devtool: config.build_test.productionSourceMap ? config.build_test.devtool : false,
25
+  output: {
26
+    path: config.build_test.assetsRoot,
27
+    filename: utils.assetsPath('js/[name].[chunkhash].js'),
28
+    chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
29
+  },
30
+  plugins: [
31
+    // http://vuejs.github.io/vue-loader/en/workflow/production.html
32
+    new webpack.DefinePlugin({
33
+      'process.env': env
34
+    }),
35
+    new UglifyJsPlugin({
36
+      uglifyOptions: {
37
+        compress: {
38
+          warnings: false
39
+        }
40
+      },
41
+      sourceMap: config.build_test.productionSourceMap,
42
+      parallel: true
43
+    }),
44
+    // extract css into its own file
45
+    new ExtractTextPlugin({
46
+      filename: utils.assetsPath('css/[name].[contenthash].css'),
47
+      // Setting the following option to `false` will not extract CSS from codesplit chunks.
48
+      // Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
49
+      // It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
50
+      // increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
51
+      allChunks: true,
52
+    }),
53
+    // Compress extracted CSS. We are using this plugin so that possible
54
+    // duplicated CSS from different components can be deduped.
55
+    new OptimizeCSSPlugin({
56
+      cssProcessorOptions: config.build_test.productionSourceMap
57
+        ? { safe: true, map: { inline: false } }
58
+        : { safe: true }
59
+    }),
60
+    // generate dist index.html with correct asset hash for caching.
61
+    // you can customize output by editing /index.html
62
+    // see https://github.com/ampedandwired/html-webpack-plugin
63
+    new HtmlWebpackPlugin({
64
+      filename: config.build_test.index,
65
+      template: 'index.html',
66
+      inject: true,
67
+      minify: {
68
+        removeComments: true,
69
+        collapseWhitespace: true,
70
+        removeAttributeQuotes: true
71
+        // more options:
72
+        // https://github.com/kangax/html-minifier#options-quick-reference
73
+      },
74
+      // necessary to consistently work with multiple chunks via CommonsChunkPlugin
75
+      chunksSortMode: 'dependency'
76
+    }),
77
+    // keep module.id stable when vendor modules does not change
78
+    new webpack.HashedModuleIdsPlugin(),
79
+    // enable scope hoisting
80
+    new webpack.optimize.ModuleConcatenationPlugin(),
81
+    // split vendor js into its own file
82
+    new webpack.optimize.CommonsChunkPlugin({
83
+      name: 'vendor',
84
+      minChunks (module) {
85
+        // any required modules inside node_modules are extracted to vendor
86
+        return (
87
+          module.resource &&
88
+          /\.js$/.test(module.resource) &&
89
+          module.resource.indexOf(
90
+            path.join(__dirname, '../node_modules')
91
+          ) === 0
92
+        )
93
+      }
94
+    }),
95
+    // extract webpack runtime and module manifest to its own file in order to
96
+    // prevent vendor hash from being updated whenever app bundle is updated
97
+    new webpack.optimize.CommonsChunkPlugin({
98
+      name: 'manifest',
99
+      minChunks: Infinity
100
+    }),
101
+    // This instance extracts shared chunks from code splitted chunks and bundles them
102
+    // in a separate chunk, similar to the vendor chunk
103
+    // see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
104
+    new webpack.optimize.CommonsChunkPlugin({
105
+      name: 'app',
106
+      async: 'vendor-async',
107
+      children: true,
108
+      minChunks: 3
109
+    }),
110
+
111
+    // copy custom static assets
112
+    new CopyWebpackPlugin([
113
+      {
114
+        from: path.resolve(__dirname, '../static'),
115
+        to: config.build_test.assetsSubDirectory,
116
+        ignore: ['.*']
117
+      }
118
+    ])
119
+  ]
120
+})
121
+
122
+if (config.build_test.productionGzip) {
123
+  const CompressionWebpackPlugin = require('compression-webpack-plugin')
124
+
125
+  webpackConfig.plugins.push(
126
+    new CompressionWebpackPlugin({
127
+      asset: '[path].gz[query]',
128
+      algorithm: 'gzip',
129
+      test: new RegExp(
130
+        '\\.(' +
131
+        config.build_test.productionGzipExtensions.join('|') +
132
+        ')$'
133
+      ),
134
+      threshold: 10240,
135
+      minRatio: 0.8
136
+    })
137
+  )
138
+}
139
+
140
+if (config.build_test.bundleAnalyzerReport) {
141
+  const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
142
+  webpackConfig.plugins.push(new BundleAnalyzerPlugin())
143
+}
144
+
145
+module.exports = webpackConfig

+ 1 - 0
config/dev.env.js

@@ -4,5 +4,6 @@ const prodEnv = require('./prod.env')
4 4
 
5 5
 module.exports = {
6 6
     NODE_ENV: '"development"',
7
+    // BASE_API: '"http://172.16.0.46:9025"', //内网
7 8
    //BASE_API: '"https://easy-mock.com/mock/5a72c1ecc76727050336e0bc/mdm/"',
8 9
 }

+ 21 - 1
config/index.js

@@ -13,7 +13,27 @@ module.exports = {
13 13
     assetsSubDirectory: "static",
14 14
     assetsPublicPath: "./", //请根据自己路径配置更改
15 15
     productionSourceMap: false,
16
-    baseURL: TEST_HOST,
16
+    // baseURL: TEST_HOST,
17
+    // Gzip off by default as many popular static hosts such as
18
+    // Surge or Netlify already gzip all static assets for you.
19
+    // Before setting to `true`, make sure to:
20
+    // npm install --save-dev compression-webpack-plugin
21
+    productionGzip: false,
22
+    productionGzipExtensions: ["js", "css"],
23
+    // Run the build command with an extra argument to
24
+    // View the bundle analyzer report after build finishes:
25
+    // `npm run build --report`
26
+    // Set to `true` or `false` to always turn it on or off
27
+    bundleAnalyzerReport: process.env.npm_config_report,
28
+  },
29
+  build_test: {
30
+    prodEnv: require("./test.env"),
31
+    index: path.resolve(__dirname, "../dist/index.html"),
32
+    assetsRoot: path.resolve(__dirname, "../dist"),
33
+    assetsSubDirectory: "static",
34
+    assetsPublicPath: "./", //请根据自己路径配置更改
35
+    productionSourceMap: false,
36
+    // baseURL: TEST_HOST,
17 37
     // Gzip off by default as many popular static hosts such as
18 38
     // Surge or Netlify already gzip all static assets for you.
19 39
     // Before setting to `true`, make sure to:

+ 1 - 1
config/prod.env.js

@@ -1,5 +1,5 @@
1 1
 'use strict'
2 2
 module.exports = {
3 3
     NODE_ENV: '"production"',
4
-    BASE_API: '"http://172.16.0.46:9025"', //内网
4
+    BASE_API: '"http://172.18.93.216:80"', //内网
5 5
 };

+ 5 - 0
config/test.env.js

@@ -0,0 +1,5 @@
1
+'use strict'
2
+module.exports = {
3
+    NODE_ENV: '"test"',
4
+    BASE_API: '"http://172.16.0.46:9025"', //内网
5
+};

+ 1 - 1
index.html

@@ -6,7 +6,7 @@
6 6
     <meta name="viewport" content="width=device-width,initial-scale=1.0">
7 7
     <link rel="ico" type="image/x-icon" href="static/favicon.ico">
8 8
     <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico">
9
-    <title>青海省粮食局</title>
9
+    <title>智慧青粮粮库管理系统</title>
10 10
 </head>
11 11
 
12 12
 <body>

+ 2 - 1
package.json

@@ -7,7 +7,8 @@
7 7
   "scripts": {
8 8
     "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
9 9
     "start": "npm run dev",
10
-    "build": "node build/build.js"
10
+    "build:prod": "node build/build.js",
11
+    "build:test": "node build/build-test.js"
11 12
   },
12 13
   "dependencies": {
13 14
     "@fortawesome/fontawesome": "^1.1.8",

+ 34 - 1
src/api/alerting/index.js

@@ -1,5 +1,5 @@
1 1
 import request from '@/utils/require'
2
-import { depot_storage } from "../index";
2
+import {depot_intelligent, depot_storage, depot_alarm} from "../index";
3 3
 
4 4
 export function getTempAlarmList(page, query) {
5 5
   return request({
@@ -16,6 +16,23 @@ export function getDewingAlarmList(page, query) {
16 16
     params: query
17 17
   })
18 18
 }
19
+
20
+export function getAbnormalEquipmentList(page, query) {
21
+  return request({
22
+    url: `${depot_intelligent}/intelligents/warning/getAbnormalEquipmentList?pageNum=${page.page}&pageSize=${page.size}`,
23
+    method: 'get',
24
+    params: query
25
+  })
26
+}
27
+
28
+export function getHumidnessAlarmList(page, query) {
29
+  return request({
30
+    url: `${depot_storage}/spt/getHumidnessAlarmList?pageNum=${page.page}&pageSize=${page.size}`,
31
+    method: 'get',
32
+    params: query
33
+  })
34
+}
35
+
19 36
 export function getkccxbjList(page, query) {
20 37
   return request({
21 38
     url: `${depot_storage}/spt/getkccxbjList?pageNum=${page.page}&pageSize=${page.size}`,
@@ -52,6 +69,22 @@ export function violationWarningAlarmList(page, query) {
52 69
   })
53 70
 }
54 71
 
72
+export function getOldPageList(page, query) {
73
+  return request({
74
+    url: `${depot_alarm}/alarm/getOldPageList?pageNum=${page.page}&pageSize=${page.size}`,
75
+    method: 'get',
76
+    params: query
77
+  })
78
+}
79
+
80
+export function getSxtgzsList(page, query) {
81
+  return request({
82
+    url: `${depot_storage}/spt/getSxtgzsList?pageNum=${page.page}&pageSize=${page.size}`,
83
+    method: 'get',
84
+    params: query
85
+  })
86
+}
87
+
55 88
 export function getCwdgzsList(page, query) {
56 89
   return request({
57 90
     url: `${depot_storage}/spt/getCwdgzsList?pageNum=${page.page}&pageSize=${page.size}`,

+ 18 - 0
src/api/base/clearance.js

@@ -50,3 +50,21 @@ export function remove(id) {
50 50
     data: formData
51 51
   })
52 52
 }
53
+
54
+export function findStorehouse(orgId) {
55
+  const query = {orgId}
56
+  return request({
57
+    url: `${depot_qualitycheck}/ClearanceConfirmationController/findStorehouse`,
58
+    method: 'get',
59
+    params: query,
60
+  })
61
+}
62
+
63
+export function findByWarehouse(storehouseId) {
64
+  const query = {storehouseId}
65
+  return request({
66
+    url: `${depot_qualitycheck}/ClearanceConfirmationController/findByWarehouse`,
67
+    method: 'get',
68
+    params: query,
69
+  })
70
+}

+ 8 - 0
src/api/base/index.js

@@ -588,3 +588,11 @@ export function findWareCode(query) {
588 588
     params: query
589 589
   })
590 590
 }
591
+
592
+export function getFileList(query) {
593
+  return request({
594
+    url: `${depot_basic}/depot/basic/file/getList`,
595
+    method: 'get',
596
+    params: query
597
+  })
598
+}

+ 8 - 0
src/api/comprehensiveSearch/index.js

@@ -17,3 +17,11 @@ export function comprehensiveGetById(id) {
17 17
     params: query
18 18
   })
19 19
 }
20
+
21
+export function insectPestDetectionList(page, query) {
22
+  return request({
23
+    url: `${depot_intelligent}/intelligents/insectPestDetection/getList?pageNum=${page.page}&pageSize=${page.size}`,
24
+    method: 'get',
25
+    params: query
26
+  })
27
+}

+ 21 - 15
src/api/deviceManagement/index.js

@@ -2,6 +2,8 @@ import request from '@/utils/require'
2 2
 import {depot_business, depot_device} from "../index";
3 3
 import {PLUS} from "@/utils/systemUtils";
4 4
 
5
+export const importUrl = `${depot_device}/BasicEquipmentEquipmentPool/importFile`
6
+
5 7
 export function getPageInfoList(page, query) {
6 8
   return request({
7 9
     url: `${depot_device}/devicePutStorage/getPageInfoList?pageNum=${page.page}&pageSize=${page.size}`,
@@ -27,23 +29,23 @@ export function getStorePositionById(id) {
27 29
 }
28 30
 
29 31
 export function storePositionUpdate(data) {
30
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
32
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
31 33
   return request({
32 34
     url: `${depot_device}/BasicEquipmentEquipmentPool/update`,
33
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
35
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
34 36
     method: 'post',
35
-    data: formData,
37
+    data: data,
36 38
   })
37 39
 }
38 40
 
39 41
 export function storePositionRemove(id) {
40
-  const data = {id}
41
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
42
+  // const data = {id}
43
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
42 44
   return request({
43
-    url: `${depot_device}/BasicEquipmentEquipmentPool/remove`,
44
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
45
+    url: `${depot_device}/BasicEquipmentEquipmentPool/remove?id=${id}`,
46
+    // headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
45 47
     method: 'post',
46
-    data: formData,
48
+    // data: formData,
47 49
   })
48 50
 }
49 51
 
@@ -56,21 +58,17 @@ export function getDeviceGetList(page, query) {
56 58
 }
57 59
 
58 60
 export function save(data) {
59
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
60 61
   return request({
61 62
     url: `${depot_device}/devicePutStorage/save`,
62
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
63 63
     method: 'post',
64
-    data: formData,
64
+    data: data,
65 65
   })
66 66
 }
67 67
 export function remove(data) {
68
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
68
+  const {orgId, sbbh} = data
69 69
   return request({
70
-    url: `${depot_device}/devicePutStorage/remove`,
71
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
70
+    url: `${depot_device}/devicePutStorage/remove?orgId=${orgId}&sbbh=${sbbh}`,
72 71
     method: 'post',
73
-    data: formData,
74 72
   })
75 73
 }
76 74
 
@@ -90,6 +88,14 @@ export function deviceRepairList(page, query) {
90 88
   })
91 89
 }
92 90
 
91
+export function getCheckListNoPage(query) {
92
+  return request({
93
+    url: `${depot_device}/deviceCheck/getCheckListNoPage`,
94
+    method: 'get',
95
+    params: query
96
+  })
97
+}
98
+
93 99
 export function deviceCheckList(page, query) {
94 100
   return request({
95 101
     url: `${depot_device}/deviceCheck/getCheckList?pageNum=${page.page}&pageSize=${page.size}`,

+ 16 - 20
src/api/facilitiesManagement/index.js

@@ -18,33 +18,23 @@ export function facilitiesOptions(query) {
18 18
 }
19 19
 
20 20
 export function maintainSave(data) {
21
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
22 21
   return request({
23 22
     url: `${depot_device}/facilities/maintain/save`,
24
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
25 23
     method: 'post',
26
-    data: formData,
24
+    data: data,
27 25
   })
28 26
 }
29 27
 
30 28
 export function maintainRemove(id) {
31
-  const data = {id}
32
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
33 29
   return request({
34
-    url: `${depot_device}/facilities/maintain/remove`,
35
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
30
+    url: `${depot_device}/facilities/maintain/remove?id=${id}`,
36 31
     method: 'post',
37
-    data: formData,
38 32
   })
39 33
 }
40 34
 export function repairRemove(id) {
41
-  const data = {id}
42
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace('_____PLACEHOLDER_PLUS_____', '+')
43 35
   return request({
44
-    url: `${depot_device}/facilities/repair/remove`,
45
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
36
+    url: `${depot_device}/facilities/repair/remove?id=${id}`,
46 37
     method: 'post',
47
-    data: formData,
48 38
   })
49 39
 }
50 40
 
@@ -65,12 +55,11 @@ export function repairList(page, query) {
65 55
 }
66 56
 
67 57
 export function repairSave(data) {
68
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
58
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
59
+  const {dFacilitiesRepairJson} = data
69 60
   return request({
70
-    url: `${depot_device}/facilities/repair/save`,
71
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
61
+    url: `${depot_device}/facilities/repair/save?dFacilitiesRepairJson=${dFacilitiesRepairJson}`,
72 62
     method: 'post',
73
-    data: formData,
74 63
   })
75 64
 }
76 65
 
@@ -82,13 +71,20 @@ export function facilitiesBasicsSave(data) {
82 71
   })
83 72
 }
84 73
 
74
+export function facilitiesBasicsScrap(data) {
75
+  return request({
76
+    url: `${depot_device}/facilities/basics/scrap`,
77
+    method: 'post',
78
+    data: data,
79
+  })
80
+}
81
+
85 82
 export function facilitiesBasicsRemove(id) {
86 83
   const data = {id}
87
-  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
84
+  // const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
88 85
   return request({
89 86
     url: `${depot_device}/facilities/basics/remove`,
90
-    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
91 87
     method: 'post',
92
-    data: formData,
88
+    data: data,
93 89
   })
94 90
 }

+ 1 - 0
src/api/index.js

@@ -19,6 +19,7 @@ export const depot_monitor = "/depot-monitor";
19 19
 export const depot_intelligent = "/depot-smart-storage";
20 20
 
21 21
 export const depot_smart_storage = "/depot-smart-storage";
22
+export const depot_alarm = "/depot-alarm";
22 23
 //正式环境
23 24
 // let service = '/main'
24 25
 // 开发服务器

+ 14 - 0
src/api/settlementManagement/index.js

@@ -238,6 +238,13 @@ export function StorageSafeManageControllerEdit(id) {
238 238
   })
239 239
 }
240 240
 
241
+export function StorageSafeManageControllerRemove(id, orgId) {
242
+  return request({
243
+    url: `${depot_storage}/StorageSafeManageController/remove?id=${id}&orgId=${orgId}`,
244
+    method: 'post',
245
+  })
246
+}
247
+
241 248
 export function insectPestDetectionList(page, query) {
242 249
   return request({
243 250
     url: `${depot_qualitycheck}/intelligents/insectPestDetection/getList?pageNum=${page.page}&pageSize=${page.size}`,
@@ -359,6 +366,13 @@ export function dailyEdit(id) {
359 366
   })
360 367
 }
361 368
 
369
+export function getListOrRcsj(query, orgId) {
370
+  return request({
371
+    url: `${depot_agile}/agile/kcsw/getListOrRcsj?kcswStr=${JSON.stringify(query)}&orgId=${orgId}`,
372
+    method: 'get',
373
+  })
374
+}
375
+
362 376
 export function moveLibraryNoticeList(page, query) {
363 377
   return request({
364 378
     url: `${depot_business}/depot/business/moveLibraryNotice/getList?pageNum=${page.page}&pageSize=${page.size}`,

+ 16 - 0
src/api/statisticalReport/index.js

@@ -8,3 +8,19 @@ export function getSummaryReportInfo(page, query) {
8 8
     params: query
9 9
   })
10 10
 }
11
+
12
+export function getDetailsReportInfo(page, query) {
13
+  return request({
14
+    url: `${depot_storage}/storage/statisticalReport/getDetailsReportInfo?pageNum=${page.page}&pageSize=${page.size}`,
15
+    method: 'get',
16
+    params: query
17
+  })
18
+}
19
+
20
+export function getSubmitReportInfo(page, query) {
21
+  return request({
22
+    url: `${depot_storage}/storage/statisticalReport/getSubmitReportInfo?pageNum=${page.page}&pageSize=${page.size}`,
23
+    method: 'get',
24
+    params: query
25
+  })
26
+}

+ 17 - 0
src/api/storehouseAnalyze/index.js

@@ -0,0 +1,17 @@
1
+import { depot_agent, depot_storage, depot_smart_storage } from '@/api'
2
+import request from '@/utils/require'
3
+
4
+export function getChartList(orgId) {
5
+  return request({
6
+    url: `${depot_smart_storage}/warehouseDataAnalysis/getChartList/${orgId}`,
7
+    method: 'get',
8
+  })
9
+}
10
+
11
+export function getPageList(page, query) {
12
+  return request({
13
+    url: `${depot_smart_storage}/warehouseDataAnalysis/getPageList?current=${page.page}&size=${page.size}`,
14
+    method: 'get',
15
+    params: query,
16
+  })
17
+}

+ 32 - 0
src/api/system/index.js

@@ -9,6 +9,13 @@ export function userList(page, query) {
9 9
   })
10 10
 }
11 11
 
12
+export function userDel(userId) {
13
+  return request({
14
+    url: `${depot_system}/userInfo/remove?userId=${userId}`,
15
+    method: 'post',
16
+  })
17
+}
18
+
12 19
 export function userEdit(userId) {
13 20
   const query = {userId}
14 21
   return request({
@@ -161,3 +168,28 @@ export function getgetTreeList(page, query) {
161 168
     params: query
162 169
   })
163 170
 }
171
+
172
+/**
173
+ * funcInfoJson
174
+ * {"funcId":40,"funcName":"待办与审批","funcUrl":"123","funcSort":1,"parentId":8,"icoUrl":null,"status":null,"remark":null,"delFlag":null,"children":null}
175
+ */
176
+export const saveFuncInfo = (data) => {
177
+  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replaceAll('_____PLACEHOLDER_PLUS_____', '+')
178
+  return request({
179
+    url: `${depot_system}/funcInfo/save`,
180
+    method: 'post',
181
+    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
182
+    data: formData
183
+  })
184
+}
185
+
186
+export const removeFunc = (id) => {
187
+  const data = {funcId: id}
188
+  const formData = Object.keys(data).map(k => `${k}=${encodeURIComponent(data[k])}`).join('&').replace(/_____PLACEHOLDER_PLUS_____/g, '+')
189
+  return request({
190
+    url: `${depot_system}/funcInfo/remove`,
191
+    method: 'post',
192
+    headers: {'content-type': 'application/x-www-form-urlencoded;charset=utf-8'},
193
+    data: formData
194
+  })
195
+}

+ 8 - 2
src/api/user/index.js

@@ -1,10 +1,11 @@
1 1
 import request from '@/utils/require'
2 2
 import {depot_business, depot_system} from '../index'
3 3
 
4
-export function getUser() {
4
+export function getUser(data) {
5 5
   return request({
6 6
     url: `${depot_system}/userInfo/getUser`,
7 7
     method: 'get',
8
+    params: data || {}
8 9
   })
9 10
 }
10 11
 
@@ -71,10 +72,15 @@ export function getByRoleId(roleId) {
71 72
 
72 73
 export function getFunc(query) {
73 74
   return request({
74
-    url: `${depot_system}/funcInfo/getFunc`,
75
+    url: `${depot_system}/funcInfo/getFuncList`,
75 76
     method: 'get',
76 77
     params: query,
77 78
   })
79
+  // return request({
80
+  //   url: `${depot_system}/funcInfo/getFunc`,
81
+  //   method: 'get',
82
+  //   params: query,
83
+  // })
78 84
 }
79 85
 
80 86
 export function getFuncByUserId(query) {

BIN
src/assets/wisdom_images/bj.png


BIN
src/assets/wisdom_images/logins.png


BIN
src/assets/wisdom_images/logoDEl.png


BIN
src/assets/wisdom_images/zuo.png


+ 2 - 1
src/components/common/carInOutEdit.vue

@@ -187,6 +187,7 @@ export default {
187 187
 
188 188
   methods: {
189 189
     init() {
190
+      console.log('edit data', this.editData)
190 191
       this.loading = true
191 192
       this.resetForm()
192 193
       if(this.isAdd) {
@@ -209,7 +210,7 @@ export default {
209 210
           crkRecordDetails({
210 211
             bizNo: this.editData.bizno,
211 212
             lspz: this.editData.lspzid,
212
-            ywlx: '入仓'
213
+            ywlx: this.editData.ywlx,
213 214
           }).then(resp => {
214 215
             console.log('--- ', resp)
215 216
             const zjxx = resp.zjxx

+ 42 - 0
src/components/common/data.js

@@ -846,3 +846,45 @@ export const settleContractUniformity = [
846 846
 export const APPROVAL_OPTIONS_7 = [
847 847
   { value: '0', label: '待审核'},
848 848
 ]
849
+
850
+export const CGXZFS = [
851
+  {value: '0', label: '粮面潮解'},
852
+  {value: '1', label: '布袋埋藏'},
853
+  {value: '2', label: '探管'},
854
+  {value: '3', label: '综合施药'},
855
+]
856
+
857
+export const HLXZFS = [
858
+  {value: '0', label: '固定式布置形式'},
859
+  {value: '1', label: '移动式布置形式'},
860
+]
861
+
862
+export const HLXZNHLJS = [
863
+  {value: '0', label: '分别使用_固定式'},
864
+  {value: '1', label: '分别使用_移动式'},
865
+  {value: '2', label: '二合一应用_移动式'},
866
+  {value: '3', label: '二合一应用_移动式'},
867
+]
868
+
869
+export const SYFF = [
870
+  {value: '0', label: '潮解法'},
871
+  {value: '1', label: '仓外发生器'},
872
+  {value: '2', label: '钢瓶气'},
873
+]
874
+
875
+export const LHQNDDW = [
876
+  {value: '1', label: 'g/m³'},
877
+  {value: '2', label: 'ppm'},
878
+  {value: '3', label: 'ml/m³'},
879
+  {value: '4', label: '%VOL'},
880
+]
881
+
882
+export const XZXGPJ = [
883
+  {value: '0', label: '良好'},
884
+  {value: '1', label: '一般'},
885
+  {value: '2', label: '不好'},
886
+]
887
+
888
+export const violationType = [
889
+  {value: '1', label: '疑转圈粮预警'}
890
+]

+ 34 - 38
src/components/common/header.vue

@@ -1,30 +1,31 @@
1 1
 <template>
2 2
   <header class="header">
3 3
     <div class="logo">
4
-      <img src="@/assets/wisdom_images/logo.png" alt="Logo">
4
+      <!-- <img src="@/assets/wisdom_images/logo.png" alt="Logo"> -->
5
+      <img src="@/assets/wisdom_images/logoDEl.png" alt="Logo" />
5 6
     </div>
6 7
     <div class="right-section">
7 8
       <div class="userInfo-2">
8 9
         <el-dropdown trigger="click">
9
-                  <span class="el-dropdown-link">
10
-                    <el-avatar
11
-                      :size="22"
12
-                      icon="el-icon-user-solid"
13
-                      style="vertical-align: middle; cursor: pointer"
14
-                    ></el-avatar>
15
-                    <span style="margin-left: 10px; font-size: .8rem;">{{
16
-                        realName
17
-                      }}</span>
18
-                  </span>
10
+          <span class="el-dropdown-link">
11
+            <el-avatar
12
+              :size="22"
13
+              icon="el-icon-user-solid"
14
+              style="vertical-align: middle; cursor: pointer"
15
+            ></el-avatar>
16
+            <span style="margin-left: 10px; font-size: 0.8rem">{{
17
+              realName
18
+            }}</span>
19
+          </span>
19 20
           <el-dropdown-menu slot="dropdown">
20
-            <el-dropdown-item
21
-              @click.native="updatemimas"
22
-              icon="el-icon-s-promotion"
23
-            >修改密码</el-dropdown-item>
24
-            <el-dropdown-item
25
-              @click.native="logout"
26
-              icon="el-icon-s-promotion"
27
-            >退出登录</el-dropdown-item>
21
+<!--            <el-dropdown-item-->
22
+<!--              @click.native="updatemimas"-->
23
+<!--              icon="el-icon-s-promotion"-->
24
+<!--              >修改密码</el-dropdown-item-->
25
+<!--            >-->
26
+            <el-dropdown-item @click.native="logout" icon="el-icon-s-promotion"
27
+              >退出登录</el-dropdown-item
28
+            >
28 29
           </el-dropdown-menu>
29 30
         </el-dropdown>
30 31
       </div>
@@ -33,15 +34,14 @@
33 34
   </header>
34 35
 </template>
35 36
 <script>
36
-
37 37
 import topMenu from "./topMenu";
38 38
 import bus from "@/utils/bus.js";
39
-import {mapGetters} from "vuex"
40
-import {clearCacheAndGotoLogin} from "@/utils/loginStatusChecker";
41
-import {logout} from "@/api/login/login";
39
+import { mapGetters } from "vuex";
40
+import { clearCacheAndGotoLogin } from "@/utils/loginStatusChecker";
41
+import { logout } from "@/api/login/login";
42 42
 export default {
43 43
   components: {
44
-    topMenu
44
+    topMenu,
45 45
   },
46 46
   data() {
47 47
     return {
@@ -52,15 +52,13 @@ export default {
52 52
       rightNum: 0,
53 53
       isleft: false,
54 54
       isright: true,
55
-      xzdata: [
56
-
57
-      ],
55
+      xzdata: [],
58 56
       menuUrl: "",
59 57
       accouncementNum: "0",
60 58
     };
61 59
   },
62 60
   computed: {
63
-    ...mapGetters(['realName']),
61
+    ...mapGetters(["realName"]),
64 62
     // ...mapGetters(['sidebar', 'index'])
65 63
     // navData() {
66 64
     //   console.log('navData', this.data[0].children)
@@ -92,9 +90,9 @@ export default {
92 90
       // this.$store.dispatch('LogOut').then(resp => {
93 91
       //   this.$router.push({ name: "login" });
94 92
       // })
95
-      logout().then(resp => {
96
-        clearCacheAndGotoLogin(true)
97
-      })
93
+      logout().then((resp) => {
94
+        clearCacheAndGotoLogin(true);
95
+      });
98 96
     },
99 97
     // // 退出
100 98
     // logout() {
@@ -155,7 +153,6 @@ export default {
155 153
   },
156 154
   mounted() {
157 155
     bus.$on("msg", (e) => {
158
-      console.log(123, e);
159 156
       this.accouncementNum = e;
160 157
     });
161 158
     // if (this.xzdata.children && this.xzdata.children.length != 0) {
@@ -178,19 +175,19 @@ export default {
178 175
 .header {
179 176
   display: flex;
180 177
   justify-content: space-between;
181
-  background-image: url('../../assets/wisdom_images/banner.png');
178
+  background-image: url("../../assets/wisdom_images/banner.png");
182 179
 }
183 180
 
184 181
 .logo {
185 182
   display: flex;
186
-  align-content: center;
187
-  justify-content: center;
188
-  margin-left: 5px;
183
+  // align-content: center;
184
+  // justify-content: center;
185
+  margin-left: 12px;
189 186
 }
190 187
 
191 188
 .logo img {
192 189
   object-fit: contain;
193
-  width: 100%;
190
+  width: 72%;
194 191
   height: auto;
195 192
 }
196 193
 
@@ -220,4 +217,3 @@ export default {
220 217
   margin-bottom: 2px;
221 218
 }
222 219
 </style>
223
-

+ 150 - 127
src/components/common/topMenu.vue

@@ -1,31 +1,26 @@
1 1
 <template>
2 2
   <div class="menu-container">
3 3
     <div class="btn left-btn" @click="scrollLeft">
4
-      <img v-show="hasPrev" src="@/assets/wisdom_images/left-nav.png" />
4
+      <img v-show="hasPrev" src="@/assets/wisdom_images/left-nav.png">
5 5
     </div>
6 6
     <nav class="menu" ref="menu">
7 7
       <ul>
8
-        <li
9
-          v-for="(item, index) in list"
10
-          :key="index"
11
-          class="menu-item"
12
-          :class="{ activate: $store.state.user.topMenuIndex === index }"
13
-          @click="openMenu(item, index)"
14
-        >
8
+        <li v-for="(item, index) in list" :key="index" class="menu-item" :class="{activate: $store.state.user.topMenuIndex === index}" @click="openMenu(item, index)">
15 9
           <i :class="item.icon"></i>
16
-          {{ item.title }}
10
+          {{item.funcName}}
17 11
         </li>
18 12
       </ul>
19 13
     </nav>
20 14
     <div class="btn right-btn" @click="scrollRight">
21
-      <img v-show="hasNext" src="@/assets/wisdom_images/right-nav.png" />
15
+      <img v-show="hasNext" src="@/assets/wisdom_images/right-nav.png">
22 16
     </div>
23 17
   </div>
24 18
 </template>
25 19
 
26 20
 <script>
27
-const ITEM_WIDTH = 130;
28
-const ITEM_BORDER = 1;
21
+
22
+const ITEM_WIDTH = 130
23
+const ITEM_BORDER = 1
29 24
 export default {
30 25
   data() {
31 26
     return {
@@ -33,101 +28,109 @@ export default {
33 28
       visibleItems: 6,
34 29
       hasPrev: true,
35 30
       hasNext: true,
31
+      funcTree: null,
36 32
       list: [
37 33
         {
38
-          icon: "el-icon-s-home",
39
-          title: "首页",
40
-          resourceUrl: "/home",
34
+          icon: 'el-icon-s-home',
35
+          funcName: '首页',
36
+          funcUrl: '/home',
41 37
           resourceCode: null,
42 38
         },
43
-        {
44
-          icon: "el-icon-s-home",
45
-          title: "综合业务",
46
-          resourceUrl: "/businessHome",
47
-          resourceCode: "RM1001008001",
48
-        },
49
-        {
50
-          icon: "el-icon-s-home",
51
-          title: "出入库",
52
-          type: "crk",
53
-          resourceUrl: "/businessHome",
54
-          resourceCode: "RM10010080010",
55
-        },
56
-        {
57
-          icon: "el-icon-house",
58
-          title: "仓储业务",
59
-          resourceUrl: "/storageHome",
60
-          resourceCode: "RM1001008002",
61
-        },
62
-        {
63
-          icon: "el-icon-s-home",
64
-          title: "智能安防",
65
-          resourceUrl: "/monitorHome",
66
-          resourceCode: "RM1001008003",
67
-        },
68
-        {
69
-          icon: "el-icon-s-home",
70
-          title: "粮库决策",
71
-          resourceUrl: "/granaryComprehensiveExhibition/warningThreshold",
72
-          resourceCode: "RM1001008004",
73
-        },
74
-        {
75
-          icon: "el-icon-s-home",
76
-          title: "查询追溯",
77
-          resourceUrl: "/inventoryQualityTraceability/warehouseSource",
78
-          resourceCode: "RM1001008005",
79
-        },
80
-        {
81
-          icon: "el-icon-s-home",
82
-          title: "智能仓房",
83
-          resourceUrl: "/grainSituationInspection/grainSituationReport",
84
-          resourceCode: "RM1001008006",
85
-        },
86
-        {
87
-          icon: "el-icon-s-home",
88
-          title: "基础数据",
89
-          resourceUrl: "/basicData/storehouseList",
90
-          resourceCode: "RM1001008007",
91
-        },
92
-        {
93
-          icon: "el-icon-s-home",
94
-          title: "系统设置",
95
-          resourceUrl: "/system/userManagement",
96
-          resourceCode: "RM1001008008",
97
-        },
98
-      ],
99
-    };
39
+        // {
40
+        //   icon: 'el-icon-s-home',
41
+        //   title: '综合业务',
42
+        //   funcUrl: '/businessHome',
43
+        //   resourceCode: 'RM1001008001',
44
+        // },
45
+        // {
46
+        //   icon: 'el-icon-s-home',
47
+        //   title: '出入库',
48
+        //   type: 'crk',
49
+        //   funcUrl: '/businessHome',
50
+        //   resourceCode: 'RM10010080010',
51
+        // },
52
+        // {
53
+        //   icon: 'el-icon-house',
54
+        //   title: '仓储业务',
55
+        //   funcUrl: '/storageHome',
56
+        //   resourceCode: 'RM1001008002',
57
+        // },
58
+        // {
59
+        //   icon: 'el-icon-s-home',
60
+        //   title: '智能安防',
61
+        //   funcUrl: '/monitorHome',
62
+        //   resourceCode: 'RM1001008003',
63
+        // },
64
+        // {
65
+        //   icon: 'el-icon-s-home',
66
+        //   title: '粮库决策',
67
+        //   funcUrl: '/granaryComprehensiveExhibition/warningThreshold',
68
+        //   resourceCode: 'RM1001008004',
69
+        // },
70
+        // {
71
+        //   icon: 'el-icon-s-home',
72
+        //   title: '查询追溯',
73
+        //   funcUrl: '/inventoryQualityTraceability/warehouseSource',
74
+        //   resourceCode: 'RM1001008005',
75
+        // },
76
+        // {
77
+        //   icon: 'el-icon-s-home',
78
+        //   title: '智能仓房',
79
+        //   funcUrl: '/grainSituationInspection/grainSituationReport',
80
+        //   resourceCode: 'RM1001008006',
81
+        // },
82
+        // {
83
+        //   icon: 'el-icon-s-home',
84
+        //   funcName: '基础数据',
85
+        //   funcUrl: '/basicData/storehouseList',
86
+        //   resourceCode: 'RM1001008007',
87
+        // },
88
+        // {
89
+        //   icon: 'el-icon-s-home',
90
+        //   funcName: '系统设置',
91
+        //   funcUrl: '/system/userManagement',
92
+        //   resourceCode: 'RM1001008008',
93
+        // },
94
+
95
+      ]
96
+    }
100 97
   },
101 98
   created() {
102
-    this.visibleItems = this.list.length;
103
-    this.welcome();
99
+    this.visibleItems = this.list.length
100
+    // this.welcome()
101
+    this.welcome2()
104 102
     const menuCode = sessionStorage.getItem("menuCode");
105 103
     const menuData = JSON.parse(sessionStorage.getItem("xzdata"));
106 104
 
107
-    if (menuCode) {
108
-      menuData.forEach((item) => {
109
-        if (item.resourceCode == menuCode) {
110
-          this.$store.dispatch("changeLeftMenu", [item]);
111
-        }
112
-      });
113
-    }
114
-    window.addEventListener("resize", this.updateVisibleItems);
105
+    // if (menuCode) {
106
+    //   menuData.forEach((item) => {
107
+    //     if (item.resourceCode == menuCode) {
108
+    //       this.$store.dispatch("changeLeftMenu", [item]);
109
+    //     }
110
+    //   });
111
+    // }
112
+    window.addEventListener('resize', this.updateVisibleItems);
115 113
   },
116 114
   mounted() {
117 115
     this.updateVisibleItems();
116
+    this.$nextTick(() => {
117
+      this.$refs.menu.scrollLeft = 0
118
+    })
118 119
   },
119 120
   beforeDestroy() {
120
-    window.removeEventListener("resize", this.updateVisibleItems);
121
+    window.removeEventListener('resize', this.updateVisibleItems);
121 122
   },
122 123
   watch: {
123 124
     defaultActiveUrl(n, o) {
124
-      console.log("------", n);
125
-    },
125
+      console.log('------', n)
126
+    }
126 127
   },
127 128
   methods: {
128
-    handleSelect() {},
129
+    handleSelect() {
130
+
131
+    },
129 132
     scrollLeft() {
130
-      this.$refs.menu.scrollLeft -= ITEM_WIDTH + 2;
133
+      this.$refs.menu.scrollLeft -= (ITEM_WIDTH + 2);
131 134
       // if(this.$refs.menu.scrollLeft <= 0) {
132 135
       //   this.hasPrev = false
133 136
       // }else {
@@ -135,7 +138,7 @@ export default {
135 138
       // }
136 139
     },
137 140
     scrollRight() {
138
-      this.$refs.menu.scrollLeft += ITEM_WIDTH + 2;
141
+      this.$refs.menu.scrollLeft += (ITEM_WIDTH + 2);
139 142
       // if(this.$refs.menu.scrollLeft >= (ITEM_WIDTH + 2) * this.list.length) {
140 143
       //   this.hasNext = false
141 144
       // }else {
@@ -143,10 +146,7 @@ export default {
143 146
       // }
144 147
     },
145 148
     updateVisibleItems() {
146
-      const width =
147
-        window.innerWidth ||
148
-        document.documentElement.clientWidth ||
149
-        document.body.clientWidth;
149
+      const width = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
150 150
       if (width <= 690) {
151 151
         this.visibleItems = 2;
152 152
       } else if (width <= 800) {
@@ -160,68 +160,89 @@ export default {
160 160
       } else {
161 161
         this.visibleItems = this.list.length;
162 162
       }
163
-      this.$refs.menu.style.width = `${
164
-        this.visibleItems * ITEM_WIDTH + this.visibleItems * 2
165
-      }px`;
163
+      this.$refs.menu.style.width = `${this.visibleItems * ITEM_WIDTH + this.visibleItems * 2}px`;
166 164
     },
167
-
168 165
     openMenu(item, index) {
169
-      if (item.type === "crk") {
170
-        this.$store.state.flag = 1;
171
-        // return this.$systemUtils.gotoCrkSystem(this);
172
-      } else {
173
-        this.$store.state.flag = 2;
174
-      }
175
-      if (this.$store.state.user.topMenuIndex === index) return;
176
-      this.$store.commit("SET_TOP_MENU_INDEX", index);
177
-      if (!item.resourceCode) {
178
-        return this.$router.push({ path: item.resourceUrl });
166
+      console.log('open menu', item, index)
167
+      if (['crk', '/crk'].indexOf(item.funcUrl) >= 0) {
168
+        // this.$store.state.flag = 1;
169
+        // return
170
+        return this.$systemUtils.gotoCrkSystem(this)
171
+      }else {
172
+        // this.$store.state.flag = 2;
179 173
       }
180
-      this.getMenuList(item, index);
174
+      if (this.$store.state.user.topMenuIndex === index) return
175
+      this.$store.commit('SET_TOP_MENU_INDEX', index)
176
+      // if(!item.resourceCode) {
177
+      //   return this.$router.push({path: item.funcUrl})
178
+      // }
179
+
180
+      this.getMenuList(item, index)
181 181
     },
182 182
     welcome() {
183 183
       this.loginPeople = sessionStorage.getItem("userName");
184 184
       const data = JSON.parse(sessionStorage.getItem("xzdata"));
185
-      this.xzdata = data;
186
-      this.$store.commit("SET_MENU_DATA", data);
187
-      const defaultCode = "RM1001008001";
188
-      let leftMenuList = [];
185
+      this.xzdata = data
186
+      this.$store.commit("SET_MENU_DATA", data)
187
+      const defaultCode = 'RM1001008001'
188
+      let leftMenuList = []
189 189
       this.xzdata.forEach((item) => {
190 190
         if (item.resourceCode == defaultCode) {
191
-          leftMenuList = [item];
191
+          leftMenuList = [item]
192 192
         }
193 193
       });
194 194
       this.$store.dispatch("changeLeftMenu", leftMenuList);
195 195
     },
196
+    welcome2() {
197
+      const tree = JSON.parse(sessionStorage.getItem("FUN_TREE"));
198
+      this.funcTree = tree
199
+      let defaultChild = []
200
+      for (const menu of tree) {
201
+        if (defaultChild.length <= 0) {
202
+          defaultChild = menu.children
203
+        }
204
+        this.list.push({
205
+          icon: 'el-icon-s-home',
206
+          funcName: menu.funcName,
207
+          funcUrl: menu.funcUrl,
208
+          funcId: menu.funcId,
209
+          resourceCode: 'RM1001008007',
210
+          children: menu.children
211
+        })
212
+      }
213
+      this.$store.dispatch("changeLeftMenu", defaultChild);
214
+    },
215
+    /**
216
+     * 默认展开的左侧菜单
217
+     */
196 218
     getFirstMenu(arr) {
197 219
       if (arr[0] && arr[0].children && arr[0].children.length) {
198 220
         this.getFirstMenu(arr[0].children);
199 221
       } else {
200
-        this.menuUrl = arr[0].resourceUrl;
222
+        console.log('first menu', arr[0])
223
+        this.menuUrl = arr[0].funcUrl;
201 224
       }
202 225
     },
203 226
     getMenuList(item, index) {
227
+      console.log('get menu list', item, index,)
228
+      // debugger
229
+      let leftMenuList = item.children;
204 230
       if (item.children && item.children.length > 0) {
205 231
         this.getFirstMenu(item.children);
206
-        this.$router.push({ path: this.menuUrl });
232
+        console.log('menuUrl', this.menuUrl)
233
+        this.$router.push({path: this.menuUrl});
207 234
       } else {
208
-        if (item.resourceUrl.indexOf("http") == -1) {
209
-          this.$router.push({ path: item.resourceUrl });
235
+        if (item.funcUrl.indexOf("http") == -1) {
236
+          this.$router.push({path: item.funcUrl});
210 237
         } else {
211
-          window.location.href = item.resourceUrl;
238
+          window.location.href = item.funcUrl;
212 239
         }
213 240
       }
214 241
       let code = item.resourceCode;
215 242
       this.isClick = index;
216 243
       sessionStorage.menuIdx = index;
217
-      let leftMenuList = [];
218
-      this.xzdata.forEach((item) => {
219
-        if (item.resourceCode == code) {
220
-          leftMenuList = [item];
221
-        }
222
-      });
223
-      this.getFirstMenu([item]);
224
-      this.$store.commit("SET_DEFAULT_ACTIVE_URL", this.menuUrl);
244
+      // this.getFirstMenu([item]);
245
+      this.$store.commit('SET_DEFAULT_ACTIVE_URL', this.menuUrl)
225 246
       sessionStorage.setItem("leftMenuList", JSON.stringify(leftMenuList));
226 247
       sessionStorage.setItem("menuCode", code);
227 248
       sessionStorage.setItem("resourceCode", code);
@@ -230,8 +251,8 @@ export default {
230 251
 
231 252
       this.$store.dispatch("changeLeftMenu", leftMenuList);
232 253
     },
233
-  },
234
-};
254
+  }
255
+}
235 256
 </script>
236 257
 
237 258
 
@@ -275,11 +296,13 @@ export default {
275 296
   color: white;
276 297
   height: 100%;
277 298
 }
299
+
278 300
 .menu ul {
279 301
   display: flex;
280 302
   list-style-type: none;
281 303
 }
282 304
 
305
+
283 306
 .menu-item {
284 307
   width: 130px;
285 308
   height: 100%;

+ 1 - 1
src/components/simpleList/index.js

@@ -26,7 +26,7 @@ export const simpleList = {
26 26
     }
27 27
   },
28 28
   computed: {
29
-    ...mapGetters(['userId', "orgId", 'userName', 'realName', 'creditCode', 'orgName', 'orgClassId']),
29
+    ...mapGetters(['userId', "orgId", 'userName', 'realName', 'creditCode', 'orgName', 'orgClassId', 'unitInfoId']),
30 30
   },
31 31
   mounted() {
32 32
     this.init()

+ 2 - 0
src/components/simpleList/simpleEdit.js

@@ -119,6 +119,7 @@ export const simpleEdit= {
119 119
       }).catch(err => {
120 120
         if(err) {
121 121
           this.$message.error(err)
122
+          this.loading = false
122 123
         }
123 124
       })
124 125
     },
@@ -164,6 +165,7 @@ export const simpleEdit= {
164 165
     },
165 166
     getSaveFailMsg(resp) {
166 167
       if(resp.message) return resp.message
168
+      if(resp.error) return resp.error
167 169
       return resp.msg
168 170
     },
169 171
     filterNull(obj) {

+ 56 - 50
src/components/system/customer/customerAdd.vue

@@ -14,19 +14,19 @@
14 14
         </el-col>
15 15
         <el-col :span="8">
16 16
         <el-form-item label="客户名称" prop="name">
17
-          <el-input v-model="form.name"></el-input>
17
+          <el-input v-model="form.name" :readonly="readonly"></el-input>
18 18
         </el-form-item>
19 19
         </el-col>
20 20
       </el-row>
21 21
       <el-row type="flex" align="middle" justify="center" class="row">
22 22
         <el-col :span="8">
23 23
           <el-form-item label="客户分组编码" prop="customerGroupId">
24
-            <el-input v-model="form.customerGroupId"></el-input>
24
+            <el-input v-model="form.customerGroupId" :readonly="readonly"></el-input>
25 25
           </el-form-item>
26 26
         </el-col>
27 27
         <el-col :span="8">
28 28
           <el-form-item label="客户分组名称" prop="customerGroupName">
29
-            <el-input v-model="form.customerGroupName"></el-input>
29
+            <el-input v-model="form.customerGroupName" :readonly="readonly"></el-input>
30 30
           </el-form-item>
31 31
         </el-col>
32 32
         <el-col :span="8"></el-col>
@@ -39,114 +39,114 @@
39 39
         <el-row type="flex" align="middle" justify="center" class="row">
40 40
           <el-col :span="8">
41 41
             <el-form-item label="身份证号" prop="identification">
42
-              <el-input v-model="personalForm.identification"></el-input>
42
+              <el-input v-model="personalForm.identification" :readonly="readonly"></el-input>
43 43
             </el-form-item>
44 44
           </el-col>
45 45
           <el-col :span="8">
46 46
             <el-form-item label="手机号" prop="mobile">
47
-              <el-input v-model="personalForm.mobile"></el-input>
47
+              <el-input v-model="personalForm.mobile" :readonly="readonly"></el-input>
48 48
             </el-form-item>
49 49
           </el-col>
50 50
           <el-col :span="8">
51 51
             <el-form-item label="电子邮件" prop="email">
52
-              <el-input v-model="personalForm.email"></el-input>
52
+              <el-input v-model="personalForm.email" :readonly="readonly"></el-input>
53 53
             </el-form-item>
54 54
           </el-col>
55 55
         </el-row>
56 56
         <el-row type="flex" align="middle" justify="center" class="row">
57 57
           <el-col :span="8">
58 58
             <el-form-item label="通讯地址(省/直辖市)" prop="province" label-width="180px">
59
-              <common-select v-model="personalForm.province" type="xzqh" :remote="true"></common-select>
59
+              <common-select v-model="personalForm.province" type="xzqh" :remote="true" :readonly="readonly"></common-select>
60 60
             </el-form-item>
61 61
           </el-col>
62 62
           <el-col :span="8">
63 63
             <el-form-item label="通讯地址(地市)" prop="city">
64
-              <second-level-remote-select v-model="personalForm.city" :base-id="personalForm.province"></second-level-remote-select>
64
+              <second-level-remote-select v-model="personalForm.city" :base-id="personalForm.province" :readonly="readonly"></second-level-remote-select>
65 65
             </el-form-item>
66 66
           </el-col>
67 67
           <el-col :span="8">
68 68
             <el-form-item label="通讯地址(县区)" prop="county">
69
-              <second-level-remote-select v-model="personalForm.county" :base-id="personalForm.city"></second-level-remote-select>
69
+              <second-level-remote-select v-model="personalForm.county" :base-id="personalForm.city" :readonly="readonly"></second-level-remote-select>
70 70
             </el-form-item>
71 71
           </el-col>
72 72
         </el-row>
73 73
         <el-row type="flex" align="middle" justify="center" class="row">
74 74
           <el-col :span="8">
75 75
             <el-form-item label="通讯详细地址(含门牌号)" prop="address" label-width="180px">
76
-              <el-input v-model="personalForm.address"></el-input>
76
+              <el-input v-model="personalForm.address" :readonly="readonly"></el-input>
77 77
             </el-form-item>
78 78
           </el-col>
79 79
           <el-col :span="8">
80 80
             <el-form-item label="联系人姓名" prop="linkman">
81
-              <el-input v-model="personalForm.linkman"></el-input>
81
+              <el-input v-model="personalForm.linkman" :readonly="readonly"></el-input>
82 82
             </el-form-item>
83 83
           </el-col>
84 84
           <el-col :span="8">
85 85
             <el-form-item label="联系人身份证号" prop="lxrsfzh">
86
-              <el-input v-model="personalForm.lxrsfzh"></el-input>
86
+              <el-input v-model="personalForm.lxrsfzh" :readonly="readonly"></el-input>
87 87
             </el-form-item>
88 88
           </el-col>
89 89
         </el-row>
90 90
         <el-row type="flex" align="middle" justify="center" class="row">
91 91
           <el-col :span="8">
92 92
             <el-form-item label="开票信息(发票抬头)" prop="invoiceTitle" label-width="180px">
93
-              <el-input v-model="personalForm.invoiceTitle"></el-input>
93
+              <el-input v-model="personalForm.invoiceTitle" :readonly="readonly"></el-input>
94 94
             </el-form-item>
95 95
           </el-col>
96 96
           <el-col :span="8">
97 97
             <el-form-item label="开户行名称" prop="bankName">
98
-              <common-select v-model="personalForm.bankName" type="kaihuhangmingcheng" :remote="true"></common-select>
98
+              <common-select v-model="personalForm.bankName" type="kaihuhangmingcheng" :remote="true" :readonly="readonly"></common-select>
99 99
             </el-form-item>
100 100
           </el-col>
101 101
           <el-col :span="8">
102 102
             <el-form-item label="银行账户名称" prop="accountName">
103
-              <el-input v-model="personalForm.accountName"></el-input>
103
+              <el-input v-model="personalForm.accountName" :readonly="readonly"></el-input>
104 104
             </el-form-item>
105 105
           </el-col>
106 106
         </el-row>
107 107
         <el-row type="flex" align="middle" justify="center" class="row">
108 108
           <el-col :span="8">
109 109
             <el-form-item label="开户账号" prop="accountNumber">
110
-              <el-input v-model="personalForm.accountNumber"></el-input>
110
+              <el-input v-model="personalForm.accountNumber" :readonly="readonly"></el-input>
111 111
             </el-form-item>
112 112
           </el-col>
113 113
           <el-col :span="8">
114 114
             <el-form-item label="客户所属地区名称" prop="district">
115
-              <el-input v-model="personalForm.district"></el-input>
115
+              <el-input v-model="personalForm.district" :readonly="readonly"></el-input>
116 116
             </el-form-item>
117 117
           </el-col>
118 118
           <el-col :span="8">
119 119
             <el-form-item label="种植面积(亩)" prop="plantAcreage">
120
-              <el-input v-model="personalForm.plantAcreage"></el-input>
120
+              <el-input v-model="personalForm.plantAcreage" :readonly="readonly"></el-input>
121 121
             </el-form-item>
122 122
           </el-col>
123 123
         </el-row>
124 124
         <el-row type="flex" align="middle" justify="center" class="row">
125 125
           <el-col :span="8">
126 126
             <el-form-item label="每亩的价外补贴数量(公斤)" prop="subsidy" label-width="180px">
127
-              <el-input v-model="personalForm.subsidy"></el-input>
127
+              <el-input v-model="personalForm.subsidy" :readonly="readonly"></el-input>
128 128
             </el-form-item>
129 129
           </el-col>
130 130
           <el-col :span="8">
131 131
             <el-form-item label="计划客户" prop="businessRegistNum">
132
-              <el-input v-model="personalForm.businessRegistNum"></el-input>
132
+              <el-input v-model="personalForm.businessRegistNum" :readonly="readonly"></el-input>
133 133
             </el-form-item>
134 134
           </el-col>
135 135
           <el-col :span="8">
136 136
             <el-form-item label="收款人" prop="administrativeDivision">
137
-              <el-input v-model="personalForm.administrativeDivision"></el-input>
137
+              <el-input v-model="personalForm.administrativeDivision" :readonly="readonly"></el-input>
138 138
             </el-form-item>
139 139
           </el-col>
140 140
         </el-row>
141 141
         <el-row type="flex" align="middle" justify="center" class="row">
142 142
           <el-col :span="8">
143 143
             <el-form-item label="开户行号" prop="khhh">
144
-              <el-input v-model="personalForm.khhh"></el-input>
144
+              <el-input v-model="personalForm.khhh" :readonly="readonly"></el-input>
145 145
             </el-form-item>
146 146
           </el-col>
147 147
           <el-col :span="8">
148 148
             <el-form-item label="邮政编码" prop="yzbm">
149
-              <el-input v-model="personalForm.yzbm"></el-input>
149
+              <el-input v-model="personalForm.yzbm" :readonly="readonly"></el-input>
150 150
             </el-form-item>
151 151
           </el-col>
152 152
           <el-col :span="8"></el-col>
@@ -154,7 +154,7 @@
154 154
         <el-row type="flex" align="middle" justify="center" class="row">
155 155
           <el-col :span="24">
156 156
             <el-form-item label="客户描述" prop="remark">
157
-              <el-input type="textarea" v-model="personalForm.remark"></el-input>
157
+              <el-input type="textarea" v-model="personalForm.remark" :readonly="readonly"></el-input>
158 158
             </el-form-item>
159 159
           </el-col>
160 160
         </el-row>
@@ -166,131 +166,131 @@
166 166
         <el-row type="flex" align="middle" justify="center" class="row">
167 167
           <el-col :span="8">
168 168
             <el-form-item label="企业性质" prop="generalProperty">
169
-              <el-input v-model="companyForm.generalProperty"></el-input>
169
+              <el-input v-model="companyForm.generalProperty" :readonly="readonly"></el-input>
170 170
             </el-form-item>
171 171
           </el-col>
172 172
           <el-col :span="8">
173 173
             <el-form-item label="统一社会信用代码" prop="socialCreditCode">
174
-              <el-input v-model="companyForm.socialCreditCode"></el-input>
174
+              <el-input v-model="companyForm.socialCreditCode" :readonly="readonly"></el-input>
175 175
             </el-form-item>
176 176
           </el-col>
177 177
           <el-col :span="8">
178 178
             <el-form-item label="注册资本(万元)" prop="registeredCapital">
179
-              <el-input v-model="companyForm.registeredCapital"></el-input>
179
+              <el-input v-model="companyForm.registeredCapital" :readonly="readonly"></el-input>
180 180
             </el-form-item>
181 181
           </el-col>
182 182
         </el-row>
183 183
         <el-row type="flex" align="middle" justify="center" class="row">
184 184
           <el-col :span="8">
185 185
             <el-form-item label="法人" prop="legalPerson">
186
-              <el-input v-model="companyForm.legalPerson"></el-input>
186
+              <el-input v-model="companyForm.legalPerson" :readonly="readonly"></el-input>
187 187
             </el-form-item>
188 188
           </el-col>
189 189
           <el-col :span="8">
190 190
             <el-form-item label="联系人" prop="linkman">
191
-              <el-input v-model="companyForm.linkman"></el-input>
191
+              <el-input v-model="companyForm.linkman" :readonly="readonly"></el-input>
192 192
             </el-form-item>
193 193
           </el-col>
194 194
           <el-col :span="8">
195 195
             <el-form-item label="联系人身份证号" prop="lxrsfzh">
196
-              <el-input v-model="companyForm.lxrsfzh"></el-input>
196
+              <el-input v-model="companyForm.lxrsfzh" :readonly="readonly"></el-input>
197 197
             </el-form-item>
198 198
           </el-col>
199 199
         </el-row>
200 200
         <el-row type="flex" align="middle" justify="center" class="row">
201 201
           <el-col :span="8">
202 202
             <el-form-item label="通讯地址(省/直辖市)" prop="province">
203
-              <common-select v-model="companyForm.province" type="xzqh" :remote="true"></common-select>
203
+              <common-select v-model="companyForm.province" type="xzqh" :remote="true" :readonly="readonly"></common-select>
204 204
             </el-form-item>
205 205
           </el-col>
206 206
           <el-col :span="8">
207 207
             <el-form-item label="通讯地址(地市)" prop="city">
208
-              <second-level-remote-select v-model="companyForm.city" :base-id="companyForm.province"></second-level-remote-select>
208
+              <second-level-remote-select v-model="companyForm.city" :base-id="companyForm.province" :readonly="readonly"></second-level-remote-select>
209 209
             </el-form-item>
210 210
           </el-col>
211 211
           <el-col :span="8">
212 212
             <el-form-item label="通讯地址(县区)" prop="county">
213
-              <second-level-remote-select v-model="companyForm.county" :base-id="companyForm.city"></second-level-remote-select>
213
+              <second-level-remote-select v-model="companyForm.county" :base-id="companyForm.city" :readonly="readonly"></second-level-remote-select>
214 214
             </el-form-item>
215 215
           </el-col>
216 216
         </el-row>
217 217
         <el-row type="flex" align="middle" justify="center" class="row">
218 218
           <el-col :span="8">
219 219
             <el-form-item label="联系地址" prop="address">
220
-              <el-input v-model="companyForm.address"></el-input>
220
+              <el-input v-model="companyForm.address" :readonly="readonly"></el-input>
221 221
             </el-form-item>
222 222
           </el-col>
223 223
           <el-col :span="8">
224 224
             <el-form-item label="企业电话" prop="enterprisePhone">
225
-              <el-input v-model="companyForm.enterprisePhone"></el-input>
225
+              <el-input v-model="companyForm.enterprisePhone" :readonly="readonly"></el-input>
226 226
             </el-form-item>
227 227
           </el-col>
228 228
           <el-col :span="8">
229 229
             <el-form-item label="电子邮件" prop="email">
230
-              <el-input v-model="companyForm.email"></el-input>
230
+              <el-input v-model="companyForm.email" :readonly="readonly"></el-input>
231 231
             </el-form-item>
232 232
           </el-col>
233 233
         </el-row>
234 234
         <el-row type="flex" align="middle" justify="center" class="row">
235 235
           <el-col :span="8">
236 236
             <el-form-item label="开票信息(发票抬头)" prop="invoiceTitle">
237
-              <el-input v-model="companyForm.invoiceTitle"></el-input>
237
+              <el-input v-model="companyForm.invoiceTitle" :readonly="readonly"></el-input>
238 238
             </el-form-item>
239 239
           </el-col>
240 240
           <el-col :span="8">
241 241
             <el-form-item label="开户行名称" prop="bankName">
242
-              <common-select v-model="companyForm.bankName" type="kaihuhangmingcheng" :remote="true"></common-select>
242
+              <common-select v-model="companyForm.bankName" type="kaihuhangmingcheng" :remote="true" :readonly="readonly"></common-select>
243 243
             </el-form-item>
244 244
           </el-col>
245 245
           <el-col :span="8">
246 246
             <el-form-item label="银行账户名称" prop="accountName">
247
-              <el-input v-model="companyForm.accountName"></el-input>
247
+              <el-input v-model="companyForm.accountName" :readonly="readonly"></el-input>
248 248
             </el-form-item>
249 249
           </el-col>
250 250
         </el-row>
251 251
         <el-row type="flex" align="middle" justify="center" class="row">
252 252
           <el-col :span="8">
253 253
             <el-form-item label="开户账号" prop="accountNumber">
254
-              <el-input v-model="companyForm.accountNumber"></el-input>
254
+              <el-input v-model="companyForm.accountNumber" :readonly="readonly"></el-input>
255 255
             </el-form-item>
256 256
           </el-col>
257 257
           <el-col :span="8">
258 258
             <el-form-item label="客户所属地区名称" prop="district">
259
-              <el-input v-model="companyForm.district"></el-input>
259
+              <el-input v-model="companyForm.district" :readonly="readonly"></el-input>
260 260
             </el-form-item>
261 261
           </el-col>
262 262
           <el-col :span="8">
263 263
             <el-form-item label="种植面积(亩)" prop="plantAcreage">
264
-              <el-input v-model="companyForm.plantAcreage"></el-input>
264
+              <el-input v-model="companyForm.plantAcreage" :readonly="readonly"></el-input>
265 265
             </el-form-item>
266 266
           </el-col>
267 267
         </el-row>
268 268
         <el-row type="flex" align="middle" justify="center" class="row">
269 269
           <el-col :span="8">
270 270
             <el-form-item label="每亩的价外补贴数量(公斤)" prop="subsidy">
271
-              <el-input v-model="companyForm.subsidy"></el-input>
271
+              <el-input v-model="companyForm.subsidy" :readonly="readonly"></el-input>
272 272
             </el-form-item>
273 273
           </el-col>
274 274
           <el-col :span="8">
275 275
             <el-form-item label="计划客户" prop="businessRegistNum">
276
-              <el-input v-model="companyForm.businessRegistNum"></el-input>
276
+              <el-input v-model="companyForm.businessRegistNum" :readonly="readonly"></el-input>
277 277
             </el-form-item>
278 278
           </el-col>
279 279
           <el-col :span="8">
280 280
             <el-form-item label="收款人" prop="administrativeDivision">
281
-              <el-input v-model="companyForm.administrativeDivision"></el-input>
281
+              <el-input v-model="companyForm.administrativeDivision" :readonly="readonly"></el-input>
282 282
             </el-form-item>
283 283
           </el-col>
284 284
         </el-row>
285 285
         <el-row type="flex" align="middle" justify="center" class="row">
286 286
           <el-col :span="8">
287 287
             <el-form-item label="开户行号" prop="khhh">
288
-              <el-input v-model="companyForm.khhh"></el-input>
288
+              <el-input v-model="companyForm.khhh" :readonly="readonly"></el-input>
289 289
             </el-form-item>
290 290
           </el-col>
291 291
           <el-col :span="8">
292 292
             <el-form-item label="邮政编码" prop="lxrsfzh">
293
-              <el-input v-model="companyForm.yzbm"></el-input>
293
+              <el-input v-model="companyForm.yzbm" :readonly="readonly"></el-input>
294 294
             </el-form-item>
295 295
           </el-col>
296 296
           <el-col :span="8"></el-col>
@@ -298,7 +298,7 @@
298 298
         <el-row type="flex" align="middle" justify="center" class="row">
299 299
           <el-col :span="24">
300 300
             <el-form-item label="客户描述" prop="lxrsfzh">
301
-              <el-input type="textarea" v-model="companyForm.remark"></el-input>
301
+              <el-input type="textarea" v-model="companyForm.remark" :readonly="readonly"></el-input>
302 302
             </el-form-item>
303 303
           </el-col>
304 304
         </el-row>
@@ -306,7 +306,7 @@
306 306
     </div>
307 307
 
308 308
     <span slot="footer" class="dialog-footer">
309
-        <el-button type="primary" @click="onSave" :disabled="!canSave">确定</el-button>
309
+        <el-button v-if="!readonly" type="primary" @click="onSave" :disabled="!canSave">确定</el-button>
310 310
         <el-button @click="show = false">取消</el-button>
311 311
     </span>
312 312
   </el-dialog>
@@ -368,7 +368,7 @@ export default {
368 368
     },
369 369
   },
370 370
   mounted() {
371
-    if(this.isEdit) {
371
+    if(this.isEdit || this.isView) {
372 372
       this.loading = true
373 373
       getCustomer(this.editId).then(resp => {
374 374
         const type = resp.classify
@@ -410,6 +410,12 @@ export default {
410 410
     },
411 411
     isEdit() {
412 412
       return this.action === 'edit'
413
+    },
414
+    isView() {
415
+      return this.action === 'view'
416
+    },
417
+    readonly(){
418
+      return this.isView
413 419
     }
414 420
   },
415 421
   data() {

+ 1 - 0
src/components/system/keeper/keeperListEdit.vue

@@ -494,6 +494,7 @@ export default {
494 494
       })
495 495
     },
496 496
     getUserOptions() {
497
+      console.log('获取用户选项', this.orgId)
497 498
       return getUser({orgId: this.orgId}).then(resp => {
498 499
         const list = resp.list
499 500
         this.userOptions = list.map(d => {

+ 1 - 0
src/components/upload/v2.vue

@@ -75,6 +75,7 @@ export default {
75 75
   },
76 76
   watch: {
77 77
     fileList(n) {
78
+      console.log('上传组件 文件列表变化 ', n, this.parseFileList(n))
78 79
       this.uploadFiles = this.parseFileList(n)
79 80
     }
80 81
   },

+ 36 - 11
src/page/ACCinventory/index.vue

@@ -4,10 +4,18 @@
4 4
       <el-row>
5 5
         <el-form label-width="120px" :inline="true" class="demo-form-inline search-form">
6 6
           <el-form-item label="仓房名称:" prop="unitName">
7
-            <el-input class="title-box" autocomplete="off" v-model:value="searchData.houseName" />
7
+            <el-select v-model="searchData.houseId" placeholder="请选择" @change="houseChanged">
8
+              <el-option v-for="item in houseOptions" :key="item.value" :label="item.label"
9
+                :value="item.value">
10
+              </el-option>
11
+            </el-select>
8 12
           </el-form-item>
9 13
           <el-form-item label="货位名称:" prop="unitName">
10
-            <el-input class="title-box" autocomplete="off" v-model:value="searchData.wareName" />
14
+            <el-select v-model="searchData.wareId" placeholder="请选择">
15
+              <el-option v-for="item in wareOptions" :key="item.value" :label="item.label"
16
+                :value="item.value">
17
+              </el-option>
18
+            </el-select>
11 19
           </el-form-item>
12 20
           <el-form-item label="商品名称:" prop="unitName">
13 21
             <el-input class="title-box" autocomplete="off" v-model:value="searchData.sjjlspmc" />
@@ -28,10 +36,6 @@
28 36
       <el-table-column align="center" prop="chmc" label="仓房名称"></el-table-column>
29 37
       </el-table-column>
30 38
       <el-table-column align="center" prop="hwmc" label="货位名称">
31
-        <!-- <template v-slot="scope">
32
-<div v-if="scope.row.standardType == 1">保管费用标准 </div>
33
-<div v-if="scope.row.standardType == 2">轮换费用标准 </div>
34
-        </template> -->
35 39
       </el-table-column>
36 40
       <el-table-column align="center" prop="sjjlspmc" label="商品名称"></el-table-column>
37 41
       <el-table-column align="center" prop="sjjlpzmc" label="品种"></el-table-column>
@@ -72,8 +76,8 @@ export default {
72 76
       },
73 77
       searchData: {
74 78
         sjjlspmc: "",
75
-        houseName: "",
76
-        wareName: ""
79
+        houseId: "",
80
+        wareId: ""
77 81
       },
78 82
       limit: {
79 83
         page: 1,
@@ -81,14 +85,35 @@ export default {
81 85
         total: 0,
82 86
       },
83 87
       tableData: [],
88
+      houseOptions: [],
89
+      wareOptions: [],
84 90
     }
85 91
   },
86 92
 
87 93
   mounted () {
88 94
     this.getList()
95
+    this.getHouseOptions()
89 96
   },
90
-
91 97
   methods: {
98
+    houseChanged (n) {
99
+      if (n) {
100
+        this.searchData.wareId = ''
101
+        this.getWareOptions(n)
102
+      } else {
103
+        this.wareOptions = []
104
+        this.searchData.wareId = ''
105
+      }
106
+    },
107
+    getHouseOptions () {
108
+      this.houseOptions = []
109
+      this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
110
+    },
111
+    getWareOptions (houseId) {
112
+      this.wareOptions = []
113
+      this.$systemUtils.getWarehouseOption(this.orgId, houseId).then(opt => this.wareOptions = opt)
114
+    },
115
+
116
+
92 117
     getList () {
93 118
       const userInfoJSON = JSON.parse(sessionStorage.getItem("userInfo"))
94 119
       const obj = {
@@ -111,8 +136,8 @@ export default {
111 136
     // 重置
112 137
     reset () {
113 138
       this.searchData.sjjlspmc = ""
114
-      this.searchData.houseName = ""
115
-      this.searchData.wareName = ""
139
+      this.searchData.houseId = ""
140
+      this.searchData.wareId = ""
116 141
       this.getList()
117 142
     },
118 143
     // 新增

+ 0 - 3
src/page/Layout/layout.vue

@@ -55,9 +55,6 @@ export default {
55 55
       u: localStorage.getItem("_userName"),
56 56
       p: localStorage.getItem("_password"),
57 57
       clientHeight: document.documentElement.clientHeight,
58
-      // url: `http://101.36.160.210:31055/crk/?ku_username=${u}&ku_password=${p}`,
59
-      // url: `http://localhost:9528/crk/welcome/?username=${u}&password=${p}`,
60
-      // url: `http://101.36.160.210:31055/crk/?ku_username=${u}&ku_password=${p}`,
61 58
       url: `http://101.36.160.210:31055/crk/#/welcome?username=${u}&password=${p}`,
62 59
     };
63 60
   },

+ 10 - 69
src/page/Layout/menuList/menuItem.vue

@@ -1,80 +1,20 @@
1 1
 <template>
2 2
   <div class="menuItem-wrapper">
3
-    <template v-for="(firstItem,firstIndex) in routeList">
4
-      <el-menu-item
5
-        v-if="firstItem.children.length === 0"
6
-        :index="firstItem.resourceUrl"
7
-        :key="firstIndex"
8
-        @click="handleSelect(firstItem)"
9
-      >
10
-<!--        <span class="iconfont icondian iconStyle"></span>-->
11
-        <span v-if="firstItem.resourceName" slot="title" class="test">{{firstItem.resourceName}}</span>
12
-
13
-      </el-menu-item>
14
-      <el-submenu v-else :index="firstIndex + ''" :key="firstItem.resourceCode">
15
-        <template slot="title">
16
-<!--          <span class="iconfont icondian iconStyle"></span>-->
17
-          <span slot="title">{{firstItem.resourceName}}</span>
18
-        </template>
19
-        <template v-for="(secondItem,secondIndex) in firstItem.children">
20
-          <el-menu-item
21
-            :index="secondItem.resourceUrl"
22
-            v-if="secondItem.children.length == 0"
23
-            :key="secondIndex"
24
-            class="menuSecondary2"
25
-            @click="handleSelect(secondItem)"
26
-          >
27
-<!--            <span class="iconfont icondian iconStyle"></span>-->
28
-            <span slot="title">{{secondItem.resourceName}}</span>
29
-          </el-menu-item>
30
-          <el-submenu
31
-            v-else
32
-            :index="firstIndex + '-' + secondIndex"
33
-            :key="secondIndex"
34
-            class="menuSecondaryWrap2"
35
-          >
36
-            <template slot="title">
37
-<!--              <span class="iconfont icondian iconStyle"></span>-->
38
-              <span v-if="secondItem.resourceName" slot="title">{{secondItem.resourceName}}</span>
39
-            </template>
40
-            <template v-for="(thirdItem,thirdIndex) in secondItem.children">
41
-
42
-              <el-menu-item
43
-                :index="thirdItem.resourceUrl"
44
-                v-if="thirdItem.children.length == 0"
45
-                :key="thirdIndex"
46
-                :title="thirdItem.resourceName"
47
-                class="menuThirdGrade1"
48
-                @click="handleSelect(thirdItem)"
49
-              >
50
-                <span slot="title">{{thirdItem.resourceName}}</span>
51
-              </el-menu-item>
52
-              <el-submenu
53
-                v-else
54
-                :index="firstIndex+'-'+secondIndex+'-'+thirdIndex"
55
-                :key="thirdIndex"
56
-              >
57
-                <template slot="title">{{thirdItem.resourceName}}</template>
58
-                <el-menu-item
59
-                  :index="fourthItem.resourceUrl"
60
-                  :title="fourthItem.resourceName"
61
-                  v-if="fourthItem.children.length === 0"
62
-                  v-for="(fourthItem,fourthIndex) in thirdItem.children"
63
-                  :key="fourthIndex"
64
-                  @click="handleSelect(fourthItem)"
65
-                >{{fourthItem.resourceName}}</el-menu-item>
66
-              </el-submenu>
67
-            </template>
68
-          </el-submenu>
69
-        </template>
70
-      </el-submenu>
71
-    </template>
3
+    <my-menu-item
4
+      v-for="(firstItem, firstIndex) in routeList"
5
+      :key="firstIndex"
6
+      :item="firstItem"
7
+      :index="firstIndex + ''"
8
+      @handle-select="handleSelect"
9
+      />
72 10
   </div>
73 11
 </template>
74 12
 
75 13
 
76 14
 
77 15
 <script>
16
+import MyMenuItem from "@/page/Layout/menuList/myMenuItem.vue";
17
+
78 18
 export default {
79 19
   name: "menuItem",
80 20
   props: {
@@ -82,6 +22,7 @@ export default {
82 22
       type: Array
83 23
     }
84 24
   },
25
+  components: {MyMenuItem},
85 26
   data() {
86 27
     return {};
87 28
   },

+ 4 - 2
src/page/Layout/menuList/menuList.vue

@@ -11,7 +11,7 @@
11 11
         :default-openeds="defaultOpened"
12 12
         :unique-opened="true"
13 13
       >
14
-        <Menu-item :routeList="leftMenuList"></Menu-item>
14
+        <Menu-item :routeList="routeList"></Menu-item>
15 15
       </el-menu>
16 16
     </el-scrollbar>
17 17
   </div>
@@ -46,6 +46,7 @@ export default {
46 46
   watch: {
47 47
     leftMenuList(n, o) {
48 48
       this.defaultActive = this.defaultActiveUrl
49
+      this.routeList = n
49 50
       console.log('菜单修改', n, this.defaultActive)
50 51
     },
51 52
     defaultActiveUrl(n, o) {
@@ -55,7 +56,8 @@ export default {
55 56
   created() {
56 57
     // alert("99");
57 58
     // console.log(JSON.parse(sessionStorage.getItem('leftMenuList')))
58
-    // this.routeList = this.routes()
59
+    this.routeList = this.routes()
60
+    console.log('left menu list', this.routeList)
59 61
     let href = window.location.href;
60 62
     // console.log(href, "href");
61 63
     // console.log(this.$route.path, "this.$route.path");

+ 38 - 0
src/page/Layout/menuList/myMenuItem.vue

@@ -0,0 +1,38 @@
1
+<template>
2
+  <el-submenu v-if="item.children && item.children.length" :index="index" :key="item.funcId">
3
+    <template slot="title">
4
+      <span v-if="item.funcName" slot="title">{{ item.funcName }}</span>
5
+    </template>
6
+    <my-menu-item
7
+      v-for="(child, childIndex) in item.children"
8
+      :key="childIndex"
9
+      :item="child"
10
+      :index="index + '-' + childIndex"
11
+      @handle-select="handleSelect"
12
+    ></my-menu-item>
13
+  </el-submenu>
14
+  <el-menu-item v-else :index="item.funcUrl" :key="index" @click="handleSelect(item)">
15
+    <span v-if="item.funcName" slot="title" class="test">{{ item.funcName }}</span>
16
+  </el-menu-item>
17
+</template>
18
+
19
+<script>
20
+export default {
21
+  name: 'MyMenuItem',
22
+  props: {
23
+    item: {
24
+      type: Object,
25
+      required: true
26
+    },
27
+    index: {
28
+      type: String,
29
+      required: true
30
+    }
31
+  },
32
+  methods: {
33
+    handleSelect(item) {
34
+      this.$emit('handle-select', item);
35
+    }
36
+  }
37
+};
38
+</script>

+ 1 - 1
src/page/ProcurementAndSales/components/monthlyReport.vue

@@ -100,7 +100,7 @@
100 100
               /> </el-form-item
101 101
           ></el-col>
102 102
           <el-col :span="8"
103
-            ><el-form-item label="采购金额">
103
+            ><el-form-item label="采购金额(元)">
104 104
               <el-input
105 105
                 class="title-box"
106 106
                 autocomplete="off"

+ 260 - 0
src/page/StorehouseAnalyze/index.vue

@@ -0,0 +1,260 @@
1
+<template>
2
+  <!-- 廒间管理 -->
3
+  <div class="content-main">
4
+    <div class="search-bm-boder">
5
+      <el-row>
6
+        <el-form
7
+          :model="form"
8
+          label-width="80px"
9
+          ref="searchForm"
10
+          :inline="true"
11
+          class="demo-form-inline search-form"
12
+        >
13
+<!--          <el-form-item label="库区名称:" prop="storeName">-->
14
+<!--            <el-input />-->
15
+<!--          </el-form-item>-->
16
+          <el-form-item label="预警类型:" prop="warnType">
17
+            <el-input v-model="form.warnType" />
18
+          </el-form-item>
19
+          <div class="search-button">
20
+            <span class="search-line"></span>
21
+            <el-button
22
+              type="primary"
23
+              @click="search"
24
+              size="small"
25
+              class="iconfont iconchaxun"
26
+            >查询</el-button
27
+            >
28
+            <el-button
29
+              type="primary"
30
+              @click="reset('searchForm')"
31
+              size="small"
32
+              class="iconfont iconzhongzhi"
33
+            >重置</el-button
34
+            >
35
+          </div>
36
+        </el-form>
37
+      </el-row>
38
+    </div>
39
+
40
+    <el-table
41
+      :data="tableData"
42
+      border
43
+      stripe
44
+      highlight-current-row
45
+      v-loading="listLoading"
46
+      style="width: 100%"
47
+    >
48
+      <el-table-column
49
+        align="center"
50
+        type="index"
51
+        width="60"
52
+        label="序号"
53
+      ></el-table-column>
54
+      <el-table-column
55
+        align="center"
56
+        prop="orgName"
57
+        label="库区名称"
58
+      ></el-table-column>
59
+      <el-table-column
60
+        align="center"
61
+        prop="warnType"
62
+        label="违规类型"
63
+      ></el-table-column>
64
+      <el-table-column
65
+        align="center"
66
+        prop="warnAct"
67
+        label="违规行为"
68
+      ></el-table-column>
69
+      <el-table-column
70
+        align="center"
71
+        prop="warnTime"
72
+        label="预警时间"
73
+      ></el-table-column>
74
+    </el-table>
75
+    <!-- 分页开始 -->
76
+    <div class="pag-right clearFix">
77
+      <el-pagination
78
+        class="right"
79
+        :current-page.sync="limit.page"
80
+        :page-size="limit.size"
81
+        :page-sizes="[10, 20, 30, 40]"
82
+        :total="limit.total"
83
+        @current-change="handleCurrentChangeTask"
84
+        @size-change="handleSizeChangeTask"
85
+        layout="total, sizes, prev, pager, next, jumper"
86
+        v-if="paginationShow"
87
+      ></el-pagination>
88
+
89
+      <div id="chart" class="chart">
90
+
91
+      </div>
92
+    </div>
93
+  </div>
94
+</template>
95
+
96
+<script>
97
+import {
98
+  simpleList,
99
+  hasHouseName,
100
+  hasWareName,
101
+  hasOrgName,
102
+  houseAndWareQuery,
103
+} from "@/components/simpleList";
104
+import { granaryList, granaryRemove } from "@/api/base";
105
+import {getPageList, getChartList} from "@/api/storehouseAnalyze";
106
+import * as echarts from 'echarts'
107
+
108
+export default {
109
+  name: "StorehouseAnalyze",
110
+  mixins: [simpleList, hasHouseName, houseAndWareQuery],
111
+  components: { },
112
+  data() {
113
+    return {
114
+      form: {
115
+        warnType: null,
116
+
117
+      },
118
+      chartList: [],
119
+    };
120
+  },
121
+  computed: {},
122
+  methods: {
123
+    setUp() {
124
+      this.getChartData()
125
+    },
126
+    getChartData() {
127
+      getChartList(this.orgId).then(resp => {
128
+        console.log('图表数据', resp)
129
+        if(resp.retCode == '200') {
130
+          let list = resp.data || []
131
+          // list = [
132
+          //     {
133
+          //       "months": "1",
134
+          //       "currentYearMonth_1": null,
135
+          //       "monthCount_1": '10',
136
+          //       "currentYearMonth_2": null,
137
+          //       "monthCount_2": '20',
138
+          //       "currentYearMonth_3": null,
139
+          //       "monthCount_3": '30'
140
+          //     },
141
+          //     {
142
+          //       "months": "2",
143
+          //       "currentYearMonth_1": null,
144
+          //       "monthCount_1": '30',
145
+          //       "currentYearMonth_2": null,
146
+          //       "monthCount_2": '20',
147
+          //       "currentYearMonth_3": null,
148
+          //       "monthCount_3": '10'
149
+          //     },
150
+          //     {
151
+          //       "months": "3",
152
+          //       "currentYearMonth_1": null,
153
+          //       "monthCount_1": null,
154
+          //       "currentYearMonth_2": null,
155
+          //       "monthCount_2": null,
156
+          //       "currentYearMonth_3": null,
157
+          //       "monthCount_3": null
158
+          //     },
159
+          //     {
160
+          //       "months": "4",
161
+          //       "currentYearMonth_1": null,
162
+          //       "monthCount_1": null,
163
+          //       "currentYearMonth_2": null,
164
+          //       "monthCount_2": null,
165
+          //       "currentYearMonth_3": null,
166
+          //       "monthCount_3": null
167
+          //     },
168
+          //   ]
169
+          this.chartList = list
170
+        }
171
+        else {
172
+          this.chartList = []
173
+        }
174
+        this.drawLine(this.chartList)
175
+      })
176
+    },
177
+    drawLine(list) {
178
+      this.$nextTick(() => {
179
+        const xData = []
180
+        const list1 = []
181
+        const list2 = []
182
+        const list3 = []
183
+        const dataList = []
184
+        list.sort((a, b) => parseInt(a.months) - parseInt(b.months))
185
+        list.forEach(d => {
186
+          xData.push(`${d.months}月`)
187
+          const monthCount_1 = d.monthCount_1 ? parseInt(d.monthCount_1) : 0
188
+          const monthCount_2 = d.monthCount_2 ? parseInt(d.monthCount_2) : 0
189
+          const monthCount_3 = d.monthCount_3 ? parseInt(d.monthCount_3) : 0
190
+          list1.push(monthCount_1)
191
+          list2.push(monthCount_2)
192
+          list3.push(monthCount_3)
193
+        })
194
+        dataList.push({
195
+          name: `在库时间异常`,
196
+          type: 'bar',
197
+          data: list1
198
+        })
199
+        dataList.push({
200
+          name: `临近轮换期`,
201
+          type: 'bar',
202
+          data: list2
203
+        })
204
+        dataList.push({
205
+          name: `超架空期`,
206
+          type: 'bar',
207
+          data: list3
208
+        })
209
+        console.log('data', xData, dataList)
210
+        const options = {
211
+          tooltip: {
212
+            trigger: 'axis',
213
+            axisPointer: {
214
+              type: 'shadow'
215
+            }
216
+          },
217
+          legend: {
218
+            data: ['在库时间异常', '临近轮换期', '超架空期']
219
+          },
220
+          grid: {
221
+            left: '3%',
222
+            right: '4%',
223
+            bottom: '3%',
224
+            containLabel: true
225
+          },
226
+          xAxis: {
227
+            type: 'category',
228
+            data: xData
229
+          },
230
+          yAxis: {
231
+            type: 'value'
232
+          },
233
+          series: dataList
234
+        }
235
+
236
+        echarts.init(document.getElementById('chart')).setOption(options);
237
+      })
238
+
239
+    },
240
+    getConstantsQuery() {
241
+      console.log('orgId = ', this.orgId)
242
+      return {
243
+        orgId: this.orgId,
244
+      };
245
+    },
246
+    // 列表接口
247
+    getListFun() {
248
+      return getPageList;
249
+    },
250
+  },
251
+};
252
+</script>
253
+
254
+<style scoped lang="scss">
255
+.chart {
256
+  margin-top: 10px;
257
+  width: 100%;
258
+  min-height: 600px;
259
+}
260
+</style>

+ 37 - 0
src/page/StorehouseView/view1.vue

@@ -0,0 +1,37 @@
1
+<template>
2
+  <div class="view">
3
+    <el-image v-if="img" :src="img" style="width: 100%;"/>
4
+    <div v-else class="tips">
5
+      您还没有上传图片
6
+    </div>
7
+  </div>
8
+</template>
9
+<script>
10
+export default {
11
+  name: "view1",
12
+  data() {
13
+    return {
14
+      img: null
15
+    }
16
+  },
17
+  mounted() {
18
+    const orgInfo = JSON.parse(sessionStorage.getItem('orgInfo'))
19
+    console.log('orgInfo', orgInfo)
20
+    this.img = orgInfo.birdsRemote
21
+  }
22
+}
23
+</script>
24
+
25
+<style scoped lang="scss">
26
+.view {
27
+  width: 100%;
28
+  height: 100%;
29
+}
30
+.tips {
31
+  width: 100%;
32
+  min-height: 200px;
33
+  display: flex;
34
+  justify-content: center;
35
+  align-items: center;
36
+}
37
+</style>

+ 37 - 0
src/page/StorehouseView/view2.vue

@@ -0,0 +1,37 @@
1
+<template>
2
+  <div class="view">
3
+    <el-image v-if="img" :src="img" style="width: 100%;"/>
4
+    <div v-else class="tips">
5
+      您还没有上传图片
6
+    </div>
7
+  </div>
8
+</template>
9
+<script>
10
+export default {
11
+  name: "view1",
12
+  data() {
13
+    return {
14
+      img: null
15
+    }
16
+  },
17
+  mounted() {
18
+    const orgInfo = JSON.parse(sessionStorage.getItem('orgInfo'))
19
+    console.log('orgInfo', orgInfo)
20
+    this.img = orgInfo.birdsRemote
21
+  }
22
+}
23
+</script>
24
+
25
+<style scoped lang="scss">
26
+.view {
27
+  width: 100%;
28
+  height: 100%;
29
+}
30
+.tips {
31
+  width: 100%;
32
+  min-height: 200px;
33
+  display: flex;
34
+  justify-content: center;
35
+  align-items: center;
36
+}
37
+</style>

+ 29 - 6
src/page/alerting/cameraAlerting.vue

@@ -9,9 +9,10 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="报警时间:" prop="beginDate">
12
+          <el-form-item label="报警时间:" prop="bjsj">
13 13
             <el-date-picker
14
-              v-model="form.beginDate"
14
+              v-model="form.bjsj"
15
+              value-format="yyyy-MM-dd"
15 16
               type="date">
16 17
             </el-date-picker>
17 18
           </el-form-item>
@@ -111,6 +112,7 @@
111 112
 
112 113
 import commonSelect from "@/components/common/commonSelect"
113 114
 import consumerAdd from '@/components/system/customer/customerAdd'
115
+import {getSxtgzsList} from "@/api/alerting";
114 116
 
115 117
 
116 118
 
@@ -129,9 +131,7 @@ export default {
129 131
       },
130 132
       tableData: [],
131 133
       form: {
132
-        type: null,
133
-        beginDate: null,
134
-        endDate: null,
134
+        bjsj: null,
135 135
       },
136 136
       paginationShow: true,
137 137
       listLoading: false,
@@ -143,14 +143,18 @@ export default {
143 143
   computed: {
144 144
 
145 145
   },
146
+  mounted() {
147
+    this.getList()
148
+  },
146 149
   methods: {
147 150
     search() {
148
-
151
+      this.getList()
149 152
     },
150 153
     reset(formName) {
151 154
       if(this.$refs[formName]) {
152 155
         this.$refs[formName].resetFields()
153 156
       }
157
+      this.getList()
154 158
     },
155 159
     add(inOut, notification) {
156 160
       this.inOutType = inOut
@@ -163,6 +167,25 @@ export default {
163 167
         this.listLoading = false
164 168
       })
165 169
     },
170
+    getList() {
171
+      this.listLoading = true
172
+      getSxtgzsList(this.limit, {orgId: this.orgId, ... this.form}).then(resp => {
173
+        if(resp && resp.retCode == '200' ) {
174
+          const data = resp.data
175
+          this.tableData = data.list
176
+          this.limit = {
177
+            page: data.pageNum,
178
+            size: data.pageSize,
179
+            total: data.total,
180
+          }
181
+        }else {
182
+          this.$message.error(resp.msg)
183
+        }
184
+
185
+      }).finally(() => {
186
+        this.listLoading = false
187
+      })
188
+    },
166 189
     manage(data) {
167 190
 
168 191
     },

+ 13 - 8
src/page/alerting/circleGrainAlerting.vue

@@ -9,13 +9,14 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="车牌号:" prop="name">
13
-            <el-input v-model="form.name" ></el-input>
12
+          <el-form-item label="车牌号:" prop="cphm">
13
+            <el-input v-model="form.cphm" ></el-input>
14 14
           </el-form-item>
15
-          <el-form-item label="日期:" prop="beginDate">
15
+          <el-form-item label="日期:" prop="date">
16 16
             <el-date-picker
17
-              v-model="form.beginDate"
17
+              v-model="form.date"
18 18
               type="daterange"
19
+              value-format="yyyy-MM-dd"
19 20
               range-separator="至"
20 21
               start-placeholder="开始日期"
21 22
               end-placeholder="结束日期">
@@ -141,9 +142,8 @@ export default {
141 142
       },
142 143
       tableData: [],
143 144
       form: {
144
-        type: null,
145
-        beginDate: null,
146
-        endDate: null,
145
+        cphm: null,
146
+        date: [],
147 147
       },
148 148
       paginationShow: true,
149 149
       listLoading: false,
@@ -182,7 +182,12 @@ export default {
182 182
     },
183 183
     getList() {
184 184
       this.listLoading = true
185
-      getZqlyjxxList(this.limit, {...this.form}).then(resp => {
185
+      const [startTime, endTime] = this.form.date
186
+      const q = {
187
+        startTime, endTime,
188
+        cphm: this.form.cphm
189
+      }
190
+      getZqlyjxxList(this.limit, {...q}).then(resp => {
186 191
         if (resp.code == '200') {
187 192
           const data = resp.data
188 193
           this.tableData = data.list

+ 22 - 8
src/page/alerting/condensationAlerting.vue

@@ -13,13 +13,21 @@
13 13
             <el-button type="primary" size="small" icon="el-icon-printer" @click="print()">打印</el-button>
14 14
             <el-divider direction="vertical"></el-divider>
15 15
           </el-form-item>
16
-          <el-form-item label="仓房名称:" prop="cfmc">
17
-            <common-select v-model="form.cfmc" type="STOREHOUSE"></common-select>
16
+          <el-form-item label="仓房名称:" prop="cfbm">
17
+            <el-select v-model="form.cfbm" placeholder="请选择">
18
+              <el-option
19
+                v-for="item in houseOptions"
20
+                :key="item.value"
21
+                :label="item.label"
22
+                :value="item.value">
23
+              </el-option>
24
+            </el-select>
18 25
           </el-form-item>
19
-          <el-form-item label="检查日期:" prop="beginDate">
26
+          <el-form-item label="检查日期:" prop="date">
20 27
             <el-date-picker
21
-              v-model="form.beginDate"
28
+              v-model="form.date"
22 29
               type="daterange"
30
+              value-format="yyyy-MM-dd"
23 31
               range-separator="至"
24 32
               start-placeholder="开始日期"
25 33
               end-placeholder="结束日期">
@@ -118,10 +126,10 @@ export default {
118 126
         total: 0
119 127
       },
120 128
       tableData: [],
129
+      houseOptions: [],
121 130
       form: {
122
-        cfmc: null,
123
-        beginDate: null,
124
-        endDate: null,
131
+        cfbm: null,
132
+        date: [],
125 133
       },
126 134
       paginationShow: true,
127 135
       listLoading: false,
@@ -134,6 +142,7 @@ export default {
134 142
     ...mapGetters(['userId', "orgId", 'userName', 'realName', 'orgCode']),
135 143
   },
136 144
   mounted() {
145
+    this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
137 146
     this.getList()
138 147
   },
139 148
   methods: {
@@ -160,7 +169,12 @@ export default {
160 169
     },
161 170
     getList() {
162 171
       this.listLoading = true
163
-      getDewingAlarmList(this.limit, { ... this.form}).then(resp => {
172
+      const [searchStartDate, searchEndDate] = this.form.date
173
+      const q = {
174
+        searchStartDate, searchEndDate,
175
+        cfbm: this.form.cfbm
176
+      }
177
+      getDewingAlarmList(this.limit, { ... q}).then(resp => {
164 178
         this.tableData = resp.list
165 179
         this.limit = {
166 180
           page: resp.pageNum,

+ 41 - 8
src/page/alerting/deviceAbnormalAlerting.vue

@@ -13,13 +13,21 @@
13 13
             <el-button type="primary" size="small" icon="el-icon-printer" @click="print()">打印</el-button>
14 14
             <el-divider direction="vertical"></el-divider>
15 15
           </el-form-item>
16
-          <el-form-item label="仓房名称:" prop="name">
17
-            <common-select v-model="form.name" type="STOREHOUSE"></common-select>
16
+          <el-form-item label="仓房名称:" prop="vCfCode">
17
+            <el-select v-model="form.vCfCode" placeholder="请选择">
18
+              <el-option
19
+                v-for="item in houseOptions"
20
+                :key="item.value"
21
+                :label="item.label"
22
+                :value="item.raw.storehouseCode">
23
+              </el-option>
24
+            </el-select>
18 25
           </el-form-item>
19
-          <el-form-item label="检查日期:" prop="beginDate">
26
+          <el-form-item label="检查日期:" prop="date">
20 27
             <el-date-picker
21
-              v-model="form.beginDate"
28
+              v-model="form.date"
22 29
               type="daterange"
30
+              value-format="yyyy-MM-dd"
23 31
               range-separator="至"
24 32
               start-placeholder="开始日期"
25 33
               end-placeholder="结束日期">
@@ -115,6 +123,7 @@
115 123
 
116 124
 import commonSelect from "@/components/common/commonSelect"
117 125
 import consumerAdd from '@/components/system/customer/customerAdd'
126
+import {getAbnormalEquipmentList} from "@/api/alerting";
118 127
 
119 128
 
120 129
 
@@ -132,10 +141,10 @@ export default {
132 141
         total: 0
133 142
       },
134 143
       tableData: [],
144
+      houseOptions: [],
135 145
       form: {
136
-        name: null,
137
-        beginDate: null,
138
-        endDate: null,
146
+        vCfCode: null,
147
+        date: [],
139 148
       },
140 149
       paginationShow: true,
141 150
       listLoading: false,
@@ -147,20 +156,44 @@ export default {
147 156
   computed: {
148 157
 
149 158
   },
159
+  mounted() {
160
+    this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
161
+    this.getList()
162
+  },
150 163
   methods: {
151 164
     search() {
152
-
165
+      this.getList()
153 166
     },
154 167
     reset(formName) {
155 168
       if(this.$refs[formName]) {
156 169
         this.$refs[formName].resetFields()
157 170
       }
171
+      this.getList()
158 172
     },
159 173
     add(inOut, notification) {
160 174
       this.inOutType = inOut
161 175
       this.notificationType = notification
162 176
       this.addShow = true
163 177
     },
178
+
179
+    getList() {
180
+      this.listLoading = true
181
+      const [searchStartDate, searchEndDate] = this.form.date
182
+      const q = {
183
+        searchStartDate, searchEndDate,
184
+        vCfCode: this.form.vCfCode
185
+      }
186
+      getAbnormalEquipmentList(this.limit, { ... q}).then(resp => {
187
+        this.tableData = resp.list
188
+        this.limit = {
189
+          page: resp.pageNum,
190
+          size: resp.pageSize,
191
+          total: resp.total,
192
+        }
193
+      }).finally(() => {
194
+        this.listLoading = false
195
+      })
196
+    },
164 197
     print() {
165 198
       this.listLoading = true
166 199
       this.$systemUtils.printTable(this.$refs.table.$el).finally(() => {

+ 42 - 8
src/page/alerting/humidityAlerting.vue

@@ -13,13 +13,21 @@
13 13
             <el-button type="primary" size="small" icon="el-icon-printer" @click="print()">打印</el-button>
14 14
             <el-divider direction="vertical"></el-divider>
15 15
           </el-form-item>
16
-          <el-form-item label="仓房名称:" prop="name">
17
-            <common-select v-model="form.name" type="STOREHOUSE"></common-select>
16
+          <el-form-item label="仓房名称:" prop="cfbm">
17
+            <el-select v-model="form.cfbm" placeholder="请选择">
18
+              <el-option
19
+                v-for="item in houseOptions"
20
+                :key="item.value"
21
+                :label="item.label"
22
+                :value="item.value">
23
+              </el-option>
24
+            </el-select>
18 25
           </el-form-item>
19
-          <el-form-item label="检查日期:" prop="beginDate">
26
+          <el-form-item label="检查日期:" prop="date">
20 27
             <el-date-picker
21
-              v-model="form.beginDate"
28
+              v-model="form.date"
22 29
               type="daterange"
30
+              value-format="yyyy-MM-dd"
23 31
               range-separator="至"
24 32
               start-placeholder="开始日期"
25 33
               end-placeholder="结束日期">
@@ -115,6 +123,7 @@
115 123
 
116 124
 import commonSelect from "@/components/common/commonSelect"
117 125
 import consumerAdd from '@/components/system/customer/customerAdd'
126
+import { getHumidnessAlarmList} from "@/api/alerting";
118 127
 
119 128
 
120 129
 
@@ -132,10 +141,10 @@ export default {
132 141
         total: 0
133 142
       },
134 143
       tableData: [],
144
+      houseOptions: [],
135 145
       form: {
136
-        name: null,
137
-        beginDate: null,
138
-        endDate: null,
146
+        cfbm: null,
147
+        date: [],
139 148
       },
140 149
       paginationShow: true,
141 150
       listLoading: false,
@@ -147,20 +156,45 @@ export default {
147 156
   computed: {
148 157
 
149 158
   },
159
+  mounted() {
160
+    this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
161
+    this.getList()
162
+  },
150 163
   methods: {
151 164
     search() {
152
-
165
+      this.getList()
153 166
     },
154 167
     reset(formName) {
155 168
       if(this.$refs[formName]) {
156 169
         this.$refs[formName].resetFields()
157 170
       }
171
+      this.getList()
158 172
     },
159 173
     add(inOut, notification) {
160 174
       this.inOutType = inOut
161 175
       this.notificationType = notification
162 176
       this.addShow = true
163 177
     },
178
+    getList() {
179
+      this.listLoading = true
180
+      const [searchStartDate, searchEndDate] = this.form.date
181
+      const q = {
182
+        searchStartDate, searchEndDate,
183
+        cfbm: this.form.cfbm
184
+      }
185
+      getHumidnessAlarmList(this.limit, { ... q}).then(resp => {
186
+        this.tableData = resp.list || []
187
+        if(resp.pageNumb) {
188
+          this.limit = {
189
+            page: resp.pageNum,
190
+            size: resp.pageSize,
191
+            total: resp.total,
192
+          }
193
+        }
194
+      }).finally(() => {
195
+        this.listLoading = false
196
+      })
197
+    },
164 198
     print() {
165 199
       this.listLoading = true
166 200
       this.$systemUtils.printTable(this.$refs.table.$el).finally(() => {

+ 13 - 8
src/page/alerting/illegalAlerting.vue

@@ -9,13 +9,14 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="违规类型:" prop="name">
13
-            <common-select v-model="form.name" type="ILLEGAL_TYPE"></common-select>
12
+          <el-form-item label="违规类型:" prop="violationType">
13
+            <common-select v-model="form.violationType" type="ILLEGAL_TYPE"></common-select>
14 14
           </el-form-item>
15
-          <el-form-item label="预警时间:" prop="beginDate">
15
+          <el-form-item label="预警时间:" prop="date">
16 16
             <el-date-picker
17
-              v-model="form.beginDate"
17
+              v-model="form.date"
18 18
               type="daterange"
19
+              value-format="yyyy-MM-dd"
19 20
               range-separator="至"
20 21
               start-placeholder="开始日期"
21 22
               end-placeholder="结束日期">
@@ -147,9 +148,8 @@ export default {
147 148
       },
148 149
       tableData: [],
149 150
       form: {
150
-        name: null,
151
-        beginDate: null,
152
-        endDate: null,
151
+        violationType: null,
152
+        date: [],
153 153
       },
154 154
       paginationShow: true,
155 155
       listLoading: false,
@@ -195,7 +195,12 @@ export default {
195 195
     },
196 196
     getList() {
197 197
       this.listLoading = true
198
-      violationWarningAlarmList(this.limit, {orgId: this.orgId, ... this.form}).then(resp => {
198
+      const [startDate, endDate] = this.form.date
199
+      const q = {
200
+        startDate, endDate,
201
+        violationType: this.form.violationType
202
+      }
203
+      violationWarningAlarmList(this.limit, {orgId: this.orgId, ... q}).then(resp => {
199 204
         if(resp.retCode == '200' ) {
200 205
           const data = resp.data
201 206
           this.tableData = data.list

+ 9 - 6
src/page/alerting/innerControlAlerting.vue

@@ -9,10 +9,11 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="日期:" prop="beginDate">
12
+          <el-form-item label="日期:" prop="date">
13 13
             <el-date-picker
14
-              v-model="form.beginDate"
14
+              v-model="form.date"
15 15
               type="daterange"
16
+              value-format="yyyy-MM-dd"
16 17
               range-separator="至"
17 18
               start-placeholder="开始日期"
18 19
               end-placeholder="结束日期">
@@ -113,9 +114,7 @@ export default {
113 114
       },
114 115
       tableData: [],
115 116
       form: {
116
-        name: null,
117
-        beginDate: null,
118
-        endDate: null,
117
+        date: []
119 118
       },
120 119
       paginationShow: true,
121 120
       listLoading: false,
@@ -154,7 +153,11 @@ export default {
154 153
     },
155 154
     getList() {
156 155
       this.listLoading = true
157
-      contentPreControlAlarmList(this.limit, {orgId: this.orgId, ... this.form}).then(resp => {
156
+      const [startDate, endDate] = this.form.date
157
+      const q = {
158
+        startDate, endDate
159
+      }
160
+      contentPreControlAlarmList(this.limit, {orgId: this.orgId, ... q}).then(resp => {
158 161
         if(resp.retCode == '200' ) {
159 162
           const data = resp.data
160 163
           this.tableData = data.list

+ 3 - 6
src/page/alerting/inspectionReportAlerting.vue

@@ -9,8 +9,8 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="仓房名称:" prop="name">
13
-            <el-input v-model="form.name"></el-input>
12
+          <el-form-item label="仓房名称:" prop="cfmc">
13
+            <el-input v-model="form.cfmc"></el-input>
14 14
           </el-form-item>
15 15
 
16 16
           <div class="search-button">
@@ -140,10 +140,7 @@ export default {
140 140
       },
141 141
       tableData: [],
142 142
       form: {
143
-        name: null,
144
-        type: null,
145
-        beginDate: null,
146
-        endDate: null,
143
+        cfmc: null,
147 144
       },
148 145
       paginationShow: true,
149 146
       listLoading: false,

+ 32 - 8
src/page/alerting/intelligentAnalysisAlerting.vue

@@ -9,12 +9,13 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="报警类别:" prop="type">
13
-            <el-input v-model="form.type"></el-input>
12
+          <el-form-item label="报警类别:" prop="alarmTypeName">
13
+            <el-input v-model="form.alarmTypeName"></el-input>
14 14
           </el-form-item>
15
-          <el-form-item label="报警时间:" prop="beginDate">
15
+          <el-form-item label="报警时间:" prop="alarmTime">
16 16
             <el-date-picker
17
-              v-model="form.beginDate"
17
+              value-format="yyyy-MM-dd"
18
+              v-model="form.alarmTime"
18 19
               type="date">
19 20
             </el-date-picker>
20 21
           </el-form-item>
@@ -114,6 +115,7 @@
114 115
 
115 116
 import commonSelect from "@/components/common/commonSelect"
116 117
 import consumerAdd from '@/components/system/customer/customerAdd'
118
+import {getOldPageList, } from "@/api/alerting";
117 119
 
118 120
 
119 121
 
@@ -132,9 +134,8 @@ export default {
132 134
       },
133 135
       tableData: [],
134 136
       form: {
135
-        type: null,
136
-        beginDate: null,
137
-        endDate: null,
137
+        alarmTypeName: null,
138
+        alarmTime: null,
138 139
       },
139 140
       paginationShow: true,
140 141
       listLoading: false,
@@ -146,20 +147,43 @@ export default {
146 147
   computed: {
147 148
 
148 149
   },
150
+  mounted() {
151
+    this.getList()
152
+  },
149 153
   methods: {
150 154
     search() {
151
-
155
+      this.getList()
152 156
     },
153 157
     reset(formName) {
154 158
       if(this.$refs[formName]) {
155 159
         this.$refs[formName].resetFields()
156 160
       }
161
+      this.getList()
157 162
     },
158 163
     add(inOut, notification) {
159 164
       this.inOutType = inOut
160 165
       this.notificationType = notification
161 166
       this.addShow = true
162 167
     },
168
+    getList() {
169
+      this.listLoading = true
170
+      getOldPageList(this.limit, {orgId: this.orgId, ... this.form}).then(resp => {
171
+        if(resp.retCode == '200' ) {
172
+          const data = resp.data
173
+          this.tableData = data.list
174
+          this.limit = {
175
+            page: data.pageNum,
176
+            size: data.pageSize,
177
+            total: data.total,
178
+          }
179
+        }else {
180
+          this.$message.error(resp.msg)
181
+        }
182
+
183
+      }).finally(() => {
184
+        this.listLoading = false
185
+      })
186
+    },
163 187
     print() {
164 188
       this.listLoading = true
165 189
       this.$printElement(this.$refs.table.$el).finally(() => {

+ 6 - 5
src/page/alerting/inventoryEmptyAlerting.vue

@@ -14,10 +14,10 @@
14 14
             <el-divider direction="vertical"></el-divider>
15 15
           </el-form-item>
16 16
           <el-form-item label="仓房名称:" prop="cfmc">
17
-            <common-select v-model="form.cfmc" type="STOREHOUSE"></common-select>
17
+            <el-input v-model="form.cfmc" />
18 18
           </el-form-item>
19
-          <el-form-item label="仓房状态:" prop="cfmc">
20
-            <common-select v-model="form.cfmc" type="STOREHOUSE_STATUS"></common-select>
19
+          <el-form-item label="仓房状态:" prop="cfzt">
20
+            <common-select v-model="form.cfzt" type="STOREHOUSE_STATUS"></common-select>
21 21
           </el-form-item>
22 22
 
23 23
           <div class="search-button">
@@ -131,10 +131,10 @@ export default {
131 131
         total: 0
132 132
       },
133 133
       tableData: [],
134
+      houseOptions: [],
134 135
       form: {
135 136
         cfmc: null,
136
-        beginDate: null,
137
-        endDate: null,
137
+        cfzt: null,
138 138
       },
139 139
       paginationShow: true,
140 140
       listLoading: false,
@@ -147,6 +147,7 @@ export default {
147 147
     ...mapGetters(['userId', "orgId", 'userName', 'realName', 'orgCode']),
148 148
   },
149 149
   mounted() {
150
+    this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
150 151
     this.getList()
151 152
   },
152 153
   methods: {

+ 1 - 1
src/page/alerting/inventoryOverrunsAlerting.vue

@@ -11,7 +11,7 @@
11 11
         >
12 12
 
13 13
           <el-form-item label="仓房名称:" prop="cfmc">
14
-            <common-select v-model="form.cfmc" type="STOREHOUSE"></common-select>
14
+            <el-input v-model="form.cfmc" />
15 15
           </el-form-item>
16 16
 
17 17
           <div class="search-button">

+ 3 - 5
src/page/alerting/overheadAlerting.vue

@@ -9,8 +9,8 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="协议编号:" prop="type">
13
-            <el-input v-model="form.type"></el-input>
12
+          <el-form-item label="协议编号:" prop="xybh">
13
+            <el-input v-model="form.xybh"></el-input>
14 14
           </el-form-item>
15 15
           <div class="search-button">
16 16
             <span class="search-line"></span>
@@ -145,9 +145,7 @@ export default {
145 145
       },
146 146
       tableData: [],
147 147
       form: {
148
-        type: null,
149
-        beginDate: null,
150
-        endDate: null,
148
+        xybh: null,
151 149
       },
152 150
       paginationShow: true,
153 151
       listLoading: false,

+ 4 - 3
src/page/alerting/storageOverrunAlerting.vue

@@ -11,10 +11,10 @@
11 11
         >
12 12
 
13 13
           <el-form-item label="仓房名称:" prop="cfmc">
14
-            <common-select v-model="form.cfmc" type="STOREHOUSE"></common-select>
14
+            <el-input v-model="form.cfmc" />
15 15
           </el-form-item>
16
-          <el-form-item label="品种明细:" prop="cfmc">
17
-            <common-select v-model="form.cfmc" type="GRAIN_TYPE"></common-select>
16
+          <el-form-item label="品种明细:" prop="pzbm">
17
+            <common-select v-model="form.pzbm" type="lsmxpz" :remote="true"></common-select>
18 18
           </el-form-item>
19 19
 
20 20
           <div class="search-button">
@@ -142,6 +142,7 @@ export default {
142 142
       tableData: [],
143 143
       form: {
144 144
         cfmc: null,
145
+        pzbm: null,
145 146
       },
146 147
       paginationShow: true,
147 148
       listLoading: false,

+ 4 - 5
src/page/alerting/temperatureMeasurementPoint.vue

@@ -9,9 +9,10 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="报警日期:" prop="searchStartDate">
12
+          <el-form-item label="报警日期:" prop="bjsj">
13 13
             <el-date-picker
14
-              v-model="form.searchStartDate"
14
+              v-model="form.bjsj"
15
+              value-format="yyyy-MM-dd"
15 16
               type="date">
16 17
             </el-date-picker>
17 18
           </el-form-item>
@@ -108,9 +109,7 @@ export default {
108 109
       },
109 110
       tableData: [],
110 111
       form: {
111
-        cfbm: null,
112
-        searchEndDate: null,
113
-        searchStartDate: null,
112
+        bjsj: null,
114 113
       },
115 114
       paginationShow: true,
116 115
       listLoading: false,

+ 16 - 13
src/page/basicData/components/clearanceConfirmationListEdit.vue

@@ -107,7 +107,7 @@
107 107
 import {simpleEdit} from "@/components/simpleList/simpleEdit";
108 108
 import {houseAndWareQuery} from "@/components/simpleList";
109 109
 import {simple_required, number_required} from '@/utils/ruleDatas'
110
-import {cleSave, findByCleCon} from "@/api/base/clearance";
110
+import {cleSave, findByCleCon, findStorehouse, findByWarehouse} from "@/api/base/clearance";
111 111
 import {granaryList, granaryById, getEmptyStorehouse, getWarehouse} from "@/api/base";
112 112
 import {PLUS} from "@/utils/systemUtils";
113 113
 
@@ -181,7 +181,7 @@ export default {
181 181
     },
182 182
     getHouseOptions() {
183 183
       this.houseOptions = []
184
-      return getEmptyStorehouse({orgId: this.orgId}).then(resp => {
184
+      return findStorehouse(this.orgId).then(resp => {
185 185
         this.houseOptions = (resp || []).map(d => {
186 186
           return {
187 187
             label: d.storehouseName,
@@ -194,18 +194,21 @@ export default {
194 194
 
195 195
     getWareOptions(houseId) {
196 196
       this.wareOptions = []
197
-      return getWarehouse({unitId: this.orgId, storehouseId: houseId, libraryType: 0}).then(resp => {
198
-        const wares = resp.wares || {}
199
-        const keys = Object.keys(wares).sort((a, b) => a - b)
200
-        this.wareOptions = keys.map(k => {
201
-          const w = wares[k]
202
-          return {
203
-            label: w.warehouseName,
204
-            value: w.warehouseId,
205
-            raw: w,
206
-          }
197
+      if(houseId) {
198
+        return findByWarehouse(houseId).then(resp => {
199
+          const wares = resp || []
200
+          this.wareOptions = wares.map(w => {
201
+            return {
202
+              label: w.warehouseName,
203
+              value: w.warehouseId,
204
+              raw: w,
205
+            }
206
+          })
207 207
         })
208
-      })
208
+      }else {
209
+        this.wareOptions = []
210
+      }
211
+
209 212
     },
210 213
 
211 214
     houseChanged(n) {

+ 4 - 3
src/page/basicData/components/equipmentEquipmentPoolListEdit.vue

@@ -60,11 +60,12 @@ export default {
60 60
       return getStorePositionById
61 61
     },
62 62
     getLocalData() {
63
-      return {
64
-        poolJson: JSON.stringify(this.form),
63
+      const d = {
64
+        ... this.form,
65 65
         orgId: this.orgId,
66
-        userId: this.userId,
66
+        inputPersonId: this.userId,
67 67
       }
68
+      return d
68 69
     },
69 70
     getSaveFun() {
70 71
       return storePositionUpdate

+ 15 - 2
src/page/basicData/components/warehouseListEdit.vue

@@ -96,7 +96,7 @@
96 96
 
97 97
           <el-col :span="8">
98 98
             <el-form-item label="货位编号" prop="warehouseCode">
99
-              <el-input v-model="form.warehouseCode" :readonly="readonly" />
99
+              <el-input v-model="form.warehouseCode" :readonly="readonly" @change="checkWareCode"/>
100 100
             </el-form-item>
101 101
           </el-col>
102 102
 
@@ -367,7 +367,20 @@ export default {
367 367
         fileIds: '[]',
368 368
       };
369 369
     },
370
-
370
+    checkWareCode() {
371
+      if(this.form.storehouseId && this.form.warehouseCode) {
372
+        findWareCode({
373
+          storehouseId: this.form.storehouseId,
374
+          warehouseCode: this.form.warehouseCode,
375
+          orgId: this.orgId,
376
+        }).then((resp) => {
377
+          if(resp == 0) {
378
+            this.form.warehouseCode = null
379
+            return this.$message.error('货位编号已存在')
380
+          }
381
+        })
382
+      }
383
+    },
371 384
     save() {
372 385
 
373 386
       console.log("data", this.form);

+ 20 - 2
src/page/basicData/equipmentEquipmentPoolList.vue

@@ -11,7 +11,18 @@
11 11
         >
12 12
           <el-form-item>
13 13
             <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新增</el-button>
14
-            <el-button type="primary" size="small" icon="el-icon-download" @click="importData">导入</el-button>
14
+            <el-upload
15
+              style="display: inline-block"
16
+              :action="importUrl"
17
+              :before-upload="beforeImport"
18
+              :on-success="afterImport"
19
+              :show-file-list="false"
20
+              :data="{orgId: orgId, fileType: 'xlsx'}"
21
+              accept=".xlsx"
22
+              :limit="100"
23
+            >
24
+              <el-button size="small" type="primary" icon="el-icon-download">导入</el-button>
25
+            </el-upload>
15 26
             <el-button type="primary" size="small" icon="el-icon-upload2" @click="exportData">导出</el-button>
16 27
             <el-divider direction="vertical"></el-divider>
17 28
           </el-form-item>
@@ -121,7 +132,7 @@
121 132
 
122 133
 import {simpleList, hasHouseName, hasWareName, hasOrgName, houseAndWareQuery} from "@/components/simpleList";
123 134
 import edit from "./components/equipmentEquipmentPoolListEdit.vue";
124
-import {getStorePosition, storePositionRemove} from "@/api/deviceManagement";
135
+import {getStorePosition, importUrl, storePositionRemove} from "@/api/deviceManagement";
125 136
 
126 137
 export default {
127 138
   name: "equipmentEquipmentPoolList",
@@ -131,6 +142,7 @@ export default {
131 142
   },
132 143
   data() {
133 144
     return {
145
+      importUrl,
134 146
       form: {
135 147
         shelfId: null,
136 148
         warehouseId: null,
@@ -158,6 +170,12 @@ export default {
158 170
     getListFun() {
159 171
       return getStorePosition
160 172
     },
173
+    beforeImport(f) {
174
+      console.log('before upload', f)
175
+    },
176
+    afterImport() {
177
+      console.log('after upload', arguments)
178
+    },
161 179
     exportData() {
162 180
 
163 181
     },

+ 32 - 51
src/page/comprehensiveSearch/comprehensiveSearchInsect.vue

@@ -10,14 +10,21 @@
10 10
           class="demo-form-inline search-form"
11 11
         >
12 12
 
13
-          <el-form-item label="仓房名称:" prop="contractsId">
14
-            <common-select type="STOREHOUSE" class="small-field"></common-select>
13
+          <el-form-item label="仓房名称:" prop="vCfCode">
14
+            <el-select v-model="form.vCfCode" placeholder="请选择">
15
+              <el-option
16
+                v-for="item in houseOptions"
17
+                :key="item.value"
18
+                :label="item.label"
19
+                :value="item.raw.storehouseCode">
20
+              </el-option>
21
+            </el-select>
15 22
           </el-form-item>
16
-          <el-form-item label="开始通道:" prop="status">
17
-            <el-input class="small-field"></el-input>
23
+          <el-form-item label="开始通道:" prop="iBeginTdh">
24
+            <el-input v-model="form.iBeginTdh" class="small-field"></el-input>
18 25
           </el-form-item>
19
-          <el-form-item label="结束通道:" prop="status">
20
-            <el-input class="small-field"></el-input>
26
+          <el-form-item label="结束通道:" prop="iEndTdh">
27
+            <el-input v-model="form.iEndTdh" class="small-field"></el-input>
21 28
           </el-form-item>
22 29
           <div class="search-button">
23 30
             <span class="search-line"></span>
@@ -44,50 +51,42 @@
44 51
       <el-table-column label="序号" type="index" align="center" width="60"></el-table-column>
45 52
       <el-table-column
46 53
         align="center"
47
-        :show-overflow-tooltip="true"
48
-        prop="contractId"
54
+        prop="vcfcode"
49 55
         label="仓房名称"
50 56
       ></el-table-column>
51 57
       <el-table-column
52 58
         align="center"
53
-        :show-overflow-tooltip="true"
54
-        prop="contractType"
59
+        prop="vhwid"
55 60
         label="货位名称"
56 61
       ></el-table-column>
57 62
       <el-table-column
58 63
         align="center"
59
-        :show-overflow-tooltip="true"
60
-        prop="storehouseName"
64
+        prop="standor"
61 65
         label="扦样人"
62 66
       ></el-table-column>
63 67
       <el-table-column
64 68
         align="center"
65
-        :show-overflow-tooltip="true"
66
-        prop="positionName"
69
+        prop="standtime"
67 70
         label="扦样时间"
68 71
       ></el-table-column>
69 72
       <el-table-column
70 73
         align="center"
71
-        :show-overflow-tooltip="true"
72
-        prop="count"
74
+        prop="hcjcdh"
73 75
         label="害虫种类"
74 76
       ></el-table-column>
75 77
       <el-table-column
76 78
         align="center"
77
-        :show-overflow-tooltip="true"
78
-        prop="price"
79
+        prop="ckmdzjh"
79 80
         label="虫情(个)"
80 81
       ></el-table-column>
81 82
       <el-table-column
82 83
         align="center"
83
-        :show-overflow-tooltip="true"
84
-        prop="totalCost"
84
+        prop="vupdatepeople"
85 85
         label="检测人"
86 86
       ></el-table-column>
87 87
       <el-table-column
88 88
         align="center"
89
-        :show-overflow-tooltip="true"
90
-        prop="totalCost"
89
+        prop="vupdatetime"
91 90
         label="检测时间"
92 91
       ></el-table-column>
93 92
       <el-table-column label="操作" align="center" width="80">
@@ -129,51 +128,33 @@
129 128
 <script>
130 129
 
131 130
 import commonSelect from "@/components/common/commonSelect"
131
+import {simpleList, houseAndWareQuery} from "@/components/simpleList";
132
+import {insectPestDetectionList} from "@/api/comprehensiveSearch";
132 133
 export default {
133 134
   name: "comprehensiveSearchInsect",
135
+  mixins: [simpleList, houseAndWareQuery],
134 136
   components: {
135 137
     commonSelect
136 138
   },
137 139
   data() {
138 140
     return {
139
-      limit: {
140
-        page: 1,
141
-        size: 10,
142
-        total: 0
143
-      },
144
-      tableData: [],
141
+
145 142
       form: {
146
-        contractsId: null,
147
-        status: null,
143
+        iBeginTdh: null,
144
+        iEndTdh: null,
145
+        vCfCode: null,
148 146
       },
149
-      paginationShow: true,
150
-      listLoading: false,
151
-      addShow: false,
152 147
     }
153 148
   },
154 149
   computed: {
155 150
 
156 151
   },
157 152
   methods: {
158
-    search() {
159
-
160
-    },
161
-    reset(formName) {
162
-      if(this.$refs[formName]) {
163
-        this.$refs[formName].resetFields()
164
-      }
165
-    },
166
-    add() {
167
-      this.addShow = true
153
+    setUp() {
154
+      this.initHouseOptions()
168 155
     },
169
-    manage(data) {
170
-
171
-    },
172
-    handleCurrentChangeTask() {
173
-
174
-    },
175
-    handleSizeChangeTask() {
176
-
156
+    getListFun() {
157
+      return insectPestDetectionList
177 158
     }
178 159
   }
179 160
 }

+ 1 - 1
src/page/comprehensiveSearch/comprehensiveSearchWarning.vue

@@ -15,7 +15,7 @@
15 15
 <!--          </el-form-item>-->
16 16
 
17 17
 <!--          <el-form-item label="仓房名称:" prop="contractsId">-->
18
-<!--            <common-select type="STOREHOUSE" class="small-field"></common-select>-->
18
+<!--            <common-select  class="small-field"></common-select>-->
19 19
 <!--          </el-form-item>-->
20 20
 <!--          <el-form-item label="检测时间:" prop="status">-->
21 21
 <!--            <el-date-picker type="daterange" style="width: 220px;"></el-date-picker>-->

+ 12 - 1
src/page/customerManagement/customerArchives.vue

@@ -79,10 +79,16 @@
79 79
           <span :style="{color: blackColor(scope.row)}">{{scope.row.isInBlacklist == 0 ? '否' : '是'}}</span>
80 80
         </template>
81 81
       </el-table-column>
82
-      <el-table-column label="操作" align="center" width="280">
82
+      <el-table-column label="操作" align="center" width="380">
83 83
         <template v-slot="scope">
84 84
           <el-button
85 85
             type="primary"
86
+            @click="view(scope.row)"
87
+            size="small"
88
+            icon="el-icon-edit"
89
+          >查看</el-button>
90
+          <el-button
91
+            type="primary"
86 92
             @click="edit(scope.row)"
87 93
             size="small"
88 94
             icon="el-icon-edit"
@@ -219,6 +225,11 @@ export default {
219 225
         this.getList()
220 226
       })
221 227
     },
228
+    view(data) {
229
+      this.action = 'view'
230
+      this.editId = data.id
231
+      this.addShow = true
232
+    },
222 233
     edit(data) {
223 234
       this.action = 'edit'
224 235
       this.editId = data.id

+ 2 - 2
src/page/decisionSupport/inventorySupervisionStatistics.vue

@@ -29,7 +29,7 @@
29 29
               </el-option>
30 30
             </el-select>
31 31
           </el-form-item>
32
-          <el-form-item label="粮油品种:" prop="status">
32
+          <el-form-item label="粮油品种:" prop="pz">
33 33
             <common-select v-model.number="form.pz" type="lsmxpz" :remote="true" class="small-field"></common-select>
34 34
           </el-form-item>
35 35
           <div class="search-button">
@@ -47,7 +47,7 @@
47 47
               @click="print"
48 48
               size="small"
49 49
               icon="el-icon-printer"
50
-            >导出
50
+            >打印
51 51
             </el-button>
52 52
           </div>
53 53
 

+ 8 - 7
src/page/deviceManagement/components/edit/index.vue

@@ -39,7 +39,7 @@
39 39
             </el-col>
40 40
             <el-col :span="8">
41 41
               <el-form-item label="设备编号" prop="sbbh">
42
-                <el-input v-model="form.sbbh"></el-input>
42
+                <el-input v-model="form.sbbh" placeholder="保存后自动生成" disabled></el-input>
43 43
               </el-form-item>
44 44
             </el-col>
45 45
           </el-row>
@@ -139,7 +139,7 @@
139 139
           <el-row type="flex" align="middle" justify="center" class="row">
140 140
             <el-col :span="8">
141 141
               <el-form-item label="编号" prop="sbbh">
142
-                <el-input v-model="form.sbbh"></el-input>
142
+                <el-input v-model="form.sbbh" placeholder="保存后自动生成" disabled></el-input>
143 143
               </el-form-item>
144 144
             </el-col>
145 145
             <el-col :span="8">
@@ -148,7 +148,7 @@
148 148
               </el-form-item>
149 149
             </el-col>
150 150
             <el-col :span="8">
151
-              <el-form-item label="存放位置" prop="sbbh">
151
+              <el-form-item label="存放位置" prop="fzd">
152 152
                 <el-select v-model="form.fzd" clearable placeholder="请选择" :disabled="readonly" @change="placeChange">
153 153
                   <el-option
154 154
                     v-for="item in storePlaceOptions"
@@ -200,7 +200,7 @@
200 200
           </el-col>
201 201
           <el-col :span="8">
202 202
             <el-form-item label="检定时间" prop="jdsj">
203
-              <el-date-picker v-model="form.jdsj" type="datetime" :readonly="readonly"/>
203
+              <el-date-picker v-model="form.jdsj" value-format="yyyy-MM-dd HH:mm:ss" type="datetime" :readonly="readonly"/>
204 204
             </el-form-item>
205 205
           </el-col>
206 206
         </el-row>
@@ -420,9 +420,10 @@ export default {
420 420
       }
421 421
       d.szdwdm = this.orgId
422 422
 
423
-      return {
424
-        dSbxxsjyJson: JSON.stringify(d)
425
-      }
423
+      // return {
424
+      //   dSbxxsjyJson: d
425
+      // }
426
+      return d
426 427
     },
427 428
     save() {
428 429
       this.$refs.editForm.validate((ok) => {

+ 35 - 9
src/page/deviceManagement/inventory.vue

@@ -13,13 +13,21 @@
13 13
             <el-button type="primary" size="small" icon="el-icon-plus" @click="add()">新建盘点单</el-button>
14 14
             <el-divider direction="vertical"></el-divider>
15 15
           </el-form-item>
16
-          <el-form-item label="盘点单号:" prop="name">
17
-            <common-select v-model="form.name" type="STOREHOUSE"></common-select>
16
+          <el-form-item label="盘点单号:" prop="pdNum">
17
+            <el-select v-model="form.pdNum" placeholder="请选择" >
18
+              <el-option
19
+                v-for="item in noOptions"
20
+                :key="item.value"
21
+                :label="item.label"
22
+                :value="item.value">
23
+              </el-option>
24
+            </el-select>
18 25
           </el-form-item>
19
-          <el-form-item label="盘点时间:" prop="beginDate">
26
+          <el-form-item label="盘点时间:" prop="date">
20 27
             <el-date-picker
21
-              v-model="form.beginDate"
28
+              v-model="form.date"
22 29
               type="daterange"
30
+              value-format="yyyy-MM-dd"
23 31
               range-separator="至"
24 32
               start-placeholder="开始日期"
25 33
               end-placeholder="结束日期">
@@ -103,7 +111,7 @@
103 111
 
104 112
 import commonSelect from "@/components/common/commonSelect"
105 113
 import edit from "./components/inventoryEdit.vue";
106
-import {deviceCheckList} from "@/api/deviceManagement";
114
+import {deviceCheckList, getCheckListNoPage} from "@/api/deviceManagement";
107 115
 import {mapGetters} from "vuex";
108 116
 
109 117
 
@@ -120,11 +128,11 @@ export default {
120 128
         size: 10,
121 129
         total: 0
122 130
       },
131
+      noOptions: [],
123 132
       tableData: [],
124 133
       form: {
125
-        name: null,
126
-        beginDate: null,
127
-        endDate: null,
134
+        pdNum: null,
135
+        date: [],
128 136
       },
129 137
       paginationShow: true,
130 138
       listLoading: false,
@@ -144,6 +152,7 @@ export default {
144 152
     }
145 153
   },
146 154
   mounted() {
155
+    this.getNoOptions()
147 156
     this.getList()
148 157
   },
149 158
   methods: {
@@ -212,9 +221,26 @@ export default {
212 221
         this.submitData = null
213 222
       })
214 223
     },
224
+    getNoOptions() {
225
+      this.noOptions = []
226
+      return getCheckListNoPage().then(resp => {
227
+        const list = resp || []
228
+        this.noOptions = list.map(d => {
229
+          return {
230
+            label: d.checkNumber,
231
+            value: d.checkNumber,
232
+          }
233
+        })
234
+      })
235
+    },
215 236
     getList() {
216 237
       this.listLoading = true
217
-      deviceCheckList(this.limit, { orgId: this.orgId, ... this.form }).then(resp => {
238
+      const [starttime, endtime] = this.form.date
239
+      const q = {
240
+        starttime, endtime,
241
+        pdNum: this.form.pdNum,
242
+      }
243
+      deviceCheckList(this.limit, { orgId: this.orgId, ... q }).then(resp => {
218 244
         const list = resp.list || []
219 245
         this.tableData = list
220 246
         this.limit = {

+ 1 - 3
src/page/facilitiesManagement/components/facilitiesMaintenanceEdit.vue

@@ -177,9 +177,7 @@ export default {
177 177
         orgId: this.orgId,
178 178
         ... this.form
179 179
       }
180
-      return {
181
-        dFacilitiesMaintainJson: JSON.stringify(data)
182
-      }
180
+      return data
183 181
     },
184 182
     save() {
185 183
       this.$refs.editForm.validate((ok) => {

+ 3 - 0
src/page/facilitiesManagement/components/facilitiesRepairEdit.vue

@@ -192,6 +192,9 @@ export default {
192 192
       this.$refs.editForm.validate((ok) => {
193 193
         if(ok) {
194 194
           repairSave(this.getLocalData()).then(resp => {
195
+            if(resp.status === 'error') {
196
+              return this.$message.error('保存失败')
197
+            }
195 198
             this.$message.success('保存成功')
196 199
             this.show = false
197 200
             this.$emit('on-save')

+ 3 - 3
src/page/facilitiesManagement/facilitiesBaseInfo.vue

@@ -133,7 +133,7 @@
133 133
 
134 134
 import commonSelect from "@/components/common/commonSelect"
135 135
 import edit from "./components/baseInfoEdit"
136
-import {facilitiesList, facilitiesBasicsSave, facilitiesBasicsRemove} from "@/api/facilitiesManagement";
136
+import {facilitiesList, facilitiesBasicsSave, facilitiesBasicsRemove, facilitiesBasicsScrap} from "@/api/facilitiesManagement";
137 137
 import {mapGetters} from "vuex";
138 138
 
139 139
 export default {
@@ -215,9 +215,9 @@ export default {
215 215
       }
216 216
       d.bfrq = this.$dateUtils.formatNow()
217 217
       for(const k of []) {
218
-        d[k] = d[k].replaceAll(' ', '_____PLACEHOLDER_PLUS_____')
218
+        d[k] = d[k].replace(/\s/g, '_____PLACEHOLDER_PLUS_____')
219 219
       }
220
-      facilitiesBasicsSave({dFacilitiesBasicsJson: JSON.stringify(d)}).then(resp => {
220
+      facilitiesBasicsScrap(d).then(resp => {
221 221
         if(resp.status === 'success') {
222 222
           this.$message.success('已报废')
223 223
           this.getList()

+ 3 - 0
src/page/grainCard/components/grainCardEdit.vue

@@ -574,6 +574,9 @@ export default {
574 574
       if(this.editData) {
575 575
         d.id = this.editData.id
576 576
       }
577
+      if(list1.length > 0) {
578
+        d.checkRecordIds = list1.map(d => d.id).join(',')
579
+      }
577 580
       this.$systemUtils.parseField2Float(d, [
578 581
         'outQuantity', 'excessLossQuantity', 'volume', 'siloInnerDiameter', 'length', 'width',
579 582
         'flatStorageHeight', 'trapezoidUpperLength', 'trapezoidLowerLength', 'siloGrainHeight',

+ 52 - 13
src/page/grainCountManagement/carInOut.vue

@@ -9,19 +9,33 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="仓房名称:" prop="name">
13
-            <common-select type="STOREHOUSE"></common-select>
12
+          <el-form-item label="仓房名称:" prop="houseId">
13
+            <el-select v-model="form.houseId" placeholder="请选择" @change="houseChanged">
14
+              <el-option
15
+                v-for="item in houseOptions"
16
+                :key="item.value"
17
+                :label="item.label"
18
+                :value="item.value">
19
+              </el-option>
20
+            </el-select>
14 21
           </el-form-item>
15
-          <el-form-item label="货位名称:" prop="name">
16
-            <common-select type="STOREHOUSE1"></common-select>
22
+          <el-form-item label="货位名称:" prop="warehouseId">
23
+            <el-select v-model="form.warehouseId" placeholder="请选择">
24
+              <el-option
25
+                v-for="item in wareOptions"
26
+                :key="item.value"
27
+                :label="item.label"
28
+                :value="item.value">
29
+              </el-option>
30
+            </el-select>
17 31
           </el-form-item>
18
-          <el-form-item label="业务类型:" prop="name">
19
-            <common-select type="IN_OUT_TYPE_2"></common-select>
32
+          <el-form-item label="业务类型:" prop="cazylx">
33
+            <common-select v-model="form.cazylx" type="IN_OUT_TYPE_2"></common-select>
20 34
           </el-form-item>
21
-          <el-form-item label="粮油品种:" prop="name">
22
-            <common-select type="GRAIN_TYPE"></common-select>
35
+          <el-form-item label="粮油品种:" prop="pz">
36
+            <common-select v-model="form.pz" type="lsmxpz" :remote="true" :get-name="true"></common-select>
23 37
           </el-form-item>
24
-          <el-form-item label="出入库日期:" prop="name">
38
+          <el-form-item label="出入库日期:" prop="date">
25 39
             <el-date-picker
26 40
               v-model="form.date"
27 41
               type="daterange"
@@ -154,11 +168,15 @@ export default {
154 168
         total: 0
155 169
       },
156 170
       tableData: [],
171
+      houseOptions: [],
172
+      wareOptions: [],
157 173
       storehouseNameIdMap: {},
158 174
       form: {
159
-        type: null,
160
-        status: null,
161
-        name: null,
175
+        houseId: null,
176
+        warehouseId: null,
177
+        cazylx: null,
178
+        pz: null,
179
+        date: [],
162 180
       },
163 181
       paginationShow: true,
164 182
       listLoading: false,
@@ -171,6 +189,7 @@ export default {
171 189
     ...mapGetters(['userId', "orgId", 'userName', 'realName']),
172 190
   },
173 191
   mounted() {
192
+    this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
174 193
     this.getList()
175 194
   },
176 195
   methods: {
@@ -215,7 +234,15 @@ export default {
215 234
     },
216 235
     getList() {
217 236
       this.listLoading = true
218
-      getQcCrkPageList(this.limit, {orgid: this.orgId, ... this.form}).then(resp => {
237
+      const [beginDate, endDate] = this.form.date
238
+      const q = {
239
+        beginDate, endDate,
240
+        houseId: this.form.houseId,
241
+        warehouseId: this.form.warehouseId,
242
+        cazylx: this.form.cazylx,
243
+        pz: this.form.pz,
244
+      }
245
+      getQcCrkPageList(this.limit, {orgid: this.orgId, ... q}).then(resp => {
219 246
         const list = resp.list || []
220 247
         this.tableData = list
221 248
         this.limit = {
@@ -232,6 +259,18 @@ export default {
232 259
         this.listLoading = false
233 260
       })
234 261
     },
262
+    getWareOptions(houseId) {
263
+      this.wareOptions = []
264
+      this.$systemUtils.getWarehouseOption(this.orgId, houseId).then(opt => this.wareOptions = opt)
265
+    },
266
+    houseChanged(n) {
267
+      this.form.warehouseId = null
268
+      if(n) {
269
+        this.getWareOptions(n)
270
+      }else {
271
+        this.wareOptions = []
272
+      }
273
+    },
235 274
     handleCurrentChangeTask(page) {
236 275
       this.limit.page = page
237 276
       this.getList()

+ 45 - 12
src/page/grainCountManagement/index.vue

@@ -9,14 +9,28 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="仓房名称:" prop="name">
13
-            <common-select type="STOREHOUSE"></common-select>
12
+          <el-form-item label="仓房名称:" prop="ch">
13
+            <el-select v-model="form.ch" placeholder="请选择"  @change="houseChanged">
14
+              <el-option
15
+                v-for="item in houseOptions"
16
+                :key="item.value"
17
+                :label="item.label"
18
+                :value="item.value">
19
+              </el-option>
20
+            </el-select>
14 21
           </el-form-item>
15
-          <el-form-item label="货位名称:" prop="name">
16
-            <common-select type="STOREHOUSE1"></common-select>
22
+          <el-form-item label="货位名称:" prop="hwh">
23
+            <el-select v-model="form.hwh" placeholder="请选择" >
24
+              <el-option
25
+                v-for="item in wareOptions"
26
+                :key="item.value"
27
+                :label="item.label"
28
+                :value="item.value">
29
+              </el-option>
30
+            </el-select>
17 31
           </el-form-item>
18
-          <el-form-item label="粮油品种:" prop="name">
19
-            <common-select type="GRAIN_TYPE"></common-select>
32
+          <el-form-item label="粮油品种:" prop="pz">
33
+            <common-select v-model="form.pz" type="lsmxpz" :remote="true"></common-select>
20 34
           </el-form-item>
21 35
           <div class="search-button">
22 36
             <span class="search-line"></span>
@@ -148,13 +162,15 @@ export default {
148 162
         total: 0
149 163
       },
150 164
       tableData: [],
165
+      houseOptions: [],
166
+      wareOptions: [],
151 167
       orgNameIdMap: {},
152 168
       storehouseNameIdMap: {},
153 169
       warehouseNameIdMap: {},
154 170
       form: {
155
-        type: null,
156
-        status: null,
157
-        name: null,
171
+        ch: null,
172
+        hwh: null,
173
+        pz: null,
158 174
       },
159 175
       paginationShow: true,
160 176
       listLoading: false,
@@ -167,9 +183,26 @@ export default {
167 183
     ...mapGetters(['userId', "orgId", 'userName', 'realName']),
168 184
   },
169 185
   mounted() {
186
+    this.getHouseOptions()
170 187
     this.getList()
171 188
   },
172 189
   methods: {
190
+    getHouseOptions() {
191
+      this.houseOptions = []
192
+      this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
193
+    },
194
+    getWareOptions(houseId) {
195
+      this.wareOptions = []
196
+      this.$systemUtils.getWarehouseOption(this.orgId, houseId).then(opt => this.wareOptions = opt)
197
+    },
198
+    houseChanged(n) {
199
+      if(n) {
200
+        this.getWareOptions(n)
201
+      }else {
202
+        this.wareOptions = []
203
+        this.form.hwh = null
204
+      }
205
+    },
173 206
     search() {
174 207
       this.getList()
175 208
     },
@@ -212,9 +245,9 @@ export default {
212 245
     getList() {
213 246
       this.listLoading = true
214 247
       const query = {
215
-        ch: null,
216
-        hwh: null,
217
-        pz: null,
248
+        ch: this.form.ch,
249
+        hwh: this.form.hwh,
250
+        pz: this.form.pz,
218 251
         unitid: this.orgId,
219 252
       }
220 253
       kcswList(this.limit, {kcswStr: JSON.stringify(query)}).then(resp => {

+ 27 - 23
src/page/intelligentStorage/components/deviceControlEdit.vue

@@ -4,18 +4,18 @@
4 4
       <el-divider>明细信息</el-divider>
5 5
       <el-form ref="editForm" :model="form" :rules="rules" label-width="150px">
6 6
         <el-row type="flex" align="middle" justify="center" class="row">
7
-          <el-col :span="8">
8
-            <el-form-item label="企业名称" prop="companyCode">
9
-              <el-select v-model="form.companyCode" clearable placeholder="请选择" :disabled="readonly" @change="comChanged">
10
-                <el-option
11
-                  v-for="item in comOptions"
12
-                  :key="item.value"
13
-                  :label="item.label"
14
-                  :value="item.value">
15
-                </el-option>
16
-              </el-select>
17
-            </el-form-item>
18
-          </el-col>
7
+<!--          <el-col :span="8">-->
8
+<!--            <el-form-item label="企业名称" prop="companyCode">-->
9
+<!--              <el-select v-model="form.companyCode" clearable placeholder="请选择" :disabled="readonly" @change="comChanged">-->
10
+<!--                <el-option-->
11
+<!--                  v-for="item in comOptions"-->
12
+<!--                  :key="item.value"-->
13
+<!--                  :label="item.label"-->
14
+<!--                  :value="item.value">-->
15
+<!--                </el-option>-->
16
+<!--              </el-select>-->
17
+<!--            </el-form-item>-->
18
+<!--          </el-col>-->
19 19
           <el-col :span="8">
20 20
             <el-form-item label="库区名称" prop="orgName">
21 21
               <el-input :value="form.orgName" readonly />
@@ -26,14 +26,15 @@
26 26
               <el-input v-model="form.devName" :readonly="readonly" />
27 27
             </el-form-item>
28 28
           </el-col>
29
-        </el-row>
30
-
31
-        <el-row type="flex" align="middle" justify="center" class="row">
32 29
           <el-col :span="8">
33 30
             <el-form-item label="仪器代码" prop="devCode">
34 31
               <el-input v-model="form.devCode" :readonly="readonly" />
35 32
             </el-form-item>
36 33
           </el-col>
34
+        </el-row>
35
+
36
+        <el-row type="flex" align="middle" justify="center" class="row">
37
+
37 38
           <el-col :span="8">
38 39
             <el-form-item label="规格型号" prop="ggxh">
39 40
               <el-input v-model="form.ggxh" :readonly="readonly" />
@@ -44,14 +45,15 @@
44 45
               <el-input v-model="form.sccj" :readonly="readonly" />
45 46
             </el-form-item>
46 47
           </el-col>
47
-        </el-row>
48
-
49
-        <el-row type="flex" align="middle" justify="center" class="row">
50 48
           <el-col :span="8">
51 49
             <el-form-item label="生产日期" prop="scrq">
52 50
               <el-date-picker v-model="form.scrq" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"></el-date-picker>
53 51
             </el-form-item>
54 52
           </el-col>
53
+        </el-row>
54
+
55
+        <el-row type="flex" align="middle" justify="center" class="row">
56
+
55 57
           <el-col :span="8">
56 58
             <el-form-item label="设备描述" prop="sbms">
57 59
               <el-input v-model="form.sbms" :readonly="readonly" />
@@ -62,14 +64,15 @@
62 64
               <el-input v-model="form.sbzt" :readonly="readonly" />
63 65
             </el-form-item>
64 66
           </el-col>
65
-        </el-row>
66
-
67
-        <el-row type="flex" align="middle" justify="center" class="row">
68 67
           <el-col :span="8">
69 68
             <el-form-item label="检定时间" prop="jdsj">
70 69
               <el-date-picker v-model="form.jdsj" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"></el-date-picker>
71 70
             </el-form-item>
72 71
           </el-col>
72
+        </el-row>
73
+
74
+        <el-row type="flex" align="middle" justify="center" class="row">
75
+
73 76
           <el-col :span="8">
74 77
             <el-form-item label="检定单位" prop="jddw">
75 78
               <el-input v-model="form.jddw" :readonly="readonly" />
@@ -80,6 +83,7 @@
80 83
               <el-date-picker v-model="form.rkrq" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"></el-date-picker>
81 84
             </el-form-item>
82 85
           </el-col>
86
+          <el-col :span="8"></el-col>
83 87
         </el-row>
84 88
 
85 89
       </el-form>
@@ -117,8 +121,8 @@ export default {
117 121
       house: null,
118 122
       comOptions: [],
119 123
       defaultForm: {
120
-        companyCode: null, // string 企业编码
121
-        companyName: null, // string 企业名称
124
+        // companyCode: null, // string 企业编码
125
+        // companyName: null, // string 企业名称
122 126
         devCode: null, // string 设备编号
123 127
         devName: null, // string 设备名称
124 128
         ggxh: null, // string 规格型号

+ 30 - 22
src/page/intelligentStorage/components/fumigationJobEdit.vue

@@ -118,17 +118,20 @@
118 118
         <el-row type="flex" align="middle" justify="center" class="row">
119 119
           <el-col :span="8">
120 120
             <el-form-item label="常规熏蒸方式" prop="cgxzfs">
121
-              <el-input v-model="form.cgxzfs" :readonly="readonly"/>
121
+              <common-select v-model="form.cgxzfs" type="CGXZFS" :readonly="readonly"/>
122
+<!--              <el-input v-model="form.cgxzfs" :readonly="readonly"/>-->
122 123
             </el-form-item>
123 124
           </el-col>
124 125
           <el-col :span="8">
125 126
             <el-form-item label="环流熏蒸方式" prop="hlxzfs">
126
-              <el-input v-model="form.hlxzfs" :readonly="readonly"/>
127
+              <common-select v-model="form.hlxzfs" type="HLXZFS" :readonly="readonly"/>
128
+<!--              <el-input v-model="form.hlxzfs" :readonly="readonly"/>-->
127 129
             </el-form-item>
128 130
           </el-col>
129 131
           <el-col :span="8">
130 132
             <el-form-item label="环流熏蒸与内环流技术结合" prop="hlxzynhljsjh">
131
-              <el-input v-model="form.hlxzynhljsjh" :readonly="readonly"/>
133
+              <common-select v-model="form.hlxzynhljsjh" type="HLXZNHLJS" :readonly="readonly"/>
134
+<!--              <el-input v-model="form.hlxzynhljsjh" :readonly="readonly"/>-->
132 135
             </el-form-item>
133 136
           </el-col>
134 137
         </el-row>
@@ -185,12 +188,12 @@
185 188
             </el-form-item>
186 189
           </el-col>
187 190
           <el-col :span="8">
188
-            <el-form-item label="浓度" prop="nd">
191
+            <el-form-item label="浓度(%)" prop="nd">
189 192
               <el-input v-model="form.nd" :readonly="readonly"/>
190 193
             </el-form-item>
191 194
           </el-col>
192 195
           <el-col :span="8">
193
-            <el-form-item label="粮堆单位用药量" prop="dldwyyl">
196
+            <el-form-item label="粮堆单位用药量(g/m³)" prop="dldwyyl">
194 197
               <el-input v-model="form.dldwyyl" :readonly="readonly"/>
195 198
             </el-form-item>
196 199
           </el-col>
@@ -198,18 +201,19 @@
198 201
 
199 202
         <el-row type="flex" align="middle" justify="center" class="row">
200 203
           <el-col :span="8">
201
-            <el-form-item label="空间单位用药量" prop="kjdwyyl">
204
+            <el-form-item label="空间单位用药量(g/m³)" prop="kjdwyyl">
202 205
               <el-input v-model="form.kjdwyyl" :readonly="readonly"/>
203 206
             </el-form-item>
204 207
           </el-col>
205 208
           <el-col :span="8">
206
-            <el-form-item label="总用药量" prop="zyl">
209
+            <el-form-item label="总用药量(kg)" prop="zyl">
207 210
               <el-input v-model="form.zyl" :readonly="readonly"/>
208 211
             </el-form-item>
209 212
           </el-col>
210 213
           <el-col :span="8">
211 214
             <el-form-item label="施药方法" prop="syff">
212
-              <el-input v-model="form.syff" :readonly="readonly"/>
215
+              <common-select v-model="form.syff" type="SYFF" :readonly="readonly"/>
216
+<!--              <el-input v-model="form.syff" :readonly="readonly"/>-->
213 217
             </el-form-item>
214 218
           </el-col>
215 219
         </el-row>
@@ -279,7 +283,7 @@
279 283
 
280 284
         <el-row type="flex" align="middle" justify="center" class="row">
281 285
           <el-col :span="8">
282
-            <el-form-item label="散气持续天数" prop="sqcxts">
286
+            <el-form-item label="散气持续天数(天)" prop="sqcxts">
283 287
               <el-input v-model.number="form.sqcxts" :readonly="readonly" />
284 288
             </el-form-item>
285 289
           </el-col>
@@ -336,17 +340,17 @@
336 340
 
337 341
         <el-row type="flex" align="middle" justify="center" class="row">
338 342
           <el-col :span="8">
339
-            <el-form-item label="熏蒸后虫口密度" prop="xzhckmd">
343
+            <el-form-item label="熏蒸后虫口密度(头/kg)" prop="xzhckmd">
340 344
               <el-input v-model.number="form.xzhckmd" :readonly="readonly" />
341 345
             </el-form-item>
342 346
           </el-col>
343 347
           <el-col :span="8">
344
-            <el-form-item label="培养15天后活虫数" prop="py15Thhcs">
348
+            <el-form-item label="培养15天后活虫数(头/kg)" prop="py15Thhcs">
345 349
               <el-input v-model.number="form.py15Thhcs" :readonly="readonly" />
346 350
             </el-form-item>
347 351
           </el-col>
348 352
           <el-col :span="8">
349
-            <el-form-item label="培养45天后活虫数" prop="py45Thhcs">
353
+            <el-form-item label="培养45天后活虫数(头/kg)" prop="py45Thhcs">
350 354
               <el-input v-model.number="form.py45Thhcs" :readonly="readonly" />
351 355
             </el-form-item>
352 356
           </el-col>
@@ -355,7 +359,8 @@
355 359
         <el-row type="flex" align="middle" justify="center" class="row">
356 360
           <el-col :span="8">
357 361
             <el-form-item label="熏蒸效果评价" prop="xzxgpj">
358
-              <el-input v-model="form.xzxgpj" :readonly="readonly" />
362
+              <common-select v-model="form.xzxgpj" type="XZXGPJ" :readonly="readonly"/>
363
+<!--              <el-input v-model="form.xzxgpj" :readonly="readonly" />-->
359 364
             </el-form-item>
360 365
           </el-col>
361 366
           <el-col :span="8">
@@ -379,7 +384,8 @@
379 384
           </el-col>
380 385
           <el-col :span="8">
381 386
             <el-form-item label="磷化氢浓度单位" prop="lhqnddw">
382
-              <el-input v-model="form.lhqnddw" :readonly="readonly" />
387
+              <common-select v-model="form.lhqnddw" type="LHQNDDW" :readonly="readonly"/>
388
+<!--              <el-input v-model="form.lhqnddw" :readonly="readonly" />-->
383 389
             </el-form-item>
384 390
           </el-col>
385 391
           <el-col :span="8">
@@ -391,7 +397,7 @@
391 397
 
392 398
         <el-row type="flex" align="middle" justify="center" class="row">
393 399
           <el-col :span="8">
394
-            <el-form-item label="计算补药量" prop="jsbyl">
400
+            <el-form-item label="计算补药量(g)" prop="jsbyl">
395 401
               <el-input v-model="form.jsbyl" :readonly="readonly" />
396 402
             </el-form-item>
397 403
           </el-col>
@@ -401,7 +407,7 @@
401 407
             </el-form-item>
402 408
           </el-col>
403 409
           <el-col :span="8">
404
-            <el-form-item label="补药方法" prop="byfa">
410
+            <el-form-item label="补药方法(g)" prop="byfa">
405 411
               <el-input v-model="form.byfa" :readonly="readonly" />
406 412
             </el-form-item>
407 413
           </el-col>
@@ -432,7 +438,7 @@
432 438
             </el-form-item>
433 439
           </el-col>
434 440
           <el-col :span="8">
435
-            <el-form-item label="目标浓度维持天数" prop="mbndwcts">
441
+            <el-form-item label="目标浓度维持天数(天)" prop="mbndwcts">
436 442
               <el-input v-model.number="form.mbndwcts" :readonly="readonly" />
437 443
             </el-form-item>
438 444
           </el-col>
@@ -450,8 +456,9 @@
450 456
             </el-form-item>
451 457
           </el-col>
452 458
           <el-col :span="8">
453
-            <el-form-item label="密闭时间" prop="mbsj">
454
-              <el-date-picker v-model="form.mbsj" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"></el-date-picker>
459
+            <el-form-item label="密闭时间(天)" prop="mbsj">
460
+              <el-input v-model.number="form.mbsj" :readonly="readonly"/>
461
+<!--              <el-date-picker v-model="form.mbsj" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"></el-date-picker>-->
455 462
             </el-form-item>
456 463
           </el-col>
457 464
           <el-col :span="8">
@@ -487,11 +494,12 @@ import {
487 494
   positive_integer_required,
488 495
   positive_integer,number_data,
489 496
 } from "@/utils/ruleDatas";
497
+import CommonSelect from "@/components/common/commonSelect/index.vue";
490 498
 
491 499
 
492 500
 export default {
493 501
   mixins: [simpleEdit, houseAndWareQuery],
494
-  components: {},
502
+  components: {CommonSelect},
495 503
 
496 504
   data() {
497 505
     return {
@@ -528,12 +536,12 @@ export default {
528 536
         kqhxqjaqjcqk: null, // string 空气呼吸器及安全检查情况
529 537
         lhqbjyaqjc: null, // string 磷化氢报警仪安全检查
530 538
         lhqjczztsqk: null, // string 磷化氢检测装置调试情况
531
-        lhqnddw: null, // string 磷化氢浓度单位
539
+        lhqnddw: '1', // string 磷化氢浓度单位
532 540
         lqbwcqdbjcs: null, // string 漏气部位采取的补救措施
533 541
         lqwzjc: null, // string 漏气位置监测
534 542
         mbnd: null, // string 目标浓度
535 543
         mbndwcts: null, // integer($int32) 目标浓度维持天数
536
-        mbsj: null, // string($date-time) 密闭时间
544
+        mbsj: null, // string($date-time) 密闭时间 (改 integer)
537 545
         nd: null, // string 浓度
538 546
         nnumber: null, // integer($int32) ???
539 547
         orderNumber: null, // string 熏蒸作业单号

+ 7 - 1
src/page/intelligentStorage/components/quantityDetectionDeviceConfigEdit.vue

@@ -128,6 +128,7 @@ export default {
128 128
         vvedioTdh: null,
129 129
         vvedioUser: null,
130 130
         vwsSrc: null,
131
+        updatePerson: null,
131 132
       },
132 133
       rules: {
133 134
         vcfCode: simple_required, vdevCode: simple_required, ivedioPort: positive_integer,
@@ -137,9 +138,14 @@ export default {
137 138
   },
138 139
   methods: {
139 140
     setUp() {
141
+      console.log('userName', this.realName)
140 142
       this.initHouseOptions();
141 143
     },
142
-
144
+    beforeAll() {
145
+      if(this.isAdd) {
146
+        this.form.updatePerson = this.realName
147
+      }
148
+    },
143 149
     getDataFun() {
144 150
       return findById;
145 151
     },

+ 7 - 5
src/page/intelligentStorage/multifunctionalGrainInfo.vue

@@ -177,15 +177,17 @@ export default {
177 177
         if(resp.retCode == '200') {
178 178
           this.$message.success('操作成功')
179 179
         }else {
180
-          this.$message.error(resp.message)
180
+          this.$message.error('检测失败')
181 181
         }
182
+      }).catch(err => {
183
+        this.$message.error('检测失败')
182 184
       })
183 185
     },
184 186
     check() {
185
-      if(! this.form.storehouse) {
186
-        return this.$message.warning('请选择仓房')
187
-      }
188
-      this.doCheck(this.form.ilqYq, this.form.storehouse)
187
+      // if(! this.form.storehouse) {
188
+      //   return this.$message.warning('请选择仓房')
189
+      // }
190
+      this.doCheck(this.form.ilqYq, null)
189 191
     },
190 192
     checkRow(data) {
191 193
       const storeCode = data.storehouseCode

+ 1 - 1
src/page/intelligentStorage/pestChecking.vue

@@ -52,7 +52,7 @@
52 52
       ></el-table-column>
53 53
       <el-table-column
54 54
         align="center"
55
-        prop="hcjcdn"
55
+        prop="hcjcdh"
56 56
         label="害虫检测单号"
57 57
       ></el-table-column>
58 58
       <el-table-column

+ 5 - 1
src/page/intelligentStorage/pestDeviceConfig.vue

@@ -85,7 +85,11 @@
85 85
         align="center"
86 86
         prop="sitecode"
87 87
         label="站点名称"
88
-      ></el-table-column>
88
+      >
89
+        <template v-slot="scope">
90
+          {{staticName('SITE_TYPE', scope.row.sitecode)}}
91
+        </template>
92
+      </el-table-column>
89 93
       <el-table-column label="操作" align="center" width="320">
90 94
         <template v-slot="scope">
91 95
           <el-button

+ 5 - 5
src/page/intelligentStorage/quantityDetectionDeviceConfig.vue

@@ -59,11 +59,11 @@
59 59
           {{houseName(scope.row)}}
60 60
         </template>
61 61
       </el-table-column>
62
-      <el-table-column
63
-        align="center"
64
-        prop="vdevname"
65
-        label="设备名称"
66
-      ></el-table-column>
62
+<!--      <el-table-column-->
63
+<!--        align="center"-->
64
+<!--        prop="vdevname"-->
65
+<!--        label="设备名称"-->
66
+<!--      ></el-table-column>-->
67 67
       <el-table-column
68 68
         align="center"
69 69
         prop="vjcName"

+ 6 - 2
src/page/intelligentStorage/ventilationDeviceConfig.vue

@@ -84,9 +84,13 @@
84 84
       ></el-table-column>
85 85
       <el-table-column
86 86
         align="center"
87
-        prop="igateway"
87
+        prop="inoutstorage"
88 88
         label="设备位置"
89
-      ></el-table-column>
89
+      >
90
+        <template v-slot="scope">
91
+          {{staticName('BUS_TYPE_3', scope.row.inoutstorage)}}
92
+        </template>
93
+      </el-table-column>
90 94
       <el-table-column label="操作" align="center" width="320">
91 95
         <template v-slot="scope">
92 96
           <el-button

+ 72 - 35
src/page/login/index.vue

@@ -15,7 +15,9 @@
15 15
             display: inline-block;
16 16
           "
17 17
         />-->
18
-        <img src="../../assets/wisdom_images/qhLoginLogo.png"/>
18
+        <!-- <img src="../../assets/wisdom_images/qhLoginLogo.png"/> -->
19
+        <!-- logins -->
20
+        <img style="width: 100%" src="../../assets/wisdom_images/logins.png" />
19 21
       </div>
20 22
     </div>
21 23
     <div class="login_main">
@@ -141,7 +143,7 @@
141 143
             </el-form-item>
142 144
           </el-form>
143 145
 
144
-          <el-row>
146
+          <el-row v-show="false">
145 147
             <div style="float: left">
146 148
               没有账号请&nbsp;
147 149
               <span
@@ -162,7 +164,7 @@
162 164
               >
163 165
             </div>
164 166
           </el-row>
165
-          <el-row>
167
+          <el-row v-show="false">
166 168
             <div style="float: right">
167 169
               <span
168 170
                 style="
@@ -186,9 +188,9 @@
186 188
 // import Cookies from 'js-cookie'
187 189
 // import axios from "axios";
188 190
 import { getVerify, getCurrUserDetails } from "@/api/login/login";
189
-
191
+import { getFunc, getFuncByUserId } from "@/api/user";
190 192
 // @TODO 假 token 目前以 session 方式验证用户,后期改为 token
191
-const MOCK_TOKEN = "123"
193
+const MOCK_TOKEN = "123";
192 194
 export default {
193 195
   components: {},
194 196
   name: "login",
@@ -257,17 +259,14 @@ export default {
257 259
       // }
258 260
     },
259 261
     async getVerifyFn() {
260
-      const data = await getVerify()
261
-      const base64 = data.file
262
-      this.img = `data:image/png;base64,${base64}`
262
+      const data = await getVerify();
263
+      const base64 = data.file;
264
+      this.img = `data:image/png;base64,${base64}`;
263 265
     },
264 266
     keyupEnter() {
265 267
       document.onkeydown = (e) => {
266 268
         let body = document.getElementsByTagName("body")[0];
267
-        if (
268
-          (e.keyCode === 13) &&
269
-          this.$route.path == "/login"
270
-        ) {
269
+        if (e.keyCode === 13 && this.$route.path == "/login") {
271 270
           console.log("enter");
272 271
           this.handleLogin();
273 272
         }
@@ -280,32 +279,68 @@ export default {
280 279
           this.loading = true;
281 280
           let password = this.loginForm.password;
282 281
           const data = {
283
-            ... this.loginForm
284
-          }
282
+            ...this.loginForm,
283
+          };
285 284
           data.password = this.$md5(this.loginForm.password);
286 285
           this.$store
287 286
             .dispatch("Login", data)
288 287
             .then((response) => {
289 288
               sessionStorage.menuIdx = 0;
290
-              if (response.status) { // 登录成功
291
-                sessionStorage.setItem('TOKENL', MOCK_TOKEN)
292
-                this.$store.dispatch('GetInfo').then(_ => {
293
-                  this.loading = false;
294
-                  this.$systemUtils.updateUserNamePwd(this.loginForm.name, this.loginForm.password)
295
-                  this.$router.push({
296
-                    path: "/home",
297
-                  });
298
-                }).catch(_ => {
299
-                  this.getVerifyFn()
300
-                  this.$message({
301
-                    type: "warning",
302
-                    message: '无法获取用户信息,请重新登录',
289
+              if (response.status) {
290
+                // 登录成功
291
+                sessionStorage.setItem("TOKENL", MOCK_TOKEN);
292
+                this.$store
293
+                  .dispatch("GetInfo")
294
+                  .then((_) => {
295
+                    this.loading = false;
296
+                    this.$systemUtils.updateUserNamePwd(
297
+                      this.loginForm.name,
298
+                      this.loginForm.password
299
+                    );
300
+
301
+                    // getFunc({}).then((all) => {
302
+                    //   const allTree = this.$systemUtils.buildFuncTree(all);
303
+                    //   const setting = allTree.find(
304
+                    //     (d) => d.funcName == "系统管理"
305
+                    //   );
306
+                    //   console.log("系统管理", allTree, setting);
307
+                    //   getFuncByUserId().then((resp) => {
308
+                    //     const tree = this.$systemUtils.buildFuncTree(resp);
309
+                    //     tree.push(setting);
310
+                    //     console.log("aaaaaaa", resp, tree);
311
+                    //     sessionStorage.setItem("FUN_RAW", JSON.stringify(resp));
312
+                    //     sessionStorage.setItem(
313
+                    //       "FUN_TREE",
314
+                    //       JSON.stringify(tree)
315
+                    //     );
316
+                    //     this.$router.push({
317
+                    //       path: "/home",
318
+                    //     });
319
+                    //   });
320
+                    // });
321
+
322
+                    getFuncByUserId().then(resp => {
323
+                      const tree = this.$systemUtils.buildFuncTree(resp)
324
+                      console.log('aaaaaaa', resp, tree)
325
+                      sessionStorage.setItem('FUN_RAW', JSON.stringify(resp))
326
+                      sessionStorage.setItem('FUN_TREE', JSON.stringify(tree))
327
+                      this.$router.push({
328
+                        path: "/home",
329
+                      });
330
+                    })
331
+                  })
332
+                  .catch((_) => {
333
+                    this.getVerifyFn();
334
+                    this.$message({
335
+                      type: "warning",
336
+                      message: "无法获取用户信息,请重新登录",
337
+                    });
338
+                    this.loading = false;
303 339
                   });
304
-                  this.loading = false;
305
-                })
306 340
                 this.rememberPasswordFn(password);
307 341
                 this.showDialog = true;
308
-              } else { // 登录失败
342
+              } else {
343
+                // 登录失败
309 344
                 this.getVerifyFn();
310 345
                 this.$message({
311 346
                   type: "warning",
@@ -315,10 +350,10 @@ export default {
315 350
               }
316 351
             })
317 352
             .catch((err) => {
318
-              console.log('login error:', err)
353
+              console.log("login error:", err);
319 354
               this.$message({
320 355
                 type: "warning",
321
-                message: '未知异常 -1',
356
+                message: "未知异常 -1",
322 357
               });
323 358
               this.loading = false;
324 359
             });
@@ -416,7 +451,7 @@ export default {
416 451
     },
417 452
     loadAll() {
418 453
       // return JSON.parse(unescape(this.getCookie("companyloginHistory")));
419
-      return null
454
+      return null;
420 455
     },
421 456
     querySearch(queryString, cb) {
422 457
       var restaurants = this.restaurants;
@@ -533,7 +568,8 @@ h3 {
533 568
   @include relative;
534 569
   height: 100vh;
535 570
   min-height: 600px;
536
-  background: url(../../assets/wisdom_images/bg.png) no-repeat center center;
571
+  // background: url(../../assets/wisdom_images/bg.png) no-repeat center center;
572
+  background: url(../../assets/wisdom_images/bj.png) no-repeat center center;
537 573
   background-size: 100% 100%;
538 574
   background-color: #2d3a4b;
539 575
   input:-webkit-autofill {
@@ -607,7 +643,8 @@ h3 {
607 643
   margin-top: 5%;
608 644
   float: left;
609 645
   height: 433px;
610
-  background: url(../../assets/wisdom_images/cicle.png) top left no-repeat;
646
+  // background: url(../../assets/wisdom_images/cicle.png) top left no-repeat;
647
+  background: url(../../assets/wisdom_images/zuo.png) top left no-repeat;
611 648
   background-size: 80%;
612 649
 }
613 650
 

+ 14 - 14
src/page/spillageLeakageLossCollection/components/spillageLeakageLossCollectionEdit.vue

@@ -76,7 +76,7 @@
76 76
 
77 77
         <el-row type="flex" align="middle" justify="center" class="row">
78 78
           <el-col :span="8">
79
-            <el-form-item label="入库净重" prop="netWeightIn">
79
+            <el-form-item label="入库净重(kg)" prop="netWeightIn">
80 80
               <el-input v-model.trim="form.netWeightIn" :readonly="readonly"/>
81 81
             </el-form-item>
82 82
           </el-col>
@@ -87,7 +87,7 @@
87 87
             </el-form-item>
88 88
           </el-col>
89 89
           <el-col :span="8">
90
-            <el-form-item label="出库净重" prop="netWeightOut">
90
+            <el-form-item label="出库净重(kg)" prop="netWeightOut">
91 91
               <el-input v-model.trim="form.netWeightOut" :readonly="readonly"/>
92 92
             </el-form-item>
93 93
           </el-col>
@@ -109,17 +109,17 @@
109 109
         <el-divider>损耗计算</el-divider>
110 110
         <el-row type="flex" align="middle" justify="center" class="row">
111 111
           <el-col :span="8">
112
-            <el-form-item label="入库水分" prop="moistureIn">
112
+            <el-form-item label="入库水分(%)" prop="moistureIn">
113 113
               <el-input v-model.trim="form.moistureIn" :readonly="readonly"/>
114 114
             </el-form-item>
115 115
           </el-col>
116 116
           <el-col :span="8">
117
-            <el-form-item label="出库水分" prop="moistureOut">
117
+            <el-form-item label="出库水分(%)" prop="moistureOut">
118 118
               <el-input v-model.trim="form.moistureOut" :readonly="readonly"/>
119 119
             </el-form-item>
120 120
           </el-col>
121 121
           <el-col :span="8">
122
-            <el-form-item label="水分减量" prop="moistureLoss">
122
+            <el-form-item label="水分减量(kg)" prop="moistureLoss">
123 123
               <el-input v-model.trim="waterReduce" placeholder="自动计算" readonly />
124 124
             </el-form-item>
125 125
           </el-col>
@@ -127,17 +127,17 @@
127 127
 
128 128
         <el-row type="flex" align="middle" justify="center" class="row">
129 129
           <el-col :span="8">
130
-            <el-form-item label="入库杂质" prop="impurityIn">
130
+            <el-form-item label="入库杂质(%)" prop="impurityIn">
131 131
               <el-input v-model.trim="form.impurityIn" :readonly="readonly"/>
132 132
             </el-form-item>
133 133
           </el-col>
134 134
           <el-col :span="8">
135
-            <el-form-item label="出库杂质" prop="impurityOut">
135
+            <el-form-item label="出库杂质(%)" prop="impurityOut">
136 136
               <el-input v-model.trim="form.impurityOut" :readonly="readonly"/>
137 137
             </el-form-item>
138 138
           </el-col>
139 139
           <el-col :span="8">
140
-            <el-form-item label="杂质减量" prop="impurityReductionQuality">
140
+            <el-form-item label="杂质减量(kg)" prop="impurityReductionQuality">
141 141
               <el-input v-model.trim="impurityReduce" placeholder="自动计算" readonly/>
142 142
             </el-form-item>
143 143
           </el-col>
@@ -146,17 +146,17 @@
146 146
         <el-row type="flex" align="middle" justify="center" class="row">
147 147
 
148 148
           <el-col :span="8">
149
-            <el-form-item label="水杂减量" prop="moistureImpurityLoss">
149
+            <el-form-item label="水杂减量(kg)" prop="moistureImpurityLoss">
150 150
               <el-input v-model.trim="wiReduce" placeholder="自动计算" readonly />
151 151
             </el-form-item>
152 152
           </el-col>
153 153
           <el-col :span="8">
154
-            <el-form-item label="实际损耗数量" prop="actualLossQuantity">
154
+            <el-form-item label="实际损耗数量(kg)" prop="actualLossQuantity">
155 155
               <el-input v-model.trim="loss3" placeholder="自动计算" readonly/>
156 156
             </el-form-item>
157 157
           </el-col>
158 158
           <el-col :span="8">
159
-            <el-form-item label="保管自然损耗" prop="naturalLoss">
159
+            <el-form-item label="保管自然损耗(kg)" prop="naturalLoss">
160 160
               <el-input v-model.trim="loss" placeholder="自动计算" readonly />
161 161
             </el-form-item>
162 162
           </el-col>
@@ -164,17 +164,17 @@
164 164
 
165 165
         <el-row type="flex" align="middle" justify="center" class="row">
166 166
           <el-col :span="8">
167
-            <el-form-item label="超耗数量" prop="excessLossQuantity">
167
+            <el-form-item label="超耗数量(kg)" prop="excessLossQuantity">
168 168
               <el-input v-model.trim="lq" placeholder="自动计算" readonly />
169 169
             </el-form-item>
170 170
           </el-col>
171 171
           <el-col :span="8">
172
-            <el-form-item label="存储损耗" prop="storageLoss">
172
+            <el-form-item label="存储损耗(kg)" prop="storageLoss">
173 173
               <el-input v-model.trim="loss2" placeholder="自动计算" :readonly="readonly"/>
174 174
             </el-form-item>
175 175
           </el-col>
176 176
           <el-col :span="8">
177
-            <el-form-item label="检查计算数" prop="checkCalculateNumber">
177
+            <el-form-item label="检查计算数(kg)" prop="checkCalculateNumber">
178 178
               <el-input v-model.trim="calData" placeholder="自动计算" readonly />
179 179
             </el-form-item>
180 180
           </el-col>

+ 21 - 58
src/page/statisticalReport/detailsReport.vue

@@ -9,11 +9,18 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="仓房名称:" prop="contractsId">
13
-            <common-select type="STOREHOUSE"></common-select>
12
+          <el-form-item label="仓房名称:" prop="storehouseCode">
13
+            <el-select v-model="form.storehouseCode" placeholder="请选择" >
14
+              <el-option
15
+                v-for="item in houseOptions"
16
+                :key="item.value"
17
+                :label="item.label"
18
+                :value="item.raw.storehouseCode">
19
+              </el-option>
20
+            </el-select>
14 21
           </el-form-item>
15
-          <el-form-item label="检测时间:" prop="status">
16
-            <el-date-picker tpye="date"></el-date-picker>
22
+          <el-form-item label="检测时间:" prop="startDate">
23
+            <el-date-picker tpye="date" v-model="form.startDate" value-format="yyyy-MM-dd"></el-date-picker>
17 24
           </el-form-item>
18 25
           <div class="search-button">
19 26
             <span class="search-line"></span>
@@ -39,86 +46,72 @@
39 46
     >
40 47
       <el-table-column
41 48
         align="center"
42
-        :show-overflow-tooltip="true"
43 49
         prop="contractId"
44 50
         label="基本情况"
45 51
       >
46 52
         <el-table-column
47 53
           align="center"
48
-          :show-overflow-tooltip="true"
49 54
           prop="contractType"
50 55
           label="仓房名称"
51 56
         ></el-table-column>
52 57
         <el-table-column
53 58
           align="center"
54
-          :show-overflow-tooltip="true"
55 59
           prop="contractType"
56 60
           label="仓房类型"
57 61
         ></el-table-column>
58 62
         <el-table-column
59 63
           align="center"
60
-          :show-overflow-tooltip="true"
61 64
           prop="contractType"
62 65
           label="设计仓容(t)"
63 66
         ></el-table-column>
64 67
         <el-table-column
65 68
           align="center"
66
-          :show-overflow-tooltip="true"
67 69
           prop="contractType"
68 70
           label="储粮品种"
69 71
         ></el-table-column>
70 72
         <el-table-column
71 73
           align="center"
72
-          :show-overflow-tooltip="true"
73 74
           prop="contractType"
74 75
           label="储粮性质"
75 76
         ></el-table-column>
76 77
         <el-table-column
77 78
           align="center"
78
-          :show-overflow-tooltip="true"
79 79
           prop="contractType"
80 80
           label="存储方式"
81 81
         ></el-table-column>
82 82
         <el-table-column
83 83
           align="center"
84
-          :show-overflow-tooltip="true"
85 84
           prop="contractType"
86 85
           label="实存数量(t)"
87 86
         ></el-table-column>
88 87
         <el-table-column
89 88
           align="center"
90
-          :show-overflow-tooltip="true"
91 89
           prop="contractType"
92 90
           label="入仓等级"
93 91
         ></el-table-column>
94 92
         <el-table-column
95 93
           align="center"
96
-          :show-overflow-tooltip="true"
97 94
           prop="contractType"
98 95
           label="入仓时间"
99 96
         ></el-table-column>
100 97
         <el-table-column
101 98
           align="center"
102
-          :show-overflow-tooltip="true"
103 99
           prop="contractType"
104 100
           label="产地"
105 101
         ></el-table-column>
106 102
         <el-table-column
107 103
           align="center"
108
-          :show-overflow-tooltip="true"
109 104
           prop="contractType"
110 105
           label="入仓水分(%)"
111 106
         ></el-table-column>
112 107
         <el-table-column
113 108
           align="center"
114
-          :show-overflow-tooltip="true"
115 109
           prop="contractType"
116 110
           label="保管员"
117 111
         ></el-table-column>
118 112
       </el-table-column>
119 113
       <el-table-column
120 114
         align="center"
121
-        :show-overflow-tooltip="true"
122 115
         prop="contractType"
123 116
         label="粮情"
124 117
       >
@@ -130,43 +123,36 @@
130 123
         ></el-table-column>
131 124
         <el-table-column
132 125
           align="center"
133
-          :show-overflow-tooltip="true"
134 126
           prop="contractType"
135 127
           label="气温(℃)"
136 128
         ></el-table-column>
137 129
         <el-table-column
138 130
           align="center"
139
-          :show-overflow-tooltip="true"
140 131
           prop="contractType"
141 132
           label="仓温(℃)"
142 133
         ></el-table-column>
143 134
         <el-table-column
144 135
           align="center"
145
-          :show-overflow-tooltip="true"
146 136
           prop="contractType"
147 137
           label="气湿(%RH)"
148 138
         ></el-table-column>
149 139
         <el-table-column
150 140
           align="center"
151
-          :show-overflow-tooltip="true"
152 141
           prop="contractType"
153 142
           label="仓湿(%RH)"
154 143
         ></el-table-column>
155 144
         <el-table-column
156 145
           align="center"
157
-          :show-overflow-tooltip="true"
158 146
           prop="contractType"
159 147
           label="平均粮温(℃)"
160 148
         ></el-table-column>
161 149
         <el-table-column
162 150
           align="center"
163
-          :show-overflow-tooltip="true"
164 151
           prop="contractType"
165 152
           label="最高粮温(℃)"
166 153
         ></el-table-column>
167 154
         <el-table-column
168 155
           align="center"
169
-          :show-overflow-tooltip="true"
170 156
           prop="contractType"
171 157
           label="最低粮温(℃)"
172 158
         ></el-table-column>
@@ -198,54 +184,31 @@
198 184
 <script>
199 185
 
200 186
 import commonSelect from "@/components/common/commonSelect"
187
+import {getDetailsReportInfo} from "@/api/statisticalReport";
188
+import {simpleList, houseAndWareQuery} from "@/components/simpleList";
201 189
 export default {
202 190
   name: "detailsReport",
191
+  mixins: [simpleList, houseAndWareQuery],
203 192
   components: {
204 193
     commonSelect
205 194
   },
206 195
   data() {
207 196
     return {
208
-      limit: {
209
-        page: 1,
210
-        size: 10,
211
-        total: 0
212
-      },
213
-      tableData: [],
214 197
       form: {
215
-        contractsId: null,
216
-        status: null,
217
-      },
218
-      paginationShow: true,
219
-      listLoading: false,
220
-      addShow: false,
198
+        storehouseCode: null,
199
+        startDate: null,
200
+      }
221 201
     }
222 202
   },
223 203
   computed: {
224 204
 
225 205
   },
226 206
   methods: {
227
-    search() {
228
-
229
-    },
230
-    reset(formName) {
231
-      if(this.$refs[formName]) {
232
-        this.$refs[formName].resetFields()
233
-      }
234
-    },
235
-    add() {
236
-      this.addShow = true
207
+    setUp() {
208
+      this.initHouseOptions()
237 209
     },
238
-    exportTable() {
239
-
240
-    },
241
-    manage(data) {
242
-
243
-    },
244
-    handleCurrentChangeTask() {
245
-
246
-    },
247
-    handleSizeChangeTask() {
248
-
210
+    getListFun() {
211
+      return getDetailsReportInfo
249 212
     }
250 213
   }
251 214
 }

+ 10 - 37
src/page/statisticalReport/submitReport.vue

@@ -9,8 +9,8 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item label="检测日期:" prop="status">
13
-            <el-date-picker tpye="date"></el-date-picker>
12
+          <el-form-item label="检测日期:" prop="startDate">
13
+            <el-date-picker tpye="date" v-model="form.startDate" value-format="yyyy-MM-dd"></el-date-picker>
14 14
           </el-form-item>
15 15
           <div class="search-button">
16 16
             <span class="search-line"></span>
@@ -147,54 +147,27 @@
147 147
 <script>
148 148
 
149 149
 import commonSelect from "@/components/common/commonSelect"
150
+import {simpleList} from "@/components/simpleList";
151
+import {getDetailsReportInfo, getSubmitReportInfo} from "@/api/statisticalReport";
150 152
 export default {
151 153
   name: "submitReport",
154
+  mixins: [simpleList],
152 155
   components: {
153 156
     commonSelect
154 157
   },
155 158
   data() {
156 159
     return {
157
-      limit: {
158
-        page: 1,
159
-        size: 10,
160
-        total: 0
161
-      },
162
-      tableData: [],
160
+
163 161
       form: {
164
-        contractsId: null,
165
-        status: null,
162
+        startDate: null,
166 163
       },
167
-      paginationShow: true,
168
-      listLoading: false,
169
-      addShow: false,
164
+
170 165
     }
171 166
   },
172
-  computed: {
173 167
 
174
-  },
175 168
   methods: {
176
-    search() {
177
-
178
-    },
179
-    reset(formName) {
180
-      if(this.$refs[formName]) {
181
-        this.$refs[formName].resetFields()
182
-      }
183
-    },
184
-    add() {
185
-      this.addShow = true
186
-    },
187
-    exportTable() {
188
-
189
-    },
190
-    manage(data) {
191
-
192
-    },
193
-    handleCurrentChangeTask() {
194
-
195
-    },
196
-    handleSizeChangeTask() {
197
-
169
+    getListFun() {
170
+      return getSubmitReportInfo
198 171
     }
199 172
   }
200 173
 }

+ 20 - 8
src/page/storageForewarning/circle.vue

@@ -9,12 +9,15 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item>
13
-            <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新增</el-button>
14
-            <el-divider direction="vertical"></el-divider>
12
+<!--          <el-form-item>-->
13
+<!--            <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新增</el-button>-->
14
+<!--            <el-divider direction="vertical"></el-divider>-->
15
+<!--          </el-form-item>-->
16
+          <el-form-item label="违规类型:" prop="violationType">
17
+            <common-select v-model="form.violationType" type="violationType" />
15 18
           </el-form-item>
16
-          <el-form-item label="企业名称:" prop="dwmc">
17
-            <el-input v-model="form.dwmc" />
19
+          <el-form-item label="预警时间:" prop="date">
20
+            <el-date-picker type="daterange" value-format="yyyy-MM-dd" v-model="form.date" />
18 21
           </el-form-item>
19 22
           <div class="search-button">
20 23
             <span class="search-line"></span>
@@ -51,7 +54,7 @@
51 54
       <el-table-column
52 55
         align="center"
53 56
         prop="violationSubjectType"
54
-        label="违规主类型"
57
+        label="违规主类型"
55 58
       ></el-table-column>
56 59
       <el-table-column
57 60
         align="center"
@@ -143,15 +146,17 @@ import {simpleList, hasHouseName, hasWareName, hasOrgName, houseAndWareQuery} fr
143 146
 import {circleList} from "@/api/storageForewarning";
144 147
 // import edit from "./components/storageDataEdit.vue";
145 148
 import edit from './circleEdit.vue'
149
+import commonSelect from "@/components/common/commonSelect/index.vue";
146 150
 
147 151
 export default {
148 152
   name: "circle",
149 153
   mixins: [simpleList, ],
150
-  components: {edit},
154
+  components: {edit, commonSelect},
151 155
   data() {
152 156
     return {
153 157
       form: {
154
-        dwmc: null,
158
+        violationType: null,
159
+        date: [],
155 160
       },
156 161
     }
157 162
   },
@@ -176,6 +181,13 @@ export default {
176 181
         orgName: this.orgName,
177 182
       }
178 183
     },
184
+    getQuery() {
185
+      const [startDate, endDate] = this.form.date
186
+      const violationType = this.form.violationType
187
+      return {
188
+        startDate, endDate, violationType
189
+      }
190
+    },
179 191
     getListFun() {
180 192
       return circleList
181 193
     },

+ 9 - 7
src/page/storageForewarning/nonRotation.vue

@@ -26,8 +26,8 @@
26 26
           <el-form-item label="品种:" prop="lspz">
27 27
             <common-select v-model="form.lspz" type="lsmxpz" :remote="true" />
28 28
           </el-form-item>
29
-          <el-form-item label="入库时间:" prop="dwmc">
30
-
29
+          <el-form-item label="入库时间:" prop="rksj">
30
+            <el-date-picker v-model="form.rksj" type="date" value-format="yyyy-MM-dd"/>
31 31
           </el-form-item>
32 32
           <div class="search-button">
33 33
             <span class="search-line"></span>
@@ -61,11 +61,11 @@
61 61
         prop="orgId"
62 62
         label="承储库点"
63 63
       ></el-table-column>
64
-      <el-table-column
65
-        align="center"
66
-        prop="someField"
67
-        label="封仓时间"
68
-      ></el-table-column>
64
+<!--      <el-table-column-->
65
+<!--        align="center"-->
66
+<!--        prop="someField"-->
67
+<!--        label="封仓时间"-->
68
+<!--      ></el-table-column>-->
69 69
       <el-table-column
70 70
         align="center"
71 71
         prop="lspz"
@@ -160,6 +160,8 @@ export default {
160 160
       orgOptions: [],
161 161
       form: {
162 162
         dwmc: null,
163
+        lspz: null,
164
+        rksj: null,
163 165
       },
164 166
     }
165 167
   },

+ 55 - 51
src/page/storageForewarning/tradeInList.vue

@@ -9,18 +9,15 @@
9 9
           :inline="true"
10 10
           class="demo-form-inline search-form"
11 11
         >
12
-          <el-form-item>
13
-            <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新增</el-button>
14
-            <el-divider direction="vertical"></el-divider>
12
+          <!--          <el-form-item>-->
13
+          <!--            <el-button type="primary" size="small" icon="el-icon-plus" @click="add">新增</el-button>-->
14
+          <!--            <el-divider direction="vertical"></el-divider>-->
15
+          <!--          </el-form-item>-->
16
+          <el-form-item label="违规类型:" prop="violationType">
17
+            <common-select v-model="form.violationType" type="violationType" />
15 18
           </el-form-item>
16
-          <el-form-item label="承储库点:" prop="dwmc">
17
-            <el-input v-model="form.dwmc" />
18
-          </el-form-item>
19
-          <el-form-item label="车牌号:" prop="dwmc">
20
-            <el-input v-model="form.dwmc" />
21
-          </el-form-item>
22
-          <el-form-item label="出入库时间:" prop="dwmc">
23
-            <el-input v-model="form.dwmc" />
19
+          <el-form-item label="预警时间:" prop="date">
20
+            <el-date-picker type="daterange" value-format="yyyy-MM-dd" v-model="form.date" />
24 21
           </el-form-item>
25 22
           <div class="search-button">
26 23
             <span class="search-line"></span>
@@ -51,44 +48,43 @@
51 48
       ></el-table-column>
52 49
       <el-table-column
53 50
         align="center"
54
-        prop="someField"
55
-        label="车牌号"
56
-      ></el-table-column>
57
-      <el-table-column
58
-        align="center"
59
-        prop="someField"
60
-        label="库区名称"
51
+        prop="alarmPublishTime"
52
+        label="预警发布时间"
61 53
       ></el-table-column>
62 54
       <el-table-column
63 55
         align="center"
64
-        prop="someField"
65
-        label="仓房名称"
56
+        prop="violationSubjectType"
57
+        label="违规主题类型"
66 58
       ></el-table-column>
67 59
       <el-table-column
68 60
         align="center"
69
-        prop="someField"
70
-        label="出入库时间"
61
+        prop="offender"
62
+        label="违规行为人"
71 63
       ></el-table-column>
72 64
       <el-table-column
73 65
         align="center"
74
-        prop="someField"
75
-        label="品种"
66
+        prop="involvingLibraryPoints"
67
+        label="涉及库点"
76 68
       ></el-table-column>
77 69
       <el-table-column
78 70
         align="center"
79
-        prop="someField"
80
-        label="等级"
71
+        prop="violationType"
72
+        label="违规类型"
81 73
       ></el-table-column>
82 74
       <el-table-column
83 75
         align="center"
84
-        prop="someField"
85
-        label="净重"
76
+        prop="violationDetail"
77
+        label="违规详情"
86 78
       ></el-table-column>
87 79
       <el-table-column
88 80
         align="center"
89
-        prop="someField"
90
-        label="出入库类型"
91
-      ></el-table-column>
81
+        prop="currentStatus"
82
+        label="当前处置状态"
83
+      >
84
+        <template v-slot="scope">
85
+          {{staticName('F_TYPE_1', scope.row.currentStatus)}}
86
+        </template>
87
+      </el-table-column>
92 88
       <el-table-column label="操作" align="center" width="320">
93 89
         <template v-slot="scope">
94 90
           <el-button
@@ -97,25 +93,25 @@
97 93
             size="small"
98 94
             icon="el-icon-view"
99 95
           >查看</el-button>
100
-          <el-button
101
-            type="primary"
102
-            @click="edit(scope.row)"
103
-            size="small"
104
-            icon="el-icon-edit"
105
-          >编辑</el-button>
106
-          <el-popconfirm
107
-            title="确定删除吗?"
108
-            icon="el-icon-info"
109
-            icon-color="red"
110
-            @confirm="del(scope.row)"
111
-          >
112
-            <el-button
113
-              type="primary"
114
-              size="small"
115
-              slot="reference"
116
-              icon="el-icon-delete"
117
-            >删除</el-button>
118
-          </el-popconfirm>
96
+          <!--          <el-button-->
97
+          <!--            type="primary"-->
98
+          <!--            @click="edit(scope.row)"-->
99
+          <!--            size="small"-->
100
+          <!--            icon="el-icon-edit"-->
101
+          <!--          >编辑</el-button>-->
102
+          <!--          <el-popconfirm-->
103
+          <!--            title="确定删除吗?"-->
104
+          <!--            icon="el-icon-info"-->
105
+          <!--            icon-color="red"-->
106
+          <!--            @confirm="del(scope.row)"-->
107
+          <!--          >-->
108
+          <!--            <el-button-->
109
+          <!--              type="primary"-->
110
+          <!--              size="small"-->
111
+          <!--              slot="reference"-->
112
+          <!--              icon="el-icon-delete"-->
113
+          <!--            >删除</el-button>-->
114
+          <!--          </el-popconfirm>-->
119 115
         </template>
120 116
       </el-table-column>
121 117
     </el-table>
@@ -157,7 +153,8 @@ export default {
157 153
   data() {
158 154
     return {
159 155
       form: {
160
-        dwmc: null,
156
+        violationType: null,
157
+        date: [],
161 158
       },
162 159
     }
163 160
   },
@@ -182,6 +179,13 @@ export default {
182 179
         // orgName: this.orgName,
183 180
       }
184 181
     },
182
+    getQuery() {
183
+      const [startDate, endDate] = this.form.date
184
+      const violationType = this.form.violationType
185
+      return {
186
+        startDate, endDate, violationType
187
+      }
188
+    },
185 189
     getListFun() {
186 190
       return tradeInList
187 191
     },

+ 27 - 24
src/page/storageQualificationData/components/informationChangesEdit.vue

@@ -6,7 +6,7 @@
6 6
         <el-row type="flex" align="middle" justify="center" class="row">
7 7
           <el-col :span="8">
8 8
             <el-form-item label="企业全称" prop="sqrEnterpriseId">
9
-              <el-input v-model="form.orgName" readonly/>
9
+              <el-input v-model="form.orgName" disabled/>
10 10
 <!--              <el-select v-model="form.sqrEnterpriseId" clearable placeholder="默认带出当前登录账号的企业名称" :disabled="readonly"-->
11 11
 <!--                         @change="companyChanged">-->
12 12
 <!--                <el-option-->
@@ -20,55 +20,52 @@
20 20
           </el-col>
21 21
           <el-col :span="8">
22 22
             <el-form-item label="企业代码">
23
-              <el-input :value="field(companySelected, 'dwdm')" placeholder="根据企业名称带出" readonly/>
23
+              <el-input :value="field(companySelected, 'dwdm')" placeholder="根据企业名称带出" disabled/>
24 24
             </el-form-item>
25 25
           </el-col>
26 26
           <el-col :span="8">
27 27
             <el-form-item label="企业地址">
28
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
28
+              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" disabled/>
29 29
             </el-form-item>
30 30
           </el-col>
31 31
         </el-row>
32 32
         <el-row type="flex" align="middle" justify="center" class="row">
33 33
           <el-col :span="8">
34 34
             <el-form-item label="法定代表人">
35
-              <el-input :value="field(companySelected, 'fddbr')" placeholder="根据企业名称带出" readonly/>
36
-            </el-form-item>
37
-          </el-col>
38
-          <el-col :span="8">
39
-            <el-form-item label="是否独立法人">
40
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
35
+              <el-input :value="field(companySelected, 'fddbr')" placeholder="根据企业名称带出" disabled/>
41 36
             </el-form-item>
42 37
           </el-col>
43 38
           <el-col :span="8">
44 39
             <el-form-item label="企业性质">
45
-              <el-input :value="field(companySelected, 'dictLabel')" placeholder="根据企业名称带出" readonly />
40
+              <el-input :value="field(companySelected, 'dictLabel')" placeholder="根据企业名称带出" disabled />
46 41
             </el-form-item>
47 42
           </el-col>
48
-        </el-row>
49
-        <el-row type="flex" align="middle" justify="center" class="row">
50 43
           <el-col :span="8">
51 44
             <el-form-item label="占地面积">
52
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
45
+              <el-input :value="field(companySelected, 'depotArea')" placeholder="根据企业名称带出" disabled/>
53 46
             </el-form-item>
54 47
           </el-col>
48
+        </el-row>
49
+        <el-row type="flex" align="middle" justify="center" class="row">
50
+
55 51
           <el-col :span="8">
56 52
             <el-form-item label="总仓容">
57
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
53
+              <el-input :value="field(companySelected, 'depotArea')" placeholder="根据企业名称带出" disabled/>
58 54
             </el-form-item>
59 55
           </el-col>
60 56
           <el-col :span="8">
61 57
             <el-form-item label="仓房数量">
62
-              <el-input :value="field(companySelected, 'cfs')" placeholder="根据企业名称带出" readonly />
58
+              <el-input :value="field(companySelected, 'cfs')" placeholder="根据企业名称带出" disabled />
63 59
             </el-form-item>
64 60
           </el-col>
65
-        </el-row>
66
-        <el-row type="flex" align="middle" justify="center" class="row">
67 61
           <el-col :span="8">
68 62
             <el-form-item label="油罐数量" prop="ygs">
69
-              <el-input :value="field(companySelected, 'ygs')" placeholder="根据企业名称带出" readonly />
63
+              <el-input :value="field(companySelected, 'ygs')" placeholder="根据企业名称带出" disabled />
70 64
             </el-form-item>
71 65
           </el-col>
66
+        </el-row>
67
+        <el-row type="flex" align="middle" justify="center" class="row">
68
+
72 69
           <el-col :span="8">
73 70
             <el-form-item label="正式职工人数" prop="fullTimeStaffCount">
74 71
               <el-input v-model.number="form.fullTimeStaffCount" :readonly="readonly"/>
@@ -79,19 +76,21 @@
79 76
               <el-input v-model.number="form.certifiedStorekeeperCount" :readonly="readonly"/>
80 77
             </el-form-item>
81 78
           </el-col>
82
-        </el-row>
83
-        <el-row type="flex" align="middle" justify="center" class="row">
84 79
           <el-col :span="8">
85 80
             <el-form-item label="持证检验员数量" prop="certifiedInspectorCount">
86 81
               <el-input v-model.number="form.certifiedInspectorCount" :readonly="readonly"/>
87 82
             </el-form-item>
88 83
           </el-col>
84
+        </el-row>
85
+
86
+        <el-row type="flex" align="middle" justify="center" class="row">
87
+
89 88
           <el-col :span="8">
90 89
             <el-form-item label="承储资格年限" prop="storageExpireTime">
91 90
               <el-date-picker v-model="form.storageExpireTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"/>
92 91
             </el-form-item>
93 92
           </el-col>
94
-          <el-col :span="8">
93
+          <el-col :span="16">
95 94
           </el-col>
96 95
         </el-row>
97 96
         <el-row type="flex" align="middle" justify="center" class="row">
@@ -106,7 +105,7 @@
106 105
             <el-form-item label="附件" prop="attachment">
107 106
               <upload
108 107
                 :post-action="uploadUrlV2"
109
-                :readonly="readonly"
108
+                :readonly="true"
110 109
                 :file-list="uploadFiles"
111 110
                 @on-upload-success="uploadSuccess"
112 111
                 @on-remove="uploadRemove"
@@ -187,10 +186,14 @@ export default {
187 186
       this.addBeforeHook(() => {
188 187
         return getSqrEnterById(this.$store.state.user.orgInfo.unitInfoId).then(resp => {
189 188
           console.log("加载的企业数据 ", resp)
190
-          if(! resp) throw new Error('无法加载数据')
189
+          if(! resp) return Promise.reject('请先去提承储资格申请')
191 190
           this.companySelected = resp
192 191
           if(this.isAdd) {
193 192
             this.form.sqrEnterpriseId = this.companySelected.id
193
+            if (resp.attachment) {
194
+              this.form.attachment = resp.attachment
195
+              this.uploadFiles = [resp.attachment]
196
+            }
194 197
           }
195 198
         })
196 199
       })
@@ -267,7 +270,7 @@ export default {
267 270
             this.show = false
268 271
             this.$emit('on-save')
269 272
           }else {
270
-            this.$message.error(resp.msg)
273
+            this.$message.error(this.getSaveFailMsg(resp))
271 274
           }
272 275
         })
273 276
       }).catch(err => {

+ 18 - 22
src/page/storageQualificationData/components/storageDataEdit.vue

@@ -6,7 +6,7 @@
6 6
         <el-row type="flex" align="middle" justify="center" class="row">
7 7
           <el-col :span="8">
8 8
             <el-form-item label="企业全称" prop="unitInfoId">
9
-              <el-input v-model="form.orgName" readonly/>
9
+              <el-input v-model="form.orgName" disabled/>
10 10
               <!--              <el-select v-model="form.unitInfoId" clearable placeholder="默认带出当前登录账号的企业名称" :disabled="readonly"-->
11 11
               <!--                         @change="companyChanged">-->
12 12
               <!--                <el-option-->
@@ -20,55 +20,50 @@
20 20
           </el-col>
21 21
           <el-col :span="8">
22 22
             <el-form-item label="企业代码">
23
-              <el-input :value="field(companySelected, 'dwdm')" placeholder="根据企业名称带出" readonly/>
23
+              <el-input :value="field(companySelected, 'dwdm')" placeholder="根据企业名称带出" disabled/>
24 24
             </el-form-item>
25 25
           </el-col>
26 26
           <el-col :span="8">
27 27
             <el-form-item label="企业地址">
28
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
28
+              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" disabled/>
29 29
             </el-form-item>
30 30
           </el-col>
31 31
         </el-row>
32 32
         <el-row type="flex" align="middle" justify="center" class="row">
33 33
           <el-col :span="8">
34 34
             <el-form-item label="法定代表人">
35
-              <el-input :value="field(companySelected, 'fddbr')" placeholder="根据企业名称带出" readonly/>
36
-            </el-form-item>
37
-          </el-col>
38
-          <el-col :span="8">
39
-            <el-form-item label="是否独立法人">
40
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
35
+              <el-input :value="field(companySelected, 'fddbr')" placeholder="根据企业名称带出" disabled/>
41 36
             </el-form-item>
42 37
           </el-col>
43 38
           <el-col :span="8">
44 39
             <el-form-item label="企业性质">
45
-              <el-input :value="field(companySelected, 'dictLabel')" placeholder="根据企业名称带出" readonly/>
40
+              <el-input :value="field(companySelected, 'dictLabel')" placeholder="根据企业名称带出" disabled/>
46 41
             </el-form-item>
47 42
           </el-col>
48
-        </el-row>
49
-        <el-row type="flex" align="middle" justify="center" class="row">
50 43
           <el-col :span="8">
51 44
             <el-form-item label="占地面积">
52
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
45
+              <el-input :value="field(companySelected, 'depotArea')" placeholder="根据企业名称带出" disabled/>
53 46
             </el-form-item>
54 47
           </el-col>
48
+        </el-row>
49
+        <el-row type="flex" align="middle" justify="center" class="row">
55 50
           <el-col :span="8">
56 51
             <el-form-item label="总仓容">
57
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
52
+              <el-input :value="field(companySelected, 'actualCapacity')" placeholder="根据企业名称带出" disabled/>
58 53
             </el-form-item>
59 54
           </el-col>
60 55
           <el-col :span="8">
61 56
             <el-form-item label="仓房数量">
62
-              <el-input :value="field(companySelected, 'cfs')" placeholder="根据企业名称带出" readonly/>
57
+              <el-input :value="field(companySelected, 'cfs')" placeholder="根据企业名称带出" disabled/>
63 58
             </el-form-item>
64 59
           </el-col>
65
-        </el-row>
66
-        <el-row type="flex" align="middle" justify="center" class="row">
67 60
           <el-col :span="8">
68 61
             <el-form-item label="油罐数量" prop="ygs">
69
-              <el-input :value="field(companySelected, 'ygs')" placeholder="根据企业名称带出" readonly/>
62
+              <el-input :value="field(companySelected, 'ygs')" placeholder="根据企业名称带出" disabled/>
70 63
             </el-form-item>
71 64
           </el-col>
65
+        </el-row>
66
+        <el-row type="flex" align="middle" justify="center" class="row">
72 67
           <el-col :span="8">
73 68
             <el-form-item label="正式职工人数" prop="fullTimeStaffCount">
74 69
               <el-input v-model.number="form.fullTimeStaffCount" :readonly="readonly"/>
@@ -79,20 +74,21 @@
79 74
               <el-input v-model.number="form.certifiedStorekeeperCount" :readonly="readonly"/>
80 75
             </el-form-item>
81 76
           </el-col>
82
-        </el-row>
83
-        <el-row type="flex" align="middle" justify="center" class="row">
84 77
           <el-col :span="8">
85 78
             <el-form-item label="持证检验员数量" prop="certifiedInspectorCount">
86 79
               <el-input v-model.number="form.certifiedInspectorCount" :readonly="readonly"/>
87 80
             </el-form-item>
88 81
           </el-col>
82
+        </el-row>
83
+        <el-row type="flex" align="middle" justify="center" class="row">
84
+
89 85
           <el-col :span="8">
90 86
             <el-form-item label="承储资格年限" prop="storageExpireTime">
91 87
               <el-date-picker v-model="form.storageExpireTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
92 88
                               :readonly="readonly"/>
93 89
             </el-form-item>
94 90
           </el-col>
95
-          <el-col :span="8">
91
+          <el-col :span="16">
96 92
           </el-col>
97 93
         </el-row>
98 94
         <el-row type="flex" align="middle" justify="center" class="row">
@@ -283,7 +279,7 @@ export default {
283 279
             this.show = false
284 280
             this.$emit('on-save')
285 281
           } else {
286
-            this.$message.error(resp.msg)
282
+            this.$message.error(this.getSaveFailMsg(resp))
287 283
           }
288 284
         })
289 285
       }).catch(err => {

+ 30 - 28
src/page/storageQualificationData/components/storageQualificationEdit.vue

@@ -6,7 +6,7 @@
6 6
         <el-row type="flex" align="middle" justify="center" class="row">
7 7
           <el-col :span="8">
8 8
             <el-form-item label="企业全称" prop="sqrEnterpriseId">
9
-              <el-input v-model="form.orgName" readonly/>
9
+              <el-input v-model="form.orgName" disabled/>
10 10
 <!--              <el-select v-model="form.sqrEnterpriseId" clearable placeholder="默认带出当前登录账号的企业名称" :disabled="readonly"-->
11 11
 <!--                         @change="companyChanged">-->
12 12
 <!--                <el-option-->
@@ -20,84 +20,82 @@
20 20
           </el-col>
21 21
           <el-col :span="8">
22 22
             <el-form-item label="企业代码">
23
-              <el-input :value="field(companySelected, 'dwdm')" placeholder="根据企业名称带出" readonly/>
23
+              <el-input :value="field(companySelected, 'dwdm')" placeholder="根据企业名称带出" disabled/>
24 24
             </el-form-item>
25 25
           </el-col>
26 26
           <el-col :span="8">
27 27
             <el-form-item label="企业地址">
28
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
28
+              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" disabled/>
29 29
             </el-form-item>
30 30
           </el-col>
31 31
         </el-row>
32 32
         <el-row type="flex" align="middle" justify="center" placeholder="根据企业名称带出" class="row">
33 33
           <el-col :span="8">
34
-            <el-form-item label="法定代表人">
35
-              <el-input :value="field(companySelected, 'fddbr')" placeholder="根据企业名称带出" readonly/>
36
-            </el-form-item>
37
-          </el-col>
38
-          <el-col :span="8">
39 34
             <el-form-item label="是否独立法人">
40
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
35
+              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" disabled/>
41 36
             </el-form-item>
42 37
           </el-col>
43 38
           <el-col :span="8">
44 39
             <el-form-item label="企业性质">
45
-              <el-input :value="field(companySelected, 'dictLabel')" placeholder="根据企业名称带出" readonly />
40
+              <el-input :value="field(companySelected, 'dictLabel')" placeholder="根据企业名称带出" disabled />
46 41
             </el-form-item>
47 42
           </el-col>
48
-        </el-row>
49
-        <el-row type="flex" align="middle" justify="center" placeholder="根据企业名称带出" class="row">
50 43
           <el-col :span="8">
51 44
             <el-form-item label="占地面积">
52
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
45
+              <el-input :value="field(companySelected, 'depotArea')" placeholder="根据企业名称带出" disabled/>
53 46
             </el-form-item>
54 47
           </el-col>
48
+        </el-row>
49
+        <el-row type="flex" align="middle" justify="center" placeholder="根据企业名称带出" class="row">
50
+
55 51
           <el-col :span="8">
56 52
             <el-form-item label="总仓容">
57
-              <el-input :value="field(companySelected, 'zcdz')" placeholder="根据企业名称带出" readonly/>
53
+              <el-input :value="field(companySelected, 'actualCapacity')" placeholder="根据企业名称带出" disabled/>
58 54
             </el-form-item>
59 55
           </el-col>
60 56
           <el-col :span="8">
61 57
             <el-form-item label="仓房数量">
62
-              <el-input :value="field(companySelected, 'cfs')" placeholder="根据企业名称带出" readonly />
58
+              <el-input :value="field(companySelected, 'cfs')" placeholder="根据企业名称带出" disabled />
63 59
             </el-form-item>
64 60
           </el-col>
65
-        </el-row>
66
-        <el-row type="flex" align="middle" justify="center" class="row">
67 61
           <el-col :span="8">
68 62
             <el-form-item label="油罐数量" prop="ygs">
69
-              <el-input :value="field(companySelected, 'ygs')" placeholder="根据企业名称带出" readonly />
63
+              <el-input :value="field(companySelected, 'ygs')" placeholder="根据企业名称带出" disabled />
70 64
             </el-form-item>
71 65
           </el-col>
66
+        </el-row>
67
+        <el-row type="flex" align="middle" justify="center" class="row">
68
+
72 69
           <el-col :span="8">
73 70
             <el-form-item label="正式职工人数" prop="fullTimeStaffCount">
74
-              <el-input :value="field(companySelected, 'fullTimeStaffCount')" placeholder="根据企业名称带出" readonly />
71
+              <el-input :value="field(companySelected, 'fullTimeStaffCount')" placeholder="根据企业名称带出" disabled />
75 72
             </el-form-item>
76 73
           </el-col>
77 74
           <el-col :span="8">
78 75
             <el-form-item label="持证保管员数量" prop="certifiedStorekeeperCount">
79
-              <el-input :value="field(companySelected, 'certifiedStorekeeperCount')" placeholder="根据企业名称带出" readonly />
76
+              <el-input :value="field(companySelected, 'certifiedStorekeeperCount')" placeholder="根据企业名称带出" disabled />
80 77
             </el-form-item>
81 78
           </el-col>
82
-        </el-row>
83
-        <el-row type="flex" align="middle" justify="center" class="row">
84 79
           <el-col :span="8">
85 80
             <el-form-item label="持证检验员数量" prop="certifiedInspectorCount">
86
-              <el-input :value="field(companySelected, 'certifiedInspectorCount')" placeholder="根据企业名称带出" readonly />
81
+              <el-input :value="field(companySelected, 'certifiedInspectorCount')" placeholder="根据企业名称带出" disabled />
87 82
             </el-form-item>
88 83
           </el-col>
84
+        </el-row>
85
+        <el-row type="flex" align="middle" justify="center" class="row">
86
+
89 87
           <el-col :span="8">
90 88
             <el-form-item label="承储资格年限" prop="storageExpireTime">
91 89
               <el-date-picker v-model="form.storageExpireTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"/>
92 90
             </el-form-item>
93 91
           </el-col>
94
-          <el-col :span="8">
92
+          <el-col :span="16">
95 93
           </el-col>
96 94
         </el-row>
97 95
         <el-row type="flex" align="middle" justify="center" class="row">
98 96
           <el-col :span="24">
99 97
             <el-form-item label="仓房设施设备情况" prop="warehouseFacilitySituation">
100
-              <el-input :value="field(companySelected, 'warehouseFacilitySituation')" type="textarea" readonly/>
98
+              <el-input :value="field(companySelected, 'warehouseFacilitySituation')" type="textarea" disabled/>
101 99
             </el-form-item>
102 100
           </el-col>
103 101
         </el-row>
@@ -106,7 +104,7 @@
106 104
             <el-form-item label="附件" prop="attachment">
107 105
               <upload
108 106
                 :post-action="uploadUrlV2"
109
-                :readonly="readonly"
107
+                :readonly="true"
110 108
                 :file-list="uploadFiles"
111 109
                 @on-upload-success="uploadSuccess"
112 110
                 @on-remove="uploadRemove"
@@ -188,10 +186,14 @@ export default {
188 186
       this.addBeforeHook(() => {
189 187
         return getSqrEnterById(this.$store.state.user.orgInfo.unitInfoId).then(resp => {
190 188
           console.log("加载的企业数据 ", resp)
191
-          if(! resp) throw new Error('无法加载数据')
189
+          if(! resp) return Promise.reject('请先去提承储资格申请')
192 190
           this.companySelected = resp
193 191
           if(this.isAdd) {
194 192
             this.form.sqrEnterpriseId = this.companySelected.id
193
+            if (resp.attachment) {
194
+              this.form.attachment = resp.attachment
195
+              this.uploadFiles = [resp.attachment]
196
+            }
195 197
           }
196 198
         })
197 199
       })
@@ -273,7 +275,7 @@ export default {
273 275
             this.show = false
274 276
             this.$emit('on-save')
275 277
           } else {
276
-            this.$message.error(resp.msg)
278
+            this.$message.error(this.getSaveFailMsg(resp))
277 279
           }
278 280
         })
279 281
       }).catch(err => {

+ 6 - 1
src/page/storageQualificationData/informationChanges.vue

@@ -221,6 +221,7 @@ export default {
221 221
     getConstantsQuery() {
222 222
       return {
223 223
         applyType: APPLY_TYPE,
224
+        unitInfoId: this.unitInfoId,
224 225
       }
225 226
     },
226 227
     getListFun() {
@@ -246,7 +247,11 @@ export default {
246 247
           if(resp.status === 'success') {
247 248
             this.getList()
248 249
           }else {
249
-            this.$message.error(resp.msg)
250
+            if(resp.error) {
251
+              this.$message.error(resp.error)
252
+            }else if(resp.msg) {
253
+              this.$message.error(resp.msg)
254
+            }
250 255
           }
251 256
         })
252 257
       })

+ 7 - 1
src/page/storageQualificationData/storageData.vue

@@ -221,6 +221,7 @@ export default {
221 221
     getConstantsQuery() {
222 222
       return {
223 223
         applyType: APPLY_TYPE,
224
+        unitInfoId: this.unitInfoId
224 225
       }
225 226
     },
226 227
     getListFun() {
@@ -243,7 +244,12 @@ export default {
243 244
           if(resp.status === 'success') {
244 245
             this.getList()
245 246
           }else {
246
-            this.$message.error(resp.msg)
247
+            if(resp.error) {
248
+              this.$message.error(resp.error)
249
+            }else if(resp.msg) {
250
+              this.$message.error(resp.msg)
251
+            }
252
+
247 253
           }
248 254
         })
249 255
       })

+ 6 - 1
src/page/storageQualificationData/storageQualification.vue

@@ -221,6 +221,7 @@ export default {
221 221
     getConstantsQuery() {
222 222
       return {
223 223
         applyType: APPLY_TYPE,
224
+        unitInfoId: this.unitInfoId,
224 225
       }
225 226
     },
226 227
     getListFun() {
@@ -243,7 +244,11 @@ export default {
243 244
           if(resp.status === 'success') {
244 245
             this.getList()
245 246
           }else {
246
-            this.$message.error(resp.msg)
247
+            if(resp.error) {
248
+              this.$message.error(resp.error)
249
+            }else if(resp.msg) {
250
+              this.$message.error(resp.msg)
251
+            }
247 252
           }
248 253
         })
249 254
       })

+ 86 - 32
src/page/storehouseManagement/components/dailyInspectionEdit.vue

@@ -6,24 +6,41 @@
6 6
     <el-row type="flex" align="middle" justify="center" class="row">
7 7
       <el-col :span="8">
8 8
         <el-form-item label="仓房名称" prop="houseId">
9
-          <storehouse-select v-model.number="form.houseId" value-fun="id" :org-id="orgId" :readonly="readonly"/>
9
+          <el-select v-model="form.houseId"  placeholder="请选择" :disabled="readonly" @change="houseChanged">
10
+            <el-option
11
+              v-for="item in houseOptions"
12
+              :key="item.value"
13
+              :label="item.label"
14
+              :value="item.value">
15
+            </el-option>
16
+          </el-select>
17
+<!--          <storehouse-select v-model.number="form.houseId" value-fun="id" :org-id="orgId" :readonly="readonly"/>-->
10 18
         </el-form-item>
11 19
       </el-col>
12 20
       <el-col :span="8">
13 21
         <el-form-item label="货位名称" prop="warehouseId">
14
-          <warehouse-select :value="form.warehouseId" :org-id="orgId" @input="onWareSelect" :readonly="readonly"/>
15
-        </el-form-item>
16
-      </el-col>
17
-      <el-col :span="8">
18
-        <el-form-item label="粮油品种" prop="subType">
19
-          <el-select v-model.number="form.subType" clearable placeholder="请选择" :disabled="readonly" @change="emitChange">
22
+          <el-select v-model="form.warehouseId"  placeholder="请选择" :disabled="readonly" @change="wareChanged">
20 23
             <el-option
21
-              v-for="item in subTypeOptions"
24
+              v-for="item in wareOptions"
22 25
               :key="item.value"
23 26
               :label="item.label"
24 27
               :value="item.value">
25 28
             </el-option>
26 29
           </el-select>
30
+<!--          <warehouse-select :value="form.warehouseId" :org-id="orgId" @input="onWareSelect" :readonly="readonly"/>-->
31
+        </el-form-item>
32
+      </el-col>
33
+      <el-col :span="8">
34
+        <el-form-item label="粮油品种" prop="subType">
35
+          <el-input :value="$enumUtils.getNameById(form.subType).name" disabled/>
36
+<!--          <el-select v-model.number="form.subType" clearable placeholder="请选择" :disabled="readonly" @change="emitChange">-->
37
+<!--            <el-option-->
38
+<!--              v-for="item in subTypeOptions"-->
39
+<!--              :key="item.value"-->
40
+<!--              :label="item.label"-->
41
+<!--              :value="item.value">-->
42
+<!--            </el-option>-->
43
+<!--          </el-select>-->
27 44
         </el-form-item>
28 45
       </el-col>
29 46
     </el-row>
@@ -196,7 +213,7 @@ import CommonSelect from "@/components/common/commonSelect/index.vue";
196 213
 import StorehouseSelect from "@/components/common/storehouseSelect/index.vue"
197 214
 import WarehouseSelect from "@/components/common/warehouseSelect/index_v2.vue";
198 215
 import {mapGetters} from "vuex";
199
-import {getNumberList, getKeeperNamesByHouseId, dailySave, dailyEdit} from "@/api/settlementManagement";
216
+import {getNumberList, getKeeperNamesByHouseId, dailySave, dailyEdit, getListOrRcsj} from "@/api/settlementManagement";
200 217
 import {number_data, simple_required} from "../../../utils/ruleDatas";
201 218
 export default {
202 219
   props: {
@@ -236,24 +253,25 @@ export default {
236 253
         this.getGrainSelect()
237 254
       }
238 255
     },
239
-    'form.houseId': {
240
-      handler: function(n) {
241
-        if(this.loading) return
242
-        this.form.warehouseId = null
243
-        this.form.subType = null
244
-        this.subTypeOptions = []
245
-        if(n) {
246
-          this.loading = true
247
-          getKeeperNamesByHouseId(n).then(resp => {
248
-            this.form.bgy = resp.name
249
-          }).finally(() => {
250
-            this.loading = false
251
-          })
252
-        }else {
253
-          this.form.bgy = null
254
-        }
255
-      }
256
-    }
256
+    // 'form.houseId': {
257
+    //   handler: function(n) {
258
+    //     if(this.loading) return
259
+    //     this.form.warehouseId = null
260
+    //     this.form.subType = null
261
+    //     this.subTypeOptions = []
262
+    //     if(n) {
263
+    //       this.loading = true
264
+    //       getKeeperNamesByHouseId(n).then(resp => {
265
+    //         this.form.bgy = resp.name
266
+    //       }).finally(() => {
267
+    //         this.loading = false
268
+    //       })
269
+    //     }else {
270
+    //       this.form.warehouseId = null
271
+    //       this.form.bgy = null
272
+    //     }
273
+    //   }
274
+    // }
257 275
   },
258 276
   computed: {
259 277
     ...mapGetters(['userId', "orgId", 'userName', 'realName']),
@@ -275,6 +293,8 @@ export default {
275 293
       show: this.visible,
276 294
       loading: false,
277 295
       form: { },
296
+      houseOptions: [],
297
+      wareOptions: [],
278 298
       rules: {
279 299
         houseId: simple_required, warehouseId: simple_required, subType: simple_required,
280 300
         checkTime: simple_required, checker: simple_required, bgy: simple_required,
@@ -286,8 +306,9 @@ export default {
286 306
     }
287 307
   },
288 308
   methods: {
289
-    init() {
309
+    async init() {
290 310
       this.resetForm()
311
+      await this.$systemUtils.getHouseOption(this.orgId).then(opt => this.houseOptions = opt)
291 312
       if(this.isAdd) {
292 313
         this.form.rainCheck = '正常'
293 314
       }else {
@@ -335,6 +356,12 @@ export default {
335 356
         findQuestion: null,
336 357
       }
337 358
     },
359
+    getWareOptions(houseId) {
360
+      this.wareOptions = []
361
+      if(houseId) {
362
+        this.$systemUtils.getWarehouseOption(this.orgId, houseId).then(opt => this.wareOptions = opt)
363
+      }
364
+    },
338 365
     getLocalData() {
339 366
       const data = {
340 367
         orgId: this.orgId,
@@ -368,10 +395,37 @@ export default {
368 395
     emitChange() {
369 396
 
370 397
     },
371
-    onWareSelect(selected, data) {
372
-      if(this.loading) return
373
-      console.log('货位选择 = ', data)
374
-      this.form.warehouseId = data.raw.warehouseId
398
+    houseChanged(n) {
399
+      console.log('仓房变化', n)
400
+      this.form.subType = null
401
+      this.subTypeOptions = []
402
+      this.form.warehouseId = null
403
+      if(n) {
404
+        this.getWareOptions(n)
405
+        getKeeperNamesByHouseId(n).then(resp => {
406
+          this.form.bgy = resp.name
407
+        }).finally(() => {
408
+          this.loading = false
409
+        })
410
+      }else {
411
+        this.form.bgy = null
412
+        this.wareOptions = []
413
+      }
414
+    },
415
+    wareChanged(n) {
416
+      // if(this.loading) return
417
+      // console.log('货位选择 = ', data)
418
+      // this.form.warehouseId = data.raw.warehouseId
419
+      this.getGrainSelect()
420
+      if(this.form.houseId && this.form.warehouseId) {
421
+        getListOrRcsj({ch: this.form.houseId, hwh: this.form.warehouseId, unitid: this.orgId}, this.orgId).then(resp => {
422
+          console.log('货位明细', resp)
423
+          if(resp && resp.length > 0) {
424
+            const o = resp[0]
425
+            this.form.subType = o.mxpz
426
+          }
427
+        })
428
+      }
375 429
     },
376 430
     save() {
377 431
       this.$refs.editForm.validate((ok) => {

+ 69 - 2
src/page/storehouseManagement/components/hazardControlEdit.vue

@@ -121,7 +121,9 @@
121 121
       <el-col :span="24">
122 122
         <el-form-item label="附件">
123 123
           <upload
124
+            :download-base="downloadBase"
124 125
             :post-action="uploadUrl_2"
126
+            :limit="2"
125 127
             :post-data="{
126 128
               type: 'safeManage',
127 129
               userId: userId,
@@ -129,6 +131,8 @@
129 131
             }"
130 132
             :file-list="fileList"
131 133
             :readonly="readonly"
134
+            @on-upload-success="onUploadSuccess"
135
+            @on-remove="onUploadRemove"
132 136
           ></upload>
133 137
         </el-form-item>
134 138
       </el-col>
@@ -157,6 +161,9 @@ import {mapGetters} from "vuex";
157 161
 import {StorageSafeManageControllerSave, StorageSafeManageControllerEdit, uploadUrl_2} from "@/api/settlementManagement";
158 162
 import {simple_required} from "@/utils/ruleDatas";
159 163
 import upload from '@/components/upload/v2.vue'
164
+import {basicUploadUrl, getFileList, minioUrl} from "@/api/base";
165
+import {downloadBase} from "@/api/inventoryQualityTraceability";
166
+
160 167
 export default {
161 168
   props: {
162 169
     visible: {
@@ -208,10 +215,14 @@ export default {
208 215
   },
209 216
   data() {
210 217
     return {
218
+      downloadBase,
219
+      minioUrl,
211 220
       uploadUrl_2,
212 221
       show: this.visible,
213 222
       form: { },
214 223
       fileList: [],
224
+      fileIds: [],
225
+      deleteFileIds: [],
215 226
       rules: {
216 227
         sbr: simple_required, fxxx: simple_required, hjbw: simple_required,
217 228
         fxlx: simple_required, fxfj: simple_required, fxglcs: simple_required,
@@ -228,12 +239,32 @@ export default {
228 239
       this.resetForm()
229 240
       if(this.isAdd) {
230 241
       }else {
242
+        console.log('查看 id', this.dataId)
243
+        getFileList({bid: this.dataId, orgId: this.orgId}).then(resp => {
244
+
245
+          this.fileList = resp.map(d => {
246
+            return {
247
+              id: d.id,
248
+              name: d.originalFileName,
249
+              url: `${basicUploadUrl}${d.filePath}`
250
+            }
251
+          })
252
+          console.log('文件列表', resp, this.fileList)
253
+        })
231 254
         StorageSafeManageControllerEdit(this.dataId).then(resp  => {
232 255
           this.form = resp.storageSafeManageWithBLOBs
256
+          // const fl = resp.fileList || []
257
+          // this.fileList = fl.map(d => {
258
+          //   console.log('文件列表', d)
259
+          //   return d
260
+          // })
233 261
         })
234 262
       }
235 263
     },
236 264
     resetForm() {
265
+      this.fileList = []
266
+      this.fileIds = []
267
+      this.deleteFileIds = []
237 268
       this.form = {
238 269
         sbr: null,
239 270
         hjbw: null,
@@ -254,6 +285,7 @@ export default {
254 285
         rectificationState: null,
255 286
       }
256 287
     },
288
+
257 289
     getLocalData() {
258 290
       const data = {
259 291
         orgId: this.orgId,
@@ -262,8 +294,8 @@ export default {
262 294
       }
263 295
       return {
264 296
         storageSafeManage: JSON.stringify(data),
265
-        fileIds: "[]",
266
-        deleteFileIds: "[]",
297
+        fileIds: JSON.stringify(this.fileList.map(f => f.id)),
298
+        deleteFileIds: JSON.stringify(this.deleteFileIds),
267 299
       }
268 300
     },
269 301
     onChoose(data) {
@@ -279,6 +311,10 @@ export default {
279 311
     },
280 312
     save() {
281 313
       console.log(this.$refs.editForm.validate)
314
+      const c = this.$store.state.user.depotInfo.zcCounty
315
+      if(!c ) {
316
+        return this.$message.error('您的库区信息不完整, 无法保存')
317
+      }
282 318
       this.$refs.editForm.validate((ok) => {
283 319
         if(ok) {
284 320
           const data = this.getLocalData()
@@ -294,6 +330,37 @@ export default {
294 330
           })
295 331
         }
296 332
       })
333
+    },
334
+    onUploadSuccess(resp, file, fileList) {
335
+      console.log('上传文件 resp', resp, file, fileList)
336
+      this.fileList = fileList.map(f => {
337
+        let url
338
+        let id
339
+        if(f.response) {
340
+          url = f.response.filePath
341
+          id = f.response.id
342
+        }else {
343
+          url = f.url
344
+          id = f.id
345
+        }
346
+        return {
347
+          name: f.name,
348
+          url: url,
349
+          id: id,
350
+        }
351
+      })
352
+    },
353
+    onUploadRemove(fileList) {
354
+      const removeFiles = []
355
+      for(const f of this.fileList) {
356
+        const file = fileList.find(temp => temp.id === f.id)
357
+        if(! file) {
358
+          removeFiles.push(f)
359
+        }
360
+      }
361
+      this.fileList = fileList
362
+      this.deleteFileIds.push(... removeFiles.map(f => f.id))
363
+      console.log('删除文件 ', fileList, removeFiles)
297 364
     }
298 365
   }
299 366
 

+ 3 - 3
src/page/storehouseManagement/hazardControl.vue

@@ -154,7 +154,7 @@
154 154
 
155 155
 import commonSelect from "@/components/common/commonSelect"
156 156
 import edit from "./components/hazardControlEdit";
157
-import {storageSafeManageControllerList} from "@/api/settlementManagement";
157
+import {storageSafeManageControllerList, StorageSafeManageControllerRemove} from "@/api/settlementManagement";
158 158
 import {mapGetters} from "vuex";
159 159
 export default {
160 160
   name: "hazardControl",
@@ -213,8 +213,8 @@ export default {
213 213
       this.addShow = true
214 214
     },
215 215
     del(data) {
216
-      festivalbeforeCheckRemove(data.id).then(resp => {
217
-        if(resp.msg === 'success') {
216
+      StorageSafeManageControllerRemove(data.id).then(resp => {
217
+        if(resp.status === '200') {
218 218
           this.$message.success('删除成功')
219 219
           this.getList()
220 220
         }else {

+ 19 - 11
src/page/storehouseManagement/storehouseBaseInfo.vue

@@ -61,11 +61,11 @@
61 61
           {{ $enumUtils.getNameById(scope.row.storehouseType).name }}
62 62
         </template>
63 63
       </el-table-column>
64
-      <el-table-column
65
-        align="center"
66
-        prop="positionName"
67
-        label="代储甲方名称"
68
-      ></el-table-column>
64
+<!--      <el-table-column-->
65
+<!--        align="center"-->
66
+<!--        prop="agentDepotName"-->
67
+<!--        label="代储甲方名称"-->
68
+<!--      ></el-table-column>-->
69 69
       <el-table-column
70 70
         align="center"
71 71
         prop="designCapacity"
@@ -78,22 +78,30 @@
78 78
       ></el-table-column>
79 79
       <el-table-column
80 80
         align="center"
81
-        prop="totalCost"
81
+        prop="dutystoreman"
82 82
         label="保管员"
83 83
       ></el-table-column>
84 84
       <el-table-column
85 85
         align="center"
86
-        prop="totalCost"
86
+        prop="storehouseState"
87 87
         label="仓房状态"
88
-      ></el-table-column>
88
+      >
89
+        <template v-slot="scope">
90
+          {{$enumUtils.getNameById(scope.row.storehouseState).name}}
91
+        </template>
92
+      </el-table-column>
89 93
       <el-table-column
90 94
         align="center"
91
-        prop="totalCost"
95
+        prop="delFlag"
92 96
         label="使用情况"
93
-      ></el-table-column>
97
+      >
98
+        <template v-slot="scope">
99
+          {{scope.row.delFlag == '1' ? "在用":"弃用"}}
100
+        </template>
101
+      </el-table-column>
94 102
       <el-table-column
95 103
         align="center"
96
-        prop="completionDate"
104
+        prop="usedate"
97 105
         label="交付使用日期"
98 106
       ></el-table-column>
99 107
       <el-table-column label="操作" align="center" width="80">

+ 16 - 11
src/page/storehouseManagement/temperatureInspection.vue

@@ -10,7 +10,7 @@
10 10
           class="demo-form-inline search-form"
11 11
         >
12 12
           <el-form-item label="仓房名称:" prop="houseId">
13
-            <el-select v-model="form.houseId" clearable placeholder="请选择" @change="$forceUpdate()" >
13
+            <el-select v-model="form.houseId" clearable placeholder="请选择" @change="$forceUpdate()" :disabled="houseOptionsLock">
14 14
               <el-option
15 15
                 v-for="item in houseOptions"
16 16
                 :key="item.value"
@@ -35,6 +35,7 @@
35 35
             <span class="search-line"></span>
36 36
             <el-button type="primary" @click="search" size="small" class="iconfont iconchaxun">查询</el-button>
37 37
             <el-button
38
+              v-if="! houseOptionsLock"
38 39
               type="primary"
39 40
               @click="reset('searchForm')"
40 41
               size="small"
@@ -68,7 +69,7 @@
68 69
         label="仓房名称"
69 70
       >
70 71
         <template v-slot="scope">
71
-          {{ houseIdNameMap[scope.row.houseId] }}
72
+          {{ scope.row.houseName ? scope.row.houseName : houseIdNameMap[scope.row.houseId] }}
72 73
         </template>
73 74
       </el-table-column>
74 75
       <el-table-column
@@ -122,15 +123,15 @@
122 123
           label="平均"
123 124
         ></el-table-column>
124 125
       </el-table-column>
125
-      <el-table-column label="操作" align="center" width="130">
126
-        <template slot-scope="scope">
127
-          <el-button
128
-            type="primary"
129
-            size="small"
130
-            icon="el-icon-s-data"
131
-          >查看五温图</el-button>
132
-        </template>
133
-      </el-table-column>
126
+<!--      <el-table-column label="操作" align="center" width="130">-->
127
+<!--        <template slot-scope="scope">-->
128
+<!--          <el-button-->
129
+<!--            type="primary"-->
130
+<!--            size="small"-->
131
+<!--            icon="el-icon-s-data"-->
132
+<!--          >查看五温图</el-button>-->
133
+<!--        </template>-->
134
+<!--      </el-table-column>-->
134 135
     </el-table>
135 136
     <!-- 分页开始 -->
136 137
     <div class="pag-right clearFix">
@@ -180,6 +181,7 @@ export default {
180 181
       tableData: [],
181 182
       houseIdNameMap: {},
182 183
       houseOptions: [],
184
+      houseOptionsLock: false,
183 185
       form: {
184 186
         houseId: null,
185 187
         date: [],
@@ -203,7 +205,9 @@ export default {
203 205
   },
204 206
   mounted() {
205 207
     if(this.houseId != null) {
208
+      console.log('接收 house id', this.houseId)
206 209
       this.form.houseId = this.houseId
210
+      this.houseOptionsLock = true
207 211
     }
208 212
     this.getHouseOptions()
209 213
     this.getList()
@@ -242,6 +246,7 @@ export default {
242 246
             raw: d.raw
243 247
           }
244 248
         })
249
+        console.log('仓房列表', this.houseOptions)
245 250
       })
246 251
     },
247 252
     add() {

+ 58 - 14
src/page/system/authManagement.vue

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="content-main">
2
+  <div class="content-main" v-loading="loading">
3 3
     <el-row>
4 4
       <el-col :span="11" style="margin-right: 5px">
5 5
         <el-card class="box-card">
@@ -14,12 +14,16 @@
14 14
             >
15 15
               <el-table-column
16 16
                 align="center"
17
-                type="index" width="60">
17
+                type="index" width="60"
18
+              >
18 19
               </el-table-column>
19 20
               <el-table-column
20 21
                 align="center"
21 22
                 prop="roleName"
22 23
                 label="角色">
24
+                <template v-slot="scope">
25
+                  <span :class="{'selected-role': selectRoleId === scope.row.roleId}">{{scope.row.roleName}}</span>
26
+                </template>
23 27
               </el-table-column>
24 28
             </el-table>
25 29
           </div>
@@ -71,6 +75,9 @@ export default {
71 75
     this.init()
72 76
   },
73 77
   methods: {
78
+    backgroundColor() {
79
+      return backgroundColor
80
+    },
74 81
     init() {
75 82
       this.loading = true
76 83
       this.getAllRole().finally(_ => {
@@ -111,9 +118,9 @@ export default {
111 118
       return getRole().then(resp => {
112 119
         this.roleList = resp.list
113 120
         return getFunc().then(resp => {
114
-          console.log('all fun ', resp.list.filter(d => d.funcSort == null))
121
+          console.log('all fun ', resp.filter(d => d.funcSort == null))
115 122
           const funcMap = {}
116
-          const list = resp.list.map(d => {
123
+          const list = resp.map(d => {
117 124
             const ret =  {
118 125
               ...d,
119 126
               label: d.funcName,
@@ -146,7 +153,9 @@ export default {
146 153
         return fList
147 154
       }).then(list => {
148 155
         console.log('all list', list)
149
-        const tree = this.arrayToTree(list, fMap)
156
+        // const tree = this.arrayToTree(list, fMap)
157
+        //   .filter(d => d.funcSort != null)
158
+        const tree = this.$systemUtils.buildFuncTree(list)
150 159
           .filter(d => d.funcSort != null)
151 160
         tree.sort((d1, d2) => d1.funcSort - d2.funcSort)
152 161
         return tree
@@ -166,28 +175,59 @@ export default {
166 175
         tree.setChecked(d.id, false)
167 176
       })
168 177
     },
178
+    getParentIds(pidList, arr) {
179
+      const ps = []
180
+      for(const d of arr) {
181
+        if(d.parentId > 0) {
182
+          // 有父菜单
183
+          if(! pidList.includes(d.parentId)) {
184
+            pidList.push(d.parentId)
185
+            const p = this.funMap[d.parentId]
186
+            ps.push(p)
187
+          }
188
+        }
189
+      }
190
+      if(ps.length > 0) {
191
+        this.getParentIds(pidList, ps)
192
+      }
193
+    },
169 194
     submit() {
195
+      this.loading = true
170 196
       const tree = this.$refs.tree
171 197
       const nodes = tree.getCheckedNodes()
198
+      const ps = []
199
+      this.getParentIds(ps, nodes)
200
+      console.log('nnnnn', nodes, ps)
172 201
       const funList = nodes.filter(n => ! (n.id + '').startsWith('btn-'))
173 202
       if(funList.length <= 0) {
174
-        return this.$message.error('情选择功能')
203
+        return this.$message.error('选择功能')
175 204
       }
176 205
       const btnList = nodes.filter(n => (n.id + '').startsWith('btn-'))
177
-      console.log('功能', funList.map(n => n.id).join(','))
178
-      console.log('按钮', btnList.map(n => n.id.replace('btn-', '')).join(','))
206
+
179 207
       console.log(nodes)
208
+      const funIdList = funList.map(n => n.id)
209
+      funIdList.push(... ps)
210
+      const uniList = [... new Set(funIdList)]
211
+      console.log('功能', uniList.join(','))
212
+      console.log('按钮', btnList.map(n => n.id.replace('btn-', '')).join(','))
180 213
       Promise.all([
181
-        roleButtonSave({
182
-          roleId: this.selectRoleId,
183
-          btnIds: btnList.map(n => n.id.replace('btn-', '')).join(',')
184
-        }),
214
+        // roleButtonSave({
215
+        //   roleId: this.selectRoleId,
216
+        //   btnIds: btnList.map(n => n.id.replace('btn-', '')).join(',')
217
+        // }),
185 218
         roleFuncSave({
186 219
           roleId: this.selectRoleId,
187
-          funcIds: funList.map(n => n.id).join(',')
220
+          funcIds: uniList.join(',')
188 221
         })
189 222
       ]).then(resp => {
190
-        this.$message.success('保存成功')
223
+        if(!resp.status) {
224
+          this.$message.success('保存成功')
225
+        }else {
226
+          this.$message.error(resp.message)
227
+        }
228
+
229
+      }).finally(_ => {
230
+        this.loading = false
191 231
       })
192 232
     },
193 233
     onRowSelect(row, column, event) {
@@ -240,4 +280,8 @@ export default {
240 280
   height: fit-content;
241 281
   min-height: 500px;
242 282
 }
283
+
284
+.selected-role {
285
+  color: green;
286
+}
243 287
 </style>

+ 0 - 0
src/page/system/components/functionManagementEdit.vue


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä