Commit 1061be54 by 王昆

gsb

parent bf8c34ab
......@@ -45,7 +45,7 @@ class BusinessmenService extends ServiceBase {
deliver = deliver.data;
let data = {
customerName: businessmen.name,
initPeriod: new Date(moment().format("YYYY-MM") + "-01 00:00:00").getTime(),
initPeriod: Number(moment().format("YYYYMM")),
// initPeriod: moment().format("YYYYMM"),
accountStandard: 1,
valueAddedTax: 2,
......@@ -57,11 +57,17 @@ class BusinessmenService extends ServiceBase {
let url = settings.ntapi().createCustomer;
let res = await this.callApi(url, data, "建账");
console.log(res);
if(!res || !res.data || !res.data.datas) {
if(!res || !res.data) {
return system.getResult(null, "建账失败");
}
// let _d = res.data.datas;
// return await this.callms("order", "createAccount", params);
if(res.data) {
await this.callms("order", "createAccount", {
id: params.id,
province: params.province,
customer_id: res.data,
});
}
return system.getResultSuccess();
} catch (error) {
console.log(error);
return system.getResult(error);
......
......@@ -182,7 +182,7 @@ class System {
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
order: domain + ":3103" + path,
order: domain2 + ":3103" + path,
// order: "http://127.0.0.1:3103" + path,
// 发票服务
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment