完成签约之后直接添加人员,录入下发凭证
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

270 lines
9.5 KiB

  1. webpackJsonp([74],{
  2. /***/ "Sp/M":
  3. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4. "use strict";
  5. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  6. // EXTERNAL MODULE: ./node_modules/babel-runtime/core-js/json/stringify.js
  7. var stringify = __webpack_require__("mvHQ");
  8. var stringify_default = /*#__PURE__*/__webpack_require__.n(stringify);
  9. // EXTERNAL MODULE: ./src/api/index.js + 5 modules
  10. var api = __webpack_require__("gyMJ");
  11. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/quantityConfiguration.vue
  12. //
  13. //
  14. //
  15. //
  16. //
  17. //
  18. //
  19. //
  20. //
  21. //
  22. //
  23. //
  24. //
  25. //
  26. //
  27. //
  28. //
  29. //
  30. //
  31. //
  32. //
  33. //
  34. //
  35. //
  36. //
  37. //
  38. //
  39. //
  40. //
  41. //
  42. //
  43. //
  44. //
  45. //
  46. //
  47. //
  48. //
  49. //
  50. //
  51. //
  52. //
  53. //
  54. //
  55. //
  56. //
  57. //
  58. //
  59. //
  60. //
  61. /* harmony default export */ var quantityConfiguration = ({
  62. inject: ['reload'],
  63. name: "quantityConfiguration",
  64. data: function data() {
  65. return {
  66. selectoption: [],
  67. selectoptionValue: '',
  68. tableData: [],
  69. enterpriseidedit: false,
  70. modifyStatus: false,
  71. Enterprise1: {
  72. value: '',
  73. label: ''
  74. },
  75. title: "添加",
  76. config: {},
  77. row: {},
  78. index: '',
  79. enterpriseName: '',
  80. pageSize: 10,
  81. pageNum: 1,
  82. pagetotal: 0,
  83. userInfo: {
  84. type: ''
  85. }
  86. };
  87. },
  88. components: {},
  89. created: function created() {
  90. this.userInfo = JSON.parse(localStorage.getItem('info'));
  91. this.height = document.documentElement.clientHeight - 200;
  92. this.getConfig();
  93. // this.selectoption = JSON.parse(localStorage.getItem('selectoption'))
  94. // this.selectoptionValue = localStorage.getItem('tenantId')
  95. },
  96. methods: {
  97. // selectTenantId(e) {
  98. // localStorage.setItem('tenantId', e)
  99. // this.reload()
  100. // },
  101. serachFun: function serachFun() {
  102. this.pageNum = 1;
  103. this.tableData = [];
  104. this.getConfig();
  105. },
  106. handleSizeChange: function handleSizeChange(val) {
  107. this.pageSize = val;
  108. this.getConfig();
  109. },
  110. handleCurrentChange: function handleCurrentChange(val) {
  111. this.pageNum = val;
  112. this.getConfig();
  113. },
  114. addConfig: function addConfig() {
  115. this.Enterprise1 = {
  116. value: '',
  117. label: ''
  118. }, this.title = "添加";
  119. this.enterpriseidedit = true;
  120. this.modifyStatus = false;
  121. },
  122. getConfig: function getConfig() {
  123. var _this = this;
  124. var str = {
  125. name: this.enterpriseName
  126. };
  127. var data = {
  128. q: stringify_default()(str),
  129. // pageSize: this.pageSize,
  130. // pageNum: this.pageNum,
  131. pageSize: 1,
  132. pageNum: 1
  133. };
  134. Object(api["d" /* httpGet */])(data, this.$api.getEnterprise).then(function (res) {
  135. if (res.success) {
  136. _this.tableData = res.data.list;
  137. _this.pagetotal = res.data.total;
  138. } else {
  139. _this.$message.error("获取失败");
  140. }
  141. });
  142. },
  143. editConfig: function editConfig(index, row) {
  144. this.row = row;
  145. this.Enterprise1.value = row.quota;
  146. this.Enterprise1.label = row.name;
  147. this.index = index;
  148. this.title = "编辑";
  149. this.enterpriseidedit = true;
  150. this.modifyStatus = true;
  151. },
  152. deleteConfig: function deleteConfig(index, row) {
  153. var _this2 = this;
  154. this.$confirm("确定要删除吗?", "提示", {
  155. type: "warning"
  156. }).then(function () {
  157. var tableData = JSON.parse(stringify_default()(_this2.tableData));
  158. tableData.splice(index, 1);
  159. var data = {
  160. list: tableData
  161. };
  162. Object(api["g" /* httpPost */])(data, _this2.$api.editConfig).then(function (res) {
  163. if (res.success) {
  164. _this2.tableData = res.data;
  165. _this2.enterpriseidedit = false;
  166. _this2.getConfig();
  167. } else {
  168. _this2.$message.error("删除失败");
  169. }
  170. });
  171. });
  172. },
  173. confirmEditConfig: function confirmEditConfig() {
  174. var _this3 = this;
  175. if (this.Enterprise1.value == '' || this.Enterprise1.label == '') {
  176. this.$message.error("请填写完整信息");
  177. } else {
  178. if (this.userInfo.type == 0 && this.row.id == this.userInfo.enterpriseId) {
  179. var data = this.Enterprise1.value;
  180. Object(api["g" /* httpPost */])(data, this.$api.edutLicense).then(function (res) {
  181. if (res.success) {
  182. _this3.pageNum = 1;
  183. _this3.tableData = [];
  184. _this3.getConfig();
  185. _this3.$message.success("修改成功");
  186. _this3.enterpriseidedit = false;
  187. } else {
  188. _this3.$message.error("修改失败");
  189. }
  190. }).catch(function (err) {
  191. console.log(err);
  192. _this3.$message.error(err.message);
  193. });
  194. } else {
  195. Object(api["d" /* httpGet */])('', "/v1/device/edit/quota/" + this.row.id + "/" + this.Enterprise1.value).then(function (res) {
  196. if (res.success) {
  197. _this3.pageNum = 1;
  198. _this3.tableData = [];
  199. _this3.getConfig();
  200. _this3.$message.success("修改成功");
  201. _this3.enterpriseidedit = false;
  202. } else {
  203. _this3.$message.error("修改失败");
  204. }
  205. }).catch(function (err) {
  206. console.log(err);
  207. _this3.$message.error(err.message);
  208. });
  209. }
  210. }
  211. }
  212. }
  213. });
  214. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-31d4aeff","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/quantityConfiguration.vue
  215. var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('el-card',{staticClass:"box-card"},[_c('selectoption'),_vm._v(" "),_c('el-input',{staticClass:"w300",attrs:{"size":"small","type":"text","placeholder":"请输入部门名称","clearable":""},model:{value:(_vm.enterpriseName),callback:function ($$v) {_vm.enterpriseName=$$v},expression:"enterpriseName"}}),_vm._v(" "),_c('el-button',{attrs:{"type":"primary","size":"small"},on:{"click":_vm.serachFun}},[_vm._v("搜索")]),_vm._v(" "),_c('el-table',{staticStyle:{"width":"100%"},attrs:{"data":_vm.tableData,"height":_vm.height,"border":true}},[_c('el-table-column',{attrs:{"prop":"name","label":"企业名称"}}),_vm._v(" "),_c('el-table-column',{attrs:{"prop":"quota","label":"允许接入设备数量"}}),_vm._v(" "),_c('el-table-column',{attrs:{"label":"操作"},scopedSlots:_vm._u([{key:"default",fn:function(scope){return [_c('el-button',{attrs:{"type":"text","size":"small"},on:{"click":function($event){return _vm.editConfig(scope.$index,scope.row)}}},[_vm._v("修改")]),_vm._v(" "),_c('el-button',{attrs:{"type":"text","size":"small"},on:{"click":function($event){return _vm.deleteConfig(scope.$index,scope.row)}}},[_vm._v("删除")])]}}])})],1),_vm._v(" "),_c('el-pagination',{attrs:{"current-page":_vm.pageNum,"page-sizes":[10,20,100, 200, 300, 400],"page-size":_vm.pageSize,"layout":"total, sizes, prev, pager, next, jumper","total":_vm.pagetotal},on:{"size-change":_vm.handleSizeChange,"current-change":_vm.handleCurrentChange}}),_vm._v(" "),_c('el-dialog',{staticClass:"eldialog",attrs:{"title":_vm.title,"visible":_vm.enterpriseidedit,"width":"30%"},on:{"update:visible":function($event){_vm.enterpriseidedit=$event}},scopedSlots:_vm._u([{key:"footer",fn:function(){return [_c('span',{staticClass:"dialog-footer"},[_c('el-button',{on:{"click":function($event){_vm.enterpriseidedit = false}}},[_vm._v("取 消")]),_vm._v(" "),(_vm.modifyStatus)?_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.confirmEditConfig}},[_vm._v("修 改")]):_c('el-button',{attrs:{"type":"primary"},on:{"click":_vm.confirmEditConfig}},[_vm._v("确 定")])],1)]},proxy:true}])},[_c('el-form',{ref:"form1",attrs:{"model":_vm.Enterprise1,"label-width":"70px"}},[_c('el-form-item',{attrs:{"label":"名称"}},[_c('el-input',{attrs:{"clearable":true,"disabled":true},model:{value:(_vm.Enterprise1.label),callback:function ($$v) {_vm.$set(_vm.Enterprise1, "label", $$v)},expression:"Enterprise1.label"}})],1),_vm._v(" "),_c('el-form-item',{attrs:{"label":"数量"}},[_c('el-input',{attrs:{"type":"text","maxlength":"16","clearable":true},model:{value:(_vm.Enterprise1.value),callback:function ($$v) {_vm.$set(_vm.Enterprise1, "value", $$v)},expression:"Enterprise1.value"}})],1)],1)],1)],1)],1)}
  216. var staticRenderFns = []
  217. var esExports = { render: render, staticRenderFns: staticRenderFns }
  218. /* harmony default export */ var views_quantityConfiguration = (esExports);
  219. // CONCATENATED MODULE: ./src/views/quantityConfiguration.vue
  220. function injectStyle (ssrContext) {
  221. __webpack_require__("zZv+")
  222. }
  223. var normalizeComponent = __webpack_require__("VU/8")
  224. /* script */
  225. /* template */
  226. /* template functional */
  227. var __vue_template_functional__ = false
  228. /* styles */
  229. var __vue_styles__ = injectStyle
  230. /* scopeId */
  231. var __vue_scopeId__ = "data-v-31d4aeff"
  232. /* moduleIdentifier (server only) */
  233. var __vue_module_identifier__ = null
  234. var Component = normalizeComponent(
  235. quantityConfiguration,
  236. views_quantityConfiguration,
  237. __vue_template_functional__,
  238. __vue_styles__,
  239. __vue_scopeId__,
  240. __vue_module_identifier__
  241. )
  242. /* harmony default export */ var src_views_quantityConfiguration = __webpack_exports__["default"] = (Component.exports);
  243. /***/ }),
  244. /***/ "zZv+":
  245. /***/ (function(module, exports) {
  246. // removed by extract-text-webpack-plugin
  247. /***/ })
  248. });