1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22c700"],{f2db:function(t,e,a){"use strict";a.r(e);a("f4b3"),a("e9c4");var s=function(){var t=this,e=t._self._c;return t.collect.id?e("div",[e("van-nav-bar",{staticClass:"shadow",attrs:{title:"汇总详情","left-text":"返回","left-arrow":""},on:{"click-left":function(e){return t.$router.back(-1)}}}),e("div",{staticClass:"shadow bg-white px-5 pt-6 pb-10 leading-8"},[e("div",{staticClass:"flex flex-row"},[e("div",{staticClass:"flex-1"},[e("div",[t._v("门店: "+t._s(t.collect.shop_name))])])]),e("div",{staticClass:"flex flex-row"},[e("div",{staticClass:"flex-1"},[e("div",[t._v("进度: "+t._s(t.collectState[t.collect.state]))])]),e("div",{staticClass:"flex-1"},[e("div",[t._v("总金额: "+t._s(t.collect.total))])])]),e("div",{staticClass:"flex flex-row"},[e("div",{staticClass:"flex-1"},[e("div",[t._v(" 汇总时间: "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*t.collect.created_at)))+" ")])])]),e("div",{staticClass:"flex flex-row"},[e("div",{staticClass:"flex-1"},[e("div",[t._v("汇总人: "+t._s(t.collect.created_name))])]),e("div",{staticClass:"flex-1"},[e("div",[0==t.collect.type&&3==t.collect.state&&t.checkAuth(["final:verify:manager"])?e("van-button",{staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(3)}}},[t._v("店长审核")]):t._e(),0==t.collect.type&&4==t.collect.state&&t.checkAuth(["final:verify:finance"])?e("van-button",{staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(4)}}},[t._v("财务付款")]):t._e(),1==t.collect.type&&3==t.collect.state&&t.checkAuth(["final:verify:manager"])?e("van-button",{staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(4)}}},[t._v("店长审核")]):t._e(),1==t.collect.type&&4==t.collect.state&&t.checkAuth(["final:verify:finance"])?e("van-button",{staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(5)}}},[t._v("财务付款")]):t._e(),2==t.collect.type&&3==t.collect.state&&t.checkAuth(["final:verify:manager"])?e("van-button",{staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(3)}}},[t._v("店长审核")]):t._e(),2==t.collect.type&&4==t.collect.state&&t.checkAuth(["final:verify:finance"])?e("van-button",{staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(4)}}},[t._v("财务付款")]):t._e()],1)])])]),e("van-tabs",{staticClass:"shadow bg-white mt-5",attrs:{swipeable:"",sticky:""},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[0==t.collect.type?e("van-tab",{attrs:{title:"决算表"}},[e("van-cell-group",t._l(t.tables,(function(a,s){return e("van-cell",{key:s,attrs:{to:"/table/".concat(a.id)}},[[e("span",{staticClass:"block"},[t._v("金额: "+t._s(a.total))]),e("span",{staticClass:"block"},[t._v("预算:"+t._s(a.budget))])],e("template",{slot:"title"},[t._v(t._s(a.name))]),e("template",{slot:"label"},[e("span",[t._v(t._s(a.address)+" "+t._s(a.village)+" "+t._s(a.room_no))]),a.area?e("span",{staticClass:"text-gray-400"},[t._v(" "+t._s(a.area)+"㎡")]):t._e()])],2)})),1)],1):t._e(),1==t.collect.type?e("van-tab",{attrs:{title:"结算信息"}},[e("van-cell-group",t._l(t.tables,(function(a,s){return e("van-cell",{key:s,attrs:{to:"/settle/".concat(a.id)}},[[e("span",{staticClass:"block"},[t._v("金额: "+t._s(a.total))])],e("template",{slot:"title"},[e("span",[t._v(t._s(a.address)+" "+t._s(a.village)+" "+t._s(a.room_no))]),a.area?e("span",{staticClass:"text-gray-400"},[t._v(" "+t._s(a.area)+"㎡")]):t._e()]),e("template",{slot:"label"},[e("span",[t._v(t._s(a.manager_name)+" "+t._s(a.manager_phone))])])],2)})),1)],1):t._e(),2==t.collect.type?e("van-tab",{attrs:{title:"材料结算单"}},[e("van-cell-group",t._l(t.tables,(function(a,s){return e("van-cell",{key:s,attrs:{to:"/materialsettle/".concat(a.id)}},[[e("span",{staticClass:"block"},[t._v("合计金额: "+t._s(a.total))])],e("template",{slot:"title"},[t._v(t._s(a.supplier_name))]),e("template",{slot:"label"},[e("span",[t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.created_at))))])])],2)})),1)],1):t._e(),0!=t.processs.length?e("van-tab",{attrs:{title:"流程"}},[e("van-cell-group",t._l(t.processs,(function(a,s){return e("van-cell",{key:s},[e("div",{staticClass:"flex justify-between items-center"},[e("div",[e("van-image",{attrs:{round:"",width:"3rem",height:"3rem",src:a.created_headimgurl?a.created_headimgurl:"https://image.nczyzs.com/zhiyuan-logo.png"}}),e("div",{staticClass:"inline-block align-top px-2"},[e("div",{staticClass:"text-base"},[t._v(t._s(a.created_name))]),e("div",{staticClass:"text-sm text-gray-400"},[t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.created_at)))+" ")])])],1),e("div",{staticClass:"text-right"},[e("div",{staticClass:"text-gray-600"},[t._v(" "+t._s(1==t.collect.type?t.processType1[a.type]:t.processType[a.type])+" ")]),a.type?e("div",{staticClass:"text-sm text-gray-400"},[t._v(" "+t._s(t.processState[a.state])+" ")]):t._e()])]),e("div",{staticClass:"flex justify-between items-end"},[e("div",{staticClass:"text-base text-gray-600 flex-1",staticStyle:{"white-space":"pre-wrap"}},[t._v(" "+t._s(a.explain)+" ")])]),a.signature?e("van-image",{attrs:{width:"100",height:"100",src:a.signature},on:{click:function(e){return t.openImage([a.signature])}}}):t._e(),a.pictures?e("UploadList",{attrs:{value:t.jsonArray(a.pictures),edit:!1}}):t._e()],1)})),1)],1):t._e()],1),e("van-popup",{attrs:{closeable:"",round:"",position:"bottom"},model:{value:t.processShow,callback:function(e){t.processShow=e},expression:"processShow"}},[e("div",{staticClass:"mt-2 text-center leading-10 text-lg"},[t._v(" "+t._s(0==t.processForm.type?"提交":"审核")+" ")]),e("div",{staticClass:"px-10 py-5"},[e("div",{ref:"canvasBox",staticClass:"w-full h-72 border-2 border-black"},[e("canvas",{attrs:{id:"sign"}})])]),e("van-field",{attrs:{autosize:"",type:"textarea",placeholder:"请输入说明"},model:{value:t.processForm.explain,callback:function(e){t.$set(t.processForm,"explain",e)},expression:"processForm.explain"}}),e("UploadList",{attrs:{value:t.jsonArray(t.processForm.pictures)},on:{input:function(e){t.$set(t.processForm,"pictures",JSON.stringify(e))}}}),e("van-button",{attrs:{size:"large",type:"info"},on:{click:t.saveProcess}},[t._v("提交")])],1)],1):t._e()},i=[],l=a("ade3"),c=(a("4662"),a("28a2")),o=(a("46de"),a("a822")),n=(a("4ddd"),a("9f14")),r=(a("a44c"),a("e27c")),d=(a("4d48"),a("d1e1")),p=(a("81e6"),a("9ffb")),u=(a("e25e"),a("8a59")),v=a("5354"),m=a("6cd8"),h=a("a9f5"),f=a("90e2"),_={components:Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])(Object(l["a"])({UploadList:h["a"]},p["a"].name,p["a"]),d["a"].name,d["a"]),r["a"].name,r["a"]),n["a"].name,n["a"]),o["a"].name,o["a"]),c["a"].Component.name,c["a"].Component),data:function(){return{collect:{},collectState:{3:"待店长审核",4:"待财务付款",5:"已完成"},activeTab:0,tables:[],processs:[],processShow:!1,processForm:{},processState:{0:"通过",1:"驳回"},processType:{0:"提交",1:"工程队长审核",2:"财务审核",3:"店长审核",4:"财务付款"},processType1:{0:"提交",1:"客服回访",2:"项目经理确认",3:"财务审核",4:"店长审核",5:"财务付款"},signaturePad:null}},created:function(){this.$route.params&&this.$route.params.id&&(this.id=parseInt(this.$route.params.id)),this.loadFinalSiteCollect()},mounted:function(){},methods:{checkAuth:v["a"],dateFormat:m["a"],formatSecond:m["b"],jsonArray:m["c"],loadFinalSiteCollect:function(){var t=this;this.$store.commit("loading/showLoading"),Object(u["Z"])(this.id).then((function(e){t.collect=e.data,t.loadFinalSiteProcess(),t.loadFinalSiteItem()})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadFinalSiteItem:function(){var t=this;this.$store.commit("loading/showLoading"),(0==this.collect.type?u["P"]:2==this.collect.type?u["tb"]:u["M"])({collect_id:this.id}).then((function(e){t.tables=e.data.list,t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadFinalSiteProcess:function(){var t=this;this.$store.commit("loading/showLoading"),(0==this.collect.type?u["O"]:2==this.collect.type?u["rb"]:u["L"])({collect_id:this.id}).then((function(e){t.processs=e.data.list,t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))},process:function(t){var e=this;this.processForm={collect_id:this.id,type:t,state:0},this.processShow=!0,null==this.signaturePad?this.$nextTick((function(){var t=document.getElementById("sign");e.signaturePad=new f["a"](t,{penColor:"#000000"}),t.height=e.$refs.canvasBox.clientHeight,t.width=e.$refs.canvasBox.clientWidth})):this.signaturePad.clear()},saveProcess:function(){var t=this;this.$store.commit("loading/showLoading"),(0==this.collect.type?u["f"]:2==this.collect.type?u["sb"]:u["d"])(Object.assign({signature:this.signaturePad.isEmpty()?"":this.signaturePad.toDataURL()},this.processForm)).then((function(e){t.loadFinalSiteCollect(),t.processShow=!1})).catch((function(){t.$store.commit("loading/hideLoading")}))},openImage:function(t){Object(c["a"])({images:t,showIndex:!1,closeable:!0,overlayClass:"bg-white"})}}},g=_,b=a("2877"),y=Object(b["a"])(g,s,i,!1,null,null,null);e["default"]=y.exports}}]);
|