chunk-40af8a95.3e42d783.js 5.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-40af8a95"],{2531:function(e,s,t){},be60:function(e,s,t){"use strict";t("2531")},f08f:function(e,s,t){"use strict";t.r(s);var l=function(){var e=this,s=e._self._c;return s("el-dialog",{attrs:{title:"选择花材",visible:e.selDialog,"close-on-click-modal":!1,"append-to-body":!0,width:"950px"},on:{"update:visible":function(s){e.selDialog=s},close:function(s){return e.$emit("update:show",!1)}}},[s("div",{staticClass:"recharge-modal-content"},[s("el-checkbox-group",{staticClass:"radio-wrap",model:{value:e.checkList,callback:function(s){e.checkList=s},expression:"checkList"}},[s("x-crud",{staticClass:"liu-crud-wrap",on:{load:e.onLoad},scopedSlots:e._u([{key:"table-column-radio",fn:function({scope:t}){return[s("div",[2==t.row.select?s("el-checkbox",{attrs:{disabled:"",label:t.row}},[e._v(e._s(t.row.id))]):s("el-checkbox",{attrs:{label:t.row},nativeOn:{click:function(s){return s.stopPropagation(),e.stop.apply(null,arguments)}}},[e._v(e._s(t.row.id))])],1)]}},{key:"table-column-select",fn:function({scope:t}){return[2==t.row.select?s("span",[e._v("✔")]):s("span")]}},{key:"table-column-stockWarning",fn:function({scope:t}){return[s("el-input",{attrs:{placeholder:"库存预警值",size:"small"},nativeOn:{click:function(s){return s.stopPropagation(),e.stop.apply(null,arguments)}},model:{value:t.row.stockWarning,callback:function(s){e.$set(t.row,"stockWarning",s)},expression:"scope.row.stockWarning"}})]}},{key:"table-column-cost",fn:function({scope:t}){return[s("el-input",{attrs:{placeholder:"成本价",size:"small"},nativeOn:{click:function(s){return s.stopPropagation(),e.stop.apply(null,arguments)}},model:{value:t.row.cost,callback:function(s){e.$set(t.row,"cost",s)},expression:"scope.row.cost"}})]}},{key:"table-column-addPrice",fn:function({scope:t}){return[s("el-input",{attrs:{placeholder:"加价",size:"small"},nativeOn:{click:function(s){return s.stopPropagation(),e.stop.apply(null,arguments)}},model:{value:t.row.addPrice,callback:function(s){e.$set(t.row,"addPrice",s)},expression:"scope.row.addPrice"}})]}},{key:"table-column-cover",fn:function({scope:t}){return[s("div",[s("cl-avatar",{style:{margin:"auto"},attrs:{shape:"square",size:40,src:e._f("default_avatar")(t.row.cover)}})],1)]}}])})],1),s("div",[s("span",[e._v("花材分类:")]),s("el-select",{staticStyle:{width:"300px"},attrs:{size:"small",placeholder:"请选择分类"},on:{change:e.selClassFn},model:{value:e.sonClassName,callback:function(s){e.sonClassName=s},expression:"sonClassName"}},e._l(e.itemClassList,(function(t,l){return s("el-option",{key:l,attrs:{value:t.name}},[e._v(e._s(t.name))])})),1)],1)],1),s("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{size:"small"},on:{click:e.resetForm}},[e._v("取 消")]),s("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.confirmFn}},[e._v("确定")])],1)])},a=[],o=(t("45d2"),t("9052"),{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(e){this.selDialog=this.show}},created(){},methods:{stop(){},selClassFn(e){let s=this.itemClassList.findIndex(s=>s.name==e);this.sonClassId=this.itemClassList[s].id},getAllClass(){this.$service.itemClass.getAllClass({pageSize:1e3}).then(e=>{this.itemClassList=e.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(e){if(console.log(1212121121),console.log(e),2==e.select)return!1;let s=this.checkList.findIndex(s=>s.id==e.id);-1===s?this.checkList=[e,...this.checkList]:this.checkList.splice(s,1)},onLoad({ctx:e,app:s}){this.sonClassId=this.classId,this.sonClassName=this.className,this.app=s,this.getAllClass(),e.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":(e,s)=>{this.selectItem(e)}},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(e,{next:s,render:t})=>{let{list:l}=await s(e);l.map((e,s)=>{e.index=s}),this.list=l,t(l)}).done(),s.refresh()}}}),n=o,i=(t("be60"),t("1805")),c=Object(i["a"])(n,l,a,!1,null,null,null);s["default"]=c.exports}}]);