qymljy 2 lat temu
rodzic
commit
b823777af3

+ 6 - 0
.idea/misc.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="WebPackConfiguration">
+    <option name="mode" value="DISABLED" />
+  </component>
+</project>

+ 196 - 0
package-lock.json

@@ -20,9 +20,11 @@
         "file-saver": "^2.0.5",
         "js-md5": "^0.7.3",
         "nprogress": "^0.2.0",
+        "qrcodejs2": "^0.0.2",
         "script-loader": "^0.7.2",
         "vue": "^2.6.14",
         "vue-countupjs": "^1.0.0",
+        "vue-qr": "^4.0.9",
         "vue-router": "^3.5.1",
         "vue-wxlogin": "^1.0.4",
         "vuex": "^3.6.2",
@@ -5957,6 +5959,17 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/decompress-response": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz",
+      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+      "dependencies": {
+        "mimic-response": "^3.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/deep-equal": {
       "version": "1.1.1",
       "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.1.tgz",
@@ -8866,6 +8879,11 @@
         "@sideway/pinpoint": "^2.0.0"
       }
     },
+    "node_modules/js-binary-schema-parser": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz",
+      "integrity": "sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg=="
+    },
     "node_modules/js-md5": {
       "version": "0.7.3",
       "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
@@ -9602,6 +9620,14 @@
         "node": ">=6"
       }
     },
+    "node_modules/mimic-response": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-3.1.0.tgz",
+      "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/mini-css-extract-plugin": {
       "version": "2.5.3",
       "resolved": "https://registry.npmmirror.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.5.3.tgz",
@@ -10290,6 +10316,11 @@
         "node": ">=6"
       }
     },
+    "node_modules/parenthesis": {
+      "version": "3.1.8",
+      "resolved": "https://registry.npmmirror.com/parenthesis/-/parenthesis-3.1.8.tgz",
+      "integrity": "sha512-KF/U8tk54BgQewkJPvB4s/US3VQY68BRDpH638+7O/n58TpnwiwnOtGIOsT2/i+M78s61BBpeC83STB88d8sqw=="
+    },
     "node_modules/parse-json": {
       "version": "5.2.0",
       "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz",
@@ -11107,6 +11138,11 @@
         "node": ">=6"
       }
     },
+    "node_modules/qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "node_modules/qs": {
       "version": "6.9.7",
       "resolved": "https://registry.npmmirror.com/qs/-/qs-6.9.7.tgz",
@@ -11868,6 +11904,21 @@
       "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
       "dev": true
     },
+    "node_modules/simple-concat": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/simple-concat/-/simple-concat-1.0.1.tgz",
+      "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
+    },
+    "node_modules/simple-get": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmmirror.com/simple-get/-/simple-get-4.0.1.tgz",
+      "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+      "dependencies": {
+        "decompress-response": "^6.0.0",
+        "once": "^1.3.1",
+        "simple-concat": "^1.0.0"
+      }
+    },
     "node_modules/sirv": {
       "version": "1.0.19",
       "resolved": "https://registry.npmmirror.com/sirv/-/sirv-1.0.19.tgz",
@@ -12170,6 +12221,14 @@
       "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
       "dev": true
     },
+    "node_modules/string-split-by": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/string-split-by/-/string-split-by-1.0.0.tgz",
+      "integrity": "sha512-KaJKY+hfpzNyet/emP81PJA9hTVSfxNLS9SFTWxdCnnW1/zOOwiV248+EfoX7IQFcBaOp4G5YE6xTJMF+pLg6A==",
+      "dependencies": {
+        "parenthesis": "^3.1.5"
+      }
+    },
     "node_modules/string-width": {
       "version": "4.2.3",
       "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
@@ -14098,6 +14157,51 @@
         "node": ">=8"
       }
     },
+    "node_modules/vue-qr": {
+      "version": "4.0.9",
+      "resolved": "https://registry.npmmirror.com/vue-qr/-/vue-qr-4.0.9.tgz",
+      "integrity": "sha512-pAISV94T0MNEYA3NGjykUpsXRE2QfaNxlu9ZhEL6CERgqNc21hJYuP3hRVzAWfBQlgO18DPmZTbrFerJC3+Ikw==",
+      "dependencies": {
+        "glob": "^8.0.1",
+        "js-binary-schema-parser": "^2.0.2",
+        "simple-get": "^4.0.1",
+        "string-split-by": "^1.0.0"
+      }
+    },
+    "node_modules/vue-qr/node_modules/brace-expansion": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
+      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+      "dependencies": {
+        "balanced-match": "^1.0.0"
+      }
+    },
+    "node_modules/vue-qr/node_modules/glob": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
+      "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^5.0.1",
+        "once": "^1.3.0"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/vue-qr/node_modules/minimatch": {
+      "version": "5.1.6",
+      "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
+      "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/vue-router": {
       "version": "3.5.3",
       "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.3.tgz",
@@ -19622,6 +19726,14 @@
       "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
       "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
     },
+    "decompress-response": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmmirror.com/decompress-response/-/decompress-response-6.0.0.tgz",
+      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+      "requires": {
+        "mimic-response": "^3.1.0"
+      }
+    },
     "deep-equal": {
       "version": "1.1.1",
       "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.1.1.tgz",
@@ -21927,6 +22039,11 @@
         "@sideway/pinpoint": "^2.0.0"
       }
     },
+    "js-binary-schema-parser": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmmirror.com/js-binary-schema-parser/-/js-binary-schema-parser-2.0.3.tgz",
+      "integrity": "sha512-xezGJmOb4lk/M1ZZLTR/jaBHQ4gG/lqQnJqdIv4721DMggsa1bDVlHXNeHYogaIEHD9vCRv0fcL4hMA+Coarkg=="
+    },
     "js-md5": {
       "version": "0.7.3",
       "resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
@@ -22527,6 +22644,11 @@
       "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
       "dev": true
     },
+    "mimic-response": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-3.1.0.tgz",
+      "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="
+    },
     "mini-css-extract-plugin": {
       "version": "2.5.3",
       "resolved": "https://registry.npmmirror.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.5.3.tgz",
@@ -23077,6 +23199,11 @@
         "callsites": "^3.0.0"
       }
     },
+    "parenthesis": {
+      "version": "3.1.8",
+      "resolved": "https://registry.npmmirror.com/parenthesis/-/parenthesis-3.1.8.tgz",
+      "integrity": "sha512-KF/U8tk54BgQewkJPvB4s/US3VQY68BRDpH638+7O/n58TpnwiwnOtGIOsT2/i+M78s61BBpeC83STB88d8sqw=="
+    },
     "parse-json": {
       "version": "5.2.0",
       "resolved": "https://registry.npmmirror.com/parse-json/-/parse-json-5.2.0.tgz",
@@ -23646,6 +23773,11 @@
       "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
       "dev": true
     },
+    "qrcodejs2": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmmirror.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz",
+      "integrity": "sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA=="
+    },
     "qs": {
       "version": "6.9.7",
       "resolved": "https://registry.npmmirror.com/qs/-/qs-6.9.7.tgz",
@@ -24278,6 +24410,21 @@
       "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
       "dev": true
     },
+    "simple-concat": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmmirror.com/simple-concat/-/simple-concat-1.0.1.tgz",
+      "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="
+    },
+    "simple-get": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmmirror.com/simple-get/-/simple-get-4.0.1.tgz",
+      "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
+      "requires": {
+        "decompress-response": "^6.0.0",
+        "once": "^1.3.1",
+        "simple-concat": "^1.0.0"
+      }
+    },
     "sirv": {
       "version": "1.0.19",
       "resolved": "https://registry.npmmirror.com/sirv/-/sirv-1.0.19.tgz",
@@ -24542,6 +24689,14 @@
         }
       }
     },
+    "string-split-by": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/string-split-by/-/string-split-by-1.0.0.tgz",
+      "integrity": "sha512-KaJKY+hfpzNyet/emP81PJA9hTVSfxNLS9SFTWxdCnnW1/zOOwiV248+EfoX7IQFcBaOp4G5YE6xTJMF+pLg6A==",
+      "requires": {
+        "parenthesis": "^3.1.5"
+      }
+    },
     "string-width": {
       "version": "4.2.3",
       "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
@@ -26059,6 +26214,47 @@
         }
       }
     },
+    "vue-qr": {
+      "version": "4.0.9",
+      "resolved": "https://registry.npmmirror.com/vue-qr/-/vue-qr-4.0.9.tgz",
+      "integrity": "sha512-pAISV94T0MNEYA3NGjykUpsXRE2QfaNxlu9ZhEL6CERgqNc21hJYuP3hRVzAWfBQlgO18DPmZTbrFerJC3+Ikw==",
+      "requires": {
+        "glob": "^8.0.1",
+        "js-binary-schema-parser": "^2.0.2",
+        "simple-get": "^4.0.1",
+        "string-split-by": "^1.0.0"
+      },
+      "dependencies": {
+        "brace-expansion": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz",
+          "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+          "requires": {
+            "balanced-match": "^1.0.0"
+          }
+        },
+        "glob": {
+          "version": "8.1.0",
+          "resolved": "https://registry.npmmirror.com/glob/-/glob-8.1.0.tgz",
+          "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==",
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^5.0.1",
+            "once": "^1.3.0"
+          }
+        },
+        "minimatch": {
+          "version": "5.1.6",
+          "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz",
+          "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==",
+          "requires": {
+            "brace-expansion": "^2.0.1"
+          }
+        }
+      }
+    },
     "vue-router": {
       "version": "3.5.3",
       "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.5.3.tgz",

+ 2 - 0
package.json

@@ -20,9 +20,11 @@
     "file-saver": "^2.0.5",
     "js-md5": "^0.7.3",
     "nprogress": "^0.2.0",
+    "qrcodejs2": "^0.0.2",
     "script-loader": "^0.7.2",
     "vue": "^2.6.14",
     "vue-countupjs": "^1.0.0",
+    "vue-qr": "^4.0.9",
     "vue-router": "^3.5.1",
     "vue-wxlogin": "^1.0.4",
     "vuex": "^3.6.2",

+ 132 - 0
src/HManagement/siteManage/paymentRules/index.vue

@@ -0,0 +1,132 @@
+<template>
+  <div>
+    <div class="container normal-panel normal-margin  flex-between">
+      <el-button class="inline-24" type="primary" icon="el-icon-edit" size="small" v-if="!isSave" @click="onEdit">编 辑</el-button>
+      <el-button class="inline-24" type="warning" icon="el-icon-edit" size="small" v-else @click="onSave">保 存</el-button>
+      <versionDefinition class="inline-24"></versionDefinition>
+    </div>
+    <div class="container normal-panel">
+      <el-row :gutter="20">
+        <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini" >
+          <el-col :span="15">
+            <el-form-item label="是否开启付费:" prop="sys_payswitch" >
+              <el-radio v-model="form.sys_payswitch" label='1' @input="isSave = true" :disabled="!isOpen">开启</el-radio>
+              <el-radio v-model="form.sys_payswitch" label='0' @input="isSave = false" :disabled="!isOpen">关闭</el-radio>
+            </el-form-item>
+          </el-col>
+          <el-col :span="15">
+            <el-form-item label="试用时间(月份):" prop="sys_trialperiod" >
+              <el-input v-model="form.sys_trialperiod" type="number" placeholder="请填写试用时间" :disabled="!isSave"></el-input>
+              <span style="font-size: 12px;color: #a8a9af">若为0,则无试用时间;</span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="15">
+            <el-form-item label="付费说明:" prop="brandname" >
+              <el-input v-model="form.sys_payinstructions" placeholder="请填写付费说明" :disabled="!isSave"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="15">
+            <el-form-item label="付费类型:" prop="sys_payincidence" >
+              <el-radio v-model="form.sys_payincidence" label='1' :disabled="!isSave">按账号付费</el-radio>
+              <el-radio v-model="form.sys_payincidence" label='2' :disabled="!isSave">按主体付费</el-radio>
+            </el-form-item>
+          </el-col>
+          <el-col :span="15">
+            <el-form-item >
+              <accountRule ref="accountRule" v-if="form.sys_payincidence == '1'" :disabled="isSave"></accountRule>
+              <mainBodyRule ref="mainBodyRule" v-else :disabled="isSave"></mainBodyRule>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </div>
+  </div>
+
+</template>
+
+<script>
+import edit from './modules/edit.vue'
+import versionDefinition from './modules/versionDefinition.vue'
+import accountRule from './modules/accountRule.vue'
+import mainBodyRule from './modules/mainBodyRule.vue'
+export default {
+  name: "index",
+  components:{edit,versionDefinition,accountRule,mainBodyRule},
+  data(){
+    return {
+      form:{
+        "sys_payincidence": 1, //付费影响范围(付费类型)1,按账号,2按主体
+        "sys_payswitch": 1, //系统付费开关
+        "sys_trialperiod": '', //系统试用时间(月份)
+        "sys_payinstructions": ""
+      },
+      rules:{
+        sys_payswitch: [
+          { required: true, message: '请选择是否开启付费', trigger: 'change' },
+        ],
+        sys_trialperiod: [
+          { required: true, message: '请填写试用时间', trigger: 'blur' },
+        ],
+        sys_payincidence: [
+          { required: true, message: '请选择付费范围', trigger: 'change' },
+        ],
+      },
+      isSave:false,
+      isOpen:false
+    }
+  },
+  methods:{
+    async queryData(){
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.site",
+        "method": "querySite_Parameter",
+        "content": {},
+      })
+      console.log(res,'站点信息数据')
+      this.form.sys_payswitch = res.data.sys_payswitch == '1'?'1':'0'
+      this.form.sys_payinstructions = res.data.sys_payinstructions
+      this.form.sys_trialperiod = res.data.sys_trialperiod
+      this.form.sys_payincidence = res.data.sys_payincidence == '1'?'1':'2'
+      console.log(this.form,'表单数据')
+    },
+    save(){
+      console.log(this.form)
+    },
+    onEdit(){
+      this.isOpen = true
+      this.isSave = true
+    },
+    onSave(){
+      this.$refs.form.validate(async (valid)=>{
+        if (!valid) return false
+        this.form.sys_payswitch = this.form.sys_payswitch == '1'?1:0
+        this.form.sys_payincidence = this.form.sys_payincidence == '1'?1:2
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.site",
+          "method": "updateSitePayInfo",
+          "content": this.form,
+        })
+        this.tool.showMessage(res,()=>{
+          this.isOpen = false
+          this.isSave = false
+          this.form.sys_payswitch = res.data.sys_payswitch == '1'?'1':'0'
+          this.form.sys_payincidence = res.data.sys_payincidence == '1'?'1':'2'
+          this.queryData()
+          this.$refs.accountRule.listData()
+          this.$refs.mainBodyRule.queryData()
+        })
+
+      })
+
+    }
+
+  },
+  mounted() {
+    this.queryData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 292 - 0
src/HManagement/siteManage/paymentRules/modules/accountRule.vue

@@ -0,0 +1,292 @@
+<template>
+  <div>
+    <div class="div-border" v-for="(item,rowIndex) in ruleList" :key="rowIndex">
+      <el-row :gutter="20" style="margin-top: 10px;margin-left: 10px">
+        <el-col style="margin-bottom: 10px">
+          <el-button type="primary" icon="el-icon-delete" style="float: right;margin-right: 10px" :disabled="!disabled" v-if="index !== rowIndex && ruleList.length > 1" @click="onDel(item)"></el-button>
+          <el-button type="primary" icon="el-icon-edit" style="float: right;margin-right: 10px" v-if="index !== rowIndex" :disabled="!disabled" @click="onEdit(rowIndex)"></el-button>
+          <el-button type="warning" icon="el-icon-circle-check" style="float: right;margin-right: 10px" v-if="isSave && index === rowIndex" :disabled="!disabled" @click="onSave(item,rowIndex)"></el-button>
+        </el-col>
+        <el-form :model="item"  :rules="rules" ref="form" label-width="120px" label-position="right" size="mini" :disabled="!disabled || !isSave || index !== rowIndex">
+          <el-col  :span="20">
+            <el-form-item label="账号类型:" prop="usertype" >
+              <el-select v-model="item.usertype" placeholder="请选择" style="width: 100%" >
+                <el-option
+                    v-for="item in accountType"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col  :span="20">
+            <el-form-item label="版本:" prop="sys_site_systempartitionid">
+              <el-select v-model="item.sys_site_systempartitionid" placeholder="请选择" style="width: 100%">
+                <el-option
+                    v-for="item in versionList"
+                    :key="item.sys_site_systempartitionid"
+                    :label="item.partitionname"
+                    :value="item.sys_site_systempartitionid">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="20" v-for="(ruleItem,ruleIndex) in item.paymentrules" :key="ruleIndex">
+            <el-col :span="7">
+              <el-form-item label="最少人数:"  label-width="107px"
+                            :prop="'paymentrules.' + ruleIndex + '.min'"
+                            :rules="{required: true, message: '人数不能为空', trigger: 'blur'}">
+                <el-input v-model="ruleItem.min" placeholder="请填写人数"  ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item label="最多人数:"  label-width="90px"
+                            :prop="'paymentrules.' + ruleIndex + '.max'"
+                            :rules="{required: true, message: '人数不能为空', trigger: 'blur'}">
+                <el-input v-model="ruleItem.max" placeholder="请填写人数" ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item label="定价(元):"  label-width="90px"
+                            :prop="'paymentrules.' + ruleIndex + '.price'"
+                            :rules="{required: true, message: '定价不能为空', trigger: 'blur'}">
+                <el-input v-model="ruleItem.price" placeholder="请填写金额(元)"  ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="3">
+              <el-button type="primary" icon="el-icon-plus" circle v-if="ruleIndex === item.paymentrules.length -1" class="inline-16" @click="addPrice(rowIndex)"></el-button>
+              <el-button type="info" icon="el-icon-close" circle v-if="item.paymentrules.length >1" @click="delPrice(ruleIndex)"></el-button>
+            </el-col>
+          </el-col>
+        </el-form>
+      </el-row>
+    </div>
+    <div  class="div-button">
+      <el-button style="border: none;" :disabled="!disabled" icon="el-icon-plus" class="btn-block" @click="addRule">添 加</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import {log} from "@antv/g2plot/lib/utils";
+
+export default {
+  name: "accountRule",
+  props:["disabled"],
+  data() {
+    return {
+      form: {
+        "type": 1, //1:按账号付费,2:按主体付费
+        "sys_site_paymentrulesid": 0,
+        "sys_site_systempartitionid": '', //系统版本ID
+        "usertype": '', //用户类型,按账号付费时必填
+        "paymentrules": [
+          {
+            "min": 0,
+            "max": 5,
+            "price": 100
+          }
+        ], //定价规则,按账号付费时必填
+        "price": '' //定价,按主体付费时必填
+      },
+      rules:{
+        usertype: [
+          { required: true, message: '请选择账户类型', trigger: 'change' },
+        ],
+        sys_site_systempartitionid: [
+          { required: true, message: '请选择版本', trigger: 'change' },
+        ]
+      },
+      isSave:false,
+      accountType:[
+        {
+          value: '21',
+          label: '主账号'
+        },
+        {
+          value: '22',
+          label: '子账号'
+        }
+      ],
+      versionList:[],
+      ruleList:[],
+      index:''
+    }
+  },
+  methods: {
+    /*查询按账号付费规则*/
+    async listData(){
+      this.ruleList = []
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.paymentrules",
+        "method": "list",
+        "content": {
+          "type": 1, //1:按账号付费,2:按主体付费
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      if (res.data.length < 1){
+        this.ruleList.push({
+          "type": 1, //1:按账号付费,2:按主体付费
+          "sys_site_paymentrulesid": 0,
+          "sys_site_systempartitionid": '', //系统版本ID
+          "usertype": '', //用户类型,按账号付费时必填
+          "paymentrules": [
+            {
+              "min": '',
+              "max": '',
+              "price": ''
+            },
+          ], //定价规则,按账号付费时必填
+          "price": '' //定价,按主体付费时必填
+        })
+      }else {
+        this.ruleList = res.data
+      }
+      this.ruleList.forEach(item=>{
+
+        if (item.usertype == '21'){
+          item.usertype = '主账号'
+        }else {
+          item.usertype = '子账号'
+        }
+      })
+
+
+    },
+    /*获取版本信息*/
+    async queryVersion(){
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.systempartition",
+        "method": "list",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      this.versionList = res.data
+    },
+    /*配置价格*/
+    addPrice(val){
+      this.ruleList[val].paymentrules.push({
+        "min": '',
+        "max": '',
+        "price": ''
+      })
+    },
+    delPrice(val) {
+      this.form.paymentrules.splice(val,1)
+    },
+    onEdit(val){
+      this.index = val
+      this.isSave = true
+    },
+    /*提交保存*/
+    onSave(val,rowIndex){
+      console.log(val,'保存')
+      val = {
+        "type": 1, //1:按账号付费,2:按主体付费
+        "sys_site_paymentrulesid": val.sys_site_paymentrulesid,
+        "sys_site_systempartitionid": val.sys_site_systempartitionid, //系统版本ID
+        "usertype": val.usertype === '主账号'?'21':'22', //用户类型,按账号付费时必填
+        "paymentrules": val.paymentrules, //定价规则,按账号付费时必填
+        "price": val.price //定价,按主体付费时必填
+      }
+       this.$refs.form[rowIndex].validate(async (valid) => {
+        if (!valid) return false
+         const res = await this.$api.requested({
+           "classname": "webmanage.site.paymentrules",
+           "method": "insertOrUpdate",
+           "content": val,
+         })
+         this.isSave = false
+         this.index = ''
+         this.listData()
+      })
+
+    },
+    /*新增规则*/
+    addRule(val){
+      this.ruleList.push({
+        "type": 1, //1:按账号付费,2:按主体付费
+        "sys_site_paymentrulesid": 0,
+        "sys_site_systempartitionid": '', //系统版本ID
+        "usertype": '', //用户类型,按账号付费时必填
+        "paymentrules": [
+          {
+            "min": '',
+            "max": '',
+            "price": ''
+          },
+        ], //定价规则,按账号付费时必填
+        "price": '' //定价,按主体付费时必填
+      })
+      this.index = this.ruleList.length -1
+      this.isSave = true
+    },
+    /*删除规则*/
+    async onDel(val){
+      this.$confirm('此操作将永久删除该规则, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.paymentrules",
+          "method": "delete",
+          "content": {
+            "sys_site_paymentrulesid": val.sys_site_paymentrulesid
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.listData()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+
+    }
+  },
+  mounted() {
+    this.listData()
+    this.queryVersion()
+  }
+}
+</script>
+
+<style scoped>
+  .div-border{
+    width: 100%;
+    height: 390px;
+    border: 2px dashed #c9c3c3;
+    border-radius: 5px;
+    margin-bottom: 20px;
+    overflow:auto;
+  }
+  .div-button{
+    width: 100%;
+    height: 30px;
+    border: 2px dashed #c9c3c3;
+    border-radius: 5px;
+    margin-bottom: 20px;
+  }
+  .btn-block {
+    display: block;
+    width: 100%;
+    padding-right: 0;
+    padding-left: 0;
+    padding-top: 10px;
+  }
+
+</style>

+ 125 - 0
src/HManagement/siteManage/paymentRules/modules/addVersionModules.vue

@@ -0,0 +1,125 @@
+<template>
+  <div>
+    <el-button size="mini" icon="el-icon-plus" type="primary" @click="onShow">新 增</el-button>
+    <el-dialog
+        title="新增模块"
+        :visible.sync="dialogVisible"
+        width="950px"
+        append-to-body
+        >
+      <el-table
+          class="table-style"
+          :data="list"
+          style="width: 100%" border
+          :height="height ? height : list.length <= 4?'260px':list.length <= 20?'calc(100vh - 420px)':'calc(100vh - 420px)'"
+          :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+          :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+          @selection-change="selectChange">
+        <el-table-column
+            type="selection"
+            width="39">
+        </el-table-column>
+        <el-table-column
+            prop="systemclient"
+            label="端口"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="systemappid"
+            label="id"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="systemname"
+            label="系统名称"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="systemmodulename"
+            label="模块名称"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="systemappname"
+            label="应用名称"
+        >
+        </el-table-column>
+      </el-table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" size="small">取 消</el-button>
+        <el-button type="primary" @click="onSubmit" size="small">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "addVersionModules",
+  props:['rowData'],
+  data(){
+    return {
+      dialogVisible:false,
+      list:[],
+      param:{
+        "classname": "webmanage.site.systempartition",
+        "method": "list_model",
+        "content": {
+          "sys_site_systempartitionid": 0,
+          "pageNumber": 1,
+          "pageSize": 99,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      height:'',
+      selectData:[],
+      rowDataSelect:[]
+    }
+  },
+  methods: {
+    onShow(){
+      this.dialogVisible = true
+      console.log(this.rowData,'rowData')
+      this.listData()
+      this.rowDataSelect = this.rowData.systemappids
+      console.log(this.rowDataSelect,'rowDataSelect')
+    },
+    async listData(){
+      this.param.content.sys_site_systempartitionid = this.rowData.sys_site_systempartitionid
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+    },
+    /*选择模块*/
+    selectChange(val){
+      val.forEach((item,index)=>{
+        this.selectData[index] = item.systemappid
+      })
+      console.log(this.selectData)
+    },
+    async onSubmit(){
+      this.selectData = [...this.selectData,...this.rowDataSelect]
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.systempartition",
+        "method": "insertOrUpdate",
+        "content": {
+          "sys_site_systempartitionid": this.rowData.sys_site_systempartitionid,
+          "partitionname": this.rowData.partitionname,
+          "systemappids": this.selectData
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.dialogVisible = false
+        this.rowDataSelect = []
+        this.selectData = []
+        this.$emit('addSuccess')
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 32 - 0
src/HManagement/siteManage/paymentRules/modules/edit.vue

@@ -0,0 +1,32 @@
+<template>
+  <div>
+    <el-button type="primary" icon="el-icon-edit" size="small" v-if="!isSave" @click="onEdit">编 辑</el-button>
+    <el-button type="warning" icon="el-icon-edit" size="small" v-else @click="onSave">保 存</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "edit",
+  data() {
+    return {
+      isSave:false
+    }
+  },
+  methods:{
+    onEdit(){
+      this.isSave = true
+      this.$emit('onEdit',this.isSave)
+    },
+    onSave(){
+      this.isSave = false
+      this.$emit('onSave',this.isSave)
+
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 193 - 0
src/HManagement/siteManage/paymentRules/modules/mainBodyRule.vue

@@ -0,0 +1,193 @@
+<template>
+  <div>
+    <div class="div-border" v-for="(item,rowIndex) in ruleList" :key="rowIndex">
+      <el-row :gutter="20" style="margin-top: 10px;margin-left: 10px">
+        <el-col style="margin-bottom: 10px">
+          <el-button type="primary" icon="el-icon-delete" style="float: right;margin-right: 10px" :disabled="!disabled" v-if="index !== rowIndex && ruleList.length > 1" @click="onDel(item)"></el-button>
+          <el-button type="primary" icon="el-icon-edit" style="float: right;margin-right: 10px" v-if="index !== rowIndex" :disabled="!disabled" @click="onEdit(rowIndex)"></el-button>
+          <el-button type="warning" icon="el-icon-circle-check" style="float: right;margin-right: 10px" v-if="isSave && index === rowIndex" :disabled="!disabled" @click="onSave(item,rowIndex)"></el-button>
+        </el-col>
+        <el-form :model="item"  :rules="rules" ref="form" label-width="120px" label-position="right" size="mini" :disabled="!disabled || !isSave || index !== rowIndex">
+          <el-col  :span="20">
+            <el-form-item label="版本:" prop="sys_site_systempartitionid">
+              <el-select v-model="item.sys_site_systempartitionid" placeholder="请选择" style="width: 100%">
+                <el-option
+                    v-for="item in versionList"
+                    :key="item.sys_site_systempartitionid"
+                    :label="item.partitionname"
+                    :value="item.sys_site_systempartitionid">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="20">
+            <el-form-item label="定价(元):"  prop="price" >
+              <el-input v-model="item.price" placeholder="请填写金额(元)"  ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </div>
+    <div  class="div-button">
+      <el-button style="border: none;" :disabled="!disabled" icon="el-icon-plus" class="btn-block" @click="addRule">添 加</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "mainBodyRule",
+  props:["disabled"],
+  data() {
+    return {
+      form: {
+        "type": 2, //1:按账号付费,2:按主体付费
+        "sys_site_paymentrulesid": 0,
+        "sys_site_systempartitionid": '', //系统版本ID
+        "usertype": '', //用户类型,按账号付费时必填
+        "paymentrules": [], //定价规则,按账号付费时必填
+        "price": '' //定价,按主体付费时必填
+      },
+      versionList:[],
+      ruleList:[
+        {
+          "type": 2, //1:按账号付费,2:按主体付费
+          "sys_site_paymentrulesid": 0,
+          "sys_site_systempartitionid": '', //系统版本ID
+          "usertype": '', //用户类型,按账号付费时必填
+          "paymentrules": [], //定价规则,按账号付费时必填
+          "price": '' //定价,按主体付费时必填
+        }
+      ],
+      index:'',
+      rules:{
+        price: [
+          { required: true, message: '请输入定价', trigger: 'blur' },
+        ],
+        sys_site_systempartitionid: [
+          { required: true, message: '请选择版本', trigger: 'change' },
+        ]
+      },
+      isSave:false
+    }
+  },
+  methods:{
+    /*查询主体付费规则*/
+    async queryData(){
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.paymentrules",
+        "method": "list",
+        "content": {
+          "type": 2, //1:按账号付费,2:按主体付费
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      this.ruleList = res.data
+    },
+    /*获取版本信息*/
+    async queryVersion(){
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.systempartition",
+        "method": "list",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      this.versionList = res.data
+    },
+    onEdit(val){
+      this.index = val
+      this.isSave = true
+    },
+    onSave(val,rowIndex){
+      this.$refs.form[rowIndex].validate(async (valid)=>{
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.paymentrules",
+          "method": "insertOrUpdate",
+          "content": val
+        })
+        this.tool.showMessage(res,()=>{
+          this.isSave = false
+          this.index = ''
+          this.queryData()
+        })
+      })
+
+    },
+    /*新增规则*/
+    addRule(){
+      this.ruleList.push({
+        "type": 2, //1:按账号付费,2:按主体付费
+        "sys_site_paymentrulesid": 0,
+        "sys_site_systempartitionid": '', //系统版本ID
+        "usertype": '', //用户类型,按账号付费时必填
+        "paymentrules": [], //定价规则,按账号付费时必填
+        "price": '' //定价,按主体付费时必填
+      })
+      this.isSave = true
+      this.index = this.ruleList.length -1
+    },
+    /*删除规则*/
+    onDel(val){
+      this.$confirm('此操作将永久删除该规则, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.paymentrules",
+          "method": "delete",
+          "content": {
+            "sys_site_paymentrulesid": val.sys_site_paymentrulesid
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.queryData()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    }
+  },
+  mounted() {
+    this.queryVersion()
+    this.queryData()
+  }
+}
+</script>
+
+<style scoped>
+  .div-border{
+    width: 100%;
+    height: 180px;
+    border: 2px dashed #c9c3c3;
+    border-radius: 5px;
+    margin-bottom: 20px;
+  }
+  .div-button{
+    width: 100%;
+    height: 30px;
+    border: 2px dashed #c9c3c3;
+    border-radius: 5px;
+    margin-bottom: 20px;
+  }
+  .btn-block {
+    display: block;
+    width: 100%;
+    padding-right: 0;
+    padding-left: 0;
+    padding-top: 10px;
+  }
+</style>

+ 280 - 0
src/HManagement/siteManage/paymentRules/modules/versionDefinition.vue

@@ -0,0 +1,280 @@
+<template>
+  <div>
+    <el-button  size="small" type="primary" @click="onShow">版本定义</el-button>
+    <el-drawer
+        style="color: #333!important"
+        title="版本定义"
+        :visible.sync="dialogVisible"
+        size="90%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        >
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <div style="width: 100%;">
+              <el-button size="mini" icon="el-icon-plus" type="primary" @click="addVersion" :disabled="isSave">新 增</el-button>
+              <el-table
+                  class="table-style"
+                  ref="singleTable"
+                  :data="versionData"
+                  style="width: 100%" border
+                  :height="height ? height : versionData.length <= 4?'260px':versionData.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
+                  :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+                  :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+                  @row-click="rowClick"
+                  highlight-current-row
+                  @current-change="onHandleCurrentChange">
+                <el-table-column
+                    prop="partitionname"
+                    label="版本名称"
+                >
+                  <template slot-scope="scope">
+                    <el-input size="small" placeholder="输入版本名称" v-model="scope.row.partitionname" v-if="isSave && scope.row.rowindex === index"></el-input>
+                    <span v-else>{{scope.row.partitionname}}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                    label="操作"
+                    width="120">
+                  <template slot-scope="scope">
+                    <el-button size="mini" type="text" class="inline-16" v-if="scope.row.rowindex !== index" @click="onEdit(scope.row)">编 辑</el-button>
+                    <el-button size="mini" type="text" v-if="scope.row.rowindex !== index" @click="onDel(scope.row.sys_site_systempartitionid)">删 除</el-button>
+                    <el-button size="mini" type="text" v-if="isSave && scope.row.rowindex === index" @click="onSave(scope.row)">保 存</el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+          </el-col>
+          <el-col :span="16">
+            <div >
+              <addVersionModules :rowData="rowData" @addSuccess="addSuccess"></addVersionModules>
+              <el-table
+                  class="table-style"
+                  :data="systemModule"
+                  style="width: 100%" border
+                  :height="height ? height : systemModule.length <= 4?'260px':systemModule.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
+                  :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+                  :header-cell-style="{height:'40px',color:'#606266',fontWeight:'400',fontSize:'14px'}">
+                <el-table-column
+                    prop="systemclient"
+                    label="端口"
+                >
+                </el-table-column>
+                <el-table-column
+                    prop="systemname"
+                    label="系统名称"
+                >
+                </el-table-column>
+                <el-table-column
+                    prop="systemmodulename"
+                    label="模块名称"
+                >
+                </el-table-column>
+                <el-table-column
+                    prop="systemappname"
+                    label="应用名称"
+                >
+                </el-table-column>
+                <el-table-column
+                    prop="name"
+                    label="操作"
+                    width="100">
+                  <template slot-scope="scope">
+
+                    <el-popconfirm
+                        title="确定删除这个模块功能吗?"
+                        @confirm="onModulesDel(scope.row)"
+                    >
+                      <el-button size="mini" type="text"  slot="reference">删 除</el-button>
+                    </el-popconfirm>
+                  </template>
+
+                </el-table-column>
+              </el-table>
+            </div>
+          </el-col>
+        </el-row>
+
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import addVersionModules from './addVersionModules'
+export default {
+  name: "versionDefinition",
+  components:{addVersionModules},
+  data(){
+    return {
+      dialogVisible:false,
+      rowData:'',
+      versionData:[],
+      systemModule:[],
+      versionParam:{
+        "classname": "webmanage.site.systempartition",
+        "method": "list",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 99,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      param:{
+        "classname": "webmanage.site.systempartition",
+        "method": "detail",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 99,
+          "sys_site_systempartitionid": '',
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      currentPage:0,
+      total:0,
+      currentPageVersion:0,
+      totalVersion:0,
+      height:'',
+      isSave:false,
+      index:'',
+      currentRow: null,
+      rowId:''
+    }
+  },
+  methods:{
+    /*查询版本详细信息*/
+    async queryData(id){
+      this.param.content.sys_site_systempartitionid = id
+      const res = await this.$api.requested(this.param)
+      this.systemModule = res.data.systemapp
+      this.currentPage = res.pageNumber
+      this.total = res.total
+    },
+    onShow(){
+      this.dialogVisible = true
+      this.rowId = 0
+      this.listData()
+    },
+    /*查询版本信息*/
+    async listData(){
+      const res = await this.$api.requested(this.versionParam)
+      this.versionData = res.data
+      this.currentPageVersion = res.pageNumber
+      this.totalVersion = res.total
+      this.$refs.singleTable.setCurrentRow(this.versionData[this.rowId])
+      this.queryData(this.versionData[this.rowId].sys_site_systempartitionid)
+      this.rowData = this.versionData[this.rowId]
+    },
+    /*新增版本*/
+    addVersion(){
+      this.versionData.push({
+        "partitionname": "",
+        "sys_site_systempartitionid": 0,
+        "rowindex": this.versionData.length + 1,
+        "systemappids": [
+
+        ]
+      })
+      this.isSave = true
+      this.index = this.versionData[this.versionData.length -1].rowindex
+    },
+
+    onEdit(val){
+      if (this.versionData[this.versionData.length-1].partitionname === ''){
+        this.$message.error('版本名称不能为空');
+      }else {
+        this.isSave = true
+        this.index = val.rowindex
+      }
+
+    },
+    async onSave(val){
+      if (val.partitionname === ''){
+        this.$message.error('版本名称不能为空');
+      }else {
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.systempartition",
+          "method": "insertOrUpdate",
+          "content": val
+        })
+        this.tool.showMessage(res,()=>{
+          this.isSave = false
+          this.index = ''
+          this.listData()
+        })
+      }
+    },
+    /*删除版本*/
+   onDel(id){
+      this.$confirm('此操作将永久删除该版本, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.systempartition",
+          "method": "delete",
+          "content": {
+            "sys_site_systempartitionid": id
+          },
+        })
+        this.tool.showMessage(res,()=>{
+          this.listData()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+
+    },
+    /*删除版本明细模块*/
+    async onModulesDel(val){
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.systempartition",
+        "method": "deleteMX",
+        "content": {
+          "sys_site_systempartitionid": this.rowData.sys_site_systempartitionid,
+          "systemappids": [val.systemappid]
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+      })
+    },
+    rowClick(val){
+      this.queryData(val.sys_site_systempartitionid)
+      this.rowData = val
+      this.rowId = val.rowindex -1
+    },
+    onHandleCurrentChange(val){
+      this.currentRow = val
+    },
+    addSuccess(){
+      this.listData()
+    }
+  }
+}
+</script>
+
+<style scoped>
+ /deep/ .el-drawer__header {
+   align-items: center;
+   color: #333;
+   display: flex;
+   font-weight: 700!important;
+   margin-bottom: 12px;
+   margin-top: -12px;
+ }
+ .table-style{
+   margin-top: 20px;
+ }
+
+</style>

+ 133 - 0
src/SManagement/user/pay-orders/index.vue

@@ -0,0 +1,133 @@
+<template>
+  <div>
+    <div class="container normal-panel normal-margin  flex-between">
+      <add @onSuccess="onSuccess"></add>
+      <payment ref="payment" ></payment>
+    </div>
+    <div class="container normal-panel">
+      <el-input style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
+                v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)"
+                size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+      </el-input>
+      <tableLayout style="margin-top: 20px" :layout="tablecols" :data="list" :opwidth="200" :custom="true"  height="calc(100vh - 340px)" fixedName="operation">
+        <template v-slot:customcol="scope">
+          <span v-if="scope.column.columnname === 'ispaid'" >
+            <span v-if="scope.column.data[scope.column.columnname] == '0'" style="color: #4f7bfd">未付费</span>
+            <span v-else>已付费</span>
+          </span>
+          <span v-else-if="scope.column.columnname === 'amount'" >
+            <span style="color: red">{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</span>
+          </span>
+          <span v-else-if="scope.column.columnname === 'operation'" ></span>
+          <p v-else>{{scope.column.data[scope.column.columnname] || '--'}}</p>
+        </template>
+        <template v-slot:opreation="scope">
+          <el-button type="text" size="mini" class="inline-16" @click="$router.push({path:'/pay_orders_detail',query:{id:scope.data.sys_payorderid}})">详 情</el-button>
+          <el-popconfirm
+              title="确定删除该订单吗?"
+              @confirm="onDel(scope.data)"
+          >
+            <el-button slot="reference" type="text" size="mini" v-if="scope.data.ispaid == '0'" >删 除</el-button>
+          </el-popconfirm>
+        </template>
+      </tableLayout>
+      <div class="container normal-panel" style="text-align:right">
+        <el-pagination
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[20, 50, 100, 200]"
+            :page-size="20"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import tableLayout from '@/components/table/index2.vue'
+import add from './modules/add.vue'
+import payment from './modules/payment'
+export default {
+  name: "index",
+  data() {
+    return {
+      param:{
+        "classname": "system.payorder.payorder",
+        "method": "list",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+    }
+  },
+  components:{tableLayout,add,payment},
+  methods: {
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      console.log(res,'订单列表')
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    onSuccess(id,orderno){
+      this.listData()
+      let that = this
+      this.$refs.payment.dialogVisible = true
+      this.$refs.payment.queryAccount(id)
+      this.$refs.payment.queryData(id)
+      this.$refs.payment.queryCode(orderno)
+      this.payChangeFun(function(a) {
+        a.result  = () => {
+          that.$refs.payment.dialogVisible = false
+          that.listData()
+        }
+      })
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.listData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.listData()
+    },
+    async onDel(val){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "delete",
+        "content": {
+          "sys_payorderid": val.sys_payorderid
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+      })
+
+    }
+  },
+  mounted() {
+    this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).payOrdersTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 330 - 0
src/SManagement/user/pay-orders/modules/add.vue

@@ -0,0 +1,330 @@
+<template>
+  <div>
+    <el-button class="inline-24" type="primary" size="small"  @click="onShow">新建付费订单</el-button>
+    <el-dialog
+        title="新建付费订单"
+        :visible.sync="dialogVisible"
+        width="980px"
+       >
+      <el-row :gutter="20" style="margin-top: -20px">
+        <el-col :span="24" v-if="payInstructions">
+          <div class="pay_border">
+            <span class="pay_font">付费说明:{{payInstructions}}</span>
+          </div>
+        </el-col>
+        <el-col :span="24" class="div_top">
+          <span style="color: red">*</span>
+          <span>选择版本:</span>
+        </el-col>
+        <el-col :span="10" class="div_top">
+          <el-table
+              :data="versionList"
+              height="300px"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+              :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}"
+              @row-click="rowClick"
+              style="width: 100%">
+            <el-table-column
+                prop="partitionname"
+                label="版本名称"
+                >
+            </el-table-column>
+            <el-table-column
+                label="操作"
+                width="120">
+              <template slot-scope="scope">
+                <input type="radio" :checked="scope.row.checkRow" @click="onCheck(scope.row)"></input>
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-col>
+        <el-col :span="14" class="div_top">
+          <el-table
+              :data="modulesList"
+              height="300px"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+              :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}"
+              style="width: 100%">
+            <el-table-column
+                prop="systemclient"
+                label="端口"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="systemname"
+                label="系统名称"
+               >
+            </el-table-column>
+            <el-table-column
+                prop="systemmodulename"
+                label="模块名称"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="systemappname"
+                label="应用名称"
+               >
+            </el-table-column>
+          </el-table>
+
+        </el-col>
+        <el-col :span="24" class="div_top">
+          <span style="color: red">*</span>
+          <span>选择付费账号:</span>
+        </el-col>
+        <el-col :span="24" class="div_top" v-if="sys_payincidence == '1'">
+          <tableLayout :layout="tablecolsAccount" :data="list"  :opwidth="200" :custom="true"  height="370px" fixedName="operation">
+            <template v-slot:customcol="scope">
+              <span v-if="scope.column.columnname === 'operation'" ></span>
+              <span v-else-if="scope.column.columnname === 'enddate'">
+                <span v-for="(item,index) in scope.column.data.enddate" :key="index">
+                  <span v-if="form.sys_site_systempartitionid == index">{{item}}</span>
+                </span>
+              </span>
+              <p v-else>{{scope.column.data[scope.column.columnname] || ''}}</p>
+            </template>
+            <template v-slot:opreation="scope">
+              <el-checkbox :checked="scope.data.checkRow" @change="userCheck(scope.data)"></el-checkbox>
+            </template>
+          </tableLayout>
+        </el-col>
+        <el-col :span="24" class="div_top" v-else>
+          <tableLayout :layout="tablecolsMain" :data="list"  :opwidth="200" :custom="true"  height="370px" fixedName="operation">
+            <template v-slot:customcol="scope">
+              <span v-if="scope.column.columnname === 'operation'" ></span>
+              <span v-else-if="scope.column.columnname === 'enddate'">
+                <span v-for="(item,index) in scope.column.data.enddate" :key="index">
+                  <span v-if="form.sys_site_systempartitionid == index">{{item}}</span>
+                </span>
+              </span>
+              <p v-else>{{scope.column.data[scope.column.columnname] || ''}}</p>
+            </template>
+            <template v-slot:opreation="scope">
+              <el-checkbox :checked="scope.data.checkRow" @change="userCheck(scope.data)"></el-checkbox>
+            </template>
+          </tableLayout>
+        </el-col>
+        <el-col :span="24" class="div_top">
+          <el-form :model="form"   ref="form" label-width="50px" label-position="right" size="mini">
+            <el-form-item label="备注:" >
+              <el-input v-model="form.remarks" placeholder="请输入备注内容"></el-input>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <span >共</span>
+        <span style="color: red">{{accountNum}}</span>
+         <span style="margin-right: 10px">个账号</span>
+        <span >总价:</span>
+        <span style="color: red;margin-right: 10px">¥{{amount}}</span>
+        <el-button type="danger" @click="onSubmit">生成订单</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import tableLayout from '@/components/table/index2.vue'
+export default {
+  name: "add",
+  data() {
+    return {
+      dialogVisible:false,
+      versionList:[],
+      modulesList:[],
+      form:{
+        "sys_site_systempartitionid": '',
+        "orderno":'',
+        "sys_payorderid": '',
+        "remarks": "",
+        "userids": []
+      },
+      tablecolsAccount:[],
+      tablecolsMain:[],
+      list:[],
+      param:{
+        "classname": "system.payorder.payorder",
+        "method": "chooseUsers",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 999,
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      payInstructions:'',
+      sys_payincidence:'',
+      userids:[],
+      accountNum:0,
+      amount:0,
+      createNow:false
+    }
+  },
+  components:{tableLayout},
+  methods:{
+    onShow(){
+      this.dialogVisible = true
+      this.queryVersion()
+      this.queryAccount()
+      this.queryInstructions()
+     /* this.creatOrder()*/
+    },
+    /*新建订单*/
+    async creatOrder(){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "createOrder",
+        "content": {},
+      })
+      this.form.sys_payorderid = res.data.sys_payorderid
+      this.form.orderno = res.data.orderno
+    },
+    /*查询付费说明*/
+    async queryInstructions(){
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.site",
+        "method": "querySite_Parameter",
+        "content": {},
+      })
+      this.payInstructions = res.data.sys_payinstructions
+      this.sys_payincidence = res.data.sys_payincidence
+    },
+    /*查询可选版本信息*/
+    async queryVersion(){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "chooseSystemPartition",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 999,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      this.versionList = res.data.map(item=>{
+        return {
+          partitionname:item.partitionname,
+          rowindex:item.rowindex,
+          sys_site_systempartitionid:item.sys_site_systempartitionid,
+          systemapp:item.systemapp,
+          systemappids:item.systemappids,
+          checkRow:false
+        }
+      })
+      this.versionList[0].checkRow = true
+      this.modulesList = this.versionList[0].systemapp
+      this.form.sys_site_systempartitionid = this.versionList[0].sys_site_systempartitionid
+    },
+    /*获取可选账号*/
+    async queryAccount(){
+      this.list = []
+      const res = await this.$api.requested(this.param)
+      this.list = res.data.map(item=>{
+        return {
+          accountno:item.accountno,
+          agentname:item.agentname,
+          enddate:item.enddate,
+          isleader:item.isleader,
+          phonenumber:item.phonenumber,
+          rowindex:item.rowindex,
+          sa_agentsid:item.sa_agentsid,
+          userid:item.userid,
+          checkRow:false
+        }
+      })
+    },
+    /*选择版本*/
+    onCheck(val){
+      this.versionList.forEach(item=>{
+        if (item.sys_site_systempartitionid === val.sys_site_systempartitionid){
+          item.checkRow = true
+          this.form.sys_site_systempartitionid = item.sys_site_systempartitionid
+        }else {
+          item.checkRow = false
+        }
+        this.modulesList = val.systemapp
+      })
+      this.userids = []
+     /* this.list.forEach(item=>{
+        if (item.checkRow){
+          item.checkRow = false
+        }
+      })
+      console.log(this.list)*/
+      this.queryAccount()
+    },
+    /*选择付费账号*/
+    userCheck(val){
+      this.userids = []
+      val.checkRow ? this.list[val.index].checkRow = false : this.list[val.index].checkRow = true
+      this.list.forEach(item=>{
+        if (item.checkRow){
+          this.userids.push({
+            "isleader": item.isleader,
+            "userid": item.userid,
+            "sa_agentsid": item.sa_agentsid,
+            "enddate": item.enddate
+          })
+        }
+      })
+      this.accountNum = this.userids.length
+      this.queryPrice()
+    },
+    rowClick(val){
+      this.onCheck(val)
+    },
+    onSubmit(){
+      this.createNow = true
+      this.queryPrice()
+    },
+    /*获取订单价格*/
+    async queryPrice(){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "insertUsers",
+        "content": {
+          "sys_site_systempartitionid": this.form.sys_site_systempartitionid,
+          "sys_payorderid": this.form.sys_payorderid,
+          "remarks": this.form.remarks,
+          "users": this.userids
+        },
+      })
+      this.amount = res.data.amount
+      if (this.createNow){
+        this.dialogVisible = false
+        this.$emit('onSuccess',this.form.sys_payorderid,this.form.orderno)
+      }
+
+    }
+  },
+  created() {
+    this.tablecolsAccount = this.tool.tabelCol(this.$route.name).accountTable.tablecols
+    this.tablecolsMain = this.tool.tabelCol(this.$route.name).mainBodyTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+ /deep/ .el-dialog__title {
+   line-height: 24px;
+   font-size: 16px;
+   color: #303133;
+   font-weight: bold;
+ }
+ .pay_border{
+   background: #FFF9F2;
+   height: 30px;
+   vertical-align: center;
+   line-height: 30px
+ }
+ .pay_font{
+   color: #FA8C16;margin-left: 10px
+ }
+ .div_top{
+   margin-top: 20px;
+ }
+
+</style>

+ 251 - 0
src/SManagement/user/pay-orders/modules/detail.vue

@@ -0,0 +1,251 @@
+<template>
+  <div>
+    <div class="container normal-panel normal-margin  flex-between" v-if="list.ispaid == '0'">
+      <el-button class="inline-24" type="primary" size="small" @click="onPay">继续付费</el-button>
+      <payment ref="payment" ></payment>
+    </div>
+    <div class="container normal-panel">
+      <el-row :gutter="20">
+        <el-col :sapn="24">
+          <span class="title-style">订单详情</span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span>付费订单号:{{list.orderno || '--'}}</span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span >付费状态:
+             <span v-if="list.ispaid == '0'" style="color: red">未付费</span>
+              <span v-else>已付费</span>
+          </span>
+
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span >付费金额(元):
+            <span style="color: red">{{tool.formatAmount(list.amount,2) || '--'}}</span>
+          </span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span>付费类型:{{list.sys_payincidence == '1'?'按账号付费':'按主体付费'}}</span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span>付费时间:{{list.paytime || '--'}}</span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span>付费人:{{list.createby || '--'}}</span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span>付款渠道:{{list.paymode || '--'}}</span>
+        </el-col>
+        <el-col :span="4" class="span-top">
+          <span>备注:{{list.remarks || '--'}}</span>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container normal-panel" style="margin-top: 20px">
+      <el-row :gutter="20">
+        <el-col :sapn="24">
+          <span class="title-style">付费订单列表</span>
+        </el-col>
+        <el-col :span="24" v-if="list.sys_payincidence == '1'">
+          <el-table
+              class="table-style"
+              :data="accountList"
+              style="width: 100%;margin-top: 20px" border
+              :height="height ? height : accountList.length <= 4?'260px':accountList.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+              :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}">
+            <el-table-column
+                prop="name"
+                label="账号名称"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="accountno"
+                label="账号"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="partitionname"
+                label="付费版本"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="price"
+                label="单价"
+            >
+              <template slot-scope="scope">
+                <span style="color: red">
+                  {{tool.formatAmount(scope.row.price,2)}}
+                </span>
+
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="begdate"
+                label="生效时间"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="enddate"
+                label="到期时间"
+            >
+            </el-table-column>
+          </el-table>
+          <div  class="container normal-panel" style="text-align:right">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :page-sizes="[20, 50, 100, 200]"
+                :page-size="20"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+        </el-col>
+        <el-col :span="24" v-else>
+          <el-table
+              class="table-style"
+              :data="accountList"
+              style="width: 100%;margin-top: 20px" border
+              :height="height ? height : accountList.length <= 4?'260px':accountList.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+              :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}">
+            <el-table-column
+                prop="agentname"
+                label="付费主体"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="partitionname"
+                label="付费版本"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="price"
+                label="单价"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="begdate"
+                label="生效时间"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="enddate"
+                label="到期时间"
+            >
+            </el-table-column>
+          </el-table>
+          <div  class="container normal-panel" style="text-align:right">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :page-sizes="[20, 50, 100, 200]"
+                :page-size="20"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+  </div>
+</template>
+
+<script>
+import payment from './payment.vue'
+import {log} from "@antv/g2plot/lib/utils";
+
+export default {
+  name: "detail",
+  components:{payment},
+  data() {
+    return {
+      onPayment:true,
+      list:{},
+      accountList:[],
+      height:'',
+      total:0,
+      currentPage:0,
+      param:{
+        "classname": "system.payorder.payorder",
+        "method": "detail_userlist",
+        "content": {
+          "sys_payorderid": this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    /*获取订单详情*/
+    async queryData(){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "detail",
+        "content": {
+          "sys_payorderid": this.$route.query.id
+        },
+      })
+      console.log(res,'订单详情')
+      this.list = res.data
+    },
+    /*获取账号列表*/
+    async queryAccount(){
+      const res = await this.$api.requested(this.param)
+      console.log(res,'账号列表')
+      this.accountList = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryAccount()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryAccount()
+    },
+    onPay(){
+      let that = this
+      that.$refs.payment.dialogVisible = true
+      this.$refs.payment.queryAccount()
+      this.$refs.payment.queryData()
+      this.$refs.payment.queryCode(this.list.orderno)
+      console.log(this)
+      this.payChangeFun(function(a) {
+        a.result  = () => {
+          that.$refs.payment.dialogVisible = false
+          that.queryData()
+        }
+      })
+    }
+  },
+  mounted() {
+    this.queryData()
+    this.queryAccount()
+  }
+}
+</script>
+
+<style scoped>
+  .title-style{
+    font-weight: bold;
+    font-size: 15px;
+  }
+  .span-top{
+    margin-top: 20px;
+    font-size: 15px;
+  }
+
+</style>

+ 188 - 0
src/SManagement/user/pay-orders/modules/payment.vue

@@ -0,0 +1,188 @@
+<template>
+  <div>
+    <el-dialog
+        title="待付费订单"
+        :visible.sync="dialogVisible"
+        width="900px">
+      <el-row :gutter="20" style="margin-top: -20px">
+        <el-col :span="24" >
+          <span class="span_title">订单信息</span>
+        </el-col>
+        <el-col :span="24">
+          <div class="div_border">
+            <el-col :span="6" class="div_span_top">
+              <span>付费订单号:{{list.orderno}}</span>
+            </el-col>
+            <el-col :span="6" class="div_span_top">
+              <span>付费状态:
+                <span v-if="list.ispaid == '0'" style="color: red">未付费</span>
+                <span v-else>已付费</span>
+              </span>
+            </el-col>
+            <el-col :span="6" class="div_span_top">
+              <span>付费金额(元):
+                <span style="color: red"> {{tool.formatAmount(list.amount,2)}}</span>
+              </span>
+            </el-col>
+            <el-col :span="6" class="div_span_top">
+              <span>付费版本:{{list.partitionname}}</span>
+            </el-col>
+            <el-col :span="6" class="div_span_top">
+              <span>付费类型:{{list.sys_payincidence == '1'?'按账号付费':'按主体付费'}}</span>
+            </el-col>
+            <el-col :span="12" class="div_span_top">
+              <span>备注:{{list.remarks}}</span>
+            </el-col>
+          </div>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" style="margin-top: 20px">
+        <el-col :span="24" >
+          <span class="span_title">付费版本:
+            <span style="color: #4f7bfd;font-weight: bold;font-size: 17px">{{list.partitionname}}</span>
+          </span>
+        </el-col>
+        <el-col :span="24" class="div_span_top">
+          <tableLayout :layout="tablecolsModule" :data="moduleList" :opwidth="200" :custom="true"  :height="200 + 'px'" >
+            <template v-slot:customcol="scope">
+              <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
+            </template>
+          </tableLayout>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" style="margin-top: 20px">
+        <el-col :span="24" >
+          <span class="span_title">付费账号:
+          </span>
+        </el-col>
+        <el-col :span="24" class="div_span_top" v-if="list.sys_payincidence == '1'">
+          <tableLayout :layout="tablecolsAccount" :data="accountList" :opwidth="200" :custom="true"  :height="200 + 'px'">
+            <template v-slot:customcol="scope">
+              <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
+            </template>
+          </tableLayout>
+        </el-col>
+        <el-col :span="24" class="div_span_top" v-else>
+          <tableLayout :layout="tablecolsMain" :data="accountList" :opwidth="200" :custom="true" :height="200 + 'px'" >
+            <template v-slot:customcol="scope">
+              <p >{{scope.column.data[scope.column.columnname] || '--'}}</p>
+            </template>
+          </tableLayout>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" style="margin-top: 20px">
+        <el-col :span="24" >
+          <span class="span_title">付费二维码
+          </span>
+        </el-col>
+        <el-col :span="24">
+            <vue-qr style="margin-left: 35%" :text="code_url" :size="200"></vue-qr>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer ">
+        <el-button style="margin-right: 45% !important;" @click="dialogVisible = false" size="small" class="normal-btn-width">取 消</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import tableLayout from '@/components/table/index2.vue'
+import vueQr from 'vue-qr'
+export default {
+  name: "payment",
+  props:['data'],
+  components:{tableLayout,vueQr},
+  data() {
+    return {
+      dialogVisible:false,
+      list:{},
+      accountList:[],
+      param:{
+        "classname": "system.payorder.payorder",
+        "method": "detail_userlist",
+        "content": {
+          "sys_payorderid": '',
+          "pageNumber": 1,
+          "pageSize": 99,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      tablecolsModule:[],
+      moduleList:[],
+      tablecolsAccount:[],
+      tablecolsMain:[],
+      code_url:''
+    }
+  },
+  methods:{
+    /*获取订单详情*/
+    async queryData(id){
+      const res = await this.$api.requested({
+        "classname": "system.payorder.payorder",
+        "method": "detail",
+        "content": {
+          "sys_payorderid": this.$route.query.id || id
+        },
+      })
+      console.log(res,'订单详情付款')
+      this.list = res.data
+      this.moduleList = res.data.systemapp
+    },
+    /*获取账号列表*/
+    async queryAccount(id){
+      this.param.content.sys_payorderid = this.$route.query.id || id
+      const res = await this.$api.requested(this.param)
+      console.log(res,'账号列表付款')
+      this.accountList = res.data
+    },
+    /*获取付费二维码*/
+    async queryCode(orderno){
+      const res = await this.$api.requested({
+        "classname": "system.payment.wechatpay",
+        "method": "createNativeWechatOrder",
+        "content": {
+          "orderno": orderno
+        },
+      })
+      console.log(res,'付费二维码')
+      this.code_url = res.data.code_url
+    },
+
+  },
+  mounted() {
+
+  },
+  created() {
+    this.tablecolsModule = this.tool.tabelCol(this.$route.name).moduleTable.tablecols
+    this.tablecolsAccount = this.tool.tabelCol(this.$route.name).payAccountTable.tablecols
+    this.tablecolsMain = this.tool.tabelCol(this.$route.name).payMainbodyTable.tablecols
+  }
+
+}
+</script>
+
+<style scoped>
+  /deep/ .el-dialog__title {
+    line-height: 24px;
+    font-size: 15px;
+    color: #303133;
+    font-weight: bold;
+  }
+  .span_title{
+    font-weight: bold;
+    color: #303133;
+  }
+  .div_border{
+    margin-top: 20px;
+    border: 2px dashed #c9c3c3;
+    width: 100%;
+    height: 100px;
+    border-radius: 5px;
+  }
+  .div_span_top{
+    margin-top: 20px;
+  }
+</style>

+ 72 - 0
src/SManagement/user/team-manage/components/detail.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <div class="container normal-panel normal-margin  flex-between">
+      <el-row>
+        <el-col :span="24">
+          <div class="title-style">订单信息</div>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" style="font-size: 15px;margin-top: 20px">
+        <el-col :span="6" class="col-top">
+          <span>账号名称:</span>
+        </el-col>
+        <el-col :span="6" class="col-top">
+          <span>账号:</span>
+        </el-col>
+        <el-col :span="6" class="col-top">
+          <span>手机号:</span>
+        </el-col>
+        <el-col :span="6" class="col-top">
+          <span>职位:</span>
+        </el-col>
+        <el-col :span="6" class="col-top">
+          <span>角色:</span>
+        </el-col>
+        <el-col :span="6" class="col-top">
+          <span>有无付费:</span>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="container normal-panel">
+      <el-row>
+        <el-col :span="24">
+          <div class="title-style">账号详情</div>
+        </el-col>
+      </el-row>
+      <tableLayout style="margin-top: 20px" :layout="tablecols" :data="list"  :opwidth="200" :custom="true"  fixedName="operation">
+        <template v-slot:customcol="scope">
+          <p >{{scope.column.data[scope.column.columnname] || ''}}</p>
+        </template>
+        <template v-slot:opreation="scope">
+        </template>
+      </tableLayout>
+    </div>
+  </div>
+</template>
+
+<script>
+import tableLayout from '@/components/table/index2.vue'
+export default {
+  name: "detail",
+  components:{tableLayout},
+  data() {
+    return {
+      tablecols:[],
+      list:[]
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).accountDetailTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+  .title-style{
+    font-weight: bold;
+    font-size: 14px;
+  }
+  .col-top{
+    margin-top: 20px;
+  }
+</style>

+ 88 - 0
src/SManagement/user/team-manage/index.vue

@@ -0,0 +1,88 @@
+<template>
+  <div>
+    <div class="container normal-panel normal-margin  flex-between">
+      <el-button class="inline-24" type="primary" size="small"  @click="queryData">新建团队账号</el-button>
+    </div>
+    <div class="container normal-panel">
+      <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="queryData(param.content.pageNumber = 1)" @clear="queryData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-24 layout_search__panel" clearable>
+      </el-input>
+      <span style="font-size: 14px">付费状态:</span>
+      <el-select v-model="value" size="small" placeholder="请选择">
+        <el-option
+            v-for="item in options"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+        </el-option>
+      </el-select>
+      <tableLayout style="margin-top: 20px" :layout="tablecols" :data="list"  :opwidth="200" :custom="true"   fixedName="operation">
+        <template v-slot:customcol="scope">
+          <span v-if="scope.column.columnname === 'rolenames'">
+            <span v-for="(item,index) in scope.column.data.rolenames " :key="index">
+              <span v-if="index === scope.column.data.rolenames.length -1">
+                {{item}}
+              </span>
+              <span v-else>{{item + ','}}</span>
+            </span>
+          </span>
+          <span v-else-if="scope.column.columnname === 'operation'" ></span>
+          <p v-else>{{scope.column.data[scope.column.columnname] || ''}}</p>
+        </template>
+        <template v-slot:opreation="scope">
+          <el-button size="mini" type="text" class="inline-16" @click="$router.push({path:'/team_managent_detail',query:{id:scope.data.userid}})">详 情</el-button>
+          <el-button size="mini" type="text">编 辑</el-button>
+        </template>
+      </tableLayout>
+    </div>
+  </div>
+</template>
+
+<script>
+import tableLayout from '@/components/table/index2.vue'
+export default {
+  name: "index",
+  components:{tableLayout},
+  data() {
+    return {
+      tablecols:[],
+      list:[],
+      param:{
+        "classname": "sale.team.team",
+        "method": "query_teamList",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        }
+      },
+      options: [{
+        value: '已付费',
+        label: '已付费'
+      }, {
+        value: '未付费',
+        label: '未付费'
+      }],
+      value: ''
+    }
+  },
+  methods: {
+    async queryData(){
+      const res = await this.$api.requested(this.param)
+      console.log(res,'数据信息')
+      this.list = res.data
+    }
+  },
+  mounted() {
+    this.queryData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).teamTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 1
src/components/socketMessage/index.vue

@@ -18,7 +18,8 @@
       return {
         id:'',
         // path:"ws://121.37.152.76:8080/yos/webSocket/",
-        path:"wss://meida.cnyunl.com/yos/webSocket/",
+        /*path:"wss://meida.cnyunl.com/yos/webSocket/",*/
+        path:"ws://61.164.207.46:8100/yos/webSocket/",
         panelIsShow:false,
         list:[],
         total:0,
@@ -84,6 +85,9 @@
           this.panelIsShow = true
           this.list = [JSON.parse(msg.data).message]
           this.getMessageList()
+          if (this.list[0].type == 'pay'){
+            this.payment.result()
+          }
         }
       },
       send: function (type,val,timsubjectid) {

+ 57 - 0
src/components/table/index2.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <el-table :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data"
+              :height="height ? height : data.length <= 4?'260px':data.length <= 20?'calc(100vh - 420px)':'calc(100vh - 220px)'"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+              :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}" size="mini"  @row-click="rowClick" style="width:100%"  border>
+      <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width" :fixed="col.columnname === fixedName?'right':false">
+        <template slot-scope="scope">
+          <!-- 自定义表格显示内容 -->
+          <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
+          <!-- 否则就是默认 -->
+          <span v-else>{{scope.row[col.columnname]}}</span>
+          <!-- 操作结构内容 -->
+          <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex"
+export default {
+  /*
+    layout:表结构数据;
+    data:表渲染数据;
+    custom:是否启用自定义结构;
+    opwidth:操作列宽度
+  */
+  props:['layout','data','custom','height','fixedName'],
+  data () {
+    return {
+      list:[],
+    }
+  },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
+  methods:{
+    rowClick (row) {
+      this.$emit('rowClick',row)
+    },
+    tableClassName ({row,rowIndex}) {
+      row.index = rowIndex
+    }
+  },
+  mounted () {
+    // this.listData()
+  }
+}
+
+</script>
+<style scoped>
+
+</style>

+ 57 - 0
src/components/table/index3.vue

@@ -0,0 +1,57 @@
+<template>
+  <div>
+    <el-table :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data"
+              height="370px"
+              :cell-style="{height:'40px',color:'#666666',fontWeight:'400'}"
+              :header-cell-style="{height:'40px',color:'#333',fontWeight:'400',fontSize:'14px',background:'#EEEEEE'}" size="mini"  @row-click="rowClick" style="width:100%"  border>
+      <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width" :fixed="col.columnname === fixedName?'right':false">
+        <template slot-scope="scope">
+          <!-- 自定义表格显示内容 -->
+          <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
+          <!-- 否则就是默认 -->
+          <span v-else>{{scope.row[col.columnname]}}</span>
+          <!-- 操作结构内容 -->
+          <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from "vuex"
+export default {
+  /*
+    layout:表结构数据;
+    data:表渲染数据;
+    custom:是否启用自定义结构;
+    opwidth:操作列宽度
+  */
+  props:['layout','data','custom','height','fixedName'],
+  data () {
+    return {
+      list:[],
+    }
+  },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
+  methods:{
+    rowClick (row) {
+      this.$emit('rowClick',row)
+    },
+    tableClassName ({row,rowIndex}) {
+      row.index = rowIndex
+    }
+  },
+  mounted () {
+    // this.listData()
+  }
+}
+
+</script>
+<style scoped>
+
+</style>

+ 9 - 0
src/main.js

@@ -24,6 +24,15 @@ Vue.prototype.tool = tool
 
 Vue.prototype.fileType = FileType
 
+let payment = {
+  result:1
+}
+
+Vue.prototype.payment = payment
+
+Vue.prototype.payChangeFun = (fun) => {
+  fun(payment)
+}
 Vue.prototype.$axios = axios
 
 Vue.prototype.tableHieght = 'calc(100vh - 302px)'

+ 9 - 0
src/router/HManagement.js

@@ -327,6 +327,15 @@ const HManagement = [
       ast_nav: true
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/coderule/index.vue')
+  },
+  {
+    path: '/paymentRules',
+    name: 'paymentRules',
+    meta: {
+      title: '付费规则',
+      ast_nav: true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/paymentRules/index.vue')
   }, {
     path: '/messageSendtype',
     name: 'messageSendtype',

+ 30 - 1
src/router/SManagement.js

@@ -123,7 +123,36 @@ const SManagement = [{
     title: '团队管理',
     ast_nav: true
   },
-  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/team-manage/TeamManage')
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/team-manage/index')
+},
+{
+  path: '/team_managent_detail',
+  name: 'teamManagent',
+  meta: {
+    title: '账号详情',
+    ast_nav: true,
+    keeproute: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/team-manage/components/detail')
+},
+{
+  path: '/pay_orders',
+  name: 'payOrders',
+  meta: {
+    title: '付费订单',
+    ast_nav: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/pay-orders/index')
+},
+{
+  path: '/pay_orders_detail',
+  name: 'payOrders',
+  meta: {
+    title: '付费订单详情',
+    ast_nav: true,
+    keeproute: true
+  },
+  component: () => import(/* webpackChunkName: "about" */ '@/SManagement/user/pay-orders/modules/detail')
 },
 {
   path: '/role_managent',

+ 1 - 0
src/store/index.js

@@ -118,6 +118,7 @@ export default new Vuex.Store({
     pageOnlyRead ({commit}, bool) {
       commit('pageOnlyRead',bool)
     },
+
   },
   modules: {
   },

+ 10 - 1
src/style/style.css

@@ -89,6 +89,10 @@ ul{
   display: inline-block !important;
   margin-right: 10px !important;
 }
+.inline-24{
+  display: inline-block !important;
+  margin-right: 16px !important;
+}
 .normal_input-width{
   width: 240px !important;
 }
@@ -156,4 +160,9 @@ ul{
   background-color: #fff;
   box-shadow: 0 -5px 5px rgba(0, 0, 0, .05);
   z-index: 9999999;
-}
+}
+.drawer__panel{
+  border-top:1px solid #eeeeee;
+  padding:20px 16px;
+  margin-bottom:72px
+}

+ 20 - 1
src/utils/tool.js

@@ -100,5 +100,24 @@ export default {
       const data = formatJson(filterVal, list);
       export_json_to_excel(tHeader, data, d);  //导出Excel 文件名
     })
-  }
+  },
+
+  // 金额格式化
+  formatAmount(amount, decimalDigits) {
+    // const amountStr = String(Number(amount).toFixed(decimalDigits))
+    let a = new Intl.NumberFormat(undefined, { minimumFractionDigits: decimalDigits, maximumFractionDigits: decimalDigits }).format(amount)
+    const amountStr = String(a)
+    const reg = /\B(?=(?:\d{3})+$)/g
+    // 是否是小数
+    const isDecimal = amountStr.indexOf('.') > -1
+    if (isDecimal) {
+      // 整数部分
+      const integerPart = amountStr.substring(0, amountStr.indexOf('.'))
+      // 小数部分
+      const decimalPart = amountStr.substring(amountStr.length, amountStr.indexOf('.'))
+      return `${integerPart.replace(reg, ',')}${decimalPart}`
+    } else {
+      return amountStr.replace(reg, ',')
+    }
+  },
 }