| | |
| | | "description": "采购编号", |
| | | "type": "string" |
| | | }, |
| | | "orderSource": { |
| | | "description": "单据来源", |
| | | "type": "string" |
| | | }, |
| | | "phone": { |
| | | "description": "联系人电话", |
| | | "type": "string" |
| | |
| | | "description": "采购编号", |
| | | "type": "string" |
| | | }, |
| | | "orderSource": { |
| | | "description": "单据来源", |
| | | "type": "string" |
| | | }, |
| | | "phone": { |
| | | "description": "联系人电话", |
| | | "type": "string" |
| | |
| | | number: |
| | | description: 采购编号 |
| | | type: string |
| | | orderSource: |
| | | description: 单据来源 |
| | | type: string |
| | | phone: |
| | | description: 联系人电话 |
| | | type: string |
| | |
| | | } |
| | | |
| | | func (s *Server) CreatePurchaseByWms(ctx context.Context, req *CreatePurchaseByWmsRequest) (*CreatePurchaseByWmsResponse, error) { |
| | | if req.SupplierId == 0 || req.ProductId == "" { |
| | | return nil, errors.New("供应商id或产品id为空") |
| | | if req.ProductId == "" { |
| | | return nil, errors.New("产品id为空") |
| | | } |
| | | var pt purchase.PurchaseType |
| | | err := global.GVA_DB.Model(&purchase.PurchaseType{}).First(&pt).Error |