Commit 39c280d0 by LJM

css

parent 0b9224a0
Showing with 25 additions and 4 deletions
......@@ -671,20 +671,41 @@ export default {
})
},
changeStatus(status) {
var time_arr = [];//过滤出上架有效期时间数组
var sku_ids = [];//过滤出sku_ids数组
if (this.multipleSelection.length == 0) {
this.$message({
message: '请至少选择一条数据',
type: 'warning'
});
return
return;
}
var time = new Date();//当前时间
time_arr = this.multipleSelection.map(obj => {
return obj.cp_time;
});
var times = time_arr.filter((item) => {
if (new Date(item) < time) {
return item;
}
});
if (times.length > 0) {
this.$message({
message: '您勾选的数据中,有型号的“上架有效期”低于当前的日期,请先维护上架有效期;',
type: 'warning'
});
return;
}
var arr = [];
arr = this.multipleSelection.map(obj => {
sku_ids = this.multipleSelection.map(obj => {
return obj.goods_id;
});
this.$http('post', "/api/sku/updateSkuStatus", {
sku_ids: arr.join(","),
sku_ids: sku_ids.join(","),
status: status == 1 ? 'passed' : 'offshelf'
}).then(res => {
if (res.code === 0) {
......
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 sign in to comment