| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6b5a3656","chunk-3155ebec","chunk-7f9f69d1","chunk-18aaa8fc"],{"0771":function(t,e,i){},"078e":function(t,e,i){"use strict";i("0771")},1635:function(t,e,i){"use strict";i.r(e);var s=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(i){return[e("span",[t._v(t._s(i.row.itemNum?i.row.itemNum:0))]),Number(i.row.refundNum)>0?e("span",[t._v("(退 "+t._s(i.row.refundNum)+")")]):t._e()]}}],null,!1,2241800275)}),e("el-table-column",{attrs:{label:"合计"},scopedSlots:t._u([{key:"default",fn:function(i){return[e("span",[t._v("¥"+t._s(i.row.totalPrice))])]}}],null,!1,2024436839)}),e("el-table-column",{attrs:{label:"分配货位",width:"300"},scopedSlots:t._u([{key:"default",fn:function(i){return[Number(i.row.noSeatNum)>0?e("div",[t._v(" 无货位 "+t._s(i.row.noSeatNum)+" ")]):t._e(),t.$util.isEmpty(i.row.sendList)?t._e():e("div",{staticStyle:{"margin-bottom":"10upx","font-size":"30upx"}},t._l(i.row.sendList,(function(i,s){return e("div",{staticStyle:{"margin-bottom":"7upx"}},[t._v(" "+t._s(i.customName)+"("+t._s(i.seatSn)+") 数量 "+t._s(i.num)+" "),e("span",{staticStyle:{"margin-left":"20upx"}},[t._v(t._s(0==i.status?"待上架":1==i.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)},r=[],a={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}}},n=a,o=(i("8227"),i("21cb"),i("1805")),c=Object(o["a"])(n,s,r,!1,null,"3e9afc49",null);e["default"]=c.exports},"21cb":function(t,e,i){"use strict";i("2507")},2507:function(t,e,i){},"276c":function(t,e,i){"use strict";i("955f")},"437e":function(t,e,i){},6914:function(t,e,i){"use strict";i("f0fd")},8227:function(t,e,i){"use strict";i("f935")},"955f":function(t,e,i){},b3c3:function(t,e,i){"use strict";i("437e")},e697:function(t,e,i){"use strict";i.r(e);var s=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(i,s){return e("div",{key:s,staticClass:"list"},[e("div",{staticClass:"flex list-title"},[e("span",{staticClass:"product-name"},[t._v(t._s(i.name))]),e("span",{staticClass:"product-num"},[t._v(t._s(""+parseFloat(i.itemNum))+t._s(i.bigUnit))]),e("span",{staticClass:"product-price"},[t._v(t._s(""+parseFloat(i.bigPrice))+"元/"+t._s(i.bigUnit))])]),e("div",{staticClass:"flex list-val",staticStyle:{"font-size":"18px","font-weight":"bold"}},[e("input",{directives:[{name:"model",rawName:"v-model",value:i.refundCount,expression:"res.refundCount"}],attrs:{type:"text",placeholder:"退货数","placeholder-style":"color:#CCCCCC"},domProps:{value:i.refundCount},on:{input:function(e){e.target.composing||t.$set(i,"refundCount",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v(t._s(i.bigUnit))]),e("span",{staticStyle:{color:"green","margin-left":"20px"}},[t._v("可退"+t._s(Number(i.itemNum)-Number(i.refundNum))+t._s(i.bigUnit))])]),t.orderInfo.inBooking&&1==t.orderInfo.inBooking&&!t.$util.isEmpty(i.sendList)?e("div",{staticStyle:{border:"1px solid #6795da","font-size":"18px",margin:"8px 0 5px 0",padding:"5px 0 5px 0"}},t._l(i.sendList,(function(s,r){return e("div",{key:r,staticStyle:{padding:"5px 5px 5px 8px"}},[e("div",[t._v(t._s(s.customName)+"("+t._s(s.seatSn)+")"),e("span",{staticStyle:{"margin-left":"20px"}},[t._v("上架数 "+t._s(s.num)+t._s(i.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:s.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:s.currentRefundNum},on:{input:function(e){e.target.composing||t.$set(s,"currentRefundNum",e.target.value)}}}),e("span",{staticStyle:{"margin-left":"10px"}},[t._v("可下架"+t._s(parseFloat((Number(s.num)-Number(s.outNum)).toFixed(2)))+t._s(i.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)},r=[],a=(i("b138"),i("8f26"),i("666b"),i("963e"),i("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 i=Number(e.refundCount)*Number(e.bigPrice);i.toFixed(2),t=Number(t)+Number(i),t.toFixed(2)}return t=parseFloat(t.toFixed(2)),this.refundMoney=t,t}},methods:{confirmRefund(){let t=!1,e=[],i=null;if(this.product.forEach(s=>{let r=s.refundCount?Number(s.refundCount):0,a=s.itemNum?Number(s.itemNum):0,n=s.refundNum?Number(s.refundNum):0,o=Number(a)-Number(n);if(Number(r)>Number(o))return this.$message.error(s.name+"超过可退数量"),t=!0,!1;i=[],this.$util.isEmpty(s.sendList)||s.sendList.forEach(t=>{t.currentRefundNum&&parseFloat(t.currentRefundNum)>0&&i.push({id:t.id,refundNum:t.currentRefundNum})}),Number(s.refundCount)>0&&e.push({productId:s.productId,num:s.refundCount,unitType:0,unitName:s.bigUnit,unitPrice:s.bigPrice,sendRefund:i})}),t)return;if(this.$util.isEmpty(e)&&1==this.refundType)return void this.$message.error("请选择花材");let s={id:this.orderInfo.id,product:JSON.stringify(e),price:this.refundMoney,remark:this.remark,refundType:this.refundType};this.$service.cgRefund.createOrder(s).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}}}),n=a,o=(i("b3c3"),i("078e"),i("1805")),c=Object(o["a"])(n,s,r,!1,null,"d55e5b2a",null);e["default"]=c.exports},f0fd:function(t,e,i){},f935:function(t,e,i){},fd9d:function(t,e,i){"use strict";i.r(e);var s=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:i}){return[e("el-button",{attrs:{size:"medium",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.getDetail(i.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(i,s){return e("div",{key:s,staticClass:"list"},[e("div",{staticClass:"flex list-title"},[t._v(" "+t._s(i.name)+" ¥"+t._s(i.unitPrice?parseFloat(i.unitPrice):0)+"*"+t._s(i.num)+t._s(i.unitName)+"=¥"+t._s(parseFloat(i.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)},r=[],a={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})}}},n=a,o=(i("6914"),i("1805")),c=Object(o["a"])(n,s,r,!1,null,"e1bb879a",null);e["default"]=c.exports},fecf:function(t,e,i){"use strict";i.r(e);var s=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,i){return e("el-tab-pane",{key:i,attrs:{label:""+t.text,name:t.key}})})),1)]},proxy:!0},{key:"table-column-orderSn",fn:function({scope:i}){return[e("el-link",{staticStyle:{"font-size":"12px",display:"inline-block"},attrs:{underline:!0}},[t._v(t._s(i.row.orderSn))])]}},{key:"table-column-seatSn",fn:function({scope:i}){return[""!=i.row.seatSn?e("span",{staticStyle:{"font-size":"14px",cursor:"pointer"},on:{click:function(e){return t.changeSeatSn(i.row)}}},[t._v(" "+t._s(i.row.seatSn)+" ")]):e("span",{on:{click:function(e){return t.changeSeatSn(i.row)}}},[e("i",{staticClass:"el-icon-edit",staticStyle:{"font-size":"15px",cursor:"pointer"}})])]}},{key:"table-column-customName",fn:function({scope:i}){return[e("div",[t._v(" "+t._s(i.row.customName)+" ")])]}},{key:"table-column-printNum",fn:function({scope:i}){return[i.row.printNum>0?e("span",[t._v(" "+t._s(i.row.printNum)+" ")]):e("span",{staticStyle:{color:"blue","font-size":"16px"}},[t._v(" "+t._s(i.row.printNum)+" ")])]}},{key:"table-column-itemNum",fn:function({scope:i}){return[e("div",[t._v(" "+t._s(i.row.itemNum?parseFloat(i.row.itemNum):0)+" ")])]}},{key:"table-column-itemList",fn:function({scope:i}){return[t._l(i.row.itemList,(function(i,s){return[s<2?e("div",[t._v(t._s(i.name))]):t._e()]})),i.row.itemList.length>2?e("el-tooltip",{attrs:{placement:"top"}},[e("div",{attrs:{slot:"content"},slot:"content"},[t._l(i.row.itemList,(function(i,s){return[e("div",[t._v(t._s(i.name))])]}))],2),e("div",{staticStyle:{color:"blue"}},[t._v("更多")])]):t._e()]}},{key:"table-column-addTime",fn:function({scope:i}){return[e("div",[t._v(" "+t._s(i.row.addTime?i.row.addTime.substr(5,11):"")+" ")])]}},{key:"table-column-entryTime",fn:function({scope:i}){return[e("div",[t._v(" "+t._s(i.row.entryTime?i.row.entryTime.substr(5,11):"")+" ")])]}},{key:"table-column-status",fn:function({scope:i}){return[2==i.row.status?e("span",[t._v("待发货")]):3==i.row.status?e("span",{staticStyle:{color:"blue","font-weight":"bold","font-size":"14px"}},[t._v("待入库")]):4==i.row.status?e("span",[t._v("已入库")]):5==i.row.status?e("span",[t._v("已取消")]):e("span",[t._v("待付款")])]}},{key:"slot-column-option",fn:function({scope:i}){return[5==i.row.status||1==i.row.status?e("el-button",{attrs:{size:"small"},on:{click:function(e){return e.stopPropagation(),t.detailShowFn(i.row)}}},[t._v("详情")]):e("el-button",{attrs:{size:"small",type:"success"},on:{click:function(e){return e.stopPropagation(),t.detailShowFn(i.row)}}},[t._v("详情")]),5==i.row.status?e("el-button",{attrs:{size:"small"}},[t._v("改价入库")]):4==i.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changePrice(i.row)}}},[t._v("修改售价")]):e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.changePrice(i.row)}}},[t._v("改价入库")]),4==i.row.status?e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.goRefund(i.row)}}},[t._v("发起售后")]):e("el-button",{attrs:{size:"small"}},[t._v("发起售后")]),5==i.row.status||1==i.row.status?e("el-button",{attrs:{size:"small"}},[t._v("打多联("+t._s(i.row.printNum)+")")]):e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printPaper(i.row)}}},[t._v("打多联("+t._s(i.row.printNum)+")")]),5==i.row.status||1==i.row.status?e("el-button",{attrs:{size:"small"}},[t._v("打小票("+t._s(i.row.printNum)+")")]):e("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return e.stopPropagation(),t.printOrder(i.row)}}},[t._v("打小票("+t._s(i.row.printNum)+")")]),e("el-dropdown",{staticStyle:{"margin-left":"10px"},on:{command:function(e){return t.doMore(e,i.row)}}},[5==i.row.status||1==i.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:i}){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)},r=[],a=(i("b138"),i("209c"),i("1635")),n=i("e697"),o=i("fd9d"),c=i("54a1"),l={components:{OrderDetail:a["default"],beginRefund:n["default"],refundRecord:o["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,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])}}]}}},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 i="";if(1==t)i=e.getFullYear()+"-"+parseInt(e.getMonth()+1)+"-"+e.getDate()+" "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();else if("time"==t)i=e.getHours()+":"+e.getMinutes();else{let t=e.getDate()>9?e.getDate():"0"+e.getDate(),s=parseInt(e.getMonth()+1)>9?parseInt(e.getMonth()+1):"0"+parseInt(e.getMonth()+1);i=e.getFullYear()+"-"+s+"-"+t}return i},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 i=e.printData?e.printData:"",s=e.template?e.template:"",r=JSON.parse(s);var a=new c["hiprint"].PrintTemplate({template:r});a.print(i),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=l,d=(i("276c"),i("1805")),f=Object(d["a"])(u,s,r,!1,null,null,null);e["default"]=f.exports}}]);
|