| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59ad02bd"],{a954:function(t,e,s){"use strict";s("f6b5")},f08f:function(t,e,s){"use strict";s.r(e);s("adc1");var n=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(s){var n=s.scope;return[e("div",[2==n.row.select?e("el-checkbox",{attrs:{disabled:"",label:n.row}},[t._v(t._s(n.row.id))]):e("el-checkbox",{attrs:{label:n.row},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}}},[t._v(t._s(n.row.id))])],1)]}},{key:"table-column-select",fn:function(s){var n=s.scope;return[2==n.row.select?e("span",[t._v("✔")]):e("span")]}},{key:"table-column-stockWarning",fn:function(s){var n=s.scope;return[e("el-input",{attrs:{placeholder:"库存预警值",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}},model:{value:n.row.stockWarning,callback:function(e){t.$set(n.row,"stockWarning",e)},expression:"scope.row.stockWarning"}})]}},{key:"table-column-cost",fn:function(s){var n=s.scope;return[e("el-input",{attrs:{placeholder:"成本价",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}},model:{value:n.row.cost,callback:function(e){t.$set(n.row,"cost",e)},expression:"scope.row.cost"}})]}},{key:"table-column-addPrice",fn:function(s){var n=s.scope;return[e("el-input",{attrs:{placeholder:"加价",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.stop.apply(null,arguments)}},model:{value:n.row.addPrice,callback:function(e){t.$set(n.row,"addPrice",e)},expression:"scope.row.addPrice"}})]}},{key:"table-column-cover",fn:function(s){var n=s.scope;return[e("div",[e("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:t._f("default_avatar")(n.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,n){return e("el-option",{key:n,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=[],l=s("b57b"),i=s("8998"),o=s("fc23"),c=(s("10dc"),s("a983"),s("d6d8"),s("7464"),s("45d2"),s("9052"),s("00cb"),s("dc93"),{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:function(){return{selDialog:!1,ruleForm:{},checkList:[],list:[],itemClassList:[],sonClassId:0,sonClassName:""}},computed:{},watch:{show:function(){this.selDialog=this.show}},created:function(){},methods:{stop:function(){},selClassFn:function(t){var e=this.itemClassList.findIndex((function(e){return e.name==t}));this.sonClassId=this.itemClassList[e].id},getAllClass:function(){var t=this;if(!this.$util.isEmpty(this.itemClassList))return this.itemClassList;this.$service.itemClass.getAllClass().then((function(e){t.itemClassList=e.list}))},confirmFn:function(){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:function(){this.$emit("cancel")},selectItem:function(t){if(console.log(t),2==t.select)return!1;var e=this.checkList.findIndex((function(e){return e.id==t.id}));-1===e?this.checkList=[t].concat(Object(o["a"])(this.checkList)):this.checkList.splice(e,1)},onLoad:function(t){var e=this,s=t.ctx,n=t.app;this.sonClassId=this.classId,this.sonClassName=this.className,this.getAllClass(),this.app=n,s.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":function(t,s){e.selectItem(t)}},op:{visible:!1}}).set("dict",{search:{keyWord:"name"}}).set("search",{key:{placeholder:"花材名称,支持拼音首字母搜索"}}).set("layout",[["slot-tabs"],["search-key","flex1","refresh-btn"],["data-table"],["flex1","pagination"]]).on("refresh",function(){var t=Object(i["a"])(Object(l["a"])().m((function t(s,n){var a,i,o,c;return Object(l["a"])().w((function(t){while(1)switch(t.n){case 0:return a=n.next,i=n.render,t.n=1,a(s);case 1:o=t.v,c=o.list,c.map((function(t,e){t.index=e})),e.list=c,i(c);case 2:return t.a(2)}}),t)})));return function(e,s){return t.apply(this,arguments)}}()).done(),n.refresh({type:this.tabIndex})}}}),r=c,u=(s("a954"),s("1805")),p=Object(u["a"])(r,n,a,!1,null,null,null);e["default"]=p.exports},f6b5:function(t,e,s){}}]);
|