chunk-63e6f24b.d9261af1.js 16 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-63e6f24b","chunk-038964bb"],{"1c00":function(e,t,r){"use strict";r("e3c6")},a0b0:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[e.addProtocolTypeDialog?r("el-dialog",{attrs:{title:e.addProtocolTypeTitle,visible:e.addProtocolTypeDialog,width:"700px","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.addProtocolTypeDialog=t},close:e.cancel}},[r("el-form",{ref:"ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"120px","label-position":"right"}},[r("el-form-item",{attrs:{label:"所属目录:"}},[e._v(" "+e._s(e.treeName)+" ")]),r("el-form-item",{attrs:{label:"项目编号:",prop:"projectCode"}},[r("el-input",{staticStyle:{width:"450px"},attrs:{placeholder:"请输入项目编号"},model:{value:e.ruleForm.projectCode,callback:function(t){e.$set(e.ruleForm,"projectCode",t)},expression:"ruleForm.projectCode"}})],1),r("el-form-item",{attrs:{label:"项目名称:",prop:"projectName"}},[r("el-input",{staticStyle:{width:"450px"},attrs:{placeholder:"请输入项目名称"},model:{value:e.ruleForm.projectName,callback:function(t){e.$set(e.ruleForm,"projectName",t)},expression:"ruleForm.projectName"}})],1),r("el-form-item",{attrs:{label:"单价:",prop:"unitPrice"}},[r("el-input",{staticClass:"content",staticStyle:{width:"450px"},attrs:{placeholder:"请输入单价"},on:{input:function(t){e.ruleForm.unitPrice=e.ruleForm.unitPrice.replace(/[^0-9.]/g,"")}},model:{value:e.ruleForm.unitPrice,callback:function(t){e.$set(e.ruleForm,"unitPrice",t)},expression:"ruleForm.unitPrice"}})],1),r("el-form-item",{attrs:{label:"单位:",prop:"unit"}},[r("el-select",{staticStyle:{width:"450px"},attrs:{placeholder:"请选择单位"},model:{value:e.ruleForm.unit,callback:function(t){e.$set(e.ruleForm,"unit",t)},expression:"ruleForm.unit"}},e._l(e.unitOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.dictName,value:e.dictValue}})})),1)],1),r("el-form-item",{attrs:{label:"排序:",prop:"orderNum",placeholder:"项目编号"}},[r("el-input-number",{attrs:{min:0,placeholder:"请输入排序"},model:{value:e.ruleForm.orderNum,callback:function(t){e.$set(e.ruleForm,"orderNum",t)},expression:"ruleForm.orderNum"}})],1),r("el-form-item",{attrs:{label:"状态:",prop:"status"}},[r("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},model:{value:e.ruleForm.status,callback:function(t){e.$set(e.ruleForm,"status",t)},expression:"ruleForm.status"}})],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.cancel}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1):e._e()],1)},o=[],s=r("c7eb"),n=r("1da1"),i=r("943d"),l={name:"AddProtocolTypeDialog",props:{listInId:{type:String,default:""},treeName:{type:String,default:""},editTable:{type:Object,default:{}},addProtocolTypeTitle:{type:String,default:""}},watch:{editTable:function(e){this.ruleForm=e}},data:function(){return{addProtocolTypeDialog:!1,diagnosisTypeTemplateList:[],ruleForm:{protocolTemplateName:"",status:1,protocolTemplateContent:""},unitOptions:[],rules:{projectCode:[{required:!0,message:"请输入项目编号",trigger:"blur"}],projectName:[{required:!0,message:"请输入项目名称",trigger:"blur"}],unitPrice:[{required:!0,message:"请输入单价",trigger:"blur"}],unit:[{required:!0,message:"请选择单位",trigger:"change"}],orderNum:[{required:!0,message:"请输入排序",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"change"}]}}},mounted:function(){var e=this;this.initSysUserSexerm_unit_settings(),this.$nextTick((function(){console.log(e.ruleForm,"this.ruleForm"),e.ruleForm=e.editTable}))},methods:{cancel:function(){this.addProtocolTypeDialog=!1},initSysUserSexerm_unit_settings:function(){var e=this;return Object(n["a"])(Object(s["a"])().mark((function t(){var r;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["k"])("erm_unit_settings");case 2:r=t.sent,e.unitOptions=r.data;case 4:case"end":return t.stop()}}),t)})))()},submit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(n["a"])(Object(s["a"])().mark((function t(r){var a,o;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=24;break}if("新建"!==e.addProtocolTypeTitle){t.next=12;break}return e.ruleForm.collectCostTypeId=e.listInId,t.next=5,Object(i["s"])(e.ruleForm);case 5:if(a=t.sent,200===a.code){t.next=8;break}return t.abrupt("return",e.$message.error(a.msg));case 8:e.ruleForm={projectCode:"",projectName:"",unitPrice:"",unit:"",orderNum:"",status:1},e.$message.success("新建成功!"),t.next=20;break;case 12:return e.ruleForm.collectCostTypeId=e.listInId,t.next=15,Object(i["w"])(e.ruleForm);case 15:if(o=t.sent,200===o.code){t.next=18;break}return t.abrupt("return",e.$message.error(o.msg));case 18:e.ruleForm={projectCode:"",projectName:"",unitPrice:"",unit:"",orderNum:"",status:1},e.$message.success("编辑成功!");case 20:e.$parent.initList(),e.addProtocolTypeDialog=!1,t.next=26;break;case 24:return console.log("error submit!!"),t.abrupt("return",!1);case 26:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},c=l,u=(r("1c00"),r("2877")),d=Object(u["a"])(c,a,o,!1,null,"03d8c47b",null);t["default"]=d.exports},e3c6:function(e,t,r){},e716:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:4,xs:24}},[r("div",{staticClass:"head-container"},[r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"新建","open-delay":500,placement:"top-start"}},[r("el-button",{attrs:{icon:"el-icon-circle-plus-outline",circle:"",size:"mini"},on:{click:e.add}})],1),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"编辑","open-delay":500,placement:"top-start"}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-edit",circle:"",size:"mini"},on:{click:e.edit}})],1),r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除","open-delay":500,placement:"top-start"}},[r("el-button",{attrs:{type:"danger",icon:"el-icon-delete",circle:"",size:"mini"},on:{click:e.del}})],1)],1)],1),r("div",{staticClass:"head-container",staticStyle:{"max-height":"calc(100vh - 160px)","overflow-y":"auto"}},[r("el-tree",{ref:"tree",attrs:{data:e.deptOptions,props:e.defaultProps,"check-on-click-node":!0,"expand-on-click-node":!1,"show-checkbox":"","node-key":"id","default-expand-all":"","highlight-current":"","check-strictly":!0},on:{check:e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.node;t.data;return r("span",{staticClass:"custom-tree-node"},[r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:a.label,placement:"top-start","open-delay":500}},[r("span",[e._v(" "+e._s(a.label)+" ")])])],1)}}])})],1)]),r("el-col",{attrs:{span:20,xs:24}},[r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.addAdd}},[e._v("新建")])],1)],1),r("el-table",{staticStyle:{width:"100%",height:"calc(100%-80vh)"},attrs:{data:e.tableData}},[r("el-table-column",{attrs:{label:"项目编号","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.projectCode||"-"))])]}}])}),r("el-table-column",{attrs:{label:"项目名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.projectName||"-"))])]}}])}),r("el-table-column",{attrs:{label:"单价","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.unitPrice||"-"))])]}}])}),r("el-table-column",{attrs:{label:"单位","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.unit||"-"))])]}}])}),r("el-table-column",{attrs:{label:"排序","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(t.row.orderNum||"-"))])]}}])}),r("el-table-column",{attrs:{label:"状态","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-color":"#13ce66","inactive-color":"#ff4949"},on:{change:function(r){return e.deactivate(t.row)}},model:{value:t.row.status,callback:function(r){e.$set(t.row,"status",r)},expression:"scope.row.status"}})]}}])}),r("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(r){return e.editTableData(t.row)}}},[e._v(" 编辑 ")]),r("el-button",{staticStyle:{color:"red"},attrs:{type:"text",size:"mini"},on:{click:function(r){return e.delTableData(t.row)}}},[e._v(" 删除 ")])]}}])})],1)],1)],1),r("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"30%","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"},nativeOn:{submit:function(e){e.preventDefault()}}},[r("el-form-item",{attrs:{label:"收费类型:",prop:"costTypeName"}},[r("el-input",{attrs:{placeholder:"请输入收费类型"},model:{value:e.ruleForm.costTypeName,callback:function(t){e.$set(e.ruleForm,"costTypeName",t)},expression:"ruleForm.costTypeName"}})],1)],1),r("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{on:{click:e.closeDialog}},[e._v("取 消")]),r("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1),r("addProtocolTypeDialog",{ref:"addTemplateDialogRef",attrs:{addProtocolTypeTitle:e.addProtocolTypeTitle,editTable:e.editTable,listInId:e.listInId,treeName:e.treeName}})],1)},o=[],s=r("c7eb"),n=r("1da1"),i=r("943d"),l=r("a0b0"),c={name:"EitcErmPcIndex",components:{addProtocolTypeDialog:l["default"]},data:function(){return{tableData:[],deptOptions:[],defaultProps:{children:"childrenList",label:"costTypeName"},ruleForm:{costTypeName:""},editTable:{},treeName:"",rules:{costTypeName:[{required:!0,message:"请输入收费类型",trigger:"blur"}]},lookFlag:!1,listInId:"",dialogVisible:!1,title:"",addProtocolTypeTitle:"",total:0}},mounted:function(){this.initcollectCostTypeList()},methods:{editTableData:function(e){var t=this;return Object(n["a"])(Object(s["a"])().mark((function r(){var a;return Object(s["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return t.editTable=e,t.addProtocolTypeTitle="编辑",r.next=4,Object(i["z"])({id:t.listInId});case 4:if(a=r.sent,200===a.code){r.next=7;break}return r.abrupt("return",t.$message.error(a.msg));case 7:t.treeName=a.data,t.$refs.addTemplateDialogRef.addProtocolTypeDialog=!0;case 9:case"end":return r.stop()}}),r)})))()},deactivate:function(e){var t=this;return Object(n["a"])(Object(s["a"])().mark((function r(){var a;return Object(s["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["w"])(e);case 2:if(a=r.sent,200===a.code){r.next=5;break}return r.abrupt("return",t.$message.error(a.msg));case 5:t.$message.success("编辑成功!"),t.initList();case 7:case"end":return r.stop()}}),r)})))()},delTableData:function(e){var t=this;this.$confirm("此操作将永久删除该项, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(Object(s["a"])().mark((function r(){var a;return Object(s["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(i["v"])(e.id);case 2:if(a=r.sent,200===a.code){r.next=5;break}return r.abrupt("return",t.$message.error(a.msg));case 5:t.initList(),t.$message({type:"success",message:"删除成功!"});case 7:case"end":return r.stop()}}),r)})))).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},initcollectCostTypeList:function(){var e=this;return Object(n["a"])(Object(s["a"])().mark((function t(){var r;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["A"])();case 2:if(r=t.sent,200===r.code){t.next=5;break}return t.abrupt("return",e.$message.error(r.msg));case 5:e.deptOptions=r.data,r.data.length&&(e.listInId=e.deptOptions[0].id,e.initList());case 7:case"end":return t.stop()}}),t)})))()},initList:function(){var e=this;return Object(n["a"])(Object(s["a"])().mark((function t(){var r;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["u"])({collectCostTypeId:e.listInId});case 2:if(r=t.sent,200===r.code){t.next=5;break}return t.abrupt("return",e.$message.error(r.msg));case 5:e.tableData=r.rows,e.total=r.total;case 7:case"end":return t.stop()}}),t)})))()},closeDialog:function(){var e;this.ruleForm.costTypeName="",null===(e=this.$refs.ruleForm)||void 0===e||e.resetFields(),this.dialogVisible=!1,this.initList()},submit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(n["a"])(Object(s["a"])().mark((function t(r){var a,o;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!r){t.next=19;break}if("新建"!==e.title){t.next=9;break}return t.next=4,Object(i["y"])({costTypeName:e.ruleForm.costTypeName,parentId:e.$refs.tree.getCheckedNodes().length>0?e.$refs.tree.getCheckedNodes()[0].id:0});case 4:if(a=t.sent,200===a.code){t.next=7;break}return t.abrupt("return",e.$message.error(a.msg));case 7:t.next=14;break;case 9:return t.next=11,Object(i["C"])({costTypeName:e.ruleForm.costTypeName,id:e.$refs.tree.getCheckedNodes().length>0?e.$refs.tree.getCheckedNodes()[0].id:0});case 11:if(o=t.sent,200===o.code){t.next=14;break}return t.abrupt("return",e.$message.error(o.msg));case 14:e.$message.success("".concat(e.title,"成功!")),e.initcollectCostTypeList(),e.closeDialog(),t.next=21;break;case 19:return console.log("error submit!!"),t.abrupt("return",!1);case 21:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},handleNodeClick:function(e,t,r){this.listInId=e.id,t&&this.$refs.tree.getCheckedNodes().length>1&&this.$refs.tree.setCheckedNodes([e]),this.initList()},addAdd:function(){var e=this;return Object(n["a"])(Object(s["a"])().mark((function t(){var r;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.listInId){t.next=2;break}return t.abrupt("return",e.$message.info("请先选择模版类型!"));case 2:return e.editTable={protocolTemplateName:"",status:1,protocolTemplateContent:""},e.addProtocolTypeTitle="新建",t.next=6,Object(i["z"])({id:e.listInId});case 6:if(r=t.sent,200===r.code){t.next=9;break}return t.abrupt("return",e.$message.error(r.msg));case 9:e.treeName=r.data,e.$refs.addTemplateDialogRef.addProtocolTypeDialog=!0;case 11:case"end":return t.stop()}}),t)})))()},add:function(){this.title="新建",this.ruleForm.costTypeName="",this.dialogVisible=!0},edit:function(){if(!this.$refs.tree.getCheckedNodes().length)return this.$message.info("请选择需要编辑的选项");this.title="编辑",this.dialogVisible=!0,this.ruleForm.costTypeName=this.$refs.tree.getCheckedNodes()[0].costTypeName},del:function(){var e=this;if(!this.$refs.tree.getCheckedNodes().length)return this.$message.info("请选择需要删除的选项");this.$confirm("此操作将永久删除该项, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(n["a"])(Object(s["a"])().mark((function t(){var r;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.ids=e.$refs.tree.getCheckedNodes()[0].id,t.next=3,Object(i["B"])({ids:e.ids});case 3:if(r=t.sent,200===r.code){t.next=6;break}return t.abrupt("return",e.$message.error(r.msg));case 6:e.$message.success("删除成功!"),e.initcollectCostTypeList();case 8:case"end":return t.stop()}}),t)})))).catch((function(){}))}}},u=c,d=r("2877"),p=Object(d["a"])(u,a,o,!1,null,null,null);t["default"]=p.exports}}]);