*** Settings *** Library Collections Library RequestsLibrary *** Test Cases *** ReceiptOrder #创建厂内收货订单--手工单 Create Session ztbf ${ztbClient} ${client_header} ${unitPrice} Set Variable 2 ${netWeight} Set Variable 10000 ${settleWeight} Set Variable 5000 ${settlePrice} Evaluate ${unitPrice}*${settleWeight} ${data} Set Variable { \ \ \ \ "deductType":1, \ \ \ \ "isWithoutTare":0, \ \ \ \ "status":null, \ \ \ \ "factoryCustomerId":"${CustomerId}", \ \ \ \ "factoryCustomerName":"${name}", \ \ \ \ "netWeight":"${netWeight}", \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ "plateNumber":"55555", \ \ \ \ "productInfoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"${unitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0, \ \ \ \ \ \ \ \ \ \ \ \ "settleWeight":"${settleWeight}", \ \ \ \ \ \ \ \ \ \ \ \ "settlePrice":"${settlePrice}" \ \ \ \ \ \ \ \ } \ \ \ \ ] } ${reps} POST On Session ztbf ztb-factory/save/scrap-paper-onside-receipt-order ${data.encode('utf-8')} ${OrderId} Get From Dictionary ${reps.json()} data Set Global Variable ${OrderId} #审核过磅单 ${auditData} Set Variable {"id":"${OrderId}"} ${reps} POST On Session ztbf ztb-factory/factory/audit-pass/order ${auditData.encode('utf-8')} #支付订单:现金、银行卡支付 ${paymentData} Set Variable {"settleType":2,"ids":["${OrderId}"]} ${reps} POST On Session ztbf ztb-factory/wechat-applet/merge-receiving-pay-order/pay ${paymentData.encode('utf-8')} ReceiptWeigh #厂内收货--刷卡过磅 #刷卡过磅--过毛重 Create Session ztbf ${ztbClient} ${client_header} ${weight} Set Variable 2410 ${weighData} Set Variable {"cardNo":"${ReceiptcardNo}","weight":${weight}} ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')} ${ReceiptOrderId} Get From Dictionary ${reps.json()['data']} id #订单id Set Global Variable ${ReceiptOrderId} Should Be Equal As Strings ${reps.json()["message"]} 毛重称重成功,${weight}公斤,请下地磅 #定价详情 ${reps} GET On Session ztbf ztb-factory/factory/wechat-applet/get/order-detail/${ReceiptOrderId} ${plateNumber} Get From Dictionary ${reps.json()['data']} plateNumber #车牌号 ${isWithoutTare} Get From Dictionary ${reps.json()['data']} isWithoutTare #是否无皮过磅,0否1是 ${proportionOfProduct} Get From Dictionary ${reps.json()['data']} proportionOfProduct ${plateNumber} Set Variable If '${plateNumber}'=='${None}' null ${plateNumber} #确定定价 ${unitPrice} Set Variable 1.88 ${submitData} Set Variable { \ \ \ \ "id":"${ReceiptOrderId}", \ \ \ \ "productInfoDtoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "productId":"${categoryId}", \ \ \ \ \ \ \ \ \ \ \ \ "productName":"${categoryName}", \ \ \ \ \ \ \ \ \ \ \ \ "unitPrice":"2.1", \ \ \ \ \ \ \ \ \ \ \ \ "proportionOfProduct":"${proportionOfProduct}", \ \ \ \ \ \ \ \ \ \ \ \ "konePrice":"指导价格:${defaultUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "highestUnitPrice":"${highestUnitPrice}", \ \ \ \ \ \ \ \ \ \ \ \ "lowestUnitPrice":0 \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "plateNumber":${plateNumber}, \ \ \ \ "factoryCustomerId":"${ReceiptCustomerId}", \ \ \ \ "deductType":1, \ \ \ \ "inspectionRemark":"确定定价", \ \ \ \ "isWithoutTare":"${isWithoutTare}" } ${reps} POST On Session ztbf ztb-factory/factory/submit/order-price ${submitData.encode('utf-8')} #刷卡过磅--过皮重 ${weightTare} Set Variable 2000 ${weighData} Set Variable {"cardNo":"${ReceiptcardNo}","weight":${weightTare}} ${reps} POST On Session ztbf ztb-factory/factory-customer/save/order ${weighData.encode('utf-8')} ${ReceiptOrderId} Get From Dictionary ${reps.json()['data']} id #订单id Should Be Equal As Strings ${reps.json()["message"]} 皮重称重成功,${weightTare}公斤,正在打印磅单 #过磅审核 ${auditData} Set Variable {"id":"${ReceiptOrderId}"} ${reps} POST On Session ztbf ztb-factory/factory/audit-pass/order ${auditData.encode('utf-8')} #支付订单--千鸟代付 ${paymentData} Set Variable {"settleType":3,"ids":["${ReceiptOrderId}"]} ${reps} POST On Session ztbf ztb-factory/wechat-applet/merge-receiving-pay-order/pay ${paymentData.encode('utf-8')} Print_weight_order #打印磅单 Create Session ztbf ${ztbClient} ${client_header} ${data} Set Variable {"id":"${OrderId}","printType":1} ${reps} POST On Session ztbf ztb-factory/print/weight-order ${data.encode('utf-8')}