333
schangxiang@126.com
2025-09-19 18966e02fb573c7e2bb0c6426ed792b38b910940
1
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6b33"],{"2U8M":function(e,t,o){"use strict";var n=o("9YFz");o.n(n).a},"9YFz":function(e,t,o){},DNkW:function(e,t,o){var n=o("93I4"),i=Math.floor;e.exports=function(e){return!n(e)&&isFinite(e)&&i(e)===e}},"GW1+":function(e,t,o){"use strict";var n=o("mxV5"),i=o.n(n);t.a=function(e){return new i.a(e)}},d75R:function(e,t,o){"use strict";o.r(t);var n=o("QpdM"),i=o("90mL"),a=o("E9g8"),r=o("dWSf"),s={name:"sys-product-type",components:{splitPane:n.a,yrtDataList:i.a,yrtEditor:a.a},mixins:[r.a],data:function(){return{filterText:"",hasDataTree:!1,treeNodeOverId:0,props:{label:"label",children:"children",isLeaf:"isLeaf"},isTreeLoaded:!1}},watch:{filterText:function(e){this.$refs.tree.filter(e)}},created:function(){},methods:{loadTreeNode:function(e,t){var o=this,n=this;n.$nextTick(function(){var i=o.common.getUserInfo(),a={openNodeApi:!0,folder:"basicInfo/base",DBServer:"Sys",tableName:"Base_ProductType",tableView:"Base_ProductType",keyName:"type_Id",nodeName:"typeName",fixHasChild:!1,isBreakWay:!1,displayBreakWay:!1,parentName:"parentId",orderBy:"orderNo desc, type_Id",where:0===e.level?{parentId:0,userProduct_Id:i.userProduct_Id}:{parentId:e.data.type_Id,userProduct_Id:i.userProduct_Id},extendColumns:""};n.common.ajax("/api/common/loadTreeNode",a,function(i){i.result?(i.data.forEach(function(e){e.isLeaf=!e.hasChild}),t(i.data),0===e.level&&(o.hasDataTree=i.data.length>0)):n.$message.error(i.msg)},!0)})},filterTreeNode:function(e,t){return!e||-1!==t.label.indexOf(e)},nodeClick:function(e,t,o){var n={type_Id:{operator:"raw",value:"type_Id in(Select type_Id from dbo.[GetTypeTree]("+e.type_Id+"))"}};this.dataList.reloadData(n)},treeRefresh:function(){this.filterText="";for(var e=this.$refs.tree.store.root;e.childNodes.length;)this.$refs.tree.remove(e.childNodes[0]);this.loadTreeNode(e,function(t){e.doCreateChildren(t)}),this.isTreeLoaded=!1},treeNodeAppend:function(e,t){this.editor.addData()},treeNodeEdit:function(e,t){this.editor.editData(t.type_Id)},treeNodeRemove:function(e,t){this.dataList.delete([t])},treeNodeOver:function(e,t){this.treeNodeOverId=t.value},treeNodeOut:function(e,t){this.treeNodeOverId=-1},onFocus:function(e,t,o,n){n.options.isLoaded||"fullType_Id"!==n.options.prop||(n.options.isLoaded=this.isTreeLoaded,this.cascaderLoadNode(e,0,n),this.isTreeLoaded=!0)},onChange:function(e,t,o){if("fullType_Id"===o.options.prop){var n=this.editor;n.formData.parentId=t[t.length-1],setTimeout(function(){n.formData.fullTypeName=e.inputValue},500)}},cascaderLoadNode:function(e,t,o){var n=this,i={openNodeApi:!0,folder:"basicInfo/base",DBServer:"Sys",tableName:"Base_ProductType",tableView:"Base_ProductType",keyName:"type_Id",nodeName:"typeName",fixHasChild:!1,isBreakWay:!1,displayBreakWay:!1,parentName:"parentId",orderBy:"orderNo desc, type_Id",where:{parentId:0,userProduct_Id:this.common.getUserInfo().userProduct_Id},extendColumns:""};n.common.ajax("/api/common/loadTreeNodeAll",i,function(e){if(e.result){var t=[{value:0,label:"根",children:e.data}];o.options.options=t}else n.$message.error(e.msg)},!0)},onDeleteAfter:function(){this.treeRefresh()}}},d=(o("2U8M"),o("KHd+")),l=Object(d.a)(s,function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"page-list-container"},[o("split-pane",{attrs:{"max-width":500,"default-width":260,split:"vertical"}},[o("div",{staticClass:"left-container",attrs:{slot:"paneL"},slot:"paneL"},[o("el-form",{staticClass:"form-tool"},[o("el-form-item",[o("el-input",{staticClass:"search-input",attrs:{placeholder:"搜索名称","prefix-icon":"el-icon-search"},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),e._v(" "),o("el-button",{staticClass:"btn-refresh",attrs:{title:"刷新",icon:"el-icon-yrt-shuaxin"},nativeOn:{click:function(t){return e.treeRefresh(t)}}})],1),e._v(" "),o("el-form-item",{staticClass:"align-center"},[o("el-tree",{ref:"tree",attrs:{load:function(t,o){e.loadTreeNode(t,o)},"expand-on-click-node":!1,"filter-node-method":e.filterTreeNode,props:e.props,"default-expand-all":!1,"node-key":"treeKey","highlight-current":"",lazy:""},on:{"node-click":e.nodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.node,i=t.data;return o("span",{staticClass:"custom-tree-node",on:{mouseover:function(){return e.treeNodeOver(n,i)},mouseout:function(){return e.treeNodeOut(n,i)}}},[o("span",[i.hasChild?o("i",{staticClass:"el-icon-menu"}):o("i",{staticClass:"el-icon-tickets"}),e._v("\n                "+e._s(n.label)+"\n              ")]),e._v(" "),o("span",{directives:[{name:"show",rawName:"v-show",value:i.value==e.treeNodeOverId,expression:"data.value==treeNodeOverId"}]},[o("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(){return e.treeNodeAppend(n,i)}}},[o("i",{staticClass:"el-icon-circle-plus-outline"})]),e._v(" "),o("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(){return e.treeNodeEdit(n,i)}}},[o("i",{staticClass:"el-icon-edit-outline"})]),e._v(" "),o("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(){return e.treeNodeRemove(n,i)}}},[o("i",{staticClass:"el-icon-delete"})])],1)])}}])}),e._v(" "),e.hasDataTree?e._e():o("el-button",{attrs:{type:"text"},on:{click:e.treeNodeAppend}},[e._v("添加类别")])],1)],1)],1),e._v(" "),o("div",{staticClass:"right-container",attrs:{slot:"paneR"},slot:"paneR"},[o("yrt-data-list",{ref:e.dataListRef,attrs:{"editor-ref":e.editorRef,"data-options":e.dataOptions,fields:e.dataListOptions.fields,buttons:e.dataListOptions.buttons,"button-click":e.buttonClick,"data-list-selections":e.dataListSelections,"auth-nodes":e.authNodes},on:{"update:fields":function(t){return e.$set(e.dataListOptions,"fields",t)},"update:dataListSelections":function(t){e.dataListSelections=t},"update:data-list-selections":function(t){e.dataListSelections=t},"on-delete-after":e.onDeleteAfter}}),e._v(" "),o("yrt-editor",e._b({ref:e.editorRef,attrs:{"data-list-ref":e.dataListRef,"data-options":e.dataOptions,action:e.editorOptions.action,top:e.editorOptions.top,visible:e.editorOptions.config.visible,"auth-nodes":e.authNodes},on:{"update:action":function(t){return e.$set(e.editorOptions,"action",t)},"update:top":function(t){return e.$set(e.editorOptions,"top",t)},"update:visible":function(t){return e.$set(e.editorOptions.config,"visible",t)},"on-focus":e.onFocus,"on-change":e.onChange,"on-save-after":e.treeRefresh}},"yrt-editor",e.editorOptions,!1))],1)])],1)},[],!1,null,"384f60f4",null);l.options.__file="type.vue";t.default=l.exports},h5AQ:function(e,t,o){o("hRZT"),e.exports=o("WEpk").Number.isInteger},hRZT:function(e,t,o){var n=o("Y7ZC");n(n.S,"Number",{isInteger:o("DNkW")})},ql3t:function(e,t,o){e.exports={default:o("h5AQ"),__esModule:!0}},yaWU:function(e,t,o){"use strict";o.d(t,"a",function(){return n});var n={bind:function(e,t,o){e.children[2].onscroll=function(t){var o=e.children[3];o&&o.classList.contains("el-table__footer-wrapper")&&(o.scrollLeft=t.target.scrollLeft)}},update:function(e,t,o){}}}}]);