1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7e8c5b14"],{4270:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("van-search",{staticClass:"mb-2 shadow",attrs:{placeholder:"请输入关键字","show-action":""},on:{search:t.refresh,clear:t.refresh},model:{value:t.query.abstract,callback:function(e){t.$set(t.query,"abstract",e)},expression:"query.abstract"}}),r("van-empty",{directives:[{name:"show",rawName:"v-show",value:t.showEmpty,expression:"showEmpty"}],attrs:{description:"暂无核算单"}}),r("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(e,n){return r("div",{key:n,staticClass:"text-sm"},[r("div",{staticClass:"bg-white mb-4 w-23/24 mx-auto shadow"},[r("div",{staticClass:"mx-auto px-4 py-2 flex justify-between items-center"},[r("p",{staticClass:"text-yellow-600 font-bold onerem"},[t._v(t._s(e.calcName))]),r("div",{staticClass:"onerem"},[t._v(" "+t._s(t.dateFormat("YYYY-mm-dd HH:MM",new Date(1e3*e.updated_at)))+" ")])]),r("div",{staticClass:"px-4 pt-2 pb-2 justify-between"},[r("div",t._l(Object.keys(t.jsonObject(e.abstract).prop),(function(n,a){return r("div",{key:a,staticClass:"pb-1",staticStyle:{width:"90%",display:"flex","margin-left":"5%"}},[r("p",{staticClass:"font-bold"},[t._v(t._s(n)+":")]),r("span",[t._v(t._s(t.jsonObject(e.abstract).prop[n].toString()))])])})),0),r("div",t._l(Object.keys(t.jsonObject(e.abstract).results),(function(n,a){return r("div",{key:a,staticClass:"pb-1",staticStyle:{width:"90%",display:"flex","margin-left":"5%"}},[r("p",{staticClass:"font-bold"},[t._v(t._s(n)+":")]),r("span",[t._v(t._s(t.jsonObject(e.abstract).results[n].toString()))])])})),0)]),r("div",{staticClass:"\n text-left\n border-gray-300 border-t border-dashed\n pt-2\n mt-2\n px-4\n pb-2\n "},[r("div",{staticClass:"mb-2 ml-2"},[r("van-button",{attrs:{type:"info",size:"small",to:"/calc/detail?order_id="+e.id}},[t._v("详情")]),r("van-button",{staticClass:"ml-2 ml-4",attrs:{type:"danger",size:"small"},on:{click:function(r){return t.handleDel(e.id)}}},[t._v("删除")])],1)])])])})),0)],1)},a=[],s=(r("b3d9"),r("d8ae")),i=r("afd4"),o={data:function(){return{orderList:[],loading:!1,error:!1,query:{page:1,abstract:""},finished:!1,showEmpty:!1}},created:function(){this.loadOrderList()},methods:{dateFormat:i["a"],jsonObject:function(t){if("string"==typeof t)try{return JSON.parse(t)}catch(e){return{}}return t instanceof Object?t:{}},handleDel:function(t){var e=this;this.$dialog.confirm({title:"提示",message:"确认要删除订单吗?"}).then((function(){Object(s["b"])("/order/del/"+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},loadOrderList:function(){var t=this;this.loading=!0,Object(s["b"])("/orders",this.query).then((function(e){t.loading=!1,e.data.count<=t.orderList.length&&(t.finished=!0),t.orderList=t.orderList.concat(e.data.list),0===t.orderList.length?t.showEmpty=!0:t.showEmpty=!1,t.query.page++})).catch((function(e){console.log(e),t.loading=!1,t.error=!0}))}}},c=o,d=(r("f8c6"),r("cba8")),l=Object(d["a"])(c,n,a,!1,null,"1d1b72a0",null);e["default"]=l.exports},ac90:function(t,e,r){},afd4:function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return a}));r("7926"),r("89a8"),r("d5ee"),r("4c1e"),r("87bf"),r("cea3"),r("6370"),r("d1ba"),r("7008");function n(t,e){var r,n={"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 a in n)r=new RegExp("("+a+")").exec(t),r&&(t=t.replace(r[1],1==r[1].length?n[a]:n[a].padStart(r[1].length,"0")));return t}function a(t){if("string"===typeof t)try{return JSON.parse(t)}catch(e){return[]}return t instanceof Array?t:[]}},b3d9:function(t,e,r){"use strict";var n=r("88d4"),a=r("8735"),s=r("9ad2"),i=r("b595"),o=r("bf1f"),c=r("ac3c"),d=r("126a"),l=r("c40a"),u=r("492f"),f=r("3a6d"),h=r("d0ff"),p=r("0116"),b=h("isConcatSpreadable"),g=9007199254740991,m="Maximum allowed index exceeded",v=a.TypeError,y=p>=51||!s((function(){var t=[];return t[b]=!1,t.concat()[0]!==t})),w=f("concat"),x=function(t){if(!o(t))return!1;var e=t[b];return void 0!==e?!!e:i(t)},_=!y||!w;n({target:"Array",proto:!0,forced:_},{concat:function(t){var e,r,n,a,s,i=c(this),o=u(i,0),f=0;for(e=-1,n=arguments.length;e<n;e++)if(s=-1===e?i:arguments[e],x(s)){if(a=d(s),f+a>g)throw v(m);for(r=0;r<a;r++,f++)r in s&&l(o,f,s[r])}else{if(f>=g)throw v(m);l(o,f++,s)}return o.length=f,o}})},d8ae:function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return s}));var n=r("0f62");function a(t,e){return Object(n["a"])({url:t,method:"post",data:e})}function s(t,e){return Object(n["a"])({url:t,method:"get",params:e})}},f8c6:function(t,e,r){"use strict";r("ac90")}}]);
|