纸通宝工厂版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
1.9 KiB

*** Settings ***
Library Collections
Library RequestsLibrary
*** Test Cases ***
ReceiptOrder
#创建厂内收货订单--手工单
Create Session ztbf ${ztbClient} ${client_header}
${unitPrice} Set Variable 1.8
${netWeight} Set Variable 11000
${settleWeight} Set Variable 11000
${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')}