12345678 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-13e4e2e4"],{"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}},f=s||!l();r({target:"Array",proto:!0,arity:1,forced:f},{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}})},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}},"4c2e":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t._self._c;return e("div",[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"},[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.pkg_name))])]),e("div",{staticClass:"text-right border-gray-300 border-t border-dashed pt-2 mt-2 px-4 pb-2"},[n.auth.edit?e("van-button",{staticClass:"ml-2",attrs:{type:"warning",size:"small",to:"/pick/orders/"+n.id+"/edit?pkg_id="+n.pkg_id}},[t._v("编辑")]):t._e(),n.auth.export?e("van-button",{staticClass:"ml-2",attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleExport(n.id)}}},[t._v("导出")]):t._e(),e("van-button",{staticClass:"ml-2",attrs:{type:"info",size:"small",to:"/pick/orders/"+n.id+"/info"}},[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("14d9"),n("b311")),a=n.n(i),c=n("629f"),u=n("eaf8"),s={data:function(){return{showDialog:!1,downloadUrl:"",orderList:[],loading:!1,error:!1,query:{page:1,keyword:""},finished:!1,showEmpty:!1}},created:function(){this.loadOrderList()},methods:{refresh:function(){return this.finished=!1,this.loading=!1,this.error=!1,this.query.page=1,this.orderList=[],this.loadOrderList(),!0},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("复制失败")}))},handleExport:function(t){var e=this;this.exportLoading=!0;var n=this;Object(c["b"])(t).then((function(t){if(Object(u["b"])())return e.downloadUrl=n.$env.baseUrl+t.data.path,void(e.showDialog=!0);e.$axios({url:n.$env.baseUrl+t.data.path,method:"get",responseType:"blob"}).then((function(e){Object(u["a"])(t.data.filename,e.data)})),e.exportLoading=!1})).catch((function(){e.exportLoading=!1}))},loadOrderList:function(){var t=this;this.loading=!0,Object(c["d"])(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}))}}},l=s,f=n("2877"),d=Object(f["a"])(l,r,o,!1,null,null,null);e["default"]=d.exports},"629f":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"e",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"d",(function(){return c})),n.d(e,"b",(function(){return u}));var r=n("0088");function o(t){return Object(r["a"])({url:"pick/orders",method:"post",data:t})}function i(t,e){return Object(r["a"])({url:"pick/orders/".concat(t),method:"put",data:e})}function a(t){return Object(r["a"])({url:"pick/orders/".concat(t),method:"get"})}function c(t){return Object(r["a"])({url:"pick/orders",method:"get",params:t})}function u(t){return Object(r["a"])({url:"pick/orders/".concat(t,"/export"),method:"get"})}},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},f=l;function d(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=d(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?f(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 x(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 _(t,e,n){return e&&x(t.prototype,e),n&&x(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 C(t){var e=T();return function(){var n,r=j(t);if(e){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return O(this,n)}}function O(t,e){return!e||"object"!==g(e)&&"function"!==typeof e?S(t):e}function S(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function T(){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 j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function L(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=C(n);function n(t,r){var o;return w(this,n),o=e.call(this),o.resolveOptions(r),o.listenClick(t),o}return _(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 L("action",t)}},{key:"defaultTarget",value:function(t){var e=L("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return L("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 f(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}))}}]);
|