|
@@ -364,41 +364,44 @@
|
|
|
_this.appendformData.AppendType = '01'
|
|
_this.appendformData.AppendType = '01'
|
|
|
_this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
|
|
_this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
|
|
|
console.log(_this.appendformData, '数据')
|
|
console.log(_this.appendformData, '数据')
|
|
|
- if (!_this.appendformData.SupplierId || !_this.appendformData.SupplierName) {
|
|
|
|
|
- _this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: '请选择供应商公司'
|
|
|
|
|
|
|
+ // if (!_this.appendformData.SupplierId) {
|
|
|
|
|
+ // _this.$message({
|
|
|
|
|
+ // type: 'warning',
|
|
|
|
|
+ // message: '请选择供应商公司'
|
|
|
|
|
+ // })
|
|
|
|
|
+ // return
|
|
|
|
|
+ // }
|
|
|
|
|
+ _this.$axios.post('/suppliercertappend/addappend/', _this.appendformData)
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ if (res.data.code === 0) {
|
|
|
|
|
+ //this.entityList = res.data.item
|
|
|
|
|
+ let AppendId = res.data.info
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: `/oilsupplier/supplierappend/1/goodsdataopera`,
|
|
|
|
|
+ query: {
|
|
|
|
|
+ Id: AppendId,
|
|
|
|
|
+ editFlag: 1 //编辑标记: 1 修改,0 不修改
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ _this.$message({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ _this.$message({
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ message: res.data.message
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- this.appendformData.SupplierId = ''
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- api.judgeAppend(_this.appendformData, _this.$axios).then(res => {
|
|
|
|
|
- if (res.data.code === 0) {
|
|
|
|
|
- //this.entityList = res.data.item
|
|
|
|
|
- let AppendId = res.data.info
|
|
|
|
|
- this.$router.push({
|
|
|
|
|
- path: `/oilsupplier/supplierappend/1/goodsdataopera`,
|
|
|
|
|
- query: {
|
|
|
|
|
- Id: AppendId,
|
|
|
|
|
- editFlag: 1 //编辑标记: 1 修改,0 不修改
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- _this.$message({
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- _this.appendformData.SupplierId = ''
|
|
|
|
|
- _this.$message({
|
|
|
|
|
- type: 'warning',
|
|
|
|
|
- message: res.data.message
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
|
+ .catch(err => {
|
|
|
|
|
+ console.error(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- getSupplierList () {
|
|
|
|
|
|
|
+ getSupplierList() {
|
|
|
let _this = this
|
|
let _this = this
|
|
|
_this.supplierList = []
|
|
_this.supplierList = []
|
|
|
let params = {
|
|
let params = {
|