Ver código fonte

供应商模块保存和更改接口改动

mainqaq 3 anos atrás
pai
commit
00842c7cd0
1 arquivos alterados com 6 adições e 5 exclusões
  1. 6 5
      controllers/supply_order_api_contorller.go

+ 6 - 5
controllers/supply_order_api_contorller.go Ver arquivo

@@ -190,11 +190,9 @@ func (this *SupplyOrderApiController) UpdateSupply() {
190 190
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
191 191
 		return
192 192
 	}
193
-	tmp := this.GetString("tmp")
194 193
 	supplierName := dataBody["suppliername"].(string)
195 194
 	if supplierName == "" {
196 195
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商名称不能为空")
197
-		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, tmp)
198 196
 		return
199 197
 	}
200 198
 	//upplierCode := this.GetString("suppliercode") //供应商编码
@@ -203,7 +201,8 @@ func (this *SupplyOrderApiController) UpdateSupply() {
203 201
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商编号不能为空")
204 202
 		return
205 203
 	}
206
-	supplierid, _ := this.GetInt64("id") //供应商id
204
+	//supplierid, _ := this.GetInt64("id") //供应商id
205
+	supplierid, _ := dataBody["id"].(int64)
207 206
 	if supplierid == 0 {
208 207
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商id不能为空")
209 208
 		return
@@ -231,8 +230,10 @@ func (this *SupplyOrderApiController) UpdateSupply() {
231 230
 			return
232 231
 		}
233 232
 	}
234
-	supplierType, _ := this.GetInt64("suppliertype") //供应商类别
235
-	vatRate, _ := this.GetFloat("vatrate")           //增值税税率
233
+	//supplierType, _ := this.GetInt64("suppliertype") //供应商类别
234
+	supplierType, _ := dataBody["suppliertype"].(int64) //供应商类别
235
+	//vatRate, _ := this.GetFloat("vatrate")           //增值税税率
236
+	vatRate, _ := dataBody["suppliertype"].(float64) //增值税税率
236 237
 	//number := this.GetString("number")               //纳税人识别号
237 238
 	number := dataBody["number"].(string) //纳税人识别号
238 239
 	//bank := this.GetString("bank")                   //开户银行