user_id; $apply_key = 'MB23060422'; require_once './FormHelper.php'; require_once './wf_common.php'; #系统ID $system_id = 'con'; #流程ID $flow_id = 'con01'; #表单号 $form_id; $form_id = ""; $wf = new WorkFlow($system_id, $flow_id, $form_id); $wf->initWorkFlow($user_id); $form_key = $wf->flowContext->getFormKey(); #获取签核意见 $assign_opinions = Assign::get_records($form_key); #会签部门意见 $subflow_assign_opinions = SubflowManager::getCounterSignComments($form_key); $flowName = $wf->getFlowName(); $assigner = $wf->getAssignerList(); $assign_status = $wf->getAssignStatus($assigner); $if_show_assign = true; #是否可会签 $isSplitable = $wf->isSplitable(); //表单数据 #客户表 #1.电梯品牌选项 $sql = "select code_name value ,content label from code where field_name='elevator_brand' order by convert(content using gbk) asc "; $elevator_brand_opt = DB::result($sql); #2.保养方式 $sql = "select code_name value ,content label from code where field_name='maintain_kind'"; $maintain_kind_opt = DB::result($sql); #3.电梯类型 $sql = "select code_name value ,content label from code where field_name='elevator_kind'"; $elevator_kind_opt = DB::result($sql); #4.付款方式 $sql = "select code_name value ,content label from code where field_name='payment_kind'"; $payment_kind_opt = DB::result($sql); #5.合约性质 $sql = "select code_name value ,content label from code where field_name='hope_contract_customer_kind'"; $contract_kind_opt = DB::result($sql); #抓取有 $where = " and apply_key='$apply_key'"; $sql = "SELECT * FROM con_maintance_examine_apply where 1=1 $where "; $res_cmea = DB::result($sql); $cmea = empty($res_cmea) ? [] : $res_cmea[0]; #写入 con_maintance_review_apply #获取评审单号 //$cmea['payment_kind']; //付款方式 //月付 12; 季付 三月一次;半年付 6个月一次, 年付 12个月 // $insert_data = [ 'apply_key' => $apply_key, 'vol_no' => $cmea['vol_no'], 'form_key' => $cmea, 'address' => $cmea['address'], 'case_name' => $cmea['case_name'], 'num' => $cmea['num'], 'brand' => $cmea['brand'], 'customer' => $hope_contract['customer'], 'salesman' => $hope_contract['salesman'], 'progress_remark' => $hope_contract['progress_remark'], 'platform_company' => empty(trim($hope_contract['common_platform_company'])) ? $hope_contract['sales_platform_company'] : $hope_contract['common_platform_company'], 'platforom_company_tel' => empty(trim($hope_contract['common_platform_tel'])) ? $hope_contract['sales_platform_tel'] : $hope_contract['common_platform_tel'] ]; //var_dump($insert_data); DB::insert_table('con_maintance_examine_apply', $insert_data); // $ins_sql="INSERT INTO `adm824727563_db`.`hope_contract_customer` (`vol_no`, `customer_kind`, `num`, `case_name`, `customer`, // `salesman`, `address`, `lm_name`, `lm_tel`, `pre_order_date`, `order_rate`, `visit_date`, `progress_remark`, `common_platform_lm`, `common_platform_tel`, // `common_platform_company`, `sales_platform_lm`, `sales_platform_tel`, `sales_platform_company`, `is_strategic_customer`, // `strategic_customer`, `brand`, `partya_end_date`, `created_at`, `creator`, `updated_at`) VALUES ('Q2305047', '1', '47', '辰富佳苑', '上海新桃源物业管理有限公司', 'P0053', '松江广富林路3939弄', '周总', '13482376166', '2023-06-30 00:00:00', '中', '2023-05-23 18:13:05', '该物业为国有企业,本次 拜访物业沈经理引荐周总。经过与周总交流要求我司进行投标,今天进公司注册云采购账号,等公示后进一步了解如何投标再与周总会面细谈。', NULL, NULL, NULL, NULL, NULL, NULL, 'N', NULL, '永大', '2023-06-30 00:00:00', '2023-05-25 10:15:31', 'P0053', '2023-05-29 14:22:35'); // "; $table = 'con_maintance_examine_apply'; #可编辑的列 $editableColumn = [ 'apply_key' => [ 'label' => "评审单号", "value" => "$apply_key", "tag" => 'text', 'attr' => [ 'readonly=true ', 'class' => 'form-control form-control-sm' ] ], 'vol_no' => ['label' => "卷号", "value" => "", "tag" => 'text', 'attr' => ['readonly=true ', 'class' => 'form-control form-control-sm']], //'form_key' => ['label' => "表单号", "value" => "", "tag" => 'text', 'attr'=>['class' => 'form-control form-control-sm' ]], 'address' => ['label' => "现场地址", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'case_name' => ['label' => "现场名称", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'brand' => ['label' => "电梯品牌", "value" => "", "tag" => 'select', 'attr' => ['required', 'class' => 'form-control form-control-sm'], 'options' => $elevator_brand_opt], 'num' => ['label' => "电梯台数", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'salesman' => ['label' => "营业员", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'maintain_kind' => ['label' => "保养方式", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm'], 'options' => $maintain_kind_opt], 'contract_begin_date' => ['label' => "合约期限开始", "value" => "", "tag" => 'date', 'attr' => ['required', 'class' => 'date form-control form-control-sm']], 'contract_end_date' => ['label' => "合约期限结束", "value" => "", "tag" => 'date', 'attr' => ['required', 'class' => 'date form-control form-control-sm']], 'elevator_kind' => ['label' => "电梯类型", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm'], 'options' => $elevator_kind_opt], 'contract_kind' => ['label' => "合约性质", "value" => "", "tag" => 'select', 'attr' => ['class' => 'form-control form-control-sm'], 'options' => $contract_kind_opt], 'platform_company' => ['label' => "加盟公司名称", "value" => "", "tag" => 'text', 'attr' => ['class' => 'form-control form-control-sm']], 'platforom_company_tel' => ['label' => "加盟公司电话", "value" => "", "tag" => 'text', 'attr' => ['class' => 'form-control form-control-sm']], 'stand_price' => ['label' => "标准价格(元)", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'contract_price' => ['label' => "合约报价(元)", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'sold_price' => ['label' => "合约成交价(元)", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'payment_kind' => ['label' => "付款方式", "value" => "", "tag" => 'select', 'attr' => ['required', 'class' => 'form-control form-control-sm'], 'options' => $payment_kind_opt], 'commission_expense' => ['label' => "加盟分成费(%)", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'management_expense' => ['label' => "我司管理费(%)", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'form-control form-control-sm']], 'annual_survey_expense' => ['label' => "年检费用(元)", "value" => "", "tag" => 'number', 'attr' => ['required', 'class' => 'date form-control form-control-sm ']], 'service_expense' => ['label' => "服务费", "value" => "", "tag" => 'text', 'attr' => ['required', 'class' => ' form-control form-control-sm ']], // 'postgress_remark' => ['label' => "洽商进度", "value" => "", "tag" => 'text', 'attr'=>['class' => 'form-control form-control-sm' ]] ]; $vol_no = empty($_GET['vol_no']) ? "" : $_GET['vol_no']; $where = " and apply_key='$apply_key'"; $sql = "SELECT * FROM $table where 1=1 $where ORDER BY vol_no"; $data = []; $data = DB::result($sql); #电梯详细资料 $con_maintance_examine_clear_columm = [ 'register_code' => ['label' => "电梯注册代码", "value" => "", "tag" => 'text', 'attr' => ['colspan' => 2, 'name' => 'register_code[]', 'class' => 'form-control form-control-sm']], 'elevator_brand' => ['label' => "品牌", "value" => "", "tag" => 'select', 'attr' => ['colspan' => 2, 'name' => 'elevator_brand[]', 'class' => 'form-control form-control-sm'], 'options' => $elevator_brand_opt], 'spec' => ['label' => "规格型号", "value" => "", "tag" => 'text', 'attr' => ['colspan' => 2, 'name' => 'spec[]', 'class' => 'form-control form-control-sm']], 'weight' => ['label' => "载重(KG)", "value" => "", "tag" => 'number', 'attr' => ['name' => 'weight[]', 'class' => 'form-control form-control-sm']], 'speed' => ['label' => "速度(m/s)", "value" => "", "tag" => 'number', 'attr' => ['name' => 'speed[]', 'class' => 'form-control form-control-sm']], 'stop' => ['label' => "停数", "value" => "", "tag" => 'number', 'attr' => ['name' => 'stop[]', 'class' => 'form-control form-control-sm']], 'elevator_num' => ['label' => "台数", "value" => "", "tag" => 'number', 'attr' => ['name' => 'brand_num[]', 'class' => 'form-control form-control-sm']], 'useful_years' => ['label' => "使用年限", "value" => "", "tag" => 'number', 'attr' => ['name' => 'useful_years[]', 'class' => 'form-control form-control-sm']], 'last_check_date' => ['label' => "最近一次年检日期", "value" => "", "tag" => 'date', 'attr' => ['name' => 'last_check_date[]', 'colspan' => 2, 'type' => 'date', 'class' => 'form-control form-control-sm']], 'speed_governors_check_expense' => ['label' => "限速器校验费", "value" => "", "tag" => 'number', 'attr' => ['name' => 'speed_governors_check_expense[]', 'class' => 'form-control form-control-sm']], ]; $con_maintance_examine_clear = DB::result("SELECT " . implode(',', array_keys($con_maintance_examine_clear_columm)) . " FROM con_maintance_examine_clear where 1=1 and apply_key='$apply_key' and cmstatus='Y' "); $i = 0; $cmecRow = "