v11.0.3-20210517

pull/1/head
Michael_xu 3 years ago
parent 9ede76b147
commit 6de8e2df0a

@ -185,7 +185,6 @@ class Business extends ApiCommon
$delIds[] = $v;
}
}
$dataInfo = $businessModel->where('visit_id',['in',$delIds])->select();
if ($delIds) {
$data = $businessModel->delDatas($delIds);
if (!$data) {
@ -197,6 +196,7 @@ class Business extends ApiCommon
$fileModel->delRFileByModule('crm_business', $delIds);
//删除关联操作记录
$actionRecordModel->delDataById(['types' => 'crm_business', 'action_id' => $delIds]);
$dataInfo = $businessModel->where('business_id',['in',$delIds])->select();
foreach ($dataInfo as $k => $v) {
RecordActionLog($userInfo['id'], 'crm_business', 'delete', $v['name'], '', '', '删除了商机:' . $v['name']);
}

@ -211,48 +211,61 @@ class Contract extends ApiCommon
$param['num'] = $numberInfo['number'];
}
//已进行审批,不能编辑
# 已进行审批,不能编辑
if (!in_array($dataInfo['check_status'], ['3', '4', '5', '6'])) {
return resultArray(['error' => '当前状态为审批中或已审批通过,不可编辑']);
}
if (($examineStatus != false && $examineStatus != 'false') || $examineStatus == 1) {
//将合同审批状态至为待审核,提交后重新进行审批
//审核判断(是否有符合条件的审批流)
$examineFlowModel = new \app\admin\model\ExamineFlow();
$examineStepModel = new \app\admin\model\ExamineStep();
if (!$examineFlowModel->checkExamine($dataInfo['owner_user_id'], 'crm_contract')) {
return resultArray(['error' => '暂无审批人,无法创建']);
}
//添加审批相关信息
$examineFlowData = $examineFlowModel->getFlowByTypes($dataInfo['owner_user_id'], 'crm_contract');
if (!$examineFlowData) {
return resultArray(['error' => '无可用审批流,请联系管理员']);
}
$param['flow_id'] = $examineFlowData['flow_id'];
//获取审批人信息
if ($examineFlowData['config'] == 1) {
//固定审批流
$nextStepData = $examineStepModel->nextStepUser($dataInfo['owner_user_id'], $examineFlowData['flow_id'], 'crm_contract', 0, 0, 0);
$next_user_ids = arrayToString($nextStepData['next_user_ids']) ? : '';
$check_user_id = $next_user_ids ? : [];
$param['order_id'] = 1;
} else {
$check_user_id = $param['check_user_id'] ? ','.$param['check_user_id'].',' : '';
}
if ($param['is_draft'] || (!empty($param['check_status']) && $param['check_status'] == 5)) {
//保存为草稿
$param['check_status'] = 5;
$param['check_user_id'] = $param['check_user_id'] ? ','.$param['check_user_id'].',' : '';
} else {
if (!$check_user_id) {
return resultArray(['error' => '无可用审批人,请联系管理员']);
}
$param['check_user_id'] = is_array($check_user_id) ? ','.implode(',',$check_user_id).',' : $check_user_id;
$param['check_status'] = 0;
# 审批开启
if (($examineStatus != false && $examineStatus != 'false') || $examineStatus == 1) {
//将合同审批状态至为待审核,提交后重新进行审批
//审核判断(是否有符合条件的审批流)
$examineFlowModel = new \app\admin\model\ExamineFlow();
$examineStepModel = new \app\admin\model\ExamineStep();
if (!$examineFlowModel->checkExamine($dataInfo['owner_user_id'], 'crm_contract')) {
return resultArray(['error' => '暂无审批人,无法创建']);
}
//添加审批相关信息
$examineFlowData = $examineFlowModel->getFlowByTypes($dataInfo['owner_user_id'], 'crm_contract');
if (!$examineFlowData) {
return resultArray(['error' => '无可用审批流,请联系管理员']);
}
$param['flow_id'] = $examineFlowData['flow_id'];
//获取审批人信息
if ($examineFlowData['config'] == 1) {
//固定审批流
$nextStepData = $examineStepModel->nextStepUser($dataInfo['owner_user_id'], $examineFlowData['flow_id'], 'crm_contract', 0, 0, 0);
$next_user_ids = arrayToString($nextStepData['next_user_ids']) ? : '';
$check_user_id = $next_user_ids ? : [];
$param['order_id'] = 1;
} else {
$check_user_id = $param['check_user_id'] ? ','.$param['check_user_id'].',' : '';
}
if ($param['is_draft'] || (!empty($param['check_status']) && $param['check_status'] == 5)) {
//保存为草稿
$param['check_status'] = 5;
$param['check_user_id'] = $param['check_user_id'] ? ','.$param['check_user_id'].',' : '';
} else {
if (!$check_user_id) {
return resultArray(['error' => '无可用审批人,请联系管理员']);
}
$param['flow_user_id'] = '';
$param['check_user_id'] = is_array($check_user_id) ? ','.implode(',',$check_user_id).',' : $check_user_id;
$param['check_status'] = 0;
}
$param['flow_user_id'] = '';
}
# 是否开启审核
$examineFlowWheres['types'] = 'crm_contract';
$examineFlowWheres['status'] = 1;
$examineFlowWheres['is_deleted'] = 0;
$contractExamineCount = db('admin_examine_flow')->where($examineFlowWheres)->count();
# 审核没有开启,更新作废合同的状态
if ($contractExamineCount == 0 && $dataInfo['check_status'] == 6 && empty($param['is_draft'])) $param['check_status'] = 2;
# 审核没有开启,更新作废合同的状态
if ($contractExamineCount == 0 && $dataInfo['check_status'] == 5 && empty($param['is_draft'])) $param['check_status'] = 2;
# 审核没有开启,保存为草稿
if ($contractExamineCount == 0 && !empty($param['is_draft'])) $param['check_status'] = 5;
if ($contractModel->updateDataById($param, $param['id'])) {
//将审批记录至为无效

@ -75,7 +75,6 @@ class Invoice extends ApiCommon
if (empty($this->param['invoice_money'])) return resultArray(['error' => '请填写开票金额!']);
if (empty($this->param['invoice_type'])) return resultArray(['error' => '请选择开票类型!']);
if (empty($this->param['title_type'])) return resultArray(['error' => '请选择抬头类型!']);
if (empty($this->param['examineStatus'])) return resultArray(['error' => '缺少审批状态!']);
$param = $this->param;
$userId = $this->userInfo['id'];
@ -224,12 +223,8 @@ class Invoice extends ApiCommon
{
$param = $this->param;
if (empty($param['invoice_id'])) return resultArray(['error' => '缺少发票ID']);
// if (empty($param['customer_id'])) return resultArray(['error' => '请选择客户!']);
// if (empty($param['contract_id'])) return resultArray(['error' => '请选择合同!']);
// if (empty($param['invoice_money'])) return resultArray(['error' => '请填写开票金额!']);
if (empty($param['invoice_type'])) return resultArray(['error' => '请选择开票类型!']);
if (empty($param['title_type'])) return resultArray(['error' => '请选择抬头类型!']);
if (empty($param['examineStatus'])) return resultArray(['error' => '缺少审批状态!']);
$userId = $this->userInfo['id'];
$dataInfo = $this->get($param['invoice_id']);
# 审批是否停用

@ -157,15 +157,16 @@ class work extends ApiCommon
$workInfo['ownerUser'] = db('admin_user')->field(['id', 'realname'])->whereIn('id', trim($workInfo['owner_user_id'], ','))->select();
$workInfo['auth'] = $this->getRuleList($this->param['work_id'], $userId, $groupId);
$userInfo=$this->userInfo;
$rule=db('work_user')
->where('user_id',$userInfo['id'])
->value('group_id');
$list=db('admin_rule')->where('name','manageTaskOwnerUser')->value('id');
$groupList = db('admin_group')->where(['pid' => 5, 'types' => 7, 'type' => 0,'id'=>$rule])->order('system desc')->value('rules');
if(!in_array($list,stringToArray($groupList))){
$workInfo['is_open']=1;
}
# 下次升级
// $userInfo=$this->userInfo;
// $rule=db('work_user')
// ->where('user_id',$userInfo['id'])
// ->value('group_id');
// $list=db('admin_rule')->where('name','manageTaskOwnerUser')->value('id');
// $groupList = db('admin_group')->where(['pid' => 5, 'types' => 7, 'type' => 0,'id'=>$rule])->order('system desc')->value('rules');
// if(!in_array($list,stringToArray($groupList))){
// $workInfo['is_open']=1;
// }
return resultArray(['data' => $workInfo]);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

File diff suppressed because one or more lines are too long

@ -2371,7 +2371,7 @@ CREATE TABLE `5kcrm_oa_examine_file` (
DROP TABLE IF EXISTS `5kcrm_oa_examine_order`;
CREATE TABLE `5kcrm_oa_examine_order` (
`order_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`examine_id` int(10) UNSIGNED NOT NULL,
`work_id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`order` int(10) UNSIGNED NOT NULL DEFAULT 1,
PRIMARY KEY (`order_id`) USING BTREE

@ -86,7 +86,7 @@ CREATE TABLE `5kcrm_crm_customer_pool_field_style` (
CREATE TABLE `5kcrm_oa_examine_order` (
`order_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`examine_id` int(10) UNSIGNED NOT NULL,
`work_id` int(10) UNSIGNED NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL,
`order` int(10) UNSIGNED NOT NULL DEFAULT 1,
PRIMARY KEY (`order_id`)

@ -0,0 +1,100 @@
!(function () {
var Sys = {};
var ua = navigator.userAgent.toLowerCase();
var regMap = {
msie: '/msie ([\\d.]+)/',
firefox: '/firefox\\/([\\d.]+)/',
chrome: '/chrome\\/([\\d.]+)/',
opera: '/opera.([\\d.]+)/',
safari: '/version\\/([\\d.]+).*safari/'
};
var o;
if (ua.match(eval(regMap.msie))) {
o = ua.match(eval(regMap.msie));
Sys = {
appName: 'IE',
version: o[1]
}
} else if (ua.match(eval(regMap.firefox))) {
o = ua.match(eval(regMap.firefox));
Sys = {
appName: 'Firefox',
version: o[1]
}
} else if (ua.match(eval(regMap.chrome))) {
o = ua.match(eval(regMap.chrome));
Sys = {
appName: 'Chrome',
version: o[1]
}
} else if (ua.match(eval(regMap.opera))) {
o = ua.match(eval(regMap.opera));
Sys = {
appName: 'Opera',
version: o[1]
}
} else if (ua.match(eval(regMap.safari))) {
o = ua.match(eval(regMap.safari));
Sys = {
appName: 'Safari',
version: o[1]
}
} else if (ua.indexOf('edge')) {
Sys = {
appName: 'Edge'
}
} else {
if (navigator.appName === 'Microsoft Internet Explorer') {
Sys = {
appName: 'IE',
version: '6.0'
}
}
}
window.onload = function() {
var n = document.createElement('div')
n.style.position = 'fixed'
n.style.bottom = '2px'
n.style.left = '0'
n.style.right = '0'
n.style.textAlign = 'center'
n.style.fontSize = '12px'
n.style.color = '#999'
n.style.zIndex = 1
var i = document.createElement('img')
i.style.width = '14px'
i.style.verticalAlign = 'bottom'
i.style.marginRight = '5px'
var img = new Image()
img.onload = function() {
var canvas = document.createElement('canvas')
var ctx = canvas.getContext('2d')
canvas.height = img.naturalHeight
canvas.width = img.naturalWidth
ctx.drawImage(img, 0, 0)
var uri = canvas.toDataURL('image/png')
i.src = uri
n.appendChild(i)
var ti = ''
var tis = [80, 111, 119, 101, 114, 32, 98, 121, 32]
tis.forEach(c => {
ti = ti + String.fromCharCode(c)
})
var t = document.createTextNode(ti + decodeURI('%E6%82%9F%E7%A9%BA'))
n.appendChild(t)
document.body.appendChild(n)
}
img.src = 'static/img/logo.png'
}
if (Sys.appName === 'IE' && Number(Sys.version) < 10) {
window.location.href = './static/index.html'
}
})();

@ -0,0 +1 @@
!(function(){var Sys={};var ua=navigator.userAgent.toLowerCase();var regMap={msie:"/msie ([\\d.]+)/",firefox:"/firefox\\/([\\d.]+)/",chrome:"/chrome\\/([\\d.]+)/",opera:"/opera.([\\d.]+)/",safari:"/version\\/([\\d.]+).*safari/"};var o;if(ua.match(eval(regMap.msie))){o=ua.match(eval(regMap.msie));Sys={appName:"IE",version:o[1]}}else{if(ua.match(eval(regMap.firefox))){o=ua.match(eval(regMap.firefox));Sys={appName:"Firefox",version:o[1]}}else{if(ua.match(eval(regMap.chrome))){o=ua.match(eval(regMap.chrome));Sys={appName:"Chrome",version:o[1]}}else{if(ua.match(eval(regMap.opera))){o=ua.match(eval(regMap.opera));Sys={appName:"Opera",version:o[1]}}else{if(ua.match(eval(regMap.safari))){o=ua.match(eval(regMap.safari));Sys={appName:"Safari",version:o[1]}}else{if(ua.indexOf("edge")){Sys={appName:"Edge"}}else{if(navigator.appName==="Microsoft Internet Explorer"){Sys={appName:"IE",version:"6.0"}}}}}}}}if(Sys.appName==="IE"&&Number(Sys.version)<11){window.location.href="http://localhost:10000"}})();

@ -0,0 +1 @@
[data-v-ba5c43ea]:export{xrColorPrimary:#2362fb}.project[data-v-ba5c43ea]{height:100%;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative}.xr-header[data-v-ba5c43ea]{padding-top:0}.project-body[data-v-ba5c43ea]{position:absolute;top:45px;right:0;bottom:0;left:0;overflow-y:auto}.project-body .project-body-select[data-v-ba5c43ea]{position:absolute;top:8px;right:8px}.statistical-overview[data-v-ba5c43ea]{position:relative;background-color:#fff;border-radius:3px;border:1px solid #e6e6e6;overflow:hidden;padding-top:5px}.statistical-task[data-v-ba5c43ea]{margin-top:10px}.statistical-task .section[data-v-ba5c43ea]{margin-top:0}.statistical-task .statistical-task-item[data-v-ba5c43ea]{background-color:#fff;border-radius:3px;border:1px solid #e6e6e6;overflow:hidden;padding-top:5px;-webkit-box-flex:1;-ms-flex:1;flex:1}.statistical-task .statistical-task-item[data-v-ba5c43ea]:first-child{margin-right:10px}.statistical-member[data-v-ba5c43ea]{background-color:#fff;border-radius:3px;border:1px solid #e6e6e6;overflow:hidden;padding-top:5px}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save