dever 3 years ago
parent
commit
d7bb10101e

+ 23 - 25
app/factory/assets/pc/html/setGoods.html

@@ -251,41 +251,39 @@
     // 一键删除
     function delGoods()
     {
-        if (confirm('确定删除吗?')) {
-            var key = mini.get("key").getValue();
-            if (key == '请输入商品名称') {
-                key = '';
-            }
-            if (key) {
-                key = key.toLowerCase();
-            }
-            for (var i in tree.data) {
-                if (typeof(tree.data[i].children) == 'object') {
-                    if (tree.data[i].children.length > 0) {
-                        for (var j in tree.data[i].children) {
-                            if (key) {
-                                var name = tree.data[i].children[j].name;
-                                if (name.indexOf(key) != -1) {
-                                    unsetGoods(tree.data[i].children[j]);
-                                }
-                            } else {
-                                unsetGoods(tree.data[i].children[j]);
-                            }
-                        }
-                    } else {
+        var key = mini.get("key").getValue();
+        if (key == '请输入商品名称') {
+            key = '';
+        }
+        if (key) {
+            key = key.toLowerCase();
+        }
+        for (var i in tree.data) {
+            if (typeof(tree.data[i].children) == 'object') {
+                if (tree.data[i].children.length > 0) {
+                    for (var j in tree.data[i].children) {
                         if (key) {
-                            var name = tree.data[i].name;
+                            var name = tree.data[i].children[j].name;
                             if (name.indexOf(key) != -1) {
-                                unsetGoods(tree.data[i]);
+                                unsetGoods(tree.data[i].children[j]);
                             }
                         } else {
+                            unsetGoods(tree.data[i].children[j]);
+                        }
+                    }
+                } else {
+                    if (key) {
+                        var name = tree.data[i].name;
+                        if (name.indexOf(key) != -1) {
                             unsetGoods(tree.data[i]);
                         }
+                    } else {
+                        unsetGoods(tree.data[i]);
                     }
                 }
             }
-            setTotal();
         }
+        setTotal();
     }
 
     function unsetGoods(node)

+ 23 - 25
app/shop/assets/pc/html/setGoods.html

@@ -255,41 +255,39 @@
     // 一键删除
     function delGoods()
     {
-        if (confirm('确定删除吗?')) {
-            var key = mini.get("key").getValue();
-            if (key == '请输入商品名称') {
-                key = '';
-            }
-            if (key) {
-                key = key.toLowerCase();
-            }
-            for (var i in tree.data) {
-                if (typeof(tree.data[i].children) == 'object') {
-                    if (tree.data[i].children.length > 0) {
-                        for (var j in tree.data[i].children) {
-                            if (key) {
-                                var name = tree.data[i].children[j].name;
-                                if (name.indexOf(key) != -1) {
-                                    unsetGoods(tree.data[i].children[j]);
-                                }
-                            } else {
-                                unsetGoods(tree.data[i].children[j]);
-                            }
-                        }
-                    } else {
+        var key = mini.get("key").getValue();
+        if (key == '请输入商品名称') {
+            key = '';
+        }
+        if (key) {
+            key = key.toLowerCase();
+        }
+        for (var i in tree.data) {
+            if (typeof(tree.data[i].children) == 'object') {
+                if (tree.data[i].children.length > 0) {
+                    for (var j in tree.data[i].children) {
                         if (key) {
-                            var name = tree.data[i].name;
+                            var name = tree.data[i].children[j].name;
                             if (name.indexOf(key) != -1) {
-                                unsetGoods(tree.data[i]);
+                                unsetGoods(tree.data[i].children[j]);
                             }
                         } else {
+                            unsetGoods(tree.data[i].children[j]);
+                        }
+                    }
+                } else {
+                    if (key) {
+                        var name = tree.data[i].name;
+                        if (name.indexOf(key) != -1) {
                             unsetGoods(tree.data[i]);
                         }
+                    } else {
+                        unsetGoods(tree.data[i]);
                     }
                 }
             }
-            setTotal();
         }
+        setTotal();
     }
 
     function unsetGoods(node)

+ 23 - 25
app/store/assets/pc/html/setGoods.html

@@ -285,41 +285,39 @@
     // 一键删除
     function delGoods()
     {
-        if (confirm('确定删除吗?')) {
-            var key = mini.get("key").getValue();
-            if (key == '请输入商品名称') {
-                key = '';
-            }
-            if (key) {
-                key = key.toLowerCase();
-            }
-            for (var i in tree.data) {
-                if (typeof(tree.data[i].children) == 'object') {
-                    if (tree.data[i].children.length > 0) {
-                        for (var j in tree.data[i].children) {
-                            if (key) {
-                                var name = tree.data[i].children[j].name;
-                                if (name.indexOf(key) != -1) {
-                                    unsetGoods(tree.data[i].children[j]);
-                                }
-                            } else {
-                                unsetGoods(tree.data[i].children[j]);
-                            }
-                        }
-                    } else {
+        var key = mini.get("key").getValue();
+        if (key == '请输入商品名称') {
+            key = '';
+        }
+        if (key) {
+            key = key.toLowerCase();
+        }
+        for (var i in tree.data) {
+            if (typeof(tree.data[i].children) == 'object') {
+                if (tree.data[i].children.length > 0) {
+                    for (var j in tree.data[i].children) {
                         if (key) {
-                            var name = tree.data[i].name;
+                            var name = tree.data[i].children[j].name;
                             if (name.indexOf(key) != -1) {
-                                unsetGoods(tree.data[i]);
+                                unsetGoods(tree.data[i].children[j]);
                             }
                         } else {
+                            unsetGoods(tree.data[i].children[j]);
+                        }
+                    }
+                } else {
+                    if (key) {
+                        var name = tree.data[i].name;
+                        if (name.indexOf(key) != -1) {
                             unsetGoods(tree.data[i]);
                         }
+                    } else {
+                        unsetGoods(tree.data[i]);
                     }
                 }
             }
-            setTotal();
         }
+        setTotal();
     }
 
     function unsetGoods(node)

+ 23 - 25
app/store/assets/pc/html/setGoodsNum.html

@@ -241,41 +241,39 @@
     // 一键删除
     function delGoods()
     {
-        if (confirm('确定删除吗?')) {
-            var key = mini.get("key").getValue();
-            if (key == '请输入商品名称') {
-                key = '';
-            }
-            if (key) {
-                key = key.toLowerCase();
-            }
-            for (var i in tree.data) {
-                if (typeof(tree.data[i].children) == 'object') {
-                    if (tree.data[i].children.length > 0) {
-                        for (var j in tree.data[i].children) {
-                            if (key) {
-                                var name = tree.data[i].children[j].name;
-                                if (name.indexOf(key) != -1) {
-                                    unsetGoods(tree.data[i].children[j]);
-                                }
-                            } else {
-                                unsetGoods(tree.data[i].children[j]);
-                            }
-                        }
-                    } else {
+        var key = mini.get("key").getValue();
+        if (key == '请输入商品名称') {
+            key = '';
+        }
+        if (key) {
+            key = key.toLowerCase();
+        }
+        for (var i in tree.data) {
+            if (typeof(tree.data[i].children) == 'object') {
+                if (tree.data[i].children.length > 0) {
+                    for (var j in tree.data[i].children) {
                         if (key) {
-                            var name = tree.data[i].name;
+                            var name = tree.data[i].children[j].name;
                             if (name.indexOf(key) != -1) {
-                                unsetGoods(tree.data[i]);
+                                unsetGoods(tree.data[i].children[j]);
                             }
                         } else {
+                            unsetGoods(tree.data[i].children[j]);
+                        }
+                    }
+                } else {
+                    if (key) {
+                        var name = tree.data[i].name;
+                        if (name.indexOf(key) != -1) {
                             unsetGoods(tree.data[i]);
                         }
+                    } else {
+                        unsetGoods(tree.data[i]);
                     }
                 }
             }
-            setTotal();
         }
+        setTotal();
     }
 
     function unsetGoods(node)

+ 23 - 23
service/agent/lib/Agreement.php

@@ -6,7 +6,7 @@ use Dever;
 
 class Agreement
 {
-	private $font_size = 15;
+	private $font_size = 12;
 
 	# 查看合同
 	public function show_api()
@@ -320,14 +320,14 @@ class Agreement
         if (isset($info['content']) && $info['content']) {
             $info['content'] = Dever::array_decode($info['content']);
             foreach($info['content'] as $k => $v) {
-                $pdf->content($v['name'], $v['content']);
+                $pdf->content($v['name'], $v['content'], $this->font_size);
             }
         } else {
             $method = 'content_' . $agreement['type'];
             $content = $this->$method($agreement, $info);
 
             foreach ($content as $k => $v) {
-                $pdf->content($v['name'], $v['content']);
+                $pdf->content($v['name'], $v['content'], $this->font_size);
             }
 
             if (isset($info['create_state']) && $info['create_state'] == 1) {
@@ -457,7 +457,7 @@ class Agreement
 	        	'甲 方',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -475,7 +475,7 @@ class Agreement
 	        	'统一社会信用代码',
 	        	26,
 	        	STR_PAD_LEFT,
-	        	55,
+	        	45,
 	        ),
 	        'content' => array
 	        (
@@ -493,7 +493,7 @@ class Agreement
 	        	'地 址',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -511,7 +511,7 @@ class Agreement
 	        	'电 话',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -529,7 +529,7 @@ class Agreement
 	        	'乙 方',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -547,7 +547,7 @@ class Agreement
 	        	'统一社会信用代码/身份证号码',
 	        	37,
 	        	STR_PAD_LEFT,
-	        	83,
+	        	67,
 	        ),
 	        'content' => array
 	        (
@@ -565,7 +565,7 @@ class Agreement
 	        	'地 址',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -583,7 +583,7 @@ class Agreement
 	        	'电 话',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -613,14 +613,14 @@ class Agreement
         if (isset($info['content']) && $info['content']) {
             $info['content'] = Dever::array_decode($info['content']);
             foreach($info['content'] as $k => $v) {
-                $pdf->content($v['name'], $v['content']);
+                $pdf->content($v['name'], $v['content'], $this->font_size);
             }
         } else {
             $method = 'content_' . $agreement['type'];
             $content = $this->$method($agreement, $info, array($role, $name, $oname, $sdate, $edate, $qdate));
 
             foreach ($content as $k => $v) {
-                $pdf->content($v['name'], $v['content']);
+                $pdf->content($v['name'], $v['content'], $this->font_size);
             }
 
             if (isset($info['create_state']) && $info['create_state'] == 1) {
@@ -908,7 +908,7 @@ class Agreement
 	        	'甲 方',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -926,7 +926,7 @@ class Agreement
 	        	'统一社会信用代码',
 	        	26,
 	        	STR_PAD_LEFT,
-	        	55,
+	        	45,
 	        ),
 	        'content' => array
 	        (
@@ -944,7 +944,7 @@ class Agreement
 	        	'地 址',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -962,7 +962,7 @@ class Agreement
 	        	'电 话',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -980,7 +980,7 @@ class Agreement
 	        	'乙 方',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -998,7 +998,7 @@ class Agreement
 	        	'统一社会信用代码/身份证号码',
 	        	37,
 	        	STR_PAD_LEFT,
-	        	83,
+	        	67,
 	        ),
 	        'content' => array
 	        (
@@ -1016,7 +1016,7 @@ class Agreement
 	        	'地 址',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -1034,7 +1034,7 @@ class Agreement
 	        	'电 话',
 	        	15,
 	        	STR_PAD_LEFT,
-	        	25,
+	        	20,
 	        ),
 	        'content' => array
 	        (
@@ -1066,14 +1066,14 @@ class Agreement
         if (isset($info['content']) && $info['content']) {
             $info['content'] = Dever::array_decode($info['content']);
             foreach($info['content'] as $k => $v) {
-                $pdf->content($v['name'], $v['content']);
+                $pdf->content($v['name'], $v['content'], $this->font_size);
             }
         } else {
             $method = 'content_' . $agreement['type'];
             $content = $this->$method($agreement, $info, array($role, $name, $price, $price_str, $area, $sdate, $edate, $qdate));
 
             foreach ($content as $k => $v) {
-                $pdf->content($v['name'], $v['content']);
+                $pdf->content($v['name'], $v['content'], $this->font_size);
             }
 
             if (isset($info['create_state']) && $info['create_state'] == 1) {