384 lines
33 KiB
JavaScript
384 lines
33 KiB
JavaScript
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-42c2ab84", "chunk-2d0aa9e6"], { "0909": function(e, t, a) {
|
|
}, "127f": function(e, t, a) {
|
|
"use strict";
|
|
a.d(t, "a", (function() {
|
|
return r;
|
|
}));
|
|
var r = function() {
|
|
function e2() {
|
|
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
|
|
}
|
|
return "".concat(+/* @__PURE__ */ new Date(), "_").concat(e2()).concat(e2());
|
|
};
|
|
}, "1a6d": function(e, t, a) {
|
|
"use strict";
|
|
a.r(t);
|
|
var r = function() {
|
|
var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2;
|
|
return a2("div", { staticClass: "app-container bgHeight" }, [a2("div", { staticClass: "material" }, [a2("el-tabs", { attrs: { type: "border-card" }, model: { value: e2.activeName, callback: function(t3) {
|
|
e2.activeName = t3;
|
|
}, expression: "activeName" } }, [a2("el-tab-pane", { attrs: { label: "物料管理", name: "typeManage" } }, [a2("material-Manage", { directives: [{ name: "show", rawName: "v-show", value: "typeManage" === e2.activeName, expression: "activeName === 'typeManage'" }] })], 1), e2._v(" "), a2("el-tab-pane", { attrs: { label: "类型管理", name: "materialManage" } }, [a2("type-Manage", { directives: [{ name: "show", rawName: "v-show", value: "materialManage" === e2.activeName, expression: "activeName === 'materialManage'" }] })], 1)], 1)], 1)]);
|
|
}, o = [], i = a("49de"), s = function() {
|
|
var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2;
|
|
return a2("div", { staticClass: "contentStys" }, [a2("div", { ref: "box", staticClass: "searchStys transition_dom" }, [a2("el-form", { ref: "query", attrs: { model: e2.query } }, [a2("div", { ref: "form_box", staticClass: "searchBar" }, [a2("div", { staticClass: "searchInput" }, [a2("el-row", { attrs: { gutter: 20 } }, [a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { label: "" } }, [a2("el-input", { attrs: { placeholder: "物料编码", clearable: "", maxlength: "36" }, model: { value: e2.query.codeNumber, callback: function(t3) {
|
|
e2.$set(e2.query, "codeNumber", t3);
|
|
}, expression: "query.codeNumber" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [a2("el-form-item", { attrs: { label: "" } }, [a2("el-input", { attrs: { placeholder: "物料名称", clearable: "", maxlength: "36" }, model: { value: e2.query.materielName, callback: function(t3) {
|
|
e2.$set(e2.query, "materielName", t3);
|
|
}, expression: "query.materielName" } })], 1)], 1), e2._v(" "), a2("el-col", { attrs: { span: 6 } }, [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("重置")]), e2._v(" "), 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)], 1)])])], 1), e2._v(" "), a2("div", { staticClass: "planLst", attrs: { slot: "header" }, slot: "header" }, [a2("span", { staticClass: "planTitle" }), e2._v(" "), a2("div", [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.exportTemplate } }, [e2._v("导出模板")]), e2._v(" "), a2("span", { staticStyle: { display: "inline-block" } }, [a2("el-upload", { directives: [{ name: "loading", rawName: "v-loading", value: e2.importDataBtn, expression: "importDataBtn" }], ref: "upload", attrs: { "auto-upload": true, "show-file-list": false, accept: ".xls,.xlsx", "http-request": e2.importData, action: "" } }, [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], staticClass: "el-icon-download", attrs: { type: "primary" } }, [e2._v("导入数据")])], 1)], 1), e2._v(" "), a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.addDialogClick } }, [e2._v("添加物料")])], 1)]), e2._v(" "), a2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: e2.listLoading, expression: "listLoading" }], attrs: { border: "", data: e2.listTable, "header-cell-style": e2.headClass, "tooltip-effect": "dark" } }, [a2("el-table-column", { attrs: { label: "#", align: "center", width: "50", fixed: "" }, 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 ")])];
|
|
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { prop: "codeNumber", align: "center", "show-overflow-tooltip": "", label: "物料编码", fixed: "" } }), e2._v(" "), a2("el-table-column", { attrs: { prop: "materielName", align: "center", "show-overflow-tooltip": "", label: "物料名称", fixed: "" } }), e2._v(" "), a2("el-table-column", { attrs: { prop: "categoryName", align: "center", "min-width": "120", "show-overflow-tooltip": "", label: "物料类型" } }), e2._v(" "), a2("el-table-column", { attrs: { prop: "brand", align: "center", "show-overflow-tooltip": "", label: "物料品牌" } }), e2._v(" "), a2("el-table-column", { attrs: { prop: "price", align: "center", "min-width": "120", "show-overflow-tooltip": "", label: "物料单价(元)" } }), e2._v(" "), a2("el-table-column", { attrs: { prop: "materielUnit", align: "center", "show-overflow-tooltip": "", label: "计量单位" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "show-overflow-tooltip": "", label: "状态" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [a2("span", [e2._v(e2._s(1 === t3.row.status ? "正常" : "报废"))])];
|
|
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", "show-overflow-tooltip": "", label: "物料图片" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [a2("el-image", { staticClass: "bannerImg", attrs: { src: e2.replaceHttp(t3.row.images), fit: "contain", "preview-src-list": t3.row.srcList } }, [a2("div", { staticClass: "image-slot", attrs: { slot: "placeholder" }, slot: "placeholder" }, [e2._v("\n 加载中"), a2("span", { staticClass: "dot" }, [e2._v("...")])]), e2._v(" "), a2("div", { staticClass: "image-error-slot", attrs: { slot: "error" }, slot: "error" }, [e2._v("-")])])];
|
|
} }]) }), e2._v(" "), a2("el-table-column", { attrs: { prop: "purchaseTime", align: "center", "show-overflow-tooltip": "", label: "采购时间" } }), e2._v(" "), a2("el-table-column", { attrs: { label: "操作", align: "center", width: "120", fixed: "right" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
|
|
return [a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return e2.editClick(t3.row);
|
|
} } }, [e2._v("编辑")]), e2._v(" "), a2("el-button", { attrs: { type: "text" }, on: { click: function(a3) {
|
|
return e2.deleteClick(t3.row);
|
|
} } }, [e2._v("删除")])];
|
|
} }]) })], 1), e2._v(" "), a2("div", { staticClass: "paginations" }, [a2("Pagination", { attrs: { total: e2.pageTotal }, on: { handleCurrentChange: e2.handleCurrentChange, handleSizeChange: e2.handleSizeChange } })], 1), e2._v(" "), e2.addDialog ? a2("el-dialog", { staticClass: "dialogHead", attrs: { title: e2.title, "show-close": true, "modal-append-to-body": true, "append-to-body": true, "close-on-click-modal": false, "close-on-press-escape": false, "destroy-on-close": true, visible: e2.addDialog, width: "45%", height: "300px" }, on: { closed: function(t3) {
|
|
return e2.closeDialog("categoryFrom");
|
|
}, "update:visible": function(t3) {
|
|
e2.addDialog = t3;
|
|
} } }, [a2("el-form", { ref: "categoryFrom", attrs: { model: e2.form, rules: e2.rules, "label-width": "120px" } }, [a2("el-form-item", { attrs: { label: "物料名称:", prop: "materielName" } }, [a2("el-input", { attrs: { placeholder: "请输入物料名称" }, model: { value: e2.form.materielName, callback: function(t3) {
|
|
e2.$set(e2.form, "materielName", t3);
|
|
}, expression: "form.materielName" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "物料类型:", prop: "materielCategoryUuid" } }, [a2("el-cascader", { attrs: { clearable: "", options: e2.categoryArr, props: { label: "categoryName", children: "children", value: "uuid", emitPath: false }, filterable: "" }, model: { value: e2.form.materielCategoryUuid, callback: function(t3) {
|
|
e2.$set(e2.form, "materielCategoryUuid", t3);
|
|
}, expression: "form.materielCategoryUuid" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "物料品牌:", prop: "brand" } }, [a2("el-input", { attrs: { placeholder: "请输入物料品牌", maxlength: "20" }, model: { value: e2.form.brand, callback: function(t3) {
|
|
e2.$set(e2.form, "brand", t3);
|
|
}, expression: "form.brand" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "物料单价:", prop: "price" } }, [a2("el-input", { attrs: { placeholder: "请输入物料单价", maxlength: "10" }, on: { input: function(t3) {
|
|
return e2.priceInput(t3, "price");
|
|
} }, model: { value: e2.form.price, callback: function(t3) {
|
|
e2.$set(e2.form, "price", t3);
|
|
}, expression: "form.price" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "计量单位:", prop: "materielUnit" } }, [a2("el-input", { attrs: { maxlength: "20", placeholder: "请输入计量单位(只能输入中文或者字母)" }, on: { input: function(t3) {
|
|
return e2.materielUnitInput(t3, "materielUnit");
|
|
} }, model: { value: e2.form.materielUnit, callback: function(t3) {
|
|
e2.$set(e2.form, "materielUnit", t3);
|
|
}, expression: "form.materielUnit" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "状态:", prop: "status" } }, [a2("el-select", { attrs: { clearable: "", placeholder: "请选择状态" }, model: { value: e2.form.status, callback: function(t3) {
|
|
e2.$set(e2.form, "status", t3);
|
|
}, expression: "form.status" } }, e2._l(e2.optionsArr, (function(e3) {
|
|
return a2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
|
|
})), 1)], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "采购时间:", prop: "purchaseTime" } }, [a2("el-date-picker", { attrs: { align: "left", type: "date", "value-format": "yyyy-MM-dd", placeholder: "选择日期", "picker-options": e2.pickerOptions }, model: { value: e2.form.purchaseTime, callback: function(t3) {
|
|
e2.$set(e2.form, "purchaseTime", t3);
|
|
}, expression: "form.purchaseTime" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "上传图片:", prop: "images" } }, [a2("el-tooltip", { staticClass: "item", attrs: { effect: "dark", content: "支持扩展名: .jpg .jpeg .gif .MPEG .MPG", placement: "top" } }, [a2("span", { staticClass: "el-icon-info" })]), e2._v(" "), a2("span", { staticClass: "imagvVdeo" }, [a2("AliOSSUpload", { attrs: { allowFileType: e2.allowFileType1, limit: 6, showFileList: true, fileList: e2.fileList }, on: { getUploadData: e2.getUploadData1 } })], 1)], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "操作人:" } }, [a2("span", [e2._v(e2._s(e2.form.operatorName))])]), e2._v(" "), a2("el-form-item", { attrs: { label: "岗位:" } }, [a2("span", [e2._v(e2._s(e2.form.operatorJob))])]), e2._v(" "), a2("el-form-item", { staticStyle: { "text-align": "center" } }, [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: function(t3) {
|
|
return e2.saveInfoList("categoryFrom");
|
|
} } }, [e2._v("提交")]), e2._v(" "), a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) {
|
|
return e2.cancelFrom("categoryFrom");
|
|
} } }, [e2._v("取消")])], 1)], 1)], 1) : e2._e(), e2._v(" "), e2.viewImport ? a2("el-dialog", { staticClass: "dialogHead", attrs: { title: "查看导入详情", "show-close": true, "close-on-press-escape": false, "close-on-click-modal": false, "destroy-on-close": "", visible: e2.viewImport }, on: { "update:visible": function(t3) {
|
|
e2.viewImport = t3;
|
|
} } }, [a2("div", { staticClass: "center2" }, [a2("span", [e2._v("上传成功!共上传")]), e2._v(" "), a2("span", { staticClass: "color1" }, [e2._v(e2._s(e2.totalCount))]), e2._v(" "), a2("span", [e2._v("条,成功")]), e2._v(" "), a2("span", { staticClass: "color2" }, [e2._v(e2._s(e2.successCount))]), e2._v(" "), a2("span", [e2._v("条,失败")]), e2._v(" "), a2("span", { staticClass: "color3" }, [e2._v(e2._s(e2.errorCount))]), e2._v(" "), a2("span", [e2._v("条")]), e2._v(" "), a2("span", [a2("el-button", { staticStyle: { "font-size": "16px" }, attrs: { type: "text" }, on: { click: e2.downloadImportDetailes } }, [e2._v("\n 查看导入详情")])], 1)]), e2._v(" "), a2("div", { staticClass: "btnStsy" }, [a2("el-button", { attrs: { type: "info" }, on: { click: function(t3) {
|
|
e2.viewImport = false;
|
|
} } }, [e2._v("取消")])], 1)]) : e2._e()], 1);
|
|
}, n = [], l = a("333d"), c = a("8988"), u = { name: "typeManage", components: { Pagination: l["a"], AliOSSUpload: c["a"] }, data: function() {
|
|
return { downloadInfo: null, importDataBtn: false, viewImport: false, is_show: false, height: "", uuid: "", title: "", pageTotal: 0, listLoading: false, addDialog: false, listTable: [], categoryArr: [], list: [], allowFileType1: ["image"], form: { status: 1, purchaseTime: "", materielName: "", materielUnit: "", materielCategoryUuid: "", images: "", brand: "", price: "", operatorName: this.$store.state.user.userInfo.memberName, operatorJob: this.$store.state.user.userInfo.postName }, query: { pageNumber: 1, pageSize: 10, codeNumber: "", materielName: "" }, optionsArr: [{ value: 1, label: "正常" }, { value: 2, label: "报废" }], rules: { price: [{ required: true, message: "单价不能为空", trigger: "blur" }], brand: [{ required: true, message: "品牌不能为空", trigger: "blur" }], status: [{ required: true, message: "状态选择不能为空", trigger: "change" }], materielName: [{ required: true, message: "物料名称不能为空", trigger: "blur" }], materielUnit: [{ required: true, message: "计量单位不能为空", trigger: "blur" }], materielCategoryUuid: [{ required: true, message: "所属类型不能为空", trigger: "change" }] }, fileList: [], pickerOptions: { disabledDate: function(e2) {
|
|
return e2.getTime() > Date.now();
|
|
}, shortcuts: [{ text: "今天", onClick: function(e2) {
|
|
e2.$emit("pick", /* @__PURE__ */ new Date());
|
|
} }, { text: "昨天", onClick: function(e2) {
|
|
var t2 = /* @__PURE__ */ new Date();
|
|
t2.setTime(t2.getTime() - 864e5), e2.$emit("pick", t2);
|
|
} }, { text: "一周前", onClick: function(e2) {
|
|
var t2 = /* @__PURE__ */ new Date();
|
|
t2.setTime(t2.getTime() - 6048e5), e2.$emit("pick", t2);
|
|
} }] } };
|
|
}, created: function() {
|
|
this.uuid = this.$store.state.community_uuid, this.getRealHeight(), this.getData();
|
|
}, methods: { downloadImportDetailes: function() {
|
|
var e2 = "application/vnd.ms-excel;charset=UTF-8", t2 = new Blob([this.downloadInfo], { type: e2 }), a2 = "导入失败详情.xlsx";
|
|
if (window.navigator.msSaveOrOpenBlob) navigator.msSaveBlob(t2);
|
|
else {
|
|
var r2 = document.createElement("a");
|
|
r2.download = a2, r2.style.display = "none", r2.href = URL.createObjectURL(t2), document.body.appendChild(r2), r2.click(), document.body.removeChild(r2);
|
|
}
|
|
}, importData: function(e2) {
|
|
var t2 = this, a2 = e2.file, r2 = a2.size / 1024 / 1024 < 20, o2 = a2.name.lastIndexOf("."), s2 = a2.name.length, n2 = a2.name.substring(o2 + 1, s2);
|
|
if ("xls" == n2 || "xlsx" == n2) if (r2) {
|
|
var l2 = new FormData();
|
|
this.fileName = a2.name, l2.append("file", a2, a2.name);
|
|
var c2 = "/".concat(this.$store.state.community_uuid, "/").concat(this.$store.state.companyId);
|
|
this.importDataBtn = true, Object(i["l"])(l2, c2).then((function(e3) {
|
|
var a3 = e3.headers, r3 = e3.data;
|
|
if (console.log(a3, r3, "headers, data"), t2.downloadInfo = r3, a3.count) if (a3.count.includes(-1)) t2.importDataBtn = false, t2.teanslateResBlob(r3);
|
|
else {
|
|
var o3 = JSON.parse(a3.count);
|
|
o3 && (0 == o3.code ? (t2.importDataBtn = false, o3.errorCount > 0 ? (t2.viewImport = true, t2.totalCount = o3.totalCount, t2.successCount = o3.successCount, t2.errorCount = o3.errorCount) : t2.$message({ message: "导入成功", type: "success" }), t2.query.pageNumber = 1, t2.getData()) : t2.importDataBtn = false);
|
|
}
|
|
else t2.importDataBtn = false, t2.teanslateResBlob(r3);
|
|
})).catch((function() {
|
|
t2.importDataBtn = false;
|
|
}));
|
|
} else this.$message("上传文件大小不能超过20M!");
|
|
else this.$message("只能上传Excel文件!");
|
|
}, teanslateResBlob: function(e2) {
|
|
var t2 = this, a2 = new FileReader();
|
|
a2.readAsText(e2), a2.onload = function() {
|
|
var e3 = this.result;
|
|
e3 && (e3 = JSON.parse(e3), -1 === e3.code && t2.$message({ message: e3.message, type: "error" }));
|
|
};
|
|
}, exportTemplate: function() {
|
|
Object(i["k"])({ companyId: this.$store.state.companyId }).then((function(e2) {
|
|
var t2 = new Blob([e2], { type: "application/vnd.ms-excel;charset=UTF-8" });
|
|
if (window.navigator.msSaveOrOpenBlob) navigator.msSaveBlob(t2);
|
|
else {
|
|
var a2 = document.createElement("a");
|
|
a2.download = "采购入库导入模版.xls", a2.href = URL.createObjectURL(t2), a2.click(), URL.revokeObjectURL(a2.href), document.body.removeChild(a2);
|
|
}
|
|
}));
|
|
}, materielUnitInput: function(e2, t2) {
|
|
e2 = e2.replace(/[^\a-zA-Z\u4E00-\u9FA5]/g, ""), this.form[t2] = e2;
|
|
}, priceInput: function(e2, t2) {
|
|
e2 = e2.replace(/[^\d\.]/g, ""), e2 = e2.replace(/^\./g, ""), e2 = e2.replace(/^0\d[0-9]*/g, ""), e2 = e2.replace(/\.{2,}/g, "."), e2 = e2.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."), e2 = e2.replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3"), this.form[t2] = e2;
|
|
}, replaceHttp: function(e2) {
|
|
return e2 && e2.split(",")[0] || "";
|
|
}, getUploadData1: function(e2) {
|
|
var t2 = [];
|
|
e2 && e2.length > 0 && e2.forEach((function(e3) {
|
|
t2.push(e3.filePath);
|
|
})), this.form.images = t2.join(",");
|
|
}, addDialogClick: function() {
|
|
this.fileList = [], this.form = { materielName: "", materielUnit: "", materielCategoryUuid: "", images: "", brand: "", price: "", status: 1, operatorName: this.$store.state.user.userInfo.memberName, operatorJob: this.$store.state.user.userInfo.postName }, this.title = "添加物料", this.addDialog = true, this.getCategoryName();
|
|
}, saveInfoList: function(e2) {
|
|
var t2 = this;
|
|
this.$refs[e2].validate((function(e3) {
|
|
if (!e3) return false;
|
|
t2.addMaterial();
|
|
}));
|
|
}, addMaterial: function() {
|
|
var e2 = this;
|
|
this.form.communityUuid = this.$store.state.community_uuid, this.form.operatorUuid = this.$store.state.user.userInfo.memberUuid, this.form.operatorId = this.$store.state.user.userInfo.postUuid, Object(i["j"])(this.form).then((function(t2) {
|
|
0 === t2.code && (e2.$message({ message: "添加成功", type: "success" }), e2.getData(), e2.$refs["categoryFrom"].resetFields(), e2.addDialog = false);
|
|
}));
|
|
}, editClick: function(e2) {
|
|
this.fileList = [], this.form = Object.assign({}, e2), this.title = "编辑物料", this.form.communityUuid = this.$store.state.community_uuid, this.form.operatorName = this.$store.state.user.userInfo.memberName, this.form.operatorJob = this.$store.state.user.userInfo.postName, null != this.form.images && "" != this.form.images ? this.form.images.indexOf(",") > 0 ? this.fileList = this.form.images.split(",").map((function(e3) {
|
|
return { url: e3 };
|
|
})) : this.fileList.push({ url: this.form.images }) : this.fileList = [], this.addDialog = true, this.getCategoryName();
|
|
}, deleteClick: function(e2) {
|
|
var t2 = this, a2 = { id: e2.id, operatorUuid: this.$store.state.user.userInfo.memberUuid, operatorId: this.$store.state.user.userInfo.postUuid, operatorName: this.$store.state.user.userInfo.memberName, operatorJob: this.$store.state.user.userInfo.postName };
|
|
this.$confirm("确定删除该数据吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "info", center: true }).then((function() {
|
|
Object(i["i"])(a2).then((function(e3) {
|
|
0 == e3.code && (t2.$message({ message: "删除成功", type: "success" }), t2.getData());
|
|
}));
|
|
}));
|
|
}, headClass: function() {
|
|
return "text-align:center;background:#FAFAFA;";
|
|
}, resetForm: function(e2) {
|
|
this.query.pageNumber = 1, this.query.codeNumber = "", this.query.materielNumber = "", this.query.materielName = "", this.getData();
|
|
}, onSearch: function() {
|
|
this.query.pageNumber = 1, this.getData();
|
|
}, getData: function() {
|
|
var e2 = this;
|
|
this.listTable = [], this.query.communityUuid = this.$store.state.community_uuid, this.query.isDel = 0, Object(i["n"])(this.query).then((function(t2) {
|
|
if (0 == t2.code) {
|
|
t2.data.records.forEach((function(e3) {
|
|
if (e3.images) {
|
|
var t3 = e3.images && e3.images.split(",") || [];
|
|
e3.srcList = t3;
|
|
}
|
|
}));
|
|
var a2 = t2.data.records;
|
|
e2.pageTotal = t2.data.rowsCount, e2.listTable = a2;
|
|
}
|
|
}));
|
|
}, getCategoryName: function() {
|
|
var e2 = this, t2 = { companyId: this.$store.state.companyId };
|
|
Object(i["r"])(t2).then((function(t3) {
|
|
0 == t3.code && (e2.categoryArr = e2.getTreeData(t3.data));
|
|
}));
|
|
}, getTreeData: function(e2) {
|
|
for (var t2 = 0; t2 < e2.length; t2++) e2[t2].children && e2[t2].children.length ? this.getTreeData(e2[t2].children) : e2[t2].children = void 0;
|
|
return e2;
|
|
}, closeDialog: function(e2) {
|
|
this.fileList = [], this.$refs[e2].resetFields(), this.addDialog = false;
|
|
}, cancelFrom: function(e2) {
|
|
this.addDialog = false, this.$refs[e2].resetFields();
|
|
}, handleSizeChange: function(e2) {
|
|
this.query.pageSize = e2.limit, this.getData();
|
|
}, handleCurrentChange: function(e2) {
|
|
this.query.pageNumber = e2.currentPage, this.getData();
|
|
}, upAndDown: function() {
|
|
this.is_show ? this.$refs.box.style.height = "80px" : this.$refs.box.style.height = this.height, this.is_show = !this.is_show;
|
|
}, getRealHeight: function() {
|
|
this.$nextTick((function() {
|
|
this.height = this.$refs.form_box.offsetHeight + "px";
|
|
}));
|
|
} } }, m = u, p = (a("983b"), a("829d")), d = Object(p["a"])(m, s, n, false, null, "45f43c16", null), f = d.exports, h = function() {
|
|
var e2 = this, t2 = e2.$createElement, a2 = e2._self._c || t2;
|
|
return a2("div", { staticClass: "contentStys" }, [a2("div", { staticClass: "planLst", attrs: { slot: "header" }, slot: "header" }, [a2("span", { staticClass: "planTitle" })]), e2._v(" "), a2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: e2.listLoading, expression: "listLoading" }], attrs: { border: "", data: e2.listTable, "row-key": "id", "tree-props": { children: "children" }, "header-cell-style": e2.headClass, "tooltip-effect": "dark" } }, [a2("el-table-column", { attrs: { label: "#", align: "center", width: "50", type: "index" }, 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: "left", prop: "categoryName", "show-overflow-tooltip": "", label: "类型名称" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "codeNumber", "show-overflow-tooltip": "", label: "编码" } }), e2._v(" "), a2("el-table-column", { attrs: { align: "center", prop: "updateTime", "show-overflow-tooltip": "", label: "更新时间" } })], 1), e2._v(" "), a2("el-dialog", { staticClass: "dialogHead", attrs: { title: "添加类型", "show-close": true, "close-on-press-escape": false, "close-on-click-modal": false, visible: e2.typeDialog, width: "45%", height: "300px" }, on: { "update:visible": function(t3) {
|
|
e2.typeDialog = t3;
|
|
} } }, [a2("el-form", { ref: "categoryFrom", attrs: { model: e2.form, rules: e2.rules, "label-width": "80px" } }, [a2("el-form-item", { attrs: { label: "类型名称", prop: "categoryName" } }, [a2("el-input", { attrs: { placeholder: "请输入类型名称" }, model: { value: e2.form.categoryName, callback: function(t3) {
|
|
e2.$set(e2.form, "categoryName", t3);
|
|
}, expression: "form.categoryName" } })], 1), e2._v(" "), a2("el-form-item", { attrs: { label: "操作人" } }, [a2("span", [e2._v(e2._s(e2.form.operatorName))])]), e2._v(" "), a2("el-form-item", { attrs: { label: "岗位" } }, [a2("span", [e2._v(e2._s(e2.form.operatorJob))])]), e2._v(" "), a2("el-form-item", { staticStyle: { "text-align": "center" } }, [a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: function(t3) {
|
|
return e2.savaInfoClick("categoryFrom");
|
|
} } }, [e2._v("确 定")]), e2._v(" "), a2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) {
|
|
return e2.cancelFrom("categoryFrom");
|
|
} } }, [e2._v("取 消")])], 1)], 1)], 1)], 1);
|
|
}, g = [], v = { name: "typeManage", components: { Pagination: l["a"] }, data: function() {
|
|
return { pageTotal: 0, typeDialog: false, listLoading: false, listTable: [], type: 0, form: { communityUuid: "", categoryName: "", operatorName: this.$store.state.user.userInfo.memberName, operatorJob: this.$store.state.user.userInfo.postName }, query: { pageNumber: 1, pageSize: 10, isDel: 0 }, rules: { categoryName: [{ required: true, message: "类型名称不能为空", trigger: "blur" }] } };
|
|
}, created: function() {
|
|
this.getData();
|
|
}, methods: { savaInfoClick: function(e2) {
|
|
var t2 = this;
|
|
console.log("this.$store.state.community_uuid", this.$store.state.community_uuid), this.form.communityUuid = this.$store.state.community_uuid, this.form.operatorUuid = this.$store.state.user.userInfo.uuid, this.form.operatorId = this.$store.state.user.userInfo.postUuid, this.$refs[e2].validate((function(e3) {
|
|
if (!e3) return false;
|
|
t2.addClassification();
|
|
}));
|
|
}, addClassification: function() {
|
|
var e2 = this;
|
|
console.log("this.form", this.form), 0 == this.type ? Object(i["a"])(this.form).then((function(t2) {
|
|
0 === t2.code && (e2.$message({ message: "添加成功", type: "success" }), e2.$refs["categoryFrom"].resetFields(), e2.getData(), e2.typeDialog = false);
|
|
})) : Object(i["b"])(this.form).then((function(t2) {
|
|
0 === t2.code && (e2.$message({ message: "添加成功", type: "success" }), e2.$refs["categoryFrom"].resetFields(), e2.getData(), e2.typeDialog = false);
|
|
}));
|
|
}, getData: function() {
|
|
var e2 = this;
|
|
this.listLoading = true, this.listTable = [], this.query.companyId = this.$store.state.companyId, Object(i["r"])(this.query).then((function(t2) {
|
|
0 == t2.code && (e2.listTable = e2.listTable.concat(t2.data));
|
|
})), this.listLoading = false;
|
|
}, addClick: function(e2, t2) {
|
|
this.typeDialog = true, this.type = t2, this.form.parentId = e2 ? e2.id : null, console.log(this.form);
|
|
}, editClick: function(e2, t2) {
|
|
this.type = t2, this.form = Object.assign({}, e2), this.form.operatorName = this.$store.state.user.userInfo.memberName, this.form.operatorJob = this.$store.state.user.userInfo.postName, this.typeDialog = true;
|
|
}, deleteClick: function(e2) {
|
|
var t2 = this, a2 = { id: e2.id, operatorUuid: this.$store.state.user.userInfo.uuid, operatorId: this.$store.state.user.userInfo.postUuid, operatorName: this.$store.state.user.userInfo.memberName, operatorJob: this.$store.state.user.userInfo.postName };
|
|
this.$confirm("确定删除该数据吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "info", center: true }).then((function() {
|
|
Object(i["c"])(a2).then((function(e3) {
|
|
0 == e3.code ? t2.$message({ message: "删除成功", type: "success" }) : -1 == e3.code && t2.$message({ message: e3.message, type: "success" }), t2.getData();
|
|
}));
|
|
}));
|
|
}, cancelFrom: function(e2) {
|
|
this.typeDialog = false, this.$refs[e2].resetFields();
|
|
}, headClass: function() {
|
|
return "text-align:center;background:#FAFAFA;";
|
|
}, handleSizeChange: function(e2) {
|
|
this.query.pageSize = e2.limit, this.getData();
|
|
}, handleCurrentChange: function(e2) {
|
|
this.query.pageNumber = e2.currentPage, this.getData();
|
|
} } }, b = v, y = (a("1eb0"), Object(p["a"])(b, h, g, false, null, "31e9c979", null)), _ = y.exports, w = { name: "materialTypeSetting", components: { materialManage: f, typeManage: _ }, data: function() {
|
|
return { activeName: "typeManage" };
|
|
}, created: function() {
|
|
}, methods: {} }, x = w, N = (a("e46b"), Object(p["a"])(x, r, o, false, null, "18e82d08", null));
|
|
t["default"] = N.exports;
|
|
}, "1eb0": function(e, t, a) {
|
|
"use strict";
|
|
a("42ea");
|
|
}, "42ea": function(e, t, a) {
|
|
}, "49de": function(e, t, a) {
|
|
"use strict";
|
|
a.d(t, "a", (function() {
|
|
return o;
|
|
})), a.d(t, "b", (function() {
|
|
return i;
|
|
})), a.d(t, "c", (function() {
|
|
return s;
|
|
})), a.d(t, "j", (function() {
|
|
return n;
|
|
})), a.d(t, "n", (function() {
|
|
return l;
|
|
})), a.d(t, "m", (function() {
|
|
return c;
|
|
})), a.d(t, "i", (function() {
|
|
return u;
|
|
})), a.d(t, "o", (function() {
|
|
return m;
|
|
})), a.d(t, "h", (function() {
|
|
return p;
|
|
})), a.d(t, "p", (function() {
|
|
return d;
|
|
})), a.d(t, "d", (function() {
|
|
return f;
|
|
})), a.d(t, "r", (function() {
|
|
return h;
|
|
})), a.d(t, "q", (function() {
|
|
return g;
|
|
})), a.d(t, "e", (function() {
|
|
return v;
|
|
})), a.d(t, "s", (function() {
|
|
return b;
|
|
})), a.d(t, "f", (function() {
|
|
return y;
|
|
})), a.d(t, "k", (function() {
|
|
return _;
|
|
})), a.d(t, "l", (function() {
|
|
return w;
|
|
})), a.d(t, "g", (function() {
|
|
return x;
|
|
}));
|
|
var r = a("b775");
|
|
function o(e2) {
|
|
return Object(r["a"])({ url: "/appproject/category/add", method: "post", data: e2 });
|
|
}
|
|
function i(e2) {
|
|
return Object(r["a"])({ url: "/appproject/category/edit", method: "post", data: e2 });
|
|
}
|
|
function s(e2) {
|
|
return Object(r["a"])({ url: "/appproject/category/delete", method: "post", data: e2 });
|
|
}
|
|
function n(e2) {
|
|
return Object(r["a"])({ url: "/appproject/materiel/edit", method: "post", data: e2 });
|
|
}
|
|
function l(e2) {
|
|
return Object(r["a"])({ url: "/appproject/materiel/pageList", method: "post", data: e2 });
|
|
}
|
|
function c(e2) {
|
|
return Object(r["a"])({ url: "/appproject/MaterielProject/getChildGoods", method: "post", data: e2 });
|
|
}
|
|
function u(e2) {
|
|
return Object(r["a"])({ url: "/appproject/materiel/delete", method: "post", data: e2 });
|
|
}
|
|
function m(e2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/operateIn", method: "post", data: e2 });
|
|
}
|
|
function p(e2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/pageList", method: "post", data: e2 });
|
|
}
|
|
function d(e2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/operateOut", method: "post", data: e2 });
|
|
}
|
|
function f(e2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/diffPageList", method: "post", data: e2 });
|
|
}
|
|
function h(e2) {
|
|
return Object(r["a"])({ url: "/appproject/category/treeList", method: "post", data: e2 });
|
|
}
|
|
function g(e2) {
|
|
return Object(r["a"])({ url: "/appproject/MaterielProject/queryMaterielTypeTree", method: "post", data: e2 });
|
|
}
|
|
function v(e2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/diffPageList", method: "post", data: e2 });
|
|
}
|
|
function b(e2) {
|
|
return Object(r["a"])({ url: "/appproject/materiel/differenceLog/taskOrderRelatedList", method: "post", data: e2 });
|
|
}
|
|
function y(e2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/exportExcel", method: "post", responseType: "blob", data: e2 });
|
|
}
|
|
function _(e2) {
|
|
return Object(r["a"])({ url: "/appproject/materiel/exportExcel", method: "post", responseType: "blob", data: e2 });
|
|
}
|
|
function w(e2, t2) {
|
|
return Object(r["a"])({ url: "/appproject/materiel/importExcel" + t2, method: "post", isReturnResponse: true, responseType: "blob", headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }, data: e2 });
|
|
}
|
|
function x(e2, t2) {
|
|
return Object(r["a"])({ url: "/appproject/inventoryRecord/importExcel" + t2, method: "post", isReturnResponse: true, responseType: "blob", headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }, data: e2 });
|
|
}
|
|
}, 6396: function(e, t, a) {
|
|
"use strict";
|
|
Math.easeInOutQuad = function(e2, t2, a2, r) {
|
|
return e2 /= r / 2, e2 < 1 ? a2 / 2 * e2 * e2 + t2 : (e2--, -a2 / 2 * (e2 * (e2 - 2) - 1) + t2);
|
|
};
|
|
(function() {
|
|
window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
|
})();
|
|
}, "8f43": function(e, t, a) {
|
|
}, "983b": function(e, t, a) {
|
|
"use strict";
|
|
a("8f43");
|
|
}, e46b: function(e, t, a) {
|
|
"use strict";
|
|
a("0909");
|
|
} }]);
|