Browse Source

Merge branch 'feature/add_field' into feature/merge0227

# Conflicts:
#	dist/index.html
#	src/views/report/queryCombustion/index.vue
#	src/views/report/queryElec/index.vue
#	src/views/report/queryRepair/index.vue
#	src/views/report/queryWater/index.vue
duanxiaoduan 1 year ago
parent
commit
607c8aecb8

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


+ 58 - 18
src/views/console/emp/index.vue

@@ -22,7 +22,7 @@
         <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
         <el-button v-if="isEmpAdd" class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
         <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
-           
+
       </div>
       <el-table
         v-loading="listLoading"
@@ -81,6 +81,11 @@
             <span>{{ scope.row.tel }}</span>
           </template>
         </el-table-column>
+        <el-table-column label="状态" min-width="130px" header-align="center" align="center">
+          <template slot-scope="scope">
+            <span>{{scope.row.workstr}}</span>
+          </template>
+        </el-table-column>
         <el-table-column label="账号数" sortable prop="isuser" min-width="90px" header-align="center" align="center">
           <template slot-scope="scope">
             <span>{{ scope.row.isuser }}</span>
@@ -136,6 +141,11 @@
           <el-form-item label="工号" prop="empCode">
             <el-input ref="empCode" v-model="dataform.empCode" />
           </el-form-item>
+          <el-form-item label="状态" prop="work">
+            <el-select v-model="dataform.work">
+                <el-option v-for="item in workList" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+          </el-form-item>
           <el-form-item label="联系方式" prop="tel">
             <el-input ref="tel" v-model="dataform.tel" />
           </el-form-item>
@@ -176,7 +186,7 @@ import waves from '@/directive/waves' // waves directive
 import { isIntegerZero } from '@/utils/validate'
 import { validatePhoneTwo } from '@/utils/validate'
 import enterToNext from '@/directive/enterToNext' // enterToNext directive
-import { PostDataByName, GetDataByName, getRecuData, GetDataByNames, checkButtons, failproccess,GetAccount } from '@/api/common'
+import { PostDataByName, GetDataByName, getRecuData,ExecDataByConfig, GetDataByNames, checkButtons, failproccess,GetAccount } from '@/api/common'
 import Pagination from '@/components/Pagination' // secondary package based on el-pagination
 import { MessageBox } from 'element-ui'
 import Cookies from 'js-cookie'
@@ -194,6 +204,7 @@ export default {
       disabled: false,
       tableKey: 0,
       list: [{ sqlname: '', id: 0, sqlstr: '' }],
+      workList:[{id:1,name:'在职'},{id:0,name:'离职'}],
       parentDept: [],
       total: 0,
       listLoading: true,
@@ -372,6 +383,7 @@ export default {
       this.dataform.id = ''
       this.dataform.sort = '0'
       this.dataform.enable = '1'
+      this.dataform.work = 1
       this.defaultCheckedKeys = []
     },
     form_add() {
@@ -403,6 +415,7 @@ export default {
           this.requestParam.parammaps.enable = this.dataform.enable
           this.requestParam.parammaps.pastureId = this.dataform.pastureId
           this.requestParam.parammaps.empCode = this.dataform.empCode
+          this.requestParam.parammaps.work = this.dataform.work
 
           PostDataByName(this.requestParam).then(response => {
             if (response.msg !== 'fail') {
@@ -441,7 +454,7 @@ export default {
           this.requestParam.parammaps.enable = this.dataform.enable
           this.requestParam.parammaps.pastureId = this.dataform.pastureId
           this.requestParam.parammaps.empCode = this.dataform.empCode
-
+          this.requestParam.parammaps.work = this.dataform.work
           PostDataByName(this.requestParam).then(response => {
             if (response.msg !== 'fail') {
               this.get_table_data()
@@ -472,21 +485,48 @@ export default {
     edit_dialog_save() {
       this.$refs['dataForm'].validate(valid => {
         if (valid) {
-          this.requestParam.name = 'updateEmp'
+          // this.requestParam.name = 'updateEmp'
           this.requestParam.parammaps = {}
           if (this.dataform.easName == '' || this.dataform.easName == undefined) { this.dataform.easName = this.dataform.empname }
-          this.requestParam.parammaps.easName = this.dataform.easName
-          this.requestParam.parammaps.empname = this.dataform.empname
-          this.requestParam.parammaps.deptid = this.dataform.deptid
-          this.requestParam.parammaps.tel = this.dataform.tel
-          this.requestParam.parammaps.position = this.dataform.position
-          this.requestParam.parammaps.remark = this.dataform.remark
-          this.requestParam.parammaps.sort = this.dataform.sort
-          this.requestParam.parammaps.enable = this.dataform.enable
-          this.requestParam.parammaps.pastureId = this.dataform.pastureId
-          this.requestParam.parammaps.empCode = this.dataform.empCode
-          this.requestParam.parammaps.id = this.dataform.id
-          PostDataByName(this.requestParam).then(() => {
+          // this.requestParam.parammaps.easName = this.dataform.easName
+          // this.requestParam.parammaps.empname = this.dataform.empname
+          // this.requestParam.parammaps.deptid = this.dataform.deptid
+          // this.requestParam.parammaps.tel = this.dataform.tel
+          // this.requestParam.parammaps.position = this.dataform.position
+          // this.requestParam.parammaps.remark = this.dataform.remark
+          // this.requestParam.parammaps.sort = this.dataform.sort
+          // this.requestParam.parammaps.enable = this.dataform.enable
+          // this.requestParam.parammaps.pastureId = this.dataform.pastureId
+          // this.requestParam.parammaps.empCode = this.dataform.empCode
+          // this.requestParam.parammaps.id = this.dataform.id
+          // this.requestParam.parammaps.work = this.dataform.work
+          this.requestParam.common = { 'returnmap': '0' }
+          this.requestParam.data = []
+          this.requestParam.data[0] = { 'name': 'updateEmp', 'type': 'e', 'parammaps': {
+            easName:this.dataform.easName,
+            empname:this.dataform.empname,
+            deptid:this.dataform.deptid,
+            tel:this.dataform.tel,
+            position:this.dataform.position,
+            remark:this.dataform.remark,
+            sort:this.dataform.sort,
+            enable:this.dataform.enable,
+            pastureId:this.dataform.pastureId,
+            empCode:this.dataform.empCode,
+            id:this.dataform.id,
+            work:this.dataform.work,
+          }}
+          var enable = 0
+          if(this.dataform.work == 0){
+            enable = 0
+          }else{
+            enable = this.dataform.enable
+          }
+          this.requestParam.data[1] = { 'name': 'editUserEnable', 'type': 'e', 'parammaps': {
+            enable:enable,
+            empid:this.dataform.id
+          }}
+          ExecDataByConfig(this.requestParam).then(() => {
             this.get_table_data()
             this.resetRequestParam()
             this.dialogFormVisible = false
@@ -520,8 +560,8 @@ export default {
         console.log(this.downLoadList)
         const elecExcelDatas = [
           {
-            tHeader: ['牧场', '姓名', '部门', '职位', '电话', '工号'],
-            filterVal: ['pastureName', 'empname', 'deptname', 'position', 'tel', 'empCode'],
+            tHeader: ['牧场', '姓名', '部门', '职位', '电话','状态', '工号'],
+            filterVal: ['pastureName', 'empname', 'deptname', 'position', 'tel','workstr', 'empCode'],
             tableDatas: this.downLoadList,
             sheetName: '员工信息'
           }

+ 7 - 0
src/views/custom/custom/index.vue

@@ -362,6 +362,13 @@
                 <el-table-column label="出库数量" sortable prop="checkoutNumber" min-width="60px" align="center" />
                 <el-table-column label="单价" sortable prop="price" min-width="60px" align="center" />
                 <el-table-column label="总价" sortable prop="sumPrice" min-width="60px" align="center" />
+                <el-table-column   prop="sterilisation" label="冲销状态" min-width="80px" align="center">
+                  <template slot-scope="scope">
+                    <span v-if="scope.row.sterilisation == 1">已冲销</span>
+                    <span v-else-if="scope.row.sterilisation == 2">部分冲销</span>
+                    <span v-else>未冲销</span>
+                  </template>
+                </el-table-column>
                 <!-- <el-table-column label="冲销" sortable prop="sumPrice" min-width="60px" align="center" /> -->
               </el-table>
               <pagination v-show="total>0" :total="totalDelivery" :page.sync="getdataListParmDelivery.offset" :limit.sync="getdataListParmDelivery.pagecount" @pagination="getCardDelivery" />

+ 2 - 2
src/views/custom/outStock/index.vue

@@ -393,11 +393,11 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col v-if="No2 && createTemp.useType == 6" :span="8">
+            <!-- <el-col v-if="No2 && createTemp.useType == 6" :span="8">
               <el-form-item label="订单号:" prop="greenFodderNumber">
                 <el-input ref="greenFodderNumber" v-model="createTemp.greenFodderNumber" maxlength="20" />
               </el-form-item>
-            </el-col>
+            </el-col> -->
             <el-col v-if="isReceiveTime2" :span="8">
               <el-form-item label="出库日期:" prop="receiveTime">
                 <el-date-picker

+ 24 - 0
src/views/maintenance/repair/index.vue

@@ -478,6 +478,13 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="备注:" prop="remark">
+                <el-input ref="remark" v-model="createTemp.remark" />
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-form>
       </div>
       <div slot="footer" class="dialog-footer">
@@ -545,6 +552,13 @@
                 </el-form-item>
               </el-col>
             </el-row>
+            <el-row>
+              <el-col :span="8">
+                <el-form-item label="备注:" prop="remark">
+                  <el-input ref="remark" v-model="seeTemp.remark" disabled />
+                </el-form-item>
+              </el-col>
+            </el-row>
             <el-row>
               <el-col v-if="seeTemp.orderStatue == 3" :span="8">
                 <el-form-item label="驳回日期:" prop="shutdownDate">
@@ -670,6 +684,13 @@
                     </el-form-item>
                   </el-col>
                 </el-row>
+                <el-row>
+                  <el-col :span="8">
+                    <el-form-item label="备注:" prop="remark">
+                      <el-input ref="remark" v-model="seeTemp.remark" disabled />
+                    </el-form-item>
+                  </el-col>
+                </el-row>
                 <el-row>
                   <el-col :span="8">
                     <h3>维修信息</h3>
@@ -1688,6 +1709,7 @@ export default {
         repairCode: '',
         deptName: '',
         eqClassId: '',
+        remark:''
       },
       requestEqName: {
         name: 'geteqbyNameCode',
@@ -2324,6 +2346,7 @@ export default {
       this.createTemp.deptName = ''
       this.createTemp.departmentId = ''
       this.createTemp.eqClassId = ''
+      this.createTemp.remark = ''
     },
     changePickId(val) {
       if (this.dialogStatus == 'create') {
@@ -2762,6 +2785,7 @@ export default {
         eqName : this.createTemp.eqName,
         eqCode : this.createTemp.eqCode,
         details : this.createTemp.details,
+        remark : this.createTemp.remark,
         requestTime : parseTime(new Date(), '{y}-{m}-{d}')
       }
 

+ 8 - 8
src/views/report/maintenanceFault/index.vue

@@ -80,17 +80,17 @@
           <span>{{ row.count }}</span>
         </template>
       </el-table-column>
-      <el-table-column   :key="7" label="平均维修时间(MTTR)" sortable min-width="140px" align="center">
+      <el-table-column   :key="7" label="平均维修时间/h(MTTR)" sortable min-width="140px" align="center">
         <template slot-scope="{row}">
           <span>{{ row.mttr }}</span>
         </template>
       </el-table-column>
-      <el-table-column   :key="8" label="无故障时间(MTTF)" sortable min-width="140px" align="center">
+      <el-table-column   :key="8" label="无故障时间/h(MTTF)" sortable min-width="140px" align="center">
         <template slot-scope="{row}">
           <span>{{ row.mttf }}</span>
         </template>
       </el-table-column>
-      <el-table-column   :key="9" label="平均故障间隔时间(MTBF)" sortable min-width="140px" align="center">
+      <el-table-column   :key="9" label="平均故障间隔时间/h(MTBF)" sortable min-width="140px" align="center">
         <template slot-scope="{row}">
           <span>{{ row.mtbf }}</span>
         </template>
@@ -377,9 +377,9 @@ export default {
       this.isTitle3 = false
       GetDataByName( { name: 'getEqClassBengbu', offset: 0, pagecount: 0, returntype: 'Map', parammaps: {
         'section': '3','pid':'' }}).then(response => {
-      
+
         this.eqClassList3 = response.data.list
-      
+
       })
     },
     goSecond() {
@@ -446,7 +446,7 @@ export default {
             this.downLoadParm.list = response.data
             var excelDatas = [
               {
-                tHeader: ['牧场', '设备二级分类名称', '维修次数', '平均维修时间(MTTR)', '无故障时间(MTTF)', '平均故障间隔时间(MTBF)'],
+                tHeader: ['牧场', '设备二级分类名称', '维修次数', '平均维修时间/h(MTTR)', '无故障时间/h(MTTF)', '平均故障间隔时间/h(MTBF)'],
                 filterVal: ['pastureName', 'eqClassName', 'count', 'mttr', 'mttf', 'mtbf' ],
                 tableDatas: this.downLoadParm.list,
                 sheetName: '设备'
@@ -488,7 +488,7 @@ export default {
             this.downLoadParm.list = response.data
             var excelDatas = [
               {
-                tHeader: [ '设备三级分类名称', '维修次数', '平均维修时间(MTTR)', '无故障时间(MTTF)', '平均故障间隔时间(MTBF)'],
+                tHeader: [ '设备三级分类名称', '维修次数', '平均维修时间/h(MTTR)', '无故障时间/h(MTTF)', '平均故障间隔时间/h(MTBF)'],
                 filterVal: [ 'eqClassName', 'count', 'mttr', 'mttf', 'mtbf' ],
                 tableDatas: this.downLoadParm.list,
                 sheetName: '设备'
@@ -529,7 +529,7 @@ export default {
             this.downLoadParm.list = response.data
             var excelDatas = [
               {
-                tHeader: [   '设备名称','设备内部编号','维修次数', '平均维修时间(MTTR)', '无故障时间(MTTF)', '平均故障间隔时间(MTBF)'],
+                tHeader: [   '设备名称','设备内部编号','维修次数', '平均维修时间/h(MTTR)', '无故障时间/h(MTTF)', '平均故障间隔时间/h(MTBF)'],
                 filterVal: [ '维修次数','维修次数',  'count', 'mttr', 'mttf', 'mtbf' ],
                 tableDatas: this.downLoadParm.list,
                 sheetName: '设备'

+ 11 - 0
src/views/report/queryCombustion/index.vue

@@ -273,6 +273,7 @@ export default {
         this.getChart6()
       }
     },
+<<<<<<< .mine
     // 各牧场燃动费用对比
     getChart1() {
       let url = '/authdata/ignition/nowwater?'
@@ -494,6 +495,16 @@ export default {
         this.roadChart5(this.chart_data5)
       })
     },
+    getLineChart2() {
+      GetReportform(this.getLineChart2Parm).then(response => {
+        console.log('图3', response)
+        this.chart_data3 = response.data.chart_data
+        this.roadlineChart2(this.chart_data3, this.pasture, this.month)
+    getLineChart2() {
+      GetReportform(this.getLineChart2Parm).then(response => {
+        console.log('图3', response)
+        this.chart_data3 = response.data.chart_data
+        this.roadlineChart2(this.chart_data3, this.pasture, this.month)
     // 牧场每月用油量对比
     getChart6() {
       let startTime = parseTime(this.monthDate[0],'{y}-{m}') + '-01'

+ 28 - 0
src/views/report/queryElec/index.vue

@@ -263,6 +263,34 @@ export default {
           this.chart_data1.data2 = []
           this.chart_data1.xdata = []
           this.total = 0
+    // 各牧场年度维修成本对比
+    getBarChart1() {
+      GetReportform(this.getBarChart1Parm).then(response => {
+        console.log('图1', response)
+        let pasture =  response.data.chart_data.pasture
+        let keys = []
+        pasture.forEach((item,key)=>{
+          if(item.includes("公司")){
+            keys.push(key)
+          }
+        })
+        let lastYear = response.data.chart_data.lastYear
+        let new_pasture =  pasture.splice(keys[0],keys.length)
+        let new_lastYear =  lastYear.splice(keys[0],keys.length)
+        let NowYear = response.data.chart_data.nowYear
+        let new_NowYear =  NowYear.splice(keys[0],keys.length)
+        this.chart_data1.pasture = pasture
+        this.chart_data1.lastYear = lastYear
+        this.chart_data1.nowYear = NowYear
+        // this.chart_data1 = response.data.chart_data
+        this.roadBarChart1(this.chart_data1)
+        var nowYear = response.data.chart_data.nowYear
+        var total = 0
+        if (nowYear !== null || nowYear !== undefined) {
+          nowYear.forEach(function(item, index) {
+            console.log(parseFloat(item))
+            total = total + parseFloat(item)
+          })
         }
         this.roadChart1(this.chart_data1)
         this.getChart4()

+ 28 - 0
src/views/report/queryRepair/index.vue

@@ -365,6 +365,34 @@ export default {
           this.chart_data1.data2 = []
           this.chart_data1.xdata = []
           this.total = 0
+    // 各牧场年度维修成本对比
+    getBarChart1() {
+      GetReportform(this.getBarChart1Parm).then(response => {
+        console.log('图1', response)
+        let pasture =  response.data.chart_data.pasture
+        let keys = []
+        pasture.forEach((item,key)=>{
+          if(item.includes("公司")){
+            keys.push(key)
+          }
+        })
+        let lastYear = response.data.chart_data.lastYear
+        let new_pasture =  pasture.splice(keys[0],keys.length)
+        let new_lastYear =  lastYear.splice(keys[0],keys.length)
+        let NowYear = response.data.chart_data.nowYear
+        let new_NowYear =  NowYear.splice(keys[0],keys.length)
+        this.chart_data1.pasture = pasture
+        this.chart_data1.lastYear = lastYear
+        this.chart_data1.nowYear = NowYear
+        // this.chart_data1 = response.data.chart_data
+        this.roadBarChart1(this.chart_data1)
+        var nowYear = response.data.chart_data.nowYear
+        var totaltitle = 0
+        if (nowYear !== null || nowYear !== undefined) {
+          nowYear.forEach(function(item, index) {
+            // console.log(parseFloat(item))
+            totaltitle = totaltitle + parseFloat(item)
+          })
         }
         this.roadChart1(this.chart_data1)
         this.getChart4()

+ 28 - 0
src/views/report/queryWater/index.vue

@@ -259,6 +259,34 @@ export default {
           this.chart_data1.data2 = []
           this.chart_data1.xdata = []
           this.total = 0
+    // 各牧场年度维修成本对比
+    getBarChart1() {
+      GetReportform(this.getBarChart1Parm).then(response => {
+        console.log('图1', response)
+        let pasture =  response.data.chart_data.pasture
+        let keys = []
+        pasture.forEach((item,key)=>{
+          if(item.includes("公司")){
+            keys.push(key)
+          }
+        })
+        let lastYear = response.data.chart_data.lastYear
+        let new_pasture =  pasture.splice(keys[0],keys.length)
+        let new_lastYear =  lastYear.splice(keys[0],keys.length)
+        let NowYear = response.data.chart_data.nowYear
+        let new_NowYear =  NowYear.splice(keys[0],keys.length)
+        this.chart_data1.pasture = pasture
+        this.chart_data1.lastYear = lastYear
+        this.chart_data1.nowYear = NowYear
+        this.chart_data1 = response.data.chart_data
+        this.roadBarChart1(this.chart_data1)
+        var nowYear = response.data.chart_data.nowYear
+        var total = 0
+        if (nowYear !== null || nowYear !== undefined) {
+          nowYear.forEach(function(item, index) {
+            // console.log(parseFloat(item))
+            total = total + parseFloat(item)
+          })
         }
         this.roadChart1(this.chart_data1)
         this.getChart4()

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