diff --git a/wms/contract/api/postContractNewApplyData.php b/wms/contract/api/postContractNewApplyData.php new file mode 100644 index 00000000..f0032a78 --- /dev/null +++ b/wms/contract/api/postContractNewApplyData.php @@ -0,0 +1,68 @@ +beginTransaction(); + try{ + if($isFirst == 1){ + $sql_str = "INSERT INTO contract_new_apply (mid, contractno, sales_man, apply_date, apply_type, case_name, customer, manager, vat, total_price, buy_fee, install_fee, contact_address, workdeadline_a, workdeadline_b, test_time, freedeadline, trade_address, tradedeadline, progress, status, created_at, created_by) VALUES (:mid, :contractno, :sales_man, :apply_date, :apply_type, :case_name, :customer, :manager, :vat, :total_price, :buy_fee, :install_fee, :contact_address, :workdeadline_a, :workdeadline_b, :test_time, :freedeadline, :trade_address, :tradedeadline, :progress, :status, :created_at, :created_by)"; + $stmt = $conn -> prepare($sql_str); + $stmt ->bindParam(':mid', $mid); + $stmt ->bindParam(':contractno', $vol_no); + $stmt ->bindParam(':sales_man', $salesman); + $stmt ->bindParam(':apply_date', $apply_date); + $stmt ->bindParam(':apply_type', $apply_type); + $stmt ->bindParam(':case_name', $case_name); + $stmt ->bindParam(':customer', $customer); + $stmt ->bindParam(':manager', $manager); + $stmt ->bindParam(':vat', $vat); + $stmt ->bindParam(':total_price', $total_price); + $stmt ->bindParam(':buy_fee', $buy_fee); + $stmt ->bindParam(':install_fee', $install_fee); + $stmt ->bindParam(':contact_address', $contact_address); + $stmt ->bindParam(':workdeadline_a', $workdeadline_a); + $stmt ->bindParam(':workdeadline_b', $workdeadline_b); + $stmt ->bindParam(':test_time', $test_time); + $stmt ->bindParam(':freedeadline', $freedeadline); + $stmt ->bindParam(':trade_address', $trade_address); + $stmt ->bindParam(':tradedeadline', $tradedeadline); + $stmt ->bindParam(':progress', $progress); + $stmt ->bindParam(':status', $status); + $stmt ->bindParam(':created_at', $created_at); + $stmt ->bindParam(':created_by', $created_by); + $stmt ->execute(); + header("HTTP/1.1 201 success!"); + $conn->commit(); + } + }catch(PDOException $e){ + $conn->rollback(); + echo $e->getMessage(); + die('Error!:'.$e->getMessage()); + } + + +} \ No newline at end of file diff --git a/wms/contract/api/postNewContractData.php b/wms/contract/api/postNewContractData.php index dc08c30c..001fe1f5 100644 --- a/wms/contract/api/postNewContractData.php +++ b/wms/contract/api/postNewContractData.php @@ -22,6 +22,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $lm_tel = $_POST["lm_tel"]; $address = $_POST["address"]; $salesman = $_POST["salesman"]; + $qc = $_POST["qc"]; $contracttype = $_POST["contracttype"]; $files = !empty($_FILES['files']) ? $_FILES['files'] : null; $files_id = null; @@ -36,6 +37,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co if(empty($lm_tel)) $fail_arr[] = '聯絡人電話為必填'; if(empty($address)) $fail_arr[] = '地址為必填'; if(empty($salesman)) $fail_arr[] = '營業員為必填'; + if(empty($qc)) $fail_arr[] = '請選擇QC或官檢'; if(count($fail_arr) > 0) { header("HTTP/1.1 422 Unprocessable Entity"); echo json_encode($fail_arr); @@ -105,7 +107,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $files = null; } - $sql_str = "INSERT INTO contract_m_signed_back (contract_no, customer, manager, vat, case_name, linkman, lm_tel, address, salesman, salesman_name, files_id, created_at, created_by) VALUES (:contract_no, :customer, :manager, :vat, :case_name, :linkman, :lm_tel, :address, :salesman, :salesman_name, :files_id, :created_at, :created_by)"; + $sql_str = "INSERT INTO contract_m_signed_back (contract_no, customer, manager, vat, case_name, linkman, lm_tel, address, salesman, salesman_name, files_id, created_at, created_by, qc_official_type) VALUES (:contract_no, :customer, :manager, :vat, :case_name, :linkman, :lm_tel, :address, :salesman, :salesman_name, :files_id, :created_at, :created_by, :qc)"; $stmt = $conn -> prepare($sql_str); $stmt -> bindParam(":contract_no",$contractno); $stmt -> bindParam(":customer",$customer); @@ -120,6 +122,7 @@ if(isset($_POST["contractno"]) && $_POST["contractno"] != "" && isset($_POST['co $stmt -> bindParam(":files_id",$files_id); $stmt -> bindParam(":created_at",$created_at); $stmt -> bindParam(":created_by",$created_by); + $stmt -> bindParam(":qc",$qc); $stmt -> execute(); diff --git a/wms/contract/api/putContractData.php b/wms/contract/api/putContractData.php index 63694e83..f1e78164 100644 --- a/wms/contract/api/putContractData.php +++ b/wms/contract/api/putContractData.php @@ -17,6 +17,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $lm_tel = !empty($_POST['lm_tel']) ? $_POST['lm_tel'] : null; $address = !empty($_POST['address']) ? $_POST['address'] : null; $salesman = !empty($_POST['salesman']) ? $_POST['salesman'] : null; + $qc = !empty($_POST['qc']) ? $_POST['qc'] : null; $deletefiles = !empty($_POST['deletefiles']) ? $_POST['deletefiles'] : null; $files_id = !empty($_POST['files_id']) ? $_POST['files_id'] : null; $files = !empty($_FILES['files']) ? $_FILES['files'] : null; @@ -33,6 +34,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] if(empty($lm_tel)) $fail_arr[] = '聯絡人電話為必填'; if(empty($address)) $fail_arr[] = '地址為必填'; if(empty($salesman)) $fail_arr[] = '營業員為必填'; + if(empty($qc)) $fail_arr[] = '請選擇QC或管檢'; if(count($fail_arr) > 0) { header("HTTP/1.1 422 Unprocessable Entity"); echo json_encode($fail_arr); @@ -41,7 +43,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $conn->beginTransaction(); - $sql_str = "UPDATE contract_m_signed_back SET contract_no=:contract_no, customer=:customer, manager=:manager, vat=:vat, case_name=:case_name, linkman=:linkman, lm_tel=:lm_tel, address=:address, salesman=:salesman WHERE id = :id"; + $sql_str = "UPDATE contract_m_signed_back SET contract_no=:contract_no, customer=:customer, manager=:manager, vat=:vat, case_name=:case_name, linkman=:linkman, lm_tel=:lm_tel, address=:address, salesman=:salesman, qc_official_type=:qc WHERE id = :id"; $stmt = $conn -> prepare($sql_str); $stmt -> bindParam(':contract_no' ,$contract_no); $stmt -> bindParam(':customer' ,$customer); @@ -52,6 +54,7 @@ if(isset($_POST['contractno']) && $_POST['contractno']!="" && isset($_POST["id"] $stmt -> bindParam(':lm_tel' ,$lm_tel); $stmt -> bindParam(':address' ,$address); $stmt -> bindParam(':salesman' ,$salesman); + $stmt -> bindParam(':qc' ,$qc); $stmt -> bindParam(':id' ,$id); $stmt -> execute(); if(!empty($deletefiles)){ diff --git a/wms/contract/composer.json b/wms/contract/composer.json index da158f4b..09abf778 100644 --- a/wms/contract/composer.json +++ b/wms/contract/composer.json @@ -12,6 +12,7 @@ } ], "require": { - "tecnickcom/tcpdf": "^6.6" + "tecnickcom/tcpdf": "^6.6", + "phpoffice/phpspreadsheet": "^1.29" } } diff --git a/wms/contract/composer.lock b/wms/contract/composer.lock index 3f3992b1..bdc40884 100644 --- a/wms/contract/composer.lock +++ b/wms/contract/composer.lock @@ -4,8 +4,573 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c5a277735def820cc2b17b4a2b30976d", + "content-hash": "f9ceea0f00278e84ee8bc939092d4886", "packages": [ + { + "name": "ezyang/htmlpurifier", + "version": "v4.17.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "reference": "bbc513d79acf6691fa9cf10f192c90dd2957f18c", + "shasum": "" + }, + "require": { + "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" + }, + "require-dev": { + "cerdic/css-tidy": "^1.7 || ^2.0", + "simpletest/simpletest": "dev-master" + }, + "suggest": { + "cerdic/css-tidy": "If you want to use the filter 'Filter.ExtractStyleBlocks'.", + "ext-bcmath": "Used for unit conversion and imagecrash protection", + "ext-iconv": "Converts text to and from non-UTF-8 encodings", + "ext-tidy": "Used for pretty-printing HTML" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/v4.17.0" + }, + "time": "2023-11-17T15:01:25+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "reference": "b8174494eda667f7d13876b4a7bfef0f62a7c0d1", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-zlib": "*", + "php-64bit": "^8.1" + }, + "require-dev": { + "ext-zip": "*", + "friendsofphp/php-cs-fixer": "^3.16", + "guzzlehttp/guzzle": "^7.5", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.5", + "phpunit/phpunit": "^10.0", + "vimeo/psalm": "^5.0" + }, + "suggest": { + "guzzlehttp/psr7": "^2.4", + "psr/http-message": "^2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/3.1.0" + }, + "funding": [ + { + "url": "https://github.com/maennchen", + "type": "github" + }, + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2023-06-21T14:59:35+00:00" + }, + { + "name": "markbaker/complex", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "reference": "95c56caa1cf5c766ad6d65b6344b807c1e8405b9", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/3.0.2" + }, + "time": "2022-12-06T16:21:08+00:00" + }, + { + "name": "markbaker/matrix", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/728434227fe21be27ff6d86621a1b13107a2562c", + "reference": "728434227fe21be27ff6d86621a1b13107a2562c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-master", + "phpcompatibility/php-compatibility": "^9.3", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/3.0.1" + }, + "time": "2022-12-02T22:17:43+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.29.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.15", + "maennchen/zipstream-php": "^2.1 || ^3.0", + "markbaker/complex": "^3.0", + "markbaker/matrix": "^3.0", + "php": "^7.4 || ^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "dev-main", + "dompdf/dompdf": "^1.0 || ^2.0", + "friendsofphp/php-cs-fixer": "^3.2", + "mitoteam/jpgraph": "^10.3", + "mpdf/mpdf": "^8.1.1", + "phpcompatibility/php-compatibility": "^9.3", + "phpstan/phpstan": "^1.1", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", + "squizlabs/php_codesniffer": "^3.7", + "tecnickcom/tcpdf": "^6.5" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "ext-intl": "PHP Internationalization Functions", + "mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" + }, + "time": "2023-06-14T22:48:31+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "e616d01114759c4c489f93b099585439f795fe35" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/e616d01114759c4c489f93b099585439f795fe35", + "reference": "e616d01114759c4c489f93b099585439f795fe35", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/1.0.2" + }, + "time": "2023-04-10T20:10:41+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "psr/simple-cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" + }, + "time": "2021-10-29T13:26:27+00:00" + }, { "name": "tecnickcom/tcpdf", "version": "6.6.5", diff --git a/wms/contract/contract-new-apply.php b/wms/contract/contract-new-apply.php new file mode 100644 index 00000000..ab74027c --- /dev/null +++ b/wms/contract/contract-new-apply.php @@ -0,0 +1,476 @@ + +alert('非法訪問!!!');"; + echo ""; + exit; +} +$id = $_GET["id"]; + +$sql_str = "SELECT * FROM contract_new_apply WHERE mid = :mid"; +$stmt = $conn->prepare($sql_str); +$stmt->bindParam(':mid',$id); +$stmt->execute(); +$contract_new_apply = $stmt->fetch(PDO::FETCH_ASSOC); +if(empty($contract_new_apply)){ + + + $sql_str = "SELECT pricereview_main.*, pricereview_main.id as mainid, account.name as accountname + FROM pricereview_main + JOIN account ON pricereview_main.person = account.accountid + WHERE pricereview_main.id = :id"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':id',$id); + $stmt->execute(); + $contract = $stmt->fetch(PDO::FETCH_ASSOC); + $accounttype = "M"; + $sql_str = "SELECT * FROM account WHERE accounttype = :accounttype"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':accounttype',$accounttype); + $stmt->execute(); + $persons = $stmt->fetchAll(PDO::FETCH_ASSOC); + + $sql_str = "SELECT * FROM hope_elevator_customer WHERE vol_no = :vol_no ORDER BY created_at DESC"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':vol_no', $contract['contractno']); + $stmt->execute(); + $customer = $stmt->fetch(PDO::FETCH_ASSOC); + + $mid = $contract['mainid']; + $sql_str = "SELECT * FROM pricereview_pay WHERE mid = :mid ORDER BY pay_kind ASC"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':mid', $mid); + $stmt->execute(); + $pays = $stmt->fetchAll(PDO::FETCH_ASSOC); + $price_a = 0; + $price_b = 0; + foreach($pays as $pay){ + if($pay['pay_kind'] <= 4){ + $price_a = $price_a + $pay['pay_amount']; + }else{ + $price_b = $price_b + $pay['pay_amount']; + } + } + $sql_str = "SELECT * FROM pricereview_item WHERE mid = :mid AND item_group = 'A'"; + $stmt = $conn->prepare($sql_str); + $stmt->bindParam(':mid', $mid); + $stmt->execute(); + $items = $stmt->fetchAll(PDO::FETCH_ASSOC); +} +?> + + + + + +
+ 合約書申請(新梯)+ |
+ |||||||
+ 業務確認項+ |
+ + + + | +||||||
卷號 | ++ + + + | +統一編號 | +
+
+ 未填寫 + |
+ 合約書申請日期 | +
+
+ 未填寫 + |
+ 申請類別 | +
+
+ 未填寫 + |
+
案件名稱 | +
+
+ 未填寫 + |
+ 立約人 | +
+
+ 未填寫 + |
+ 負責人 | +
+
+ 未填寫 + |
+ ||
含稅給約總價 | +
+
+ 未填寫 + |
+ 含稅貸款(A) | +
+
+ 未填寫 + |
+ 含稅安裝款(A) | +
+
+ 未填寫 + |
+ ||
聯絡地址 | +
+
+ 未填寫 + |
+ 完工期限 | +
+
+
+
+
+ 貨抵工地
+
+
+
+ 天內安裝完成,甲方應於貨底工地前
+
+
+
+ 天完成並整理完善。
+
+ 未填寫 + |
+ ||||
附則 | +
+
+
+
+ 乙方應於
+
+
+
+ 天內試車完成
+
+ 未填寫 + |
+ 免保期限 | +
+
+
+
+
+ 個月
+
+ 未填寫 + |
+
+ ||||
交貨地點 | +
+
+ 未填寫 + |
+ 交貨期限 | +
+
+
+
+ 圖色確認第
+
+
+
+ 天出貨
+
+ 未填寫 + |
+
+ 項次 + |
+
+ 規格 + |
+
+ 數量 + |
+
+ 金額 + |
+ ||||
+ |
+
+ 未填寫 + |
+
+
+ 未填寫 + |
+
+
+ 未填寫 + |
+
+ 合約類別 + |
+
+ 款別 + |
+
+ 條件名稱 + |
+
+ 收款條件日期區分 + |
+
+ 條件日期 + |
+
+ 票期 + |
+
+ 付款比率 + |
+
+ 金額 + |
+
+ + | ++ + | +
+
+
+ 簽約後天付訂金 + + +簽約後付訂金 + + + +簽約後天付二次款 + + +簽約後付二次款 + + +貨抵工地付貨到款 + + +安裝完成後天收款 + + +安裝完成後收款 + + + +交車後天付尾款 + + +交車後付尾款 + + +- + + |
+ + + | +
+
+
+
+
+ 天
+
+ |
+
+
+
+
+
+ 天
+
+ |
+
+ % + |
+ + + | +
+ 簽核流程+ |
+ |||||||
業務部協理 | ++ + 已退件 + + + 審核中 + + + 已通過 + + | +業務部承辦人 | ++ + 已退件 + + + 審核中 + + + 已通過 + + | +營業經理 | ++ + 已退件 + + + 審核中 + + + 已通過 + + | +營業員 | ++ |
未填寫
+未填寫
+未填寫
名稱 | -規格 | -備註 | -配置 | -單位 | -定價 | -
---|---|---|---|---|---|
".$k2." | "; - echo "".$v3["spec"]." | "; - echo "".$v3["memo"]." | "; - echo "".$optional." | "; - echo "".$v3["unit"]." | "; - echo "".number_format($v3["price"])." | "; - echo "
名稱 | +規格 | +備註 | +配置 | +單位 | +定價 | +
---|---|---|---|---|---|
".$k2." | "; + echo "".$v3["spec"]." | "; + echo "".$v3["memo"]." | "; + echo "".$optional." | "; + echo "".$v3["unit"]." | "; + echo "".number_format($v3["price"])." | "; + echo "