WangHan
2025-04-03 a1b85ef72062ca80db35546e4216dd564f3e0f57
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1eea7300"],{"433d":function(t,e,r){"use strict";var a=r("c559"),n={ftpUrl:a["a"].ftpUrl,apiBaseURL:a["a"].apiBaseURL};e["a"]=n},4791:function(t,e,r){"use strict";r.r(e);var a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win-sm",{attrs:{title:t.setting.title,width:"800px"},on:{close:t.close}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"编号",prop:"code"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.code,callback:function(e){t.$set(t.formData,"code",e)},expression:"formData.code"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"机构名称",prop:"name"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-radio-group",{model:{value:t.formData.status,callback:function(e){t.$set(t.formData,"status",e)},expression:"formData.status"}},[r("el-radio",{attrs:{label:1,border:""}},[t._v("启用")]),t._v(" "),r("el-radio",{attrs:{label:0,border:""}},[t._v("禁用")])],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"备注",prop:"summary"}},[r("el-input",{attrs:{type:"textarea",rows:3,maxlength:"100","show-word-limit":""},model:{value:t.formData.summary,callback:function(e){t.$set(t.formData,"summary",e)},expression:"formData.summary"}})],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},n=[],o=r("e694"),s=r("f6e8"),u=r("6ec5"),c={components:{winSm:o["a"],myButton:s["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{checkAll:!1,checkedList:[],formData:{code:"",name:"",status:1,summary:"",parentId:""},rules:{code:[{required:!0,message:"请输入机构编号",trigger:"blur"}],name:[{required:!0,message:"请输入机构名称",trigger:"blur"}]}}},created:function(){this.setting.info&&(this.formData=Object.assign({},JSON.parse(this.setting.info)))},methods:{getEditInfo:function(t){},close:function(){this.$emit("close")},toNumber:function(t){var e=parseInt(t);return isNaN(e)?"0":e},save:function(){var t=this,e=this.formData.code,r=this.toNumber(e);console.log("拿到的code  "+e),console.log("拿到返回的的code  "+r),"0"!==this.toNumber(e)&&r==e?e.startsWith("0")?this.$message.error("编号必须为数字且不以0开头"):this.$refs.ruleForm.validate((function(e){if(e){var r=Object.assign({},t.formData);t.setting.id?u["i"](r).then((function(e){e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})):(r.parentId=t.setting.orgId,u["b"](r).then((function(e){e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})))}else t.$message.error("校验未通过,请检查。")})):this.$message.error("编号必须为数字且不以0开头")}}},i=c,l=r("2877"),d=Object(l["a"])(i,a,n,!1,null,null,null);e["default"]=d.exports},"6ec5":function(t,e,r){"use strict";r.d(e,"l",(function(){return o})),r.d(e,"a",(function(){return s})),r.d(e,"g",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"j",(function(){return i})),r.d(e,"f",(function(){return l})),r.d(e,"d",(function(){return d})),r.d(e,"e",(function(){return m})),r.d(e,"p",(function(){return f})),r.d(e,"n",(function(){return p})),r.d(e,"m",(function(){return b})),r.d(e,"k",(function(){return h})),r.d(e,"s",(function(){return g})),r.d(e,"r",(function(){return w})),r.d(e,"q",(function(){return y})),r.d(e,"o",(function(){return v})),r.d(e,"b",(function(){return j})),r.d(e,"i",(function(){return O})),r.d(e,"h",(function(){return D}));var a=r("b775"),n=r("433d");function o(t){return a["a"].get(n["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function s(t){return Object(a["a"])({url:"/pc/base/category/add",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function d(){return Object(a["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function m(t){return Object(a["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function f(t){return Object(a["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function p(t){return Object(a["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function b(t){return Object(a["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function h(t){return a["a"].get(n["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function g(t){return Object(a["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function w(t){return Object(a["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function y(t){return Object(a["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function v(t){return Object(a["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function j(t){return Object(a["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function O(t){return Object(a["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function D(t){return Object(a["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}}}]);