Commit df216430 by yancanhua

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

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