136 lines
14 KiB
JavaScript
136 lines
14 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-938bd970"], { "32d1": function(t, e, a) {
|
|
"use strict";
|
|
a.r(e);
|
|
var l = function() {
|
|
var t2 = this, e2 = t2.$createElement, a2 = t2._self._c || e2;
|
|
return a2("div", { staticClass: "app-container bgHeight checkMain" }, [a2("el-tabs", { attrs: { value: t2.activeName, type: "border-card" }, on: { "tab-click": t2.handleClick } }, [a2("el-tab-pane", { attrs: { label: "工资发放", name: "payroll" } }, ["payroll" === t2.activeName ? a2("payroll") : t2._e()], 1), t2._v(" "), a2("el-tab-pane", { attrs: { label: "工资项", name: "salaryItem" } }, ["salaryItem" === t2.activeName ? a2("salaryItem") : t2._e()], 1)], 1)], 1);
|
|
}, n = [], s = (a("a450"), a("4d4e")), o = function() {
|
|
var t2 = this, e2 = t2.$createElement, a2 = t2._self._c || e2;
|
|
return a2("div", [a2("div", { staticClass: "formContent" }, [a2("el-form", { ref: "query", staticClass: "demo-form-inline", attrs: { inline: true, model: t2.query } }, [a2("el-form-item", { attrs: { prop: "name" } }, [a2("el-input", { attrs: { placeholder: "工资项名称", clearable: "" }, model: { value: t2.query.name, callback: function(e3) {
|
|
t2.$set(t2.query, "name", e3);
|
|
}, expression: "query.name" } })], 1), t2._v(" "), a2("el-form-item", { attrs: { prop: "status" } }, [a2("el-select", { attrs: { placeholder: "请选择状态", clearable: "" }, model: { value: t2.query.status, callback: function(e3) {
|
|
t2.$set(t2.query, "status", e3);
|
|
}, expression: "query.status" } }, [a2("el-option", { attrs: { label: "启用", value: 1 } }), t2._v(" "), a2("el-option", { attrs: { label: "禁用", value: 0 } })], 1)], 1), t2._v(" "), a2("el-form-item", { attrs: { prop: "salaryCalculate" } }, [a2("el-select", { attrs: { placeholder: "请选择是否参与计算", clearable: "" }, model: { value: t2.query.salaryCalculate, callback: function(e3) {
|
|
t2.$set(t2.query, "salaryCalculate", e3);
|
|
}, expression: "query.salaryCalculate" } }, [a2("el-option", { attrs: { label: "参与", value: 1 } }), t2._v(" "), a2("el-option", { attrs: { label: "不参与", value: 0 } })], 1)], 1), t2._v(" "), a2("el-form-item", { attrs: { prop: "taxCalculate" } }, [a2("el-select", { attrs: { placeholder: "请选择是否缴税", clearable: "" }, model: { value: t2.query.taxCalculate, callback: function(e3) {
|
|
t2.$set(t2.query, "taxCalculate", e3);
|
|
}, expression: "query.taxCalculate" } }, [a2("el-option", { attrs: { label: "参与缴税", value: 1 } }), t2._v(" "), a2("el-option", { attrs: { label: "参与实发调整", value: 0 } })], 1)], 1), t2._v(" "), a2("el-form-item", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: t2.onSearch } }, [t2._v("查询")])], 1), t2._v(" "), a2("el-form-item", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(e3) {
|
|
return t2.resetForm("query");
|
|
} } }, [t2._v("重置")])], 1)], 1)], 1), t2._v(" "), a2("div", { staticClass: "contentStys" }, [a2("div", { staticClass: "planLst" }, [a2("span", [t2._v("工资项列表")]), t2._v(" "), a2("div", [a2("el-button", { attrs: { type: "primary" }, on: { click: function(e3) {
|
|
t2.infoVisible = true;
|
|
} } }, [t2._v("新增")])], 1)]), t2._v(" "), a2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: t2.listLoading, expression: "listLoading" }], ref: "tableData", attrs: { border: "", data: t2.listTable, "header-cell-style": t2.headClass, "tooltip-effect": "dark" } }, [a2("el-table-column", { attrs: { align: "center", label: "工资项ID" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [a2("span", [t2._v(t2._s(e3.row.itemNo || "-"))])];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "工资项" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [a2("span", [t2._v(t2._s(e3.row.name || "-"))])];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "序号" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [a2("span", [t2._v(t2._s(e3.row.sortNum))])];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "状态" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [1 == e3.row.status ? a2("el-tag", { attrs: { type: "success" } }, [t2._v("启用")]) : t2._e(), t2._v(" "), 0 == e3.row.status ? a2("el-tag", { attrs: { type: "info" } }, [t2._v("禁用")]) : t2._e()];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "计算" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [1 == e3.row.salaryCalculate ? a2("el-tag", { attrs: { type: "success" } }, [t2._v("是")]) : t2._e(), t2._v(" "), 0 == e3.row.salaryCalculate ? a2("el-tag", { attrs: { type: "info" } }, [t2._v("否")]) : t2._e()];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "缴税" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [1 == e3.row.taxCalculate ? a2("el-tag", { attrs: { type: "success" } }, [t2._v("是")]) : t2._e(), t2._v(" "), 0 == e3.row.taxCalculate ? a2("el-tag", { attrs: { type: "info" } }, [t2._v("否")]) : t2._e()];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "更新人" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [t2._v("\n " + t2._s(e3.row.updaterName || "-") + "\n ")];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "更新时间" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [t2._v("\n " + t2._s(e3.row.updateTime || "-") + "\n ")];
|
|
} }]) }), t2._v(" "), a2("el-table-column", { attrs: { align: "center", label: "操作" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) {
|
|
return [a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return t2.editClick(e3.row);
|
|
} } }, [t2._v("编辑")]), t2._v(" "), 0 == e3.row.status ? a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return t2.changeStatus(e3.row);
|
|
} } }, [t2._v("启用")]) : t2._e(), t2._v(" "), 1 == e3.row.status ? a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return t2.changeStatus(e3.row);
|
|
} } }, [t2._v("禁用")]) : t2._e()];
|
|
} }]) })], 1), t2._v(" "), a2("div", { staticClass: "pagination" }, [a2("el-pagination", { attrs: { "current-page": t2.query.pageNumber, "page-sizes": [10, 20, 30, 100], "page-size": t2.query.pageSize, layout: "total, sizes, prev, pager, next, jumper", background: "", total: t2.pageTotal }, on: { "update:currentPage": function(e3) {
|
|
return t2.$set(t2.query, "pageNumber", e3);
|
|
}, "update:current-page": function(e3) {
|
|
return t2.$set(t2.query, "pageNumber", e3);
|
|
}, "size-change": t2.handleSizeChange, "current-change": t2.handleCurrentChange } })], 1)], 1), t2._v(" "), a2("el-dialog", { attrs: { title: t2.title, visible: t2.infoVisible, "close-on-press-escape": false, "close-on-click-modal": false, width: "30%", "before-close": t2.infoClose }, on: { "update:visible": function(e3) {
|
|
t2.infoVisible = e3;
|
|
} } }, [a2("el-form", { ref: "infoForm", staticClass: "demo-ruleForm", attrs: { model: t2.infoForm, "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: t2.infoForm.name, callback: function(e3) {
|
|
t2.$set(t2.infoForm, "name", e3);
|
|
}, expression: "infoForm.name" } })], 1), t2._v(" "), a2("el-form-item", { attrs: { label: "参与计算", prop: "salaryCalculate" } }, [a2("el-switch", { attrs: { "active-value": 1, "inactive-value": 0, "active-text": "参与计算", "inactive-text": "不参与计算" }, on: { change: t2.switchChange }, model: { value: t2.infoForm.salaryCalculate, callback: function(e3) {
|
|
t2.$set(t2.infoForm, "salaryCalculate", e3);
|
|
}, expression: "infoForm.salaryCalculate" } })], 1), t2._v(" "), 1 == t2.infoForm.salaryCalculate ? a2("el-form-item", { attrs: { label: "工资缴税", prop: "taxCalculate" } }, [a2("el-switch", { attrs: { "active-value": 1, "inactive-value": 0, "active-text": "工资项参与缴税", "inactive-text": "工资项参与实发调整" }, model: { value: t2.infoForm.taxCalculate, callback: function(e3) {
|
|
t2.$set(t2.infoForm, "taxCalculate", e3);
|
|
}, expression: "infoForm.taxCalculate" } })], 1) : t2._e(), t2._v(" "), a2("el-form-item", { attrs: { label: "状态", prop: "status" } }, [a2("el-switch", { attrs: { "active-value": 1, "inactive-value": 0, "active-text": "启用", "inactive-text": "禁用" }, model: { value: t2.infoForm.status, callback: function(e3) {
|
|
t2.$set(t2.infoForm, "status", e3);
|
|
}, expression: "infoForm.status" } })], 1), t2._v(" "), a2("el-form-item", { attrs: { label: "排序", prop: "sortNum" } }, [a2("el-input-number", { attrs: { precision: 0, "controls-position": "right", min: 1, max: 999 }, model: { value: t2.infoForm.sortNum, callback: function(e3) {
|
|
t2.$set(t2.infoForm, "sortNum", e3);
|
|
}, expression: "infoForm.sortNum" } })], 1), t2._v(" "), a2("el-form-item", ["新增工资项" == t2.title ? a2("el-button", { attrs: { type: "primary" }, on: { click: function(e3) {
|
|
return t2.submitInfo("infoForm");
|
|
} } }, [t2._v("确认新增")]) : a2("el-button", { attrs: { type: "primary" }, on: { click: function(e3) {
|
|
return t2.saveInfo("infoForm");
|
|
} } }, [t2._v("确认保存")]), t2._v(" "), a2("el-button", { on: { click: t2.infoClose } }, [t2._v("关闭")])], 1)], 1)], 1)], 1);
|
|
}, r = [], i = a("8425"), c = a("dd26"), u = a.n(c), m = { data: function() {
|
|
return { moment: u.a, companyId: "", pageTotal: 0, listLoading: false, listTable: [], title: "新增工资项", infoVisible: false, query: { name: "", status: "", pageSize: 10, pageNumber: 1 }, infoForm: { name: "", status: 1, salaryCalculate: 1, taxCalculate: 1, sortNum: 1 }, saveData: {} };
|
|
}, mounted: function() {
|
|
this.companyId = JSON.parse(localStorage.getItem("companyInfo")).osId, this.getlistData();
|
|
}, methods: { getlistData: function() {
|
|
var t2 = this;
|
|
this.listLoading = true, this.checkList = [], this.query.companyId = JSON.parse(localStorage.getItem("companyInfo")).osId, Object(i["g"])(this.query).then((function(e2) {
|
|
e2.data.records && e2.data.records.length > 0 ? (t2.listTable = e2.data.records, t2.pageTotal = e2.data.rowsCount) : (t2.listTable = [], t2.pageTotal = 0), t2.listLoading = false;
|
|
})).catch((function() {
|
|
t2.listLoading = false, t2.listTable = [], t2.pageTotal = 0;
|
|
}));
|
|
}, onSearch: function() {
|
|
this.query.pageNumber = 1, this.getlistData();
|
|
}, resetForm: function(t2) {
|
|
this.$refs[t2].resetFields(), this.query.pageNumber = 1, this.getlistData();
|
|
}, handleSizeChange: function(t2) {
|
|
this.query.pageSize = t2, this.query.pageNumber = 1, this.getlistData();
|
|
}, handleCurrentChange: function(t2) {
|
|
this.query.pageNumber = t2, this.getlistData();
|
|
}, submitInfo: function(t2) {
|
|
var e2 = this, a2 = JSON.parse(window.localStorage.getItem("memberInfor"));
|
|
this.$refs[t2].validate((function(t3) {
|
|
if (t3) {
|
|
var l2 = e2.infoForm;
|
|
l2.companyId = e2.companyId, l2.creatorId = a2.id, l2.creatorName = a2.name, Object(i["c"])(l2).then((function(t4) {
|
|
0 == t4.code && (e2.$message({ message: "新增成功!", type: "success" }), e2.infoClose(), e2.getlistData());
|
|
}));
|
|
}
|
|
}));
|
|
}, infoClose: function() {
|
|
this.$refs["infoForm"].resetFields(), this.title = "新增工资项", this.infoVisible = false;
|
|
}, editClick: function(t2) {
|
|
this.title = "编辑工资项", this.saveData = JSON.parse(JSON.stringify(t2)), this.infoVisible = true, this.$nextTick((function() {
|
|
this.infoForm.name = this.saveData.name, this.infoForm.status = this.saveData.status, this.infoForm.salaryCalculate = this.saveData.salaryCalculate, this.infoForm.taxCalculate = this.saveData.taxCalculate, this.infoForm.sortNum = this.saveData.sortNum;
|
|
}));
|
|
}, saveInfo: function(t2) {
|
|
var e2 = this;
|
|
this.$refs[t2].validate((function(t3) {
|
|
if (t3) {
|
|
var a2 = { name: e2.infoForm.name, status: e2.infoForm.status, salaryCalculate: e2.infoForm.salaryCalculate, taxCalculate: e2.infoForm.taxCalculate, sortNum: e2.infoForm.sortNum, id: e2.saveData.id };
|
|
e2.updateInfo(a2, "1");
|
|
}
|
|
}));
|
|
}, changeStatus: function(t2) {
|
|
var e2 = this;
|
|
this.$confirm("此操作将".concat(1 == t2.status ? "禁用" : "启用", "该工资项, 是否继续?"), "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
|
|
var a2 = { id: t2.id, name: t2.name, status: 1 == t2.status ? 0 : 1, salaryCalculate: t2.salaryCalculate, sortNum: e2.infoForm.sortNum, taxCalculate: t2.taxCalculate };
|
|
e2.updateInfo(a2, "2");
|
|
})).catch((function() {
|
|
}));
|
|
}, updateInfo: function(t2, e2) {
|
|
var a2 = this, l2 = JSON.parse(window.localStorage.getItem("memberInfor")), n2 = t2;
|
|
n2.updaterId = l2.id, n2.updaterName = l2.name, Object(i["j"])(n2).then((function(t3) {
|
|
0 == t3.code && (a2.$message({ message: "操作成功!", type: "success" }), "1" == e2 && a2.infoClose(), a2.getlistData());
|
|
}));
|
|
}, headClass: function() {
|
|
return "text-align:center;background:#FAFAFA;";
|
|
}, switchChange: function(t2) {
|
|
this.infoForm.taxCalculate = 1 == t2 ? 1 : 0;
|
|
} } }, f = m, p = (a("c00e"), a("829d")), v = Object(p["a"])(f, o, r, false, null, "735428bf", null), d = v.exports, b = { components: { payroll: s["a"], salaryItem: d }, data: function() {
|
|
return { activeName: "payroll" };
|
|
}, methods: { handleClick: function(t2) {
|
|
this.activeName = t2.name;
|
|
} } }, h = b, y = Object(p["a"])(h, l, n, false, null, null, null);
|
|
e["default"] = y.exports;
|
|
}, c00e: function(t, e, a) {
|
|
"use strict";
|
|
a("e156");
|
|
}, e156: function(t, e, a) {
|
|
} }]);
|