1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d22d936"],{f7a0:function(t,e,a){"use strict";a.r(e);var s,i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.collect.id?a("div",[a("van-nav-bar",{staticClass:"shadow",attrs:{title:"汇总详情","left-text":"返回","left-arrow":""},on:{"click-left":function(e){return t.$router.back(-1)}}}),a("div",{staticClass:"shadow bg-white px-5 pt-6 pb-10 leading-8"},[a("div",{staticClass:"flex flex-row"},[a("div",{staticClass:"flex-1"},[a("div",[t._v("门店: "+t._s(t.collect.shop_name))])])]),a("div",{staticClass:"flex flex-row"},[a("div",{staticClass:"flex-1"},[a("div",[t._v("进度: "+t._s(t.collectState[t.collect.state]))])]),a("div",{staticClass:"flex-1"},[a("div",[t._v("总金额: "+t._s(t.collect.total))])])]),a("div",{staticClass:"flex flex-row"},[a("div",{staticClass:"flex-1"},[a("div",[t._v(" 汇总时间: "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*t.collect.created_at)))+" ")])])]),a("div",{staticClass:"flex flex-row"},[a("div",{staticClass:"flex-1"},[a("div",[t._v("汇总人: "+t._s(t.collect.created_name))])]),a("div",{staticClass:"flex-1"},[a("div",[3==t.collect.state?a("van-button",{directives:[{name:"auth",rawName:"v-auth",value:["dispatch:verify:manager"],expression:"['dispatch:verify:manager']"}],staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(3)}}},[t._v("店长审核")]):t._e(),4==t.collect.state?a("van-button",{directives:[{name:"auth",rawName:"v-auth",value:["dispatch:verify:finance"],expression:"['dispatch:verify:finance']"}],staticClass:"float-right ml-2",attrs:{round:"",type:"info",size:"small"},on:{click:function(e){return t.process(4)}}},[t._v("财务审核")]):t._e()],1)])])]),a("van-tabs",{staticClass:"shadow bg-white mt-5",attrs:{swipeable:"",sticky:""},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[a("van-tab",{attrs:{title:"决算表"}},[a("van-cell-group",t._l(t.tables,(function(e,s){return a("van-cell",{key:s,attrs:{to:"/table/"+e.id}},[[a("span",{staticClass:"block"},[t._v("金额: "+t._s(e.total))]),a("span",{staticClass:"block"},[t._v("预算:"+t._s(e.budget))])],a("template",{slot:"title"},[t._v(t._s(e.name))]),a("template",{slot:"label"},[a("span",[t._v(t._s(e.address)+" "+t._s(e.village)+" "+t._s(e.room_no))]),e.area?a("span",{staticClass:"text-gray-400"},[t._v(" "+t._s(e.area)+"㎡")]):t._e()])],2)})),1)],1),0!=t.processs.length?a("van-tab",{attrs:{title:"流程"}},[a("van-cell-group",t._l(t.processs,(function(e,s){return a("van-cell",{key:s},[a("div",{staticClass:"flex justify-between items-center"},[a("div",[a("van-image",{attrs:{round:"",width:"3rem",height:"3rem",src:e.created_headimgurl?e.created_headimgurl:"https://image.nczyzs.com/zhiyuan-logo.png"}}),a("div",{staticClass:"inline-block align-top px-2"},[a("div",{staticClass:"text-base"},[t._v(t._s(e.created_name))]),a("div",{staticClass:"text-sm text-gray-400"},[t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*e.created_at)))+" ")])])],1),a("div",{staticClass:"text-right"},[a("div",{staticClass:"text-gray-600"},[t._v(" "+t._s(t.processType[e.type])+" ")]),e.type?a("div",{staticClass:"text-sm text-gray-400"},[t._v(" "+t._s(t.processState[e.state])+" ")]):t._e()])]),a("div",{staticClass:"flex justify-between items-end"},[a("div",{staticClass:"text-base text-gray-600 flex-1",staticStyle:{"white-space":"pre-wrap"}},[t._v(" "+t._s(e.explain)+" ")])]),e.signature?a("van-image",{attrs:{width:"100",height:"100",src:e.signature},on:{click:function(a){return t.openImage([e.signature])}}}):t._e(),e.pictures?a("UploadList",{attrs:{value:t.jsonArray(e.pictures),edit:!1}}):t._e()],1)})),1)],1):t._e()],1),a("van-popup",{attrs:{closeable:"",round:"",position:"bottom"},model:{value:t.processShow,callback:function(e){t.processShow=e},expression:"processShow"}},[a("div",{staticClass:"mt-2 text-center leading-10 text-lg"},[t._v(" "+t._s(0==t.processForm.type?"提交":"审核")+" ")]),a("div",{staticClass:"px-10 py-5"},[a("div",{ref:"canvasBox",staticClass:"w-full h-72 border-2 border-black"},[a("canvas",{attrs:{id:"sign"}})])]),a("van-field",{attrs:{autosize:"",type:"textarea",placeholder:"请输入说明"},model:{value:t.processForm.explain,callback:function(e){t.$set(t.processForm,"explain",e)},expression:"processForm.explain"}}),a("UploadList",{attrs:{value:t.jsonArray(t.processForm.pictures)},on:{input:function(e){t.$set(t.processForm,"pictures",JSON.stringify(e))}}}),a("van-button",{attrs:{size:"large",type:"info"},on:{click:t.saveProcess}},[t._v("提交")])],1)],1):t._e()},c=[],o=a("d696"),n=(a("dcd6"),a("8c89")),l=(a("ee22"),a("3c10")),r=(a("1580"),a("92d0")),d=(a("72bf"),a("c7af")),p=(a("fcda"),a("8e2e")),h=(a("8234"),a("4783")),v=(a("d762"),a("da1a")),u=a("46e0"),m=a("ae79"),f=a("22b4"),g=a("f148"),_={components:(s={UploadList:f["a"]},Object(o["a"])(s,h["a"].name,h["a"]),Object(o["a"])(s,p["a"].name,p["a"]),Object(o["a"])(s,d["a"].name,d["a"]),Object(o["a"])(s,r["a"].name,r["a"]),Object(o["a"])(s,l["a"].name,l["a"]),Object(o["a"])(s,n["a"].Component.name,n["a"].Component),s),data:function(){return{collect:{},collectState:{3:"待店长审核",4:"待财务审核",5:"已完成"},activeTab:0,tables:[],processs:[],processShow:!1,processForm:{},processState:{0:"通过",1:"驳回"},processType:{0:"提交",1:"工程队长审核",2:"预审审核",3:"店长审核",4:"财务审核"},signaturePad:null}},created:function(){this.$route.params&&this.$route.params.id&&(this.id=parseInt(this.$route.params.id)),this.loadDispatchSiteCollect(),this.loadDispatchSiteItem()},mounted:function(){},methods:{checkAuth:u["a"],dateFormat:m["a"],formatSecond:m["b"],jsonArray:m["c"],loadDispatchSiteCollect:function(){var t=this;this.$store.commit("loading/showLoading"),Object(v["s"])(this.id).then((function(e){t.collect=e.data,t.loadDispatchSiteProcess()})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadDispatchSiteItem:function(){var t=this;this.$store.commit("loading/showLoading"),Object(v["p"])({collect_id:this.id}).then((function(e){t.tables=e.data.list,t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadDispatchSiteProcess:function(){var t=this;this.$store.commit("loading/showLoading"),Object(v["o"])({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 g["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"),Object(v["c"])(Object.assign({signature:this.signaturePad.isEmpty()?"":this.signaturePad.toDataURL()},this.processForm)).then((function(e){t.loadDispatchSiteCollect(),t.processShow=!1})).catch((function(){t.$store.commit("loading/hideLoading")}))},openImage:function(t){Object(n["a"])({images:t,showIndex:!1,closeable:!0,overlayClass:"bg-white"})}}},b=_,x=a("cba8"),w=Object(x["a"])(b,i,c,!1,null,null,null);e["default"]=w.exports}}]);
|