Files
wysite/output/sourcemaps/hc-etms.sqygj.cn/static/js/chunk-9114e96c.901da8a0.js

134 lines
11 KiB
JavaScript

(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-9114e96c"], { 7912: function(e, t, a) {
}, d001: function(e, t, a) {
"use strict";
a("7912");
}, efb6: function(e, t, a) {
"use strict";
a.r(t);
var n = function() {
var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2;
return a2("div", { staticClass: "headStys" }, [a2("div", { staticClass: "formContent" }, [a2("el-form", { ref: "query", staticClass: "demo-form-inline", attrs: { inline: true, model: e2.query } }, [a2("el-form-item", { attrs: { prop: "name" } }, [a2("el-input", { attrs: { placeholder: "企业收费项", clearable: "" }, model: { value: e2.query.name, callback: function(t3) {
e2.$set(e2.query, "name", t3);
}, expression: "query.name" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { prop: "isDelete" } }, [a2("el-select", { attrs: { clearable: "", placeholder: "状态" }, model: { value: e2.query.isDelete, callback: function(t3) {
e2.$set(e2.query, "isDelete", t3);
}, expression: "query.isDelete" } }, e2._l(e2.statusList, (function(e3, t3) {
return a2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1), e2._v(" "), a2("el-form-item", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.onSearch } }, [e2._v("查询")])], 1), e2._v(" "), a2("el-form-item", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) {
return e2.resetForm("query");
} } }, [e2._v("重置")])], 1)], 1)], 1), e2._v(" "), a2("div", { staticClass: "contentStys" }, [a2("div", { staticClass: "planLst" }, [a2("span", [e2._v("企业收费项列表")]), e2._v(" "), a2("span", { staticClass: "addPlan" }, [a2("el-button", { attrs: { type: "primary" }, on: { click: e2.addItem } }, [e2._v("新增")])], 1)]), e2._v(" "), a2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: e2.listLoading, expression: "listLoading" }], staticStyle: { width: "96%", "margin-left": "2%" }, attrs: { border: "", data: e2.listTable, "header-cell-style": e2.headClass, "tooltip-effect": "dark" } }, [a2("el-table-column", { attrs: { label: "#", align: "center", fixed: "", width: "50" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [a2("span", [e2._v(e2._s(t3.$index + (e2.query.pageNumber - 1) * e2.query.pageSize + 1))])];
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "show-overflow-tooltip": "", label: "企业收费项", fixed: "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.name || "-") + "\n ")];
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "状态", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(1 == t3.row.isDelete ? "禁用" : 0 == t3.row.isDelete ? "启用" : "-") + " \n ")];
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "操作人", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.updateBy || "-") + "\n ")];
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "操作时间", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.updateTime || "-") + "\n ")];
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "操作", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
return e2.editItem(t3.row);
} } }, [e2._v("编辑")]), e2._v(" "), 1 == t3.row.isDelete ? a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
return e2.updataStatisic(t3.row);
} } }, [e2._v("启用")]) : e2._e(), e2._v(" "), 0 == t3.row.isDelete ? a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
return e2.updataStatisic(t3.row);
} } }, [e2._v("禁用")]) : e2._e(), e2._v(" "), a2("el-button", { attrs: { type: "text" } }, [e2._v("查看")])];
} }]) })], 1), e2._v(" "), a2("div", { staticClass: "pagination" }, [a2("el-pagination", { attrs: { background: "", "current-page": e2.query.pageNumber, "page-sizes": [10, 20, 30, 100], "page-size": e2.query.pageSize, layout: "total, sizes, prev, pager, next, jumper", total: e2.pageTotal }, on: { "update:currentPage": function(t3) {
return e2.$set(e2.query, "pageNumber", t3);
}, "update:current-page": function(t3) {
return e2.$set(e2.query, "pageNumber", t3);
}, "size-change": e2.handleSizeChange, "current-change": e2.handleCurrentChange } })], 1)], 1), e2._v(" "), a2("el-dialog", { attrs: { title: e2.title, visible: e2.showDialog, width: "30%", "before-close": e2.handleClose, "close-on-click-modal": false, "close-on-press-escape": false }, on: { "update:visible": function(t3) {
e2.showDialog = t3;
} } }, [a2("el-form", { ref: "addForm", attrs: { model: e2.addForm, "label-width": "80px" } }, [a2("el-form-item", { attrs: { label: "收费项", prop: "name", rules: { required: true, message: "请输入收费项名称", trigger: "blur" } } }, [a2("el-input", { attrs: { placeholder: "收费项名称", clearable: "" }, model: { value: e2.addForm.name, callback: function(t3) {
e2.$set(e2.addForm, "name", t3);
}, expression: "addForm.name" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "状态", prop: "status", rules: { required: true, message: "请选择收费项状态", trigger: "change" } } }, [a2("el-select", { attrs: { placeholder: "状态" }, model: { value: e2.addForm.status, callback: function(t3) {
e2.$set(e2.addForm, "status", t3);
}, expression: "addForm.status" } }, e2._l(e2.statusList, (function(e3, t3) {
return a2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1), e2._v(" "), a2("el-form-item", ["新增企业收费项" == e2.title ? a2("el-button", { attrs: { type: "primary" }, nativeOn: { click: function(t3) {
return t3.preventDefault(), e2.addFormSubmit("addForm");
} } }, [e2._v("提交")]) : e2._e(), e2._v(" "), "编辑企业收费项" == e2.title ? a2("el-button", { attrs: { type: "primary" }, nativeOn: { click: function(t3) {
return t3.preventDefault(), e2.uploadItem("addForm");
} } }, [e2._v("保存")]) : e2._e(), e2._v(" "), a2("el-button", { nativeOn: { click: function(t3) {
return t3.preventDefault(), e2.addFormReset("addForm");
} } }, [e2._v("重置")])], 1)], 1)], 1)], 1);
}, o = [], s = (a("a450"), a("333d")), r = a("b775");
function l(e2) {
return Object(r["a"])({ url: "/hakocompany/FsChargesCompany/create", method: "post", data: e2 });
}
function i(e2) {
return Object(r["a"])({ url: "/hakocompany/FsChargesCompany/pageList", method: "post", data: e2 });
}
function u(e2) {
return Object(r["a"])({ url: "/hakocompany/FsChargesCompany/delete", method: "post", data: e2 });
}
function c(e2) {
return Object(r["a"])({ url: "/hakocompany/FsChargesCompany/update", method: "post", data: e2 });
}
var d = { components: { Pagination: s["a"] }, data: function() {
return { companyInfo: "", memberInfor: "", title: "新增企业收费项", showDialog: false, pageTotal: 0, listLoading: false, listTable: [], selectedMonth: null, query: { isDelete: "", name: "", pageSize: 10, pageNumber: 1 }, statusList: [{ label: "启用", value: 0 }, { label: "禁用", value: 1 }], addForm: { name: "", status: 0 } };
}, created: function() {
this.companyInfo = JSON.parse(localStorage.getItem("companyInfo")), this.memberInfor = JSON.parse(window.localStorage.getItem("memberInfor")), this.headClass();
}, mounted: function() {
this.getlistData();
}, methods: { getlistData: function() {
var e2 = this;
this.listLoading = true, this.query.companyId = this.companyInfo.osId, i(this.query).then((function(t2) {
e2.listTable = t2.data.records, e2.pageTotal = t2.data.rowsCount, e2.listLoading = false;
})).catch((function() {
e2.listLoading = false;
}));
}, onSearch: function() {
this.query.pageNumber = 1, this.getlistData();
}, resetForm: function(e2) {
this.$refs[e2].resetFields(), this.query.pageNumber = 1, this.getlistData();
}, handleSizeChange: function(e2) {
this.query.pageSize = e2, this.query.pageNumber = 1, this.getlistData();
}, handleCurrentChange: function(e2) {
this.query.pageNumber = e2, this.getlistData();
}, addItem: function() {
this.title = "新增企业收费项", this.showDialog = true;
}, addFormSubmit: function(e2) {
var t2 = this;
this.$refs[e2].validate((function(e3) {
if (e3) {
var a2 = { name: t2.addForm.name, isDelete: t2.addForm.status, companyId: t2.companyInfo.osId, companyName: t2.companyInfo.fullName, updateBy: t2.memberInfor.name };
l(a2).then((function(e4) {
0 == e4.code && (t2.$message.success("新增成功"), t2.handleClose(), t2.getlistData());
}));
}
}));
}, editItem: function(e2) {
var t2 = this;
this.title = "编辑企业收费项", this.showDialog = true, this.$nextTick((function() {
t2.addForm = JSON.parse(JSON.stringify(e2)), t2.addForm.status = t2.addForm.isDelete;
}));
}, uploadItem: function(e2) {
var t2 = this;
this.$refs[e2].validate((function(e3) {
if (e3) {
var a2 = { id: t2.addForm.id, name: t2.addForm.name, isDelete: t2.addForm.status, updateBy: t2.memberInfor.name };
c(a2).then((function(e4) {
0 == e4.code && (t2.$message.success("编辑成功"), t2.handleClose(), t2.getlistData());
}));
}
}));
}, updataStatisic: function(e2) {
var t2 = this;
this.$confirm("是否修改当前收费项的状态为".concat(0 == e2.isDelete ? "禁用" : "启用", "?"), "".concat(0 == e2.isDelete ? "禁用" : "启用"), { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
var a2 = { id: e2.id, isDelete: 0 == e2.isDelete ? 1 : 0, updateBy: t2.memberInfor.name };
u(a2).then((function(e3) {
0 === e3.code && (t2.$message.success("修改成功"), t2.getlistData());
}));
})).catch((function() {
}));
}, addFormReset: function(e2) {
this.$refs[e2].resetFields();
}, handleClose: function() {
this.$refs["addForm"].resetFields(), this.showDialog = false;
}, headClass: function() {
return "text-align:center;background:#FAFAFA;";
} } }, m = d, p = (a("d001"), a("829d")), f = Object(p["a"])(m, n, o, false, null, "7223e7b8", null);
t["default"] = f.exports;
} }]);