1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-18498677"],{"05d8":function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return n}));a("d401"),a("4de4"),a("4160"),a("b64b"),a("d3b7"),a("4d63"),a("c607"),a("ac1f"),a("2c3e"),a("25f0"),a("4d90"),a("5319"),a("159b");function r(t,e){var a,r={"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 r)a=new RegExp("("+i+")").exec(t),a&&(t=t.replace(a[1],1==a[1].length?r[i]:r[i].padStart(a[1].length,"0")));return t}function i(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=0,r=0,i=0;t>86400&&(a=Math.floor(t/86400),t%=86400),t>3600&&(r=Math.floor(t/3600),t%=3600),t>60&&(i=Math.floor(t/60),t%=60);var n=t+"秒";return(i>0||r>0||a>0)&&(n=i+"分"+(e?n:"")),(r>0||a>0)&&(n=r+"小时"+(e?n:"")),a>0&&(n=a+"天"+(e?n:"")),n}function n(t){if("string"===typeof t)try{return JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]}},"408a":function(t,e,a){"use strict";var r=a("e330");t.exports=r(1..valueOf)},4662:function(t,e,a){"use strict";a("68ef"),a("a71a"),a("9d70"),a("3743"),a("09fe"),a("4d75"),a("e3b3"),a("8270"),a("786d"),a("504b")},"4de4":function(t,e,a){"use strict";var r=a("23e7"),i=a("b727").filter,n=a("1dde"),o=n("filter");r({target:"Array",proto:!0,forced:!o},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},"51eb":function(t,e,a){"use strict";var r=a("825a"),i=a("485a"),n=TypeError;t.exports=function(t){if(r(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new n("Incorrect hint");return i(this,t)}},"5e90":function(t,e,a){"use strict";a.r(e);a("f4b3"),a("e9c4");var r=function(){var t=this,e=t._self._c;return 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)}}}),t._l(t.orders,(function(a,r){return e("div",{key:r},[e("div",{staticClass:"bg-white mb-4 w-11/12 p-4 mx-auto text-sm shadow rounded"},[e("div",{staticClass:"pb-2 flex itemsenter justify-between border-b mb-2",staticStyle:{"font-weight":"bold"}},[e("span",{staticClass:"font-bold"},[t._v(t._s(a.pick_name))]),e("van-tag",{style:t.getTagType(a.item_status),attrs:{mark:""}},[t._v(t._s(t.orderState[a.item_status]))])],1),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("编号:")]),t._v(" "+t._s(a.id)+" ")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("质检标准:")]),e("span",[t._v(t._s(a.standard))])]),a.acceptance_failed_remark?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-semibold"},[t._v("拒绝原因:")]),e("span",{staticStyle:{color:"red"}},[t._v(t._s(a.acceptance_failed_remark))])]):t._e(),a.worker_start_at?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("开工时间:")]),e("span",[t._v(t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.worker_start_at))))])]):t._e(),a.worker_confirm_at?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("确认时间:")]),e("span",[t._v(t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*a.worker_confirm_at))))])]):t._e(),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("周期:")]),e("span",[t._v(t._s(a.cycle)+"(天)")])]),e("div",{staticClass:"pb-1 text-red-600"},[e("span",{staticClass:"font-bold"},[t._v("截止日期:")]),e("span",[t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(a.example_at)))+" ")])]),t.jsonArray(a.pictures).length>0?e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("图片:")])]):t._e(),t.jsonArray(a.pictures).length>0?e("div",{staticClass:"pb-1"},t._l(t.jsonArray(a.pictures),(function(r,i){return e("van-image",{key:i,staticClass:"mr-1 border border-gray-100",staticStyle:{width:"5rem",height:"5rem",display:"inline-block"},attrs:{src:r},on:{click:function(e){t.ImagePreview({images:t.jsonArray(a.pictures),startPosition:0,showIndex:"true",closeable:"true"})}}})})),1):t._e(),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("提交状态:")]),e("span",[t._v(t._s(t.worker_status[a.worker_status]))])]),e("div",{staticClass:"text-right"},[1==a.order_status&&0!=a.worker_start_at&&0==a.worker_status||4==a.item_status?e("van-button",{staticClass:"ml-2",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.confirmSite(a.pick_name,a.id)}}},[t._v("完工提交")]):t._e()],1)])])})),e("van-popup",{attrs:{overlay:"",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)],2)},i=[],n=(a("e17f"),a("2241")),o=(a("4662"),a("28a2")),s=a("ade3"),c=(a("e25e"),a("8b57")),l=a("b656"),u=a("05d8"),d=a("8941"),f={components:{UploadList:d["a"]},data:function(){return{id:0,pick_id:0,room_type:0,showPicker:!1,addCheckShow:!1,siteStartTime:0,confirmSiteTitle:"确认",checkForm:{},orders:[],orderState:{0:"未完成",1:"已完成",2:"超时完成",3:"超时未完成",4:"验收未通过"},itemState:{0:"待处理",1:"已接单"},activeTab:0,tables:[],worker_status:Object(s["a"])(Object(s["a"])(Object(s["a"])({},-1,"已驳回"),0,"未提交"),1,"已提交"),room_type_menu:{0:"开工",1:"拆改",2:"水电",3:"泥工",4:"防水",5:"木工",6:"刮瓷",7:"工程款",8:"安全",9:"主材验收",10:"交房"}}},created:function(){this.$route.params&&this.$route.params.id&&(this.id=this.$route.params.id,this.room_type=this.$route.params.room_type),this.loadWorksite()},methods:{ImagePreview:o["a"],checkAuth:l["a"],dateFormat:u["a"],jsonArray:u["c"],start:function(t,e){var a=this;n["a"].confirm({message:t+" 开工请确认"}).then((function(){a.$store.commit("loading/showLoading"),Object(c["B"])(e).then((function(t){a.loadWorksite()})).catch((function(){a.$store.commit("loading/hideLoading")}))})).catch((function(){}))},confirmSite:function(t,e){this.addCheckShow=!0,this.pick_id=e,this.confirmSiteTitle=t+"确认完工吗?"},loadWorksite:function(){var t=this;this.$store.commit("loading/showLoading"),Object(c["t"])(this.id,this.room_type).then((function(e){t.orders=e.data,t.$store.commit("loading/hideLoading")})).catch((function(){t.$store.commit("loading/hideLoading")}))},savecComplateMatPickWorker:function(){var t=this;this.$store.commit("loading/showLoading"),Object(c["j"])(this.pick_id,{pick_id:parseInt(this.pick_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")}))},getTagType:function(t){var e;switch(t){case 0:e="color";break;case 1:e="color:green";break;case 2:e="color:yelllo";break;case 3:e="color:grey";break;case 4:e="color:red";break}return e}}},p=f,m=(a("b625"),a("2877")),b=Object(m["a"])(p,r,i,!1,null,"72a44e1d",null);e["default"]=b.exports},"7a82f":function(t,e,a){"use strict";var r=a("23e7"),i=a("83ab"),n=a("9bf2").f;r({target:"Object",stat:!0,forced:Object.defineProperty!==n,sham:!i},{defineProperty:n})},8107:function(t,e,a){"use strict";a("9e88")},8172:function(t,e,a){"use strict";var r=a("e065"),i=a("57b9");r("toPrimitive"),i()},8941:function(t,e,a){"use strict";var r=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(a){return[a.url&&"mp4"==a.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:a.url},on:{click:function(e){return t.videoPlay(a.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=[],n=(a("9a83"),a("f564")),o=a("ade3"),s=(a("f1dc"),a("6e47")),c=(a("e930"),a("8f80")),l=(a("4de4"),a("4160"),a("d81d"),a("b64b"),a("d3b7"),a("159b"),a("d319")),u={name:"UploadList",components:Object(o["a"])(Object(o["a"])({},c["a"].name,c["a"]),s["a"].name,s["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(n["a"])({type:"danger",message:"上传视频大小不能超过 30MB!"}),!1}else if(t.size/1024/1024>5)return Object(n["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(n["a"])({type:"danger",message:"上传格式有误!"}),!1;e="mp4"}var a=this;return new Promise((function(r,i){Object(l["b"])({file_type:e}).then((function(e){var i=e.data.key,n=e.data.token;a._data.dataObj.token=n,a._data.dataObj.key=i,r(t)})).catch((function(t){console.log(t),i()}))}))},afterRead:function(t){var e=this;console.log(t),t.status="uploading",t.message="上传中...";var a=new FormData;a.append("file",t.file),Object.keys(this.dataObj).forEach((function(t){a.append(t,e.dataObj[t])})),this.$axios({method:"post",url:"https://upload.qiniup.com",data:a}).then((function(a){console.log(a),console.log("image url:"+e.$store.getters.setting.img_host),t.url=e.$store.getters.setting.img_host+a.data.key,t.status="done",t.message="上传成功",e.update()})).catch((function(a){console.log("上传失败",a),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}));console.log("image value",t),this.$emit("input",t),console.log(t)}}},d=u,f=(a("8107"),a("2877")),p=Object(f["a"])(d,r,i,!1,null,"839f07ca",null);e["a"]=p.exports},"9e88":function(t,e,a){},a90b:function(t,e,a){},a9e3:function(t,e,a){"use strict";var r=a("23e7"),i=a("c430"),n=a("83ab"),o=a("cfe9"),s=a("428f"),c=a("e330"),l=a("94ca"),u=a("1a2d"),d=a("7156"),f=a("3a9b"),p=a("d9b5"),m=a("c04e"),b=a("d039"),h=a("241c").f,v=a("06cf").f,g=a("9bf2").f,_=a("408a"),y=a("58a8").trim,k="Number",w=o[k],S=s[k],j=w.prototype,C=o.TypeError,O=c("".slice),x=c("".charCodeAt),N=function(t){var e=m(t,"number");return"bigint"==typeof e?e:I(e)},I=function(t){var e,a,r,i,n,o,s,c,l=m(t,"number");if(p(l))throw new C("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=y(l),e=x(l,0),43===e||45===e){if(a=x(l,2),88===a||120===a)return NaN}else if(48===e){switch(x(l,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+l}for(n=O(l,2),o=n.length,s=0;s<o;s++)if(c=x(n,s),c<48||c>i)return NaN;return parseInt(n,r)}return+l},F=l(k,!w(" 0o1")||!w("0b1")||w("+0x1")),L=function(t){return f(j,t)&&b((function(){_(t)}))},M=function(t){var e=arguments.length<1?0:w(N(t));return L(this)?d(Object(e),this,M):e};M.prototype=j,F&&!i&&(j.constructor=M),r({global:!0,constructor:!0,wrap:!0,forced:F},{Number:M});var $=function(t,e){for(var a,r=n?h(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;r.length>i;i++)u(e,a=r[i])&&!u(t,a)&&g(t,a,v(e,a))};i&&S&&$(s[k],S),(F||i)&&$(s[k],w)},ade3:function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));a("7a82f");var r=a("53ca");a("8172"),a("d9e2"),a("d401"),a("efec"),a("a9e3");function i(t,e){if("object"!=Object(r["a"])(t)||!t)return t;var a=t[Symbol.toPrimitive];if(void 0!==a){var i=a.call(t,e||"default");if("object"!=Object(r["a"])(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function n(t){var e=i(t,"string");return"symbol"==Object(r["a"])(e)?e:e+""}function o(t,e,a){return(e=n(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}},b625:function(t,e,a){"use strict";a("a90b")},d319:function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return n}));var r=a("6456");function i(t){return Object(r["a"])({url:"qiniu/token",method:"get",params:t})}function n(t){return Object(r["a"])({url:"send_verify_code",method:"get",params:t})}},d81d:function(t,e,a){"use strict";var r=a("23e7"),i=a("b727").map,n=a("1dde"),o=n("map");r({target:"Array",proto:!0,forced:!o},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},efec:function(t,e,a){"use strict";var r=a("1a2d"),i=a("cb2d"),n=a("51eb"),o=a("b622"),s=o("toPrimitive"),c=Date.prototype;r(c,s)||i(c,s,n)},f4b3:function(t,e,a){"use strict";var r=a("23e7"),i=a("d039"),n=a("7b0b"),o=a("c04e"),s=i((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));r({target:"Date",proto:!0,arity:1,forced:s},{toJSON:function(t){var e=n(this),a=o(e,"number");return"number"!=typeof a||isFinite(a)?e.toISOString():null}})}}]);
|