chunk-d382e6f6.604c9f09.js 7.1 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d382e6f6"],{5913:function(t,e,a){"use strict";a.r(e);var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.addTemplateDialogVisible?a("el-dialog",{attrs:{title:"新建",visible:t.addTemplateDialogVisible,width:"1200px","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(e){t.addTemplateDialogVisible=e},close:t.cancel}},[a("div",{staticStyle:{height:"65vh",overflow:"auto"}},[a("el-row",{staticStyle:{margin:"0",height:"100%"},attrs:{gutter:20}},[a("el-col",{attrs:{span:4,xs:24}},[a("div",{staticClass:"head-container",staticStyle:{"max-height":"calc(100vh - 160px)","overflow-y":"auto"}},[a("el-tree",{ref:"tree",attrs:{data:t.deptOptions,props:t.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:t.handleNodeClick},scopedSlots:t._u([{key:"default",fn:function(e){var l=e.node;e.data;return a("span",{staticClass:"custom-tree-node"},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:l.label,placement:"top-start","open-delay":500}},[a("span",[t._v(" "+t._s(l.label)+" ")])])],1)}}],null,!1,1416256344)})],1)]),a("el-col",{staticStyle:{height:"100%"},attrs:{span:20,xs:24}},[a("el-table",{staticStyle:{width:"100%",height:"45%",overflow:"auto","margin-bottom":"10px"},attrs:{height:"calc(45% - 45px)",data:t.tableData}},[a("el-table-column",{attrs:{label:"项目编号","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.projectCode||"-"))])]}}],null,!1,2786882419)}),a("el-table-column",{attrs:{label:"项目名称","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.projectName||"-"))])]}}],null,!1,3307174009)}),a("el-table-column",{attrs:{label:"单价","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.unitPrice||"-"))])]}}],null,!1,138632224)}),a("el-table-column",{attrs:{label:"单位","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.unit||"-"))])]}}],null,!1,2417366221)}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{cursor:"pointer"},on:{click:function(a){return t.doAdd(e.row)}}})]}}],null,!1,3988627251)})],1),a("h3",[t._v("已选择的项目")]),a("el-table",{staticStyle:{width:"100%",height:"45%",overflow:"auto"},attrs:{height:"calc(45% - 45px)",data:t.tableDataDown}},[a("el-table-column",{attrs:{label:"项目编号","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.projectCode||"-"))])]}}],null,!1,2786882419)}),a("el-table-column",{attrs:{label:"项目名称","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.projectName||"-"))])]}}],null,!1,3307174009)}),a("el-table-column",{attrs:{label:"单价","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.unitPrice||"-"))])]}}],null,!1,138632224)}),a("el-table-column",{attrs:{label:"单位","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.unit||"-"))])]}}],null,!1,2417366221)}),a("el-table-column",{attrs:{label:"数量","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input-number",{attrs:{size:"mini",min:1},on:{change:function(a){return t.changeVal(e.$index,e.row.total)}},model:{value:e.row.total,callback:function(a){t.$set(e.row,"total",a)},expression:"scope.row.total"}})]}}],null,!1,414204674)}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-delete",staticStyle:{cursor:"pointer",color:"red"},on:{click:function(a){return t.doDel(e.$index)}}})]}}],null,!1,2701437542)})],1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:t.cancel}},[t._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)]):t._e()],1)},n=[],o=a("5530"),s=a("c7eb"),i=a("1da1"),r=(a("14d9"),a("a434"),a("943d")),c={name:"EitcErmPcAddTemplateDialog",props:{listInId:{type:String,default:""}},data:function(){return{addTemplateDialogVisible:!1,tableData:[],deptOptions:[],defaultProps:{children:"childrenList",label:"costTypeName"},listInIds:"",dialogVisible:!1,tableDataDown:[]}},watch:{listInId:function(t){t&&(this.initcollectCostTypeList(),this.initList())}},mounted:function(){this.initcollectCostTypeList(),this.initList()},methods:{initcollectCostTypeList:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(r["A"])();case 2:if(a=e.sent,200===a.code){e.next=5;break}return e.abrupt("return",t.$message.error(a.msg));case 5:t.deptOptions=a.data;case 6:case"end":return e.stop()}}),e)})))()},initList:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var a;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(r["t"])({collectCostTypeId:t.listInIds});case 2:if(a=e.sent,200===a.code){e.next=5;break}return e.abrupt("return",t.$message.error(a.msg));case 5:t.tableData=a.data;case 6:case"end":return e.stop()}}),e)})))()},changeVal:function(t,e){this.$set(this.tableDataDown,t,Object(o["a"])(Object(o["a"])({},this.tableDataDown[t]),{},{total:e}))},handleNodeClick:function(t,e,a){this.listInIds=t.id,e&&this.$refs.tree.getCheckedNodes().length>1&&this.$refs.tree.setCheckedNodes([t]),this.initList()},doAdd:function(t){var e=t;e.total=1,this.tableDataDown.push(e)},doDel:function(t){this.tableDataDown.splice(t,1)},cancel:function(){this.addTemplateDialogVisible=!1,this.tableDataDown=[],this.initSysUserSexerm_diagnosis_type_template_name()},submit:function(){var t=this;return Object(i["a"])(Object(s["a"])().mark((function e(){var a,l;return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(0!==t.tableDataDown.length){e.next=2;break}return e.abrupt("return",t.$message.error("请选择项目"));case 2:return a={diagnosisTypeId:t.listInId,collectCostDetailsVOList:t.tableDataDown},e.next=5,Object(r["L"])(a);case 5:if(l=e.sent,200===l.code){e.next=8;break}return e.abrupt("return",t.$message.error(l.msg));case 8:t.$message.success("新建成功!"),t.$parent.initList(),t.cancel(),t.addTemplateDialogVisible=!1;case 12:case"end":return e.stop()}}),e)})))()}}},u=c,d=(a("88ed"),a("2877")),p=Object(d["a"])(u,l,n,!1,null,"5d1d4e8c",null);e["default"]=p.exports},7459:function(t,e,a){},"88ed":function(t,e,a){"use strict";a("7459")}}]);