Commit 1061be54 by 王昆

gsb

parent bf8c34ab
...@@ -45,7 +45,7 @@ class BusinessmenService extends ServiceBase { ...@@ -45,7 +45,7 @@ class BusinessmenService extends ServiceBase {
deliver = deliver.data; deliver = deliver.data;
let data = { let data = {
customerName: businessmen.name, customerName: businessmen.name,
initPeriod: new Date(moment().format("YYYY-MM") + "-01 00:00:00").getTime(), initPeriod: Number(moment().format("YYYYMM")),
// initPeriod: moment().format("YYYYMM"), // initPeriod: moment().format("YYYYMM"),
accountStandard: 1, accountStandard: 1,
valueAddedTax: 2, valueAddedTax: 2,
...@@ -57,11 +57,17 @@ class BusinessmenService extends ServiceBase { ...@@ -57,11 +57,17 @@ class BusinessmenService extends ServiceBase {
let url = settings.ntapi().createCustomer; let url = settings.ntapi().createCustomer;
let res = await this.callApi(url, data, "建账"); let res = await this.callApi(url, data, "建账");
console.log(res); console.log(res);
if(!res || !res.data || !res.data.datas) { if(!res || !res.data) {
return system.getResult(null, "建账失败"); return system.getResult(null, "建账失败");
} }
// let _d = res.data.datas; if(res.data) {
// return await this.callms("order", "createAccount", params); await this.callms("order", "createAccount", {
id: params.id,
province: params.province,
customer_id: res.data,
});
}
return system.getResultSuccess();
} catch (error) { } catch (error) {
console.log(error); console.log(error);
return system.getResult(error); return system.getResult(error);
......
...@@ -182,7 +182,7 @@ class System { ...@@ -182,7 +182,7 @@ class System {
// merchant: "http://127.0.0.1:3101" + path, // merchant: "http://127.0.0.1:3101" + path,
// 订单服务 // 订单服务
order: domain + ":3103" + path, order: domain2 + ":3103" + path,
// order: "http://127.0.0.1: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