| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4b42e7f4"],{"29af":function(t,e,r){},"662e":function(t,e,r){},6901:function(t,e,r){"use strict";r.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(r){return[e("el-input",{staticStyle:{width:"80px"},attrs:{placeholder:"数量"},on:{focus:function(t){r.row.num=""}},model:{value:r.row.num,callback:function(e){t.$set(r.row,"num",e)},expression:"scope.row.num"}})]}}])}),e("el-table-column",{attrs:{label:"单价"},scopedSlots:t._u([{key:"default",fn:function(r){return[e("el-input",{staticStyle:{width:"90px"},attrs:{placeholder:"单价"},on:{focus:function(t){r.row.unitPrice=""}},model:{value:r.row.unitPrice,callback:function(e){t.$set(r.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(r){return[e("el-popconfirm",{attrs:{title:"确认删除?"},on:{confirm:function(e){return t.confirmDel(r.row)},onConfirm:function(e){return t.confirmDel(r.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=[],o={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=o,a=(r("77af"),r("b8ce"),r("1805")),l=Object(a["a"])(n,i,s,!1,null,"31ef03ce",null);e["default"]=l.exports},"77af":function(t,e,r){"use strict";r("29af")},b8ce:function(t,e,r){"use strict";r("662e")}}]);
|