Browse Source

1.备件基础信息EAS同步状态删除;2.备件入库模板导出,EAS同步删除;3备件出库模板导出EAS同步删除

段小段 1 year ago
parent
commit
a08f658ed1

BIN
dist.zip


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 3 - 6
src/views/custom/basic/index.vue

@@ -25,9 +25,6 @@
             :checked-keys="defaultCheckedKeys"
             @popoverHide="popoverHide"
           />
-          <el-select v-model="getdataListParm.parammaps.easStatus" style="width: 150px;" clearable placeholder="EAS同步状态" class="filter-item">
-            <el-option v-for="item in easStatus.easStatusList" :key="item.id" :label="item.name" :value="item.id" />
-          </el-select>
           <el-date-picker
             ref="inputDatetime"
             v-model="getdataListParm.parammaps.inputDatetime"
@@ -495,7 +492,7 @@
             <b>备件编号:<span> {{seeTemp.partCode}}</span></b>
             <b>备件编名称:<span>{{seeTemp.partName}}</span></b>
           </div>
- 
+
 
 
           <el-table
@@ -1041,7 +1038,7 @@ export default {
           this.$message({
             type: 'info',
             message: '已取消批量禁用'
-          });          
+          });
         });
       }else{
         this.$notify({ title: '提示', message: '请勾选禁用备件', type: 'error', duration: 2000 })
@@ -1071,7 +1068,7 @@ export default {
           this.$message({
             type: 'info',
             message: '已取消批量启用'
-          });          
+          });
         });
       }else{
         this.$notify({ title: '提示', message: '请勾选启用备件', type: 'error', duration: 2000 })

+ 27 - 203
src/views/custom/outStock/index.vue

@@ -39,14 +39,10 @@
           <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
           <div>
             <el-button v-if="isOutStockAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
-            <el-button v-if="isReceiveTemplate" v-waves class="filter-item" type="info" icon="el-icon-download" @click="handleDownloadTemp"> 模板 </el-button>
             <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
               <el-button v-if="isOutStockImport" v-waves class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
             </el-upload>
-            <el-button v-if="isOutStockExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownload">导出</el-button>
             <!-- <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas">导出EAS</el-button> -->
-            <el-button class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas1">导出EAS</el-button>
-            <el-button v-if="isEasSynchronization" class="filter-item" type="primary" style="float: right;" @click="handleEAS">EAS同步</el-button>
             <el-button v-if="isOutsap"  class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
           </div>
         </div>
@@ -113,7 +109,7 @@
               <template slot-scope="scope">
                 <span v-if="scope.row.ProofCode">已上传</span>
                 <span v-else>未上传</span>
-            
+
               </template>
             </el-table-column>
             <el-table-column   prop="sterilisation" label="冲销状态" min-width="80px" align="center">
@@ -122,7 +118,7 @@
                 <span v-else>未冲销</span>
               </template>
             </el-table-column>
-            
+
           <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
             <template slot-scope="{row}">
               <el-button v-if="isOutStockSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
@@ -928,7 +924,7 @@
             </template>
           </el-table-column>
 
-          
+
           <el-table-column :key="19" label="备注" prop="sumPrice" align="center" min-width="80">
             <template slot-scope="scope">
               <span>{{ scope.row.note }}</span>
@@ -1091,8 +1087,8 @@ export default {
       dialogPvVisible: false,
       // 校验规则
       // -----------------------------------------
-      isOutStockAdd: [], isReceiveTemplate: [], isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [],isOutStockMethod4:[],
-      isEasSynchronization: [], isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
+      isOutStockAdd: [],  isOutStockImport: [], isOutStockExport: [], isOutStockSee: [], isOutStockDelete: [], isOutStockMethod1: [], isOutStockMethod2: [], isOutStockMethod3: [],isOutStockMethod4:[],
+      isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
       rules: {},
       rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
       cellStyle: { padding: 0 + 'px' },
@@ -1340,7 +1336,7 @@ export default {
   },
 
   watch: {
- 
+
     listAdd: {
       deep: true,
       handler: function (item) {
@@ -1352,10 +1348,10 @@ export default {
             if(parseInt(i.checkoutNumber) > parseInt(i.reportery)){
               i.checkoutNumber = i.reportery
             }
-                
+
           })
 
-            
+
       }
     },
 
@@ -1390,14 +1386,14 @@ export default {
 
     checkboxInit(row,index){
       // console.log(row)
-      if(row.ProofCode){ 
-        return 0 
+      if(row.ProofCode){
+        return 0
       } else {
 
         var data1 = new Date(row.creatTime)
         var data2 = new Date('2022-10-25')
         if(data1 > data2){ return 1 } else {return 0}
- 
+
       }
     },
 
@@ -1408,7 +1404,7 @@ export default {
     },
 
     sapUpload(){
-      const that = this 
+      const that = this
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
       var send_data = this.selectList
 
@@ -1425,18 +1421,18 @@ export default {
          that.isSap = 0
          SapUse(send_data).then(response => {
               console.log('response', response)
-                
+
               if (response.msg !== 'fail') {
                 that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
                 that.selectList = []
                 that.get_table_data()
-                
+
                 } else {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
             })
- 
-            
+
+
       } else {
 
         that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
@@ -1448,35 +1444,35 @@ export default {
 
 
 
-      
-    
+
+
       // if(this.currentRow.ProofCode){
       //    console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")
       //   //如果有这个值说明已经上传了,不用上传
       // } else {
       //   console.log("currentRow ProofCode没有这个值")
       //   console.log("currentRow ProofCode",this.currentRow.ProofCode)
-      //     const useForm = this.currentRow.useForm 
-      //     const creatTime = this.currentRow.creatTime 
+      //     const useForm = this.currentRow.useForm
+      //     const creatTime = this.currentRow.creatTime
       //     console.log("useForm",useForm)
       //       var send_data = {
       //             "useForm":useForm,
       //             "receiveTime":creatTime,
       //             "pastureid":Cookies.get('pastureid')
-              
+
       //       }
       //       SapUse(send_data).then(response => {
       //         console.log('response', response)
-                
+
       //         if (response.msg !== 'fail') {
       //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
       //           that.get_table_data()
-                
+
       //           } else {
       //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
       //           }
       //       })
- 
+
       // }
 
     },
@@ -1492,9 +1488,7 @@ export default {
       const isOutStockAdd = checkButtons(this.$store.state.user.buttons, OutStockAdd)
       this.isOutStockAdd = isOutStockAdd
 
-      const ReceiveTemplate = 'customs:outStock:template'
-      const isReceiveTemplate = checkButtons(this.$store.state.user.buttons, ReceiveTemplate)
-      this.isReceiveTemplate = isReceiveTemplate
+
 
       const OutStockImport = 'customs:outStock:import'
       const isOutStockImport = checkButtons(this.$store.state.user.buttons, OutStockImport)
@@ -1528,9 +1522,7 @@ export default {
       const isOutStockMethod4 = checkButtons(this.$store.state.user.buttons, OutStockMethod4)
       this.isOutStockMethod4 = isOutStockMethod4
 
-      const EasSynchronization = 'customs:outStock:easSynchronization'
-      const isEasSynchronization = checkButtons(this.$store.state.user.buttons, EasSynchronization)
-      this.isEasSynchronization = isEasSynchronization
+      
 
       const ManualSynchronization = 'customs:outStock:manualSynchronization'
       const isManualSynchronization = checkButtons(this.$store.state.user.buttons, ManualSynchronization)
@@ -1882,7 +1874,7 @@ export default {
 
       // this.createTemp.departmentId = item.departmentId
       this.$set(this.createTemp, "departmentId", item.departmentId)
-      
+
       this.createTemp.bid = item.id
       this.createTemp.applicatId = item.empId
       this.orderPart.applyCode = item.applyCode
@@ -2680,67 +2672,7 @@ export default {
         })
       )
     },
-    // 导出
-    handleDownload() {
-      this.$alert('备件出库信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.requestParam.parammaps.formType = '备件出库信息'
-      this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
-      this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
-      this.requestParam.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
-      this.requestParam.parammaps.useForm = this.getdataListParm.parammaps.useForm
-      this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
-      this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
-      this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
-      GetAccount(this.requestParam).then(response => {
-        this.$nextTick(() => {
-          import('@/vendor/Export2Excel').then(excel => {
-
-
-            if (response.data.list !== null) {
-              for (let i = 0; i < response.data.list.length; i++) {
-                
-                if(response.data.list[i].sterilisation == 1){
-                  this.$set(response.data.list[i], 'sterilisation', "已冲销")
-                } else {
-                  this.$set(response.data.list[i], 'sterilisation', "未冲销")
-                } 
-              }
-            }
-
-
-
-            const list1 = response.data.list
-            if (response.data.list !== '') {
-              this.percentage = 99
-              setTimeout(() => {
-                this.isPercentage = false
-              }, 2000)
-            }
-
-
-
 
-            const tHeader = [
-              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号','资产品牌', '领用类型', '领用部门', '领用人', '备注', '冲销状态']
-            const filterVal = [
-              'pastureName', 'useForm', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'eqName', 'eqCode', 'eqBrand','useTypeV', 'departmentName', 'appliname', 'note', 'sterilisation'
-            ]
-            const data1 = this.formatJson(filterVal, list1)
-            excel.export_json_to_excel({ header: tHeader, data: data1, filename: this.requestParam.parammaps.formType, autoWidth: true, bookType: 'xlsx' })
-          })
-        })
-      })
-    },
     handleDownload2() {
       this.$alert('备件出库记录正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
       this.isPercentage = true
@@ -2863,66 +2795,6 @@ export default {
         })
       })
     },
-    handleDownloadEas1() {
-      this.$alert('备件出库EAS信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.requestParam.name = 'downloadPartUseEASYuan'
-      this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
-      this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
-      this.requestParam.parammaps.departmentId = this.getdataListParm.parammaps.departmentId
-      this.requestParam.parammaps.useForm = this.getdataListParm.parammaps.useForm
-      this.requestParam.parammaps.useType = this.getdataListParm.parammaps.useType
-      this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
-      this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
-      GetAccount(this.requestParam).then(response => {
-        if (response.data.list !== '') {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        this.$nextTick(() => {
-          import('@/vendor/Export2Excel').then(excel => {
-            const list1 = response.data.list
-            const tHeader = [
-              '领用部门', '牧场', '领用单编号', '领用日期', '供应商编码', '供应商名称', '出库人', '制单日期', '品名', '物料编码', '计量单位', '单价', '实发数量', '总价', '备注', '领用人', '费用类型'
-            ]
-            const filterVal = [
-              '领用部门', '牧场', '领用单编号', '领用日期', '供应商编码', '供应商名称', '出库人', '制单日期', '品名', '物料编码', '计量单位', '单价', '实发数量', '总价', '备注', '领用人', '费用类型'
-            ]
-            // const tmerges=['B1:D2']
-            if (list1 !== null) {
-              const data1 = this.formatJsonTemp(filterVal, list1)
-              excel.export_json_to_excel({
-                // merges: tmerges,
-                // multiHeader: tmultiHeader,
-                header: tHeader,
-                data: data1,
-                filename: '备件出库EAS',
-                autoWidth: true,
-                bookType: 'xlsx'
-              })
-            } else {
-              this.$notify({
-                title: '',
-                message: '无备件领用完成信息,无法导出!',
-                type: 'warning',
-                duration: 2000
-              })
-            }
-          })
-        })
-      })
-    },
     formatJson(filterVal, jsonData) {
       return jsonData.map(v =>
         filterVal.map(j => {
@@ -2982,54 +2854,6 @@ export default {
       console.log('编辑保存')
     },
 
-    // 导出模板
-    handleDownloadTemp() {
-      this.requestParam.name = 'stockLaidDownTemp'
-      GetDataByName(this.requestParam).then(response => {
-        this.$nextTick(() => {
-          import('@/vendor/Export2Excel').then(excel => {
-            const list1 = response.data.list
-            const tHeader = [
-              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '具体用处', '领用类型', '领用部门', '领用人'
-            ]
-            const filterVal = [
-              '牧场', '领用单编号', '领用日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '实发数量', '单价', '总价', '库位', '供应商', '名称', '牧场设备编号', '具体用处', '领用类型', '领用部门', '领用人'
-            ]
-            const data1 = this.formatJsonTemp(filterVal, list1)
-            excel.export_json_to_excel({
-              header: tHeader,
-              data: data1,
-              filename: '出库模板',
-              autoWidth: true,
-              bookType: 'xlsx'
-            })
-          })
-        })
-      })
-    },
-    handleEAS() {
-      this.easStatus.dialogStatus = 'easStatus'
-      this.easStatus.dialogFormVisible = true
-      this.get_table_dataEasStatusLst()
-    },
-    get_table_dataEasStatusLst() {
-      this.easStatus.listLoading = true
-      GetDataByName(this.easStatus.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.easStatus.list = response.data.list
-        } else {
-          this.easStatus.list = []
-        }
-        this.easStatus.pageNum = response.data.pageNum
-        this.easStatus.pageSize = response.data.pageSize
-        if (response.data.total) {
-          this.easStatus.total = response.data.total
-        }
-      })
-      setTimeout(() => {
-        this.easStatus.listLoading = false
-      }, 100)
-    },
     handleClose(row) {
       MessageBox.confirm('是否确认关闭同步此数据?', {
         confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'

+ 34 - 225
src/views/custom/storage/index.vue

@@ -24,14 +24,9 @@
           <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
           <div>
             <el-button v-if="isStorageAdd" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
-            <el-button v-if="isStorageTemplate" v-waves class="filter-item" type="info" icon="el-icon-tickets" @click="handleDownloadTemp"> 模板 </el-button>
             <el-upload style="display: inline-block;" :headers="headers" :data="uploadData" :action="uploadExcelUrl" :show-file-list="false" :before-upload="beforeImportExcel" :on-success="handleImportExcelSuccess">
               <el-button v-if="isStorageImport" v-waves class="filter-item" type="warning" icon="el-icon-download">导入</el-button>
             </el-upload>
-            <el-button v-if="isStorageExport" class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
-            <el-button v-if="isStorageExportEAS" class="filter-item" style="margin-left: 10px;" type="danger" icon="el-icon-upload2" @click="handleDownloadEas1">导出EAS</el-button>
-            <el-button v-if="isEasSynchronization" class="filter-item" type="primary" style="float: right;" @click="handleEAS">EAS同步</el-button>
-
             <el-button v-if="isStorageSap"  class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
           </div>
         </div>
@@ -98,7 +93,7 @@
               <template slot-scope="scope">
                 <span v-if="scope.row.ProofCode">已上传</span>
                 <span v-else>未上传</span>
-            
+
               </template>
             </el-table-column>
             <el-table-column   prop="sterilisation" label="冲销状态" min-width="80px" align="center">
@@ -145,7 +140,7 @@
           :cell-style="cellStyle"
           class="elTable table-fixed"
           @sort-change="tableSort"
-        
+
         >
           <el-table-column label="序号" align="center" type="index" width="50px">
             <template slot-scope="scope">
@@ -449,7 +444,7 @@
               <span  >{{ scope.row.price }}</span>
               <!-- <el-form v-if="isPriceInput" :model="scope.row" :rules="rules">
                 <el-form-item prop="price">
-                   <el-input ref="price" v-model="scope.row.price" :disabled="storage.laidType == 0" style="margin-top:15px" />  
+                   <el-input ref="price" v-model="scope.row.price" :disabled="storage.laidType == 0" style="margin-top:15px" />
                   <el-input ref="price" v-model="scope.row.price" style="margin-top:15px" />
                 </el-form-item>
               </el-form> -->
@@ -739,8 +734,8 @@ export default {
       isStorageSap:[],
 
       // --------------------------------------
-      isStorageAdd: [], isStorageTemplate: [], isStorageImport: [], isStorageExport: [], isStorageExportEAS: [], isStorageSee: [], isStorageDelete: [], isStorageMethod1: [], isStorageMethod2: [], isStorageMethod3: [],
-      isEasSynchronization: [], isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
+      isStorageAdd: [],  isStorageImport: [], isStorageExport: [], isStorageExportEAS: [], isStorageSee: [], isStorageDelete: [], isStorageMethod1: [], isStorageMethod2: [], isStorageMethod3: [],
+       isManualSynchronization: [], isCloseSynchronization: [], isIgnoreSynchronization: [],
       rules: {
         providerId: [{ required: true, message: '必填', trigger: 'blur' }]
       },
@@ -985,8 +980,8 @@ export default {
             if(parseInt(i.reportery) > (parseInt(i.amount)-parseInt(i.receiveAmount))){
               i.reportery = parseInt(i.amount)-parseInt(i.receiveAmount)
             }
-                
-          })  
+
+          })
       }
     },
   },
@@ -1013,8 +1008,8 @@ export default {
     get_auto_buttons() {
       // 新增
 
- 
-   
+
+
       const StorageSap = 'customs:storage:sap'
       const isStorageSap = checkButtons(this.$store.state.user.buttons, StorageSap)
       this.isStorageSap = isStorageSap
@@ -1023,10 +1018,6 @@ export default {
       const isStorageAdd = checkButtons(this.$store.state.user.buttons, StorageAdd)
       this.isStorageAdd = isStorageAdd
 
-      const StorageTemplate = 'customs:storage:template'
-      const isStorageTemplate = checkButtons(this.$store.state.user.buttons, StorageTemplate)
-      this.isStorageTemplate = isStorageTemplate
-
       const StorageImport = 'customs:storage:import'
       const isStorageImport = checkButtons(this.$store.state.user.buttons, StorageImport)
       this.isStorageImport = isStorageImport
@@ -1059,9 +1050,7 @@ export default {
       const isStorageMethod3 = checkButtons(this.$store.state.user.buttons, StorageMethod3)
       this.isStorageMethod3 = isStorageMethod3
 
-      const EasSynchronization = 'customs:storage:easSynchronization'
-      const isEasSynchronization = checkButtons(this.$store.state.user.buttons, EasSynchronization)
-      this.isEasSynchronization = isEasSynchronization
+
 
       const ManualSynchronization = 'customs:storage:manualSynchronization'
       const isManualSynchronization = checkButtons(this.$store.state.user.buttons, ManualSynchronization)
@@ -1999,33 +1988,33 @@ export default {
 
     checkboxInit(row,index){
       // console.log(row)
-      if(row.ProofCode){ 
-        return 0 
+      if(row.ProofCode){
+        return 0
       } else {
 
         var data1 = new Date(row.creatTime)
         var data2 = new Date('2022-10-25')
         if(data1 > data2){ return 1 } else {return 0}
- 
+
       }
 
- 
+
     },
 
-    
+
 
     //监听 - 表格 - 勾选
     change_table_selection(val) {
       this.selectList = val
       console.log('勾选数据selectList', this.selectList)
     },
-    
+
     sapUpload(){
 
 
-      
 
-      const that = this 
+
+      const that = this
       console.log("currentRow ProofCode",this.currentRow.ProofCode)
 
       var send_data = this.selectList
@@ -2042,25 +2031,25 @@ export default {
          that.isSap = 0
          SapLaid(send_data).then(response => {
               console.log('response', response)
-                
+
               if (response.msg !== 'fail') {
                 that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
                 that.selectList = []
                 that.get_table_data()
 
-                
+
                 } else {
                   that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
                 }
 
-               
-              
+
+
             })
 
-           
+
 
             console.log(that.isSap)
-            
+
       } else {
 
         that.$notify({ title: '失败', message: '正在请求中,请稍等几秒钟后再点击'  , type: 'error', duration: 2000 })
@@ -2075,40 +2064,40 @@ export default {
 
 
 
-     
+
 
       // //  if(true){
       // if(this.currentRow.ProofCode){
       //   //如果有这个值说明已经上传了,不用上传
       //   console.log("currentRow ProofCode 这个值说明已经上传了,不用上传")
- 
+
       // } else {
       //   console.log("currentRow ProofCode没有这个值")
-      //     const laidCode = this.currentRow.laidCode 
-      //     const creatTime = this.currentRow.creatTime 
+      //     const laidCode = this.currentRow.laidCode
+      //     const creatTime = this.currentRow.creatTime
       //     console.log("laidCode",laidCode)
- 
+
       //       console.log("laidCode",laidCode)
       //       var send_data = {
       //             "laidCode":laidCode,
       //             "storageTime":creatTime,
       //             "pastureid":Cookies.get('pastureid')
-              
+
       //       }
 
       //       SapLaid(send_data).then(response => {
       //         console.log('response', response)
-                
+
       //         if (response.msg !== 'fail') {
       //           that.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
       //           that.get_table_data()
-                
+
       //           } else {
       //             that.$notify({ title: '失败', message: '上传失败'  , type: 'error', duration: 2000 })
       //           }
-              
+
       //       })
- 
+
       // }
 
     },
@@ -2229,58 +2218,6 @@ export default {
         })
       }
     },
-    handleDownload() {
-      console.log('点击了导出')
-      this.$alert('备件入库信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.requestParam.parammaps.formType = '备件入库信息'
-      this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
-      this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
-      this.requestParam.parammaps.laidCode = this.getdataListParm.parammaps.laidCode
-      this.requestParam.parammaps.laidType = this.getdataListParm.parammaps.laidType
-      this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
-      this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
-      GetAccount(this.requestParam).then(response => {
-        if (response.data.list !== '') {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        if (response.data.list !== null) {
-          for (let i = 0; i < response.data.list.length; i++) {
-            this.$set(response.data.list[i], 'storageAmount', parseFloat(response.data.list[i].storageAmount))
-            this.$set(response.data.list[i], 'price', parseFloat(response.data.list[i].price))
-            this.$set(response.data.list[i], 'sumPrice', parseFloat(response.data.list[i].sumPrice))
-            if(response.data.list[i].sterilisation == 1){
-              this.$set(response.data.list[i], 'sterilisation', "已冲销")
-            } else {
-              this.$set(response.data.list[i], 'sterilisation', "未冲销")
-            } 
-          }
-        }
-        this.$nextTick(() => {
-          const ExcelDatas = [
-            {
-              tHeader: ['牧场', '入库单编号', '入库日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '数量', '单价', '总价', '库位', '供应商','冲销状态', 'error_msg'],
-              filterVal: ['pastureName', 'laidCode', 'creatTime', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'storageAmount', 'price', 'sumPrice', 'warehoseCode', 'providerName', 'sterilisation', ''],
-              tableDatas: response.data.list,
-              sheetName: '备件入库信息'
-            }
-          ]
-          json2excel(ExcelDatas, '备件入库信息', true, 'xlsx')
-        })
-      })
-    },
     formatJson(filterVal, jsonData) {
       return jsonData.map(v =>
         filterVal.map(j => {
@@ -2308,110 +2245,6 @@ export default {
       console.log(item)
     },
 
-    // 导出模板
-    handleDownloadTemp() {
-      this.requestParam.name = 'stockLaidDownTemp'
-      GetDataByName(this.requestParam).then(response => {
-        this.$nextTick(() => {
-          import('@/vendor/Export2Excel').then(excel => {
-            const list1 = response.data.list
-            const tHeader = [
-              '牧场', '入库单编号', '入库日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '数量', '单价', '总价', '库位', '供应商'
-            ]
-            const filterVal = [
-              '牧场', '入库单编号', '入库日期', '物料编码', '品名', '规格型号', '品牌', '计量单位', '数量', '单价', '总价', '库位', '供应商'
-            ]
-            const data1 = this.formatJsonTemp(filterVal, list1)
-            excel.export_json_to_excel({
-              header: tHeader,
-              data: data1,
-              filename: '入库模板',
-              autoWidth: true,
-              bookType: 'xlsx'
-            })
-          })
-        })
-      })
-    },
-    formatJsonTemp(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j === 'timestamp') {
-            return parseTime(v[j])
-          } else {
-            return v[j]
-          }
-        })
-      )
-    },
-    handleDownloadEas1() {
-      this.$alert('备件入库EAS信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
-      this.isPercentage = true
-      this.percentage = 1
-      var timer = setInterval(() => {
-        this.percentage += 5
-        if (this.percentage > 95) {
-          this.percentage = 99
-          clearInterval(timer)
-        }
-        this.percentage = this.percentage
-      }, 1000)
-      this.requestParam.name = 'downloadPartLaidEASYuan'
-      this.requestParam.parammaps.inputDatetime = this.getdataListParm.parammaps.inputDatetime
-      this.requestParam.parammaps.pastureName = this.getdataListParm.parammaps.pastureName
-      this.requestParam.parammaps.laidCode = this.getdataListParm.parammaps.laidCode
-      this.requestParam.parammaps.laidType = this.getdataListParm.parammaps.laidType
-      this.requestParam.parammaps.startTime = this.getdataListParm.parammaps.startTime
-      this.requestParam.parammaps.stopTime = this.getdataListParm.parammaps.stopTime
-      GetAccount(this.requestParam).then(response => {
-        if (response.data.list !== '') {
-          this.percentage = 99
-          setTimeout(() => {
-            this.isPercentage = false
-          }, 2000)
-        }
-        this.$nextTick(() => {
-          import('@/vendor/Export2Excel').then(excel => {
-            if (response.data.list !== null) {
-              for (let i = 0; i < response.data.list.length; i++) {
-                this.$set(response.data.list[i], '数量', parseFloat(response.data.list[i]['数量']))
-                this.$set(response.data.list[i], '总价', parseFloat(response.data.list[i]['总价']))
-                this.$set(response.data.list[i], '单价', parseFloat(response.data.list[i]['单价']))
-              }
-            }
-            const list1 = response.data.list
-            console.log(list1)
-            const tHeader = [
-              '牧场', '入库单编号', '入库日期', '供应商编码', '供应商', '入库人', '制单日期', '品名', '物料编码', '计量单位', '单价', '数量', '总价', '备注'
-            ]
-            const filterVal = [
-              '牧场', '入库单编号', '入库日期', '供应商编码', '供应商', '入库人', '制单日期', '品名', '物料编码', '计量单位', '单价', '数量', '总价', '备注'
-            ]
-
-            // const tmerges=['B1:D2']
-            if (list1 !== null) {
-              const data1 = this.formatJsonTemp(filterVal, list1)
-              excel.export_json_to_excel({
-                // merges: tmerges,
-                // multiHeader: tmultiHeader,
-                header: tHeader,
-                data: data1,
-                filename: '备件入库EAS:',
-                autoWidth: true,
-                bookType: 'xlsx'
-              })
-            } else {
-              this.$notify({
-                title: '',
-                message: '无备件领用完成信息,无法导出!',
-                type: 'warning',
-                duration: 2000
-              })
-            }
-          })
-        })
-      })
-    },
     // 导出
     handleDownloadEas() {
       this.$alert('备件入库EAS信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
@@ -2513,30 +2346,6 @@ export default {
       })
     },
 
-    handleEAS() {
-      this.easStatus.dialogStatus = 'easStatus'
-      this.easStatus.dialogFormVisible = true
-      this.get_table_dataEasStatusLst()
-    },
-    get_table_dataEasStatusLst() {
-      this.easStatus.listLoading = true
-      GetDataByName(this.easStatus.getdataListParm).then(response => {
-        if (response.data.list !== null) {
-          this.easStatus.list = response.data.list
-        } else {
-          this.easStatus.list = []
-        }
-        this.easStatus.pageNum = response.data.pageNum
-        this.easStatus.pageSize = response.data.pageSize
-        if (response.data.total) {
-          this.easStatus.total = response.data.total
-        }
-      })
-      setTimeout(() => {
-        this.easStatus.listLoading = false
-      }, 100)
-    },
-
     handleClose(row) {
       MessageBox.confirm('是否确认关闭同步此数据?', {
         confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'

+ 2 - 2
src/views/report/queryWater/index.vue

@@ -230,11 +230,11 @@ export default {
         var total = 0
         if (nowYear !== null || nowYear !== undefined) {
           nowYear.forEach(function(item, index) {
-            console.log(parseFloat(item))
+            // console.log(parseFloat(item))
             total = total + parseFloat(item)
           })
         }
-        this.total = total.toFixed(4)
+        this.total = total.toFixed(2)
       })
     },
     getLineChart1() {

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