likeku 7 vuotta sitten
vanhempi
commit
87631cc66d

+ 31 - 0
140to151.sql

@@ -0,0 +1,31 @@
+ALTER TABLE  `jl_config` ADD  `smsswitch` TINYINT NOT NULL DEFAULT  '1';
+ALTER TABLE  `jl_user_profiles` ADD  `isnotice` TINYINT NOT NULL DEFAULT  '0';
+
+ALTER TABLE `jl_item_attachment`
+  DROP `mpid`,
+  DROP `itemid`,
+  DROP `categoryid`,
+  DROP `tips`;
+
+  ALTER TABLE  `jl_item_attachment` ADD  `pid` INT NOT NULL DEFAULT  '0' AFTER  `ownerid` ,
+ADD  `pmid` INT NOT NULL DEFAULT  '0' AFTER  `pid` ;
+
+CREATE TABLE IF NOT EXISTS `jl_item_measure_numofper` (
+  `imnid` int(11) NOT NULL AUTO_INCREMENT,
+  `iaid` int(11) NOT NULL,
+  `pid` int(11) NOT NULL,
+  `pmid` int(11) NOT NULL,
+  `numpname` smallint(6) NOT NULL,
+  `softwareitemid` int(11) NOT NULL,
+  `isdel` tinyint(4) NOT NULL DEFAULT '0',
+  `intime` int(11) NOT NULL DEFAULT '0',
+  `deltime` int(11) NOT NULL DEFAULT '0',
+  `ownerid` mediumint(9) NOT NULL DEFAULT '0',
+  `categoryid` mediumint(9) NOT NULL,
+  `tips` text NOT NULL,
+  PRIMARY KEY (`imnid`)
+) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
+
+ALTER TABLE  `jl_item_attachment` ADD  `oldiaid` MEDIUMINT NOT NULL ;
+
+ALTER TABLE  `jl_item_measure_numofper` ADD  `deluid` MEDIUMINT NOT NULL AFTER  `deltime` ;

+ 11 - 0
151to160.sql

@@ -0,0 +1,11 @@
+ALTER TABLE `jl_user_profiles` ADD `remark` VARCHAR(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '备注信息';
+
+CREATE TABLE IF NOT EXISTS `jl_share` (
+  `sid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
+  `hashcode` char(255) NOT NULL,
+  `ids` int(11) NOT NULL,
+  `idtype` tinyint(3) UNSIGNED NOT NULL,
+  `intime` int(10) UNSIGNED NOT NULL,
+  `endtime` int(10) UNSIGNED NOT NULL,
+  PRIMARY KEY (`sid`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;

+ 147 - 0
160to170.sql

@@ -0,0 +1,147 @@
+-- phpMyAdmin SQL Dump
+-- version 4.7.0
+-- https://www.phpmyadmin.net/
+--
+-- Host: 10.27.6.148
+-- Generation Time: 2017-06-08 09:23:08
+-- 服务器版本: 5.7.17-13
+-- PHP Version: 7.0.15-0ubuntu0.16.04.4
+
+SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
+SET AUTOCOMMIT = 0;
+START TRANSACTION;
+SET time_zone = "+00:00";
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8mb4 */;
+
+--
+-- Database: `jlwebdev`
+--
+
+-- --------------------------------------------------------
+
+--
+-- 表的结构 `jl_sign`
+--
+
+CREATE TABLE IF NOT EXISTS `jl_sign` (
+  `sid` int(11) NOT NULL COMMENT '主键',
+  `project` int(11) NOT NULL COMMENT '项目主键',
+  `tender` int(11) NOT NULL COMMENT '标段主键',
+  `phaseno` int(11) NOT NULL COMMENT '期数',
+  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表名',
+  `ownuid` smallint(6) NOT NULL COMMENT '生成人id',
+  `intime` int(11) NOT NULL COMMENT '生成时间',
+  `pagenum` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '共有多少张报表,未解压默认为0',
+  `widhei` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表纸张大小 以mm为单位',
+  `audituid` smallint(6) UNSIGNED DEFAULT NULL COMMENT '发起人id',
+  `aintime` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '发起时间',
+  `status` enum('uncheck','checking','checked') NOT NULL DEFAULT 'uncheck' COMMENT '签署状态',
+  `sintime` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '签署完成时间',
+  `ishare` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否分享,0不分享(默认),1分享'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在线签署报表信息表';
+
+-- --------------------------------------------------------
+
+--
+-- 表的结构 `jl_sign_attachment`
+--
+
+CREATE TABLE IF NOT EXISTS `jl_sign_attachment` (
+  `said` int(11) UNSIGNED NOT NULL COMMENT '主键',
+  `sid` int(11) UNSIGNED NOT NULL COMMENT '报表id主键',
+  `curnum` smallint(5) UNSIGNED NOT NULL COMMENT '编号,第几张',
+  `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表文件路径'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='签署文件信息表';
+
+-- --------------------------------------------------------
+
+--
+-- 表的结构 `jl_sign_audit`
+--
+
+CREATE TABLE IF NOT EXISTS `jl_sign_audit` (
+  `satid` int(11) UNSIGNED NOT NULL COMMENT '主键',
+  `sid` int(11) UNSIGNED NOT NULL COMMENT '报表id主键',
+  `status` enum('uncheck','checking','checked') NOT NULL DEFAULT 'uncheck' COMMENT '个人签署状态',
+  `audituid` int(11) UNSIGNED NOT NULL COMMENT '签署人id',
+  `aname` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '签署人姓名',
+  `intime` int(11) NOT NULL COMMENT '签署时间'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户签署表';
+
+-- --------------------------------------------------------
+
+--
+-- 表的结构 `jl_sign_audit_attachment`
+--
+
+CREATE TABLE IF NOT EXISTS `jl_sign_audit_attachment` (
+  `saaid` int(11) NOT NULL COMMENT '主键',
+  `audituid` int(11) NOT NULL COMMENT '签署人id',
+  `said` int(11) NOT NULL COMMENT '报表文件id',
+  `picpath` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '签名图片地址',
+  `position` varchar(500) CHARACTER SET utf8 NOT NULL COMMENT '签名所在位置'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='用户签名关联表' ROW_FORMAT=COMPACT;
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `jl_sign`
+--
+ALTER TABLE `jl_sign`
+  ADD PRIMARY KEY (`sid`);
+
+--
+-- Indexes for table `jl_sign_attachment`
+--
+ALTER TABLE `jl_sign_attachment`
+  ADD PRIMARY KEY (`said`);
+
+--
+-- Indexes for table `jl_sign_audit`
+--
+ALTER TABLE `jl_sign_audit`
+  ADD PRIMARY KEY (`satid`);
+
+--
+-- Indexes for table `jl_sign_audit_attachment`
+--
+ALTER TABLE `jl_sign_audit_attachment`
+  ADD PRIMARY KEY (`saaid`);
+
+--
+-- 在导出的表使用AUTO_INCREMENT
+--
+
+--
+-- 使用表AUTO_INCREMENT `jl_sign`
+--
+ALTER TABLE `jl_sign`
+  MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;
+--
+-- 使用表AUTO_INCREMENT `jl_sign_attachment`
+--
+ALTER TABLE `jl_sign_attachment`
+  MODIFY `said` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;
+--
+-- 使用表AUTO_INCREMENT `jl_sign_audit`
+--
+ALTER TABLE `jl_sign_audit`
+  MODIFY `satid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;
+--
+-- 使用表AUTO_INCREMENT `jl_sign_audit_attachment`
+--
+ALTER TABLE `jl_sign_audit_attachment`
+  MODIFY `saaid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=1;COMMIT;
+
+ALTER TABLE `jl_user_profiles` ADD `signpath` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'global/signpath/signavatar.png' COMMENT '签名图片地址';
+
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

+ 28 - 0
170to184.sql

@@ -0,0 +1,28 @@
+CREATE TABLE IF NOT EXISTS `jl_measure_concern` (
+  `mcid` mediumint(9) NOT NULL,
+  `pid` mediumint(9) NOT NULL COMMENT '项目id',
+  `stid` mediumint(9) NOT NULL COMMENT '标段类型id',
+  `pmid` mediumint(9) NOT NULL COMMENT '标段id',
+  `uid` mediumint(9) NOT NULL COMMENT '关注人id',
+  `intime` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='标段关注人表';
+
+
+ALTER TABLE `jl_measure_concern`
+  ADD PRIMARY KEY (`mcid`);
+
+ALTER TABLE `jl_measure_concern`
+  MODIFY `mcid` mediumint(9) NOT NULL AUTO_INCREMENT;COMMIT;
+
+ALTER TABLE `jl_config` ADD `reportswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT '软件生成报表开关';
+
+ALTER TABLE `jl_config` ADD `signswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'web在线签署开启开关';
+
+ALTER TABLE `jl_config` ADD `launchsignswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT '发起签署开启开关';
+
+ALTER TABLE `jl_sign` ADD `isinter` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '图表类型,0:签署表,1:未完成传输的中间计量表,2表示已完成传输可签署的中间计量表,3 已完成添加草图成为签署表的计量表' AFTER `ishare`;
+ALTER TABLE `jl_sign` ADD `internum` INT UNSIGNED NOT NULL DEFAULT '0' COMMENT '中间计量表总页数';
+ALTER TABLE `jl_config` ADD `imediateswitch` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '中间计量表开关';
+ALTER TABLE `jl_config` ADD `smssignswitch` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '签署短信通知开关';
+ALTER TABLE `jl_sign` CHANGE `status` `status` ENUM('uncheck','checking','checked','stop','back') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'uncheck' COMMENT '签署状态';
+ALTER TABLE `jl_sign_audit` CHANGE `status` `status` ENUM('uncheck','checking','checked','stop','back') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'uncheck' COMMENT '个人签署状态';

+ 34 - 0
184to190.sql

@@ -0,0 +1,34 @@
+-- --------------------------------------------------------
+
+--
+-- 表的结构 `jl_user_token`
+--
+
+CREATE TABLE IF NOT EXISTS `jl_user_token` (
+  `id` int(10) UNSIGNED NOT NULL,
+  `uid` int(10) UNSIGNED NOT NULL,
+  `token` varchar(500) COLLATE utf8_unicode_ci NOT NULL COMMENT '登录token',
+  `addtime` int(15) NOT NULL COMMENT '生成时间',
+  `endtime` int(15) NOT NULL COMMENT '失效时间',
+  `comefrom` tinyint(1) UNSIGNED NOT NULL COMMENT '来自:1:web;2:software;3:app'
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='登录信息表';
+
+--
+-- Indexes for dumped tables
+--
+
+--
+-- Indexes for table `jl_user_token`
+--
+ALTER TABLE `jl_user_token`
+  ADD PRIMARY KEY (`id`);
+
+--
+-- 在导出的表使用AUTO_INCREMENT
+--
+
+--
+-- 使用表AUTO_INCREMENT `jl_user_token`
+--
+ALTER TABLE `jl_user_token`
+  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;COMMIT;

+ 1 - 0
190to200.sql

@@ -0,0 +1 @@
+ALTER TABLE `jl_sign` CHANGE `status` `status` ENUM('uncheck','checking','checked','stop','back','del') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'uncheck' COMMENT '签署状态';

+ 26 - 24
db190.sql

@@ -3,7 +3,7 @@
 -- https://www.phpmyadmin.net/
 --
 -- Host: 10.27.6.148
+-- Generation Time: 2017-10-31 10:28:05
 -- 服务器版本: 5.7.17-13
 -- PHP Version: 7.0.15-0ubuntu0.16.04.4
 
@@ -19,7 +19,7 @@ SET time_zone = "+00:00";
 /*!40101 SET NAMES utf8mb4 */;
 
 --
+-- Database: `jlwebdev`
 --
 
 -- --------------------------------------------------------
@@ -62,7 +62,7 @@ CREATE TABLE `jl_auser` (
 --
 
 INSERT INTO `jl_auser` (`auid`, `auname`, `aupass`, `aemail`) VALUES
-(1, 'madmin', '$2a$08$TbScA7uWG/VGm6KWqMfkiOAuCdC4wqRlSWcafwObi5PS71jJVXXve', '');
+(1, 'madmin', '$2a$08$TbScA7uWG/VGm6KWqMfkiOAuCdC4wqRlSWcafwObi5PS71jJVXXve', '2417587264@qq.com');
 
 -- --------------------------------------------------------
 
@@ -80,7 +80,7 @@ CREATE TABLE `jl_config` (
   `signswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'web在线签署开启开关',
   `launchsignswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT '发起签署开启开关',
   `imediateswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT '中间计量表开关',
-  `smssignswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT '短信签署通知开关'
+  `smssignswitch` tinyint(4) NOT NULL DEFAULT '1' COMMENT '签署短信通知开关'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 --
@@ -264,18 +264,18 @@ CREATE TABLE `jl_sign` (
   `sid` int(11) NOT NULL COMMENT '主键',
   `project` int(11) NOT NULL COMMENT '项目主键',
   `tender` int(11) NOT NULL COMMENT '标段主键',
-  `phaseno` int(11) NOT NULL COMMENT '期数',
+  `phaseno` int(11) NOT NULL COMMENT '期数主键',
   `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表名',
   `ownuid` smallint(6) NOT NULL COMMENT '生成人id',
   `intime` int(11) NOT NULL COMMENT '生成时间',
   `pagenum` smallint(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT '共有多少张报表,未解压默认为0',
-  `widhei` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表纸张大小 以mm为单位',
+  `widhei` varchar(20) NOT NULL COMMENT '报表纸张大小 以mm为单位',
   `audituid` smallint(6) UNSIGNED DEFAULT NULL COMMENT '发起人id',
   `aintime` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '发起时间',
-  `status` enum('uncheck','checking','checked','stop','back') NOT NULL DEFAULT 'uncheck' COMMENT '签署状态',
+  `status` enum('uncheck','checking','checked','stop','back','del') NOT NULL DEFAULT 'uncheck' COMMENT '签署状态',
   `sintime` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '签署完成时间',
   `ishare` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否分享,0不分享(默认),1分享',
-  `isinter` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '图表类型,0:签署表,1:未完成传输的中间计量表,2表示已完成传输可签署的中间计量表,3 已完成添加草图成为签署表的计量表',
+  `isinter` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '图表类型,0:签署表,1:未完成传输的中间计量表,2表示已完成传输可签署的中间计量表',
   `internum` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '中间计量表总页数'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在线签署报表信息表';
 
@@ -375,8 +375,8 @@ CREATE TABLE `jl_user_profiles` (
   `groups` enum('vip','anonymous') NOT NULL DEFAULT 'anonymous',
   `avatar` char(255) NOT NULL DEFAULT 'global/avatar/avtra.jpg',
   `isnotice` tinyint(4) NOT NULL DEFAULT '0',
-  `remark` varchar(500) NOT NULL COMMENT '备注信息',
-  `signpath` varchar(255) NOT NULL DEFAULT 'global/signpath/signavatar.png' COMMENT '签名图片地址'
+  `signpath` varchar(255) NOT NULL DEFAULT 'global/signpath/signavatar.png' COMMENT '签名图片地址',
+  `remark` varchar(500) NOT NULL COMMENT '备注信息'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- --------------------------------------------------------
@@ -552,7 +552,7 @@ ALTER TABLE `jl_zero_audit`
 -- 使用表AUTO_INCREMENT `jl_attachment`
 --
 ALTER TABLE `jl_attachment`
-  MODIFY `aid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5647;
+  MODIFY `aid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5339;
 --
 -- 使用表AUTO_INCREMENT `jl_auser`
 --
@@ -567,72 +567,72 @@ ALTER TABLE `jl_config`
 -- 使用表AUTO_INCREMENT `jl_item_attachment`
 --
 ALTER TABLE `jl_item_attachment`
-  MODIFY `iaid` mediumint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1169;
+  MODIFY `iaid` mediumint(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1157;
 --
 -- 使用表AUTO_INCREMENT `jl_item_measure_numofper`
 --
 ALTER TABLE `jl_item_measure_numofper`
-  MODIFY `imnid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1037;
+  MODIFY `imnid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1025;
 --
 -- 使用表AUTO_INCREMENT `jl_measure_audit`
 --
 ALTER TABLE `jl_measure_audit`
-  MODIFY `maid` smallint(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7746;
+  MODIFY `maid` smallint(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7276;
 --
 -- 使用表AUTO_INCREMENT `jl_measure_concern`
 --
 ALTER TABLE `jl_measure_concern`
-  MODIFY `mcid` mediumint(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=65;
+  MODIFY `mcid` mediumint(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
 --
 -- 使用表AUTO_INCREMENT `jl_measure_numofper`
 --
 ALTER TABLE `jl_measure_numofper`
-  MODIFY `mpid` mediumint(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2170;
+  MODIFY `mpid` mediumint(9) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1999;
 --
 -- 使用表AUTO_INCREMENT `jl_project`
 --
 ALTER TABLE `jl_project`
-  MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=328;
+  MODIFY `pid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=316;
 --
 -- 使用表AUTO_INCREMENT `jl_project_measure`
 --
 ALTER TABLE `jl_project_measure`
-  MODIFY `pmid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1752;
+  MODIFY `pmid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1671;
 --
 -- 使用表AUTO_INCREMENT `jl_section_type`
 --
 ALTER TABLE `jl_section_type`
-  MODIFY `stid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=506;
+  MODIFY `stid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=481;
 --
 -- 使用表AUTO_INCREMENT `jl_share`
 --
 ALTER TABLE `jl_share`
-  MODIFY `sid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
+  MODIFY `sid` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
 --
 -- 使用表AUTO_INCREMENT `jl_sign`
 --
 ALTER TABLE `jl_sign`
-  MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=87;
+  MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=56;
 --
 -- 使用表AUTO_INCREMENT `jl_sign_attachment`
 --
 ALTER TABLE `jl_sign_attachment`
-  MODIFY `said` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=4737;
+  MODIFY `said` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=457;
 --
 -- 使用表AUTO_INCREMENT `jl_sign_audit`
 --
 ALTER TABLE `jl_sign_audit`
-  MODIFY `satid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=89;
+  MODIFY `satid` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=32;
 --
 -- 使用表AUTO_INCREMENT `jl_sign_audit_attachment`
 --
 ALTER TABLE `jl_sign_audit_attachment`
-  MODIFY `saaid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=181;
+  MODIFY `saaid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', AUTO_INCREMENT=44;
 --
 -- 使用表AUTO_INCREMENT `jl_users`
 --
 ALTER TABLE `jl_users`
-  MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=285;
+  MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=269;
 --
 -- 使用表AUTO_INCREMENT `jl_users_auth`
 --
@@ -642,7 +642,7 @@ ALTER TABLE `jl_users_auth`
 -- 使用表AUTO_INCREMENT `jl_user_token`
 --
 ALTER TABLE `jl_user_token`
-  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
+  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
 --
 -- 使用表AUTO_INCREMENT `jl_zero_audit`
 --

+ 5 - 0
protected/class/actmeasure.php

@@ -160,4 +160,9 @@ class actMeasure
     {
         return $this->__mmeasure->count(array('where' => 'pmid=?', 'param' => array($pmid)));
     }
+
+    public function del($pmid)
+    {
+        return $this->__mmeasure->delete(array('where' => 'pmid=?', 'param' => array($pmid)));
+    }
 }

+ 5 - 0
protected/class/attfile.php

@@ -177,6 +177,11 @@ class attFile
         return $this->__file->delete(array('where' => 'mpid=?', 'param' => array($mpid)));
     }
 
+    public function delAllTimesFile3($pmid)
+    {
+        return $this->__file->delete(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
+    }
+
     public function getLastFileAid($pmid,$numpname,$times){
         $result = $this->__file->getOne(array('select' => 'aid', 'where' => 'pmid=? and numpname=? and times=?', 'param' => array($pmid, $numpname, $times), 'desc' => 'aid', 'asArray' => TRUE));
         return !empty($result) ? $result['aid'] : '';

+ 0 - 1
protected/class/itemfile.php

@@ -61,7 +61,6 @@ class ItemFile
     {
         return $pmid ? $this->__itemfile->find(array('where' => 'pmid=?', 'groupby' => 'ownerid', 'param' => array($pmid), 'asArray' => TRUE)) : FALSE;
     }
-
 }
 
 ?>

+ 21 - 0
protected/class/itemmeasurenum.php

@@ -116,4 +116,25 @@ class ItemMeasureNumpofper
     {
         return $this->__itemMeasureNum->delete(array('where' => 'iaid=?', 'param' => array($iaid)));
     }
+
+    public function delItembyPmid($pmid)
+    {
+        $list = $this->__itemMeasureNum->find(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
+        if(!empty($list)){
+            Doo::loadClass('itemfile');
+            include (DOO::conf()->SITE_PATH . 'protected/plugin/io.han.php');
+            foreach($list as $k => $v){
+                $itemfile = new ItemFile();
+                //删除附件文件、数据库记录
+                $itemfile_arr = $itemfile->getItemFile($v['iaid']);
+                if($itemfile_arr){
+                    $this->IoHandler = new IoHandler();
+                    $path = DOO::conf()->SITE_PATH.$itemfile_arr['filepath'];
+                    $this->IoHandler->DeleteFile($path);
+                    $itemfile->delItem($v['iaid']);
+                }
+                $this->delItemFields($v['imnid']);
+            }
+        }
+    }
 }

+ 28 - 0
protected/class/measureauditact.php

@@ -127,6 +127,12 @@ class MeasureauditAct
         return $this->__measureaudit->find(array('where' => 'pmid=? and numpname=? and times=? order by maid asc', 'param' => array($bid, $num, $maxtimesArray['maxtimes']), 'asArray' => TRUE));
     }
 
+    public function getUserAuditLast2($bid, $num)
+    {
+        $maxtimesArray = $this->getMaxTimes($bid, $num);
+        return $this->__measureaudit->find(array('where' => 'pmid=? and numpname=? and times=? order by last desc,maid asc', 'param' => array($bid, $num, $maxtimesArray['maxtimes']), 'asArray' => TRUE));
+    }
+
     public function getRowbyUID($audituid)
     {
         return $this->__measureaudit->find(array('where' => 'auditoruid=?', 'param' => array($audituid), 'asArray' => TRUE));
@@ -216,6 +222,15 @@ class MeasureauditAct
         return $this->__measureaudit->update(array('where' => 'maid=?', 'param' => array($maid)));
     }
 
+    public function updateMastatus2($maid)
+    {
+        $this->__measureaudit->mastatus = 'checking';
+        $this->__measureaudit->auditcontent = '';
+        $this->__measureaudit->onlineaudit = 0;
+//        $this->__measureaudit->audittime = '';
+        return $this->__measureaudit->update(array('where' => 'maid=?', 'param' => array($maid)));
+    }
+
     // for api
     public function updateAuditorMPID($mpid, $tenderid, $phaseno, $times = 0)
     {
@@ -233,6 +248,11 @@ class MeasureauditAct
         return $this->__measureaudit->update(array('where' => 'maid=?', 'param' => array($maid)));
     }
 
+    public function setUncheck($maid){
+        $this->__measureaudit->mastatus = 'uncheck';
+        return $this->__measureaudit->update(array('where' => 'maid=?', 'param' => array($maid)));
+    }
+
     public function setStatusTo($maid, $status = 3, $auditcontent = null, $isonline = 0)
     {
         $ma1 = new MeasureAudit();
@@ -369,4 +389,12 @@ class MeasureauditAct
 
     }
 
+    public function delMeasureAuditListbyPmid($pmid){
+        return $this->__measureaudit->delete(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
+    }
+
+    public function delAuditUserPyPid($pid){
+        return $this->__measureaudit->delete(array('where' => 'pid=?', 'param' => array($pid), 'asArray' => TRUE));
+    }
+
 }

+ 3 - 0
protected/class/measureconcerner.php

@@ -42,5 +42,8 @@ class MeasureConcerner
         return $this->__measureconcern->find(array('where' => 'uid=?', 'param' => array($uid), 'asArray' => TRUE));
     }
 
+    public function delMeasureConcernListbyPmid($pmid){
+        return $this->__measureconcern->delete(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
+    }
 
 }

+ 4 - 0
protected/class/numofperact.php

@@ -327,4 +327,8 @@ class NumofperAct {
 //        return $this->__numofperact->find(array('select' => 'sum(curralltotal) as currtotal,FROM_UNIXTIME(intime,"%Y-%m") as month', 'where' => 'stid=? and currstatus!=\'checkno\''
 //        , 'param' => array($stid), 'groupby' => 'FROM_UNIXTIME(intime,"%Y-%m")', 'asc' => 'intime', 'asArray' => TRUE));
     }
+
+    public function delMeasureNumofperListbyPmid($pmid) {
+        return $this->__numofperact->delete(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
+    }
 }

+ 28 - 3
protected/class/sign.php

@@ -194,9 +194,11 @@ class Signn
             $this->_signaudit->delete();
 
             $attlist = $this->getSignAttList($sid);
-            foreach ($attlist as $key => $value) {
-                $this->_signauditatt->said = $value['said'];
-                $this->_signauditatt->delete();
+            if(!empty($attlist)){
+                foreach ($attlist as $key => $value) {
+                    $this->_signauditatt->said = $value['said'];
+                    $this->_signauditatt->delete();
+                }
             }
         }
 
@@ -235,4 +237,27 @@ class Signn
         return $this->_sign->update();
     }
 
+    public function updateSignStatusbyPmid($pmid){
+//        $this->_sign->tender = $pmid;
+        $this->_sign->status = 'del';
+        return $this->_sign->update(array('where' => 'tender=?', 'param' => array($pmid)));
+    }
+
+    public function delSignbyTenderAndPhaseno($tender,$phaseno = ''){
+
+        $phasenolist = !empty($phaseno) && is_numeric($phaseno) ? ' and phaseno='. $phaseno : '';
+        $signlist = $this->_sign->find(array('where' => 'tender=?'.$phasenolist, 'param' => array($tender), 'asArray' => TRUE));
+
+        if(!empty($signlist)){
+            include (DOO::conf()->SITE_PATH . 'protected/plugin/io.han.php');
+            foreach($signlist as $k => $v){
+                $this->delSignbysid($v['sid'],'checking');
+
+                $this->IoHandler = new IoHandler();
+                $path = DOO::conf()->SITE_PATH."signs/".$v['sid'];
+                $this->IoHandler->RemoveDir($path);
+            }
+        }
+    }
+
 }

+ 31 - 15
protected/class/sms.php

@@ -2,12 +2,14 @@
 
 class Sms
 {
-    private $api_url, $auth_key, $errorMsg;
+    private $api_url, $account, $password, $extno, $errorMsg;
 
-    function __construct($api_url, $auth_key)
+    function __construct($api_url, $account,$password,$extno)
     {
         $this->api_url = $api_url;
-        $this->auth_key = $auth_key;
+        $this->account = $account;
+        $this->password = $password;
+        $this->extno = $extno;
     }
 
     /**
@@ -17,21 +19,38 @@ class Sms
     public function sendSms($mobile, $code)
     {
         $send = array(
-            'apikey' => $this->auth_key,
+            'action' => 'send',
+            'account' => $this->account,
+            'password' => $this->password,
             'mobile' => $mobile,
-            'text' => $code
+            'content' => $code,
+            'extno' => $this->extno
         );
         $data = http_build_query($send);
-        $res = json_decode($this->_httpClient($this->api_url, $data));
+        $res = simplexml_load_string($this->_httpClient($this->api_url,$data));
         $resArr = $this->objectToArray($res);
-        if (!empty($resArr) && $resArr["code"] == 0) {
-            return true;
-        } else {
-            if (empty($this->errorMsg)) $this->errorMsg = isset($resArr["msg"]) ? $resArr["msg"] : '未知错误';
+        $resultcode = !empty($resArr) ? explode('#@#',$resArr['resplist']['resp'])[2] : '';
+        if ($resultcode == '0') return true;
+        else {
+            if (empty($this->errorMsg)) $this->errorMsg = !empty($resultcode) ? $this->getErrorMsg($resultcode) : '未知错误';
             return false;
         }
     }
 
+    function getErrorMsg($code){
+        $msg = '';
+        switch($code){
+            case 6: $msg = '错误代码:6,请联系我们客服';break;
+            case 10: $msg = '错误代码:10,请联系我们客服';break;
+            case 12: $msg = '检查接收短信手机号码格式是否正确';break;
+            case 15: $msg = '错误代码:15,请联系我们客服';break;
+            case 16: $msg = '一天时间内同一个手机号码不能太频繁接收短信';break;
+            case 17: $msg = '错误代码:17,请联系我们客服';break;
+            default : $msg = '错误代码:400,请联系我们客服';break;
+        }
+        return $msg;
+    }
+
     //对象转数组,使用get_object_vars返回对象属性组成的数组
     function objectToArray($array)
     {
@@ -55,13 +74,10 @@ class Sms
     {
         try {
             $ch = curl_init();
-            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept:text/plain;charset=utf-8', 'Content-Type:application/x-www-form-urlencoded', 'charset=utf-8'));
-            curl_setopt($ch, CURLOPT_URL, $api_url);
+            curl_setopt($ch, CURLOPT_URL,$api_url.$data);
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
-            curl_setopt($ch, CURLOPT_POST, 1);
+            curl_setopt($ch, CURLOPT_HEADER, 0);
             curl_setopt($ch, CURLOPT_TIMEOUT, 10);
-            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
-            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
             $res = curl_exec($ch);
             curl_close($ch);
             return $res;

+ 1 - 1
protected/config/routes.conf.php

@@ -57,7 +57,7 @@ $route['*']['/rproject/:pid/section/:pmid/files/page/:pindex/user/:userid/num/:n
 
 // S
 $route['get']['/sproject/index'] = array('SProjectController', 'index');
-$route['get']['/sproject/:pid/section'] = array('SProjectController', 'proSection');
+$route['*']['/sproject/:pid/section'] = array('SProjectController', 'proSection');
 $route['get']['/sproject/:pid/section/:pmid/detail'] = array('SProjectController', 'proDetail');
 $route['get']['/sproject/:pid/section/measure'] = array('SProjectController', 'proMeasure');
 $route['*']['/sproject/:pid/section/:pmid/files'] = array('SProjectController', 'proSectionFiles');

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 6 - 2
protected/config/sms.conf.php


+ 1 - 1
protected/config/ver.conf.php

@@ -1,5 +1,5 @@
 <?php
 
 // Version
-$config['ver'] = 'v1.9.0';
+$config['ver'] = 'v2.0.0';
 

+ 35 - 1
protected/controller/AppController.php

@@ -51,7 +51,7 @@ class AppController extends DooController {
         $this->modelconfig = new AConfig();
         $this->itemMeasureNum = new ItemMeasureNumpofper();
         $this->aconfig = new AConfig();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
         $this->__hashids = new Hashids\Hashids('jlzfuserid', 8);
     }
 
@@ -358,15 +358,48 @@ class AppController extends DooController {
                 echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
                 die();
             }
+            if($_POST['act'] == 'back') {
+                $measureauditact = new MeasureauditAct();
+                $measureauditact->setUncheck($auditArray['maid']);
+                $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
+
+                //获取并改变上一个审批人为审批中状态
+                $lastmeasureauditact = $this->measureauditact->getMyAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $_POST['last']);
+                $this->measureauditact->updateMastatus2($lastmeasureauditact['maid']);
+                //退回必须删除上一个上报人的文件数据并更改前一个文件为最新2
+                $this->attfile->delMyAttFile($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $_POST['last']);
+
+                $lastaid = $this->attfile->getLastFileAid($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+                if(!empty($lastaid)){
+                    $this->attfile->updateIsNew2($lastaid);
+                }
+                // SMS Start
+                $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
+                $userProArray = $this->profile->getProWithUid($_POST['last']);
+                if (isset($userProArray) && ($userProArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
+                    $retval = $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR8"]);
+                }
+                // SMS End
+                echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+                die();
+            }
             $this->data['pmid'] = $lastRowArray['pmid'];
             $this->data['numpname'] = $lastRowArray['numpname'];
             $this->data['times'] = $lastRowArray['times'];
+            $firstUser = 0;
             foreach ($auditUserArray as $key => $value) {
                 $strAvatar = $this->auth->getAvatar($value['auditoruid']);
                 if ($value['auditoruid'] == $_GET['uid']) {
                     $this->data['mastatus'] = $value['mastatus'];
                     $this->data['maid'] = $value['maid'];
                     $name = $this->profile->getProWithUid($value['auditoruid'])['name'].'(我)';
+                    if($key == 0){
+                        $firstUser = 1;
+                    }else{
+                        $this->data['lastUserID'] = $auditUserArray[$key-1]['auditoruid'];
+                        $this->data['lastUsername'] = $this->profile->getProWithUid($auditUserArray[$key-1]['auditoruid'])['name'];
+                        $this->data['lastUserCompany'] = $this->profile->getProWithUid($auditUserArray[$key-1]['auditoruid'])['company'];
+                    }
                 }else{
                     $name = $this->profile->getProWithUid($value['auditoruid'])['name'];
                 }
@@ -396,6 +429,7 @@ class AppController extends DooController {
             $this->data['pmid'] = $this->params['pmid'];
             $this->data['pid'] = $this->params['pid'];
             $this->data['mpid'] = $numStatusArray['mpid'];
+            $this->data['firstUser'] = $firstUser;
             $this->render('r-project-section-detail-APP', $this->data, TRUE);
         }else{
             exit('error:无参数无法访问本页');

+ 3 - 1
protected/controller/ClientController.php

@@ -81,7 +81,7 @@ class ClientController extends DooController
         $this->aconfig = new AConfig();
         $this->sign = new signn();
         $this->concern = new MeasureConcerner();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
     }
 
     public function ClientSignin()
@@ -98,9 +98,11 @@ class ClientController extends DooController
             echo json_encode(array('status' => FALSE, 'msg' => '登录失败,请更新软件。'), JSON_UNESCAPED_UNICODE);
             die;
         }
+        
         if (!empty($_POST['version'])) {
             try {
                 if ($this->modelconfig->getOne(array('select' => 'onoff', 'asArray' => TRUE))['onoff'] != 1) {
+                    
                     $versionTotal = implode("",explode('.', $_POST['version']));
                     $StrJson = ($this->modelconfig->getOne(array('select' => 'upgradeinfo', 'asArray' => TRUE))['upgradeinfo']);
                     $jsonObj = json_decode($StrJson, true);

+ 26 - 3
protected/controller/ProjectController.php

@@ -104,6 +104,22 @@ class ProjectController extends DooController
             $this->project->updateProName($_POST['ppid'], $_POST['target_pname']);
             return Doo::conf()->APP_URL . 'project/index';
         }
+        if (isset($_POST['proid']) && is_numeric($_POST['proid']) && isset($_POST['delpro'])) {
+            if($this->actmeasure->getMearsureCount($_POST['proid']) == 0){
+                $this->project->del($_POST['proid']);
+                //空的标段类型,未上报的审批人列表也要删
+                $stArr = $this->contractact->getRowByPid($_POST['proid']);
+                if(!empty($stArr)){
+                    foreach($stArr as $k => $v){
+                        $cont = new Contractact();
+                        $cont->del($v['stid']);
+                    }
+                }
+                $this->measureauditact->delAuditUserPyPid($_POST['proid']);
+
+            }
+            return Doo::conf()->APP_URL . 'project/index';
+        }
         $this->data['pros'] = $this->project->getAll($this->auth->getUid());
         if (isset($this->data['pros'][0]['pid'])) {
             foreach ($this->data['pros'] as $key => $value) {
@@ -294,6 +310,12 @@ class ProjectController extends DooController
             $this->contractact->updateStName($_POST['stid'], $_POST['proname']);
             return Doo::conf()->APP_URL . 'project/' . $this->params['pid'] . '/section';
         }
+        if (isset($_POST['delstid']) && is_numeric($_POST['delstid']) && isset($_POST['delform'])) {
+            if($this->actmeasure->getCountMeasure($_POST['delstid']) == 0){
+                $this->contractact->del($_POST['delstid']);
+            }
+            return Doo::conf()->APP_URL . 'project/' . $this->params['pid'] . '/section';
+        }
         $this->getFav();
         $contractArray = $this->contractact->getRowByPid($this->params['pid']); // 获取合同段
         $htmlstr = NULL;
@@ -371,14 +393,15 @@ class ProjectController extends DooController
                 $otherprogress = round((($biaoduantotalmoney - $currTotal['totalplus']) / $biaoduantotalmoney) * 100) . '%';
                 $biaoduantotalmoney = number_format($biaoduantotalmoney, 2, '.', ',');
             }
+			$delstidhtml =  $this->actmeasure->getCountMeasure($v['stid']) == 0 ? '<a id="idst_' . $v['stid'] . '" stid="' . $v['stid'] . '" stname="' . $v['stname'] . '" href="#del-confirm-2" data-toggle="modal" title="删除类型">
+									<span data-icon="U" aria-hidden="true" class="colRed" data-placement="bottom" data-toggle="tooltip" data-original-title="删除类型" style="font-size:18px"></span></a>' : '';
             $progresswidth = floatval($progress) >= 100 ? '100%' : $progress;
-            $otherprogresswidth = floatval($otherprogress) >= 100 ? '100%' : $otherprogress;
-            $htmlstr .= '<div class="project">
+            $otherprogresswidth = floatval($otherprogress) >= 100 ? '100%' : $otherprogress;            $htmlstr .= '<div class="project">
 			<div class="proSection">
 			    <table class="table">
 				<thead>
 				    <tr>
-					<td width="150"><span aria-hidden="true" data-icon="u"></span> ' . $v['stname'] . '<a id="idt_' . $v['stid'] . '" href="#secoption" data-toggle="modal" title="编辑/查看KEY" stid="' . $v['stid'] . '" proname="' . $v['stname'] . '" key="' . $v['stkey'] . '"><span data-icon="S" aria-hidden="true" class="closePanel" data-placement="bottom" data-toggle="tooltip" data-original-title="查看KEY" style="font-size:18px"></span></a></td>
+					<td width="150"><span aria-hidden="true" data-icon="u"></span> ' . $v['stname'] . '<a id="idt_' . $v['stid'] . '" href="#secoption" data-toggle="modal" title="编辑/查看KEY" stid="' . $v['stid'] . '" proname="' . $v['stname'] . '" key="' . $v['stkey'] . '"><span data-icon="S" aria-hidden="true" class="closePanel" data-placement="bottom" data-toggle="tooltip" data-original-title="查看KEY" style="font-size:18px"></span></a>' .$delstidhtml. '</td>
 					<td width="90">总价:</td><td width="165">¥<b style="font-size:16px">' . $biaoduantotalmoney . '</b></td>
 					<td width="60">完成进度:</td><td><div class="progress">
 						<div class="progress-bar progress-bar-success" style="width:' . $progresswidth . ';" data-placement="bottom" data-toggle="tooltip" data-original-title="累计完成:¥' . $nprogress . '">' . $progress . '</div>

+ 46 - 6
protected/controller/RProjectController.php

@@ -43,7 +43,7 @@ class RProjectController extends DooController
         $this->itemfle = new ItemFile();
         $this->att = new attachment();
         $this->sign = new Signn();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
         $this->data['currChannle'] = 'r';
         $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
@@ -346,7 +346,7 @@ class RProjectController extends DooController
         $actmeasureArray = $this->actmeasure->getAll();
         foreach ($actmeasureArray as $kkkk => $vvvv) {
             if ($vvvv['stid'] == $measureArray['stid']) {
-                if(in_array($vvvv['pmid'],$pmidArray)) {
+                if(in_array($vvvv['pmid'],$pmidArray)){
                     if (($vvvv['pmid'] == $this->params['pmid'])) {
                         $this->data['curractmeasureArray'] = $vvvv;
                     } else {
@@ -465,7 +465,7 @@ class RProjectController extends DooController
         $actmeasureArray = $this->actmeasure->getAll();
         foreach ($actmeasureArray as $kkkk => $vvvv) {
             if ($vvvv['stid'] == $measureArray['stid']) {
-                if(in_array($vvvv['pmid'],$pmidArray)) {
+                if(in_array($vvvv['pmid'],$pmidArray)){
                     if (($vvvv['pmid'] == $this->params['pmid'])) {
                         $this->data['curractmeasureArray'] = $vvvv;
                     } else {
@@ -658,7 +658,7 @@ class RProjectController extends DooController
         $actmeasureArray = $this->actmeasure->getAll();
         foreach ($actmeasureArray as $kkkk => $vvvv) {
             if ($vvvv['stid'] == $measureArray['stid']) {
-                if(in_array($vvvv['pmid'],$pmidArray)) {
+                if(in_array($vvvv['pmid'],$pmidArray)){
                     if (($vvvv['pmid'] == $this->params['pmid'])) {
                         $this->data['curractmeasureArray'] = $vvvv;
                     } else {
@@ -719,7 +719,7 @@ class RProjectController extends DooController
         $actmeasureArray = $this->actmeasure->getAll();
         foreach ($actmeasureArray as $kkkk => $vvvv) {
             if ($vvvv['stid'] == $measureArray['stid']) {
-                if(in_array($vvvv['pmid'],$pmidArray)) {
+                if(in_array($vvvv['pmid'],$pmidArray)){
                     if (($vvvv['pmid'] == $this->params['pmid'])) {
                         $this->data['curractmeasureArray'] = $vvvv;
                     } else {
@@ -856,16 +856,50 @@ class RProjectController extends DooController
             echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
             die();
         }
+        if($_POST['act'] == 'back') {
+            $measureauditact = new MeasureauditAct();
+            $measureauditact->setUncheck($auditArray['maid']);
+            $this->numofperact->updateAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], 'checking', $maxTimes['times']);
+
+            //获取并改变上一个审批人为审批中状态
+            $lastmeasureauditact = $this->measureauditact->getMyAuditStatus($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $_POST['last']);
+            $this->measureauditact->updateMastatus2($lastmeasureauditact['maid']);
+            //退回必须删除上一个上报人的文件数据并更改前一个文件为最新2
+            $this->attfile->delMyAttFile($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times'], $_POST['last']);
+
+            $lastaid = $this->attfile->getLastFileAid($lastRowArray['pmid'], $lastRowArray['numpname'], $maxTimes['times']);
+            if(!empty($lastaid)){
+                $this->attfile->updateIsNew2($lastaid);
+            }
+
+            // SMS Start
+            $TenderArray = $this->actmeasure->getRowByPmid($lastRowArray['pmid']);
+            $userProArray = $this->profile->getProWithUid($_POST['last']);
+            if (isset($userProArray) && ($userProArray['mobile'])) {// // XXXX(标段名),陈特,已审批通过。请您继续审批。
+                $retval = $this->__auditNotice($userProArray['mobile'], Doo::conf()->SMS_TIPS_PRE . $TenderArray["pmname"] . Doo::conf()->SMS_TIPS["AUDIT_NOTICE_AUDITOR8"]);
+            }
+            // SMS End
+            echo json_encode(array('status' => 1), JSON_UNESCAPED_UNICODE);
+            die();
+        }
         $this->data['pmid'] = $lastRowArray['pmid'];
         $this->data['numpname'] = $lastRowArray['numpname'];
         $this->data['times'] = $lastRowArray['times'];
         $this->data['pid'] = $this->params['pid'];
+        $firstUser = 0;
         foreach ($auditUserArray as $key => $value) {
             $strAvatar = $this->auth->getAvatar($value['auditoruid']);
             $i = $key + 1;
             if ($value['auditoruid'] == $this->auth->getUid()) {
                 $this->data['mastatus'] = $value['mastatus'];
                 $this->data['maid'] = $value['maid'];
+                if($key == 0){
+                    $firstUser = 1;
+                }else{
+                    $this->data['lastUserID'] = $auditUserArray[$key-1]['auditoruid'];
+                    $this->data['lastUsername'] = $this->profile->getProWithUid($auditUserArray[$key-1]['auditoruid'])['name'];
+                    $this->data['lastUserCompany'] = $this->profile->getProWithUid($auditUserArray[$key-1]['auditoruid'])['company'];
+                }
             }
             if ($value['mastatus'] == 'uncheck') {
                 $statuStr = '';
@@ -905,6 +939,7 @@ class RProjectController extends DooController
         $this->data['pmid'] = $this->params['pmid'];
         $this->data['pid'] = $this->params['pid'];
         $this->data['mpid'] = $this->params['mpid'];
+        $this->data['firstUser'] = $firstUser;
         $this->render('r-project-section-report', $this->data, TRUE);
     }
 
@@ -965,7 +1000,7 @@ class RProjectController extends DooController
         $actmeasureArray = $this->actmeasure->getAll();
         foreach ($actmeasureArray as $kkkk => $vvvv) {
             if ($vvvv['stid'] == $measureArray['stid']) {
-                if(in_array($vvvv['pmid'],$pmidArray)) {
+                if(in_array($vvvv['pmid'],$pmidArray)){
                     if (($vvvv['pmid'] == $this->params['pmid'])) {
                         $this->data['curractmeasureArray'] = $vvvv;
                     } else {
@@ -1032,6 +1067,11 @@ class RProjectController extends DooController
             }
         }
 
+        $numStatusArray = $this->numofperact->getLastStatus3($this->params['pid'], $this->params['pmid']);
+        if (!isset($numStatusArray['currstatus'])) {
+            $numStatusArray['currstatus'] = 'uncheck';
+        }
+
         $this->data['list'] = isset($list) ? $list : '';
         $this->data['phasenolist'] = isset($phasenolist) ? $phasenolist : '';
         $this->data['pager'] = $pager->output;

+ 26 - 4
protected/controller/SProjectController.php

@@ -13,6 +13,7 @@ Doo::loadClass('attachment');
 Doo::loadHelper('DooPager');
 Doo::loadClass('sign');
 Doo::loadModelAt('aconfig', 'admin');
+Doo::loadClass('measureconcerner');
 
 /**
  * MainController
@@ -23,7 +24,7 @@ Doo::loadModelAt('aconfig', 'admin');
 class SProjectController extends DooController
 {
 
-    private $aconfig,$data, $sign, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $measureauditact, $itemmeasurenum, $itemfle, $att;
+    private $aconfig,$data, $sign, $concern, $auth, $attfile, $profile, $project, $contractact, $actmeasure, $numofperact, $measureauditact, $itemmeasurenum, $itemfle, $att;
 
     public function beforeRun($resource, $action)
     {
@@ -56,6 +57,7 @@ class SProjectController extends DooController
         $this->itemfle = new ItemFile();
         $this->att = new attachment();
         $this->sign = new Signn();
+        $this->concern = new MeasureConcerner();
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
         $this->data['currChannle'] = 's';
         $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
@@ -136,6 +138,27 @@ class SProjectController extends DooController
 
     public function proSection()
     {
+        //删除标段
+        if(isset($_POST['secid']) && is_numeric($_POST['secid'])){
+            //删除标段关注人、审批人、期数、文件数据表、附件的内容,并更改签署表的状态为‘del’
+            if((isset($_POST['delsec']) && isset($_POST['text']) && trim($_POST['text']) == '删除标段') || isset($_POST['delsec2'])){
+
+                $mcresult = $this->concern->delMeasureConcernListbyPmid($_POST['secid']);
+
+                $maresult = $this->measureauditact->delMeasureAuditListbyPmid($_POST['secid']);
+
+                $attresult = $this->attfile->delAllTimesFile3($_POST['secid']);
+
+                $this->itemmeasurenum->delItembyPmid($_POST['secid']);
+
+                $muresult = $this->numofperact->delMeasureNumofperListbyPmid($_POST['secid']);
+
+                $signresult = $this->sign->updateSignStatusbyPmid($_POST['secid']);
+
+                $this->actmeasure->del($_POST['secid']);
+            }
+            return Doo::conf()->APP_URL . 'sproject/' . $this->params['pid'] . '/section';
+        }
         $this->data['currproArray'] = $this->data['allproArray'] = NULL;
         $proArray = $this->actmeasure->getGroupProject($this->auth->getUid());
         foreach ($proArray as $v) {
@@ -264,10 +287,10 @@ class SProjectController extends DooController
             }
         }
         foreach ($total as $value2) {
-            $total3[] = round(($value2 / $totalstid) * 100);
+            $total3[] = $totalstid != 0 ? round(($value2 / $totalstid) * 100) : 0;
         }
         foreach ($total1 as $value11) {
-            $total4[] = round(($value11 / $totalstid) * 100);
+            $total4[] = $totalstid != 0 ? round(($value11 / $totalstid) * 100) : 0;
         }
         $this->data['projectDate'] = implode(',', $cnymArray);
         $this->data['t1'] = implode(',', $total3);
@@ -312,7 +335,6 @@ class SProjectController extends DooController
         // 面包屑导航标段
         $this->data['curractmeasureArray'] = NULL;
         $this->data['allactmeasureArray'] = [];
-//        $actmeasureArray = $this->actmeasure->getAll();
         $actmeasureArray = $this->actmeasure->getRowUser($this->auth->getUid());
         foreach ($actmeasureArray as $kkkk => $vvvv) {
             if ($vvvv['stid'] == $measureArray['stid']) {

+ 5 - 6
protected/controller/SignController.php

@@ -50,8 +50,7 @@ class SignController extends DooController
         $this->numofperact = new NumofperAct();
         $this->measureauditact = new MeasureauditAct();
         $this->sign = new Signn();
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
-//        $this->pdf = new FPDF('P','mm','A4');
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
         $this->data['rootUrl'] = Doo::conf()->APP_URL;
         $this->data['currChannle'] = 'sign';
         $this->data['user'] = $this->profile->getProWithUid($this->auth->getUid());
@@ -97,7 +96,7 @@ class SignController extends DooController
     {
 
         //获取我发起的签署数目
-        $this->data['mySignNum'] = $this->sign->getMySignNumbyUid($this->auth->getUid());
+        $this->data['mySignNum'] = $this->sign->getMySignNumbyUid($this->auth->getUid(),'status!="del"');
 
         //获取关于我的正在签署数目
         $this->data['doingSignNum'] = $this->sign->getDoingSignNumbyUid($this->auth->getUid());
@@ -349,7 +348,7 @@ class SignController extends DooController
     public function signMyList(){
         Doo::loadHelper('DooPager');
         $pagestr = '';
-        $sqlstr = ' 1';
+        $sqlstr = 'status!="del"';
         $this->data['project'] = '';
         $this->data['tender'] = '';
         $this->data['phaseno'] = '';
@@ -728,7 +727,7 @@ class SignController extends DooController
         $this->data['nosign'] = '';
 
         //获取项目信息
-        $searchsql = '(`isinter`=0 OR `isinter`=3) AND (`ownuid`='.$this->auth->getUid().' OR `audituid`='.$this->auth->getUid().' OR sid IN (SELECT sid FROM jl_sign_audit WHERE jl_sign_audit.audituid='.$this->auth->getUid().'))';
+        $searchsql = 'status!="del" AND (`isinter`=0 OR `isinter`=3) AND (`ownuid`='.$this->auth->getUid().' OR `audituid`='.$this->auth->getUid().' OR sid IN (SELECT sid FROM jl_sign_audit WHERE jl_sign_audit.audituid='.$this->auth->getUid().'))';
         $itemlist = $this->sign->getSignGroupByProject($searchsql);
         if(!empty($itemlist)){
             foreach($itemlist as $ik => $iv){
@@ -827,7 +826,7 @@ class SignController extends DooController
         $signmsg = $this->sign->getOneSignbysid($this->params['sid']);
 
         //获取标段审批人列表
-        $auditactlist = $this->measureauditact->getUserAuditLast($signmsg['tender'],$signmsg['phaseno']);
+        $auditactlist = $this->measureauditact->getUserAuditLast2($signmsg['tender'],$signmsg['phaseno']);
         $userlist = array();
         if(!empty($auditactlist)){
             foreach($auditactlist as $k => $v){

+ 1 - 1
protected/controller/UserController.php

@@ -55,7 +55,7 @@ class UserController extends DooController
         $this->numofperact = new NumofperAct();
         $this->user = new User();
         $this->ph = new PasswordHash(8, FALSE);
-        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_AUTHKEY);
+        $this->sms = new Sms(Doo::conf()->SMS_URL, Doo::conf()->SMS_ACCOUNT, DOO::conf()->SMS_PASSWORD, DOO::conf()->SMS_EXTNO);
         $this->aconfig = new AConfig();
         $this->measureauditact = new MeasureauditAct();
         $this->sign = new signn();

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 33 - 8
protected/module/admin/controller/ProController.php


+ 5 - 0
protected/module/admin/model/ameasure.php

@@ -53,6 +53,11 @@ class Ameasure extends DooModel
         return $this->delete(array('where' => 'pmid=?', 'param' => array($pmid)));
     }
 
+    public function getOneRow($pmid)
+    {
+        return $this->getOne(array('where' => 'pmid=?', 'param' => array($pmid), 'asArray' => TRUE));
+    }
+
 }
 
 ?>

+ 1 - 1
protected/view/edit-app.html

@@ -28,7 +28,7 @@
 				<legend>下载APP</legend>
 				<div class="app-code-item clearfix">
 					<h1>扫码下载APP</h1>
-					<div class="code-img"><img src="{{rootUrl}}global/images/android-code.png"></div>
+					<div class="code-img"><img src="http://vc.6jlzf.cn/global/QRCode.png" width="154px"></div>
 					<br>
 					<h1>APP扫码快捷登录</h1>
 					<div class="code-img"><a class="btn btn-link" data-toggle="modal" href="#app-help"><span class="glyphicon glyphicon-question-sign"></span> 如何快捷登录</a><br><img src="{{rootUrl}}{{qrcode}}"></div>

+ 3 - 0
protected/view/edit-profile-sms.html

@@ -85,6 +85,9 @@
                             <label class="checkbox-inline">
                                 <input type="checkbox" checked value="option1" disabled> 标段审批不通过(上报人接收)
                             </label>
+                            <label class="checkbox-inline">
+                                <input type="checkbox" checked value="option1" disabled> 标段审批退回(上一审批人)
+                            </label>
                         </div>
                     </div>
                     <!--正常使用-->

+ 37 - 4
protected/view/r-project-section-detail-APP.html

@@ -7,11 +7,22 @@
     <meta name=copyright content=smartcost.com.cn>
     <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
     <link rel=stylesheet href="{{rootUrl}}global/css/app/bootstrap.css">
-    <link rel=stylesheet href="{{rootUrl}}global/css/app/style.css">
+    <link rel=stylesheet href="{{rootUrl}}global/css/app/style.css?201709181">
     <script src="{{rootUrl}}global/js/jquery-1.9.1.min.js"></script>
     <script src="{{rootUrl}}global/js/app/bootstrap.js"></script>
     <script src="{{rootUrl}}global/js/app/global.js"></script>
     <script src="{{rootUrl}}global/js/app/echarts.min.js"></script>
+    <!-- if {{firstUser}} == 0 -->
+    <style>
+        .bottomToolsbar ul li{
+            float:left;
+            width:33.333%;
+            height:5.5rem;
+            line-height: 5.5rem;
+            text-align: center;
+        }
+    </style>
+    <!-- endif -->
 </head>
 <body>
     <div class="wrapContent">
@@ -141,6 +152,7 @@
               </div>
               <ul>
                 <li><button type="button" class="submit btn-danger" data-toggle="modal" data-target="#myModalUnpass">审批不通过</button></li>
+                  <!-- if {{firstUser}} == 0 --><li><button type="button" class="submit btn-warning" data-toggle="modal" data-target="#myModalreturn">退回</button></li><!-- endif -->
                 <li><button type="button" class="submit btn-success" data-toggle="modal" data-target="#myModalPass">审批通过</button></li>
               </ul>
             </div>
@@ -159,7 +171,7 @@
                   </div>
                   <div class="modal-footer">
                     <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
-                    <button type="button" class="btn btn-danger auditclass" act="np" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}" times="{{times}}">确认审批不通过</button>
+                    <button type="button" class="btn btn-danger auditclass" act="np" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}" times="{{times}}" last="">确认审批不通过</button>
                   </div>
                 </div>
               </div>
@@ -180,11 +192,31 @@
                   <div class="modal-footer">
                     <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                     <button type="button" class="btn btn-success auditclass" act="p" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
-                            times="{{times}}" id="pass">确认审批通过</button>
+                            times="{{times}}" last="" id="pass">确认审批通过</button>
                   </div>
                 </div>
               </div>
             </div>
+              <!-- if {{firstUser}} == 0 -->
+              <div class="modal fade modalWrap" id="myModalreturn" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
+                  <div class="modal-dialog" role="document">
+                      <div class="modal-content">
+                          <div class="modal-header">
+                              <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
+                              <h4 class="modal-title">退回</h4>
+                          </div>
+                          <div class="modal-body">
+                              <h4>是否退回上一个审批人“{{lastUsername}}<!-- if !empty({{lastUserCompany}}) -->({{lastUserCompany}})<!-- endif -->”审批</h4>
+                          </div>
+                          <div class="modal-footer">
+                              <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
+                              <button type="button" class="btn btn-warning auditclass" act="back" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
+                                      times="{{times}}" last="{{lastUserID}}" id="back">确认退回</button>
+                          </div>
+                      </div>
+                  </div>
+              </div>
+              <!-- endif -->
             <!-- endif -->
           </div>
         </div>
@@ -357,11 +389,12 @@
                 var content = $(this).parent().parent().find("textarea").val();
                 var act = $(this).attr('act');
                 var maid = $(this).attr('maid');
+                var last = $(this).attr('last');
                 $.ajax({
                     type: "POST",
                     dataType: "json",
                     cache: false,
-                    data: {"act": act, "pmid": pmid, "numpname": numpname, "times": times, "content": content},
+                    data: {"act": act, "pmid": pmid, "numpname": numpname, "times": times, "content": content, "last": last},
                     url: "/app/rproject/{{pid}}/section/{{pmid}}/detail?uid={{uid}}",
                     success: function (data) {
                         if (data['status'] == 1) {

+ 25 - 3
protected/view/r-project-section-report.html

@@ -148,6 +148,7 @@
                             <a class="btn btn-success" data-toggle="modal" href="#reportPass"><span aria-hidden="true"
                                                                                                     data-icon="d"></span>&nbsp;审批通过</a>
                         </div>
+                        <!-- if {{firstUser}} == 0 --><a class="btn btn-warning" data-toggle="modal" href="#reportBack"><span aria-hidden="true" data-icon="d"></span>&nbsp;退回</a><!-- endif -->
                         <a type="button" class="btn btn-danger" data-toggle="modal" href="#reportNopass"><span
                                 aria-hidden="true" data-icon="e"></span>&nbsp;审批不通过</a>
                     </div>
@@ -216,13 +217,33 @@
             <div class="modal-footer">
                 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
                 <button class="btn btn-success auditclass" act="p" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
-                        times="{{times}}" id="pass">确认审批通过
+                        times="{{times}}" last="" id="pass">确认审批通过
                 </button>
             </div>
         </div>
     </div>
 </div>
 <!-- 审批通过 -->
+<!-- if {{firstUser}} == 0 -->
+<!-- 退回 -->
+<div id="reportBack" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">      <div class="modal-dialog">
+    <div class="modal-content">
+        <div class="modal-header">
+            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+            <h4 class="modal-title">退回</h4>
+        </div>
+        <div class="modal-body">
+            <h4>是否退回给上一审批人"{{lastUsername}}<!-- if !empty({{lastUserCompany}}) -->({{lastUserCompany}})<!-- endif -->"重新审批?</h4>
+        </div>
+        <div class="modal-footer">
+            <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
+            <button class="btn btn-warning auditclass" act="back" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}" times="{{times}}" last="{{lastUserID}}" id="back">确认退回</button>
+        </div>
+    </div>
+</div>
+</div>
+<!-- 退回 -->
+<!-- endif -->
 <!-- 审批不通过 -->
 <div id="reportNopass" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
      aria-hidden="true">
@@ -244,7 +265,7 @@
             <div class="modal-footer">
                 <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
                 <button class="btn btn-danger auditclass" act="np" maid="{{maid}}" pmid="{{pmid}}" numpname="{{numpname}}"
-                        times="{{times}}">确认审批不通过
+                        times="{{times}}" last="">确认审批不通过
                 </button>
             </div>
         </div>
@@ -261,11 +282,12 @@
             var content = $(this).parent().parent().find("textarea").val();
             var act = $(this).attr('act');
             var maid = $(this).attr('maid');
+            var last = $(this).attr('last');
             $.ajax({
                 type: "POST",
                 dataType: "json",
                 cache: false,
-                data: {"act": act, "pmid": pmid, "numpname": numpname, "times": times, "content": content},
+                data: {"act": act, "pmid": pmid, "numpname": numpname, "times": times, "content": content, "last": last},
                 url: "/rproject/{{pid}}/section/{{pmid}}/report/{{mpid}}",
                 success: function (data) {
                     if (data['status'] == 1) {

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 99 - 21
protected/view/s-project-section.html


+ 45 - 13
protected/view/w-project-section.html

@@ -160,6 +160,32 @@
 		</div>
     </div>
     <!-- 标段类型设置弹出 -->
+	<!-- 删除标段类型 -->
+	<div id="del-confirm-2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
+		<div class="modal-dialog">
+			<div class="modal-content">
+				<div class="modal-header">
+					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+					<h4 class="modal-title">删除标段类型</h4>
+				</div>
+				<form class="form-horizontal" method="post">
+					<input type="hidden" name="delstid" id="delstid" value="">
+					<div class="modal-body">
+						<div class="form">
+							<div class="alert alert-danger">
+								确认删除 <span id="delstname"></span> ?
+							</div>
+						</div>
+					</div>
+					<div class="modal-footer">
+						<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
+						<input type="submit" class="btn btn-danger" name="delform" value="确认删除" />
+					</div>
+				</form>
+			</div>
+		</div>
+	</div>
+	<!-- 删除标段类型 -->
     <script src={{rootUrl}}global/js/jquery-1.9.1.min.js></script>
     <script src={{rootUrl}}global/js/bootstrap.js></script>
     <script src={{rootUrl}}global/js/jquery.tablesorter.js></script>
@@ -168,19 +194,25 @@
     <script type="text/javascript">autoFlashHeight();</script>
     <script type="text/javascript">
 	$(document).ready(function () {
-	    $("#secname").keydown(function (event) {
-		if (event.which == 13) {
-		    document.tenderform.submit();
-		}
-	    });
-	    $("[id^='idt_']").click(function (e) {
-		var proname = $(this).attr('proname');
-		var key = $(this).attr('key');
-		var stid = $(this).attr('stid');
-		$("#proname").val(proname);
-		$("#key").val(key);
-		$("#stid").val(stid);
-	    })
+		$("#secname").keydown(function (event) {
+			if (event.which == 13) {
+				document.tenderform.submit();
+			}
+		});
+		$("[id^='idt_']").click(function (e) {
+			var proname = $(this).attr('proname');
+			var key = $(this).attr('key');
+			var stid = $(this).attr('stid');
+			$("#proname").val(proname);
+			$("#key").val(key);
+			$("#stid").val(stid);
+		});
+		$("[id^='idst_']").click(function (e) {
+			var stname = $(this).attr('stname');
+			var stid = $(this).attr('stid');
+			$("#delstname").text(stname);
+			$("#delstid").val(stid);
+		});
 	})
     </script>
 </body>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 37 - 3
protected/view/w-project.html