You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
29 KiB
1 lines
29 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32797c80"],{"5e35":function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return u})),a.d(e,"b",(function(){return s})),a.d(e,"e",(function(){return l})),a.d(e,"d",(function(){return i}));var n=a("b775");function r(t){return Object(n["a"])({url:"/mall/pms/PmsProductAttributeCategory/list",method:"get",params:t})}function u(t){return Object(n["a"])({url:"/mall/pms/PmsProductAttributeCategory/create",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/mall/pms/PmsProductAttributeCategory/delete/"+t,method:"get"})}function l(t,e){return Object(n["a"])({url:"/mall/pms/PmsProductAttributeCategory/update/"+t,method:"post",data:e})}function i(){return Object(n["a"])({url:"/mall/pms/PmsProductAttributeCategory/list/withAttr",method:"get"})}},"9add":function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return u})),a.d(e,"g",(function(){return s})),a.d(e,"f",(function(){return l})),a.d(e,"b",(function(){return i})),a.d(e,"d",(function(){return o})),a.d(e,"e",(function(){return c}));var n=a("b775");function r(t){return Object(n["a"])({url:"/mall/pms/PmsBrand/list",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/mall/pms/PmsBrand/create",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/mall/pms/PmsBrand/update/showStatus",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/mall/pms/PmsBrand/update/factoryStatus",method:"post",data:t})}function i(t){return Object(n["a"])({url:"/mall/pms/PmsBrand/delete",method:"DELETE",data:t,headers:{"Content-Type":"application/json"}})}function o(t){return Object(n["a"])({url:"/mall/pms/PmsBrand/"+t,method:"get"})}function c(t,e){return Object(n["a"])({url:"/mall/pms/PmsBrand/update/"+t,method:"post",data:e})}},c466:function(t,e,a){"use strict";function n(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in a)if(new RegExp("(".concat(n,")")).test(e)){var u=a[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?u:r(u))}return e}function r(t){return("00"+t).substr(t.length)}a.d(e,"a",(function(){return n}))},c4c8:function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"f",(function(){return u})),a.d(e,"g",(function(){return s})),a.d(e,"b",(function(){return l})),a.d(e,"i",(function(){return i})),a.d(e,"l",(function(){return o})),a.d(e,"m",(function(){return c})),a.d(e,"k",(function(){return d})),a.d(e,"h",(function(){return p})),a.d(e,"n",(function(){return h})),a.d(e,"a",(function(){return m})),a.d(e,"j",(function(){return f})),a.d(e,"d",(function(){return b})),a.d(e,"e",(function(){return g}));var n=a("b775");function r(t){return Object(n["a"])({url:"/pms/PmsProduct/list",method:"get",params:t})}function u(t){return Object(n["a"])({url:"/pms/PmsProduct/simpleProductList",method:"get",params:t})}function s(t){return Object(n["a"])({url:"/pms/PmsProduct/update/deleteStatus",method:"post",params:t})}function l(t){return Object(n["a"])({url:"/pms/PmsProduct/delete/"+t,method:"get"})}function i(t){return Object(n["a"])({url:"/pms/PmsProduct/update/newStatus",method:"post",params:t})}function o(t){return Object(n["a"])({url:"/pms/PmsProduct/update/recommendStatus",method:"post",params:t})}function c(t){return Object(n["a"])({url:"/pms/PmsProduct/update/verifyStatus",method:"post",params:t})}function d(t){return Object(n["a"])({url:"/pms/PmsProduct/update/publishStatus",method:"post",params:t})}function p(t){return Object(n["a"])({url:"/pms/PmsProduct/update/isFenxiao",method:"post",params:t})}function h(t){return Object(n["a"])({url:"/pms/PmsProduct/update/isVip",method:"post",params:t})}function m(t){return Object(n["a"])({url:"/pms/PmsProduct/create",method:"post",data:t})}function f(t,e){return Object(n["a"])({url:"/pms/PmsProduct/update/"+t,method:"post",data:e})}function b(t){return Object(n["a"])({url:"/pms/PmsProduct/fetchVList/"+t,method:"get"})}function g(t){return Object(n["a"])({url:"/pms/PmsProduct/updateInfo/"+t,method:"get"})}},c8aa:function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a("b775");function r(t,e){return Object(n["a"])({url:"/pms/PmsProductAttribute/list/"+t,method:"get",params:e})}},d1f3:function(t,e,a){"use strict";a.d(e,"d",(function(){return r})),a.d(e,"c",(function(){return u})),a.d(e,"b",(function(){return s})),a.d(e,"a",(function(){return l})),a.d(e,"i",(function(){return i})),a.d(e,"f",(function(){return o})),a.d(e,"j",(function(){return c})),a.d(e,"g",(function(){return d})),a.d(e,"h",(function(){return p})),a.d(e,"e",(function(){return h}));var n=a("b775");function r(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/list",method:"post",data:t})}function u(t,e){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/list/"+t,method:"get",params:e})}function s(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/delete",method:"DELETE",data:t,headers:{"Content-Type":"application/json"}})}function l(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/create",method:"post",data:t})}function i(t,e){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/"+t,method:"post",data:e})}function o(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/"+t,method:"get"})}function c(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/showStatus",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/indexStatus",method:"post",data:t})}function p(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/navStatus",method:"post",data:t})}function h(){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/list/withChildren",method:"get"})}},e629:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-container"},[e("button-bar",{ref:"btnbar",attrs:{"view-title":"商品列表",btndisabled:t.btndisabled},on:{btnhandle:t.btnHandle}}),e("div",{staticClass:"main-content",staticStyle:{"margin-left":"20px","margin-right":"20px"}},[e("div",{staticClass:"searchcon"},[e("el-button",{staticClass:"searchbtn",attrs:{size:"small"},on:{click:t.clicksearchShow}},[t._v(" "+t._s(t.searchxianshitit)+" ")]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.isSearchShow,expression:"isSearchShow"}],staticClass:"search"},[e("el-form",{staticClass:"tab-header",attrs:{model:t.listQuery,inline:!0}},[e("el-form-item",{attrs:{label:"输入搜索:"}},[e("el-input",{staticStyle:{width:"203px"},attrs:{placeholder:"商品名称"},model:{value:t.listQuery.keyword,callback:function(e){t.$set(t.listQuery,"keyword",e)},expression:"listQuery.keyword"}})],1),e("el-form-item",{attrs:{label:"商品类型:"}},[e("el-select",{staticStyle:{width:"160px"},attrs:{placeholder:"商品类型",clearable:""},model:{value:t.listQuery.productAttributeCategoryId,callback:function(e){t.$set(t.listQuery,"productAttributeCategoryId",e)},expression:"listQuery.productAttributeCategoryId"}},t._l(t.productAttributeCategoryOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{attrs:{label:"商品分类:"}},[e("el-cascader",{attrs:{clearable:"","change-on-select":"",options:t.productCateOptions},model:{value:t.selectProductCateValue,callback:function(e){t.selectProductCateValue=e},expression:"selectProductCateValue"}})],1),e("el-form-item",{attrs:{label:"商品品牌:"}},[e("el-select",{attrs:{placeholder:"请选择品牌",clearable:""},model:{value:t.listQuery.brandId,callback:function(e){t.$set(t.listQuery,"brandId",e)},expression:"listQuery.brandId"}},t._l(t.brandOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{attrs:{label:"上架状态:"}},[e("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"全部",clearable:""},model:{value:t.listQuery.publishStatus,callback:function(e){t.$set(t.listQuery,"publishStatus",e)},expression:"listQuery.publishStatus"}},t._l(t.publishStatusOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{attrs:{label:"审核状态:"}},[e("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"全部",clearable:""},model:{value:t.listQuery.verifyStatus,callback:function(e){t.$set(t.listQuery,"verifyStatus",e)},expression:"listQuery.verifyStatus"}},t._l(t.verifyStatusOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{attrs:{label:"是否新品:"}},[e("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"全部",clearable:""},model:{value:t.listQuery.newStatus,callback:function(e){t.$set(t.listQuery,"newStatus",e)},expression:"listQuery.newStatus"}},t._l(t.newStatusOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("el-form-item",{attrs:{label:"是否推荐:"}},[e("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"全部",clearable:""},model:{value:t.listQuery.recommandStatus,callback:function(e){t.$set(t.listQuery,"recommandStatus",e)},expression:"listQuery.recommandStatus"}},t._l(t.recommandStatusOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1),e("div",{staticClass:"btn",staticStyle:{"text-align":"center"}},[e("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-search"},on:{click:function(e){return t.handleSearchList()}}},[t._v("查询")]),e("el-button",{attrs:{type:"primary",size:"small",icon:"el-icon-refresh"},on:{click:function(e){return t.handleResetSearch()}}},[t._v("重置")])],1)],1)],1),e("el-tabs",{staticStyle:{"margin-top":"10px"},attrs:{type:"card"},on:{"tab-click":t.handleGoods},model:{value:t.status,callback:function(e){t.status=e},expression:"status"}},[e("el-tab-pane",{attrs:{name:"0"}},[e("span",{attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"el-icon-s-order"}),t._v(" 全部商品")])]),e("el-tab-pane",{attrs:{name:"1"}},[e("span",{attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"el-icon-bank-card"}),t._v(" 出售中")])]),e("el-tab-pane",{attrs:{name:"2"}},[e("span",{attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"el-icon-refrigerator"}),t._v(" 已售馨")])]),e("el-tab-pane",{attrs:{name:"3"}},[e("span",{attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"el-icon-truck"}),t._v("仓库中")])])],1),e("div",{staticClass:"batch-operate-container"},[e("el-select",{attrs:{size:"small",placeholder:"批量操作"},model:{value:t.operateType,callback:function(e){t.operateType=e},expression:"operateType"}},t._l(t.operates,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),e("el-button",{staticClass:"search-button",staticStyle:{"margin-left":"20px"},attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleBatchOperate()}}},[t._v(" 确定 ")])],1),e("div",{staticClass:"pagination-container"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes,prev, pager, next,jumper","page-size":t.listQuery.pageSize,"page-sizes":[5,10,15],"current-page":t.listQuery.pageNum,total:t.total},on:{"update:currentPage":function(e){return t.$set(t.listQuery,"pageNum",e)},"update:current-page":function(e){return t.$set(t.listQuery,"pageNum",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1),e("div",{staticClass:"table-container"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"productTable",staticStyle:{width:"100%"},attrs:{data:t.list,border:""},on:{"selection-change":t.handleSelectionChange}},[e("el-table-column",{attrs:{type:"selection",width:"60",align:"center"}}),e("el-table-column",{attrs:{label:"编号",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.id))]}}])}),e("el-table-column",{attrs:{label:"商品图片",width:"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("img",{staticStyle:{height:"80px"},attrs:{src:t.row.pic}})]}}])}),e("el-table-column",{attrs:{label:"商品名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[t._v(t._s(a.row.name))]),e("p",[t._v("品牌:"+t._s(a.row.brandName))]),e("p",[t._v("类别:"+t._s(a.row.productCategoryName))])]}}])}),e("el-table-column",{attrs:{label:"价格/货号",width:"120",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[t._v("价格:¥"+t._s(a.row.price))]),e("p",[t._v("货号:"+t._s(a.row.productSn))])]}}])}),e("el-table-column",{attrs:{label:"标签",width:"140",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[t._v("上架: "),e("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(e){return t.handlePublishStatusChange(a.$index,a.row)}},model:{value:a.row.publishStatus,callback:function(e){t.$set(a.row,"publishStatus",e)},expression:"scope.row.publishStatus"}})],1),e("p",[t._v("新品: "),e("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(e){return t.handleNewStatusChange(a.$index,a.row)}},model:{value:a.row.newStatus,callback:function(e){t.$set(a.row,"newStatus",e)},expression:"scope.row.newStatus"}})],1),e("p",[t._v("推荐: "),e("el-switch",{attrs:{"active-value":1,"inactive-value":0},on:{change:function(e){return t.handleRecommendStatusChange(a.$index,a.row)}},model:{value:a.row.recommandStatus,callback:function(e){t.$set(a.row,"recommandStatus",e)},expression:"scope.row.recommandStatus"}})],1)]}}])}),e("el-table-column",{attrs:{label:"库存数",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[t._v(t._s(a.row.stock))])]}}])}),e("el-table-column",{attrs:{label:"销量",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.sale))]}}])}),e("el-table-column",{attrs:{label:"审核状态",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[t._v(t._s(t._f("verifyStatusFilter")(a.row.verifyStatus)))]),e("p",[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.handleShowVeriyEditDialog(a.$index,a.row)}}},[t._v("审核详情 ")])],1)]}}])}),e("el-table-column",{attrs:{label:"操作",width:"160",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("p",[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.handleUpdateProduct(a.$index,a.row)}}},[t._v("编辑 ")]),e("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(e){return t.handleDelete(a.$index,a.row)}}},[t._v("删除 ")])],1)]}}])})],1)],1),e("el-dialog",{attrs:{title:"审核信息",visible:t.vertyProduct.dialogVisible,width:"40%"},on:{"update:visible":function(e){return t.$set(t.vertyProduct,"dialogVisible",e)}}},[e("el-form",{ref:"brandFrom",attrs:{model:t.vertyProduct,"label-width":"150px"}},[e("el-form-item",{attrs:{label:"审核状态:",prop:"verifyStatus"}},[e("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:t.vertyProduct.verifyStatus,callback:function(e){t.$set(t.vertyProduct,"verifyStatus",e)},expression:"vertyProduct.verifyStatus"}})],1),e("el-form-item",{attrs:{label:"审核备注:",prop:"detail"}},[e("el-input",{model:{value:t.vertyProduct.detail,callback:function(e){t.$set(t.vertyProduct,"detail",e)},expression:"vertyProduct.detail"}})],1),e("el-form-item",[e("el-button",{on:{click:function(e){t.vertyProduct.dialogVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleEditVConfirm}},[t._v("确 定")])],1)],1),e("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.vertyProduct.list,border:""}},[e("el-table-column",{attrs:{label:"审核状态",width:"160",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("verifyStatusFilter")(e.row.status)))]}}])}),e("el-table-column",{attrs:{label:"审核人",width:"160",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.vertifyMan))]}}])}),e("el-table-column",{attrs:{label:"审核信息",width:"160",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.detail))]}}])}),e("el-table-column",{attrs:{label:"审核时间",width:"160",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(t._f("formatTime")(e.row.createTime)))]}}])})],1)],1),e("el-dialog",{attrs:{title:"编辑货品信息",visible:t.editSkuInfo.dialogVisible,width:"40%"},on:{"update:visible":function(e){return t.$set(t.editSkuInfo,"dialogVisible",e)}}},[e("span",[t._v("商品货号:")]),e("span",[t._v(t._s(t.editSkuInfo.productSn))]),e("el-input",{staticStyle:{width:"50%","margin-left":"20px"},attrs:{placeholder:"按sku编号搜索",size:"small"},model:{value:t.editSkuInfo.keyword,callback:function(e){t.$set(t.editSkuInfo,"keyword",e)},expression:"editSkuInfo.keyword"}},[e("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:t.handleSearchEditSku},slot:"append"})],1),e("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.editSkuInfo.stockList,border:""}},[e("el-table-column",{attrs:{label:"SKU编号",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{model:{value:a.row.skuCode,callback:function(e){t.$set(a.row,"skuCode",e)},expression:"scope.row.skuCode"}})]}}])}),t._l(t.editSkuInfo.productAttr,(function(a,n){return e("el-table-column",{key:a.id,attrs:{label:a.name,align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.getProductSkuSp(e.row,n))+" ")]}}],null,!0)})})),e("el-table-column",{attrs:{label:"销售价格",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{model:{value:a.row.price,callback:function(e){t.$set(a.row,"price",e)},expression:"scope.row.price"}})]}}])}),e("el-table-column",{attrs:{label:"商品库存",width:"80",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{model:{value:a.row.stock,callback:function(e){t.$set(a.row,"stock",e)},expression:"scope.row.stock"}})]}}])}),e("el-table-column",{attrs:{label:"库存预警值",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-input",{model:{value:a.row.lowStock,callback:function(e){t.$set(a.row,"lowStock",e)},expression:"scope.row.lowStock"}})]}}])})],2),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.editSkuInfo.dialogVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleEditSkuConfirm}},[t._v("确 定")])],1)],1)],1)],1)},r=[],u=a("77b3"),s=a("c466"),l=a("c4c8"),i=a("b775");function o(t,e){return Object(i["a"])({url:"/pms/PmsSkuStock/select/"+t,method:"get",params:e})}function c(t,e){return Object(i["a"])({url:"/pms/PmsSkuStock/updatePid/"+t,method:"post",data:e})}var d=a("c8aa"),p=a("9add"),h=a("d1f3"),m=a("5e35"),f={keyword:null,pageNum:1,pageSize:5,status:0,publishStatus:null,verifyStatus:null,productSn:null,productCategoryId:null,productAttributeCategoryId:null,newStatus:null,recommandStatus:null,brandId:null},b={name:"ProductList",components:{ButtonBar:u["a"]},filters:{verifyStatusFilter:function(t){return 1===t?"审核通过":"未审核"},formatTime:function(t){if(null==t||""===t)return"N/A";var e=new Date(t);return Object(s["a"])(e,"yyyy-MM-dd hh:mm:ss")}},data:function(){return{status:0,btndisabled:!1,isSearchShow:!1,searchxianshitit:"显示查询条件",dialogVVisible:!1,editSkuInfo:{dialogVisible:!1,productId:null,productSn:"",productAttributeCategoryId:null,stockList:[],productAttr:[],keyword:null},vertyProduct:{dialogVisible:!1,productId:null,detail:"",verifyStatus:null,list:null},operates:[{label:"商品上架",value:"publishOn"},{label:"商品下架",value:"publishOff"},{label:"设为推荐",value:"recommendOn"},{label:"取消推荐",value:"recommendOff"},{label:"设为新品",value:"newOn"},{label:"取消新品",value:"newOff"}],tabsName:"1",operateType:null,listQuery:Object.assign({},f),list:null,total:null,listLoading:!0,selectProductCateValue:null,multipleSelection:[],productCateOptions:[],brandOptions:[],productAttributeCategoryOptions:[],publishStatusOptions:[{value:1,label:"上架"},{value:0,label:"下架"}],verifyStatusOptions:[{value:1,label:"审核通过"},{value:0,label:"未审核"}],newStatusOptions:[{value:1,label:"是"},{value:0,label:"否"}],recommandStatusOptions:[{value:1,label:"是"},{value:0,label:"否"}],statusOptions:[{value:1,label:"出售中"},{value:2,label:"已售馨"},{value:3,label:"仓库中"}],btnList:[],queryParams:{current:1,size:10,total:0,params:{orderId:"",supplierName:"",auditStatus:"",goodsStatus:"",orderStartDate:"",orderEndDate:"",arrivalStartDate:"",arrivalEndDate:"",queryType:""}}}},watch:{selectProductCateValue:function(t){console.log(t),this.listQuery.productCategoryId=null!=t?t[t.length-1>0?t.length-1:0]:null}},mounted:function(){this.$refs["btnbar"].setButtonList(this.btnList)},created:function(){this.getList(),this.getBrandList(),this.getProductCateList(),this.getProductAttrCateList()},methods:{clicksearchShow:function(){this.isSearchShow=!this.isSearchShow,this.isSearchShow?this.searchxianshitit="隐藏查询条件":this.searchxianshitit="显示查询条件"},btnHandle:function(t){switch(t){case"doClose":this.doClose();break;default:break}},dosearch:function(){this.queryParams.current=1},resetQuery:function(){this.queryParams={current:1,size:10,total:0,params:{orderId:"",supplierName:"",auditStatus:"",goodsStatus:"",orderStartDate:"",orderEndDate:"",arrivalStartDate:"",arrivalEndDate:"",queryType:""}}},doClose:function(){this.$store.dispatch("tagsView/delView",this.$route),this.$router.go(-1)},handleGoods:function(t,e){this.listQuery.status=t.name,this.getList()},getProductSkuSp:function(t,e){return 0===e?t.sp1:1===e?t.sp2:t.sp3},getList:function(){var t=this;this.listLoading=!0,Object(l["c"])(this.listQuery).then((function(e){t.listLoading=!1,t.list=e.data.records,t.total=e.data.total}))},getBrandList:function(){var t=this;Object(p["c"])({pageNum:1,pageSize:100}).then((function(e){t.brandOptions=[];for(var a=e.data.records,n=0;n<a.length;n++)t.brandOptions.push({label:a[n].name,value:a[n].id})}))},getProductCateList:function(){var t=this;Object(h["e"])().then((function(e){var a=e.data;t.productCateOptions=[];for(var n=0;n<a.length;n++){var r=[];if(null!=a[n].children&&a[n].children.length>0)for(var u=0;u<a[n].children.length;u++)r.push({label:a[n].children[u].name,value:a[n].children[u].id});t.productCateOptions.push({label:a[n].name,value:a[n].id,children:r})}}))},getProductAttrCateList:function(){var t=this;Object(m["c"])().then((function(e){var a=e.data.records;t.productAttributeCategoryOptions=[];for(var n=0;n<a.length;n++)t.productAttributeCategoryOptions.push({label:a[n].name,value:a[n].id})}))},handleShowVeriyEditDialog:function(t,e){var a=this;this.vertyProduct.dialogVisible=!0,this.vertyProduct.productId=e.id,this.vertyProduct.verifyStatus=e.verifyStatus,Object(l["d"])(e.id).then((function(t){a.vertyProduct.list=t.data}))},handleShowSkuEditDialog:function(t,e){var a=this;this.editSkuInfo.dialogVisible=!0,this.editSkuInfo.productId=e.id,this.editSkuInfo.productSn=e.productSn,this.editSkuInfo.productAttributeCategoryId=e.productAttributeCategoryId,this.editSkuInfo.keyword=null,o(e.id,{keyword:this.editSkuInfo.keyword}).then((function(t){a.editSkuInfo.stockList=t.data})),e.productAttributeCategoryId&&e.productAttributeCategoryId>0&&Object(d["a"])(e.productAttributeCategoryId,{type:0}).then((function(t){a.editSkuInfo.productAttr=t.data.records}))},handleSearchEditSku:function(){var t=this;o(this.editSkuInfo.productId,{keyword:this.editSkuInfo.keyword}).then((function(e){t.editSkuInfo.stockList=e.data}))},handleEditSkuConfirm:function(){var t=this;null==this.editSkuInfo.stockList||this.editSkuInfo.stockList.length<=0?this.$message({message:"暂无sku信息",type:"warning",duration:1e3}):this.$confirm("是否要进行修改","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){c(t.editSkuInfo.productId,t.editSkuInfo.stockList).then((function(e){t.$message({message:"修改成功",type:"success",duration:1e3}),t.editSkuInfo.dialogVisible=!1}))}))},handleEditVConfirm:function(){var t=this;null!=this.vertyProduct.detail?this.$confirm("是否要进行审核","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e=new URLSearchParams;e.append("ids",t.vertyProduct.productId),e.append("verifyStatus",t.vertyProduct.verifyStatus),e.append("detail",t.vertyProduct.detail),Object(l["m"])(e).then((function(e){t.$message({message:"修改成功",type:"success",duration:1e3}),t.getList()})),t.vertyProduct.dialogVisible=!1})):this.$message({message:"暂无审核信息",type:"warning",duration:1e3})},handleSearchList:function(){this.listQuery.pageNum=1,this.getList()},handleAddProduct:function(){this.$router.push({path:"/pms/addProduct"})},handleBatchOperate:function(){var t=this;null!=this.operateType?null==this.multipleSelection||this.multipleSelection.length<1?this.$message({message:"请选择要操作的商品",type:"warning",duration:1e3}):this.$confirm("是否要进行该批量操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){for(var e=[],a=0;a<t.multipleSelection.length;a++)e.push(t.multipleSelection[a].id);switch(t.operateType){case t.operates[0].value:t.updatePublishStatus(1,e);break;case t.operates[1].value:t.updatePublishStatus(0,e);break;case t.operates[2].value:t.updateRecommendStatus(1,e);break;case t.operates[3].value:t.updateRecommendStatus(0,e);break;case t.operates[4].value:t.updateNewStatus(1,e);break;case t.operates[5].value:t.updateNewStatus(0,e);break;case t.operates[6].value:break;case t.operates[7].value:t.updateDeleteStatus(1,e);break;default:break}t.getList()})):this.$message({message:"请选择操作类型",type:"warning",duration:1e3})},handleSizeChange:function(t){this.listQuery.pageNum=1,this.listQuery.pageSize=t,this.getList()},handleCurrentChange:function(t){this.listQuery.pageNum=t,this.getList()},handleSelectionChange:function(t){this.multipleSelection=t},handlePublishStatusChange:function(t,e){var a=[];a.push(e.id),this.updatePublishStatus(e.publishStatus,a)},handleupdatePaiMaiChange:function(t,e){var a=[];a.push(e.id),this.updatePaiMai(e.publishStatus,a)},handleVipStatusChange:function(t,e){var a=[];a.push(e.id),this.updateVipStatus(e.isVip,a)},handleFenxiaoStatusChange:function(t,e){var a=[];a.push(e.id),this.updateFenxiaoStatus(e.isFenxiao,a)},handleNewStatusChange:function(t,e){var a=[];a.push(e.id),this.updateNewStatus(e.newStatus,a)},handleVerifyStatusChange:function(t,e){var a=[];a.push(e.id),this.updateVerifyStatus(e.verifyStatus,a)},handleRecommendStatusChange:function(t,e){var a=[];a.push(e.id),this.updateRecommendStatus(e.recommandStatus,a)},handleResetSearch:function(){this.selectProductCateValue=[],this.listQuery=Object.assign({},f)},handleDeleteStatus:function(t,e){var a=this;this.$confirm("是否要进行放入回收站操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=[];t.push(e.id),a.updateDeleteStatus(0,t)}))},handleDelete:function(t,e){var a=this;this.$confirm("是否要进行删除操作?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t=[];t.push(e.id),Object(l["b"])(e.id).then((function(t){a.$message({message:"删除成功",type:"success",duration:1e3}),a.getList()}))}))},handleUpdateProduct:function(t,e){this.$router.push({path:"/pms/updateProduct",query:{id:e.id}})},handleShowProduct:function(t,e){console.log("handleShowProduct",e)},handleShowVerifyDetail:function(t,e){console.log("handleShowVerifyDetail",e)},handleShowLog:function(t,e){console.log("handleShowLog",e)},updateVerifyStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("verifyStatus",verifyStatus),Object(l["m"])(n).then((function(t){a.$message({message:"修改成功",type:"success",duration:1e3})}))},updatePublishStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("publishStatus",t),Object(l["k"])(n).then((function(t){a.$message({message:"修改成功",type:"success",duration:1e3})}))},updateFenxiaoStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("newStatus",t),Object(l["h"])(n).then((function(t){a.$message({message:"修改成功",type:"success",duration:1e3})}))},updateVipStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("newStatus",t),Object(l["n"])(n).then((function(t){a.$message({message:"修改成功",type:"success",duration:1e3})}))},updateNewStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("newStatus",t),Object(l["i"])(n).then((function(t){a.$message({message:"修改成功",type:"success",duration:1e3})}))},updateRecommendStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("recommendStatus",t),Object(l["l"])(n).then((function(t){a.$message({message:"修改成功",type:"success",duration:1e3})}))},updateDeleteStatus:function(t,e){var a=this,n=new URLSearchParams;n.append("ids",e),n.append("deleteStatus",t),Object(l["g"])(n).then((function(t){a.$message({message:"回收成功",type:"success",duration:1e3})})),this.getList()}}},g=b,S=a("2877"),v=Object(S["a"])(g,n,r,!1,null,null,null);e["default"]=v.exports}}]);
|