Browse Source

铅封号

Shan9312 2 months ago
parent
commit
efc5a81744

+ 2 - 2
.env.development

@@ -10,10 +10,10 @@ ENV = 'development'
 
 
 # 线上测试
-# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 
 # 白少后台本地
-VUE_APP_BASE_API = 'http://192.168.1.76:8082/'
+# VUE_APP_BASE_API = 'http://192.168.1.76:8082/'
 
 # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 

File diff suppressed because it is too large
+ 0 - 0
dist 2/datas/myMap.json


BIN
dist 2/favicon.ico


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


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/css/app.00cc968e.css


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/css/chunk-elementUI.45ab9bc1.css


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/css/chunk-libs.2e418612.css


BIN
dist 2/static/fonts/element-icons.535877f5.woff


BIN
dist 2/static/fonts/element-icons.732389de.ttf


BIN
dist 2/static/img/1.1ddf085a.png


BIN
dist 2/static/img/404.a57b6f31.png


BIN
dist 2/static/img/404_cloud.0f4bc32b.png


BIN
dist 2/static/img/cow.3495de2a.jpg


BIN
dist 2/static/img/login-bg1.1f1602f0.jpg


BIN
dist 2/static/img/login-l.92a8b1dc.jpg


BIN
dist 2/static/img/login-r.9830302c.jpg


BIN
dist 2/static/img/login.92c368ad.png


BIN
dist 2/static/img/logo1.d2343c0f.png


BIN
dist 2/static/img/logo_u3.34a9ffae.png


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/js/app.b1fd5fb3.js


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/js/chunk-581b2547.4a582b7c.js


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/js/chunk-d159a5f0.cecbaf4c.js


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/js/chunk-d17f893e.5976e797.js


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/js/chunk-elementUI.1e8908f6.js


File diff suppressed because it is too large
+ 0 - 0
dist 2/static/js/chunk-libs.c26c123b.js


BIN
dist-正式-20241218-现代牧业.zip


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


+ 64 - 5
src/views/maintenance/subcontractingMainten/tabPage/tab1.vue

@@ -52,6 +52,8 @@
       <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
 
       <el-button v-if="istab1Add" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+      <!-- isRepairExport
+      <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button> -->
 
 
 
@@ -306,6 +308,23 @@
                 <span v-if="dialogStatus ==='see'">{{ scope.row.contractCode }}</span>
               </template>
             </el-table-column>
+            <el-table-column :key="9"  label="铅封号" prop="sealNumber" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.sealNumber" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.sealNumber }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column :key="9"  label="历史铅封号" prop="sealNumberHis" align="center" min-width="80px">
+              <template slot-scope="scope">
+                <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
+                  <el-input v-model="scope.row.sealNumberHis" style="margin-top:10px" />
+                </span>
+                <span v-if="dialogStatus ==='see'">{{ scope.row.sealNumberHis }}</span>
+              </template>
+            </el-table-column>
+
             <el-table-column :key="8" label="备注" prop="remark" align="center" min-width="180px">
               <template slot-scope="scope">
                 <span v-if="dialogStatus ==='create'||dialogStatus ==='update'">
@@ -392,9 +411,9 @@
 <script>
 import echarts from 'echarts'
 require('echarts/theme/macarons')
-import { GetDataByNames, GetReportform, GetDataByName, PostDataByName, checkButtons, ExecDataByConfig} from '@/api/common'
+import { GetDataByNames, GetReportform, GetDataByName,GetAccount, PostDataByName, checkButtons, ExecDataByConfig} from '@/api/common'
 import Cookies from 'js-cookie'
-import { parseTime, json2excel } from '@/utils/index.js'
+import { parseTime, json2excel ,sortChange} from '@/utils/index.js'
 import { MessageBox } from 'element-ui'
 import Pagination from '@/components/Pagination'
 export default {
@@ -404,6 +423,9 @@ export default {
   data() {
     return {
       // todo
+      isRepairExport: [],
+      isPercentage: false,
+      percentage: 0,
       findAllPasture:[],
       rejectList: [{ id: '0', name: '正常' }, { id: '1', name: '已关单' }],  // TODO: 已关单状态
       myHeight:document.documentElement.clientHeight - 85- 200,
@@ -595,11 +617,43 @@ export default {
     this.get_auto_buttons()
   },
   methods: {
-      // 删除
-    removeTag() {
-        this.tableObj1.getdataListParm.parammaps.pastureArr = []
 
+    // 导出
+    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.downLoadParm = {}
+      this.downLoadParm.name = 'loadRepirsList'
+      this.downLoadParm.offset = 0
+      this.downLoadParm.page = 1
+      this.downLoadParm.returntype = 'Map'
+       if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+       this.tableObj1.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+       this.tableObj1.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+       this.tableObj1.getdataListParm.parammaps.startTime = ''
+       this.tableObj1.getdataListParm.parammaps.stopTime = ''
+      }
+      this.downLoadParm.parammaps =this.tableObj1.getdataListParm.parammaps
+      GetAccount(this.downLoadParm).then(response => {
+        console.log('导出', response)
+      })
     },
+
+   // 删除
+    removeTag() {
+       this.tableObj1.getdataListParm.parammaps.pastureArr = []
+    },
+
     // 全选
     selectAll(val) {
       val = []
@@ -677,6 +731,11 @@ export default {
       const istab1Shenhe4 = checkButtons(this.$store.state.user.buttons, 'maintenance:subcontractingMainten:shenhe4')
       this.istab1Shenhe4 = istab1Shenhe4
 
+      // 导出
+      const RejectExport = 'maintenance:subcontractingMainten::rejectExport'
+      const isRepairExport = checkButtons(this.$store.state.user.buttons, RejectExport)
+      this.isRepairExport = isRepairExport
+
     },
 
     querySearchEqNameCont(queryString, cb) {

+ 75 - 2
src/views/maintenance/subcontractingMainten/tabPage/tab2.vue

@@ -46,6 +46,8 @@
 
 
       <el-button  class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+         <!-- isRepairExport -->
+      <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
 
       <!-- <el-button  v-if="istab2Add" class="filter-item" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button> -->
 
@@ -731,9 +733,9 @@
 <script>
 import echarts from 'echarts'
 require('echarts/theme/macarons')
-import { GetDataByNames, GetReportform, GetDataByName, PostDataByName, checkButtons, ExecDataByConfig} from '@/api/common'
+import { GetDataByNames, GetReportform, GetDataByName, PostDataByName, checkButtons,GetAccount, ExecDataByConfig} from '@/api/common'
 import Cookies from 'js-cookie'
-import { parseTime, json2excel } from '@/utils/index.js'
+import { parseTime, json2excel,sortChange } from '@/utils/index.js'
 import { MessageBox } from 'element-ui'
 import Pagination from '@/components/Pagination'
 export default {
@@ -742,6 +744,9 @@ export default {
   inject: ['reload'],
   data() {
     return {
+      isRepairExport: [],
+      isPercentage: false,
+      percentage: 0,
       findAllPasture:[],
       myHeight:document.documentElement.clientHeight - 85- 200,
       //多个下拉框 - 请求内容
@@ -983,6 +988,74 @@ export default {
 
   },
   methods: {
+       // 导出
+    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.downLoadParm = {}
+      this.downLoadParm.name = 'loadRepirsList'
+      this.downLoadParm.offset = 0
+      this.downLoadParm.page = 1
+      this.downLoadParm.returntype = 'Map'
+       if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
+       this.tableObj1.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
+       this.tableObj1.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
+      } else {
+       this.tableObj1.getdataListParm.parammaps.startTime = ''
+       this.tableObj1.getdataListParm.parammaps.stopTime = ''
+      }
+      this.downLoadParm.parammaps =this.tableObj1.getdataListParm.parammaps
+      GetAccount(this.downLoadParm).then(response => {
+        console.log('导出', response)
+           if(response.data.list !== null && response.data.list !== ''){
+          for(let i=0;i<response.data.list.length;i++){
+            if(response.data.list[i].status == 0){
+              this.$set(response.data.list[i],'status','未离厂')
+            }else if(response.data.list[i].status == 1){
+              this.$set(response.data.list[i],'status','未回厂')
+            }else if(response.data.list[i].status == 2){
+              this.$set(response.data.list[i],'status','已回厂')
+            }
+
+            if (response.data.list[i].reject == 0) {
+              this.$set(response.data.list[i],'reject','正常')
+            } else {
+              this.$set(response.data.list[i],'reject','已关单')
+            }
+          }
+        }else{
+          response.data.list = []
+        }
+        this.downLoadList = response.data.list
+        console.log(this.downLoadList)
+        if (response.data.list !== '') {
+          this.percentage = 99
+          setTimeout(() => {
+            this.isPercentage = false
+          }, 2000)
+        }
+          const elecExcelDatas = [
+          {
+            tHeader: ['委外验收单号', '牧场', '部门', '申请人', '有无合同', '审核状态', '离厂日期','回厂日期','供应商','设备名称','设备内部编号','费用类型','铅封号','历史铅封号','质保日期','领用单号','领用部门','领用日期','领用状态','备件编号','备件名称','备件规格','领用数量'],
+            filterVal: ['acceptanceCode', 'pastureName', 'departmentName', 'applicantName', 'isContract', 'reviewStatus', 'details','departureDate','returnDate','supplier','equipmentName','equipmentInternalCode','costType','sealNumber','historicalSealNumber','warrantyDate','applicationNumber','applicationDepartment','applicationDate','applicationStatus','','','','',],
+            tableDatas: this.downLoadList,
+            sheetName: '验收委外维修'
+          }
+        ]
+        json2excel(elecExcelDatas, '验收委外维修', true, 'xlsx')
+
+      })
+    },
+
        // 删除
     removeTag() {
        this.tableObj1.getdataListParm.parammaps.pastureArr = []

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