Commit df216430 by yancanhua

fix: 点击上架不在有效期不请求接口

1 parent ec1d5cac
......@@ -883,12 +883,14 @@ export default {
})
},
handleUpOrDown(row) {
var launchText = '上架后重新进入审核流程;是否确定上架?';
if(row.sellPriceValidType == 2 && row.tempValidEndDate){
var launchText = '上架后重新进入审核流程;是否确定上架?';
var launchStatus = 1;
if (row.sellPriceValidType == 2 && row.tempValidEndDate && row.status != 1) {
var now = new Date();
var nowTime = now.getTime();
if(row.tempValidEndDate < nowTime){
launchText = '此商品售价有效期已过,请先到编辑页面维护后再上架,是否确认继续?';
if (row.tempValidEndDate < nowTime) {
launchText = '此商品售价有效期已过,请先到编辑页面维护后再上架,是否确认继续?';
launchStatus = 0;
}
}
var html = row.status == '0' ? launchText : '下架后对应的门店无法再使用该商品,是否确定下架?';
......@@ -897,11 +899,13 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const selfStatus = row.status == 1 ? 0 : 4
updateGoodsStatus({ id: row.id, status: selfStatus }).then(res => {
this.notice.okTips()
this.$refs.groundingIndexTable.refreshTable()
})
if (launchStatus) {
const selfStatus = row.status == 1 ? 0 : 4
updateGoodsStatus({ id: row.id, status: selfStatus }).then(res => {
this.notice.okTips()
this.$refs.groundingIndexTable.refreshTable()
})
}
}).catch(err => {
console.log(err)
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!