chunk-f17dfdec.99a4c15e.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f17dfdec","chunk-4b42e7f4","chunk-315f878b"],{"0869":function(t,e,i){"use strict";i("a238")},1465:function(t,e,i){"use strict";i("e0d3")},1762:function(t,e,i){"use strict";i("197a")},"197a":function(t,e,i){},"29af":function(t,e,i){},"662e":function(t,e,i){},6901:function(t,e,i){"use strict";i.r(e);var r=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(i){return[e("el-input",{staticStyle:{width:"80px"},attrs:{placeholder:"数量"},on:{focus:function(t){i.row.num=""}},model:{value:i.row.num,callback:function(e){t.$set(i.row,"num",e)},expression:"scope.row.num"}})]}}])}),e("el-table-column",{attrs:{label:"单价"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("el-input",{staticStyle:{width:"90px"},attrs:{placeholder:"单价"},on:{focus:function(t){i.row.unitPrice=""}},model:{value:i.row.unitPrice,callback:function(e){t.$set(i.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(i){return[e("el-popconfirm",{attrs:{title:"确认删除?"},on:{confirm:function(e){return t.confirmDel(i.row)},onConfirm:function(e){return t.confirmDel(i.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)},s=[],a=(i("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}}}),n=a,o=(i("77af"),i("b8ce"),i("1805")),c=Object(o["a"])(n,r,s,!1,null,"31ef03ce",null);e["default"]=c.exports},"77af":function(t,e,i){"use strict";i("29af")},a238:function(t,e,i){},b8ce:function(t,e,i){"use strict";i("662e")},c9f9:function(t,e,i){"use strict";i.r(e);var r=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:i}){return[e("span",{staticStyle:{"font-size":"16px"}},[t._v(t._s(i.row.name))])]}},{key:"table-column-zbPrice",fn:function({scope:i}){return[e("el-input",{attrs:{placeholder:"单价"},model:{value:i.row.zbPrice,callback:function(e){t.$set(i.row,"zbPrice",e)},expression:"scope.row.zbPrice"}})]}},{key:"table-column-zbNum",fn:function({scope:i}){return[e("el-input",{attrs:{placeholder:"数量"},model:{value:i.row.zbNum,callback:function(e){t.$set(i.row,"zbNum",e)},expression:"scope.row.zbNum"}})]}},{key:"slot-column-option",fn:function({scope:i}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.confirmAdd(i.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)},s=[],a={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 i=()=>this.$service.custom.getAllList({name:this.search});t.service({page:i}).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})}}},n=a,o=(i("0869"),i("1805")),c=Object(o["a"])(n,r,s,!1,null,"29ad0644",null);e["default"]=c.exports},d775:function(t,e,i){"use strict";i.r(e);var r=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,i){return e("el-tab-pane",{key:i,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:i}){return[1==i.row.switchOrder?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printZjA4(i.row)}}},[t._v(t._s(i.row.stock))]):e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printZjA4(i.row)}}},[Number(i.row.stock)>Number(i.row.itemNum)?e("span",[t._v(t._s(i.row.stock))]):e("span",{staticStyle:{"font-weight":"bold",color:"blue","font-size":"20px"}},[t._v(t._s(i.row.stock))])])]}},{key:"table-column-printOrder",fn:function({scope:i}){return[0==i.row.printOrder?e("span",{staticStyle:{cursor:"pointer"},on:{click:function(e){return t.printA4(i.row)}}},[t._v(" 打印 ")]):e("span",{on:{click:function(e){return t.printA4(i.row)}}},[e("i",{staticClass:"el-icon-success",staticStyle:{color:"green","font-size":"18px",cursor:"pointer"}})])]}},{key:"table-column-addTime",fn:function({scope:i}){return[e("i",{staticClass:"el-icon-remove-outline",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.changeDate(i.row,0)}}}),e("span",{staticStyle:{"margin-left":"10px","margin-right":"10px"}},[t._v(t._s(i.row.addTime))]),e("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{"font-size":"15px",cursor:"pointer"},on:{click:function(e){return t.changeDate(i.row,1)}}})]}},{key:"slot-column-option",fn:function({scope:i}){return[e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(e){return e.stopPropagation(),t.showDetail(i.row)}}},[t._v("详情")])]}},{key:"slot-search-option",fn:function({scope:i}){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)},s=[],a=(i("b138"),i("8f26"),i("963e"),i("209c"),i("6901")),n=i("c9f9"),o=i("54a1"),c={components:{LiveDetail:a["default"],LiveCustom:n["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,i=new Date;i.setTime(i.getTime()-6048e5),t.$emit("pick",[i,e])}},{text:"最近一个月",onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-2592e6),t.$emit("pick",[i,e])}},{text:"最近三个月",onClick(t){const e=new Date,i=new Date;i.setTime(i.getTime()-7776e6),t.$emit("pick",[i,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 i=e.printData?e.printData:"",r=e.template?e.template:"",s=JSON.parse(r);var a=new o["hiprint"].PrintTemplate({template:s});a.print(i),t.printOrder=1})},printZjA4(t){this.$service.liveOrder.printOrder({id:t.id}).then(e=>{let i=e.printData?e.printData:"",r=e.template?e.template:"",s=JSON.parse(r);var a=new o["hiprint"].PrintTemplate({template:s});a.print2(i),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()}}},l=c,u=(i("1762"),i("1465"),i("1805")),p=Object(u["a"])(l,r,s,!1,null,"61d5c6a6",null);e["default"]=p.exports},e0d3:function(t,e,i){}}]);