瀏覽代碼

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

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

+ 4 - 1
controllers/supply_order_api_contorller.go 查看文件

@@ -183,6 +183,7 @@ func (this *SupplyOrderApiController) GetSupplyList() {
183 183
 
184 184
 //保存供应商及联系人(用于更改)
185 185
 func (this *SupplyOrderApiController) UpdateSupply() {
186
+	fmt.Printf("HAHHAH")
186 187
 	dataBody := make(map[string]interface{}, 0)
187 188
 	err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
188 189
 	if err != nil {
@@ -202,7 +203,9 @@ func (this *SupplyOrderApiController) UpdateSupply() {
202 203
 		return
203 204
 	}
204 205
 	//supplierid, _ := this.GetInt64("id") //供应商id
206
+	fmt.Println(dataBody["id"])
205 207
 	supplierid := int64(dataBody["id"].(float64))
208
+	fmt.Println(supplierid)
206 209
 	if supplierid == 0 {
207 210
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商id不能为空")
208 211
 		return
@@ -416,7 +419,7 @@ func (this *SupplyOrderApiController) SaveSupply() {
416 419
 		return
417 420
 	}
418 421
 	//supplierType, _ := this.GetInt64("suppliertype") //供应商类别
419
-	supplierType, _ := dataBody["suppliertype"].(int64) //供应商类别
422
+	supplierType := int64(dataBody["suppliertype"].(float64)) //供应商类别
420 423
 	//vatRate, _ := this.GetFloat("vatrate")           //增值税税率
421 424
 	vatRate, _ := dataBody["suppliertype"].(float64) //增值税税率
422 425
 	//number := this.GetString("number")