|
@@ -189,16 +189,6 @@ func (this *SupplyOrderApiController) UpdateSupply() {
|
189
|
189
|
this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商名称不能为空")
|
190
|
190
|
return
|
191
|
191
|
}
|
192
|
|
- supplierCode := this.GetString("suppliercode") //供应商编码
|
193
|
|
- if supplierCode == "" {
|
194
|
|
- this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商编号不能为空")
|
195
|
|
- return
|
196
|
|
- }
|
197
|
|
- supplierid, _ := this.GetInt64("id") //供应商id
|
198
|
|
- if supplierid == 0 {
|
199
|
|
- this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商id不能为空")
|
200
|
|
- return
|
201
|
|
- }
|
202
|
192
|
//查询供应商的信息
|
203
|
193
|
supply, err := service.GetSupplyOne(supplierid)
|
204
|
194
|
if err != nil {
|
|
@@ -214,6 +204,17 @@ func (this *SupplyOrderApiController) UpdateSupply() {
|
214
|
204
|
return
|
215
|
205
|
}
|
216
|
206
|
}
|
|
207
|
+ //upplierCode := this.GetString("suppliercode") //供应商编码
|
|
208
|
+ supplierCode := dataBody["suppliercode"].(string)
|
|
209
|
+ if supplierCode == "" {
|
|
210
|
+ this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商编号不能为空")
|
|
211
|
+ return
|
|
212
|
+ }
|
|
213
|
+ supplierid, _ := this.GetInt64("id") //供应商id
|
|
214
|
+ if supplierid == 0 {
|
|
215
|
+ this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商id不能为空")
|
|
216
|
+ return
|
|
217
|
+ }
|
217
|
218
|
if supplierCode != supply.SupplierCode {
|
218
|
219
|
//判断供应商编号是否有重复的
|
219
|
220
|
codebool, _ := service.FindSupplierCode(supplierCode)
|