Files
jjx-web/uniCloud-aliyun/cloudfunctions/router/service/client/process/quote/kh/add.js
T
2023-11-30 22:54:09 +08:00

75 lines
1.3 KiB
JavaScript

'use strict';
module.exports = {
/**
* 新增加工单
* @url client/process/kh/add 前端调用的url参数地址
* data 请求参数
* @param {String} params1 参数1
*/
main: async (event) => {
let {
data = {}, userInfo, util, filterResponse, originalParam
} = event;
let {
customUtil,
uniID,
config,
pubFun,
vk,
db,
_
} = util;
let {
uid,
title,
address,
files,
remark,
invoice,
writeInvoiceTime,
nvoiceType,
transportDocuments,
transportLimit,
tradeMethod,
payMethod,
advancePayRate,
otherPayMethod,
reputationPayDay,
answerTime,
earnestMoney,
status
} = data;
let res = {
code: 0,
msg: "添加成功"
};
// 业务逻辑开始-----------------------------------------------------------
res.id = await vk.baseDao.add({
dbName: '',
dataJson:{
title,
address,
files,
remark,
invoice,
writeInvoiceTime,
nvoiceType,
transportDocuments,
otherTransportDocuments,
transportLimit,
tradeMethod,
payMethod,
advancePayRate,
otherPayMethod,
reputationPayDay,
answerTime,
earnestMoney,
status,
answerNumber: 0,
userId: uid
}
});
// 业务逻辑结束-----------------------------------------------------------
return res;
}
}