| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-07a995fa","chunk-2d0dd61c","chunk-61bb858e","chunk-49162db8","chunk-66540ec5","chunk-b062adb4","chunk-67784a8f","chunk-6bfa8f95","chunk-c399a62a","chunk-7d2aa35d","chunk-449b729d","chunk-7f344b9b","chunk-2beb6aa3","chunk-7a9b75ce","chunk-48a77c7f","chunk-7e19c3dd","chunk-3d13dc96","chunk-0111996c","chunk-35fd7ed0","chunk-df590242","chunk-469b67cc","chunk-2d0e4c8a","chunk-2d22d462","chunk-2d0d622c","chunk-2d21e453","chunk-2d0d70b6","chunk-88eca626","chunk-0e0609d2","chunk-666d9471","chunk-949038ba","chunk-244a3cb7","chunk-6b5a3656","chunk-03772c6f","chunk-f17dfdec","chunk-62083030","chunk-c207f542","chunk-6c28aad9","chunk-c6a53db4","chunk-2d74f1e0","chunk-753ee67b","chunk-6f8e2ed0","chunk-574e68a5","chunk-fb3e2372","chunk-6dbbbe64","chunk-355a412c","chunk-c19286da","chunk-0641dd4c","chunk-3155ebec","chunk-0b6b1555","chunk-7f9f69d1","chunk-891cf110","chunk-03ad842a","chunk-6473e5ac","chunk-4b42e7f4","chunk-28a5186f","chunk-680b0581","chunk-136d8d77","chunk-133bde8d","chunk-5d2d6bdc","chunk-9b05f2d2","chunk-4e4aa92b","chunk-6a98ecbe","chunk-3cbb287f","chunk-3e88096d","chunk-4f634a89","chunk-718fc9a1","chunk-65d5303f","chunk-40af8a95","chunk-59c07794","chunk-11c40b35","chunk-46366c28","chunk-192c41aa","chunk-a32cf3d6","chunk-0b96728a","chunk-31c03faa","chunk-6816b5ce","chunk-d1ee2580","chunk-efb50a6c","chunk-69b5742a","chunk-3fcb51b3","chunk-268c3436","chunk-57dc3a28","chunk-5be006ac","chunk-2052516a","chunk-853293ce","chunk-25edde54","chunk-cf462154","chunk-3a46e468","chunk-12bee1b6","chunk-30564928","chunk-491e38bc","chunk-666c23fa","chunk-f80b88f0","chunk-b2c82c90","chunk-74216682","chunk-749bc6c1","chunk-4cd382ae","chunk-18aaa8fc","chunk-2ead2b2c","chunk-f4ab72d6","chunk-1d6f6ea0","chunk-d4bc29ce","chunk-5bb86f36","chunk-0d89ece4","chunk-767f5f99","chunk-52b188cb","chunk-76529041","chunk-47ee6a21","chunk-42dfed6c","chunk-6c06ebf1","chunk-a9292726","chunk-98923b8a","chunk-024cd578","chunk-12a94041","chunk-315f878b","chunk-107342c4","chunk-0812dd4e","chunk-fe48addc","chunk-007b2757","chunk-5acfbbc1","chunk-2d6d9b5c","chunk-8f66d3b8","chunk-62ddedc4","chunk-18e724da","chunk-f537d8b6","chunk-a65103bc","chunk-3872d1d2","chunk-5ef69cd8","chunk-2d22e146","chunk-2d21d8c0","chunk-2d2160d1","chunk-2d0de355","chunk-2d2077f4","chunk-2d0e21c1","chunk-2d0c8bc6","chunk-2d2176ab","chunk-2d22271a","chunk-2d209b0e","chunk-2d0cc684","chunk-2d0d3ea4","chunk-2d230c38","chunk-2d22db4d","chunk-2d230f77","chunk-2d22c0a5","chunk-2d0bb24b"],{"01b4":function(t,e,s){},"01e4":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"order-detail"},[e("el-drawer",{attrs:{visible:t.showOrderDetail,size:"1050px","before-close":t.closeFn,"custom-class":"order-draw-wrap",direction:"ltr"},on:{"update:visible":function(e){t.showOrderDetail=e},close:t.closeTrigger}},[t.$util.isEmpty(t.data)?e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{height:"800px"}}):e("div",{staticClass:"order-manage-wrap"},[e("div",{staticClass:"card-wrap",staticStyle:{"margin-top":"0px"}},[e("div",{staticClass:"card-tit"},[t._v("备注")]),e("div",{staticClass:"card-body"},[e("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:t.data[0].remark,callback:function(e){t.$set(t.data[0],"remark",e)},expression:"data[0].remark"}})],1),e("div",{staticStyle:{"text-align":"center","margin-top":"4px"}},[e("el-button",{staticStyle:{margin:"0 auto"},attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.modifyRemark()}}},[t._v("修改")])],1)]),e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v("花材信息")]),e("div",{staticClass:"card-body"},[e("el-table",{attrs:{data:t.data[0].product}},[e("el-table-column",{attrs:{label:"图片"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("cl-avatar",{attrs:{shape:"square",size:30,src:t.row.cover}})]}}],null,!1,2761605533)}),e("el-table-column",{attrs:{property:"name",label:"名称"}}),e("el-table-column",{attrs:{property:"xhUnitPrice",label:"单价"}}),e("el-table-column",{attrs:{label:"数量"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.getStockDetail(s.row)}}},[e("i",{staticClass:"el-icon-s-order",staticStyle:{color:"#409eff","font-size":"17px"},attrs:{slot:"reference"},slot:"reference"}),t._v(" "+t._s(s.row.num?parseFloat(s.row.num):0)+" ")])]}}],null,!1,2521193535)}),e("el-table-column",{attrs:{property:"refundNum",label:"已退数"}}),e("el-table-column",{attrs:{label:"备注"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.modifyItemRemark(s.row)}}},[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},slot:"reference"}),t._v(t._s(s.row.remark))])]}}],null,!1,997837959)}),e("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(s){return[Number(s.row.dishNum)>0?e("el-button",{staticStyle:{margin:"0 auto"},attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printTree(s.row)}}},[t._v("打印")]):t._e()]}}],null,!1,1996516685)})],1)],1)])])])],1)},a=[],r=(s("209c"),{name:"order-detail",props:{orderOperate:{type:Object,default:()=>{}}},data(){return{showOrderDetail:!1,data:[],loading:!0}},methods:{closeTrigger(){this.$emit("searchFocus")},getStockDetail(t){this.$emit("getStockDetail",t)},modifyItemRemark(t){this.$prompt("请输入备注","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请写备注",inputValue:t.remark}).then(({value:e})=>{this.$service.orderItem.updateItemRemark({remark:e,id:t.id}).then(s=>{t.remark=e,this.$message.success("修改成功")})})},printTree(t){this.$service.orderItem.printTreePin({id:t.id}).then(t=>{let e=t.printData?t.printData:"",s=t.template?t.template:"",i=JSON.parse(s);var a=new hiprint.PrintTemplate({template:i});a.print(e)})},modifyRemark(){this.$service.order.modifyRemark({id:this.orderOperate.id,remark:this.data[0].remark}).then(t=>{this.$message.success("修改成功")})},init(){this.data=[],this.showOrderDetail=!0,this.$service.order.info({id:this.orderOperate.id}).then(t=>{this.data=[t]})},closeFn(){this.showOrderDetail=!1}}}),o=r,n=(s("3118"),s("d2c7"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"b62e9972",null);e["default"]=l.exports},"028b":function(t,e,s){"use strict";s("57d0")},"029d":function(t,e,s){},"073a":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.itemData.itemName?t.itemData.itemName:"")+"】待采变动记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"total-book-record",props:{itemData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCgChangeGlobal).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:60,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})}}},o=r,n=(s("6bc4"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"779d908a",null);e["default"]=l.exports},"0771":function(t,e,s){},"078e":function(t,e,s){"use strict";s("0771")},"0867":function(t,e,s){},"0869":function(t,e,s){"use strict";s("a238")},"08ba":function(t,e,s){},"0a00":function(t,e,s){"use strict";s("d912")},"0a8b":function(t,e,s){"use strict";s("db83")},"0aa9":function(t,e,s){},"0c0b":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-drawer",{attrs:{title:"权限设置",visible:t.showStatus,size:"70%","before-close":t.closeFn},on:{"update:visible":function(e){t.showStatus=e}}},[e("div",{staticClass:"role-set-wrap"},t._l(t.permTree,(function(s,i){return e("div",{key:i,staticClass:"role-list"},[e("el-checkbox",{attrs:{indeterminate:t.isIndeterminate[i]},on:{change:function(e){return t.handleCheckAllChange(e,i)}},model:{value:t.checkAll[i],callback:function(e){t.$set(t.checkAll,i,e)},expression:"checkAll[index]"}},[t._v(t._s(s.authName))]),e("div",{staticStyle:{margin:"15px 0"}}),e("el-checkbox-group",{on:{change:function(e){return t.handlecheckedPermChange(e,i)}},model:{value:t.checkedPerm,callback:function(e){t.checkedPerm=e},expression:"checkedPerm"}},t._l(s.children,(function(s,i){return e("el-checkbox",{key:s.id,attrs:{label:s.id}},[t._v(t._s(s.authName))])})),1)],1)})),0),e("div",{staticClass:"button-wrap flex-center"},[e("el-button",{attrs:{size:"mini"},on:{click:t.closeFn}},[t._v("关闭")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.saveFn}},[t._v("保存")])],1)])},a=[],r=(s("b138"),s("8f26"),s("963e"),{name:"role-set",props:{show:{type:Boolean,default:!1},info:{type:Object,default:()=>{}}},data(){return{showStatus:!1,data:{},permTree:[],checkAll:[],checkedPerm:[],isIndeterminate:[]}},watch:{show(t){this.showStatus=t,t&&this.init()}},methods:{init(){this._getTreeB().then(t=>{console.log("res",t),"business"==this.$projectName&&this._getAuthB()})},async _getTreeB(){let t={};return await this.$service.common.permTree({endId:1}).then(e=>{this.permTree=e,this.permTree.map(()=>{this.isIndeterminate.push(!1),this.checkAll.push(!1)}),t=e}),t},async _getAuthB(){let t={};return await this.$service.auth.authList({roleId:this.info.roleId}).then(e=>{t=e}),t},saveFn(){console.log("this.info",this.info),this.$service.auth.authUpdate({roleId:this.info.roleId,authIdList:this.checkedPerm}).then(t=>{this.closeFn(),this.$message.success("保存成功!")})},closeFn(t){this.$emit("update:show",!1),t&&t()},handleCheckAllChange(t,e){let s=this.permTree[e].children?this.permTree[e].children:this.permTree[e];s=s.map(t=>t.id),this.checkedPerm=t?s:[],this.$set(this.isIndeterminate,e,!1)},handlecheckedPermChange(t,e){let s=t.length,i=this.permTree[e].children?this.permTree[e].children.length:0,a=s===i;this.$set(this.checkAll,e,a);let r=s>0&&s<i;this.$set(this.isIndeterminate,e,r)}}}),o=r,n=(s("e52a"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"cc52c0b6",null);e["default"]=l.exports},"0ccd":function(t,e,s){},"0ce5":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"50vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e},close:t.closeTrigger}},[e("div",[e("div",{staticStyle:{"margin-left":"10px","font-weight":"bold"}},[t._v("售后记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-status",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.status?"待审核":1==e.row.status?"已通过":2==e.row.status?"已驳回":"已取消")+" ")]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getDetail(s.row)}}},[t._v("明细")])]}}])})],1),t.$util.isEmpty(t.info)?t._e():e("div",{staticClass:"app-content"},[e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后方式:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[t._v(t._s(1==t.refundType?"退货并退款":"只退款"))])])]),1==t.refundType?e("div",{staticClass:"refund-item-list"},[e("div",{staticClass:"refund-label"},[t._v("售后商品:")]),e("div",t._l(t.product,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"flex list-title"},[t._v(" "+t._s(s.name)+" ¥"+t._s(parseFloat(s.xhUnitPrice))+"x"+t._s(s.xhNum)+t._s(s.xhUnitName)+"=¥"+t._s(parseFloat(s.xhPrice))+" ")])])})),0)]):t._e(),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("申请时间:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[t._v(t._s(t.info.addTime?t.info.addTime.substr(5,11):""))])])]),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后原因:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[t._v(" "+t._s(0==t.info.cause?"质量问题":1==t.info.cause?"多开错开":2==t.info.cause?"打包原因":3==t.info.cause?"物流原因":"其它")+" "),e("span",{staticStyle:{"margin-left":"20px",color:"#3385FF",cursor:"pointer"},on:{click:function(e){t.showChoice=!0}}},[t._v("修改")])])])]),1==t.showChoice?e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("选择原因:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changeCause(t.info,0)}}},[t._v("质量问题")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changeCause(t.info,1)}}},[t._v("多开错开")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changeCause(t.info,2)}}},[t._v("打包原因")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changeCause(t.info,3)}}},[t._v("物流原因")])],1)])]):t._e(),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后单号:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[t._v(t._s(t.info.orderSn))])])]),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后金额:")]),e("div",{staticClass:"list"},[t._v(" ¥"+t._s(t.refundPrice)+" "),Number(t.info.refundPackCost)>0?e("span",{staticStyle:{"margin-left":"8px","font-size":"16px"}},[t._v("(含退打包费"+t._s(t.info.refundPackCost?parseFloat(t.info.refundPackCost):0)+"元)")]):t._e(),Number(t.info.refundSendCost)>0?e("span",{staticStyle:{"margin-left":"8px","font-size":"16px"}},[t._v("(含退运费"+t._s(t.info.refundSendCost?parseFloat(t.info.refundSendCost):0)+"元)")]):t._e()])]),e("div",{staticClass:"refund-item"},[e("div",{staticClass:"refund-label",staticStyle:{color:"red","font-weight":"bold"}},[t._v("退款状态:")]),e("div",{staticClass:"list",staticStyle:{color:"red","font-weight":"bold"}},[t._v(t._s(0==t.info.status?"待审核":1==t.info.status?"已通过":2==t.info.status?"已驳回":3==t.info.status?"已取消":""))])]),e("div",{staticClass:"refund-item"},[e("div",{staticClass:"refund-label"},[t._v("操作人员:")]),e("div",{staticClass:"list"},[t._v(t._s(t.info.shopAdminName||""))])]),e("div",{staticClass:"refund-item"},[t.$util.isEmpty(t.info.rejectReason)?t._e():e("div",{staticClass:"refund-label",staticStyle:{color:"red","font-weight":"bold"}},[t._v("驳回原因:")]),e("div",{staticClass:"list",staticStyle:{color:"red","font-weight":"bold"}},[t._v(t._s(t.info.rejectReason?t.info.rejectReason:""))])]),t.$util.isEmpty(t.info.remark)?t._e():e("div",{staticClass:"refund-item"},[e("div",{staticClass:"refund-label",staticStyle:{color:"red","font-weight":"bold"}},[t._v("备注信息:")]),e("div",{staticClass:"list",staticStyle:{color:"red","font-weight":"bold"}},[t._v(t._s(t.info.remark?t.info.remark:""))])]),t.info.smallImgList&&!t.$util.isEmpty(t.info.smallImgList)?e("div",{staticClass:"refund-item"},[e("div",{staticClass:"refund-label",staticStyle:{color:"red","font-weight":"bold"}},[t._v("售后图片:")]),e("div",{staticClass:"list",staticStyle:{color:"red","font-weight":"bold"}},t._l(t.info.smallImgList,(function(t,s){return e("span",{key:s},[e("img",{staticStyle:{width:"30px",height:"30px",float:"left","margin-left":"9px","margin-bottom":"4px"},attrs:{src:t}})])})),0)]):t._e(),e("div",{staticStyle:{"margin-left":"80px","margin-top":"20px"}},[e("el-button",{staticStyle:{"margin-left":"120px"},on:{click:t.closeFn}},[t._v("关闭")]),0==t.info.status?e("el-button",{staticStyle:{"margin-left":"120px"},attrs:{type:"primary"},on:{click:function(e){return t.reject()}}},[t._v("驳回")]):t._e(),0==t.info.status?e("el-popconfirm",{staticStyle:{"margin-left":"180px"},attrs:{title:"确认通过?"},on:{confirm:function(e){return t.pass(0)},onConfirm:function(e){return t.pass(0)}}},[e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("通过")])],1):t._e()],1)])])],1)},a=[],r={name:"refund-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1,product:"",refundPrice:0,refundType:1,remark:"",info:[],rejectReason:"",from:0,refundAmount:"",showChoice:!1}},methods:{closeTrigger(){this.$emit("searchFocus")},reject(){this.$message.error("开发中")},pass(t){this.$message.error("开发中")},changeCause(t,e){this.$service.refund.modifyCause({id:t.id,cause:e}).then(s=>{console.log(s),this.showChoice=!1,t.cause=e,that.$message.success("修改成功")})},getDetail(t){this.$service.refund.detail({id:t.id}).then(t=>{this.product=t.itemList||[],this.refundType=t.info.refundType||0,this.refundPrice=t.info.refundPrice?parseFloat(t.info.refundPrice):0,this.remark=t.info.remark,this.info=t.info})},init(){this.showArea=!0,this.info=[],this.app&&this.app.refresh({orderSn:this.currentData.orderSn})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.refund).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"单号",prop:"orderSn",align:"center"},{label:"金额",prop:"refundPrice",align:"center"},{label:"操作",prop:"shopAdminName",align:"center"},{label:"状态",prop:"status",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["data-table"],["flex1","pagination"]]).set("pagination",{size:4}).done(),e.refresh({orderSn:this.currentData.orderSn})}}},o=r,n=(s("b745"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"c4ebc6c0",null);e["default"]=l.exports},"0cf2":function(t,e,s){"use strict";s("4f63")},"0e4c":function(t,e,s){"use strict";s("f7fc")},"0f4a":function(t,e,s){},"11e4":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.currentData.customName?t.currentData.customName:"")+"】"+t._s(t.currentData.itemName?t.currentData.itemName:"")+" 供货明细")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-status",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.status?"在路上":1==t.item.status?"已送达":"已取消")+" ")]}}])})],1)])],1)},a=[],r={name:"book-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({parentId:this.currentData.id})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookItemGhs).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"花材",prop:"name",align:"center"},{label:"供货商",prop:"ghsName",align:"center"},{label:"数量",prop:"num",align:"center"},{label:"状态",prop:"status",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({parentId:this.currentData.id})}}},o=r,n=(s("d7e9"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"d5ec602e",null);e["default"]=l.exports},"123a":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[t._v(" 账单时间:"),e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-order-debt",fn:function({scope:s}){return[e("el-radio-group",{staticStyle:{"margin-right":"20px","padding-top":"6px","margin-left":"20px"},on:{change:t.changeDebt},model:{value:t.debt,callback:function(e){t.debt=e},expression:"debt"}},[e("el-radio",{attrs:{label:"-1"}},[t._v("全部")]),e("el-radio",{attrs:{label:"1"}},[t._v("待结款")]),e("el-radio",{attrs:{label:"0"}},[t._v("已结款")])],1)]}},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("订单数:"+t._s(t.totalNum))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("订单金额:¥"+t._s(t.totalOrderPrice))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("退款金额:¥"+t._s(t.totalTkPrice))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("(仅退款金额:¥"+t._s(t.totalOnlyTkPrice)+")")]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("实际金额:¥"+t._s(t.totalActPrice))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("含(纸箱:"+t._s(t.totalCartonNum)+"个 ¥"+t._s(t.totalCarton))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("打包费:¥"+t._s(t.totalPack))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("运费:¥"+t._s(t.totalFreight)+")")])]},proxy:!0},{key:"slot-export-data",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportDue()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goChange(s.row)}}},[t._v("查看明细")])]}},{key:"table-column-tkPrice",fn:function({scope:s}){return[e("div",{staticStyle:{cursor:"pointer"},on:{click:function(e){return e.stopPropagation(),t.getTkDetail(s.row)}}},[t._v(t._s(s.row.tkPrice?parseFloat(s.row.tkPrice):0))])]}}])})],1)},a=[],r=(s("b138"),s("5880")),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalActPrice:0,totalOrderPrice:0,totalCarton:0,totalCartonNum:0,totalPack:0,totalFreight:0,totalTkPrice:0,totalOnlyTkPrice:0,totalNum:0,debt:"-1"}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{goChange(t){let e={};e.customName=t.name,e.startTime=this.startTime,e.endTime=this.endTime,e.searchTime=this.searchTime,this.$router.push({path:"/order/list",query:e})},getTkDetail(t){let e={customId:t.id,customName:t.name,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,status:1};this.$router.push({path:"/order/refund-list",query:e})},exportDue(){this.$service.order.getYj({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.order.getYj({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt}).then(t=>(this.totalActPrice=t.totalActPrice?t.totalActPrice:0,this.totalOrderPrice=t.totalOrderPrice?t.totalOrderPrice:0,this.totalCarton=t.totalCarton?t.totalCarton:0,this.totalCartonNum=t.totalCartonNum?t.totalCartonNum:0,this.totalPack=t.totalPack?t.totalPack:0,this.totalFreight=t.totalFreight?t.totalFreight:0,this.totalTkPrice=t.totalTkPrice?t.totalTkPrice:0,this.totalOnlyTkPrice=t.totalOnlyTkPrice?t.totalOnlyTkPrice:0,this.totalNum=t.totalNum?t.totalNum:0,{list:t.list}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"客户",prop:"name",align:"center"},{label:"手机号",prop:"mobile",align:"center"},{label:"订单数",prop:"num",align:"center"},{label:"订单金额",prop:"orderPrice",align:"center"},{label:"退款金额",prop:"tkPrice",align:"center"},{label:"实际金额",prop:"actPrice",align:"center"},{label:"纸箱数",prop:"cartonNum",align:"center"},{label:"纸箱费",prop:"carton",align:"center"},{label:"打包费",prop:"pack",align:"center"},{label:"运费",prop:"freight",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-date-select","slot-order-debt","flex1","slot-export-data"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getSearchDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})},changeDebt(t){this.debt=t,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})}}},n=o,l=(s("7005"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"5befa3c0",null);e["default"]=c.exports},"12c8":function(t,e,s){},1465:function(t,e,s){"use strict";s("e0d3")},"146d":function(t,e,s){},"15d3":function(t,e,s){"use strict";s("b12e")},"15fb":function(t,e,s){"use strict";s("8d73")},1635:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"order-detail"},[e("el-drawer",{attrs:{visible:t.showDetail,size:"1000px","before-close":t.closeFn,"custom-class":"order-draw-wrap",direction:"ltr"},on:{"update:visible":function(e){t.showDetail=e}}},[t.$util.isEmpty(t.detailInfo)?t._e():e("div",{staticClass:"order-manage-wrap"},[e("div",{staticClass:"card-wrap",staticStyle:{"margin-top":"0"}},[e("div",{staticClass:"card-tit"},[t._v(" 花材信息按 Esc 关闭窗口) "),e("el-button",{staticStyle:{"margin-left":"80px"},attrs:{type:"primary"},on:{click:function(e){return t.assignOrder()}}},[t._v("刷新货位")])],1),e("div",{staticClass:"card-body"},[e("el-table",{attrs:{data:t.detailInfo.itemInfo}},[e("el-table-column",{attrs:{label:"花材图片"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[e("div",{staticStyle:{width:"200px",height:"200px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover"},attrs:{src:t.row.bigCover}})]),e("div",{staticStyle:{width:"30px"},attrs:{slot:"reference"},slot:"reference"},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:t.row.cover}})])])]}}],null,!1,1714386569)}),e("el-table-column",{attrs:{property:"name",label:"花材名称",width:"200"}}),e("el-table-column",{attrs:{property:"bigPrice",label:"单价"}}),e("el-table-column",{attrs:{label:"数量"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(s.row.itemNum?s.row.itemNum:0))]),Number(s.row.refundNum)>0?e("span",[t._v("(退 "+t._s(s.row.refundNum)+")")]):t._e()]}}],null,!1,2241800275)}),e("el-table-column",{attrs:{label:"合计"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v("¥"+t._s(s.row.totalPrice))])]}}],null,!1,2024436839)}),e("el-table-column",{attrs:{label:"分配货位",width:"300"},scopedSlots:t._u([{key:"default",fn:function(s){return[Number(s.row.noSeatNum)>0?e("div",[t._v(" 无货位 "+t._s(s.row.noSeatNum)+" ")]):t._e(),t.$util.isEmpty(s.row.sendList)?t._e():e("div",{staticStyle:{"margin-bottom":"10upx","font-size":"30upx"}},t._l(s.row.sendList,(function(s,i){return e("div",{staticStyle:{"margin-bottom":"7upx"}},[t._v(" "+t._s(s.customName)+"("+t._s(s.seatSn)+") 数量 "+t._s(s.num)+" "),e("span",{staticStyle:{"margin-left":"20upx"}},[t._v(t._s(0==s.status?"待上架":1==s.status?"已上架":"已取消"))])])})),0)]}}],null,!1,1039941038)})],1)],1)]),e("div",{staticStyle:{"margin-left":"180px"}},[0==t.detailInfo.location?[e("div",{staticClass:"accounts-list"},[t._v(" 运费支付 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v(t._s(1==t.detailInfo.yfPayWay?"寄付":"到付"))])]),e("div",{staticClass:"accounts-list"},[t._v(" 打包费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.packingCharge?parseFloat(t.detailInfo.packingCharge):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 短途运费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.shortCharge?parseFloat(t.detailInfo.shortCharge):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 长途运费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.longCharge?parseFloat(t.detailInfo.longCharge):0))])])]:t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 总金额 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.prePrice?parseFloat(t.detailInfo.prePrice):0))])]),t.detailInfo.refundPrice>0?e("div",{staticClass:"accounts-list"},[t._v(" 退款金额 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("-¥"+t._s(t.detailInfo.tkPrice?parseFloat(t.detailInfo.tkPrice):0))])]):t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 减免 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.discountAmount?parseFloat(t.detailInfo.discountAmount):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 实际金额 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.realPrice?parseFloat(t.detailInfo.realPrice):0))])]),0==t.detailInfo.location?[2==t.detailInfo.yfPayWay?e("div",{staticClass:"accounts-list"},[t._v(" 短途运费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.shortCharge?parseFloat(t.detailInfo.shortCharge):0))])]):t._e(),2==t.detailInfo.yfPayWay?e("div",{staticClass:"accounts-list"},[t._v(" 长途运费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.longCharge?parseFloat(t.detailInfo.longCharge):0))])]):t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 提货费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.pickCharge?parseFloat(t.detailInfo.pickCharge):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 本地运费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.localCharge?parseFloat(t.detailInfo.localCharge):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 合计费用 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.totalFreight?parseFloat(t.detailInfo.totalFreight):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 合计成本 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.totalCgCost?parseFloat(t.detailInfo.totalCgCost):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 总重量 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v(t._s(t.detailInfo.totalWeight?parseFloat(t.detailInfo.totalWeight):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 每公斤运费 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.avgKgWeight?parseFloat(t.detailInfo.avgKgWeight):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 物流费用 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v(t._s(0==t.detailInfo.isCost?"不算成本":"算成本"))])])]:t._e()],2)])])],1)},a=[],r={name:"order-detail",props:{orderOperate:{type:Object,default:()=>{}}},data(){return{showDetail:!1,selectJobType:"order_change",autoLoad:!1,stepActive:0,form:{name:""},detailInfo:{},loading:!1,printItemId:0,printType:0,printLabelShow:!1,printNum:"",wcPrintNum:1,entryTime:"",T:null,orderSn:"",salt:"",showSeat:1,title:"",imageUrl:""}},methods:{assignOrder(){this.$service.purchaseOrder.assignSeat({id:this.detailInfo.id,salt:this.salt}).then(t=>{this.init(),this.$message.success("刷新成功")})},init(){this.$service.purchaseOrder.detail({orderSn:this.orderOperate.orderSn}).then(t=>{this.detailInfo=t,this.showDetail=!0})},closeFn(){this.showDetail=!1}}},o=r,n=(s("8227"),s("21cb"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"3e9afc49",null);e["default"]=l.exports},"164d":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}})]},proxy:!0},{key:"table-column-mll",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.mll)+"%")])]}},{key:"table-column-num",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.num?parseFloat(s.row.num):0))])]}}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,totalNum:0,totalMl:0}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportData(){this.$service.statCg.getProfit({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.statCg.getProfit({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>{this.totalAmount=t.totalAmount||0,this.totalMl=t.totalMl||0,this.totalNum=t.totalNum||0;let e=[...t.list];return{list:e}})}).set("table",{columns:[{label:"名称",prop:"name",align:"center"},{label:"数量",prop:"num",align:"center"},{label:"金额",prop:"amount",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","slot-export-due","flex1"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},n=o,l=(s("9972"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"5fbfc943",null);e["default"]=c.exports},"16a3":function(t,e,s){},"171e":function(t,e,s){"use strict";s("374d")},"173e":function(t,e,s){},1762:function(t,e,s){"use strict";s("197a")},"183b":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content"},[e("div",{staticClass:"list-wrap"},[e("div",{staticClass:"list-tit"},[e("div",[t._v("客户等级")]),e("div",{class:[t.isModify?"list-tit-inp":""]},[t._v("成长值")]),e("div",{class:[t.isModify?"list-tit-inp":""]},[t._v("折扣")]),t.isModify?e("div",[t._v("操作")]):t._e()]),t._l(t.list,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"list-vip"},[e("span",[t._v(t._s(i+1))])]),e("div",{staticClass:"list-growth"},[t.isModify?e("input",{directives:[{name:"model",rawName:"v-model",value:s.growth,expression:"item.growth"}],staticClass:"setting-inp",attrs:{type:"text"},domProps:{value:s.growth},on:{input:function(e){e.target.composing||t.$set(s,"growth",e.target.value)}}}):e("span",{staticClass:"setting-span"},[t._v(t._s(s.growth))])]),e("div",{staticClass:"list-discount"},[t.isModify?e("input",{directives:[{name:"model",rawName:"v-model",value:s.discount,expression:"item.discount"}],staticClass:"setting-inp",attrs:{type:"text"},domProps:{value:s.discount},on:{input:function(e){e.target.composing||t.$set(s,"discount",e.target.value)}}}):e("span",{staticClass:"setting-span"},[t._v(t._s(s.discount))])]),t.isModify?e("div",{staticClass:"list-option",on:{click:function(e){return t.delFn(i)}}},[e("i",{staticClass:"iconfont iconshanchu1"})]):t._e()])}))],2),t.isModify?e("div",{staticClass:"prompt-text"},[t._v(" 提交后不能再修改,请确认后提交。 ")]):t._e(),t.isModify?e("div",{staticClass:"btn-wrap"},[e("el-button",{on:{click:t.addFn}},[t._v("添加")]),e("el-button",{staticClass:"primary-btn",attrs:{type:"primary"},on:{click:t.showPromptFn}},[t._v("提交")])],1):t._e()])},a=[],r=(s("b138"),s("209c"),s("f803"),s("cf45")),o={name:"level-setting",data(){return{isModify:!1,list:[],addList:{level:0,growth:0,discount:0}}},created(){this.init()},methods:{init(){this._list()},_list(){this.$service.level.list().then(t=>{if(this.$util.isEmpty(t))return!1;this.isModify=0!=t.gradeSwitch,this.list=Object(r["bubbleSort"])(t.list)})},delFn(t){this.list.splice(t,1),this.$message.success("删除成功!")},addFn(){let t=JSON.parse(JSON.stringify(this.addList));t.level=this.list.length+1,this.list.push(t)},confirmFn(){for(let e in this.list)this.list[e].level=parseInt(e)+1;let t=[];for(let e in this.list){let{level:s,growth:i,discount:a}=this.list[e];t.push([s,i,a])}this.$service.level.updateLevel({list:t}).then(t=>{this.isModify=!1,this.$message.success("设置成功!"),this.showPrompt=!1})},showPromptFn(){this.$confirm("提交后不能再修改,请谨慎操作。 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.confirmFn()})}}},n=o,l=(s("f7d6"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"e56f4ab0",null);e["default"]=c.exports},"18ea":function(t,e,s){"use strict";s("94cf")},"197a":function(t,e,s){},"19a4":function(t,e,s){},"19d2":function(t,e,s){"use strict";s("a340")},"1a24":function(t,e,s){"use strict";s("9c66")},"1aad":function(t,e,s){"use strict";s("30f3")},"1b16":function(t,e,s){"use strict";s("cbfc")},"1b44":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"scope-slider"},[e("div",{staticClass:"logo"},[e("a",{attrs:{href:"https://x-admin.com/"}},[t.menuCollapse?e("icon-svg",{staticClass:"z",attrs:{name:"logo"}}):e("icon-svg",{staticClass:"lr",attrs:{name:"logo-lr"}})],1)]),t.userInfo&&!t.menuCollapse?e("div",{staticClass:"user"},[e("img",{staticClass:"avatar",attrs:{src:t._f("default_avatar")(t.userInfo.headImg),alt:""}}),e("div",{staticClass:"det"},[e("p",{staticClass:"name"},[t._v(t._s(t.userInfo.name))]),e("p",{staticClass:"post"},[t._v("部门:"+t._s(t.userInfo.departmentName||"无"))])])]):t._e(),t.visible?e("div",{staticClass:"menu"},[e("deep-menu")],1):t._e()])},a=[],r=(s("b138"),s("8f26"),s("963e"),s("5880")),o=s("7828"),n={data(){return{visible:!0}},computed:{...Object(r["mapGetters"])(["menuList","menuCollapse","userInfo"])},watch:{menuList(){this.visible=!1,Object(o["setTimeout"])(()=>{this.visible=!0},0)}},components:{DeepMenu:{computed:{...Object(r["mapGetters"])(["menuList","menuCollapse"])},methods:{toView(t){t!=this.$route.path&&this.$router.push(t)}},render(){const t=arguments[0],e=s=>s.map(s=>{let i=null;return i=0==s.type?t("el-submenu",{attrs:{index:String(s.id)},key:s.id},[t("template",{slot:"title"},[t("icon-svg",{attrs:{name:s.icon}}),t("span",{slot:"title"},[s.name])]),e(s.children)]):t("el-menu-item",{attrs:{index:s.path},key:s.path},[t("icon-svg",{attrs:{name:s.icon}}),t("span",{slot:"title"},[s.name])]),i});let s=e(this.menuList);return t("el-menu",{attrs:{"default-active":this.$route.path,"collapse-transition":!1,collapse:this.menuCollapse},on:{select:this.toView}},[s])}}},methods:{...Object(r["mapMutations"])(["COLLAPSE_MENU"])}},l=n,c=(s("3d0e"),s("9e5c"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"7c46098a",null);e["default"]=u.exports},"1b4b":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-mobile",fn:function({scope:s}){return[""!=s.row.mobile?e("span",[t._v(t._s(s.row.mobile))]):e("span",[t._v("-")])]}},{key:"table-column-debtAmount",fn:function({scope:e}){return[t._v(" "+t._s(e.row.debtAmount?parseFloat(e.row.debtAmount):0)+" ")]}},{key:"table-column-balance",fn:function({scope:s}){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.goBalanceChange(s.row)}}},[t._v(t._s(s.row.balance))])]}},{key:"table-column-actDebt",fn:function({scope:s}){return[Number(s.row.debtAmount)>Number(s.row.balance)?e("span",{staticStyle:{color:"blue","font-weight":"bold",cursor:"pointer"},on:{click:function(e){return t.goChange(s.row)}}},[t._v(" "+t._s(parseFloat((Number(s.row.debtAmount)-Number(s.row.balance)).toFixed(2)))+" ")]):e("span",{staticStyle:{"font-weight":"bold",cursor:"pointer"},on:{click:function(e){return t.goChange(s.row)}}},[t._v("-")])]}},{key:"table-column-buyAmount",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.buyAmount?parseFloat(s.row.buyAmount):0))])]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{staticStyle:{"margin-left":"30px"},attrs:{size:"small",type:"primary"},on:{click:function(e){return t.kd(s.row,0)}}},[t._v("开新订单")])]}},{key:"table-column-recentExpend",fn:function({scope:s}){return["0000-00-00 00:00:00"==s.row.recentExpend?e("span",[t._v("没有下过单")]):e("span",[t._v(t._s(s.row.recentExpend?s.row.recentExpend.substr(0,11):0))])]}},{key:"table-column-visitTime",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.visitTime?s.row.visitTime.substr(0,11):0))])]}},{key:"slot-top-element",fn:function(){return[e("el-input",{ref:"customSearchRef",staticStyle:{width:"400px"},attrs:{placeholder:"搜索客户",size:"big"},on:{input:function(e){return t.changeText()}},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})]},proxy:!0}])})],1)},a=[],r=(s("b138"),s("5880")),o=s("51be"),n={components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"客户列表",key:"0",val:0}],modalData:{},drapShow:!1,confirmMobile1:"",addPop:!1,name:"",fileUrl:"",shopInfo:{}}},computed:{...Object(r["mapGetters"])({levelData:"level"}),...Object(r["mapGetters"])(["token"])},created(){this.fileUrl=o["baseUrl"]+"/order/import-create",this.getLevel()},mounted(){this.$nextTick(()=>{this.$refs.customSearchRef.focus()})},methods:{...Object(r["mapActions"])(["getLevel"]),cancelBook(){this.$refs["openCloseBookRef"].doClose()},changeBook(t){this.$refs["openCloseBookRef"].doClose();let e=0==t?1:0;return this.$service.book.changeBook({status:e}).then(t=>{this.$message.success("操作成功"),this.app.refresh({status:this.tabIndex,search:this.search})})},fileUpSuccess(t){if(1==t.code){this.$notify({title:"提交成功",message:"success",type:"success"});let t=this;setTimeout(()=>{t.$router.push({path:"/order/list"})},1e3)}else this.$message.error(t.msg)},changeText(){this.app.refresh({type:this.tabIndex,name:this.name})},goChange(t){let e={};e.customId=t.id,e.endTime="",this.$router.push({path:"/custom/pastAccountChange",query:e})},goBalanceChange(t){let e={};e.customId=t.id,e.customName=t.name,this.$router.push({path:"/member/custom-balance-list",query:e})},kd(t,e){let s={};s.customId=t.id,s.customName=t.name,s.book=e,this.$router.push({path:"/order/confirm",query:s})},handleClick(t,e){this.app.refresh({type:this.tabIndex,name:this.name})},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.type&&(this.tabIndex=this.$route.query.type),t.service(this.$service.custom).set("table",{columns:[{prop:"name",label:"名称",align:"center",width:160},{prop:"mobile",label:"手机号",align:"center",width:110},{prop:"id",label:"ID",align:"center",width:90},{prop:"debtAmount",label:"欠款",align:"center",width:100},{prop:"balance",label:"余额",align:"center",width:90},{prop:"actDebt",label:"待结欠款",align:"center",width:100},{prop:"buyNum",label:"消费次数",align:"center",width:90},{prop:"buyAmount",label:"累计消费",align:"center",width:110},{prop:"recentExpend",label:"最近下单",align:"center",width:120},{prop:"visitTime",label:"最近访问",align:"center",width:120}],op:{visible:!0,props:{width:360,align:"center",fixed:"left",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-top-element","flex1"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.shopInfo=s.shopInfo}).done(),e.refresh({type:this.tabIndex,name:this.name})}}},l=n,c=(s("1aad"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"468a50b1",null);e["default"]=u.exports},"1b62":function(t,e,s){"use strict";s.r(e);var i=s("55c3");s.d(e,"list",(function(){return i["default"]}))},"1cb5":function(t,e,s){},"1d60":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content summary-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"10px"}},[e("el-form-item",{attrs:{label:"",prop:"desc"}},[e("cl-editor-quill",{on:{load:t.editor},model:{value:t.form.desc,callback:function(e){t.$set(t.form,"desc",e)},expression:"form.desc"}})],1),e("el-form-item",[e("div",{staticClass:"app-color-3"},[e("i",{staticClass:"el-icon-warning",staticStyle:{"margin-right":"4px"}}),e("span",[t._v("商品详情的后半部分内容,可以填写一些养护知识和友情提示等。")])])]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],1)],1)},a=[],r={name:"goods-summary",data(){return{form:{desc:""},rules:{},data:""}},mounted(){this.init()},methods:{init(){this._getData()},_getData(){this.$service.single.getGoodsIntro().then(t=>{this.form.desc=t.introduce})},_updateFn(){this.$service.single.editGoodsIntro({introduce:this.form.desc}).then(t=>{this.$message.success("保存成功!")})},editor(){},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;console.log(this.form),this._updateFn()})},resetForm(t){this.$refs[t].resetFields()}}},o=r,n=(s("0a00"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},"1e29":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-name-module"},[e("div",{staticClass:"member-avatar"},[e("cl-avatar",{style:{margin:"auto"},attrs:{size:60,src:t._f("default_avatar")(t.data.avatarUrl)}})],1),e("div",{staticClass:"source-wrap"},[e("span",{staticClass:"member-name"},[t._v(t._s(t.data.userName))])])])},a=[],r={name:"card-name",props:{data:{type:Object,default:()=>{}}}},o=r,n=(s("5ac3"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"537bee49",null);e["default"]=l.exports},"1f03":function(t,e,s){"use strict";s("f709")},"1f34":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"system-user"},[e("div",{staticClass:"_box"},[e("div",{staticClass:"dept scroller1",class:[t.dept.expand?"_expand":"_collapse"]},[e("div",{staticClass:"label"},[e("div",[t._v("组织架构")]),e("ul",[e("li",[e("el-tooltip",{attrs:{content:"刷新"}},[e("i",{staticClass:"el-icon-refresh",on:{click:function(e){return t.deptRefresh()}}})])],1),e("li",[e("el-tooltip",{attrs:{content:"拖动排序"}},[e("i",{staticClass:"el-icon-s-operation",on:{click:function(e){t.dept.isDrag=!0}}})])],1),e("li",{directives:[{name:"show",rawName:"v-show",value:t.dept.isDrag,expression:"dept.isDrag"}],staticClass:"no"},[e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.deptOrder(!0)}}},[t._v("保存")]),e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.deptOrder(!1)}}},[t._v("取消")])],1)])]),e("div",{staticClass:"container",on:{contextmenu:function(e){return e.preventDefault(),t.deptCM.apply(null,arguments)}}},[e("el-tree",{directives:[{name:"loading",rawName:"v-loading",value:t.dept.loading,expression:"dept.loading"}],attrs:{data:t.dept.list,props:{label:"name"},draggable:t.dept.isDrag,"allow-drag":t.deptAllowDrag,"allow-drop":t.deptAllowDrop,"node-key":"id","highlight-current":"","default-expand-all":"","expand-on-click-node":!1},on:{"node-contextmenu":t.deptCM,"node-click":t.deptClick}})],1)]),e("div",{staticClass:"user"},[t._m(0),e("div",{staticClass:"container"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-headImg",fn:function({scope:s}){return[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:"medium",src:t._f("default_avatar")(s.row.headImg)}})]}},{key:"table-column-status",fn:function({scope:s}){return[1==s.row.status?e("el-tag",{attrs:{size:"medium",type:"success"}},[t._v("启用")]):e("el-tag",{attrs:{size:"medium",type:"danger"}},[t._v("禁用")])]}},{key:"table-column-roleName",fn:function({scope:s}){return t._l(s.row.roleNameList,(function(s,i){return e("el-tag",{key:i,staticStyle:{margin:"2px"},attrs:{size:"medium","disable-transitions":""}},[t._v(t._s(s))])}))}},{key:"slot-multi-move",fn:function(){return[e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:t.$service.system.user.permission.move,expression:"$service.system.user.permission.move"}],attrs:{size:"mini",type:"success",disabled:0==t.selects.ids.length},on:{click:function(e){return t.toMove()}}},[t._v("转移")])]},proxy:!0},{key:"slot-move",fn:function({scope:s}){return[e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:t.$service.system.user.permission.move,expression:"$service.system.user.permission.move"}],attrs:{type:"text",size:"mini"},on:{click:function(e){return t.toMove(s.row)}}},[t._v("转移")])]}}])})],1)]),e("div",{staticClass:"icon-arrow",class:[t.dept.expand?"_expand":"_collapse"],on:{click:t.deptExpand}},[t.dept.expand?e("i",{staticClass:"el-icon-arrow-left"}):e("i",{staticClass:"el-icon-arrow-right"})])]),e("x-form",{ref:"x-form",scopedSlots:t._u([{key:"slot-move-dept",fn:function({scope:s}){return[e("div",{staticClass:"system-user-move-dept"},[e("el-tree",{attrs:{data:t.dept.list,props:{label:"name"},"node-key":"id","highlight-current":""},on:{"node-click":t.moveDeptClick}})],1)]}}])}),e("cl-context-menu",{ref:"context-menu"})],1)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"label"},[e("div",[t._v("成员列表")])])}],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("8bc2")),o={data(){return{crud:null,dept:{isDrag:!1,loading:!1,expand:!0,list:[]},selects:{dept:{},ids:[]}}},created(){this.deptRefresh()},methods:{refresh(t){this.crud.refresh(t)},onLoad({ctx:t,app:e}){const s=this.$createElement;this.crud=e,t.service(this.$service.system.user).set("table",{columns:[{type:"selection",align:"center",width:"60"},{prop:"headImg",label:"头像",align:"center",slot:!0},{prop:"name",label:"姓名",align:"center","min-width":150},{prop:"username",label:"用户名",align:"center","min-width":150},{prop:"nickName",label:"昵称",align:"center","min-width":150},{prop:"departmentName",label:"部门名称",align:"center",emptyText:"无","min-width":150},{prop:"roleName",label:"角色","header-align":"center",emptyText:"无","min-width":200},{prop:"phone",label:"手机号码",align:"center","min-width":150,emptyText:"无"},{prop:"remark",label:"备注",align:"center","min-width":150,emptyText:"无"},{prop:"status",label:"状态",align:"center","min-width":150},{prop:"createTime",label:"创建时间",align:"center",sortable:!0,width:150}],props:{"default-sort":{prop:"createTime",order:"descending"}},on:{"selection-change":t=>{this.selects.ids=t.map(t=>t.id)}},op:{layout:["slot-move","edit","delete"]}}).set("upsert",{props:{with:"800px"},items:[{prop:"headImg",label:"头像",span:24,component:{name:"cl-upload"}},{prop:"name",label:"姓名",span:24,component:{name:"el-input",props:{placeholder:"请填写姓名"}},rules:{required:!0,message:"姓名不能为空"}},{prop:"nickName",label:"昵称",span:12,component:{name:"el-input",props:{placeholder:"请填写昵称"}},rules:{required:!0,message:"昵称不能为空"}},{prop:"username",label:"用户名",span:12,component:{name:"el-input",props:{placeholder:"请填写用户名"}},rules:[{required:!0,message:"用户名不能为空"}]},{prop:"password",label:"密码",span:12,hidden:!0,component:{name:"el-input",props:{placeholder:"请填写密码",type:"password"}},rules:[{min:6,max:16,message:"密码长度在 6 到 16 个字符"}]},{prop:"roleIdList",label:"角色",span:24,value:[],component:{name:"cl-role-select",props:{"multiple-limit":3}},rules:{required:!0,message:"角色不能为空"}},{prop:"phone",label:"手机号码",span:12,component:{name:"el-input",props:{placeholder:"请填写手机号码"}}},{prop:"email",label:"邮箱",span:12,component:{name:"el-input",props:{placeholder:"请填写邮箱"}}},{prop:"remark",label:"备注",span:24,component:{name:"el-input",props:{type:"textarea",rows:4}}},{prop:"status",label:"状态",value:1,component:{name:"el-radio-group",options:[{label:"开启",value:1},{label:"关闭",value:0}]}},{prop:"tips",hidden:!0,component:s("div",[s("i",{class:"el-icon-warning"}),s("span",{style:"margin-left: 6px"},["新增用户默认密码为:123456"])])}]}).set("layout",[["refresh-btn","add-btn","multi-delete-btn","slot-multi-move","flex1","search-key"],["data-table"],["flex1","pagination"]]).on("open",t=>{e.setData("upsert.items[prop:password].hidden",!t),e.setData("upsert.items[prop:tips].hidden",t)}).on("submit",(t,e,{next:s})=>{let i=this.selects.dept.id;i||(i=this.dept.list[0].id),s({...e,departmentId:i})}).on("refresh",async(t,{next:e,render:s})=>{let{list:i}=await e(t);i.map(t=>{t.roleName&&this.$set(t,"roleNameList",t.roleName.split(",")),t.status=Boolean(t.status)}),s(i)}).done(),e.refresh()},deptRefresh(){this.dept.isDrag=!1,this.dept.loading=!0,this.$service.system.dept.list().then(t=>{this.dept.list=Object(r["deepTree"])(t)}).done(()=>{this.dept.loading=!1})},deptCM(t,e){let s=[{label:"新增","suffix-icon":"el-icon-plus",callback:(t,s)=>{this.deptEdit({name:"",parentName:e.name,parentId:e.id}),s()}},{label:"编辑","suffix-icon":"el-icon-edit",callback:(t,s)=>{this.deptEdit(e),s()}}];e||(e=this.dept.list[0]),e.parentId&&s.push({label:"删除","suffix-icon":"el-icon-delete",callback:(t,s)=>{this.deptDel(e),s()}}),s.push({label:"新增成员","suffix-icon":"el-icon-user",callback:(t,e)=>{this.crud.append(),e()}}),this.$refs["context-menu"].open(t,{list:s})},deptExpand(){this.dept.expand=!this.dept.expand},deptClick(t){this.$refs["context-menu"].close(),this.selects.dept=t;let e=Object(r["revDeepTree"])(t.children).map(t=>t.id);e.unshift(t.id),this.refresh({departmentIds:e.join(",")})},deptAllowDrag({data:t}){return t.parentId},deptAllowDrop(t,e){return e.data.parentId},deptEdit(t){const e=t.id?"update":"add";this.$refs["x-form"].open({props:{title:"编辑部门",width:"550px","label-width":"100px"},items:[{label:"部门名称",prop:"name",value:t.name,component:{name:"el-input",attrs:{placeholder:"请填写部门名称"}},rules:{required:!0,message:"部门名称不能为空"}},{label:"上级部门",prop:"parentId",value:t.parentName||"...",component:{name:"el-input",attrs:{disabled:!0}}},{label:"排序",prop:"orderNum",value:t.orderNum||0,component:{name:"el-input-number",props:{"controls-position":"right",min:0,max:100}}}],on:{submit:({data:s,done:i,close:a})=>{this.$service.system.dept[e]({id:t.id,parentId:t.parentId,name:s.name,orderNum:s.orderNum}).then(()=>{this.$message.success(`新增部门${s.name}成功`),a(),this.deptRefresh()}).catch(t=>{this.$message.error(t),i()})}}})},deptDel(t){const e=e=>{this.$service.system.dept.delete({ids:t.id,deleteUser:e}).then(()=>{e?this.$message.success("删除成功"):this.$confirm("该部门用户已移动到部门顶级","删除成功")}).done(()=>{this.deptRefresh()})};this.$confirm("该操作会删除部门下的所有用户,是否确认?","提示",{type:"warning",confirmButtonText:"直接删除",cancelButtonText:"保留用户",distinguishCancelAndClose:!0}).then(()=>{e(!0)}).catch(t=>{"cancel"==t&&e(!1)})},deptOrder(t){t?this.$confirm("部门架构已发生改变,是否保存?","提示",{type:"warning"}).then(()=>{const t=(s,i)=>{s.forEach(s=>{s.parentId=i,e.push(s),s.children&&Object(r["isArray"])(s.children)&&t(s.children,s.id)})};let e=[];t(this.dept.list,null),this.$service.system.dept.order(e.map((t,e)=>({id:t.id,parentId:t.parentId,orderNum:e}))).then(()=>{this.$message.success("更新排序成功")}).catch(t=>{this.$message.error(t)}).done(()=>{this.deptRefresh(),this.dept.isDrag=!1})}).catch(()=>{}):this.deptRefresh()},async toMove(t){this.$createElement;let e=[];e=t?[t.id]:this.selects.ids;let s=this;this.$refs["x-form"].open({props:{title:"部门转移",width:"600px","label-width":"80px"},items:[{label:"选择部门",prop:"dept",component:{name:"system-user-move-dept",methods:{selectRow(t){this.$emit("input",t)}},render(){const t=arguments[0];return t("div",{class:"system-user-move-dept"},[t("el-tree",{attrs:{data:s.dept.list,"node-key":"id","highlight-current":!0},props:{props:{label:"name"}},on:{"node-click":this.selectRow}})])}}}],on:{submit:({data:t,done:s,close:i})=>{if(!t.dept)return this.$message.warning("请选择部门"),s();const{name:a,id:r}=t.dept;this.$confirm(`是否将用户转移到部门 ${a} 下`,"提示",{type:"warning"}).then(()=>{this.$service.system.user.move({departmentId:r,userIds:e}).then(()=>{this.$message.success("转移成功"),i(),this.refresh()}).catch(t=>{this.$message.error(t),s()})}).catch(()=>{})}}})}}},n=o,l=(s("ca269"),s("8ea4"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"25164e4f",null);e["default"]=c.exports},"1f40":function(t,e,s){},"20e5":function(t,e,s){},"21cb":function(t,e,s){"use strict";s("2507")},"21e7":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-amount",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(1==s.row.io?"+":"-")+" "+t._s(s.row.amount)+" ")])]}},{key:"table-column-staffName",fn:function({scope:s}){return[e("span",[t._v(t._s(""!=s.row.staffName?s.row.staffName:"-"))])]}},{key:"table-column-capitalType",fn:function({scope:s}){return[75==s.row.capitalType?e("span",[t._v("售后返充")]):62==s.row.capitalType?e("span",[t._v("线下充值")]):66==s.row.capitalType?e("span",[t._v("线上充值")]):64==s.row.capitalType?e("span",[t._v("结账")]):e("span",[t._v("其它")])]}},{key:"table-column-payWay",fn:function({scope:s}){return[62==s.row.capitalType||66==s.row.capitalType?e("span",[0==s.row.payWay?e("span",[t._v("微信")]):1==s.row.payWay?e("span",[t._v("支付宝")]):2==s.row.payWay?e("span",[t._v("余额")]):4==s.row.payWay?e("span",[t._v("现金")]):5==s.row.payWay?e("span",[t._v("银行卡")]):e("span",[t._v("其它")])]):e("span",[t._v("-")])]}},{key:"slot-search-list",fn:function({scope:s}){return[e("el-select",{staticStyle:{width:"200px","margin-right":"10px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索客户",clearable:"","remote-method":t.searchCpInfo,loading:t.loading,size:"middle"},on:{change:t.getCurrentCp},model:{value:t.currentCustomName,callback:function(e){t.currentCustomName=e},expression:"currentCustomName"}},t._l(t.customInfoList,(function(t){return e("el-option",{key:t.id,attrs:{label:`${t.name}(${t.id})`,value:t.id}})})),1),e("span",{staticStyle:{"margin-left":"9px","font-size":"28px"}},[t._v("时间:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"middle"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"middle"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]}}])})],1)},a=[],r=(s("5880"),{components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"列表",key:"0",val:0}],customInfoList:[],loading:!1,currentCustomName:"",customId:0,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",currentDateList:[]}},methods:{onLoad({ctx:t,app:e}){this.app=e,this.$route.query.customId&&(this.customId=this.$route.query.customId,this.currentCustomName=this.$route.query.customName?this.$route.query.customName:""),t.service(this.$service.customBalanceChange).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:100},{prop:"addTime",label:"日期",align:"center",width:180},{prop:"customId",label:"客户ID",align:"center",width:100},{prop:"customName",label:"客户名称",align:"center",width:150},{prop:"capitalType",label:"类型",align:"center",width:120},{prop:"payWay",label:"支付方式",align:"center",width:120},{prop:"event",label:"事项",align:"center",width:200},{prop:"staffName",label:"人员",align:"center",width:100},{prop:"amount",label:"变动",align:"center",width:120},{prop:"balance",label:"余额",align:"center",width:120},{prop:"remark",label:"备注",align:"center",width:200}],op:{visible:!0,props:{width:100,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"..."}}).set("layout",[["slot-tabs"],["slot-search-list"],["data-table"],["flex1","pagination"]]).done(),this.refreshData()},getCurrentCp(t){this.customId=t,this.refreshData()},refreshData(){this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId})},exportData(){this.$service.customBalanceChange.getChangeList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId,pageSize:9999999,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},searchCpInfo(t){let e=this;""!==t?(this.loading=!0,this.$service.custom.list({name:t,type:0}).then(t=>{e.loading=!1,e.customInfoList=t.list})):this.customInfoList=[]},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.refreshData()}}}),o=r,n=(s("41bf"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"f78d35a2",null);e["default"]=l.exports},"21fd":function(t,e,s){},"231c":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-popover",{staticClass:"operate-module-line",attrs:{"popper-class":"liu-popover-line",placement:"top",width:"104",trigger:"manual"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("div",{staticClass:"operate-wrap"},[t._l(t.data.children,(function(s,i){return e("div",{key:i,staticClass:"operate-list"},[e("i",{staticClass:"iconfont iconcaozuojihuo",on:{click:function(e){return e.stopPropagation(),t.listDel(i)}}}),e("div",{staticClass:"btn-text",on:{click:function(e){return t.listClick(s,i)}}},[t._v(t._s(s.name))])])})),e("div",{staticClass:"operate-list operate-list-add",on:{click:function(e){return t.addFn()}}},[e("i",{staticClass:"iconfont icontupiantianjia icon-add"})])],2),e("el-button",{staticClass:"operate-btn",attrs:{slot:"reference",type:"text",icon:"el-icon-s-fold"},slot:"reference"},[t._v(t._s(t.data.name))])],1)},a=[],r={name:"operate-module",data(){return{}},props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},mounted(){},methods:{showFn(){this.$emit("show",this.data)},listClick(t,e){this.$emit("click",{...t,index:e})},listDel(t){this.$emit("del",t)},addFn(){this.$emit("add")}}},o=r,n=(s("7ede"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},"233c":function(t,e,s){},"23b5":function(t,e,s){},"23d6":function(t,e,s){},2507:function(t,e,s){},2531:function(t,e,s){},"25f7":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v(t._s(t.totalNum)+" 扎 ¥"+t._s(t.totalAmount)+" 总毛利 "+t._s(t.totalMl))])]},proxy:!0},{key:"table-column-mll",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.mll)+"%")])]}},{key:"table-column-num",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.num?parseFloat(s.row.num):0))])]}}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,totalNum:0,totalMl:0}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportData(){this.$service.statItem.getShow({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.statItem.getShow({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>{this.totalAmount=t.totalAmount||0,this.totalMl=t.totalMl||0,this.totalNum=t.totalNum||0;let e=[...t.list];return{list:e}})}).set("table",{columns:[{label:"名称",prop:"name",align:"center"},{label:"总数量",prop:"num",align:"center"},{label:"总金额",prop:"amount",align:"center"},{label:"毛利",prop:"gross",align:"center"},{label:"毛利率",prop:"mll",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","slot-export-due","flex1"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},n=o,l=(s("ee01"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"50eabccd",null);e["default"]=c.exports},"264a":function(t,e,s){"use strict";s("667f")},2667:function(t,e,s){"use strict";s("6fce")},2742:function(t,e,s){},"276c":function(t,e,s){"use strict";s("955f")},2771:function(t,e,s){},"27b9":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.currentData.customName?t.currentData.customName:"")+"】"+t._s(t.currentData.itemName?t.currentData.itemName:"")+" 上下架记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-on-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookOnChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})}}},o=r,n=(s("548c"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"25a6d678",null);e["default"]=l.exports},2981:function(t,e,s){},"29af":function(t,e,s){},"2a54":function(t,e,s){},"2c7b":function(t,e,s){},"2cd5":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.itemData.itemName?t.itemData.itemName:"")+"】预订记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"total-book-record",props:{itemData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookChangeGlobal).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})}}},o=r,n=(s("aebf"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"28ed1829",null);e["default"]=l.exports},"2d14":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-name-module"},[e("div",{staticClass:"app-size-30 app-color-0"},[t._v(t._s(t.info.receiveUserName))]),e("div",[t._v(t._s(t.info.receiveMobile))]),e("div",[t._v(t._s(t.info.receiveFullAddress)+"("+t._s(t.info.showAddress)+")")]),t._m(0)])},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"card-tag"},[e("img",{attrs:{src:s("da6a"),alt:""}})])}],r={name:"card-name-module",props:{info:{type:Object,default:()=>{}}},data(){return{}}},o=r,n=(s("bd79"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"fca3533e",null);e["default"]=l.exports},"2f11":function(t,e,s){"use strict";s("529a")},"30f3":function(t,e,s){},3118:function(t,e,s){"use strict";s("515d")},"32d0":function(t,e,s){"use strict";s("73cb")},"33db":function(t,e,s){},3406:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"page-iframe",attrs:{"element-loading-text":"拼命加载中"}},[e("iframe",{attrs:{src:t.url,frameborder:"0"}})])},a=[],r={data(){return{loading:!1,url:""}},created(){this.url=this.$route.meta.iframeUrl},mounted(){const t=this.$el.querySelector("iframe");this.loading=!0,t.onload=()=>{this.loading=!1}}},o=r,n=(s("c158"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"367019ae",null);e["default"]=l.exports},"34ca":function(t,e,s){"use strict";s("7d69")},"362d":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.itemData.itemName?t.itemData.itemName:"")+"】路上记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"total-book-record",props:{itemData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookRoadChangeGlobal).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})}}},o=r,n=(s("e577"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"33a27d2e",null);e["default"]=l.exports},3698:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap order-list-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-sendStaffName",fn:function({scope:s}){return[""!=s.row.sendStaffName?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.changeSendStaff(s.row)}}},[t._v(t._s(s.row.sendStaffName))]):e("span",[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},on:{click:function(e){return t.changeSendStaff(s.row)}},slot:"reference"})])]}},{key:"table-column-shopAdminName",fn:function({scope:s}){return[""!=s.row.shopAdminName?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.changeKdStaff(s.row)}}},[t._v(t._s(s.row.shopAdminName))]):e("span",[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},on:{click:function(e){return t.changeKdStaff(s.row)}},slot:"reference"})])]}},{key:"table-column-clearSign",fn:function({scope:s}){return[0==s.row.clearSign?e("div",[e("el-popconfirm",{attrs:{title:"确认已结算?"},on:{confirm:function(e){return t.updateClearSign(s.row)},onConfirm:function(e){return t.updateClearSign(s.row)}}},[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},slot:"reference"})])],1):e("div",[e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"17px"}})])]}},{key:"table-column-reCheck",fn:function({scope:s}){return[0==s.row.reCheck?e("div",[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},on:{click:function(e){return t.changeReCheck(s.row)}}})]):e("div",[e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"17px"}})])]}},{key:"table-column-debt",fn:function({scope:s}){return[1==s.row.debt?e("span",{staticStyle:{"font-size":"13px"}},[t._v("是")]):e("span",[t._v("-")])]}},{key:"table-column-addTime",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.addTime?t.formatTime(s.row.addTime):"")+" ")])]}},{key:"table-column-payTime",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.payTime&&"0000-00-00 00:00:00"!=s.row.payTime?t.formatTime(s.row.payTime):"-")+" ")])]}},{key:"table-column-printNum",fn:function({scope:s}){return[s.row.printNum>0?e("span",[t._v(" "+t._s(s.row.printNum)+" ")]):e("span",{staticStyle:{"font-size":"14px"}},[t._v(" "+t._s(s.row.printNum)+" ")])]}},{key:"table-column-customMobile",fn:function({scope:s}){return[""==s.row.customMobile?e("div",[t._v("-")]):e("div",[t._v(t._s(s.row.customMobile))])]}},{key:"table-column-sameTimeIdsNum",fn:function({scope:s}){return[s.row.sameTimeIdsNum>1?e("div",{staticStyle:{"font-size":"14px"}},[t._v(t._s(s.row.sameTimeIdsNum))]):e("div",[t._v("-")])]}},{key:"table-column-book",fn:function({scope:s}){return[1==s.row.book?e("span",{staticStyle:{"font-size":"13px"}},[t._v("是")]):e("span",[t._v("-")])]}},{key:"table-column-sendTimeWant",fn:function({scope:s}){return[1==s.row.book?e("span",{staticStyle:{"font-size":"13px"}},[t._v(t._s(s.row.sendTimeWant?s.row.sendTimeWant.substr(5,5):""))]):e("span",[t._v("-")])]}},{key:"table-column-status",fn:function({scope:s}){return[2==s.row.status?e("span",[t._v("待发货")]):3==s.row.status?e("span",[t._v("待收货")]):4==s.row.status?e("span",[t._v("已完成")]):5==s.row.status?e("span",[t._v("已取消")]):e("span",[t._v("待付款")])]}},{key:"slot-column-option",fn:function({scope:s}){return[1!=s.row.status&&5!=s.row.status?e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(e){return e.stopPropagation(),t.detailShowFn(s.row)}}},[t._v("详情")]):e("el-button",{attrs:{size:"small"},on:{click:function(e){return e.stopPropagation(),t.detailShowFn(s.row)}}},[t._v("详情")]),0==s.row.book?[5!=s.row.status&&2==s.row.status?e("el-popconfirm",{staticStyle:{"margin-left":"10px","margin-right":"10px"},attrs:{title:"确认已发货?"},on:{confirm:function(e){return t.confirmSend(s.row)},onConfirm:function(e){return t.confirmSend(s.row)}}},[e("el-button",{attrs:{slot:"reference",size:"small",type:"primary"},slot:"reference"},[t._v("确认发货")])],1):e("el-button",{attrs:{size:"small"}},[t._v("确认发货")])]:[2==s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.confirmArrival(s.row)}}},[t._v("确认发货")]):e("el-button",{attrs:{size:"small"}},[t._v("确认发货")])],4==s.row.status?[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goRefund(s.row)}}},[t._v("发起售后")])]:1==s.row.status||5==s.row.status?[e("el-button",{attrs:{size:"small"}},[t._v("发起售后")])]:[0==s.row.book?[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.confirmReach(s.row)}}},[t._v("确认送达")])]:[e("el-button",{attrs:{size:"small"}},[t._v("发起售后")])]],1!=s.row.status&&5!=s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.beginPrint(s.row)}}},[t._v("打票")]):e("el-button",{attrs:{size:"small"}},[t._v("打票")]),1!=s.row.status&&5!=s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printOrder(s.row)}}},[t._v("打A4")]):e("el-button",{attrs:{size:"small"}},[t._v("打A4")]),5!=s.row.status&&1!=s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.down(s.row)}}},[t._v("下载")]):e("el-button",{attrs:{size:"small"}},[t._v("下载")]),5!=s.row.status&&1!=s.row.status&&s.row.sameTimeIdsNum>1?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.allDown(s.row)}}},[t._v("全下载")]):e("el-button",{attrs:{size:"small"}},[t._v("全下载")]),1!=s.row.status&&5!=s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printPin(s.row)}}},[t._v("打多联")]):e("el-button",{attrs:{size:"small"}},[t._v("打多联")]),e("el-dropdown",{staticStyle:{"margin-left":"10px"},on:{command:function(e){return t.doMore(e,s.row)}}},[5!=s.row.status&&1!=s.row.status?e("el-button",{attrs:{type:"primary",size:"small"}},[t._v("更多"),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]):e("el-button",{attrs:{size:"small"}},[t._v("更多"),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"refundShowRecord"}},[t._v("售后记录")]),e("el-dropdown-item",{attrs:{command:"downExcel"}},[t._v("下载excel")]),e("el-dropdown-item",{attrs:{command:"cancelCurrentOrder"}},[t._v("取消")])],1)],1)]}},{key:"slot-search-option",fn:function({scope:s}){return[e("el-input",{ref:"orderSearchRef",staticStyle:{width:"140px"},attrs:{placeholder:"客户名称 / 订单号",size:"mini",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.name=""}},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}}),e("el-select",{staticStyle:{width:"110px","margin-left":"8px"},attrs:{size:"mini",placeholder:"开单人",clearable:!0},on:{change:t.getKdStaff},model:{value:t.currentKdStaffName,callback:function(e){t.currentKdStaffName=e},expression:"currentKdStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("el-button-group",{staticStyle:{"margin-left":"9px","margin-right":"4px"}},[e("el-button",{attrs:{size:"mini",type:0===t.searchTimeType?"primary":"default"},on:{click:function(e){return t.changeSearchTimeType(0)}}},[t._v("创建时间")]),e("el-button",{attrs:{size:"mini",type:1===t.searchTimeType?"primary":"default"},on:{click:function(e){return t.changeSearchTimeType(1)}}},[t._v("账单时间")])],1),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("el-select",{staticStyle:{width:"110px","margin-left":"4px","margin-right":"8px"},attrs:{size:"mini",placeholder:"订单类型"},on:{change:t.changeBook},model:{value:t.book,callback:function(e){t.book=e},expression:"book"}},[e("el-option",{attrs:{label:"全部",value:"-1"}}),e("el-option",{attrs:{label:"常规订单",value:"0"}}),e("el-option",{attrs:{label:"预订单",value:"1"}})],1),e("el-select",{staticStyle:{width:"110px","margin-right":"8px"},attrs:{size:"mini",placeholder:"结款状态"},on:{change:t.changeClearSign},model:{value:t.clearSign,callback:function(e){t.clearSign=e},expression:"clearSign"}},[e("el-option",{attrs:{label:"全部",value:"-1"}}),e("el-option",{attrs:{label:"待结款",value:"0"}}),e("el-option",{attrs:{label:"已结款",value:"1"}})],1)]}},{key:"slot-export-order",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-more-do-btn",fn:function(){return[e("el-dropdown",{attrs:{size:"medium","split-button":"",type:"primary"},on:{click:t.batchDown,command:function(e){return t.bottomDoMore(e)}}},[t._v(" 批量下载 "),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"batchAllDown"}},[t._v("批量全下载")])],1)],1)]},proxy:!0}])}),e("select-staff",{ref:"selectStaffRef",attrs:{staffData:t.staffData},on:{getStaff:t.getStaff}}),e("arrival",{ref:"arrivalRef",attrs:{arrivalData:t.arrivalData},on:{searchFocus:t.searchFocus,addNewItem:t.addNewItem,refreshData:t.refreshData,getStockDetail:t.getStockDetail,getCostChange:t.getCostChange,openLoan:t.openLoan}}),e("simple-item",{ref:"simpleItemRef",attrs:{simpleData:t.simpleData},on:{renewArrival:t.renewArrival}}),e("order-detail",{ref:"orderDetail",attrs:{orderOperate:t.optionData},on:{getStockDetail:t.getStockDetail,searchFocus:t.searchFocus}}),e("sel-order",{ref:"selOrder",attrs:{id:t.optionData.id},on:{"song-success":t.onSongSuccess}}),e("stock-detail",{ref:"stockDetail",attrs:{itemData:t.itemData}}),e("begin-refund",{ref:"beginRefundRef",attrs:{currentRefundData:t.currentRefundData},on:{searchFocus:t.searchFocus}}),e("refund-record",{ref:"refundRecordRef",attrs:{currentData:t.refundRecordData},on:{searchFocus:t.searchFocus}}),e("cost-change",{ref:"costChangeRef",attrs:{costData:t.costData},on:{searchFocus:t.searchFocus}}),e("loan-item",{ref:"loanItemRef",attrs:{currentData:t.loanData},on:{renewArrival:t.renewArrival}}),e("div",{staticClass:"print-html-box"},[e("table",{staticStyle:{border:"solid 1px #fff","border-collapse":"collapse"},attrs:{border:"0",width:"730"}},[e("tr",[e("td",{staticStyle:{width:"340px"}},[t._v("客户:"+t._s(t.orderData.customName)+" "+t._s(t.orderData.customMobile))]),e("td",{staticStyle:{width:"200px"}},[t._v("单号:"+t._s(t.orderData.orderSn))]),e("td",{staticStyle:{width:"220px"}},[t._v("日期:"+t._s(t.orderData.deadline))])]),e("tr",[e("td",{attrs:{colspan:"3"}},[t._v("地址:"+t._s(t.orderData.fullAddress)),""!=t.orderData.showAddress?e("span",[t._v("("+t._s(t.orderData.showAddress)+")")]):t._e()])])]),e("table",{staticStyle:{border:"solid 1px black","border-collapse":"collapse"},attrs:{border:"1",width:"730"}},[t._m(0),t._l(t.orderData.product,(function(s,i){return e("tr",[e("td",{staticStyle:{width:"50px","text-align":"center"}},[t._v(t._s(i+1))]),e("td",{staticStyle:{width:"250px","text-align":"center"}},[t._v(t._s(s.name))]),e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v("扎/支")]),e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v(t._s(`${s.bigNum}/${s.smallNum}`))]),e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v(t._s(s.price))]),0==s.ratio?e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v(t._s(Number(s.price)*(Number(s.bigNum)+0)))]):e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v(t._s(Number(s.price)*(Number(s.bigNum)+Number(s.smallNum)/Number(s.ratio))))]),e("td",{staticStyle:{width:"100px","text-align":"center"}})])})),e("tr",[e("td",{staticStyle:{width:"100px"}}),e("td",{staticStyle:{width:"100px","font-weight":"bold"},attrs:{colspan:"6"}},[e("span",[t._v("合计:"+t._s(t.orderData.actPrice)),t.orderData.sendCost>0?e("span",[t._v("(运费:"+t._s(t.orderData.sendCost)+" )")]):t._e()]),e("span",{staticStyle:{"margin-left":"30px"}},[t._v("应收:"+t._s(t.orderData.realPrice))]),e("span",{staticStyle:{"margin-left":"30px"}},[t._v("实收:"+t._s(0==t.orderData.debt?t.orderData.realPrice:"0.00"))]),t.orderData.debtAmount>0?e("span",{staticStyle:{"margin-left":"30px"}},[t._v("累计欠款:"+t._s(t.orderData.debtAmount))]):t._e()])]),e("tr",[e("td",{staticStyle:{width:"100px"}},[t._v("其他说明:")]),e("td",{staticStyle:{width:"100px"},attrs:{colspan:"6"}},[t._v(t._s(t.orderData.remark))])])],2),e("table",{staticStyle:{border:"solid 1px #fff","border-collapse":"collapse"},attrs:{border:"0",width:"730"}},[e("tr",[e("td",{staticStyle:{width:"260px"},attrs:{colspan:"2"}},[t._v("开单:"+t._s(t.orderData.shopAdminName))]),e("td",{staticStyle:{width:"260px"}},[t._v("打印时间:"+t._s(t.todays(1)))])])])])],1)},a=[function(){var t=this,e=t._self._c;return e("tr",[e("td",{staticStyle:{width:"50px","text-align":"center"}},[t._v("序号")]),e("td",{staticStyle:{width:"250px","text-align":"center"}},[t._v("名称")]),e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v("单位")]),e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v("数量")]),e("td",{staticStyle:{width:"80px","text-align":"center"}},[t._v("单价")]),e("td",{staticStyle:{width:"60px","text-align":"center"}},[t._v("金额")]),e("td",{staticStyle:{width:"100px","text-align":"center"}},[t._v("备注")])])}],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("209c"),s("d284")),o=s("ad3b"),n=s("f152"),l=s("01e4"),c=s("e78b"),u=s("b4a4"),d=s("9dba"),m=s("0ce5"),p=s("3b9e"),h=s("bd0a"),f=s("54a1"),b={components:{SelOrder:n["default"],OrderDetail:l["default"],arrival:c["default"],simpleItem:u["default"],beginRefund:d["default"],refundRecord:m["default"],selectStaff:r["default"],stockDetail:o["default"],costChange:p["default"],loanItem:h["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"全部订单",key:"0",val:0},{text:"待付款",key:"1",val:0},{text:"待发货",key:"2",val:0},{text:"待收货",key:"3",val:0},{text:"已完成",key:"4",val:0}],optionData:{},arrivalData:{},costData:{},loanData:{},simpleData:{},staffData:{title:"",changeType:"",obj:null},orderData:"",book:"-1",clearSign:"-1",currentDateList:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",searchTimeType:0,name:"",currentRefundData:{},refundRecordData:{},currentKdStaffName:"",currentKdStaffId:0,staffList:[],selectedData:[],itemData:{id:0},totalActPrice:0,totalTkPrice:0}},created(){this.init()},mounted(){let t=this;document.onkeydown=function(e){if(e&&","==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/order/add",query:e})}if(e&&"."==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/in/add",query:e})}},this.$nextTick(()=>{this.$refs.orderSearchRef.focus()}),t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list})},methods:{getListSearchParams(t={}){return Object.assign({status:this.tabIndex,book:this.book,clearSign:this.clearSign,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,name:this.name,shopAdminId:this.currentKdStaffId,searchTimeType:this.searchTimeType},t)},changeSearchTimeType(t){this.searchTimeType!==t&&(this.searchTimeType=t,this.app.refresh(this.getListSearchParams()))},searchFocus(){let t=this;setTimeout(()=>{t.$refs.orderSearchRef.focus()},1e3)},getStaff(t){let e=this;if("changeSend"==this.staffData.changeType){let s=this.staffData.obj;return this.$service.order.changeSendStaff({orderId:s.id,staffId:t.id}).then(t=>{this.$message.success("修改成功"),setTimeout(()=>{e.refreshData()},1e3)}),!0}if("changeKd"==this.staffData.changeType)return this.$message.error("开发中"),!1},changeSendStaff(t){this.staffData={title:"修改送货员",changeType:"changeSend",obj:t},this.$refs.selectStaffRef.init()},changeKdStaff(t){this.staffData={title:"修改开单人",changeType:"changeKd",obj:t},this.$refs.selectStaffRef.init()},doMore(t,e){if("cancelCurrentOrder"==t){if(1==e.book&&2==e.status)return this.$confirm("确认取消?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.order.cancelBookOrder({id:e.id}).then(t=>{this.$message.success("取消成功"),this.refreshData()})}),!0;if(0==e.book&&1==e.status)return this.$confirm("确认取消?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.order.cancelOrder({id:e.id}).then(t=>{this.$message.success("取消成功"),this.refreshData()})}),!0;this.$message.error("不能取消")}"refundShowRecord"==t&&(this.refundRecordData=e,setTimeout(()=>{this.$refs.refundRecordRef.init()})),"downExcel"==t&&this.$service.orderItem.getDownExcel({id:e.id}).then(t=>{t.file&&(window.location.href=t.file)})},goRefund(t){this.currentRefundData=t,setTimeout(()=>{this.$refs.beginRefundRef.init()})},renewArrival(t){this.confirmArrival(t)},getStockDetail(t){this.itemData={id:t.productId,name:t.name,direction:"rtl"},setTimeout(()=>{this.$refs.stockDetail.init()})},getCostChange(t){this.costData={id:t.productId,name:t.name,direction:"rtl"},setTimeout(()=>{this.$refs.costChangeRef.init()})},openLoan(t,e){this.$service.bookItemCustom.getInfo({orderId:e,productId:t.productId}).then(t=>{let s=t.res;this.loanData={customId:s.customId,customName:s.customName,id:s.id,itemName:s.name,itemId:s.itemId,direction:"rtl",orderId:e},setTimeout(()=>{this.$refs.loanItemRef.init()})})},addNewItem(t){this.simpleData=t,setTimeout(()=>{this.$refs.simpleItemRef.init()})},confirmArrival(t){this.arrivalData={id:t.id},setTimeout(()=>{this.$refs.arrivalRef.init()})},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh(t.getListSearchParams())}),650)},confirmReach(t){let e=this;this.$confirm("确认已送达?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.order.confirmReach({id:t.id}).then(t=>{e.$message.success("确认成功"),e.refreshData()})})},confirmSend(t){let e=this;this.$service.order.fh({id:t.id,fhType:0}).then(t=>{this.$notify({title:"操作成功",message:"",type:"success"}),e.refreshData()})},changeReCheck(t){this.$service.order.modifyReCheck({id:t.id}).then(e=>{this.$notify({title:"操作成功",message:"",type:"success"}),t.reCheck=1})},updateClearSign(t){this.$service.order.modifyClearSign({id:t.id}).then(e=>{this.$notify({title:"操作成功",message:"",type:"success"}),t.clearSign=1})},newCg(){let t={};this.$router.push({path:"/in/add",query:t})},billing(){let t={};this.$router.push({path:"/order/add",query:t})},changeClearSign(t){this.clearSign=t,this.app.refresh(this.getListSearchParams())},changeBook(t){this.book=t,this.app.refresh(this.getListSearchParams())},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.app.refresh(this.getListSearchParams())},refreshData(){this.app.refresh(this.getListSearchParams())},todays(t){var e=new Date;let s="";if(1==t)s=e.getFullYear()+"-"+parseInt(e.getMonth()+1)+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();else if("time"==t)s=e.getHours()+":"+e.getMinutes();else{let t=e.getDate()>9?e.getDate():"0"+e.getDate(),i=parseInt(e.getMonth()+1)>9?parseInt(e.getMonth()+1):"0"+parseInt(e.getMonth()+1);s=e.getFullYear()+"-"+i+"-"+t}return s},formatTime(t){const e=(new Date).getFullYear(),s=parseInt(t.substr(0,4));return s!==e?t.substr(0,16):t.substr(5,11)},formatProgress(){return""},init(){this.$store.dispatch("getUsage")},beginPrint(t){t.printNum&&Number(t.printNum)>0?this.$confirm("确认补打小票?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.printBilling(t)}):this.printBilling(t)},printPin(t){if(1!=t.payStatus)return this.$message.error("没有付款"),!1;this.$service.order.info({id:t.id,printType:1}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new f["hiprint"].PrintTemplate({template:a});r.print(s),this.$service.order.addPrintNum({id:t.id}).then(t=>{this.app.refresh(this.getListSearchParams())})})},printBilling(t){this.$service.order.cloudPrintOrder({id:t.id}).then(t=>{t.hasNoPrint&&1==t.hasNoPrint?this.$confirm("请先设置打印小票机","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{}):this.$notify({title:"已打印",message:"操作成功",type:"success"})})},printOrder(t){this.$service.order.info({id:t.id}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new f["hiprint"].PrintTemplate({template:a});r.print(s),this.$service.order.addPrintNum({id:t.id}).then(t=>{this.app.refresh(this.getListSearchParams())})})},selfGetCancel(t){this.$refs["popover-"+t][1].doClose()},noSendShipFn(t){this.$refs["popover-"+t.id][1].doClose(),this.$service.order.freeShipping({id:t.id}).then(e=>{this.$message.success("操作成功!"),t.buttonList.forEach(t=>{"selfGet"==t.type&&(t.disable=1)})})},shipDrawFn(t){this.optionData=t,setTimeout(()=>{this.$refs.selOrder.init()})},batchDown(){let t=this;if(this.$util.isEmpty(this.selectedData))return this.$message.error("请选择订单"),!1;let e=0;if(this.selectedData.forEach((t,s,i)=>{1!=Number(t.status)&&5!=Number(t.status)&&e++}),0==e)return this.$message.error("没有订单需要下载"),!1;this.$confirm("共"+e+"个,确认下载?确认后请稍等30秒","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.selectedData.forEach((e,s,i)=>{1!=Number(e.status)&&5!=Number(e.status)&&setTimeout(()=>{t.down({id:e.id})},6e3*s)})})},getKdStaff(t){this.currentKdStaffId=t,this.refreshData()},bottomDoMore(t){if("batchAllDown"==t){let t=this;if(this.$util.isEmpty(this.selectedData))return this.$message.error("请选择订单"),!1;let e=0;if(this.selectedData.forEach((t,s,i)=>{1!=Number(t.status)&&5!=Number(t.status)&&Number(t.sameTimeIdsNum)>1&&e++}),0==e)return this.$message.error("没有订单需要下载"),!1;this.$confirm("共"+e+"个,确认下载?确认后请稍等30秒","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.selectedData.forEach((e,s,i)=>{1!=Number(e.status)&&5!=Number(e.status)&&Number(e.sameTimeIdsNum)>1&&setTimeout(()=>{t.allDown({id:e.id})},6e3*s)})})}},down(t){let e=this.$service.order.down(t.id,0);location.href=e},allDown(t){let e=this.$service.order.down(t.id,1);location.href=e},detailShowFn(t){this.optionData=t,setTimeout(()=>{this.$refs.orderDetail.init()})},handleClick(t,e){this.app.refresh(this.getListSearchParams())},exportData(){this.$service.order.getOrderList(this.getListSearchParams({pageSize:9999999,export:1})).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.status&&(this.tabIndex=this.$route.query.status),this.$route.query.customName&&(this.name=this.$route.query.customName),this.$route.query.searchTime&&(this.searchTime=this.$route.query.searchTime),this.$route.query.startTime&&(this.startTime=this.$route.query.startTime),this.$route.query.endTime&&(this.endTime=this.$route.query.endTime),t.service(this.$service.order).set("table",{columns:[{type:"selection",align:"center",width:"40"},{prop:"orderSn",label:"单号",align:"center",width:"130"},{prop:"sendNum",label:"编号",align:"center",width:"55"},{prop:"printNum",label:"打印",align:"center",width:"50"},{prop:"customName",label:"客户",align:"center",width:"120"},{prop:"customMobile",label:"手机号",align:"center",width:"100"},{prop:"bigNum",label:"数量",align:"center",width:"50"},{prop:"debt",label:"赊账",align:"center",width:"50"},{prop:"sameTimeIdsNum",label:"多单",align:"center",width:"60"},{prop:"status",label:"状态",align:"center",width:70},{prop:"prePrice",label:"总价",align:"center",width:"90"},{prop:"actPrice",label:"实际",align:"center",emptyText:"无",width:"90"},{prop:"reCheck",label:"复核",align:"center",width:50},{prop:"clearSign",label:"结算",align:"center",width:50},{prop:"book",label:"预订",align:"center",width:"50"},{prop:"sendTimeWant",label:"预订发货",align:"center",width:"75"},{prop:"discountAmount",label:"已优惠",align:"center",emptyText:"无",width:"90"},{prop:"tkPrice",label:"已退",align:"center",width:80},{prop:"shopAdminName",label:"开单人",align:"center",width:90},{prop:"sendStaffName",label:"配送人",align:"center",width:90},{prop:"payTime",label:"账单时间",align:"center",width:90},{prop:"addTime",label:"开单时间",align:"center",width:90}],on:{"selection-change":t=>{this.selectedData=t.map(t=>({id:t.id,status:t.status,sameTimeIdsNum:t.sameTimeIdsNum}))}},props:{"default-sort":{prop:"addTime",order:"descending"}},op:{visible:!0,props:{width:710,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-search-option","slot-export-order"],["data-table"],["slot-more-do-btn","flex1","pagination"]]).on("refresh",async(t,{next:e})=>{this.name=t.name?t.name:"";let s=await e(t);this.totalTkPrice=s.totalTkPrice?s.totalTkPrice:0,this.totalActPrice=s.totalActPrice?s.totalActPrice:0}).done(),e.refresh(this.getListSearchParams())},onSongSuccess(){}}},g=b,v=(s("63db"),s("b140"),s("1805")),y=Object(v["a"])(g,i,a,!1,null,"a29e4804",null);e["default"]=y.exports},"36e1":function(t,e,s){},"374d":function(t,e,s){},"37cf":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.goItemGh(s.row)}}},[t._v("供货明细")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getBookRecord(s.row)}}},[t._v("预订记录")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getOnRecord(s.row)}}},[t._v("上下架记录")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getRoadRecord(s.row)}}},[t._v("路上记录")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getCgRecord(s.row)}}},[t._v("待采记录")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.goOn(s.row)}}},[t._v("上齐")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.goUp(s.row)}}},[t._v("上架")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.goOff(s.row)}}},[t._v("下架")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.loanStock(s.row)}}},[t._v("借库")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.addStock(s.row)}}},[t._v("加库")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.delStock(s.row)}}},[t._v("减库")])]}},{key:"slot-search-option",fn:function({scope:s}){return[Number(t.itemId)>0?e("span",{staticStyle:{"font-size":"32upx",color:"blue","font-weight":"bold","margin-left":"30upx",padding:"10upx 0 10upx 0"}},[t._v(" 【"+t._s(t.remainName)+"】"),t.remainNum&&Number(t.remainNum)>0?e("span",[t._v("剩 "+t._s(t.remainNum)+"份")]):t._e()]):t._e(),Number(t.customId)>0?e("span",{staticStyle:{"font-size":"32upx",color:"black","font-weight":"bold","margin-left":"30upx",padding:"10upx 0 10upx 0"}},[t._v(" 【"+t._s(t.customName)+"】预订的花材 ")]):t._e()]}},{key:"table-column-customName",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(" "+t._s(s.row.customName)),0!=s.row.seatSn?e("span",[t._v("("+t._s(s.row.seatSn)+")")]):t._e()]):e("span",[t._v(" "+t._s(s.row.customName)),0!=s.row.seatSn?e("span",[t._v("("+t._s(s.row.seatSn)+")")]):t._e()])]}},{key:"table-column-roadNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.roadNum))]):e("span",[t._v(t._s(s.row.roadNum))])]}},{key:"table-column-needCgNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.needCgNum))]):e("span",[t._v(t._s(s.row.needCgNum))])]}},{key:"table-column-name",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.name))]):e("span",[t._v(t._s(s.row.name))])]}},{key:"table-column-bookNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.bookNum))]):e("span",[t._v(t._s(s.row.bookNum))])]}},{key:"table-column-remark",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.remark))]):e("span",{staticStyle:{color:"red","font-weight":"bold"}},[t._v(t._s(s.row.remark))])]}},{key:"table-column-onNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.onNum))]):e("span",[t._v(t._s(s.row.onNum))])]}},{key:"slot-more-do-btn",fn:function(){return[e("el-dropdown",{attrs:{size:"medium","split-button":"",type:"primary"},on:{click:t.batchGoOn,command:t.doMore}},[t._v(" 全上齐 "),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"developing"}},[t._v("开发中")])],1)],1)]},proxy:!0}])}),e("book-record",{ref:"bookRecord",attrs:{currentData:t.bookRecordData}}),e("book-on-record",{ref:"bookOnRecord",attrs:{currentData:t.bookOnRecordData}}),e("book-road-record",{ref:"bookRoadRecord",attrs:{currentData:t.bookRoadRecordData}}),e("book-cg-record",{ref:"bookCgRecord",attrs:{currentData:t.bookCgRecordData}}),e("book-item-ghs",{ref:"bookItemGhs",attrs:{currentData:t.bookItemGhsData}}),e("loan-item",{ref:"loanItemRef",attrs:{currentData:t.loanData},on:{refreshData:t.refreshData}})],1)},a=[],r=(s("8f26"),s("963e"),s("f803"),s("5880"),s("a403")),o=s("27b9"),n=s("f707"),l=s("957f"),c=s("11e4"),u=s("bd0a"),d={components:{bookRecord:r["default"],bookOnRecord:o["default"],bookCgRecord:n["default"],bookRoadRecord:l["default"],bookItemGhs:c["default"],loanItem:u["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"列表",key:"0",val:0}],ghsInfoList:[],loading:!1,ghsId:0,endTime:"",itemId:0,itemName:"",customId:0,customName:"",remainName:"",remainNum:0,bookCgRecordData:{},bookRoadRecordData:{},bookOnRecordData:{},bookRecordData:{},bookItemGhsData:{},loanData:{},selectedIds:[]}},methods:{refreshData(){this.app.refresh({itemId:this.itemId,customId:this.customId})},batchGoOn(){let t=this;if(this.$util.isEmpty(this.selectedIds))return this.$message.error("请选要上齐项"),!1;this.$confirm("确认全上齐?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.bookItemCustom.batchGoOn({ids:JSON.stringify(this.selectedIds)}).then(e=>{t.$message.success("操作成功"),setTimeout(()=>{t.app.refresh({itemId:this.itemId,customId:this.customId})},1500)})})},doMore(t){"developing"==t&&this.$message.error("开发中")},goUp(t){let e=this;this.$prompt("请输入数量","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:"数量错误"}).then(({value:s})=>{this.$service.bookItemCustom.goOn({id:t.id,num:s}).then(t=>{e.$message.success("操作成功"),setTimeout(()=>{e.app.refresh({itemId:this.itemId,customId:this.customId})},1500)})})},delStock(t){let e=this;this.$prompt("请输入数量","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:"数量错误"}).then(({value:s})=>{this.$service.checkOrder.bookDelStock({bookItemCustomId:t.id,num:s,itemId:t.itemId}).then(t=>{e.$message.success("操作成功"),setTimeout(()=>{e.app.refresh({itemId:this.itemId,customId:this.customId})},1500)})})},addStock(t){let e=this;this.$prompt("请输入数量","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:"数量错误"}).then(({value:s})=>{this.$service.checkOrder.bookAddStock({bookItemCustomId:t.id,num:s,itemId:t.itemId}).then(t=>{e.$message.success("操作成功"),setTimeout(()=>{e.app.refresh({itemId:this.itemId,customId:this.customId})},1500)})})},loanStock(t){this.loanData={customId:t.customId,customName:t.customName,id:t.id,itemName:t.name,itemId:t.itemId},setTimeout(()=>{this.$refs.loanItemRef.init()})},goOff(t){let e=this;this.$prompt("请输入数量","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\+?[1-9][0-9]*$/,inputErrorMessage:"数量错误"}).then(({value:s})=>{this.$service.bookItemCustom.goOff({id:t.id,num:s}).then(t=>{e.$message.success("操作成功"),setTimeout(()=>{e.app.refresh({itemId:this.itemId,customId:this.customId})},1500)})})},goOn(t){let e=this;this.$confirm("确认上齐?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.bookItemCustom.goOn({id:t.id}).then(t=>{e.$message.success("操作成功"),setTimeout(()=>{e.app.refresh({itemId:this.itemId,customId:this.customId})},1500)})})},goItemGh(t){this.bookItemGhsData={customId:t.customId,customName:t.customName,id:t.id,itemName:t.name,itemId:t.itemId},setTimeout(()=>{this.$refs.bookItemGhs.init()})},getCgRecord(t){this.bookCgRecordData={customId:t.customId,customName:t.customName,id:t.id,itemName:t.name,itemId:t.itemId},setTimeout(()=>{this.$refs.bookCgRecord.init()})},getRoadRecord(t){this.bookRoadRecordData={customId:t.customId,customName:t.customName,id:t.id,itemName:t.name,itemId:t.itemId},setTimeout(()=>{this.$refs.bookRoadRecord.init()})},getOnRecord(t){this.bookOnRecordData={customId:t.customId,customName:t.customName,id:t.id,itemName:t.name,itemId:t.itemId},setTimeout(()=>{this.$refs.bookOnRecord.init()})},getBookRecord(t){let e=this;console.log(t),this.bookRecordData={customId:t.customId,customName:t.customName,id:t.id,itemName:t.name,itemId:t.itemId},setTimeout(()=>{e.$refs.bookRecord.init()})},onLoad({ctx:t,app:e}){this.app=e,this.itemId=this.$route.query.itemId?this.$route.query.itemId:0,this.itemName=this.$route.query.itemName?this.$route.query.itemName:"",this.customId=this.$route.query.customId?this.$route.query.customId:0,this.customName=this.$route.query.customName?this.$route.query.customName:"",t.service(this.$service.bookItemCustom).set("table",{columns:[{type:"selection",align:"center",width:"40"},{prop:"name",label:"名称",align:"center",width:180},{prop:"bookNum",label:"预订",align:"center",width:80},{prop:"onNum",label:"上架",align:"center",width:80},{prop:"roadNum",label:"路上",align:"center",width:80},{prop:"needCgNum",label:"待采",align:"center",width:80},{prop:"remark",label:"备注",align:"center",width:100},{prop:"customName",label:"客户",align:"center",width:160}],on:{"selection-change":t=>{this.selectedIds=t.map(t=>t.id)}},op:{visible:!0,props:{width:880,align:"left",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"..."}}).set("layout",[["slot-tabs"],["slot-search-option"],["data-table"],["slot-more-do-btn","flex1"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.remainName=s.remainName?s.remainName:"",this.remainNum=s.remainNum?s.remainNum:0}).done(),e.refresh({itemId:this.itemId,customId:this.customId})}}},m=d,p=(s("0e4c"),s("1805")),h=Object(p["a"])(m,i,a,!1,null,"b5aa9580",null);e["default"]=h.exports},"37e2":function(t,e,s){"use strict";s("c4e3")},"39b9":function(t,e,s){"use strict";s("2c7b")},"39d5":function(t,e,s){},"39e4":function(t,e,s){t.exports=s.p+"media/success1.8b332997.mp3"},"3b65":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-avatar",fn:function({scope:t}){return[e("cl-avatar",{style:{margin:"auto"},attrs:{size:22,src:t.row.avatar}})]}},{key:"table-column-id",fn:function({scope:s}){return[e("el-link",{staticStyle:{"font-size":"12px"},attrs:{underline:!0},on:{click:function(e){return t.detailShowFn(s.row)}}},[t._v(t._s(s.row.id))])]}},{key:"table-column-mobile",fn:function({scope:s}){return[""!=s.row.mobile?e("span",[t._v(t._s(s.row.mobile))]):e("span",[t._v("-")])]}},{key:"table-column-seatSn",fn:function({scope:s}){return[0==s.row.seatSn?e("span"):e("span",[t._v(t._s(s.row.seatSn))])]}},{key:"table-column-seatSnName",fn:function({scope:s}){return[""==s.row.seatSnName?e("span",[e("i",{staticClass:"el-icon-edit",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.modifySeatSnName(s.row)}}})]):e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.modifySeatSnName(s.row)}}},[t._v(t._s(s.row.seatSnName))])]}},{key:"table-column-buyNum",fn:function({scope:s}){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printZjMySeat(s.row)}}},[t._v(t._s(s.row.buyNum?parseFloat(s.row.buyNum):0))])]}},{key:"table-column-printSeatSn",fn:function({scope:s}){return[0==s.row.printSeatSn?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printMySeat(s.row)}}},[t._v(" 打印 ")]):e("span",[e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"18px",cursor:"pointer"},on:{click:function(e){return t.printMySeat(s.row)}}})])]}},{key:"table-column-balance",fn:function({scope:s}){return[e("span",{staticStyle:{cursor:"pointer"},style:Number(s.row.balance)<0?"color:red;":"",on:{click:function(e){return t.goBalanceChange(s.row)}}},[t._v(" "+t._s(t.formatMemberBalance(s.row.balance))+" ")])]}},{key:"table-column-debt",fn:function({scope:s}){return[1==s.row.debt?e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"18px",cursor:"pointer"},on:{click:function(e){return t.modifyDebt(s.row,0)}}}):e("i",{staticClass:"el-icon-open",staticStyle:{"font-size":"16px",cursor:"pointer"},on:{click:function(e){return t.modifyDebt(s.row,1)}}})]}},{key:"table-column-debtLimit",fn:function({scope:s}){return[1==s.row.debt?e("span",{staticStyle:{color:"green",cursor:"pointer"},on:{click:function(e){return t.changeDebtAmount(s.row)}}},[t._v(" "+t._s(s.row.debtLimit?parseFloat(s.row.debtLimit):0)+" ")]):e("span",[e("i",{staticClass:"el-icon-edit",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.pleaseOpen()}}})])]}},{key:"table-column-buyAmount",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.buyAmount?parseFloat(s.row.buyAmount):0))])]}},{key:"slot-add-custom",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.add()}}},[t._v("添加客户")])]},proxy:!0},{key:"slot-multiple-add-custom",fn:function(){return[e("el-upload",{staticClass:"upload-demo",attrs:{action:t.fileUrl,headers:{token:t.token},multiple:"","show-file-list":!1,"on-success":t.fileUpSuccess,accept:".txt,.xls,.xlsx",limit:3}},[e("el-button",{attrs:{size:"small",type:"primary"}},[t._v("批量导入客户")])],1)]},proxy:!0},{key:"table-column-name",fn:function({scope:s}){return[e("el-link",{staticStyle:{"font-size":"12px"},attrs:{underline:!0},on:{click:function(e){return t.detailShowFn(s.row)}}},[t._v(t._s(s.row.name))])]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.beginRecharge(s.row)}}},[t._v("充值销账")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.kd(s.row,0)}}},[t._v("开单")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.kd(s.row,1)}}},[t._v("开预订单")])]}},{key:"table-column-recentExpend",fn:function({scope:s}){return["0000-00-00 00:00:00"==s.row.recentExpend?e("span",[t._v("没有下过单")]):e("span",[t._v(t._s(s.row.recentExpend?s.row.recentExpend.substr(0,11):0))])]}},{key:"table-column-visitTime",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.visitTime?s.row.visitTime.substr(0,11):0))])]}},{key:"slot-export-custom",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportCustom()}}},[t._v("导出客户")])]},proxy:!0}])}),e("detail-draw",{attrs:{show:t.drapShow,info:t.modalData},on:{"update:show":function(e){t.drapShow=e}}}),e("el-dialog",{attrs:{title:t.rechargeTitle,visible:t.rechargePop,width:"600px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.rechargePop=e}}},[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 充值金额 "),e("el-input",{staticStyle:{width:"80%"},attrs:{clearable:""},model:{value:t.rechargeAmount,callback:function(e){t.rechargeAmount=e},expression:"rechargeAmount"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 备注信息 "),e("el-input",{staticStyle:{width:"80%"},attrs:{placeholder:"选填",clearable:""},model:{value:t.rechargeRemark,callback:function(e){t.rechargeRemark=e},expression:"rechargeRemark"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 转账方式 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:0==t.rechargePayWay?"primary":"",size:"small"},on:{click:function(e){t.rechargePayWay=0}}},[t._v("微信")]),e("el-button",{attrs:{type:1==t.rechargePayWay?"primary":"",size:"small"},on:{click:function(e){t.rechargePayWay=1}}},[t._v("支付宝")]),e("el-button",{attrs:{type:4==t.rechargePayWay?"primary":"",size:"small"},on:{click:function(e){t.rechargePayWay=4}}},[t._v("现金")]),e("el-button",{attrs:{type:5==t.rechargePayWay?"primary":"",size:"small"},on:{click:function(e){t.rechargePayWay=5}}},[t._v("银行卡")])],1)]),e("div",{staticClass:"accounts-list",staticStyle:{"margin-top":"20px"}},[e("span"),e("div",{staticClass:"accounts-center"},[e("el-button",{on:{click:function(e){return t.resetRecharge()}}},[t._v("取消")]),e("el-button",{staticStyle:{"margin-left":"80px"},attrs:{type:"primary"},on:{click:function(e){return t.confirmRecharge()}}},[t._v("确认")])],1)])])]),e("el-dialog",{attrs:{title:"添加客户",visible:t.addPop,width:"600px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.addPop=e}}},[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 客户名称 "),e("el-input",{staticStyle:{width:"80%"},attrs:{clearable:""},model:{value:t.name1,callback:function(e){t.name1=e},expression:"name1"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 客户手机 "),e("el-input",{staticStyle:{width:"80%"},attrs:{clearable:""},model:{value:t.mobile1,callback:function(e){t.mobile1=e},expression:"mobile1"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 确认手机 "),e("el-input",{staticStyle:{width:"80%"},attrs:{clearable:""},model:{value:t.confirmMobile1,callback:function(e){t.confirmMobile1=e},expression:"confirmMobile1"}})],1),e("div",{staticStyle:{"text-align":"center",color:"red","font-weight":"bold","font-size":"16px"}},[t._v(" 必须填写客户真实手机号,否则引起数据错乱自行负责 ")]),e("div",{staticClass:"accounts-list",staticStyle:{"margin-top":"20px"}},[e("span"),e("div",{staticClass:"accounts-center"},[e("el-button",{on:{click:function(e){return t.resetAdd()}}},[t._v("取消")]),e("el-button",{staticStyle:{"margin-left":"80px"},attrs:{type:"primary"},on:{click:function(e){return t.confirmAdd()}}},[t._v("确认")])],1)])])])],1)},a=[],r=(s("b138"),s("209c"),s("5880")),o=s("1e29"),n=s("5703"),l=s("51be"),c=s("54a1"),u={components:{cardName:o["default"],detailDraw:n["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"全部客户",key:"0",val:0},{text:"消费排行",key:"1",val:0},{text:"赊账排行",key:"2",val:0},{text:"散客",key:"3",val:0},{text:"近7天未下单",key:"4",val:0}],modalData:{},drapShow:!1,rechargeAmount:"",rechargeRemark:"",rechargePayWay:-1,rechargePop:!1,rechargeTitle:"充值",rechargeCustom:{},name1:"",mobile1:"",confirmMobile1:"",addPop:!1,fileUrl:""}},computed:{...Object(r["mapGetters"])({levelData:"level"}),...Object(r["mapGetters"])(["token"])},created(){this.fileUrl=l["baseUrl"]+"/upload/custom",console.log(this.fileUrl),this.getLevel()},mounted(){let t=this;document.onkeydown=function(e){if(e&&","==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/order/add",query:e})}if(e&&"."==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/in/add",query:e})}}},methods:{...Object(r["mapActions"])(["getLevel"]),goChange(t){let e={};e.customId=t.id,e.endTime="",this.$router.push({path:"/custom/pastAccountChange",query:e})},exportCustom(){this.$service.custom.shopListAll({type:this.tabIndex,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},formatMemberBalance(t){const e=parseFloat(t);return isNaN(e)?0:e<0?"待结 "+Math.abs(e):e},goDebtChange(t){let e={};e.customId=t.id,e.customName=t.name,this.$router.push({path:"/member/custom-debt-list",query:e})},goBalanceChange(t){let e={};e.customId=t.id,e.customName=t.name,this.$router.push({path:"/member/custom-balance-list",query:e})},newCg(){let t={};this.$router.push({path:"/in/add",query:t})},fileUpSuccess(){this.$notify({title:"已提交,2分钟后查看客户列表",message:"success",type:"success"})},add(){this.addPop=!0},resetAdd(){this.name1="",this.mobile1="",this.addPop=!1,this.confirmMobile1=""},confirmAdd(){return this.mobile1!=this.confirmMobile1?(this.$message({message:"二次手机号不一致",type:"warning"}),!1):11!=this.mobile1.length?(this.$message({message:"手机号错误",type:"warning"}),!1):this.$util.isEmpty(this.name1)?(this.$message({message:"请填写名称",type:"warning"}),!1):void this.$confirm("确认添加?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.custom.createCustomers({name1:this.name1,mobile1:this.mobile1,confirmMobile1:this.confirmMobile1}).then(t=>{this.resetAdd(),this.$notify({title:"添加成功,15秒后生效",message:"success",type:"success"}),this.app.refresh({type:this.tabIndex})})})},billing(){let t={};this.$router.push({path:"/order/add",query:t})},printZjMySeat(t){this.$service.custom.printSeatSn({id:t.id}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new c["hiprint"].PrintTemplate({template:a});r.print2(s),t.printSeatSn=1,this.$message.success("已触发")})},printMySeat(t){this.$service.custom.printSeatSn({id:t.id}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new c["hiprint"].PrintTemplate({template:a});r.print(s),t.printSeatSn=1})},kd(t,e){let s={};s.customId=t.id,s.customName=t.name,s.book=e,this.$router.push({path:"/order/confirm",query:s})},beginRecharge(t){this.rechargePop=!0,this.rechargeTitle="【"+t.name+"】充值销账",this.rechargeCustom=t},resetRecharge(){this.rechargePop=!1,this.rechargePayWay=-1,this.rechargeAmount="",this.rechargeRemark="",this.rechargeCustom={}},confirmRecharge(){return-1==this.rechargePayWay?(this.$message({message:"请选择转账方式",type:"warning"}),!1):0==this.$util.isMoney(this.rechargeAmount)?(this.$message({message:"请填写金额",type:"warning"}),!1):Number(this.rechargeAmount)<=0?(this.$message({message:"金额要大于0",type:"warning"}),!1):void this.$confirm("确认充值?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.custom.recharge({customId:this.rechargeCustom.id,payWay:this.rechargePayWay,amount:this.rechargeAmount,remark:this.rechargeRemark}).then(t=>{this.resetRecharge(),this.$notify({title:"成功",message:"充值成功",type:"success"}),this.app.refresh({type:this.tabIndex})})})},modifySeatSnName(t){this.$prompt("请输入名称","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputErrorMessage:"请填写"}).then(({value:e})=>{this.$service.custom.updateSeatSnName({seatSnName:e,id:t.id}).then(t=>{this.$notify({title:"成功",message:"操作成功",type:"success"}),this.app.refresh({type:this.tabIndex})})})},changeDebtAmount(t){this.$prompt("请输入金额","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/^\d+(\.\d{1,2})?$/,inputErrorMessage:"金额错误"}).then(({value:e})=>{this.$service.custom.updateDebtLimit({debtLimit:e,id:t.id}).then(t=>{this.$notify({title:"成功",message:"操作成功",type:"success"}),this.app.refresh({type:this.tabIndex})})})},pleaseOpen(){this.$message({message:"请先开启线上赊账",type:"warning"})},modifyDebt(t,e){let s=t.name,i=0==e?"确认禁止【"+s+"】线上赊账?":"确认允许【"+s+"】线上赊账?";this.$confirm(i,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.custom.changeDebt({customId:t.id,debt:e}).then(t=>{this.$notify({title:"成功",message:"操作成功",type:"success"}),this.app.refresh({type:this.tabIndex})})})},handleClick(t,e){this.app.refresh({type:this.tabIndex})},detailShowFn(t){this.modalData=t,this.drapShow=!0},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.type&&(this.tabIndex=this.$route.query.type),t.service(this.$service.custom).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:90},{prop:"avatar",label:"头像",align:"center",width:70},{prop:"name",label:"名称",align:"center",width:160},{prop:"mobile",label:"手机号",align:"center",width:110},{prop:"balance",label:"账户余额",align:"center",width:100},{prop:"debt",label:"线上赊账",align:"center",width:80},{prop:"debtLimit",label:"信用额度",align:"center",width:90},{prop:"seatSnName",label:"货位名称",align:"center",width:100},{prop:"seatSn",label:"货位",align:"center",width:80},{prop:"printSeatSn",label:"打货位",align:"center",width:80},{prop:"buyNum",label:"消费次数",align:"center",width:90},{prop:"buyAmount",label:"累计消费",align:"center",width:110},{prop:"recentExpend",label:"最近下单",align:"center",width:120},{prop:"visitTime",label:"最近访问",align:"center",width:120}],op:{visible:!0,props:{width:300,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"这里搜索"}}).set("layout",[["slot-tabs"],["search-key","slot-add-custom","flex1","slot-export-custom"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.tabsData[0].val=s.totalUser,this.tabsData[1].val=s.mayGatheringNum}).done(),e.refresh({type:this.tabIndex})}}},d=u,m=(s("2667"),s("1805")),p=Object(m["a"])(d,i,a,!1,null,"3b3891b9",null);e["default"]=p.exports},"3b9e":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:t.direction},on:{"update:visible":function(e){t.showArea=e},close:t.closeTrigger}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[e("el-date-picker",{staticStyle:{"margin-right":"10px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),t._v(" 【"+t._s(t.costData.name?t.costData.name:"")+"】成本变动 ")],1),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-bigNumOrder",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.bigNumOrder))])]}}])})],1)])],1)},a=[],r={name:"stock-detail",props:{costData:{type:Object,default:()=>{}}},data(){return{options:[],currentDateList:[],showArea:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",direction:"ltr"}},methods:{goRefresh(){this.app.refresh({id:this.costData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})},closeTrigger(){this.$emit("searchFocus")},getSearchDate(){this.$util.isEmpty(this.currentDateList)?this.resetSearch():(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.app.refresh({id:this.costData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})},resetSearch(){this.searchTime="",this.startTime="",this.endTime=""},init(){this.showArea=!0,this.costData.direction&&!this.$util.isEmpty(this.costData.direction)&&(this.direction=this.costData.direction),this.resetSearch(),this.app&&this.goRefresh()},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.costChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"操作",prop:"staffName",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"成本",prop:"cost",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.options=s.typeList}).done(),e.refresh({id:this.costData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},o=r,n=(s("e0fe"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"604dee50",null);e["default"]=l.exports},"3bf3":function(t,e,s){},"3d0e":function(t,e,s){"use strict";s("71b5")},"3dc0":function(t,e,s){},"3dd5":function(t,e,s){"use strict";s("6b99")},"3e49":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}})]},proxy:!0}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:[],startTime:"",endTime:"",searchTime:""}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportData(){},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.stat.sendYj({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>{let e=[...t.list];return{list:e}})}).set("table",{columns:[{label:"姓名",prop:"staffName",align:"center"},{label:"订单数",prop:"orderNum",align:"center"},{label:"花材数",prop:"itemNum",align:"center"},{label:"金额",prop:"amount",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","slot-export-due","flex1"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getDate(){this.currentDateList?(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]):(this.searchTime="",this.startTime="",this.endTime=""),this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},n=o,l=(s("d5fc"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"5113a140",null);e["default"]=c.exports},"3e71":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e},close:t.closeTrigger}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[e("el-date-picker",{staticStyle:{"margin-right":"10px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("el-select",{staticStyle:{width:"150px"},attrs:{placeholder:"请选事项",size:"mini",clearable:!0},on:{change:t.changeType,clear:t.clearType},model:{value:t.typeValue,callback:function(e){t.typeValue=e},expression:"typeValue"}},t._l(t.options,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),t._v(" 【"+t._s(t.itemData.name?t.itemData.name:"")+"】库存明细 ")],1),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-bigNumOrder",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.bigNumOrder))])]}}])})],1)])],1)},a=[],r={name:"stock-detail",props:{itemData:{type:Object,default:()=>{}}},data(){return{options:[],typeValue:"",currentDateList:[],showArea:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:""}},methods:{clearType(){this.typeValue="",this.goRefresh()},changeType(t){this.goRefresh()},goRefresh(){this.app.refresh({id:this.itemData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,recordType:this.typeValue})},closeTrigger(){this.$emit("searchFocus")},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.app.refresh({id:this.itemData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,recordType:this.typeValue})},init(){this.showArea=!0,this.app&&this.app.refresh({id:this.itemData.id})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.stock).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"名称",prop:"relateName",align:"center"},{label:"事项",prop:"typeName",align:"center"},{label:"变动",prop:"bigNumOrder",align:"center"},{label:"剩余",prop:"bigNumStock",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.options=s.typeList}).done(),e.refresh({id:this.itemData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,recordType:this.typeValue})}}},o=r,n=(s("6649"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"20384345",null);e["default"]=l.exports},"3ea0":function(t,e,s){},"3ffe":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return 0==t.form.customId?e("div",{staticStyle:{width:"35vw",margin:"0 auto","margin-top":"90px","text-align":"center","font-size":"25px"}},[e("span",[t._v("请先选择客户")])]):e("div",{staticClass:"app-list-content"},[e("div",{staticClass:"left_box"},[e("p",{staticClass:"tor"},[e("span",{staticStyle:{"font-weight":"bold",color:"black"}},[1==t.form.book?e("span",{staticStyle:{color:"blue"}},[t._v("【预订单】")]):t._e(),t._v(" 客户:"+t._s(t.form.customName)+" ")]),e("span",[t._v("全屏:F11")]),e("span",[t._v("修改:回车")]),e("span",[t._v("删除:Delete")]),e("span",[t._v("删除所有:Page Down")])]),e("audio",{ref:"hitPlay"},[e("source",{attrs:{src:s("ef11"),type:"audio/mpeg"}})]),e("audio",{ref:"noStockPlay"},[e("source",{attrs:{src:s("f214"),type:"audio/mpeg"}})]),e("audio",{ref:"successPlay"},[e("source",{attrs:{src:s("39e4"),type:"audio/mpeg"}})]),e("el-table",{ref:"singleTable",staticClass:"tableBox active",staticStyle:{width:"70vw",margin:"0 auto"},attrs:{data:t.selectList,"highlight-current-row":"",border:"","header-cell-style":{background:"#fdfdfd",color:"#01060a",fontWeight:800},height:"70vh"},on:{"row-click":t.pickModifyItem}},[e("el-table-column",{attrs:{prop:"id",label:"编号",width:"110",align:"center"}}),e("el-table-column",{attrs:{prop:"cover",label:"图片",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("img",{staticStyle:{width:"40px",margin:"0 auto"},attrs:{src:t.row.cover}})]}}])}),e("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"}}),e("el-table-column",{attrs:{prop:"bigCount",label:"数量",width:"110",align:"center"}}),e("el-table-column",{attrs:{prop:"userPrice",label:"单价",width:"110",align:"center"}}),e("el-table-column",{attrs:{prop:"sumPrice",label:"金额",width:"110",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" ¥"+t._s(parseFloat((Number(e.row.userPrice)*Number(e.row.bigCount)).toFixed(2)))+" ")]}}])}),e("el-table-column",{attrs:{prop:"ratioType",label:"单位比",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(s){return[0==s.row.ratioType?e("span",[t._v(t._s(s.row.ratio)+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))]):e("span",[t._v("若干"+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))])]}}])}),e("el-table-column",{attrs:{prop:"addTime",label:"操作",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.delItem(s.row)}}},[t._v("删除")])]}}])})],1)],1),t.$util.isEmpty(t.getItemList)||1!=t.showGetItemList?t._e():e("div",{staticClass:"seek-list-box"},[e("el-table",{ref:"showItemRef",staticClass:"tableBox active",staticStyle:{width:"60vw"},attrs:{data:t.getItemList,"highlight-current-row":"",border:"","header-cell-style":{background:"#fdfdfd",color:"#666"},height:"70vh"},on:{"row-click":t.pickAddItem}},[e("el-table-column",{attrs:{prop:"className",label:"分类",align:"center",width:"130"}}),e("el-table-column",{attrs:{prop:"cover",label:"图片",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("img",{staticStyle:{width:"26px",margin:"0 auto"},attrs:{src:t.row.cover}})]}}],null,!1,309617309)}),e("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" "+t._s(s.row.name)+" "),s.row.selectedNum&&Number(s.row.selectedNum)>0?e("span",{staticStyle:{color:"blue","font-weight":"bold"}},[t._v(" (已选"+t._s(s.row.selectedNum)+t._s(0==t.cgUnitType?s.row.bigUnit:s.row.smallUnit)+") ")]):t._e()]}}],null,!1,1843849193)}),e("el-table-column",{attrs:{prop:"price",label:"价格",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v("¥"+t._s(s.row.price?parseFloat(s.row.price):0))])]}}],null,!1,2523261369)}),e("el-table-column",{attrs:{prop:"stock",label:"库存",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.stock?parseFloat(s.row.stock):0))])]}}],null,!1,2300266751)}),e("el-table-column",{attrs:{prop:"ratioType",label:"单位比",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(s){return[0==s.row.ratioType?e("span",[t._v(t._s(s.row.ratio)+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))]):e("span",[t._v("若干"+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))])]}}],null,!1,1375079310)}),e("el-table-column",{attrs:{prop:"selectedNum",label:"已选数量",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(s){return[s.row.selectedNum&&Number(s.row.selectedNum)>0?e("span",{staticStyle:{color:"red","font-weight":"bold","font-size":"17px"}},[t._v(t._s(s.row.selectedNum))]):t._e()]}}],null,!1,3203187689)})],1)],1),e("div",{staticClass:"bottom_input"},[e("span",{staticStyle:{"margin-right":"10px","font-weight":"700"}},[t._v("花材")]),e("el-input",{ref:"itemSearchRef",staticStyle:{width:"280px","font-size":"13px"},attrs:{placeholder:"这里搜索花材,插入光标 Ctrl + Q",type:"text"},on:{input:t.beginSearchItem,focus:t.clearSeachVal},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.pickAddCurrentItem.apply(null,arguments)}},model:{value:t.searchVal,callback:function(e){t.searchVal=e},expression:"searchVal"}}),e("div",{staticClass:"allPrice",staticStyle:{display:"inline-block"}},[t._v(t._s(t.allCount.kind)+"种")]),e("div",{staticClass:"allPrice",staticStyle:{display:"inline-block"}},[t._v(t._s(t.allCount.bigLength)+"扎")]),e("div",{staticClass:"allPrice",staticStyle:{display:"inline-block"}},[t._v("¥"+t._s(t.allPrice))]),e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{type:"primary",size:"medium"},on:{click:function(e){return t.commitOrder()}}},[t._v("提交( Ctrl + / )")]),e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{size:"medium"},on:{click:function(e){return t.comeBack()}}},[t._v("返回")])],1),t.showConfirmNum?e("el-dialog",{attrs:{title:t.currentItem.name,visible:t.showConfirmNum,width:"30%",center:""},on:{"update:visible":function(e){t.showConfirmNum=e}}},[e("div",{staticClass:"el-dialog-center"},[e("el-input",{ref:"bigInput",staticStyle:{width:"90px","margin-left":"15px"},attrs:{placeholder:"数量",type:"number"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.bigCount,callback:function(e){t.$set(t.customData,"bigCount",e)},expression:"customData.bigCount"}}),e("span",[t._v(t._s(t.currentItem.bigUnit))]),e("el-input",{staticStyle:{width:"90px","margin-left":"15px"},attrs:{placeholder:"价格",type:"number"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.userPrice,callback:function(e){t.$set(t.customData,"userPrice",e)},expression:"customData.userPrice"}}),e("span",[t._v("元")]),e("el-input",{staticStyle:{width:"90px","margin-left":"15px"},attrs:{placeholder:"备注",type:"text"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.remark,callback:function(e){t.$set(t.customData,"remark",e)},expression:"customData.remark"}})],1),e("div",{staticStyle:{margin:"15px 0 5px 100px","font-weight":"bold","font-size":"18px"}},[t._v("剩 "+t._s(t.currentItem.stock?parseFloat(t.currentItem.stock):0)+" "+t._s(t.currentItem.bigUnit))]),e("div",{staticClass:"remark"},[t._v("Enter 确定,Esc 取消")])]):t._e(),t.showCommitPop?e("el-dialog",{attrs:{title:"确认提交",visible:t.showCommitPop,width:"655px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.showCommitPop=e}}},[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 客户名称 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v(t._s(t.form.customName))])]),t.currentShop.pfLevel&&1==t.currentShop.pfLevel?e("div",{staticClass:"accounts-list"},[t._v(" 配送方式 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:4==t.form.transType?"primary":"",size:"small"},on:{click:function(e){return t.setTransType(4)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setTransType(4)}}},[t._v("同城")]),e("el-button",{attrs:{type:0==t.form.transType?"primary":"",size:"small"},on:{click:function(e){return t.setTransType(0)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setTransType(0)}}},[t._v("德邦")]),e("el-button",{attrs:{type:1==t.form.transType?"primary":"",size:"small"},on:{click:function(e){return t.setTransType(1)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setTransType(1)}}},[t._v("顺丰")]),e("el-button",{attrs:{type:2==t.form.transType?"primary":"",size:"small"},on:{click:function(e){return t.setTransType(2)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setTransType(2)}}},[t._v("冷链")]),e("el-button",{attrs:{type:3==t.form.transType?"primary":"",size:"small"},on:{click:function(e){return t.setTransType(3)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setTransType(3)}}},[t._v("航空")]),e("el-button",{attrs:{type:5==t.form.transType?"primary":"",size:"small"},on:{click:function(e){return t.setTransType(5)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setTransType(5)}}},[t._v("自取")])],1)]):e("div",{staticClass:"accounts-list"},[t._v(" 配送方式 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:0==t.form.sendType?"primary":"",size:"small"},on:{click:function(e){return t.setSendType(0)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setSendType(0)}}},[t._v("送货")]),e("el-button",{attrs:{type:1==t.form.sendType?"primary":"",size:"small"},on:{click:function(e){return t.setSendType(1)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setSendType(1)}}},[t._v("自取")]),e("el-button",{attrs:{type:2==t.form.sendType?"primary":"",size:"small"},on:{click:function(e){return t.setSendType(2)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setSendType(2)}}},[t._v("跑腿")]),e("el-button",{attrs:{type:3==t.form.sendType?"primary":"",size:"small"},on:{click:function(e){return t.setSendType(3)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.setSendType(3)}}},[t._v("物流")])],1)]),"配送"==t.type?e("div",{staticClass:"accounts-list"},[t._v(" 运费 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写运费,留空免运费"},on:{input:t.freightInput},model:{value:t.freight,callback:function(e){t.freight=e},expression:"freight"}})],1)]):t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 付款方式 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:2==t.form.hasPay?"primary":"",size:"small"},on:{click:function(e){t.form.hasPay=2}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.hasPay=2}}},[t._v("挂账")]),e("el-button",{attrs:{type:1==t.form.hasPay?"primary":"",size:"small"},on:{click:function(e){t.form.hasPay=1}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.hasPay=1}}},[t._v("线下")])],1)]),1==t.form.hasPay?e("div",{staticClass:"accounts-list"},[t._v(" 线下方式 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:0==t.form.payWay?"primary":"",size:"small"},on:{click:function(e){t.form.payWay=0}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.payWay=0}}},[t._v("线下微信")]),e("el-button",{attrs:{type:1==t.form.payWay?"primary":"",size:"small"},on:{click:function(e){t.form.payWay=1}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.payWay=1}}},[t._v("线下支付宝")]),e("el-button",{attrs:{type:4==t.form.payWay?"primary":"",size:"small"},on:{click:function(e){t.form.payWay=4}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.payWay=4}}},[t._v("现金")]),e("el-button",{attrs:{type:5==t.form.payWay?"primary":"",size:"small"},on:{click:function(e){t.form.payWay=5}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.payWay=5}}},[t._v("银行卡")])],1)]):t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 打印小票 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:1==t.form.needPrint?"primary":"",size:"small"},on:{click:function(e){t.form.needPrint=1}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.needPrint=1}}},[t._v("需要")]),e("el-button",{attrs:{type:2==t.form.needPrint?"primary":"",size:"small"},on:{click:function(e){t.form.needPrint=2}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.needPrint=2}}},[t._v("不要")])],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 合计金额 "),e("div",{staticClass:"accounts-center",staticStyle:{color:"black"}},[t._v("¥"+t._s(parseFloat(t.finalPrice)))])]),e("div",{staticClass:"accounts-list"},[t._v(" "+t._s(2==t.form.hasPay?"应收金额":"实收金额")+" "),e("el-input",{staticStyle:{width:"80%"},attrs:{clearable:""},model:{value:t.modifyPrice,callback:function(e){t.modifyPrice=e},expression:"modifyPrice"}})],1),t.modifyPrice>0&&t.modifyPrice>t.finalPrice?e("div",{staticClass:"accounts-list",staticStyle:{"font-size":"25upx","margin-left":"20upx",color:"red","font-weight":"bold"}},[t._v(" 人工资材 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(parseFloat((t.modifyPrice-t.finalPrice).toFixed(2))))])]):t._e(),t.modifyPrice>0&&t.modifyPrice<t.finalPrice?e("div",{staticClass:"accounts-list",staticStyle:{"font-size":"25upx","margin-left":"20upx",color:"green","font-weight":"bold"}},[t._v(" 优惠金额 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(parseFloat((t.finalPrice-t.modifyPrice).toFixed(2))))])]):t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 送货日期 "),e("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择,默认当天或隔天"},model:{value:t.form.sendTimeWant,callback:function(e){t.$set(t.form,"sendTimeWant",e)},expression:"form.sendTimeWant"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 开单人员 "),e("el-select",{ref:"kdStaffRef",staticStyle:{width:"80%"},attrs:{placeholder:"请选择"},on:{change:t.changeKdStaff},model:{value:t.form.getStaffName,callback:function(e){t.$set(t.form,"getStaffName",e)},expression:"form.getStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t}})})),1)],1),e("div",{staticClass:"accounts-list"},[t._v(" 账单日期 "),e("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date","value-format":"yyyy-MM-dd",placeholder:"请选择,默认当天"},model:{value:t.form.historyDate,callback:function(e){t.$set(t.form,"historyDate",e)},expression:"form.historyDate"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 备注信息 "),e("div",{staticClass:"accounts-center"},[e("el-input",{ref:"remarkRef",attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:t.remark,callback:function(e){t.remark=e},expression:"remark"}})],1)]),e("div",{staticClass:"accounts-list"},[e("span"),e("div",{staticClass:"accounts-center"},[e("el-button",{on:{click:function(e){t.showCommitPop=!1}}},[t._v("取消(Esc)")]),e("el-button",{attrs:{type:"primary"},on:{click:t.createOrder}},[t._v("确认(Ctrl+Enter)")])],1)]),e("p",{staticStyle:{"text-align":"center",color:"#999999"}},[t._v("按Tab切到下一个,按空格选中")])]),t.$util.isEmpty(t.diffList)?t._e():e("div",{staticStyle:{"text-align":"center","margin-top":"10px","font-size":"16px"}},[e("div",{staticStyle:{"font-size":"16px","margin-bottom":"10px",color:"red","font-weight":"bold"}},[e("div",[t._v("以下花材,开单价和系统售价不一样,确认要提交吗?")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.diffConfirm}},[t._v("确认(Ctrl+Alt+Enter)")])],1),t._l(t.diffList,(function(s,i){return e("div",{key:i,staticStyle:{color:"blue","margin-bottom":"4px"}},[t._v(" "+t._s(s.name)+" 系统售价"),e("span",{staticStyle:{color:"green","font-weight":"bold","margin-left":"3px"}},[t._v("¥"+t._s(s.price?parseFloat(s.price):0))]),t._v(" 你开价"),e("span",{staticStyle:{color:"red","font-weight":"bold","margin-left":"3px"}},[t._v("¥"+t._s(s.kdPrice?parseFloat(s.kdPrice):0))])])}))],2)]):t._e()],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("f803"),s("5880")),o=s("c745"),n={name:"add",data(){return{form:{shopId:"",shopName:"",receiveProvince:"",receiveCity:"",receiveFloor:"",receiveAddress:"",receiveLong:"",receiveLat:"",sendType:0,transType:0,sendSide:"2",sendDate:"",sendTimeWant:"",historyDate:"",sendCost:"",customId:"",customName:"",packCost:"",product:"",remark:"",payWay:0,needPrint:1,hasPay:0,getStaffName:"",getStaffId:0,dealPrice:0,wlName:"",book:0},staffList:[],printAmount:1,checked:!0,type:"自提",payType:"欠款",showConfirmNum:!1,showCommitPop:!1,priceAmend:0,desk:"",totalMoney:0,modifyPrice:0,searchVal:"",searchOldVal:"",getIndex:0,getItemList:[],selectIndex:0,kdStaffVal:"www",freight:"",remark:"",number:0,customInfoList:[],loading:!1,selectCustomName:"",t:null,currentShop:{default:0,pfLevel:0},diffList:[],showGetItemList:!1,currentItem:{},classList:[],changeType:"add",TT:null,defaultGetStaffName:"",defaultGetStaffId:0,cgUnitType:0}},mixins:[o["default"]],computed:{...Object(r["mapGetters"])(["shopInfo"]),displayPackCost(){return!(!this.currentShop.pfLevel||1!=this.currentShop.pfLevel)},displaySendCost(){return 2==this.form.sendType||!(!this.currentShop.pfLevel||1!=this.currentShop.pfLevel)},finalPrice(){let t=this.allPrice.toFixed(2),e=Number(t);1==this.displaySendCost&&(e=Number(e)+Number(this.form.sendCost)),1==this.displayPackCost&&(e=Number(e)+Number(this.form.packCost));let s=parseFloat(e);return this.modifyPrice=s,s}},created(){},mounted(){if(this.$route.query.customId&&this.$route.query.customName){let t=this.$route.query.customId,e=this.$route.query.customName;this.goSelectItem(t,e)}this.$route.query.book&&1==this.$route.query.book&&(this.form.book=1,this.globalCheckStock=!1);let t=this;document.onkeydown=function(e){if(console.log(e),e&&"Enter"==e.key&&e.ctrlKey&&e.altKey&&(1==t.showCommitPop?t.diffConfirm():t.$message({message:"不在结算页",type:"warning"})),e&&"Enter"==e.key&&e.ctrlKey&&(1==t.showCommitPop?t.createOrder():t.$message({message:"不在结算页",type:"warning"})),e&&e.key&&"q"==e.key.toLowerCase()&&e.ctrlKey&&t.$refs["itemSearchRef"].focus(),e&&"ArrowUp"==e.key&&t.goUp(),e&&"ArrowDown"==e.key&&t.goDown(),e&&"/"==e.key&&e.ctrlKey){if(t.$util.isEmpty(t.selectList))return void t.$message({message:"请选择花材",type:"warning"});t.$refs["itemSearchRef"].blur(),t.setSendType(0),t.setTransType(4),t.form.hasPay=2,t.form.getStaffId=t.defaultGetStaffId,t.form.getStaffName=t.defaultGetStaffName,t.showCommitPop=!0}if(e&&"Delete"==e.key&&t.selectList[t.selectIndex]){let e=t.selectList[t.selectIndex];t.delItem(e)}e&&"PageDown"==e.key&&t.removeFromSave(),e&&"Escape"==e.key&&(t.showCommitPop&&(t.showCommitPop=!1,t.backToSearchItem()),"confirmPriceNum"==t.desk&&(t.desk="selectedList",t.$refs["itemSearchRef"].focus()))},this.$service.common.shopInfo().then(e=>{t.currentShop=e.shopInfo;let s=e.staff;t.$service.shopAdmin.getAllStaff().then(e=>{if(t.staffList=e.list,!t.$util.isEmpty(t.staffList))for(const i of t.staffList)s.id==i.id&&(t.defaultGetStaffName=i.name,t.defaultGetStaffId=i.id)})}),this.$service.itemClass.getAllClassIndex().then(t=>{this.classList=t})},methods:{hitPlay(){const t=this.$refs.hitPlay;t.play()},noStockPlay(){const t=this.$refs.noStockPlay;t.play()},successPlay(){const t=this.$refs.successPlay;t.play()},delItem(t){let e=this;e.$refs["itemSearchRef"].blur(),e.$confirm("确定删除 "+t.name+"?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.bigCount=0,e.replaceItemFn(t,1,"sub"),e.selectIndex=0,e.$refs.singleTable.setCurrentRow(e.selectList[0]),setTimeout((function(){e.$refs["itemSearchRef"].focus()}),900)}).catch(()=>{e.$refs["itemSearchRef"].focus()})},changeKdStaff(t){this.form.getStaffId=t.id,this.form.getStaffName=t.name},setTransType(t){this.form.transType=t},setSendType(t){this.form.sendType=t,2!==t&&(this.form.sendCost="")},commitOrder(){let t=this;t.$util.isEmpty(t.selectList)?t.$message({message:"请选择花材",type:"warning"}):(t.$refs["itemSearchRef"].blur(),t.setSendType(0),t.setTransType(4),t.form.hasPay=2,t.showCommitPop=!0)},comeBack(){let t={};this.$router.push({path:"/order/add",query:t})},selectCustomFn(t){t.id&&t.name&&this.goSelectItem(t.id,t.name)},goSelectItem(t,e){let s=this;s.TT=setTimeout((function(){s.desk="selectedList"}),2300),this.form.customId=t,this.form.customName=e,this.selectJobId=t,this.getFromStorage(!0),this.$nextTick(()=>{this.$refs["itemSearchRef"].focus()})},searchCustomInfo(t){let e=this;""!==t?(this.loading=!0,this.$service.custom.list({name:t}).then(t=>{e.loading=!1,e.customInfoList=t.list})):this.customInfoList=[]},diffConfirm(){this.form.dealPrice=1,this.createOrder()},createOrder(){let t=this;if(0==this.form.customId)return this.$message({message:"请选择客户",type:"warning"}),!1;let e=this.form;const s=this.selectList.map(t=>({productId:t.id,bigNum:t.bigCount,smallNum:0,itemId:t.itemId,price:t.userPrice,remark:t.remark}));if(e.product=JSON.stringify(s),Number(this.modifyPrice)<=0)return this.$message({message:"收款金额必须大于0",type:"warning"}),!1;let i={...e,modifyPrice:this.modifyPrice,newVersion:1};if(1==this.form.book&&Number(this.form.sendCost)>0)return this.$message({message:"预订单不能填写运费",type:"warning"}),!1;let a="确认提交";a=1==this.form.hasPay?"确认线下付款?":2==this.form.hasPay?"确认挂账?":"确认提交",this.$confirm(a,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.$service.order.orderCreate(i).then(e=>{e.respondType&&"priceError"==e.respondType?(t.diffList=e.diff?e.diff:[],t.noStockPlay(),t.$message({message:"请确认修改的价格",type:"warning"})):t.$nextTick(()=>{t.selectList=[],t.diffList=[],t.successPlay(),t.removeFromSaveDirect(),t.showCommitPop=!1,t.$notify({title:"成功",message:"开单成功",type:"success"}),setTimeout((function(){t.formReset(),t.$router.push({path:"/order/add"})}),900)})})})},formReset(){this.form.customId=0,this.form.customName="",this.form.getStaffId=0,this.form.getStaffName=""},clearSeachVal(){this.searchVal="",this.getItemList=[]},beginSearchItem(){let t=this;null!=this.t&&clearTimeout(this.t),null!=this.TT&&clearTimeout(this.TT),this.t=setTimeout((function(){t.searchItemFn()}),250)},sorts_fun(t){return function(e,s){var i=e[t],a=s[t];return i-a}},async searchItemFn(){if(""==this.searchVal)return this.getItemList=[],this.getIndex=0,void(this.desk="selectedList");let t=this;this.getItemList=[],this.getIndex=0,this.searchOldVal=this.searchVal,this.desk="searchList";let e=[],s="kd";1==this.form.book&&(s="book"),await this.$service.item.getItemList({search:this.searchVal,requestType:s,pageSize:20}).then(s=>{let i=this.$util.copyObject(s.list);if(!t.$util.isEmpty(i)){i=i.sort(this.sorts_fun("classId"));const s=i.map(s=>{let i="-";if(e[s.classId]);else{let t=this.classList[s.classId]?this.classList[s.classId]:null;i=t.name?t.name:"",e[s.classId]=1}let a=0;return t.selectListIndex[s.id]&&(a=t.selectListIndex[s.id].bigCount?Number(t.selectListIndex[s.id].bigCount):0),{...s,className:i,selectedNum:a}});t.showGetItemList=!0,t.getItemList=s}}),t.$util.isEmpty(t.getItemList)||t.$refs.showItemRef.setCurrentRow(t.getItemList[0])},pickModifyItem(t){this.changeType="update",this.selectCurrentItem(t)},pickAddItem(t){this.changeType="add",this.selectCurrentItem(t)},pickAddCurrentItem(){if("searchList"==this.desk&&(this.changeType="add",this.getItemList[this.getIndex])){let t=this.getItemList[this.getIndex];this.selectCurrentItem(t)}if("selectedList"==this.desk&&this.selectList[this.selectIndex]){let t=this.selectList[this.selectIndex];this.pickModifyItem(t)}},selectCurrentItem(t){this.currentItem=t,this.customData.bigCount=t.bigCount>0?t.bigCount:1,"add"==this.changeType?this.customData.userPrice=parseFloat(this.currentItem.price):this.customData.userPrice=parseFloat(this.currentItem.userPrice),this.customData.remark=this.currentItem.remark||"",this.desk="confirmPriceNum",this.showGetItemList=!1,this.showConfirmNum=!0,this.$nextTick(()=>{this.$refs["bigInput"].focus(),this.$refs["bigInput"].select()})},confirmNumPrice(){let t=this.currentItem;Number(this.customData.bigCount)<=0?this.$message({message:"请填写数量",type:"warning"}):1==this.globalCheckStock&&Number(this.customData.bigCount)>Number(t.stock)?this.$message({message:"库存不足",type:"warning"}):(t={...t,bigCount:this.customData.bigCount,userPrice:this.customData.userPrice,smallCount:this.customData.smallCount,remark:this.customData.remark},this.replaceItemFn(t,1,"add"),this.backToSearchItem())},backToSearchItem(){this.desk="selectedList",this.selectList[0]&&(this.selectIndex=0,this.$refs.singleTable.setCurrentRow(this.selectList[0])),this.searchVal="",this.customInfoList=[],this.getItemList=[],this.currentItem={},this.showConfirmNum=!1,this.$nextTick(()=>{this.$refs["itemSearchRef"].focus()})},backspaceFun(t){switch(t){case"big":this.big=null;break;case"price":this.price=null;break}},amendPrice(){if(""==this.priceAmend)return void this.$message({message:"请输入大于0的值",type:"warning"});let t=this.selectList[this.selectIndex];this.selectList[this.selectIndex].price=this.priceAmend;let e=Number(t.price)*(Number(t.big)+Number(t.small)/Number(t.ratio));this.selectList[this.selectIndex].money=e,this.selectList[this.selectIndex].totalMoney=e.toFixed(2),this.priceAmend=0,this.backToSearchItem()},goDown(){if("searchList"==this.desk){let t=this.getItemList.length-1;t==this.getIndex?this.getIndex=t:this.getIndex++,this.$refs.showItemRef.setCurrentRow(this.getItemList[this.getIndex])}if("selectedList"==this.desk){let t=this.selectList.length-1;t==this.selectIndex?this.selectIndex=t:this.selectIndex++,this.$refs.singleTable.setCurrentRow(this.selectList[this.selectIndex])}},goUp(){"searchList"==this.desk&&(0==this.getIndex?this.getIndex=0:this.getIndex--,this.$refs.showItemRef.setCurrentRow(this.getItemList[this.getIndex])),"selectedList"==this.desk&&(0==this.selectIndex?this.selectIndex=0:this.selectIndex--,this.$refs.singleTable.setCurrentRow(this.selectList[this.selectIndex]))},freightInput(){this.totalMoney=Number(this.freight)+this.number,this.modifyPrice=Number(this.freight)+this.number}}},l=n,c=(s("bc0f"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,null,null);e["default"]=u.exports},"40eb":function(t,e,s){"use strict";s("f8ce")},"41bf":function(t,e,s){"use strict";s("db95")},4202:function(t,e,s){"use strict";s("f107")},4370:function(t,e,s){"use strict";s("c50e")},"437e":function(t,e,s){},"438a":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"error-page"},[e("h1",{staticClass:"code"},[t._v(t._s(t.code))]),e("p",{staticClass:"desc"},[t._v(t._s(t.desc))]),e("div",{staticClass:"router"},[e("el-select",{attrs:{filterable:"","prefix-icon":"el-icon-search"},model:{value:t.url,callback:function(e){t.url=e},expression:"url"}},t._l(t.routes,(function(s,i){return e("el-option",{key:i,attrs:{value:s.path}},[e("span",{staticStyle:{float:"left"}},[t._v(t._s(s.name))]),e("span",{staticStyle:{float:"right"}},[t._v(t._s(s.path))])])})),1),e("el-button",{attrs:{size:"medium",round:""},on:{click:t.navTo}},[t._v("跳转")])],1),e("div",{staticClass:"link"},[e("el-link",{staticClass:"to-home",on:{click:t.home}},[t._v(" 回到首页 ")]),e("el-link",{staticClass:"to-back",on:{click:t.back}},[t._v("返回上一页")]),e("el-link",{staticClass:"to-login",on:{click:t.login}},[t._v("重新登录")])],1),e("p",{staticClass:"copyright"},[t._v("Copyright © x-admin 2020")])])},a=[],r=(s("b138"),s("5880")),o={props:{code:Number,desc:String},data(){return{url:""}},computed:{...Object(r["mapGetters"])(["routes"])},methods:{navTo(){this.$router.push(this.url)},back(){history.back()},home(){this.$router.push("/")},login(){this.$store.dispatch("userLogout"),setTimeout(()=>{this.$router.push("/login")},30)}}},n=o,l=(s("1a24"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"7a9498ce",null);e["default"]=c.exports},4649:function(t,e,s){"use strict";s("a49c")},4792:function(t,e,s){},"47a3":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-amount",fn:function({scope:s}){return[0==s.row.io?e("span",[t._v("-"+t._s(s.row.amount))]):e("span",[t._v("+"+t._s(s.row.amount))])]}}])})],1)},a=[],r=(s("5880"),{data(){return{crud:null,endTime:"",customId:0}},methods:{onLoad({ctx:t,app:e}){this.app=e,this.$route.query.customId&&(this.customId=this.$route.query.customId),this.$route.query.endTime&&(this.endTime=this.$route.query.endTime),t.service(this.$service.customDebtChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"amount",align:"center"},{label:"剩余欠款",prop:"balance",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1","pagination"]]).done(),e.refresh({endTime:this.endTime,customId:this.customId})}}}),o=r,n=(s("fff2"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"e956bf66",null);e["default"]=l.exports},"482e":function(t,e,s){},4844:function(t,e,s){"use strict";s("ce27")},4873:function(t,e,s){"use strict";s("a3fc")},"496d":function(t,e,s){},"4b24":function(t,e,s){"use strict";s("482e")},"4b80":function(t,e,s){"use strict";s("a95d")},"4ce9":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this;t._self._c;return t._m(0)},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("div",{staticClass:"content-wrap"})])}],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("209c"),s("f803"),s("5880")),o=s("231c"),n={name:"set-password",components:{operateLineModule:o["default"]},data(){return{form:{name:"",menuOption:"0",replyUrl:"",targetId:0},rule:{},isModifyParents:!1,addDialog:!1,activeIndex:null,subActiveIndex:null,menuData:[],urlIndex:null,commonUrlData:[],operateShow:[],operateData:null,btnData:[]}},computed:{...Object(r["mapGetters"])(["shopInfo","userInfo"])},created(){this.init()},methods:{init(){this._getDet(),this._getUrl()},_getDet(){this.$service.setting.getMenu().then(t=>{this.menuData=t.map(t=>(t.children||(t.children=[]),t)),t.map(()=>{this.operateShow.push(!1)})})},_getUrl(){this.$service.single.commonUrl().then(t=>{this.commonUrlData=t})},async submitFn(){console.log(this.menuData),await this.$service.setting.updateMenu(this.menuData).then(t=>{this.$message.success(t.msg||"提交"),this.resetForm()})},menuClickFn(t,e){this.isModifyParents=!0,this.closeOperate(),this.activeIndex=e,this.operateShow[e]=!0,this.operateData=t.children||[],console.log("江总",t),console.log("江总11",this.commonUrlData),Object.keys(this.form).forEach(e=>{this.form[e]=t[e]}),this.addDialog=!0},operateClickFn(t){this.isModifyParents=!1,this.subActiveIndex=t.index,console.log("item",t),t.targetId=t.targetId?parseInt(t.targetId):0,Object.keys(this.form).forEach(e=>{this.form[e]=t[e]}),this.addDialog=!0},operateAddFn(t){if(this.operateData.length>4)return this.$message.warning("亲,最多只能设置五个子菜单!"),!1;let e={name:"子菜单名",menuOption:"0",replyUrl:"",targetId:0};this.$set(this.operateShow,this.activeIndex,!1),this.operateData.push(e),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData)),setTimeout(()=>{this.$set(this.operateShow,this.activeIndex,!0)})},operateDelFn(t){console.log("我点击了删除按钮!",t),this.$set(this.operateShow,this.activeIndex,!1),this.operateData.splice(t,1),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData)),setTimeout(()=>{this.$set(this.operateShow,this.activeIndex,!0)})},closeOperate(){this.activeIndex=null,this.operateShow=this.operateShow.map(t=>!1),this.addDialog=!1},closeOptionFn(){this.closeOperate(),this.resetForm()},confirmForm(){let t=JSON.parse(JSON.stringify(this.form));this.isModifyParents?(Object.keys(t).forEach(e=>{this.menuData[this.activeIndex][e]=t[e]}),console.log("江总22",this.menuData)):(this.operateData[this.subActiveIndex]=t,console.log("this.operateData",this.operateData),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData))),this.submitFn().then(t=>{console.log("this.activeIndex",this.activeIndex),this.addDialog=!1})},resetForm(){this.form={name:"",menuOption:"0",replyUrl:"",targetId:0},this.$refs["form"].resetFields()}}},l=n,c=(s("15fb"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"302dce28",null);e["default"]=u.exports},"4e96":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABiBAMAAABZixs9AAAAKlBMVEVHcEwwh/8zhf8zhf80hv8zhf/////t8/9vo//G2f+nxP+Qtv+zzP9Jj//IWeXKAAAABXRSTlMAIN+Qj+jKzykAAAJtSURBVFjD7dbNbtpAEAfwySv0HXrvI/Qd2ik2hmN3seGaNdDkuHKrqEdDk/ZKqFquKAqkxyiKQo+IVn2Z7voblNgzl566FxDyXz+Pd8YLPMOn12t4bB09r4m8fDTyH/nHyP0DF5kIGX7ZTDUdcW6mSghxzK3kTcyp5NwmbhmVuHJbSVCQyWnVICAJUdSB+KoJ6arTpPLj4pcX9Ygz9S3xsVUmahE3VHJpc2HrLZKQjhjN7GcUuD1EciWGULN2gEitJCHQ8ZNvWxpiCMTQfvswpCGRvaNvJjkXQ1IlCWE2ZjWRn2mVRGnRrhj9MDkCkhHYlnao7rbNiBsUlneRtmUTsizqEX7Wl5Q98Vb3Sl5opCF27URyPbYVFelIU/9ifa3GRERjZJrYvFNOtrRKOmPEudR/Fl+RWElbmfaY/0qf2m5A2fjf8qfZkKFt3q6KSXNyJWeOCrUX484nzsm8HwVRr+2fZU1DeFzv1cwJ9US8Iw+jbeGo551vkTjxjrq17xS9/0qGGqSVzF/UpyRSpLuy83E5pCTySszV6VSl+6hrEvnGS10S2T5CA3JSIfy6uyoQcUg8mcgQrySuBlifyB5XQUQibkgcnIzXQuimRN5do+/r9c1UjH1sSmSII+ySn4rTBBqRs8Vm86BxFzcn9iu5XBISe4fWBAmJPUSSEtVDa0BKVJDyGAUi0unTEiVCThQIOVEg9ESO0BPFqz4gJzLE88mJvIUlPXH4NxWoCCdxgAAbATYCbATYCLARYCPARoCNABsBNgJsBNgIsBFgI8BGgI0AGwE2AmwE2AiwEWAjwEaAjQAbATYCbISdOPoLDUm785Ua3FsAAAAASUVORK5CYII="},"4f53":function(t,e,s){"use strict";s("940c")},"4f63":function(t,e,s){},"4ffc":function(t,e,s){},5152:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"network"},[e("p",{staticClass:"title"},[t._v("流量")]),e("ul",[e("li",{staticClass:"rx",class:[t.options.legend.selected["上行"]?"on":"off"],on:{click:function(e){return t.change("上行")}}},[e("p",[t._v("上行")]),e("p",[t._v(t._s(t._f("unit_size")(t.tx_sec)))])]),e("li",{staticClass:"tx",class:[t.options.legend.selected["下载"]?"on":"off"],on:{click:function(e){return t.change("下载")}}},[e("p",[t._v("下载")]),e("p",[t._v(t._s(t._f("unit_size")(t.rx_sec)))])]),e("li",{staticClass:"send"},[e("p",[t._v("总发送")]),e("p",[t._v(t._s(t._f("unit_size")(t.tx_bytes)))])]),e("li",{staticClass:"receive"},[e("p",[t._v("总接收")]),e("p",[t._v(t._s(t._f("unit_size")(t.rx_bytes)))])])]),t.visible?e("e-charts",{attrs:{options:t.options}}):t._e()],1)},a=[],r=(s("865d"),s("8f26"),s("666b"),s("963e"),s("1447"),s("6678")),o=s.n(r),n=s("164e"),l=s.n(n),c=s("a9aa"),u={components:{ECharts:o.a},mixins:[c["default"]],props:{data:null},data(){return{visible:!0,options:{tooltip:{trigger:"axis",axisPointer:{lineStyle:{color:"#ddd"}},backgroundColor:"rgba(255,255,255,1)",padding:[5,10],textStyle:{color:"#7588E4"},extraCssText:"box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)",formatter:t=>t.map((t,e)=>(0==e?"上行:":"下载:")+this.conByte(t.value)).join("<br>")},legend:{data:["上行","下载"],selected:{"上行":!0,"下载":!0},left:"1000%"},grid:{left:"5%",right:"2%",bottom:"10%",top:"10%"},xAxis:{type:"category",data:[],boundaryGap:!1,splitLine:{show:!0,interval:"auto",lineStyle:{color:["#D4DFF5"]}},axisTick:{show:!1},axisLine:{lineStyle:{color:"#609ee9"}},axisLabel:{margin:10,textStyle:{fontSize:14}}},yAxis:{type:"value",splitLine:{lineStyle:{color:["#D4DFF5"]}},axisTick:{show:!1},axisLine:{lineStyle:{color:"#609ee9"}},axisLabel:{margin:10,textStyle:{fontSize:14},formatter:t=>this.conByte(t)}},series:[{type:"line",showSymbol:!1,symbol:"circle",symbolSize:6,data:[],areaStyle:{normal:{color:new l.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(255, 202, 89, 0.5)"},{offset:1,color:"rgba(255, 202, 89, 0.2)"}],!1)}},itemStyle:{normal:{color:"#f7b851"}},lineStyle:{normal:{width:1}}},{type:"line",showSymbol:!1,symbol:"circle",symbolSize:6,data:[],areaStyle:{normal:{color:new l.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(216, 244, 247, 1)"},{offset:1,color:"rgba(216, 244, 247, 1)"}],!1)}},itemStyle:{normal:{color:"#58c8da"}},lineStyle:{normal:{width:1}}}]},rx_bytes:0,tx_bytes:0,rx_sec:0,tx_sec:0}},methods:{change(t){this.options.legend.selected[t]=!this.options.legend.selected[t],this.visible=!1,this.$nextTick(()=>{this.visible=!0})},refresh(t){let{data:e=[],time:s}=t,i=e[e.length-1].server.network;this.rx_bytes=0,this.tx_bytes=0,i.forEach(t=>{this.rx_bytes+=t.rx_bytes,this.tx_bytes+=t.tx_bytes}),this.rx_sec=i.reduce((t,e)=>t+e.rx_sec,0),this.tx_sec=i.reduce((t,e)=>t+e.tx_sec,0),this.options.xAxis.data=s,this.options.series[0].name="上行",this.options.series[0].data=e.map(t=>t.server.network.reduce((t,e)=>t+e.tx_sec,0)),this.options.series[1].name="下载",this.options.series[1].data=e.map(t=>t.server.network.reduce((t,e)=>t+e.rx_sec,0))}}},d=u,m=(s("c6d8"),s("1805")),p=Object(m["a"])(d,i,a,!1,null,"a0c556fe",null);e["default"]=p.exports},"515d":function(t,e,s){},"51f3":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content auto-price-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"涨价开关",prop:"riseSwitch"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.form.riseSwitch,callback:function(e){t.$set(t.form,"riseSwitch",e)},expression:"form.riseSwitch"}})],1),1==t.form.riseSwitch?[e("el-form-item",{attrs:{label:"涨价节日",prop:"festIdList"}},t._l(t.festData,(function(s,i){return e("el-checkbox",{key:s.id,attrs:{label:s.id,border:"",size:"small"},model:{value:t.form.festIdList,callback:function(e){t.$set(t.form,"festIdList",e)},expression:"form.festIdList"}},[t._v(t._s(s.name))])})),1),e("el-form-item",{attrs:{label:"涨价方式",prop:"riseType"}},[e("el-radio-group",{model:{value:t.form.riseType,callback:function(e){t.$set(t.form,"riseType",e)},expression:"form.riseType"}},[e("el-radio",{attrs:{label:"0"}},[t._v("按百分比")]),e("el-radio",{attrs:{label:"1"}},[t._v("按金额")])],1)],1),0==t.form.riseType?[e("el-form-item",{attrs:{label:"涨价比例",prop:"riseAmount"}},[e("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"涨价10%,请输入10"},model:{value:t.form.riseAmount,callback:function(e){t.$set(t.form,"riseAmount",e)},expression:"form.riseAmount"}})],1)]:[e("el-form-item",{attrs:{label:"涨价金额",prop:"riseAmount"}},[e("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"涨价80元请输入80"},model:{value:t.form.riseAmount,callback:function(e){t.$set(t.form,"riseAmount",e)},expression:"form.riseAmount"}})],1)]]:t._e(),e("el-form-item",[e("div",{staticClass:"app-color-3"},[t._v(" 节日当天和前一天,设置节日涨价的商品将按以上规则涨价。 ")])]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],2)],1)},a=[],r=(s("8f26"),s("666b"),s("963e"),s("5880")),o={name:"auto-price",data(){return{form:{riseSwitch:"0",riseType:"0",festIdList:[],riseAmount:""},rules:{riseType:{required:!0,message:"涨价方式不能为空"},riseAmount:{required:!0,message:"涨价金额不能为空"}}}},computed:{...Object(r["mapGetters"])({festData:"festival"})},mounted(){this.init()},methods:{init(){this.$store.dispatch("getFestival"),this._getData()},_getData(){this.$service.goods.getAutoPrice().then(t=>{this.$util.isEmpty(t)||(t.festIdList=t.festIdList.map(t=>t+""),Object.keys(this.form).forEach((e,s)=>{this.form[e]=t[e]}))})},setPrice(){this.$service.goods.setAutoPrice(this.form).then(t=>{this.$message.success("更新成功!")})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this.setPrice()})},resetForm(t){this.$refs[t].resetFields()}}},n=o,l=(s("86f0"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},"526e":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content setting-coupon-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"140px"}},[e("el-form-item",{attrs:{label:"是否启用",prop:"name"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.form.switch,callback:function(e){t.$set(t.form,"switch",e)},expression:"form.switch"}})],1),e("el-form-item",{attrs:{label:"新客户送",prop:"name"}},[e("div",{staticClass:"flex-center flex-wrap"},[e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.amount,callback:function(e){t.$set(t.form,"amount",e)},expression:"form.amount"}}),e("div",{staticClass:"prompt-text"},[t._v("元优惠券,满")]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.miniCost,callback:function(e){t.$set(t.form,"miniCost",e)},expression:"form.miniCost"}}),e("div",{staticClass:"prompt-text"},[t._v("元可用,领取后")]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.duration,callback:function(e){t.$set(t.form,"duration",e)},expression:"form.duration"}}),e("div",{staticClass:"prompt-text"},[t._v("天内有效。")])],1)]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],1)],1)},a=[],r=(s("8f26"),s("666b"),{name:"setting-freight",data(){return{form:{switch:1,amount:0,miniCost:0,duration:0},rules:{}}},mounted(){this.init()},methods:{init(){this.$service.coupon.assetDet().then(t=>{this.$util.isEmpty(t)||Object.keys(this.form).forEach((e,s)=>{this.form[e]=t[e]})})},_updateFn(){this.$service.coupon.assetUpdate(this.form).then(t=>{this.$store.dispatch("shopInfo"),this.$message.success("更新成功!")})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this._updateFn()})},resetForm(t){this.$refs[t].resetFields()}}}),o=r,n=(s("4649"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"57ce9292",null);e["default"]=l.exports},"529a":function(t,e,s){},"52f0":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-refundType",fn:function({scope:e}){return[t._v(" "+t._s(1==e.row.refundType?"退货并退款":"仅退款")+" ")]}},{key:"table-column-cause",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.cause?"质量问题":1==e.row.cause?"多开错开":2==e.row.cause?"打包原因":3==e.row.cause?"物流原因":"其它")+" ")]}},{key:"table-column-book",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.book?"常规":"预订退款")+" ")]}},{key:"table-column-status",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.status?"待审核":1==e.row.status?"已通过":2==e.row.status?"已驳回":3==e.row.status?"已取消":"其他")+" ")]}},{key:"slot-export-order",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出记录")])]},proxy:!0},{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.addTime?s.row.addTime.substr(5,11):"")+" ")])]}},{key:"table-column-passTime",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.passTime?s.row.passTime.substr(5,11):"")+" ")])]}},{key:"table-column-orderTime",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.orderTime?s.row.orderTime.substr(5,11):"")+" ")])]}},{key:"slot-search-option",fn:function({scope:s}){return[e("el-select",{staticStyle:{width:"130px","margin-right":"10px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索客户",clearable:"","remote-method":t.searchCustom,loading:t.loading,size:"mini"},on:{change:t.getCurrentCustom},model:{value:t.currentCustomName,callback:function(e){t.currentCustomName=e},expression:"currentCustomName"}},t._l(t.customList,(function(t){return e("el-option",{key:t.id,attrs:{label:""+t.name,value:t.id}})})),1),e("el-select",{staticStyle:{width:"110px","margin-left":"8px"},attrs:{size:"mini",placeholder:"操作人",clearable:!0},on:{change:t.getKdStaff},model:{value:t.currentStaffName,callback:function(e){t.currentStaffName=e},expression:"currentStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("span",{staticStyle:{"margin-left":"9px","font-size":"18px"}},[t._v("订单日期:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("span",{staticStyle:{"margin-left":"9px","font-size":"18px"}},[t._v("售后申请日期:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchRefundDate},model:{value:t.currentRefundDateList,callback:function(e){t.currentRefundDateList=e},expression:"currentRefundDateList"}})]}},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("总金额:"+t._s(t.totalRefundPrice))])]},proxy:!0}])})],1)},a=[],r=s("5880"),o={components:{},data(){return{app:null,tabIndex:"-1",tabsData:[{text:"全部",key:"-1",val:0},{text:"待审",key:"0",val:0},{text:"通过",key:"1",val:0},{text:"驳回",key:"2",val:0},{text:"取消",key:"3",val:0}],modalData:{},drapShow:!1,name1:"",mobile1:"",confirmMobile1:"",fileUrl:"",currentStaffName:"",currentStaffId:0,staffList:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",currentDateList:[],refundStartTime:"",refundEndTime:"",refundSearchTime:"",currentRefundDateList:[],status:"-1",totalRefundPrice:0,currentCustomName:"",currentCustomId:0,customList:[],loading:!1}},computed:{...Object(r["mapGetters"])(["token"])},created(){},mounted(){let t=this;t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list})},methods:{getCurrentCustom(t){this.currentCustomId=t,this.refreshData()},searchCustom(t){let e=this;""!==t?(this.loading=!0,this.$service.custom.list({name:t}).then(t=>{e.loading=!1,e.customList=t.list})):this.customList=[]},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.refreshData()}),650)},getKdStaff(t){this.currentStaffId=t,this.refreshData()},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.refreshData()},getSearchRefundDate(){this.$util.isEmpty(this.currentRefundDateList)?(this.refundSearchTime="",this.refundStartTime="",this.refundEndTime=""):(this.refundSearchTime="custom",this.refundStartTime=this.currentRefundDateList[0],this.refundEndTime=this.currentRefundDateList[1]),this.refreshData()},refreshData(){this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,refundSearchTime:this.refundSearchTime,refundStartTime:this.refundStartTime,refundEndTime:this.refundEndTime,shopAdminId:this.currentStaffId,status:this.status,customId:this.currentCustomId})},exportData(){this.$service.refund.getRefundList({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,refundSearchTime:this.refundSearchTime,refundStartTime:this.refundStartTime,refundEndTime:this.refundEndTime,shopAdminId:this.currentStaffId,status:this.status,pageSize:9999999,export:1,customId:this.currentCustomId}).then(t=>{t.file&&(window.location.href=t.file)})},handleClick(){this.status=this.tabIndex,this.refreshData()},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.customId&&(this.currentCustomId=this.$route.query.customId,this.currentCustomName=this.$route.query.customName?this.$route.query.customName:"",this.searchTime=this.$route.query.searchTime?this.$route.query.searchTime:"",this.startTime=this.$route.query.startTime?this.$route.query.startTime:"",this.endTime=this.$route.query.endTime?this.$route.query.endTime:"",""!=this.startTime&&""!=this.endTime&&(this.currentDateList=[this.startTime,this.endTime]),this.$route.query.status&&(this.status=this.$route.query.status,this.tabIndex=this.status.toString())),t.service(this.$service.refund).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:80},{prop:"orderSn",label:"退款单号",align:"center",width:140},{prop:"orderTime",label:"订单日期",align:"center",width:100},{prop:"relateOrderSn",label:"订单号",align:"center",width:140},{prop:"customName",label:"客户",align:"center",width:160},{prop:"refundPrice",label:"金额",align:"center",width:110},{prop:"status",label:"状态",align:"center",width:100},{prop:"refundType",label:"售后类型",align:"center",width:120},{prop:"book",label:"类型",align:"center",width:90},{prop:"shopAdminName",label:"操作人",align:"center",width:110},{prop:"cause",label:"售后原因",align:"center",width:100},{prop:"addTime",label:"申请日期",align:"center",width:100},{prop:"passTime",label:"通过日期",align:"center",width:100},{prop:"remark",label:"备注",align:"center",width:100},{prop:"rejectReason",label:"驳回原因",align:"center",width:90}],op:{visible:!0,props:{width:90,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["slot-search-option","flex1","slot-export-order"],["data-table"],["slot-total-amount","flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.totalRefundPrice=s.totalRefundPrice?parseFloat(s.totalRefundPrice):0}).done(),this.refreshData()}}},n=o,l=(s("a1dd"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"2601ce61",null);e["default"]=c.exports},5353:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"wrapper"},[e("div",{staticClass:"wrapper-top"},[e("topbar")],1),e("div",{staticClass:"wrapper-bottom"},[e("div",{staticClass:"wrapper-left"},[e("slider")],1),e("div",{staticClass:"wrapper-right__container"},[e("div",{staticClass:"content-view"},[e("router-view")],1)])]),e("chat")],1)},a=[],r=s("79b4"),o=s("8ee2"),n=s("b163"),l={components:{Topbar:r["default"],Slider:o["default"],Chat:n["default"]},computed:{}},c=l,u=(s("755f"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"bfac501a",null);e["default"]=d.exports},"548c":function(t,e,s){"use strict";s("496d")},"55b3":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"date",placeholder:"选择日期","value-format":"yyyy-MM-dd"},on:{change:t.getSearchDate},model:{value:t.endTime,callback:function(e){t.endTime=e},expression:"endTime"}})]},proxy:!0},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("累计金额:"+t._s(t.totalAmount))])]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportDue()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goChange(s.row)}}},[t._v("查看明细")])]}}])})],1)},a=[],r=(s("b138"),s("5880")),o={data(){return{crud:null,currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,debt:"-1"}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{goChange(t){let e={};e.ghsId=t.id,e.endTime=this.endTime,this.$router.push({path:"/in/ghs-debt-record",query:e})},exportDue(){this.$service.ghsDebtRecord.getPastList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.ghsDebtRecord.getPastList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>(this.totalAmount=t.totalAmount?t.totalAmount:0,{list:t.list}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"名称",prop:"name",align:"center"},{label:"欠款金额",prop:"currentDebAmount",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-date-select","flex1","slot-export-due","refresh-btn"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getSearchDate(){this.searchTime="custom",this.startTime=this.endTime,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})},changeDebt(t){this.debt=t,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})}}},n=o,l=(s("19d2"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"0c2f41ca",null);e["default"]=c.exports},"55c3":function(t,e,s){"use strict";s.r(e),e["default"]={watch:{"list.loading"(t){}},computed:{totalPages(){return this.$util.isEmpty(this.list.total)?0:Math.ceil(this.list.total/this.list.limit)}},data(){return{list:{data:[],page:1,pageSize:10,loading:!0,finished:!1,total:0}}},methods:{resetList(){this.list={data:[],page:1,pageSize:10,loading:!0,finished:!1,total:null}},completes(t,e){this.list.loading=!1,this.list.data=1===this.list.page?t.list||t.data||t[e]:this.list.data.concat(t.list||t.data||t[e]),this.list.total=parseInt(t.totalNum),0==t.moreData?this.list.finished=!0:++this.list.page}}}},"561b":function(t,e,s){},"56e4":function(t,e,s){},5703:function(t,e,s){"use strict";s.r(e);s("b138");var i=function(){var t=this,e=t._self._c;return e("el-drawer",{attrs:{title:"客户详情",visible:t.showStatus,size:"70%","before-close":t.closeFn,"custom-class":"member-draw-wrap"},on:{"update:visible":function(e){t.showStatus=e}}},[e("div",{staticClass:"head-wrap"},[e("div",{staticClass:"head-left"},[e("cl-avatar",{style:{margin:"auto"},attrs:{size:60,src:t.info.avatar}}),e("div",[t._v(t._s(t.info.userName))]),t.info.userAsset?e("div",[t._v(t._s(t.info.userAsset.growth))]):t._e()],1),e("div",{staticClass:"head-right"},[e("div",[e("div",{staticClass:"info-label"},[t._v("用户ID")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.id))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("手机号")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.mobile||"-"))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("昵称")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.userName))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("粉丝")]),e("div",{staticClass:"info-val"},[t._v(t._s(0==t.info.subscribe?"否":"是"))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("性别")]),e("div",{staticClass:"info-val"},[1==t.info.sex?[t._v("男")]:2==t.info.sex?[t._v("女")]:[t._v("-")]],2)]),e("div",[e("div",{staticClass:"info-label"},[t._v("最近访问")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.visitTimeFormat))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("生日")]),e("div",{staticClass:"info-val"},["0000-00-00"==t.info.birthday?[t._v("-")]:[t._v(t._s(t.info.birthday))]],2)]),e("div",[e("div",{staticClass:"info-label"},[t._v("创建时间")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.createTime))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("住址")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.address||"-"))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("用户来源")]),e("div",{staticClass:"info-val"},[0==t.info.sourceType?[t._v("微信")]:1==t.info.sourceType?[t._v("支付宝")]:2==t.info.sourceType?[t._v("小程序")]:3==t.info.sourceType?[t._v("朋友圈")]:4==t.info.sourceType?[t._v("美团")]:5==t.info.sourceType?[t._v("系统")]:[t._v("-")]],2)])])]),e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v("资产信息")]),e("el-table",{attrs:{data:t.assetsData}},[e("el-table-column",{attrs:{property:"totalExpend",label:"消费金额"}}),e("el-table-column",{attrs:{property:"totalBuyNum",label:"消费次数"}}),e("el-table-column",{attrs:{property:"balance",label:"余额"}}),e("el-table-column",{attrs:{property:"growth",label:"成长值"}}),e("el-table-column",{attrs:{property:"getCouponNum",label:"领优惠券数"}}),e("el-table-column",{attrs:{property:"totalRecharge",label:"累计充值"}}),e("el-table-column",{attrs:{property:"inviteNum",label:"邀请新人数"}}),e("el-table-column",{attrs:{property:"discount",label:"享折扣"}})],1)],1),e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v("订单记录")]),e("el-table",{attrs:{data:t.orderData}},[e("el-table-column",{attrs:{property:"id",label:"ID"}}),e("el-table-column",{attrs:{property:"createTime",label:"提交时间"}}),e("el-table-column",{attrs:{property:"actPrice",label:"订单金额"}}),e("el-table-column",{attrs:{property:"payWay",label:"支付方式"}}),e("el-table-column",{attrs:{property:"sendNum",label:"编号"}}),e("el-table-column",{attrs:{property:"status",label:"订单状态"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(t._f("constantfilter")(s.row.status,"ORDER_STATUS")))])]}}])}),e("el-table-column",{attrs:{property:"discount",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.$router.push("/order/list")}}},[t._v("查看订单")])]}}])})],1)],1)])},a=[],r={name:"detail-draw",props:{show:{type:Boolean,default:!1},info:{type:Object,default:()=>{}}},data(){return{showStatus:!1,data:{},assetsData:[],orderData:[]}},watch:{show(t){this.showStatus=t,t&&this.init()}},methods:{init(){this.$service.member.allDetail({userId:this.info.id}).then(t=>{this.data=t,this.assetsData=[t.userAsset],this.orderData=t.orderList})},closeFn(t){this.$emit("update:show",!1),t()}}},o=r,n=(s("4370"),s("f850"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"22a758b8",null);e["default"]=l.exports},"573e":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"scope-process"},[e("cl-scroll",t._l(t.processList,(function(s,i){return e("div",{key:i,staticClass:"block",class:{active:s.active},attrs:{"data-index":i},on:{mousedown:e=>{t.onTap(e,s)}}},[e("span",[t._v(t._s(s.label))]),i>0?e("i",{staticClass:"el-icon-close",class:{active:i>0},on:{mousedown:function(e){return e.stopPropagation(),t.onDel(i)}}}):t._e()])})),0),e("ul",{directives:[{name:"show",rawName:"v-show",value:t.menu.visible,expression:"menu.visible"}],staticClass:"context-menu",style:t.menu.style},[t.isHit?e("li",{on:{click:function(e){return t.onClose("current")}}},[t._v("关闭当前")]):t._e(),e("li",{on:{click:function(e){return t.onClose("other")}}},[t._v("关闭其他")]),e("li",{on:{click:function(e){return t.onClose("all")}}},[t._v("关闭所有")])])],1)},a=[],r=(s("b138"),s("8f26"),s("d9d9"),s("3739"),s("5880")),o={data(){return{menu:{visible:!1,current:{},style:{left:0,top:0}},isHit:!1,page:1}},computed:{...Object(r["mapGetters"])(["processList"])},watch:{processList(){let t=this.$el.clientWidth;this.$nextTick(()=>{let e=this.$el.querySelectorAll(".block")||[],s=0;for(let t=0;t<e.length;t++)s+=e[t].clientWidth;t-s>1e3&&(this.page+=1)})}},mounted(){this.$el.oncontextmenu=()=>{event.returnValue=!1},document.body.addEventListener("click",()=>{this.menu.visible&&(this.menu.visible=!1)})},methods:{...Object(r["mapMutations"])(["ADD_PROCESS","DEL_PROCESS","SET_PROCESS"]),onTap(t,e){this.isHit=e.active,0==t.button?this.$router.push(e.value):this.menu={current:e,visible:!0,style:{left:t.layerX+"px",top:t.layerY+"px"}}},onDel(t){this.DEL_PROCESS(t),this.toPath()},onClose(t){const{current:e}=this.menu;switch(t){case"current":this.onDel(this.processList.findIndex(t=>t.value==e.value));break;case"other":this.SET_PROCESS(this.processList.filter(t=>t.value==e.value||"/"==t.value));break;case"all":this.SET_PROCESS(this.processList.filter(t=>"/"==t.value));break}this.toPath()},toPath(){const t=this.processList.find(t=>t.active);if(!t){const t=this.processList[this.processList.length-1];this.$router.push(t?t.value:"/")}}}},n=o,l=(s("c209"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"64c63b5a",null);e["default"]=c.exports},"57d0":function(t,e,s){},5810:function(t,e,s){},"581c":function(t,e,s){},"58fc":function(t,e,s){},5999:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return 0==t.form.ghsId?e("div",{staticStyle:{width:"35vw",margin:"0 auto","margin-top":"90px","text-align":"center","font-size":"25px"}},[e("span",[t._v("请先选择供货商")])]):e("div",{staticClass:"app-list-content"},[e("div",{staticClass:"left_box"},[e("p",{staticClass:"tor"},[e("span",{staticStyle:{color:"black","font-weight":"bold"}},[t._v("供货商:"+t._s(t.form.ghsName))]),e("span",[t._v("全屏:F11")]),e("span",[t._v("修改:回车")]),e("span",[t._v("删除:Delete")]),e("span",[t._v("删除所有:Page Down")])]),e("audio",{ref:"hitPlay"},[e("source",{attrs:{src:s("ef11"),type:"audio/mpeg"}})]),e("audio",{ref:"noStockPlay"},[e("source",{attrs:{src:s("f214"),type:"audio/mpeg"}})]),e("audio",{ref:"successPlay"},[e("source",{attrs:{src:s("39e4"),type:"audio/mpeg"}})]),e("el-table",{ref:"singleTable",staticClass:"tableBox active",staticStyle:{width:"70vw",margin:"0 auto"},attrs:{data:t.selectList,"highlight-current-row":"",border:"","header-cell-style":{background:"#fdfdfd",color:"#01060a",fontWeight:800},height:"70vh"},on:{"row-click":t.pickModifyItem}},[e("el-table-column",{attrs:{prop:"id",label:"编号",width:"110",align:"center"}}),e("el-table-column",{attrs:{prop:"cover",label:"图片",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("img",{staticStyle:{width:"40px",margin:"0 auto"},attrs:{src:t.row.cover}})]}}])}),e("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"}}),e("el-table-column",{attrs:{prop:"bigCount",label:"数量",width:"110",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[0==t.cgUnitType?e("span",[t._v(" "+t._s(s.row.bigCount)+t._s(s.row.bigUnit)+" ")]):e("span",[t._v(" "+t._s(s.row.smallCount)+t._s(s.row.smallUnit)+" ")])]}}])}),e("el-table-column",{attrs:{prop:"userPrice",label:"单价",width:"110",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(1==e.row.aboutPrice?"约":"")+" "+t._s(e.row.userPrice)+" ")]}}])}),e("el-table-column",{attrs:{prop:"sumPrice",label:"金额",width:"110",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.totalPrice)+" ")]}}])}),e("el-table-column",{attrs:{prop:"ratioType",label:"单位比",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(s){return[0==s.row.ratioType?e("span",[t._v(t._s(s.row.ratio)+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))]):e("span",[t._v("若干"+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))])]}}])}),e("el-table-column",{attrs:{prop:"addTime",label:"操作",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.delItem(s.row)}}},[t._v("删除")])]}}])})],1)],1),t.$util.isEmpty(t.getItemList)||1!=t.showGetItemList?t._e():e("div",{staticClass:"seek-list-box"},[e("el-table",{ref:"showItemRef",staticClass:"tableBox active",staticStyle:{width:"60vw"},attrs:{data:t.getItemList,"highlight-current-row":"",border:"","header-cell-style":{background:"#fdfdfd",color:"#666"},height:"70vh"},on:{"row-click":t.pickAddItem}},[e("el-table-column",{attrs:{prop:"className",label:"分类",align:"center",width:"130"}}),e("el-table-column",{attrs:{prop:"cover",label:"图片",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("img",{staticStyle:{width:"26px",margin:"0 auto"},attrs:{src:t.row.cover}})]}}],null,!1,309617309)}),e("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" "+t._s(s.row.name)+" "),s.row.selectedNum&&Number(s.row.selectedNum)>0?e("span",{staticStyle:{color:"blue","font-weight":"bold"}},[t._v(" (已选"+t._s(s.row.selectedNum)+t._s(0==t.cgUnitType?s.row.bigUnit:s.row.smallUnit)+") ")]):t._e()]}}],null,!1,1843849193)}),e("el-table-column",{attrs:{prop:"price",label:"价格",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v("¥"+t._s(s.row.price?parseFloat(s.row.price):0))])]}}],null,!1,2523261369)}),e("el-table-column",{attrs:{prop:"stock",label:"库存",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.stock?parseFloat(s.row.stock):0))])]}}],null,!1,2300266751)}),e("el-table-column",{attrs:{prop:"ratioType",label:"单位比",align:"center",width:"110"},scopedSlots:t._u([{key:"default",fn:function(s){return[0==s.row.ratioType?e("span",[t._v(t._s(s.row.ratio)+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))]):e("span",[t._v("若干"+t._s(s.row.smallUnit)+"/"+t._s(s.row.bigUnit))])]}}],null,!1,1375079310)}),e("el-table-column",{attrs:{prop:"selectedNum",label:"已选数量",align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(s){return[s.row.selectedNum&&Number(s.row.selectedNum)>0?e("span",{staticStyle:{color:"blue","font-weight":"bold","font-size":"15px"}},[t._v(" "+t._s(s.row.selectedNum)+t._s(0==t.cgUnitType?s.row.bigUnit:s.row.smallUnit)+" ")]):t._e()]}}],null,!1,1012655356)})],1)],1),e("div",{staticClass:"bottom_input"},[e("span",{staticStyle:{"margin-right":"10px","font-weight":"700"}},[t._v("花材")]),e("el-input",{ref:"itemSearchRef",staticStyle:{width:"280px","font-size":"13px"},attrs:{placeholder:"这里搜索,支持字母搜索 Ctrl + Q",type:"text"},on:{input:t.beginSearchItem,focus:t.clearSeachVal},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.pickAddCurrentItem.apply(null,arguments)}},model:{value:t.searchVal,callback:function(e){t.searchVal=e},expression:"searchVal"}}),e("div",{staticClass:"allPrice",staticStyle:{display:"inline-block"}},[t._v(t._s(t.allCount.kind)+"种")]),e("div",{staticClass:"allPrice",staticStyle:{display:"inline-block"}},[t._v(t._s(t.allCount.bigLength)+"扎")]),e("div",{staticClass:"allPrice",staticStyle:{display:"inline-block"}},[t._v("¥"+t._s(t.allPrice))]),e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{type:"primary",size:"medium"},on:{click:function(e){return t.commitOrder()}}},[t._v("提交(Ctrl + / )")]),e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{size:"medium"},on:{click:function(e){return t.comeBack()}}},[t._v("返回")])],1),e("el-dialog",{attrs:{title:t.currentItem.name,visible:t.showConfirmNum,width:"30%",center:""},on:{"update:visible":function(e){t.showConfirmNum=e}}},[e("div",{staticClass:"el-dialog-center"},[0==t.cgUnitType?[e("el-input",{ref:"countInput",staticStyle:{width:"90px","margin-left":"15px","text-align":"center"},attrs:{placeholder:"数量",type:"number"},on:{input:t.bigCountChange},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.bigCount,callback:function(e){t.$set(t.customData,"bigCount",e)},expression:"customData.bigCount"}}),e("span",{staticStyle:{padding:"0 0 0 4px"}},[t._v(t._s(t.currentItem.bigUnit))])]:[e("el-input",{ref:"countInput",staticStyle:{width:"90px","margin-left":"15px","text-align":"center"},attrs:{placeholder:"数量",type:"number"},on:{input:t.smallCountChange},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.smallCount,callback:function(e){t.$set(t.customData,"smallCount",e)},expression:"customData.smallCount"}}),e("span",{staticStyle:{padding:"0 0 0 4px"}},[t._v(t._s(t.currentItem.smallUnit))])],1==t.customData.aboutPrice?e("span",{staticStyle:{padding:"0 2px 0 15px",color:"red","font-weight":"bold"}},[t._v("约")]):e("span",{staticStyle:{padding:"0 2px 0 15px",color:"green","font-weight":"bold"}},[t._v(" ")]),e("el-input",{staticStyle:{width:"90px","margin-left":"0px","text-align":"center"},attrs:{center:"",placeholder:"单价",type:"number"},on:{input:t.userPriceChange},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.userPrice,callback:function(e){t.$set(t.customData,"userPrice",e)},expression:"customData.userPrice"}}),e("span",{staticStyle:{padding:"0 0 0 4px"}},[t._v("元")]),e("el-input",{staticStyle:{width:"90px","margin-left":"15px","text-align":"center"},attrs:{placeholder:"总价",type:"number"},on:{input:t.totalPriceChange},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.confirmNumPrice()}},model:{value:t.customData.totalPrice,callback:function(e){t.$set(t.customData,"totalPrice",e)},expression:"customData.totalPrice"}}),e("span",{staticStyle:{padding:"0 0 0 4px"}},[t._v("元")])],2),e("div",{staticStyle:{"text-align":"center",margin:"20px 0 5px 0","font-weight":"bold","font-size":"18px"}},[t._v("剩 "+t._s(t.currentItem.stock?parseFloat(t.currentItem.stock):0)+" "+t._s(t.currentItem.bigUnit))]),e("div",{staticStyle:{"text-align":"center","margin-top":"15px"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.customData.assignSeat,callback:function(e){t.$set(t.customData,"assignSeat",e)},expression:"customData.assignSeat"}}),t._v(" "+t._s("0"==t.customData.assignSeat?"无":"")+"货位 ")],1),e("div",{staticClass:"remark"},[e("el-button",{on:{click:function(e){return t.backToSearchItem()}}},[t._v("取消")]),e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{type:"primary"},on:{click:function(e){return t.confirmNumPrice()}}},[t._v("确认")])],1),e("div",{staticClass:"remark"},[t._v("Esc 取消,Enter 确认")])]),t.showCommitPop?e("el-dialog",{attrs:{title:"确认提交",visible:t.showCommitPop,width:"655px",center:"","close-on-click-modal":!1,top:"0vh"},on:{"update:visible":function(e){t.showCommitPop=e}}},[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 供货商 "),e("div",{staticClass:"accounts-center"},[t._v(t._s(t.form.ghsName))])]),e("div",{staticClass:"accounts-list"},[t._v(" 采购人 "),e("el-select",{ref:"cgStaffRef",staticStyle:{width:"80%"},attrs:{placeholder:"请选择"},on:{change:t.changeCgStaff},model:{value:t.form.cgStaffName,callback:function(e){t.$set(t.form,"cgStaffName",e)},expression:"form.cgStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t}})})),1)],1),e("div",{staticClass:"accounts-list"},[t._v(" 入库日期 "),e("el-date-picker",{staticStyle:{width:"80%"},attrs:{"value-format":"yyyy-MM-dd",type:"date",placeholder:"请选择"},model:{value:t.form.entryTime,callback:function(e){t.$set(t.form,"entryTime",e)},expression:"form.entryTime"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 货位号 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写货位号"},on:{input:t.inputFn},model:{value:t.form.seatSn,callback:function(e){t.$set(t.form,"seatSn",e)},expression:"form.seatSn"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 打包费 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写打包费"},on:{input:t.inputFn},model:{value:t.form.packingCharge,callback:function(e){t.$set(t.form,"packingCharge",e)},expression:"form.packingCharge"}})],1)]),1==t.location?e("div",{staticClass:"accounts-list"},[t._v(" 打印小票 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:1==t.form.needPrint?"primary":"",size:"small"},on:{click:function(e){t.form.needPrint=1}}},[t._v("打印")]),e("el-button",{attrs:{type:2==t.form.needPrint?"primary":"",size:"small"},on:{click:function(e){t.form.needPrint=2}}},[t._v("不打")])],1)]):t._e(),t.$util.isEmpty(t.wcPrintList)||1!=t.form.needPrint?t._e():e("div",{staticClass:"accounts-list"},[t._v(" 选择机器 "),e("div",{staticClass:"accounts-center"},t._l(t.wcPrintList,(function(s,i){return e("el-button",{key:i,attrs:{type:t.form.fistWcPrintNum==s.id?"primary":"",size:"small"},on:{click:function(e){t.form.fistWcPrintNum=s.id}}},[t._v(" "+t._s(s.name)+" ")])})),1)]),e("div",{staticClass:"accounts-list"},[t._v(" 运费支付 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:1==t.form.yfPayWay?"primary":"",size:"small"},on:{click:function(e){return t.changeYfPayWay(1)}}},[t._v("寄付")]),e("el-button",{attrs:{type:2==t.form.yfPayWay?"primary":"",size:"small"},on:{click:function(e){return t.changeYfPayWay(2)}}},[t._v("到付")])],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 短途运费 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写"},on:{input:t.inputFn},model:{value:t.form.shortCharge,callback:function(e){t.$set(t.form,"shortCharge",e)},expression:"form.shortCharge"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 长途运费 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写"},on:{input:t.inputFn},model:{value:t.form.longCharge,callback:function(e){t.$set(t.form,"longCharge",e)},expression:"form.longCharge"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 提货费 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写"},on:{input:t.inputFn},model:{value:t.form.pickCharge,callback:function(e){t.$set(t.form,"pickCharge",e)},expression:"form.pickCharge"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 本地运费 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{placeholder:"请填写"},on:{input:t.inputFn},model:{value:t.form.localCharge,callback:function(e){t.$set(t.form,"localCharge",e)},expression:"form.localCharge"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 总金额 "),e("div",{staticClass:"accounts-center",staticStyle:{color:"black"}},[t._v("¥"+t._s(t.totalPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 应付金额 "),e("el-input",{staticStyle:{width:"80%"},on:{focus:function(e){t.modifyPrice=""}},model:{value:t.modifyPrice,callback:function(e){t.modifyPrice=e},expression:"modifyPrice"}})],1),parseFloat((t.totalPrice-t.modifyPrice).toFixed(2))>0?e("div",{staticClass:"accounts-list",staticStyle:{"font-size":"25upx","margin-left":"20upx",color:"green","font-weight":"bold"}},[t._v(" 减免金额 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(parseFloat((t.totalPrice-t.modifyPrice).toFixed(2))))])]):t._e(),e("div",{staticClass:"accounts-list"},[t._v(" 物流费用 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:1==t.form.isCost?"primary":"",size:"small"},on:{click:function(e){t.form.isCost=1}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.isCost}}},[t._v("算成本")]),e("el-button",{attrs:{type:0==t.form.isCost?"primary":"",size:"small"},on:{click:function(e){t.form.isCost=0}},nativeOn:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.form.isCost}}},[t._v("不算成本")])],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 备注 "),e("div",{staticClass:"accounts-center"},[e("el-input",{ref:"remarkRef",attrs:{type:"textarea",rows:1,placeholder:"这里写备注"},model:{value:t.form.remark,callback:function(e){t.$set(t.form,"remark",e)},expression:"form.remark"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 总运费 "),e("div",{staticClass:"accounts-center",staticStyle:{color:"black"}},[t._v("¥"+t._s(t.totalFreight))])]),e("div",{staticClass:"accounts-list"},[t._v(" 总重量 "),e("div",{staticClass:"accounts-center",staticStyle:{color:"black"}},[t._v("¥"+t._s(t.calcTotalWeight))])]),e("div",{staticClass:"accounts-list"},[t._v(" 每公斤运费 "),e("div",{staticClass:"accounts-center",staticStyle:{color:"black"}},[t._v("¥"+t._s(t.perKgFreight))])]),e("div",{staticClass:"accounts-list"},[e("span"),e("div",{staticClass:"accounts-center"},[e("el-button",{on:{click:function(e){t.showCommitPop=!1}}},[t._v("取消(Esc)")]),e("el-button",{attrs:{type:"primary"},on:{click:t.createOrder}},[t._v("下一步(Ctrl+Enter)")])],1)])])]):t._e()],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("f803"),s("5880")),o=s("c745"),n={name:"add",data(){return{staffList:[],form:{ghsId:0,packingCharge:"",seatSn:"",shortCharge:"",longCharge:"",pickCharge:"",localCharge:"",entryTime:"",yfPayWay:1,remark:"",avgKgWeight:"",needPrint:2,fistWcPrintNum:1,cgStaffId:0,cgStaffName:"",isCost:1},detailsInfo:{},totalFreight:0,perKgFreight:0,location:0,wcPrintList:[],printAmount:1,checked:!0,type:"自提",payType:"欠款",showConfirmNum:!1,showCommitPop:!1,priceAmend:0,desk:"",totalMoney:0,modifyPrice:0,searchVal:"",searchOldVal:"",getIndex:0,getItemList:[],selectIndex:0,kdStaffVal:"www",freight:"",remark:"",number:0,customInfoList:[],loading:!1,selectGhsName:"",t:null,currentShop:{default:0,pfLevel:0},showGetItemList:!1,currentItem:{},classList:[],changeType:"add",TT:null,selectJobType:"purchase",globalCheckStock:!1,cgUnitType:0,wcPrintList:[],location:0}},mixins:[o["default"]],computed:{...Object(r["mapGetters"])(["shopInfo"]),totalItemNum(){let t=0,e=0;if(!this.$util.isEmpty(this.selectList))for(const s of this.selectList)Number(s.bigCount)>0&&(t=Number(t)+Number(s.bigCount),t=t.toFixed(0)),Number(s.smallCount)&&(e=Number(e)+Number(s.smallCount),e=e.toFixed(0));return{big:t,small:e}},selectAllPrice(){let t=0;if(this.selectList)for(const i of this.selectList)0==this.cgUnitType?i.aboutPrice&&1==i.aboutPrice?t+=Number(i.totalPrice):t+=Number(i.userPrice)*Number(i.bigCount):i.aboutPrice&&1==i.aboutPrice?t+=Number(i.totalPrice):t+=Number(i.userPrice)*Number(i.smallCount);let e=t.toFixed(2);e=parseFloat(e),this.modifyPrice=e;let s=t.toFixed(2);return s=parseFloat(s),s},calcTotalWeight(){let t=0;if(this.selectList)for(const s of this.selectList)t+=Number(s.weight)*Number(s.bigCount);let e=t.toFixed(2);return e},totalPrice(){let t=Number(this.selectAllPrice);Number(this.form.packingCharge)>0&&(t=Number(t)+Number(this.form.packingCharge)),1==this.form.yfPayWay&&(Number(this.form.shortCharge)>0&&(t=Number(t)+Number(this.form.shortCharge)),Number(this.form.longCharge)>0&&(t=Number(t)+Number(this.form.longCharge)));let e=t.toFixed(2);return e}},created(){},mounted(){if(this.$route.query.ghsId&&this.$route.query.ghsName){let t=this.$route.query.ghsId,e=this.$route.query.ghsName;this.beginSelect(t,e)}this.location=this.$route.query.location?this.$route.query.location:0,1==this.location&&(this.form.needPrint=1),0==this.form.ghsId&&this.$nextTick(()=>{this.$refs.ghsRef.focus()});let t=this;document.onkeydown=function(e){if(console.log(e),e&&"Enter"==e.key&&e.ctrlKey&&e.altKey&&(1==t.showCommitPop?t.diffConfirm():t.$message({message:"不在结算页",type:"warning"})),e&&"Enter"==e.key&&e.ctrlKey&&(1==t.showCommitPop?t.createOrder():t.$message({message:"不在结算页",type:"warning"})),e&&e.key&&"c"==e.key.toLowerCase()&&e.ctrlKey&&t.$refs["ghsRef"].focus(),e&&e.key&&"q"==e.key.toLowerCase()&&e.ctrlKey&&t.$refs["itemSearchRef"].focus(),e&&"ArrowUp"==e.key&&t.goUp(),e&&"ArrowDown"==e.key&&t.goDown(),e&&"Delete"==e.key&&t.selectList[t.selectIndex]){let e=t.selectList[t.selectIndex];t.delItem(e)}if(e&&"PageDown"==e.key&&t.removeFromSave(),e&&"Escape"==e.key&&(t.showCommitPop&&(t.showCommitPop=!1,t.backToSearchItem()),"confirmPriceNum"==t.desk&&(t.desk="selectedList",t.$refs["itemSearchRef"].focus())),e&&e.key&&"/"==e.key.toLowerCase()&&e.ctrlKey){if(t.$util.isEmpty(t.selectList))return void t.$message({message:"请选择花材",type:"warning"});t.$refs["itemSearchRef"].blur(),t.showCommitPop=!0}e&&"F8"==e.key&&t.$nextTick(()=>{t.$refs.remarkRef.focus()})},this.$service.common.shopInfo().then(e=>{t.currentShop=e.shopInfo,t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list}),t.cgUnitType=e.shopInfo.cgUnitType?e.shopInfo.cgUnitType:0}),this.$service.itemClass.getAllClassIndex().then(t=>{this.classList=t}),this.$service.shopExt.getPrintFn().then(e=>{e.wcPrintNum&&Number(e.wcPrintNum)>1&&(2==Number(e.wcPrintNum)&&(t.wcPrintList=[{name:"机1",id:1},{name:"机2",id:2}]),3==Number(e.wcPrintNum)&&(t.wcPrintList=[{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3}]),4==Number(e.wcPrintNum)&&(t.wcPrintList=[{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3},{name:"机4",id:4}]),5==Number(e.wcPrintNum)&&(t.wcPrintList=[{name:"机1",id:1},{name:"机2",id:2},{name:"机3",id:3},{name:"机4",id:4},{name:"机5",id:5}]))})},methods:{getGhsBlur(){this.selectGhsName=this.$refs.ghsRef.selectedLabel},addGhs(){if(this.$util.isEmpty(this.selectGhsName))return this.$message({message:"请填写名称",type:"warning"}),!1;this.$confirm("确认添加?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.ghs.add({name:this.selectGhsName,location:this.location,mobile:""}).then(t=>{this.$notify({title:"成功",message:"添加成功",type:"success"}),this.$refs.ghsRef.focus()})})},inputFn(t){let e=Number(this.selectAllPrice);Number(this.form.packingCharge)>0&&(e=Number(e)+Number(this.form.packingCharge)),1==this.form.yfPayWay&&(Number(this.form.shortCharge)>0&&(e=Number(e)+Number(this.form.shortCharge)),Number(this.form.longCharge)>0&&(e=Number(e)+Number(this.form.longCharge))),this.modifyPrice=e.toFixed(2);let s=Number(this.form.packingCharge)>0?Number(this.form.packingCharge):0,i=Number(this.form.longCharge)>0?Number(this.form.longCharge):0,a=Number(this.form.shortCharge)>0?Number(this.form.shortCharge):0,r=Number(this.form.localCharge)>0?Number(this.form.localCharge):0,o=Number(this.form.pickCharge)>0?Number(this.form.pickCharge):0;this.totalFreight=(s+i+a+r+o).toFixed(2),this.perKgFreight=(this.totalFreight/this.calcTotalWeight).toFixed(2)},changeYfPayWay(t){this.form.yfPayWay=t,this.inputFn()},hitPlay(){const t=this.$refs.hitPlay;t.play()},noStockPlay(){const t=this.$refs.noStockPlay;t.play()},successPlay(){const t=this.$refs.successPlay;t.play()},delItem(t){let e=this;e.$refs["itemSearchRef"].blur(),e.$confirm("确定删除 "+t.name+"?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.bigCount=0,t.smallCount=0,e.replaceItemFn(t,1,"sub"),e.selectIndex=0,e.$refs.singleTable.setCurrentRow(e.selectList[0]),setTimeout((function(){e.$refs["itemSearchRef"].focus()}),900)}).catch(()=>{e.$refs["itemSearchRef"].focus()})},changeCgStaff(t){this.form.cgStaffId=t.id,this.form.cgStaffName=t.name},setTransType(t){this.form.transType=t},commitOrder(){let t=this;t.$util.isEmpty(t.selectList)?t.$message({message:"请选择花材",type:"warning"}):(t.$refs["itemSearchRef"].blur(),t.showCommitPop=!0)},comeBack(){let t={};this.$router.push({path:"/in/add",query:t})},selectGhsFn(t){t.id&&t.name&&this.beginSelect(t.id,t.name)},beginSelect(t,e){let s=this;s.TT=setTimeout((function(){s.desk="selectedList"}),2300),this.form.ghsId=t,this.form.ghsName=e,this.selectJobId=t,this.getFromStorage(!1),this.$nextTick(()=>{this.$refs["itemSearchRef"].focus()})},selectGhsInfo(t){let e=this;""!==t?(this.loading=!0,this.$service.ghs.list({name:t}).then(t=>{e.loading=!1,e.customInfoList=t.list})):this.customInfoList=[]},diffConfirm(){this.form.dealPrice=1,this.createOrder()},createOrder(){let t=this;if(0==this.form.ghsId)return this.$message({message:"请选择供货商",type:"warning"}),!1;let e=this.form;const s=this.selectList.map(t=>({classId:t.classId,productId:t.id,bigNum:t.bigCount,smallNum:t.smallCount,itemId:t.itemId,itemPrice:t.userPrice,ratio:t.ratio,ratioType:t.ratioType,aboutPrice:t.aboutPrice,totalPrice:t.totalPrice,assignSeat:t.assignSeat}));if(e.itemInfo=JSON.stringify(s),Number(this.modifyPrice)<=0)return this.$message({message:"应付金额要大于0",type:"warning"}),!1;let i={...e,modifyPrice:this.modifyPrice,cgModel:0,inType:0};this.$confirm("确认提交","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.$service.purchaseOrder.createOrder(i).then(e=>{t.$nextTick(()=>{t.selectList=[],t.successPlay(),t.removeFromSaveDirect(),t.showCommitPop=!1,t.$notify({title:"成功",message:"操作成功",type:"success"}),t.backToSearchItem(),setTimeout((function(){t.goChangePrice(e)}),900)})})})},goChangePrice(t){let e={};e.orderSn=t.orderSn,e.id=t.id,e.backType="add",this.$router.push({path:"/in/change",query:e})},formReset(){this.form.ghsId=0,this.form.ghsName="",this.$nextTick(()=>{this.$refs.ghsRef.focus()})},clearSeachVal(){this.searchVal="",this.getItemList=[]},beginSearchItem(){let t=this;null!=this.t&&clearTimeout(this.t),null!=this.TT&&clearTimeout(this.TT),this.t=setTimeout((function(){t.searchItemFn()}),250)},sorts_fun(t){return function(e,s){var i=e[t],a=s[t];return i-a}},async searchItemFn(){if(""==this.searchVal)return this.getItemList=[],this.getIndex=0,void(this.desk="selectedList");let t=this;this.getItemList=[],this.getIndex=0,this.searchOldVal=this.searchVal,this.desk="searchList";let e=[];await this.$service.item.getItemList({search:this.searchVal,requestType:"cg",pageSize:20}).then(s=>{let i=this.$util.copyObject(s.list);if(!t.$util.isEmpty(i)){i=i.sort(this.sorts_fun("classId"));const s=i.map(s=>{let i="-";if(e[s.classId]);else{let t=this.classList[s.classId]?this.classList[s.classId]:null;i=t.name?t.name:"",e[s.classId]=1}let a=0;return t.selectListIndex[s.id]&&(a=0==t.cgUnitType?t.selectListIndex[s.id].bigCount?Number(t.selectListIndex[s.id].bigCount):0:t.selectListIndex[s.id].smallCount?Number(t.selectListIndex[s.id].smallCount):0),{...s,className:i,selectedNum:a}});t.showGetItemList=!0,t.getItemList=s}}),t.$util.isEmpty(t.getItemList)||t.$refs.showItemRef.setCurrentRow(t.getItemList[0])},pickModifyItem(t){this.changeType="update",this.customData.assignSeat=t.assignSeat&&"0"==t.assignSeat?"0":"1",this.selectCurrentItem(t)},pickAddItem(t){this.changeType="add",this.customData.assignSeat="1",this.selectCurrentItem(t)},pickAddCurrentItem(){if("searchList"==this.desk&&(this.changeType="add",this.getItemList[this.getIndex])){let t=this.getItemList[this.getIndex];this.selectCurrentItem(t)}if("selectedList"==this.desk&&this.selectList[this.selectIndex]){let t=this.selectList[this.selectIndex];this.pickModifyItem(t)}},selectCurrentItem(t){this.currentItem=t,0==this.cgUnitType?this.customData.bigCount=t.bigCount>0?t.bigCount:1:this.customData.smallCount=t.smallCount>0?t.smallCount:1,this.customData.aboutPrice=t.aboutPrice?t.aboutPrice:0;let e=0;t.userPrice&&Number(t.userPrice)>0?e=t.userPrice:t.price&&Number(t.price)>0&&(e=t.price),this.customData.userPrice=parseFloat(e);let s=0;t.totalPrice&&Number(t.totalPrice)>0?this.customData.totalPrice=Number(t.totalPrice):(s=0==this.cgUnitType?Number(this.customData.bigCount)*Number(this.customData.userPrice):Number(this.customData.smallCount)*Number(this.customData.userPrice),s=parseFloat(s.toFixed(2)),this.customData.totalPrice=s),this.desk="confirmPriceNum",this.showGetItemList=!1,this.showConfirmNum=!0,this.$nextTick(()=>{this.$refs["countInput"].focus(),this.$refs["countInput"].select()})},totalPriceChange(){if(Number(this.customData.totalPrice)>0)if(0==this.cgUnitType){if(Number(this.customData.bigCount)>0){let t=Number(this.customData.totalPrice)/Number(this.customData.bigCount);this.customData.userPrice=Math.floor(100*t)/100;let e=Number(this.customData.userPrice)*Number(this.customData.bigCount);e=parseFloat(e.toFixed(2)),Number(this.customData.totalPrice)>Number(e)?this.customData.aboutPrice=1:this.customData.aboutPrice=0}}else if(Number(this.customData.smallCount)>0){let t=Number(this.customData.totalPrice)/Number(this.customData.smallCount);this.customData.userPrice=Math.floor(100*t)/100;let e=Number(this.customData.userPrice)*Number(this.customData.smallCount);e=parseFloat(e.toFixed(2)),Number(this.customData.totalPrice)>Number(e)?this.customData.aboutPrice=1:this.customData.aboutPrice=0}},userPriceChange(){Number(this.customData.userPrice)>0&&(0==this.cgUnitType?Number(this.customData.bigCount)>0&&(this.customData.totalPrice=Number(this.customData.bigCount)*Number(this.customData.userPrice),this.customData.totalPrice=parseFloat(this.customData.totalPrice.toFixed(2))):Number(this.customData.smallCount)>0&&(this.customData.totalPrice=Number(this.customData.smallCount)*Number(this.customData.userPrice),this.customData.totalPrice=parseFloat(this.customData.totalPrice.toFixed(2))))},bigCountChange(){Number(this.customData.bigCount)>0&&Number(this.customData.userPrice)>0&&(this.customData.totalPrice=Number(this.customData.bigCount)*Number(this.customData.userPrice),this.customData.totalPrice=parseFloat(this.customData.totalPrice.toFixed(2)))},smallCountChange(){Number(this.customData.smallCount)>0&&Number(this.customData.userPrice)>0&&(this.customData.totalPrice=Number(this.customData.smallCount)*Number(this.customData.userPrice),this.customData.totalPrice=parseFloat(this.customData.totalPrice.toFixed(2)))},confirmNumPrice(){let t=this.currentItem;Number(this.customData.bigCount)<=0&&Number(this.customData.smallCount)<=0?this.$message({message:"请填写数量",type:"warning"}):Number(this.customData.userPrice)<=0?this.$message({message:"请填写金额",type:"warning"}):Number(this.customData.totalPrice)<=0?this.$message({message:"总金额错误",type:"warning"}):(t={...t,bigCount:this.customData.bigCount,userPrice:this.customData.userPrice,smallCount:this.customData.smallCount,totalPrice:this.customData.totalPrice,aboutPrice:this.customData.aboutPrice,assignSeat:this.customData.assignSeat},this.replaceItemFn(t,1,"add"),this.backToSearchItem())},backToSearchItem(){this.desk="selectedList",this.selectList[0]&&(this.selectIndex=0,this.$refs.singleTable.setCurrentRow(this.selectList[0])),this.searchVal="",this.customInfoList=[],this.getItemList=[],this.currentItem={},this.showConfirmNum=!1,this.$nextTick(()=>{this.$refs["itemSearchRef"].focus()})},backspaceFun(t){switch(t){case"big":this.big=null;break;case"price":this.price=null;break}},amendPrice(){if(""==this.priceAmend)return void this.$message({message:"请输入大于0的值",type:"warning"});let t=this.selectList[this.selectIndex];this.selectList[this.selectIndex].price=this.priceAmend;let e=Number(t.price)*(Number(t.big)+Number(t.small)/Number(t.ratio));this.selectList[this.selectIndex].money=e,this.selectList[this.selectIndex].totalMoney=e.toFixed(2),this.priceAmend=0,this.backToSearchItem()},goDown(){if("searchList"==this.desk){let t=this.getItemList.length-1;t==this.getIndex?this.getIndex=t:this.getIndex++,this.$refs.showItemRef.setCurrentRow(this.getItemList[this.getIndex])}if("selectedList"==this.desk){let t=this.selectList.length-1;t==this.selectIndex?this.selectIndex=t:this.selectIndex++,this.$refs.singleTable.setCurrentRow(this.selectList[this.selectIndex])}},goUp(){"searchList"==this.desk&&(0==this.getIndex?this.getIndex=0:this.getIndex--,this.$refs.showItemRef.setCurrentRow(this.getItemList[this.getIndex])),"selectedList"==this.desk&&(0==this.selectIndex?this.selectIndex=0:this.selectIndex--,this.$refs.singleTable.setCurrentRow(this.selectList[this.selectIndex]))},freightInput(){this.totalMoney=Number(this.freight)+this.number,this.modifyPrice=Number(this.freight)+this.number}}},l=n,c=(s("15d3"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,null,null);e["default"]=u.exports},"5ac3":function(t,e,s){"use strict";s("36e1")},"5b4b":function(t,e,s){"use strict";s("acaf")},"5d1d":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-order-debt",fn:function({scope:s}){return[e("el-radio-group",{staticStyle:{"margin-right":"20px","padding-top":"6px","margin-left":"20px"},on:{change:t.changeDebt},model:{value:t.debt,callback:function(e){t.debt=e},expression:"debt"}},[e("el-radio",{attrs:{label:"-1"}},[t._v("全部")]),e("el-radio",{attrs:{label:"1"}},[t._v("待结款")]),e("el-radio",{attrs:{label:"0"}},[t._v("已结款")])],1)]}},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("累计金额:"+t._s(t.totalAmount))])]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportDue()}}},[t._v("导出数据")])]},proxy:!0}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,debt:"-1"}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportDue(){this.$service.order.getAccountList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.order.getAccountList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt}).then(t=>(this.totalAmount=t.totalAmount?t.totalAmount:0,{list:t.list}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"名称",prop:"name",align:"center"},{label:"订单数",prop:"num",align:"center"},{label:"金额",prop:"amount",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","flex1","slot-export-due","refresh-btn"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getSearchDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})},changeDebt(t){this.debt=t,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})}}},n=o,l=(s("d7e6"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"ea3fe634",null);e["default"]=c.exports},"5d31":function(t,e,s){},"5d48":function(t,e,s){"use strict";s("ddca")},"5e36":function(t,e,s){"use strict";s("2a54")},"5ea8":function(t,e,s){},"5f96":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGMAAABjBAMAAAB9FaOmAAAAJ1BMVEVHcEz/KED/KEL/KUL/J0L/KEL//P3/v8T/p63/ZXP/4eP/QVX/h5Jt957AAAAABXRSTlMAIN+Qj+jKzykAAALZSURBVFjD3Za9btswEMedNyjyBF2y9xH6CAVaQqLl+SgLWUXb7SylcbLKCIquYT7Q1agrdFWApn2oHPVhW7JD3q314EHQzz/en7wzR6fi9c+n0dHPyZmDeX+c+f81kq/JM8nVlPE4Y2r+GJ2yNBuRlFCwqsnncWQyVmgB3GI1nNAqgYVIjmaiRKAmj99uGRqdlgDq1yYla6JAmVmCISRroibKK63QFEJ+3j5659ZMdPLXYDXTfCrNonn20a2BJCsVJnaDe/kTUopmXkRmESiR2315TkmaqlTjbBZCvS9rSjVhbNJVJvLpdvu9GgkYVxFCsTtlXs2mkirSDyIyVnMhSNXIRa7WolSoCbvMPKFNNFQoSctC5EqRNOPkClu5flcXmqQJK2ElzaQJVFRRqukktWh+TjpprWR593U5gykptFpyJZYA8EPfUqqpJZOkEjKBKiCFJu/s9xPuzuNqKmih1ccx0rH4LKGgaZrlXZv7vCBrmgxCAxlHExmThia5zumaMsZfDzBmJSEjaWy/6FSq7/+qVUzrmzGee9QYDC/IaO0ZXSg7OJ/S/oh3V6OtJjjvIx+c1dhs9aIZs/LBjfQ0zcpW3b/aa8hOg0nH9dzB3fntQraaL5j0o5VMcUzllQvpNBDXRxQPDQ5DU7iQrm/abbd7GULiXFjXN/fN/ABbfD3YHch+3wiNfzYWdC9sv2+ek6J+3XIuZNc3z7agrcaFtBppYCHa1y3nQlrNJLlsLimtxom0B7o9KPZ1LzK42aDGu7DBzSaEG1/5hxrwhXxEU/iRgeZSEJAjt04fcuRy60UONV7kUONHDjR+5EBDQIYaAjLUUJCBhoIMNCSkryEhfQ0N6WloSE9DRPY1RGRfQ0X2NFRkT0NGdhoystPQka2Gjmw1DKTTMJBOw0FaDQdpNSyk0bCQRsNDag0PqTVMxGqYiNVwEdRwEdSwkZMzNjI65SMnb9nI6M0LoRHZlCgqn5wAAAAASUVORK5CYII="},6133:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"system-task"},[e("el-row",{staticClass:"box",attrs:{type:"flex",gutter:10}},[t._l(t.list,(function(s,i){return e("el-col",{key:i},[e("div",{staticClass:"block",class:["_"+s.key]},[e("div",{staticClass:"header"},[e("i",{staticClass:"icon",class:s.icon}),e("span",{staticClass:"label"},[t._v(t._s(s.label))]),e("span",{staticClass:"num"},[t._v("("+t._s(s.pagination.total)+")")]),e("span",{staticClass:"flex1"}),e("ul",{staticClass:"op-btn"},[s.loading?e("li",[e("i",{staticClass:"el-icon-loading"})]):e("li",{directives:[{name:"permission",rawName:"v-permission",value:t.perm.delete,expression:"perm.delete"}],staticClass:"refresh-btn",on:{click:function(e){return t.refreshTask({page:1})}}},[e("i",{staticClass:"el-icon-refresh"}),e("span",[t._v("刷新")])]),e("li",{directives:[{name:"permission",rawName:"v-permission",value:t.perm.add,expression:"perm.add"}],staticClass:"add-btn",on:{click:function(e){return t.edit(s.params)}}},[e("i",{staticClass:"el-icon-plus"}),e("span",[t._v("添加")])])])]),e("div",{staticClass:"container scroller1"},[e("draggable",t._b({attrs:{tag:"ul","data-type":s.params.type,"data-status":s.params.status},on:{end:e=>t.onDragEnd(e,s)},model:{value:t.list[i].list,callback:function(e){t.$set(t.list[i],"list",e)},expression:"list[index].list"}},"draggable",t.drag.options,!1),[t._l(t.list[i].list,(function(s){return e("li",{key:s.id,staticClass:"_drag",attrs:{"data-id":s.id},on:{contextmenu:function(e){return e.stopPropagation(),e.preventDefault(),t.openCM(e,s)}}},[e("div",{staticClass:"h"},[e("span",{directives:[{name:"show",rawName:"v-show",value:0===s.status,expression:"item2.status === 0"}],staticClass:"type _warning"},[t._v(t._s(t._f("task_type")(s.type)))]),e("span",{staticClass:"name"},[t._v(t._s(s.name)+" ")])]),e("div",{staticClass:"remark"},[t._v(t._s(s.remark))]),e("div",{staticClass:"f"},[s.status?[e("span",{staticClass:"date"},[t._v(t._s(s.nextRunTime||"..."))]),e("span",{staticClass:"start"},[t._v("进行中")])]:[e("span",[t._v("...")]),e("span",{staticClass:"stop"},[t._v("已停止")])]],2),e("el-row",{staticClass:"op",attrs:{type:"flex"}},[0===s.status?e("el-col",{nativeOn:{click:function(e){return t.start(s)}}},[e("i",{staticClass:"el-icon-video-play"}),e("span",[t._v("开始")])]):e("el-col",{directives:[{name:"permission",rawName:"v-permission",value:t.perm.stop,expression:"perm.stop"}],nativeOn:{click:function(e){return t.stop(s)}}},[e("i",{staticClass:"el-icon-video-pause"}),e("span",[t._v("暂停")])]),e("el-col",{directives:[{name:"permission",rawName:"v-permission",value:{and:[t.perm.update,t.perm.info]},expression:"{\n\t\t\t\t\t\t\t\t\t\tand: [perm.update, perm.info]\n\t\t\t\t\t\t\t\t\t}"}],nativeOn:{click:function(e){return t.edit(s)}}},[e("i",{staticClass:"el-icon-edit"}),e("span",[t._v("编辑")])]),e("el-col",{directives:[{name:"permission",rawName:"v-permission",value:t.perm.log,expression:"perm.log"}],nativeOn:{click:function(e){return t.findLog(s)}}},[e("i",{staticClass:"el-icon-tickets"}),e("span",[t._v("查看日志")])])],1)],1)})),0==t.list[i].list.length?e("li",[e("div",{staticClass:"empty"},[t._v("暂无数据")])]):t._e()],2),s.pagination.total>=s.pagination.size?e("el-button",{staticClass:"more",attrs:{type:"text",size:"mini"},on:{click:function(e){return t.moreTask(i,s)}}},[t._v("查看更多")]):t._e()],1),e("div",{staticClass:"footer"},[e("button",{directives:[{name:"permission",rawName:"v-permission",value:t.perm.add,expression:"perm.add"}],staticClass:"btn-add",on:{click:function(e){return t.edit(s.params)}}},[e("i",{staticClass:"el-icon-plus"})])])])])})),e("el-col",{directives:[{name:"permission",rawName:"v-permission",value:t.perm.log,expression:"perm.log"}]},[e("div",{staticClass:"block _log"},[e("div",{staticClass:"header"},[e("span",{staticClass:"label"},[t._v("日志")]),e("span",{staticClass:"num"},[t._v("("+t._s(t.logs.pagination.total)+")")]),e("span",{staticClass:"flex1"}),e("el-checkbox-group",{staticClass:"status",on:{change:t.filterLog},model:{value:t.logs.filters.status,callback:function(e){t.$set(t.logs.filters,"status",e)},expression:"logs.filters.status"}},[e("el-checkbox",{attrs:{label:0}},[t._v("异常")])],1),e("ul",{staticClass:"op-btn"},[e("li",{on:{click:function(e){return t.refreshLog({page:1})}}},[e("i",{staticClass:"el-icon-refresh"}),e("span",[t._v("刷新")])]),t.logs.current?e("li",{staticClass:"_current-log",on:{click:t.allLog}},[e("span",[t._v(t._s(t.logs.current.name))]),e("i",{staticClass:"el-icon-close"})]):t._e()])],1),e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.logs.loading,expression:"logs.loading"}],staticClass:"container",attrs:{"element-loading-text":"拼命加载中"}},[e("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.moreLog,expression:"moreLog"}],staticClass:"_scroller"},[t._l(t.logs.list,(function(s,i){return e("li",{key:i,class:{_error:0==s.status},on:{click:function(e){return t.expandLog(s)}}},[e("div",{staticClass:"h"},[e("span",{staticClass:"name"},[t._v(t._s(i+1)+" · "+t._s(s.taskName))])]),e("div",{staticClass:"remark",class:{_ellipsis:!s._expand}},[t._v(" "+t._s(s.detail||"...")+" ")]),e("div",{staticClass:"f"},[e("span",[t._v("执行时间:"+t._s(s.createTime))])])])})),0==t.logs.list.length?e("li",[e("div",{staticClass:"empty"},[t._v("暂无数据")])]):t._e()],2)])])])],2),e("cl-context-menu",{ref:"context-menu"}),e("x-form",{ref:"x-form"})],1)},a=[],r=(s("8f26"),s("a3ff"),s("666b"),s("963e"),s("67dc")),o=s.n(r),n=s("c081"),l={name:"system-task",components:{draggable:o.a},data(){return{list:[{key:"sys",label:"系统任务",icon:"el-icon-s-tools",list:[],loading:!1,params:{type:0,status:1},pagination:{size:10,page:1,total:0}},{key:"user",label:"用户自定义任务",icon:"el-icon-user-solid",list:[],loading:!1,params:{type:1,status:1},pagination:{size:10,page:1,total:0}},{key:"stop",label:"已停止任务",list:[],loading:!1,params:{type:null,status:0},pagination:{size:10,page:1,total:0}}],logs:{loading:!1,list:[],pagination:{size:10,page:1},params:{},filters:{status:[]},current:null},drag:{options:{group:"Task",animation:300,ghostClass:"Ghost",dragClass:"Drag",draggable:"._drag"}}}},filters:{task_type(t){return 0===t?"系统":"用户"}},mounted(){this.refreshTask({page:1})},computed:{perm(){return this.$service.system.task.permission}},methods:{onDragEnd({to:t,item:e}){const s=t.getAttribute("data-status"),i=t.getAttribute("data-type"),a=e.getAttribute("data-id");0==s&&this.stop({id:a}),1==s&&this.start({id:a,type:i})},openCM(t,{id:e,status:s,type:i,name:a}){let r=[{label:"立即执行",perm:["once"],"suffix-icon":"el-icon-video-play",callback:(t,s)=>{this.once({id:e}),s()}},{label:"编辑",perm:["update","info"],"suffix-icon":"el-icon-edit",callback:(t,s)=>{this.edit({id:e,type:i}),s()}},{label:"删除",perm:["_delete"],"suffix-icon":"el-icon-delete",callback:(t,s)=>{this.delete({id:e}),s()}},{label:"查看日志",perm:["log"],"suffix-icon":"el-icon-tickets",callback:(t,s)=>{this.findLog({id:e,name:a}),s()}}];return 1==s?r.splice(1,0,{label:"暂停",perm:["stop"],"suffix-icon":"el-icon-video-pause",callback:(t,s)=>{this.stop({id:e,type:i}),s()}}):r.splice(1,0,{label:"开始",perm:["start"],"suffix-icon":"el-icon-video-play",callback:(t,s)=>{this.start({id:e,type:i}),s()}}),this.$refs["context-menu"].open(t,{list:r.filter(t=>Object(n["checkPerm"])({and:t.perm.map(t=>this.perm[t])}))}),!1},async edit(t){const{id:e,type:s}=t||{};let i={type:s};e&&(i=await this.$service.system.task.info({id:e})),i.every&&(i.every/=1e3),i.limit||(i.limit=void 0);const a=!i.taskType,r=this.$refs["x-form"].open({props:{title:"编辑任务",width:"600px","label-width":"80px"},items:[{label:"名称",prop:"name",value:i.name,component:{name:"el-input",attrs:{placeholder:"请输入名称"}},rules:{required:!0,message:"名称不能为空"}},{label:"类型",prop:"taskType",value:i.taskType||0,component:{name:"el-select",options:[{label:"cron",value:0},{label:"时间间隔",value:1}],on:{change:t=>{r.items.map(e=>{"cron"==e.prop&&(e.hidden=0!==t),["limit","every"].includes(e.prop)&&(e.hidden=1!==t,e.value||(r[e.prop]=void 0))})}}}},{label:"cron",prop:"cron",hidden:!a,value:i.cron,component:{name:"el-input",attrs:{placeholder:"* * * * * *"}},rules:{required:!0,message:"cron不能为空"}},{label:"次数",prop:"limit",value:i.limit,hidden:a,component:{name:"el-input-number",props:{min:1,max:1e4}}},{label:"间隔(秒)",prop:"every",value:i.every,hidden:a,component:{name:"el-input-number",props:{min:1,max:1e8}},rules:{required:!0,message:"执行间隔不能为空"}},{label:"service",prop:"service",value:i.service,component:{name:"el-input",attrs:{placeholder:"sys.test.add(params)"}}},{label:"开始时间",prop:"startDate",value:i.startDate,component:{name:"el-date-picker",props:{type:"datetime"}}},{label:"结束时间",prop:"endDate",value:i.endDate,component:{name:"el-date-picker",props:{type:"datetime"}}},{label:"备注",prop:"remark",value:i.remark,component:{name:"el-input",props:{type:"textarea"}}},{label:"状态",prop:"status",value:0===i.status?0:1,component:{name:"el-radio-group",options:[{label:"停止",value:0},{label:"运行",value:1}]}}],on:{submit:({data:t,close:s,done:a})=>{t.limit||(t.limit=null),this.$service.system.task[e?"update":"add"]({...i,...t,every:1e3*t.every}).then(()=>{this.refreshTask(),this.$message.success("保存成功"),s()}).catch(t=>{this.$message.error(t),a()})}}})},delete({id:t}){this.$confirm("此操作将永久删除该数据,是否继续?","提示",{type:"warning"}).then(()=>{this.$service.system.task.delete({ids:t}).then(()=>{this.refreshTask()})}).catch(()=>{})},start({id:t,type:e}){this.$service.system.task.start({id:t,type:e}).then(()=>{this.refreshTask()}).catch(t=>{this.$message.error(t)})},stop({id:t}){this.$service.system.task.stop({id:t}).then(()=>{this.refreshTask()}).catch(t=>{this.$message.error(t)})},once({id:t}){this.$service.system.task.once({id:t}).then(()=>{this.refreshTask()}).catch(t=>{this.$message.error(t)})},expandLog(t){this.$set(t,"_expand",!t._expand)},refreshTask(t,e){const{index:s,more:i}=e||{},a=void 0===s||null===s?this.list.map((t,e)=>e):[s];a.forEach(async e=>{let s=this.list[e];Object.assign(s.params,{...s.pagination,...t}),this.$set(s,"loading",!0);let a=await this.$service.system.task.page(s.params);n["utils"].moreList(a,s),i||this.$el.querySelector(`.block._${s.key} .container`).scroll(0,0),s.loading=!1})},moreTask(t){this.refreshTask(null,{index:t,more:!0})},async refreshLog(t,e){if(this.logs.loading)return!1;if(!Object(n["checkPerm"])(this.perm.log))return!1;const{params:s,pagination:i}=this.logs,{more:a}=e||{};Object.assign(s,{...i,...t}),this.logs.loading=!0;let r=await this.$service.system.task.log(s);n["utils"].moreList(r,this.logs),a||this.$el.querySelector(".block._log .container ul").scroll(0,0),this.logs.loading=!1},moreLog(){this.refreshLog(null,{more:!0})},findLog(t){this.logs.current=t,this.refreshLog({page:1,id:t.id})},allLog(){this.logs.current=null,this.refreshLog({page:1,id:null})},filterLog([t]){this.refreshLog({page:1,status:void 0===t?1:0})}}},c=l,u=(s("2f11"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"30669648",null);e["default"]=d.exports},"62b3":function(t,e,s){},6331:function(t,e,s){},"63db":function(t,e,s){"use strict";s("67ea")},"63e8":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap order-list-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:`${t.text}(${t.val})`,name:t.key}})})),1)]},proxy:!0},{key:"slot-column-option",fn:function({scope:t}){}},{key:"slot-search-date",fn:function({scope:s}){return[e("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":t.pickerOptions},on:{change:function(e){return t.changeDate()}},model:{value:t.searchDate,callback:function(e){t.searchDate=e},expression:"searchDate"}})]}},{key:"slot-add-goods-btn",fn:function(){return[e("el-popover",{ref:"directPrintRef",staticStyle:{"margin-left":"40px"},attrs:{placement:"top",width:"160"}},[e("p",[t._v("确认打印?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){return e.stopPropagation(),t.cancelDirectPrint()}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.printOrder(1)}}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("直接打A4")])],1),e("el-button",{staticStyle:{"margin-left":"40px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.printOrder(0)}}},[t._v("打A4")]),e("el-popover",{ref:"littlePrintRef",staticStyle:{"margin-left":"40px"},attrs:{placement:"top",width:"160"}},[e("p",[t._v("确认打印?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){return e.stopPropagation(),t.cancelLittlePrint()}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return e.stopPropagation(),t.littlePrintOrder(0)}}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("打小票")])],1)]},proxy:!0}])})],1)},a=[],r=s("db7f"),o=s("1635"),n=(s("f4c5"),s("54a1")),l={components:{SelOrder:r["default"],OrderDetail:o["default"]},data(){return{pickerOptions:{shortcuts:[{text:"今天",onClick(t){const e=new Date,s=new Date;t.$emit("pick",[s,e])}},{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},searchDate:[],app:null,tabIndex:"0",tabsData:[{text:"全部",key:"0",val:0}],optionData:{},searchTime:"today",startDate:"",endDate:"",printData:{}}},created(){this.init()},methods:{cancelLittlePrint(){this.$refs["littlePrintRef"].doClose()},littlePrintOrder(){},init(){},cancelDirectPrint(){this.$refs["directPrintRef"].doClose()},cancelPrint(){this.$refs["printRef"].doClose()},printOrder(t){var e=new n["hiprint"].PrintTemplate({template:{panels:[{index:0,name:1,height:297,width:210,paperHeader:49.5,paperFooter:780,printElements:[{options:{left:175.5,top:15,height:27,width:259,fontSize:19,fontWeight:"600",textAlign:"center",lineHeight:26,coordinateSync:!1,widthHeightSync:!0,draggable:!1,qrCodeLevel:0,field:"title",testData:"花大苪预订单",hideTitle:!0,title:"自定义文本"},printElementType:{title:"自定义文本",type:"text"}},{options:{left:30,top:62.5,height:56,width:538,field:"table",coordinateSync:!1,widthHeightSync:!1,fontSize:14,lineHeight:24,tableBorder:"border",tableHeaderBorder:"border",tableHeaderCellBorder:"border",tableHeaderFontWeight:"bold",right:578.25,bottom:263,vCenter:302.25,hCenter:163,columns:[[{width:93.32065807548679,title:"日期",field:"shortTime",checked:!0,columnId:"shortTime",fixed:!1,rowspan:1,colspan:1,align:"center",tableQRCodeLevel:0,tableSummaryTitle:!0,tableSummary:""},{width:169.80366172178827,title:"名称",field:"name",checked:!0,columnId:"name",fixed:!1,rowspan:1,colspan:1,align:"center",tableQRCodeLevel:0,tableSummaryTitle:!0,tableSummary:""},{width:85.0130090093881,title:"预订数",field:"num",checked:!0,columnId:"num",fixed:!1,rowspan:1,colspan:1,align:"center",tableQRCodeLevel:0,tableSummaryTitle:!0,tableSummary:""},{width:74.09275968851016,title:"库存",field:"stock",checked:!0,columnId:"stock",fixed:!1,rowspan:1,colspan:1,align:"center",tableQRCodeLevel:0,tableSummaryTitle:!0,tableSummary:""},{width:115.76991150482667,title:"备注",field:"remark",checked:!0,columnId:"remark",fixed:!1,rowspan:1,colspan:1,align:"center",tableQRCodeLevel:0,tableSummaryTitle:!0,tableSummary:""},{width:276,title:"金额\n",field:"amount",checked:!1,columnId:"amount",fixed:!1,rowspan:1,colspan:1,tableQRCodeLevel:0,tableSummaryTitle:!0,tableSummary:""},{width:100,title:"",field:"",checked:!1,columnId:"",fixed:!1,rowspan:1,colspan:1},{width:100,title:"",field:"",checked:!1,columnId:"",fixed:!1,rowspan:1,colspan:1}]]},printElementType:{title:"空白表格",type:"table",editable:!0,columnDisplayEditable:!0,columnDisplayIndexEditable:!0,columnTitleEditable:!0,columnResizable:!0,columnAlignEditable:!0,isEnableEditField:!0,isEnableContextMenu:!0,isEnableInsertRow:!0,isEnableDeleteRow:!0,isEnableInsertColumn:!0,isEnableDeleteColumn:!0,isEnableMergeCell:!0}},{options:{left:12,top:786,height:49,width:49},printElementType:{title:"html",type:"html"}},{options:{left:392.5,top:785,height:13,width:199,title:"销花宝提供技术支持",textAlign:"center",coordinateSync:!1,widthHeightSync:!1,qrCodeLevel:0,right:590.74609375,bottom:801.25,vCenter:491.24609375,hCenter:794.75},printElementType:{title:"自定义文本",type:"text"}}],paperNumberLeft:565.5,paperNumberTop:819,paperNumberContinue:!0,watermarkOptions:{content:"vue-plugin-hiprint",rotate:25,timestamp:!0,format:"YYYY-MM-DD HH:mm"},panelLayoutOptions:{}}]}});e.print(this.printData)},changeDate(){let t=this.searchDate[0]||"",e=this.searchDate[1]||"";return""==t?(this.$message.error("请选择开始时间"),!1):""!=e&&e<t?(this.$message.error("结束时间不能小于开始时间"),!1):(this.searchTime="custom",this.startDate=t,this.endDate=e,void this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:t,endTime:e}))},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.statBook).set("table",{columns:[{prop:"shortTime",label:"日期",align:"center",width:"280"},{prop:"name",label:"名称",align:"center",width:"300"},{prop:"num",label:"预订数量",align:"center",width:"220"},{prop:"stock",label:"库存",align:"center",width:"220"},{prop:"itemId",label:"花材编号",align:"center",width:"220"}],op:{visible:!0,props:{width:300,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-search-date","slot-add-goods-btn"],["data-table"],[]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.printData=s.printData}).done(),e.refresh({status:this.tabIndex,searchTime:this.searchTime})},onSongSuccess(){this.app.refresh()}}},c=l,u=(s("bfdc"),s("feb6"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"18797f64",null);e["default"]=d.exports},6511:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"home"},[e("div",{staticClass:"card pending-wrap"},[e("div",{staticClass:"card-title"},[t._v("待处理事务")]),e("div",{staticClass:"card-body"},[e("div",{staticClass:"pending-list-wrap"},t._l(t.pendingData,(function(s,i){return e("div",{key:i,staticClass:"list",on:{click:function(e){return t.$util.pageTo(s)}}},[e("span",[t._v(t._s(s.name))]),e("span",[t._v(t._s(s.val))])])})),0)])]),e("div",{staticClass:"card entry-wrap"},[e("div",{staticClass:"card-title"},[t._v("快捷操作")]),e("div",{staticClass:"card-body"},[e("div",{staticClass:"entry-list-wrap"},t._l(t.entryData,(function(s,i){return e("div",{key:i,staticClass:"list",on:{click:function(e){return t.fastDoFn(s)}}},[e("div",{staticClass:"icon-wrap"},[e("i",{staticClass:"iconfont",class:[s.icon]})]),e("div",[t._v(t._s(s.name))])])})),0)])])])},a=[],r=(s("b138"),s("a371")),o={components:{TrendEchart:r["default"]},data(){return{totalData:[{name:"收入",icon:"el-icon-s-marketing",val:"¥0.00",url:"/assets/list"},{name:"开单",icon:"el-icon-s-order",val:"¥0.00",url:"/order/list?status=-1"},{name:"访问",icon:"el-icon-s-data",val:0},{name:"新客",icon:"el-icon-s-custom",val:0,url:"/member/list"},{name:"支出",icon:"el-icon-s-marketing",val:"¥0.00",url:"/member/list?type=1"}],pendingData:[{name:"待付款订单",val:"",url:"/order/list?status=1"},{name:"待收货订单",val:"",url:"/order/list?status=3"},{name:"已完成订单",val:"",url:"/order/list?status=4"},{name:"待发货订单",val:"",url:"/order/list?status=2"},{name:"全部订单",val:"",url:"/order/list?status=0"}],entryData:[{name:"开单",icon:"icondingdanguanli",url:"/order/add"},{name:"订单列表",icon:"icondingdanguanli",url:"/order/list"},{name:"客户",icon:"iconkehuguanli",url:"/member/list"},{name:"新增采购",icon:"icondingdanguanli",url:"/in/add"},{name:"采购记录",icon:"icondingdanguanli",url:"/in/list"},{name:"供货商",icon:"iconkehuguanli",url:"/in/ghs"},{name:"花材",icon:"iconshangpinguanli",url:"/item/list"},{name:"员工",icon:"iconkehuguanli",url:"/staff/list"},{name:"门店",icon:"icondingdanguanli",url:"/shop/list"}],allTotalData:[{name:"总收入",val:10},{name:"总订单",val:10},{name:"客户数",val:10},{name:"总访问",val:10},{name:"花材数",val:10},{name:"总支出",val:10},{name:"总采购",val:10}],incomeData:{list:{}},visitorData:{list:{}},promptModal:!1,noticeData:[]}},mounted(){let t=this;document.onkeydown=function(e){if(console.log(e),e&&"Enter"==e.key&&e.ctrlKey&&(1==t.showCommitPop?t.createOrder():t.$message({message:"不在结算页",type:"warning"})),e&&","==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/order/add",query:e})}if(e&&"."==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/in/add",query:e})}},this.init()},methods:{init(){this.getData()},getData(){this.$service.workbench.index().then(t=>{if(this.$util.isEmpty(t))return!1;this.incomeData=t.incomeStat,this.visitorData=t.visitStat,this.noticeData=t.notice,t.notice.length&&(this.promptModal=!0),setTimeout(()=>{}),this.totalData[0].val="¥"+t.todayData.income,this.totalData[1].val=t.todayData.order,this.totalData[2].val=t.todayData.view,this.totalData[3].val=t.todayData.custom,this.totalData[4].val="¥"+t.todayData.expend,this.allTotalData[0].val=t.asset.totalIncome,this.allTotalData[1].val=t.asset.totalOrderNum,this.allTotalData[2].val=t.asset.totalUser,this.allTotalData[3].val=t.asset.totalView,this.allTotalData[4].val=t.asset.totalItem,this.allTotalData[5].val=t.asset.totalExpend,this.allTotalData[6].val=t.asset.totalPurchase})},initChart(){},noticeFn(t){window.open(t.url)},fastDoFn(t){t.url?this.$util.pageTo(t):this.$message.success("即将开通...")}}},n=o,l=(s("e440"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"02559b1a",null);e["default"]=c.exports},"662e":function(t,e,s){},6649:function(t,e,s){"use strict";s("08ba")},"667f":function(t,e,s){},6690:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.customData.customName?t.customData.customName:"")+"】待采变动记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-cg-record",props:{customData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCustomCgChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:60,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})}}},o=r,n=(s("b5d7"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"66307605",null);e["default"]=l.exports},"66f0":function(t,e,s){"use strict";s("62b3")},"670e":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"perf-redis"},[e("p",{staticClass:"title"},[t._v(" Redis ")]),e("el-row",{staticClass:"fn"},[e("el-col",{attrs:{span:8}},[e("div",{staticClass:"block"},[e("div",{staticClass:"icon _disk"},[e("icon-svg",{attrs:{name:"disk"}})],1),e("ul",{staticClass:"b"},[e("li",[e("p",[t._v("已使用")]),e("p",[t._v(t._s(t._f("unit_size")(t.used_memory)))])])])])]),e("el-col",{attrs:{span:8}},[e("div",{staticClass:"block"},[e("div",{staticClass:"icon _network"},[e("icon-svg",{attrs:{name:"network"}})],1),e("ul",{staticClass:"b"},[e("li",[e("p",[t._v("输入")]),e("p",[t._v(t._s(t._f("unit_size")(t.total_net_input_bytes)))])]),e("li",[e("p",[t._v("输出")]),e("p",[t._v(t._s(t._f("unit_size")(t.total_net_output_bytes)))])])])])]),e("el-col",{attrs:{span:8}},[e("div",{staticClass:"block"},[e("div",{staticClass:"icon _db"},[e("icon-svg",{attrs:{name:"db"}})],1),e("ul",{staticClass:"b"},t._l(t.dbList,(function(s,i){return e("li",{key:i},[e("p",[t._v(t._s(s.label))]),e("p",[t._v(t._s(s.value)+" key")])])})),0)])])],1),e("e-charts",{attrs:{options:t.chart.options}})],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("a9aa")),o=s("164e"),n=s.n(o),l={mixins:[r["default"]],data(){return{dbList:[],chart:{options:{}},total_net_input_bytes:0,total_net_output_bytes:0,used_memory:0}},methods:{refresh({data:t,time:e}){const s=t[t.length-1],{Keyspace:i,Stats:a,Memory:r}=s.redis;let o=[];for(let n in i)o.push({label:n,value:i[n].split(",")[0].split("=")[1]});this.total_net_input_bytes=a.total_net_input_bytes,this.total_net_output_bytes=a.total_net_output_bytes,this.used_memory=r.used_memory,this.chart.options=this.onChart(e,t.map(t=>t.redis.Stats.instantaneous_ops_per_sec),{color:"204, 32, 20",smooth:!1}),this.dbList=o},onChart(t,e){return{tooltip:{trigger:"axis",axisPointer:{lineStyle:{color:"#F56C6C"}},backgroundColor:"rgb(255,255,255)",padding:[5,10],textStyle:{color:"#F56C6C"},extraCssText:"box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)",formatter:t=>t[0].data+" / S(每秒操作数)"},grid:{left:"10px",right:"10px",bottom:"10px",top:"30px"},xAxis:{type:"category",show:!1,boundaryGap:!1,splitLine:{interval:"auto",lineStyle:{color:["#D4DFF5"]}},axisTick:{show:!1},axisLine:{show:!1,lineStyle:{color:"#609ee9"}},axisLabel:{margin:10,textStyle:{fontSize:12}},data:t},yAxis:{type:"value",show:!1,splitLine:{show:!0,lineStyle:{color:["#D4DFF5"]}},axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:["#609ee9"]}},axisLabel:{margin:10,textStyle:{fontSize:12}}},series:[{type:"line",smooth:!0,showSymbol:!1,symbol:"circle",symbolSize:6,data:e,markPoint:{symbolSize:30,data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},areaStyle:{normal:{color:new n.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(245, 108, 108, 0.5)"},{offset:1,color:"rgba(245, 108, 108, 0.1)"}],!1)}},itemStyle:{normal:{color:"#F56C6C"}},lineStyle:{normal:{width:1}}}]}}}},c=l,u=(s("8c85"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"d711405a",null);e["default"]=d.exports},"67ea":function(t,e,s){},6811:function(t,e,s){},6898:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"选择会员",visible:t.selDialog,"close-on-click-modal":!1,"append-to-body":!0,width:"800px"},on:{"update:visible":function(e){t.selDialog=e}}},[e("div",{staticClass:"recharge-modal-content"},[e("el-radio-group",{staticClass:"radio-wrap",model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-radio",fn:function({scope:s}){return[e("div",[e("el-radio",{attrs:{label:s.row.index}},[t._v("选择")])],1)]}},{key:"table-column-userName",fn:function({scope:s}){return[e("div",{staticClass:"flex-center"},[e("cl-avatar",{attrs:{shape:"square",size:40,src:t._f("default_avatar")(s.row.avatar)}}),e("div",{staticClass:"app-margin-left-10"},[t._v(t._s(s.row.userName))])],1)]}},{key:"table-column-member",fn:function({scope:s}){return[-1==s.row.member?e("div",[t._v("非会员")]):e("div",[t._v(t._s(s.row.userAsset.growth))])]}}])})],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmFn}},[t._v("确定")])],1)])},a=[],r=(s("8f26"),s("963e"),{name:"sel-search",props:{show:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},data(){return{selDialog:!1,ruleForm:{},radio:"",list:[],selData:{}}},watch:{show(t){this.selDialog=t}},created(){},methods:{confirmFn(){this.$emit("confirm",this.list[this.radio])},resetForm(){this.$emit("update:show",!1),this.$emit("cancel")},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.member).set("table",{columns:[{prop:"radio",label:"选择",align:"center","min-width":60},{prop:"userName",label:"会员名字",align:"center"},{prop:"mobile",label:"手机号",align:"center"},{prop:"member",label:"会员级别",align:"center"},{prop:"visitTimeFormat",label:"最近访问",align:"center"}],op:{visible:!1}}).set("pagination",{size:6}).set("layout",[["slot-tabs"],["search-key","flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e,render:s})=>{let{list:i}=await e(t);i.map((t,e)=>{t.index=e}),this.list=i,s(i)}).done(),e.refresh({type:this.tabIndex})}}}),o=r,n=(s("7d50"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},"68a3":function(t,e,s){"use strict";s("a000")},"68a4":function(t,e,s){"use strict";s("0ccd")},6901:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"order-detail"},[e("el-drawer",{attrs:{visible:t.showOrderDetail,size:"850px","before-close":t.closeFn,"custom-class":"order-draw-wrap",direction:"ltr"},on:{"update:visible":function(e){t.showOrderDetail=e},close:t.closeTrigger}},[e("div",{staticClass:"order-manage-wrap"},[e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v(" 预订客户 "),e("el-button",{staticStyle:{"margin-left":"620px"},attrs:{type:"primary"},on:{click:function(e){return t.addCustom()}}},[t._v("添加客户")])],1),e("div",{staticClass:"card-body"},[e("el-table",{attrs:{data:t.customList}},[e("el-table-column",{attrs:{property:"customId",label:"客户ID"}}),e("el-table-column",{attrs:{property:"customName",label:"客户名称"}}),e("el-table-column",{attrs:{label:"数量"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{staticStyle:{width:"80px"},attrs:{placeholder:"数量"},on:{focus:function(t){s.row.num=""}},model:{value:s.row.num,callback:function(e){t.$set(s.row,"num",e)},expression:"scope.row.num"}})]}}])}),e("el-table-column",{attrs:{label:"单价"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{staticStyle:{width:"90px"},attrs:{placeholder:"单价"},on:{focus:function(t){s.row.unitPrice=""}},model:{value:s.row.unitPrice,callback:function(e){t.$set(s.row,"unitPrice",e)},expression:"scope.row.unitPrice"}})]}}])}),e("el-table-column",{attrs:{label:"合计"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" ¥"+t._s(parseFloat((e.row.num*e.row.unitPrice).toFixed(2)))+" ")]}}])}),e("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-popconfirm",{attrs:{title:"确认删除?"},on:{confirm:function(e){return t.confirmDel(s.row)},onConfirm:function(e){return t.confirmDel(s.row)}}},[e("el-button",{attrs:{slot:"reference",size:"small",type:"primary"},slot:"reference"},[t._v("删除")])],1)]}}])})],1)],1)]),e("div",{staticStyle:{"margin-left":"210px","margin-top":"30px"}},[e("el-button",{on:{click:t.closeFn}},[t._v("取消")]),e("el-popconfirm",{staticStyle:{"margin-left":"220px"},attrs:{title:"确认保存?"},on:{confirm:function(e){return t.updateCustom()},onConfirm:function(e){return t.updateCustom()}}},[e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("保存")])],1)],1)])])],1)},a=[],r=(s("f803"),{name:"order-detail",props:{orderOperate:{type:Object,default:()=>{}}},data(){return{showOrderDetail:!1,customList:[],info:{},loading:!0}},methods:{updateCustom(){if(this.$util.isEmpty(this.customList))return this.$message.error("没有客户需要更新"),!1;this.$service.liveOrder.updateCustom({id:this.orderOperate.id,customList:JSON.stringify(this.customList)}).then(t=>{this.$message.success("更新成功"),this.init()})},confirmDel(t){this.$service.liveOrder.delCustom({id:this.orderOperate.id,customId:t.customId}).then(t=>{this.init()})},addCustom(){this.$emit("addNewCustom",this.orderOperate)},closeTrigger(){this.$emit("searchFocus")},init(){this.data=[],this.showOrderDetail=!0,this.$service.liveOrder.getDetail({id:this.orderOperate.id}).then(t=>{this.customList=t.customList,this.info=t.info})},closeFn(){this.showOrderDetail=!1}}}),o=r,n=(s("77af"),s("b8ce"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"31ef03ce",null);e["default"]=l.exports},6914:function(t,e,s){"use strict";s("f0fd")},6971:function(t,e,s){},"6b99":function(t,e,s){},"6bc4":function(t,e,s){"use strict";s("2981")},"6d81":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("error-page",{attrs:{code:503,desc:"马上回来"}})},a=[],r=s("438a"),o={components:{ErrorPage:r["default"]}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},"6e74":function(t,e,s){},"6f34":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticStyle:{width:"100%",height:"60px","line-height":"60px"}},[e("el-radio-group",{staticStyle:{"margin-right":"20px","padding-top":"6px","margin-left":"20px"},attrs:{size:"small"},on:{change:t.changeRequest},model:{value:t.requestType,callback:function(e){t.requestType=e},expression:"requestType"}},[e("el-radio",{attrs:{label:"itemList"}},[t._v("全部花材")]),e("el-radio",{attrs:{label:"hasStockList"}},[t._v("有库存花材")])],1),e("el-select",{staticStyle:{width:"150px","margin-right":"10px"},attrs:{size:"small",placeholder:"花材分类",clearable:""},on:{change:t.getItemClass},model:{value:t.currentItemClassName,callback:function(e){t.currentItemClassName=e},expression:"currentItemClassName"}},t._l(t.itemClassList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("el-input",{staticStyle:{width:"200px","margin-right":"9px"},attrs:{placeholder:"搜索花材",size:"small"},on:{focus:t.searchFocus,input:t.toSearch},model:{value:t.searchName,callback:function(e){t.searchName=e},expression:"searchName"}}),e("el-input",{staticStyle:{width:"200px","margin-right":"9px","margin-left":"80px"},attrs:{placeholder:"保存本次名称(选填)",size:"small"},model:{value:t.modifyName,callback:function(e){t.modifyName=e},expression:"modifyName"}}),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.confirmChange()}}},[t._v("确认修改")]),e("el-checkbox",{staticStyle:{"margin-left":"8px"},model:{value:t.couldLessCost,callback:function(e){t.couldLessCost=e},expression:"couldLessCost"}},[t._v("售价允许低于成本")])],1),e("div",{staticStyle:{"padding-left":"9px","margin-bottom":"9px"}},[t._v(" 修改记录:"),t._l(t.modifyList,(function(s,i){return e("span",{staticStyle:{"margin-right":"15px",cursor:"pointer"},on:{click:function(e){return t.getChagnePrice(s)}}},[t._v(" "+t._s(s.name)+" ")])}))],2),t._l(t.allProdct,(function(s,i){return e("div",{staticStyle:{width:"100%",height:"auto","text-align":"left"}},[s.child&&!t.$util.isEmpty(s.child)?e("div",{staticStyle:{"font-weight":"bold","text-align":"left",width:"100%",padding:"6px 0 5px 8px"}},[t._v(t._s(s.className))]):t._e(),s.child&&!t.$util.isEmpty(s.child)?e("div",{staticStyle:{width:"100%",height:"auto","background-color":"white"}},t._l(s.child,(function(s,i){return e("div",{staticStyle:{width:"33%",height:"auto",display:"inline-block","vertical-align":"top","text-align":"center"}},[e("el-table",{staticStyle:{width:"100%",margin:"0 auto"},attrs:{data:s,border:"","show-header":!1,size:"mini"}},[e("el-table-column",{attrs:{prop:"cover",label:"图片",align:"center",width:"50"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("img",{staticStyle:{width:"30px",margin:"0 auto"},attrs:{src:t.row.cover}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"name",label:"花材",width:"120"},scopedSlots:t._u([{key:"default",fn:function(s){return[Number(s.row.showPrice)>0&&Number(s.row.cost)>Number(s.row.showPrice)?e("span",{staticStyle:{color:"red","font-size":"14px"}},[t._v(t._s(s.row.name))]):e("span",{staticStyle:{"font-size":"14px"}},[t._v(t._s(s.row.name))])]}}],null,!0)}),e("el-table-column",{attrs:{prop:"showHjPrice",label:"大客价",align:"center",width:"60"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"大客",size:"small"},on:{focus:function(t){s.row.showHjPrice=""}},model:{value:s.row.showHjPrice,callback:function(e){t.$set(s.row,"showHjPrice",e)},expression:"scope.row.showHjPrice"}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"showPrice",label:"批发价",align:"center",width:"60"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{staticStyle:{border:"1upx solid red"},attrs:{placeholder:"批发",size:"small"},on:{focus:function(t){s.row.showPrice=""},input:function(e){return t.changePrice(s.row)}},model:{value:s.row.showPrice,callback:function(e){t.$set(s.row,"showPrice",e)},expression:"scope.row.showPrice"}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"showSkPrice",label:"散客价",align:"center",width:"60"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"散客",size:"small"},on:{focus:function(t){s.row.showSkPrice=""}},model:{value:s.row.showSkPrice,callback:function(e){t.$set(s.row,"showSkPrice",e)},expression:"scope.row.showSkPrice"}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"cost",label:"成本",align:"center",width:"60"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(s.row.cost?parseFloat(s.row.cost):0))])]}}],null,!0)}),e("el-table-column",{attrs:{prop:"showStock",label:"库存",align:"center",width:"60"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"库存",size:"small"},on:{focus:function(t){s.row.showStock=""}},model:{value:s.row.showStock,callback:function(e){t.$set(s.row,"showStock",e)},expression:"scope.row.showStock"}})]}}],null,!0)}),e("el-table-column",{attrs:{prop:"cost",label:"剩余",align:"center",width:"60"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{"font-size":"12px"}},[t._v("剩 "+t._s(s.row.stock?parseFloat(s.row.stock):0))])]}}],null,!0)})],1)],1)})),0):t._e()])})),e("div")],2)},a=[],r=(s("b138"),s("8f26"),s("666b"),s("f803"),s("5880"),{name:"item_add",components:{},data(){return{allProdct:[],requestType:"itemList",itemClassList:[],currentItemClassName:"",classId:0,searchName:"",modifyName:"",couldLessCost:!1,modifyList:[],historyPriceList:[],stockArr:[]}},mounted(){this.historyPriceList=[],this.show(),this.$service.itemClass.allClass().then(t=>{this.itemClassList=t}),this.getModifyList()},methods:{changePrice(t){let e=t.addPrice||0,s=t.skMore||0,i=t.hjAddPrice||0,a=t.showPrice?parseFloat(t.showPrice):0,r=0;parseFloat(s)>parseFloat(e)&&(r=parseFloat(s)-parseFloat(e),r=parseFloat(r).toFixed(2));let o=parseFloat(a)+parseFloat(r);o=parseFloat(o).toFixed(2),t.showSkPrice=parseFloat(o);let n=0;parseFloat(e)>parseFloat(i)&&(n=parseFloat(e)-parseFloat(i),n=parseFloat(n).toFixed(2));let l=0;parseFloat(a)>parseFloat(n)&&(l=parseFloat(a)-parseFloat(n),l=parseFloat(l).toFixed(2)),t.showHjPrice=parseFloat(l)},getChagnePrice(t){this.$service.modify.getModifyItem({id:t.id}).then(t=>{this.historyPriceList=t.list,this.show(),this.$message.success("导入成功")})},getModifyList(){this.$service.modify.list().then(t=>{this.modifyList=t.list})},confirmChange(){if(this.$util.isEmpty(this.allProdct))return this.$message.error("没有修改"),!1;let t=!1,e=!1,s=[];return this.stockArr=[],this.allProdct.forEach((i,a,r)=>{i.child&&!this.$util.isEmpty(i.child)&&i.child.forEach((i,a,r)=>{i.forEach((i,a,r)=>{if(i.showPrice&&Number(i.showPrice)>0||parseFloat(i.showStock)>=0){if(this.$util.isEmpty(i.showSkPrice)||parseFloat(i.showSkPrice)<0)return this.$message.error("请填写【"+i.name+"】零售价"),e=!0,!1;if(this.$util.isEmpty(i.showHjPrice)||parseFloat(i.showHjPrice)<0)return this.$message.error("请填写【"+i.name+"】大客价"),e=!0,!1;if(this.$util.isEmpty(i.showPrice)||parseFloat(i.showPrice)<0)return this.$message.error("请填写【"+i.name+"】批发价"),e=!0,!1;parseFloat(i.showStock)>=0&&this.stockArr.push({productId:i.id,bigNum:i.showStock,smallNum:null}),s.push({id:i.id,price:i.showPrice,skPrice:i.showSkPrice,hjPrice:i.showHjPrice,stock:i.showStock,name:i.name,cover:i.shortCover}),Number(i.cost)>Number(i.showPrice)&&(t=!0)}})})}),1!=e&&(1==t&&0==this.couldLessCost?(this.$message.error("有售价低于成本的花材"),!1):void this.$confirm("确认修改?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.product.batchChangePrice({appVersion:1,data:JSON.stringify(s)}).then(t=>{if(this.$service.modify.addModify({modifyName:this.modifyName,data:JSON.stringify(s)}).then(t=>{}),this.$util.isEmpty(this.stockArr))this.modifyName="",this.$message.success("修改成功"),this.show(),this.getModifyList(),this.historyPriceList=[];else{let t=JSON.stringify(this.stockArr);this.$service.checkOrder.createOrder({pdType:"",itemInfo:t,remark:"修改库存"}).then(t=>{this.modifyName="",this.$message.success("修改成功"),this.show(),this.getModifyList(),this.historyPriceList=[]})}})}))},searchFocus(){this.searchName="",this.historyPriceList=[],this.show()},toSearch(){this.historyPriceList=[],this.show()},changeRequest(t){this.historyPriceList=[],this.requestType=t,this.show()},getItemClass(t){this.classId=t,this.historyPriceList=[],this.show()},show(){let t=this;this.$service.product.showProduct({requestType:this.requestType,classId:this.classId,name:this.searchName}).then(e=>{this.$util.isEmpty(e.classItem)||(e.classItem.forEach((e,s,i)=>{if(e.child&&!this.$util.isEmpty(e.child)){e.child.forEach((t,e,s)=>{let i=t.id;if(this.historyPriceList[i]){let t=this.historyPriceList[i];s[e].showPrice=t.price?parseFloat(t.price):0,s[e].showSkPrice=t.skPrice?parseFloat(t.skPrice):0,s[e].showHjPrice=t.hjPrice?parseFloat(t.hjPrice):0}else s[e].showPrice="",s[e].showSkPrice="",s[e].showHjPrice="",s[e].showStock=""});let i=3,o=e.child.length,n=(Number(o)/i).toFixed(2);n=Math.ceil(n);for(var a=[],r=0;r<e.child.length;r+=n)a.push(e.child.slice(r,r+n));e.child=a,t.allProdct[s]=e}else t.allProdct[s]=e}),this.$forceUpdate())})}}}),o=r,n=(s("c233"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"670a326c",null);e["default"]=l.exports},"6fce":function(t,e,s){},7005:function(t,e,s){"use strict";s("33db")},"70eb":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("x-crud",{on:{load:t.onLoad}})},a=[],r={methods:{onLoad({ctx:t,app:e}){t.service(this.$service.system.role).set("table",{columns:[{type:"selection",align:"center",width:"60"},{prop:"name",label:"名称",align:"center"},{prop:"label",label:"标识",align:"center"},{prop:"remark",label:"备注",align:"center"},{prop:"createTime",label:"创建时间",align:"center",sortable:!0},{prop:"updateTime",label:"更新时间",align:"center",sortable:!0}],props:{"default-sort":{prop:"createTime",order:"descending"}}}).set("upsert",{props:{width:"800px"},items:[{prop:"name",label:"名称",span:12,component:{name:"el-input"},rules:{required:!0,message:"名称不能为空"}},{prop:"label",label:"标识",span:12,component:{name:"el-input",props:{placeholder:"请填写标识"}},rules:{required:!0,message:"标识不能为空"}},{prop:"remark",label:"备注",span:24,component:{name:"el-input",props:{type:"textarea",rows:4}}},{prop:"menuIdList",span:12,value:[],component:{name:"cl-role-tree",props:{title:"功能权限"}}},{prop:"departmentIdList",value:[],span:11,offset:1,props:{"label-width":"0px"},component:{name:"cl-dept-tree",props:{title:"数据权限"}}}]}).set("layout",[["refresh-btn","add-btn","multi-delete-btn","flex1","search-key"],["data-table"],["flex1","pagination"]]).done(),e.refresh()}}},o=r,n=s("1805"),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},"71b5":function(t,e,s){},7280:function(t,e,s){},"734b":function(t,e,s){},"73cb":function(t,e,s){},"745c":function(t,e,s){"use strict";s("ca48")},"74a6":function(t,e,s){},"74ad":function(t,e,s){"use strict";s.r(e),s.d(e,"MerchantCapitalService",(function(){return o}));var i,a,r=s("c081");let o=(i=Object(r["Service"])("shop-capital"),i(a=class extends r["BaseService"]{})||a);e["default"]=new o},"752b":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.customData.customName?t.customData.customName:"")+"】路上记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-road-record",props:{customData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCustomRoadChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})}}},o=r,n=(s("e5f2"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"1bfe056b",null);e["default"]=l.exports},"755f":function(t,e,s){"use strict";s("e10d")},"760e":function(t,e,s){},7749:function(t,e,s){"use strict";s("af72")},"775f":function(t,e,s){"use strict";s("7ea5")},"77af":function(t,e,s){"use strict";s("29af")},"77b5":function(t,e,s){"use strict";s("9d77")},"7808d":function(t,e,s){"use strict";s("58fc")},7828:function(t,e,s){(function(t){var i="undefined"!==typeof t&&t||"undefined"!==typeof self&&self||window,a=Function.prototype.apply;function r(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new r(a.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new r(a.call(setInterval,i,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(i,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},s("9b67"),e.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof t&&t.clearImmediate||this&&this.clearImmediate}).call(this,s("a282"))},"78bb":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"scope"},[e("div",{staticClass:"tmp2"},[e("h4",{staticClass:"title"},[t._v("x-admin")]),e("el-form",{ref:"form",staticClass:"form",attrs:{size:"medium",disabled:t.saving}},[e("el-form-item",{attrs:{label:"用户名"}},[e("el-input",{attrs:{placeholder:"请输入用户名",maxlength:"20","auto-complete":"off",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.username,callback:function(e){t.$set(t.form,"username",e)},expression:"form.username"}})],1),e("el-form-item",{attrs:{label:"密码"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码",maxlength:"20","auto-complete":"off",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("el-form-item",{staticClass:"captcha",attrs:{label:"验证码"}},[e("el-input",{attrs:{placeholder:"请输入图片验证码",maxlength:"4","auto-complete":"off",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.verifyCode,callback:function(e){t.$set(t.form,"verifyCode",e)},expression:"form.verifyCode"}}),e("captcha",{ref:"captcha",staticClass:"value",on:{change:t.captchaChange},model:{value:t.form.captchaId,callback:function(e){t.$set(t.form,"captchaId",e)},expression:"form.captchaId"}})],1),e("el-button",{staticClass:"submit-btn",attrs:{saving:t.saving},on:{click:t.next}},[t._v("登录")])],1)],1)])},a=[],r=(s("b138"),s("8bc2")),o=s("80c1"),n={mixins:[o["default"]],beforeRouteEnter(t,e,s){document.querySelector("meta[name='viewport']")["content"]="width=device-width, initial-scale=1",s()},beforeRouteLeave(t,e,s){document.querySelector("meta[name='viewport']")["content"]="",s()},created(){Object(r["isPc"])()&&this.$router.push("/login")}},l=n,c=(s("d53b"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"8770dbda",null);e["default"]=u.exports},"79b4":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"scope-topbar"},[e("div",{staticClass:"collapse"},[e("img",{staticClass:"avatar",attrs:{src:t._f("default_avatar")(t.logoUrl),alt:"花卉宝"}}),t._m(0)]),t.shopShow?e("el-dropdown",{staticClass:"user_top",attrs:{trigger:"click"},on:{command:t.shopCommand}},[e("div",[t._v(t._s(t.currentShop)+" "),e("i",{staticClass:"el-icon-caret-bottom"})]),e("el-dropdown-menu",{staticClass:"popper-dropdown-menu-user",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.shopList,(function(s,i){return e("el-dropdown-item",{key:i,class:{shopActive:s.id==t.userInfo.currentShopId},attrs:{command:s}},[t._v(t._s(s.shopName))])})),1)],1):t._e(),e("div",{staticClass:"flex1"}),t.userInfo?e("div",{staticClass:"user"},[e("el-dropdown",{attrs:{trigger:"click","hide-on-click":!1},on:{command:t.onCommand}},[e("span",{staticClass:"el-dropdown-link"},[e("span",{staticClass:"name"},[t._v(t._s(t._f("default_name")(t.userInfo.name)))]),e("img",{staticClass:"avatar",attrs:{src:t._f("default_avatar")(t.userInfo.avatar),alt:""}}),e("i",{staticClass:"el-icon-caret-bottom"})]),e("el-dropdown-menu",{staticClass:"popper-dropdown-menu-user",attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"exit"}},[t._v("退出")])],1)],1)],1):t._e()],1)},a=[function(){var t=this,e=t._self._c;return e("div",[e("span",[t._v("销花宝后台")])])}],r=(s("b138"),s("8f26"),s("963e"),s("5880")),o=s("c081"),n=s("fbe1"),l={components:{LiNotice:n["default"]},data(){return{$projectName:this.$projectName,index:"0",shopList:[]}},mounted(){this.getAllShop()},computed:{...Object(r["mapGetters"])(["userInfo","shopInfo"]),logoUrl(){return this.$util.isEmpty(this.shopInfo)?"":this.shopInfo.smallLogoUrl},currentShop(){let t;return this.shopList.map(e=>{console.log(e.id,this.userInfo.currentShopId),e.id==this.userInfo.currentShopId&&(t=e.shopName)}),t},shopShow(){return 1==this.userInfo.super&&this.shopList.length>1}},methods:{...Object(r["mapMutations"])(["SET_MENU_GROUP","SET_MENU_LIST","COLLAPSE_MENU"]),onCommand(t){switch(t){case"my":this.$router.push("/my/info");break;case"exit":this.$store.dispatch("userLogout").done(()=>{o["utils"].href("/login")});break}},shopCommand(t){console.log(t),this.$service.common.toggleShop({shopId:t.id}).then(t=>{this.$router.go(0)}).catch(t=>{console.log(t,1111111)})},getAllShop(){this.$service.common.shopAll().then(t=>{console.log(t),this.shopList=t}).catch(t=>{})},layoutGlobalKd(){this.$router.push("/order/add")}}},c=l,u=(s("d63f"),s("775f"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"e76fea98",null);e["default"]=d.exports},"7a72":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function({scope:s}){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:t.text,name:t.key}})})),1)]}},{key:"table-column-avatarUrl",fn:function({scope:t}){return[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:32,src:t.row.smallImgList[0]}})]}},{key:"table-column-goodsName",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.goodsName))])]}},{key:"table-column-inTurn",fn:function({scope:s}){return[t.sort.status?e("el-input-number",{ref:"sort-input",attrs:{focus:"",size:"mini"},on:{blur:function(e){return t.changeSort(s.row)}},model:{value:s.row.inTurn,callback:function(e){t.$set(s.row,"inTurn",e)},expression:"scope.row.inTurn"}}):e("span",[t._v(t._s(s.row.inTurn))])]}},{key:"table-header-inTurn",fn:function(){return[e("div",{staticClass:"set-sort"},[e("span",[t._v("排序")]),t.sort.status?e("el-button",{staticClass:"hide",attrs:{size:"mini",type:"primary"},on:{click:t.hideSort}},[t._v("完成")]):e("el-button",{staticClass:"show",attrs:{icon:"el-icon-edit-outline",size:"small",type:"text"},on:{click:t.showSort}})],1)]},proxy:!0},{key:"slot-add-goods-btn",fn:function({scope:s}){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.addFn}},[t._v("添加")])]}},{key:"table-column-status",fn:function({scope:s}){return[e("span",[t._v(t._s(1==s.row.status?"上架":"下架"))])]}},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.addFn(2,s.row)}}},[t._v("修改")])]}},{key:"slot-takeOff",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.downFn(s.row)}}},[t._v("下架")])]}},{key:"slot-category",fn:function(){return[e("el-select",{staticStyle:{width:"200px","margin-right":"10px"},attrs:{size:"mini",placeholder:"请选择分类"},on:{change:e=>{t.refresh({cId:e})}},model:{value:t.selects.cId,callback:function(e){t.$set(t.selects,"cId",e)},expression:"selects.cId"}},[e("el-option",{attrs:{label:"全部",value:"-1"}}),t._l(t.category,(function(t,s){return e("el-option",{key:s,attrs:{label:t.categoryName,value:t.id}})}))],2)]},proxy:!0}])}),e("el-dialog",{attrs:{title:"商品短链接:",visible:t.dialogFormVisible,width:"40%"},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[e("div",[e("el-input",{attrs:{disabled:!0},model:{value:t.sortLink,callback:function(e){t.sortLink=e},expression:"sortLink"}})],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.sendPhoneFn}},[t._v("发到手机")])],1)])],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("5880")),o={data(){return{app:null,dialogFormVisible:!1,sortLink:"",operateData:{},tabIndex:"-1",tabsData:[{text:"全部",key:"-1"},{text:"上架",key:"1"},{text:"下架",key:"0"}],selects:{},sort:{status:!1}}},computed:{...Object(r["mapGetters"])(["category"])},methods:{handleClick(t,e){this.app.refresh({type:this.tabIndex})},openLinkFn(t){this.operateData=t,this.sortLink=t.shortUrl||"",this.dialogFormVisible=!0},sendPhoneFn(){this.$service.goods.sendPhone({id:this.operateData.id}).then(t=>{this.$message.success("发送成功!"),this.dialogFormVisible=!1})},addFn(t,e){let s={};2===t&&(s.id=e.id,s.editType=t),this.$router.push({path:"/goods/add/",query:s})},downFn(t){this.$("是否下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.goods.changeStatus({id:t.id,status:0==t.status?1:0}).then(e=>{t.status=0==t.status?1:0,this.$message.success("操作成功!")}).catch(t=>{this.$message.error(t)})}).catch(()=>{this.$message({type:"info",message:"已取消删除"})})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.goods).set("table",{columns:[{prop:"id",label:"ID",align:"center"},{prop:"avatarUrl",label:"封面",align:"center"},{prop:"goodsName",label:"标题",align:"center","min-width":180},{prop:"price",label:"价格",align:"center",emptyText:"无","min-width":150},{prop:"actualSold",label:"销量",align:"center"},{prop:"viewNum",label:"浏览量",align:"center"},{prop:"inTurn",label:"排序",align:"center",minWidth:100},{prop:"status",label:"状态",align:"center"},{prop:"createDate",label:"创建时间",align:"center"}],op:{visible:!0,props:{width:150,align:"center",fixed:"right",label:"操作"},layout:["slot-modify","slot-takeOff","delete"]}}).set("dict",{search:{keyWord:"goodsName"}}).set("search",{key:{placeholder:"商品名称"}}).set("layout",[["slot-tabs"],["slot-category","search-key","flex1","slot-add-goods-btn","refresh-btn"],["data-table"],["flex1","pagination"]]).on("delete",(t,{next:e})=>{e({id:t.map(t=>t.id).join(",")})}).done(),e.refresh({status:this.tabIndex})},refresh(t){this.app.refresh(t)},showSort(t){this.sort.status=!0},hideSort(t){this.sort.status=!1},changeSort(t){this.$service.goods.sort({inTurn:t.inTurn,id:t.id}).then(()=>{this.$message.success("修改成功"),this.refresh()}).catch(t=>{this.$message.error(t)})}}},n=o,l=(s("264a"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"6b8d749b",null);e["default"]=c.exports},"7abc":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function({scope:s}){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:t.text,name:t.key}})})),1)]}},{key:"table-column-avatarUrl",fn:function({scope:s}){return[e("div",{staticClass:"flex-center"},[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:t._f("default_avatar")(s.row.userAvatar)}}),e("div",[t._v(t._s(s.row.userName))])],1)]}},{key:"table-column-addTime",fn:function({scope:s}){return[e("div",[t._v(t._s(t._f("formatTime")(s.row.addTime)))])]}},{key:"table-column-status",fn:function({scope:s}){return[e("div",[t._v(t._s(t._f("constantfilter")(s.row.status,"INVITE_STATUS")))])]}},{key:"table-column-orderTime",fn:function({scope:s}){return[e("div",[t._v(t._s(t._f("formatTime")(s.row.orderTime)))])]}},{key:"table-column-giveTime",fn:function({scope:s}){return[e("div",[t._v(t._s(t._f("formatTime")(s.row.giveTime)))])]}},{key:"slot-column-redeem",fn:function({scope:s}){return[1==s.row.status?e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.redeemFn(s.row)}}},[t._v("兑奖")]):e("div",[t._v("-")])]}}])}),e("el-dialog",{attrs:{title:"兑奖",visible:t.redeemVisible,width:"40%"},on:{"update:visible":function(e){t.redeemVisible=e}}},[[e("div",{staticClass:"redeem-wrap"},[e("div",{staticClass:"redeem-list-wrap"},[e("div",{staticClass:"list"},[e("div",{staticClass:"list-tag"},[e("img",{attrs:{src:s("5f96"),alt:""}})]),e("div",{staticClass:"list-left"},[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:80,src:t._f("default_avatar")(t.redeemData.introUserAvatar)}})],1),e("div",{staticClass:"list-right"},[e("div",{staticClass:"app-color-0 app-size-30 app-blod"},[t._v(t._s(t.redeemData.userName))]),e("div",[t._v("普通客户")]),e("div",[e("span",{staticClass:"list-time"},[t._v(t._s(t._f("formatTime")(t.redeemData.orderTime))+" 下单")])])])]),e("div",{staticClass:"list"},[e("div",{staticClass:"list-tag"},[e("img",{attrs:{src:s("4e96"),alt:""}})]),e("div",{staticClass:"list-left"},[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:80,src:t._f("default_avatar")(t.redeemData.introUserAvatar)}})],1),e("div",{staticClass:"list-right"},[e("div",{staticClass:"app-color-0 app-size-30 app-blod"},[t._v(t._s(t.redeemData.introUserName))]),e("div",[t._v("普通客户")]),e("div")])])]),e("div",{staticClass:"redeem-total"},[e("span",[t._v("奖励:")]),e("span",{staticClass:"app-price"},[t._v(t._s(t.redeemData.prize))])])])],e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.redeemVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.confirmRedeemFn}},[t._v("确认发奖")])],1)],2)],1)},a=[],r={data(){return{app:null,tabIndex:"-1",tabsData:[{text:"全部",key:"-1"},{text:"待下单",key:"0"},{text:"待兑奖",key:"1"},{text:"已兑奖",key:"2"}],redeemVisible:!1,redeemData:{}}},methods:{handleClick(t,e){this.app.refresh({status:this.tabIndex})},redeemFn(t){this.redeemData=t,this.redeemVisible=!0},confirmRedeemFn(){this.$service.invite.give({id:this.redeemData.id}).then(t=>{this.$message.success("兑奖成功!"),this.redeemVisible=!1,this.app.refresh({type:this.tabIndex})})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.invite).set("table",{columns:[{prop:"userName",label:"新客户",align:"center"},{prop:"mobile",label:"新客手机",align:"center"},{prop:"introUserName",label:"介绍人",align:"center","min-width":100},{prop:"introMobile",label:"介绍人手机",align:"center","min-width":100},{prop:"addTime",label:"邀请时间",align:"center"},{prop:"orderTime",label:"下单时间",align:"center"},{prop:"giveTime",label:"兑奖时间",align:"center"},{prop:"status",label:"状态",align:"center"}],op:{visible:!0,props:{width:100,align:"center",fixed:"right",label:"操作"},layout:["slot-column-redeem"]}}).set("layout",[["slot-tabs"],["search-key","flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh({status:this.tabIndex})}}},o=r,n=(s("cc0b"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"38c610b0",null);e["default"]=l.exports},"7c4c":function(t,e,s){"use strict";s("6971")},"7c4e":function(t,e,s){"use strict";s("d9b6")},"7cfe":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[0==t.id?e("div",[e("div",{staticStyle:{width:"35vw",margin:"0 auto","margin-top":"90px","text-align":"center","font-size":"25px"}},[t._v("请选择订单")])]):e("div",{staticStyle:{width:"62vw",margin:"0 auto","margin-top":"10px"}},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.flowersList}},[e("el-table-column",{attrs:{prop:"name",label:"名称"}}),e("el-table-column",{attrs:{prop:"suggestHjPrice",label:"大客价"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"请填写大客价",size:"small"},on:{focus:function(t){s.row.suggestHjPrice=""}},model:{value:s.row.suggestHjPrice,callback:function(e){t.$set(s.row,"suggestHjPrice",e)},expression:"scope.row.suggestHjPrice"}})]}}])}),e("el-table-column",{attrs:{prop:"suggestPrice",label:"批发价"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{staticStyle:{border:"1px solid #CCCCCC","border-radius":"5px"},attrs:{placeholder:"请填写批发价",size:"small"},on:{focus:function(t){s.row.suggestPrice=""},input:function(e){return t.linkChange(s.$index)}},model:{value:s.row.suggestPrice,callback:function(e){t.$set(s.row,"suggestPrice",e)},expression:"scope.row.suggestPrice"}})]}}])}),e("el-table-column",{attrs:{prop:"suggestSkPrice",label:"零售价"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"请填写零售价",size:"small"},on:{focus:function(t){s.row.suggestSkPrice=""}},model:{value:s.row.suggestSkPrice,callback:function(e){t.$set(s.row,"suggestSkPrice",e)},expression:"scope.row.suggestSkPrice"}})]}}])}),e("el-table-column",{attrs:{prop:"bigPrice",label:"进货价"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.bigPrice?parseFloat(e.row.bigPrice):0)+" ")]}}])}),e("el-table-column",{attrs:{prop:"cost",label:"成本价"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.cost?parseFloat(e.row.cost):0)+" ")]}}])}),e("el-table-column",{attrs:{prop:"beforeModifyPrice",label:"旧批发价"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.beforeModifyPrice?parseFloat(e.row.beforeModifyPrice):0)+" ")]}}])}),e("el-table-column",{attrs:{prop:"itemNum",label:"入库数"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.itemNum?parseFloat(e.row.itemNum):0)+" ")]}}])}),e("el-table-column",{attrs:{prop:"beforeModifyStock",label:"入库前库存"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.beforeModifyStock?parseFloat(e.row.beforeModifyStock):0)+" ")]}}])})],1),e("div",{staticStyle:{"text-align":"left","margin-top":"18px"}},[3==t.info.status?e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.commitChange(1)}}},[t._v("改价并入库")]):t._e(),3!=t.info.status?e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.commitChange(2)}}},[t._v("确认改价")]):t._e(),3==t.info.status?e("el-button",{attrs:{type:"danger"},on:{click:t.confirmIn}},[t._v("仅入库不改价")]):t._e(),3==t.info.status?e("el-button",{attrs:{type:"success"},on:{click:t.savePrice}},[t._v("保存价格,稍后入库")]):t._e(),5!=t.info.status?e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.printOrder()}}},[t._v("打小票("+t._s(t.info.printNum)+")")]):e("el-button",{attrs:{disabled:""}},[t._v("打小票("+t._s(t.info.printNum)+")")]),5!=t.info.status?e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.printPaper()}}},[t._v("打多联("+t._s(t.info.printNum)+")")]):e("el-button",{attrs:{disabled:""}},[t._v("打多联("+t._s(t.info.printNum)+")")]),e("el-button",{attrs:{plain:""},on:{click:t.goBackFn}},[t._v("返回")])],1)],1)])},a=[],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("209c"),s("f803"),s("5880")),o=s("54a1"),n={name:"change",components:{},data(){return{flowersList:[],info:{},id:0,orderSn:""}},computed:{...Object(r["mapGetters"])(["shopInfo","userInfo"])},created(){this.$route.query.id&&(this.id=this.$route.query.id,this.getItemList()),this.$route.query.orderSn&&(this.orderSn=this.$route.query.orderSn,this.getDetail())},methods:{printPaper(){this.info.printNum>=1?this.$confirm("已打过,确认要补打?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.toPrint()}):this.toPrint()},toPrint(){this.$service.purchaseOrder.printPaper({id:this.id}).then(t=>{let e=t.printData?t.printData:"",s=t.template?t.template:"",i=JSON.parse(s);var a=new o["hiprint"].PrintTemplate({template:i});a.print(e),this.info.printNum++})},printOrder(){this.info.printNum>=1?this.$confirm("已打过,确认要补打?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.purchaseOrder.printBill({id:this.id}).then(t=>{this.info.printNum++,this.$notify({title:"已打印",message:"操作成功",type:"success"})})}):this.$service.purchaseOrder.printBill({id:this.id}).then(t=>{this.info.printNum++,this.$notify({title:"已打印",message:"操作成功",type:"success"})})},confirmIn(){let t=this;this.$confirm("确认只入库不改价?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.purchaseOrder.confirmPutIn({id:t.id}).then(e=>{4==e.status&&t.$notify({title:"成功",message:"操作成功",type:"success"})})})},savePrice(){let t=this,e=!1,s="";if(this.flowersList.forEach((function(i){if(0==t.$util.isMoney(i.suggestPrice)){let t=i.name;s="请填写 "+t+" 批发价",e=!0}if(0==t.$util.isMoney(i.suggestSkPrice)){let t=i.name;s="请填写 "+t+" 零售价",e=!0}if(0==t.$util.isMoney(i.suggestHjPrice)){let t=i.name;s="请填写 "+t+" 大客价",e=!0}})),e)return this.$message({message:s,type:"warning"}),!1;this.$confirm("确认保存?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{let e=this.id?this.id:0,s=this.flowersList.map(t=>({id:t.id,savePrice:t.suggestPrice,saveSkPrice:t.suggestSkPrice,saveHjPrice:t.suggestHjPrice}));this.$service.purchaseOrderItem.saveCgPrice({data:JSON.stringify(s),cgId:e}).then(e=>{t.$notify({title:"成功",message:"操作成功",type:"success"})})})},goBackFn(){this.goBackBefore()},commitChange(t){let e=this,s=!1,i="";if(this.flowersList.forEach((function(t){if(0==e.$util.isMoney(t.suggestPrice)){let e=t.name;i="请填写 "+e+" 批发价",s=!0}if(0==e.$util.isMoney(t.suggestSkPrice)){let e=t.name;i="请填写 "+e+" 零售价",s=!0}if(0==e.$util.isMoney(t.suggestHjPrice)){let e=t.name;i="请填写 "+e+" 大客价",s=!0}})),s)return this.$message({message:i,type:"warning"}),!1;let a="确认提交?";1==t&&(a="确认改价并入库?"),2==t&&(a="确认改价?"),this.$confirm(a,"提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{e.commitModify()})},commitModify(){let t=this,e=this.id||0,s=this.flowersList.map(t=>({id:t.productId,price:t.suggestPrice,skPrice:t.suggestSkPrice,hjPrice:t.suggestHjPrice}));t.$service.product.batchChangePrice({data:JSON.stringify(s),changeType:"cg",targetId:e,appVersion:1}).then(e=>{t.$notify({title:"成功",message:"操作成功",type:"success"})})},goBackBefore(){let t={},e=this.$route.query.backType?this.$route.query.backType:"add";"add"==e&&this.$router.push({path:"/in/add",query:t}),"list"==e&&this.$router.push({path:"/in/list",query:t})},linkChange(t){if(this.flowersList[t].suggestPrice&&Number(this.flowersList[t].suggestPrice)>0){let e=this.flowersList[t].skMore?Number(this.flowersList[t].skMore):0,s=this.flowersList[t].hjAddPrice?Number(this.flowersList[t].hjAddPrice):0,i=this.flowersList[t].addPrice?Number(this.flowersList[t].addPrice):0,a=Number(e)-Number(i);a=a.toFixed(2);let r=Number(a)+Number(this.flowersList[t].suggestPrice);r>0?(r=r.toFixed(2),r=parseFloat(r),this.flowersList[t].suggestSkPrice=r):this.flowersList[t].suggestSkPrice="";let o=Number(i)-Number(s);o=o.toFixed(2);let n=Number(this.flowersList[t].suggestPrice)-Number(o);n>0?(n=n.toFixed(2),n=parseFloat(n),this.flowersList[t].suggestHjPrice=n):this.flowersList[t].suggestHjPrice=""}else this.flowersList[t].suggestSkPrice="",this.flowersList[t].suggestHjPrice=""},getItemList(){this.$service.purchaseOrderItem.getItemList({id:this.id}).then(t=>{this.flowersList=t.list})},getDetail(){this.$service.purchaseOrder.detail({orderSn:this.orderSn}).then(t=>{this.info=t})}}},l=n,c=s("1805"),u=Object(c["a"])(l,i,a,!1,null,"6081477c",null);e["default"]=u.exports},"7d00":function(t,e,s){"use strict";s("0f4a")},"7d50":function(t,e,s){"use strict";s("6e74")},"7d69":function(t,e,s){},"7dbd":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("div",{staticClass:"content-wrap"},[e("div",{staticClass:"wx-wrap"},[e("div",{staticClass:"wx-bar"},[t._m(0),e("div",{staticClass:"bar-text"},[t._v(t._s(t.shopInfo.name))])]),e("div",{staticClass:"wx-content",on:{click:t.closeOptionFn}}),e("div",{staticClass:"wx-btn"},[t._m(1),t._l(t.menuData,(function(s,i){return e("div",{key:i,staticClass:"menu-btn",class:[t.activeIndex==i?"active":""],on:{click:function(e){return t.menuClickFn(s,i)}}},[e("operate-line-module",{attrs:{show:t.operateShow[i],data:s},on:{click:t.operateClickFn,add:function(e){return t.operateAddFn(i)},del:t.operateDelFn}})],1)}))],2)]),t.addDialog?[e("div",{staticClass:"ad-modal-content"},[e("div",{staticClass:"ad-modal-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rule,"label-width":"50px"}},[e("el-form-item",{attrs:{label:"名称",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入菜单名称",size:"small"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",{attrs:{label:"选项",prop:"menuOption"}},[e("el-radio-group",{model:{value:t.form.menuOption,callback:function(e){t.$set(t.form,"menuOption",e)},expression:"form.menuOption"}},[e("el-radio",{attrs:{label:"0"}},[t._v("常用网址")]),e("el-radio",{attrs:{label:"1"}},[t._v("自定义网址")])],1)],1),e("el-form-item",{staticClass:"content-j-wrap",attrs:{label:""}},[0==t.form.menuOption?[e("el-radio-group",{attrs:{size:"mini"},model:{value:t.form.targetId,callback:function(e){t.$set(t.form,"targetId",e)},expression:"form.targetId"}},t._l(t.commonUrlData,(function(s,i){return e("el-radio",{key:i,attrs:{border:"",label:s.id}},[t._v(t._s(s.name))])})),1)]:[e("div",[e("el-input",{attrs:{placeholder:"请填写链接,留空点图片不跳转",size:"small"},model:{value:t.form.replyUrl,callback:function(e){t.$set(t.form,"replyUrl",e)},expression:"form.replyUrl"}})],1)]],2)],1),e("div",{staticClass:"dialog-footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmForm}},[t._v("提交")])],1)],1)])]:t._e()],2)])},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"bar-img"},[e("img",{attrs:{src:s("ee57"),alt:""}})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"key-btn"},[e("img",{staticClass:"key-btn-img",attrs:{src:s("f948"),alt:"",mode:"widthFix"}})])}],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("209c"),s("f803"),s("5880")),o=s("231c"),n={name:"wx-menu",components:{operateLineModule:o["default"]},data(){return{form:{name:"",menuOption:"0",replyUrl:"",targetId:0},rule:{},isModifyParents:!1,addDialog:!1,activeIndex:null,subActiveIndex:null,menuData:[],urlIndex:null,commonUrlData:[],operateShow:[],operateData:null,btnData:[]}},computed:{...Object(r["mapGetters"])(["shopInfo","userInfo"])},created(){this.init()},methods:{init(){this._getDet(),this._getUrl()},_getDet(){this.$service.setting.getMenu().then(t=>{this.menuData=t.map(t=>(t.children||(t.children=[]),t)),t.map(()=>{this.operateShow.push(!1)})})},_getUrl(){this.$service.single.commonUrl().then(t=>{this.commonUrlData=t})},async submitFn(){console.log(this.menuData),await this.$service.setting.updateMenu(this.menuData).then(t=>{this.$message.success(t.msg||"提交"),this.resetForm()})},menuClickFn(t,e){this.isModifyParents=!0,this.closeOperate(),this.activeIndex=e,this.operateShow[e]=!0,this.operateData=t.children||[],console.log("江总",t),console.log("江总11",this.commonUrlData),Object.keys(this.form).forEach(e=>{this.form[e]=t[e]}),this.addDialog=!0},operateClickFn(t){this.isModifyParents=!1,this.subActiveIndex=t.index,console.log("item",t),t.targetId=t.targetId?parseInt(t.targetId):0,Object.keys(this.form).forEach(e=>{this.form[e]=t[e]}),this.addDialog=!0},operateAddFn(t){if(this.operateData.length>4)return this.$message.warning("亲,最多只能设置五个子菜单!"),!1;let e={name:"子菜单名",menuOption:"0",replyUrl:"",targetId:0};this.$set(this.operateShow,this.activeIndex,!1),this.operateData.push(e),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData)),setTimeout(()=>{this.$set(this.operateShow,this.activeIndex,!0)})},operateDelFn(t){console.log("我点击了删除按钮!",t),this.$set(this.operateShow,this.activeIndex,!1),this.operateData.splice(t,1),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData)),setTimeout(()=>{this.$set(this.operateShow,this.activeIndex,!0)})},closeOperate(){this.activeIndex=null,this.operateShow=this.operateShow.map(t=>!1),this.addDialog=!1},closeOptionFn(){this.closeOperate(),this.resetForm()},confirmForm(){let t=JSON.parse(JSON.stringify(this.form));this.isModifyParents?(Object.keys(t).forEach(e=>{this.menuData[this.activeIndex][e]=t[e]}),console.log("江总22",this.menuData)):(this.operateData[this.subActiveIndex]=t,console.log("this.operateData",this.operateData),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData))),this.submitFn().then(t=>{console.log("this.activeIndex",this.activeIndex),this.addDialog=!1})},resetForm(){this.form={name:"",menuOption:"0",replyUrl:"",targetId:0},this.$refs["form"].resetFields()}}},l=n,c=(s("7c4c"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"6bc7b9dd",null);e["default"]=u.exports},"7ea5":function(t,e,s){},"7ede":function(t,e,s){"use strict";s("ff4a")},8014:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{ref:"xCrud",staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.tabClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-cover",fn:function({scope:t}){return[e("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[e("div",{staticStyle:{width:"200px",height:"200px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover"},attrs:{src:t.row.bigCover}})]),e("div",{staticStyle:{width:"40px"},attrs:{slot:"reference"},slot:"reference"},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:t.row.cover}})])])]}},{key:"table-column-cgStaffName",fn:function({scope:s}){return[""!=s.row.cgStaffName?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.changeCgStaff(s.row)}}},[t._v(t._s(s.row.cgStaffName))]):e("span",[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},on:{click:function(e){return t.changeCgStaff(s.row)}},slot:"reference"})])]}},{key:"table-column-name",fn:function({scope:s}){return[0==s.row.delStatus?e("span",{staticClass:"item-name"},[t._v(t._s(s.row.name))]):e("span",{staticClass:"item-name",staticStyle:{color:"#CCCCCC"}},[t._v(t._s(s.row.name))])]}},{key:"table-column-stock",fn:function({scope:s}){return[e("div",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.changeStock(s.row)}}},[t._v(t._s(s.row.stock?parseFloat(s.row.stock):0))])]}},{key:"table-column-status",fn:function({scope:s}){return[1==s.row.status?e("span",[t._v("是")]):e("span",[t._v("-")])]}},{key:"table-column-delStatus",fn:function({scope:s}){return[1==s.row.delStatus?e("span",{staticStyle:{color:"#CCCCCC"}},[t._v("已删")]):e("span",[t._v("-")])]}},{key:"table-column-unit",fn:function({scope:s}){return[0==s.row.ratioType?e("span",[t._v(t._s(s.row.ratio)+t._s(s.row.smallUnit))]):e("span",[t._v("若干"+t._s(s.row.smallUnit))])]}},{key:"table-column-price",fn:function({scope:s}){return[t.priceInput?e("el-input",{ref:"sort-input",staticStyle:{width:"80%"},attrs:{focus:"",size:"mini",placeholder:""},on:{blur:function(e){return t.changeInputValue(s.row,"price")}},model:{value:s.row.price,callback:function(e){t.$set(s.row,"price",e)},expression:"scope.row.price"}}):e("span",[e("span",[t._v(t._s(s.row.price))])])]}},{key:"table-column-stockWarning",fn:function({scope:s}){return[t.stockWarningInput?e("el-input",{ref:"sort-input",staticStyle:{width:"80%"},attrs:{focus:"",size:"mini",placeholder:""},on:{blur:function(e){return t.changeInputValue(s.row,"stockWarning")}},model:{value:s.row.stockWarning,callback:function(e){t.$set(s.row,"stockWarning",e)},expression:"scope.row.stockWarning"}}):e("span",[e("span",[t._v(t._s(s.row.stockWarning))])])]}},{key:"table-header-stockWarning",fn:function(){return[e("div",{staticClass:"set-sort"},[e("span",[t._v("库存预警")])])]},proxy:!0},{key:"table-column-inTurn",fn:function({scope:s}){return[t.sort.status?e("el-input",{ref:"sort-input",staticStyle:{width:"80%"},attrs:{focus:"",size:"mini"},on:{blur:function(e){return t.changeInputValue(s.row,"inTurn")}},model:{value:s.row.inTurn,callback:function(e){t.$set(s.row,"inTurn",e)},expression:"scope.row.inTurn"}}):e("span",[t._v(t._s(s.row.inTurn))])]}},{key:"table-header-inTurn",fn:function(){return[e("div",{staticClass:"set-sort"},[e("span",[t._v("排序")])])]},proxy:!0},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.getStockList(s.row)}}},[t._v("库存明细")]),e("el-button",{attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.replaceBtnFn(s.row.id)}}},[t._v("修改")]),e("el-popover",{ref:"popover-"+s.row.id,staticStyle:{"margin-left":"10px","margin-right":"10px"},attrs:{placement:"top",width:"160"}},[e("p",[t._v("确认复制生成花材?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.cancelCopyProduct(s.row.id)}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return e.stopPropagation(),t.copyProduct(s.row.id)}}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",size:"small",type:"primary"},on:{click:function(t){t.stopPropagation()}},slot:"reference"},[t._v("复制新建")])],1),0==s.row.delStatus?e("el-button",{attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.setDelStatusFun(s.row.id,1)}}},[t._v("删除")]):t._e(),1==s.row.delStatus?e("el-button",{attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.setDelStatusFun(s.row.id,0)}}},[t._v("恢复")]):t._e(),e("el-dropdown",{staticStyle:{"margin-left":"10px"},on:{command:function(e){return t.doMore(e,s.row)}}},[e("el-button",{attrs:{type:"primary",size:"small"}},[t._v("更多"),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"costChange"}},[t._v("成本变动记录")]),e("el-dropdown-item",{attrs:{command:"downCode"}},[t._v("下载商品码")])],1)],1)]}},{key:"table-column-cost",fn:function({scope:s}){return[t.costPrice?e("el-input",{ref:"sort-input",staticStyle:{width:"80%"},attrs:{focus:"",size:"mini"},on:{blur:function(e){return t.changeInputValue(s.row,"cost")}},model:{value:s.row.cost,callback:function(e){t.$set(s.row,"cost",e)},expression:"scope.row.cost"}}):e("span",[t._v(t._s(s.row.cost))])]}},{key:"table-header-ratio",fn:function(){return[e("div",{staticClass:"set-sort"},[e("span",[t._v("单位比")])])]},proxy:!0},{key:"table-column-ratio",fn:function({scope:s}){return[t.canAddRatio?e("el-input",{ref:"add-price-input",staticStyle:{width:"80%"},attrs:{focus:"",size:"mini"},on:{blur:function(e){return t.changeInputValue(s.row,"ratio")}},model:{value:s.row.ratio,callback:function(e){t.$set(s.row,"ratio",e)},expression:"scope.row.ratio"}}):e("span",[t._v(t._s(s.row.ratio))])]}},{key:"table-header-weight",fn:function(){return[e("div",{staticClass:"set-sort"},[e("span",[t._v("重量(公斤)")])])]},proxy:!0},{key:"table-column-weight",fn:function({scope:s}){return[t.costWeight?e("el-input",{ref:"add-price-input",staticStyle:{width:"80%"},attrs:{focus:"",size:"mini"},on:{blur:function(e){return t.changeInputValue(s.row,"weight")}},model:{value:s.row.weight,callback:function(e){t.$set(s.row,"weight",e)},expression:"scope.row.weight"}}):e("span",[t._v(t._s(s.row.weight))])]}},{key:"slot-download-price-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.downloadPrice(1)}}},[t._v("批发价格表")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.downloadPrice(0)}}},[t._v("零售价格表")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.downloadStock()}}},[t._v("下载库存表")])]},proxy:!0},{key:"slot-add-goods-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.$util.pageTo({url:"/item/import"})}}},[t._v("批量添加花材")])]},proxy:!0},{key:"slot-addNew-goods-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.replaceBtnFn(0)}}},[t._v("新增")])]},proxy:!0},{key:"slot-option-area",fn:function(){return[e("el-input",{ref:"itemSearchRef",staticStyle:{width:"160px"},attrs:{placeholder:"搜索花材",size:"mini"},on:{input:function(e){return t.changeSearch()},focus:function(e){return t.clearSearch()}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),e("el-select",{staticStyle:{width:"150px","margin-left":"10px"},attrs:{size:"mini",placeholder:"分类",clearable:""},on:{change:t.getItemClass},model:{value:t.currentItemClassName,callback:function(e){t.currentItemClassName=e},expression:"currentItemClassName"}},t._l(t.itemClassList,(function(t){return e("el-option",{key:t.value,attrs:{label:t.name,value:t.id}})})),1),e("el-select",{staticStyle:{width:"110px","margin-left":"10px"},attrs:{size:"mini",placeholder:"采购人",clearable:!0},on:{change:t.getCgStaff},model:{value:t.currentCgStaffName,callback:function(e){t.currentCgStaffName=e},expression:"currentCgStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("el-radio-group",{staticStyle:{"padding-top":"6px","margin-left":"10px"},on:{change:t.changeHasStock},model:{value:t.hasStock,callback:function(e){t.hasStock=e},expression:"hasStock"}},[e("el-radio",{attrs:{label:"-1"}},[t._v("全部")]),e("el-radio",{attrs:{label:"0"}},[t._v("没库存")]),e("el-radio",{attrs:{label:"1"}},[t._v("有库存")])],1)]},proxy:!0},{key:"slot-more-do-btn",fn:function(){return[e("el-dropdown",{attrs:{size:"medium","split-button":"",type:"primary"},on:{click:t.batchChangeCgStaff,command:function(e){return t.bottomDoMore(e)}}},[t._v(" 修改采购人 "),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"batchChangeKd"}},[t._v("修改开单人")])],1)],1)]},proxy:!0}])}),e("item-list-layer",{attrs:{show:t.showItemModal,classId:t.classId,className:t.className},on:{"update:show":function(e){t.showItemModal=e},"update:classId":function(e){t.classId=e},"update:class-id":function(e){t.classId=e},"update:className":function(e){t.className=e},"update:class-name":function(e){t.className=e},confirm:t.selectItemFn,cancel:function(e){t.showItemModal=!1}}}),e("el-dialog",{attrs:{title:"花材",visible:t.addDialog,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.addDialog=e}}},[e("div",{staticClass:"ad-modal-content"},[e("el-form",{ref:"replaceForm",staticClass:"demo-form",attrs:{model:t.replaceForm,rules:t.replaceFormRules,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"名称",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入名称",size:"small"},on:{input:function(e){return t.fillName(e)}},model:{value:t.replaceForm.name,callback:function(e){t.$set(t.replaceForm,"name",e)},expression:"replaceForm.name"}})],1),e("el-form-item",{attrs:{label:"拼音缩写",prop:"py"}},[e("el-input",{attrs:{placeholder:"拼音缩写",size:"small"},model:{value:t.replaceForm.py,callback:function(e){t.$set(t.replaceForm,"py",e)},expression:"replaceForm.py"}})],1),e("el-form-item",{attrs:{label:"图片",prop:"cover"}},[e("cl-upload",{attrs:{successFun:t.uploadSuccess},model:{value:t.replaceForm.cover,callback:function(e){t.$set(t.replaceForm,"cover",e)},expression:"replaceForm.cover"}}),e("p",{staticStyle:{"font-size":"14px",color:"#cccccc"}},[t._v("建议上传图片比例 400X400")])],1),e("el-form-item",{attrs:{label:"分类",prop:"classId"}},[e("el-select",{attrs:{size:"small",placeholder:"请选择分类"},on:{change:t.selClassFn},model:{value:t.replaceForm.className,callback:function(e){t.$set(t.replaceForm,"className",e)},expression:"replaceForm.className"}},t._l(t.itemClassList,(function(s,i){return e("el-option",{key:i,attrs:{value:s.name}},[t._v(t._s(s.name))])})),1)],1),e("el-form-item",{attrs:{label:"库存",prop:"stock"}},[e("el-input",{attrs:{placeholder:"请输入",size:"small"},on:{focus:function(e){t.replaceForm.stock=""}},model:{value:t.replaceForm.stock,callback:function(e){t.$set(t.replaceForm,"stock",e)},expression:"replaceForm.stock"}})],1),e("el-form-item",{attrs:{label:"大单位",prop:"bigUnitId"}},[e("el-select",{attrs:{size:"small",placeholder:"请选择单位"},on:{change:t.selBigUnitFn},model:{value:t.replaceForm.bigUnit,callback:function(e){t.$set(t.replaceForm,"bigUnit",e)},expression:"replaceForm.bigUnit"}},t._l(t.unitList,(function(s,i){return e("el-option",{key:i,attrs:{value:s.name}},[t._v(t._s(s.name))])})),1)],1),e("el-form-item",{attrs:{label:"小单位",prop:"smallUnitId"}},[e("el-select",{attrs:{size:"small",placeholder:"请选择单位"},on:{change:t.selSmallUnitFn},model:{value:t.replaceForm.smallUnit,callback:function(e){t.$set(t.replaceForm,"smallUnit",e)},expression:"replaceForm.smallUnit"}},t._l(t.unitList,(function(s,i){return e("el-option",{key:i,attrs:{value:s.name}},[t._v(t._s(s.name))])})),1)],1),e("el-form-item",{attrs:{label:"单位比",prop:"ratio"}},[e("el-input",{attrs:{placeholder:"1扎=20支,请输入20",size:"small"},model:{value:t.replaceForm.ratio,callback:function(e){t.$set(t.replaceForm,"ratio",e)},expression:"replaceForm.ratio"}})],1),e("el-form-item",{attrs:{label:"库存预警",prop:"stockWarning"}},[e("el-input",{attrs:{placeholder:"请输入数值",size:"small"},model:{value:t.replaceForm.stockWarning,callback:function(e){t.$set(t.replaceForm,"stockWarning",e)},expression:"replaceForm.stockWarning"}})],1),e("el-form-item",{attrs:{label:"每扎重量",prop:"weight"}},[e("el-input",{attrs:{placeholder:"请输入斤数",size:"small"},model:{value:t.replaceForm.weight,callback:function(e){t.$set(t.replaceForm,"weight",e)},expression:"replaceForm.weight"}})],1),e("el-form-item",{attrs:{label:"成本",prop:"cost"}},[e("el-input",{attrs:{placeholder:"请输入成本",size:"small"},model:{value:t.replaceForm.cost,callback:function(e){t.$set(t.replaceForm,"cost",e)},expression:"replaceForm.cost"}})],1),e("el-form-item",{attrs:{label:"加价",prop:"addPrice"}},[e("el-input",{attrs:{placeholder:"请输入加价",size:"small"},model:{value:t.replaceForm.addPrice,callback:function(e){t.$set(t.replaceForm,"addPrice",e)},expression:"replaceForm.addPrice"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.replaceConfirmFn}},[t._v("确认")])],1)]),e("el-dialog",{attrs:{width:"600px",title:"批量修改",visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[e("div",{staticClass:"flex-center"},[e("el-input",{attrs:{placeholder:"批量修改",autocomplete:"off"},model:{value:t.batchAlterNum,callback:function(e){t.batchAlterNum=e},expression:"batchAlterNum"}}),e("el-button",{staticStyle:{margin:"0 30px"},attrs:{type:"primary"},on:{click:t.batchAlterNumFun}},[t._v("确 定")])],1),e("div",{staticClass:"flex-center",staticStyle:{"margin-top":"30px"}},[e("el-input",{attrs:{placeholder:"批量加价",autocomplete:"off"},model:{value:t.batchAddNum,callback:function(e){t.batchAddNum=e},expression:"batchAddNum"}}),e("el-button",{staticStyle:{margin:"0 30px"},attrs:{type:"primary"},on:{click:t.batchAddNumFun}},[t._v("确 定")])],1)]),e("stock-detail",{ref:"stockDetailRef",attrs:{itemData:t.itemData},on:{searchFocus:t.searchFocus}}),e("cost-change",{ref:"costChangeRef",attrs:{costData:t.costData},on:{searchFocus:t.searchFocus}}),e("select-staff",{ref:"selectStaffRef",attrs:{staffData:t.staffData},on:{getStaff:t.getStaff}})],1)},a=[],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("209c"),s("f803"),s("f08f")),o=s("3b9e"),n=s("3e71"),l=s("d284"),c={name:"list",components:{itemListLayer:r["default"],stockDetail:n["default"],selectStaff:l["default"],costChange:o["default"]},data(){return{currentItemClassName:"",staffData:{},app:null,hasStock:"-1",sortLink:"",operateData:{},statusOption:[{value:"3",label:"全部"},{value:"1",label:"上架"},{value:"2",label:"下架"}],tabIndex:"0",tabsData:[{text:"全部花材",key:"0"},{text:"上架",key:"1"},{text:"下架",key:"2"},{text:"已删除",key:"3"}],selects:{},status:0,delStatus:2,sort:{status:!1},batchAlterNum:"",batchAddNum:"",dialogFormVisible:!1,selectedData:[],canAddPrice:!1,canSkAddPrice:!1,canByAddPrice:!1,canHjAddPrice:!1,canZsAddPrice:!1,canAddRatio:!1,costPrice:!1,costWeight:!1,priceInput:!1,shelfLifeInput:!1,stockWarningInput:!1,classId:0,className:"",showItemModal:!1,dataList:{form:{data:"",type:""}},initData:[],addDialog:!1,replaceForm:{name:"",py:"",stock:"",classId:"",className:"",cover:"",bigUnit:"",smallUnit:"",stockWarning:"",cost:"",addPrice:"",weight:""},replaceFormRules:{name:{required:!0,message:"名称不能为空"},cover:{required:!0,message:"图片不能为空"},classId:{required:!0,message:"请选择分类"},bigUnitId:{required:!0,message:"请选择大单位"},smallUnitId:{required:!0,message:"请选择小单位"},ratio:{required:!0,message:"比例不能为空"},stockWarning:{required:!0,message:"最低库存不能为空"},cost:{required:!0,message:"运费不能为空"},stock:{required:!0,message:"没有库存请填0"},addPrice:{required:!0,message:"加价不能为空"},weight:{required:!0,message:"重量不能为空"}},itemClassList:[],unitList:[],currentItemId:0,itemData:{},costData:{},search:"",currentCgStaffName:"",currentCgStaffId:0,currentCgStaffName:"",staffList:[]}},computed:{},mounted(){let t=this;this.init(),this.$nextTick(()=>{this.$refs.itemSearchRef.focus()}),t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list})},methods:{changeStock(t){},getItemClass(t){this.classId=t,this.refreshData()},getCgStaff(t){this.currentCgStaffId=t,this.refreshData()},batchChangeCgStaff(){if(this.$util.isEmpty(this.selectedData))return this.$message.error("请选择花材"),!1;this.staffData={title:"修改采购负责人",changeType:"batchChangeCgStaff",obj:null},this.$refs.selectStaffRef.init()},bottomDoMore(t){"batchChangeKd"==t&&this.$message.error("开发中")},getStaff(t){let e=this;if("changeCgStaff"==this.staffData.changeType){let s=this.staffData.obj,i=JSON.stringify([s.id]);this.$service.product.batchModifyCgStaff({ids:i,staffId:t.id}).then(t=>{this.$message.success("修改成功"),setTimeout(()=>{e.refreshData()},1e3)})}if("batchChangeCgStaff"==this.staffData.changeType){let s=this.selectedData.map(t=>t.id);this.$service.product.batchModifyCgStaff({ids:JSON.stringify(s),staffId:t.id}).then(t=>{this.$message.success("修改成功"),setTimeout(()=>{e.refreshData()},1e3)})}},changeCgStaff(t){this.staffData={title:"修改采购负责人",changeType:"changeCgStaff",obj:t},this.$refs.selectStaffRef.init()},doMore(t,e){if("downCode"==t){let t=e.id,s=this.$service.item.downMiniCode(t);location.href=s}"costChange"==t&&(this.costData={id:e.id,name:e.name},setTimeout(()=>{this.$refs.costChangeRef.init()}))},searchFocus(){let t=this;setTimeout(()=>{t.$refs.itemSearchRef.focus()},1e3)},changeHasStock(t){this.hasStock=t,this.refreshData()},clearSearch(){""!=this.search&&(this.search="",this.changeSearch())},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.refreshData()}),650)},refreshData(){let t=this;t.app.refresh({classId:t.classId,status:t.status,delStatus:t.delStatus,showPage:1,name:t.search,hasStock:t.hasStock,cgStaffId:this.currentCgStaffId})},getStockList(t){this.itemData={id:t.id,name:t.name},setTimeout(()=>{this.$refs.stockDetailRef.init()})},downloadPrice(t){this.$service.product.generatePriceTable({level:t}).then(t=>{t.file&&(window.location.href=t.file)})},downloadStock(){this.$service.product.generateStockTable().then(t=>{t.file&&(window.location.href=t.file)})},copyProduct(t){this.$message({message:"开发中",type:"warning"})},cancelCopyProduct(t){this.$refs["popover-"+t].doClose()},fillName(t){this.$service.product.py({name:t}).then(t=>{t.py&&(this.replaceForm.py=t.py)}).catch(t=>{console.log(t)})},init(){this.getAllClass(),this.getAllUnit()},selectItemFn(t){let e=t.list,s=t.classId,i=[];e.forEach(t=>{let e={};e.itemId=t.id,e.classId=s,e.cost=t.cost,e.addPrice=t.addPrice,e.stockWarning=t.stockWarning,i.push(e)}),i=JSON.stringify(i),this.$service.item.batchAdd({data:i}).then(t=>{this.$message.success("操作成功!"),this.showItemModal=!1,this.$router.go(0)}).catch(t=>{console.log(t)})},getAllClass(){if(!this.$util.isEmpty(this.itemClassList))return this.itemClassList;this.$service.itemClass.getAllClass().then(t=>{this.itemClassList=t.list})},getAllUnit(){if(!this.$util.isEmpty(this.unitList))return this.unitList;this.$service.unit.getAllUnit().then(t=>{this.unitList=t.list})},addFn(){this.showItemModal=!0},selClassFn(t){let e=this.itemClassList.findIndex(e=>e.name==t);this.replaceForm.classId=this.itemClassList[e].id,this.replaceForm.className=this.itemClassList[e].name,this.$forceUpdate()},selBigUnitFn(t){let e=this.unitList.findIndex(e=>e.name==t);this.replaceForm.bigUnitId=this.unitList[e].id},selSmallUnitFn(t){let e=this.unitList.findIndex(e=>e.name==t);this.replaceForm.smallUnitId=this.unitList[e].id},resetForm(){this.goodsData={},this.$refs["replaceForm"].resetFields(),this.addDialog=!1},setStatusFun(t,e){this.$service.product.changeStatus({id:t,status:e}).then(t=>{this.$message.success("操作成功!"),this.app.refresh()}).catch(t=>{})},setDelStatusFun(t,e){this.$message({message:"开发中",type:"warning"})},replaceConfirmFn(){let t=this.$util.copyObject(this.replaceForm);"http"==this.replaceForm.cover.substr(0,4).toLowerCase()&&(t.cover=this.replaceForm.shortCover),this.$refs.replaceForm.validate(e=>{e&&(0==this.currentItemId?this.$service.product.addProduct(JSON.parse(JSON.stringify(this.replaceForm))).then(t=>{this.$message.success("操作成功!"),this.addDialog=!1,this.app.refresh()}):this.$service.product.update(t).then(t=>{this.$message.success("操作成功!"),this.addDialog=!1,this.app.refresh()}).catch(t=>{}))})},tabClick(t){let e=t.index;0==e?this.app.refresh({status:0,delStatus:2}):1==e?this.app.refresh({status:1,delStatus:0}):2==e?this.app.refresh({status:2,delStatus:0}):3==e&&this.app.refresh({delStatus:1,status:0})},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.classId&&(this.classId=Number(this.$route.query.classId)),""!=this.$route.query.className&&(this.currentItemClassName=this.$route.query.className),this.$route.query.status&&(this.status=this.$route.query.status),this.$route.query.delStatus&&(this.delStatus=this.$route.query.delStatus),t.service(this.$service.product).set("table",{columns:[{type:"selection",align:"center",width:"40"},{prop:"id",label:"ID",align:"center","min-width":70},{prop:"name",label:"名称",align:"center","min-width":140},{prop:"cover",label:"图片",align:"center","min-width":60},{prop:"cost",label:"成本",align:"center","min-width":90},{prop:"hjPrice",label:"大客价",align:"center",minWidth:90},{prop:"price",label:"批发价",align:"center",minWidth:90},{prop:"skPrice",label:"零售价",align:"center",minWidth:90},{prop:"stockWarning",label:"库存预警",align:"center","min-width":80},{prop:"className",label:"分类",align:"center","min-width":90},{prop:"stock",label:"库存",align:"center","min-width":70},{prop:"weight",label:"重量(公斤)",align:"center","min-width":100},{prop:"inTurn",label:"排序",align:"center",minWidth:70},{prop:"unit",label:"单位比",align:"center","min-width":70},{prop:"status",label:"上架",align:"center",minWidth:60},{prop:"cgStaffName",label:"采购人",align:"center",minWidth:90},{prop:"delStatus",label:"状态",align:"center",minWidth:60}],on:{"selection-change":t=>{this.selectedData=t.map(t=>({id:t.id}))}},op:{visible:!0,props:{width:420,align:"center",fixed:"right",label:"操作"},layout:["slot-modify"]}}).set("pagination",{size:50}).set("layout",[["slot-tabs"],["slot-option-area","flex1","slot-addNew-goods-btn","slot-add-goods-btn","slot-download-price-btn","refresh-btn"],["data-table"],["slot-more-do-btn","flex1","pagination"]]).done(),e.refresh({classId:this.classId,status:this.status,delStatus:this.delStatus,showPage:1,name:this.search,hasStock:this.hasStock,cgStaffId:this.currentCgStaffId})},uploadSuccess(){console.log("valid",this.$refs["replaceForm"].validateField("cover"))},refresh(t){this.app.refresh(t)},showAddPrice(){this.initData=[],this.priceInput=!1,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!0,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showSkAddPrice(){this.initData=[],this.priceInput=!1,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!0,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showByAddPrice(){this.initData=[],this.priceInput=!1,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!0,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showHjAddPrice(){this.initData=[],this.priceInput=!1,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!0,this.canZsAddPrice=!1},showZsAddPrice(){this.initData=[],this.priceInput=!1,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!0},showAddRatio(){this.initData=[],this.canAddRatio=!0,this.priceInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.shelfLifeInput=!1,this.costPrice=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showWeight(){this.initData=[],this.costWeight=!0,this.priceInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showInTurn(t){this.initData=[],this.sort.status=!0,this.priceInput=!1,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showPriceInput(t){this.initData=[],this.priceInput=!0,this.shelfLifeInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showStockWarningInput(t){this.initData=[],this.shelfLifeInput=!1,this.priceInput=!1,this.stockWarningInput=!0,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},showShelfLifeInputInput(){this.initData=[],this.shelfLifeInput=!0,this.priceInput=!1,this.stockWarningInput=!1,this.sort.status=!1,this.costPrice=!1,this.canAddRatio=!1,this.costWeight=!1,this.canAddPrice=!1,this.canSkAddPrice=!1,this.canByAddPrice=!1,this.canHjAddPrice=!1,this.canZsAddPrice=!1},hiddenInput(t){switch(t){case"inTurn":this.sort.status=!1;break;case"cost":this.costPrice=!1;break;case"addPrice":this.canAddPrice=!1;break;case"skAddPrice":this.canSkAddPrice=!1;break;case"byAddPrice":this.canByAddPrice=!1;break;case"hjAddPrice":this.canHjAddPrice=!1;break;case"zsAddPrice":this.canZsAddPrice=!1;break;case"ratio":this.canAddRatio=!1;break;case"weight":this.costWeight=!1;break;case"price":this.priceInput=!1;break;case"stockWarning":this.stockWarningInput=!1;break;case"shelfLife":this.shelfLifeInput=!1;break}},commitChange(t){if(this.$util.isEmpty(this.initData))return this.hiddenInput(t),!1;const e=this.$loading({lock:!0,text:"处理中"});this.dataList.form.data=JSON.stringify(this.initData),this.$service.product.productBatchUpdate(this.dataList.form).then(s=>{"price"==t&&this.app.refresh(),e.close(),this.hiddenInput(t)}).catch(t=>{e.close()})},replaceBtnFn(t){this.$message({message:"开发中",type:"warning"})},batchAddNumFun(){if(""==this.batchAddNum)return;let t=this.$refs["xCrud"].table.data;t.forEach(t=>{if("addPrice"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.addPrice)).toFixed(2);t.addPrice=e,this.initData.push({id:t.id,addPrice:t.addPrice})}else if("skAddPrice"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.skAddPrice)).toFixed(2);t.skAddPrice=e,this.initData.push({id:t.id,skAddPrice:t.skAddPrice})}else if("byAddPrice"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.byAddPrice)).toFixed(2);t.byAddPrice=e,this.initData.push({id:t.id,byAddPrice:t.byAddPrice})}else if("hjAddPrice"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.hjAddPrice)).toFixed(2);t.hjAddPrice=e,this.initData.push({id:t.id,hjAddPrice:t.hjAddPrice})}else if("zsAddPrice"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.zsAddPrice)).toFixed(2);t.zsAddPrice=e,this.initData.push({id:t.id,zsAddPrice:t.zsAddPrice})}else if("stockWarning"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.stockWarning)).toFixed(2);t.stockWarning=e,this.initData.push({id:t.id,stockWarning:t.stockWarning})}else if("shelfLife"==this.dataList.form.type){let e=(Number(this.batchAddNum)+Number(t.shelfLife)).toFixed(2);t.shelfLife=e,this.initData.push({id:t.id,shelfLife:t.shelfLife})}}),this.dialogFormVisible=!1},batchAlterNumFun(){if(""==this.batchAlterNum)return;let t=this.$refs["xCrud"].table.data;t.forEach(t=>{"addPrice"==this.dataList.form.type?(t.addPrice=this.batchAlterNum,this.initData.push({id:t.id,addPrice:this.batchAlterNum})):"skAddPrice"==this.dataList.form.type?(t.skAddPrice=this.batchAlterNum,this.initData.push({id:t.id,skAddPrice:this.batchAlterNum})):"byAddPrice"==this.dataList.form.type?(t.byAddPrice=this.batchAlterNum,this.initData.push({id:t.id,byAddPrice:this.batchAlterNum})):"hjAddPrice"==this.dataList.form.type?(t.hjAddPrice=this.batchAlterNum,this.initData.push({id:t.id,hjAddPrice:this.batchAlterNum})):"zsAddPrice"==this.dataList.form.type?(t.zsAddPrice=this.batchAlterNum,this.initData.push({id:t.id,zsAddPrice:this.batchAlterNum})):"stockWarning"==this.dataList.form.type?(t.stockWarning=this.batchAlterNum,this.initData.push({id:t.id,stockWarning:this.batchAlterNum})):"shelfLife"==this.dataList.form.type&&(t.shelfLife=this.batchAlterNum,this.initData.push({id:t.id,shelfLife:this.batchAlterNum}))}),this.dialogFormVisible=!1},showMultiplePop(t,e){this.batchAlterNum="",this.batchAddNum="",this.dialogFormVisible=!0,this.dataList.form.type=e},changeInputValue(t,e){this.dataList.form.type=e;let s={id:t.id};"inTurn"==e?s.inTurn=t.inTurn:"addPrice"==e?s.addPrice=t.addPrice:"skAddPrice"==e?s.skAddPrice=t.skAddPrice:"byAddPrice"==e?s.byAddPrice=t.byAddPrice:"hjAddPrice"==e?s.hjAddPrice=t.hjAddPrice:"zsAddPrice"==e?s.zsAddPrice=t.zsAddPrice:"cost"==e?s.cost=t.cost:"weight"==e?s.weight=t.weight:"ratio"==e?s.ratio=t.ratio:"price"==e?s.price=t.price:"stockWarning"==e?s.stockWarning=t.stockWarning:"shelfLife"==e&&(s.shelfLife=t.shelfLife),this.initData.push(s)}}},u=c,d=(s("68a4"),s("1805")),m=Object(d["a"])(u,i,a,!1,null,"84a35880",null);e["default"]=m.exports},"808f":function(t,e,s){},8091:function(t,e,s){},"80c1":function(t,e,s){"use strict";s.r(e);s("b138");e["default"]={data(){return{form:{mobile:null,password:null,verifyCode:""},saving:!1,loading:!0}},mounted(){this.loading=!1},methods:{captchaChange(){this.form.verifyCode=""},async next(){const{mobile:t,password:e}=this.form;if(!t)return this.$message.warning("用户名不能为空");if(!e)return this.$message.warning("密码不能为空");this.saving=!0;try{await this.$store.dispatch("userLogin",this.form),"business"==this.$projectName?(await this.$store.dispatch("userInfo"),await this.$store.dispatch("shopInfo")):await this.$store.dispatch("adminInfo");const[t]=await this.$store.dispatch("permMenu");this.saving=!1,t?this.$nextTick(()=>{this.$projectName,this.$router.push("/")}):this.$message.error("该账号没有权限")}catch(s){this.saving=!1}}}}},"80f3":function(t,e,s){"use strict";s("5d31")},"81b0":function(t,e,s){var i={"./pages/403/index.vue":"e546","./pages/404/index.vue":"e9da","./pages/500/index.vue":"a3fd","./pages/503/index.vue":"6d81","./pages/iframe/index.vue":"3406","./pages/index.vue":"9261","./pages/layout/index.vue":"5353","./pages/layout/process/index.vue":"573e","./pages/layout/slider/index.vue":"8ee2","./pages/layout/slider/index111.vue":"1b44","./pages/layout/topbar/index.vue":"79b4","./pages/layout/topbar/tools/notice.vue":"fbe1","./pages/login/h5.vue":"78bb","./pages/login/index.js":"80c1","./pages/login/index.vue":"efcf","./pages/login/index1.vue":"a5fd","./pages/my/info.vue":"a4f8","./views/ad/list.vue":"9e95","./views/assets/cgItem.vue":"164d","./views/assets/expendList.vue":"99b3","./views/assets/incomeClass.vue":"a5e4","./views/assets/incomeOutItem.vue":"a72f","./views/assets/itemSale.vue":"25f7","./views/assets/list.vue":"cea0","./views/book/components/book-cg-record.vue":"f707","./views/book/components/book-custom-cg-record.vue":"6690","./views/book/components/book-custom-on-record.vue":"b4f8","./views/book/components/book-custom-record.vue":"a792","./views/book/components/book-custom-road-record.vue":"752b","./views/book/components/book-item-ghs.vue":"11e4","./views/book/components/book-on-record.vue":"27b9","./views/book/components/book-record.vue":"a403","./views/book/components/book-road-record.vue":"957f","./views/book/custom.vue":"b5c8","./views/book/itemCustom.vue":"37cf","./views/coupon/list.vue":"c18e","./views/custom/account.vue":"5d1d","./views/custom/list.vue":"8557","./views/custom/pastAccount.vue":"928d","./views/custom/pastAccountChange.vue":"47a3","./views/custom/yj.vue":"123a","./views/goods/auto-price.vue":"51f3","./views/goods/category.vue":"a17e","./views/goods/freight-set.vue":"e101","./views/goods/goods-add.vue":"dc9e","./views/goods/goods-list.vue":"7a72","./views/goods/img-store.vue":"e0f3","./views/goods/summary.vue":"1d60","./views/home.vue":"6511","./views/in/add.vue":"fd0a","./views/in/book.vue":"63e8","./views/in/change.vue":"7cfe","./views/in/components/begin-refund.vue":"e697","./views/in/components/card-name.vue":"2d14","./views/in/components/detail-draw.vue":"b344","./views/in/components/order-detail.vue":"1635","./views/in/components/refund-record.vue":"fd9d","./views/in/components/sel-order.vue":"db7f","./views/in/confirm.vue":"5999","./views/in/due.vue":"d893","./views/in/ghs-debt-record.vue":"d4cf","./views/in/ghs.vue":"aaa5","./views/in/list.vue":"fecf","./views/in/pastDue.vue":"55b3","./views/in/refund-list.vue":"aacd","./views/in/yj.vue":"dd0f","./views/invite/list.vue":"7abc","./views/invite/reward-set.vue":"b17e","./views/item-class/list.vue":"de2a","./views/item/batch-modify.vue":"6f34","./views/item/import.vue":"913e","./views/item/list.vue":"8014","./views/member/components/card-name.vue":"1e29","./views/member/components/detail-draw.vue":"5703","./views/member/coupon.vue":"d6e4","./views/member/custom-balance-list.vue":"21e7","./views/member/custom-clear-list.vue":"adc9","./views/member/custom-debt-list.vue":"9e56","./views/member/list.vue":"3b65","./views/my-invite/index.vue":"fdaf","./views/order/add-live.vue":"f053","./views/order/add.vue":"1b4b","./views/order/book.vue":"b340","./views/order/components/arrival.vue":"e78b","./views/order/components/begin-refund.vue":"9dba","./views/order/components/card-name.vue":"572d","./views/order/components/live-custom.vue":"c9f9","./views/order/components/live-detail.vue":"6901","./views/order/components/order-detail.vue":"01e4","./views/order/components/refund-record.vue":"0ce5","./views/order/components/sel-order.vue":"f152","./views/order/components/simple-item.vue":"b4a4","./views/order/components/stock-detail.vue":"ad3b","./views/order/components/total-book-cg-record.vue":"073a","./views/order/components/total-book-on-record.vue":"dec1","./views/order/components/total-book-record.vue":"2cd5","./views/order/components/total-book-road-record.vue":"362d","./views/order/confirm.vue":"3ffe","./views/order/list.vue":"3698","./views/order/live-list.vue":"d775","./views/order/refund-list.vue":"52f0","./views/setting/coupon.vue":"526e","./views/setting/level.vue":"183b","./views/setting/set-password.vue":"4ce9","./views/setting/wx-menu.vue":"7dbd","./views/shop/list.vue":"c3d3","./views/staff/list.vue":"e25e","./views/staff/operate.vue":"c681","./views/staff/role-list.vue":"c700","./views/staff/sendYj.vue":"3e49","./views/system/log/index.vue":"b380","./views/system/menu/index.vue":"f794","./views/system/param/index.vue":"8236","./views/system/perf/ct.vue":"8238","./views/system/perf/index.vue":"cf6c","./views/system/perf/mixins.js":"a9aa","./views/system/perf/mysql.vue":"af4a","./views/system/perf/network.vue":"5152","./views/system/perf/redis.vue":"670e","./views/system/role/index.vue":"70eb","./views/system/task/index.vue":"6133","./views/system/user/index.vue":"1f34"};function a(t){var e=r(t);return s(e)}function r(t){if(!s.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}a.keys=function(){return Object.keys(i)},a.resolve=r,t.exports=a,a.id="81b0"},8227:function(t,e,s){"use strict";s("f935")},8236:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-content",fn:function({scope:s}){return t._l(t.tab.list,(function(i,a){return e("div",{key:a,staticClass:"editor"},[t.tab.index===a?[e("el-button",{staticClass:"change-btn",attrs:{size:"mini"},on:{click:function(e){return t.changeTab(i.to)}}},[t._v(t._s(i.label))]),e(i.component,{tag:"component",attrs:{height:"300px"},model:{value:s.data,callback:function(e){t.$set(s,"data",e)},expression:"scope.data"}})]:t._e()],2)}))}}])})},a=[],r={data(){return{crud:null,tab:{index:null,list:[{label:"切换富文本编辑器",to:1,component:"cl-code"},{label:"切换代码编辑器",to:0,component:"cl-editor-quill"}]}}},methods:{onLoad({ctx:t,app:e}){this.crud=e,t.service(this.$service.system.param).set("upsert",{props:{width:"1000px"},items:[{prop:"name",label:"名称",span:12,component:{name:"el-input",attrs:{placeholder:"请输入名称"}},rules:{required:!0,message:"名称不能为空"}},{prop:"key",label:"Key",span:12,component:{name:"el-input",attrs:{placeholder:"请输入Key"}},rules:{required:!0,message:"Key不能为空"}},{prop:"data",label:"数据",component:{name:"slot-content"}},{prop:"remark",label:"备注",component:{name:"el-input",props:{type:"textarea"},attrs:{placeholder:"请输入备注",rows:3}}}]}).set("table",{columns:[{type:"selection",align:"center",width:60},{label:"名称",prop:"name",align:"center"},{label:"Key",prop:"key",align:"center"},{label:"数据",prop:"data",align:"center","show-overflow-tooltip":!0},{label:"备注",prop:"remark",align:"center"}]}).set("layout",[["refresh-btn","add-btn","multi-delete-btn","flex1","search-key"],["data-table"],["flex1","pagination"]]).on("open",(t,e)=>{this.tab.index=t?/<*>/g.test(e.data)?1:0:1}).done(),e.refresh()},changeTab(t){this.$confirm("切换编辑器会清空输入内容,是否继续?","提示",{type:"warning"}).then(()=>{this.tab.index=t,this.crud.setForm("data","")}).catch(()=>{})}}},o=r,n=(s("7c4e"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"22bcb384",null);e["default"]=l.exports},8238:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"ct"},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{xl:4,md:12}},[e("div",{staticClass:"block"},[e("p",{staticClass:"label"},[t._v("负载状态")]),e("el-popover",{attrs:{width:"100",trigger:"hover"}},[e("div",{staticClass:"system-perf-progress-popover"},[e("ul",[e("li",[t._v("CPU:"+t._s(t._f("fixed2")(t.cpu.perc))+" %")]),e("li",[t._v("内存:"+t._s(t._f("fixed2")(t.mem.perc))+" %")])])]),e("el-progress",{attrs:{slot:"reference",type:"circle",percentage:t._f("fixed2")(t.lb.perc),color:t._f("status_color")(t.lb.perc)},slot:"reference"})],1)],1)]),e("el-col",{attrs:{xl:4,md:12}},[e("div",{staticClass:"block"},[e("p",{staticClass:"label"},[t._v("CPU存使用率")]),e("el-progress",{attrs:{type:"circle",percentage:t._f("fixed2")(t.cpu.perc),color:t._f("status_color")(t.cpu.perc)}})],1)]),e("el-col",{attrs:{xl:4,md:12}},[e("div",{staticClass:"block"},[e("p",{staticClass:"label"},[t._v("内存使用率")]),e("el-popover",{attrs:{width:"100",trigger:"hover"}},[e("div",{staticClass:"system-perf-progress-popover"},[e("ul",[e("li",[t._v("总数:"+t._s(t._f("unit_size")(t.mem.total)))]),e("li",[t._v("已使用:"+t._s(t._f("unit_size")(t.mem.used)))])])]),e("el-progress",{attrs:{slot:"reference",type:"circle",percentage:t._f("fixed2")(t.mem.perc),color:t._f("status_color")(t.mem.perc)},slot:"reference"})],1)],1)]),t._l(t.disk.list,(function(s,i){return e("el-col",{key:i,attrs:{xl:4,md:12}},[e("div",{staticClass:"block"},[e("p",{staticClass:"label"},[t._v(t._s(s.mount))]),e("el-popover",{attrs:{width:"100",trigger:"hover"}},[e("div",{staticClass:"system-perf-progress-popover"},[e("ul",[e("li",[t._v("总数:"+t._s(t._f("unit_size")(s.size)))]),e("li",[t._v("已使用:"+t._s(t._f("unit_size")(s.used)))])])]),e("el-progress",{attrs:{slot:"reference",type:"circle",percentage:t._f("fixed2")(s.use),color:t._f("status_color")(s.use)},slot:"reference"})],1)],1)])}))],2)],1)},a=[],r=(s("865d"),s("8f26"),s("d9d9"),s("666b"),s("963e"),s("1447"),s("a9aa")),o={filters:{status_color(t){return t<50?"#67C23A":t<70?"#E6A23C":t<100?"#F56C6C":void 0}},mixins:[r["default"]],data(){return{lb:{perc:0},redis:{options:{},perc:0},mysql:{options:{},number:0,perc:0},cpu:{options:{},perc:0},mem:{perc:0,total:0,used:0},disk:{list:[],all:0}}},methods:{refresh(t){const{data:e}=t,s=e[e.length-1];this.toMysql(t,s.mysql),this.toRedis(t,s.redis),this.toCPU(t,s.server.cpu),this.toDisk(s.server.disk.filter(t=>t.size)),this.toMem(s.server.mem),this.toLB()},toLB(){let t=this.mem.perc,e=this.cpu.perc;this.lb.perc=t>=90?t:e>=80?e:.4*t+.6*e},toCPU(t,e){this.cpu.perc=e.currentload},toMem(t){this.mem.perc=t.buffcache/t.total*100,this.mem.total=t.total,this.mem.used=t.buffcache},toDisk(t){this.disk.all=t.reduce((t,e)=>t+e.size,0),this.disk.list=t.map(t=>(t.use=t.use.toFixed(2),t))},toRedis(t,e){this.redis.perc=parseFloat(e.Memory.used_memory_dataset_perc)},toMysql(t,e){let s=0,i=0;e.mysqlSize.forEach(t=>{s+=parseFloat(t.data_free),i+=parseFloat(t.data_size)}),this.mysql.number=e.mysqlSize.length,this.mysql.perc=(i/(s+i)).toFixed(2)}}},n=o,l=(s("37e2"),s("adad"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"2d9d580d",null);e["default"]=c.exports},"845d":function(t,e,s){"use strict";s("2771")},8557:function(t,e,s){"use strict";s.r(e);var i,a,r=s("1805"),o={},n=Object(r["a"])(o,i,a,!1,null,null,null);e["default"]=n.exports},"86f0":function(t,e,s){"use strict";s("8091")},"8c85":function(t,e,s){"use strict";s("01b4")},"8d14":function(t,e,s){"use strict";s("0867")},"8d73":function(t,e,s){},"8de4":function(t,e,s){"use strict";s("5810")},"8ea4":function(t,e,s){"use strict";s("1cb5")},"8ee2":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"scope-slider"},[e("div",{staticClass:"main-list"},t._l(t.menuGroup,(function(s,i){return e("div",{key:i,staticClass:"list",class:[t.mainIndex==i?"active":""],on:{click:function(e){return t.pageMianTo(s,i)}}},[e("i",{staticClass:"iconfont",class:[s.icon]}),e("div",{staticClass:"list-name-wrap"},[e("div",{staticClass:"list-name"},[t._v(t._s(s.name))])])])})),0),e("div",{directives:[{name:"show",rawName:"v-show",value:!t.$util.isEmpty(t.subData),expression:"!$util.isEmpty(subData)"}],staticClass:"sub-list"},t._l(t.subData,(function(s,i){return e("div",{key:i,staticClass:"list",class:[t.subIndex==i?"active":""],on:{click:function(e){return t.pageSubTo(s,i)}}},[t._v(" "+t._s(s.name)+" ")])})),0)])},a=[],r=(s("b138"),s("5880")),o={name:"scope-slide",data(){return{mainIndex:0,subIndex:0}},watch:{$route(t,e){this.init()}},computed:{...Object(r["mapGetters"])(["menuGroup"]),subData(){if(this.$util.isEmpty(this.menuGroup))return[];let t=this.menuGroup[this.mainIndex].children;return this.$util.isEmpty(t)?[]:t}},mounted(){this.init()},methods:{init(){let t=this.$route.path;for(let e in this.menuGroup)if(this.menuGroup[e].children.length>0)for(let s in this.menuGroup[e].children)t==this.menuGroup[e].children[s].path&&(this.mainIndex=e,this.subIndex=s);else t==this.menuGroup[e].path&&(this.mainIndex=e,this.subIndex=0)},pageMianTo(t,e){this.mainIndex=e,this.$util.isEmpty(t.children)?this.$router.push(t.path):(this.$router.push(t.children[0].path),this.subIndex=0)},pageSubTo(t,e){0==e&&this.$router.push("/item-class/1"),this.subIndex=e,this.$nextTick(()=>{this.$router.push(t.path)})}}},n=o,l=(s("ac6f"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"466dfd95",null);e["default"]=c.exports},"8faf":function(t,e,s){},9030:function(t,e,s){},"913e":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex-center-between app-list-content"},[e("div",{staticClass:"left-box"},[e("div",{staticClass:"flex-center-center title"},[t._v("平台花材")]),e("div",{staticClass:"flex-center-between center-box"},[e("div",{staticClass:"class-list"},t._l(t.leftClassList,(function(s,i){return e("div",{key:i,staticClass:"flex-center-center",class:{class_name:t.leftTabCurrent==i},on:{click:function(e){return t.classTabChange(s,i)}}},[t._v(t._s(s.name))])})),0),e("div",{staticClass:"item-box"},[e("div",{staticClass:"flex-center item-seek-box"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.keyword,expression:"keyword"}],attrs:{type:"text",placeholder:"请输入汉字拼音首字母搜索"},domProps:{value:t.keyword},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.search.apply(null,arguments)},input:function(e){e.target.composing||(t.keyword=e.target.value)}}}),e("div",{staticClass:"flex-center-center item-seek-btn",on:{click:t.search}},[t._v("搜索")])]),e("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.classIfyClick,expression:"classIfyClick"}],staticClass:"infinite-list",staticStyle:{overflow:"auto"},attrs:{"infinite-scroll-delay":100,"infinite-scroll-distance":300}},t._l(t.leftItemList,(function(s,i){return e("li",{key:i,staticClass:"flex-center infinite-list-item",on:{click:function(e){return t.leftSelect(s,i)}}},[2==s.select?e("span",{staticClass:"el-icon-success disbale"}):e("span",{staticClass:"el-icon-success",class:s.Uselect?"select":"unSelect"}),e("div",{staticStyle:{width:"40px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:s.cover}})]),e("div",{staticStyle:{"margin-left":"5px"}},[e("div",{staticStyle:{"font-weight":"bold","font-size":"14px"}},[t._v(t._s(s.name))]),0==s.ratioType?e("div",{staticStyle:{color:"rgb(124 121 121)","font-size":"12px"}},[t._v(t._s(s.ratio)+t._s(s.smallUnit))]):e("div",{staticStyle:{color:"rgb(124 121 121)","font-size":"12px"}},[t._v("若干"+t._s(s.smallUnit))])])])})),0),e("div",{staticClass:"flex-center item-menu-box"},[e("el-checkbox",{on:{change:t.allSelectItem},model:{value:t.checkedAll,callback:function(e){t.checkedAll=e},expression:"checkedAll"}},[t._v("全选")])],1)])])]),e("div",{staticClass:"flex-center-center content-box"},[e("div",{staticClass:"switchover-box"},[e("div",{staticClass:"flex-center-center",on:{click:t.turnRight}},[e("i",{staticClass:"el-icon-right"})]),e("div",{staticClass:"flex-center-center",on:{click:t.turnLsft}},[e("i",{staticClass:"el-icon-back"})])])]),e("div",{staticClass:"right-box"},[e("div",{staticClass:"flex-center-center title"},[t._v("我的花材")]),e("div",{staticClass:"flex-center-between center-box"},[e("div",{staticClass:"item-box"},[t._m(0),e("ul",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.rightcell,expression:"rightcell"}],staticClass:"infinite-list",staticStyle:{height:"calc(100% - 80px)",overflow:"auto"},attrs:{"infinite-scroll-delay":100,"infinite-scroll-distance":300}},t._l(t.rightItemList,(function(s,i){return e("li",{key:i,staticClass:"flex-center infinite-list-item"},[e("div",{staticStyle:{width:"70px","text-align":"center"},on:{click:function(e){return t.rightSelect(s,i)}}},[s.select?e("span",{staticClass:"el-icon-success disbale"}):e("span",{staticClass:"el-icon-success",class:s.Uselect?"select":"unSelect"})]),e("div",{staticStyle:{width:"40px","text-align":"center","margin-right":"3px"},on:{click:function(e){return t.rightSelect(s,i)}}},[e("img",{staticStyle:{margin:"0 auto",width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:s.cover}})]),e("div",{staticStyle:{width:"120px","text-align":"center"}},[e("el-input",{staticStyle:{width:"120px"},attrs:{placeholder:"请输入",disabled:s.select},on:{click:function(t){t.stopPropagation()}},model:{value:s.uname,callback:function(e){t.$set(s,"uname",e)},expression:"item.uname"}})],1),e("div",{staticStyle:{width:"100px","text-align":"center"}},[e("el-input",{staticStyle:{width:"80px"},attrs:{placeholder:"请输入",disabled:s.select},on:{click:function(t){t.stopPropagation()}},model:{value:s.cost,callback:function(e){t.$set(s,"cost",e)},expression:"item.cost"}})],1),e("div",{staticStyle:{width:"100px","text-align":"center"}},[e("el-input",{staticStyle:{width:"80px"},attrs:{placeholder:"请输入",disabled:s.select},on:{click:function(t){t.stopPropagation()}},model:{value:s.price,callback:function(e){t.$set(s,"price",e)},expression:"item.price"}})],1),e("div",{staticStyle:{width:"100px","text-align":"center"}},[e("el-input",{staticStyle:{width:"80px"},attrs:{placeholder:"请输入",disabled:s.select},on:{click:function(t){t.stopPropagation()}},model:{value:s.skPrice,callback:function(e){t.$set(s,"skPrice",e)},expression:"item.skPrice"}})],1)])})),0),e("div",{staticClass:"flex-center item-menu-box"},[e("el-checkbox",{on:{change:t.allSelectItemRight},model:{value:t.checkedAllRight,callback:function(e){t.checkedAllRight=e},expression:"checkedAllRight"}},[t._v("全选")]),e("div",{staticClass:"flex-center-center",staticStyle:{width:"100px",height:"30px","line-height":"30px","text-align":"center",color:"#ffffff",background:"#008ad3","border-radius":"5px",cursor:"pointer",display:"inline-block","margin-left":"30px"},on:{click:t.saveBtn}},[t._v("提交")])],1)]),e("div",{staticClass:"class-list"},t._l(t.rightClassList,(function(s,i){return e("div",{key:i,staticClass:"flex-center-center",class:{class_name:t.rightTabCurrent==i},on:{click:function(e){return t.rightTabClick(s,i)}}},[t._v(t._s(s.name))])})),0)])])])},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"flex-center infinite-list-title"},[e("div",{staticStyle:{width:"70px","text-align":"center"}},[t._v("选择")]),e("div",{staticStyle:{width:"70px","text-align":"center"}},[t._v("图片")]),e("div",{staticStyle:{width:"120px","text-align":"center"}},[t._v("名称")]),e("div",{staticStyle:{width:"100px","text-align":"center"}},[t._v("成本价")]),e("div",{staticStyle:{width:"100px","text-align":"center"}},[t._v("花店价")]),e("div",{staticStyle:{width:"100px","text-align":"center"}},[t._v("个人价")])])}],r=(s("b138"),s("8f26"),s("666b"),s("209c"),s("f803"),s("5880"),{name:"item_add",components:{},data(){return{count:0,input:0,checked:!1,checkedAll:!1,leftClassList:[],leftTabCurrent:0,ptClassName:"",ptClassId:"",leftItemList:[],pageNum:1,maxPage:0,rightClassList:[],rightTabCurrent:0,ptRightName:"",ptRightId:"",pageNum1:1,rightItemList:[],maxPage1:0,rightItemList2:[],leftCheckedList:[],rightCheckedList:[],keyword:"",scrollLoadCount:0,scrollLoadCount1:0,checkedAllRight:!1}},mounted(){this.getLeftList(),this.getRightLst()},methods:{getLeftList(){this.$service.ghsItemClass.getFullClass().then(t=>{this.leftClassList=t.list,this.ptClassId=t.list[0].id,this.getItemList()})},getRightLst(){this.$service.itemClass.getAllClass().then(t=>{this.rightClassList=t.list,this.ptRightName=t.list[0].name,this.ptRightId=t.list[0].id,this.getRightItemList()}).catch(t=>{})},getItemList(){let t={page:this.pageNum,pageSize:20,name:this.keyword,classId:this.ptClassId};this.$service.ptItem.list(t).then(t=>{t.list.forEach(t=>{t.Uselect=!1,t.flag=!0,t.cost="",t.price="",t.skPrice="",t.uname=t.name}),1!=this.pageNum?this.leftItemList=this.leftItemList.concat(t.list):this.leftItemList=t.list,this.maxPage=t.moreData}).catch(t=>{})},getRightItemList(){let t={page:this.pageNum1,pageSize:20,classId:this.ptRightId};this.$service.product.list(t).then(t=>{t.list.forEach(t=>{t.select=!0,t.uname=t.name}),1!=this.pageNum1?this.rightItemList=this.rightItemList.concat(t.list):this.rightItemList=t.list,this.rightItemList2=this.deepClone(this.rightItemList),this.maxPage1=t.moreData}).catch(t=>{})},allSelectItem(t){this.leftCheckedList=[],this.checkedAll?this.leftItemList.forEach(t=>{2!=t.select&&(t.Uselect=!0),t.Uselect&&2!==t.select&&this.leftCheckedList.push(t)}):this.leftItemList.forEach(t=>{2!=t.select&&(t.Uselect=!1)})},allSelectItemRight(){this.rightCheckedList=[],this.checkedAllRight?this.rightItemList.forEach(t=>{t.select||(t.Uselect=!0),t.Uselect&&!t.select&&this.rightCheckedList.push(t)}):this.rightItemList.forEach(t=>{t.selec||(t.Uselect=!1)})},load(){this.count+=2},classTabChange(t,e){this.rightItemList.length!==this.rightItemList2.length?this.$confirm("有选中的花材,是否继续切换","提示",{type:"warning"}).then(()=>{this.leftTabCurrent=e,this.ptClassId=t.id,this.isSelect(t,e)}).catch(()=>{this.$message({type:"info",message:"已取消切换"})}):(this.leftTabCurrent=e,this.ptClassId=t.id,this.pageNum=1,this.getItemList())},classIfyClick(){this.scrollLoadCount++,this.scrollLoadCount<=1||(this.pageNum++,1==this.maxPage&&this.getItemList())},leftSelect(t,e){this.leftCheckedList=[];let s=[];2!=t.select&&(this.leftItemList[e].Uselect=!this.leftItemList[e].Uselect),this.leftItemList.forEach(t=>{t.Uselect&&2!==t.select&&this.leftCheckedList.push(t),2!==t.select&&s.push(t)}),this.leftCheckedList.length==s.length?this.checkedAll=!0:this.checkedAll=!1},search(){this.pageNum=1,this.getItemList()},rightSelect(t,e){this.rightCheckedList=[];let s=[];t.select||(this.rightItemList[e].Uselect=!this.rightItemList[e].Uselect),this.rightItemList.forEach(t=>{t.Uselect&&this.rightCheckedList.push(t),t.select||s.push(t)}),this.rightCheckedList.length==s.length?this.checkedAllRight=!0:this.checkedAllRight=!1},rightTabClick(t,e){this.rightItemList.length!==this.rightItemList2.length?this.$confirm("有选中的花材,是否继续切换","提示",{type:"warning"}).then(()=>{this.rightTabCurrent=e,this.ptRightName=t.name,this.ptRightId=t.id,this.isSelect()}).catch(()=>{this.$message({type:"info",message:"已取消切换"})}):(this.rightTabCurrent=e,this.ptRightName=t.name,this.ptRightId=t.id,this.pageNum1=1,this.getRightItemList())},isSelect(){this.pageNum=1,this.pageNum1=1,this.getRightItemList(),this.getItemList()},rightcell(){this.scrollLoadCount1++,this.scrollLoadCount1<=1||(this.pageNum1++,1==this.maxPage1&&this.getRightItemList())},turnRight(){if(this.leftCheckedList){let t=JSON.parse(JSON.stringify(this.leftCheckedList));t.forEach(t=>{t.select=!1,t.Uselect=!1;let e=this.leftItemList.findIndex(e=>e.id==t.id);this.leftItemList.splice(e,1)}),this.rightItemList=[...t,...this.rightItemList],this.leftCheckedList=[],this.checkedAll=!1}else this.$message.warning("请先选择花材")},turnLsft(){if(0!==this.rightCheckedList.length){let t=JSON.parse(JSON.stringify(this.rightCheckedList));t.forEach((t,e)=>{t.select=1,t.Uselect=!1;let s=this.rightItemList.findIndex(e=>e.id==t.id);this.rightItemList.splice(s,1)}),this.leftItemList=[...t,...this.leftItemList],this.rightCheckedList=[],this.checkedAllRight=!1}else this.$message.warning("请先选择花材")},deepClone(t){let e;if("object"===typeof t)if(Array.isArray(t)){e=[];for(const s in t)e.push(this.deepClone(t[s]))}else if(null===t)e=null;else if(t.constructor===RegExp)e=t;else{e={};for(const s in t)e[s]=this.deepClone(t[s])}else e=t;return e},saveBtn(){return this.$message.warning("开发中"),!1},saveCommit(){let t=[],e=[];this.rightItemList.forEach(e=>{1==e.flag&&t.push(e)}),t.forEach(t=>{let s={};s.itemId=t.id,s.classId=this.ptRightId,s.price=t.price,s.skPrice=t.skPrice,s.cost=t.cost,s.name=t.uname,e.push(s)}),this.$service.item.batchAdd({data:JSON.stringify(e)}).then(t=>{this.$message.success("添加成功"),this.isSelect()}).catch(t=>{})}}}),o=r,n=(s("f9e6"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"2f9d3898",null);e["default"]=l.exports},9261:function(t,e,s){"use strict";s.r(e);var i,a,r=s("1805"),o={},n=Object(r["a"])(o,i,a,!1,null,null,null);e["default"]=n.exports},"928d":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"date",placeholder:"选择日期","value-format":"yyyy-MM-dd"},on:{change:t.getSearchDate},model:{value:t.endTime,callback:function(e){t.endTime=e},expression:"endTime"}})]},proxy:!0},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("累计金额:"+t._s(t.totalAmount))])]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportDue()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goChange(s.row)}}},[t._v("查看明细")])]}}])})],1)},a=[],r=(s("b138"),s("5880")),o={data(){return{crud:null,currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,debt:"-1"}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{goChange(t){let e={};e.customId=t.id,e.endTime=this.endTime,this.$router.push({path:"/custom/pastAccountChange",query:e})},exportDue(){this.$service.order.getPastList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.order.getPastList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>(this.totalAmount=t.totalAmount?t.totalAmount:0,{list:t.list}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"名称",prop:"name",align:"center"},{label:"手机号",prop:"mobile",align:"center"},{label:"欠款金额",prop:"currentDebAmount",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-date-select","flex1","slot-export-due","refresh-btn"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getSearchDate(){this.searchTime="custom",this.startTime=this.endTime,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})},changeDebt(t){this.debt=t,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})}}},n=o,l=(s("ff37"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"6e6ae0de",null);e["default"]=c.exports},9340:function(t,e,s){},"940c":function(t,e,s){},"94cf":function(t,e,s){},"955f":function(t,e,s){},"957f":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.currentData.customName?t.currentData.customName:"")+"】"+t._s(t.currentData.itemName?t.currentData.itemName:"")+" 路上记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-road-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookRoadChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})}}},o=r,n=(s("b392"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"5f7bd04a",null);e["default"]=l.exports},9972:function(t,e,s){"use strict";s("561b")},"99b3":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.addTime))])]}},{key:"table-column-amount",fn:function({scope:s}){return[1==s.row.io?e("span",[t._v("+")]):e("span",[t._v("-")]),t._v(" "+t._s(s.row.amount)+" ")]}},{key:"table-column-payWay",fn:function({scope:s}){return[0==s.row.payWay?e("span",[t._v("微信支付")]):1==s.row.payWay?e("span",[t._v("支付宝")]):2==s.row.payWay?e("span",[t._v("余额")]):e("span",[t._v("-")])]}},{key:"table-column-fromType",fn:function({scope:s}){return[0==s.row.fromType?e("span",[t._v("门店")]):1==s.row.fromType?e("span",[t._v("商城")]):2==s.row.fromType?e("span",[t._v("朋友圈")]):e("span",[t._v("-")])]}}])})],1)},a=[],r=s("74ad"),o={name:"assets-list",methods:{onLoad({ctx:t,app:e}){this.app=e,t.service(r["default"]).set("table",{columns:[{prop:"addTime",label:"时间",align:"center"},{prop:"event",label:"事项",align:"center"},{prop:"amount",label:"支出",align:"center"},{prop:"totalExpend",label:"累计支出",align:"center"}],op:{visible:!1,props:{width:100,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["flex1","slot-add-ad-btn","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh({io:"0"})}}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,"0e93227a",null);e["default"]=c.exports},"9a12":function(t,e,s){"use strict";s("ab4e")},"9b67":function(t,e,s){(function(t,e){(function(t,s){"use strict";if(!t.setImmediate){var i,a=1,r={},o=!1,n=t.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(t);l=l&&l.setTimeout?l:t,"[object process]"==={}.toString.call(t.process)?p():h()?f():t.MessageChannel?b():n&&"onreadystatechange"in n.createElement("script")?g():v(),l.setImmediate=c,l.clearImmediate=u}function c(t){"function"!==typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),s=0;s<e.length;s++)e[s]=arguments[s+1];var o={callback:t,args:e};return r[a]=o,i(a),a++}function u(t){delete r[t]}function d(t){var e=t.callback,i=t.args;switch(i.length){case 0:e();break;case 1:e(i[0]);break;case 2:e(i[0],i[1]);break;case 3:e(i[0],i[1],i[2]);break;default:e.apply(s,i);break}}function m(t){if(o)setTimeout(m,0,t);else{var e=r[t];if(e){o=!0;try{d(e)}finally{u(t),o=!1}}}}function p(){i=function(t){e.nextTick((function(){m(t)}))}}function h(){if(t.postMessage&&!t.importScripts){var e=!0,s=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=s,e}}function f(){var e="setImmediate$"+Math.random()+"$",s=function(s){s.source===t&&"string"===typeof s.data&&0===s.data.indexOf(e)&&m(+s.data.slice(e.length))};t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),i=function(s){t.postMessage(e+s,"*")}}function b(){var t=new MessageChannel;t.port1.onmessage=function(t){var e=t.data;m(e)},i=function(e){t.port2.postMessage(e)}}function g(){var t=n.documentElement;i=function(e){var s=n.createElement("script");s.onreadystatechange=function(){m(e),s.onreadystatechange=null,t.removeChild(s),s=null},t.appendChild(s)}}function v(){i=function(t){setTimeout(m,0,t)}}})("undefined"===typeof self?"undefined"===typeof t?this:t:self)}).call(this,s("a282"),s("0743"))},"9b85":function(t,e,s){"use strict";s("f3f1")},"9c66":function(t,e,s){},"9d77":function(t,e,s){},"9da5":function(t,e,s){"use strict";s("12c8")},"9dba":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showDtail,size:"750px","custom-class":"order-draw-wrap",direction:"ltr"},on:{"update:visible":function(e){t.showDtail=e},close:t.closeTrigger}},[t.$util.isEmpty(t.orderInfo)?t._e():e("div",{staticClass:"order-manage-wrap"},[e("div",[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 退款方式 "),e("div",{staticClass:"accounts-center"},[1==t.refundType?e("div",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){t.refundType=1}}},[t._v("退货并退款")]),e("el-button",{staticStyle:{"margin-left":"20px"},on:{click:function(e){t.refundType=2}}},[t._v("仅退款")])],1):e("div",[e("el-button",{on:{click:function(e){t.refundType=1}}},[t._v("退货并退款")]),e("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"primary"},on:{click:function(e){t.refundType=2}}},[t._v("仅退款")])],1)])])]),e("div",[1==t.refundType?e("div",{staticClass:"refund-item-list"},[e("div",{staticClass:"refund-label"},[t._v("选择花材")]),e("div",t._l(t.product,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"flex list-title"},[e("span",{staticClass:"product-name"},[t._v(t._s(s.name))]),e("span",{staticClass:"product-num"},[t._v(t._s(""+parseFloat(s.xhNum))+t._s(s.xhUnitName))]),e("span",{staticClass:"product-price"},[t._v(t._s(""+parseFloat(s.xhUnitPrice))+"元/"+t._s(s.xhUnitName))])]),e("div",{staticClass:"flex list-val",staticStyle:{"font-size":"18px","font-weight":"bold"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:s.refundCount,expression:"res.refundCount"}],attrs:{type:"text",placeholder:"退货数","placeholder-style":"color:#CCCCCC"},domProps:{value:s.refundCount},on:{input:function(e){e.target.composing||t.$set(s,"refundCount",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(s.xhUnitName))]),e("span",{staticStyle:{color:"green","margin-left":"20px"}},[t._v("可退"+t._s(Number(s.xhNum)-Number(s.refundNum))+t._s(s.xhUnitName))])])])})),0)]):t._e(),Number(t.orderInfo.packCost)>0||Number(t.orderInfo.sendCost)>0?e("div",{staticClass:"refund-item-list"},[e("div",{staticClass:"refund-label"},[t._v("其他可退:")]),e("div",[Number(t.orderInfo.packCost)>0?e("div",{staticClass:"list"},[e("div",{staticClass:"flex list-title"},[e("span",{staticClass:"product-name"},[t._v("打包费")]),e("span",{staticClass:"product-num"},[t._v(t._s(t.orderInfo.packCost?parseFloat(t.orderInfo.packCost):0)+"元")])]),e("div",{staticClass:"flex list-val",staticStyle:{"font-size":"17px","font-weight":"bold"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.orderInfo.refundPackCostAmount,expression:"orderInfo.refundPackCostAmount"}],attrs:{type:"digit",placeholder:"金额","placeholder-style":"color:#CCCCCC"},domProps:{value:t.orderInfo.refundPackCostAmount},on:{input:function(e){e.target.composing||t.$set(t.orderInfo,"refundPackCostAmount",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v("元")]),e("span",{staticStyle:{color:"green","margin-left":"20px"}},[t._v("可退"+t._s(parseFloat((Number(t.orderInfo.packCost)-Number(t.orderInfo.refundPackCost)).toFixed(2)))+"元")])])]):t._e(),Number(t.orderInfo.sendCost)>0?e("div",{staticClass:"list"},[e("div",{staticClass:"flex list-title"},[e("span",{staticClass:"product-name"},[t._v("运费")]),e("span",{staticClass:"product-num"},[t._v(t._s(t.orderInfo.sendCost?parseFloat(t.orderInfo.sendCost):0)+"元")])]),e("div",{staticClass:"flex list-val",staticStyle:{"font-size":"17px","font-weight":"bold"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.orderInfo.refundSendCostAmount,expression:"orderInfo.refundSendCostAmount"}],attrs:{type:"digit",placeholder:"金额","placeholder-style":"color:#CCCCCC"},domProps:{value:t.orderInfo.refundSendCostAmount},on:{input:function(e){e.target.composing||t.$set(t.orderInfo,"refundSendCostAmount",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v("元")]),e("span",{staticStyle:{color:"green","margin-left":"20px"}},[t._v("可退"+t._s(parseFloat((Number(t.orderInfo.sendCost)-Number(t.orderInfo.refundSendCost)).toFixed(2)))+"元")])])]):t._e()])]):t._e()]),e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 退款原因 "),e("div",{staticClass:"accounts-center"},[e("el-button",{class:[0==t.cause?"active-button":""],attrs:{size:"small"},on:{click:function(e){t.cause=0}}},[t._v("质量问题")]),e("el-button",{class:[1==t.cause?"active-button":""],staticStyle:{"margin-left":"20px"},attrs:{size:"small"},on:{click:function(e){t.cause=1}}},[t._v("多开错开")]),e("el-button",{class:[2==t.cause?"active-button":""],staticStyle:{"margin-left":"20px"},attrs:{size:"small"},on:{click:function(e){t.cause=2}}},[t._v("打包原因")]),e("el-button",{class:[3==t.cause?"active-button":""],staticStyle:{"margin-left":"20px"},attrs:{size:"small"},on:{click:function(e){t.cause=3}}},[t._v("物流原因")])],1)])]),e("div",{staticClass:"accounts-list"},[t._v(" 订单金额 "),e("div",{staticClass:"accounts-center"},[t._v(" ¥"+t._s(t.orderInfo.orderPrice?parseFloat(t.orderInfo.orderPrice):0)+" "),Number(t.orderInfo.tkPrice)>0?e("span",{staticStyle:{"margin-left":"15px","font-size":"18px",color:"green","font-weight":"bold"}},[t._v("已退¥"+t._s(t.orderInfo.tkPrice?parseFloat(t.orderInfo.tkPrice):0))]):t._e()])]),e("div",{staticClass:"accounts-list"},[t._v(" 可退金额 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(t.couldRefundPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 预计退款 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(t.refundPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 实际退款 "),e("div",{staticClass:"accounts-center"},[e("el-input",{staticStyle:{width:"120px"},attrs:{placeholder:"输入金额"},on:{focus:function(e){t.refundMoney=""}},model:{value:t.refundMoney,callback:function(e){t.refundMoney=e},expression:"refundMoney"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 备注内容 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:t.remark,callback:function(e){t.remark=e},expression:"remark"}})],1)])]),e("div",{staticStyle:{padding:"20upx 0 20upx 0","font-size":"30upx","font-weight":"bold","margin-left":"70px"}},[2==t.orderInfo.onlinePay?e("span",{staticStyle:{color:"green"}},[t._v("此单线上付款,提交后,钱会原路自动退回给客户")]):[Number(t.orderInfo.debtPrice)>0?e("span",{staticStyle:{color:"#3385ff"}},[t._v(" 此单为欠款单,提交后,欠款金额会自动减少 ")]):e("span",{staticStyle:{color:"red"}},[t._v("此单线下付款,提交后钱不会原路退回,请线下转账给客户")])]],2),e("div",{staticStyle:{"margin-left":"80px","margin-top":"20px"}},[e("el-button",{staticStyle:{"margin-left":"120px"},on:{click:t.closeOpen}},[t._v("取消")]),e("el-popconfirm",{staticStyle:{"margin-left":"180px"},attrs:{title:"确认退款?"},on:{confirm:function(e){return t.confirmRefund()},onConfirm:function(e){return t.confirmRefund()}}},[e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("确认")])],1)],1),t.$util.isEmpty(t.unClear)?t._e():e("div",{staticStyle:{"font-size":"20px","z-index":"9999",color:"red","text-align":"center","font-weight":"bold","margin-bottom":"30px"}},[e("span",[t._v("有一个待结账单 ¥"+t._s(t.unClear.actPrice?parseFloat(t.unClear.actPrice):0))])])])])],1)},a=[],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("f803"),{name:"begin-refund",props:{currentRefundData:{type:Object,default:()=>{}}},data(){return{showDtail:!1,loading:!0,product:[],refundMoney:0,refundType:1,cause:0,remark:"",orderInfo:{},couldRefundPrice:0,unClear:{}}},computed:{refundPrice(){let t=0;if(this.product)for(const e of this.product)if(Number(e.refundCount)>0){let s=Number(e.refundCount)*Number(e.xhUnitPrice);s.toFixed(2),t=Number(t)+Number(s),t.toFixed(2)}return Number(this.orderInfo.refundSendCostAmount)>0&&(t=Number(this.orderInfo.refundSendCostAmount)+Number(t)),Number(this.orderInfo.refundPackCostAmount)>0&&(t=Number(this.orderInfo.refundPackCostAmount)+Number(t)),t=parseFloat(t.toFixed(2)),this.refundMoney=t,t}},methods:{closeTrigger(){this.$emit("searchFocus")},confirmRefund(){let t=!1,e=[],s=this;if(this.product.forEach(s=>{let i=s.refundCount?Number(s.refundCount):0,a=s.xhNum?Number(s.xhNum):0,r=s.refundNum?Number(s.refundNum):0,o=Number(a)-Number(r);if(Number(i)>Number(o))return this.$message.error(s.name+"超过可退数量"),t=!0,!1;Number(s.refundCount)>0&&e.push({productId:s.productId,num:s.refundCount,unitType:s.unitType,unitName:s.xhUnitName,unitType:s.xhUnitType,unitPrice:s.xhUnitPrice})}),t)return;if(this.$util.isEmpty(e)&&1==this.refundType)return void this.$message.error("请选择商品");if(Number(this.orderInfo.refundPackCostAmount)>0){let t=parseFloat((Number(this.orderInfo.packCost)-Number(this.orderInfo.refundPackCost)).toFixed(2));if(Number(this.orderInfo.refundPackCostAmount)>Number(t))return this.$message.error("打包费超出可退金额"),!1}if(Number(this.orderInfo.refundSendCostAmount)>0){let t=parseFloat((Number(this.orderInfo.sendCost)-Number(this.orderInfo.refundSendCost)).toFixed(2));if(Number(this.orderInfo.refundSendCostAmount)>Number(t))return this.$message.error("运费超出可退金额"),!1}let i={id:this.currentRefundData.id,product:JSON.stringify(e),price:this.refundMoney,remark:this.remark,refundType:this.refundType,getOriginalItem:1,cause:this.cause,refundSendCost:this.orderInfo.refundSendCostAmount,refundPackCost:this.orderInfo.refundPackCostAmount};this.$service.refund.refund(i).then(t=>{if(t.error&&"hasUnClearOrder"==t.error)return s.needCancelRemind(t.clearId),!1;s.$message.success("售后成功"),s.closeOpen()})},needCancelRemind(t){this.$message.error("有结账单取消了才能退款")},init(){this.product=[],this.refundMoney=0,this.refundType=1,this.cause=0,this.remark="",this.orderInfo={},this.couldRefundPrice=0,this.unClear={},this.showDtail=!0,this.$service.order.detail({id:this.currentRefundData.id,getOriginalItem:1}).then(t=>{this.orderInfo={...t,refundPackCostAmount:"",refundSendCostAmount:""},this.couldRefundPrice=Number(t.orderPrice)-Number(t.tkPrice),this.couldRefundPrice=this.couldRefundPrice.toFixed(2),this.couldRefundPrice=parseFloat(this.couldRefundPrice),this.product=t.product.map(t=>({...t,refundCount:null}));let e=t.customId?t.customId:0;Number(e)>0&&this.$service.clear.getUnClear({customId:e}).then(t=>{this.unClear=t.info})})},closeOpen(){this.showDtail=!1}}}),o=r,n=(s("0a8b"),s("77b5"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"4034ffb6",null);e["default"]=l.exports},"9e56":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-amount",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(1==s.row.io?"+":"-")+" "+t._s(s.row.amount)+" ")])]}},{key:"table-column-payTime",fn:function({scope:s}){return["0000-00-00 00:00:00"!=s.row.payTime&&s.row.payTime.substr(5,5)!=s.row.addTime.substr(5,5)?e("span",[t._v(" "+t._s(s.row.payTime)+" ")]):e("span",[t._v("-")])]}},{key:"table-column-capitalType",fn:function({scope:s}){return[20==s.row.capitalType?e("span",[t._v("结账")]):10==s.row.capitalType?e("span",[t._v("下单")]):40==s.row.capitalType?e("span",[t._v("售后")]):e("span",[t._v("其它")])]}},{key:"slot-search-list",fn:function({scope:s}){return[e("el-select",{staticStyle:{width:"200px","margin-right":"10px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索客户",clearable:"","remote-method":t.searchCpInfo,loading:t.loading,size:"middle"},on:{change:t.getCurrentCp},model:{value:t.currentCustomName,callback:function(e){t.currentCustomName=e},expression:"currentCustomName"}},t._l(t.customInfoList,(function(t){return e("el-option",{key:t.id,attrs:{label:`${t.name}(${t.id})`,value:t.id}})})),1),e("span",{staticStyle:{"margin-left":"9px","font-size":"28px"}},[t._v("时间:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"middle"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"middle"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]}}])})],1)},a=[],r=(s("5880"),{components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"列表",key:"0",val:0}],customInfoList:[],loading:!1,currentCustomName:"",customId:0,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",currentDateList:[]}},methods:{onLoad({ctx:t,app:e}){this.app=e,this.$route.query.customId&&(this.customId=this.$route.query.customId,this.currentCustomName=this.$route.query.customName?this.$route.query.customName:""),t.service(this.$service.customDebtChange).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:100},{prop:"addTime",label:"创建日期",align:"center",width:180},{prop:"payTime",label:"账单日期",align:"center",width:180},{prop:"customId",label:"客户ID",align:"center",width:100},{prop:"customName",label:"客户名称",align:"center",width:150},{prop:"capitalType",label:"类型",align:"center",width:120},{prop:"event",label:"事项",align:"center",width:260},{prop:"amount",label:"变动",align:"center",width:120},{prop:"balance",label:"剩余欠款",align:"center",width:120},{prop:"remark",label:"备注",align:"center",width:210}],op:{visible:!0,props:{width:100,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"..."}}).set("layout",[["slot-tabs"],["slot-search-list"],["data-table"],["flex1","pagination"]]).done(),this.refreshData()},getCurrentCp(t){this.customId=t,this.refreshData()},refreshData(){this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId})},exportData(){this.$service.customDebtChange.getList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId,pageSize:9999999,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},searchCpInfo(t){let e=this;""!==t?(this.loading=!0,this.$service.custom.list({name:t,type:0}).then(t=>{e.loading=!1,e.customInfoList=t.list})):this.customInfoList=[]},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.refreshData()}}}),o=r,n=(s("e05a"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"2b879823",null);e["default"]=l.exports},"9e5c":function(t,e,s){"use strict";s("56e4")},"9e95":function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function({scope:s}){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:t.text,name:t.key}})})),1)]}},{key:"table-column-adImgUrl",fn:function({scope:s}){return[e("div",[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:t._f("default_avatar")(s.row.adImgUrl)}})],1)]}},{key:"table-column-endTime",fn:function({scope:s}){return["4102416000"==s.row.endTime?e("div",[t._v("永久有效")]):s.row.endTime?e("div",[t._v(t._s(t._f("formatTime")(s.row.endTime)))]):e("div",[t._v("-")])]}},{key:"table-column-status",fn:function({scope:s}){return[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(e){return t.changeStatus(s.row)}},model:{value:s.row.status,callback:function(e){t.$set(s.row,"status",e)},expression:"scope.row.status"}})]}},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.modifyBtnFn(s.row)}}},[t._v("编辑")])]}},{key:"slot-del",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.delBtnFn(s.row)}}},[t._v("删除")])]}},{key:"slot-add-ad-btn",fn:function({scope:s}){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.addBtnFn}},[t._v("添加")])]}}])}),e("el-dialog",{attrs:{title:(1==t.addOrModify?"添加":"修改")+"广告图",visible:t.addDialog,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.addDialog=e}}},[e("div",{staticClass:"ad-modal-content"},[e("el-form",{ref:"adForm",staticClass:"demo-form",attrs:{model:t.adForm,rules:t.adFormRules,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"广告图名称",prop:"adName"}},[e("el-input",{attrs:{placeholder:"请输入名称",size:"small"},model:{value:t.adForm.adName,callback:function(e){t.$set(t.adForm,"adName",e)},expression:"adForm.adName"}})],1),e("el-form-item",{attrs:{label:"请选择时间"}},[e("el-col",{attrs:{span:11}},[e("el-form-item",{attrs:{prop:"startTime"}},[e("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择开始日期","value-format":"yyyy-MM-dd"},model:{value:t.adForm.startTime,callback:function(e){t.$set(t.adForm,"startTime",e)},expression:"adForm.startTime"}})],1)],1),e("el-col",{staticClass:"app-center",attrs:{span:2}},[t._v("-")]),e("el-col",{attrs:{span:11}},[e("el-form-item",{attrs:{prop:"endTime"}},[e("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择到期日期","value-format":"yyyy-MM-dd"},model:{value:t.adForm.endTime,callback:function(e){t.$set(t.adForm,"endTime",e)},expression:"adForm.endTime"}})],1)],1)],1),e("el-form-item",[e("el-checkbox",{model:{value:t.isLong,callback:function(e){t.isLong=e},expression:"isLong"}}),t._v("永久有效 ")],1),e("el-form-item",{attrs:{label:"广告图片",prop:"adImg"}},[e("cl-upload",{attrs:{success:t.uploadSuccess},model:{value:t.adForm.adImg,callback:function(e){t.$set(t.adForm,"adImg",e)},expression:"adForm.adImg"}}),e("p",{staticStyle:{"font-size":"14px",color:"#cccccc"}},[t._v("建议上传图片比例 750X480")])],1),e("el-form-item",{attrs:{label:"启用状态",prop:"status"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.adForm.status,callback:function(e){t.$set(t.adForm,"status",e)},expression:"adForm.status"}})],1),e("el-form-item",{attrs:{label:"链接方式",prop:"style"}},[e("el-radio-group",{model:{value:t.adForm.style,callback:function(e){t.$set(t.adForm,"style",e)},expression:"adForm.style"}},[e("el-radio",{attrs:{label:"0"}},[t._v("自定义链接")]),e("el-radio",{attrs:{label:"1"}},[t._v("链接指定商品")])],1),0==t.adForm.style?[e("div",[e("el-form-item",{attrs:{prop:"url"}},[e("el-input",{attrs:{placeholder:"请填写链接(选填)",size:"small"},model:{value:t.adForm.url,callback:function(e){t.$set(t.adForm,"url",e)},expression:"adForm.url"}})],1)],1)]:[e("div",[t.$util.isEmpty(t.goodsData)?t._e():e("div",{staticClass:"goods-list-wrap"},[e("div",{staticClass:"goods-list"},[e("div",{staticClass:"list-img"},[e("img",{attrs:{src:t.goodsData.imgUrl,alt:"商品图片",mode:"center"}})]),e("div",{staticClass:"list-right"},[e("div",[t._v(t._s(t.goodsData.goodsName))]),e("div",{staticClass:"app-price"},[t._v("¥"+t._s(t.goodsData.price))])])])]),e("div",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.selGoods}},[t._v("选择商品")])],1)])]],2)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.addFn}},[t._v("确认")])],1)]),e("sel-Search",{attrs:{show:t.selGoodsModal},on:{"update:show":function(e){t.selGoodsModal=e},confirm:t.selGoodsConfirmFn,cancel:function(e){t.selGoodsModal=!1}}})],1)},a=[],r=(s("0f5d"),s("8f26"),s("666b"),s("209c"),s("f803"),s("edf4")),o={name:"list-ad",components:{selSearch:r["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"商城首页轮播图",key:"0"},{text:"门店轮播图",key:"1"}],modifyData:{},addOrModify:1,addDialog:!1,adForm:{adName:"",adImg:"",status:"1",inTurn:0,type:"1",style:"0",startTime:"",url:"",endTime:""},adFormRules:{adName:{required:!0,message:"广告图名称不能为空"},startTime:{required:!0,message:"开始时间不能为空",validator:(t,e,s)=>{if(!this.isLong&&!e)return s(new Error("到期时间不能为空"));s()}},endTime:{required:!0,message:"到期时间不能为空",validator:(t,e,s)=>{if(!this.isLong&&!e)return s(new Error("到期时间不能为空"));s()}},adImg:{required:!0,message:"广告图片不能为空"},style:{validator:(t,e,s)=>{const{url:i,style:a}=this.adForm;if("0"==a);else if(!this.goodsData.id)return s(new Error("请选择商品"));s()}}},selGoodsModal:!1,goodsData:{},goodsList:[],isLong:!1}},methods:{delBtnFn(t){this.$confirm("是否删除该广告?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.ad.delete({id:t.id}).then(t=>{this.$message.success("删除成功!"),this.app.refresh({type:this.tabIndex})})}).catch()},modifyBtnFn(t){this.$service.ad.info({id:t.id}).then(async t=>{let e={imgList:[]};t.goodsId&&"0"!=t.goodsId&&(e=await this.$service.goods.info({id:t.goodsId})),this.modifyData=t,this.isLong=!!t.startTime,this.addOrModify=2,this.addDialog=!0;let s=JSON.parse(JSON.stringify(t));s.startTime=this.$util.$formatDate(s.startTime),s.endTime=this.$util.$formatDate(s.endTime),this.$util.isEmpty(s)||(Object.keys(this.adForm).forEach((t,e)=>{this.adForm[t]=s[t]}),this.goodsData={...e,imgUrl:e.imgList[0]})})},addBtnFn(){this.addDialog=!0,this.isLong=!1,this.addOrModify=1,this.adForm={adName:"",adImg:"",status:"1",inTurn:0,type:"1",style:"0",startTime:"",url:"",endTime:""}},handleClick(t,e){this.app.refresh({type:this.tabIndex})},changeStatus(t){this.$service.ad.updateStatus({id:t.id,status:t.status}).then(t=>{this.$message.success("操作成功!")})},resetForm(){this.goodsData={},this.$refs["adForm"].resetFields(),this.addDialog=!1},addFn(){this.$refs.adForm.validate(t=>{if(t){let t=JSON.parse(JSON.stringify(this.adForm));t.type=this.tabIndex,"1"==t.style&&(t.url="",t.goodsId=this.goodsData.id),this.isLong&&(t.startTime="",t.endTime="");let e=null;e=1==this.addOrModify?()=>this.$service.ad.add(t):()=>this.$service.ad.update({id:this.modifyData.id,...t}),e().then(t=>{this.$message.success("操作成功!"),this.resetForm(),this.app.refresh({type:this.tabIndex})})}})},selGoods(){this.selGoodsModal=!0},selGoodsConfirmFn(t){this.goodsData=t,this.selGoodsModal=!1,this.$refs.adForm.validateField("style")},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.ad).set("table",{columns:[{prop:"id",label:"id",align:"center","min-width":100},{prop:"adName",label:"广告名称",align:"center"},{prop:"adImgUrl",label:"广告图片",align:"center"},{prop:"endTime",label:"到期时间",align:"center"},{prop:"status",label:"启用状态",align:"center"},{prop:"viewTimes",label:"点击次数",align:"center"},{prop:"inTurn",label:"排序",align:"center"}],op:{visible:!0,props:{width:100,align:"center",fixed:"right",label:"操作"},layout:["slot-modify","slot-del"]}}).set("layout",[["slot-tabs"],["flex1","slot-add-ad-btn","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh({type:this.tabIndex})},uploadSuccess(){this.$refs["adForm"].validateField("adImg")}}},n=o,l=(s("f5a6"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"1c1e4924",null);e["default"]=c.exports},"9fc9":function(t,e,s){"use strict";s("b327")},a000:function(t,e,s){},a17e:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-img",fn:function({scope:s}){return[e("div",[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:t._f("default_avatar")(s.row.img)}})],1)]}},{key:"table-column-status",fn:function({scope:s}){return[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(e){return t.changeStatus(s.row)}},model:{value:s.row.status,callback:function(e){t.$set(s.row,"status",e)},expression:"scope.row.status"}})]}},{key:"table-column-inTurn",fn:function({scope:s}){return[s.row._inTurn?e("el-input-number",{ref:"sort-input",attrs:{focus:"",size:"mini"},on:{blur:function(e){return t.changeSort(s.row)}},model:{value:s.row.inTurn,callback:function(e){t.$set(s.row,"inTurn",e)},expression:"scope.row.inTurn"}}):e("span",{on:{click:function(e){return t.showSort(s.row)}}},[t._v(t._s(s.row.inTurn))])]}},{key:"slot-poster",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.getPosterBtnFn(s.row)}}},[t._v("获取海报")])]}},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.modifyBtnFn(s.row)}}},[t._v("修改")])]}},{key:"slot-add-ad-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.addBtnFn}},[t._v("添加")])]},proxy:!0}])}),e("el-dialog",{attrs:{title:(1==t.addOrModify?"添加":"修改")+"分类",visible:t.addDialog,"close-on-click-modal":!1,width:"400px"},on:{"update:visible":function(e){t.addDialog=e}}},[e("div",{staticClass:"ad-modal-content"},[e("el-form",{ref:"adForm",staticClass:"demo-form",attrs:{model:t.adForm,rules:t.adForm,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"分类名称",prop:"categoryName"}},[e("el-input",{attrs:{placeholder:"请输入名称",size:"small"},model:{value:t.adForm.categoryName,callback:function(e){t.$set(t.adForm,"categoryName",e)},expression:"adForm.categoryName"}})],1),e("el-form-item",{attrs:{label:"分类图片",prop:"img"}},[t._v(" "+t._s(t.adForm.img)+" "),e("cl-upload",{model:{value:t.adForm.img,callback:function(e){t.$set(t.adForm,"img",e)},expression:"adForm.img"}})],1),e("el-form-item",{attrs:{label:"是否启用",prop:"status"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.adForm.status,callback:function(e){t.$set(t.adForm,"status",e)},expression:"adForm.status"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmFn}},[t._v("确认")])],1)])],1)},a=[],r=(s("8f26"),s("963e"),s("209c"),s("f803"),s("51be"),{name:"goods-category",data(){return{modifyData:{},addOrModify:1,addDialog:!1,adForm:{categoryName:"",img:"",status:"1"}}},methods:{addBtnFn(){this.addDialog=!0,this.addOrModify=1},modifyBtnFn(t){this.modifyData=t,this.addOrModify=2,this.addDialog=!0},changeStatus(t){this.$service.category.updateStatus({categoryId:t.id,status:t.status}).then(t=>{this.$message.success("操作成功!")})},addOrModifyFn(){let t={};t=JSON.parse(JSON.stringify(this.adForm)),t.img=this.$util.getShortUrl(t.img);let e=null;e=1==this.addOrModify?()=>this.$service.category.add(t):()=>this.$service.category.update({categoryId:this.modifyData.id,form:t}),e().then(t=>{this.$message.success("操作成功!"),this.resetForm(),this.app.refresh({type:this.tabIndex})})},confirmFn(){this.addOrModifyFn()},resetForm(){this.$refs["adForm"].resetFields(),this.addDialog=!1},getPosterBtnFn(){this.$message("提示功能开发中!")},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.category).set("table",{columns:[{prop:"id",label:"id",align:"center","min-width":100},{prop:"categoryName",label:"分类名称",align:"center"},{prop:"img",label:"图片",align:"center"},{prop:"goodsNum",label:"商品数",align:"center"},{prop:"sold",label:"销量",align:"center"},{prop:"status",label:"启用状态",align:"center"},{prop:"inTurn",label:"排序",align:"center"}]}).set("layout",[["slot-tabs"],["flex1","slot-add-ad-btn","refresh-btn"],["data-table"],["flex1","pagination"]]).set("upsert",{props:{width:"500px"},items:[{label:"分类名称",prop:"categoryName",component:{name:"el-input"}},{label:"图片",prop:"img",component:{name:"cl-upload"}},{label:"启用状态",prop:"status",component:{name:"el-switch"}}]}).on("info",(t,{done:e})=>{e({...t,status:"1"==t.status})}).on("delete",(t,{next:e})=>{e({categoryId:t.map(t=>t.id).join(",")})}).on("submit",(t,e,{next:s})=>{s({categoryId:e.id,categoryName:e.categoryName,status:e.status,img:e.img})}).done(),e.refresh({type:this.tabIndex})},showSort(t){this.$set(t,"_inTurn",!0),this.$nextTick(()=>{this.$refs["sort-input"].focus()})},changeSort(t){t._inTurn=!1,this.$service.category.sort({inTurn:t.inTurn,id:t.id}).then(()=>{this.$message.success("修改成功")}).catch(t=>{this.$message.error(t)})}}}),o=r,n=s("1805"),l=Object(n["a"])(o,i,a,!1,null,"c95f9734",null);e["default"]=l.exports},a1dd:function(t,e,s){"use strict";s("c500")},a1fe:function(t,e,s){},a238:function(t,e,s){},a340:function(t,e,s){},a371:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("e-charts",{attrs:{options:t.options}})},a=[],r=(s("b138"),s("209c"),s("f803"),s("6678")),o=s.n(r),n=(s("44e5"),{name:"echart",components:{ECharts:o.a},props:{chartData:{type:Object}},data(){return{chart:null,options:{}}},watch:{chartData:{deep:!0,handler:function(t){if(!this.chart)return!1;this.initChart()}}},methods:{initChart(){if(this.chart=!0,this.$util.isEmpty(this.chartData))return!1;let t=JSON.parse(JSON.stringify(this.chartData)),e=[],s=[];for(let i in t)e.push(i),s.push(t[i]);this.setOptions({nameData:e,numData:s})},setOptions(t){this.options={tooltip:{trigger:"axis"},grid:{left:"3%",right:"3%",top:"30",bottom:"0",containLabel:!0},xAxis:[{type:"category",data:t.nameData,axisLine:{lineStyle:{color:"#999"}}}],yAxis:[{type:"value",splitNumber:9,splitLine:{lineStyle:{type:"dashed",color:"#DDD"}},axisLine:{show:!1,lineStyle:{color:"#333"}},nameTextStyle:{color:"#999"},splitArea:{show:!1}}],series:[{name:"统计",type:"line",data:t.numData,lineStyle:{normal:{width:2,color:{type:"linear",colorStops:[{offset:0,color:"#3385ff"},{offset:1,color:"#3385ff"}],globalCoord:!1},shadowColor:"rgba(72,216,191, 0)",shadowBlur:10,shadowOffsetY:20}},itemStyle:{normal:{color:"#fff",borderWidth:2,borderColor:"#3385ff"}},smooth:!0}]}}}}),l=n,c=(s("d84a"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"9815122a",null);e["default"]=u.exports},a3f6:function(t,e,s){"use strict";s("5ea8")},a3fc:function(t,e,s){},a3fd:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("error-page",{attrs:{code:500,desc:"糟糕,出了点问题"}})},a=[],r=s("438a"),o={components:{ErrorPage:r["default"]}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},a403:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.currentData.customName?t.currentData.customName:"")+"】"+t._s(t.currentData.itemName?t.currentData.itemName:"")+" 预订记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})}}},o=r,n=(s("66f0"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"459c401a",null);e["default"]=l.exports},a49c:function(t,e,s){},a4f8:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-my-info"},[e("div",{staticClass:"title"},[t._v("基本信息")]),e("el-form",{attrs:{size:"small","label-width":"100px",model:t.form,disabled:t.saving}},[e("el-form-item",{attrs:{label:"头像"}},[e("cl-upload",{model:{value:t.form.headImg,callback:function(e){t.$set(t.form,"headImg",e)},expression:"form.headImg"}})],1),e("el-form-item",{attrs:{label:"昵称"}},[e("el-input",{model:{value:t.form.nickName,callback:function(e){t.$set(t.form,"nickName",e)},expression:"form.nickName"}})],1),e("el-form-item",{attrs:{label:"密码"}},[e("el-input",{attrs:{type:"password"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("el-form-item",{attrs:{label:""}},[e("el-button",{attrs:{type:"primary",disabled:t.saving},on:{click:t.save}},[t._v("保存修改")])],1)],1)],1)},a=[],r=s("5880"),o={data(){return{form:{},saving:!1}},computed:{...Object(r["mapGetters"])(["userInfo"])},mounted(){this.form=this.userInfo},methods:{save(){this.saving=!0;const{headImg:t,nickName:e,password:s}=this.form;this.$service.common.userUpdate({headImg:t,nickName:e,password:s}).then(()=>{this.form.password="",this.$message.success("修改成功"),this.$store.dispatch("userInfo")}).catch(t=>{this.$message.error(t)}).done(()=>{this.saving=!1})}}},n=o,l=(s("9fc9"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},a5e4:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportData(){this.$service.stat.getClassProfit({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.stat.getClassProfit({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>{let e=[...t.list,{className:"物流打包费",income:0,expend:t.packFreight,profit:-t.packFreight,saleNum:0,cgNum:0},{className:"采购仅退款",income:t.onlyRefundCg,expend:0,profit:t.onlyRefundCg,saleNum:0,cgNum:0},{className:"销售仅退款",income:0,expend:t.onlyRefund,profit:-t.onlyRefund,saleNum:0,cgNum:0},{className:"附加人工费",income:t.totalLabourCost,expend:0,profit:t.totalLabourCost,saleNum:0,cgNum:0},{className:"优惠金额",income:-t.totalDiscountAmount,expend:0,profit:-t.totalDiscountAmount,saleNum:0,cgNum:0},{className:"【汇总金额】",income:t.totalIncome,expend:t.totalExpend,profit:t.totalProfit,saleNum:0,cgNum:0}];return{list:e}})}).set("table",{columns:[{label:"名称",prop:"className",align:"center"},{label:"销售数量",prop:"saleNum",align:"center"},{label:"销售收入",prop:"income",align:"center"},{label:"采购数量",prop:"cgNum",align:"center"},{label:"采购成本",prop:"expend",align:"center"},{label:"花材利润",prop:"profit",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","slot-export-due","flex1"],["data-table"],["flex1"]]).done(),e.refresh()},getDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},n=o,l=(s("80f3"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"5ab4a258",null);e["default"]=c.exports},a5fd:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"scope"},[t._m(0),e("div",{staticClass:"tmp2"},[e("div",{staticClass:"title",staticStyle:{color:"#25aff3"}},[t._v(" 花卉宝 ")]),e("el-form",{ref:"form",staticClass:"form",attrs:{size:"medium",disabled:t.saving}},[e("el-form-item",{attrs:{label:"用户名"}},[e("el-input",{attrs:{placeholder:"请输入用户名",maxlength:"20","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1),e("el-form-item",{attrs:{label:"密码"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码",maxlength:"20","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("el-button",{staticClass:"submit-btn",attrs:{saving:t.saving},on:{click:t.next}},[t._v("登录")])],1)],1)])},a=[function(){var t=this,e=t._self._c;return e("ul",{staticClass:"bg-bubbles"},[e("li"),e("li"),e("li"),e("li"),e("li"),e("li"),e("li"),e("li"),e("li"),e("li")])}],r=s("80c1"),o={mixins:[r["default"]],created(){}},n=o,l=(s("171e"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"79ee8590",null);e["default"]=c.exports},a72f:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportData(){this.$service.stat.getIncomeOutItem({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.stat.getIncomeOutItem({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(t=>{let e=[...t.list,{name:"物流打包费",income:0,expend:t.packFreight,profit:-t.packFreight,inNum:0,outNum:0},{name:"采购仅退款",income:t.onlyRefundCg,expend:0,profit:t.onlyRefundCg,inNum:0,outNum:0},{name:"销售仅退款",income:0,expend:t.onlyRefund,profit:-t.onlyRefund,inNum:0,outNum:0},{name:"附加人工费",income:t.totalLabourCost,expend:0,profit:t.totalLabourCost,inNum:0,outNum:0},{name:"优惠金额",income:-t.totalDiscountAmount,expend:0,profit:-t.totalDiscountAmount,inNum:0,outNum:0},{name:"【汇总金额】",income:t.totalIncome,expend:t.totalExpend,profit:t.totalProfit,inNum:0,outNum:0}];return{list:e}})}).set("table",{columns:[{label:"名称",prop:"name",align:"center"},{label:"销售收入",prop:"income",align:"center"},{label:"销售数量",prop:"inNum",align:"center"},{label:"采购成本",prop:"expend",align:"center"},{label:"采购数量",prop:"outNum",align:"center"},{label:"花材利润",prop:"profit",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","slot-export-due","flex1"],["data-table"],["flex1"]]).done(),e.refresh()},getDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},n=o,l=(s("4b80"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"6ca64a5f",null);e["default"]=c.exports},a792:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.customData.customName?t.customData.customName:"")+"】预订记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-record",props:{customData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCustomChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})}}},o=r,n=(s("4202"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"62c8e180",null);e["default"]=l.exports},a80d:function(t,e,s){},a8f5:function(t,e,s){"use strict";s("3ea0")},a95d:function(t,e,s){},a9aa:function(t,e,s){"use strict";s.r(e);var i=s("6678"),a=s.n(i);function r(t){if(0===t)return"0 B";let e=1024,s=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],i=Math.floor(Math.log(t)/Math.log(e));return(t/Math.pow(e,i)).toPrecision(3)+" "+s[i]}e["default"]={components:{ECharts:a()},filters:{unit_size:r,fixed2(t){return t?parseFloat(parseFloat(t).toFixed(2)):0}},methods:{conByte:r}}},aa05:function(t,e,s){},aaa5:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-location",fn:function({scope:s}){return[1==s.row.location?e("span",{staticStyle:{cursor:"pointer",color:"blue","font-weight":"bold"},on:{click:function(e){return t.modifyLocation(s.row)}}},[t._v("本地")]):e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.modifyLocation(s.row)}}},[t._v("上游")])]}},{key:"table-column-avatar",fn:function({scope:t}){return[e("cl-avatar",{style:{margin:"auto"},attrs:{size:22,src:t.row.avatar}})]}},{key:"table-column-id",fn:function({scope:s}){return[e("el-link",{staticStyle:{"font-size":"12px"},attrs:{underline:!0},on:{click:function(e){return t.detailShowFn(s.row)}}},[t._v(t._s(s.row.id))])]}},{key:"table-column-mobile",fn:function({scope:s}){return[""!=s.row.mobile?e("span",[t._v(t._s(s.row.mobile))]):e("span",[t._v("-")])]}},{key:"table-column-debtAmount",fn:function({scope:s}){return[s.row.debtAmount>0?e("span",{staticStyle:{color:"blue",cursor:"pointer"},on:{click:function(e){return t.goDebtChange(s.row)}}},[t._v(t._s(s.row.debtAmount?parseFloat(s.row.debtAmount):0))]):e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.goDebtChange(s.row)}}},[t._v("0")])]}},{key:"table-column-balance",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.balance))])]}},{key:"table-column-debt",fn:function({scope:s}){return[1==s.row.debt?e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"18px",cursor:"pointer"},on:{click:function(e){return t.modifyDebt(s.row,0)}}}):e("i",{staticClass:"el-icon-open",staticStyle:{"font-size":"16px",cursor:"pointer"},on:{click:function(e){return t.modifyDebt(s.row,1)}}})]}},{key:"table-column-debtLimit",fn:function({scope:s}){return[1==s.row.debt?e("span",{staticStyle:{"font-weight":"bold",color:"green",cursor:"pointer"},on:{click:function(e){return t.changeDebtAmount(s.row)}}},[t._v(" "+t._s(s.row.debtLimit?parseFloat(s.row.debtLimit):0)+" ")]):e("span",[e("i",{staticClass:"el-icon-edit",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.pleaseOpen()}}})])]}},{key:"table-column-buyAmount",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.buyAmount?parseFloat(s.row.buyAmount):0))])]}},{key:"slot-add-ghs",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.addGhs()}}},[t._v("添加供货商")])]},proxy:!0},{key:"slot-export-ghs",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportGhs()}}},[t._v("导出供货商")])]},proxy:!0},{key:"table-column-name",fn:function({scope:s}){return[e("el-link",{staticStyle:{"font-size":"12px"},attrs:{underline:!0},on:{click:function(e){return t.detailShowFn(s.row)}}},[t._v(t._s(s.row.name))])]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.goClear}},[t._v("结账")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goCg(s.row)}}},[t._v("采购")]),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.modify(s.row)}}},[t._v("修改")]),e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(t){}}},[t._v("结账记录")]),e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(t){}}},[t._v("采购记录")]),e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(t){}}},[t._v("欠款变动明细")])]}},{key:"slot-total-debt-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("累计欠款:"+t._s(t.totalDebtAmount))])]},proxy:!0}])}),e("detail-draw",{attrs:{show:t.drapShow,info:t.modalData},on:{"update:show":function(e){t.drapShow=e}}}),e("el-dialog",{attrs:{title:t.addGhsTitle,visible:t.addGhsPop,width:"600px",center:"","close-on-click-modal":!1},on:{"update:visible":function(e){t.addGhsPop=e}}},[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 供货商名 "),e("el-input",{staticStyle:{width:"80%"},attrs:{clearable:""},model:{value:t.addGhsName,callback:function(e){t.addGhsName=e},expression:"addGhsName"}})],1),e("div",{staticClass:"accounts-list"},[t._v(" 商家类型 "),e("div",{staticClass:"accounts-center"},[e("el-button",{attrs:{type:0==t.location?"primary":"",size:"small"},on:{click:function(e){t.location=0}}},[t._v("上游")]),e("el-button",{attrs:{type:1==t.location?"primary":"",size:"small"},on:{click:function(e){t.location=1}}},[t._v("本地")])],1)]),e("div",{staticClass:"accounts-list",staticStyle:{"margin-top":"20px"}},[e("span"),e("div",{staticClass:"accounts-center"},[e("el-button",{on:{click:function(e){return t.resetAddGhs()}}},[t._v("取消")]),e("el-button",{staticStyle:{"margin-left":"80px"},attrs:{type:"primary"},on:{click:function(e){return t.confirmAddGhs()}}},[t._v("确认")])],1)])])])],1)},a=[],r=(s("b138"),s("5880")),o=s("2d14"),n=s("b344"),l={components:{cardName:o["default"],detailDraw:n["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"全部",key:"0",val:0}],modalData:{},drapShow:!1,addGhsName:"",location:0,addGhsPop:!1,addGhsTitle:"添加供货商",totalDebtAmount:0,searchContent:""}},computed:{...Object(r["mapGetters"])({levelData:"level"})},created(){this.getLevel()},mounted(){},methods:{...Object(r["mapActions"])(["getLevel"]),modifyLocation(t){let e=this;e.$confirm("确认修改类型?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{e.$service.ghs.changeLocation({id:t.id}).then(t=>{e.$message.success("修改成功"),e.app.refresh({type:e.tabIndex,name:e.name})})})},resetAddGhs(){this.addGhsPop=!1,this.location=0,this.addGhsName=""},confirmAddGhs(){if(1==this.$util.isEmpty(this.addGhsName))return this.$message({message:"请填写名称",type:"warning"}),!1;this.$confirm("确认添加?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.ghs.add({name:this.addGhsName,location:this.location}).then(t=>{this.resetAddGhs(),this.$notify({title:"成功",message:"充值成功",type:"success"}),this.app.refresh({type:this.tabIndex})})})},goDebtChange(t){let e={};e.ghsId=t.id,e.ghsName=t.name,this.$router.push({path:"/in/ghs-debt-record",query:e})},goClear(){this.$message({message:"开发中",type:"warning"})},modify(){this.$message({message:"开发中",type:"warning"})},newCg(){let t={};this.$router.push({path:"/in/add",query:t})},exportGhs(){this.$service.ghs.downloadGhs({name:this.searchContent}).then(t=>{t.file&&(window.location.href=t.file)})},addGhs(){this.addGhsPop=!0},billing(){let t={};this.$router.push({path:"/order/add",query:t})},goCg(t){let e={};e.ghsId=t.id,e.ghsName=t.name,this.$router.push({path:"/in/confirm",query:e})},handleClick(t,e){this.app.refresh({type:this.tabIndex})},detailShowFn(t){this.modalData=t,this.drapShow=!0},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.type&&(this.tabIndex=this.$route.query.type),t.service(this.$service.ghs).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:80},{prop:"avatar",label:"头像",align:"center",width:90},{prop:"name",label:"名称",align:"center",width:260},{prop:"debtAmount",label:"欠款",align:"center",width:100},{prop:"debtNum",label:"笔数",align:"center",width:90},{prop:"location",label:"类型",align:"center",width:90},{prop:"updateTime",label:"最近访问",align:"center",width:160},{prop:"addTime",label:"添加时间",align:"center",width:160}],op:{visible:!0,props:{width:640,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"这里搜索"}}).set("layout",[["slot-tabs"],["search-key","slot-add-ghs","flex1","slot-export-ghs"],["data-table"],["slot-total-debt-amount","flex1","pagination"]]).on("refresh",async(t,{next:e})=>{this.searchContent=t.name?t.name:"";let s=await e(t);this.totalDebtAmount=s.totalDebtAmount?s.totalDebtAmount:0}).done(),e.refresh({type:this.tabIndex})}}},c=l,u=(s("f86d"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"9aa028e0",null);e["default"]=d.exports},aacd:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-refundType",fn:function({scope:e}){return[t._v(" "+t._s(1==e.row.refundType?"退货并退款":"仅退款")+" ")]}},{key:"table-column-status",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.status?"审核中":1==e.row.status?"已完成":"其它")+" ")]}},{key:"slot-export-order",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出记录")])]},proxy:!0},{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.addTime?s.row.addTime.substr(5,11):"")+" ")])]}},{key:"table-column-passTime",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.passTime?s.row.passTime.substr(5,11):"")+" ")])]}},{key:"table-column-orderTime",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.orderTime?s.row.orderTime.substr(5,11):"")+" ")])]}},{key:"slot-search-option",fn:function({scope:s}){return[e("el-select",{staticStyle:{width:"130px","margin-right":"10px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索供货商",clearable:"","remote-method":t.searchGhs,loading:t.loading,size:"mini"},on:{change:t.getCurrentGhs},model:{value:t.currentGhsName,callback:function(e){t.currentGhsName=e},expression:"currentGhsName"}},t._l(t.ghsList,(function(t){return e("el-option",{key:t.id,attrs:{label:""+t.name,value:t.id}})})),1),e("el-select",{staticStyle:{width:"110px","margin-left":"8px"},attrs:{size:"mini",placeholder:"操作人",clearable:!0},on:{change:t.getKdStaff},model:{value:t.currentStaffName,callback:function(e){t.currentStaffName=e},expression:"currentStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("span",{staticStyle:{"margin-left":"9px","font-size":"16px"}},[t._v("采购单日期:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("span",{staticStyle:{"margin-left":"9px","font-size":"16px"}},[t._v("售后申请日:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchRefundDate},model:{value:t.currentRefundDateList,callback:function(e){t.currentRefundDateList=e},expression:"currentRefundDateList"}})]}},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("总金额:"+t._s(t.totalRefundPrice))])]},proxy:!0}])})],1)},a=[],r=s("5880"),o={components:{},data(){return{app:null,tabIndex:"-1",tabsData:[{text:"全部",key:"-1",val:0},{text:"审核中",key:"0",val:0},{text:"已完成",key:"1",val:0}],modalData:{},drapShow:!1,name1:"",mobile1:"",confirmMobile1:"",fileUrl:"",currentStaffName:"",currentStaffId:0,staffList:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",currentDateList:[],refundStartTime:"",refundEndTime:"",refundSearchTime:"",currentRefundDateList:[],status:"-1",totalRefundPrice:0,currentGhsName:"",currentGhsId:0,ghsList:[],loading:!1}},computed:{...Object(r["mapGetters"])(["token"])},created(){},mounted(){let t=this;t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list})},methods:{getCurrentGhs(t){this.currentGhsId=t,this.refreshData()},searchGhs(t){let e=this;""!==t?(this.loading=!0,this.$service.ghs.list({name:t}).then(t=>{e.loading=!1,e.ghsList=t.list})):this.ghsList=[]},getKdStaff(t){this.currentStaffId=t,this.refreshData()},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.refreshData()},getSearchRefundDate(){this.$util.isEmpty(this.currentRefundDateList)?(this.refundSearchTime="",this.refundStartTime="",this.refundEndTime=""):(this.refundSearchTime="custom",this.refundStartTime=this.currentRefundDateList[0],this.refundEndTime=this.currentRefundDateList[1]),this.refreshData()},refreshData(){this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,refundSearchTime:this.refundSearchTime,refundStartTime:this.refundStartTime,refundEndTime:this.refundEndTime,shopAdminId:this.currentStaffId,status:this.status,ghsId:this.currentGhsId})},exportData(){this.$service.cgRefund.getList({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,refundSearchTime:this.refundSearchTime,refundStartTime:this.refundStartTime,refundEndTime:this.refundEndTime,shopAdminId:this.currentStaffId,status:this.status,pageSize:9999999,export:1,ghsId:this.currentGhsId}).then(t=>{t.file&&(window.location.href=t.file)})},handleClick(){this.status=this.tabIndex,this.refreshData()},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.ghsId&&(this.currentGhsId=this.$route.query.ghsId,this.currentGhsName=this.$route.query.ghsName?this.$route.query.ghsName:"",this.searchTime=this.$route.query.searchTime?this.$route.query.searchTime:"",this.startTime=this.$route.query.startTime?this.$route.query.startTime:"",this.endTime=this.$route.query.endTime?this.$route.query.endTime:"",""!=this.startTime&&""!=this.endTime&&(this.currentDateList=[this.startTime,this.endTime]),this.$route.query.status&&(this.status=this.$route.query.status,this.tabIndex=this.status.toString())),t.service(this.$service.cgRefund).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:80},{prop:"refundSn",label:"退款单号",align:"center",width:140},{prop:"orderTime",label:"采购单日期",align:"center",width:120},{prop:"relateOrderSn",label:"采购单号",align:"center",width:140},{prop:"ghsId",label:"供货商ID",align:"center",width:90},{prop:"ghsName",label:"供货商",align:"center",width:160},{prop:"refundPrice",label:"金额",align:"center",width:90},{prop:"status",label:"状态",align:"center",width:100},{prop:"refundType",label:"售后类型",align:"center",width:110},{prop:"shopAdminName",label:"操作人",align:"center",width:110},{prop:"addTime",label:"申请日期",align:"center",width:110},{prop:"passTime",label:"通过日期",align:"center",width:110},{prop:"remark",label:"备注",align:"center",width:150}],op:{visible:!0,props:{width:180,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["slot-search-option","flex1","slot-export-order"],["data-table"],["slot-total-amount","flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.totalRefundPrice=s.totalRefundPrice?parseFloat(s.totalRefundPrice):0}).done(),this.refreshData()}}},n=o,l=(s("34ca"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"71c16cf4",null);e["default"]=c.exports},ab4e:function(t,e,s){},ac6f:function(t,e,s){"use strict";s("f94a")},acaf:function(t,e,s){},acfd:function(t,e,s){},ad3b:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:t.direction},on:{"update:visible":function(e){t.showArea=e},close:t.closeTrigger}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[e("el-date-picker",{staticStyle:{"margin-right":"10px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("el-select",{staticStyle:{width:"150px"},attrs:{placeholder:"请选事项",size:"mini",clearable:!0},on:{change:t.changeType,clear:t.clearType},model:{value:t.typeValue,callback:function(e){t.typeValue=e},expression:"typeValue"}},t._l(t.options,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),t._v(" 【"+t._s(t.itemData.name?t.itemData.name:"")+"】库存明细 ")],1),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-bigNumOrder",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.bigNumOrder))])]}}])})],1)])],1)},a=[],r={name:"stock-detail",props:{itemData:{type:Object,default:()=>{}}},data(){return{direction:"ltr",options:[],typeValue:"",currentDateList:[],showArea:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:""}},methods:{clearType(){this.typeValue="",this.refreshData()},changeType(t){this.refreshData()},refreshData(){this.app.refresh({id:this.itemData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,recordType:this.typeValue})},closeTrigger(){this.$emit("searchFocus")},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.app.refresh({id:this.itemData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,recordType:this.typeValue})},init(){this.$util.isEmpty(this.itemData.direction)||(this.direction=this.itemData.direction),this.showArea=!0,this.app&&this.app.refresh({id:this.itemData.id})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.stock).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"名称",prop:"relateName",align:"center"},{label:"事项",prop:"typeName",align:"center"},{label:"变动",prop:"bigNumOrder",align:"center"},{label:"剩余",prop:"bigNumStock",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.options=s.typeList}).done(),e.refresh({id:this.itemData.id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,recordType:this.typeValue})}}},o=r,n=(s("5e36"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"513f6cf1",null);e["default"]=l.exports},adad:function(t,e,s){"use strict";s("760e")},adc9:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-payTime",fn:function({scope:s}){return["0000-00-00 00:00:00"!=s.row.payTime?e("span",[t._v(" "+t._s(s.row.payTime)+" ")]):e("span",[t._v("-")])]}},{key:"table-column-onlinePay",fn:function({scope:s}){return[1==s.row.onlinePay?e("span",[t._v("-")]):e("span",{staticStyle:{color:"#409EFF"}},[t._v("是")])]}},{key:"table-column-payWay",fn:function({scope:s}){return[0==s.row.payWay?e("span",[t._v("微信")]):t._e(),1==s.row.payWay?e("span",[t._v("支付宝")]):t._e(),2==s.row.payWay?e("span",[t._v("余额")]):t._e(),3==s.row.payWay?e("span",[t._v("欠账")]):t._e(),4==s.row.payWay?e("span",[t._v("现金")]):t._e(),5==s.row.payWay?e("span",[t._v("银行卡")]):t._e(),11==s.row.payWay?e("span",[t._v("抵扣")]):t._e()]}},{key:"table-column-status",fn:function({scope:s}){return[1==s.row.status?e("span",[t._v("待付款")]):t._e(),2==s.row.status?e("span",[t._v("已付款")]):t._e(),3==s.row.status?e("span",[t._v("已取消")]):t._e()]}},{key:"slot-search-list",fn:function({scope:s}){return[e("el-select",{staticStyle:{width:"200px","margin-right":"10px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索客户",clearable:"","remote-method":t.searchCustomInfo,loading:t.loading,size:"middle"},on:{change:t.getCurrentCp},model:{value:t.currentCustomName,callback:function(e){t.currentCustomName=e},expression:"currentCustomName"}},t._l(t.customInfoList,(function(t){return e("el-option",{key:t.id,attrs:{label:`${t.name}(${t.id})`,value:t.id}})})),1),e("span",{staticStyle:{"margin-left":"9px","font-size":"28px"}},[t._v("结账时间:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"middle"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}}),e("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"middle"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.getDetail(s.row)}}},[t._v("详情")])]}}])})],1)},a=[],r=(s("5880"),{components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"全部",key:"0",val:0}],customInfoList:[],loading:!1,currentCustomName:"",customId:0,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",currentDateList:[]}},methods:{onLoad({ctx:t,app:e}){this.app=e,this.$route.query.customId&&(this.customId=this.$route.query.customId,this.currentCustomName=this.$route.query.customName?this.$route.query.customName:""),t.service(this.$service.checkout).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:80},{prop:"addTime",label:"创建时间",align:"center",width:150},{prop:"payTime",label:"结账时间",align:"center",width:150},{prop:"orderSn",label:"编号",align:"center",width:140},{prop:"customId",label:"客户ID",align:"center",width:90},{prop:"customName",label:"客户名称",align:"center",width:150},{prop:"customMobile",label:"手机号",align:"center",width:110},{prop:"onlinePay",label:"线上付款",align:"center",width:90},{prop:"payWay",label:"支付方式",align:"center",width:90},{prop:"payRemark",label:"支付说明",align:"center",width:90},{prop:"status",label:"状态",align:"center",width:90},{prop:"num",label:"订单数",align:"center",width:90},{prop:"prePrice",label:"总金额",align:"center",width:110},{prop:"actPrice",label:"实付金额",align:"center",width:110}],op:{visible:!0,props:{width:110,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"..."}}).set("layout",[["slot-tabs"],["slot-search-list"],["data-table"],["flex1","pagination"]]).done(),this.refreshData()},getDetail(t){this.$message.error("开发中")},getCurrentCp(t){this.customId=t,this.refreshData()},refreshData(){this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId})},exportData(){this.$service.customDebtChange.getList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,customId:this.customId,pageSize:9999999,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},searchCustomInfo(t){let e=this;""!==t?(this.loading=!0,this.$service.custom.list({name:t,type:0}).then(t=>{e.loading=!1,e.customInfoList=t.list})):this.customInfoList=[]},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.refreshData()}}}),o=r,n=(s("efc5"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"a3ae1c76",null);e["default"]=l.exports},aebf:function(t,e,s){"use strict";s("d2c2")},af4a:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"perf-mysql"},[e("p",{staticClass:"title"},[t._v(" Mysql ")]),e("el-row",{staticClass:"fn"},[e("el-col",{attrs:{span:8}},[e("div",{staticClass:"block"},[e("div",{staticClass:"icon _disk"},[e("icon-svg",{attrs:{name:"disk"}})],1),e("ul",{staticClass:"b"},[e("li",[e("p",[t._v("已使用")]),e("p",[t._v(t._s(t.data_size))])])])])]),e("el-col",{attrs:{span:8}},[e("div",{staticClass:"block"},[e("div",{staticClass:"icon _cache"},[e("icon-svg",{attrs:{name:"cache"}})],1),e("ul",{staticClass:"b"},[e("li",[e("p",[t._v("缓存数")]),e("p",[t._v(t._s(t.Threads_cached))])])])])]),e("el-col",{attrs:{span:8}},[e("div",{staticClass:"block"},[e("div",{staticClass:"icon _connect"},[e("icon-svg",{attrs:{name:"connect"}})],1),e("ul",{staticClass:"b"},[e("li",[e("p",[t._v("连接数")]),e("p",[t._v(t._s(t.Threads_connected))])])])])])],1),e("e-charts",{attrs:{options:t.chart.options}})],1)},a=[],r=(s("865d"),s("8f26"),s("963e"),s("1447"),s("164e")),o=s.n(r),n=s("a9aa"),l={mixins:[n["default"]],data(){return{chart:{options:{}},Threads_connected:0,Threads_cached:0,data_size:0}},methods:{refresh({data:t,time:e}){const s=t[t.length-1],{mysqlConn:i,mysqlSize:a}=s.mysql;this.Threads_cached=i[0].Threads_cached,this.Threads_connected=i[1].Threads_connected,this.data_size=a.reduce((t,e)=>t+parseFloat(e.data_size),0)+"mb",this.chart.options=this.onChart(e,t.map(t=>t.mysql.mysqlConn[3].Threads_running))},onChart(t,e){return{tooltip:{trigger:"axis",axisPointer:{lineStyle:{color:"rgb(15, 75, 111)"}},backgroundColor:"rgb(255,255,255)",padding:[5,10],textStyle:{color:"rgb(15, 75, 111)"},extraCssText:"box-shadow: 0 0 5px rgba(0, 0, 0, 0.3)",formatter:t=>"线程数:"+t[0].data},grid:{left:"10px",right:"10px",bottom:"10px",top:"30px"},xAxis:{type:"category",show:!1,boundaryGap:!1,splitLine:{interval:"auto"},axisTick:{show:!1},axisLine:{show:!1},axisLabel:{margin:10,textStyle:{fontSize:12}},data:t},yAxis:{type:"value",show:!1,splitLine:{show:!0},axisTick:{show:!1},axisLine:{show:!0}},series:[{type:"line",smooth:!0,showSymbol:!1,symbol:"circle",symbolSize:6,data:e,markPoint:{symbolSize:30,data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},areaStyle:{normal:{color:new o.a.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(15, 75, 111, 0.5)"},{offset:1,color:"rgba(15, 75, 111, 0.1)"}],!1)}},itemStyle:{normal:{color:"rgb(15, 75, 111)"}},lineStyle:{normal:{width:1}}}]}}}},c=l,u=(s("7749"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"0771713f",null);e["default"]=d.exports},af72:function(t,e,s){},afc2:function(t,e,s){},b12e:function(t,e,s){},b140:function(t,e,s){"use strict";s("cce7")},b163:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"cl-chat__wrap"},[e("el-dialog",{attrs:{visible:t.visible,"close-on-click-modal":!1,width:"1000px"},on:{"update:visible":function(e){t.visible=e}}},[e("div",{staticClass:"cl-chat"},[e("div",{staticClass:"cl-chat__left"},[e("div",{staticClass:"header"},[e("el-input",{attrs:{placeholder:"搜索联系人",size:"small","prefix-icon":"el-icon-search"}})],1),e("div",{staticClass:"container"},[e("ul",{staticClass:"users"},t._l(t.userList,(function(s,i){return e("li",{key:i,on:{click:function(e){return t.toChat(s)}}},[e("img",{staticClass:"avatar",attrs:{src:s.smallAvatarUrl,alt:""}}),e("div",{staticClass:"det"},[e("p",[t._v(t._s(s.userName))]),e("div",[t._v(t._s(s.source))])]),e("div",{staticClass:"date"},[t._v(" "+t._s(s.chatTime)+" ")])])})),0)])]),e("div",{staticClass:"cl-chat__right"},[e("div",{staticClass:"header"},[e("span",[t._v("闪亮亮")]),e("div",{staticClass:"icon",on:{click:function(e){return t.hide()}}},[e("i",{staticClass:"el-icon-minus"})])]),e("div",{staticClass:"container"},[e("ul",{staticClass:"message"},t._l(t.messageList,(function(s,i){return e("li",{key:i,class:[s.my?"right":"left"]},[e("img",{staticClass:"avatar",attrs:{src:"",alt:""}}),e("div",{staticClass:"det"},[e("div",{staticClass:"label"},[e("span",{staticClass:"name"},[t._v("刘先生")]),e("span",{staticClass:"date"},[t._v("2020-12-22")])]),e("div",{staticClass:"content"},["text"==s.type?e("p",{staticClass:"block text"},[t._v(" "+t._s(s.text)+" ")]):"pic"==s.type?e("el-image",{staticClass:"block pic",attrs:{src:s.src,"preview-src-list":[s.src]}}):t._e()],1)])])})),0)]),e("div",{staticClass:"footer"},[e("ul",{staticClass:"tools"},[e("li",[e("el-button",{attrs:{size:"mini"}},[t._v("商品图")])],1),e("li",[e("el-upload",{attrs:{action:""}},[e("el-button",{attrs:{size:"mini",icon:"el-icon-picture"}})],1)],1)]),e("el-button",{staticClass:"send-btn",attrs:{size:"small",type:"primary"}},[t._v("发送")])],1)])])])],1)},a=[],r=(s("b138"),{data(){return{visible:!1,userList:[],messageList:[{type:"text",text:"我是厦门第一"},{type:"pic",src:"https://dss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2164724814,1401845036&fm=26&gp=0.jpg"},{type:"text",text:"我是厦门第二",my:!0},{type:"pic",src:"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3973065280,787801978&fm=26&gp=0.jpg",my:!0}]}},methods:{getUserList(){this.$service.chat.recentlyUser().then(t=>{this.userList=t})},toChat(t){this.$service.chat.begin({id:t.id}).then(t=>{console.log(t)})},globalGoToKd(){this.$router.push("/order/add")},show(){return this.$router.push("/my/info"),this.$message.success("即将开通..."),!1},hide(){this.visible=!1}}}),o=r,n=(s("1b16"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"220f5f07",null);e["default"]=l.exports},b17e:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content reward-set-wrap"},[e("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"150px"}},[e("el-form-item",{attrs:{label:"是否启用",prop:"name"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.ruleForm.switch,callback:function(e){t.$set(t.ruleForm,"switch",e)},expression:"ruleForm.switch"}})],1),1==t.ruleForm.switch?e("el-form-item",{attrs:{label:"老客户奖励",prop:"resource"}},[e("el-input",{staticStyle:{width:"200px"},model:{value:t.ruleForm.prize,callback:function(e){t.$set(t.ruleForm,"prize",e)},expression:"ruleForm.prize"}})],1):t._e(),1==t.ruleForm.switch?e("el-form-item",{attrs:{label:"新客户奖励",prop:"name"}},[e("div",{staticClass:"flex-center flex-wrap"},[e("el-input",{staticStyle:{width:"60px"},model:{value:t.ruleForm.amount,callback:function(e){t.$set(t.ruleForm,"amount",e)},expression:"ruleForm.amount"}}),e("div",{staticClass:"prompt-text"},[t._v("元优惠券,满")]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.ruleForm.miniCost,callback:function(e){t.$set(t.ruleForm,"miniCost",e)},expression:"ruleForm.miniCost"}}),e("div",{staticClass:"prompt-text"},[t._v("元可用,领取后")]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.ruleForm.duration,callback:function(e){t.$set(t.ruleForm,"duration",e)},expression:"ruleForm.duration"}}),e("div",{staticClass:"prompt-text"},[t._v("天内有效。")])],1)]):t._e(),e("el-form-item",[e("div",{staticClass:"app-color-3"},[t._v(" 此处的奖励,建议设置比注册会员奖励高一些,这样可以提高老客户积极性。 ")])]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("ruleForm")}}},[t._v("保存")])],1)],1)],1)},a=[],r=(s("8f26"),s("666b"),{name:"reward-set",data(){return{ruleForm:{switch:"0",prize:"",amount:"",miniCost:"",duration:""},rules:{}}},created(){this._getDet()},methods:{_getDet(){this.$service.invite.assetDetail().then(t=>{this.$util.isEmpty(t)||Object.keys(this.ruleForm).forEach((e,s)=>{this.ruleForm[e]=t[e]})})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this.$service.invite.assetUpdate(this.ruleForm).then(t=>{this.$message.success("设置成功!")})})},resetForm(t){this.$refs[t].resetFields()}}}),o=r,n=(s("1f03"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},b327:function(t,e,s){},b340:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap order-list-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:`${t.text}(${t.val})`,name:t.key}})})),1)]},proxy:!0},{key:"slot-search-date",fn:function({scope:s}){return[e("el-date-picker",{staticStyle:{"margin-left":"30px"},attrs:{"value-format":"yyyy-MM-dd",type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","picker-options":t.pickerOptions},on:{change:function(e){return t.changeDate()}},model:{value:t.searchDate,callback:function(e){t.searchDate=e},expression:"searchDate"}})]}},{key:"slot-option-area-list",fn:function(){return[e("el-input",{ref:"itemSearchRef",staticStyle:{width:"200px"},attrs:{placeholder:"搜索花材",size:"big",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.search=""}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),e("el-button",{staticStyle:{"margin-left":"40px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.myCgOrder()}}},[t._v("我的采购")]),e("el-button",{staticStyle:{"margin-left":"40px"},attrs:{type:"primary",size:"mini"},on:{click:t.goCg}},[t._v("去采购")]),e("el-button",{staticStyle:{"margin-left":"40px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportStockAssign()}}},[t._v("导出库存分配")])]},proxy:!0},{key:"table-column-remainStockNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[Number(s.row.remainStockNum)>0&&Number(s.row.bookNum)-Number(s.row.onNum)>0?e("span",{staticStyle:{color:"blue","font-weight":"bold"}},[t._v(" "+t._s(s.row.remainStockNum?parseFloat(s.row.remainStockNum):0)+" ")]):e("span",[t._v(t._s(s.row.remainStockNum?parseFloat(s.row.remainStockNum):0))])]):e("span",[Number(s.row.remainStockNum)>0&&Number(s.row.bookNum)-Number(s.row.onNum)>0?e("span",{staticStyle:{color:"blue","font-weight":"bold"}},[t._v(" "+t._s(s.row.remainStockNum?parseFloat(s.row.remainStockNum):0)+" ")]):e("span",[t._v(t._s(s.row.remainStockNum?parseFloat(s.row.remainStockNum):0))])])]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.goDetail(s.row)}}},[t._v("查看明细")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getBookRecord(s.row)}}},[t._v("预订记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getOnRecord(s.row)}}},[t._v("上下架记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getRoadRecord(s.row)}}},[t._v("路上记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getCgRecord(s.row)}}},[t._v("待采记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getStock(s.row)}}},[t._v("库存明细")])]}},{key:"table-column-roadNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.roadNum))]):e("span",[t._v(t._s(s.row.roadNum))])]}},{key:"table-column-needCgNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.needCgNum))]):e("span",[t._v(t._s(s.row.needCgNum))])]}},{key:"table-column-name",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.name))]):e("span",[t._v(t._s(s.row.name))])]}},{key:"table-column-bookNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.bookNum))]):e("span",[t._v(t._s(s.row.bookNum))])]}},{key:"table-column-hasRemark",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(1==s.row.hasRemark?"有":""))]):e("span",[1==s.row.hasRemark?e("span",{staticStyle:{color:"red","font-weight":"bold"}},[t._v("有")]):t._e()])]}},{key:"table-column-onNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.onNum))]):e("span",[t._v(t._s(s.row.onNum))])]}}])}),e("stock-detail",{ref:"stockDetail",attrs:{itemData:t.itemData}}),e("total-book-record",{ref:"totalBookRecord",attrs:{itemData:t.totalBookRecordData}}),e("total-book-on-record",{ref:"totalBookOnRecord",attrs:{itemData:t.totalBookOnRecordData}}),e("total-book-road-record",{ref:"totalBookRoadRecord",attrs:{itemData:t.totalBookRoadRecordData}}),e("total-book-cg-record",{ref:"totalBookCgRecord",attrs:{itemData:t.totalBookCgRecordData}})],1)},a=[],r=(s("b138"),s("f152")),o=(s("f4c5"),s("5880")),n=(s("54a1"),s("ad3b")),l=s("2cd5"),c=s("dec1"),u=s("073a"),d=s("362d"),m={components:{SelOrder:r["default"],stockDetail:n["default"],totalBookRecord:l["default"],totalBookOnRecord:c["default"],totalBookCgRecord:u["default"],totalBookRoadRecord:d["default"]},computed:{...Object(o["mapGetters"])(["shopInfo","userInfo"])},data(){return{pickerOptions:{shortcuts:[{text:"今天",onClick(t){const e=new Date,s=new Date;t.$emit("pick",[s,e])}},{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},searchDate:[],app:null,tabIndex:"0",tabsData:[{text:"全部",key:"0",val:0}],optionData:{},searchTime:"today",startDate:"",endDate:"",printData:{},shop:{},T:null,search:"",itemData:{id:0},totalBookRecordData:{},totalBookOnRecordData:{},totalBookRoadRecordData:{},totalBookCgRecordData:{}}},created(){this.init()},mounted(){this.$nextTick(()=>{this.$refs.itemSearchRef.focus()})},methods:{getCgRecord(t){this.totalBookCgRecordData={itemId:t.itemId,itemName:t.name,id:t.id},setTimeout(()=>{this.$refs.totalBookCgRecord.init()})},getRoadRecord(t){this.totalBookRoadRecordData={itemId:t.itemId,itemName:t.name,id:t.id},setTimeout(()=>{this.$refs.totalBookRoadRecord.init()})},getOnRecord(t){this.totalBookOnRecordData={itemId:t.itemId,itemName:t.name,id:t.id},setTimeout(()=>{this.$refs.totalBookOnRecord.init()})},getBookRecord(t){this.totalBookRecordData={itemId:t.itemId,itemName:t.name,id:t.id},setTimeout(()=>{this.$refs.totalBookRecord.init()})},getStock(t){this.itemData={id:t.itemId,name:t.name},setTimeout(()=>{this.$refs.stockDetail.init()})},myCgOrder(){let t=this.shopInfo&&this.shopInfo.staff.id?this.shopInfo.staff.id:0,e=this.shopInfo&&this.shopInfo.staff.name?this.shopInfo.staff.name:"",s={currentCgStaffId:t,currentCgStaffName:e};this.$router.push({path:"/in/list",query:s})},goCg(){let t={};this.$router.push({path:"/in/add",query:t})},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh({status:this.tabIndex,search:this.search})}),650)},exportStockAssign(){this.$service.statBook.exportStockAssign({}).then(t=>{t.file&&(window.location.href=t.file)})},goDetail(t){let e={itemId:t.itemId,itemName:t.name};this.$router.push({path:"/book/itemCustom",query:e})},cancelBook(){this.$refs["openCloseBookRef"].doClose()},changeBook(t){this.$refs["openCloseBookRef"].doClose();let e=0==t?1:0;return this.$service.book.changeBook({status:e}).then(t=>{this.$message.success("操作成功"),this.app.refresh({status:this.tabIndex,search:this.search})})},init(){},changeDate(){let t=this.searchDate[0]||"",e=this.searchDate[1]||"";return""==t?(this.$message.error("请选择开始时间"),!1):""!=e&&e<t?(this.$message.error("结束时间不能小于开始时间"),!1):(this.searchTime="custom",this.startDate=t,this.endDate=e,void this.app.refresh({status:this.tabIndex,search:this.search}))},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.statBook.getProfile({search:this.search}).then(t=>(this.shop=t.shop?t.shop:{},{list:t.list,shop:t.shop}))}).set("table",{columns:[{prop:"name",label:"花材",align:"center",width:"300"},{prop:"bookNum",label:"预订",align:"center"},{prop:"onNum",label:"上架",align:"center"},{prop:"remainStockNum",label:"剩余",align:"center"},{prop:"roadNum",label:"路上",align:"center"},{prop:"needCgNum",label:"待采",align:"center"},{prop:"hasRemark",label:"备注",align:"center"}],op:{visible:!0,props:{width:800,align:"left",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-option-area-list","slot-search-date"],["data-table"],[]]).on("refresh",async(t,{next:e})=>{let s=await e(t);this.printData=s.printData}).done(),e.refresh({status:this.tabIndex,search:this.search})}}},p=m,h=(s("9da5"),s("ec5b"),s("1805")),f=Object(h["a"])(p,i,a,!1,null,"a1e01aa2",null);e["default"]=f.exports},b344:function(t,e,s){"use strict";s.r(e);s("b138");var i=function(){var t=this,e=t._self._c;return e("el-drawer",{attrs:{title:"客户详情",visible:t.showStatus,size:"70%","before-close":t.closeFn,"custom-class":"member-draw-wrap"},on:{"update:visible":function(e){t.showStatus=e}}},[e("div",{staticClass:"head-wrap"},[e("div",{staticClass:"head-left"},[e("cl-avatar",{style:{margin:"auto"},attrs:{size:60,src:t.info.avatar}}),e("div",[t._v(t._s(t.info.userName))]),t.info.userAsset?e("div",[t._v(t._s(t.info.userAsset.growth))]):t._e()],1),e("div",{staticClass:"head-right"},[e("div",[e("div",{staticClass:"info-label"},[t._v("用户ID")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.id))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("手机号")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.mobile||"-"))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("昵称")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.userName))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("粉丝")]),e("div",{staticClass:"info-val"},[t._v(t._s(0==t.info.subscribe?"否":"是"))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("性别")]),e("div",{staticClass:"info-val"},[1==t.info.sex?[t._v("男")]:2==t.info.sex?[t._v("女")]:[t._v("-")]],2)]),e("div",[e("div",{staticClass:"info-label"},[t._v("最近访问")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.visitTimeFormat))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("生日")]),e("div",{staticClass:"info-val"},["0000-00-00"==t.info.birthday?[t._v("-")]:[t._v(t._s(t.info.birthday))]],2)]),e("div",[e("div",{staticClass:"info-label"},[t._v("创建时间")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.createTime))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("住址")]),e("div",{staticClass:"info-val"},[t._v(t._s(t.info.address||"-"))])]),e("div",[e("div",{staticClass:"info-label"},[t._v("用户来源")]),e("div",{staticClass:"info-val"},[0==t.info.sourceType?[t._v("微信")]:1==t.info.sourceType?[t._v("支付宝")]:2==t.info.sourceType?[t._v("小程序")]:3==t.info.sourceType?[t._v("朋友圈")]:4==t.info.sourceType?[t._v("美团")]:5==t.info.sourceType?[t._v("系统")]:[t._v("-")]],2)])])]),e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v("资产信息")]),e("el-table",{attrs:{data:t.assetsData}},[e("el-table-column",{attrs:{property:"totalExpend",label:"消费金额"}}),e("el-table-column",{attrs:{property:"totalBuyNum",label:"消费次数"}}),e("el-table-column",{attrs:{property:"balance",label:"余额"}}),e("el-table-column",{attrs:{property:"growth",label:"成长值"}}),e("el-table-column",{attrs:{property:"getCouponNum",label:"领优惠券数"}}),e("el-table-column",{attrs:{property:"totalRecharge",label:"累计充值"}}),e("el-table-column",{attrs:{property:"inviteNum",label:"邀请新人数"}}),e("el-table-column",{attrs:{property:"discount",label:"享折扣"}})],1)],1),e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v("订单记录")]),e("el-table",{attrs:{data:t.orderData}},[e("el-table-column",{attrs:{property:"id",label:"ID"}}),e("el-table-column",{attrs:{property:"createTime",label:"提交时间"}}),e("el-table-column",{attrs:{property:"actPrice",label:"订单金额"}}),e("el-table-column",{attrs:{property:"payWay",label:"支付方式"}}),e("el-table-column",{attrs:{property:"sendNum",label:"编号"}}),e("el-table-column",{attrs:{property:"status",label:"订单状态"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",[t._v(t._s(t._f("constantfilter")(s.row.status,"ORDER_STATUS")))])]}}])}),e("el-table-column",{attrs:{property:"discount",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.$router.push("/order/list")}}},[t._v("查看订单")])]}}])})],1)],1)])},a=[],r={name:"detail-draw",props:{show:{type:Boolean,default:!1},info:{type:Object,default:()=>{}}},data(){return{showStatus:!1,data:{},assetsData:[],orderData:[]}},watch:{show(t){this.showStatus=t,t&&this.init()}},methods:{init(){this.$service.member.allDetail({userId:this.info.id}).then(t=>{this.data=t,this.assetsData=[t.userAsset],this.orderData=t.orderList})},closeFn(t){this.$emit("update:show",!1),t()}}},o=r,n=(s("18ea"),s("4873"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"cfe3eb7a",null);e["default"]=l.exports},b380:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-clear-btn",fn:function(){return[e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:t.$service.system.log.clear,expression:"$service.system.log.clear"}],attrs:{size:"mini",type:"danger"},on:{click:t.clear}},[t._v("清空")])]},proxy:!0},{key:"slot-set",fn:function(){return[e("div",{staticClass:"slot-set"},[e("span",[t._v("日志保存天数")]),e("el-input-number",{attrs:{"controls-position":"right",size:"mini",max:1e4,min:1},on:{blur:t.saveDay},model:{value:t.day,callback:function(e){t.day=e},expression:"day"}})],1)]},proxy:!0}])})},a=[],r=s("5880"),o={data(){return{crud:null,day:1}},computed:{...Object(r["mapGetters"])(["permission"])},created(){this.$service.system.log.getKeep().then(t=>{this.day=t})},methods:{onLoad({ctx:t,app:e}){this.crud=e,t.service(this.$service.system.log).set("table",{columns:[{type:"index",align:"center",width:60},{prop:"userId",label:"用户ID",align:"center"},{prop:"name",label:"昵称",align:"center"},{prop:"action",label:"请求地址",align:"center",minWidth:"200","show-overflow-tooltip":!0},{prop:"params",label:"参数",align:"center",minWidth:"200","show-overflow-tooltip":!0},{prop:"ip",label:"ip",minWidth:"180",align:"center"},{prop:"ipAddr",label:"ip地址",minWidth:"150",align:"center"},{prop:"createTime",label:"创建时间",minWidth:"150",align:"center",sortable:!0}],op:{visible:!1},props:{"default-sort":{prop:"createTime",order:"descending"}}}).set("search",{key:{placeholder:"请输入请求地址, 参数,ip地址"}}).set("layout",[["refresh-btn","add-btn","slot-clear-btn","slot-set","flex1","search-key"],["data-table"],["flex1","pagination"]]).done(),e.refresh()},saveDay(){this.$service.system.log.setKeep(this.day).then(()=>{this.$message.success("保存成功")})},clear(){this.$confirm("是否要清空日志","提示",{type:"warning"}).then(()=>{this.$service.system.log.clear().then(()=>{this.$message.success("清空成功"),this.crud.refresh({page:1})}).catch(t=>{this.$message.error(t)})}).catch(()=>{})}}},n=o,l=(s("dbc7"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"709868ed",null);e["default"]=c.exports},b392:function(t,e,s){"use strict";s("173e")},b3c3:function(t,e,s){"use strict";s("437e")},b4a4:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"44vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"rtl"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-cover",fn:function({scope:t}){return[e("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[e("div",{staticStyle:{width:"200px",height:"200px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover"},attrs:{src:t.row.bigCover}})]),e("div",{staticStyle:{width:"40px"},attrs:{slot:"reference"},slot:"reference"},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:t.row.cover}})])])]}},{key:"table-column-name",fn:function({scope:s}){return[e("span",{staticStyle:{"font-size":"16px"}},[t._v(t._s(s.row.name))])]}},{key:"table-column-stock",fn:function({scope:s}){return[e("span",{staticStyle:{"font-size":"13px"}},[t._v(t._s(s.row.stock?parseFloat(s.row.stock):0))])]}},{key:"table-column-showUsePrice",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"价格"},model:{value:s.row.showUsePrice,callback:function(e){t.$set(s.row,"showUsePrice",e)},expression:"scope.row.showUsePrice"}})]}},{key:"table-column-bigCount",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"数量"},model:{value:s.row.bigCount,callback:function(e){t.$set(s.row,"bigCount",e)},expression:"scope.row.bigCount"}})]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.confirmAdd(s.row)}}},[t._v("添加")])]}},{key:"slot-option-area-list",fn:function(){return[e("el-input",{ref:"itemSearchRef",staticStyle:{width:"200px"},attrs:{placeholder:"搜索花材",size:"big",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.search=""}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),e("el-button",{staticStyle:{"margin-left":"30px"},attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.closeFn()}}},[t._v("关闭")])]},proxy:!0}])})],1)])],1)},a=[],r=(s("f803"),{name:"simple-item",props:{simpleData:{type:Object,default:()=>{}}},data(){return{showArea:!1,search:""}},methods:{changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh({name:this.search})}),650)},init(){this.showArea=!0,this.search="",this.app&&this.app.refresh({name:this.search}),this.$nextTick(()=>{this.$refs.itemSearchRef.focus()})},closeFn(){this.showArea=!1},confirmAdd(t){if(Number(t.bigCount)<=0)return this.$message.error("请填写数量"),!1;let e=Number(t.showUsePrice)>0?t.showUsePrice:100,s=[{id:t.id,bigCount:t.bigCount,price:e}];this.$service.orderItem.addItem({data:JSON.stringify(s),id:this.simpleData.id}).then(t=>{this.$message.success("添加成功"),this.$emit("renewArrival",this.simpleData)})},onLoad({ctx:t,app:e}){this.app=e;let s=()=>this.$service.item.simpleList({name:this.search});t.service({page:s}).set("table",{columns:[{label:"ID",prop:"id",align:"center",width:70},{label:"图片",prop:"cover",align:"center",width:65},{label:"名称",prop:"name",align:"center",width:200},{label:"库存",prop:"stock",align:"center",width:90},{label:"价格",prop:"showUsePrice",align:"center",width:100},{label:"数量",prop:"bigCount",align:"center",width:100}],op:{visible:!0,props:{width:130,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-option-area-list"],["data-table"],["flex1"]]).done(),e.refresh({name:this.search})}}}),o=r,n=(s("3dd5"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"5e6f1863",null);e["default"]=l.exports},b4f8:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.customData.customName?t.customData.customName:"")+"】上下架记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-on-record",props:{customData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCustomOnChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.customData.id,customId:this.customData.customId})}}},o=r,n=(s("4b24"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"05cb9862",null);e["default"]=l.exports},b51c:function(t,e,s){"use strict";s("3dc0")},b569:function(t,e,s){},b5c8:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.goDetail(s.row)}}},[t._v("查看明细")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getBookRecord(s.row)}}},[t._v("预订记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getOnRecord(s.row)}}},[t._v("上下架记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getRoadRecord(s.row)}}},[t._v("路上记录")]),e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getCgRecord(s.row)}}},[t._v("待采记录")])]}},{key:"table-column-name",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(" "+t._s(s.row.name)),0!=s.row.seatSn?e("span",[t._v("("+t._s(s.row.seatSn)+")")]):t._e()]):e("span",[t._v(" "+t._s(s.row.name)),0!=s.row.seatSn?e("span",[t._v("("+t._s(s.row.seatSn)+")")]):t._e()])]}},{key:"table-column-roadNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.roadNum))]):e("span",[t._v(t._s(s.row.roadNum))])]}},{key:"table-column-hasRemark",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(1==s.row.hasRemark?"有":""))]):e("span",{staticStyle:{color:"red","font-weight":"bold"}},[t._v(t._s(1==s.row.hasRemark?"有":""))])]}},{key:"table-column-bookNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.bookNum))]):e("span",[t._v(t._s(s.row.bookNum))])]}},{key:"table-column-onNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.onNum))]):e("span",[t._v(t._s(s.row.onNum))])]}},{key:"table-column-needCgNum",fn:function({scope:s}){return[s.row.bookNum==s.row.onNum?e("span",{staticStyle:{color:"green","font-weight":"bold"}},[t._v(t._s(s.row.needCgNum))]):e("span",[t._v(t._s(s.row.needCgNum))])]}},{key:"slot-option-area-list",fn:function(){return[e("el-input",{ref:"customSearchRef",staticStyle:{width:"300px"},attrs:{placeholder:"搜索客户",size:"big",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.search=""}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}})]},proxy:!0}])}),e("book-custom-record",{ref:"bookCustomRecord",attrs:{customData:t.bookCustomRecordData}}),e("book-custom-on-record",{ref:"bookCustomOnRecord",attrs:{customData:t.bookCustomOnRecordData}}),e("book-custom-road-record",{ref:"bookCustomRoadRecord",attrs:{customData:t.bookCustomRoadRecordData}}),e("book-custom-cg-record",{ref:"bookCustomCgRecord",attrs:{customData:t.bookCustomCgRecordData}})],1)},a=[],r=(s("b138"),s("5880"),s("a792")),o=s("b4f8"),n=s("6690"),l=s("752b"),c={components:{bookCustomRecord:r["default"],bookCustomOnRecord:o["default"],bookCustomCgRecord:n["default"],bookCustomRoadRecord:l["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"列表",key:"0",val:0}],ghsInfoList:[],loading:!1,ghsId:0,endTime:"",search:"",bookCustomCgRecordData:{},bookCustomRoadRecordData:{},bookCustomOnRecordData:{},bookCustomRecordData:{}}},mounted(){this.$nextTick(()=>{this.$refs.customSearchRef.focus()})},methods:{getCgRecord(t){this.bookCustomCgRecordData={customId:t.customId,customName:t.name,id:t.id},setTimeout(()=>{this.$refs.bookCustomCgRecord.init()})},getRoadRecord(t){this.bookCustomRoadRecordData={customId:t.customId,customName:t.name,id:t.id},setTimeout(()=>{this.$refs.bookCustomRoadRecord.init()})},getOnRecord(t){this.bookCustomOnRecordData={customId:t.customId,customName:t.name,id:t.id},setTimeout(()=>{this.$refs.bookCustomOnRecord.init()})},getBookRecord(t){let e=this;this.bookCustomRecordData={customId:t.customId,customName:t.name,id:t.id},setTimeout(()=>{e.$refs.bookCustomRecord.init()})},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh({search:t.search})}),650)},goDetail(t){let e={customId:t.customId,customName:t.name};this.$router.push({path:"/book/itemCustom",query:e})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCustom).set("table",{columns:[{prop:"name",label:"名称",align:"center"},{prop:"bookNum",label:"预订",align:"center"},{prop:"onNum",label:"上架",align:"center"},{prop:"roadNum",label:"路上",align:"center"},{prop:"needCgNum",label:"待采",align:"center"},{prop:"hasRemark",label:"备注",align:"center"}],op:{visible:!0,props:{width:750,align:"left",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-option-area-list"],["data-table"]]).done(),e.refresh({search:this.search})}}},u=c,d=(s("7d00"),s("1805")),m=Object(d["a"])(u,i,a,!1,null,"948a8602",null);e["default"]=m.exports},b5d7:function(t,e,s){"use strict";s("734b")},b640:function(t,e,s){},b745:function(t,e,s){"use strict";s("20e5")},b8ce:function(t,e,s){"use strict";s("662e")},baf4:function(t,e,s){},bc0f:function(t,e,s){"use strict";s("0aa9")},bd0a:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"44vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:t.direction},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-cover",fn:function({scope:t}){return[e("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[e("div",{staticStyle:{width:"200px",height:"200px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover"},attrs:{src:t.row.bigCover}})]),e("div",{staticStyle:{width:"40px"},attrs:{slot:"reference"},slot:"reference"},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:t.row.cover}})])])]}},{key:"table-column-name",fn:function({scope:s}){return[e("span",{staticStyle:{"font-size":"16px"}},[t._v(t._s(s.row.name))])]}},{key:"table-column-stock",fn:function({scope:s}){return[e("span",{staticStyle:{"font-size":"13px"}},[t._v(t._s(s.row.stock?parseFloat(s.row.stock):0))])]}},{key:"table-column-bigCount",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"数量"},model:{value:s.row.bigCount,callback:function(e){t.$set(s.row,"bigCount",e)},expression:"scope.row.bigCount"}})]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.confirmLoan(s.row)}}},[t._v("借用")])]}},{key:"slot-option-area-list",fn:function(){return[e("el-input",{ref:"itemSearchRef",staticStyle:{width:"200px"},attrs:{placeholder:"搜索花材",size:"big",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.search=""}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),e("span",{staticStyle:{"margin-left":"10px","font-size":"27px"}},[t._v("【"+t._s(t.currentData.customName?t.currentData.customName:"")+"】"+t._s(t.currentData.itemName?t.currentData.itemName:"")+" 借库存")])]},proxy:!0}])})],1)])],1)},a=[],r={name:"loan-item",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1,search:"",direction:"ltr"}},methods:{changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh({name:this.search})}),650)},init(){this.currentData.direction&&!this.$util.isEmpty(this.currentData.direction)&&(this.direction=this.currentData.direction),this.showArea=!0,this.search="",this.app&&this.app.refresh({name:this.search}),this.$nextTick(()=>{this.$refs.itemSearchRef.focus()})},closeFn(){this.showArea=!1},confirmLoan(t){let e=this;if(Number(t.bigCount)<=0)return this.$message.error("请填写数量"),!1;let s={inId:this.currentData.itemId,outId:t.id,num:t.bigCount,bookItemCustomId:this.currentData.id};this.$confirm("确认借用?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.checkOrder.loan(s).then(t=>{e.$message.success("借用成功"),this.currentData.orderId&&Number(this.currentData.orderId)>0?e.$emit("renewArrival",{id:this.currentData.orderId}):e.$emit("refreshData"),this.showArea=!1})})},onLoad({ctx:t,app:e}){this.app=e;let s=()=>this.$service.item.getLoanList({name:this.search});t.service({page:s}).set("table",{columns:[{label:"ID",prop:"id",align:"center",width:80},{label:"图片",prop:"cover",align:"center",width:65},{label:"名称",prop:"name",align:"center",width:300},{label:"可借",prop:"stock",align:"center",width:100},{label:"要借",prop:"bigCount",align:"center",width:130}],op:{visible:!0,props:{width:130,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-option-area-list"],["data-table"],["flex1"]]).done(),e.refresh({name:this.search})}}},o=r,n=(s("5d48"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"68b775af",null);e["default"]=l.exports},bd79:function(t,e,s){"use strict";s("4ffc")},be60:function(t,e,s){"use strict";s("2531")},bf13:function(t,e,s){},bfd7:function(t,e,s){"use strict";s("146d")},bfdc:function(t,e,s){"use strict";s("19a4")},c158:function(t,e,s){"use strict";s("f8a3")},c18e:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function({scope:s}){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:`${t.text}(${t.val})`,name:t.key}})})),1)]}},{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(t._s(t._f("formatTime")(s.row.addTime)))])]}},{key:"table-column-deadline",fn:function({scope:s}){return[e("span",[t._v(t._s(t._f("formatTime")(s.row.deadline)))])]}},{key:"table-column-status",fn:function({scope:s}){return[1==s.row.status?e("span",[e("i",{staticClass:"iconfont icondagou"})]):e("span",[t._v(t._s(t._f("constantfilter")(s.row.status,"COUPON_STATUS")))])]}}])})],1)},a=[],r={data(){return{app:null,tabIndex:"-1",tabsData:[{text:"全部",key:"-1",val:0},{text:"待使用",key:"0",val:0},{text:"已使用",key:"1",val:0},{text:"已失效",key:"2",val:0}]}},mounted(){},methods:{handleClick(){this.app.refresh({status:this.tabIndex})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.coupon).set("table",{columns:[{prop:"userId",label:"ID",align:"center"},{prop:"userName",label:"持有人",align:"center"},{prop:"mobile",label:"手机号",align:"center"},{prop:"amount",label:"金额",align:"center"},{prop:"miniCost",label:"最低消费",align:"center",emptyText:"无"},{prop:"addTime",label:"领取时间",align:"center",width:150},{prop:"deadline",label:"到期时间",align:"center",width:150},{prop:"source",label:"来源",align:"center"},{prop:"status",label:"状态",align:"center"}],op:{visible:!1,props:{width:150,align:"center",fixed:"right",label:"操作"},layout:["slot-recharge","slot-upgrade","slot-ship"]}}).set("layout",[["slot-tabs"],["flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{let{asset:s}=await e(t);this.tabsData[0].val=s.totalNum,this.tabsData[1].val=s.unUseNum,this.tabsData[2].val=s.useNum,this.tabsData[3].val=s.invalidNum}).done(),e.refresh({status:this.tabIndex})}}},o=r,n=s("1805"),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},c209:function(t,e,s){"use strict";s("6811")},c233:function(t,e,s){"use strict";s("cd67")},c284:function(t,e,s){},c3d3:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad}})],1)},a=[],r=s("5880"),o={data(){return{crud:null}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{onLoad({ctx:t,app:e}){this.crud=e,t.service({page:t=>this.$service.shop.list(t).then(e=>({list:e.list,pagination:{page:t.page,size:20,total:0}}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"名称",prop:"shopName",align:"center"},{label:"营业时间",prop:"openTime",align:"center"},{label:"联系电话",prop:"mobile",align:"center"},{label:"累计收入",prop:"totalIncome",align:"center"},{label:"地址",prop:"fullAddress",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["flex1","refresh-btn"],["data-table"]]).on("info",(t,{done:e})=>{console.log(t),e({...t,openTime:t.openTime.split("-"),provinceCity:[t.province,t.city]})}).done(),e.refresh()}}},n=o,l=(s("a8f5"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"cd4c7922",null);e["default"]=c.exports},c471:function(t,e,s){"use strict";s("baf4")},c4e3:function(t,e,s){},c500:function(t,e,s){},c50e:function(t,e,s){},c681:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(t._s(t._f("formatTime")(s.row.addTime)))])]}},{key:"slot-sel-serch",fn:function({scope:s}){return[e("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.form}},[e("el-form-item",{attrs:{label:"员工"}},[e("el-select",{staticStyle:{width:"150px"},attrs:{size:"mini",placeholder:"请选择",clearable:!0},model:{value:t.form.adminId,callback:function(e){t.$set(t.form,"adminId",e)},expression:"form.adminId"}},t._l(t.staffList,(function(s,i){return e("el-option",{key:i,attrs:{label:s.adminName,value:s.id}},[t._v(t._s(s.adminName))])})),1)],1),e("el-form-item",{attrs:{label:"日期"}},[e("el-date-picker",{staticStyle:{width:"150px"},attrs:{type:"date",placeholder:"选择开始日期","value-format":"yyyy-MM-dd",size:"mini"},model:{value:t.form.startTime,callback:function(e){t.$set(t.form,"startTime",e)},expression:"form.startTime"}}),e("span",{staticClass:"picker-separate"},[t._v("-")]),e("el-date-picker",{staticStyle:{width:"150px"},attrs:{type:"date",placeholder:"选择结束日期","value-format":"yyyy-MM-dd",size:"mini"},model:{value:t.form.endTime,callback:function(e){t.$set(t.form,"endTime",e)},expression:"form.endTime"}})],1),e("el-form-item",{attrs:{label:""}},[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.serchFn}},[t._v("确认")])],1)],1)]}}])})],1)},a=[],r={data(){return{app:null,staffList:[],form:{adminId:"",startTime:"",endTime:""}}},mounted(){this.getStaff()},methods:{getStaff(){this.$service.staff.list().then(t=>{this.staffList=t.list})},serchFn(){this.app.refresh(this.form)},onLoad({ctx:t,app:e}){this.app=e;let s=()=>this.$service.single.log(this.form);t.service({page:s}).set("table",{columns:[{prop:"id",label:"ID",align:"center"},{prop:"adminName",label:"操作者",align:"center"},{prop:"addTime",label:"操作日期",align:"center"},{prop:"ip",label:"IP地址",align:"center"},{prop:"content",label:"操作记录",align:"center",emptyText:"无"}],op:{visible:!1,props:{width:150,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["slot-sel-serch","flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh(this.form)}}},o=r,n=(s("a3f6"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"104674ed",null);e["default"]=l.exports},c6d8:function(t,e,s){"use strict";s("f711")},c700:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-addTime",fn:function({scope:s}){return[e("div",[t._v(t._s(t._f("formatTime")(s.row.addTime)))])]}},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.modifyBtnFn(s.row)}}},[t._v("编辑")])]}},{key:"slot-del",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.delBtnFn(s.row)}}},[t._v("删除")])]}},{key:"slot-add-ad-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.addBtnFn}},[t._v("添加")])]},proxy:!0}])}),e("el-dialog",{attrs:{title:(1==t.addOrModify?"添加":"修改")+"角色",visible:t.addDialog,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.addDialog=e}}},[e("div",{staticClass:"ad-modal-content"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.ruleForm,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"角色名称",prop:"roleName"}},[e("el-input",{attrs:{placeholder:"请输入名称",size:"small"},model:{value:t.form.roleName,callback:function(e){t.$set(t.form,"roleName",e)},expression:"form.roleName"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.submitForm("form")}}},[t._v("确认")])],1)]),e("role-set",{attrs:{show:t.roleShow,info:t.modifyData},on:{"update:show":function(e){t.roleShow=e}}})],1)},a=[],r=(s("209c"),s("f803"),s("0c0b")),o={name:"list-ad",components:{roleSet:r["default"]},data(){return{app:null,modifyData:{},addOrModify:1,addDialog:!1,form:{roleName:""},ruleForm:{roleName:[{required:!0,message:"请输入名称",trigger:"blur"}]},roleShow:!1}},methods:{delBtnFn(t){return this.$message.success("即将开通..."),!1},authBtnFn(t){return this.$message.success("即将开通..."),!1},modifyBtnFn(t){this.addOrModify=2,this.modifyData=t,this.addDialog=!0;let e=JSON.parse(JSON.stringify(t));e.addTime=this.$util.$formatDate(e.addTime),this.form.roleName=t.roleName},addBtnFn(){this.addOrModify=1,this.addDialog=!0},resetForm(){this.$refs["form"].resetFields(),this.addDialog=!1},addFn(){let t=null;t=1==this.addOrModify?()=>this.$service.role.add(this.form):()=>this.$service.role.update({id:this.modifyData.id,...this.form}),t(this.form).then(t=>{this.$message.success("操作成功!"),this.resetForm(),this.app.refresh({type:this.tabIndex})})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this.addFn()})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.role).set("table",{columns:[{prop:"roleName",label:"角色名称",align:"center"},{prop:"num",label:"成员数量",align:"center"},{prop:"addTime",label:"添加时间",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh({type:this.tabIndex})}}},n=o,l=(s("9a12"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"3d5ce644",null);e["default"]=c.exports},c745:function(t,e,s){"use strict";s.r(e);s("b138"),s("8f26"),s("3739"),s("666b"),s("963e"),s("209c"),s("f803");var i=s("5880");e["default"]={data(){return{selectJobType:"bill",selectJobId:0,isCut:!1,productInfoList:[],globalClassIndex:0,py:"",type:"",autoLoad:!0,allFilterProductInfo:"",top_list:"",scroll_into_view:"",timeFun:"",kdType:"HIT",globalCheckStock:!0,isAddModel:!1,isAddInputFocus:!1,customData:{bigCount:0,smallCount:0,userPrice:0,totalPrice:0,aboutPrice:0,remark:"",assignSeat:"1"},globalItemList:[],globalUnitType:0,globalAllProduct:[],calc:"add",globalRequestType:"kd",globalCustomId:0,globalCustomName:"",globalClassData:[],globalClassId:0,globalFinishGetItem:0,globalPage:1,globalPy:"",globalItemData:[],globalScrollTopPlace:0,globalScrollTopOldPlace:0,globalIsRequesting:!1}},onLoad(t){const{selectJobType:e}=t;e&&(this.selectJobType=e)},computed:{...Object(i["mapGetters"])(["getSelectInfo"]),selectList(){let t=this.getSelectInfo;return t[this.selectJobType+"_"+this.selectJobId]||[]},selectListIndex(){let t=this.getSelectInfo,e=t[this.selectJobType+"_"+this.selectJobId]||[],s=[];return this.$util.isEmpty(e)||e.forEach((t,e,i)=>{let a=t.id;s[a]=t}),s},scrollClassId(){const t=this.productInfoList[this.globalClassIndex];return t?"class_"+t.classId:""},allPrice(){let t=0;if(this.selectList)for(const e of this.selectList)e.aboutPrice&&1==e.aboutPrice?t+=Number(e.totalPrice):(Number(e.bigCount)>0&&(t+=Number(e.bigCount)*Number(e.userPrice)),Number(e.smallCount)>0&&(t+=Number(e.smallCount)*Number(e.userPrice)));return Math.round(100*t)/100},allCount(){let t=0,e=0,s=0,i=0;if(this.selectList){for(const a of this.selectList){t+=Number(a.bigCount),e+=Number(a.smallCount);let r=a.weight?a.weight:0,o=Number(r)*Number(a.bigCount);s=Number(s)+Number(o),i++}s=s.toFixed(2),s=parseFloat(s)}return{bigLength:t,smallLength:e,weight:s,kind:i}},hasNoStock(){let t=!1;if(this.selectList)for(const e of this.selectList){const{bigCount:s,smallCount:i,bigNum:a,smallNum:r,ratio:o}=e,n=Number(o);if(Number(s)*n+Number(i)>Number(a)*n+Number(r)){t=!0;break}}return t}},onShow(){},methods:{...Object(i["mapActions"])(["setSelectInfo","reSetSelectInfo"]),init(){this.autoLoad&&this.initData()},initData(){},reGetGlobalProductList(){this.globalGoToTop(),this.globalPage=1,this.globalFinishGetItem=0,this.getGlobalProductList()},getGlobalProductList(){if(1==this.globalFinishGetItem)return!1},globalSwitchClass(t,e){this.globalGoToTop(),this.globalClassIndex=t,this.globalPage=1,this.globalPy="",this.$refs.globalSearchRef.search="",this.globalClassId=e.id,this.globalFinishGetItem=0,this.getGlobalProductList()},pushToSave(t){this.setSelectInfo({selectJobType:this.selectJobType,info:t,selectJobId:this.selectJobId}),localStorage.setItem("selectList_"+this.selectJobType+"_target_"+this.selectJobId,JSON.stringify(t))},getFromStorage(t){let e=localStorage.getItem("selectList_"+this.selectJobType+"_target_"+this.selectJobId),s=JSON.parse(e);if(1==t){if(!this.$util.isEmpty(s)){const t=s.map(t=>({productId:t.id}));this.$service.item.getNewInfo({data:JSON.stringify(t)}).then(t=>{let e=t.list?t.list:[];const i=s.map(t=>{let s=t.id,i=e[s]&&e[s].stock?e[s].stock:0;return i=parseFloat(i),{...t,stock:i,bigNum:i}});localStorage.setItem("selectList_"+this.selectJobType+"_target_"+this.selectJobId,JSON.stringify(i)),this.setSelectInfo({selectJobType:this.selectJobType,info:i,selectJobId:this.selectJobId})})}}else this.setSelectInfo({selectJobType:this.selectJobType,info:s,selectJobId:this.selectJobId})},globalChangeClass(t,e){this.$refs.globalClassImgRef.close(),this.globalSwitchClass(t,e)},removeFromSave(){let t=this;this.$confirm("确认清除花材?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.removeFromSaveDirect(),t.$message({message:"已清除",type:"success"})})},removeFromSaveDirect(){let t=this;localStorage.removeItem("selectList_"+t.selectJobType+"_target_"+t.selectJobId),t.reSetSelectInfo({selectJobType:t.selectJobType,selectJobId:t.selectJobId}),"bill"==t.selectJobType&&localStorage.removeItem("xj"+t.selectJobId),this.$util.isEmpty(this.globalItemData)||(this.globalItemData.forEach((t,e,s)=>{s[e].bigCount=0,s[e].smallCount=0,s[e].userPrice=0,s[e].remark="",s[e].assignSeat="1"}),this.$forceUpdate())},globalSearch(){this.globalPage=1,this.$util.isEmpty(this.globalPy)||(this.globalGoToTop(),this.globalClassIndex=-1,this.globalFinishGetItem=0,this.getGlobalProductList())},globalGoToTop(){let t=this;this.globalScrollTopPlace=this.globalScrollTopOldPlace,this.$nextTick(()=>{t.globalScrollTopPlace=0})},globalGetScroll(t){this.globalScrollTopOldPlace=t.detail.scrollTop},globalScrollBottom(){if(1==this.globalIsRequesting)return!1;this.globalIsRequesting=!0,this.getGlobalProductList()},getSelectItemById(t,e){let s={bigCount:null,smallCount:null,autoPrice:null,itemPrice:null};const i=this.selectList&&this.selectList.find(s=>s.id==t&&s.classId==e);return i&&(s={...i,bigCount:Number(i.bigCount),smallCount:Number(i.smallCount),autoPrice:Number(i.autoPrice),itemPrice:Number(i.itemPrice)}),s},replaceItemFn(t,e=0,s="add",i=0){let a=this.$util.copyObject(t);0==e&&(Number(a.smallCount)>0?("add"==s&&a.smallCount++,"sub"==s&&a.smallCount--):("add"==s&&a.bigCount++,"sub"==s&&a.bigCount--));const r=this.selectList;let o=r.findIndex(t=>t.id==a.id);if(Number(a.bigCount)<0||Number(a.smallCount)<0)return!1;if(this.globalCheckStock){let t=Number(a.bigCount)*a.ratio+Number(a.smallCount);t=t.toFixed(2);let e=Number(a.bigNum)*a.ratio+Number(a.smallNum);if(e=e.toFixed(2),console.log(t+" "+e),Number(t)>Number(e))return this.noStockPlay(),void this.$message({message:"库存不足哦",type:"warning"})}if(-1==o){if(this.$util.isEmpty(a.userPrice)||0==Number(a.userPrice))return void this.$message({message:"请填写金额哦",type:"warning"});r.push(a)}else a.bigCount<=0&&a.smallCount<=0?r.splice(o,1):(r[o].bigCount=a.bigCount,r[o].smallCount=a.smallCount,r[o].userPrice=a.userPrice,r[o].aboutPrice=a.aboutPrice,r[o].totalPrice=a.totalPrice,r[o].remark=a.remark||"",r[o].assignSeat="0"==a.assignSeat?"0":"1");this.hitPlay(),this.pushToSave(r)},delItem(t){let e=this.$util.copyObject(t);const s=this.selectList;let i=s.findIndex(t=>t.id==e.id);-1!=i&&s.splice(i,1),this.$util.isEmpty(s)?this.removeFromSaveDirect():this.pushToSave(s)},takeItem(t){if(this.$util.isEmpty(t))return!1;let e=null,s=0,i="";if(e=this.globalAllProduct.find((function(e){return Number(e.itemId)==Number(t)})),void 0==e)return!1;if(this.$util.isEmpty(e))return!1;i=e.bigUnit,s=e.bigPrice;let a="add"==this.calc?1:-1,r={...e,unitName:i,userPrice:s,bigCount:a,smallCount:0};this.replaceItemFn(r,1,"add",1)},switchGlobalUnitType(){0==this.globalUnitType?(this.globalUnitType=1,this.customData.userPrice=parseFloat(this.customData.smallPrice),this.customData.bigCount=null):(this.globalUnitType=0,this.customData.userPrice=parseFloat(this.customData.bigPrice),this.customData.smallCount=null)},showAddModelFn(t){if(t&&1==t.variety&&"bill"==this.selectJobType){let t=getCurrentPages(),e=t[t.length-1].route;if("admin/billing/affirm"==e)return this.$message({message:"多颜色花材,请返回修改",type:"warning"}),!1}if(t.bigNum<=0&&t.smallNum<=0&&this.globalCheckStock)return this.$message({message:"库存不足哦..",type:"warning"}),!1;Number(t.smallCount)>0?this.globalUnitType=1:this.globalUnitType=0,this.isAddModel=!0,this.customData=this.$util.copyObject(t),this.isAddInputFocus=!1,this.$nextTick(()=>{this.customData.smallCount=0==this.customData.smallCount?null:this.customData.smallCount,this.customData.bigCount=0==this.customData.bigCount?null:this.customData.bigCount,"bill"==this.selectJobType?null!=this.customData.userPrice&&0!=this.customData.userPrice||(this.customData.userPrice=parseFloat(this.customData.bigPrice)):this.customData.userPrice=0==this.customData.userPrice?null:parseFloat(this.customData.userPrice),this.isAddInputFocus=!0})},confirmAddItemModel(t){if(0===t.index)return this.addItemModelHidden(),!1;if(0!=/(^[1-9]\d*$)/.test(this.customData.bigCount)||0!=/(^[1-9]\d*$)/.test(this.customData.smallCount))if(/(^[1-9]\d*$)/.test(this.customData.bigCount)&&this.customData.bigCount<=0)this.$message({message:"数量要大于0",type:"warning"});else if(/(^[1-9]\d*$)/.test(this.customData.smallCount)&&this.customData.smallCount<=0)this.$message({message:"数量要大于0",type:"warning"});else{if("bill"==this.selectJobType||"purchase"==this.selectJobType){if(0==/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.customData.userPrice))return void this.$message({message:"金额错误",type:"warning"});if(this.customData.userPrice<=0)return void this.$message({message:"金额要大于0",type:"warning"})}this.replaceItemFn(this.customData,1),this.addItemModelHidden()}else this.$message({message:"请填写数值",type:"warning"})},addItemModelHidden(){this.isAddModel=!1,this.customData={}}}}},c9f9:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"40vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"rtl"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-name",fn:function({scope:s}){return[e("span",{staticStyle:{"font-size":"16px"}},[t._v(t._s(s.row.name))])]}},{key:"table-column-zbPrice",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"单价"},model:{value:s.row.zbPrice,callback:function(e){t.$set(s.row,"zbPrice",e)},expression:"scope.row.zbPrice"}})]}},{key:"table-column-zbNum",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"数量"},model:{value:s.row.zbNum,callback:function(e){t.$set(s.row,"zbNum",e)},expression:"scope.row.zbNum"}})]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.confirmAdd(s.row)}}},[t._v("添加")])]}},{key:"slot-option-area-list",fn:function(){return[e("el-input",{ref:"customSearchRef",staticStyle:{width:"200px"},attrs:{placeholder:"搜索客户",size:"big",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.search=""}},model:{value:t.search,callback:function(e){t.search=e},expression:"search"}}),e("el-input",{staticStyle:{width:"150px","margin-left":"30px"},attrs:{placeholder:"客户名称",size:"big"},model:{value:t.name1,callback:function(e){t.name1=e},expression:"name1"}}),e("el-input",{staticStyle:{width:"150px","margin-left":"5px"},attrs:{placeholder:"手机号",size:"big"},model:{value:t.mobile1,callback:function(e){t.mobile1=e},expression:"mobile1"}}),e("el-popconfirm",{staticStyle:{"margin-left":"5px"},attrs:{title:"确认添加?"},on:{confirm:function(e){return t.addCustom()},onConfirm:function(e){return t.addCustom()}}},[e("el-button",{attrs:{slot:"reference",size:"big",type:"primary"},slot:"reference"},[t._v("添加")])],1)]},proxy:!0}])})],1)])],1)},a=[],r={name:"simple-item",props:{customData:{type:Object,default:()=>{}}},data(){return{showArea:!1,search:"",mobile1:"",name1:""}},methods:{addCustom(){return 11!=this.mobile1.length?(this.$message.error("手机号错误"),!1):this.$util.isEmpty(this.name1)?(this.$message.error("请填写客户名称"),!1):void this.$service.custom.createCustomers({name1:this.name1,mobile1:this.mobile1,confirmMobile1:this.mobile1}).then(t=>{this.name1="",this.mobile1="",this.$notify({title:"添加成功,15秒后生效",message:"success",type:"success"})})},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh({name:this.search})}),650)},init(){this.showArea=!0,this.search="",this.app&&this.app.refresh({name:this.search}),this.$nextTick(()=>{this.$refs.customSearchRef.focus()})},closeFn(){this.showArea=!1},confirmAdd(t){return Number(t.zbNum)<=0?(this.$message.error("请填写数量"),!1):Number(t.zbPrice)<=0?(this.$message.error("请填写价格"),!1):void this.$service.liveOrder.addCustom({customId:t.id,customName:t.name,num:t.zbNum,price:t.zbPrice,id:this.customData.id}).then(t=>{this.$message.success("添加成功"),this.$emit("renewAddCustom",this.customData),this.closeFn()})},onLoad({ctx:t,app:e}){this.app=e;let s=()=>this.$service.custom.getAllList({name:this.search});t.service({page:s}).set("table",{columns:[{label:"ID",prop:"id",align:"center",width:100},{label:"名称",prop:"name",align:"center",width:240},{label:"数量",prop:"zbNum",align:"center",width:110},{label:"单价",prop:"zbPrice",align:"center",width:110}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-option-area-list"],["data-table"],["flex1"]]).done(),e.refresh({name:this.search})}}},o=r,n=(s("0869"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"29ad0644",null);e["default"]=l.exports},ca269:function(t,e,s){"use strict";s("e5a6")},ca48:function(t,e,s){},cbfc:function(t,e,s){},cc0b:function(t,e,s){"use strict";s("a80d")},cce7:function(t,e,s){},cd67:function(t,e,s){},ce27:function(t,e,s){},cea0:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.addTime))])]}},{key:"table-column-amount",fn:function({scope:s}){return[1==s.row.io?e("span",[t._v("+")]):e("span",[t._v("-")]),t._v(" "+t._s(s.row.amount)+" ")]}},{key:"table-column-ioStyle",fn:function({scope:s}){return[1==s.row.io?e("span",[t._v("收入")]):e("span",[t._v("支出")])]}},{key:"table-column-payWay",fn:function({scope:s}){return[0==s.row.payWay?e("span",[t._v("微信支付")]):1==s.row.payWay?e("span",[t._v("支付宝")]):2==s.row.payWay?e("span",[t._v("余额")]):e("span",[t._v("-")])]}},{key:"table-column-fromType",fn:function({scope:s}){return[0==s.row.fromType?e("span",[t._v("门店")]):1==s.row.fromType?e("span",[t._v("商城")]):2==s.row.fromType?e("span",[t._v("朋友圈")]):e("span",[t._v("-")])]}}])})],1)},a=[],r={name:"list",data(){return{pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:""}},methods:{exportData(){this.$service.shopYeChange.getList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,pageSize:9999999,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},getDate(){this.currentDateList?(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]):(this.searchTime="",this.startTime="",this.endTime=""),this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.shopYeChange).set("table",{columns:[{prop:"addTime",label:"时间",align:"center"},{prop:"event",label:"事项",align:"center"},{prop:"ioStyle",label:"类型",align:"center"},{prop:"amount",label:"金额",align:"center"},{prop:"balance",label:"余额",align:"center"},{prop:"txBalance",label:"可提现",align:"center"}],op:{visible:!0,props:{width:100,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-export-due","flex1"],["data-table"],["flex1","pagination"]]).done(),e.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime})}}},o=r,n=(s("7808d"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"6df04a36",null);e["default"]=l.exports},cf45:function(t,e,s){"use strict";function i(t){if("Array"===Object.prototype.toString.call(t).slice(8,-1)){for(var e,s=t.length,i=0;i<s-1;i++)for(var a=s-1;a>=i;a--)t[a-1]&&t[a].level<t[a-1].level&&(e=t[a],t[a]=t[a-1],t[a-1]=e);return t}return"array is not an Array!"}s.r(e),s.d(e,"bubbleSort",(function(){return i})),e["default"]={bubbleSort:i}},cf6c:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"system-perf"},[e("ct",{ref:"ct"}),e("network",{ref:"network"}),e("el-row",{staticStyle:{"margin-top":"15px"},attrs:{gutter:20}},[e("el-col",{attrs:{span:12}},[e("redis",{ref:"redis"})],1),e("el-col",{attrs:{span:12}},[e("mysql",{ref:"mysql"})],1)],1)],1)},a=[],r=s("8238"),o=s("5152"),n=s("670e"),l=s("af4a"),c={components:{Network:o["default"],Ct:r["default"],Redis:n["default"],Mysql:l["default"]},beforeRouteLeave(t,e,s){clearTimeout(this.tiemr),s()},data(){return{list:{},tiemr:null}},mounted(){this.refresh(),this.tiemr=setInterval(this.refresh,3e3)},methods:{refresh(){this.$service.system.info.record().then(t=>{const{network:e,ct:s,redis:i,mysql:a}=this.$refs;e&&e.refresh(t),s&&s.refresh(t),i&&i.refresh(t),a&&a.refresh(t)})}}},u=c,d=(s("d93c"),s("1805")),m=Object(d["a"])(u,i,a,!1,null,"053e3658",null);e["default"]=m.exports},d284:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.title,visible:t.showDtail,top:"1vh",width:"40%"},on:{"update:visible":function(e){t.showDtail=e}}},[e("el-table",{attrs:{data:t.staffList}},[e("el-table-column",{attrs:{property:"id",label:"ID",width:"120",align:"center"}}),e("el-table-column",{attrs:{property:"name",label:"姓名",width:"190",align:"center"}}),e("el-table-column",{attrs:{property:"mobile",label:"手机号",width:"130",align:"center"}}),e("el-table-column",{attrs:{prop:"cover",label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.getStaff(s.row)}}},[t._v("选择")])]}}])})],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.showDtail=!1}}},[t._v("关 闭")])],1)],1)},a=[],r={name:"select-staff",props:{staffData:{type:Object,default:()=>{}}},data(){return{showDtail:!1,staffList:[],title:"请选择"}},computed:{},methods:{init(){this.staffData.title&&(this.title=this.staffData.title),this.staffList=[],this.showDtail=!0,this.$service.shopAdmin.getAllStaff().then(t=>{this.staffList=t.list})},closeFn(){this.showDtail=!1},getStaff(t){this.$emit("getStaff",t),this.closeFn()}}},o=r,n=s("1805"),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},d2c2:function(t,e,s){},d2c7:function(t,e,s){"use strict";s("16a3")},d402:function(t,e,s){},d4cf:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-amount",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(1==s.row.io?"+":"-")+" "+t._s(s.row.amount)+" ")])]}}])})],1)},a=[],r=(s("5880"),{components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"列表",key:"0",val:0}],ghsInfoList:[],loading:!1,ghsId:0,endTime:""}},methods:{onLoad({ctx:t,app:e}){this.app=e,this.$route.query.ghsId&&(this.ghsId=this.$route.query.ghsId),this.$route.query.endTime&&(this.endTime=this.$route.query.endTime),t.service(this.$service.ghsDebtRecord).set("table",{columns:[{prop:"id",label:"ID",align:"center",width:100},{prop:"addTime",label:"日期",align:"center",width:180},{prop:"ghsId",label:"供货商ID",align:"center",width:150},{prop:"event",label:"事项",align:"center",width:260},{prop:"staffName",label:"操作人",align:"center",width:100},{prop:"amount",label:"变动",align:"center",width:120},{prop:"balance",label:"余额",align:"center",width:120},{prop:"remark",label:"备注",align:"center",width:280}],op:{visible:!0,props:{width:220,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"..."}}).set("layout",[["slot-tabs"],["data-table"],["flex1","pagination"]]).done(),e.refresh({type:0,ghsId:this.ghsId,endTime:this.endTime})}}}),o=r,n=(s("39b9"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"8e8b1a96",null);e["default"]=l.exports},d523:function(t,e,s){"use strict";s("74a6")},d53b:function(t,e,s){"use strict";s("4792")},d59e:function(t,e,s){"use strict";s.r(e),s.d(e,"ImgStoreService",(function(){return o}));var i,a,r=s("c081");let o=(i=Object(r["Service"])("pic"),i(a=class extends r["BaseService"]{changeStatus(t){return this.request({url:"/change-status",method:"POST",data:t})}remark(t){return this.request({url:"/remark",method:"POST",data:t})}top(t){return this.request({url:"/top",method:"POST",data:t})}share(t){return this.request({url:"/share",method:"GET",data:t})}})||a);e["default"]=new o},d5fc:function(t,e,s){"use strict";s("7280")},d63f:function(t,e,s){"use strict";s("39d5")},d6e4:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content setting-coupon-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"140px"}},[e("el-form-item",{attrs:{label:"开启状态",prop:"name"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.form.switch,callback:function(e){t.$set(t.form,"switch",e)},expression:"form.switch"}})],1),e("el-form-item",{attrs:{label:"新人注册会员送",prop:"name"}},[e("div",{staticClass:"flex-center flex-wrap"},[e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.amount,callback:function(e){t.$set(t.form,"amount",e)},expression:"form.amount"}}),e("div",{staticClass:"prompt-text"},[t._v("元优惠券,满")]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.miniCost,callback:function(e){t.$set(t.form,"miniCost",e)},expression:"form.miniCost"}}),e("div",{staticClass:"prompt-text"},[t._v("元可用,领取后")]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.duration,callback:function(e){t.$set(t.form,"duration",e)},expression:"form.duration"}}),e("div",{staticClass:"prompt-text"},[t._v("天内有效。")])],1)]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],1)],1)},a=[],r=(s("8f26"),s("666b"),{data(){return{form:{switch:1,amount:0,miniCost:0,duration:0},rules:{}}},mounted(){this.init()},methods:{init(){this.$service.coupon.assetDet().then(t=>{this.$util.isEmpty(t)||Object.keys(this.form).forEach((e,s)=>{this.form[e]=t[e]})})},_updateFn(){this.$service.coupon.assetUpdate(this.form).then(t=>{this.$store.dispatch("shopInfo"),this.$message.success("更新成功!")})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this._updateFn()})},resetForm(t){this.$refs[t].resetFields()}}}),o=r,n=(s("c471"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"50d42d8f",null);e["default"]=l.exports},d775:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap order-list-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-itemCover",fn:function({scope:t}){return[e("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[e("div",{staticStyle:{width:"200px",height:"200px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover"},attrs:{src:t.row.bigCover}})]),e("div",{staticStyle:{width:"40px"},attrs:{slot:"reference"},slot:"reference"},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:t.row.cover}})])])]}},{key:"table-column-switchOrder",fn:function({scope:t}){return[0==t.row.switchOrder?e("span"):e("span",[e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"18px"}})])]}},{key:"table-column-stock",fn:function({scope:s}){return[1==s.row.switchOrder?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printZjA4(s.row)}}},[t._v(t._s(s.row.stock))]):e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printZjA4(s.row)}}},[Number(s.row.stock)>Number(s.row.itemNum)?e("span",[t._v(t._s(s.row.stock))]):e("span",{staticStyle:{"font-weight":"bold",color:"blue","font-size":"20px"}},[t._v(t._s(s.row.stock))])])]}},{key:"table-column-printOrder",fn:function({scope:s}){return[0==s.row.printOrder?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printA4(s.row)}}},[t._v(" 打印 ")]):e("span",{on:{click:function(e){return t.printA4(s.row)}}},[e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"18px",cursor:"pointer"}})])]}},{key:"table-column-addTime",fn:function({scope:s}){return[e("i",{staticClass:"el-icon-remove-outline",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.changeDate(s.row,0)}}}),e("span",{staticStyle:{"margin-left":"10px","margin-right":"10px"}},[t._v(t._s(s.row.addTime))]),e("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.changeDate(s.row,1)}}})]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(e){return e.stopPropagation(),t.showDetail(s.row)}}},[t._v("详情")])]}},{key:"slot-search-option",fn:function({scope:s}){return[e("el-input",{ref:"orderSearchRef",staticStyle:{width:"140px"},attrs:{placeholder:"花材名称",size:"small",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.searchContent=""}},model:{value:t.searchContent,callback:function(e){t.searchContent=e},expression:"searchContent"}}),e("el-select",{staticStyle:{width:"110px","margin-left":"8px"},attrs:{size:"small",placeholder:"开单人",clearable:!0},on:{change:t.getStaff},model:{value:t.currentStaffName,callback:function(e){t.currentStaffName=e},expression:"currentStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("span",{staticStyle:{"margin-left":"9px","font-size":"22px"}},[t._v("创建时间:")]),e("el-date-picker",{staticClass:"custom-date-picker",staticStyle:{"margin-right":"8px"},attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"small"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]}},{key:"slot-export-order",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{type:"success",size:"small"},on:{click:function(e){return t.toOrder()}}},[t._v("转订单")]),e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{type:"primary",size:"small"},on:{click:function(e){return t.openOrder()}}},[t._v("开走播单")])]},proxy:!0}])}),e("live-detail",{ref:"liveDetailRef",attrs:{orderOperate:t.optionData},on:{searchFocus:t.searchFocus,addNewCustom:t.addNewCustom}}),e("live-custom",{ref:"liveCustomRef",attrs:{customData:t.customData},on:{renewAddCustom:t.renewAddCustom}})],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("209c"),s("6901")),o=s("c9f9"),n=s("54a1"),l={components:{LiveDetail:r["default"],LiveCustom:o["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"全部记录",key:"0",val:0},{text:"未转订单",key:"1",val:0},{text:"已转订单",key:"2",val:0}],optionData:{},switchOrder:"-1",currentDateList:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},startTime:"",endTime:"",searchTime:"",searchContent:"",currentStaffName:"",currentStaffId:0,staffList:[],selectedData:[],customData:{}}},created(){this.init()},mounted(){let t=this;this.$nextTick(()=>{this.$refs.orderSearchRef.focus()}),t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list})},methods:{changeDate(t,e){this.$service.liveOrder.changeDate({id:t.id,flag:e}).then(t=>{this.refreshData()})},renewAddCustom(t){this.showDetail(t)},addNewCustom(t){this.customData=t,setTimeout(()=>{this.$refs.liveCustomRef.init()})},showDetail(t){this.optionData=t,setTimeout(()=>{this.$refs.liveDetailRef.init()})},searchFocus(){let t=this;setTimeout(()=>{t.$refs.orderSearchRef.focus()},1e3)},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.refreshData()}),650)},changeSwitchOrder(t){this.switchOrder=t,this.refreshData()},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.refreshData()},refreshData(){this.app.refresh({switchOrder:this.switchOrder,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,searchContent:this.searchContent,staffId:this.currentStaffId})},init(){this.$store.dispatch("getUsage")},printA4(t){this.$service.liveOrder.printOrder({id:t.id}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new n["hiprint"].PrintTemplate({template:a});r.print(s),t.printOrder=1})},printZjA4(t){this.$service.liveOrder.printOrder({id:t.id}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new n["hiprint"].PrintTemplate({template:a});r.print2(s),t.printOrder=1,this.$message.success("已触发")})},getStaff(t){this.currentStaffId=t,this.refreshData()},handleClick(t,e){0==Number(this.tabIndex)&&(this.switchOrder=-1),1==Number(this.tabIndex)&&(this.switchOrder=0),2==Number(this.tabIndex)&&(this.switchOrder=1),this.refreshData()},openOrder(){this.$router.push({path:"/order/add-live"})},toOrder(){this.$confirm("确认要开始转订单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.liveOrder.convertOrder().then(t=>{this.$message.success("提交成功,3分钟后查看订单")})})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.liveOrder).set("table",{columns:[{type:"selection",align:"center",width:"40"},{prop:"orderSn",label:"单号",align:"center",width:"100"},{prop:"itemCover",label:"图片",align:"center",width:"65"},{prop:"itemName",label:"花材",align:"center",width:"180"},{prop:"customNum",label:"客户数",align:"center",width:"70"},{prop:"itemAmount",label:"总计",align:"center",width:"80"},{prop:"itemNum",label:"花材数",align:"center",width:"70"},{prop:"itemPrice",label:"单价",align:"center",width:"70"},{prop:"stock",label:"库存",align:"center",width:"80"},{prop:"switchOrder",label:"已转订单",align:"center",width:"90"},{prop:"staffName",label:"开单人",align:"center",width:"110"},{prop:"printOrder",label:"打印",align:"center",width:"70"},{prop:"addTime",label:"创建时间",align:"center",width:210},{prop:"itemRemark",label:"备注",align:"center",width:"130"},{prop:"updateTime",label:"修改时间",align:"center",width:180}],on:{"selection-change":t=>{this.selectedData=t.map(t=>({id:t.id,status:t.status,sameTimeIdsNum:t.sameTimeIdsNum}))}},props:{"default-sort":{prop:"addTime",order:"descending"}},op:{visible:!0,props:{width:130,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-search-option","slot-export-order"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{this.searchContent=t.searchContent?t.searchContent:"";await e(t);this.tabsData[0].val=0,this.tabsData[1].val=0,this.tabsData[2].val=0}).done(),this.refreshData()}}},c=l,u=(s("1762"),s("1465"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"61d5c6a6",null);e["default"]=d.exports},d7e6:function(t,e,s){"use strict";s("8faf")},d7e9:function(t,e,s){"use strict";s("bf13")},d84a:function(t,e,s){"use strict";s("1f40")},d893:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-order-debt",fn:function({scope:s}){return[e("el-radio-group",{staticStyle:{"margin-right":"20px","padding-top":"6px","margin-left":"20px"},on:{change:t.changeDebt},model:{value:t.debt,callback:function(e){t.debt=e},expression:"debt"}},[e("el-radio",{attrs:{label:"0"}},[t._v("全部")]),e("el-radio",{attrs:{label:"1"}},[t._v("待结款")]),e("el-radio",{attrs:{label:"2"}},[t._v("已结款")])],1)]}},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("累计金额:"+t._s(t.totalAmount))])]},proxy:!0},{key:"slot-export-due",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportDue()}}},[t._v("导出数据")])]},proxy:!0}])})],1)},a=[],r=s("5880"),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalAmount:0,debt:"0"}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{exportDue(){this.$service.purchaseOrder.dueList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.purchaseOrder.dueList({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt}).then(t=>(this.totalAmount=t.totalAmount?t.totalAmount:0,{list:t.list}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"名称",prop:"name",align:"center"},{label:"订单数",prop:"num",align:"center"},{label:"金额",prop:"amount",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-date-select","slot-order-debt","flex1","slot-export-due","refresh-btn"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getSearchDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})},changeDebt(t){this.debt=t,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})}}},n=o,l=(s("fe67"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"6fac0e9f",null);e["default"]=c.exports},d912:function(t,e,s){},d93c:function(t,e,s){"use strict";s("581c")},d9b6:function(t,e,s){},da50:function(t,e,s){"use strict";s("029d")},db7f:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"sel-order"},[e("el-drawer",{attrs:{title:"发货管理",visible:t.showShipManage,size:"440px","before-close":t.closeFn,"custom-class":"ship-draw-wrap"},on:{"update:visible":function(e){t.showShipManage=e}}},[e("div",{staticClass:"ship-manage-wrap"},[e("div",{staticClass:"order-info-wrap"},[e("div",{staticClass:"order-info-left"},[e("div",{staticClass:"info-list"},[e("div",{staticClass:"label"},[t._v("订单号")]),e("div",{staticClass:"val"},[t._v(t._s(t.orderData.orderSn))])]),e("div",{staticClass:"info-list"},[e("div",{staticClass:"label"},[t._v("下单客户")]),e("div",{staticClass:"val"},[t._v(t._s(t.orderData.customName))])]),e("div",{staticClass:"info-list"},[e("div",{staticClass:"label"},[t._v("下单时间")]),e("div",{staticClass:"val"},[t._v(t._s(t.orderData.addTime))])]),e("div",{staticClass:"info-list"},[e("div",{staticClass:"label"},[t._v("金额")]),e("div",{staticClass:"val"},[t._v(t._s(t.orderData.actPrice))])])])]),e("el-timeline",t._l(t.shipData,(function(s,i){return e("el-timeline-item",{key:i},[e("div",{staticClass:"title-wrap"},[e("div",{staticClass:"title"},[t._v(t._s(s.actionName))]),0!=s.finishTime?e("div",{staticClass:"time"},[t._v(t._s(s.finishTime))]):t._e()]),e("div",{staticClass:"content-wrap"},["制单"==s.actionName?[t.$util.isEmpty(s.receive)&&0==i?e("div",[e("el-button",{attrs:{type:"primary"},on:{click:t.fillFormFn}},[t._v("填写")]),e("el-button",{attrs:{type:"primary"},on:{click:t.hasDeliver}},[t._v("跳过")])],1):e("div",[t.$util.isEmpty(s.receive)?e("span",[t._v("已手写")]):e("card-name",{attrs:{info:s.receive}}),t.$util.isEmpty(s.receive)?t._e():e("div",{staticStyle:{"margin-top":"10px"}},[0==t.orderData.printStatus?e("el-button",{attrs:{size:"mini"},on:{click:t.printOrderFn}},[t._v("打印")]):e("el-button",{attrs:{size:"mini"},on:{click:t.rePrintOrderFn}},[t._v("重打")])],1)],1)]:t._e(),"发货"==s.actionName?[e("div",[t.$util.isEmpty(s.sendInfo)?t._e():[e("div",{staticClass:"label-list"},[t._v("配送:"+t._s(s.sendInfo.sideName))]),e("div",{staticClass:"label-list"},[t._v("距离:"+t._s(s.sendInfo.distance)+"km")]),e("div",{staticClass:"label-list"},[t._v("运费:¥"+t._s(s.sendInfo.cost))]),e("div",{staticClass:"label-list"},[t._v("小费:¥"+t._s(s.sendInfo.tip))]),t.orderData.expressProgress?e("div",{staticClass:"label-list"},[t._v("状态:"+t._s(t.orderData.expressProgress.progressName))]):t._e(),3==t.orderData.status?e("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.sendMySelfConfirm,callback:function(e){t.sendMySelfConfirm=e},expression:"sendMySelfConfirm"}},[e("p",[t._v("快递送到后会自动确定,需要自己确认?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.sendMySelfConfirm=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.affirmDeliver}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("确认送达")])],1):t._e()],3==t.orderData.sendType?[e("div",{staticClass:"label-list"},[e("div",{staticStyle:{"margin-bottom":"20px"}},[t._v("本店送")]),3==t.orderData.status?e("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.sendMySelfConfirm,callback:function(e){t.sendMySelfConfirm=e},expression:"sendMySelfConfirm"}},[e("p",[t._v("确认送到了?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.sendMySelfConfirm=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.affirmDeliver}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("确认送达")])],1):t._e()],1)]:t._e(),2==t.orderData.status?[e("div",{staticClass:"label-list"},[e("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.sendMySelfConfirm,callback:function(e){t.sendMySelfConfirm=e},expression:"sendMySelfConfirm"}},[e("p",[t._v("确认本店送?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.sendMySelfConfirm=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.sendMySelfFn}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("本店送")])],1),e("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"primary"},on:{click:t.fillFormFn}},[t._v("发快递")])],1)]:t._e()],2)]:t._e(),"送达"==s.actionName?[0==s.finishTime?e("div",[3==t.orderData.sendType?[e("el-popover",{attrs:{placement:"top",width:"210"},model:{value:t.confirmSendVisit,callback:function(e){t.confirmSendVisit=e},expression:"confirmSendVisit"}},[e("p",[t._v("此订单已由快递配送,送到会自动确认,确定要手动操作?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.confirmSendVisit=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.orderReachFn}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",size:"small",type:"primary"},slot:"reference"},[t._v("确认")])],1)]:[e("el-popover",{attrs:{placement:"top",width:"160"},model:{value:t.confirmSendVisit,callback:function(e){t.confirmSendVisit=e},expression:"confirmSendVisit"}},[e("p",[t._v("确认已送达?")]),e("div",{staticStyle:{"text-align":"right",margin:"0"}},[e("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(e){t.confirmSendVisit=!1}}},[t._v("取消")]),e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.orderReachFn}},[t._v("确定")])],1),e("el-button",{attrs:{slot:"reference",size:"small",type:"primary"},slot:"reference"},[t._v("确认")])],1),e("div",{staticClass:"prompt-text"},[t._v("确认后会通知客户")])]],2):t._e()]:t._e(),"完成"==s.actionName?[t.$util.isEmpty(s.classify)?e("div",[e("el-button",{attrs:{type:"primary"},on:{click:t.orderClassFn}},[t._v("订单分类")])],1):e("div",[e("div",{staticClass:"label-list"},[t._v("订单分类:"+t._s(s.classify.category))]),e("div",{staticClass:"label-list"},[t._v("用途:"+t._s(s.classify.usage))])])]:t._e()],2)])})),1)],1)]),e("el-dialog",{attrs:{title:"确认客户地址",visible:t.orderDialog,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(e){t.orderDialog=e}}},[e("div",{staticClass:"order-modal-content"},[e("el-form",{ref:"orderForm",staticClass:"demo-form",attrs:{model:t.orderForm,rules:t.ruleForm,"label-width":"100px"}},[e("div",{staticClass:"form-wrap"},[e("div",{staticClass:"form-left-wrap"},[e("el-form-item",{attrs:{label:"配送方",prop:"sendSide"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",size:"small"},on:{change:t.selectSendSide},model:{value:t.orderForm.sendSide,callback:function(e){t.$set(t.orderForm,"sendSide",e)},expression:"orderForm.sendSide"}},t._l(t.sendSideOpt,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"城市",prop:"receiveMobile"}},[e("el-input",{attrs:{disabled:!0,placeholder:"城市",size:"mini"},model:{value:t.orderForm.receiveCity,callback:function(e){t.$set(t.orderForm,"receiveCity",e)},expression:"orderForm.receiveCity"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"客户名称",prop:"customName"}},[e("el-input",{attrs:{placeholder:"请填写",size:"mini"},model:{value:t.freightInfo.customName,callback:function(e){t.$set(t.freightInfo,"customName",e)},expression:"freightInfo.customName"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"客户手机",prop:"customMobile"}},[e("el-input",{attrs:{placeholder:"请填写",size:"mini"},model:{value:t.freightInfo.customMobile,callback:function(e){t.$set(t.freightInfo,"customMobile",e)},expression:"freightInfo.customMobile"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"详细地址",prop:"receiveAddress"}},[e("el-autocomplete",{staticStyle:{width:"100%"},attrs:{"fetch-suggestions":t.querySearchAsync,placeholder:"请输入地址搜索",size:"mini"},on:{select:t.addressFn},scopedSlots:t._u([{key:"default",fn:function({item:s}){return[e("p",{staticStyle:{"line-height":"30px"}},[t._v(t._s(s.title))]),e("p",{staticStyle:{"line-height":"20px","font-size":"12px",color:"#999"}},[t._v(t._s(s.address))])]}}]),model:{value:t.orderForm.receiveAddress,callback:function(e){t.$set(t.orderForm,"receiveAddress",e)},expression:"orderForm.receiveAddress"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"门牌号",prop:"receiveFloor"}},[e("el-input",{attrs:{placeholder:"楼号门牌号(选填)",size:"mini"},model:{value:t.orderForm.receiveFloor,callback:function(e){t.$set(t.orderForm,"receiveFloor",e)},expression:"orderForm.receiveFloor"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"发单时间",prop:"reachTime"}},[e("el-time-picker",{staticStyle:{width:"100%"},attrs:{format:"HH:mm","value-format":"HH:mm",placeholder:"默认立即发单",size:"mini"},on:{change:t.freight},model:{value:t.orderForm.reachTime,callback:function(e){t.$set(t.orderForm,"reachTime",e)},expression:"orderForm.reachTime"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"运费",prop:"remark"}},[e("el-input",{attrs:{disabled:!0,placeholder:"",size:"mini"},model:{value:t.orderForm.sedCost,callback:function(e){t.$set(t.orderForm,"sedCost",e)},expression:"orderForm.sedCost"}})],1),e("el-form-item",{staticStyle:{"margin-bottom":"8px"},attrs:{label:"备注",prop:"remark"}},[e("el-input",{attrs:{type:"textarea",placeholder:"",size:"mini"},model:{value:t.orderForm.remark,callback:function(e){t.$set(t.orderForm,"remark",e)},expression:"orderForm.remark"}})],1)],1)])])],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.submitOrderFn}},[t._v("确认")])],1)]),e("el-dialog",{attrs:{title:"请选择",visible:t.shipDialog,"close-on-click-modal":!1,width:"400px"},on:{"update:visible":function(e){t.shipDialog=e}}},[e("div",{staticClass:"ship-modal-content"},[e("el-form",{ref:"shipForm",staticClass:"demo-form",attrs:{model:t.shipForm,rules:t.shipRuleForm,"label-width":"100px"}},[[e("el-form-item",{attrs:{label:"配送时间",prop:"sendTime"}},[e("el-time-select",{staticStyle:{width:"100%"},attrs:{"picker-options":{start:"08:00",step:"00:10",end:"24:00"},placeholder:"请选择时间",size:"small"},model:{value:t.shipForm.sendTime,callback:function(e){t.$set(t.shipForm,"sendTime",e)},expression:"shipForm.sendTime"}})],1),e("el-form-item",{attrs:{label:"配送方",prop:"sendSide"}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",size:"small"},model:{value:t.shipForm.sendSide,callback:function(e){t.$set(t.shipForm,"sendSide",e)},expression:"shipForm.sendSide"}},t._l(t.sendSideOpt,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)]],2)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.submitShipFn}},[t._v("确认")])],1)]),e("el-dialog",{attrs:{title:"订单分类",visible:t.categoryDialog,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.categoryDialog=e}}},[e("div",{staticClass:"category-dialog-wrap"},[e("el-form",{ref:"categoryForm",staticClass:"demo-form",attrs:{model:t.categoryForm,rules:t.categoryRule,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"选择分类",prop:"categoryId"}},[e("el-radio-group",{model:{value:t.categoryForm.categoryId,callback:function(e){t.$set(t.categoryForm,"categoryId",e)},expression:"categoryForm.categoryId"}},t._l(t.categoryData,(function(s,i){return e("el-radio",{key:i,attrs:{border:"",label:s.id,size:"small"}},[t._v(t._s(s.categoryName))])})),1)],1),e("el-form-item",{attrs:{label:"选择用途",prop:"usageId"}},[e("el-radio-group",{model:{value:t.categoryForm.usageId,callback:function(e){t.$set(t.categoryForm,"usageId",e)},expression:"categoryForm.usageId"}},t._l(t.usageData,(function(s,i){return e("el-radio",{key:i,attrs:{border:"",label:s.id,size:"small"}},[t._v(t._s(s.usageName))])})),1)],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.orderClassConfirmFn}},[t._v("确认")])],1)]),e("div",{staticClass:"print-html"},[e("table",{staticStyle:{border:"solid 1px black","border-collapse":"collapse"},attrs:{border:"1",width:"780"}},[e("tr",[e("td",{staticStyle:{padding:"10px",width:"100px"}},[t._v("配送时间:")]),e("td",{staticStyle:{"padding-left":"10px"},attrs:{colspan:"2"}},[t._v(t._s(t.deliver.data.reachDate))]),e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("订单号:")]),e("td",{staticStyle:{"padding-left":"10px"},attrs:{colspan:"2"}},[t._v(t._s(t.deliver.data.orderSn))])]),e("tr",[e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("收花人姓名:")]),e("td",{staticStyle:{"padding-left":"10px",width:"130px"}},[t._v(t._s(t.deliver.data.receiveUserName))]),e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("收花人电话:")]),e("td",{staticStyle:{"padding-left":"10px",width:"130px"}},[t._v(t._s(t.deliver.data.receiveMobile))]),e("td",{staticStyle:{"padding-left":"10px"},attrs:{colspan:"2",rowspan:"4"}},[e("div",{staticStyle:{"text-align":"center","padding-top":"1px"}},[e("p",[t._v(t._s(t.deliver.data.orderName))]),e("img",{staticClass:"cover",staticStyle:{width:"100px",height:"100px","margin-bottom":"20px"},attrs:{src:t.deliver.data.img,alt:""}})])])]),e("tr",[e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("收花人地址:")]),e("td",{staticStyle:{"padding-left":"10px"},attrs:{colspan:"3"}},[t._v(t._s(t.deliver.data.receiveFullAddress))])]),e("tr",[e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("祝福语:")]),e("td",{staticStyle:{"padding-left":"10px"},attrs:{colspan:"3"}},[t._v(t._s(t.deliver.data.cardInfo))])]),e("tr",[e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("订花人姓名:")]),e("td",{staticStyle:{"padding-left":"10px",width:"130px"}},[t._v(t._s(t.deliver.data.bookName))]),e("td",{staticStyle:{"padding-left":"10px",width:"100px"}},[t._v("订花人电话:")]),e("td",{staticStyle:{"padding-left":"10px",width:"130px"}},[t._v(t._s(t.deliver.data.bookMobile))])]),e("tr",[e("td",{staticStyle:{padding:"10px",width:"100px"}},[t._v("备注说明:")]),e("td",{staticStyle:{"padding-left":"10px"},attrs:{colspan:"5"}},[t._v(t._s(t.deliver.data.remark))])])])])],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("5880")),o=s("2d14"),n=s("f4c5"),l={name:"sel-order",components:{cardName:o["default"]},props:{id:String},data(){return{orderData:{},showShipManage:!1,shipData:[],relateData:{},confirmSendVisit:!1,orderDialog:!1,freightInfo:{id:"",floor:"",province:"",city:"",address:"",expressId:"",long:"",lat:"",customName:"",customMobile:"",sendTime:"",receiveUserName:"",receiveMobile:""},orderForm:{sendSide:"",sedCost:"",receiveUserName:"",receiveMobile:"",receiveProvince:"",receiveCity:"",receiveAddress:"",receiveFloor:"",receiveFullAddress:"",bookMobile:"",reachTime:"",reachPeriod:"0",needCard:"1",cardInfo:"",remark:"",anonymity:"0",latitude:0,longitude:0},addressArr:[],ruleForm:{},sendMySelfConfirm:!1,addressOptions:[],addressProps:{label:"name",value:"name",children:"children"},shipDialog:!1,shipForm:{sendType:"2",sendTime:"",sendSide:1},shipRuleForm:{},sendSideOpt:[{label:"达达配送",value:1}],categoryDialog:!1,categoryForm:{categoryId:"",usageId:""},categoryRule:{},deliver:{visible:!1,data:{}}}},computed:{...Object(r["mapGetters"])({categoryData:"category"}),...Object(r["mapGetters"])({usageData:"usage",shopInfo:"shopInfo"})},mounted(){this.freightInfo.expressId=this.sendSideOpt[0].value,this.orderForm.sendSide=this.sendSideOpt[0].label},methods:{selectSendSide(t){this.freightInfo.expressId=t,this.freight()},init(){this.getDet(),this.$service.order.orderRelate().then(t=>{this.relateData=t;let e=t.region,s=[];if(e.length>0)for(let r in e)if(s.push({id:e[r].id,name:e[r].name,children:[]}),e[r].children&&e[r].children.length>0)for(let t in e[r].children)s[r].children.push({id:e[r].children[t].id,name:e[r].children[t].name});this.addressOptions=s;let i=t.shop.province||"",a=t.shop.city||"";this.addressArr=[i,a],this.orderForm.receiveProvince=i,this.orderForm.receiveCity=a,this.orderForm.latitude=t.shop.shopLat||0,this.orderForm.longitude=t.shop.shopLong||0}),this.$service.order.info({id:this.id}).then(t=>{this.orderData=t})},getDet(){this.$service.single.orderSendDet({id:this.id}).then(t=>{this.shipData=t,this.showShipManage=!0})},querySearchAsync(t,e){return this.orderForm.receiveCity?t?void this.$service.single.mapSuggestion({region:this.orderForm.receiveCity,keyword:t}).then(t=>{let s=t.data;s=s.map(t=>(t.value=t.title,t)),e(s)}):(e([]),!1):(this.$message.error("请先选择收花人地址"),e([]),!1)},addressFn(t){this.orderForm.latitude=t.location.lat,this.orderForm.longitude=t.location.lng,this.orderForm.receiveAddress=t.title,this.orderForm.receiveFullAddress=t.address,this.freightInfo.address=t.address,this.freightInfo.long=t.location.lng,this.freightInfo.lat=t.location.lat,this.freight()},submitOrderFn(){if(this.$util.isEmpty(this.freightInfo.expressId))return void this.$message({message:"请选择配送方",type:"warning"});if(this.$util.isEmpty(this.orderForm.reachTime))return void this.$message({message:"请选择配时间",type:"warning"});let t={id:this.id,sendCost:this.orderForm.sedCost,expressId:this.freightInfo.expressId,sendTime:this.orderForm.reachTime,remark:this.orderForm.remark};this.$service.order.sendExpressage(t).then(t=>{this.init(),this.resetForm()})},handleChange(t){console.log("value",t),this.orderForm.receiveProvince=t[0],this.orderForm.receiveCity=t[1],this.orderForm.receiveAddress=t[0]+t[1]},resetForm(){try{this.$refs["orderForm"].resetFields()}catch(t){}try{this.$refs["shipForm"].resetFields()}catch(t){}try{this.$refs["categoryForm"].resetFields()}catch(t){}this.shipDialog=!1,this.categoryDialog=!1,this.orderDialog=!1},closeFn(){this.showShipManage=!1},hasDeliver(){this.$service.single.printOrder({id:this.id,option:1}).then(t=>{this.getDet(),this.$service.order.info({id:this.id}).then(t=>{this.orderData=t})})},async printOrderFn(){await this.$service.single.printOrder({id:this.id,option:2}),this.getDet(),this.$service.order.getDeliverDetail({id:this.id}).then(t=>{this.deliver.data=t,this.printOrder()})},rePrintOrderFn(){this.$service.order.getDeliverDetail({id:this.id}).then(t=>{this.deliver.data=t,this.printOrder()})},fillFormFn(){this.orderDialog=!0,this.freightInfo.id=this.id,this.$service.custom.clientInfo({id:this.orderData.customId}).then(t=>{this.orderForm.receiveCity=`${t.province}-${t.city}`,this.orderForm.receiveAddress=""+t.address,this.orderForm.receiveFloor=t.floor,this.freightInfo.customName=""+t.name,this.freightInfo.customMobile=""+t.mobile,this.freightInfo.province=t.province,this.freightInfo.city=t.city,this.freightInfo.address=t.address,this.freightInfo.long=t.long,this.freightInfo.lat=t.lat})},freight(){this.freightInfo.floor=this.orderForm.receiveFloor,this.freightInfo.sendTime=this.orderForm.reachTime,this.freightInfo.expressId&&!this.$util.isEmpty(this.freightInfo.sendTime)&&this.$service.order.freight(this.freightInfo).then(t=>{this.orderForm.sedCost=t.sedCost})},affirmDeliver(){this.$service.order.orderAffirmDeliver({id:this.id}).then(t=>{this.$message.success("已确认!"),this.$emit("song-success"),this.init(),this.resetForm(),this.sendMySelfConfirm=!1})},sendMySelfFn(){this.sendMySelfConfirm=!1,this.shipForm.sendType=2,this.$service.order.orderDeliver({id:this.id}).then(t=>{this.$message.success("已确认!"),this.$emit("song-success"),this.init(),this.resetForm(),this.sendMySelfConfirm=!1})},sendShipFn(){this.shipDialog=!0},submitShipFn(){return""==this.shipForm.sendTime?(this.$message.error("请选择时间"),!1):(this.$message.success("即将开通..."),!1)},orderReachFn(){this.$service.single.orderReach({id:this.id,option:1}).then(t=>{this.$message.success("已确认!"),this.getDet(),this.confirmSendVisit=!1,this.$set(this.orderData,"status","5"),this.$set(this.orderData,"currentFlow",this.orderData.totalFlow)})},orderClassFn(){this.categoryDialog=!0},orderClassConfirmFn(){if(!this.categoryForm.categoryId||!this.categoryForm.usageId)return this.$message.error("请先选择分类或者用途!"),!1;this.$service.single.orderClass({id:this.id,...this.categoryForm}).then(t=>{this.$message.success("订单分类成功!"),this.getDet(),this.resetForm()})},printOrder(){this.deliver.visible=!0,this.$nextTick(()=>{let t=Object(n["getLodop"])();t.PRINT_INIT("配送单"),t.SET_PRINT_STYLE("FontSize",12),t.ADD_PRINT_TEXT(470,10,350,200,"店铺地址:"+this.shopInfo.address),t.ADD_PRINT_TEXT(470,400,350,600,"电话:"+this.deliver.data.telephone),t.ADD_PRINT_TEXT(470,590,470,600,"制单时间:"+this.deliver.data.printTime),t.SET_PRINT_STYLE("FontSize",20),t.SET_PRINT_STYLE("Bold",1),t.ADD_PRINT_TEXT(150,10,790,30,this.shopInfo.name+"配送单"),t.SET_PRINT_STYLEA(0,"Alignment",2),t.SET_PRINT_STYLE("FontSize",12),t.ADD_PRINT_TEXT(160,500,100,20,"No "+this.deliver.data.sendNum),t.SET_PRINT_STYLEA(0,"Alignment",2),t.ADD_PRINT_HTM(200,10,790,600,document.querySelector(".print-html").innerHTML),t.PREVIEW()})}}},c=l,u=(s("4f53"),s("9b85"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"61e87d7a",null);e["default"]=d.exports},db83:function(t,e,s){},db95:function(t,e,s){},dbc7:function(t,e,s){"use strict";s("3bf3")},dc9e:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content"},[e("div",{staticClass:"form-wrap"},[e("el-form",{ref:"ruleForm",attrs:{model:t.ruleForm,rules:t.rules,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"名称",prop:"goodsName"}},[e("el-input",{attrs:{placeholder:"请填写商品名称"},model:{value:t.ruleForm.goodsName,callback:function(e){t.$set(t.ruleForm,"goodsName",e)},expression:"ruleForm.goodsName"}})],1),e("el-form-item",{attrs:{label:"已售",prop:"sold"}},[e("el-input",{attrs:{placeholder:"自定义已售数量,留空表示还没有售出"},model:{value:t.ruleForm.sold,callback:function(e){t.$set(t.ruleForm,"sold",e)},expression:"ruleForm.sold"}})],1),e("el-form-item",{attrs:{label:"库存",prop:"stock"}},[e("el-input",{attrs:{placeholder:"请填写库存,留空表示库存充足"},model:{value:t.ruleForm.stock,callback:function(e){t.$set(t.ruleForm,"stock",e)},expression:"ruleForm.stock"}})],1),e("el-form-item",{attrs:{label:"分类",prop:"categoryIdList"}},[e("el-checkbox-group",{model:{value:t.ruleForm.categoryIdList,callback:function(e){t.$set(t.ruleForm,"categoryIdList",e)},expression:"ruleForm.categoryIdList"}},t._l(t.categoryData,(function(s,i){return e("el-checkbox",{key:i,attrs:{border:"",label:s.id,size:"small"},on:{change:function(e){return t.selChangeDialogFn(e,s)}}},[t._v(t._s(s.categoryName))])})),1)],1),e("el-form-item",{attrs:{label:"款式",prop:"goodsStyle"}},[e("el-checkbox-group",{on:{change:t.changeStyleFn},model:{value:t.ruleForm.goodsStyle,callback:function(e){t.$set(t.ruleForm,"goodsStyle",e)},expression:"ruleForm.goodsStyle"}},[e("el-checkbox",{attrs:{label:"1",name:"goodsStyle","true-label":"1","false-label":"0"}},[e("span",[t._v("多款式")])])],1),1==t.ruleForm.goodsStyle?e("div",{staticClass:"style-modal-content"},[t.actionOption?e("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:t.styleForm}},t._l(t.styleStoreData,(function(s,i){return e("div",{key:i,staticClass:"flex-center-between"},["delete"!=s.action?[e("el-form-item",{attrs:{label:"款式名称"}},[e("el-input",{attrs:{placeholder:"款式名称"},model:{value:s.styleName,callback:function(e){t.$set(s,"styleName",e)},expression:"item.styleName"}})],1),e("el-form-item",{attrs:{label:"价格"}},[e("el-input",{attrs:{placeholder:"价格"},model:{value:s.price,callback:function(e){t.$set(s,"price",e)},expression:"item.price"}})],1),e("el-form-item",{staticClass:"flex-center",attrs:{label:"图片"}},[e("cl-upload",{attrs:{props:{multiple:!0}},model:{value:s.picture,callback:function(e){t.$set(s,"picture",e)},expression:"item.picture"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.styleDelFn(i)}}},[t._v("删除")])],1)]:t._e()],2)})),0):t._e(),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.styleFormAddFn}},[t._v("新增")])],1):t._e()],1),0==t.ruleForm.goodsStyle?e("el-form-item",{attrs:{label:"价格",prop:"price"}},[e("el-input",{model:{value:t.ruleForm.price,callback:function(e){t.$set(t.ruleForm,"price",e)},expression:"ruleForm.price"}})],1):t._e(),e("el-form-item",{attrs:{label:"图片",prop:"shopImg"}},[e("div",{staticClass:"list-wrap"},[e("elxUpload",{attrs:{limit:4,fileList:t.fileList_show,category:t.ruleForm.categoryIdList},on:{"update:fileList":function(e){t.fileList_show=e},"update:file-list":function(e){t.fileList_show=e},success:t.fromToData,handleRemove:t.fromToData}})],1),e("div",[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openStore}},[t._v("图库选择")]),e("span",{staticStyle:{"margin-left":"10px","font-size":"14px",color:"#CCCCCC"}},[t._v("建议上传图片比例 800X800")])],1),e("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1),e("el-form-item",{attrs:{label:"简介",prop:"content"}},[e("cl-editor-quill",{on:{load:t.editor},model:{value:t.ruleForm.content,callback:function(e){t.$set(t.ruleForm,"content",e)},expression:"ruleForm.content"}})],1),e("el-form-item",{attrs:{label:"节日涨价 "}},[e("el-checkbox-group",{model:{value:t.ruleForm.autoRise,callback:function(e){t.$set(t.ruleForm,"autoRise",e)},expression:"ruleForm.autoRise"}},[e("el-checkbox",{attrs:{label:"1",name:"autoRise","true-label":"1","false-label":"0"}},[e("span",[t._v("需要")])]),e("el-popover",{attrs:{placement:"top",width:"100",trigger:"hover"},model:{value:t.autoPricePopover,callback:function(e){t.autoPricePopover=e},expression:"autoPricePopover"}},[e("p",[t._v("重要节日的当天和前一天,商品会自动根据设置进行涨价")]),e("div",{staticStyle:{"text-align":"right","margin-top":"10px"}},[e("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.$util.pageTo({url:"/goods/auto-price"})}}},[t._v("涨价设置")])],1),e("el-button",{attrs:{slot:"reference",type:"text",icon:"el-icon-question"},slot:"reference"})],1)],1)],1),e("el-form-item",{attrs:{label:"配送方式"}},[e("el-checkbox-group",{model:{value:t.ruleForm.needSend,callback:function(e){t.$set(t.ruleForm,"needSend",e)},expression:"ruleForm.needSend"}},[e("el-checkbox",{attrs:{label:"1",name:"type","true-label":"1","false-label":"0"}},[e("span",[t._v("到店自提")])])],1)],1),e("el-form-item",{attrs:{label:"运费"}},[e("el-radio-group",{model:{value:t.ruleForm.freightType,callback:function(e){t.$set(t.ruleForm,"freightType",e)},expression:"ruleForm.freightType"}},[e("el-radio",{attrs:{label:"0"}},[e("span",[t._v("按距离收费")])]),e("el-popover",{attrs:{placement:"top",width:"100",trigger:"hover"},model:{value:t.chargePopover,callback:function(e){t.chargePopover=e},expression:"chargePopover"}},[e("p",[t._v(t._s(t.shopInfo.extend.freeDistance)+"公里内免运费,超过每加1公里运费加收"+t._s(t.shopInfo.extend.freight)+"元")]),e("div",{staticStyle:{"text-align":"right","margin-top":"10px"}},[e("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.$util.pageTo({url:"/goods/freight"})}}},[t._v("修改")])],1),e("el-button",{staticClass:"question-btn",attrs:{slot:"reference",type:"text",icon:"el-icon-question"},slot:"reference"})],1),e("el-radio",{attrs:{label:"1"}},[e("span",[t._v("免运费")])])],1)],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("ruleForm",1)}}},[t._v("上架")]),e("el-button",{on:{click:function(e){return t.submitForm("ruleForm",0)}}},[t._v("保存")])],1)],1)],1),e("el-dialog",{attrs:{title:"从图库选择",visible:t.imgStoreModal,width:"600px"},on:{"update:visible":function(e){t.imgStoreModal=e}}},[e("div",{staticClass:"store-modal-content"},[e("div",{staticClass:"select-wrap flex-center-start"},[e("div",{staticStyle:{width:"80px"}},[t._v("选择分类")]),e("el-select",{staticStyle:{width:"200px"},attrs:{placeholder:"选择分类",size:"mini",clearable:!0},on:{change:t.selChangeFn},model:{value:t.imgStoreVal,callback:function(e){t.imgStoreVal=e},expression:"imgStoreVal"}},t._l(t.categoryData,(function(s,i){return e("el-option",{key:i,attrs:{label:s.categoryName,value:s.id}},[t._v(t._s(s.categoryName))])})),1)],1),e("div",{staticClass:"img-store-wrap"},[e("el-checkbox-group",{staticClass:"list-store",on:{change:t.setCheckImg},model:{value:t.imgStoreArr,callback:function(e){t.imgStoreArr=e},expression:"imgStoreArr"}},t._l(t.imgStoreData,(function(t,s){return e("div",{key:s,staticClass:"list-checkbox"},[e("el-checkbox",{attrs:{label:t.imgUrl+""}},[e("div",{staticClass:"list-img"},[e("img",{attrs:{src:t.imgUrl}})])])],1)})),0)],1)]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:function(e){t.imgStoreModal=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.checkImage}},[t._v("确 定")])],1)])],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("209c"),s("f803"),s("5880")),o=s("f9da"),n=s("d59e"),l={name:"goods-add",data(){return{ruleForm:{goodsName:"",sold:"",stock:"",categoryIdList:[],goodsStyle:"0",price:"",autoRise:"1",needSend:"0",shopImg:[],freightType:"0"},rules:{goodsName:[{required:!0,message:"请填写名称",trigger:"blur"}],categoryIdList:[{required:!0,message:"请选择分类",trigger:"blur"}],price:[{required:!0,message:"请填写价格",trigger:"blur"}],goodsStyle:[{required:!0,message:"请选择款式",trigger:"blur"}],shopImg:[{required:!0,message:"请上传图片",trigger:"blur"}]},fileList_show:[],dialogImageUrl:"",dialogVisible:!1,autoPricePopover:!1,chargePopover:!1,imgStoreData:[],imgStoreModal:!1,imgStoreVal:"",imgStoreOpt:[],imgStoreArr:[],currentPage:1,actionOption:!0,styleStoreData:[],styleForm:{id:0,styleName:"",price:"",picture:"",action:"add"}}},components:{elxUpload:o["default"]},computed:{...Object(r["mapGetters"])({categoryData:"category"}),...Object(r["mapGetters"])(["token","shopInfo"])},created(){this.init()},methods:{init(){this.pageParams=this.$route.query,"2"==this.pageParams.editType&&this.$service.goods.info({id:this.pageParams.id}).then(t=>{this.ruleForm=t,-1==this.ruleForm.stock&&this.$set(this.ruleForm,"stock",""),this.fliterData(t)}),this.$store.dispatch("getCategory")},_getImgStore(){return n["default"].list({page:1,categoryId:this.imgStoreVal}).then(t=>{this.imgStoreData=t.list})},addFn(t){let e=JSON.parse(JSON.stringify(this.ruleForm)),s="add";"2"==this.pageParams.editType&&(s="update",delete e.shortImgList,delete e.imgList,delete e.smallImgList),1==e.goodsStyle&&(delete e.price,e.goodsStyleList=this.styleStoreData),""==e.stock&&(e.stock=-1),this.$service.goods[s]({...e,status:t}).then(t=>{this.resetForm("ruleForm"),this.$message.success("添加成功!"),this.$router.push("/goods/list")})},fliterData(t){let e=t.smallImgList,s=t.imgList,i=t.shortImgList,a=[];for(let r=0;r<e.length;r++)console.log("编辑时初始化图片1",e[r]),a.push({url:e[r],showBBGG:s[r],response:{shortUrl:i[r]}});if(this.ruleForm.shopImg=i,console.log("编辑时初始化图片2",a),this.fileList_show=a,console.log("编辑时初始化图片3",this.fileList_show),!this.$util.isEmpty(t.goodsStyleList))for(let r in t.goodsStyleList)t.goodsStyleList[r].action="update",this.styleStoreData.push(t.goodsStyleList[r]);this.ruleForm.categoryIdList=t.categoryIdList.map(String)},fromToData({file:t,fileList:e}){let s=[];for(let i=0;i<e.length;i++)e[i].response&&s.push(e[i].response.shortUrl);this.$set(this.ruleForm,"shopImg",s),console.log(this.ruleForm.shopImg)},changeStyleFn(t){console.log(t),this.styleStoreData=[],t&&(this.styleFormAddFn(),this.styleStoreModal=!0)},selChangeDialogFn(t,e){console.log(t,e)},submitForm(t,e){this.$refs[t].validate(t=>{if(console.log(t),!t)return console.log("error submit!!"),!1;this.addFn(e)})},resetForm(t){this.$refs[t].resetFields()},checkImage(){this.imgStoreModal=!1,this.fileList_show=this.fileList_show.concat(this.imgStoreArr.map(t=>({url:t,status:"success"})))},setCheckImg(t){this.$set(this.ruleForm,"shopImg",this.ruleForm.shopImg.concat(t))},editor(t){console.log(t)},handleSizeChange(t){console.log(`每页 ${t} 条`)},handleCurrentChange(t){console.log("当前页: "+t)},selChangeFn(t){this.imgStoreVal=t},getStyleNum(){let t=0;for(let e in this.styleStoreData)"delete"!=this.styleStoreData[e].action&&t++;return t},styleDelFn(t){let e=this.getStyleNum();if(console.log("num",e),1==e)return this.$message.error("最少保留一个款式!"),!1;this.actionOption=!1,"update"==this.styleStoreData[t].action?this.$set(this.styleStoreData[t],"action","delete"):this.styleStoreData.splice(t,1),this.actionOption=!0,console.log("this.styleStoreData",this.styleStoreData)},styleFormAddFn(){let t=this.getStyleNum();if(t>5)return this.$message.error("最多选择六个款式!"),!1;let e=JSON.parse(JSON.stringify(this.styleForm));this.styleStoreData.push(e)},openStore(){return this.$message.success("即将启用..."),!1}}},c=l,u=(s("bfd7"),s("1805")),d=Object(u["a"])(c,i,a,!1,null,"7454db3f",null);e["default"]=d.exports},dd0f:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"shop-list"},[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-date-select",fn:function(){return[e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"mini"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]},proxy:!0},{key:"slot-order-debt",fn:function({scope:s}){return[e("el-radio-group",{staticStyle:{"margin-right":"20px","padding-top":"6px","margin-left":"20px"},on:{change:t.changeDebt},model:{value:t.debt,callback:function(e){t.debt=e},expression:"debt"}},[e("el-radio",{attrs:{label:"0"}},[t._v("全部")]),e("el-radio",{attrs:{label:"1"}},[t._v("待结款")]),e("el-radio",{attrs:{label:"2"}},[t._v("已结款")])],1)]}},{key:"slot-total-amount",fn:function(){return[e("span",{staticStyle:{"font-size":"15px","font-weight":"bold"}},[t._v("订单数:"+t._s(t.totalNum))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("订单金额:"+t._s(t.totalOrderPrice))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("退款金额:"+t._s(t.totalTkPrice))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("(仅退款金额:"+t._s(t.totalOnlyTkPrice)+")")]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("实际金额:"+t._s(t.totalActPrice))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("含(纸箱:"+t._s(t.totalCarton))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("打包费:"+t._s(t.totalPack))]),e("span",{staticStyle:{"font-size":"15px","font-weight":"bold","margin-left":"15px"}},[t._v("运费:"+t._s(t.totalFreight)+")")])]},proxy:!0},{key:"slot-export-data",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportDue()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goChange(s.row)}}},[t._v("查看明细")])]}},{key:"table-column-tkPrice",fn:function({scope:s}){return[e("div",{staticStyle:{cursor:"pointer"},on:{click:function(e){return e.stopPropagation(),t.getTkDetail(s.row)}}},[t._v(t._s(s.row.tkPrice?parseFloat(s.row.tkPrice):0))])]}}])})],1)},a=[],r=(s("b138"),s("5880")),o={data(){return{crud:null,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]},currentDateList:"",startTime:"",endTime:"",searchTime:"",totalActPrice:0,totalOrderPrice:0,totalCarton:0,totalPack:0,totalFreight:0,totalTkPrice:0,totalOnlyTkPrice:0,totalNum:0,debt:"0"}},computed:{...Object(r["mapGetters"])(["shopInfo"])},methods:{getTkDetail(t){let e={ghsId:t.id,ghsName:t.name,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,status:1};this.$router.push({path:"/in/refund-list",query:e})},goChange(t){let e={};e.ghsName=t.name,e.startTime=this.startTime,e.endTime=this.endTime,e.searchTime=this.searchTime,e.status=4,this.$router.push({path:"/in/list",query:e})},exportDue(){this.$service.statCgGhs.getProfile({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt,export:1}).then(t=>{t.file&&(window.location.href=t.file)})},onLoad({ctx:t,app:e}){this.app=e,t.service({page:()=>this.$service.statCgGhs.getProfile({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt}).then(t=>(this.totalActPrice=t.totalActPrice?t.totalActPrice:0,this.totalOrderPrice=t.totalOrderPrice?t.totalOrderPrice:0,this.totalCarton=t.totalCarton?t.totalCarton:0,this.totalPack=t.totalPack?t.totalPack:0,this.totalFreight=t.totalFreight?t.totalFreight:0,this.totalTkPrice=t.totalTkPrice?t.totalTkPrice:0,this.totalOnlyTkPrice=t.totalOnlyTkPrice?t.totalOnlyTkPrice:0,this.totalNum=t.totalNum?t.totalNum:0,{list:t.list}))}).set("table",{columns:[{label:"ID",prop:"id",align:"center"},{label:"供货商",prop:"name",align:"center"},{label:"订单数",prop:"num",align:"center"},{label:"订单金额",prop:"orderPrice",align:"center"},{label:"退款金额",prop:"tkPrice",align:"center"},{label:"实际金额",prop:"actPrice",align:"center"},{label:"纸箱费",prop:"carton",align:"center"},{label:"打包费",prop:"pack",align:"center"},{label:"运费",prop:"freight",align:"center"}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-date-select","slot-order-debt","flex1","slot-export-data"],["data-table"],["slot-total-amount","flex1"]]).done(),e.refresh()},getSearchDate(){this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1],this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})},changeDebt(t){this.debt=t,this.app.refresh({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,debt:this.debt})}}},n=o,l=(s("4844"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"5ec73699",null);e["default"]=c.exports},dd81:function(t,e,s){},ddca:function(t,e,s){},de2a:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-num",fn:function({scope:e}){return[t._v(" "+t._s(e.row.num)+" ")]}},{key:"table-column-name",fn:function({scope:s}){return[e("el-link",{on:{click:function(e){return t.getItemList(s.row)}}},[t._v(t._s(s.row.name))])]}},{key:"table-column-inTurn",fn:function({scope:s}){return[t.sort.status?e("el-input",{ref:"sort-input",attrs:{size:"mini"},on:{blur:function(e){return t.changeSort(s.row)}},model:{value:s.row.inTurn,callback:function(e){t.$set(s.row,"inTurn",e)},expression:"scope.row.inTurn"}}):e("span",[t._v(t._s(s.row.inTurn))])]}},{key:"table-header-inTurn",fn:function(){return[e("div",{staticClass:"set-sort"},[e("span",[t._v("排序")]),t.sort.status?e("el-button",{staticClass:"hide",attrs:{size:"mini",type:"primary"},on:{click:function(e){return t.commitSort()}}},[t._v("完成")]):e("el-button",{staticClass:"show",attrs:{icon:"el-icon-edit-outline",size:"small",type:"text"},on:{click:t.showSortInput}})],1)]},proxy:!0},{key:"slot-add-goods-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.replaceBtnFn({})}}},[t._v("添加")])]},proxy:!0},{key:"slot-item-list",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},nativeOn:{click:function(e){return e.stopPropagation(),t.getItemList(s.row)}}},[t._v("花材列表")])]}},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},nativeOn:{click:function(e){return e.stopPropagation(),t.replaceBtnFn(s.row)}}},[t._v("修改")])]}},{key:"slot-delete",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},nativeOn:{click:function(e){return e.stopPropagation(),t.deleteBtnFn(s.row)}}},[t._v("删除")])]}}])}),e("el-dialog",{attrs:{title:(0==t.id?"添加":"修改")+"分类",visible:t.replaceDialog,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.replaceDialog=e}}},[e("div",{staticClass:"ad-modal-content"},[e("el-form",{ref:"replaceForm",staticClass:"demo-form",attrs:{model:t.replaceForm,rules:t.ruleForm,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"分类名称",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入名称",size:"small"},model:{value:t.replaceForm.name,callback:function(e){t.$set(t.replaceForm,"name",e)},expression:"replaceForm.name"}})],1),e("el-form-item",{attrs:{label:"排序",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入顺序",size:"small"},model:{value:t.replaceForm.inTurn,callback:function(e){t.$set(t.replaceForm,"inTurn",e)},expression:"replaceForm.inTurn"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.submitForm("replaceForm")}}},[t._v("确认")])],1)])],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("209c"),s("f803"),s("5880"),{data(){return{app:null,sortLink:"",operateData:{},tabIndex:"0",tabsData:[{text:"花材分类",key:"0"}],selects:{},sort:{status:!1},replaceDialog:!1,id:0,replaceForm:{name:"",inTurn:""},ruleForm:{name:[{required:!0,message:"请输入名称",trigger:"blur"}]},initData:[]}},computed:{},methods:{deleteBtnFn(t){let e=t.id,s=this;this.$confirm("确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.itemClass.deleteClass({id:e}).then(t=>{s.replaceDialog=!1,this.$message.success("删除成功"),s.app.refresh()})})},resetForm(){this.$refs["replaceForm"].resetFields(),this.replaceDialog=!1},replaceFn(){let t=JSON.parse(JSON.stringify(this.replaceForm)),e=this;0==e.id?this.$service.itemClass.addClass(t).then(t=>{e.replaceDialog=!1,e.resetForm(),e.app.refresh()}):this.$service.itemClass.updateClass({id:e.id,...t}).then(t=>{e.replaceDialog=!1,e.resetForm(),e.app.refresh()})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this.replaceFn()})},replaceBtnFn(t){this.$util.isEmpty(t)?(this.id=0,this.replaceForm.name="",this.replaceForm.inTurn=""):(this.id=t.id,this.replaceForm.name=t.name,this.replaceForm.inTurn=t.inTurn),this.replaceDialog=!0},handleClick(t,e){this.app.refresh({type:this.tabIndex})},getItemList(t){let e={};e.classId=t.id,e.className=t.name,e.status=0,e.delStatus=2,this.$router.push({path:"/item/list",query:e})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.itemClass).set("table",{columns:[{prop:"id",label:"ID",align:"center"},{prop:"name",label:"标题",align:"center","min-width":180},{prop:"num",label:"花材数量",align:"center","min-width":100},{prop:"inTurn",label:"排序",align:"center",minWidth:100},{prop:"addTime",label:"创建时间",align:"center",minWidth:180}],on:{},op:{visible:!0,props:{width:300,align:"center",fixed:"right",label:"操作"},layout:["slot-item-list","slot-modify","slot-delete"]}}).set("dict",{search:{keyWord:"goodsName"}}).set("search",{key:{placeholder:"分类名称"}}).set("pagination",{size:100}).set("layout",[["slot-tabs"],["flex1","slot-add-goods-btn","refresh-btn"],["data-table"],["flex1","pagination"]]).on("delete",(t,{next:e})=>{e({id:t.map(t=>t.id).join(",")})}).done(),e.refresh({status:this.tabIndex})},refresh(t){this.app.refresh(t)},showSortInput(t){this.sort.status=!0},commitSort(){let t=this;this.$service.itemClass.changeInTurn({sortData:JSON.stringify(this.initData)}).then(e=>{t.$message.success("保存成功!"),t.sort.status=!1,t.refresh({status:this.tabIndex})}).catch(t=>{console.log(t)})},changeSort(t){let e={id:t.id};e.inTurn=t.inTurn,this.initData.push(e)}}}),o=r,n=(s("d523"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"1f0c2981",null);e["default"]=l.exports},dec1:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.itemData.itemName?t.itemData.itemName:"")+"】上下架记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"total-book-record",props:{itemData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookOnChangeGlobal).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.itemData.id,itemId:this.itemData.itemId})}}},o=r,n=(s("8de4"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"758bfdef",null);e["default"]=l.exports},e05a:function(t,e,s){"use strict";s("9340")},e0d3:function(t,e,s){},e0f3:function(t,e,s){"use strict";s.r(e);s("b138");var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content"},[e("div",{staticClass:"flex-center-between"},[e("div",{staticClass:"operate-left flex-center"},[e("el-select",{attrs:{placeholder:"选择分类",size:"mini",clearable:!0},on:{change:t.selChangeFn},model:{value:t.form.categoryId,callback:function(e){t.$set(t.form,"categoryId",e)},expression:"form.categoryId"}},t._l(t.categoryData,(function(t,s){return e("el-option",{key:s,attrs:{label:t.categoryName,value:t.id}})})),1),e("el-button",{staticClass:"app-margin-left-10",attrs:{type:"primary",size:"mini"},on:{click:t.selSubmitFn}},[t._v("查询")])],1),e("div",{staticClass:"operate-right flex-center"},[e("el-button",{staticClass:"view-category",attrs:{size:"mini"},on:{click:function(e){return t.$router.push("/goods/category")}}},[t._v("查看分类")]),e("cl-upload",{attrs:{hostUrl:"picAdd",props:{"on-success":t.addImgFn}},model:{value:t.formData.picIdList,callback:function(e){t.$set(t.formData,"picIdList",e)},expression:"formData.picIdList"}},[e("template",{slot:"content"},[e("el-button",{attrs:{type:"primary",size:"mini"}},[t._v("添加")])],1)],2)],1)]),e("div",{staticClass:"list-wrap"},t._l(t.list.data,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"list-img"},[e("img",{attrs:{src:s.imgUrl,alt:"商品图片"}})]),e("div",{staticClass:"flex-center-between"},[e("div",[t._v(t._s(s.name))]),e("div",{staticClass:"app-price"},[t._v("¥"+t._s(s.price))])]),e("div",{staticClass:"operate-btn-wrap"},[e("operate-module",{attrs:{btnData:t.btnData,item:s},on:{show:t.operateChangeFn}})],1)])})),0),e("el-dialog",{attrs:{title:"图片上传成功!",visible:t.addImageModal,width:"600px","close-on-click-modal":!1},on:{"update:visible":function(e){t.addImageModal=e}}},[e("div",{staticClass:"add-image-modal-content"},[e("el-form",{ref:"formData",attrs:{model:t.formData,rules:t.rules,"label-width":"120px"}},[e("el-form-item",{attrs:{label:"分类"}},[e("el-checkbox-group",{attrs:{size:"small"},model:{value:t.formData.categoryIdList,callback:function(e){t.$set(t.formData,"categoryIdList",e)},expression:"formData.categoryIdList"}},t._l(t.categoryData,(function(s,i){return e("el-checkbox",{key:i,attrs:{border:"",label:s.id,size:"small"},on:{change:function(e){return t.selChangeDialogFn(e,s)}}},[t._v(t._s(s.categoryName)+" ")])})),1)],1),e("el-form-item",{attrs:{label:"售价"}},[e("el-input",{attrs:{placeholder:"请填写价格"},model:{value:t.formData.price,callback:function(e){t.$set(t.formData,"price",e)},expression:"formData.price"}},[e("i",{staticClass:"iconfont iconqian",attrs:{slot:"suffix"},slot:"suffix"})])],1),e("el-form-item",{attrs:{label:"名称"}},[e("el-input",{attrs:{placeholder:"请填写图片名称"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.setImgCategoryFn}},[t._v("确 定")])],1)])],1)},a=[],r=(s("209c"),s("f803"),s("5880")),o=s("f511"),n=s("d59e"),l=s("1b62"),c={name:"img-store",components:{operateModule:o["default"]},mixins:[l["list"]],data(){return{form:{categoryId:""},operateData:{},btnData:[{text:"编辑",icon:"iconbianji",click:()=>{this.formData.categoryIdList=this.operateData.categoryIdList,this.formData.picIdList=this.operateData.id,this.addImageModal=!0}},{text:"分享",icon:"iconfenxiang1",click:()=>{n["default"].share({id:this.operateData.id}).then(t=>{this.resetList(),this._list()})}},{text:"置顶",icon:"iconzhiding",click:()=>{n["default"].top({id:this.operateData.id}).then(t=>{this.resetList(),this._list()})}},{text:"删除",icon:"iconshanchu1",click:()=>{this.$confirm("确认删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{n["default"].delete({id:this.operateData.id}).then(t=>{this.resetList(),this._list(),this.$message({type:"success",message:"删除成功!"})})}).catch(()=>{})}}],addImageModal:!1,formData:{picIdList:"",price:"",name:"",categoryIdList:[]},rules:{}}},computed:{...Object(r["mapGetters"])({categoryData:"category"}),...Object(r["mapGetters"])({festData:"festival"})},created(){this.$store.dispatch("getCategory"),this.$store.dispatch("getFestival"),this._list()},mounted(){setTimeout(()=>{console.log(this.categoryData)},2e3)},methods:{_list(){return n["default"].list({page:this.list.page,...this.form}).then(t=>{this.completes(t)})},selChangeFn(t){this.form.categoryId=t},selSubmitFn(){this.resetList(),this._list()},addImgFn(t){this.formData.picIdList=t.id+"",this.formData.name="",this.formData.price="",this.formData.categoryIdList=[],this.addImageModal=!0},selChangeDialogFn(t,e){console.log(t,e)},setImgCategoryFn(t){let e=JSON.parse(JSON.stringify(this.formData));e.picIdList=[e.picIdList],n["default"].remark(e).then(t=>{this.$message.success("操作成功!"),this.resetForm(),this.resetList(),this._list()}),console.log("submit!")},resetForm(){this.$refs["formData"].resetFields(),this.addImageModal=!1},operateChangeFn(t){this.operateData=t}}},u=c,d=(s("5b4b"),s("1805")),m=Object(d["a"])(u,i,a,!1,null,"05ae5d04",null);e["default"]=m.exports},e0fe:function(t,e,s){"use strict";s("aa05")},e101:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-content setting-freight-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rules,"label-width":"10px"}},[e("el-form-item",[e("div",{staticClass:"flex-center"},[e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.first,callback:function(e){t.$set(t.form,"first",e)},expression:"form.first"}}),e("div",{staticClass:"prompt-text"},[e("span",[t._v("公里内免运费,超过每加1公里加收")])]),e("el-input",{staticStyle:{width:"60px"},model:{value:t.form.add,callback:function(e){t.$set(t.form,"add",e)},expression:"form.add"}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v("元")])],1)]),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitForm("form")}}},[t._v("保存")])],1)],1)],1)},a=[],r=s("5880"),o={name:"setting-freight",data(){return{form:{first:"",add:""},rules:{}}},computed:{...Object(r["mapGetters"])({shopInfo:"shopInfo"})},watch:{shopInfo(){this.$util.isEmpty(this.shopInfo)||(this.form.first=this.shopInfo.extend.freeDistance,this.form.add=this.shopInfo.extend.freight)}},mounted(){this.init()},methods:{init(){this.$util.isEmpty(this.shopInfo)||(this.form.first=this.shopInfo.extend.freeDistance,this.form.add=this.shopInfo.extend.freight)},_updateFn(){this.$service.single.setFreight(this.form).then(t=>{this.$store.dispatch("shopInfo"),this.$message.success("更新成功!")})},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this._updateFn()})},resetForm(t){this.$refs[t].resetFields()}}},n=o,l=(s("e838"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},e10d:function(t,e,s){},e25e:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-userId",fn:function({scope:t}){return[0!=t.row.userId?e("i",{staticClass:"el-icon-success",staticStyle:{color:"#67C23A","font-size":"19px"}}):e("i",{staticClass:"el-icon-success",staticStyle:{color:"#C0C4CC","font-size":"19px"}})]}},{key:"table-column-avatar",fn:function({scope:t}){return[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"circle",size:24,src:t.row.avatar}})]}},{key:"table-column-incomeNotice",fn:function({scope:s}){return[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:e=>{t.changeNotice(s.row.id,e)}},model:{value:s.row.remind,callback:function(e){t.$set(s.row,"remind",e)},expression:"scope.row.remind"}})]}},{key:"table-column-status",fn:function({scope:s}){return[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:e=>{t.changeStatus(s.row.id,e)}},model:{value:s.row.status,callback:function(e){t.$set(s.row,"status",e)},expression:"scope.row.status"}})]}},{key:"slot-modify",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.modifyBtnFn(s.row)}}},[t._v("编辑")])]}},{key:"slot-del",fn:function({scope:s}){return[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.delBtnFn(s.row)}}},[t._v("删除")])]}},{key:"slot-add-ad-btn",fn:function(){return[e("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.addBtnFn}},[t._v("添加")])]},proxy:!0}])}),e("el-dialog",{attrs:{title:"请员工扫下方图片完成绑定",visible:t.showMiniCode,width:"600px"},on:{"update:visible":function(e){t.showMiniCode=e}}},[e("div",{staticStyle:{"text-align":"center"}},[e("img",{staticStyle:{margin:"0 auto",width:"280px"},attrs:{src:t.miniCodeSrc}})]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.showMiniCode=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:function(e){t.showMiniCode=!1}}},[t._v("确 定")])],1)]),e("el-dialog",{attrs:{title:(1==t.addOrModify?"添加":"修改")+"员工",visible:t.addDialog,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.addDialog=e}}},[e("div",{staticClass:"ad-modal-content"},[e("el-form",{ref:"adForm",staticClass:"demo-form",attrs:{model:t.adForm,rules:t.ruleForm,"label-width":"100px"}},[e("el-form-item",{attrs:{label:"姓名",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入姓名",size:"small"},model:{value:t.adForm.name,callback:function(e){t.$set(t.adForm,"name",e)},expression:"adForm.name"}})],1),e("el-form-item",{attrs:{label:"角色",prop:"roleId"}},[e("el-select",{attrs:{size:"small",placeholder:"请选择角色"},on:{change:t.selRoleFn},model:{value:t.adForm.roleName,callback:function(e){t.$set(t.adForm,"roleName",e)},expression:"adForm.roleName"}},t._l(t.roleList,(function(s,i){return e("el-option",{key:i,attrs:{value:s.roleName}},[t._v(t._s(s.roleName))])})),1)],1),e("el-form-item",{attrs:{label:"登陆密码",prop:"password"}},[e("el-input",{attrs:{placeholder:"请输入登录密码",type:"password",size:"small"},model:{value:t.adForm.password,callback:function(e){t.$set(t.adForm,"password",e)},expression:"adForm.password"}})],1),e("el-form-item",{attrs:{label:"备注"}},[e("el-input",{attrs:{type:"textarea",size:"small"},model:{value:t.adForm.remark,callback:function(e){t.$set(t.adForm,"remark",e)},expression:"adForm.remark"}})],1),e("el-form-item",{attrs:{label:"收款通知",prop:"remind"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.adForm.remind,callback:function(e){t.$set(t.adForm,"remind",e)},expression:"adForm.remind"}})],1),e("el-form-item",{attrs:{label:"启用状态",prop:"status"}},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.adForm.status,callback:function(e){t.$set(t.adForm,"status",e)},expression:"adForm.status"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.submitForm("adForm")}}},[t._v("确认")])],1)]),e("sel-member",{attrs:{show:t.selMemberModal},on:{"update:show":function(e){t.selMemberModal=e},confirm:t.selMemberConfirmFn,cancel:function(e){t.selMemberModal=!1}}}),e("role-set",{attrs:{show:t.roleShow,info:t.modifyData},on:{"update:show":function(e){t.roleShow=e}}})],1)},a=[],r=(s("8f26"),s("666b"),s("209c"),s("f803"),s("6898")),o=s("0c0b"),n={name:"list-ad",components:{selMember:r["default"],roleSet:o["default"]},data(){return{app:null,modifyData:{},addOrModify:1,addDialog:!1,showMiniCode:!1,miniCodeSrc:"",adForm:{name:"",roleId:"",roleName:"",remind:"1",password:"",userId:"",remark:"",status:"1"},ruleForm:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],roleName:[{required:!0,message:"请选择角色",trigger:"change"}],password:{required:!0,message:"请输入密码",trigger:"blur"}},roleList:[],selMemberModal:!1,memberData:{},roleShow:!1}},methods:{getRole(){if(!this.$util.isEmpty(this.roleList))return this.roleList;this.$service.role.list().then(t=>{this.roleList=t.list})},delBtnFn(t){this.$confirm("是否删除该员工?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.staff.delete({id:t.id}).then(t=>{this.$message.success("删除成功!"),this.app.refresh({type:this.tabIndex})})}).catch()},authBtnFn(t){this.modifyData=t,this.roleShow=!0},modifyBtnFn(t){this.$service.shopAdmin.info({id:t.id}).then(async t=>{let e={};t.userId&&"0"!=t.userId&&(e=await this.$service.member.info({userId:t.userId})),this.getRole(),this.memberData=e,this.addOrModify=2,this.modifyData=t,this.addDialog=!0;let s=JSON.parse(JSON.stringify(t));s.startTime=this.$util.$formatDate(s.startTime),s.endTime=this.$util.$formatDate(s.endTime),this.$util.isEmpty(s)||(Object.keys(this.adForm).forEach(t=>{this.adForm[t]=s[t]}),this.ruleForm.password.required=!1)})},addBtnFn(){this.getRole(),this.addOrModify=1,this.addDialog=!0,this.memberData={},this.adForm={name:"",roleId:"",roleName:"",remind:"1",password:"",userId:"",remark:"",status:"1"},this.ruleForm.password.required=!0},changeNotice(t,e){this.$service.common.updateRemind({id:t,remind:e}).then(t=>{this.$message.success("操作成功!"),this.app.refresh()})},changeStatus(t,e){this.$service.common.updateStatus({id:t,status:e}).then(t=>{this.$message.success("操作成功!"),this.app.refresh()})},selRoleFn(t){let e=this.roleList.findIndex(e=>e.roleName==t);this.adForm.roleId=this.roleList[e].id,console.log("this.adForm.roleId",this.adForm.roleId)},resetForm(){this.$refs["adForm"].resetFields(),this.memberData={},this.addDialog=!1},addFn(){let t=JSON.parse(JSON.stringify(this.adForm)),e=null;delete t.roleName,e=1==this.addOrModify?()=>this.$service.shopAdmin.prepareBind(this.adForm):()=>this.$service.shopAdmin.update({id:this.modifyData.id,...t}),e(t).then(t=>{this.miniCodeSrc=t.miniCode,this.showMiniCode=!0,this.resetForm(),this.app.refresh({type:this.tabIndex})})},selGoods(){this.selMemberModal=!0,setTimeout(()=>{console.log(this.memberData)},6e3)},selMemberConfirmFn(t){this.memberData=t,this.adForm.userId=t.id,this.selMemberModal=!1},submitForm(t){this.$refs[t].validate(t=>{if(!t)return console.log("error submit!!"),!1;this.addFn()})},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.shopAdmin).set("table",{columns:[{prop:"id",label:"id",align:"center",width:110},{prop:"avatar",label:"头像",align:"center",width:130},{prop:"name",label:"姓名",align:"center"},{prop:"mobile",label:"手机号",align:"center",width:200},{prop:"roleName",label:"角色",align:"center",width:150},{prop:"incomeNotice",label:"收款通知",align:"center",width:150},{prop:"status",label:"启用状态",align:"center",width:150},{prop:"addTime",label:"添加时间",align:"center",width:190}],op:{visible:!0,props:{width:250,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh({type:this.tabIndex})}}},l=n,c=(s("32d0"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"7b3b38dd",null);e["default"]=u.exports},e440:function(t,e,s){"use strict";s("6331")},e52a:function(t,e,s){"use strict";s("fe3d")},e546:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("error-page",{attrs:{code:403,desc:"您无权访问此页面"}})},a=[],r=s("438a"),o={components:{ErrorPage:r["default"]}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},e577:function(t,e,s){"use strict";s("acfd")},e5a6:function(t,e,s){},e5f2:function(t,e,s){"use strict";s("c284")},e697:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showDtail,size:"750px","custom-class":"order-draw-wrap",direction:"ltr"},on:{"update:visible":function(e){t.showDtail=e}}},[t.$util.isEmpty(t.orderInfo)?t._e():e("div",{staticClass:"order-manage-wrap"},[e("div",[e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 退款方式 "),e("div",{staticClass:"accounts-center"},[1==t.refundType?e("div",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){t.refundType=1}}},[t._v("退货并退款")]),e("el-button",{staticStyle:{"margin-left":"20px"},on:{click:function(e){t.refundType=2}}},[t._v("仅退款")])],1):e("div",[e("el-button",{on:{click:function(e){t.refundType=1}}},[t._v("退货并退款")]),e("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"primary"},on:{click:function(e){t.refundType=2}}},[t._v("仅退款")])],1)])])]),e("div",[1==t.refundType?e("div",{staticClass:"refund-item-list"},[e("div",{staticClass:"refund-label"},[t._v("选择花材")]),e("div",t._l(t.product,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"flex list-title"},[e("span",{staticClass:"product-name"},[t._v(t._s(s.name))]),e("span",{staticClass:"product-num"},[t._v(t._s(""+parseFloat(s.itemNum))+t._s(s.bigUnit))]),e("span",{staticClass:"product-price"},[t._v(t._s(""+parseFloat(s.bigPrice))+"元/"+t._s(s.bigUnit))])]),e("div",{staticClass:"flex list-val",staticStyle:{"font-size":"18px","font-weight":"bold"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:s.refundCount,expression:"res.refundCount"}],attrs:{type:"text",placeholder:"退货数","placeholder-style":"color:#CCCCCC"},domProps:{value:s.refundCount},on:{input:function(e){e.target.composing||t.$set(s,"refundCount",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(s.bigUnit))]),e("span",{staticStyle:{color:"green","margin-left":"20px"}},[t._v("可退"+t._s(Number(s.itemNum)-Number(s.refundNum))+t._s(s.bigUnit))])]),t.orderInfo.inBooking&&1==t.orderInfo.inBooking&&!t.$util.isEmpty(s.sendList)?e("div",{staticStyle:{border:"1px solid #6795da","font-size":"18px",margin:"8px 0 5px 0",padding:"5px 0 5px 0"}},t._l(s.sendList,(function(i,a){return e("div",{key:a,staticStyle:{padding:"5px 5px 5px 8px"}},[e("div",[t._v(t._s(i.customName)+"("+t._s(i.seatSn)+")"),e("span",{staticStyle:{"margin-left":"20px"}},[t._v("上架数 "+t._s(i.num)+t._s(s.bigUnit))])]),e("div",{staticStyle:{"border-bottom":"1px solid #77a977","padding-bottom":"6px","padding-top":"4px",display:"flex","align-items":"center","margin-top":"3px"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:i.currentRefundNum,expression:"send.currentRefundNum"}],staticStyle:{border:"2px solid #ddd",width:"140px","font-size":"18px","text-align":"center","margin-right":"10px"},attrs:{type:"text",placeholder:"下架数","placeholder-style":"color:#CCCCCC"},domProps:{value:i.currentRefundNum},on:{input:function(e){e.target.composing||t.$set(i,"currentRefundNum",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v("可下架"+t._s(parseFloat((Number(i.num)-Number(i.outNum)).toFixed(2)))+t._s(s.bigUnit))])])])})),0):t._e()])})),0)]):t._e()]),e("div",{staticClass:"accounts-list"},[t._v(" 订单金额 "),e("div",{staticClass:"accounts-center"},[t._v(" ¥"+t._s(parseFloat(t.orderInfo.orderPrice)||0)+" "),Number(t.orderInfo.tkPrice)>0?e("span",{staticStyle:{"margin-left":"15px","font-size":"18px",color:"green","font-weight":"bold"}},[t._v("已退¥"+t._s(t.orderInfo.tkPrice?parseFloat(t.orderInfo.tkPrice):0))]):t._e()])]),e("div",{staticClass:"accounts-list"},[t._v(" 可退金额 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(t.couldRefundPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 预计退款 "),e("div",{staticClass:"accounts-center"},[t._v("¥"+t._s(t.refundPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 实际退款 "),e("div",{staticClass:"accounts-center"},[e("el-input",{staticStyle:{width:"120px"},attrs:{placeholder:"输入金额"},model:{value:t.refundMoney,callback:function(e){t.refundMoney=e},expression:"refundMoney"}})],1)]),e("div",{staticClass:"accounts-list"},[t._v(" 备注内容 "),e("div",{staticClass:"accounts-center"},[e("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:t.remark,callback:function(e){t.remark=e},expression:"remark"}})],1)])]),e("div",{staticStyle:{"margin-left":"80px","margin-top":"20px"}},[e("el-button",{staticStyle:{"margin-left":"120px"},on:{click:t.closeOpen}},[t._v("取消")]),e("el-popconfirm",{staticStyle:{"margin-left":"180px"},attrs:{title:"确认退款?"},on:{confirm:function(e){return t.confirmRefund()},onConfirm:function(e){return t.confirmRefund()}}},[e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("确认")])],1)],1)])])],1)},a=[],r=(s("b138"),s("8f26"),s("666b"),s("963e"),s("f803"),{name:"begin-refund",props:{currentRefundData:{type:Object,default:()=>{}}},data(){return{showDtail:!1,loading:!0,product:[],refundMoney:0,refundType:1,remark:"",orderInfo:{},couldRefundPrice:0}},computed:{refundPrice(){let t=0;if(this.product)for(const e of this.product)if(Number(e.refundCount)>0){let s=Number(e.refundCount)*Number(e.bigPrice);s.toFixed(2),t=Number(t)+Number(s),t.toFixed(2)}return t=parseFloat(t.toFixed(2)),this.refundMoney=t,t}},methods:{confirmRefund(){let t=!1,e=[],s=null;if(this.product.forEach(i=>{let a=i.refundCount?Number(i.refundCount):0,r=i.itemNum?Number(i.itemNum):0,o=i.refundNum?Number(i.refundNum):0,n=Number(r)-Number(o);if(Number(a)>Number(n))return this.$message.error(i.name+"超过可退数量"),t=!0,!1;s=[],this.$util.isEmpty(i.sendList)||i.sendList.forEach(t=>{t.currentRefundNum&&parseFloat(t.currentRefundNum)>0&&s.push({id:t.id,refundNum:t.currentRefundNum})}),Number(i.refundCount)>0&&e.push({productId:i.productId,num:i.refundCount,unitType:0,unitName:i.bigUnit,unitPrice:i.bigPrice,sendRefund:s})}),t)return;if(this.$util.isEmpty(e)&&1==this.refundType)return void this.$message.error("请选择花材");let i={id:this.orderInfo.id,product:JSON.stringify(e),price:this.refundMoney,remark:this.remark,refundType:this.refundType};this.$service.cgRefund.createOrder(i).then(t=>{this.$message.success("操作成功"),this.closeOpen()})},init(){this.product=[],this.refundMoney=0,this.refundType=1,this.remark="",this.orderInfo={},this.couldRefundPrice=0,this.showDtail=!0,this.$service.purchaseOrder.detail({orderSn:this.currentRefundData.orderSn}).then(t=>{this.orderInfo=t,this.couldRefundPrice=Number(t.orderPrice)-Number(t.tkPrice),this.couldRefundPrice=this.couldRefundPrice.toFixed(2),this.couldRefundPrice=parseFloat(this.couldRefundPrice),this.product=t.itemInfo.map(t=>({...t,refundCount:null}))})},closeOpen(){this.showDtail=!1}}}),o=r,n=(s("b3c3"),s("078e"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"d55e5b2a",null);e["default"]=l.exports},e78b:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"order-detail"},[e("el-drawer",{attrs:{visible:t.showDtail,size:"1100px","before-close":t.closeFn,"custom-class":"order-draw-wrap",direction:"ltr"},on:{"update:visible":function(e){t.showDtail=e},close:t.closeTrigger}},[t.$util.isEmpty(t.detailInfo)?e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{height:"800px"}}):e("div",{staticClass:"order-manage-wrap"},[e("div",{staticClass:"card-wrap"},[e("div",{staticClass:"card-tit"},[t._v(" 花材信息 (按 Esc 关闭窗口) "),e("el-button",{staticStyle:{"margin-left":"399px"},on:{click:function(e){return t.usePrice(t.detailInfo,0)}}},[t._v("使用填单价")]),e("el-button",{staticStyle:{"margin-left":"30px"},on:{click:function(e){return t.usePrice(t.detailInfo,1)}}},[t._v("使用自带价")]),e("el-button",{staticStyle:{"margin-left":"30px"},attrs:{type:"primary"},on:{click:function(e){return t.addItme()}}},[t._v("添加花材")])],1),e("div",{staticClass:"card-body"},[e("el-table",{attrs:{data:t.detailInfo.product}},[e("el-table-column",{attrs:{label:"图片"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-popover",{attrs:{placement:"right",width:"200",trigger:"hover"}},[e("div",{staticStyle:{width:"200px",height:"200px"}},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover"},attrs:{src:t.row.bigCover}})]),e("div",{staticStyle:{width:"30px"},attrs:{slot:"reference"},slot:"reference"},[e("img",{staticStyle:{width:"100%",height:"100%","object-fit":"cover","border-radius":"5px"},attrs:{src:t.row.cover}})])])]}}],null,!1,1714386569)}),e("el-table-column",{attrs:{property:"name",label:"名称"}}),e("el-table-column",{attrs:{label:"成本"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.getCostChange(s.row)}}},[e("i",{staticClass:"el-icon-s-order",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},slot:"reference"}),t._v(" "+t._s(s.row.cost?parseFloat(s.row.cost):0)+" ")])]}}],null,!1,1703928452)}),e("el-table-column",{attrs:{label:"剩余"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.getStockDetail(s.row)}}},[e("i",{staticClass:"el-icon-s-order",staticStyle:{color:"#409eff","font-size":"17px"},attrs:{slot:"reference"},slot:"reference"}),t._v(" "+t._s(s.row.stock?parseFloat(s.row.stock):0)+" ")])]}}],null,!1,2659607935)}),e("el-table-column",{attrs:{label:"单价"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{class:[Number(s.row.cost)>Number(s.row.currentHdPrice)?"cost-blue":""],staticStyle:{width:"50px","margin-right":"2px"},attrs:{placeholder:"数量"},on:{focus:function(t){s.row.currentHdPrice=""}},model:{value:s.row.currentHdPrice,callback:function(e){t.$set(s.row,"currentHdPrice",e)},expression:"scope.row.currentHdPrice"}}),t._v("元 ")]}}],null,!1,1557681376)}),e("el-table-column",{attrs:{label:"数量"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{class:[Number(s.row.xhNum)>Number(s.row.stock)?"stock-red":""],staticStyle:{width:"50px"},attrs:{placeholder:"数量"},on:{focus:function(t){s.row.xhNum=""}},model:{value:s.row.xhNum,callback:function(e){t.$set(s.row,"xhNum",e)},expression:"scope.row.xhNum"}})]}}],null,!1,2985177083)}),e("el-table-column",{attrs:{label:"备注"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.modifyItemRemark(s.row)}}},[e("i",{staticClass:"el-icon-edit",staticStyle:{color:"#409eff","font-size":"17px",cursor:"pointer"},attrs:{slot:"reference"},slot:"reference"}),t._v(t._s(s.row.remark))])]}}],null,!1,997837959)}),e("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-popconfirm",{attrs:{title:"确认删除?"},on:{confirm:function(e){return t.confirmDel(s.row)},onConfirm:function(e){return t.confirmDel(s.row)}}},[e("el-button",{attrs:{slot:"reference",size:"small",type:"primary"},slot:"reference"},[t._v("删除")])],1),e("el-button",{staticStyle:{"margin-left":"20px"},attrs:{size:"small",type:"primary"},on:{click:function(e){return t.openLoan(s.row)}}},[t._v("借库存")])]}}],null,!1,3591088100)})],1)],1)]),e("div",[e("div",{staticClass:"accounts-list"},[t._v(" 客户名称 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v(t._s(t.detailInfo.customName||""))])]),e("div",{staticClass:"accounts-list"},[t._v(" 商品金额 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.itemPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 总计 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.allPrice))])]),e("div",{staticClass:"accounts-list"},[t._v(" 预付金额 "),e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("¥"+t._s(t.detailInfo.bookPrice?parseFloat(t.detailInfo.bookPrice):0))])]),e("div",{staticClass:"accounts-list"},[t._v(" 结账 "),t.settlePrice>0?e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"green"}},[t._v("退 ¥"+t._s(t.settlePrice)+",确认后自动退款")]):t.settlePrice<0?e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"red"}},[t._v("欠 ¥"+t._s(Math.abs(t.settlePrice))+",确认后变成欠款单")]):e("div",{staticClass:"accounts-center",staticStyle:{"font-weight":"bold",color:"black"}},[t._v("0")])]),e("div",{staticClass:"accounts-list"},[t._v(" 允许低于成本 "),e("div",{staticClass:"accounts-center"},[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},model:{value:t.lessCostCould,callback:function(e){t.lessCostCould=e},expression:"lessCostCould"}})],1)])]),e("div",{staticStyle:{"margin-left":"80px","margin-top":"20px"}},[e("el-button",{on:{click:t.closeFn}},[t._v("取消")]),e("el-popconfirm",{staticStyle:{"margin-left":"320px"},attrs:{title:"确认保存?"},on:{confirm:function(e){return t.savePrice()},onConfirm:function(e){return t.savePrice()}}},[e("el-button",{attrs:{slot:"reference"},slot:"reference"},[t._v("保存修改")])],1),e("el-popconfirm",{staticStyle:{"margin-left":"320px"},attrs:{title:"确认要提交?"},on:{confirm:function(e){return t.commitItem()},onConfirm:function(e){return t.commitItem()}}},[e("el-button",{attrs:{slot:"reference",type:"primary"},slot:"reference"},[t._v("确认提交")])],1)],1)])])],1)},a=[],r=(s("8f26"),s("666b"),s("963e"),s("f803"),{name:"arrival",props:{arrivalData:{type:Object,default:()=>{}}},data(){return{showDtail:!1,detailInfo:{},loading:!0,itemPrice:0,settlePrice:0,sendCost:0,packCost:0,addSelectItem:1,lessCostCould:0}},computed:{allPrice(){let t=0;if(this.itemPrice=0,this.totalWeight=0,this.detailInfo&&this.detailInfo.product)for(const e of this.detailInfo.product)if(e.currentHdPrice){let t=Number(e.xhNum)*Number(e.currentHdPrice);t=t.toFixed(2),this.itemPrice=Number(this.itemPrice)+Number(t),this.itemPrice.toFixed(2)}return this.itemPrice=parseFloat(this.itemPrice.toFixed(2)),t=Number(this.itemPrice),Number(this.sendCost)>0&&(t+=Number(this.sendCost)),Number(this.packCost)>0&&(t+=Number(this.packCost)),t=parseFloat(t.toFixed(2)),this.settlePrice=Number(this.detailInfo.bookPrice)-Number(t),this.settlePrice=parseFloat(this.settlePrice.toFixed(2)),t}},methods:{modifyItemRemark(t){this.$prompt("请输入备注","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请写备注",inputValue:t.remark}).then(({value:e})=>{this.$service.orderItem.updateItemRemark({remark:e,id:t.id}).then(s=>{t.remark=e,this.$message.success("修改成功")})})},closeTrigger(){this.$emit("searchFocus")},getCostChange(t){this.$emit("getCostChange",t)},getStockDetail(t){this.$emit("getStockDetail",t)},usePrice(t,e){t.product&&!this.$util.isEmpty(t.product)&&(t.product.forEach((t,s,i)=>{t.currentHdPrice=0==e?t.itemModifyPrice:t.itemSalePrice}),this.$forceUpdate())},commitItem(){let t=[],e=!1,s=this,i=!1;if(this.detailInfo&&this.detailInfo.product)for(const a of this.detailInfo.product){if(a.currentHdPrice.length<=0){this.$message.error("请填写价格,价格要大于0"),e=!0;break}if(this.$util.isEmpty(a.xhNum)||Number(a.xhNum)<0){this.$message.error("请填写到货数,没有填0"),e=!0;break}let s=a.xhNum?Number(a.xhNum):0,r=a.currentHdPrice?Number(a.currentHdPrice):0,o=a.productId||0;t=[...t,{productId:o,price:r,num:s}],Number(a.cost)>Number(a.currentHdPrice)&&(i=!0)}return 1==i&&0==this.lessCostCould?(this.$message.error("有花材低于成本销售,请允许"),!1):1!=e&&void this.$service.order.arrival({id:s.arrivalData.id,product:JSON.stringify(t),packCost:s.packCost,sendCost:s.sendCost}).then(t=>{this.$message.success("提交成功"),this.closeFn(),this.$emit("refreshData")})},savePrice(){if(this.$util.isEmpty(this.detailInfo.product))return this.$message.error("没有花材信息"),!1;const t=this.detailInfo.product.map(t=>({orderSn:t.orderSn,xhNum:t.xhNum,xhUnitPrice:t.currentHdPrice,id:t.id}));this.$service.orderItem.modifyBookItem({data:t,id:this.detailInfo.id,packCost:this.packCost,sendCost:this.sendCost}).then(t=>{this.$message.success("修改成功")})},confirmDel(t){this.$service.orderItem.delItem({id:this.arrivalData.id,smallId:t.id}).then(t=>{this.$message.success("删除成功"),this.init()})},openLoan(t){this.$emit("openLoan",t,this.arrivalData.id)},addItme(){this.$emit("addNewItem",this.arrivalData)},init(){this.detailInfo=[],this.showDtail=!0,this.$service.order.arrivalDetail({id:this.arrivalData.id}).then(t=>{this.detailInfo=t})},closeFn(){this.showDtail=!1}}}),o=r,n=(s("40eb"),s("da50"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"0f2e9204",null);e["default"]=l.exports},e838:function(t,e,s){"use strict";s("afc2")},e9da:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("error-page",{attrs:{code:404,desc:"找不到您要查找的页面"}})},a=[],r=s("438a"),o={components:{ErrorPage:r["default"]}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},ec5b:function(t,e,s){"use strict";s("23d6")},edf4:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"选择商品",visible:t.selDialog,"close-on-click-modal":!1,"append-to-body":!0,width:"800px"},on:{"update:visible":function(e){t.selDialog=e}}},[e("div",{staticClass:"recharge-modal-content"},[e("el-radio-group",{staticClass:"radio-wrap",model:{value:t.radio,callback:function(e){t.radio=e},expression:"radio"}},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-radio",fn:function({scope:s}){return[e("div",[e("el-radio",{attrs:{label:s.row.index}},[t._v("选择")])],1)]}},{key:"table-column-imgUrl",fn:function({scope:s}){return[e("div",[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:t._f("default_avatar")(s.row.imgUrl)}})],1)]}}])})],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmFn}},[t._v("确定")])],1)])},a=[],r=(s("8f26"),s("963e"),{name:"sel-search",props:{show:{type:Boolean,default:!1},multi:{type:Boolean,default:!1}},data(){return{selDialog:!1,ruleForm:{},radio:"",list:[],selData:{}}},computed:{},watch:{show(t){this.selDialog=t}},created(){},methods:{confirmFn(){this.$emit("confirm",this.list[this.radio])},resetForm(){this.$emit("cancel")},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.goods).set("table",{columns:[{prop:"radio",label:"选择",align:"center","min-width":60},{prop:"imgUrl",label:"商品图片",align:"center"},{prop:"goodsName",label:"商品名称",align:"center"},{prop:"price",label:"商品价格",align:"center"}],op:{visible:!1}}).set("dict",{search:{keyWord:"goodsName"}}).set("search",{key:{placeholder:"商品名称"}}).set("pagination",{size:6}).set("layout",[["slot-tabs"],["search-key","flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e,render:s})=>{let{list:i}=await e(t);i.map((t,e)=>{t.index=e,t.imgUrl=t.smallImgList[0]}),this.list=i,s(i)}).done(),e.refresh({type:this.tabIndex})}}}),o=r,n=(s("f892"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},ee01:function(t,e,s){"use strict";s("b569")},ee05:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-autocomplete",{attrs:{"fetch-suggestions":t.querySearch,"trigger-on-focus":!0,debounce:100,clearable:""},model:{value:t.newValue,callback:function(e){t.newValue=e},expression:"newValue"}})},a=[];s("8f26"),s("d9d9"),s("963e");const r=s("81b0").keys().map(t=>({value:t.substr(2)}));var o={props:{value:[String]},data(){return{newValue:""}},watch:{value(){this.parse()},newValue(t){this.$emit("input",t)}},mounted(){this.parse()},methods:{parse(){this.newValue=this.value||""},querySearch(t,e){const s=t?r.filter(this.createFilter(t)):r;e(s)},createFilter(t){return e=>e.value.toLowerCase().indexOf(t.toLowerCase())>=0}}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,"a507d7be",null);e["default"]=c.exports},ee57:function(t,e,s){t.exports=s.p+"img/wx-bar-bg.18045892.png"},ef11:function(t,e){t.exports="data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjQ1LjEwMAAAAAAAAAAAAAAA//NwAAAAAAAAAAAAAAAAAAAAAAAASW5mbwAAAA8AAAAHAAAGbAA8PDw8PDw8PDw8PDw8PF1dXV1dXV1dXV1dXV1dfX19fX19fX19fX19fX2enp6enp6enp6enp6enp6+vr6+vr6+vr6+vr6+vt/f39/f39/f39/f39/f//////////////////8AAAAATGF2YzU4LjkxAAAAAAAAAAAAAAAAJAO8AAAAAAAABmx+Aa/DAAAAAAD/84BkAApopuqqoYwAAAADSAFAAADAAAwe6/ohVETcOBvAMW/EQtETru8AxZ/ue7ucQASgAAm7vx3PREJwAATd3OAYt4YlPL/B/VLh8Rh/h/8Tjgf5d/D/Lh+IHAh8MflHf+D6gf+o4tUV5AQ6rV6HZeHQ6HQ2n/bspScKQcKFnYi8XLsHNV/7OK4GhtPN1TUyIgBjeBzeAwtSEkC2MgAcEDjkDyOpCVLGgcoTI4wyxdtaBNForhthEBHAYoEeG600U1E+fpldBzcrDKC4BS5k//OCZGcbHgtZL81MAQAAA0gBgAAATgudN+tPayaCKjQ0IObk2OeRMtEDIOOBTepkPSZlumyZ9FN6JfHMJw0KA5hBCTJgiAzZF9BvQb+tJBtnau7Obk2OeT5aJsnycZMihogcJgnOv/v/Ps60k0u81SQZ1OubmBoT7oF8vprL5uaJm5ONLhogqEallltttuF6ix7cl2VNGgpAbq4hCLwKWQTL7HJV2/nb7VqylmZmjV4wZmZma/GZgwpQ1EQNAEFTtYlBUFQVoBUFQWPPQSBoGjb/84JkSg3Ub4Ev7IwBAAADSAHAAADKgaBoRcGgZbUDQTDQKuOxKCoKs82W6km/HfMFXYu5DaxKCpFNB8FyW77/6ytjOojLrNmLsyYGZEmIJkKbniCA0RzUUBmQLINHU74TVTNM8zUTTLSDXO28MUta8OjkTwQTRPzbd4+XuC/hERExO5vOkUI+PgiWFcFDzv8P927l39tnIZQwgBKIRrxRA5jU6m2uM14YJX+Hs6xKQe47vob6Bro89YTYAOUbcm9spuNwgN17NSVxircp4pJ31v/zgmSXEB0BYH9jI0YAAANIAAAAAFvXqdlMpH5gKJqDqpX4AJi+IjEBAcIIgkICBZxdRxKJ8Qp4bYInHUJGpimJCqZGKIGSIAogknA+Lsu2l+oOyd9l3rraW68X3SWMM62FjWFfPtTXLmvwwxsYfvfd527woGQWBMaBQcBQUNhcs4hMNBMmUFC4IMQjpQhoEal7aBAkuFLXEVhQJipZP/q/VbgyPBwgABB5UOx2DNujJ4C5qCD/aKAiCmUS/zVoxYemEzr/KDVciE6ao3B//Llu//OCZNIUVLdeP6xoAAAAA0gBQAAA6IiZTDtn/+FLEFVBAnEX9jMNf/+ajoNOMosQxHIND0adFdKCL///CP0VNO7D7qO2qqkSu2JS6mx////+jdtdDKIu1tr+ohLaDVqI1spVKf/////1iMkryqch9+YtekHYfhuzjllTVaWl1l//////////73tca5egd17cshiUzmeobh+N63jVyrU1Wlpa1NTY44//////////+1yYgRx4bkT8O5II3G7Ut1upT2Ifhu3rLv/reOOWVbHGlCj/84Jk6x2V1VcbzWQAgAADSAGAAACoKkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv/zgmRDAAABpADgAAAAAANIAcAAAKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"},efc5:function(t,e,s){"use strict";s("b640")},efcf:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"loginPage"},[e("div",{staticClass:"login_main"},[e("div",{staticClass:"login_left"}),e("div",{staticClass:"login_right"},[e("p",[t._v("欢迎登录")]),e("el-form",{ref:"form",staticClass:"form",attrs:{size:"medium",disabled:t.saving}},[e("el-form-item",{attrs:{label:"用户名"}},[e("el-input",{attrs:{placeholder:"请输入用户名",maxlength:"20","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.mobile,callback:function(e){t.$set(t.form,"mobile",e)},expression:"form.mobile"}})],1),e("el-form-item",{attrs:{label:"密码"}},[e("el-input",{attrs:{type:"password",placeholder:"请输入密码",maxlength:"20","auto-complete":"off"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.next.apply(null,arguments)}},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}})],1),e("el-button",{staticClass:"submit-btn",attrs:{saving:t.saving},on:{click:t.next}},[t._v("登录")])],1)],1)])])},a=[],r=s("80c1"),o={mixins:[r["default"]],created(){}},n=o,l=(s("b51c"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"5d8029cb",null);e["default"]=c.exports},f053:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("div",[e("el-select",{ref:"itemSearchRef",staticStyle:{width:"300px","margin-left":"30px","margin-top":"15px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索花材",clearable:"","remote-method":t.searchItem},on:{change:t.getCurrentItem},model:{value:t.currentItemName,callback:function(e){t.currentItemName=e},expression:"currentItemName"}},t._l(t.itemList,(function(t){return e("el-option",{key:t.id,attrs:{label:`${t.name} | ${t.stock?parseFloat(t.stock):0}扎`,value:t.id}})})),1),e("el-input",{staticStyle:{width:"140px","margin-left":"15px"},attrs:{placeholder:"请填写价格"},model:{value:t.price,callback:function(e){t.price=e},expression:"price"}}),e("el-input",{staticStyle:{width:"300px","margin-left":"10px"},attrs:{placeholder:"请填写备注"},model:{value:t.remark,callback:function(e){t.remark=e},expression:"remark"}})],1),e("div",[e("el-select",{ref:"customSearchRef",staticStyle:{width:"300px","margin-left":"30px","margin-top":"15px"},attrs:{filterable:"",remote:"","reserve-keyword":"",placeholder:"搜索客户",clearable:"","remote-method":t.searchCustom},on:{change:t.getCurrentCustom},model:{value:t.currentCustomName,callback:function(e){t.currentCustomName=e},expression:"currentCustomName"}},t._l(t.customList,(function(t){return e("el-option",{key:t.id,attrs:{label:`${t.name}(${t.seatSn})`,value:t}})})),1),e("el-input",{staticStyle:{width:"140px","margin-left":"15px"},attrs:{placeholder:"客户名称",size:"big"},model:{value:t.name1,callback:function(e){t.name1=e},expression:"name1"}}),e("el-input",{staticStyle:{width:"140px","margin-left":"10px"},attrs:{placeholder:"手机号",size:"big"},model:{value:t.mobile1,callback:function(e){t.mobile1=e},expression:"mobile1"}}),e("el-popconfirm",{staticStyle:{"margin-left":"10px"},attrs:{title:"确认添加?"},on:{confirm:function(e){return t.addCustom()},onConfirm:function(e){return t.addCustom()}}},[e("el-button",{attrs:{slot:"reference",size:"big",type:"primary"},slot:"reference"},[t._v("添加")])],1)],1),e("div",{staticClass:"custom-data",staticStyle:{"margin-left":"30px","margin-top":"15px"}},[e("el-table",{ref:"showItemRef",attrs:{data:t.selectCustomList,"highlight-current-row":"",border:"","show-summary":""}},[e("el-table-column",{attrs:{prop:"customId",label:"ID",align:"center",width:"90"}}),e("el-table-column",{attrs:{prop:"customName",label:"名称",align:"center",width:"200"}}),e("el-table-column",{attrs:{prop:"num",label:"数量",align:"center",width:"130"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"数量"},model:{value:s.row.num,callback:function(e){t.$set(s.row,"num",e)},expression:"scope.row.num"}})]}}])}),e("el-table-column",{attrs:{prop:"price",label:"价格",align:"center",width:"130"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-input",{attrs:{placeholder:"价格"},model:{value:s.row.price,callback:function(e){t.$set(s.row,"price",e)},expression:"scope.row.price"}})]}}])}),e("el-table-column",{attrs:{prop:"operate",label:"操作",align:"center",width:"200"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.del(s.row.customId)}}},[t._v("删除")])]}}])})],1)],1),e("div",{staticStyle:{"margin-top":"30px"}},[e("el-button",{staticStyle:{"margin-left":"300px"},attrs:{type:"primary"},on:{click:function(e){return t.commit()}}},[t._v("提交")])],1)])},a=[],r=(s("b138"),s("8f26"),s("666b"),s("f803"),s("5880")),o={components:{},data(){return{currentItemName:"",itemList:[],customList:[],price:"",remark:"",currentItemId:0,currentCustomName:"",selectCustomList:[],name1:"",mobile1:""}},computed:{...Object(r["mapGetters"])({levelData:"level"}),...Object(r["mapGetters"])(["token"])},mounted(){this.$nextTick(()=>{this.$refs.itemSearchRef.focus()})},methods:{...Object(r["mapActions"])(["getLevel"]),addCustom(){return 11!=this.mobile1.length?(this.$message.error("手机号错误"),!1):this.$util.isEmpty(this.name1)?(this.$message.error("请填写客户名称"),!1):void this.$service.custom.createCustomers({name1:this.name1,mobile1:this.mobile1,confirmMobile1:this.mobile1}).then(t=>{this.name1="",this.mobile1="",this.$notify({title:"添加成功,15秒后生效",message:"success",type:"success"})})},commit(){let t=this;if(Number(this.currentItemId)<=0)return this.$message.error("请选花材"),!1;if(this.$util.isEmpty(this.selectCustomList))return this.$message.error("请选客户"),!1;let e=!1,s="";if(this.selectCustomList.forEach((t,i,a)=>Number(t.num)<=0?(e=!0,void(s=t.customName+" 数量没有填写")):Number(t.price)<=0?(e=!0,void(s=t.customName+" 价格没有填写")):void 0),1==e)return this.$message.error(s),!1;let i=JSON.stringify(this.selectCustomList),a={selectCustom:i,itemId:this.currentItemId,itemRemark:this.remark,itemPrice:this.price};this.$confirm("确认提交","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t.$service.liveOrder.addOrder(a).then(e=>{this.$message.success("添加成功"),setTimeout(()=>{t.$router.push({path:"/order/live-list"})},900)})})},clearData(){this.currentItemName="",this.itemList=[],this.customList=[],this.price="",this.currentItemId=0,this.currentCustomName="",this.selectCustomList=[]},del(t){if(!this.$util.isEmpty(this.selectCustomList)){let e=-1;this.selectCustomList.forEach((s,i,a)=>{Number(s.customId)==Number(t)&&(e=i)}),e>-1&&this.selectCustomList.splice(e,1)}},getCurrentCustom(t){this.currentCustomName="";let e=!1;this.$util.isEmpty(this.selectCustomList)||this.selectCustomList.forEach((s,i,a)=>{Number(s.customId)==Number(t.id)&&(e=!0)}),0==e&&this.selectCustomList.unshift({customId:t.id,customName:t.name,num:"",price:this.price,operate:""})},getCurrentItem(t){this.currentItemId=t},searchItem(t){let e=this;""!==t?(this.loading=!0,this.$service.product.list({name:t,delStatus:0}).then(t=>{e.loading=!1,e.itemList=t.list,e.$service.liveOrder.getUnConvert().then(t=>{let s=t.list?t.list:[];e.$util.isEmpty(s)||e.$util.isEmpty(e.itemList)||e.itemList.forEach((t,e,i)=>{let a=t.id;if(s[a]){let e=s[a],i=e.itemPrice?parseFloat(e.itemPrice):0,r=t.name?t.name:"",o=r+" | 已开过 "+i+"元";t.name=o}})})})):this.itemList=[]},searchCustom(t){let e=this;""!==t?(this.loading=!0,this.$service.custom.list({name:t}).then(t=>{e.customList=t.list})):this.customList=[]}}},n=o,l=(s("745c"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"66dfb2bd",null);e["default"]=c.exports},f08f:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"选择花材",visible:t.selDialog,"close-on-click-modal":!1,"append-to-body":!0,width:"950px"},on:{"update:visible":function(e){t.selDialog=e},close:function(e){return t.$emit("update:show",!1)}}},[e("div",{staticClass:"recharge-modal-content"},[e("el-checkbox-group",{staticClass:"radio-wrap",model:{value:t.checkList,callback:function(e){t.checkList=e},expression:"checkList"}},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-radio",fn:function({scope:s}){return[e("div",[2==s.row.select?e("el-checkbox",{attrs:{disabled:"",label:s.row}},[t._v(t._s(s.row.id))]):e("el-checkbox",{attrs:{label:s.row},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}}},[t._v(t._s(s.row.id))])],1)]}},{key:"table-column-select",fn:function({scope:s}){return[2==s.row.select?e("span",[t._v("✔")]):e("span")]}},{key:"table-column-stockWarning",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"库存预警值",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}},model:{value:s.row.stockWarning,callback:function(e){t.$set(s.row,"stockWarning",e)},expression:"scope.row.stockWarning"}})]}},{key:"table-column-cost",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"成本价",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}},model:{value:s.row.cost,callback:function(e){t.$set(s.row,"cost",e)},expression:"scope.row.cost"}})]}},{key:"table-column-addPrice",fn:function({scope:s}){return[e("el-input",{attrs:{placeholder:"加价",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}},model:{value:s.row.addPrice,callback:function(e){t.$set(s.row,"addPrice",e)},expression:"scope.row.addPrice"}})]}},{key:"table-column-cover",fn:function({scope:s}){return[e("div",[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:t._f("default_avatar")(s.row.cover)}})],1)]}}])})],1),e("div",[e("span",[t._v("花材分类:")]),e("el-select",{staticStyle:{width:"300px"},attrs:{size:"small",placeholder:"请选择分类"},on:{change:t.selClassFn},model:{value:t.sonClassName,callback:function(e){t.sonClassName=e},expression:"sonClassName"}},t._l(t.itemClassList,(function(s,i){return e("el-option",{key:i,attrs:{value:s.name}},[t._v(t._s(s.name))])})),1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmFn}},[t._v("确定")])],1)])},a=[],r=(s("8f26"),s("963e"),{name:"sj-list-layer",props:{show:{type:Boolean,default:!1},classId:{type:Number,default:0},multi:{type:Boolean,default:!1},className:{type:String,default:""}},data(){return{selDialog:!1,ruleForm:{},checkList:[],list:[],itemClassList:[],sonClassId:0,sonClassName:"",newApp:""}},computed:{},watch:{show(t){this.selDialog=this.show}},created(){},methods:{stop(){},selClassFn(t){let e=this.itemClassList.findIndex(e=>e.name==t);this.sonClassId=this.itemClassList[e].id},getAllClass(){this.$service.itemClass.getAllClass({pageSize:1e3}).then(t=>{this.itemClassList=t.list})},confirmFn(){return 0==this.checkList.length?(this.$message.warning("请选择花材"),!1):0==this.sonClassId?(this.$message.warning("请选择分类"),!1):void this.$emit("confirm",{list:this.checkList,classId:this.sonClassId})},resetForm(){this.$emit("cancel")},selectItem(t){if(console.log(1212121121),console.log(t),2==t.select)return!1;let e=this.checkList.findIndex(e=>e.id==t.id);-1===e?this.checkList=[t,...this.checkList]:this.checkList.splice(e,1)},onLoad({ctx:t,app:e}){this.sonClassId=this.classId,this.sonClassName=this.className,this.app=e,this.getAllClass(),t.service(this.$service.ptItem).set("table",{columns:[{prop:"radio",label:"选择",align:"center",width:110},{prop:"cover",label:"图片",align:"center",width:120},{prop:"name",label:"名称",align:"center"},{prop:"stockWarning",label:"库存预警值",align:"center"},{prop:"cost",label:"成本价",align:"center"},{prop:"addPrice",label:"加价",align:"center"},{prop:"weight",label:"重量",align:"center"},{prop:"select",label:"已添加",align:"center"}],on:{"row-click":(t,e)=>{this.selectItem(t)}},op:{visible:!1}}).set("dict",{search:{keyWord:"search"}}).set("search",{key:{placeholder:"花材名称,支持拼音首字母搜索"}}).set("pagination",{size:6}).set("layout",[["slot-tabs"],["search-key","flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e,render:s})=>{let{list:i}=await e(t);i.map((t,e)=>{t.index=e}),this.list=i,s(i)}).done(),e.refresh()}}}),o=r,n=(s("be60"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},f0fd:function(t,e,s){},f107:function(t,e,s){},f214:function(t,e,s){t.exports=s.p+"media/noStock.2f3b6a32.mp3"},f3f1:function(t,e,s){},f511:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("el-popover",{staticClass:"operate-module",attrs:{"popper-class":"liu-popover",placement:"bottom-end",width:"200",trigger:"hover"},on:{show:t.showFn}},[e("div",{staticClass:"operate-wrap"},t._l(t.btnData,(function(s,i){return e("div",{key:i,staticClass:"operate-list",on:{click:function(t){return s.click()}}},[e("i",{staticClass:"iconfont",class:[s.icon]}),e("div",{staticClass:"btn-text"},[t._v(t._s(s.text))])])})),0),e("el-button",{staticClass:"operate-btn",attrs:{slot:"reference",type:"text",icon:"el-icon-s-operation"},slot:"reference"})],1)},a=[],r={name:"operate-module",data(){return{}},props:{btnData:{type:Array,default:()=>[]},item:{type:Object,default:()=>{}}},methods:{showFn(){this.$emit("show",this.item)}}},o=r,n=(s("68a3"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,null,null);e["default"]=l.exports},f5a6:function(t,e,s){"use strict";s("2742")},f707:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"2px","font-weight":"bold"}},[t._v("【"+t._s(t.currentData.customName?t.currentData.customName:"")+"】"+t._s(t.currentData.itemName?t.currentData.itemName:"")+" 待采变动记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-changeNum",fn:function({scope:s}){return[t._v(" "+t._s(1==s.row.io?"+":"-")),e("span",[t._v(t._s(s.row.changeNum))])]}}])})],1)])],1)},a=[],r={name:"book-custom-cg-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1}},methods:{init(){this.showArea=!0,this.app&&this.app.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.bookCgChange).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"事项",prop:"event",align:"center"},{label:"变动",prop:"changeNum",align:"center"},{label:"最终",prop:"num",align:"center"},{label:"操作人",prop:"staffName",align:"center"}],op:{visible:!0,props:{width:60,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["data-table"],["flex1"]]).done(),e.refresh({relateSecondId:this.currentData.id,customId:this.currentData.customId,itemId:this.currentData.itemId})}}},o=r,n=(s("028b"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"be9088da",null);e["default"]=l.exports},f709:function(t,e,s){},f711:function(t,e,s){},f794:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-icon",fn:function({scope:t}){return[e("icon-svg",{attrs:{name:t.row.icon,size:"20px"}})]}},{key:"table-column-perms",fn:function({scope:s}){return t._l(s.row.permList,(function(s,i){return e("el-tag",{key:i,staticStyle:{margin:"2px"},attrs:{size:"medium"}},[t._v(t._s(s))])}))}},{key:"table-column-router",fn:function({scope:s}){return[1==s.row.type?e("el-link",{attrs:{type:"primary",href:s.row.router}},[t._v(t._s(s.row.router))]):e("span",[t._v(t._s(s.row.router))])]}},{key:"table-column-keepAlive",fn:function({scope:s}){return[1==s.row.type?[s.row.keepAlive?e("i",{staticClass:"el-icon-check"}):e("i",{staticClass:"el-icon-close"})]:t._e()]}},{key:"slot-column-op",fn:function({scope:s}){return[2!=s.row.type?e("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(e){return t.upsertAppend(s.row)}}},[t._v("新增")]):t._e()]}}])}),e("cl-context-menu",{ref:"context-menu"})],1)},a=[],r=(s("b138"),s("8f26"),s("963e"),s("8bc2")),o={data(){return{crud:null}},methods:{onLoad({ctx:t,app:e}){this.crud=e,t.service(this.$service.system.menu).set("dict",{api:{page:"list"}}).set("table",{columns:[{prop:"name",label:"名称",width:200},{prop:"icon",label:"图标",align:"center",width:80},{prop:"type",label:"类型",align:"center",width:100,dict:[{label:"目录",value:0},{label:"菜单",value:1},{label:"权限",value:2}]},{prop:"router",label:"节点路由",align:"center","min-width":160},{prop:"keepAlive",label:"路由缓存",align:"center",width:100},{prop:"viewPath",label:"文件路径",align:"center","min-width":200,"show-overflow-tooltip":!0},{prop:"perms",label:"权限","header-align":"center","min-width":300},{prop:"orderNum",label:"排序号",align:"center",width:100},{prop:"updateTime",label:"更新时间",align:"center",sortable:!0,width:180}],props:{"row-key":"id"},on:{"row-click":(t,s)=>{s.property&&t.children&&e.refs("table").toggleRowExpansion(t)},"row-contextmenu":(t,s,i)=>{let a=[{label:"编辑",callback:(s,i)=>{e.edit(t),i()}},{label:"删除",callback:(s,i)=>{e.delete(t),i()}}];2!=t.type&&a.unshift({label:"新增",callback:(e,s)=>{this.upsertAppend(t),s()}}),1==t.type&&a.push({label:"权限",callback:(e,s)=>{this.setPermission(t),s()}}),this.$refs["context-menu"].open(i,{list:a}),i.preventDefault()}},op:{props:{width:"200"},layout:["slot-column-op","edit","delete"]}}).set("upsert",{props:{width:"600px"},items:[{prop:"type",value:0,label:"节点类型",span:24,component:{name:"el-radio-group",options:[{label:"目录",value:0},{label:"菜单",value:1},{label:"权限",value:2}],on:{change:t=>{this.changeType(t)}}}},{prop:"name",label:"节点名称",span:24,component:{name:"el-input",attrs:{placeholder:"请输入节点名称"}},rules:{required:!0,message:"名称不能为空"}},{prop:"parentId",label:"上级节点",span:24,component:{name:"cl-menu-tree"}},{prop:"router",label:"节点路由",span:24,hidden:!0,component:{name:"el-input",attrs:{placeholder:"请输入节点路由"}}},{prop:"keepAlive",value:!0,label:"路由缓存",span:24,component:{name:"el-radio-group",options:[{label:"开启",value:!0},{label:"关闭",value:!1}]}},{prop:"viewPath",label:"文件路径",span:24,hidden:!0,component:{name:"cl-menu-file-path"}},{prop:"icon",label:"节点图标",span:24,component:{name:"cl-menu-icons"}},{prop:"orderNum",label:"排序号",span:24,component:{name:"el-input-number",props:{placeholder:"请填写排序号",min:0,max:99,"controls-position":"right"}}},{prop:"perms",label:"权限",span:24,hidden:!0,component:{name:"cl-menu-perms"}}]}).set("layout",[["refresh-btn","add-btn"],["data-table"]]).on("refresh",(t,{render:e})=>{this.$service.system.menu.list().then(t=>{t.map(t=>{t.permList=t.perms?t.perms.split(","):[]}),e(Object(r["deepTree"])(t)),this.$store.dispatch("permMenu")})}).on("open",(t,e)=>{this.changeType(e?e.type:0)}).done(),e.refresh()},changeType(t){this.crud.setData("upsert.items[prop:router].hidden",1!=t),this.crud.setData("upsert.items[prop:icon].hidden",2==t),this.crud.setData("upsert.items[prop:viewPath].hidden",1!=t),this.crud.setData("upsert.items[prop:keepAlive].hidden",1!=t),this.crud.setData("upsert.items[prop:perms].hidden",2!=t)},upsertAppend({type:t,id:e}){this.crud.append({parentId:e,type:t+1})},setPermission({id:t}){this.crud.append({parentId:t,type:2})},toUrl(t){this.$router.push(t)}}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,null,null);e["default"]=c.exports},f7d6:function(t,e,s){"use strict";s("d402")},f7fc:function(t,e,s){},f850:function(t,e,s){"use strict";s("a1fe")},f86d:function(t,e,s){"use strict";s("9030")},f892:function(t,e,s){"use strict";s("dd81")},f8a3:function(t,e,s){},f8ce:function(t,e,s){},f935:function(t,e,s){},f948:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAPFBMVEX5+fkfHx/k5OQ+Pj79/f0QEBAwMDD39/f///8DAwPKysq5ubnt7e2np6aGhobX19dSUlJnZ2d2dnaUlJQzuMSfAAADdElEQVRIx51WWYLtKghERYNzhv3v9YGZTDrJfd186DnGAkUogOFL8OsjfCPpj1AKs6Y/QSk4P31g4QNprPVTol9DkW1axo6vduEVaawSsZPGX0J13SX9+q64CfzpXb/lDQpI1IzSq114WgeiQYeYlyXnyHclgv9nFWioeTLKehGrzBw1PoB/rhCE2TWQvI4VBdaUygdJ31CgOive7MZ5yTHmXNg+o82i74ZvfwkzW7TjEpL4iVhQx2JkLRB+QDGJSZO1QE5XUy2s0OUrFq7IyXpV9N2jjA78xRbEF2hDughP3qS03LHQcwIjTaDnCCDIytul+9r9Itbr6nt6ImNVpAcoRedV+CAUFN3mTMEDSmnk8yB8shzfqByhe8yUhU1YZXtLCWOOnwHXibapGq8q3qDIRtfj1hCChsRjSJwEIdQEslZhdUe5Qymy0UbZTCx2pqh4ilh4NJrWNeEO452GCxSHefces5mfRJP1DOXRaVrX5FrF+oxXKKvbuE8o9LTqlW9WrRXoys1Xq2KlrO6VhPtp1TerfLrRugQdFHDxKjejEHPMgdOFJw2Vx5jWNWgPMVsVsIfyVd0WDutDrPm2/oH9ceRrtna1sUHlacxG87mUErEuPFUIPC4J1rX1ZsqWHgoC3arL5mF13NWcHhY/KT9foezgDcpv+O7h5uJX6Ne7Pljt7zo65wpFw1OAhcdRo6zNO/R212E6UlWzJExtGtq0rbWtyDdZLlAoRxZ3mQO3zBHoYm2kSzRlvyv7LlE0WVXhAuXbT12v06wdAl3ZFX9ew5/91PEShvmUqZykQsxP5Zo5EsT+pDuhDLsLE8OuE2HyewifqV7d8Ty8JW8wLleqOw77l88LN4KBuWNZsap+WmVe8zbjD0bkCNuTh7UbZ3Zx485kctPD6FnVG3eMZ4PFJAbyEa7tW8fhnd/ZyX7uHqhBV/yK1LzhpOG7Ultem1HSk++P1UOhJWl5bgqRKts0fUmCS5RJMZsq0UNLE7mym0tJgusOLlncNqRrbUYp61ztx3pZhpv2MErb0DoCEhe1DKrFcHTd++p7V0Ja9HOvlFsjQqDDMjkrncTdgfDQNk3S7ShnRhaOCOmcXKmI/2y5AIdQpFfaMoD7tXGp8LPyPvWIvC2FZR6Fnsw45zo8tpjw2pjikETYvy+l/qMBgFVev/8H4OBf9N31KHMAAAAASUVORK5CYII="},f94a:function(t,e,s){},f9da:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-upload",{attrs:{action:t.action,"list-type":"picture-card","http-request":t.httpRequest,limit:t.limit,"file-list":t.fileList,disabled:t.disabled,"on-exceed":t.exceed,"on-success":t.success,headers:{token:t.token},multiple:t.multiple,"on-preview":t.handlePictureCardPreview,"on-remove":t.handleRemove,"before-upload":t.beforeUpload}},[e("i",{staticClass:"el-icon-plus"})]),e("el-dialog",{attrs:{visible:t.dialogVisible},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("img",{attrs:{width:"100%",src:t.dialogImageUrl,alt:""}})])],1)},a=[],r=s("5880"),o={name:"elx-upload",props:{limit:null,multiple:{type:Boolean,default:!0},fileList:{type:Array,default:[]},value:[Array,String],disabled:Boolean,category:Array},data(){const t=this.$service.common.upload();return{action:t.url,list:[],index:0,dialogImageUrl:"",dialogVisible:!1}},computed:{...Object(r["mapGetters"])(["token"])},mounted(){this.init()},methods:{init(){},httpRequest(t){const e=t.file;this.getBase64(e).then(e=>{this.$service.common.uploadImg({content:e,categoryId:this.category}).then(e=>{t.onSuccess(e)})})},beforeUpload(t){if(t.size/1024/1024>1)return this.$message.warning("上传的图片不能超过1M"),!1},handleRemove(t,e){this.$emit("handleRemove",{file:t,fileList:e})},handlePictureCardPreview(t){this.dialogImageUrl=t.showBBGG||t.url,this.dialogVisible=!0},exceed(){this.$message.warning(`最多只能上传${this.limit}张图片`)},success(t,e,s){this.$emit("update:fileList",s),this.$emit("success",{response:t,file:e,fileList:s})},getBase64(t){return new Promise((function(e,s){let i=new FileReader,a="";i.readAsDataURL(t),i.onload=function(){a=i.result},i.onerror=function(t){s(t)},i.onloadend=function(){e(a)}}))}}},n=o,l=s("1805"),c=Object(l["a"])(n,i,a,!1,null,"34293a5c",null);e["default"]=c.exports},f9e6:function(t,e,s){"use strict";s("808f")},fb6b:function(t,e,s){},fbe1:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("li",{staticClass:"tools-notice"},[e("i",{staticClass:"el-icon-message-solid"}),e("span",{staticClass:"tag"},[t._v("4")]),t.visible?e("div",{staticClass:"popover"},[e("div",{staticClass:"tips"},[e("span",[t._v("您有4条新通知")]),e("el-button",{attrs:{size:"mini",type:"primary",round:""}},[t._v("查看全部")])],1),t._m(0)]):t._e()])},a=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"list"},[e("a",{staticClass:"block"},[e("div",{staticClass:"icon"},[e("i",{staticClass:"el-icon-s-promotion"})]),e("div",{staticClass:"det"},[e("p",{staticClass:"title"},[t._v("您的Apple ID 被用在iPhone 11 上登录 iCould")]),e("p",{staticClass:"sub-title"},[t._v("5分钟前")])])])])}],r=s("8bc2"),o={data(){return{visible:!1}},mounted(){document.onclick=t=>{let e=document.querySelector(".tools-notice .popover");"el-icon-message-solid"==t.target.className&&(this.visible=!this.visible),e&&(Object(r["contains"])(e,t.target)||(this.visible=!1))}}},n=o,l=(s("8d14"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"1efa0496",null);e["default"]=c.exports},fd0a:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-mobile",fn:function({scope:s}){return[""!=s.row.mobile?e("span",[t._v(t._s(s.row.mobile))]):e("span",[t._v("-")])]}},{key:"table-column-debtAmount",fn:function({scope:e}){return[t._v(" "+t._s(e.row.debtAmount?parseFloat(e.row.debtAmount):0)+" ")]}},{key:"table-column-location",fn:function({scope:s}){return[1==s.row.location?e("span",{staticStyle:{cursor:"pointer",color:"blue","font-weight":"bold"},on:{click:function(e){return t.modifyLocation(s.row)}}},[t._v("本地")]):e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.modifyLocation(s.row)}}},[t._v("上游")])]}},{key:"table-column-buyAmount",fn:function({scope:s}){return[e("span",[t._v(t._s(s.row.buyAmount?parseFloat(s.row.buyAmount):0))])]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-upload",{staticClass:"upload-demo",staticStyle:{display:"inline-block","margin-right":"20px"},attrs:{action:`${t.fileUrl}?id=${s.row.id}`,headers:{token:t.token},multiple:"","show-file-list":!1,"on-success":t.fileUpSuccess,accept:".xls,.xlsx",limit:1}},[e("el-button",{attrs:{size:"small",type:"primary"}},[t._v("导入Excel")])],1),e("el-button",{staticStyle:{"margin-left":"30px"},attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goCg(s.row)}}},[t._v("新增采购")])]}},{key:"slot-top-element",fn:function(){return[e("el-input",{ref:"ghsSearchRef",staticStyle:{width:"400px"},attrs:{placeholder:"搜索供货商",size:"big"},on:{input:function(e){return t.changeText()}},model:{value:t.name,callback:function(e){t.name=e},expression:"name"}})]},proxy:!0}])})],1)},a=[],r=(s("b138"),s("5880")),o=s("51be"),n={components:{},data(){return{app:null,tabIndex:"0",tabsData:[{text:"供货商",key:"0",val:0}],modalData:{},drapShow:!1,confirmMobile1:"",addPop:!1,name:"",fileUrl:""}},computed:{...Object(r["mapGetters"])({levelData:"level"}),...Object(r["mapGetters"])(["token"])},created(){this.fileUrl=o["baseUrl"]+"/purchase-order/import-create",this.getLevel()},mounted(){this.$nextTick(()=>{this.$refs.ghsSearchRef.focus()})},methods:{...Object(r["mapActions"])(["getLevel"]),fileUpSuccess(t){if(1==t.code){this.$notify({title:"提交成功",message:"success",type:"success"});let t=this;setTimeout(()=>{t.$router.push({path:"/in/list"})},1e3)}else this.$message.error(t.msg)},modifyLocation(t){let e=this;e.$confirm("确认修改类型?","提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{e.$service.ghs.changeLocation({id:t.id}).then(t=>{e.$message.success("修改成功"),e.app.refresh({type:e.tabIndex,name:e.name})})})},changeText(){this.app.refresh({type:this.tabIndex,name:this.name})},goCg(t){let e={};e.ghsId=t.id,e.ghsName=t.name,e.location=t.location||0,this.$router.push({path:"/in/confirm",query:e})},handleClick(t,e){this.app.refresh({type:this.tabIndex,name:this.name})},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.type&&(this.tabIndex=this.$route.query.type),t.service(this.$service.ghs).set("table",{columns:[{prop:"name",label:"名称",align:"center",width:200},{prop:"location",label:"类型",align:"center",width:90},{prop:"mobile",label:"手机号",align:"center",width:110},{prop:"id",label:"ID",align:"center",width:90},{prop:"debtAmount",label:"欠款",align:"center",width:100},{prop:"balance",label:"余额",align:"center",width:90}],op:{visible:!0,props:{width:260,align:"center",fixed:"left",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-top-element","flex1"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{await e(t)}).done(),e.refresh({type:this.tabIndex,name:this.name})}}},l=n,c=(s("845d"),s("1805")),u=Object(c["a"])(l,i,a,!1,null,"807c2ed6",null);e["default"]=u.exports},fd9d:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",[e("el-drawer",{attrs:{visible:t.showArea,size:"55vw","before-close":t.closeFn,"custom-class":"drawer-class",direction:"ltr"},on:{"update:visible":function(e){t.showArea=e}}},[e("div",[e("div",{staticStyle:{"margin-left":"10px","font-weight":"bold"}},[t._v("售后记录")]),e("x-crud",{on:{load:t.onLoad},scopedSlots:t._u([{key:"table-column-status",fn:function({scope:e}){return[t._v(" "+t._s(0==e.row.status?"待审核":1==e.row.status?"已通过":2==e.row.status?"已驳回":"已取消")+" ")]}},{key:"slot-column-option",fn:function({scope:s}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getDetail(s.row)}}},[t._v("明细")])]}}])})],1),t.$util.isEmpty(t.refundInfo)?t._e():e("div",{staticClass:"app-content"},[e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后时间:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[t._v(t._s(t.refundInfo.addTime))])])]),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后单号:")]),e("div",{staticClass:"flex list",staticStyle:{"align-items":"center"}},[e("div",{staticClass:"flex",staticStyle:{"align-items":"center"}},[t._v(t._s(t.refundInfo.refundSn))])])]),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后方式:")]),e("div",{staticClass:"flex list"},[e("div",{staticClass:"flex"},[t._v(t._s(1==t.refundType?"退货并退款":"只退款"))])])]),1==t.refundType?e("div",{staticClass:"refund-item-list"},[e("div",{staticClass:"refund-label"},[t._v("售后商品:")]),e("div",t._l(t.product,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"flex list-title"},[t._v(" "+t._s(s.name)+" ¥"+t._s(s.unitPrice?parseFloat(s.unitPrice):0)+"*"+t._s(s.num)+t._s(s.unitName)+"=¥"+t._s(parseFloat(s.price))+" ")])])})),0)]):t._e(),e("div",{staticClass:"flex refund-item"},[e("div",{staticClass:"refund-label"},[t._v("售后金额:")]),e("div",{staticClass:"list"},[t._v("¥"+t._s(t.refundPrice))])]),t.$util.isEmpty(t.remark)?t._e():e("div",{staticClass:"refund-item"},[e("div",{staticClass:"refund-label",staticStyle:{color:"red","font-weight":"bold"}},[t._v("备注信息:")]),e("div",{staticClass:"list",staticStyle:{color:"red","font-weight":"bold"}},[t._v(t._s(t.remark))])])])])],1)},a=[],r={name:"refund-record",props:{currentData:{type:Object,default:()=>{}}},data(){return{showArea:!1,product:"",refundPrice:0,refundType:1,remark:"",refundInfo:{}}},methods:{getDetail(t){this.$service.cgRefund.getRefundFullInfo({id:t.id}).then(t=>{this.refundInfo=t.info,this.product=t.itemList||[],this.refundType=t.info.refundType||0,this.refundPrice=t.info.refundPrice?parseFloat(t.info.refundPrice):0,this.remark=t.info.remark?t.info.remark:""})},init(){this.showArea=!0,this.refundInfo=[],this.app&&this.app.refresh({relateOrderSn:this.currentData.orderSn})},closeFn(){this.showArea=!1},onLoad({ctx:t,app:e}){this.app=e,t.service(this.$service.cgRefund).set("table",{columns:[{label:"日期",prop:"addTime",align:"center"},{label:"单号",prop:"refundSn",align:"center"},{label:"金额",prop:"refundPrice",align:"center"},{label:"操作",prop:"shopAdminName",align:"center"},{label:"状态",prop:"status",align:"center"}],op:{visible:!0,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["data-table"],["flex1","pagination"]]).set("pagination",{size:4}).done(),e.refresh({relateOrderSn:this.currentData.orderSn})}}},o=r,n=(s("6914"),s("1805")),l=Object(n["a"])(o,i,a,!1,null,"e1bb879a",null);e["default"]=l.exports},fdaf:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("div",{staticClass:"app-content-top flex-center"},[e("div",{staticClass:"avatar-wrap flex-center"},[e("div",{staticClass:"avatar-wrap-left"},[e("cl-avatar",{attrs:{shape:"circle",size:45,src:t.shopInfo.smallLogoUrl}})],1),e("div",{staticClass:"avatar-wrap-right"},[e("div",{staticClass:"app-size-32 avatar-name"},[t._v(t._s(t.shopInfo.shopName))]),e("el-tag",{attrs:{size:"mini"}},[t._v("黄金商家")])],1)]),e("div",{staticClass:"assets-list-wrap flex-center"},t._l(t.userData,(function(s,i){return e("div",{key:i,staticClass:"list"},[e("div",{staticClass:"assets-list-value"},[t._v(t._s(s.value))]),e("div",[t._v(t._s(s.name))])])})),0)]),e("div",{staticClass:"app-content-bottom"},[e("x-crud",{staticClass:"liu-crud-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function({scope:s}){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.handleClick},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:`${t.text}(${t.val})`,name:t.key}})})),1)]}},{key:"table-column-name",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.name)+" ")])]}},{key:"table-column-logo",fn:function({scope:t}){return[e("div",[e("el-avatar",{attrs:{size:"small",src:t.row.userAvatar}})],1)]}},{key:"table-column-address",fn:function({scope:s}){return[e("span",[t._v(" "+t._s(s.row.province+s.row.city+s.row.dist+s.row.address+s.row.floor)+" ")])]}},{key:"table-column-addTime",fn:function({scope:s}){return[e("span",[t._v(t._s(t._f("formatTime")(s.row.addTime)))])]}},{key:"table-column-status",fn:function({scope:s}){return[4==s.row.status?e("span",[e("i",{staticClass:"iconfont icondagou"})]):e("span",[t._v(t._s(t._f("constantfilter")(s.row.status,"PROXY_STATUS")))])]}}])})],1)])},a=[],r=s("5880"),o={name:"list-ad",components:{},data(){return{app:null,userData:[{name:"邀请",value:0},{name:"付费",value:0},{name:"累计收益",value:0}],tabIndex:"-1",tabsData:[{text:"全部",key:"-1",val:0},{text:"待审核",key:"0",val:0},{text:"试用中",key:"1",val:0},{text:"已购买",key:"3",val:0}]}},computed:{...Object(r["mapGetters"])(["shopInfo","userInfo"])},mounted(){console.log(123456789),console.log(this.shopInfo),this._getDet()},methods:{_getDet(){this.$service.single.assetDet().then(t=>{if(this.$util.isEmpty(t))return!1;this.data=t,this.userData[0].value=0,this.userData[1].value=0,this.userData[2].value=0})},handleClick(t,e){this.app.refresh({status:this.tabIndex})},onLoad({ctx:t,app:e}){this.app=e;let s=()=>this.$service.single.applyList({status:this.tabIndex});t.service({page:s}).set("table",{columns:[{prop:"id",label:"ID",align:"center"},{prop:"logo",label:"图片",align:"center","min-width":100},{prop:"name",label:"花店名称",align:"center","min-width":100},{prop:"userName",label:"管理员",align:"center"},{prop:"mobile",label:"手机号",align:"center"},{prop:"address",label:"地址",align:"center","min-width":240},{prop:"addTime",label:"申请时间",align:"center"},{prop:"fee",label:"付款金额",align:"center"},{prop:"income",label:"收益",align:"center"},{prop:"status",label:"状态",align:"center"}],op:{visible:!1,props:{width:160,align:"center",fixed:"right",label:"操作"},layout:[]}}).set("layout",[["slot-tabs"],["flex1","slot-add-ad-btn","refresh-btn"],["data-table"],["flex1","pagination"]]).done(),e.refresh({status:this.tabIndex})}}},n=o,l=(s("0cf2"),s("1805")),c=Object(l["a"])(n,i,a,!1,null,"654bfbf0",null);e["default"]=c.exports},fe3d:function(t,e,s){},fe67:function(t,e,s){"use strict";s("233c")},feb6:function(t,e,s){"use strict";s("21fd")},fecf:function(t,e,s){"use strict";s.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("x-crud",{staticClass:"liu-crud-wrap order-list-wrap",on:{load:t.onLoad},scopedSlots:t._u([{key:"slot-tabs",fn:function(){return[e("el-tabs",{staticClass:"liu-tabs",attrs:{type:"border-card"},on:{"tab-click":t.changeTab},model:{value:t.tabIndex,callback:function(e){t.tabIndex=e},expression:"tabIndex"}},t._l(t.tabsData,(function(t,s){return e("el-tab-pane",{key:s,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-orderSn",fn:function({scope:s}){return[e("el-link",{staticStyle:{"font-size":"12px",display:"inline-block"},attrs:{underline:!0}},[t._v(t._s(s.row.orderSn))])]}},{key:"table-column-seatSn",fn:function({scope:s}){return[""!=s.row.seatSn?e("span",{staticStyle:{"font-size":"14px",cursor:"pointer"},on:{click:function(e){return t.changeSeatSn(s.row)}}},[t._v(" "+t._s(s.row.seatSn)+" ")]):e("span",{on:{click:function(e){return t.changeSeatSn(s.row)}}},[e("i",{staticClass:"el-icon-edit",staticStyle:{"font-size":"15px",cursor:"pointer"}})])]}},{key:"table-column-customName",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.customName)+" ")])]}},{key:"table-column-printNum",fn:function({scope:s}){return[s.row.printNum>0?e("span",[t._v(" "+t._s(s.row.printNum)+" ")]):e("span",{staticStyle:{color:"blue","font-size":"16px"}},[t._v(" "+t._s(s.row.printNum)+" ")])]}},{key:"table-column-itemNum",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.itemNum?parseFloat(s.row.itemNum):0)+" ")])]}},{key:"table-column-itemList",fn:function({scope:s}){return[t._l(s.row.itemList,(function(s,i){return[i<2?e("div",[t._v(t._s(s.name))]):t._e()]})),s.row.itemList.length>2?e("el-tooltip",{attrs:{placement:"top"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._l(s.row.itemList,(function(s,i){return[e("div",[t._v(t._s(s.name))])]}))],2),e("div",{staticStyle:{color:"blue"}},[t._v("更多")])]):t._e()]}},{key:"table-column-addTime",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.addTime?s.row.addTime.substr(5,11):"")+" ")])]}},{key:"table-column-entryTime",fn:function({scope:s}){return[e("div",[t._v(" "+t._s(s.row.entryTime?s.row.entryTime.substr(5,11):"")+" ")])]}},{key:"table-column-status",fn:function({scope:s}){return[2==s.row.status?e("span",[t._v("待发货")]):3==s.row.status?e("span",{staticStyle:{color:"blue","font-weight":"bold","font-size":"14px"}},[t._v("待入库")]):4==s.row.status?e("span",[t._v("已入库")]):5==s.row.status?e("span",[t._v("已取消")]):e("span",[t._v("待付款")])]}},{key:"slot-column-option",fn:function({scope:s}){return[5==s.row.status||1==s.row.status?e("el-button",{attrs:{size:"small"},on:{click:function(e){return e.stopPropagation(),t.detailShowFn(s.row)}}},[t._v("详情")]):e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(e){return e.stopPropagation(),t.detailShowFn(s.row)}}},[t._v("详情")]),5==s.row.status?e("el-button",{attrs:{size:"small"}},[t._v("改价入库")]):4==s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changePrice(s.row)}}},[t._v("修改售价")]):e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changePrice(s.row)}}},[t._v("改价入库")]),4==s.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goRefund(s.row)}}},[t._v("发起售后")]):e("el-button",{attrs:{size:"small"}},[t._v("发起售后")]),5==s.row.status||1==s.row.status?e("el-button",{attrs:{size:"small"}},[t._v("打多联("+t._s(s.row.printNum)+")")]):e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printPaper(s.row)}}},[t._v("打多联("+t._s(s.row.printNum)+")")]),5==s.row.status||1==s.row.status?e("el-button",{attrs:{size:"small"}},[t._v("打小票("+t._s(s.row.printNum)+")")]):e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printOrder(s.row)}}},[t._v("打小票("+t._s(s.row.printNum)+")")]),e("el-dropdown",{staticStyle:{"margin-left":"10px"},on:{command:function(e){return t.doMore(e,s.row)}}},[5==s.row.status||1==s.row.status?e("el-button",{attrs:{size:"small"}},[t._v("更多"),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]):e("el-button",{attrs:{type:"primary",size:"small"}},[t._v("更多"),e("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),e("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("el-dropdown-item",{attrs:{command:"refundShowRecord"}},[t._v("售后记录")]),e("el-dropdown-item",{attrs:{command:"downExcel"}},[t._v("下载excel")]),e("el-dropdown-item",{attrs:{command:"cancelCurrentOrder"}},[t._v("取消")])],1)],1)]}},{key:"slot-new-cg",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"50px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.newCg()}}},[t._v("新增采购")])]},proxy:!0},{key:"slot-export-order",fn:function(){return[e("el-button",{staticStyle:{"margin-left":"60px"},attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.exportData()}}},[t._v("导出数据")])]},proxy:!0},{key:"slot-search-option",fn:function({scope:s}){return[e("el-input",{ref:"itemSearchRef",staticStyle:{width:"220px"},attrs:{placeholder:"核销码 / 供货商名 / 手机号",size:"medium",clearable:!0},on:{input:function(e){return t.changeSearch()},focus:function(e){t.search=""}},model:{value:t.searchContent,callback:function(e){t.searchContent=e},expression:"searchContent"}}),e("el-select",{staticStyle:{width:"110px","margin-left":"10px"},attrs:{size:"medium",placeholder:"采购人",clearable:!0},on:{change:t.getCgStaff},model:{value:t.currentCgStaffName,callback:function(e){t.currentCgStaffName=e},expression:"currentCgStaffName"}},t._l(t.staffList,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1),e("span",{staticStyle:{"font-size":"22px","margin-left":"20px"}},[t._v("入库时间:")]),e("el-date-picker",{attrs:{type:"daterange",align:"right","unlink-panels":"","range-separator":"至","start-placeholder":"开始日期","value-format":"yyyy-MM-dd","end-placeholder":"结束日期","picker-options":t.pickerOptions,size:"medium"},on:{change:t.getSearchDate},model:{value:t.currentDateList,callback:function(e){t.currentDateList=e},expression:"currentDateList"}})]}}])}),e("order-detail",{ref:"orderDetail",attrs:{orderOperate:t.optionData}}),e("begin-refund",{ref:"beginRefundRef",attrs:{currentRefundData:t.currentRefundData}}),e("refund-record",{ref:"refundRecordRef",attrs:{currentData:t.refundRecordData}})],1)},a=[],r=(s("b138"),s("209c"),s("1635")),o=s("e697"),n=s("fd9d"),l=s("54a1"),c={components:{OrderDetail:r["default"],beginRefund:o["default"],refundRecord:n["default"]},data(){return{app:null,tabIndex:"0",tabsData:[{text:"全部",key:"0",val:0},{text:"待入库",key:"3",val:0},{text:"已入库",key:"4",val:0},{text:"已取消",key:"5",val:0}],optionData:{},currentRefundData:{},refundRecordData:{},orderData:"",addPop:!1,location:0,searchContent:"",startTime:"",endTime:"",searchTime:"",name:"",currentDateList:[],staffList:[],currentCgStaffName:"",currentCgStaffId:0,pickerOptions:{shortcuts:[{text:"最近一周",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-6048e5),t.$emit("pick",[s,e])}},{text:"最近一个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-2592e6),t.$emit("pick",[s,e])}},{text:"最近三个月",onClick(t){const e=new Date,s=new Date;s.setTime(s.getTime()-7776e6),t.$emit("pick",[s,e])}}]}}},created(){this.init()},mounted(){let t=this;document.onkeydown=function(e){if(e&&","==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/order/add",query:e})}if(e&&"."==e.key&&e.ctrlKey){let e={};t.$router.push({path:"/in/add",query:e})}},this.$nextTick(()=>{this.$refs.itemSearchRef.focus()}),t.$service.shopAdmin.getAllStaff().then(e=>{t.staffList=e.list})},methods:{doMore(t,e){"cancelCurrentOrder"==t&&this.cancelOrder(e),"refundShowRecord"==t&&(this.refundRecordData=e,setTimeout(()=>{this.$refs.refundRecordRef.init()})),"downExcel"==t&&this.$service.purchaseOrderItem.getDownExcel({id:e.id}).then(t=>{t.file&&(window.location.href=t.file)})},goRefund(t){this.currentRefundData=t,setTimeout(()=>{this.$refs.beginRefundRef.init()})},getCgStaff(t){this.currentCgStaffId=t,this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})},changeSearch(){let t=this;null!=this.T&&clearTimeout(this.T),this.T=setTimeout((function(){t.app.refresh({status:t.tabIndex,searchTime:t.searchTime,startTime:t.startTime,endTime:t.endTime,search:t.searchContent,cgStaffId:t.currentCgStaffId})}),650)},exportData(){this.$service.purchaseOrder.getOrderList({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,export:1,pageSize:9999999}).then(t=>{t.file&&(window.location.href=t.file)})},changeSeatSn(t){this.$prompt("请输入货位号","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(({value:e})=>{this.$service.purchaseOrder.modifySeatSn({seatSn:e,id:t.id}).then(t=>{this.$notify({title:"成功",message:"操作成功",type:"success"}),this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})})})},confirmAdd(){},addGhs(){let t={};this.$router.push({path:"/in/add",query:t})},billing(){let t={};this.$router.push({path:"/order/add",query:t})},newCg(){let t={};this.$router.push({path:"/in/add",query:t})},todays(t){var e=new Date;let s="";if(1==t)s=e.getFullYear()+"-"+parseInt(e.getMonth()+1)+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();else if("time"==t)s=e.getHours()+":"+e.getMinutes();else{let t=e.getDate()>9?e.getDate():"0"+e.getDate(),i=parseInt(e.getMonth()+1)>9?parseInt(e.getMonth()+1):"0"+parseInt(e.getMonth()+1);s=e.getFullYear()+"-"+i+"-"+t}return s},formatProgress(){return""},init(){this.$store.dispatch("getUsage")},selfGetCancel(t){this.$refs["popover-"+t][1].doClose()},changePrice(t){let e={};e.orderSn=t.orderSn,e.id=t.id,e.backType="list",this.$router.push({path:"/in/change",query:e})},printPaper(t){t.printNum>=1?this.$confirm("已打过,确认要补打?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.toPrint(t)}):this.toPrint(t)},toPrint(t){this.$service.purchaseOrder.printPaper({id:t.id}).then(e=>{let s=e.printData?e.printData:"",i=e.template?e.template:"",a=JSON.parse(i);var r=new l["hiprint"].PrintTemplate({template:a});r.print(s),t.printNum++})},printOrder(t){t.printNum>=1?this.$confirm("已打过,确认要补打?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.purchaseOrder.printBill({id:t.id}).then(e=>{t.printNum++,this.$notify({title:"已打印",message:"操作成功",type:"success"})})}):this.$service.purchaseOrder.printBill({id:t.id}).then(e=>{t.printNum++,this.$notify({title:"已打印",message:"操作成功",type:"success"})})},cancelOrder(t){this.$confirm("确认取消?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.$service.purchaseOrder.cancelOrder({id:t.id}).then(t=>{this.$notify({title:"已取消",message:"操作成功",type:"success"}),this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})})})},detailShowFn(t){this.optionData=t,setTimeout(()=>{this.$refs.orderDetail.init()})},changeTab(t,e){this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})},getSearchDate(){this.$util.isEmpty(this.currentDateList)?(this.searchTime="",this.startTime="",this.endTime=""):(this.searchTime="custom",this.startTime=this.currentDateList[0],this.endTime=this.currentDateList[1]),this.app.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})},onLoad({ctx:t,app:e}){this.app=e,this.$route.query.status&&(this.tabIndex=this.$route.query.status),this.$route.query.ghsName&&(this.searchContent=this.$route.query.ghsName),this.$route.query.searchTime&&(this.searchTime=this.$route.query.searchTime),this.$route.query.startTime&&(this.startTime=this.$route.query.startTime),this.$route.query.endTime&&(this.endTime=this.$route.query.endTime),this.$route.query.currentCgStaffId&&(this.currentCgStaffId=this.$route.query.currentCgStaffId),this.$route.query.currentCgStaffName&&(this.currentCgStaffName=this.$route.query.currentCgStaffName),t.service(this.$service.purchaseOrder).set("table",{columns:[{prop:"orderSn",label:"单号",align:"center",width:"120"},{prop:"supplierName",label:"供货商",align:"center",width:"130"},{prop:"checkCode",label:"核销码",align:"center",width:"60"},{prop:"printNum",label:"打印",align:"center",width:50},{prop:"cgStaffName",label:"采购人",align:"center",width:80,emptyText:"-"},{prop:"status",label:"状态",align:"center",width:90},{prop:"itemList",label:"花材",align:"center",width:160},{prop:"itemNum",label:"数量",align:"center",width:"60"},{prop:"seatSn",label:"货位",align:"center",width:"70"},{prop:"prePrice",label:"总金额",align:"center",width:"80"},{prop:"tkPrice",label:"退款金额",align:"center",width:"80"},{prop:"actPrice",label:"实际金额",align:"center",width:"80"},{prop:"adminName",label:"录单人",align:"center",width:80,emptyText:"-"},{prop:"entryTime",label:"入库时间",align:"center",width:120},{prop:"addTime",label:"创建时间",align:"center",width:120}],on:{"row-click":(t,e)=>{"orderSn"==e.property&&this.detailShowFn(t)}},props:{"default-sort":{prop:"addTime",order:"descending"}},op:{visible:!0,props:{width:560,align:"center",fixed:"right",label:"操作"},layout:["slot-column-option"]}}).set("layout",[["slot-tabs"],["slot-search-option","slot-new-cg","flex1","slot-export-order"],["data-table"],["flex1","pagination"]]).on("refresh",async(t,{next:e})=>{await e(t)}).done(),e.refresh({status:this.tabIndex,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,search:this.searchContent,cgStaffId:this.currentCgStaffId})}}},u=c,d=(s("276c"),s("1805")),m=Object(d["a"])(u,i,a,!1,null,null,null);e["default"]=m.exports},ff37:function(t,e,s){"use strict";s("fb6b")},ff4a:function(t,e,s){},fff2:function(t,e,s){"use strict";s("23b5")}}]);
|