|
@@ -583,25 +583,24 @@ export default {
|
|
|
if (this.isInster) { return }
|
|
|
const _this = this
|
|
|
// 判断是否已添加此产品
|
|
|
- if (this.dataSource && this.dataSource.length > 0) {
|
|
|
- const hasRow = this.dataSource.find(item => item.productSn == row.productSn)
|
|
|
- if (hasRow) {
|
|
|
- this.$message.info('该产品已在当前销售单中存在!')
|
|
|
- this.productForm = {
|
|
|
- productName: '',
|
|
|
- productCode: hasRow.dealerProductEntity && hasRow.dealerProductEntity.code || '',
|
|
|
- orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
- }
|
|
|
- this.$refs.table.refresh(true)
|
|
|
- return
|
|
|
- } else {
|
|
|
- this.productForm = {
|
|
|
- productName: '',
|
|
|
- productCode: '',
|
|
|
- orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (this.dataSource && this.dataSource.length > 0) {
|
|
|
+ // const hasRow = this.dataSource.find(item => item.productSn == row.productSn)
|
|
|
+ // if (hasRow) {
|
|
|
+ // this.$message.info('该产品已在当前销售单中存在!')
|
|
|
+ // this.productForm = {
|
|
|
+ // productName: '',
|
|
|
+ // productCode: hasRow.dealerProductEntity && hasRow.dealerProductEntity.code || '',
|
|
|
+ // orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
+ // }
|
|
|
+ // this.$refs.table.refresh(true)
|
|
|
+ // } else {
|
|
|
+ // this.productForm = {
|
|
|
+ // productName: '',
|
|
|
+ // productCode: '',
|
|
|
+ // orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
// 自建的单据显示库存不足时
|
|
|
if (row.currentQty < row.salesNums && this.isOwerEdit) {
|
|
|
_this.$confirm({
|
|
@@ -661,6 +660,15 @@ export default {
|
|
|
if (this.showShelfModal) {
|
|
|
this.$refs.chooseShelfProduct.reload()
|
|
|
}
|
|
|
+ }else{
|
|
|
+ if(res.errCode == 'VALID_F_00001'){
|
|
|
+ this.productForm = {
|
|
|
+ productName: '',
|
|
|
+ productCode: row.productCode || '',
|
|
|
+ orderBy: 'sales_bill_detail.CREATE_DATE desc'
|
|
|
+ }
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ }
|
|
|
}
|
|
|
this.isInster = false
|
|
|
// this.spinning = false
|