This commit is contained in:
liushuai
2020-01-04 11:47:31 +08:00
parent ee92063163
commit 4f7803d196
3 changed files with 28 additions and 10 deletions

View File

@@ -566,7 +566,8 @@ import {
getMaterial,
searchmateria5,
Dahui,
Tongguo
Tongguo,
yanzheng
} from '@/api/PurchasingCenter/MaterialManagement'
import { mapGetters } from 'vuex'
@@ -755,14 +756,20 @@ export default {
AddGonghuoshang(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
AddGonghuoshang(this.form3.供货商名称).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.dialogFormVisible3 = false
this.getGonghuoshang()
yanzheng(this.form3.供货商名称).then(response => {
if (response.data[0].Column1 === 0) {
AddGonghuoshang(this.form3.供货商名称).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.dialogFormVisible3 = false
this.getGonghuoshang()
} else {
this.dialogFormVisible3 = false
this.$message.error('添加失败')
}
})
} else {
this.dialogFormVisible3 = false
this.$message.error('添加失败')
this.$message.error('该供货商已存在')
}
})
}
@@ -852,7 +859,7 @@ export default {
this.form.物料型号 = row.物料型号
this.form.计量单位流水号 = row.计量单位流水号
this.form.物料来源流水号 = row.物料来源流水号
this.form.GonghuoshangValue = parseInt(row.供货商流水号)
parseInt(row.供货商流水号) === 721 ? this.form.GonghuoshangValue = 1 : this.form.GonghuoshangValue = parseInt(row.供货商流水号)
this.getSelect(initMaterialCategory, ['物料类别', '物料类别流水号'], 'MaterialCategory1')
this.getSelect(initMaterialVariety, ['物料品种', '物料品种流水号'], 'MaterialVariety1', row.物料类别流水号)
},