CRMEB_PRO_M/public/view_store/js/chunk-5f6426f2.7b1665ad.js

1 line
14 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5f6426f2"],{"281a":function(t,e,r){},"90e7":function(t,e,r){"use strict";r.d(e,"F",(function(){return s})),r.d(e,"x",(function(){return o})),r.d(e,"y",(function(){return i})),r.d(e,"t",(function(){return a})),r.d(e,"D",(function(){return c})),r.d(e,"f",(function(){return u})),r.d(e,"d",(function(){return l})),r.d(e,"e",(function(){return m})),r.d(e,"s",(function(){return d})),r.d(e,"A",(function(){return f})),r.d(e,"B",(function(){return p})),r.d(e,"h",(function(){return _})),r.d(e,"G",(function(){return h})),r.d(e,"H",(function(){return g})),r.d(e,"z",(function(){return b})),r.d(e,"i",(function(){return v})),r.d(e,"k",(function(){return y})),r.d(e,"j",(function(){return k})),r.d(e,"l",(function(){return O})),r.d(e,"m",(function(){return j})),r.d(e,"C",(function(){return $})),r.d(e,"r",(function(){return w})),r.d(e,"a",(function(){return I})),r.d(e,"p",(function(){return C})),r.d(e,"b",(function(){return x})),r.d(e,"q",(function(){return M})),r.d(e,"c",(function(){return L})),r.d(e,"g",(function(){return F})),r.d(e,"I",(function(){return E})),r.d(e,"E",(function(){return D})),r.d(e,"n",(function(){return U})),r.d(e,"o",(function(){return R})),r.d(e,"w",(function(){return S})),r.d(e,"u",(function(){return z})),r.d(e,"v",(function(){return B}));var n=r("b6bd");function s(){return Object(n["a"])({url:"system/role",method:"get"})}function o(t){return Object(n["a"])({url:"system/role/".concat(t.id),method:"post",data:t})}function i(t){return Object(n["a"])({url:"system/role/".concat(t,"/edit"),method:"get"})}function a(){return Object(n["a"])({url:"system/menusList",method:"get"})}function c(t){return Object(n["a"])({url:"system/admin",method:"get",params:t})}function u(t,e){return Object(n["a"])({url:"system/admin/set_status/".concat(t,"/").concat(e),method:"put"})}function l(){return Object(n["a"])({url:"system/admin/create",method:"get"})}function m(t){return Object(n["a"])({url:"system/admin/".concat(t,"/edit"),method:"get"})}function d(){return Object(n["a"])({url:"config",method:"get"})}function f(){return Object(n["a"])({url:"system/store/info",method:"get"})}function p(t){return Object(n["a"])({url:"system/store/update",method:"put",data:t})}function _(t){return Object(n["a"])({url:"city",method:"get",params:t})}function h(t){return Object(n["a"])({url:"setting/shipping_templates/list",method:"get",params:t})}function g(t,e){return Object(n["a"])({url:"setting/shipping_templates/save/".concat(t),method:"post",data:e})}function b(t){return Object(n["a"])({url:"setting/shipping_templates/".concat(t,"/edit"),method:"get"})}function v(t){return Object(n["a"])({url:"city",method:"get",params:t})}function y(t){return Object(n["a"])({url:"/order/delivery_order/list",method:"get",params:t})}function k(t){return Object(n["a"])({url:"/order/delivery_order/cancelForm/".concat(t),method:"get"})}function O(t){return Object(n["a"])({url:"/system/store/getBusiness/".concat(t),method:"get"})}function j(t){return Object(n["a"])({url:"/system/config/".concat(t),method:"get"})}function $(t,e){return Object(n["a"])({url:"/system/config/".concat(t),method:"post",data:e})}function w(){return Object(n["a"])({url:"/table/seats/list",method:"get"})}function I(t,e){return Object(n["a"])({url:"/table/add/seats/".concat(t),method:"get",params:e})}function C(t){return Object(n["a"])({url:"/table/cate/list",method:"get",params:t})}function x(t,e){return Object(n["a"])({url:"/table/add/cate/".concat(t),method:"get",params:e})}function M(t){return Object(n["a"])({url:"/table/qrcodes/list",method:"get",params:t})}function L(t,e){return Object(n["a"])({url:"/table/add/qrcode/".concat(t),method:"post",data:e})}function F(){return Object(n["a"])({url:"/system/cashierMenusList",method:"get"})}function E(t,e){return Object(n["a"])({url:"/table/update/using/".concat(t),method:"get",params:e})}function D(t,e){return Object(n["a"])({url:"/system/form/info/".concat(t),method:"get",params:e})}function U(t){return Object(n["a"])({url:"system/config/edit_new_build/"+t,method:"get"})}function R(t){return Object(n["a"])({url:"/system/printer/list",method:"get",params:t})}function S(t){return Object(n["a"])({url:"/system/printer/status/".concat(t.id,"/").concat(t.status),method:"post"})}function z(t,e){return Object(n["a"])({url:"/system/printer/".concat(t),method:"post",data:e})}function B(t){return Object(n["a"])({url:"/system/printer/info/".concat(t),method:"get"})}},d89c: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("Card",{attrs:{bordered:!1,"dis-hover":""}},[r("Button",{staticClass:"mb15",attrs:{type:"primary"},on:{click:t.addTicket}},[t._v("添加打印机")]),r("Table",{attrs:{columns:t.columns,data:t.dataList,loading:t.loading},scopedSlots:t._u([{key:"plat_type",fn:function(e){var n=e.row;return[r("div",[t._v(t._s(1==n.plat_type?"易联云":"飞鹅云"))])]}},{key:"status",fn:function(e){var n=e.row;return[r("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.statusChange(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"print_event",fn:function(e){var n=e.row;return[r("div",[t._v(t._s(-1!=n.print_event.indexOf("2")?"支付后打印":"")+" "+t._s(-1!=n.print_event.indexOf("1")?"下单后打印":""))])]}},{key:"action",fn:function(e){var n=e.row;return[r("a",{on:{click:function(e){return t.onEdit(n)}}},[t._v("编辑")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.onDelete(n.id)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,"page-size":t.limit,"show-total":""},on:{"on-change":t.onChange}})],1)],1),r("addTicket",{ref:"ticket",on:{printerList:t.printerList}})],1)},s=[],o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Modal",{attrs:{closable:"",title:t.id?"编辑打印机":"添加打印机","mask-closable":!1,"z-index":11,width:"650"},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[r("div",[r("Form",{ref:"form",attrs:{size:"small",model:t.form,"label-width":120}},[r("FormItem",{attrs:{label:"平台选择:"}},[r("RadioGroup",{attrs:{"true-value":1,"false-value":2},model:{value:t.form.plat_type,callback:function(e){t.$set(t.form,"plat_type",e)},expression:"form.plat_type"}},[r("Radio",{attrs:{label:1}},[t._v("易联云")]),r("Radio",{attrs:{label:2}},[t._v("飞鹅云")])],1),r("p",{staticClass:"desc on"},[t._v("打印平台选择")])],1),r("FormItem",{attrs:{label:"打印机名称:",prop:"name"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写打印机名称"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),1==t.form.plat_type?r("div",[r("FormItem",{attrs:{label:"开发者ID",prop:"store_develop_id"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写用户id"},model:{value:t.form.store_develop_id,callback:function(e){t.$set(t.form,"store_develop_id",e)},expression:"form.store_develop_id"}}),r("p",{staticClass:"desc"},[t._v("易联云开发者ID")])],1),r("FormItem",{attrs:{label:"应用密钥:",prop:"store_printing_api_key"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写应用密钥"},model:{value:t.form.store_printing_api_key,callback:function(e){t.$set(t.form,"store_printing_api_key",e)},expression:"form.store_printing_api_key"}}),r("p",{staticClass:"desc"},[t._v("易联云应用密钥")])],1),r("FormItem",{attrs:{label:"应用ID",prop:"store_printing_client_id"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写应用ID"},model:{value:t.form.store_printing_client_id,callback:function(e){t.$set(t.form,"store_printing_client_id",e)},expression:"form.store_printing_client_id"}}),r("p",{staticClass:"desc"},[t._v("易联云应用ID")])],1),r("FormItem",{attrs:{label:"终端号:",prop:"store_terminal_number"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写终端号"},model:{value:t.form.store_terminal_number,callback:function(e){t.$set(t.form,"store_terminal_number",e)},expression:"form.store_terminal_number"}}),r("p",{staticClass:"desc"},[t._v("\n\t\t\t\t 易联云打印机终端号打印机型号易联云打印机K4无线版\n\t\t\t\t "),r("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:"256",transfer:"",padding:"8px"}},[r("a",[t._v("查看示例")]),r("div",{staticClass:"exampleImg",attrs:{slot:"content"},slot:"content"},[r("img",{attrs:{src:t.baseURL+"/statics/system/kuadi100Dump.png",alt:""}})])])],1)],1)],1):r("div",[r("FormItem",{attrs:{label:"飞鹅云USER",prop:"store_fey_user"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写飞鹅云USER"},model:{value:t.form.store_fey_user,callback:function(e){t.$set(t.form,"store_fey_user",e)},expression:"form.store_fey_user"}}),r("p",{staticClass:"desc"},[t._v("飞鹅云后台注册账号")])],1),r("FormItem",{attrs:{label:"飞鹅云UKEY",prop:"store_fey_ukey"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写飞鹅云UKEY"},model:{value:t.form.store_fey_ukey,callback:function(e){t.$set(t.form,"store_fey_ukey",e)},expression:"form.store_fey_ukey"}}),r("p",{staticClass:"desc"},[t._v("飞鹅云后台注册账号后生成的UKEY(注这不是填打印机的KEY)")])],1),r("FormItem",{attrs:{label:"飞鹅云SN",prop:"store_fey_sn"}},[r("Input",{staticClass:"w-450",attrs:{placeholder:"请填写飞鹅云SN"},model:{value:t.form.store_fey_sn,callback:function(e){t.$set(t.form,"store_fey_sn",e)},expression:"form.store_fey_sn"}}),r("p",{staticClass:"desc"},[t._v("打印机标签上的编号必须要在管理后台里添加打印机或调用API接口添加之后才能调用API")])],1)],1),r("FormItem",{attrs:{label:"打印联数:",prop:"print_num"}},[r("div",{staticClass:"acea-row row-middle"},[r("InputNumber",{staticClass:"w-450 num",attrs:{min:1,placeholder:"请填写打印联数"},model:{value:t.form.print_num,callback:function(e){t.$set(t.form,"print_num",e)},expression:"form.print_num"}}),t._v("联\n\t\t ")],1),r("p",{staticClass:"desc"},[t._v("打印机单次打印张数")])]),r("FormItem",{attrs:{label:"打印时机:"}},[r("CheckboxGroup",{attrs:{size:"small"},model:{value:t.form.print_event,callback:function(e){t.$set(t.form,"print_event",e)},expression:"form.print_event"}},[r("Checkbox",{attrs:{label:"2"}},[t._v("支付后打印")]),r("Checkbox",{attrs:{label:"1"}},[t._v("下单后打印")])],1)],1),r("FormItem",{attrs:{label:"小票打印开关:"}},[r("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[r("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),r("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{on:{click:t.cancel}},[t._v("取消")]),r("Button",{attrs:{type:"primary"},on:{click:t.addPrinterConfirm}},[t._v("确定")])],1)])},i=[],a=r("d708"),c=r("90e7"),u={name:"addTicket",data:function(){return{baseURL:a["a"].apiBaseURL.replace(/storeapi/,""),id:0,modals:!1,form:{plat_type:1,name:"",store_develop_id:"",store_printing_api_key:"",store_printing_client_id:"",store_terminal_number:"",print_num:1,print_event:[],status:1,store_fey_user:"",store_fey_ukey:"",store_fey_sn:""}}},created:function(){},methods:{react:function(){this.form={plat_type:1,name:"",store_develop_id:"",store_printing_api_key:"",store_printing_client_id:"",store_terminal_number:"",print_num:1,print_event:[],status:1,store_fey_user:"",store_fey_ukey:"",store_fey_sn:""}},cancel:function(){this.modals=!1},getInfo:function(){var t=this;Object(c["v"])(this.id).then((function(e){t.form=e.data})).catch((function(e){t.$Message.error(e.msg)}))},addPrinterConfirm:function(){var t=this;if(""==this.form.name.trim())return this.$Message.error("请填写打印机名称");if(1==this.form.plat_type){if(""==this.form.store_develop_id.trim())return this.$Message.error("请填写用户id");if(""==this.form.store_printing_api_key.trim())return this.$Message.error("请填写应用密钥");if(""==this.form.store_printing_client_id.trim())return this.$Message.error("请填写应用ID");if(""==this.form.store_terminal_number.trim())return this.$Message.error("请填写终端号")}else{if(""==this.form.store_fey_user.trim())return this.$Message.error("请填写飞鹅云USER");if(""==this.form.store_fey_ukey.trim())return this.$Message.error("请填写飞鹅云UKEY");if(""==this.form.store_fey_sn.trim())return this.$Message.error("请填写飞鹅云SN")}if(!this.form.print_num)return this.$Message.error("请填写打印联数");Object(c["u"])(this.id,this.form).then((function(e){t.$Message.success(e.msg),t.modals=!1,t.$emit("printerList")})).catch((function(e){t.$Message.error(e.msg)}))}}},l=u,m=(r("e0f5"),r("2877")),d=Object(m["a"])(l,o,i,!1,null,"1308d8bd",null),f=d.exports,p={components:{addTicket:f},data:function(){return{columns:[{title:"ID",key:"id",width:80},{title:"打印机名称",key:"name",minWidth:200},{title:"平台",slot:"plat_type",minWidth:150},{title:"打印联数",key:"print_num",minWidth:150},{title:"打印时机",slot:"print_event",minWidth:150},{title:"创建时间",key:"add_time",minWidth:150},{title:"打印开关",slot:"status",minWidth:120},{title:"操作",slot:"action",align:"center",width:150}],dataList:[],total:100,limit:10,page:1,loading:!1}},created:function(){this.printerList()},methods:{printerList:function(){var t=this;this.loading=!0,Object(c["o"])({page:this.page,limit:this.limit}).then((function(e){var r=e.data,n=r.list,s=r.count;t.dataList=n,t.total=s,t.loading=!1})).catch((function(e){t.$Message.error(e.msg)}))},onChange:function(t){this.page=t,this.printerList()},statusChange:function(t){var e=this;Object(c["w"])(t).then((function(t){e.$Message.success(t.msg),e.printerList()})).catch((function(t){e.$Message.error(t.msg)}))},onDelete:function(t){var e=this;this.$modalSure({title:"删除打印机",url:"/system/printer/".concat(t),method:"delete",ids:""}).then((function(t){e.$Message.success(t.msg),e.printerList()}))},addTicket:function(){this.$refs.ticket.react(),this.$refs.ticket.modals=!0,this.$refs.ticket.id=0},onEdit:function(t){this.$refs.ticket.modals=!0,this.$refs.ticket.id=t.id,this.$refs.ticket.getInfo()}}},_=p,h=Object(m["a"])(_,n,s,!1,null,null,null);e["default"]=h.exports},e0f5:function(t,e,r){"use strict";var n=r("281a"),s=r.n(n);s.a}}]);