|
@@ -357,14 +357,19 @@
|
|
|
let params = {
|
|
let params = {
|
|
|
SuppTypeCode: '',
|
|
SuppTypeCode: '',
|
|
|
}
|
|
}
|
|
|
- _this.$axios.get('/suppliercertappend/getsupplier', {params})
|
|
|
|
|
|
|
+ _this.$axios.get('/suppliercertappend/getsupplier', {
|
|
|
|
|
+ params
|
|
|
|
|
+ })
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
_this.supplierList = res.data
|
|
_this.supplierList = res.data
|
|
|
if (_this.supplierList) {
|
|
if (_this.supplierList) {
|
|
|
_this.suplen = _this.supplierList.length
|
|
_this.suplen = _this.supplierList.length
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
_this.suplen = 0
|
|
_this.suplen = 0
|
|
|
}
|
|
}
|
|
|
|
|
+ if (_this.IsCompanyUser == 1 && _this.supplierList) {
|
|
|
|
|
+ _this.entityForm.SupplierId = _this.supplierList[0].SupplierId
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(err => {
|
|
.catch(err => {
|
|
|
console.error(err)
|
|
console.error(err)
|
|
@@ -385,7 +390,38 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
addinfochange() {
|
|
addinfochange() {
|
|
|
- this.addshow = true
|
|
|
|
|
|
|
+ if (this.IsCompanyUser === 1) {
|
|
|
|
|
+ this.addInfoChangeCom()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.addshow = true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ addInfoChangeCom() {
|
|
|
|
|
+ api.addInfoChMain(this.entityForm, this.$axios).then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ //保存成功后,初始化数据,变成修改
|
|
|
|
|
+ this.entityForm.Id = res.data.item;
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: '/oilsupplier/infochangech/' + this.entityForm.SupplierId + '/operation',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ InfoStatus: 0,
|
|
|
|
|
+ infoId: this.entityForm.Id ,
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
addInfoChange() {
|
|
addInfoChange() {
|
|
|
this.$refs['EntityFormref'].validate((valid) => {
|
|
this.$refs['EntityFormref'].validate((valid) => {
|