Commit 81c1c15a authored by 黄媛媛's avatar 黄媛媛

update

parent 0e964435
......@@ -2,7 +2,7 @@
<div class="goodsList">
<div class="head-title">
商品列表
<el-button style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">商品导出</el-button>
<el-button @click="Export" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">商品导出</el-button>
<el-button @click="CommonJump('goodsListEdit')" style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">添加商品</el-button>
<el-button style="float:right;margin-top: -5px;margin-left:20px;" size="small" type="primary">更新所有商品销量</el-button>
......@@ -170,8 +170,8 @@
width="200"
label="操作">
<template slot-scope="scope">
<img @click="Delete(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/edit.png" alt="">
<img @click="Edit(scope.row,6)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
<img @click="CommonJump('goodsListEdit',{GoodsId:scope.row.Id})" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/edit.png" alt="">
<img @click="Delete(scope.row)" style="width:32px;height:32px;margin:0 10px" src="../../assets/img/userman/del.png" alt="">
</template>
</el-table-column>
</el-table>
......@@ -435,7 +435,16 @@ export default {
this.getRule();
},
methods:{
Export(){
let msg = this.msg;
msg = JSON.parse(JSON.stringify(msg));
msg.pageSize=999;
this.JavaGetLocalFile(
"/api/product/GetProductGoodsListToExcel",
msg,
"商品列表.xls"
);
},
plsetOk(){
if(this.plszMsg.Type==7){
// if(this.plszMsg.FreightId==0){
......@@ -608,7 +617,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost('/api/product/DelProductServiceInfo',{ServiceId:item.Id},
this.apipost('/api/product/DelProcudtGoodsInfo',{GoodsId:item.Id},
res => {
if (res.data.resultCode === 1) {
this.getList();
......
......@@ -16,7 +16,7 @@
<el-col :span="12">
<el-form-item label="商品分类">
<template v-if="addMsg.CategoryList && addMsg.CategoryList.length>0">
<el-tag type="warning" style="margin-right:10px;" @close="exitCheck(item,index)" v-for="(item,index) in addMsg.CategoryList" :key="index" closable>{{item.Name}}</el-tag>
<el-tag type="warning" style="margin-right:10px;" @close="exitCheck(item,index)" v-for="(item,index) in addMsg.CategoryList" :key="index" closable>{{item.CategoryName}}</el-tag>
</template>
<el-button type="primary" @click="flDig=true,keepCategoryList=addMsg.CategoryList" style="margin:0 10px;" size="small">选择分类</el-button>
<span @click="CommonJump('addGoodsClass')" class="blue point">添加分类</span>
......@@ -165,7 +165,7 @@
<el-input v-model="addMsg.InventoryNum" type="number" min="1" size="small" placeholder="请输入内容" class="input-with-select"></el-input>
</el-form-item>
<el-form-item label="默认规则名">
<el-input v-model="addMsg.DefaultSpecificationName" size="small" placeholder="请输入内容" class="input-with-select"></el-input>
<el-input :disabled="SpecificationList.length>0" v-model="addMsg.DefaultSpecificationName" size="small" placeholder="请输入内容" class="input-with-select"></el-input>
</el-form-item>
<el-form-item label="商品规格">
<el-tooltip class="item" effect="dark" content="如有颜色、尺码等多种规格,请添加商品规格" placement="top-start"
......@@ -177,7 +177,7 @@
<div v-for="(item,index) in SpecificationList" :key="index" style="margin-bottom:16px;">
<div flex="dir:left cross:center" class="bg">
<span>规格名:</span>
<el-input v-model="item.Name" size="mini" style="width: 94px;margin: 0px 16px;"></el-input>
<el-input @input="ggzChange" v-model="item.Name" size="mini" style="width: 94px;margin: 0px 16px;"></el-input>
<el-checkbox @change="CheckBox" v-show="index==0" v-model="item.EnabledImage" :true-label="1" :false-label="2">规格图片</el-checkbox>
<div style="margin-left: auto; line-height: 1;">
<div @click="DeleteggModule(item,index)" class="el-image del-img">
......@@ -189,7 +189,7 @@
<div class="box-grow-0">规格值:</div>
<div v-for="(item2,index2) in item.SpecificationValueList" :key="index2" flex="dir:left" style="flex-wrap: wrap;">
<div class="attr-list">
<el-input size="mini" v-model="item2.Name" width="152px"></el-input>
<el-input @input="ggzChange" size="mini" v-model="item2.Name" width="152px"></el-input>
<i @click="Deleteggz(item,index,index2)" class="el-icon-error close"></i>
<div v-if="index==0 && item.EnabledImage==1" flex="cross:center main:center" class="img-box">
<div class="attr-jt"></div>
......@@ -201,33 +201,37 @@
</div>
</div>
</div>
<div flex="dir:left" style="flex-wrap: wrap;">
<span @click="addGgz(item,index)" class="blue f12">添加规格值</span>
</div>
</div>
</div>
<div v-if="SpecificationList.length<6" flex="dir:left cross:center" class="bg">
<el-button @click="addggModeule" size="small">添加规格模板</el-button>
<el-button size="small">添加规格项目</el-button>
<el-button @click="addggxm" size="small">添加规格项目</el-button>
<span style="padding-left: 14px;color: rgb(201, 201, 201)">注:规格名最多添加5个</span>
</div>
</div>
</div>
<div style="width: 130%; margin-top: 24px;">
<div v-show="SpecificationPriceList.length>0" style="width: 130%; margin-top: 24px;">
<div class="app-attr">
<div class="box">
<!-- <el-checkbox v-model="val2">全选</el-checkbox> -->
<el-form-item label-width="90px" style="display:inline-block" label="批量设置">
<el-input style="width:560px" size="small" v-model="addMsg.GoodsNumbers" placeholder="请输入内容" class="input-with-select">
<el-select v-model="val2" slot="prepend" placeholder="请选择">
<el-option label="餐厅名" value="1"></el-option>
<el-option label="订单号" value="2"></el-option>
<el-option label="用户电话" value="3"></el-option>
<el-input style="width:560px" size="small" v-model="valpl" placeholder="请输入内容" class="input-with-select">
<el-select style="width:120px" v-model="ggpl" slot="prepend" placeholder="请选择">
<el-option label="价格" :value="1"></el-option>
<el-option label="库存" :value="2"></el-option>
<el-option label="重量(g)" :value="3"></el-option>
<el-option label="货号" :value="4"></el-option>
</el-select>
<el-button slot="append" >确定</el-button>
<el-button @click="ggPlSet" slot="append" >确定</el-button>
</el-input>
</el-form-item>
</div>
<el-table
ref="table"
:data="tableData"
:data="SpecificationPriceList"
border
style="width: 100%"
@selection-change="TbaleSelectionChange">
......@@ -235,38 +239,43 @@
type="selection"
width="55">
</el-table-column>
<el-table-column
v-for="(item,index) in SpecificationList"
:key="index"
<template v-for="(item,index) in SpecificationList">
<el-table-column :key="index"
:label="item.Name">
<template slot-scope="scope">
<span v-if="index==index2" v-for="(item2,index2) in scope.row.AttrList" :key="index2">
{{scope.row.AttrList[index2].SVName}}
</span>
</template>
</el-table-column>
</template>
<el-table-column
:render-header="renderHeader"
label="价格">
<template slot-scope="scope">
<el-input size="small"></el-input>
<el-input v-model="scope.row.SellingPrice" size="small"></el-input>
</template>
</el-table-column>
<el-table-column
:render-header="renderHeader"
label="库存">
<template slot-scope="scope">
<el-input size="small"></el-input>
<el-input v-model="scope.row.InventoryNum" size="small"></el-input>
</template>
</el-table-column>
<el-table-column
label="重量">
label="重量(克)">
<template slot-scope="scope">
<el-input size="small"></el-input>
<el-input v-model="scope.row.GoodsWeight" size="small"></el-input>
</template>
</el-table-column>
<el-table-column
prop="address"
label="货号">
<template slot-scope="scope">
<el-input size="small"></el-input>
<el-input v-model="scope.row.GoodsNumbers" size="small"></el-input>
</template>
</el-table-column>
</el-table>
......@@ -444,14 +453,158 @@
:inactive-value="0">
</el-switch>
</el-form-item>
<template v-if="addMsg.SeparateDistribution==1">
<el-form-item label="分销类型">
<el-radio v-model="addMsg.SeparateDistributionType" :label="1">普通设置</el-radio>
<el-radio v-model="addMsg.SeparateDistributionType" :label="2">详细设置</el-radio>
<el-radio @change="butionType" v-model="addMsg.SeparateDistributionType" :label="2">详细设置</el-radio>
</el-form-item>
<el-form-item label="分销佣金类型">
<el-radio v-model="addMsg.SeparateDistributionMoneyType" :label="2">固定金额</el-radio>
<el-radio v-model="addMsg.SeparateDistributionMoneyType" :label="1">百分比</el-radio>
</el-form-item>
<el-form-item class="111">
<div v-if="addMsg.SeparateDistributionType==1" class="app-attr">
<div class="box">
<el-form-item label-width="90px" style="display:inline-block" label="批量设置">
<el-select style="width:130px" v-model="pusetVal" size="small">
<el-option v-for="(item,index) in butorInt" :label="`${index+1}级分销`" :value="index+1" :key="index"></el-option>
</el-select>
<el-input style="width:150px;position:relative;top:5px" size="small" v-model="ptinput" placeholder="请输入内容">
<el-button slot="append" >%</el-button>
</el-input>
<el-button @click="PuSet" style="position:relative;" size="small" type="primary">设置</el-button>
</el-form-item>
</div>
<el-table
ref="table"
:data="GradeCommissionList"
border
style="width: 100%"
@selection-change="TbaleSelectionChange2">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
width="100"
label="等级名称">
<template slot-scope="scope">
<template v-for="(item2,index) in DropdownList">
<span :key="index" v-if="scope.row.DistributorGrade==item2.Id">{{item2.Name}}</span>
</template>
</template>
</el-table-column>
<template v-for="(item,index) in butorIntList">
<el-table-column :key="index"
:label="item.Name">
<template slot-scope="scope">
<span>
<el-input v-model="scope.row.OneCommission" v-if="index==0" size="small">
<el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType==2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType==1">%</span>
</el-button>
</el-input>
<el-input v-model="scope.row.TwoCommission" v-if="index==1" size="small">
<el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType==2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType==1">%</span>
</el-button>
</el-input>
<el-input v-model="scope.row.ThreeCommission" v-if="index==2" size="small">
<el-button slot="append">
<span v-if="addMsg.SeparateDistributionMoneyType==2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType==1">%</span>
</el-button>
</el-input>
</span>
</template>
</el-table-column>
</template>
</el-table>
</div>
</el-form-item>
<el-form-item class="222">
<div v-if="addMsg.SeparateDistributionType==2" class="app-attr">
<div class="box">
<el-form-item label-width="90px" style="display:inline-block" label="批量设置">
<el-select style="width:130px" v-model="gradeVal" size="small">
<el-option v-for="(item,index) in DropdownList" :label="item.Name" :value="item.Grade" :key="index"></el-option>
</el-select>
<el-select style="width:130px" v-model="fxVal" size="small">
<el-option v-for="(item,index) in butorInt" :label="`${index+1}级分销`" :value="index+1" :key="index"></el-option>
</el-select>
<el-input style="width:150px;position:relative;top:5px" size="small" v-model="xxVal" placeholder="请输入内容">
<el-button slot="append" >
<span v-if="addMsg.SeparateDistributionMoneyType==2"></span>
<span v-if="addMsg.SeparateDistributionMoneyType==1">%</span>
</el-button>
</el-input>
<el-button @click="xxSet" style="position:relative;" size="small" type="primary">设置</el-button>
</el-form-item>
</div>
<el-table
ref="table"
:data="disList2"
border
style="width: 100%"
@selection-change="TbaleSelectionChange3">
<template v-for="(item,index) in SpecificationList">
<el-table-column :key="index"
:label="item.Name"
width="100">
<template slot-scope="scope">
<span v-if="index==index2" v-for="(item2,index2) in scope.row.AttrList" :key="index2">
{{scope.row.AttrList[index2].SVName}}
</span>
</template>
</el-table-column>
</template>
<template v-for="(item,index3) in DropdownList">
<el-table-column :key="index3"
:label="item.Name">
<el-table-column
width="100"
v-if="butorInt>0"
label="一级分销">
<template slot-scope="scope">
<el-input v-model="scope.row.GradeCommissionList[index3].OneCommission" size="small">
</el-input>
</template>
</el-table-column>
<el-table-column
width="100"
v-if="butorInt>1"
label="二级分销">
<template slot-scope="scope">
<el-input v-model="scope.row.GradeCommissionList[index3].TwoCommission" size="small">
</el-input>
</template>
</el-table-column>
<el-table-column
width="100"
v-if="butorInt>2"
label="三级分销">
<template slot-scope="scope">
<el-input v-model="scope.row.GradeCommissionList[index3].ThreeCommission" size="small">
</el-input>
</template>
</el-table-column>
</el-table-column>
</template>
<el-table-column
type="selection"
:fixed="true"
width="55">
</el-table-column>
</el-table>
</div>
</el-form-item>
</template>
</el-tab-pane>
<el-tab-pane label="会员价设置" name="third">
<el-form-item label="是否享受会员功能">
......@@ -645,9 +798,7 @@ export default {
},
data() {
return {
tableData:[{
Id:1
}],
tableData:[],
SpecificationList:[],
SpecificationPriceList:[],
speciDigActive:-1,
......@@ -758,25 +909,138 @@ export default {
val1:{},
keepFormsId:-1,
AreaList:[],
skuList:[],
GoodsId:'',
butorInt:0,
butorIntList:[],
DropdownList:[],
DistributionCommissionTreeList:[],
disList1:[
{
SpecificationSort:'',
GradeCommissionList:[],
}
],
disList2:[],
GradeCommissionList:[],
ggpl:'',
ggplList:[],
valpl:'',
pusetVal:'',
pusetList:[],
ptinput:'',
fxVal:'',
gradeVal:'',
xxVal:'',
xxList:[],
};
},
created(){},
mounted() {
if(this.$route.query.UserId){
this.UserId=this.$route.query.UserId;
// this.getData()
if(this.$route.query.GoodsId){
this.GoodsId=this.$route.query.GoodsId;
this.getData()
}else{
this.$refs.ue.InitData();
}
this.getTree();
this.getService();
this.getRule();
this.getSpeciList();
this.getDistributor();
},
methods: {
TbaleSelectionChange(){},
TbaleSelectionChange3(val){
this.xxList=val;
},
xxSet(){
if(this.gradeVal===''){
this.Error("请选择等级!");
return;
}
if(this.fxVal===''){
this.Error("请选择层级!");
return;
}
// this.disList2.forEach(item=>{
// item=JSON.parse(JSON.stringify(item))
// item.GradeCommissionList(grade=>{
// this.pusetList.forEach(list=>{
// if(item.Id==list.Id){
// if(grade.DistributorGrade==this.gradeVal){
// if(this.fxVal==1){
// grade.OneCommission=this.xxVal;
// }
// if(this.fxVal==2){
// grade.TwoCommission=this.xxVal;
// }
// if(this.fxVal==3){
// grade.ThreeCommission=this.xxVal;
// }
// }
// }
// })
// })
// })
},
PuSet(){
this.GradeCommissionList.forEach(item=>{
this.pusetList.forEach(list=>{
if(item.DistributorGrade==list.DistributorGrade){
if(this.pusetVal==1){
item.OneCommission=this.ptinput;
}
if(this.pusetVal==2){
item.TwoCommission=this.ptinput;
}
if(this.pusetVal==3){
item.ThreeCommission=this.ptinput;
}
}
})
})
},
TbaleSelectionChange2(val){
this.pusetList=val;
},
ggPlSet(){
if(this.ggplList.length==0){
this.Error("至少选择一项!");
return;
}
this.SpecificationPriceList.forEach(item=>{
this.ggplList.forEach(list=>{
if(item.Id==list.Id){
if(this.ggpl==1){
item.SellingPrice=this.valpl;
}
if(this.ggpl==2){
item.InventoryNum=this.valpl;
}
if(this.ggpl==3){
item.GoodsWeight=this.valpl;
}
if(this.ggpl==4){
item.GoodsNumbers=this.valpl;
}
}
})
})
},
TbaleSelectionChange(val){
this.ggplList=val;
},
renderHeader (h,{column}) { // h即为cerateElement的简写,具体可看vue官方文档
return h(
'div',
......@@ -792,15 +1056,26 @@ export default {
CheckBox(val){
console.log(val);
},
butionType(val){
this.skuList=[];
this.getSkuData([], 0,this.SpecificationList);
},
// 删除规格模板
DeleteggModule(item,index){
this.SpecificationList.splice(index,1);
this.$forceUpdate();
this.skuList=[];
this.getSkuData([], 0,this.SpecificationList);
},
// 删除规格值
Deleteggz(item,index,index2){
this.SpecificationList[index].SpecificationValueList.splice(index2,1);
this.$forceUpdate();
if(this.SpecificationList[index].SpecificationValueList.length==0){
this.SpecificationList.splice(index,1)
}
this.skuList=[];
this.getSkuData([], 0,this.SpecificationList);
},
// 全选
changeCheckAll(item,index){
......@@ -815,6 +1090,33 @@ export default {
this.$forceUpdate();
},
// 添加规格模板
addggxm(){
let that=this;
let obj={
Name:'',
SpecificationValueList:[],
Sort:that.SpecificationList.length
}
this.SpecificationList.push(obj);
},
// 添加规格值
addGgz(item,index){
let obj={
Id:0,
Image:'',
Name:'',
Sort:item.SpecificationValueList.length
};
this.SpecificationList[index].SpecificationValueList.push(obj);
},
// 修改规格值
ggzChange(){
this.$forceUpdate();
this.skuList=[];
this.getSkuData([], 0,this.SpecificationList);
},
chooseSpecificationValueList(){
if(!this.SpecificationList){
this.SpecificationList=[];
......@@ -834,31 +1136,92 @@ export default {
list.Sort=index2;
})
})
console.log("this.SpecificationList",this.SpecificationList)
let SpecificationPriceList=[];
let data=this.SpecificationList;
let namerr=[];
for(let i=0;i<data.length;i++){
namerr.push(`name${i}`)
console.log("namerr",namerr)
for(let j=0;j<data[i].SpecificationValueList.length;j++){
let list= data[i].SpecificationValueList;
for(let k=0;k<namerr.length;k++){
this.skuList=[];
this.getSkuData([], 0,this.SpecificationList);
// console.log("this.skuList",this.skuList)
this.speciDig=false;
},
getSkuData(skuArr = [], i, list) {
       for (let j = 0; j < list[i].SpecificationValueList.length; j++) {
skuArr[i]={};
         if (i < list.length - 1) {
           skuArr[i].SName= list[i].Name;
           skuArr[i].SVName= list[i].SpecificationValueList[j].Name;
           skuArr[i].SVId= list[i].SpecificationValueList[j].Sort;
           this.getSkuData(skuArr, i + 1, list); // 递归循环
         } else {
skuArr[i].SName= list[i].Name;
           skuArr[i].SVName= list[i].SpecificationValueList[j].Name;
           skuArr[i].SVId= list[i].SpecificationValueList[j].Sort;
//            this.skuList.push([...skuArr, list[i].SpecificationValueList[j].Name]); // 扩展运算符,连接两个数组
           this.skuList.push([...skuArr]); // 扩展运算符,连接两个数组
         }
       }
this.calcList(this.skuList,this.SpecificationList);
    },
calcList(list,calist){
this.SpecificationPriceList=[];
let arrList=[];
list.forEach(item=>{
item.AttrList=[];
item.SpecificationSort="";
item.forEach((item2,index2)=>{
let obj={
GoodsNumbers:'',
GoodsWeight:0,
InventoryNum:0,
SellingPrice:0,
SpecificationSort:'',
SName:item2.SName,
SVName:item2.SVName,
SVId:item2.SVId,
};
let str=":";
if(index2==item.length-1){
str="";
}
obj[namerr[k]]=list[j].Name;
SpecificationPriceList.push(obj);
item.SpecificationSort+=item2.SVId+str;
item.GoodsNumbers='';
item.GoodsWeight=0;
item.InventoryNum=0;
item.SellingPrice=0;
item.AttrList.push(obj)
})
})
list.forEach((item,i)=>{
let obj={
AttrList:item.AttrList,
SpecificationSort:item.SpecificationSort,
GoodsNumbers:item.GoodsNumbers,
GoodsWeight:item.GoodsWeight,
InventoryNum:item.InventoryNum,
SellingPrice:item.SellingPrice,
};
let obj1={
Id:i,
AttrList:item.AttrList,
SpecificationSort:item.SpecificationSort,
GradeCommissionList:[],
};
this.SpecificationPriceList.push(obj)
arrList.push(obj1)
})
this.calcdis(JSON.parse(JSON.stringify(arrList)));
},
calcdis(dislist){
dislist.forEach(item=>{
for(let i=0;i<this.DropdownList.length;i++){
let obj={
DistributorGrade:this.DropdownList[i].Id,
OneCommission:0,
TwoCommission:0,
ThreeCommission:0,
Name:item.Name
}
item.GradeCommissionList.push(obj);
}
}
console.log("SpecificationPriceList",SpecificationPriceList)
this.speciDig=false;
})
this.disList2=JSON.parse(JSON.stringify(dislist));
console.log(" this.disList2", this.disList2)
},
addggModeule(){
this.speciDig=true;
......@@ -880,6 +1243,16 @@ export default {
if (valid) {
let content = this.$refs.ue.getUEContent();
this.addMsg.GoodsDetails=content;
if(this.SpecificationList.length>0){
this.addMsg.IsCustomSpecification=1;
}
if(this.addMsg.SeparateDistributionType==1){
this.addMsg.DistributionCommissionList=this.disList1;
} else{
this.addMsg.DistributionCommissionList=this.disList2;
}
this.addMsg.SpecificationPriceList=this.SpecificationPriceList;
this.addMsg.SpecificationList=this.SpecificationList;
this.apipost("/api/product/SetProductGoodsInfo",this.addMsg, res => {
if(res.data.resultCode==1){
this.Success(res.data.message)
......@@ -1028,13 +1401,33 @@ export default {
if(res.data.resultCode==1){
let pageData=res.data.data;
this.fenleiData=pageData;
this.fenleiData.forEach(item=>{
item.CategoryName=item.Name;
})
}
})
},
getData(){
this.apipost("/api/user/GetMemberUserInfo",{UserId:this.UserId}, res => {
this.userInfo=res.data.data;
this.apipost("/api/product/GetProductGoodsInfo",{GoodsId:this.GoodsId}, res => {
this.addMsg=res.data.data;
console.log("addMsg",this.addMsg);
this.SpecificationPriceList=this.addMsg.SpecificationPriceList;
this.SpecificationList=this.addMsg.SpecificationList;
if(this.addMsg.SeparateDistributionType==1){
this.disList1=this.addMsg.DistributionCommissionTreeList;
this.GradeCommissionList=this.addMsg.DistributionCommissionTreeList[0].GradeCommissionList
console.log("this.GradeCommissionList",this.GradeCommissionList)
}
if(this.addMsg.SeparateDistributionType==2){
this.disList2=this.addMsg.DistributionCommissionTreeList;
}
this.disList1=[];
let objNew={
SpecificationSort:'',
GradeCommissionList:this.GradeCommissionList
};
this.disList1.push(objNew);
})
},
getRule(){
......@@ -1067,12 +1460,95 @@ export default {
})
},
getDistributor(){
this.loading=true;
this.apipost("/api/user/GetDistributorBasicsInfo", {}, res => {
this.loading=false;
if(res.data.resultCode==1){
this.butorInt=res.data.data.DistributorTier;
this.butorIntList=[];
for(let i=0;i<res.data.data.DistributorTier;i++){
let msg={
Name:i+1+"级分销",
}
this.butorIntList.push(msg)
}
this.GetDropdownList();
}
})
},
GetDropdownList(){
let msg={
Id:0,
Grade:0,
Name:'',
Enabled:0,
}
this.apipost("/api/user/GetDistributorGradeDropdownList",msg, res => {
this.DropdownList=JSON.parse(JSON.stringify(res.data.data));
let msg={
Grade:0,
GradeCommissionList:[],
Name:'默认等级',
SpecificationSort:'',
Id:0
}
this.DropdownList.unshift(msg)
this.disList1.GradeCommissionList=[];
this.disList1.SpecificationSort="";
this.DropdownList.forEach(item=>{
item.GradeCommissionList=[];
item.SpecificationSort='';
for(let i=0;i<this.butorInt;i++){
let obj={
DistributorGrade:item.Id,
OneCommission:0,
TwoCommission:0,
ThreeCommission:0,
}
item.GradeCommissionList.push(obj);
}
})
this.DropdownList=JSON.parse(JSON.stringify(this.DropdownList));
console.log("this.this.DropdownList",this.DropdownList);
if(!this.$route.query.GoodsId){
this.GradeCommissionList=[];
this.DropdownList.forEach(item=>{
let obj2={
DistributorGrade:item.Id,
OneCommission:0,
TwoCommission:0,
ThreeCommission:0,
Name:item.Name
}
this.GradeCommissionList.push(obj2);
})
this.GradeCommissionList=JSON.parse(JSON.stringify(this.GradeCommissionList))
this.disList1=[];
let objNew={
SpecificationSort:'',
GradeCommissionList:this.GradeCommissionList
};
this.disList1.push(objNew);
console.log("this.disList1",this.disList1);
}
})
},
},
};
</script>
<style>
.goodsListEdit .pendSelect{
width:100px;
}
.goodsListEdit .el-table th>.cell{
padding-left: 20px!important;
}
......
<template>
<div class="orderList afterSalesOrder">
<div class="head-title">
订单列表
售后列表
<el-button @click="dialogVisible=true" style="float:right;margin-top: -5px;" size="small" type="primary">批量导出</el-button>
</div>
<div class="content">
<div>
<span>下单时间:</span>
<span>添加时间:</span>
<el-date-picker
v-model="dateList"
@change="getList"
......@@ -27,16 +27,6 @@
:value="item.Id">
</el-option>
</el-select>
<span style="margin-left:15px">配送方式:</span>
<el-select class="w120" @change="getList" style="margin-right: 10px;" v-model="msg.DeliveryMethod" size="small" placeholder="请选择">
<el-option label="全部订单" :value="0"></el-option>
<el-option
v-for="item in deliveryList"
:key="item.Id"
:label="item.Name"
:value="item.Id">
</el-option>
</el-select>
<el-input @clear="getList" clearable style="margin-left:15px;width:300px" class="input-with-select" placeholder="请输入内容" v-model="msgVal" size="small">
<el-select class="pendSelect" @change="ChangeId" v-model="msgId" slot="prepend" placeholder="请选择">
<el-option
......@@ -54,10 +44,12 @@
<el-tab-pane v-for="item in orderTypeList" :key="item.Id" :dataId="item.Id" :label="item.Name"></el-tab-pane>
</el-tabs>
<div class="app-order-title">
<div style="width: 55%;">商品信息</div>
<div style="width: 20%;">实付金额</div>
<div style="width: 20%;">分销状态</div>
<div style="width: 20%;">分销情况</div>
<div style="width: 50%;">商品信息</div>
<div style="width: 8%;">售后类型</div>
<div style="width: 8%;">订单状态</div>
<div style="width: 8%;">金额</div>
<div style="width: 8%;">申请理由</div>
<div style="width: 18%;">操作</div>
</div>
<div v-loading="loading" class="app-order-list">
<el-card v-for="(item,index) in tableData" :key="index" class="app-order-item" shadow="never">
......@@ -65,13 +57,13 @@
<div flex="cross:center" class="app-order-head">
<div class="app-order-time">{{item.CreateDate}}</div>
<div class="app-order-user">
<span class="app-order-time">订单号:</span>{{item.OrderNo}}
<span class="app-order-time">订单号:</span>{{item.ReOrderNo}}
</div>
<div flex="cross:center" class="app-order-user">
<img v-if="item.OrderSource==1" src="../../assets/img/userman/wx.png" alt="">
<span>{{item.UserName}}</span>
<img v-if="item.OrderModel.OrderSource==1" src="../../assets/img/userman/wx.png" alt="">
<span>{{item.UserName}}({{item.UserId}})</span>
</div>
<div flex="dir:left wrap:wrap" class="app-order-offline">
<!-- <div flex="dir:left wrap:wrap" class="app-order-offline">
<div class="express-send-box">
<span class="el-tag el-tag--small el-tag--light">{{item.DeliveryMethodName}}</span>
</div>
......@@ -87,85 +79,63 @@
<el-tag v-if="item.OrderStatus==7" style="margin-left:5px" size="small" type="danger">已取消</el-tag>
</div>
</div> -->
</div>
</div>
<div class="app-order-body">
<div class="goods-item" style="width: 55%;">
<div v-for="(list,index2) in item.DetailList" :key="index2" class="goods">
<img :src="domainManager().ImageUrl+list.CoverImagePath" class="goods-image">
<div class="goods-item" style="width: 50%;">
<div class="goods">
<img :src="domainManager().ImageUrl+item.OrderDetailModel.CoverImagePath" class="goods-image">
<div flex="dir:left">
<div class="goods-info">
<div class="goods-name">
<div class="app-ellipsis">
<div class="vue-line-clamp" style="word-break: break-all; -webkit-line-clamp: 2;">
<span class="el-tag el-tag--warning el-tag--mini el-tag--light is-hit" style="margin-right: 5px;">
{{list.OrderTypeName}}
</span>
{{list.GoodsName}}
{{item.OrderDetailModel.GoodsName}}
</div>
</div>
</div>
<div style="margin-bottom: 24px;">
<span style="margin-right: 10px;">
规格:
<el-tag style="top: 5px;position: relative;margin-right: 5px; max-width: 300px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" size="mini">
{{list.Specification}}
<el-tag :key="index2" v-for="(list,index2) in item.OrderDetailModel.SpecificationList" style="top: 5px;position: relative;margin-right: 5px; max-width: 300px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;" size="mini">
{{list}}
</el-tag>
</span>
</div>
<div class="app-order-goods-price">
<!-- <div class="app-order-goods-price">
<span>货号:{{list.ProductCode}}</span>
</div>
</div> -->
</div>
<div flex="dir:left box:mean" style="width: 250px;">
<div flex="cross:center main:center">
<span>小计:¥{{list.Final_Price}}
<span>小计:¥{{item.Income}}
</span>
</div>
<div flex="cross:center main:center">数量:x {{list.Number}}</div>
<div flex="cross:center main:center">数量:x {{item.ReNumber}}</div>
</div>
</div>
</div>
</div>
<div flex="cross:center" class="app-order-info" style="width: 15%;">
<div flex="dir:top">
<div flex="cross:center" class="app-order-info" style="width: 8%;">
<div>
<span style="font-size: 16px;">{{item.Income}}</span>
<el-popover
placement="top-start"
title="标题"
width="200"
trigger="hover"
:content="'商品小计 '+ item.Income">
<img slot="reference" src="../../assets/img/userman/price.png" alt="">
</el-popover>
</div>
<div class="express-price"><span>
<span style="color: rgb(144, 147, 153);">(含运费¥{{item.FreightMoney}})
</span>
</span></div>
<div><el-tag effect="dark" type="warning" size="mini">{{item.PaymentWayName}}</el-tag></div>
<span v-if="item.Type==1">退货退款</span>
<span v-if="item.Type==2">换货</span>
</div>
</div>
<div flex="main:center cross:center" class="app-box-info" style="width: 10%;border-right: 1px solid #EBEEF5;">
<div>待结算</div>
<div flex="main:center cross:center" class="app-box-info" style="width: 8%;border-right: 1px solid #EBEEF5;">
<div>{{item.ReOrderStatusName}}</div>
</div>
<div flex="main:center cross:center" class="app-order-info" style="border-right: 0px; width: 15%;">
<div>
<div v-for="(list,index2) in item.OrderCommissionList" :key="index2" shadow="never" style="margin: 10px;">
<div>
<span v-if="list.Grade==0">自购返利</span>
<span v-if="list.Grade==1">一级佣金</span>
<span v-if="list.Grade==2">二级佣金</span>
<span v-if="list.Grade==3">三级佣金</span>
<span class="price">{{list.Commission}}</span>
</div>
<div>昵称:{{list.Name}}</div>
<div>姓名:{{list.UserName}}</div>
<div>手机:{{list.Mobile}}</div>
<div flex="main:center cross:center" class="app-order-info" style="border-right:1px solid #EBEEF5; width: 8%;">
<div>实付金额:¥{{item.Income-item.RefundActual}}</div>
</div>
<div flex="cross:center" class="app-order-info" style="width: 8%;">
<el-tooltip class="item" effect="dark" :content="item.Remark" placement="top">
<div>{{item.Remark}}</div>
</el-tooltip>
</div>
<div flex="main:center cross:center" class="app-order-info" style="width: 18%;">
</div>
</div>
<div class="card-footer">
......@@ -288,18 +258,26 @@ export default {
OrderId:0,
StartTime:'',
EndTime:'',
OrderStatus:0,
OrderNo:'',
UserName:'',
UserId:0,
GoodsName:'',
SelectStatus:0,
ReOrderNo:'',
Consignee:'',
Mobile:'',
},
platList:[],
option:[
{Id:1,name:'订单号'},
{Id:2,name:'用户名'},
{Id:3,name:'用户ID'},
{Id:4,name:'商品名称'}
{Id:2,name:'原订单号'},
{Id:3,name:'用户名'},
{Id:4,name:'用户ID'},
{Id:5,name:'商品名称'},
{Id:6,name:'收件人'},
{Id:7,name:'收件人电话'}
],
msgId:1,
ExpressList:[],
......@@ -370,28 +348,67 @@ export default {
ChangeId(val){
let msgVal=this.msgVal;
if(val==1){
this.msg.OrderNo=msgVal;
this.msg.ReOrderNo=msgVal;
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.Consignee='';
this.msg.Mobile='';
}
if(val==2){
this.msg.ReOrderNo='';
this.msg.OrderNo=msgVal;
this.msg.UserName='';
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.Consignee='';
this.msg.Mobile='';
}
if(val==3){
this.msg.ReOrderNo='';
this.msg.OrderNo='';
this.msg.UserName=msgVal;
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.Consignee='';
this.msg.Mobile='';
}
if(val==3){
if(val==4){
this.msg.ReOrderNo='';
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId=msgVal;
this.msg.GoodsName='';
this.msg.Consignee='';
this.msg.Mobile='';
}
if(val==4){
if(val==5){
this.msg.ReOrderNo='';
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId='';
this.msg.GoodsName=msgVal;
this.msg.Consignee='';
this.msg.Mobile='';
}
if(val==6){
this.msg.ReOrderNo='';
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.Consignee=msgVal;
this.msg.Mobile='';
}
if(val==7){
this.msg.ReOrderNo='';
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.Consignee='';
this.msg.Mobile=msgVal;
}
this.getList();
},
......@@ -427,16 +444,19 @@ export default {
},
handleClick(val){
let dataId=val.$attrs.dataId;
this.msg.OrderStatus=dataId;
this.msg.SelectStatus=dataId;
this.getList();
},
getList(){
if(!this.msgVal || this.msgVal==''){
this.msg.ReOrderNo='';
this.msg.OrderNo='';
this.msg.UserName='';
this.msg.UserId=0;
this.msg.UserId='';
this.msg.GoodsName='';
this.msg.Consignee='';
this.msg.Mobile='';
}
if(this.dateList && this.dateList.length>0){
this.msg.StartTime=this.dateList[0];
......@@ -446,7 +466,7 @@ export default {
this.msg.EndTime='';
}
this.loading=true;
this.apipost("/api/order/GetDistributionOrdersPageList", this.msg, res => {
this.apipost("/api/order/GetGoodsOrderAfterPageList", this.msg, res => {
this.loading=false;
if(res.data.resultCode==1){
this.total=res.data.data.count;
......@@ -472,7 +492,7 @@ export default {
})
},
getOrderType(){
this.apipost("/api/order/GetOrderTypeEnumList",{}, res => {
this.apipost("/api/order/GetAfterSaleSelectStatusEnumList",{}, res => {
this.orderTypeList=res.data.data;
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment