1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f8692d36"],{"0635":function(t,e,n){},"09bb":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return r}));var a=n("f0e1");function i(t){return Object(a["a"])({url:"qiniu/token",method:"get",params:t})}function o(t){return Object(a["a"])({url:"send_verify_code",method:"get",params:t})}function s(t,e){return Object(a["a"])({url:"worksites/".concat(t),method:"get",params:e})}function r(t){return Object(a["a"])({url:"worksitenodes",method:"get",params:t})}},"0fee":function(t,e,n){},"12db":function(t,e,n){},"1d32":function(t,e,n){"use strict";n("7db0"),n("c740"),n("d81d"),n("d3b7");var a=function(){var t=this,e=t._self._c;return e("span",[t.dropDown?e("span",{staticClass:"px-2",on:{click:t.showSelect}},[t._v(" "+t._s(t.columns.find((function(e){return e[t.valueKey]==t.value}))?t.columns.find((function(e){return e[t.valueKey]==t.value}))[t.labelKey]:"")+" "),e("van-icon",{attrs:{name:"arrow-down"}})],1):e("van-field",{attrs:{readonly:"",clickable:t.edit,border:t.border,label:t.label,value:t.columns.find((function(e){return e[t.valueKey]==t.value}))?t.columns.find((function(e){return e[t.valueKey]==t.value}))[t.labelKey]:"",placeholder:t.placeholder,disabled:t.disabled,rules:t.rules},on:{click:t.showSelect}}),e("van-popup",{attrs:{round:"",position:"bottom"},model:{value:t.showPicker,callback:function(e){t.showPicker=e},expression:"showPicker"}},[e("van-picker",{attrs:{"show-toolbar":"",title:t.label,columns:t.columns.map((function(e){return{text:e[t.labelKey],value:e[t.valueKey]}})),"default-index":t.columns.find((function(e){return e[t.valueKey]==t.value}))?t.columns.findIndex((function(e){return e[t.valueKey]==t.value})):0},on:{cancel:function(e){t.showPicker=!1},confirm:t.onConfirm}})],1)],1)},i=[],o={name:"Select",components:{},props:{value:{default:""},label:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},data:{type:String,default:""},edit:{type:Boolean,default:!0},rules:{type:Array,default:function(){return[]}},columns:{type:Array,default:function(){return[]}},labelKey:{default:"name"},valueKey:{default:"id"},dropDown:{type:Boolean,default:!1}},data:function(){return{showPicker:!1}},methods:{showSelect:function(){this.edit&&(this.showPicker=!0)},onConfirm:function(t){t=t.value;this.$emit("input",t),this.$emit("change",t),this.showPicker=!1}}},s=o,r=n("2877"),c=Object(r["a"])(s,a,i,!1,null,"6cfad04c",null);e["a"]=c.exports},"22b4":function(t,e,n){"use strict";var a=function(){var t=this,e=t._self._c;return e("div",[e("van-field",{attrs:{readonly:"",border:t.border,label:t.label,placeholder:t.placeholder,disabled:t.disabled},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-uploader",{attrs:{accept:t.accept,"before-read":t.beforeUpload,"after-read":t.afterRead,disabled:t.disabled,"show-upload":t.edit,deletable:t.edit},on:{delete:t.update},scopedSlots:t._u([{key:"preview-cover",fn:function(n){return[n.url&&"mp4"==n.url.split("/").pop().split(".").pop()?e("div",{staticClass:"w-full h-full overflow-hidden flex justify-center items-center"},[e("video",{staticClass:"min-w-full min-h-full",attrs:{src:n.url},on:{click:function(e){return t.videoPlay(n.url)}}},[t._v(" 您的浏览器不支持视频播放 ")])]):t._e()]}}]),model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})]},proxy:!0}])}),t.videoShow?e("van-overlay",{staticClass:"flex justify-center items-center",attrs:{show:t.videoShow,"z-index":"1000"}},[e("video",{staticClass:"max-w-full max-h-full",attrs:{src:t.videoUrl,controls:""}},[t._v(" 您的浏览器不支持视频播放 ")]),e("i",{staticClass:"van-icon van-icon-clear van-image-preview__close-icon van-image-preview__close-icon--top-right",attrs:{role:"button"},on:{click:function(e){t.videoShow=!1}}})]):t._e()],1)},i=[],o=(n("9a83"),n("f564")),s=n("ade3"),r=(n("f1dc"),n("6e47")),c=(n("e930"),n("8f80")),l=(n("4de4"),n("4160"),n("d81d"),n("b64b"),n("d3b7"),n("159b"),n("09bb")),u={name:"UploadList",components:Object(s["a"])(Object(s["a"])({},c["a"].name,c["a"]),r["a"].name,r["a"]),props:{value:{type:Array,default:function(){return[]}},label:{type:String,default:""},placeholder:{type:String,default:""},accept:{type:String,default:"image/*"},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1},edit:{type:Boolean,default:!0}},watch:{value:{deep:!0,imediate:!0,handler:function(t){this.fileList=t.map((function(t){return{url:t}}))}}},data:function(){return{dataObj:{},fileList:[],videoShow:!1,videoUrl:""}},created:function(){this.fileList=this.value.map((function(t){return{url:t}}))},methods:{videoPlay:function(t){this.videoUrl=t,this.videoShow=!0},beforeUpload:function(t){if("video/mp4"===t.type){if(t.size/1024/1024>30)return Object(o["a"])({type:"danger",message:"上传视频大小不能超过 30MB!"}),!1}else if(t.size/1024/1024>5)return Object(o["a"])({type:"danger",message:"上传图片大小不能超过 5MB!"}),!1;var e="";if(console.log(t.type),"image/png"===t.type)e="png";else if("image/jpeg"===t.type)e="jpg";else{if("video/mp4"!==t.type)return Object(o["a"])({type:"danger",message:"上传格式有误!"}),!1;e="mp4"}var n=this;return new Promise((function(a,i){Object(l["b"])({file_type:e}).then((function(e){var i=e.data.key,o=e.data.token;n._data.dataObj.token=o,n._data.dataObj.key=i,a(t)})).catch((function(t){console.log(t),i()}))}))},afterRead:function(t){var e=this;console.log(t),t.status="uploading",t.message="上传中...";var n=new FormData;n.append("file",t.file),Object.keys(this.dataObj).forEach((function(t){n.append(t,e.dataObj[t])})),this.$axios({method:"post",url:"https://upload.qiniup.com",data:n}).then((function(n){console.log(n),t.url=e.$store.getters.setting.img_host+n.data.key,t.status="done",t.message="上传成功",e.update()})).catch((function(){t.status="failed",t.message="上传失败",e.update()}))},update:function(){var t=this.fileList.filter((function(t){return!t.status||"done"==t.status})).map((function(t){return t.url}));this.$emit("input",t),console.log(t)}}},d=u,f=(n("84e3"),n("2877")),m=Object(f["a"])(d,a,i,!1,null,"af1cdf26",null);e["a"]=m.exports},"291a":function(t,e,n){"use strict";n("0635")},"3a82":function(t,e,n){},"408a":function(t,e,n){"use strict";var a=n("e330");t.exports=a(1..valueOf)},4662:function(t,e,n){"use strict";n("68ef"),n("a71a"),n("9d70"),n("3743"),n("09fe"),n("4d75"),n("e3b3"),n("8270"),n("786d"),n("504b")},"4ddd":function(t,e,n){"use strict";n("68ef"),n("9d70"),n("3743"),n("dde9")},"4de4":function(t,e,n){"use strict";var a=n("23e7"),i=n("b727").filter,o=n("1dde"),s=o("filter");a({target:"Array",proto:!0,forced:!s},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"51eb":function(t,e,n){"use strict";var a=n("825a"),i=n("485a"),o=TypeError;t.exports=function(t){if(a(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new o("Incorrect hint");return i(this,t)}},"7a82f":function(t,e,n){"use strict";var a=n("23e7"),i=n("83ab"),o=n("9bf2").f;a({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!i},{defineProperty:o})},"7db0":function(t,e,n){"use strict";var a=n("23e7"),i=n("b727").find,o=n("44d2"),s="find",r=!0;s in[]&&Array(1)[s]((function(){r=!1})),a({target:"Array",proto:!0,forced:r},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o(s)},8172:function(t,e,n){"use strict";var a=n("e065"),i=n("57b9");a("toPrimitive"),i()},"81c0":function(t,e,n){},"84e3":function(t,e,n){"use strict";n("12db")},"99af":function(t,e,n){"use strict";var a=n("23e7"),i=n("d039"),o=n("e8b5"),s=n("861d"),r=n("7b0b"),c=n("07fa"),l=n("3511"),u=n("8418"),d=n("65f0"),f=n("1dde"),m=n("b622"),p=n("1212"),h=m("isConcatSpreadable"),v=p>=51||!i((function(){var t=[];return t[h]=!1,t.concat()[0]!==t})),b=function(t){if(!s(t))return!1;var e=t[h];return void 0!==e?!!e:o(t)},g=!v||!f("concat");a({target:"Array",proto:!0,arity:1,forced:g},{concat:function(t){var e,n,a,i,o,s=r(this),f=d(s,0),m=0;for(e=-1,a=arguments.length;e<a;e++)if(o=-1===e?s:arguments[e],b(o))for(i=c(o),l(m+i),n=0;n<i;n++,m++)n in o&&u(f,m,o[n]);else l(m+1),u(f,m++,o);return f.length=m,f}})},"9f14":function(t,e,n){"use strict";var a=n("d282"),i=n("0a26"),o=Object(a["a"])("radio"),s=o[0],r=o[1];e["a"]=s({mixins:[Object(i["a"])({bem:r,role:"radio",parent:"vanRadio"})],computed:{currentValue:{get:function(){return this.parent?this.parent.value:this.value},set:function(t){(this.parent||this).$emit("input",t)}},checked:function(){return this.currentValue===this.name}},methods:{toggle:function(){this.currentValue=this.name}}})},a3ad:function(t,e,n){"use strict";n.r(e);n("99af"),n("4de4"),n("d81d"),n("f4b3"),n("e9c4"),n("d3b7");var a=function(){var t=this,e=t._self._c;return t.worksite.id?e("div",[e("van-nav-bar",{staticClass:"shadow mb-4",attrs:{title:"工地详情","left-text":"返回","left-arrow":""},on:{"click-left":function(e){return t.$router.back(-1)}}}),e("div",{staticClass:"shadow mx-auto"},[e("div",{staticClass:"px-4 bg-white py-2 text-sm"},[e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("工地编号:")]),t._v(t._s(t.worksite.id)+" ")]),e("div",{staticClass:"pb-1"},[e("span",[e("span",{staticClass:"font-semibold",staticStyle:{"font-weight":"bold"}},[t._v(" 业主信息:")]),t._v(t._s(t.worksite.username))]),e("span",{staticClass:"text-gray-400"},[t._v(" "+t._s(t.worksite.phone))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("装修地址:")]),e("span",[t._v(t._s(t.worksite.address)+" "+t._s(t.worksite.village)+" "+t._s(t.worksite.room_no))]),t.worksite.area?e("span",{staticClass:"text-gray-400"},[t._v(" "+t._s(t.worksite.area)+"㎡")]):t._e()]),t.worksite.manager_id?e("div",{staticClass:"pb-1 flex items-center"},[e("span",{staticClass:"font-bold"},[t._v("项目经理:")]),e("span",{staticClass:"flex items-center"},[e("span",[t._v(t._s(t.worksite.manager_name))]),t.worksite.manager_phone?e("span",{staticClass:"flex items-center"},[t._v("("+t._s(t.worksite.manager_phone)+")"),e("a",{staticClass:"flex items-center",attrs:{href:"tel:"+t.worksite.manager_phone}},[e("van-icon",{attrs:{name:"phone",size:"22",color:"#009688"}})],1)]):t._e()])]):t._e(),t.worksite.starttime?e("div",{staticClass:"pb-1 flex items-center"},[e("span",{staticClass:"font-bold"},[t._v("开工时间:")]),e("span",{staticClass:"flex items-center"},[e("span",{model:{value:t.siteStartTime=t.worksite.starttime,callback:function(e){t.$set(t.siteStartTime=t.worksite,"starttime",e)},expression:"siteStartTime = worksite.starttime"}},[t._v(t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*t.worksite.starttime))))])])]):t._e()])]),e("van-tabs",{staticClass:"bg-white mt-1",attrs:{swipeable:"",sticky:""},on:{click:t.onClick},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},t._l(t.groupedLists,(function(n,a){return e("div",{key:a},[t.supplier?t._e():e("van-tab",{key:a,staticClass:"bg-gray-100 py-2",attrs:{title:t.levelOne[a]}},[e("van-collapse",{model:{value:t.activeNames,callback:function(e){t.activeNames=e},expression:"activeNames"}},[e("div",[e("p",{staticClass:"bg-blue-600 bg-opacity-80 text-white px-4 py-2"},[t._v("项目")]),e("ul",t._l(n,(function(n,a){return e("li",{key:a,staticClass:"shadow mb-1"},[e("div",{staticClass:"mx-auto"},[e("div",{staticClass:"px-4 bg-white py-2 text-sm"},[e("div",{staticClass:"pb-2 flex items-center justify-between border-b mb-2",staticStyle:{"font-weight":"bold"}},[e("span",{staticClass:"font-bold",staticStyle:{width:"85%"}},[t._v(t._s(a+1)+". "+t._s(n.pick_name))]),e("van-tag",{attrs:{mark:"",color:t.getTagType(n.item_status)}},[t._v(t._s(t.itemStatusMenu[n.item_status]))])],1),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("标准:")]),t._v(t._s(n.standard))]),n.pictures&&n.pictures.split(",").filter((function(t){return t})).length>0?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("样例展示:")]),t._l(n.pictures.split(",").filter((function(t){return t})),(function(a,i){return e("van-image",{key:i,staticClass:"mr-1 border border-gray-100",staticStyle:{width:"5rem",height:"5rem",display:"inline-block"},attrs:{src:"".concat(t.imageDomain).concat(a)},on:{click:function(e){t.ImagePreview({images:n.pictures.split(",").filter((function(t){return t})).map((function(e){return"".concat(t.imageDomain).concat(e)})),startPosition:0,showIndex:!0,closeable:!0})}}})}))],2):t._e(),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold",staticStyle:{"font-weight":"bold"}},[t._v("周期:")]),t._v(t._s(n.cycle)+"天")]),n.name?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("工人:")]),t._v(t._s(n.name))]):t._e(),"worker"==n.confirm_type||"both"==n.confirm_type?e("div"):t._e(),n.taskSubmissionLog?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("提交记录:")]),e("van-steps",{attrs:{direction:"vertical",active:n.taskSubmissionLog.length}},t._l(n.taskSubmissionLog,(function(a,i){return e("van-step",{key:i},[e("h3",[t._v(t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.created_at))))]),e("h3",[t._v("提交内容:"+t._s(a.content))]),e("h3",t._l(t.jsonArray(a.pictures),(function(n,i){return e("van-image",{key:i,staticClass:"mr-1 border border-gray-100",staticStyle:{width:"5rem",height:"5rem",display:"inline-block"},attrs:{src:"".concat(n)},on:{click:function(e){t.ImagePreview({images:t.jsonArray(a.pictures).filter((function(t){return t})).map((function(t){return"".concat(t)})),startPosition:0,showIndex:"true",closeable:"true"})}}})})),1),0==a.review_status?e("van-button",{staticClass:"ml-2",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleApprove(a.id,n.id)}}},[t._v("审核通过")]):t._e(),0==a.review_status?e("van-button",{staticClass:"ml-2",attrs:{type:"warning",size:"small"},on:{click:function(e){return t.confirmReview(a.id,n.id)}}},[t._v("审核拒绝")]):t._e(),""!=a.review_comments?e("h3",[t._v("审核内容:"+t._s(a.review_comments))]):t._e(),e("h3",[t._v("审核状态:"+t._s(t.reviewLogStateMenu[a.review_status]))])],1)})),1)],1):t._e(),n.taskCommentsLog?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("留言记录:")]),e("div",{staticClass:"comment-list"},t._l(n.taskCommentsLog,(function(n,a){return e("div",{key:a,staticClass:"comment-item bg-white rounded-lg p-3 mb-2 shadow-sm"},[e("div",{staticClass:"comment-header flex justify-between items-center mb-2"},[e("span",{staticClass:"text-gray-600 text-sm"},[t._v(t._s(n.commenter_role)+":")]),e("span",{staticClass:"text-gray-400 text-xs"},[t._v(t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*n.created_at))))])]),e("div",{staticClass:"comment-content text-gray-800 text-sm"},[t._v(" "+t._s(n.content)+" ")])])})),0)]):t._e(),"worker"==n.confirm_type||"both"==n.confirm_type?e("div",{staticClass:"py-1"},[1==n.item_status?e("span",[t._v("已验收")]):t._e(),1==n.worker_status&&0==n.manager_status?[e("span",{staticClass:"font-semibold"},[t._v("验收")]),e("van-button",{staticClass:"mx-2",attrs:{type:"primary",size:"small",round:""},on:{click:function(e){return t.checkTable(n)}}},[t._v("验收通过")]),e("van-button",{staticClass:"mx-2",attrs:{type:"danger",size:"small",round:""},on:{click:function(e){return t.checkTable2(n)}}},[t._v("验收不通过")])]:t._e()],2):e("div",[e("div",{staticClass:"text-right"},[e("van-button",{staticClass:"ml-2",attrs:{type:"danger",size:"small"},on:{click:function(e){return t.confirmMsg(n.pick_name,n.id)}}},[t._v("留言")])],1)])])])])})),0)])])],1)],1)})),0),e("van-popup",{attrs:{closeable:"",position:"bottom"},model:{value:t.addCheckShow,callback:function(e){t.addCheckShow=e},expression:"addCheckShow"}},[e("div",{staticClass:"text-center leading-10 text-lg"},[t._v(t._s(t.confirmSiteTitle))]),e("van-field",{attrs:{rows:"3",autosize:"",type:"textarea",placeholder:"请输入内容"},model:{value:t.checkForm.content,callback:function(e){t.$set(t.checkForm,"content",e)},expression:"checkForm.content"}}),e("UploadList",{attrs:{value:t.jsonArray(t.checkForm.pictures)},on:{input:function(e){t.$set(t.checkForm,"pictures",JSON.stringify(e))}}}),e("div",{staticClass:"text-sm text-gray-400 px-4"},[t._v("(上传质检本)")]),e("van-button",{attrs:{size:"large",type:"info"},on:{click:function(e){return t.savecComplateMatPickWorker()}}},[t._v("提交")])],1),e("van-popup",{attrs:{closeable:"",round:"",position:"bottom"},model:{value:t.ReviewShow,callback:function(e){t.ReviewShow=e},expression:"ReviewShow"}},[e("div",{staticClass:"mt-2 text-center leading-10 text-lg"},[t._v("验收不通过")]),e("van-field",{attrs:{autosize:"",type:"textarea",placeholder:"请输入说明原因"},model:{value:t.tableForm.content,callback:function(e){t.$set(t.tableForm,"content",e)},expression:"tableForm.content"}}),e("van-button",{attrs:{size:"large",type:"info"},on:{click:t.checkTable3}},[t._v("提交")])],1),e("van-popup",{attrs:{closeable:"",round:"",position:"bottom"},model:{value:t.msgShow,callback:function(e){t.msgShow=e},expression:"msgShow"}},[e("div",{staticClass:"mt-2 text-center leading-10 text-lg"},[t._v("留言")]),e("van-field",{attrs:{autosize:"",type:"textarea",placeholder:"请输入留言内容"},model:{value:t.tableForm.content,callback:function(e){t.$set(t.tableForm,"content",e)},expression:"tableForm.content"}}),e("van-button",{attrs:{size:"large",type:"info"},on:{click:t.checkMsg}},[t._v("提交")])],1),e("van-popup",{attrs:{closeable:"",position:"bottom"},model:{value:t.addextensionRequestShow,callback:function(e){t.addextensionRequestShow=e},expression:"addextensionRequestShow"}},[e("div",{staticClass:"text-center leading-10 text-lg"},[t._v(t._s(t.extensionRequestTitle))]),e("van-field",{attrs:{name:"延期原因",label:"延期原因",rows:"3",autosize:"",type:"textarea",placeholder:"请输入内容"},model:{value:t.extensionCheckForm.content,callback:function(e){t.$set(t.extensionCheckForm,"content",e)},expression:"extensionCheckForm.content"}}),e("van-field",{attrs:{name:"延期类型",label:"延期类型"},scopedSlots:t._u([{key:"input",fn:function(){return[e("van-radio-group",{attrs:{direction:"horizontal"},model:{value:t.extensionCheckForm.type,callback:function(e){t.$set(t.extensionCheckForm,"type",e)},expression:"extensionCheckForm.type"}},[e("van-radio",{attrs:{name:0}},[t._v("单节点延期")]),e("van-radio",{attrs:{name:1}},[t._v("工期延期")])],1)]},proxy:!0}],null,!1,481334295)}),e("van-field",{attrs:{name:"延期天数",label:"延期天数",type:"number",placeholder:"填写天数",rules:[{required:!0}]},scopedSlots:t._u([{key:"button",fn:function(){return[t._v(" 天 ")]},proxy:!0}],null,!1,2285623618),model:{value:t.extensionCheckForm.duration,callback:function(e){t.$set(t.extensionCheckForm,"duration",e)},expression:"extensionCheckForm.duration"}}),e("UploadList",{attrs:{value:t.jsonArray(t.extensionCheckForm.pictures)},on:{input:function(e){t.$set(t.extensionCheckForm,"pictures",JSON.stringify(e))}}}),e("van-button",{attrs:{size:"large",type:"info"},on:{click:function(e){return t.saveExtensionRequest()}}},[t._v("提交")])],1)],1):t._e()},i=[],o=(n("e17f"),n("2241")),s=(n("4662"),n("28a2")),r=n("ade3"),c=(n("68ef"),n("9d70"),n("3743"),n("1a04"),n("5c56"),n("0fee"),n("2638")),l=n.n(c),u=n("d282"),d=n("ba31"),f=n("b1d2"),m=n("7744"),p=n("34e9"),h=Object(u["a"])("panel"),v=h[0],b=h[1];function g(t,e,n,a){var i=function(){return[n.header?n.header():t(m["a"],{attrs:{icon:e.icon,label:e.desc,title:e.title,value:e.status,valueClass:b("header-value")},class:b("header")}),t("div",{class:b("content")},[n.default&&n.default()]),n.footer&&t("div",{class:[b("footer"),f["e"]]},[n.footer()])]};return t(p["a"],l()([{class:b(),scopedSlots:{default:i}},Object(d["b"])(a,!0)]))}g.props={icon:String,desc:String,title:String,status:String};var k=v(g),_=(n("c3a6"),n("ad06")),w=(n("81c0"),n("c31d")),y=n("9884"),S=n("48f4"),x=n("6f2f"),C=Object(u["a"])("sidebar-item"),O=C[0],j=C[1],F=O({mixins:[Object(y["a"])("vanSidebar")],props:Object(w["a"])({},S["c"],{dot:Boolean,info:[Number,String],badge:[Number,String],title:String,disabled:Boolean}),computed:{select:function(){return this.index===+this.parent.activeKey}},methods:{onClick:function(){this.disabled||(this.$emit("click",this.index),this.parent.$emit("input",this.index),this.parent.setIndex(this.index),Object(S["b"])(this.$router,this))}},render:function(){var t,e,n=arguments[0];return n("a",{class:j({select:this.select,disabled:this.disabled}),on:{click:this.onClick}},[n("div",{class:j("text")},[null!=(t=this.slots("title"))?t:this.title,n(x["a"],{attrs:{dot:this.dot,info:null!=(e=this.badge)?e:this.info},class:j("info")})])])}}),T=(n("d8ac"),Object(u["a"])("sidebar")),L=T[0],I=T[1],M=L({mixins:[Object(y["b"])("vanSidebar")],model:{prop:"activeKey"},props:{activeKey:{type:[Number,String],default:0}},data:function(){return{index:+this.activeKey}},watch:{activeKey:function(){this.setIndex(+this.activeKey)}},methods:{setIndex:function(t){t!==this.index&&(this.index=t,this.$emit("change",t))}},render:function(){var t=arguments[0];return t("div",{class:I()},[this.slots()])}}),N=(n("9b7e"),n("a3e2")),$=(n("4ddd"),n("9f14")),P=(n("a44c"),n("e27c")),R=(n("d401"),n("14d9"),n("13d5"),n("e25e"),n("25f0"),n("da1a")),A=n("46e0"),E=n("ae79"),z=n("22b4"),K=n("1d32"),q=n("9337"),D=n.n(q),Y={components:Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])(Object(r["a"])({Select:K["a"],UploadList:z["a"]},P["a"].name,P["a"]),$["a"].name,$["a"]),"GroupedLists",[]),N["a"].name,N["a"]),M.name,M),F.name,F),_["a"].name,_["a"]),"Panel",k),data:function(){return{imageDomain:D.a.imageDomain,id:0,work_id:0,tableShow:!1,activeTab:0,addCheckShow:!1,ReviewShow:!1,msgShow:!1,addextensionRequestShow:!1,selectTable:{},siteStartTime:0,confirmSiteTitle:"确认",extensionRequestTitle:"确认",checkForm:{},extensionCheckForm:{type:0},tableForm:{},activeNames:[],worksite:{},worksiteState:{0:"待开工",1:"已开工",2:"已完工",3:"已停工"},orderStatus:{0:"未接单",1:"已接单",2:"待接单",3:"已拒绝"},confirmTypeMenu:{worker:"工人",manager:"项目经理",both:"工人和项目经理"},itemStatusMenu:{0:"待提交",1:"完成",2:"待审核",3:"已拒绝"},reviewLogStateMenu:{0:"待审核",1:"审核通过",2:"已拒绝"},levelOne:{},workExtensionStatus:{0:"节点延期",1:"工程延期"},workExtensionAuditStatus:{0:"待审核",1:"通过",2:"拒绝"},tables:[],materials:[],materialType:0,settleShow:!1,settleForm:{},signaturePad:null,supplier:!1,materialSettleShow:!1,materialSettleForm:{},materialorders:[],oneLevelMapCount:{},oneLevelcompleteMapCount:{},takeShow:!1,activeMaterial:0,controls:[],livingShow:!1,settlesShow:!1,selectMats:[],worker:"",selectMatState:Object(r["a"])(Object(r["a"])(Object(r["a"])({},-1,"已取消"),0,"待下单"),1,"已下单"),payments:[]}},created:function(){this.supplier=this.$store.getters.supplier,this.$route.params&&this.$route.params.id&&(this.id=this.$route.params.id),this.loadWorksite(),console.log("get table key:",sessionStorage.getItem("managerTab")),sessionStorage.getItem("managerTab")&&(this.activeTab=parseInt(sessionStorage.getItem("managerTab")))},computed:{groupedLists:function(){return this.tables.reduce((function(t,e){if(t[e.room_type]||(t[e.room_type]=[]),"worker"===e.confirm_type&&(t[e.room_type]["showWorker"]=!0),e.name&&t[e.room_type]){var n={name:e.name,worker_status:e.worker_status,order_acceptance_at:e.order_acceptance_at,order_status:e.order_status};console.log(n.name),t[e.room_type]["workerInfo"]=n}return t[e.room_type].push(e),console.log("groups",t),t}),{})}},methods:{ImagePreview:s["a"],onClick:function(t,e){console.log("set table key:",t),sessionStorage.setItem("managerTab",t)},getTagType:function(t){var e;switch(t){case 0:e="grey";break;case 1:e="green";break;case 2:e="#FF9800";break;case 3:e="red";break;case 4:e="red";break}return e},confirmReview:function(t,e){this.ReviewShow=!0,this.work_id=e,this.tableForm={log_id:t},this.confirmSiteTitle=item+"审核不通过"},confirmMsg:function(t,e){this.msgShow=!0,this.work_id=e,this.confirmSiteTitle=t+"留言"},confirmSite:function(t,e){this.addCheckShow=!0,this.work_id=e,this.confirmSiteTitle=t+"确认完工吗?"},extensionRequest:function(t,e){this.addextensionRequestShow=!0,this.pick_id=e,this.extensionRequestTitle=t+"确认延期吗"},handleApprove:function(t,e){var n=this;this.work_id=e,this.tableForm={log_id:t},o["a"].confirm({title:"提示",message:"是否确认验收?"}).then((function(){Object(R["b"])(n.work_id,n.tableForm).then((function(t){n.loading=!1,n.loadWorksite()})).catch((function(){n.loading=!1}))})).catch((function(){}))},savecComplateMatPickWorker:function(){var t=this;this.$store.commit("loading/showLoading"),Object(R["complateMatPickWorker"])(this.work_id,{work_id:parseInt(this.work_id),log_id:parseInt(this.log_id),content:this.checkForm.content,pictures:this.checkForm.pictures}).then((function(e){200===e.code?(t.addCheckShow=!1,t.$store.commit("loading/hideLoading"),t.loadWorksite()):t.$message.error(e.msg)})).catch((function(){t.$store.commit("loading/hideLoading")}))},checkAuth:A["a"],dateFormat:E["a"],jsonArray:E["c"],loadWorksite:function(){var t=this;this.$store.commit("loading/showLoading"),Object(R["D"])(this.id).then((function(e){t.worksite=e.data,t.loadFinalSiteTable()})).catch((function(){t.$store.commit("loading/hideLoading")}))},loadFinalSiteTable:function(){var t=this;this.$store.commit("loading/showLoading"),Object(R["y"])({site_id:this.id}).then((function(e){t.$store.commit("loading/hideLoading"),t.tables=e.data.list;for(var n=e.data.oneLevelMapCount,a=e.data.oneLevelcompleteMapCount,i=0;i<e.data.oneLevel.length;i++)t.levelOne[e.data.oneLevel[i].id]=e.data.oneLevel[i].name+"("+a[e.data.oneLevel[i].id]+"/"+n[e.data.oneLevel[i].id].length+")"})).catch((function(){t.$store.commit("loading/hideLoading")}))},checkTable:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){var e=this;o["a"].confirm({title:"提示",message:"是否确认验收?"}).then((function(){checkTable(t.id,{state:0}).then((function(t){e.loading=!1,e.loadWorksite()})).catch((function(){e.loading=!1}))})).catch((function(){}))})),checkTable2:function(t){this.selectTable=t,this.tableForm={state:1},this.tableShow=!0},checkTable3:function(){var t=this;Object(R["a"])(this.work_id,this.tableForm).then((function(e){t.loading=!1,t.loadWorksite(),t.ReviewShow=!1})).catch((function(){t.loading=!1}))},checkMsg:function(){var t=this;Object(R["f"])(this.work_id,this.tableForm).then((function(e){t.loading=!1,t.loadWorksite(),t.msgShow=!1})).catch((function(){t.loading=!1}))},saveExtensionRequest:function(){var t=this;Object(R["saveExtensionRequestHandle"])(this.pick_id,{pick_id:parseInt(this.pick_id),type:this.extensionCheckForm.type,content:this.extensionCheckForm.content,duration:this.extensionCheckForm.duration,pictures:this.extensionCheckForm.pictures}).then((function(e){t.loading=!1,t.loadWorksite(),t.addextensionRequestShow=!1})).catch((function(){t.loading=!1}))}}},B=Y,W=(n("c802"),n("291a"),n("2877")),U=Object(W["a"])(B,a,i,!1,null,"15f51037",null);e["default"]=U.exports},a44c:function(t,e,n){"use strict";n("68ef"),n("dc1b")},a9e3:function(t,e,n){"use strict";var a=n("23e7"),i=n("c430"),o=n("83ab"),s=n("cfe9"),r=n("428f"),c=n("e330"),l=n("94ca"),u=n("1a2d"),d=n("7156"),f=n("3a9b"),m=n("d9b5"),p=n("c04e"),h=n("d039"),v=n("241c").f,b=n("06cf").f,g=n("9bf2").f,k=n("408a"),_=n("58a8").trim,w="Number",y=s[w],S=r[w],x=y.prototype,C=s.TypeError,O=c("".slice),j=c("".charCodeAt),F=function(t){var e=p(t,"number");return"bigint"==typeof e?e:T(e)},T=function(t){var e,n,a,i,o,s,r,c,l=p(t,"number");if(m(l))throw new C("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=_(l),e=j(l,0),43===e||45===e){if(n=j(l,2),88===n||120===n)return NaN}else if(48===e){switch(j(l,1)){case 66:case 98:a=2,i=49;break;case 79:case 111:a=8,i=55;break;default:return+l}for(o=O(l,2),s=o.length,r=0;r<s;r++)if(c=j(o,r),c<48||c>i)return NaN;return parseInt(o,a)}return+l},L=l(w,!y(" 0o1")||!y("0b1")||y("+0x1")),I=function(t){return f(x,t)&&h((function(){k(t)}))},M=function(t){var e=arguments.length<1?0:y(F(t));return I(this)?d(Object(e),this,M):e};M.prototype=x,L&&!i&&(x.constructor=M),a({global:!0,constructor:!0,wrap:!0,forced:L},{Number:M});var N=function(t,e){for(var n,a=o?v(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;a.length>i;i++)u(e,n=a[i])&&!u(t,n)&&g(t,n,b(e,n))};i&&S&&N(r[w],S),(L||i)&&N(r[w],y)},ade3:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));n("7a82f");var a=n("53ca");n("8172"),n("d9e2"),n("d401"),n("efec"),n("a9e3");function i(t,e){if("object"!=Object(a["a"])(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=Object(a["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function o(t){var e=i(t,"string");return"symbol"==Object(a["a"])(e)?e:e+""}function s(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},ae79:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o}));n("d401"),n("4de4"),n("4160"),n("b64b"),n("d3b7"),n("4d63"),n("c607"),n("ac1f"),n("2c3e"),n("25f0"),n("4d90"),n("5319"),n("159b");function a(t,e){var n,a={"Y+":e.getFullYear().toString(),"m+":(e.getMonth()+1).toString(),"d+":e.getDate().toString(),"H+":e.getHours().toString(),"M+":e.getMinutes().toString(),"S+":e.getSeconds().toString()};for(var i in a)n=new RegExp("("+i+")").exec(t),n&&(t=t.replace(n[1],1==n[1].length?a[i]:a[i].padStart(n[1].length,"0")));return t}function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,a=0,i=0;t>86400&&(n=Math.floor(t/86400),t%=86400),t>3600&&(a=Math.floor(t/3600),t%=3600),t>60&&(i=Math.floor(t/60),t%=60);var o=t+"秒";return(i>0||a>0||n>0)&&(o=i+"分"+(e?o:"")),(a>0||n>0)&&(o=a+"小时"+(e?o:"")),n>0&&(o=n+"天"+(e?o:"")),o}function o(t){if("string"===typeof t)try{return JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]}},c802:function(t,e,n){"use strict";n("3a82")},d81d:function(t,e,n){"use strict";var a=n("23e7"),i=n("b727").map,o=n("1dde"),s=o("map");a({target:"Array",proto:!0,forced:!s},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},d8ac:function(t,e,n){},dc1b:function(t,e,n){},dde9:function(t,e,n){},e27c:function(t,e,n){"use strict";var a=n("d282"),i=n("78eb"),o=n("9884"),s=Object(a["a"])("radio-group"),r=s[0],c=s[1];e["a"]=r({mixins:[Object(o["b"])("vanRadio"),i["a"]],props:{value:null,disabled:Boolean,direction:String,checkedColor:String,iconSize:[Number,String]},watch:{value:function(t){this.$emit("change",t)}},render:function(){var t=arguments[0];return t("div",{class:c([this.direction]),attrs:{role:"radiogroup"}},[this.slots()])}})},efec:function(t,e,n){"use strict";var a=n("1a2d"),i=n("cb2d"),o=n("51eb"),s=n("b622"),r=s("toPrimitive"),c=Date.prototype;a(c,r)||i(c,r,o)},f4b3:function(t,e,n){"use strict";var a=n("23e7"),i=n("d039"),o=n("7b0b"),s=n("c04e"),r=i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));a({target:"Date",proto:!0,arity:1,forced:r},{toJSON:function(t){var e=o(this),n=s(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})}}]);
|