Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-5ac43605.dfe3a73b.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
39 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ac43605"],{"078c":function(e,t,a){"use strict";a("1d28")},"1d28":function(e,t,a){},"2c53":function(e,t,a){"use strict";a("44a1")},"31fa":function(e,t,a){"use strict";a("bf6b")},"44a1":function(e,t,a){},"5be6":function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return l})),a.d(t,"d",(function(){return o})),a.d(t,"e",(function(){return s})),a.d(t,"f",(function(){return n}));var i=a("b775");function r(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainProduct.listChainProduct",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function l(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainProduct.deleteChainProduct",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function o(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainInoutOrder.saveChainInoutOrder",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function s(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainProduct.saveChainProduct",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function n(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainProduct.updateChainProduct",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}},"60f95":function(e,t,a){"use strict";a("c9f7")},"71fc":function(e,t,a){"use strict";a("b6e1")},"796a":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"bg-white padding-sm text-left"},[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.openAddChainSupplierModal}},[e._v(" 添加供应链 ")]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.openEditChainSupplierModel}},[e._v(" 修改供应链 ")]),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.openDeleteChainSupplierModel}},[e._v(" 删除供应链 ")]),t("el-button",{staticClass:"margin-left-sm",attrs:{type:"primary",size:"small"},on:{click:e.openAddChainSupplierCatalogModal}},[e._v(" 添加分类 ")]),t("el-button",{staticClass:"margin-left-sm",attrs:{type:"primary",size:"small"},on:{click:e.openEditChainSupplierCatalogModel}},[e._v(" 修改分类 ")]),t("el-button",{staticClass:"margin-left-sm",attrs:{type:"primary",size:"small"},on:{click:e.openDeleteChainSupplierCatalogModel}},[e._v(" 删除分类 ")]),t("el-button",{staticClass:"margin-left-sm",attrs:{type:"primary",size:"small"},on:{click:e.openAddProductModal}},[e._v(" 添加商品 ")])],1),t("el-row",{attrs:{gutter:20}},[t("el-col",{staticStyle:{"padding-right":"0"},attrs:{span:4}},[t("chain-supply-tree",{ref:"chainSupplyTree",on:{switchFloor:e.handleSwitchFloor,switchUnit:e.handleSwitchUnit}})],1),t("el-col",{staticClass:"margin-top-xs",attrs:{span:20}},[t("el-card",[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("chainSupplier.queryCondition")))])]),t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.chainProductInfo.conditions}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("chainProduct.inputProdName")},model:{value:e.chainProductInfo.conditions.prodName,callback:function(t){e.$set(e.chainProductInfo.conditions,"prodName",t)},expression:"chainProductInfo.conditions.prodName"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e.queryProductMethod}},[e._v(e._s(e.$t("common.query")))]),t("el-button",{on:{click:e.resetProductMethod}},[e._v(e._s(e.$t("common.reset")))])],1)],1)],1),t("el-card",{staticClass:"margin-top-xs"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("商品列表")])]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.chainProductInfo.products}},[t("el-table-column",{attrs:{prop:"productId",label:"商品ID",align:"center"}}),t("el-table-column",{attrs:{prop:"coverPhoto",label:"商品图片",align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){return[t("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{src:e.row.coverPhoto,"preview-src-list":[e.row.coverPhoto]}},[t("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[t("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:"/img/noPhoto.jpg"}})])])]}}])}),t("el-table-column",{attrs:{prop:"catalogName",label:"商品分类",align:"center"}}),t("el-table-column",{attrs:{prop:"prodName",label:"商品名称",align:"center"}}),t("el-table-column",{attrs:{prop:"unitName",label:"商品单位",align:"center"}}),t("el-table-column",{attrs:{prop:"sort",label:"排序",align:"center"}}),t("el-table-column",{attrs:{prop:"state",label:"状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("2002"==t.row.state?"已上架":"未上架")+" ")]}}])}),t("el-table-column",{attrs:{prop:"createTime",label:"创建时间",align:"center"}}),t("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:e._u([{key:"default",fn:function(a){return["1"==e.ssuType?t("el-button-group",[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.openEditProductModel(a.row)}}},[e._v("修改")]),t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.openDeleteProductModel(a.row)}}},[e._v("删除")])],1):e._e(),"2"==e.ssuType?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e.openViewProductModel(a.row)}}},[e._v("详情")]):e._e()]}}])})],1),t("div",{staticClass:"row margin-top-xs"},[t("div",{staticClass:"col-sm-7"},[t("div",[e._v("说明注释")])]),t("div",{staticClass:"col-sm-5 float-right"},[t("el-pagination",{attrs:{"current-page":e.currentPage,"page-size":e.pageSize,layout:"total, prev, pager, next",total:e.total},on:{"current-change":e.handleCurrentChange}})],1)])],1)],1)],1),t("add-chain-supplier",{ref:"addChainSupplier",on:{success:e._queryChainSupplierMethod}}),t("edit-chain-supplier",{ref:"editChainSupplier",on:{success:e._queryChainSupplierMethod}}),t("delete-chain-supplier",{ref:"deleteChainSupplier",on:{success:e._queryChainSupplierMethod}}),t("add-chain-supplier-catalog",{ref:"addChainSupplierCatalog",on:{success:e._queryChainSupplierMethod}}),t("edit-chain-supplier-catalog",{ref:"editChainSupplierCatalog",on:{success:e._queryChainSupplierMethod}}),t("delete-chain-supplier-catalog",{ref:"deleteChainSupplierCatalog",on:{success:e._queryChainSupplierMethod}}),t("delete-chain-product",{ref:"deleteChainProduct",on:{success:e.queryProductMethod}}),t("view-chain-supplier-product",{ref:"viewChainSupplierProduct"})],1)},r=[],l=a("5be6"),o=function(){var e=this,t=e._self._c;return t("el-card",{staticClass:"bg-white margin-top-xs border-radius",attrs:{header:"供应链"}},[t("el-tree",{ref:"tree",attrs:{data:e.treeData,props:e.defaultProps,"node-key":"id","expand-on-click-node":!1},on:{"node-click":e.handleNodeClick}})],1)},s=[],n=a("b775");function p(e){return new Promise((t,a)=>{Object(n["a"])({url:"/chainSupplier.listChainSupplier",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function d(e){return new Promise((t,a)=>{Object(n["a"])({url:"/chainSupplier.saveChainSupplier",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function c(e){return new Promise((t,a)=>{Object(n["a"])({url:"/chainSupplier.updateChainSupplier",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function u(e){return new Promise((t,a)=>{Object(n["a"])({url:"/chainSupplier.deleteChainSupplier",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}var h=a("7323"),m={name:"ChainSupplyTree",props:{callBackListener:{type:String,default:""}},data(){return{chainSupplyInfo:{chainSuppliers:[],csId:""},treeData:[],defaultProps:{children:"children",label:"text"}}},created(){this.listChainSuppliers()},mounted(){},methods:{listChainSuppliers(){p({page:1,row:100,shopId:Object(h["f"])()}).then(e=>{const t=e;this.chainSupplyInfo.chainSuppliers=t.data,this.initTreeData()}).catch(e=>{console.log("请求失败处理",e)})},initTreeData(){this.treeData=this.doJsTreeData(),this.$nextTick(()=>{this.chainSupplyInfo.csId?this.$refs.tree.setCurrentKey("u_"+this.chainSupplyInfo.csId):this.treeData[0]&&this.treeData[0].children[0]&&this.$refs.tree.setCurrentKey(this.treeData[0].children[0].id)})},doJsTreeData(){const e=[],t=this.chainSupplyInfo.chainSuppliers;return t.forEach(t=>{const a=e.some(e=>t.csId===e.csId);if(!a){const a={id:"f_"+t.csId,csId:t.csId,text:t.name,suType:t.suType,children:this.doJsTreeMenuData(t.catalogs,t.csId,t.suType)};e.push(a)}}),e},doJsTreeMenuData(e,t,a){return e.map(e=>({id:"u_"+e.catalogId,text:e.catalogName,catalogId:e.catalogId,catalogName:e.catalogName,csId:t,seq:e.seq,suType:a}))},handleNodeClick(e,t){console.log(t),e.id.startsWith("f_")?this.$emit("switchFloor",{suType:e.suType,csId:e.csId}):this.$emit("switchUnit",{csId:e.csId,suType:e.suType,catalogId:e.catalogId})},getChainSupplierById(e){return this.chainSupplyInfo.chainSuppliers.find(t=>t.csId===e)},getChainSupplierCatalogById(e,t){const a=this.getChainSupplierById(e);return a?a.catalogs.find(e=>e.catalogId===t):null}}},g=m,f=(a("078c"),a("2877")),C=Object(f["a"])(g,o,s,!1,null,"979f3472",null),S=C.exports,b=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("addChainSupplier.addSupplier"),visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.addChainSupplierInfo,rules:e.rules,"label-width":"150px"}},[t("el-form-item",{attrs:{label:e.$t("addChainSupplier.supplierName"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.supplierNamePlaceholder")},model:{value:e.addChainSupplierInfo.name,callback:function(t){e.$set(e.addChainSupplierInfo,"name",t)},expression:"addChainSupplierInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.appId"),prop:"appId"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.appIdPlaceholder")},model:{value:e.addChainSupplierInfo.appId,callback:function(t){e.$set(e.addChainSupplierInfo,"appId",t)},expression:"addChainSupplierInfo.appId"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.appSecure"),prop:"appSecure"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.appSecurePlaceholder")},model:{value:e.addChainSupplierInfo.appSecure,callback:function(t){e.$set(e.addChainSupplierInfo,"appSecure",t)},expression:"addChainSupplierInfo.appSecure"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.mchId"),prop:"mchId"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.mchIdPlaceholder")},model:{value:e.addChainSupplierInfo.mchId,callback:function(t){e.$set(e.addChainSupplierInfo,"mchId",t)},expression:"addChainSupplierInfo.mchId"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.mchKey"),prop:"mchKey"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.mchKeyPlaceholder")},model:{value:e.addChainSupplierInfo.mchKey,callback:function(t){e.$set(e.addChainSupplierInfo,"mchKey",t)},expression:"addChainSupplierInfo.mchKey"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.url"),prop:"url"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.urlPlaceholder")},model:{value:e.addChainSupplierInfo.url,callback:function(t){e.$set(e.addChainSupplierInfo,"url",t)},expression:"addChainSupplierInfo.url"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.beanName"),prop:"beanName"}},[t("el-input",{attrs:{placeholder:e.$t("addChainSupplier.beanNamePlaceholder")},model:{value:e.addChainSupplierInfo.beanName,callback:function(t){e.$set(e.addChainSupplierInfo,"beanName",t)},expression:"addChainSupplierInfo.beanName"}})],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.suType"),prop:"suType"}},[t("el-select",{staticStyle:{width:"100%"},model:{value:e.addChainSupplierInfo.suType,callback:function(t){e.$set(e.addChainSupplierInfo,"suType",t)},expression:"addChainSupplierInfo.suType"}},[t("el-option",{attrs:{value:1,label:e.$t("addChainSupplier.suType1")}}),t("el-option",{attrs:{value:2,label:e.$t("addChainSupplier.suType2")}})],1)],1),t("el-form-item",{attrs:{label:e.$t("addChainSupplier.remark"),prop:"remark"}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("addChainSupplier.remarkPlaceholder")},model:{value:e.addChainSupplierInfo.remark,callback:function(t){e.$set(e.addChainSupplierInfo,"remark",t)},expression:"addChainSupplierInfo.remark"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveChainSupplierInfo}},[e._v(e._s(e.$t("common.save")))])],1)],1)},I=[],$={name:"AddChainSupplier",props:{callBackListener:String,callBackFunction:String},data(){return{dialogVisible:!1,addChainSupplierInfo:{csId:"",name:"",appId:"",appSecure:"",mchId:"",mchKey:"",url:"",remark:"",beanName:"",statusCd:"0",suType:1,shopId:""},rules:{name:[{required:!0,message:this.$t("addChainSupplier.supplierNameRequired"),trigger:"blur"},{max:30,message:this.$t("addChainSupplier.supplierNameMaxLength"),trigger:"blur"}],appId:[{required:!0,message:this.$t("addChainSupplier.appIdRequired"),trigger:"blur"},{max:500,message:this.$t("addChainSupplier.appIdMaxLength"),trigger:"blur"}],appSecure:[{required:!0,message:this.$t("addChainSupplier.appSecureRequired"),trigger:"blur"},{max:500,message:this.$t("addChainSupplier.appSecureMaxLength"),trigger:"blur"}],mchId:[{required:!0,message:this.$t("addChainSupplier.mchIdRequired"),trigger:"blur"},{max:32,message:this.$t("addChainSupplier.mchIdMaxLength"),trigger:"blur"}],mchKey:[{required:!0,message:this.$t("addChainSupplier.mchKeyRequired"),trigger:"blur"},{max:128,message:this.$t("addChainSupplier.mchKeyMaxLength"),trigger:"blur"}],url:[{required:!0,message:this.$t("addChainSupplier.urlRequired"),trigger:"blur"},{max:128,message:this.$t("addChainSupplier.urlMaxLength"),trigger:"blur"}],beanName:[{required:!0,message:this.$t("addChainSupplier.beanNameRequired"),trigger:"blur"},{max:50,message:this.$t("addChainSupplier.beanNameMaxLength"),trigger:"blur"}]}}},methods:{open(){this.dialogVisible=!0,this.resetForm()},resetForm(){this.addChainSupplierInfo={csId:"",name:"",appId:"",appSecure:"",mchId:"",mchKey:"",url:"",remark:"",beanName:"",statusCd:"0",suType:1,shopId:Object(h["f"])()},this.$nextTick(()=>{this.$refs.form&&this.$refs.form.clearValidate()})},async saveChainSupplierInfo(){this.$refs.form.validate(async e=>{if(e)try{const{code:e,msg:t}=await d(this.addChainSupplierInfo);0==e?(this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(t)}catch(t){this.$message.error(t.message||t)}})},handleClose(){this.$refs.form.resetFields()}}},y=$,P=(a("2c53"),Object(f["a"])(y,b,I,!1,null,"04da566e",null)),v=P.exports,x=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("editChainSupplier.editSupplier"),visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.editChainSupplierInfo,rules:e.rules,"label-width":"150px"}},[t("el-form-item",{attrs:{label:e.$t("editChainSupplier.supplierName"),prop:"name"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.supplierNamePlaceholder")},model:{value:e.editChainSupplierInfo.name,callback:function(t){e.$set(e.editChainSupplierInfo,"name",t)},expression:"editChainSupplierInfo.name"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.appId"),prop:"appId"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.appIdPlaceholder")},model:{value:e.editChainSupplierInfo.appId,callback:function(t){e.$set(e.editChainSupplierInfo,"appId",t)},expression:"editChainSupplierInfo.appId"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.appSecure"),prop:"appSecure"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.appSecurePlaceholder")},model:{value:e.editChainSupplierInfo.appSecure,callback:function(t){e.$set(e.editChainSupplierInfo,"appSecure",t)},expression:"editChainSupplierInfo.appSecure"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.mchId"),prop:"mchId"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.mchIdPlaceholder")},model:{value:e.editChainSupplierInfo.mchId,callback:function(t){e.$set(e.editChainSupplierInfo,"mchId",t)},expression:"editChainSupplierInfo.mchId"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.mchKey"),prop:"mchKey"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.mchKeyPlaceholder")},model:{value:e.editChainSupplierInfo.mchKey,callback:function(t){e.$set(e.editChainSupplierInfo,"mchKey",t)},expression:"editChainSupplierInfo.mchKey"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.url"),prop:"url"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.urlPlaceholder")},model:{value:e.editChainSupplierInfo.url,callback:function(t){e.$set(e.editChainSupplierInfo,"url",t)},expression:"editChainSupplierInfo.url"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.beanName"),prop:"beanName"}},[t("el-input",{attrs:{placeholder:e.$t("editChainSupplier.beanNamePlaceholder")},model:{value:e.editChainSupplierInfo.beanName,callback:function(t){e.$set(e.editChainSupplierInfo,"beanName",t)},expression:"editChainSupplierInfo.beanName"}})],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.suType"),prop:"suType"}},[t("el-select",{staticStyle:{width:"100%"},model:{value:e.editChainSupplierInfo.suType,callback:function(t){e.$set(e.editChainSupplierInfo,"suType",t)},expression:"editChainSupplierInfo.suType"}},[t("el-option",{attrs:{value:1,label:e.$t("editChainSupplier.suType1")}}),t("el-option",{attrs:{value:2,label:e.$t("editChainSupplier.suType2")}})],1)],1),t("el-form-item",{attrs:{label:e.$t("editChainSupplier.remark"),prop:"remark"}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("editChainSupplier.remarkPlaceholder")},model:{value:e.editChainSupplierInfo.remark,callback:function(t){e.$set(e.editChainSupplierInfo,"remark",t)},expression:"editChainSupplierInfo.remark"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.editChainSupplier}},[e._v(e._s(e.$t("common.save")))])],1)],1)},_=[],k={name:"EditChainSupplier",data(){return{dialogVisible:!1,editChainSupplierInfo:{csId:"",name:"",appId:"",appSecure:"",mchId:"",mchKey:"",url:"",remark:"",beanName:"",suType:1,shopId:""},rules:{name:[{required:!0,message:this.$t("editChainSupplier.supplierNameRequired"),trigger:"blur"},{max:30,message:this.$t("editChainSupplier.supplierNameMaxLength"),trigger:"blur"}],appId:[{required:!0,message:this.$t("editChainSupplier.appIdRequired"),trigger:"blur"},{max:500,message:this.$t("editChainSupplier.appIdMaxLength"),trigger:"blur"}],appSecure:[{required:!0,message:this.$t("editChainSupplier.appSecureRequired"),trigger:"blur"},{max:500,message:this.$t("editChainSupplier.appSecureMaxLength"),trigger:"blur"}],mchId:[{required:!0,message:this.$t("editChainSupplier.mchIdRequired"),trigger:"blur"},{max:32,message:this.$t("editChainSupplier.mchIdMaxLength"),trigger:"blur"}],mchKey:[{required:!0,message:this.$t("editChainSupplier.mchKeyRequired"),trigger:"blur"},{max:128,message:this.$t("editChainSupplier.mchKeyMaxLength"),trigger:"blur"}],url:[{required:!0,message:this.$t("editChainSupplier.urlRequired"),trigger:"blur"},{max:128,message:this.$t("editChainSupplier.urlMaxLength"),trigger:"blur"}],beanName:[{required:!0,message:this.$t("editChainSupplier.beanNameRequired"),trigger:"blur"},{max:50,message:this.$t("editChainSupplier.beanNameMaxLength"),trigger:"blur"}],csId:[{required:!0,message:this.$t("editChainSupplier.supplierIdRequired"),trigger:"blur"}]}}},methods:{open(e){this.dialogVisible=!0,this.editChainSupplierInfo={...e,shopId:Object(h["f"])()}},async editChainSupplier(){this.$refs.form.validate(async e=>{if(!e)return;const{code:t,msg:a}=await c(this.editChainSupplierInfo);0==t?(this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(a)})},handleClose(){this.$refs.form.resetFields()}}},w=k,q=(a("31fa"),Object(f["a"])(w,x,_,!1,null,"61b406c4",null)),N=q.exports,T=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("common.deleteConfirm")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteChainSupplier}},[e._v(e._s(e.$t("common.confirmDelete")))])],1)])},V=[],M={name:"DeleteChainSupplier",data(){return{dialogVisible:!1,deleteChainSupplierInfo:{csId:"",shopId:""}}},methods:{open(e){this.dialogVisible=!0,this.deleteChainSupplierInfo={csId:e.csId,shopId:Object(h["f"])()}},async deleteChainSupplier(){const{code:e,msg:t}=await u(this.deleteChainSupplierInfo);0==e?(this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(t)},handleClose(){this.deleteChainSupplierInfo={csId:"",shopId:""}}}},O=M,D=Object(f["a"])(O,T,V,!1,null,null,null),j=D.exports,L=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("chainSupplierCatalog.addCatalog"),visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.addChainSupplierCatalogInfo,rules:e.rules,"label-width":"150px"}},[t("el-form-item",{attrs:{label:e.$t("chainSupplierCatalog.catalogName"),prop:"catalogName"}},[t("el-input",{attrs:{placeholder:e.$t("chainSupplierCatalog.catalogNamePlaceholder")},model:{value:e.addChainSupplierCatalogInfo.catalogName,callback:function(t){e.$set(e.addChainSupplierCatalogInfo,"catalogName",t)},expression:"addChainSupplierCatalogInfo.catalogName"}})],1),t("el-form-item",{attrs:{label:e.$t("chainSupplierCatalog.intfUrlParam"),prop:"intfUrlParam"}},[t("el-input",{attrs:{placeholder:e.$t("chainSupplierCatalog.intfUrlParamPlaceholder")},model:{value:e.addChainSupplierCatalogInfo.intfUrlParam,callback:function(t){e.$set(e.addChainSupplierCatalogInfo,"intfUrlParam",t)},expression:"addChainSupplierCatalogInfo.intfUrlParam"}})],1),t("el-form-item",{attrs:{label:e.$t("chainSupplierCatalog.seq"),prop:"seq"}},[t("el-input",{attrs:{placeholder:e.$t("chainSupplierCatalog.seqPlaceholder")},model:{value:e.addChainSupplierCatalogInfo.seq,callback:function(t){e.$set(e.addChainSupplierCatalogInfo,"seq",t)},expression:"addChainSupplierCatalogInfo.seq"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveChainSupplierCatalogInfo}},[e._v(e._s(e.$t("common.save")))])],1)],1)},U=[],R=a("9d32"),E={name:"AddChainSupplierCatalog",props:{callBackListener:String,callBackFunction:String},data(){return{dialogVisible:!1,addChainSupplierCatalogInfo:{catalogId:"",catalogName:"",csId:"",intfUrlParam:"",seq:"",statusCd:"0",shopId:""},rules:{catalogName:[{required:!0,message:this.$t("chainSupplierCatalog.catalogNameRequired"),trigger:"blur"},{max:30,message:this.$t("chainSupplierCatalog.catalogNameMaxLength"),trigger:"blur"}],csId:[{required:!0,message:this.$t("chainSupplierCatalog.supplierIdRequired"),trigger:"blur"},{max:32,message:this.$t("chainSupplierCatalog.supplierIdMaxLength"),trigger:"blur"}],intfUrlParam:[{required:!0,message:this.$t("chainSupplierCatalog.intfUrlParamRequired"),trigger:"blur"},{max:64,message:this.$t("chainSupplierCatalog.intfUrlParamMaxLength"),trigger:"blur"}],seq:[{required:!0,message:this.$t("chainSupplierCatalog.seqRequired"),trigger:"blur"},{max:10,message:this.$t("chainSupplierCatalog.seqMaxLength"),trigger:"blur"}]}}},methods:{open(e){this.dialogVisible=!0,this.resetForm(),this.addChainSupplierCatalogInfo.csId=e.csId,this.addChainSupplierCatalogInfo.shopId=Object(h["f"])()},resetForm(){this.addChainSupplierCatalogInfo={catalogId:"",catalogName:"",csId:"",intfUrlParam:"",seq:"",statusCd:"0",shopId:""},this.$nextTick(()=>{this.$refs.form&&this.$refs.form.clearValidate()})},async saveChainSupplierCatalogInfo(){this.$refs.form.validate(async e=>{if(!e)return;const{code:t,msg:a}=await Object(R["c"])(this.addChainSupplierCatalogInfo);0==t?(this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(a)})},handleClose(){this.$refs.form.resetFields()}}},F=E,A=(a("9c73"),Object(f["a"])(F,L,U,!1,null,"4e62ea39",null)),K=A.exports,z=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("chainSupplierCatalog.editCatalog"),visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.editChainSupplierCatalogInfo,rules:e.rules,"label-width":"150px"}},[t("el-form-item",{attrs:{label:e.$t("chainSupplierCatalog.catalogName"),prop:"catalogName"}},[t("el-input",{attrs:{placeholder:e.$t("chainSupplierCatalog.catalogNamePlaceholder")},model:{value:e.editChainSupplierCatalogInfo.catalogName,callback:function(t){e.$set(e.editChainSupplierCatalogInfo,"catalogName",t)},expression:"editChainSupplierCatalogInfo.catalogName"}})],1),t("el-form-item",{attrs:{label:e.$t("chainSupplierCatalog.intfUrlParam"),prop:"intfUrlParam"}},[t("el-input",{attrs:{placeholder:e.$t("chainSupplierCatalog.intfUrlParamPlaceholder")},model:{value:e.editChainSupplierCatalogInfo.intfUrlParam,callback:function(t){e.$set(e.editChainSupplierCatalogInfo,"intfUrlParam",t)},expression:"editChainSupplierCatalogInfo.intfUrlParam"}})],1),t("el-form-item",{attrs:{label:e.$t("chainSupplierCatalog.seq"),prop:"seq"}},[t("el-input",{attrs:{placeholder:e.$t("chainSupplierCatalog.seqPlaceholder")},model:{value:e.editChainSupplierCatalogInfo.seq,callback:function(t){e.$set(e.editChainSupplierCatalogInfo,"seq",t)},expression:"editChainSupplierCatalogInfo.seq"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.editChainSupplierCatalog}},[e._v(e._s(e.$t("common.save")))])],1)],1)},B=[],W={name:"EditChainSupplierCatalog",data(){return{dialogVisible:!1,editChainSupplierCatalogInfo:{catalogId:"",catalogName:"",csId:"",intfUrlParam:"",seq:"",statusCd:"0",shopId:""},rules:{catalogName:[{required:!0,message:this.$t("chainSupplierCatalog.catalogNameRequired"),trigger:"blur"},{max:30,message:this.$t("chainSupplierCatalog.catalogNameMaxLength"),trigger:"blur"}],csId:[{required:!0,message:this.$t("chainSupplierCatalog.supplierIdRequired"),trigger:"blur"},{max:32,message:this.$t("chainSupplierCatalog.supplierIdMaxLength"),trigger:"blur"}],intfUrlParam:[{required:!0,message:this.$t("chainSupplierCatalog.intfUrlParamRequired"),trigger:"blur"},{max:64,message:this.$t("chainSupplierCatalog.intfUrlParamMaxLength"),trigger:"blur"}],seq:[{required:!0,message:this.$t("chainSupplierCatalog.seqRequired"),trigger:"blur"},{max:10,message:this.$t("chainSupplierCatalog.seqMaxLength"),trigger:"blur"}],catalogId:[{required:!0,message:this.$t("chainSupplierCatalog.catalogIdRequired"),trigger:"blur"}]}}},methods:{open(e){this.dialogVisible=!0,this.editChainSupplierCatalogInfo={...e,shopId:Object(h["f"])()}},async editChainSupplierCatalog(){this.$refs.form.validate(async e=>{if(!e)return;const{code:t,msg:a}=await Object(R["d"])(this.editChainSupplierCatalogInfo);0==t?(this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(a)})},handleClose(){this.$refs.form.resetFields()}}},J=W,G=(a("71fc"),Object(f["a"])(J,z,B,!1,null,"7383252e",null)),H=G.exports,Q=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("chainSupplierCatalog.confirmDeleteCatalog")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteChainSupplierCatalog}},[e._v(e._s(e.$t("common.confirmDelete")))])],1)])},X=[],Y={name:"DeleteChainSupplierCatalog",data(){return{dialogVisible:!1,deleteChainSupplierCatalogInfo:{catalogId:"",shopId:""}}},methods:{open(e){this.dialogVisible=!0,this.deleteChainSupplierCatalogInfo={catalogId:e.catalogId,shopId:Object(h["f"])()}},async deleteChainSupplierCatalog(){const{code:e,msg:t}=await Object(R["a"])(this.deleteChainSupplierCatalogInfo);0==e?(this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(t)},handleClose(){this.deleteChainSupplierCatalogInfo={catalogId:"",shopId:""}}}},Z=Y,ee=Object(f["a"])(Z,Q,X,!1,null,null,null),te=ee.exports,ae=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("common.confirm"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("chainProduct.confirmDeleteProduct")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(e._s(e.$t("common.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteChainProduct}},[e._v(e._s(e.$t("common.confirmDelete")))])],1)])},ie=[],re={name:"DeleteChainProduct",data(){return{dialogVisible:!1,deleteChainProductInfo:{productId:"",shopId:""}}},methods:{open(e){this.dialogVisible=!0,this.deleteChainProductInfo={productId:e.productId,shopId:Object(h["f"])()}},async deleteChainProduct(){const{code:e,msg:t}=await Object(l["a"])(this.deleteChainProductInfo);0==e?(this.$message.success(this.$t("common.submitSuccess")),this.dialogVisible=!1,this.$emit("success")):this.$message.error(t)},handleClose(){this.deleteChainProductInfo={productId:"",shopId:""}}}},le=re,oe=Object(f["a"])(le,ae,ie,!1,null,null,null),se=oe.exports,ne=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"集采下单",visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticClass:"modal-body"},[t("el-form",{attrs:{"label-width":"100px"}},[t("el-form-item",{attrs:{label:"商品名称:"}},[t("span",[e._v(e._s(e.addChainProductInfo.prodName))])]),t("el-form-item",{attrs:{label:"单位:"}},[t("span",[e._v(e._s(e.addChainProductInfo.unitName))])]),t("el-form-item",{attrs:{label:"商品封面图:"}},[t("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{src:e.addChainProductInfo.coverPhoto,"preview-src-list":[e.addChainProductInfo.coverPhoto]}},[t("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[t("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:"/img/noPhoto.jpg"}})])])],1)],1),t("el-card",{staticClass:"margin-top"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v("下单规格数量")])]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.addChainProductInfo.chainProductValueDtos}},[t("el-table-column",{attrs:{prop:"specName",label:"规格名称",align:"center"}}),t("el-table-column",{attrs:{prop:"specValue",label:"规格值",align:"center"}}),t("el-table-column",{attrs:{prop:"price",label:"价格",align:"center"}}),t("el-table-column",{attrs:{label:"采购数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-input-number",{attrs:{min:1,size:"small"},model:{value:a.row.quantity,callback:function(t){e.$set(a.row,"quantity",t)},expression:"scope.row.quantity"}})]}}])}),t("el-table-column",{attrs:{label:"定价策略",align:"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-select",{attrs:{size:"small"},model:{value:a.row.pricingStrategy,callback:function(t){e.$set(a.row,"pricingStrategy",t)},expression:"scope.row.pricingStrategy"}},[t("el-option",{attrs:{label:"固定价格",value:"fixed"}}),t("el-option",{attrs:{label:"浮动价格",value:"float"}})],1)]}}])}),t("el-table-column",{attrs:{label:"备注",align:"center"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-input",{attrs:{size:"small"},model:{value:a.row.remark,callback:function(t){e.$set(a.row,"remark",t)},expression:"scope.row.remark"}})]}}])})],1)],1)],1),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取消")]),t("el-button",{attrs:{type:"primary"},on:{click:e.saveSupplierOrder}},[e._v("保存")])],1)])},pe=[],de={name:"ViewChainSupplierProduct",data(){return{dialogVisible:!1,addChainProductInfo:{productId:"",catalogId:"",prodName:"",prodDesc:"",unitName:"",sort:"",content:"",states:[],state:"",coverPhoto:"",carouselFigurePhotos:[],chainProductValueDtos:[],productSpecs:[],areaCode:"",csId:"",shopId:""}}},methods:{open(e){this.dialogVisible=!0,this.addChainProductInfo={...e,shopId:Object(h["f"])(),chainProductValueDtos:e.chainProductValueDtos.map(e=>({...e,quantity:1,pricingStrategy:"fixed",remark:""}))}},saveSupplierOrder(){Object(l["d"])(this.addChainProductInfo).then(e=>{const t=e.data;0===t.code?(this.$message.success("采购成功"),this.dialogVisible=!1):this.$message.error(t.msg)}).catch(e=>{this.$message.error(e.message)})},handleClose(){this.addChainProductInfo={productId:"",catalogId:"",prodName:"",prodDesc:"",unitName:"",sort:"",content:"",states:[],state:"",coverPhoto:"",carouselFigurePhotos:[],chainProductValueDtos:[],productSpecs:[],areaCode:"",csId:"",shopId:""}}}},ce=de,ue=(a("7b39"),Object(f["a"])(ce,ne,pe,!1,null,"90a3131c",null)),he=ue.exports,me={name:"ChainSupplierManage",components:{ChainSupplyTree:S,AddChainSupplier:v,EditChainSupplier:N,DeleteChainSupplier:j,AddChainSupplierCatalog:K,EditChainSupplierCatalog:H,DeleteChainSupplierCatalog:te,DeleteChainProduct:se,ViewChainSupplierProduct:he},data(){return{DEFAULT_PAGE:1,DEFAULT_ROW:10,chainProductInfo:{products:[],total:0,records:1,moreCondition:!1,productId:"",conditions:{catalogId:"",catalogName:"",state:"",prodName:"",keyword:"",barCode:"",csId:""},catalogs:[]},ssuType:"",currentPage:1,pageSize:10,total:0,shopId:""}},created(){this.shopId=Object(h["f"])(),console.log(this.chainProductInfo.moreCondition)},methods:{async listProducts(e,t){this.chainProductInfo.conditions.page=e,this.chainProductInfo.conditions.row=t;const a={params:this.chainProductInfo.conditions};a.params.prodName=a.params.prodName.trim();const{code:i,msg:r,data:o,total:s,records:n}=await Object(l["b"])(a.params);0==i?(this.chainProductInfo.total=s,this.chainProductInfo.records=n,this.chainProductInfo.products=o):this.$message.error(r)},queryProductMethod(){this.listProducts(this.DEFAULT_PAGE,this.DEFAULT_ROW)},resetProductMethod(){this.chainProductInfo.conditions.prodName="",this.chainProductInfo.conditions.categoryId="",this.chainProductInfo.conditions.state="",this.listProducts(this.DEFAULT_PAGE,this.DEFAULT_ROW)},openAddProductModal(){this.$router.push("/pages/admin/addChainProduct?csId="+this.chainProductInfo.conditions.csId)},openEditProductModel(e){this.$router.push(`/pages/admin/editChainProduct?productId=${e.productId}&csId=${e.csId}`)},openDeleteProductModel(e){this.$refs.deleteChainProduct.open(e)},openAddChainSupplierModal(){this.$refs.addChainSupplier.open()},openEditChainSupplierModel(){if(!this.chainProductInfo.conditions.csId)return void this.$message.warning("请先选择供应链");const e=this.$refs.chainSupplyTree.getChainSupplierById(this.chainProductInfo.conditions.csId);this.$refs.editChainSupplier.open(e)},openDeleteChainSupplierModel(){if(!this.chainProductInfo.conditions.csId)return void this.$message.warning("请先选择供应链");const e=this.$refs.chainSupplyTree.getChainSupplierById(this.chainProductInfo.conditions.csId);this.$refs.deleteChainSupplier.open(e)},openAddChainSupplierCatalogModal(){this.chainProductInfo.conditions.csId?this.$refs.addChainSupplierCatalog.open({csId:this.chainProductInfo.conditions.csId}):this.$message.warning("请先选择供应链")},openEditChainSupplierCatalogModel(){if(!this.chainProductInfo.conditions.catalogId)return void this.$message.warning("请先选择供应链类型");const e=this.$refs.chainSupplyTree.getChainSupplierCatalogById(this.chainProductInfo.conditions.csId,this.chainProductInfo.conditions.catalogId);this.$refs.editChainSupplierCatalog.open(e)},openDeleteChainSupplierCatalogModel(){if(!this.chainProductInfo.conditions.catalogId)return void this.$message.warning("请先选择供应链类型");const e=this.$refs.chainSupplyTree.getChainSupplierCatalogById(this.chainProductInfo.conditions.csId,this.chainProductInfo.conditions.catalogId);this.$refs.deleteChainSupplierCatalog.open(e)},openViewProductModel(e){this.$refs.viewChainSupplierProduct.open(e)},handleSwitchFloor(e){this.chainProductInfo.conditions.catalogId="",this.chainProductInfo.conditions.csId=e.csId,this.ssuType=e.suType,this.listProducts(this.DEFAULT_PAGE,this.DEFAULT_ROW)},handleSwitchUnit(e){this.chainProductInfo.conditions.csId=e.csId,this.chainProductInfo.conditions.catalogId=e.catalogId,this.ssuType=e.suType,this.listProducts(this.DEFAULT_PAGE,this.DEFAULT_ROW)},handleCurrentChange(e){this.currentPage=e,this.listProducts(e,this.DEFAULT_ROW)},_queryChainSupplierMethod(){this.$refs.chainSupplyTree.listChainSuppliers()}}},ge=me,fe=(a("60f95"),Object(f["a"])(ge,i,r,!1,null,"92e4df60",null));t["default"]=fe.exports},"7b39":function(e,t,a){"use strict";a("efb0")},"9c73":function(e,t,a){"use strict";a("d8e1")},"9d32":function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return l})),a.d(t,"d",(function(){return o})),a.d(t,"a",(function(){return s}));var i=a("b775");function r(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainSupplierCatalog.listChainSupplierCatalog",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function l(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainSupplierCatalog.saveChainSupplierCatalog",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function o(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainSupplierCatalog.updateChainSupplierCatalog",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function s(e){return new Promise((t,a)=>{Object(i["a"])({url:"/chainSupplierCatalog.deleteChainSupplierCatalog",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}},b6e1:function(e,t,a){},bf6b:function(e,t,a){},c9f7:function(e,t,a){},d8e1:function(e,t,a){},efb0:function(e,t,a){}}]);
//# sourceMappingURL=chunk-5ac43605.dfe3a73b.js.map