chunk-76235eb7.5d7e5537.js 26 KB

123
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76235eb7"],{"083a":function(e,t,r){"use strict";var o=r("0d51"),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw new n("Cannot delete property "+o(t)+" of "+o(e))}},"0868":function(e,t,r){},"0c47":function(e,t,r){"use strict";var o=r("da84"),n=r("d44e");n(o.JSON,"JSON",!0)},"131a":function(e,t,r){"use strict";var o=r("23e7"),n=r("d2bb");o({target:"Object",stat:!0},{setPrototypeOf:n})},"14d9":function(e,t,r){"use strict";var o=r("23e7"),n=r("7b0b"),a=r("07fa"),i=r("3a34"),s=r("3511"),c=r("d039"),u=c((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},d=u||!l();o({target:"Array",proto:!0,arity:1,forced:d},{push:function(e){var t=n(this),r=a(t),o=arguments.length;s(r+o);for(var c=0;c<o;c++)t[r]=arguments[c],r++;return i(t,r),r}})},"15e4":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"d",(function(){return a})),r.d(t,"e",(function(){return i})),r.d(t,"f",(function(){return s})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return u}));var o=r("0088");function n(e){return Object(o["a"])({url:"bid/orders",method:"post",data:e})}function a(e){return Object(o["a"])({url:"bid/orders/".concat(e),method:"get"})}function i(e){return Object(o["a"])({url:"bid/orders",method:"get",params:e})}function s(e,t){return Object(o["a"])({url:"bid/orders/".concat(e),method:"put",data:t})}function c(e){return Object(o["a"])({url:"bid/orders/".concat(e,"/export"),method:"get"})}function u(e){return Object(o["a"])({url:"bid/orders/".concat(e),method:"delete"})}},"1da1":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));r("d3b7");function o(e,t,r,o,n,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(o,n)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,c,"next",e)}function c(e){o(i,n,a,s,c,"throw",e)}s(void 0)}))}}},"200e":function(e,t,r){"use strict";var o="Material-Storage";t["a"]={get:function(e){var t=window.localStorage.getItem(o+"_"+e);return t?window.JSON.parse(t):""},set:function(e,t){window.localStorage.setItem(o+"_"+e,window.JSON.stringify(t))},del:function(e,t){window.localStorage.removeItem(o+"_"+e)}}},"23dc":function(e,t,r){"use strict";var o=r("d44e");o(Math,"Math",!0)},"26e9":function(e,t,r){"use strict";var o=r("23e7"),n=r("e330"),a=r("e8b5"),i=n([].reverse),s=[1,2];o({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),i(this)}})},3410:function(e,t,r){"use strict";var o=r("23e7"),n=r("d039"),a=r("7b0b"),i=r("e163"),s=r("e177"),c=n((function(){i(1)}));o({target:"Object",stat:!0,forced:c,sham:!s},{getPrototypeOf:function(e){return i(a(e))}})},3511:function(e,t,r){"use strict";var o=TypeError,n=9007199254740991;e.exports=function(e){if(e>n)throw o("Maximum allowed index exceeded");return e}},"3a34":function(e,t,r){"use strict";var o=r("83ab"),n=r("e8b5"),a=TypeError,i=Object.getOwnPropertyDescriptor,s=o&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=s?function(e,t){if(n(e)&&!i(e,"length").writable)throw new a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},"7a82":function(e,t,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(e,t,r){"use strict";var o=r("da84"),n=r("d039"),a=r("e330"),i=r("577e"),s=r("58a8").trim,c=r("5899"),u=a("".charAt),l=o.parseFloat,d=o.Symbol,h=d&&d.iterator,f=1/l(c+"-0")!==-1/0||h&&!n((function(){l(Object(h))}));e.exports=f?function(e){var t=s(i(e)),r=l(t);return 0===r&&"-"===u(t,0)?-0:r}:l},"944a":function(e,t,r){"use strict";var o=r("d066"),n=r("e065"),a=r("d44e");n("toStringTag"),a(o("Symbol"),"Symbol")},9901:function(e,t,r){"use strict";r.d(t,"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(e){if(!e&&"object"!==Object(o["a"])(e))throw new Error("error arguments","shallowClone");var t=e.constructor===Array?[]:{};return Object.keys(e).forEach((function(r){e[r]&&"object"===Object(o["a"])(e[r])?t[r]=n(e[r]):t[r]=e[r]})),t}},a15b:function(e,t,r){"use strict";var o=r("23e7"),n=r("e330"),a=r("44ad"),i=r("fc6a"),s=r("a640"),c=n([].join),u=a!==Object,l=u||!s("join",",");o({target:"Array",proto:!0,forced:l},{join:function(e){return c(i(this),void 0===e?",":e)}})},a3ea:function(e,t,r){"use strict";r.d(t,"f",(function(){return n})),r.d(t,"e",(function(){return a})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s})),r.d(t,"d",(function(){return c})),r.d(t,"c",(function(){return u}));var o=r("0088");function n(e){return Object(o["a"])({url:"bid/outline",method:"get",params:e})}function a(){return Object(o["a"])({url:"bid/detail",method:"get"})}function i(e){return Object(o["a"])({url:"bid/detail_calc",method:"post",data:e})}function s(e){return Object(o["a"])({url:"bid/detail_calc_toilet",method:"post",data:e})}function c(e){return Object(o["a"])({url:"bids",method:"get",params:e})}function u(e){return Object(o["a"])({url:"bid/export",method:"get",params:{pkg_id:e}})}},a434:function(e,t,r){"use strict";var o=r("23e7"),n=r("7b0b"),a=r("23cb"),i=r("5926"),s=r("07fa"),c=r("3a34"),u=r("3511"),l=r("65f0"),d=r("8418"),h=r("083a"),f=r("1dde"),m=f("splice"),p=Math.max,v=Math.min;o({target:"Array",proto:!0,forced:!m},{splice:function(e,t){var r,o,f,m,y,b,g=n(this),_=s(g),w=a(e,_),x=arguments.length;for(0===x?r=o=0:1===x?(r=0,o=_-w):(r=x-2,o=v(p(i(t),0),_-w)),u(_+r-o),f=l(g,o),m=0;m<o;m++)y=w+m,y in g&&d(f,m,g[y]);if(f.length=o,r<o){for(m=w;m<_-o;m++)y=m+o,b=m+r,y in g?g[b]=g[y]:h(g,b);for(m=_;m>_-o+r;m--)h(g,m-1)}else if(r>o)for(m=_-o;m>w;m--)y=m+o-1,b=m+r-1,y in g?g[b]=g[y]:h(g,b);for(m=0;m<r;m++)g[m+w]=arguments[m+2];return c(g,_-o+r),f}})},acd8:function(e,t,r){"use strict";var o=r("23e7"),n=r("7e12");o({global:!0,forced:parseFloat!==n},{parseFloat:n})},b636:function(e,t,r){"use strict";var o=r("e065");o("asyncIterator")},c140:function(e,t,r){"use strict";r("0868")},c7eb:function(e,t,r){"use strict";r.d(t,"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(){
  2. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  3. n=function(){return t};var e,t={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,o){var n=t&&t.prototype instanceof g?t:g,a=Object.create(n.prototype),s=new E(o||[]);return i(a,"_invoke",{value:S(e,r,s)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var m="suspendedStart",p="suspendedYield",v="executing",y="completed",b={};function g(){}function _(){}function w(){}var x={};d(x,c,(function(){return this}));var F=Object.getPrototypeOf,O=F&&F(F(I([])));O&&O!==r&&a.call(O,c)&&(x=O);var k=w.prototype=g.prototype=Object.create(x);function j(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function r(n,i,s,c){var u=f(e[n],e,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==Object(o["a"])(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,c)}),(function(e){r("throw",e,s,c)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,c)}))}c(u.arg)}var n;i(this,"_invoke",{value:function(e,o){function a(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(a,a):a()}})}function S(t,r,o){var n=m;return function(a,i){if(n===v)throw Error("Generator is already running");if(n===y){if("throw"===a)throw i;return{value:e,done:!0}}for(o.method=a,o.arg=i;;){var s=o.delegate;if(s){var c=L(s,o);if(c){if(c===b)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(n===m)throw n=y,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=v;var u=f(t,r,o);if("normal"===u.type){if(n=o.done?y:p,u.arg===b)continue;return{value:u.arg,done:o.done}}"throw"===u.type&&(n=y,o.method="throw",o.arg=u.arg)}}}function L(t,r){var o=r.method,n=t.iterator[o];if(n===e)return r.delegate=null,"throw"===o&&t.iterator["return"]&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),b;var a=f(n,t.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[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function $(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach($,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n<t.length;)if(a.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(Object(o["a"])(t)+" is not iterable")}return _.prototype=w,i(k,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=d(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,d(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},j(C.prototype),d(C.prototype,u,(function(){return this})),t.AsyncIterator=C,t.async=function(e,r,o,n,a){void 0===a&&(a=Promise);var i=new C(h(e,r,o,n),a);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(k),d(k,l,"Generator"),d(k,c,(function(){return this})),d(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var o in t)r.push(o);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=I,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(o,n){return s.type="throw",s.arg=t,r.next=o,n&&(r.method="next",r.arg=e),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var n=o;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var i=n?n.completion:{};return i.type=e,i.arg=t,n?(this.method="next",this.next=n.finallyLoc,b):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),b},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),N(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var o=r.completion;if("throw"===o.type){var n=o.arg;N(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(t,r,o){return this.delegate={iterator:I(t),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=e),b}},t}},d81d:function(e,t,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(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},ddfa:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e._self._c;return t("div",[t("van-nav-bar",{staticClass:"shadow mb-4",attrs:{title:"报价精算","left-text":"返回","left-arrow":""},on:{"click-left":e.handleBack}}),t("div",{staticClass:"mt-2"},[1==e.step?t("div",{staticClass:"w-23/24 mx-auto"},[t("van-form",{ref:"userForm",staticClass:"bg-white shadow",attrs:{"validate-first":"","validate-trigger":"onSubmit"}},[t("p",{staticClass:"bg-yellow-600 bg-opacity-80 text-white px-4 py-2"},[e._v(" 添加客户信息 ")]),t("van-field",{attrs:{name:"customer_name",label:"客户名称",placeholder:"客户名称",rules:[{required:!0,message:"请填写客户名称"}]},model:{value:e.orderForm.customer_name,callback:function(t){e.$set(e.orderForm,"customer_name",t)},expression:"orderForm.customer_name"}}),t("van-field",{attrs:{type:"number",name:"customer_phone",label:"客户电话",placeholder:"客户电话",rules:[{required:!0,message:"请填写客户电话"},{pattern:/^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|162|166|198|199|191|(147))\d{8}$/,message:"手机号码格式错误!"}]},model:{value:e.orderForm.customer_phone,callback:function(t){e.$set(e.orderForm,"customer_phone",t)},expression:"orderForm.customer_phone"}}),t("van-field",{attrs:{name:"address",label:"房屋地址",placeholder:"房屋地址",rules:[{required:!0,message:"请填写房屋地址"}]},model:{value:e.orderForm.house_address,callback:function(t){e.$set(e.orderForm,"house_address",t)},expression:"orderForm.house_address"}}),t("van-field",{staticClass:"text-gray-600",attrs:{type:"number",name:"area",label:"外框面积",placeholder:"外框面积",rules:[{required:!0,message:"请填写外框面积"}]},model:{value:e.orderForm.area,callback:function(t){e.$set(e.orderForm,"area",t)},expression:"orderForm.area"}}),t("van-field",{attrs:{name:"room_text",label:"房屋户型",placeholder:"房屋户型",readonly:"",rules:[{required:!0,message:"请选择户型"}]},on:{click:function(t){e.showHouseStylePicker=!0}},model:{value:e.orderForm.roomText,callback:function(t){e.$set(e.orderForm,"roomText",t)},expression:"orderForm.roomText"}}),t("van-popup",{attrs:{position:"bottom"},model:{value:e.showHouseStylePicker,callback:function(t){e.showHouseStylePicker=t},expression:"showHouseStylePicker"}},[t("van-picker",{attrs:{"show-toolbar":"",columns:e.houseStyle,"value-key":"name"},on:{confirm:e.onConfirm}})],1)],1),t("van-button",{staticClass:"mt-4",attrs:{block:"",type:"info","loading-text":"加载中...","native-type":"submit"},on:{click:e.handleSubmitUser}},[e._v("下一步")])],1):e._e(),2==e.step?t("van-form",{ref:"orderForm",staticClass:"w-23/24 mx-auto",attrs:{"validate-first":"","validate-trigger":"onSubmit"}},[e._l(e.orderForm.param,(function(r,o){return t("div",{key:o,staticClass:"shadow bg-white mb-4"},[t("div",{class:e.roomTypeColor[r.room_type]+" text-white py-2 px-4"},[e._v(" "+e._s(r.room_name)+" ")]),t("div",[t("van-field",{attrs:{placeholder:"请填写面积,单位平方米",name:"area",type:"number",label:"面积",rules:[{validator:e.validatorNum,message:"请填写面积"}]},scopedSlots:e._u([{key:"button",fn:function(){return[e._v("㎡")]},proxy:!0}],null,!0),model:{value:r.area,callback:function(t){e.$set(r,"area",t)},expression:"item.area"}}),1!=r.room_type?t("van-field",{attrs:{placeholder:"请填写周长,单位米",name:"round",type:"number",label:"周长",rules:[{validator:e.validatorNum,message:"请填写周长"}]},scopedSlots:e._u([{key:"button",fn:function(){return[e._v("m")]},proxy:!0}],null,!0),model:{value:r.round,callback:function(t){e.$set(r,"round",t)},expression:"item.round"}}):e._e()],1)])})),t("div",{staticClass:"fixed bottom-0 left-0 w-full xl:w-800px xl:left-400pxh text-white bg-blue-500 text-center py-3",on:{click:e.handleCalc}},[e._v(" 下一步 ")])],2):e._e(),3==e.step?t("div",[t("div",[t("div",{staticClass:"bg-white w-23/24 mx-auto shadow mb-4"},[t("p",{staticClass:"bg-yellow-500 bg-opacity-80 text-white px-4 py-2"},[e._v(" 报价结果 ")]),t("div",{staticClass:"p-4"},[t("div",{staticClass:"pb-1"},[e._v(" 测量面积:"),t("span",{staticClass:"text-red-600"},[e._v(e._s(e.area)+" 平米")])]),t("div",[e._v(" 报价合计:"),t("span",{staticClass:"text-red-600"},[e._v(e._s(e.money)+" 元")])])])]),t("div",{staticClass:"bg-white w-23/24 mx-auto shadow mb-4"},[t("p",{staticClass:"bg-green-500 bg-opacity-80 text-white px-4 py-2"},[e._v(" 套餐设置 ")]),t("div",{staticClass:"p-4"},[t("van-cell",{attrs:{center:"",title:"有无电梯"},scopedSlots:e._u([{key:"right-icon",fn:function(){return[t("van-switch",{attrs:{"active-value":1,"inactive-value":0,size:"24"},on:{change:e.handleSetting},model:{value:e.orderForm.is_elevator,callback:function(t){e.$set(e.orderForm,"is_elevator",t)},expression:"orderForm.is_elevator"}})]},proxy:!0}],null,!1,2607149545)}),t("van-cell",{attrs:{center:"",title:"所在楼层"},scopedSlots:e._u([{key:"right-icon",fn:function(){return[t("van-field",{staticClass:"border w-2/5 px-4 py-1",attrs:{type:"number",placeholder:"请输入楼层",size:"mini"},on:{change:e.handleSetting},model:{value:e.orderForm.floor_num,callback:function(t){e.$set(e.orderForm,"floor_num",t)},expression:"orderForm.floor_num"}})]},proxy:!0}],null,!1,1977807137)}),t("van-cell",{attrs:{center:"",title:"定制品面积"},scopedSlots:e._u([{key:"right-icon",fn:function(){return[t("van-field",{staticClass:"border w-2/5 px-4 py-1",attrs:{type:"number",placeholder:"请输入定制品面积",size:"mini"},on:{change:e.handleSetting},model:{value:e.orderForm.inclusive_area,callback:function(t){e.$set(e.orderForm,"inclusive_area",t)},expression:"orderForm.inclusive_area"}})]},proxy:!0}],null,!1,1102621650)}),t("van-notice-bar",{attrs:{"left-icon":"info-o"}},[e._v("复式楼、别墅户内按无电梯计算")])],1)]),t("div",{staticClass:"bg-white w-23/24 mx-auto shadow"},[t("p",{staticClass:"bg-green-500 bg-opacity-80 text-white px-4 py-2"},[e._v(" 报价项目 ")]),t("van-collapse",{attrs:{accordion:""},model:{value:e.activeNames,callback:function(t){e.activeNames=t},expression:"activeNames"}},e._l(e.bidList,(function(r,o){return t("van-collapse-item",{key:o,attrs:{title:r.room_name,name:r.room_name,size:"large"}},e._l(r.bid_item,(function(r,o){return t("div",{key:o},[r.length>0?t("div",{staticClass:"mb-4"},[t("div",{staticClass:"font-bold bg-red-400 text-white px-2 py-1"},[e._v(" "+e._s(e.categoryMap[o])+" ")]),t("div",{staticClass:"border px-2 py-1 border-red-400"},e._l(r,(function(r,o){return t("div",{key:o},[e._v(" "+e._s(r.type_names)+" "+e._s(r.bid_name)+" ")])})),0)]):e._e()])})),0)})),1)],1)]),t("div",{staticClass:"fixed bottom-0 left-0 w-full xl:w-800px xl:left-400pxh text-white"},[t("span",{staticClass:"inline-block w-2/3 bg-gray-400 py-3 text-center"},[e._v(" 总价:"+e._s(e.money)+" 元 ")]),t("span",{staticClass:"inline-block w-1/3 bg-yellow-500 py-3 text-center",attrs:{loading:e.submitLoading},on:{click:e.handleSubmitOrder}},[e._v("保存")])])]):e._e()],1)],1)},n=[],a=r("c7eb"),i=r("1da1"),s=(r("4160"),r("a15b"),r("d81d"),r("14d9"),r("a434"),r("d3b7"),r("acd8"),r("e25e"),r("159b"),r("a3ea")),c=r("15e4"),u=r("200e"),l=r("9901"),d=r("ead7"),h={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 e=this;this.loadDetailInfo(),this.$route.query&&this.$route.query.pkg_id?(this.orderForm.pkg_id=parseInt(this.$route.query.pkg_id),this.orderCacheKey=this.orderCacheKey+"_"+this.orderForm.pkg_id):this.$notify("套餐 id 有误"),this.$route.query&&this.$route.query.order_id?this.loadOrderInfo(this.$route.query.order_id).then((function(t){e.orderForm.id=0,e.orderForm.customize={},e.is_inclusive=0,u["a"].set(e.orderCacheKey,e.orderForm),e.loadParams(),e.$router.push({path:"/bid/detail",query:{pkg_id:e.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.orderID>0&&"3"!==this.$route.query.step?this.loadOrderInfo(this.orderID):this.loadOrderCache(),this.loadParams(),"3"===this.$route.query.step&&(this.step=3,this.calc()))},methods:{handleSetting:function(){console.log(this.orderForm),this.calc()},loadOrderInfo:function(e){var t=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 t.$store.commit("loading/showLoading"),r.next=3,Object(c["d"])(e).then((function(e){var r=e.data.orderInfo;t.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:t.formatParam(r.param_decode)},u["a"].set(t.orderCacheKey,t.orderForm),t.$store.commit("loading/hideLoading")}));case 3:case"end":return r.stop()}}),r)})))()},formatParam:function(e){var t=[];return e.forEach((function(e,r){e["room_type"]>0&&(delete e["items"],t.push(e))})),t},loadParams:function(){var e=this;Object(d["a"])({params:"material_bid_category"}).then((function(t){var r=e,o={};t.data.material_bid_category.forEach((function(e){Object.prototype.hasOwnProperty.call(r.orderForm.customize,e.id)?o[e.id]=r.orderForm.customize[e.id]:2===e.level&&(o[e.id]=[]),r.categoryMap[e.id]=e.name})),console.log(o),e.orderForm.customize=o,console.log(e.orderForm)}))},delCustomize:function(e,t){this.orderForm["customize"][e].splice(t,1),u["a"].set(this.orderCacheKey,this.orderForm),this.calc(),console.log(t)},changeCustomize:function(e){if(""===e)return!1;this.calc()},addCustomize:function(e){this.$router.push({path:"/bid/customize",query:{pkg_id:this.orderForm.pkg_id,category:e,order_id:this.orderID}})},handleBack:function(){this.step=this.step-1,console.log(this.step),this.step<1&&this.$router.push("/")},loadOrderCache:function(){u["a"].get(this.orderCacheKey)&&(this.orderForm=u["a"].get(this.orderCacheKey))},validatorNum:function(e){return""!==e&&e>0},parseOrderForm:function(){var e=Object(l["a"])(this.orderForm);for(var t in e.floor_num=isNaN(parseInt(e.floor_num))?1:parseInt(e.floor_num),e.inclusive_area=isNaN(parseInt(e.inclusive_area))?0:parseInt(e.inclusive_area),e.area=isNaN(parseFloat(e.area))?0:parseFloat(e.area),e.param.map((function(e){return e.area=isNaN(parseFloat(e.area))?0:parseFloat(e.area),e.round=isNaN(parseFloat(e.round))?0:parseFloat(e.round),e.hole=isNaN(parseFloat(e.hole))?0:parseFloat(e.hole),e.window=isNaN(parseFloat(e.window))?0:parseFloat(e.window),e})),e.customize)console.log(e.customize[t]),e.customize[t].map((function(e){return e.num=isNaN(parseFloat(e.num))?0:parseFloat(e.num),e}));return e},handleCalc:function(){var e=this;this.$refs.orderForm.validate(["area","hole","round"]).then((function(){e.calc()})).catch((function(t){e.$notify(t[0].message)}))},calc:function(){var e=this,t=this.parseOrderForm();this.$store.commit("loading/showLoading"),Object(s["a"])(t).then((function(t){e.money=t.data.money.toLocaleString(),e.area=t.data.area,e.bidList=t.data.bidList,u["a"].set(e.orderCacheKey,e.orderForm),e.step=3,e.$store.commit("loading/hideLoading")}))},loadDetailInfo:function(){var e=this;this.$store.commit("loading/showLoading"),Object(s["e"])().then((function(t){e.roomTypes=t.data.roomTypes,e.houseStyle=t.data.houseStyle,e.$store.commit("loading/hideLoading")}))},handleSubmitUser:function(){var e=this;this.$refs.userForm.validate(["customer_name","customer_phone","address","room_text"]).then((function(){u["a"].set(e.orderCacheKey,e.orderForm),e.step=2,console.log(e.orderForm)})).catch((function(t){e.$notify(t[0].message)}))},handleSubmitOrder:function(){var e=this,t=this.parseOrderForm();this.submitLoading=!0,t.id>0?Object(c["f"])(t.id,t).then((function(t){var r=e;u["a"].del(e.orderCacheKey),r.$toast.success({message:"保存成功",duration:1e3,onClose:function(){r.submitLoading=!1,r.$router.push("/bid/orders")}})})):Object(c["a"])(t).then((function(t){var r=e;u["a"].del(e.orderCacheKey),r.$toast.success({message:"保存成功",duration:1e3,onClose:function(){r.submitLoading=!1,r.$router.push("/bid/orders")}})}))},onConfirm:function(e){for(var t=[],r=[],o=[],n=0;n<e.length;n++){t.push(e[n]["name"]),r.push({type:parseInt(e[n]["room_type"]),num:e[n]["num"]}),2===parseInt(e[n]["room_type"])&&e[n]["num"]>1&&(e[n]["num"]=e[n]["num"]-1);for(var a=1;a<=e[n]["num"];a++)o.push({room_name:e[n]["type_name"]+a,room_type:parseInt(e[n]["room_type"]),area:"",round:1==parseInt(e[n]["room_type"])?1:"",hole:""})}var i=this.orderForm;i.roomText=t.join(" "),i.house_style=r,i.param=o,this.orderForm=Object(l["a"])(i),this.showHouseStylePicker=!1}}},f=h,m=(r("c140"),r("2877")),p=Object(m["a"])(f,o,n,!1,null,null,null);t["default"]=p.exports},ead7:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var o=r("0088");function n(e){return Object(o["a"])({url:"params",method:"get",params:e})}}}]);