예제 #1
0
 def test_cp_zdqueryAllpage(self, gettokenfixture):
     s = gettokenfixture
     self.log.info("采购申请明细分配查询")
     r = SRMBase(s)
     msg = r.cp_zdqueryAllpage()
     self.log.info("获取结果是:%s" % msg.json())
     assert "allotQty" in msg.text
예제 #2
0
 def test_cpPurchase_cancel(self, gettokenfixture):
     s = gettokenfixture
     self.log.info("采购申请转单取消")
     r = SRMBase(s)
     data = r.cp_queryByCompanyVendor("500973", "6100", "A01")
     print(data.json())
     for i in data.json()['data']:
         if i['purchaseRequestNo'] == "purchaseRequestNo":
             break
     TransferId = i["requestTransferId"]
     batchFlag = i["batchFlag"]
     cancel = r.cpPurchase_cancel(batchFlag, TransferId)
     self.log.info("取消返回结果:%s" % cancel.text)
     msg = r.cp_zdqueryAllpage()
     reset = r.cp_zdcommit("8e926428-c823-418d-9264-28c823a18d03",
                           "448ad576-bcc5-4689-8ad5-76bcc5d68971",
                           "8ce3691f-136f-49c6-a369-1f136ff9c6a0")
     for j in msg.json()['data']:
         if j['purchaseRequestNo'] == "PR2021042100008":
             break
     assert j["purchaseRequestNo"] == "PR2021042100008"