12345678 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-bb92fb4e"],{"14d9":function(t,e,n){"use strict";var r=n("23e7"),o=n("7b0b"),i=n("07fa"),a=n("3a34"),c=n("3511"),u=n("d039"),s=u((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},d=s||!l();r({target:"Array",proto:!0,arity:1,forced:d},{push:function(t){var e=o(this),n=i(e),r=arguments.length;c(n+r);for(var u=0;u<r;u++)e[n]=arguments[u],n++;return a(e,n),n}})},"15e4":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return c})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return s}));var r=n("0088");function o(t){return Object(r["a"])({url:"bid/orders",method:"post",data:t})}function i(t){return Object(r["a"])({url:"bid/orders/".concat(t),method:"get"})}function a(t){return Object(r["a"])({url:"bid/orders",method:"get",params:t})}function c(t,e){return Object(r["a"])({url:"bid/orders/".concat(t),method:"put",data:e})}function u(t){return Object(r["a"])({url:"bid/orders/".concat(t,"/export"),method:"get"})}function s(t){return Object(r["a"])({url:"bid/orders/".concat(t),method:"delete"})}},3511:function(t,e,n){"use strict";var r=TypeError,o=9007199254740991;t.exports=function(t){if(t>o)throw r("Maximum allowed index exceeded");return t}},"3a34":function(t,e,n){"use strict";var r=n("83ab"),o=n("e8b5"),i=TypeError,a=Object.getOwnPropertyDescriptor,c=r&&!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(o(t)&&!a(t,"length").writable)throw new i("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},a3ea:function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"e",(function(){return i})),n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return s}));var r=n("0088");function o(t){return Object(r["a"])({url:"bid/outline",method:"get",params:t})}function i(){return Object(r["a"])({url:"bid/detail",method:"get"})}function a(t){return Object(r["a"])({url:"bid/detail_calc",method:"post",data:t})}function c(t){return Object(r["a"])({url:"bid/detail_calc_toilet",method:"post",data:t})}function u(t){return Object(r["a"])({url:"bids",method:"get",params:t})}function s(t){return Object(r["a"])({url:"bid/export",method:"get",params:{pkg_id:t}})}},b311:function(t,e,n){
- /*!
- * clipboard.js v2.0.11
- * https://clipboardjs.com/
- *
- * Licensed MIT © Zeno Rocha
- */
- (function(e,n){t.exports=n()})(0,(function(){return function(){var t={686:function(t,e,n){"use strict";n.d(e,{default:function(){return q}});var r=n(279),o=n.n(r),i=n(370),a=n.n(i),c=n(817),u=n.n(c);function s(t){try{return document.execCommand(t)}catch(e){return!1}}var l=function(t){var e=u()(t);return s("cut"),e},d=l;function f(t){var e="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[e?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=t,n}var p=function(t,e){var n=f(t);e.container.appendChild(n);var r=u()(n);return s("copy"),n.remove(),r},h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"===typeof t?n=p(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null===t||void 0===t?void 0:t.type)?n=p(t.value,e):(n=u()(t),s("copy")),n},y=h;function v(t){return v="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}var b=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,r=t.container,o=t.target,i=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==v(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return i?y(i,{container:r}):o?"cut"===n?d(o):y(o,{container:r}):void 0},m=b;function g(t){return g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function x(t,e,n){return e&&_(t.prototype,e),n&&_(t,n),t}function E(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&k(t,e)}function k(t,e){return k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},k(t,e)}function O(t){var e=L();return function(){var n,r=S(t);if(e){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function C(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?j(t):e}function j(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function L(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function T(t,e){var n="data-clipboard-".concat(t);if(e.hasAttribute(n))return e.getAttribute(n)}var A=function(t){E(n,t);var e=O(n);function n(t,r){var o;return w(this,n),o=e.call(this),o.resolveOptions(r),o.listenClick(t),o}return x(n,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"===typeof t.action?t.action:this.defaultAction,this.target="function"===typeof t.target?t.target:this.defaultTarget,this.text="function"===typeof t.text?t.text:this.defaultText,this.container="object"===g(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=a()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",r=m({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(r?"success":"error",{action:n,text:r,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return T("action",t)}},{key:"defaultTarget",value:function(t){var e=T("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return T("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return y(t,e)}},{key:"cut",value:function(t){return d(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"===typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}]),n}(o()),q=A},828:function(t){var e=9;if("undefined"!==typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}function r(t,n){while(t&&t.nodeType!==e){if("function"===typeof t.matches&&t.matches(n))return t;t=t.parentNode}}t.exports=r},438:function(t,e,n){var r=n(828);function o(t,e,n,r,o){var i=a.apply(this,arguments);return t.addEventListener(n,i,o),{destroy:function(){t.removeEventListener(n,i,o)}}}function i(t,e,n,r,i){return"function"===typeof t.addEventListener?o.apply(null,arguments):"function"===typeof n?o.bind(null,document).apply(null,arguments):("string"===typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return o(t,e,n,r,i)})))}function a(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e),n.delegateTarget&&o.call(t,n)}}t.exports=i},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"===typeof t||t instanceof String},e.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},370:function(t,e,n){var r=n(879),o=n(438);function i(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!r.string(e))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(t))return a(t,e,n);if(r.nodeList(t))return c(t,e,n);if(r.string(t))return u(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function a(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function c(t,e,n){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,n)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,n)}))}}}function u(t,e,n){return o(document.body,t,e,n)}t.exports=i},817:function(t){function e(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),o=document.createRange();o.selectNodeContents(t),r.removeAllRanges(),r.addRange(o),e=r.toString()}return e}t.exports=e},279:function(t){function e(){}e.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function o(){r.off(t,o),e.apply(n,arguments)}return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,o=n.length;for(r;r<o;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i++)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return function(){n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,{a:e}),e}}(),function(){n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})}}(),function(){n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),n(686)}().default}))},b583:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[e("van-dropdown-menu",[e("van-dropdown-item",{attrs:{options:t.stateList},on:{change:t.refresh},model:{value:t.query.state,callback:function(e){t.$set(t.query,"state",e)},expression:"query.state"}}),e("van-dropdown-item",{attrs:{options:t.areaList},on:{change:t.refresh},model:{value:t.query.area,callback:function(e){t.$set(t.query,"area",e)},expression:"query.area"}})],1),e("van-search",{staticClass:"mb-2 shadow",attrs:{placeholder:"客户姓名/手机/地址","show-action":""},on:{search:t.refresh,clear:t.refresh},model:{value:t.query.keyword,callback:function(e){t.$set(t.query,"keyword",e)},expression:"query.keyword"}}),e("van-empty",{directives:[{name:"show",rawName:"v-show",value:t.showEmpty,expression:"showEmpty"}],attrs:{description:"暂无报价单"}}),e("van-list",{staticClass:"mt-4",attrs:{finished:t.finished,error:t.error,"error-text":"请求失败,点击重新加载","finished-text":""},on:{"update:error":function(e){t.error=e},load:t.loadOrderList},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},t._l(t.orderList,(function(n,r){return e("div",{key:r,staticClass:"text-sm"},[e("div",{staticClass:"bg-white mb-4 w-23/24 mx-auto shadow"},[e("div",{class:"bg-"+n.state_color+" text-white mx-auto px-4 py-2 flex justify-between items-center"},[e("div",[t._v(t._s(n.created_at))]),e("span",[t._v(t._s(n.state_name))])]),e("div",{staticClass:"px-4 pt-4"},[e("div",{staticClass:"pb-1 text-yellow-600 font-bold"},[1==n.type?e("span",[t._v("概算报价")]):e("span",[t._v("套餐名称:"+t._s(n.pkg_name))])]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("客户姓名:")]),t._v(t._s(n.customer_name)+" ")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("客户手机:")]),t._v(t._s(n.customer_phone)+" ")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("房屋地址:")]),t._v(t._s(n.house_address)+" ")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("房屋面积:")]),t._v(t._s(n.house_area)+" ")]),e("div",{staticClass:"pb-1"},[e("span",{staticClass:"font-bold"},[t._v("报价金额:")]),t._v(t._s(n.total_price)+" ")])]),e("div",{staticClass:"text-left border-gray-300 border-t border-dashed pt-2 mt-2 px-4 pb-2"},[e("div",{staticClass:"mb-2"},[1==n.type?[e("van-button",{attrs:{type:"info",size:"small",to:"/bid/outline/"+n.id+"/info?pkg_id="+n.pkg_id}},[t._v("详情")])]:[e("van-button",{attrs:{type:"info",size:"small",to:"/bid/orders/"+n.id+"/info"}},[t._v("详情")]),n.auth.edit?e("van-button",{staticClass:"ml-2",attrs:{type:"warning",size:"small",to:"/bid/orders/"+n.id+"/edit?pkg_id="+n.pkg_id}},[t._v("编辑")]):t._e()],e("van-button",{staticClass:"ml-2",attrs:{type:"danger",size:"small"},on:{click:function(e){return t.handleDel(n.id)}}},[t._v("删除")])],2),e("div",[e("van-button",{attrs:{type:"primary",size:"small",to:"/bid/detail?pkg_id="+n.pkg_id+"&order_id="+n.id}},[t._v("复制添加")]),e("van-button",{staticClass:"ml-2",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleExport(n.id,1)}}},[t._v("预算表")]),e("van-button",{staticClass:"ml-2",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleExport(n.pkg_id,2)}}},[t._v("套餐说明表")])],1)])])])})),0),e("van-dialog",{attrs:{title:"下载提示","show-confirm-button":!1},model:{value:t.showDialog,callback:function(e){t.showDialog=e},expression:"showDialog"}},[e("div",{staticClass:"p-4 text-sm"},[e("div",[t._v("请复制链接到其它浏览器下载")]),e("div",{staticClass:"text-red-600 py-4"},[t._v(t._s(t.downloadUrl))])]),e("div",{staticClass:"flex text-center"},[e("div",{staticClass:"w-1/2 bg-gray-100 py-2",on:{click:function(e){t.showDialog=!1}}},[t._v(" 关闭 ")]),e("div",{staticClass:"copyDownload w-1/2 bg-blue-400 text-white py-2",attrs:{"data-clipboard-text":t.downloadUrl},on:{click:t.copy}},[t._v(" 一键复制 ")])])])],1)},o=[],i=(n("4160"),n("14d9"),n("d3b7"),n("159b"),n("b311")),a=n.n(i),c=n("a3ea"),u=n("15e4"),s=n("eaf8"),l=n("ead7"),d={data:function(){return{showDialog:!1,downloadUrl:"",orderList:[],loading:!1,error:!1,query:{page:1,state:-1,area:-1,keyword:""},areaList:[],stateList:[],finished:!1,showEmpty:!1}},created:function(){this.loadParams(),this.loadOrderList()},methods:{loadParams:function(){var t=this;Object(l["a"])({params:"material_bid_area,material_bid_order_state"}).then((function(e){var n=[{text:"选择面积",value:-1}];e.data.material_bid_area.forEach((function(t){n.push({text:t.name,value:t.id})})),t.areaList=n;var r=[{text:"工单状态",value:-1}];e.data.material_bid_order_state.forEach((function(t){r.push({text:t.name,value:t.id})})),t.stateList=r}))},handleDel:function(t){var e=this;this.$dialog.confirm({title:"提示",message:"确认要删除报价单吗?"}).then((function(){Object(u["b"])(t).then((function(t){e.$toast("操作成功"),e.refresh()})).catch((function(){}))})).catch((function(t){console.log(t)}))},handleCopy:function(){},refresh:function(){return this.finished=!1,this.loading=!1,this.error=!1,this.query.page=1,this.orderList=[],this.loadOrderList(),!0},handleExport:function(t,e){var n=this;this.exportLoading=!0,1===e?Object(u["c"])(t).then((function(t){n.exportCallback(t)})).catch((function(){n.exportLoading=!1})):Object(c["c"])(t).then((function(t){n.exportCallback(t)})).catch((function(){n.exportLoading=!1}))},exportCallback:function(t){if(Object(s["b"])())return this.downloadUrl=this.$env.baseUrl+t.data.path,void(this.showDialog=!0);this.$axios({url:this.$env.baseUrl+t.data.path,method:"get",responseType:"blob"}).then((function(e){Object(s["a"])(t.data.filename,e.data)})),this.exportLoading=!1},copy:function(){var t=this,e=new a.a(".copyDownload");e.on("success",(function(e){t.$toast("复制成功"),e.clearSelection()})),e.on("error",(function(e){t.$toast("复制失败")}))},loadOrderList:function(){var t=this;this.loading=!0,Object(u["e"])(this.query).then((function(e){for(var n in t.query.page=t.query.page+1,t.loading=!1,e.data.length<t.$store.getters.setting.page_size&&(t.finished=!0),e.data)t.orderList.push(e.data[n]);0===t.orderList.length?t.showEmpty=!0:t.showEmpty=!1})).catch((function(){t.loading=!1,t.error=!0}))}}},f=d,p=n("2877"),h=Object(p["a"])(f,r,o,!1,null,null,null);e["default"]=h.exports},ead7:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("0088");function o(t){return Object(r["a"])({url:"params",method:"get",params:t})}}}]);
|