|
@@ -459,24 +459,29 @@ export default {
|
|
|
centered: true,
|
|
|
closable: true,
|
|
|
onOk () {
|
|
|
- if (row.putCost > row.price) {
|
|
|
- // 销售价低于成本价
|
|
|
- _this.$confirm({
|
|
|
- title: '提示',
|
|
|
- content: '售价低于成本价,确认要添加吗?',
|
|
|
- centered: true,
|
|
|
- closable: true,
|
|
|
- onOk () {
|
|
|
- _this.saveNewProduct(row)
|
|
|
- }
|
|
|
- })
|
|
|
- } else {
|
|
|
- _this.saveNewProduct(row)
|
|
|
- }
|
|
|
+ _this.isPutCostDyPrice(row)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ _this.isPutCostDyPrice(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 判断售价低于成本价
|
|
|
+ isPutCostDyPrice (row) {
|
|
|
+ const _this = this
|
|
|
+ if (row.putCost > row.price) {
|
|
|
+ // 销售价低于成本价
|
|
|
+ _this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '售价低于成本价,确认要添加吗?',
|
|
|
+ centered: true,
|
|
|
+ closable: true,
|
|
|
+ onOk () {
|
|
|
+ _this.saveNewProduct(row)
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- this.saveNewProduct(row)
|
|
|
+ _this.saveNewProduct(row)
|
|
|
}
|
|
|
},
|
|
|
// 保存添加的产品到销售列表
|