Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-4c8a26f9.3ae1806a.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
12 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4c8a26f9"],{"028e":function(t,e,a){},"22c8":function(t,e,a){},"4bcd":function(t,e,a){"use strict";a("22c8")},"5f84":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chain-supplier-container"},[e("el-row",{attrs:{gutter:20}},[e("el-col",{staticStyle:{"padding-right":"0"},attrs:{span:4}},[e("chain-supplier-tree",{ref:"chainSupplierTree",on:{switchSupplier:t.handleSwitchSupplier,switchCatalog:t.handleSwitchCatalog}})],1),e("el-col",{attrs:{span:20}},[e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"clearfix flex justify-bettwen",attrs:{slot:"header"},slot:"header"},[e("span",[t._v(t._s(t.$t("chainSupplier.queryCondition")))])]),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:8}},[e("el-input",{attrs:{placeholder:t.$t("chainSupplier.productNamePlaceholder"),clearable:""},model:{value:t.chainSupplierInfo.conditions.prodName,callback:function(e){t.$set(t.chainSupplierInfo.conditions,"prodName",e)},expression:"chainSupplierInfo.conditions.prodName"}})],1),e("el-col",{attrs:{span:6}},[e("el-input",{attrs:{placeholder:t.$t("chainSupplier.productIdPlaceholder"),clearable:""},model:{value:t.chainSupplierInfo.conditions.productId,callback:function(e){t.$set(t.chainSupplierInfo.conditions,"productId",e)},expression:"chainSupplierInfo.conditions.productId"}})],1),e("el-col",{attrs:{span:4}},[e("el-button",{attrs:{type:"primary"},on:{click:t.handleQuery}},[e("i",{staticClass:"el-icon-search"}),t._v(" "+t._s(t.$t("chainSupplier.query"))+" ")])],1)],1)],1)],1)],1),e("el-row",{staticClass:"margin-top-xs"},[e("el-col",{attrs:{span:24}},[e("el-card",[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.chainSupplierInfo.products,border:"",stripe:""}},[e("el-table-column",{attrs:{prop:"productId",label:t.$t("chainSupplier.productId"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("chainSupplier.productImage"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{src:t.row.coverPhoto,"preview-src-list":[t.row.coverPhoto]}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:"/img/noPhoto.jpg"}})])])]}}])}),e("el-table-column",{attrs:{prop:"catalogName",label:t.$t("chainSupplier.productCategory"),align:"center"}}),e("el-table-column",{attrs:{prop:"prodName",label:t.$t("chainSupplier.productName"),align:"center"}}),e("el-table-column",{attrs:{prop:"unitName",label:t.$t("chainSupplier.productUnit"),align:"center"}}),e("el-table-column",{attrs:{prop:"sort",label:t.$t("chainSupplier.sort"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("chainSupplier.status"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s("2002"===e.row.state?t.$t("chainSupplier.onShelf"):t.$t("chainSupplier.offShelf"))+" ")]}}])}),e("el-table-column",{attrs:{prop:"createTime",label:t.$t("chainSupplier.createTime"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("chainSupplier.operation"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.handlePurchase(a.row)}}},[t._v(" "+t._s(t.$t("chainSupplier.purchase"))+" ")])]}}])})],1),e("div",{staticClass:"pagination-container"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes, prev, pager, next, jumper",total:t.chainSupplierInfo.total,"page-size":t.chainSupplierInfo.conditions.row,"current-page":t.chainSupplierInfo.conditions.page},on:{"current-change":t.handlePageChange,"size-change":t.handleSizeChange}})],1)],1)],1)],1)],1)],1),e("add-chain-supplier-product",{ref:"addChainSupplierProduct"})],1)},r=[],o=a("b775"),c=a("7323");function n(t){return new Promise((e,a)=>{Object(o["a"])({url:"/chainSupplier.listChainSupplier",method:"get",params:{...t,csId:"",shopId:Object(c["f"])()}}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function l(t){return new Promise((e,a)=>{Object(o["a"])({url:"/chainProduct.listChainProduct",method:"get",params:{...t,shopId:Object(c["f"])()}}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function s(t){return new Promise((e,a)=>{Object(o["a"])({url:"/chainProduct.queryProductDeatil",method:"get",params:{...t,shopId:Object(c["f"])()}}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function p(t){return new Promise((e,a)=>{Object(o["a"])({url:"/productPriceRule.listProductPriceRule",method:"get",params:{...t,shopId:Object(c["f"])()}}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}function d(t){return new Promise((e,a)=>{Object(o["a"])({url:"/chainInoutOrder.saveChainInoutOrder",method:"post",data:t}).then(t=>{const a=t.data;e(a)}).catch(t=>{a(t)})})}var u=function(){var t=this,e=t._self._c;return e("div",{staticClass:"chain-supplier-tree"},[e("el-card",{staticClass:"box-card"},[e("el-tree",{ref:"supplierTree",attrs:{data:t.suppliersTreeData,props:t.defaultProps,"node-key":"id","highlight-current":"","expand-on-click-node":!1},on:{"node-click":t.handleNodeClick},scopedSlots:t._u([{key:"default",fn:function({node:a,data:i}){return e("span",{staticClass:"custom-tree-node"},[e("i",{class:i.icon,staticStyle:{"margin-right":"5px"}}),e("span",[t._v(t._s(a.label))])])}}])})],1)],1)},h=[],f={name:"ChainSupplierTree",data(){return{suppliersTreeData:[],defaultProps:{children:"children",label:"text"},csId:""}},created(){this.loadChainSuppliers()},methods:{loadChainSuppliers(){n({page:1,row:50}).then(t=>{this.suppliersTreeData=this.formatTreeData(t.data)})},formatTreeData(t){const e=[],a=new Set;return t.forEach(t=>{if(!a.has(t.csId)){a.add(t.csId);const i={id:"cs_"+t.csId,csId:t.csId,text:t.name,icon:"el-icon-office-building",children:[]};t.catalogs&&t.catalogs.length>0&&t.catalogs.forEach(e=>{i.children.push({id:"c_"+e.catalogId,catalogId:e.catalogId,csId:t.csId,text:e.catalogName,icon:"el-icon-folder-opened"})}),e.push(i)}}),e},handleNodeClick(t){t.id.startsWith("cs_")?this.$emit("switchSupplier",{csId:t.csId}):this.$emit("switchCatalog",{csId:t.csId,catalogId:t.catalogId})},refreshTree(t){t&&(this.csId=t.csId),this.loadChainSuppliers()}}},g=f,m=(a("91e1"),a("2877")),S=Object(m["a"])(g,u,h,!1,null,"0edd6887",null),I=S.exports,b=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("chainSupplier.purchaseOrder"),visible:t.dialogVisible,width:"80%","close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("el-form",{attrs:{"label-width":"120px"}},[e("el-form-item",{attrs:{label:t.$t("chainSupplier.productName")+""}},[e("span",[t._v(t._s(t.addChainProductInfo.prodName))])]),e("el-form-item",{attrs:{label:t.$t("chainSupplier.unit")+""}},[e("span",[t._v(t._s(t.addChainProductInfo.unitName))])]),e("el-form-item",{attrs:{label:t.$t("chainSupplier.productCover")+""}},[e("el-image",{staticStyle:{width:"50px",height:"50px"},attrs:{src:t.addChainProductInfo.coverPhoto,"preview-src-list":[t.addChainProductInfo.coverPhoto]}},[e("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[e("img",{staticStyle:{width:"50px",height:"50px"},attrs:{src:"/img/noPhoto.jpg"}})])])],1),e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v(t._s(t.$t("chainSupplier.orderSpecQuantity")))])]),e("el-table",{attrs:{data:t.addChainProductInfo.chainProductValueDtos,border:""}},[e("el-table-column",{attrs:{prop:"specName",label:t.$t("chainSupplier.specName"),align:"center"}}),e("el-table-column",{attrs:{prop:"specValue",label:t.$t("chainSupplier.specValue"),align:"center"}}),e("el-table-column",{attrs:{prop:"price",label:t.$t("chainSupplier.price"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("chainSupplier.purchaseQuantity"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{staticClass:"quantity-input",attrs:{type:"number",min:"1"},model:{value:a.row.count,callback:function(e){t.$set(a.row,"count",e)},expression:"scope.row.count"}})]}}])}),e("el-table-column",{attrs:{label:t.$t("chainSupplier.pricingStrategy"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("chainSupplier.selectPricingStrategy")},model:{value:a.row.ruleId,callback:function(e){t.$set(a.row,"ruleId",e)},expression:"scope.row.ruleId"}},t._l(t.productPriceRules,(function(t){return e("el-option",{key:t.ruleId,attrs:{label:t.ruleName,value:t.ruleId}})})),1)]}}])}),e("el-table-column",{attrs:{label:t.$t("chainSupplier.remark"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{model:{value:a.row.remark,callback:function(e){t.$set(a.row,"remark",e)},expression:"scope.row.remark"}})]}}])})],1)],1),e("div",{staticStyle:{"margin-top":"20px","text-align":"right"}},[e("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v(" "+t._s(t.$t("common.cancel"))+" ")]),e("el-button",{attrs:{type:"primary"},on:{click:t.saveSupplierOrder}},[t._v(" "+t._s(t.$t("common.save"))+" ")])],1)],1)],1)},P=[],w={name:"AddChainSupplierProduct",data(){return{dialogVisible:!1,addChainProductInfo:{productId:"",catalogId:"",prodName:"",unitName:"",coverPhoto:"",chainProductValueDtos:[],shopId:"",groupId:""},productPriceRules:[],chainProductDetail:{}}},methods:{open(t){this.resetForm(),Object.assign(this.addChainProductInfo,t),this.addChainProductInfo.shopId=Object(c["f"])(),this.listProductPriceRules(),this.listProductDetail(),this.dialogVisible=!0},listProductDetail(){s({productId:this.addChainProductInfo.productId,page:1,row:50,csId:this.addChainProductInfo.csId}).then(t=>{this.chainProductDetail=t.data,console.log(this.chainProductDetail)})},listProductPriceRules(){p({page:1,row:100,shopId:Object(c["f"])()}).then(t=>{this.productPriceRules=t.data})},saveSupplierOrder(){d(this.addChainProductInfo).then(t=>{0===t.code?(this.$message.success(this.$t("chainSupplier.purchaseSuccess")),this.dialogVisible=!1,this.resetForm()):this.$message.error(t.msg)}).catch(t=>{this.$message.error(t)})},resetForm(){this.addChainProductInfo={productId:"",catalogId:"",prodName:"",unitName:"",coverPhoto:"",chainProductValueDtos:[],shopId:"",groupId:""}}}},C=w,v=(a("e0b8"),Object(m["a"])(C,b,P,!1,null,"aa4359c6",null)),$=v.exports,y={name:"ChainSupplier",components:{ChainSupplierTree:I,AddChainSupplierProduct:$},data(){return{chainSupplierInfo:{conditions:{products:[],prodName:"",csId:"",catalogId:"",productId:"",shopId:"",page:1,row:10},products:[],total:0}}},created(){this.chainSupplierInfo.conditions.shopId=Object(c["f"])(),console.log(this.chainSupplierInfo.conditions.products),this.listProducts()},methods:{listProducts(){l(this.chainSupplierInfo.conditions).then(t=>{this.chainSupplierInfo.products=t.data,this.chainSupplierInfo.total=t.total})},handleQuery(){this.chainSupplierInfo.conditions.page=1,this.listProducts()},handlePageChange(t){this.chainSupplierInfo.conditions.page=t,this.listProducts()},handleSizeChange(t){this.chainSupplierInfo.conditions.row=t,this.listProducts()},handleSwitchSupplier(t){this.chainSupplierInfo.conditions.csId=t.csId,this.chainSupplierInfo.conditions.catalogId="",this.listProducts()},handleSwitchCatalog(t){this.chainSupplierInfo.conditions.csId=t.csId,this.chainSupplierInfo.conditions.catalogId=t.catalogId,this.listProducts()},handlePurchase(t){this.$refs.addChainSupplierProduct.open(t)}}},_=y,k=(a("4bcd"),Object(m["a"])(_,i,r,!1,null,"80251404",null));e["default"]=k.exports},"91e1":function(t,e,a){"use strict";a("028e")},acde:function(t,e,a){},e0b8:function(t,e,a){"use strict";a("acde")}}]);
//# sourceMappingURL=chunk-4c8a26f9.3ae1806a.js.map