103 lines
9.0 KiB
JavaScript
103 lines
9.0 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-04a8fcb6"], { "4f2d": 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" }, [e2.infoList ? a2("div", {}, [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", label: "" } }, [a2("el-input", { attrs: { clearable: "", placeholder: "请输入名称", maxlength: "64" }, 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: "corporateCreditCode", label: "" } }, [a2("el-input", { attrs: { clearable: "", placeholder: "请输入企业统一社会信息代码", maxlength: "64" }, model: { value: e2.query.corporateCreditCode, callback: function(t3) {
|
|
e2.$set(e2.query, "corporateCreditCode", t3);
|
|
}, expression: "query.corporateCreditCode" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { prop: "contactName", label: "" } }, [a2("el-input", { attrs: { clearable: "", placeholder: "请输入负责人姓名", maxlength: "64" }, model: { value: e2.query.contactName, callback: function(t3) {
|
|
e2.$set(e2.query, "contactName", t3);
|
|
}, expression: "query.contactName" } })], 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), 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)], 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", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], staticClass: "cololr", attrs: { type: "primary" }, on: { click: function(t3) {
|
|
return e2.addSupplier(1);
|
|
} } }, [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", 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) + "\n ")])];
|
|
} }], null, false, 3311124033) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "name", "min-width": "200", label: "供应商名称", "show-overflow-tooltip": "" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "corporateCreditCode", "min-width": "150", label: "企业统一社会信用代码", "show-overflow-tooltip": "" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "address", "min-width": "160", label: "注册地址", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [e2._v("\n " + e2._s(t3.row.province) + e2._s(t3.row.city) + e2._s(t3.row.area) + e2._s(t3.row.address) + "\n ")];
|
|
} }], null, false, 1972213831) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "contactName", label: "负责人" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "contactMobile", label: "联系电话" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "bankName", label: "开户行", "show-overflow-tooltip": "" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "bankAccount", label: "银行账号", "show-overflow-tooltip": "" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "address", width: "200", label: "备注", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [e2._v(e2._s(t3.row.comments || "-"))];
|
|
} }], null, false, 3760403408) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", width: "150", label: "操作" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return e2.viewSupplier(t3.row);
|
|
} } }, [e2._v("查看")]), e2._v(" "), a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return e2.editSupplier(t3.row);
|
|
} } }, [e2._v("编辑")]), e2._v(" "), a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return e2.deleteSupplier(t3.row);
|
|
} } }, [e2._v("删除")])];
|
|
} }], null, false, 3508558272) })], 1), e2._v(" "), a2("div", { staticClass: "pagination" }, [a2("el-pagination", { attrs: { "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._e(), e2._v(" "), e2.viewInfo ? a2("div", { staticClass: "viewDetails" }, [a2("addSupplier", { ref: "addSupplier", attrs: { type: e2.type, classify: e2.classify }, on: { goBack: e2.goBack } })], 1) : e2._e()]);
|
|
}, i = [], o = (a("4057"), a("333d")), r = a("c889"), l = a("a6b9"), s = a("b54d"), c = { components: { Pagination: o["a"], supplierInfo: r["a"], addSupplier: s["a"] }, data: function() {
|
|
return { pageTotal: 0, listLoading: false, listTable: [], query: { name: "", corporateCreditCode: "", contactName: "", pageSize: 10, pageNumber: 1, type: 1 }, infoList: true, viewInfo: false, type: "", classify: "" };
|
|
}, created: function() {
|
|
this.headClass();
|
|
}, mounted: function() {
|
|
this.getlistData();
|
|
}, beforeRouteLeave: function(e2, t2, a2) {
|
|
this.viewInfo = false, this.infoList = true, a2();
|
|
}, methods: { getlistData: function() {
|
|
var e2 = this;
|
|
this.listLoading = true;
|
|
var t2 = JSON.parse(localStorage.getItem("companyInfo"));
|
|
this.query.companyId = t2.osId, Object(l["c"])(this.query).then((function(t3) {
|
|
e2.listTable = t3.data.records, e2.pageTotal = t3.data.rowsCount, e2.listLoading = false;
|
|
}));
|
|
}, addSupplier: function(e2) {
|
|
var t2 = this;
|
|
this.type = "add", this.classify = e2, this.viewInfo = true, this.infoList = false, this.$nextTick((function() {
|
|
t2.$refs.addSupplier.getInfoLst();
|
|
}));
|
|
}, editSupplier: function(e2) {
|
|
var t2 = this;
|
|
this.viewInfo = true, this.infoList = false, this.classify = e2.type, this.type = "edit", this.$nextTick((function() {
|
|
t2.$refs.addSupplier.getInfoLst(JSON.parse(JSON.stringify(e2)));
|
|
}));
|
|
}, viewSupplier: function(e2) {
|
|
var t2 = this;
|
|
this.viewInfo = true, this.infoList = false, this.classify = e2.type, this.type = "view", this.$nextTick((function() {
|
|
t2.$refs.addSupplier.getInfoLst(JSON.parse(JSON.stringify(e2)));
|
|
}));
|
|
}, deleteSupplier: (function(e2) {
|
|
function t2(t3) {
|
|
return e2.apply(this, arguments);
|
|
}
|
|
return t2.toString = function() {
|
|
return e2.toString();
|
|
}, t2;
|
|
})((function(e2) {
|
|
var t2 = this;
|
|
this.$confirm("确定删除该数据吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "info", center: true }).then((function() {
|
|
deleteSupplier({ id: e2.id }).then((function(e3) {
|
|
0 === e3.code && (t2.getlistData(), t2.$message({ type: "success", message: "删除成功" }));
|
|
}));
|
|
})).catch((function() {
|
|
}));
|
|
})), openDialog: function() {
|
|
this.showDialog = true;
|
|
}, closeDialog: function() {
|
|
this.showDialog = false;
|
|
}, onSearch: function() {
|
|
this.query.pageNumber = 1, this.getlistData();
|
|
}, resetForm: function() {
|
|
this.query.name = "", this.query.corporateCreditCode = "", this.query.contactName = "", 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();
|
|
}, headClass: function() {
|
|
return "text-align:center;background:#FAFAFA;";
|
|
}, goBack: function() {
|
|
this.viewInfo = false, this.infoList = true, this.getlistData();
|
|
} } }, u = c, p = (a("c8e8"), a("829d")), d = Object(p["a"])(u, n, i, false, null, "88a2b02a", null);
|
|
t["default"] = d.exports;
|
|
}, c8e8: function(e, t, a) {
|
|
"use strict";
|
|
a("d7a0e");
|
|
}, d7a0e: function(e, t, a) {
|
|
} }]);
|