Commit e3234f03 by 王勇飞

pp

parent 61f42fdf
......@@ -1007,7 +1007,7 @@ class OrderService extends ServiceBase {
};
var customer = await self.tmcustomerinfoDao.create(customerObj, t);//商标联系人
//将当前联系地址同步到该公司其他订单上
self.contactAddressSyncUpdate(apply.contactAddress, apply.mobile, apply.applyName).then(res => {
self.contactAddressSyncUpdate(customer, apply.creditCode).then(res => {
console.log("contactAddressSyncUpdate result: " + res);
}).catch(err => {
console.log("contactAddressSyncUpdate err: " + err);
......@@ -1839,7 +1839,7 @@ class OrderService extends ServiceBase {
//
if (["WAITCONFIRM", "CONFIRMFAIL", "4", "FILLEXCEPTION", "READY", "DOCFINISH", "AWAITCHECK", "WAITARTIFICIALEXAMINE", "WAITCOMMIT", "ALIPAYREFUND", "ALIAUDITNOT", "ALICUSTOMERREJECTED", "SUBALITM", "REQALIERROR", "SUBALITMOK"].indexOf(tradem.tmStatus) < 0) {
let result = await self.contactAddressSyncUpdate(customer.contactAddress, customer.mobile, apply.applyName);
let result = await self.contactAddressSyncUpdate(customer, apply.creditCode);
return { code: "1", msg: "存在状态为" + tradem.tmStatusName + "的商标只能修改联系人地址,其余字段,不能修改" };
}
......@@ -1905,7 +1905,7 @@ class OrderService extends ServiceBase {
}
//将当前联系地址同步到该公司其他订单上
self.contactAddressSyncUpdate(customer.contactAddress, customer.mobile, apply.applyName).then(res => {
self.contactAddressSyncUpdate(customer, apply.creditCode).then(res => {
console.log("contactAddressSyncUpdate result: " + res);
}).catch(err => {
console.log("contactAddressSyncUpdate err: " + err);
......@@ -1992,8 +1992,14 @@ class OrderService extends ServiceBase {
};
//将联系地址同步到该公司的所有订单数据中
async contactAddressSyncUpdate(contactAddress, mobile, applyName) {
let sql = "UPDATE h_tmcustomer_info SET contactAddress = '" + contactAddress + "' , addressIsPushed = '0' WHERE id IN (SELECT id FROM (SELECT cu.id FROM h_tmapplier_info AS ap LEFT JOIN h_tmcustomer_info AS cu ON ap.orderNum = cu.orderNum WHERE cu.mobile = '" + mobile + "' AND ap.applyName = '" + applyName + "') AS a)";
async contactAddressSyncUpdate(customer, creditCode) {
let obj = {
customerContact: customer.customerContact,
contactAddress: customer.contactAddress,
mobile: customer.mobile,
email: customer.email,
}
let sql = "UPDATE h_tmcustomer_info SET customerContact = '"+ obj.customerContact +"',contactAddress = '"+ obj.contactAddress +"',mobile = '"+ obj.mobile +"',email = '"+ obj.email +"',addressIsPushed = '0' WHERE id IN (SELECT id FROM (SELECT cu.id FROM h_tmapplier_info AS ap LEFT JOIN h_tmcustomer_info AS cu ON ap.orderNum = cu.orderNum WHERE ap.creditCode = '"+ creditCode +"') AS a);";
let updateRes = await this.dao.customUpdate(sql);
return updateRes;
}
......
......@@ -286,7 +286,8 @@
<el-input v-model="apply.mobile"></el-input>
</el-form-item>
<div style="clear:both;"></div>
<el-form-item label-width="140px" label="电子邮箱" style="width:950px;float:left;padding-right:50px;">
<el-form-item label-width="140px" label="电子邮箱" style="width:950px;float:left;padding-right:50px;"
prop="email">
<el-input v-model="apply.email"> </el-input>
</el-form-item>
<el-form-item label-width="140px" label="提报主体" style="width:950px;float:left;padding-right:50px;" prop="principal">
......
......@@ -277,7 +277,8 @@
<el-input v-model="apply.mobile"></el-input>
</el-form-item>
<div style="clear:both;"></div>
<el-form-item label-width="140px" label="电子邮箱" style="width:950px;float:left;padding-right:50px;">
<el-form-item label-width="140px" label="电子邮箱" style="width:950px;float:left;padding-right:50px;"
prop="email">
<el-input v-model="apply.email"> </el-input>
</el-form-item>
<el-form-item label-width="140px" label="提报主体" style="width:950px;float:left;padding-right:50px;" prop="principal">
......
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