|
|
@@ -364,44 +364,41 @@
|
|
|
_this.appendformData.AppendType = '01'
|
|
|
_this.appendformData.SupplierId = parseInt(_this.appendformData.SupplierId)
|
|
|
console.log(_this.appendformData, '数据')
|
|
|
- if (!_this.appendformData.SupplierId) {
|
|
|
+ if (!_this.appendformData.SupplierId || !_this.appendformData.SupplierName) {
|
|
|
_this.$message({
|
|
|
type: 'warning',
|
|
|
message: '请选择供应商公司'
|
|
|
})
|
|
|
+ this.appendformData.SupplierId = ''
|
|
|
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
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- .catch(err => {
|
|
|
- console.error(err)
|
|
|
- })
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
+ 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(() => {});
|
|
|
},
|
|
|
|
|
|
- getSupplierList() {
|
|
|
+ getSupplierList () {
|
|
|
let _this = this
|
|
|
_this.supplierList = []
|
|
|
let params = {
|