瀏覽代碼

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

mainqaq 3 年之前
父節點
當前提交
4bb390863e
共有 1 個文件被更改,包括 15 次插入8 次删除
  1. 15 8
      controllers/supply_order_api_contorller.go

+ 15 - 8
controllers/supply_order_api_contorller.go 查看文件

@@ -225,9 +225,12 @@ func (this *SupplyOrderApiController) UpdateSupply() {
225 225
 	}
226 226
 	supplierType, _ := this.GetInt64("suppliertype") //供应商类别
227 227
 	vatRate, _ := this.GetFloat("vatrate")           //增值税税率
228
-	number := this.GetString("number")               //纳税人识别号
229
-	bank := this.GetString("bank")                   //开户银行
230
-	bankAccount := this.GetString("bankAccount")     //银行账号
228
+	//number := this.GetString("number")               //纳税人识别号
229
+	number := dataBody["number"].(string) //纳税人识别号
230
+	//bank := this.GetString("bank")                   //开户银行
231
+	bank := dataBody["bank"].(string) //纳税人识别号
232
+	//bankAccount := this.GetString("bankAccount")     //银行账号
233
+	bankAccount := dataBody["bankaccount"].(string)
231 234
 	orgId := this.GetAdminUserInfo().CurrentOrgId
232 235
 	//contacts := this.Get("contacts")//联系人
233 236
 	//dataBody := make(map[string]interface{}, 0)
@@ -374,7 +377,7 @@ func (this *SupplyOrderApiController) GetSupplyCode() {
374 377
 func (this *SupplyOrderApiController) SaveSupply() {
375 378
 	//supplierName := this.GetString("suppliername") //供应商名称
376 379
 	dataBody := make(map[string]interface{}, 0)
377
-	supplierName := dataBody["supplierName"].(string)
380
+	supplierName := dataBody["suppliername"].(string)
378 381
 	if supplierName == "" {
379 382
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商名称不能为空")
380 383
 		return
@@ -385,7 +388,8 @@ func (this *SupplyOrderApiController) SaveSupply() {
385 388
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商名称重复")
386 389
 		return
387 390
 	}
388
-	supplierCode := this.GetString("suppliercode") //供应商编码
391
+	//supplierCode := this.GetString("suppliercode") //供应商编码
392
+	supplierCode := dataBody["suppliercode"].(string) //供应商编码
389 393
 	if supplierCode == "" {
390 394
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商编号不能为空")
391 395
 		return
@@ -398,9 +402,12 @@ func (this *SupplyOrderApiController) SaveSupply() {
398 402
 	}
399 403
 	supplierType, _ := this.GetInt64("suppliertype") //供应商类别
400 404
 	vatRate, _ := this.GetFloat("vatrate")           //增值税税率
401
-	number := this.GetString("number")               //纳税人识别号
402
-	bank := this.GetString("bank")                   //开户银行
403
-	bankAccount := this.GetString("bankAccount")     //银行账号
405
+	//number := this.GetString("number")
406
+	number := dataBody["number"].(string)
407
+	//bank := this.GetString("bank")
408
+	bank := dataBody["bank"].(string)
409
+	//bankAccount := this.GetString("bankAccount")
410
+	bankAccount := dataBody["bankaccount"].(string)
404 411
 	orgId := this.GetAdminUserInfo().CurrentOrgId
405 412
 	//contacts := this.Get("contacts")//联系人
406 413