(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ff115d98"],{"0c47":function(t,e,r){"use strict";var o=r("da84"),n=r("d44e");n(o.JSON,"JSON",!0)},"131a":function(t,e,r){"use strict";var o=r("23e7"),n=r("d2bb");o({target:"Object",stat:!0},{setPrototypeOf:n})},"14d9":function(t,e,r){"use strict";var o=r("23e7"),n=r("7b0b"),a=r("07fa"),i=r("3a34"),c=r("3511"),s=r("d039"),u=s((function(){return 4294967297!==[].push.call({length:4294967296},1)})),d=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},l=u||!d();o({target:"Array",proto:!0,arity:1,forced:l},{push:function(t){var e=n(this),r=a(e),o=arguments.length;c(r+o);for(var s=0;sn)throw o("Maximum allowed index exceeded");return t}},"3a34":function(t,e,r){"use strict";var o=r("83ab"),n=r("e8b5"),a=TypeError,i=Object.getOwnPropertyDescriptor,c=o&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=c?function(t,e){if(n(t)&&!i(t,"length").writable)throw new a("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},"7a82":function(t,e,r){"use strict";var o=r("23e7"),n=r("83ab"),a=r("9bf2").f;o({target:"Object",stat:!0,forced:Object.defineProperty!==a,sham:!n},{defineProperty:a})},"7e12":function(t,e,r){"use strict";var o=r("da84"),n=r("d039"),a=r("e330"),i=r("577e"),c=r("58a8").trim,s=r("5899"),u=a("".charAt),d=o.parseFloat,l=o.Symbol,f=l&&l.iterator,h=1/d(s+"-0")!==-1/0||f&&!n((function(){d(Object(f))}));t.exports=h?function(t){var e=c(i(t)),r=d(e);return 0===r&&"-"===u(e,0)?-0:r}:d},"944a":function(t,e,r){"use strict";var o=r("d066"),n=r("e065"),a=r("d44e");n("toStringTag"),a(o("Symbol"),"Symbol")},9901:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var o=r("53ca");r("d9e2"),r("d401"),r("4160"),r("b64b"),r("d3b7"),r("e25e"),r("4d63"),r("c607"),r("ac1f"),r("2c3e"),r("00b4"),r("25f0"),r("4d90"),r("5319"),r("159b");function n(t){if(!t&&"object"!==Object(o["a"])(t))throw new Error("error arguments","shallowClone");var e=t.constructor===Array?[]:{};return Object.keys(t).forEach((function(r){t[r]&&"object"===Object(o["a"])(t[r])?e[r]=n(t[r]):e[r]=t[r]})),e}},a15b:function(t,e,r){"use strict";var o=r("23e7"),n=r("e330"),a=r("44ad"),i=r("fc6a"),c=r("a640"),s=n([].join),u=a!==Object,d=u||!c("join",",");o({target:"Array",proto:!0,forced:d},{join:function(t){return s(i(this),void 0===t?",":t)}})},a3ea:function(t,e,r){"use strict";r.d(e,"f",(function(){return n})),r.d(e,"e",(function(){return a})),r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return s})),r.d(e,"c",(function(){return u}));var o=r("0088");function n(t){return Object(o["a"])({url:"bid/outline",method:"get",params:t})}function a(){return Object(o["a"])({url:"bid/detail",method:"get"})}function i(t){return Object(o["a"])({url:"bid/detail_calc",method:"post",data:t})}function c(t){return Object(o["a"])({url:"bid/detail_calc_toilet",method:"post",data:t})}function s(t){return Object(o["a"])({url:"bids",method:"get",params:t})}function u(t){return Object(o["a"])({url:"bid/export",method:"get",params:{pkg_id:t}})}},a68d:function(t,e,r){},acd8:function(t,e,r){"use strict";var o=r("23e7"),n=r("7e12");o({global:!0,forced:parseFloat!==n},{parseFloat:n})},b636:function(t,e,r){"use strict";var o=r("e065");o("asyncIterator")},ba1b:function(t,e,r){"use strict";r.r(e);var o=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":t.handleBack}}),e("div",{staticClass:"mt-2"},[e("van-form",{ref:"orderForm",staticClass:"w-23/24 mx-auto",attrs:{"validate-first":"","validate-trigger":"onSubmit"}},[e("div",{staticClass:"shadow bg-white mb-4"},[e("div",{class:t.roomTypeColor[4]+" text-white py-2 px-4"},[t._v("卫生间")]),e("div",[e("van-field",{attrs:{placeholder:"请填写面积,单位平方米",name:"area",type:"number",label:"面积",rules:[{validator:t.validatorNum,message:"请填写面积"}]},scopedSlots:t._u([{key:"button",fn:function(){return[t._v("㎡")]},proxy:!0}]),model:{value:t.orderForm.area,callback:function(e){t.$set(t.orderForm,"area",e)},expression:"orderForm.area"}}),e("van-field",{attrs:{placeholder:"请填写周长,单位米",name:"round",type:"number",label:"周长",rules:[{validator:t.validatorNum,message:"请填写周长"}]},scopedSlots:t._u([{key:"button",fn:function(){return[t._v("m")]},proxy:!0}]),model:{value:t.orderForm.round,callback:function(e){t.$set(t.orderForm,"round",e)},expression:"orderForm.round"}})],1)])]),e("div",[e("div",[e("div",{staticClass:"bg-white w-23/24 mx-auto shadow mb-4"},[e("p",{staticClass:"bg-yellow-500 bg-opacity-80 text-white px-4 py-2"},[t._v(" 报价结果 ")]),e("div",{staticClass:"p-4"},[e("div",{staticClass:"pb-1"},[t._v(" 测量面积:"),e("span",{staticClass:"text-red-600"},[t._v(t._s(t.area)+" 平米")])]),e("div",[t._v(" 报价合计:"),e("span",{staticClass:"text-red-600"},[t._v(t._s(t.money)+" 元")])])])])]),e("div",{staticClass:"fixed bottom-0 left-0 w-full xl:w-800px xl:left-400pxh text-white"},[e("span",{staticClass:"inline-block w-2/3 bg-gray-400 py-3 text-center"},[t._v(" 总价:"+t._s(t.money)+" 元 ")]),e("span",{staticClass:"inline-block w-1/3 bg-yellow-500 py-3 text-center",on:{click:t.handleCalc}},[t._v("计算")])])])],1)],1)},n=[],a=r("c7eb"),i=r("1da1"),c=(r("4160"),r("a15b"),r("d81d"),r("14d9"),r("d3b7"),r("acd8"),r("e25e"),r("159b"),r("a3ea")),s=r("15e4"),u=r("200e"),d=r("9901"),l=r("ead7"),f={data:function(){return{activeNames:[],step:1,area:0,houseStyle:{},orderForm:{id:0,is_inclusive:0,param:[],is_elevator:1,floor_num:1,inclusive_area:0,customize:{}},orderID:0,submitLoading:!1,bidList:{0:{},1:{},2:{},3:{},4:{},5:{}},roomTypeColor:{1:"bg-blue-400",2:"bg-yellow-400",3:"bg-green-400",4:"bg-red-400",5:"bg-purple-400"},money:0,categoryMap:{},showHouseStylePicker:!1,orderCacheKey:"bid_order_key1"}},created:function(){var t=this;this.loadDetailInfo(),this.$route.query&&this.$route.query.pkg_id?this.orderForm.pkg_id=parseInt(this.$route.query.pkg_id):this.$notify("套餐 id 有误"),this.$route.query&&this.$route.query.order_id?this.loadOrderInfo(this.$route.query.order_id).then((function(e){t.orderForm.id=0,t.orderForm.customize={},t.is_inclusive=0,u["a"].set(t.orderCacheKey,t.orderForm),t.loadParams(),t.$router.push({path:"/bid/detail",query:{pkg_id:t.orderForm.pkg_id}})})):(this.$route.params&&this.$route.params.order_id&&(this.orderID=parseInt(this.$route.params.order_id),this.orderCacheKey="bid_order_edit1"),this.loadParams(),"3"===this.$route.query.step&&(this.step=3,this.calc()))},methods:{handleSetting:function(){console.log(this.orderForm),this.calc()},loadOrderInfo:function(t){var e=this;return Object(i["a"])(Object(a["a"])().mark((function r(){return Object(a["a"])().wrap((function(r){while(1)switch(r.prev=r.next){case 0:return e.$store.commit("loading/showLoading"),r.next=3,Object(s["d"])(t).then((function(t){var r=t.data.orderInfo;e.orderForm={id:r.id,pkg_id:r.pkg_id,customer_name:r.customer_name,customer_phone:r.customer_phone,house_address:r.house_address,roomText:r.room_text,house_style:r.house_style_decode,customize:r.customize_decode,is_elevator:r.is_elevator,floor_num:r.floor_num,inclusive_area:r.inclusive_area,area:r.house_area,param:e.formatParam(r.param_decode)},u["a"].set(e.orderCacheKey,e.orderForm),e.$store.commit("loading/hideLoading")}));case 3:case"end":return r.stop()}}),r)})))()},formatParam:function(t){var e=[];return t.forEach((function(t,r){t["room_type"]>0&&(delete t["items"],e.push(t))})),e},loadParams:function(){var t=this;Object(l["a"])({params:"material_bid_category"}).then((function(e){var r=t,o={};e.data.material_bid_category.forEach((function(t){Object.prototype.hasOwnProperty.call(r.orderForm.customize,t.id)?o[t.id]=r.orderForm.customize[t.id]:2===t.level&&(o[t.id]=[]),r.categoryMap[t.id]=t.name})),console.log(o),t.orderForm.customize=o,console.log(t.orderForm)}))},changeCustomize:function(t){if(""===t)return!1;this.calc()},addCustomize:function(t){this.$router.push({path:"/bid/customize",query:{pkg_id:this.orderForm.pkg_id,category:t,order_id:this.orderID}})},handleBack:function(){this.step=this.step-1,console.log(this.step),this.step<1&&this.$router.push("/")},validatorNum:function(t){return""!==t&&t>0},parseOrderForm:function(){var t=Object(d["a"])(this.orderForm);for(var e in t.floor_num=isNaN(parseInt(t.floor_num))?1:parseInt(t.floor_num),t.inclusive_area=isNaN(parseInt(t.inclusive_area))?0:parseInt(t.inclusive_area),t.area=isNaN(parseFloat(t.area))?0:parseFloat(t.area),t.round=isNaN(parseFloat(t.round))?0:parseFloat(t.round),t.param.map((function(t){return t.area=isNaN(parseFloat(t.area))?0:parseFloat(t.area),t.round=isNaN(parseFloat(t.round))?0:parseFloat(t.round),t.hole=isNaN(parseFloat(t.hole))?0:parseFloat(t.hole),t.window=isNaN(parseFloat(t.window))?0:parseFloat(t.window),t})),t.customize)console.log(t.customize[e]),t.customize[e].map((function(t){return t.num=isNaN(parseFloat(t.num))?0:parseFloat(t.num),t}));return t},handleCalc:function(){var t=this;this.$refs.orderForm.validate(["area","hole","round"]).then((function(){t.calc()})).catch((function(e){t.$notify(e[0].message)}))},calc:function(){var t=this,e=this.parseOrderForm();this.$store.commit("loading/showLoading"),Object(c["b"])(e).then((function(e){t.money=e.data.money.toLocaleString(),t.area=e.data.area,t.bidList=e.data.bidList,t.$store.commit("loading/hideLoading")}))},loadDetailInfo:function(){var t=this;this.$store.commit("loading/showLoading"),Object(c["e"])().then((function(e){t.roomTypes=e.data.roomTypes,t.houseStyle=e.data.houseStyle,t.$store.commit("loading/hideLoading")}))},handleSubmitUser:function(){var t=this;this.$refs.userForm.validate(["customer_name","customer_phone","address","room_text"]).then((function(){t.step=2,console.log(t.orderForm)})).catch((function(e){t.$notify(e[0].message)}))},handleSubmitOrder:function(){var t=this,e=this.parseOrderForm();this.submitLoading=!0,e.id>0?Object(s["f"])(e.id,e).then((function(e){var r=t;r.$toast.success({message:"保存成功",duration:1e3,onClose:function(){r.submitLoading=!1,r.$router.push("/bid/orders")}})})):Object(s["a"])(e).then((function(e){var r=t;r.$toast.success({message:"保存成功",duration:1e3,onClose:function(){r.submitLoading=!1,r.$router.push("/bid/orders")}})}))},onConfirm:function(t){for(var e=[],r=[],o=[],n=0;n1&&(t[n]["num"]=t[n]["num"]-1);for(var a=1;a<=t[n]["num"];a++)o.push({room_name:t[n]["type_name"]+a,room_type:parseInt(t[n]["room_type"]),area:"",round:"",hole:""})}var i=this.orderForm;i.roomText=e.join(" "),i.house_style=r,i.param=o,this.orderForm=Object(d["a"])(i),this.showHouseStylePicker=!1}}},h=f,p=(r("d458"),r("2877")),m=Object(p["a"])(h,o,n,!1,null,null,null);e["default"]=m.exports},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));r("a4d3"),r("e01a"),r("b636"),r("d28b"),r("944a"),r("d9e2"),r("d401"),r("4160"),r("14d9"),r("26e9"),r("fb6a"),r("0c47"),r("23dc"),r("7a82"),r("3410"),r("131a"),r("d3b7"),r("3ca3"),r("159b"),r("ddb0");var o=r("53ca");function n(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ n=function(){return e};var t,e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",d=c.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,o){var n=e&&e.prototype instanceof g?e:g,a=Object.create(n.prototype),c=new C(o||[]);return i(a,"_invoke",{value:N(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="suspendedYield",v="executing",y="completed",b={};function g(){}function w(){}function _(){}var O={};l(O,s,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(I([])));j&&j!==r&&a.call(j,s)&&(O=j);var F=_.prototype=g.prototype=Object.create(O);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(n,i,c,s){var u=h(t[n],t,i);if("throw"!==u.type){var d=u.arg,l=d.value;return l&&"object"==Object(o["a"])(l)&&a.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,c,s)}),(function(t){r("throw",t,c,s)})):e.resolve(l).then((function(t){d.value=t,c(d)}),(function(t){return r("throw",t,c,s)}))}s(u.arg)}var n;i(this,"_invoke",{value:function(t,o){function a(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(a,a):a()}})}function N(e,r,o){var n=p;return function(a,i){if(n===v)throw Error("Generator is already running");if(n===y){if("throw"===a)throw i;return{value:t,done:!0}}for(o.method=a,o.arg=i;;){var c=o.delegate;if(c){var s=S(c,o);if(s){if(s===b)continue;return s}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(n===p)throw n=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=v;var u=h(e,r,o);if("normal"===u.type){if(n=o.done?y:m,u.arg===b)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(n=y,o.method="throw",o.arg=u.arg)}}}function S(e,r){var o=r.method,n=e.iterator[o];if(n===t)return r.delegate=null,"throw"===o&&e.iterator["return"]&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),b;var a=h(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,b;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function $(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n=0;--n){var i=this.tryEntries[n],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),$(r),b}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;$(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:I(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),b}},e}},d458:function(t,e,r){"use strict";r("a68d")},d81d:function(t,e,r){"use strict";var o=r("23e7"),n=r("b727").map,a=r("1dde"),i=a("map");o({target:"Array",proto:!0,forced:!i},{map:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},ead7:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var o=r("0088");function n(t){return Object(o["a"])({url:"params",method:"get",params:t})}}}]);