|
@@ -27,7 +27,7 @@ class Approveinfo extends Base
|
|
|
*
|
|
|
* @Apidoc\Method("POST")
|
|
|
* @Apidoc\Param("way", type="string", require=true, desc="方式:create=申请,update=重新发起,edit=审批人修改")
|
|
|
- * @Apidoc\Param("id", type="integer", require=true, desc="ID way=cretae 不传值或传0,way=update 传值申请记录接口的id,way=edit 传值审批列表接口的approve_id")
|
|
|
+ * @Apidoc\Param("id", type="integer", require=true, desc="ID way=cretae 不传值或传0,way=update 传值申请信息接口的id,way=edit 传值审批详情接口的approve_id")
|
|
|
* @Apidoc\Param("module", type="integer", require=true, desc="模块类型:1=申购申请,2=呈批申请,3=入库申请,4=领用申请,5=出差申请,6=请假申请,7=用车申请,8=维修申请,9=合同呈批,10=收文批阅,11=学校文件")
|
|
|
* @Apidoc\Param("reason", type="string", require=false, desc="module=1申购事由,module=2申请标题,module=4物品用途,module=5出差事由,module=6请假原因,module=7出发地点,module=8维修地点,module=9合同编号,module=10文件名称,module=11文件名称")
|
|
|
* @Apidoc\Param("type", type="integer", require=false, desc="module=1采购类型,module=2呈批类型,module=5出差类型,module=6请假类型,module=8维修类型,module=9合同类型")
|
|
@@ -41,6 +41,7 @@ class Approveinfo extends Base
|
|
|
* @Apidoc\Param("pay_type", type="integer", require=false, desc="module=1支付方式")
|
|
|
* @Apidoc\Param("word_size", type="integer", require=false, desc="module=2发文字号")
|
|
|
* @Apidoc\Param("number", type="integer", require=false, desc="module=2印制份数,module=9印制份数")
|
|
|
+ * @Apidoc\Param("apply_id", type="integer", require=false, desc="module=3采购审批单ID")
|
|
|
* @Apidoc\Param("is_who", type="integer", require=false, desc="module=5是否跨关内关外:0=否,1=是 type=1")
|
|
|
* @Apidoc\Param("start_am", type="string", require=false, desc="module=6开始时间段(上午或下午)")
|
|
|
* @Apidoc\Param("end_am", type="string", require=false, desc="module=6结束时间段(上午或下午)")
|
|
@@ -71,6 +72,19 @@ class Approveinfo extends Base
|
|
|
* @Apidoc\Param("stock", type="integer", require=true,desc="数量"),
|
|
|
* ),
|
|
|
* )
|
|
|
+ * @Apidoc\Param("stock_goods", type="array", require=false, desc="module=3 必传入库物品数据",
|
|
|
+ * @Apidoc\Param("id", type="integer", require=false, desc="商品ID 传值=商品库选择,不传值=添加新商品"),
|
|
|
+ * @Apidoc\Param("goods_category_first", type="integer", require=false, desc="商品分类一级ID"),
|
|
|
+ * @Apidoc\Param("goods_category_id", type="integer", require=false, desc="商品分类ID"),
|
|
|
+ * @Apidoc\Param("goods_no", type="string", require=false, desc="商品编号"),
|
|
|
+ * @Apidoc\Param("goods_name", type="string", require=true, desc="商品名称"),
|
|
|
+ * @Apidoc\Param("goods_brand", type="string", require=false, desc="商品品牌"),
|
|
|
+ * @Apidoc\Param("goods_stock", type="array", require=true, desc="规格列表",
|
|
|
+ * @Apidoc\Param("id", type="integer", require=false,desc="规格ID 传值=商品库选择,不传值=添加新商品"),
|
|
|
+ * @Apidoc\Param("name", type="string", require=true,desc="规格名称"),
|
|
|
+ * @Apidoc\Param("stock", type="integer", require=true,desc="数量"),
|
|
|
+ * ),
|
|
|
+ * )
|
|
|
* @Apidoc\Param("peer_user", type="array", require=false, desc="module=5 传同行员工数据",
|
|
|
* @Apidoc\Param("is_who", type="integer", require=true, desc="是否外部人员:0=否,1=是"),
|
|
|
* @Apidoc\Param("user_id", type="string", require=false, desc="用户userid"),
|
|
@@ -80,7 +94,7 @@ class Approveinfo extends Base
|
|
|
*/
|
|
|
public function create()
|
|
|
{
|
|
|
- // {"method":"create","id": "","module": "1","reason": "测试","type": "1","desc": "","start_time": "","end_time": "","document": "","images": "","remark": "","total_amount": "1000","pay_type": "1","word_size": "","number": "","is_who": "","start_am": "","end_am": "","time": "","reach_address": "","end_address": "","scope": "","legal_opinion": "","founder": "","serial_number": "","apply_date": "","degree": "","department": "","department_sign": "","approve_user": "1925696723824730358","copy_user": "","apply_goods": [{"id": "1","goods_category_first": "1","goods_category_id": "3","goods_no": "100001","goods_name": "医疗口罩一次性","goods_brand": "一次性口罩","goods_stock": [{"id": "1","name": "均码,白色","price": "1","stock": "110"},{"id": "2","name": "均码,蓝色","price": "1","stock": "100"},{"id": "19","name": "均码,红色","price": "1","stock": "120"}]},{"id": "2","goods_category_first": "1","goods_category_id": "3","goods_no": "100002","goods_name": "84消毒液","goods_brand": "安其生","goods_stock": [{"id": "3","name": "380ml,低浓度","price": "1","stock": "110"},{"id": "4","name": "380ml,高浓度","price": "1","stock": "100"}]},{"id": "","goods_category_first": "1","goods_category_id": "3","goods_no": "100003","goods_name": "一次性手套丁腈橡胶","goods_brand": "万力","goods_stock": [{"name": "白色","price": "0.2","stock": "110"},{"name": "蓝色","price": "0.2","stock": "100"}]}],"peer_user": [{"is_who": "","user_id": "","name": "","desc": ""}]}
|
|
|
+ // {"way":"create","id": "","module": "1","reason": "测试","type": "1","desc": "","start_time": "","end_time": "","document": "","images": "","remark": "","total_amount": "1000","pay_type": "1","word_size": "","number": "","is_who": "","start_am": "","end_am": "","time": "","reach_address": "","end_address": "","scope": "","legal_opinion": "","founder": "","serial_number": "","apply_date": "","degree": "","department": "","department_sign": "","approve_user": "1925696723824730358","copy_user": "","apply_goods": [{"id": "1","goods_category_first": "1","goods_category_id": "3","goods_no": "100001","goods_name": "医疗口罩一次性","goods_brand": "一次性口罩","goods_stock": [{"id": "1","name": "均码,白色","price": "1","stock": "110"},{"id": "2","name": "均码,蓝色","price": "1","stock": "100"},{"id": "19","name": "均码,红色","price": "1","stock": "120"}]},{"id": "2","goods_category_first": "1","goods_category_id": "3","goods_no": "100002","goods_name": "84消毒液","goods_brand": "安其生","goods_stock": [{"id": "3","name": "380ml,低浓度","price": "1","stock": "110"},{"id": "4","name": "380ml,高浓度","price": "1","stock": "100"}]},{"id": "","goods_category_first": "1","goods_category_id": "3","goods_no": "100003","goods_name": "一次性手套丁腈橡胶","goods_brand": "万力","goods_stock": [{"name": "白色","price": "0.2","stock": "110"},{"name": "蓝色","price": "0.2","stock": "100"}]}],"peer_user": [{"is_who": "","user_id": "","name": "","desc": ""}]}
|
|
|
$way = input('way');
|
|
|
$id = input('id');
|
|
|
$module = input('module');
|
|
@@ -95,6 +109,7 @@ class Approveinfo extends Base
|
|
|
$total_amount = input('total_amount');
|
|
|
$pay_type = input('pay_type');
|
|
|
$word_size = input('word_size');
|
|
|
+ $apply_id = input('apply_id');
|
|
|
$number = input('number');
|
|
|
$is_who = input('is_who');
|
|
|
$start_am = input('start_am');
|
|
@@ -113,8 +128,9 @@ class Approveinfo extends Base
|
|
|
$approve_user = input('approve_user');
|
|
|
$copy_user = input('copy_user');
|
|
|
$apply_goods = input('apply_goods');
|
|
|
+ $stock_goods = input('stock_goods');
|
|
|
$peer_user = input('peer_user');
|
|
|
- $params = compact("way","id", "module", "reason", "type", "desc", "start_time", "end_time", "document", "images", "remark", "total_amount", "pay_type", "word_size", "number", "is_who", "start_am", "end_am", "time", "reach_address", "end_address", "scope", "legal_opinion", "founder", "serial_number", "apply_date", "degree", "department", "department_sign", "approve_user", "copy_user", "apply_goods", "peer_user");
|
|
|
+ $params = compact("way","id", "module", "reason", "type", "desc", "start_time", "end_time", "document", "images", "remark", "total_amount", "pay_type", "word_size", "apply_id","number", "is_who", "start_am", "end_am", "time", "reach_address", "end_address", "scope", "legal_opinion", "founder", "serial_number", "apply_date", "degree", "department", "department_sign", "approve_user", "copy_user", "apply_goods", "stock_goods","peer_user");
|
|
|
$user = $this->user;
|
|
|
if($way == CommonConstant::edit){
|
|
|
ApproveService::make($id, $params, $user, CommonConstant::edit);
|