jlutt@163.com 3 tahun lalu
induk
melakukan
649f7e3544

+ 8 - 0
ERPUpload/ERPupload.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

TEMPAT SAMPAH
ERPUpload/img/upload.png


File diff ditekan karena terlalu besar
+ 6727 - 0
ERPUpload/js/bootstrap/css/bootstrap.css


File diff ditekan karena terlalu besar
+ 7 - 0
ERPUpload/js/bootstrap/js/bootstrap.min.js


File diff ditekan karena terlalu besar
+ 5 - 0
ERPUpload/js/jquery/jquery.min.js


File diff ditekan karena terlalu besar
+ 11158 - 0
ERPUpload/js/plupload/moxie.js


File diff ditekan karena terlalu besar
+ 16 - 0
ERPUpload/js/plupload/moxie.min.js


File diff ditekan karena terlalu besar
+ 2381 - 0
ERPUpload/js/plupload/plupload.dev.js


File diff ditekan karena terlalu besar
+ 29 - 0
ERPUpload/js/plupload/plupload.full.min.js


File diff ditekan karena terlalu besar
+ 13 - 0
ERPUpload/js/plupload/plupload.min.js


+ 189 - 0
ERPUpload/upload.html

@@ -0,0 +1,189 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+    <script src="js/jquery/jquery.min.js"></script>
+    <!--    <script type="text/javascript" src="js/plupload/js/jqueryui/jquery-ui.min.js"></script>-->
+    <!--    <link rel="stylesheet" href="js/plupload/js/jqueryui/jquery-ui.min.css"/>-->
+    <link rel="stylesheet" href="js/bootstrap/css/bootstrap.css"/>
+    <script type="text/javascript" src="js/plupload/plupload.full.min.js"></script>
+    <style>
+        .upload {
+            width: 100%;
+            text-align: center;
+        }
+
+        .title_span {
+            font-size: 24px;
+            color: rgba(0, 0, 0, .85);
+            font-weight: 500;
+            line-height: 32px;
+            margin-bottom: 16px;
+            margin-top: 16px;
+        }
+    </style>
+</head>
+<body>
+<div class="upload">
+    <img src="img/upload.png" style="width: 80px;height: 80px"/>
+    <div class="title_span">
+        上传文件
+    </div>
+    <div class="form-horizontal" role="form" style="width: 50%;margin: 0 25%;">
+        <div class="form-group">
+            <label class="col-md-3 control-label">
+                订单名称
+            </label>
+            <div class="col-md-6">
+                <input id="orderName" type="text" class="form-control">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-md-3 control-label">
+                订单编号
+            </label>
+            <div class="col-md-6">
+                <input id="orderCode" type="text" class="form-control">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-md-3 control-label" id="fileType">
+                上传文件
+            </label>
+            <div class="col-md-6" style="text-align: start">
+                <button id="uploader" type="submit" class="btn btn-primary" style="background-color: #409EFF;border-color: #409EFF;">请选择上传文件</button>
+            </div>
+        </div>
+        <div class="form-group tableDiv" style="display: none">
+            <div class="col-md-8 control-label col-md-offset-2">
+                <table class="table table-bordered table-hover table-condensed">
+                    <thead style="text-align: center">
+                    <!--        <th>#</th>-->
+                    <th>文件名</th>
+                            <th></th>
+                    </thead>
+                    <tbody id="tableBody">
+                    </tbody>
+                </table>
+            </div>
+
+        </div>
+        <div class="form-group tableDiv" style="display: none">
+            <div class="col-md-6 col-md-offset-2" style="text-align: start">
+                <button id="startUpload" type="submit" class="btn btn-primary" style="background-color: #409EFF;border-color: #409EFF;">开始上传</button>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    $(function () {
+        var type = query('type')
+        var orderId = query('id')
+        var orderName = query('orderName')
+        var orderCode = query('orderCode')
+        var idUser = query('idUser')
+        var supplierCode = query('supplierCode')
+        var dataSourceId = query('dataSourceId')
+
+        var url = '/apis/upload/orderFile'
+        var title = '上传原图文件'
+        if(type == 1){
+            title= '上传原图文件'
+            url = '/apis/upload/orderFile'
+        }else if (type == 2){
+            title= '上传附件文件'
+            url='/apis/upload/orderAttachFile'
+        }
+        document.title = title
+
+        $('.title_span').html(title)
+        $('#fileType').html(title)
+        $('#orderName').val(orderName)
+        $('#orderCode').val(orderCode)
+        var uploader = new plupload.Uploader({
+            // $("#uploader").plupload({
+            runtimes: 'html5,flash,silverlight,html4',//这里可以不写,plupload默认支持
+            url: url,//上传后台请求路径
+            browse_button: 'uploader',
+            max_file_size: '3000mb',//用来限制单个文件大小的
+            multi_selection: false,//默认支持多文件上传,false不支持 multi_selection: false,
+            flash_swf_url: '/swf/Moxie.swf',
+            silverlight_xap_url: '/swf/Moxie.xap', //silverlight文件,当需要使用silverlight方式进行上传时需要配置该参数
+            dragdrop: true,
+            chunk_size: '2mb',//是否将上传文件进行分片,0代表是不分
+            init: {
+                BeforeUpload(up, file) {
+                    console.log(file);
+                    up.setOption('multipart_params', {
+                        'supplierCode':supplierCode,
+                        'dataSourceId':dataSourceId,
+                        'idUser':idUser,
+                        'srcfilename': file.name,
+                        'idOrder': orderId,
+                        'orderCode': orderCode
+                    })
+                },
+                UploadProgress(up, files) {
+                    console.log('UploadProgress',files)
+                        console.log('上传')
+                    $('#progress1').html(`
+    <div class="progress-bar" role="progressbar" aria-valuenow="60"
+        aria-valuemin="0" aria-valuemax="100" style="width: ${files.percent}%;">
+        <span class="sr-only">完成 ${files.percent}% </span>
+    </div>`)
+                },
+                FileUploaded(up, file, info) {
+                    console.log(info);
+                    if (info.status === 200) {
+                        alert('上传成功')
+                        up.refresh()
+                    }
+                },
+                FilesAdded(up, files) {
+                    // console.log('up', up);
+                    console.log('FilesAdded', files)
+                    var html = ''
+                    if(files.length>0){
+                        $('.tableDiv').show()
+                    }
+                    for (let i = 0; i < files.length; i++) {
+                        html += `<tr>
+                <td style="width: 200px">${files[i].name}</td>
+                <td><div class="progress" id="progress1">
+</div></td>
+            </tr>`
+                    }
+
+                    $('#tableBody').html(html)
+                },
+                Error(up, args) {
+                    alert(args.response)
+                }
+            }
+        });
+        //在实例对象上调用init()方法进行初始化
+        uploader.init();
+
+        // //给"开始上传"按钮注册事件
+        $('#startUpload').click(function (){
+            console.log('点击了');
+            uploader.start();
+        })
+    })
+
+    //取 url 参数函数
+    function query(variable) {
+        var query = window.location.search.substring(1);
+        var vars = query.split("&");
+        for (var i = 0; i < vars.length; i++) {
+            var pair = vars[i].split("=");
+            if (pair[0] == variable) {
+                return decodeURIComponent(pair[1]);
+            }
+        }
+        return (false);
+    }
+</script>
+</body>
+</html>

+ 1 - 1
src/api/order/orderList.js

@@ -26,7 +26,7 @@ export function getOrderStepList(data) {
 // 作废订单
 export function voidPrintOrder(data) {
   return request({
-    url: '/order/v1/voidPrintOrder',
+    url: '/order/voidPrintOrder',
     method: 'post',
     params: data
   })

+ 1 - 1
src/views/doc/client/components/customerDetail.vue

@@ -203,7 +203,7 @@ export default {
             province: _that.ruleForm.province,
             city: _that.ruleForm.city,
             area: _that.ruleForm.area,
-            address: _that.ruleForm.contactPhone
+            address: _that.ruleForm.address
           }
           // console.log('dataForm', dataForm)
           var info = JSON.stringify(dataForm)

+ 17 - 53
src/views/order/orderList/orderList.vue

@@ -41,13 +41,21 @@
               <el-form-item label="订单状态" prop="orderState">
                 <el-select v-model="searchForm.orderState" :size="sizeType" filterable placeholder="订单状态" value-key="id">
                   <el-option
-                    label="正常"
+                    label="全部"
+                    value="-1">
+                  </el-option>
+                  <el-option
+                    label="待审核"
                     value="0">
                   </el-option>
                   <el-option
-                    label="已作废"
+                    label="已审核"
                     value="1">
                   </el-option>
+                  <el-option
+                    label="已作废"
+                    value="2">
+                  </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
@@ -273,7 +281,7 @@ import {
   clientPayRequest,
   getOrderList,
   ifPermission,
-  voidPrintOrder,
+  voidPrintOrder
 } from '@/api/order/orderList.js'
 import {
   backPrintOrder
@@ -293,6 +301,7 @@ import DeliveryNotice from '@/components/deliveryNotice/deliveryNotice'
 import new_badge from '@/assets/new_badge.gif';
 
 const searchForm = {
+  orderState: '-1',
   orderCode: '',
   printBillCode: '',
   clientCode: '',
@@ -302,7 +311,6 @@ const searchForm = {
   endTime: '',
   createMan: '',
   idProduct: '-1',
-  voidFlag: '0',
   businessKind: '-1',
   orderType: '-1',
   platformOrderID: '',
@@ -628,6 +636,7 @@ export default {
         _that.searchForm.beginTime = _that.searchTime[0]
         _that.searchForm.endTime = _that.searchTime[1]
       }
+
       // if (_that.search.keyWord != '') {
       //   if (_that.searchTime == null || _that.searchTime < 0) {
       //     _that.$message.error('请选择时间')
@@ -793,66 +802,20 @@ export default {
     getUploadType1($event, row) {
       const _that = this
       if ($event == 1) {
-        _that.openFileDialog(5, row)
+        _that.openFileDialog(1, row)
       } else if ($event == 2) {
-        _that.openFileDialog(4, row)
-      }
-    },
-    // 上传文件方式选择
-    getUploadType($event, row) {
-      const _that = this
-      var userAgent = navigator.userAgent
-      if ($event == 1 || $event == 4 || $event == 5) {
-        _that.openFileDialog($event, row)
-      } else if ($event == 2) {
-        if (userAgent.indexOf('DnyERPBrowser') > 0) {
-          if (_that.configValue1 == undefined) {
-            _that.configValue1 = ''
-          }
-          if (_that.configValue2 == undefined) {
-            _that.configValue2 = ''
-          }
-          dyERP.sendOrderFile(row.id.toString(), row.orderCode, _that.configValue1, _that.configValue2, '0', '0', '0')
-        } else {
-          // alert('请使用开发商提供的ERP客户端')
-          this.$message({
-            message: '请使用开发商提供的ERP客户端',
-            type: 'warning'
-          })
-        }
-      } else if ($event == 3) {
-        if (userAgent.indexOf('DnyERPBrowser') > 0) {
-          // alert('关联文件')
-          dyERP.sendOrderFile(row.id.toString(), row.orderCode, _that.configValue1, _that.configValue2, '1', '0', '0')
-        } else {
-          // alert('请使用开发商提供的ERP客户端')
-          this.$message({
-            message: '请使用开发商提供的ERP客户端',
-            type: 'warning'
-          })
-        }
+        _that.openFileDialog(2, row)
       }
     },
 
     // 上传文件
     openFileDialog($event, row) {
       var _that = this
-      // _that.pluploadVisible = true
-      // _that.upIdOrder = row.id
-      // _that.upOrderCode = row.orderCode
-      // _that.files = []
-      // _that.$router.push('/order/upload')
-      // _that.$nextTick(() => {
-      //   // _that.$refs.plupLoad.up.refresh()
-      //   _that.$refs.plupLoad.fileRawList = []
-      // })
       if ($event == 1) {
         // window.open('/#/upload?id=' + row.id + '&orderCode=' + row.orderCode + '&orderName=' + row.orderName + '&type=1', '_blank')
         window.open(_that.configValue3 + '?id=' + row.id + '&orderCode=' + row.orderCode + '&orderName=' + row.orderName + '&type=1&idUser=' + _that.$store.state.user.user.id + '&supplierCode=' + _that.$store.state.user.indexInfo.supplierCode + '&dataSourceId=' + _that.$store.state.user.indexInfo.dataSourceId, '_blank')
-      } else if ($event == 4) {
+      } else if ($event == 2) {
         // window.open('/#/upload?id=' + row.id + '&orderCode=' + row.orderCode + '&orderName=' + row.orderName + '&type=4', '_blank')
-        window.open(_that.configValue3 + '?id=' + row.id + '&orderCode=' + row.orderCode + '&orderName=' + row.orderName + '&type=4&idUser=' + _that.$store.state.user.user.id + '&supplierCode=' + _that.$store.state.user.indexInfo.supplierCode + '&dataSourceId=' + _that.$store.state.user.indexInfo.dataSourceId, '_blank')
-      } else if ($event == 5) {
         window.open(_that.configValue3 + '?id=' + row.id + '&orderCode=' + row.orderCode + '&orderName=' + row.orderName + '&type=2&idUser=' + _that.$store.state.user.user.id + '&supplierCode=' + _that.$store.state.user.indexInfo.supplierCode + '&dataSourceId=' + _that.$store.state.user.indexInfo.dataSourceId, '_blank')
       }
     },
@@ -876,6 +839,7 @@ export default {
       var _that = this
       var order = {
         'id': _that.voidId,
+        'voidFlag': 1,
         'sMemo': _that.sMemo,
         'versionCode': _that.versionCode
       }