Commit 11d8074b authored by 黄奎's avatar 黄奎

批量设置价格调整

parent 08975c09
......@@ -244,12 +244,14 @@
</el-input>
</el-form-item>
<el-form-item label="订金比例" v-if="currentUserInfo.MallBaseId==19" prop="DepositRatio">
<el-tooltip class="item" effect="dark" content="=0的时候支付全款,>0的时候首次支付按订单总金额*订金比例支付" placement="top-start"
style="position: absolute;left: -22px;top:12px">
<el-tooltip class="item" effect="dark" content="=0的时候支付全款,>0的时候首次支付按订单总金额*订金比例支付"
placement="top-start" style="position: absolute;left: -22px;top:12px">
<i class="elzk el-tooltip el-icon-info"></i>
</el-tooltip>
<el-input v-model="addMsg.DepositRatio" type="number" min="1" size="small" placeholder="请输入内容"
class="input-with-select"> <el-button slot="append">%</el-button></el-input>
class="input-with-select">
<el-button slot="append">%</el-button>
</el-input>
</el-form-item>
<el-form-item label="原价" prop="OriginalPrice">
<el-tooltip class="item" effect="dark" content="以划线形式显示" placement="top-start"
......@@ -386,7 +388,7 @@
</div>
</div>
</div>
<div v-show="SpecificationPriceList.length > 0" 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-form-item label-width="90px" style="display:inline-block" label="批量设置">
......@@ -394,15 +396,16 @@
<template v-if="SpecificationList&&SpecificationList.length>0">
<template v-for="(rItem,rIndex) in SpecificationList">
&nbsp;{{rItem.Name}}: <el-select :label="rItem.Name" v-model="rItem.CheckList"
:key="rIndex" multiple>
:key="rIndex" multiple style="width:130px" size="small">
<el-option label="全部" :value="-1"></el-option>
<el-option v-for="(subItem,subIndex) in rItem.SpecificationValueList"
:key="subIndex" :label="subItem.Name" :value="subItem.Id"></el-option>
:key="subIndex" :label="subItem.Name" :value="subIndex+1"></el-option>
</el-select>
</template>
</template>
<el-input style="width:100%" size="small" v-model="valpl" placeholder="请输入内容"
<el-input style="width:280px;" size="small" v-model="valpl" placeholder="请输入内容"
class="input-with-select">
<el-select style="width:120px" v-model="ggpl" slot="prepend" placeholder="请选择">
<el-select style="width:100px" v-model="ggpl" slot="prepend" placeholder="请选择">
<el-option label="价格" :value="1"></el-option>
<el-option label="库存" :value="2"></el-option>
<el-option label="成本价" :value="5"></el-option>
......@@ -410,9 +413,8 @@
<el-option label="货号" :value="4"></el-option>
<el-option v-if="FxState==1" label="返佣总金额" :value="6"></el-option>
</el-select>
<el-button @click="ggPlSet" slot="append">确定</el-button>
<el-button @click="hphlSetValue" slot="append">确定</el-button>
</el-input>
</template>
<template v-else>
<el-input style="width:100%" size="small" v-model="valpl" placeholder="请输入内容"
......@@ -427,11 +429,8 @@
</el-select>
<el-button @click="ggPlSet" slot="append">确定</el-button>
</el-input>
</template>
</el-form-item>
</div>
<el-table ref="table" :data="SpecificationPriceList" border style="width: 100%"
@selection-change="TbaleSelectionChange" max-height="450">
......@@ -465,7 +464,7 @@
size="small"></el-input>
</template>
</el-table-column>
<el-table-column :render-header="renderHeader" v-if="FxState==1" width="120" label="返佣总金额">
<template slot-scope="scope">
<el-input v-model="scope.row.Commission"
......@@ -1275,7 +1274,7 @@
GoodsUrl: "", //简介
goodsLogo: "", //商品Logo
IsKorea: 0, //是否为韩国馆
DepositRatio:0,//订金比例
DepositRatio: 0, //订金比例
},
predefineColors: [
'#000000',
......@@ -1388,6 +1387,7 @@
isShowPlat: true, //是否显示上架版面和分类
isShowTax: false, //赞羊显示是否可开发票
currentUserInfo: {}, //当前登录用户
checkSpecList: [],
};
},
created() {
......@@ -1588,6 +1588,66 @@
TbaleSelectionChange2(val) {
this.pusetList = val;
},
//和平航旅设置价格
hphlSetValue() {
//表格选中的行
if (this.ggplList.length == 0) {
this.Error("至少选择一项!");
return;
}
var that = this;
var chooseSpecList = [];
if (this.skuList && this.skuList.length > 0) {
this.skuList.forEach(item => {
var SpecificationSort = "";
item.forEach((item2, index2) => {
var currSpec = that.SpecificationList[index2];
if (currSpec && currSpec.CheckList && currSpec.CheckList.length > 0) {
//是否包含全部
var allIndex = currSpec.CheckList.findIndex(eItem => eItem == -1);
//是否包含选中的属性
var findIndex = currSpec.CheckList.findIndex(eItem => eItem == item2.SVId);
if (findIndex > -1 || allIndex > -1) {
let str = ":";
if (index2 == item.length - 1) {
str = "";
}
SpecificationSort += item2.SVId + str;
}
}
});
if (SpecificationSort && SpecificationSort != '') {
chooseSpecList.push(SpecificationSort);
}
})
}
this.SpecificationPriceList.forEach((item, index) => {
this.ggplList.forEach(subItem => {
var findRow = chooseSpecList[index];
if (subItem.SpecificationSort == findRow) {
console.log(findRow, "findRow")
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;
}
if (this.ggpl == 5) {
item.CostMoney = this.valpl;
}
if (this.ggpl == 6) {
item.Commission = this.valpl;
}
}
});
});
},
ggPlSet() {
if (this.ggplList.length == 0) {
this.Error("至少选择一项!");
......@@ -1682,8 +1742,8 @@
IsDateFormat: 0, //默认0,1-是,是日期格式,方便后面转换成日期
StartDate: "", //开始时间
EndDate: "", //结束时间
IsCheckAll:false,
CheckList:[],
IsCheckAll: false,
CheckList: [],
};
this.SpecificationList.push(obj);
},
......
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