1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e5bc488a","chunk-17ae1b0a"],{"0857":function(t,e,n){},"0d12":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.listToDetailsDialogFlag?n("el-dialog",{attrs:{title:"收费信息",visible:t.listToDetailsDialogFlag,width:"1000px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":t.cancel},on:{"update:visible":function(e){t.listToDetailsDialogFlag=e},close:t.cancel}},[n("div",{staticStyle:{"max-height":"65vh","overflow-y":"auto"}},t._l(t.listToDetails.listVO,(function(e,a){return n("div",{key:e.id},[n("h3",[t._v(" "+t._s(t.initToothPosition(e.toothPosition))+" "),1==t.collectCostPatientsType?n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:function(e){return t.doAdd(a)}}},[t._v("新建")]):t._e()],1),n("el-table",{attrs:{data:e.collectCostDetailsVOList}},[n("el-table-column",{attrs:{label:"项目编号","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.projectCode||"-"))])]}}],null,!0)}),n("el-table-column",{attrs:{label:"项目名称","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.projectName||"-"))])]}}],null,!0)}),n("el-table-column",{attrs:{label:"单价","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.unitPrice||"-"))])]}}],null,!0)}),n("el-table-column",{attrs:{label:"优惠价格","show-overflow-tooltip":"",width:"250",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input-number",{attrs:{size:"mini",disabled:1!=t.collectCostPatientsType},on:{input:function(n){return t.inputVal(a,e.$index,e.row.preferentialPrice)}},model:{value:e.row.preferentialPrice,callback:function(n){t.$set(e.row,"preferentialPrice",t._n(n))},expression:"scope.row.preferentialPrice"}})]}}],null,!0)}),n("el-table-column",{attrs:{label:"单位","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.unit||"-"))])]}}],null,!0)}),n("el-table-column",{attrs:{label:"数量","show-overflow-tooltip":"",width:"250",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input-number",{attrs:{disabled:1!=t.collectCostPatientsType,size:"mini",min:1},on:{change:function(n){return t.changeVal(a,e.$index,e.row.total)}},model:{value:e.row.total,callback:function(n){t.$set(e.row,"total",n)},expression:"scope.row.total"}})]}}],null,!0)}),1==t.collectCostPatientsType?n("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("i",{staticClass:"el-icon-delete",staticStyle:{cursor:"pointer",color:"red"},on:{click:function(n){return t.doDel(a,e.$index)}}})]}}],null,!0)}):t._e()],1)],1)})),0),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("span",{staticStyle:{"margin-left":"10px"}},[t._v("原价:"+t._s(t.receivableCost)+" (元)")]),n("span",{staticStyle:{"margin-left":"10px"}},[t._v("应付价格:"+t._s(t.preferentialPrice)+" (元)")]),1!=t.collectCostPatientsType?n("span",{staticStyle:{"margin-left":"20px",display:"flex","align-items":"center"}},[t._v(" 实收: "),n("el-input",{staticStyle:{width:"200px"},attrs:{disabled:2!=t.collectCostPatientsType},model:{value:t.listToDetails.netReceiptsCost,callback:function(e){t.$set(t.listToDetails,"netReceiptsCost",e)},expression:"listToDetails.netReceiptsCost"}}),t._v(" (元) ")],1):t._e()]),3!=t.collectCostPatientsType?n("el-button",{on:{click:t.cancel}},[t._v("取 消")]):t._e(),3!=t.collectCostPatientsType?n("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")]):t._e()],1)]):t._e(),n("addTemplateDialog",{ref:"addTemplateDialogRef",on:{tableDataDown:t.tableDataDown}})],1)},l=[],i=n("5530"),s=n("2909"),o=n("c7eb"),r=n("1da1"),c=(n("99af"),n("14d9"),n("13d5"),n("a434"),n("e9c4"),n("a9e3"),n("b680"),n("b64b"),n("d3b7"),n("159b"),n("943d")),u=n("46f9"),f=n("ec5e"),d={name:"EitcErmPcListToDetailsDialog",props:{listToDetailsDialogFlag:{type:Boolean},collectCostPatientsId:{type:String},collectCostPatientsType:{type:Number}},components:{addTemplateDialog:f["default"]},mixins:[u["a"]],data:function(){return{listToDetails:{},toothPositionIndex:""}},watch:{collectCostPatientsId:function(t){t&&this.initList()}},computed:{receivableCost:function(){if(Array.isArray(this.listToDetails.listVO)&&this.listToDetails.listVO.length){var t=0;return this.listToDetails.listVO.forEach((function(e){var n=[];e.collectCostDetailsVOList.forEach((function(t){n.push(+t.unitPrice*t.total)})),t+=n.reduce((function(t,e){return t+e}),0)})),t.toFixed(2)}return 0},preferentialPrice:function(){if(Array.isArray(this.listToDetails.listVO)&&this.listToDetails.listVO.length){var t=0;return this.listToDetails.listVO.forEach((function(e){var n=[];e.collectCostDetailsVOList.forEach((function(t){n.push(+t.preferentialPrice*t.total)})),t+=n.reduce((function(t,e){return t+e}),0)})),this.listToDetails.netReceiptsCost=t,t.toFixed(2)}return 0}},mounted:function(){},methods:{initList:function(){var t=this;return Object(r["a"])(Object(o["a"])().mark((function e(){var n;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["sb"])({collectCostPatientsId:t.collectCostPatientsId});case 2:n=e.sent,t.listToDetails=n.data,t.$forceUpdate();case 5:case"end":return e.stop()}}),e)})))()},cancel:function(){this.$emit("cancelAll","6")},doDel:function(t,e){this.listToDetails.listVO[t].collectCostDetailsVOList.splice(e,1)},doAdd:function(t){this.toothPositionIndex=t,this.$refs.addTemplateDialogRef.addTemplateDialogVisible=!0,this.$refs.addTemplateDialogRef.initcollectCostTypeList(),this.$refs.addTemplateDialogRef.initList()},tableDataDown:function(t){this.listToDetails.listVO[this.toothPositionIndex].collectCostDetailsVOList=JSON.parse(JSON.stringify([].concat(Object(s["a"])(this.listToDetails.listVO[this.toothPositionIndex].collectCostDetailsVOList),Object(s["a"])(t))))},inputVal:function(t,e,n){this.$set(this.listToDetails.listVO[t].preferentialPrice,e,Object(i["a"])(Object(i["a"])({},this.listToDetails.listVO[t]),{},{preferentialPrice:+n}))},changeVal:function(t,e,n){this.$set(this.listToDetails.listVO[t],e,Object(i["a"])(Object(i["a"])({},this.listToDetails.listVO[t]),{},{total:+n}))},submit:function(){var t=this;return Object(r["a"])(Object(o["a"])().mark((function e(){var n,a;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(1!=t.collectCostPatientsType){e.next=9;break}return e.next=3,Object(c["x"])(t.listToDetails);case 3:if(n=e.sent,200===n.code){e.next=6;break}return e.abrupt("return",t.$message.error(n.msg));case 6:t.$message.success("划价成功"),e.next=15;break;case 9:return e.next=11,Object(c["r"])({id:t.collectCostPatientsId,netReceiptsCost:t.listToDetails.netReceiptsCost});case 11:if(a=e.sent,200===a.code){e.next=14;break}return e.abrupt("return",t.$message.error(a.msg));case 14:t.$message.success("收费成功");case 15:t.cancel();case 16:case"end":return e.stop()}}),e)})))()}}},p=d,h=n("2877"),b=Object(h["a"])(p,a,l,!1,null,null,null);e["default"]=b.exports},"46f9":function(t,e,n){"use strict";e["a"]={data:function(){return{}},methods:{initPatientSource:function(t){switch(t){case 1:return"朋友介绍";case 2:return"自进门店";default:return""}},initBloodGroup:function(t){switch(t){case 1:return"A型血";case 2:return"B型血";case 3:return"O型血";case 4:return"AB型血";case 5:return"RH型血";default:return""}},initSex:function(t){switch(t){case 1:return"男";case 2:return"女";default:return""}},initMarriage:function(t){switch(t){case 1:return"未婚";case 2:return"已婚";case 3:return"丧偶";case 4:return"离婚";default:return""}},initPatientType:function(t){switch(t){case 1:return"临时";case 2:return"普通";default:return""}},initPppointmentStatus:function(t){switch(t){case 1:return"预约";case 2:return"已确定";case 3:return"已到店";case 4:return"待复诊";case 5:return"治疗完成";case 6:return"已结账";case 7:return"已离开";case 8:return"已失约";default:return""}},initToothPosition:function(t){switch(t){case"upLeft1":return"21";case"upLeft2":return"22";case"upLeft3":return"23";case"upLeft4":return"24";case"upLeft5":return"25";case"upLeft6":return"26";case"upLeft7":return"27";case"upLeft8":return"28";case"upRight1":return"11";case"upRight2":return"12";case"upRight3":return"13";case"upRight4":return"14";case"upRight5":return"15";case"upRight6":return"16";case"upRight7":return"17";case"upRight8":return"18";case"downLeft1":return"41";case"downLeft2":return"42";case"downLeft3":return"43";case"downLeft4":return"44";case"downLeft5":return"45";case"downLeft6":return"46";case"downLeft7":return"47";case"downLeft8":return"48";case"downRight1":return"31";case"downRight2":return"32";case"downRight3":return"33";case"downRight4":return"34";case"downRight5":return"35";case"downRight6":return"36";case"downRight7":return"37";case"downRight8":return"38";default:return"-"}},initBgc:function(t){switch(t){case 1:return"#649aff";case 2:return"#00f900";case 3:return"#b6d8b3";case 4:return"#fdc86a";case 5:return"#74a863";case 6:return"#ff8683";case 7:return"#8a8385";case 8:return"#c7c7c7";default:}}}}},ba7b:function(t,e,n){"use strict";n("0857")},ec5e:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.addTemplateDialogVisible?n("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}},[n("div",{staticStyle:{height:"65vh",overflow:"auto"}},[n("el-row",{staticStyle:{margin:"0",height:"100%"},attrs:{gutter:20}},[n("el-col",{attrs:{span:4,xs:24}},[n("div",{staticClass:"head-container",staticStyle:{"max-height":"calc(100vh - 160px)","overflow-y":"auto"}},[n("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 a=e.node;e.data;return n("span",{staticClass:"custom-tree-node"},[n("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:a.label,placement:"top-start","open-delay":500}},[n("span",[t._v(" "+t._s(a.label)+" ")])])],1)}}],null,!1,1416256344)})],1)]),n("el-col",{staticStyle:{height:"100%"},attrs:{span:20,xs:24}},[n("el-table",{staticStyle:{width:"100%",height:"45%",overflow:"auto","margin-bottom":"10px"},attrs:{height:"calc(45% - 45px)",data:t.tableData}},[n("el-table-column",{attrs:{label:"项目编号","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.projectCode||"-"))])]}}],null,!1,2786882419)}),n("el-table-column",{attrs:{label:"项目名称","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.projectName||"-"))])]}}],null,!1,3307174009)}),n("el-table-column",{attrs:{label:"单价","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.unitPrice||"-"))])]}}],null,!1,138632224)}),n("el-table-column",{attrs:{label:"单位","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.unit||"-"))])]}}],null,!1,2417366221)}),n("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{cursor:"pointer"},on:{click:function(n){return t.doAdd(e.row)}}})]}}],null,!1,3988627251)})],1),n("h3",[t._v("已选择的项目")]),n("el-table",{staticStyle:{width:"100%",height:"45%",overflow:"auto"},attrs:{height:"calc(45% - 45px)",data:t.tableDataDown}},[n("el-table-column",{attrs:{label:"项目编号","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.projectCode||"-"))])]}}],null,!1,2786882419)}),n("el-table-column",{attrs:{label:"项目名称","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.projectName||"-"))])]}}],null,!1,3307174009)}),n("el-table-column",{attrs:{label:"单价","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.unitPrice||"-"))])]}}],null,!1,138632224)}),n("el-table-column",{attrs:{label:"优惠价格","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[n("el-input",{on:{input:function(n){return t.inputVal(e.$index,e.row.preferentialPrice)}},model:{value:e.row.preferentialPrice,callback:function(n){t.$set(e.row,"preferentialPrice",n)},expression:"scope.row.preferentialPrice"}})],1)]}}],null,!1,2889499819)}),n("el-table-column",{attrs:{label:"单位","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.row.unit||"-"))])]}}],null,!1,2417366221)}),n("el-table-column",{attrs:{label:"数量",width:"250","show-overflow-tooltip":"",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-input-number",{attrs:{size:"mini",min:1},on:{change:function(n){return t.changeVal(e.$index,e.row.total)}},model:{value:e.row.total,callback:function(n){t.$set(e.row,"total",n)},expression:"scope.row.total"}})]}}],null,!1,414204674)}),n("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("i",{staticClass:"el-icon-delete",staticStyle:{cursor:"pointer",color:"red"},on:{click:function(n){return t.doDel(e.$index)}}})]}}],null,!1,2701437542)})],1)],1)],1)],1),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.cancel}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.submit}},[t._v("确 定")])],1)]):t._e()],1)},l=[],i=n("5530"),s=n("c7eb"),o=n("1da1"),r=(n("14d9"),n("a434"),n("e9c4"),n("b64b"),n("d3b7"),n("159b"),n("943d")),c={name:"EitcErmPcAddTemplateDialog",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(o["a"])(Object(s["a"])().mark((function e(){var n;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(n=e.sent,200===n.code){e.next=5;break}return e.abrupt("return",t.$message.error(n.msg));case 5:t.deptOptions=n.data;case 6:case"end":return e.stop()}}),e)})))()},initList:function(){var t=this;return Object(o["a"])(Object(s["a"])().mark((function e(){var n;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(n=e.sent,200===n.code){e.next=5;break}return e.abrupt("return",t.$message.error(n.msg));case 5:t.tableData=n.data,t.tableData.forEach((function(t){return t.preferentialPrice=t.unitPrice,t})),t.$forceUpdate();case 8:case"end":return e.stop()}}),e)})))()},handleNodeClick:function(t,e,n){this.listInIds=t.id,e&&this.$refs.tree.getCheckedNodes().length>1&&this.$refs.tree.setCheckedNodes([t]),this.initList()},inputVal:function(t,e){this.$set(this.tableDataDown,t,Object(i["a"])(Object(i["a"])({},this.tableDataDown[t]),{},{preferentialPrice:e}))},changeVal:function(t,e){this.$set(this.tableDataDown,t,Object(i["a"])(Object(i["a"])({},this.tableDataDown[t]),{},{total:e}))},doAdd:function(t){var e=t;e.total=1,this.tableDataDown.push(e),this.$forceUpdate()},doDel:function(t){this.tableDataDown.splice(t,1)},cancel:function(){this.addTemplateDialogVisible=!1,this.tableDataDown=[]},submit:function(){var t=this;return Object(o["a"])(Object(s["a"])().mark((function e(){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:t.$emit("tableDataDown",JSON.parse(JSON.stringify(t.tableDataDown))),t.cancel(),t.addTemplateDialogVisible=!1;case 5:case"end":return e.stop()}}),e)})))()}}},u=c,f=(n("ba7b"),n("2877")),d=Object(f["a"])(u,a,l,!1,null,"b89fe3f2",null);e["default"]=d.exports}}]);
|