Browse Source

更改了委外维修及设备维修等

duanxiaoduan 1 năm trước cách đây
mục cha
commit
e8d40428ef

+ 3 - 3
.env.development

@@ -4,12 +4,12 @@ ENV = 'development'
 # base api
 # VUE_APP_BASE_API = '/dev-api'
 # 线上正式地址
- #  VUE_APP_BASE_API = 'https://eam.modernfarming.cn:8000/'
+#  VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
 # 白少后台本地
 # VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
 # 线上测试
-# VUE_APP_BASE_API = 'https://tmrwatch.cn:8082/'
-VUE_APP_BASE_API = 'https://tmrwatch.cn:8082/'
+# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
+VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
  # VUE_APP_BASE_API = 'http://127.0.0.1:8082/'
 
  # VUE_APP_BASE_API = 'http://36.155.144.182:18090/'

+ 6 - 2
.env.production

@@ -2,12 +2,16 @@
 ENV = 'production'
 
 # base api
+#
+VUE_APP_BASE_API = '/'
 # 测试线
-VUE_APP_BASE_API = 'https://tmrwatch.cn:8082/'
+# VUE_APP_BASE_API = 'http://tmrwatch.cn:8082/'
 # 后台本地
 # VUE_APP_BASE_API = 'http://192.168.1.77:8082/'
+# 牧场测试线
+# VUE_APP_BASE_API = 'http://36.155.144.182:18090/'
 # 正式线
-# VUE_APP_BASE_API = 'https://eam.modernfarming.cn:8000/'
+# VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
 
 # VUE_APP_BASE_API = 'http://127.0.0.1:8082/'
 

BIN
dist-现代牧业-本地地址-20230529-1.zip


BIN
dist-现代牧业-正式地址-20230527-1.zip


BIN
dist-现代牧业-测试地址-20230527-3.zip


BIN
dist-现代牧业-测试地址-20230530-1.zip


BIN
dist.zip


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/index.html


+ 1 - 1
src/layout/components/Navbar.vue

@@ -104,7 +104,7 @@ export default {
     async logout() {
       await this.$store.dispatch('user/logout')
       this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => {
-        this.$router.push(`/login}`) // 跳转到主页
+        this.$router.push(`/login`) // 跳转到主页
       })
       // this.$router.push(`/login?redirect=${this.$route.fullPath}`)   //跳转到登陆前页面
     },

+ 1 - 0
src/permission.js

@@ -68,6 +68,7 @@ router.beforeEach(async(to, from, next) => {
       // other pages that do not have permission to access are redirected to the login page.
 
       // next(`/login?redirect=${to.path}`)    //跳转到退出前界面
+
       next({ path: '/login' })
       NProgress.done()
     }

+ 0 - 862
src/views/basic/otherinfo/index - 副本.vue

@@ -1,862 +0,0 @@
-<template>
-  <div class="app-container">
-    <div class="filter-container">
-      <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item">
-        <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
-      </el-select>
-      <el-select v-model="getdataListParm.parammaps.departmentName" clearable placeholder="部门" class="filter-item">
-        <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.name" />
-      </el-select>
-      <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
-      <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="form_add">新增</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-waves class="filter-item" type="warning" icon="el-icon-download">导入</el-button>
-      </el-upload>
-    </div>
-
-    <el-table
-      :key="tableKey"
-      v-loading="listLoading"
-      element-loading-text="给我一点时间"
-      :data="list"
-      border
-      fit
-      highlight-current-row
-      style="width: 100%;"
-      :row-style="rowStyle"
-      :cell-style="cellStyle"
-      class="elTable"
-      @sort-change="tableSort"
-    >
-      <el-table-column label="序号" align="center" type="index" width="50px">
-        <template slot-scope="scope">
-          <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="部门" min-width="110px" align="center" prop="departmentName" />
-      <el-table-column label="油卡编号" min-width="110px" align="center" prop="cardNumber" />
-      <el-table-column label="油卡类型" min-width="110px" align="center" prop="cardType" />
-      <el-table-column label="剩余余额" min-width="110px" align="center" sortable prop="cardAmount" />
-      <el-table-column label="设备编号" min-width="110px" align="center" prop="assetNumber" />
-      <el-table-column label="设备名称" min-width="110px" align="center" prop="assetName" />
-      <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
-        <template slot-scope="{row}">
-          <el-button type="success" size="mini" @click="handleChange(row)">换卡</el-button>
-          <el-button type="success" size="mini" @click="handleRecharge(row)">充值</el-button>
-          <el-button type="danger" size="mini" @click="form_delete(row)">删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-    <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
-    <!-- 弹出层新增or修改 -->
-    <!-- 新增油卡 -->
-    <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="50%">
-      <el-form ref="temp" :rules="rules" :model="temp" label-position="right" label-width="100px" style="width: 800px; margin-left:50px;">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="设备:" prop="assetName">
-              <el-autocomplete ref="assetName" v-model="temp.assetName" style="width:300px" value-key="assetName" class="inline-input" clearable :fetch-suggestions="formNumberSearch" placeholder="请选择设备" @select="handleformNameSelect" @blur="blurformNameSelect">
-                <template slot-scope="{ item }">
-                  <div class="name" style="display: inline;">{{ item.assetName }}</div>
-                </template>
-              </el-autocomplete>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="牧场:" prop="pastureName">
-              <el-input ref="pastureName" v-model="temp.pastureName" disabled />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="部门:" prop="deptName">
-              <el-input ref="deptName" v-model="temp.deptName" disabled />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="卡号:" prop="cardNumber">
-              <el-input ref="cardNumber" v-model="temp.cardNumber" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="卡类型:" prop="cardType">
-              <el-input ref="cardType" v-model="temp.cardType" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="卡余额:" prop="cardAmount">
-              <el-input ref="cardAmount" v-model="temp.cardAmount" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button v-if="dialogStatus==='create'" ref="createb" :disabled="isokDisable" type="success" @click="add_dialog_save_again()">保存并新增</el-button>
-        <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='create'?add_dialog_save():edit_dialog_save()">保存并关闭</el-button>
-        <el-button @click="dialogFormVisible = false;get_table_data()">取消并关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 换卡弹出层新增or修改 -->
-    <el-dialog :title="textMap[tabledialogStatus]" :visible.sync="changeFormVisible" :close-on-click-modal="false" width="50%">
-      <el-table
-        :key="tableKey"
-        v-loading="changelistLoading"
-        element-loading-text="给我一点时间"
-        :data="changelist"
-        border
-        fit
-        highlight-current-row
-        style="width: 100%;"
-        :row-style="rowStyle"
-        :cell-style="cellStyle"
-        class="elTable"
-      >
-        <el-table-column label="日期" align="center" type="index" width="150px">
-          <template slot-scope="scope">
-            <span>{{ scope.row.dateFormat }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="卡号" min-width="110px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.cardCode }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="换卡人" width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.empName }}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div slot="footer" class="dialog-footer" style="bottom:10px">
-        <el-button
-          ref="createb"
-          type="success"
-          @click="createChange()"
-        >换卡</el-button>
-        <el-button @click="changeFormVisible = false;get_table_data()">取消并关闭</el-button>
-      </div>
-    </el-dialog>
-    <!-- 弹出层新增or修改 -->
-    <el-dialog
-      :title="textMap[dialogStatus]"
-      :visible.sync="changeFFormVisible"
-      :close-on-click-modal="false"
-      width="50%"
-    >
-      <el-form
-        ref="temp"
-        :rules="rules"
-        :model="temp"
-        label-position="right"
-        label-width="100px"
-        style="width: 800px; margin-left:50px;"
-      >
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="更换卡号" prop="cardCode">
-              <el-input ref="cardNumber" v-model="temp.cardCode" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="更换卡类型" prop="cardType">
-              <el-input ref="cardType" v-model="temp.cardType" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="负责人:" prop="employeId">
-              <el-select v-model="temp.employeId" placeholder="负责人" class="filter-item">
-                <el-option
-                  v-for="item in findAllEmploye"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row><el-row>
-          <el-col :span="8">
-            <el-form-item label="当前时间:" prop="dateFormat">
-              <el-date-picker
-                v-model="temp.dateFormat"
-                type="date"
-                placeholder="当前时间"
-                format="yyyy-MM-dd"
-                value-format="yyyy-MM-dd"
-                disabled
-                style="width:100%;"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" :disabled="isokDisable" @click="createChangeData()">保存并关闭</el-button>
-        <el-button @click="changeFFormVisible = false">取消并关闭</el-button>
-      </div>
-    </el-dialog>
-    <!-- 弹出层新增or修改 -->
-    <el-dialog
-      :title="textMap[tabledialogStatus]"
-      :visible.sync="rechargeFormVisible"
-      :close-on-click-modal="false"
-      width="50%"
-    >
-      <el-table
-        :key="tableKey"
-        v-loading="rechargelistLoading"
-        element-loading-text="给我一点时间"
-        :data="rechargelist"
-        border
-        fit
-        highlight-current-row
-        style="width: 100%;"
-        :row-style="rowStyle"
-        :cell-style="cellStyle"
-        class="elTable"
-      >
-        <!-- table表格 -->
-        <el-table-column label="日期" align="center" type="index" width="150px">
-          <template slot-scope="scope">
-            <span>{{ scope.row.dateFormat }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="卡号" min-width="110px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.cardCode }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="充值金额" width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.rechargeNum }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="充值人" width="150px" align="center">
-          <template slot-scope="scope">
-            <span>{{ scope.row.empName }}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div slot="footer" class="dialog-footer" style="bottom:10px">
-        <el-button
-          ref="createb"
-          type="success"
-          @click="createRecharge()"
-        >充值</el-button>
-        <el-button @click="rechargeFormVisible = false;get_table_data()">取消并关闭</el-button>
-      </div>
-    </el-dialog>
-
-    <!-- 充值提交 -->
-    <el-dialog
-      :title="textMap[dialogStatus]"
-      :visible.sync="rechargeFFormVisible"
-      :close-on-click-modal="false"
-      width="50%"
-    >
-      <el-form
-        ref="temp"
-        :rules="rules"
-        :model="temp"
-        label-position="right"
-        label-width="100px"
-        style="width: 800px; margin-left:50px;"
-      > <el-row>
-          <el-col :span="8">
-            <el-form-item label="负责人:" prop="employeId">
-              <el-select v-model="temp.employeId" placeholder="负责人" class="filter-item">
-                <el-option
-                  v-for="item in findAllEmploye"
-                  :key="item.id"
-                  :label="item.name"
-                  :value="item.id"
-                />
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row><el-row>
-          <el-col :span="8">
-            <el-form-item label="当前时间:" prop="dateFormat">
-              <el-date-picker
-                v-model="temp.dateFormat"
-                type="date"
-                placeholder="当前时间"
-                format="yyyy-MM-dd"
-                value-format="yyyy-MM-dd"
-                disabled
-                style="width:100%;"
-              />
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="充值金额" prop="rechargeNum">
-              <el-input ref="rechargeNum" v-model="temp.rechargeNum" />
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="createRechargeData()">确认</el-button>
-        <el-button @click="rechargeFFormVisible = false">取消并关闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-// 引入
-// import TreeSelect from '@/components/TreeSelect'   TreeSelect
-import { GetDataByName, GetDataByNames, PostDataByName, getRecuData, ExecDataByConfig, failproccess } from '@/api/common'
-import waves from '@/directive/waves' // waves directive
-import { parseTime, sortChange } from '@/utils/index.js'
-// eslint-disable-next-line no-unused-vars
-import { validateEMail } from '@/utils/validate.js'
-import Pagination from '@/components/Pagination' // secondary package based on el-pagination
-import { MessageBox } from 'element-ui'
-// eslint-disable-next-line no-unused-vars
-import Cookies from 'js-cookie'
-import { getToken } from '@/utils/auth'
-export default {
-  name: 'Otherinfo',
-  components: { Pagination },
-  directives: { waves },
-  data() {
-    return {
-      isokDisable: false,
-      tableKey: 0,
-      list: null,
-      changelist: null,
-      rechargelist: null,
-      total: 0,
-      listLoading: true,
-      changelistLoading: true,
-      rechargelistLoading: true,
-      formNumberSearchList: [],
-      requestParam: {
-        name: 'insertAsset',
-        offset: 0,
-        pagecount: 0,
-        parammaps: {}
-      },
-      parentDept: [],
-      getDeptParm: { name: 'getdeptrecu', idname: 'value', params: [-1] },
-      postDataPramas: {
-
-      },
-      // 1-2:table&搜索传参
-      getdataListParm: {
-        name: 'getOilcardList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-          pname: '',
-          pastureName: Cookies.get('pasturename')
-        }
-      },
-      requestFilterParams: {
-        name: '',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {}
-      },
-      getchangedataListParm: {
-        name: 'getcardrecordList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-        }
-      },
-      getrechargedataListParm: {
-        name: 'getrechargerecordList',
-        page: 1,
-        offset: 1,
-        pagecount: 10,
-        returntype: 'Map',
-        parammaps: {
-        }
-      },
-      // 2-3:下拉框请求后数据加入[]
-      findAllProvider: [],
-      findAllAssetType: [],
-      findAllPasture: [],
-      findAllDepart: [],
-      findAllEmploye: [],
-      getDictByName: [],
-      findAllAsset: [],
-      // 2-1.请求下拉框接口
-      requestParams: [
-        { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
-        { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
-        { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
-        { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
-        { name: 'findAllAsset', offset: 0, pagecount: 0, params: [] },
-        { name: 'getDictByName', offset: 0, pagecount: 0, params: ['资产状态'] }
-      ],
-
-      dataform: {
-        deptId: '',
-        parentId: ''
-      },
-
-      temp: {},
-      dialogFormVisible: false,
-      changeFormVisible: false,
-      rechargeFormVisible: false,
-      changeFFormVisible: false,
-      rechargeFFormVisible: false,
-      tabledialogStatus: '',
-      dialogStatus: '',
-      textMap: {
-        update: '编辑',
-        create: '新增',
-        change: '换卡记录',
-        recharge: '充值记录',
-        changeF: '换卡',
-        rechargeF: '充值'
-      },
-      dialogPvVisible: false,
-      // 校验规则
-      rules: {
-        assetName: [
-          { required: true, message: '必填', trigger: 'blur' }
-
-          // 引入自定义校验并使用
-          // { validator: validateEMail, trigger: 'blur' }
-        ],
-        pastureName: [{ required: true, message: '必填', trigger: 'blur' }],
-        deptName: [{ required: true, message: '必填', trigger: 'blur' }],
-        cardNumber: [{ required: true, message: '必填', trigger: 'blur' }],
-        cardAmount: [{ required: true, message: '必填', trigger: 'blur' }]
-      },
-      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
-      cellStyle: { padding: 0 + 'px' },
-      defaultProps: {
-        children: 'children',
-        label: 'label'
-      },
-      nodeKey: 'value',
-      defaultCheckedKeys: []
-    }
-  },
-  computed: {
-    // 设置请求头
-    headers() {
-      return {
-        // 设置token
-        // eslint-disable-next-line no-undef
-        token: getToken()
-      }
-    },
-    uploadData() {
-      return {
-        name: 'importOilcard',
-        importParams: '牧场,车自编号,油卡,类型,上次用油量,部门',
-        sheetname: 'SheetJS'
-      }
-    },
-    // 设置上传地址
-    uploadExcelUrl() {
-      // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
-      return process.env.VUE_APP_BASE_API + 'authdata/ImportExcel'
-    }
-  },
-
-  created() {
-    this.get_select_list()
-    this.get_table_data()
-  },
-
-  methods: {
-    tableSort(column) {
-      sortChange(column, this.list)
-    },
-    getDeptList() {
-      getRecuData(this.getDeptParm).then(response => {
-        this.parentDept = response.data
-      })
-    },
-
-    popoverHide(checkedIds, checkedData) {
-      this.dataform.deptId = checkedIds
-      this.dataform.parentId = checkedData.parentid
-    },
-    providerSearch(queryString, cb) {
-      var returnList = this.findAllProvider
-      var results = queryString
-        ? returnList.filter(this.createFilter(queryString))
-        : returnList
-      // 调用 callback 返回建议列表的数据
-      cb(results)
-    },
-    createFilter(queryString) {
-      return returnValue => {
-        return (
-          returnValue.assetName.toLowerCase().indexOf(queryString.toLowerCase()) >= 0
-        )
-      }
-    },
-    handleSelect(item) {
-      console.log(item)
-    },
-
-    get_table_data() {
-      this.listLoading = true
-      GetDataByName(this.getdataListParm).then(response => {
-        this.list = response.data.list
-        this.pageNum = response.data.pageNum
-        this.pageSize = response.data.pageSize
-        if (response.data.total) {
-          this.total = response.data.total
-        }
-        this.getDeptList()
-        setTimeout(() => {
-          this.listLoading = false
-        }, 100)
-      })
-    },
-
-    get_select_list() {
-      this.requestParams[5].params[0] = this.$store.state.user.pastureid
-      GetDataByNames(this.requestParams).then(response => {
-        this.findAllProvider = response.data.findAllProvider.list
-        this.findAllAssetType = response.data.findAllAssetType.list
-        this.findAllPasture = response.data.findAllPasture.list
-        this.findAllDepart = response.data.findAllDepart.list
-        this.findAllEmploye = response.data.findAllEmploye.list
-        this.findAllAsset = response.data.findAllAsset.list
-        this.getDictByName = response.data.getDictByName.list
-      })
-    },
-    form_search() {
-      this.listLoading = true
-      this.getdataListParm.offset = 1
-      this.get_table_data()
-    },
-
-    handleModifyStatus(row, status) {
-      this.$message({ message: '操作成功', type: 'success' })
-      row.status = status
-    },
-    form_reset() {
-      this.temp = { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), dateFormat: parseTime(new Date(), '{y}-{m}-{d}'), assetName: '', assetId: '', deptName: '', pastureName: '', cardNumber: '', cardType: '', cardAmount: '', rechargeNum: '' }
-    },
-    form_add() {
-      this.form_reset()
-      this.dialogStatus = 'create'
-      this.dialogFormVisible = true
-      this.$nextTick(() => {
-        this.$refs['temp'].clearValidate()
-      })
-    },
-    add_dialog_save() {
-      this.$refs['temp'].validate(valid => {
-        if (valid) {
-          this.requestParam.name = 'insertOilcard'
-          this.requestParam.parammaps = this.temp
-          const cardAmount = /^\d+(\.\d{1,2})?$/
-          // 卡余额
-          if (!cardAmount.test(parseFloat(this.temp.cardAmount))) {
-            this.$message({ type: 'error', message: '卡余额请保留两位小数', duration: 2000 })
-            return false
-          }
-          PostDataByName(this.requestParam).then(response => {
-            console.log(response)
-            if (response.msg === 'fail') {
-              this.$notify({ title: '失败', message: '保存失败-' + response.data, type: 'danger', duration: 2000 })
-            } else {
-              this.get_table_data()
-              this.dialogFormVisible = false
-              this.$notify({ title: '成功', message: '新增成功', type: 'success', duration: 2000 })
-            }
-          })
-        }
-      })
-    },
-    add_dialog_save_again() {
-      this.isokDisable = true
-      setTimeout(() => {
-        this.isokDisable = false
-      }, 1000)
-      this.$refs['temp'].validate((valid) => {
-        if (valid) {
-          this.requestParam.name = 'insertOilcard'
-          this.requestParam.parammaps = this.temp
-          const cardAmount = /^\d+(\.\d{1,2})?$/
-          // 卡余额
-          if (!cardAmount.test(parseFloat(this.temp.cardAmount))) {
-            this.$message({ type: 'error', message: '卡余额请保留两位小数', duration: 2000 })
-            return false
-          }
-          PostDataByName(this.requestParam).then(response => {
-            console.log(response)
-            if (response.msg !== 'fail') {
-              this.form_reset()
-              this.$nextTick(() => {
-                this.$refs['temp'].clearValidate()
-              })
-              this.$notify({ title: '成功', message: '新增成功', type: 'success', duration: 2000 })
-            } else {
-              failproccess(response, this.$notify)
-            }
-          })
-        }
-      })
-    },
-    createChangeData() {
-      this.$refs['temp'].validate(valid => {
-        if (valid) {
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          this.postDataPramas.data[0] = { 'name': 'insertchangerecord', 'type': 'e', 'parammaps': {
-            'id': this.temp.id,
-            'employeId': this.temp.employeId,
-            'cardCode': this.temp.cardCode,
-            'cardType': this.temp.cardType
-          }}
-          this.postDataPramas.data[1] = { 'name': 'updateCardExecData', 'type': 'e', 'parammaps': {
-            'id': this.temp.id,
-            'employeId': this.temp.employeId,
-            'cardCode': this.temp.cardCode,
-            'cardType': this.temp.cardType
-          }}
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            if (response.msg === 'fail') {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.get_table_data()
-              this.getchangedataListParmList()
-              this.changeFFormVisible = false
-              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-            }
-          })
-        }
-      })
-    },
-    createRechargeData() {
-      this.$refs['temp'].validate(valid => {
-        if (valid) {
-          const rechargeNum = /^\d+(\.\d{1,2})?$/
-          // 充值金额
-          if (!rechargeNum.test(parseFloat(this.temp.rechargeNum))) {
-            this.$message({ type: 'error', message: '充值金额请保留两位小数', duration: 2000 })
-            return false
-          }
-          this.postDataPramas.common = { 'returnmap': '0' }
-          this.postDataPramas.data = []
-          this.postDataPramas.data[0] = { 'name': 'insertrechargerecord', 'type': 'e', 'parammaps': {
-            'id': this.temp.id,
-            'employeId': this.temp.employeId,
-            'cardCode': this.temp.cardCode,
-            'rechargeNum': this.temp.rechargeNum
-          }}
-          this.postDataPramas.data[1] = { 'name': 'updateCardbalanceExecData', 'type': 'e', 'parammaps': {
-            'id': this.temp.id,
-            'rechargeNum': this.temp.rechargeNum
-          }}
-          ExecDataByConfig(this.postDataPramas).then(response => {
-            if (response.msg === 'fail') {
-              this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.get_table_data()
-              this.getrechargedataListParmList()
-              this.rechargeFFormVisible = false
-              this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
-            }
-          })
-        }
-      })
-    },
-    createChange() {
-      this.dialogStatus = 'change'
-      this.changeFFormVisible = true
-      this.form_reset()
-      this.$set(this.temp, 'employeId', parseFloat(Cookies.get('employeid')))
-      this.$set(this.temp, 'cardNumber', '')
-      this.$set(this.temp, 'cardType', '')
-      this.temp.dateFormat = parseTime(new Date(), '{y}-{m}-{d}')
-      this.temp.id = this.$store.id
-      this.temp.departmentId = this.$store.state.user.departmentid
-      this.temp.pastureId = this.$store.state.user.pastureid
-      this.$nextTick(() => {
-        this.$refs['temp'].clearValidate()
-      })
-    },
-    createRecharge() {
-      this.dialogStatus = 'recharge'
-      this.rechargeFFormVisible = true
-      this.$set(this.temp, 'employeId', parseFloat(Cookies.get('employeid')))
-      this.$set(this.temp, 'rechargeNum', '')
-      this.temp.id = this.$store.id
-      this.temp.dateFormat = parseTime(new Date(), '{y}-{m}-{d}')
-      this.temp.cardCode = this.$store.cardCode
-      // this.$nextTick(() => {
-      //   this.$refs['temp'].clearValidate()
-      // })
-    },
-    handleChange(row) {
-      this.tabledialogStatus = 'change'
-      this.changeFormVisible = true
-      this.changelistLoading = true
-      this.getchangedataListParm.parammaps['cardId'] = row.id
-      this.$store.id = row.id
-      this.temp.dateFormat = parseTime(new Date(), '{y}-{m}-{d}')
-      this.getchangedataListParmList()
-    },
-    getchangedataListParmList() {
-      GetDataByName(this.getchangedataListParm).then(response => {
-        this.changelist = response.data.list
-        setTimeout(() => {
-          this.changelistLoading = false
-        }, 100)
-      })
-    },
-    edit_dialog_save() {
-      this.$refs['temp'].validate(valid => {
-        if (valid) {
-          this.requestParam.name = 'updateOilcard'
-          this.requestParam.parammaps = this.temp
-          PostDataByName(this.requestParam).then(response => {
-            console.log(response)
-            if (response.msg === 'fail') {
-              this.$notify({ title: '失败', message: '保存失败-' + response.data, type: 'warning', duration: 2000 })
-            } else {
-              this.get_table_data()
-              this.dialogFormVisible = false
-              this.$notify({ title: '成功', message: '修改成功', type: 'success', duration: 2000 })
-            }
-          })
-        }
-      })
-    },
-    handleRecharge(row) {
-      this.tabledialogStatus = 'recharge'
-      this.rechargeFormVisible = true
-      this.rechargelistLoading = true
-      this.getrechargedataListParm.parammaps['cardId'] = row.id
-      this.$store.id = row.id
-      this.$store.cardCode = row.cardNumber
-      this.getrechargedataListParmList()
-    },
-    getrechargedataListParmList() {
-      GetDataByName(this.getrechargedataListParm).then(response => {
-        this.rechargelist = response.data.list
-        setTimeout(() => {
-          this.rechargelistLoading = false
-        }, 100)
-      })
-    },
-    form_edit(row) {
-      this.temp = Object.assign({}, row) // copy obj
-      this.dialogStatus = 'update'
-      this.dialogFormVisible = true
-      this.$nextTick(() => {
-        this.$refs['temp'].clearValidate()
-      })
-    },
-    form_delete(row) {
-      MessageBox.confirm('油卡编号' + row.cardNumber, '确认删除?', { confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning' }).then(() => {
-        this.requestParam.name = 'deleteOilcard'
-        this.requestParam.parammaps = {}
-        this.requestParam.parammaps['id'] = row.id
-        PostDataByName(this.requestParam).then(() => {
-          this.get_table_data()
-          this.dialogFormVisible = false
-          this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
-        })
-      }).catch(() => {
-        this.$message({ type: 'info', message: '已取消删除' })
-      })
-    },
-    handleformNameSelect(item) {
-      console.log(item)
-      this.temp.assetName = item.assetName
-      this.temp.assetId = item.assetId
-      this.temp.deptName = item.deptName
-      this.temp.departmentId = item.departmentId
-      this.temp.pastureId = item.pastureId
-      this.temp.pastureName = item.pastureName
-    },
-    blurformNameSelect(item) {
-      this.temp.assetName = ''
-      this.temp.assetId = ''
-      this.temp.deptName = ''
-      this.temp.pastureName = ''
-    },
-    formNumberSearch(queryString, cb) {
-      this.requestFilterParams.name = 'findAssetM'
-      this.requestFilterParams.parammaps['pastureId'] = Cookies.get('pastureid')
-      this.requestFilterParams.parammaps['assetName'] = queryString
-      GetDataByName(this.requestFilterParams).then(response => {
-        if (response.data.list === null) {
-          this.formNumberSearchList = []
-        } else {
-          this.formNumberSearchList = response.data.list
-        }
-        console.log(this.formNumberSearchList)
-        console.log(this.formNumberSearchList[0])
-        console.log('queryString', queryString)
-        var results = queryString ? this.formNumberSearchList.filter(this.createFilter(queryString)) : this.formNumberSearchList
-        cb(results)
-      })
-    },
-    beforeImportExcel(file) {
-      const isLt2M = file.size / 1024 / 1024 < 10
-      if (!isLt2M) {
-        this.$message.error('上传文件大小不能超过 10MB!')
-      }
-      return isLt2M
-    },
-
-    handleImportExcelSuccess(res, file) {
-      this.get_table_data()
-      if (res.msg === 'ok') {
-        this.$message({ title: '成功', message: '导入成功:' + res.data.success + '条!', type: 'success', duration: 2000 })
-        if (res.data.err_count > 0) {
-          this.$notify({ title: '失败', message: '导入失败:' + res.data.err_count + '条!', type: 'danger', duration: 2000 })
-            import('@/vendor/Export2Excel').then(excel => {
-              const list1 = res.data.result
-              const tHeader = ['牧场', '车自编号', '油卡', '类型', '上次用油量', '部门', '错误信息']
-              const filterVal = ['牧场', '车自编号', '油卡', '类型', '上次用油量', '部门', 'error_msg']
-              const data1 = this.formatJson(filterVal, list1)
-              excel.export_json_to_excel({ header: tHeader, data: data1, filename: '油卡', autoWidth: true, bookType: 'xlsx' })
-            })
-        }
-      } else {
-        this.$notify({ title: '失败', message: '上传失败', type: 'danger', duration: 2000 })
-      }
-    },
-    formatJson(filterVal, jsonData) {
-      return jsonData.map(v =>
-        filterVal.map(j => {
-          if (j === 'timestamp') { return parseTime(v[j]) } else { return v[j] }
-        })
-      )
-    }
-
-  }
-}
-</script>

+ 3 - 3
src/views/basic/otherinfo/index.vue

@@ -102,7 +102,7 @@
         <el-row>
           <el-col :span="12">
             <el-form-item label="卡类型:" prop="cardType">
-              <el-select ref="cardType" v-model="temp.cardType" placeholder="卡类型" style="width:100%;">
+              <el-select ref="cardType" v-model="temp.cardType" placeholder="卡类型" style="width:100%;" disabled>
                 <el-option v-for="item in cardTypeList" :key="item.id" :label="item.name" :value="item.name" />
               </el-select>
             </el-form-item>
@@ -306,7 +306,7 @@ export default {
         name: 'getrechargerecordList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
         parammaps: { }
       },
-      cardTypeList: [{ name: 'IC卡', id: '0' }, { name: '磁卡', id: '1' }],
+      cardTypeList: [{ name: '内部', id: '0' }],
       findAllProvider: [],
       findAllAssetType: [],
       findAllPasture: [],
@@ -486,7 +486,7 @@ export default {
       row.status = status
     },
     form_reset() {
-      this.temp = { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), dateFormat: parseTime(new Date(), '{y}-{m}-{d}'), assetName: '', assetId: '', deptName: '', pastureName: '', pastureId: Cookies.get('pastureid'), cardNumber: '', cardType: '', cardAmount: '', rechargeNum: '' }
+      this.temp = { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), dateFormat: parseTime(new Date(), '{y}-{m}-{d}'), assetName: '', assetId: '', deptName: '', pastureName: '', pastureId: Cookies.get('pastureid'), cardNumber: '', cardType: '内部', cardAmount: '', rechargeNum: '' }
     },
     form_add() {
       this.form_reset()

+ 10 - 2
src/views/changpwd/changpwd.vue

@@ -11,10 +11,10 @@
         <el-input v-model="temp.oldpassword" type="password" auto-complete="off" />
       </el-form-item>
       <el-form-item label="新密码:" prop="password">
-        <el-input v-model="temp.password" type="password" auto-complete="off" />
+        <el-input v-model="temp.password" placeholder="请输入8位以上密码,必须包含英文字母、数字和特殊字符" type="password" auto-complete="off" />
       </el-form-item>
       <el-form-item label="确认密码:" prop="password1">
-        <el-input v-model="temp.password1" type="password" auto-complete="off" />
+        <el-input v-model="temp.password1" placeholder="请输入8位以上密码,必须包含英文字母、数字和特殊字符" type="password" auto-complete="off" />
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click.native.prevent="toAmend">确认修改</el-button>
@@ -44,6 +44,14 @@ export default {
       } else {
         callback()
       }
+      // const re = new RegExp(`^(?=.*[a-z])(?=.*\\d)(?=.*\\W)[^]{8,32}$`)
+      // if (value === '') {
+      //   callback(new Error('请输入密码'))
+      // } else if (!re.test(value)) {
+      //   callback(new Error('密码由8位以上数字,大小写字母,特殊字符组成'))
+      // } else {
+      //   callback()
+      // }
     }
     var validatePass2 = (rule, value, callback) => {
       if (value === '') {

+ 3 - 2
src/views/console/dict/index.vue

@@ -177,7 +177,8 @@ export default {
   directives: { waves, enterToNext },
   data() {
     return {
-      myHeight:document.documentElement.clientHeight - 85- 200,
+      myHeight:document.documentElement.clientHeight - 85- 150,
+      // myHeight:700,
       defaultProps: {
         children: 'children',
         label: 'name'
@@ -199,7 +200,7 @@ export default {
       },
       getdataListParm: { name: 'getDictList',
         offset: 1,
-        pagecount: 8,
+        pagecount: 10,
         params: [] },
       getRecuListParm: { name: 'getDictclass',
         idname: 'id',

+ 25 - 16
src/views/cost/budget/index.vue

@@ -185,20 +185,20 @@ export default {
             }
           }, 0)
         }, trigger: 'blur' }],
-        monthLimit: [{ type: 'number', required: true, validator: (rule, value, callback) => {
-          if (!value) {
-            callback(new Error('不能为空'))
-          }
-          setTimeout(() => {
-            const re = /(^[1-9](\d+)?(\.\d{1,3})?$)|(^\d\.\d{1,2}$)/
-            const rsCheck = re.test(value)
-            if (!rsCheck) {
-              callback(new Error('请输入正数,且最多保留两位小数'))
-            } else {
-              callback()
-            }
-          }, 0)
-        }, trigger: 'blur' }],
+        // monthLimit: [{ type: 'number', required: true, validator: (rule, value, callback) => {
+        //   if (!value) {
+        //     callback(new Error('不能为空'))
+        //   }
+        //   setTimeout(() => {
+        //     const re = /(^[1-9](\d+)?(\.\d{1,3})?$)|(^\d\.\d{1,2}$)/
+        //     const rsCheck = re.test(value)
+        //     if (!rsCheck) {
+        //       callback(new Error('请输入正数,且最多保留两位小数'))
+        //     } else {
+        //       callback()
+        //     }
+        //   }, 0)
+        // }, trigger: 'blur' }],
         cowSumBudgetMonth: [{ type: 'number', required: true, validator: (rule, value, callback) => {
           if (!value) {
             callback(new Error('不能为空'))
@@ -335,7 +335,7 @@ export default {
               if (this.getDictByName.find(obj => obj.label == response.data.list[i].feeType).value !== '万元') {
                 this.$set(response.data.list[i], 'monthBudget', response.data.list[i].monthBudget + '(' + this.getDictByName.find(obj => obj.label == response.data.list[i].feeType).value + ')')
               }
-             
+
               this.$set(response.data.list[i], 'monthLimit', response.data.list[i].monthLimit + '(' + this.getDictByName.find(obj => obj.label == response.data.list[i].feeType).value + ')')
             } else {
               this.$set(response.data.list[i], 'mymonthBudget', parseFloat(response.data.list[i].monthBudget))
@@ -404,6 +404,9 @@ export default {
           if(this.createTemp.feeType == '饲养头数月预算'){
             this.createTemp.monthLimit = 0
           }
+          if(this.createTemp.monthLimit == ''){
+            this.createTemp.monthLimit = 0
+          }
           this.requestParam.parammaps = this.createTemp
           PostDataByName(this.requestParam).then(response => {
             console.log('新增保存发送参数', this.requestParam)
@@ -441,6 +444,9 @@ export default {
           if(this.createTemp.feeType == '饲养头数月预算'){
             this.createTemp.monthLimit = 0
           }
+          if(this.createTemp.monthLimit == ''){
+            this.createTemp.monthLimit = 0
+          }
           this.requestParam.parammaps = this.createTemp
           PostDataByName(this.requestParam).then(response => {
             console.log('新增保存发送参数', this.requestParam)
@@ -486,6 +492,9 @@ export default {
           if(this.createTemp.feeType == '饲养头数月预算'){
             this.createTemp.monthLimit = 0
           }
+          if(this.createTemp.monthLimit == ''){
+            this.createTemp.monthLimit = 0
+          }
           this.requestParam.parammaps = this.createTemp
           PostDataByName(this.requestParam).then(response => {
             console.log('新增保存发送参数', this.requestParam)
@@ -634,7 +643,7 @@ export default {
                 this.$set(response.data.list[i], 'monthBudget', response.data.list[i].monthBudget + '(' + this.getDictByName.find(obj => obj.label == response.data.list[i].feeType).value + ')')
               }
 
-              
+
               this.$set(response.data.list[i], 'monthLimit', response.data.list[i].monthLimit + '(' + this.getDictByName.find(obj => obj.label == response.data.list[i].feeType).value + ')')
             }
           }

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

@@ -2734,7 +2734,7 @@ export default {
 
 
             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'
             ]

+ 2 - 1
src/views/custom/receive/index.vue

@@ -123,6 +123,7 @@
                 <el-radio-group v-model="createTemp.applyType" :disabled="dialogStatus=='update'" @change="changeType">
                   <el-radio v-model="createTemp.applyType" :label="1">维修</el-radio>
                   <el-radio v-model="createTemp.applyType" :label="2">保养</el-radio>
+                  <el-radio v-model="createTemp.applyType" :label="3">委外维修</el-radio>
                   <el-radio v-if="dialogStatus !=='create'" v-model="createTemp.applyType" :label="0">非维保</el-radio>
                 </el-radio-group>
               </el-form-item>
@@ -570,7 +571,7 @@ export default {
       textMap: { see: '查看详情', create: '新增', examine: '审核', examine2: '审核', examine3: '审核', update: '编辑' },
       statues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
       applystatueList: [{ id: '0', name: '正常' }, { id: '1', name: '已关闭' }],
-      collarType: [{ id: '0', name: '非维保' }, { id: '1', name: '维修' }, { id: '2', name: '保养' }],
+      collarType: [{ id: '0', name: '非维保' }, { id: '1', name: '维修' }, { id: '2', name: '保养' },{ id: '3', name: '委外维修' }],
       radioAll: '全部',
       getdataListParm: {
         name: 'getBigpartapplyList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',

+ 21 - 10
src/views/login/index.vue

@@ -84,6 +84,16 @@ export default {
         callback()
       }
     }
+    // const validatePassword = (rule, value, callback) => {
+    //   const re = new RegExp(`^(?=.*[a-z])(?=.*\\d)(?=.*\\W)[^]{8,32}$`)
+    //   if (value === '') {
+    //     callback(new Error('请输入密码'))
+    //   } else if (!re.test(value)) {
+    //     callback(new Error('密码由8位以上数字,大小写字母,特殊字符组成'))
+    //   } else {
+    //     callback()
+    //   }
+    // }
     return {
       loginForm: {
         username: '',
@@ -134,16 +144,17 @@ export default {
     handleLogin() {
       this.$refs.loginForm.validate(valid => {
         if (valid) {
-          this.loading = true
-          this.$store
-            .dispatch('user/login', this.loginForm)
-            .then(() => {
-              this.$router.push({ path: this.redirect || '/' })
-              this.loading = false
-            })
-            .catch(() => {
-              this.loading = false
-            })
+          this.$store.dispatch('user/login', this.loginForm) .then(() => {
+            // const re = new RegExp(`^(?=.*[a-z])(?=.*\\d)(?=.*\\W)[^]{8,32}$`)
+            // if (!re.test(this.loginForm.password)) {
+            //   this.$router.push('/console/Changpwd')
+            //   console.log('密码不符合要求')
+            // }
+            this.$router.push({ path: this.redirect || '/' })
+            this.loading = false
+          }).catch(() => {
+            this.loading = false
+          })
         } else {
           console.log('error submit!!')
           return false

+ 273 - 117
src/views/maintenance/repair/index.vue

@@ -133,6 +133,7 @@
           <!-- 接单 -->
           <!-- <el-button v-if="(row.orderStatue == 0 && isReceipt && (row.pickId == getdataListParm.parammaps.loginId))" style="display:inline-block" type="success" size="mini" @click="handleReceipt(row)">接单</el-button> -->
           <el-button v-if="roleSet1(row)" style="display:inline-block" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
+          <!-- <el-button v-else-if="(row.orderStatue == 1)" style="display:none" type="success" size="mini" @click="handleReceipt(row)">接单</el-button> -->
           <el-button v-else-if="(row.orderStatue == 1 ||row.orderStatue == 2 )" style="display:none" type="success" size="mini" @click="handleReceipt(row)">接单</el-button>
           <!-- 维修及领用 -->
           <!-- <el-button v-if="(row.orderStatue == 1 && row.SHStatue== 1 || row.SHStatue== 4 || row.SHStatue== 6) && isMaintenanceRequisition && (row.pickId == getdataListParm.parammaps.loginId)" style="display:inline-block" type="success" size="mini" class="successRequisition" @click="handleMaintenanceRequisition(row)">维修及领用</el-button> -->
@@ -155,7 +156,7 @@
 
            <el-button  v-if="isshengweiwaidan && row.outsourcing == 1"   style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont(row)">生成委外单</el-button>
 
-          <el-button   v-if="roleSet1(row) && row.outsourcing == 0"  style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont_sure(row)">委外维修</el-button>  
+          <el-button   v-if="roleSet1(row) && row.outsourcing == 0"  style="display:inline-block" type="success" size="mini" class="successRequisition" @click="form_add_cont_sure(row)">委外维修</el-button>
 
 
         </template>
@@ -163,9 +164,9 @@
     </el-table>
     <!-- 分页 -->
     <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
-   
-   
-   
+
+
+
     <!-- 新增委外维修单 -->
     <el-dialog  title="新增委外维修单" :visible.sync="dialogFormVisibleCont" :close-on-click-modal="false" width="90%">
       <div >
@@ -199,7 +200,7 @@
                 <el-radio-group v-model="createTempCont.contract"    @change="change_contract" >
                   <el-radio   :label="0"  >无合同</el-radio>
                   <el-radio    :label="1" checked>有合同</el-radio>
-                   
+
                 </el-radio-group>
               </el-form-item>
             </el-col>
@@ -216,11 +217,16 @@
                 <el-date-picker v-model="createTempCont.date" :picker-options="pickerOptions" type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%"    />
               </el-form-item>
             </el-col>
-            
+
 
           </el-row>
           <el-row :gutter="20">
             <el-col :span="16">
+              <el-form-item label="故障描述:" prop="description">
+                <el-input   v-model="createTempCont.description" type="textarea" autosize :disabled="dialogStatus==='see'"  />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
               <el-form-item label="报修单号:" prop="RUCode">
                 <el-input ref="RUCode" v-model="createTempCont.RUCode" disabled   />
               </el-form-item>
@@ -228,7 +234,7 @@
           </el-row>
         </el-form>
 
-           
+
 
         <el-table
             :key="tableKey"
@@ -244,26 +250,26 @@
             class="elTable"
           >
             <!-- table表格 -->
-            <el-table-column label="序号" align="center" type="index" width="50px" />
-            <el-table-column label="供应商" prop="providerName" align="center" min-width="80px">
+            <el-table-column :key="0" label="序号" align="center" type="index" width="50px" />
+            <el-table-column :key="1" label="供应商" prop="providerName" align="center" min-width="80px">
               <template slot-scope="scope">
                 <el-select v-model="scope.row.providerName" placeholder="供应商" class="filter-item" style="width: 120px; margin-top:10px"   >
                   <el-option v-for="item in providerNameList" :key="item.name" :label="item.name" :value="item.name" />
                 </el-select>
-        
+
               </template>
             </el-table-column>
-            <el-table-column label="金额" prop="amount" align="center" min-width="80px">
+            <el-table-column :key="2" label="金额" v-if="createTempCont.contract == 0" prop="amount" align="center" min-width="80px">
               <template slot-scope="scope">
                 <span >
                   <el-input v-model="scope.row.amount" style="margin-top:10px" />
                 </span>
-                
+
               </template>
             </el-table-column>
-            <el-table-column   label="设备名称" prop="eqName" align="center" min-width="250">
+            <el-table-column   :key="3" label="设备名称" prop="eqName" align="center" min-width="250">
                 <template slot-scope="scope">
-                  <el-autocomplete     style="margin-top:10px" 
+                  <el-autocomplete     style="margin-top:10px"
                     v-model="scope.row.eqName"
                     class="inline-input"
                     :fetch-suggestions="querySearchEqNameCont"
@@ -279,12 +285,12 @@
                       |<span class="addr">{{ item.eqCode }}</span>
                     </template>
                   </el-autocomplete>
-             
+
                 </template>
               </el-table-column>
-              <el-table-column   label="设备内部编号" prop="eqCode" align="center" min-width="150">
+              <el-table-column :key="4"  label="设备内部编号" prop="eqCode" align="center" min-width="150">
                 <template slot-scope="scope">
-                  <el-autocomplete  style="margin-top:10px" 
+                  <el-autocomplete  style="margin-top:10px"
                     v-model="scope.row.eqCode"
                     class="inline-input"
                     :fetch-suggestions="querySearchCodeCont"
@@ -295,53 +301,53 @@
                     @blur="(value)=>
                     {blurSelectEqCodeCont(value, scope.row)}"
                   />
-                 
+
                 </template>
               </el-table-column>
 
-      
-            <el-table-column label="费用类型" prop="typea" align="center" min-width="80px">
+
+            <el-table-column :key="5" label="费用类型" prop="typea" align="center" min-width="80px">
               <template slot-scope="scope">
-             
+
                 <el-select v-model="scope.row.typea" placeholder="费用类型" class="filter-item" style="width: 120px; margin-top:10px "  >
                   <el-option v-for="item in costTypeList" :key="item.id" :label="item.name" :value="item.name" />
                 </el-select>
-                
+
               </template>
             </el-table-column>
-            <el-table-column label="交付日期" prop="date" align="center" min-width="80px">
+            <!-- <el-table-column label="交付日期" prop="date" align="center" min-width="80px">
               <template slot-scope="scope">
                 <span v >
-                
+
                   <el-date-picker v-model="scope.row.date"   style="margin-top:10px"   type="date" placeholder="日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"   />
                 </span>
-                
+
               </template>
-            </el-table-column>
-            <el-table-column v-if="createTempCont.contract == 1" label="合同编号" prop="contractCode" align="center" min-width="80px">
+            </el-table-column> -->
+            <el-table-column :key="6" v-if="createTempCont.contract == 1" label="合同编号" prop="contractCode" align="center" min-width="80px">
               <template slot-scope="scope">
                 <span  >
                   <el-input v-model="scope.row.contractCode" style="margin-top:10px" />
                 </span>
-               
+
               </template>
             </el-table-column>
-            <el-table-column label="备注" prop="remark" align="center" min-width="80px">
+            <el-table-column :key="7" label="备注" prop="remark" align="center" min-width="80px">
               <template slot-scope="scope">
                 <span  >
                   <el-input v-model="scope.row.remark" style="margin-top:10px" />
                 </span>
-                
+
               </template>
             </el-table-column>
-            
-            
-            
+
+
+
           </el-table>
 
 
-     
- 
+
+
 
         <div slot="footer" class="dialog-footer" style="bottom:10px">
           <el-button type="primary" :disabled="isokDisable" @click="add_dialog_save_cont()">保存并关闭</el-button>
@@ -349,7 +355,7 @@
         </div>
       </div>
     </el-dialog>
-  
+
       <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_Create" :close-on-click-modal="false" width="90%">
       <div class="app-create">
         <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
@@ -401,7 +407,7 @@
             </el-col> -->
             <el-col :span="8">
               <el-form-item label="维修人:" prop="pickId">
- 
+
                 <el-input  v-model="pickNameArr" disabled />
               </el-form-item>
             </el-col>
@@ -414,8 +420,8 @@
                 <el-select v-model="createTemp.details" multiple placeholder="故障情况" filterable class="filter-item" style="width:100%" @change="changeDetails">
                   <el-option v-for="item in  DetailList" :key="item.describe" :label="item.describe" :value="item.describe" />
                 </el-select>
-                
-              </el-form-item> 
+
+              </el-form-item>
 
 
 
@@ -893,8 +899,8 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            
-            
+
+
           </el-row>
           <el-row>
             <el-col :span="20">
@@ -1581,7 +1587,7 @@ export default {
       dialogFormVisibleCont:false,
 
       createTempCont: {
-       
+
         RUCode: '',
         pastureId: this.$store.state.user.pastureid,
         departmentId: this.$store.state.user.departmentid,
@@ -1599,7 +1605,7 @@ export default {
         name: 'findAllDepart', offset: 0, pagecount: 0,
         parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
       },
-      departNameList2: [], 
+      departNameList2: [],
 
 
 
@@ -1635,7 +1641,8 @@ export default {
         eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
         deptName: [{ required: true, message: '必填', trigger: 'blur' }],
         details: [{ required: true, message: '必填', trigger: 'blur' }],
-        shutdownReason: [{ required: true, message: '必填', trigger: 'blur' }]
+        shutdownReason: [{ required: true, message: '必填', trigger: 'blur' }],
+        description: [{ required: true, message: '必填', trigger: 'blur' }],
       },
       getdataListParm: {
         name: 'getRepirsList',
@@ -1771,14 +1778,14 @@ export default {
         name: 'findAllDepart', offset: 0, pagecount: 0,
         parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
       },
-      pastureNameList: [], 
-      employeNameList: [], 
-      departNameList1: [], 
+      pastureNameList: [],
+      employeNameList: [],
+      departNameList1: [],
       getDepartParam2: {
         name: 'findAllDepart', offset: 0, pagecount: 0,
         parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
       },
-      departNameList2: [], 
+      departNameList2: [],
       listAddCont:[
          {providerName:"",providerId: "0",eqId: "0",contractId: "0",}
       ],
@@ -1862,7 +1869,7 @@ export default {
         returntype: 'Map',
         parammaps: {
           pastureId: Cookies.get('pastureid'),
-          codeType: 'LY'
+          codeType: 'WW'
         }
       },
       requestSparePart: {
@@ -1994,19 +2001,19 @@ export default {
         } else{
             result = false
         }
- 
+
       } else {
         result = false
       }
-      
-       
+
+
       return result
-     
+
     },
 
     roleSet2(row){
 
-    
+
       console.log("isMaintenanceRequisition",this.isMaintenanceRequisition)
 
       console.log("roleSet2",((row.orderStatue == 1 && row.SHStatue == 1 || row.SHStatue == 4 || row.SHStatue == 6) && this.isMaintenanceRequisition ))
@@ -2025,14 +2032,14 @@ export default {
         } else{
             result = false
         }
- 
+
       } else {
         result = false
       }
-      
-       
+
+
       return result
-     
+
     },
     roleSet3(row){
       console.log("roleSet3",((row.orderStatue == 1 && (row.SHStatue == 1 || row.SHStatue == 4 || row.SHStatue == 6)) && this.isRepairComplete ))
@@ -2055,7 +2062,7 @@ export default {
         result = false
       }
 
-      
+
       return result
 
     },
@@ -2072,7 +2079,7 @@ export default {
     get_auto_buttons() {
 
 
- 
+
 
       const shengweiwaidan = 'shengweiwaidan'
       const isshengweiwaidan = checkButtons(this.buttons, shengweiwaidan)
@@ -2131,15 +2138,15 @@ export default {
         this.findAllPasture = response.data.findAllPasture.list
         this.findAllDepart = response.data.findAllDepart1.list
         this.findAllEmploye = response.data.findAllEmploye.list
- 
+
         this.pastureNameList = response.data.findAllPasture.list
         console.log("牧场下拉框", this.pastureNameList)
         this.employeNameList = response.data.findAllEmploye.list
         console.log("申请人下拉框", this.employeNameList)
         this.providerNameList = response.data.findAllProviderByCt.list
-        
+
         this.get_depart_list1()
-        
+
       })
     },
 
@@ -2148,7 +2155,7 @@ export default {
         this.departNameList1 = response.data.list
       })
     },
-   
+
 
     change_pasture2(item) {
       this.getDepartParam2.parammaps.pastureId = item
@@ -2334,14 +2341,14 @@ export default {
 
          //this.createTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
 
-          
+
         console.log(val)
       } else {
         this.distributeLeafletsTemp.repairDept = this.maintainers.find(obj => obj.id == val).deptid
       }
     },
 
-    
+
 
 
     add_dialog_save_cont() {
@@ -2370,7 +2377,85 @@ export default {
 
 
     add_dialog_cont_saveSave() {
-     
+
+        // for (var j = 0; j < this.listAddCont.length; j++) {
+        //   console.log(this.listAddCont[j].amount)
+        //   if (this.createTempCont.contract == 1){
+        //     if (this.listAddCont[j].contractCode == null || this.listAddCont[j].contractCode === '') {
+        //       this.$message({ type: 'warning', message: '请检查合同编号是否未填写', duration: 2000 })
+        //       return false
+        //     }
+        //   }
+        // }
+
+
+        // var send_data = {
+        //   "common": {  "returnmap": "0" },
+        //   "data": [
+        //     {
+        //       "name": "addBigoutsourcing", "type": "e",
+        //       "parammaps": this.createTempCont
+        //     },
+        //     {
+        //       "name": "insertSpotList",
+        //       "resultmaps": {  "list": this.listAddCont },
+        //       "children": [
+        //         {
+        //             "name": "addOutsourcing",  "type": "e",
+        //             "parammaps": {
+        //               "bigId": "@addBigoutsourcing.LastInsertId",
+        //               "providerId": "@insertSpotList.providerId",
+        //               "amount": "@insertSpotList.amount",
+        //               "eqId": "@insertSpotList.eqId",
+        //               "eqCode": "@insertSpotList.eqCode",
+        //               "eqName": "@insertSpotList.eqName",
+        //               "typea": "@insertSpotList.typea",
+        //               "date": "@insertSpotList.date",
+        //               "contractId": "@insertSpotList.contractId",
+        //               "providerName": "@insertSpotList.providerName",
+        //               "RUCode": "@insertSpotList.RUCode",
+        //               "contractCode": "@insertSpotList.contractCode"
+        //               }
+        //           }
+        //       ]
+        //     },
+        //     {
+        //       "name": "takeOutsourcing", "type": "e",
+        //       "parammaps": {
+        //         departmentId:this.createTempCont.departmentId,
+        //         id:this.createTempCont.id,
+        //       }
+        //     },
+
+
+
+        //     ]
+        // }
+
+        // ExecDataByConfig(send_data).then(response => {
+        //   console.log('新增保存发送参数', send_data)
+        //   if (response.msg === 'fail') {
+        //     this.$notify({
+        //       title: '保存失败',
+        //       message: response.data,
+        //       type: 'warning',
+        //       duration: 2000
+        //     })
+        //   } else {
+        //     this.dialogFormVisibleCont = false
+
+        //     this.get_table_data()
+
+        //     this.$notify({
+        //       title: '',
+        //       message: '保存成功',
+        //       type: 'success',
+        //       duration: 2000
+        //     })
+        //   }
+        // })
+        // return true
+        // ========================
         for (var j = 0; j < this.listAddCont.length; j++) {
           console.log(this.listAddCont[j].amount)
           if (this.listAddCont[j].amount == null || this.listAddCont[j].amount === '') {
@@ -2392,10 +2477,22 @@ export default {
           }
 
 
-           
-        }
 
 
+        }
+        var amount = 0
+        if(this.createTempCont.contract==0){
+          amount = "@insertSpotList.amount"
+        }else{
+          amount = 0
+        }
+        if(this.createTempCont.contract == 0){
+          // 无合同
+          this.$set(this.createTempCont,'status',0)
+        }else{
+          // 有合同
+          this.$set(this.createTempCont,'status',1)
+        }
         var send_data = {
           "common": {  "returnmap": "0" },
           "data": [
@@ -2406,13 +2503,14 @@ export default {
             {
               "name": "insertSpotList",
               "resultmaps": {  "list": this.listAddCont },
-              "children": [ 
+
+              "children": [
                 {
                     "name": "addOutsourcing",  "type": "e",
                     "parammaps": {
                       "bigId": "@addBigoutsourcing.LastInsertId",
                       "providerId": "@insertSpotList.providerId",
-                      "amount": "@insertSpotList.amount",
+                      "amount": amount,
                       "eqId": "@insertSpotList.eqId",
                       "eqCode": "@insertSpotList.eqCode",
                       "eqName": "@insertSpotList.eqName",
@@ -2420,25 +2518,22 @@ export default {
                       "date": "@insertSpotList.date",
                       "contractId": "@insertSpotList.contractId",
                       "providerName": "@insertSpotList.providerName",
-                      "RUCode": "@insertSpotList.RUCode",
-                      "contractCode": "@insertSpotList.contractCode"
+                      "contractCode": "@insertSpotList.contractCode",
+                      "status":this.createTempCont.status
                       }
                   }
               ]
-            },
-            {
-              "name": "takeOutsourcing", "type": "e",
-              "parammaps": {
-                departmentId:this.createTempCont.departmentId,
-                id:this.createTempCont.id,
-              }
-            },
-
-
-
+              },
+              {
+                  "name": "takeOutsourcing", "type": "e",
+                  "parammaps": {
+                    departmentId:this.createTempCont.departmentId,
+                    id:this.createTempCont.id,
+                    outsourcing:2
+                  }
+                },
             ]
         }
-        
         ExecDataByConfig(send_data).then(response => {
           console.log('新增保存发送参数', send_data)
           if (response.msg === 'fail') {
@@ -2449,10 +2544,13 @@ export default {
               duration: 2000
             })
           } else {
+            if(this.createTempCont.contract==1){
+              this.add_dialog_saveSave2()
+            }
             this.dialogFormVisibleCont = false
-        
+
             this.get_table_data()
-       
+
             this.$notify({
               title: '',
               message: '保存成功',
@@ -2462,8 +2560,54 @@ export default {
           }
         })
         return true
-      
+
     },
+    add_dialog_saveSave2() {
+      console.log(this.examineTemp,'=======contract')
+      // this.examineTemp.iscontract =
+
+        //牧场
+        var mydata = {
+          // acceptanceCode:this.createTemp.acceptanceCode,
+          pastureId:  parseInt(Cookies.get('pastureid')),
+          departmentId: parseInt(Cookies.get('departmentid')),
+          applicant:Cookies.get('employeid'),
+          outsourcingCode:this.createTempCont.outsourcingCode,
+          applyType:0,
+          date:parseTime(new Date(), '{y}-{m}-{d}'),
+          status:1
+        }
+        if(this.examineTemp.contract == 0){
+          mydata.iscontract = 1
+        }else{
+          mydata.iscontract = 0
+        }
+        var send_data = {
+          "common": {  "returnmap": "0" },
+          "data": [
+            {
+              "name": "insertBigacceptance",
+              "type": "e",
+              "parammaps": mydata
+            }
+          ]
+        }
+        ExecDataByConfig(send_data).then(response => {
+          console.log('新增保存发送参数', send_data)
+          if (response.msg === 'fail') {
+            this.$notify({
+              title: '保存失败',
+              message: response.data,
+              type: 'warning',
+              duration: 2000
+            })
+          } else {
+          }
+        })
+
+
+    },
+
     change_contract(val) {
       console.log(val)
       // if(val == 1){
@@ -2473,10 +2617,10 @@ export default {
       // }
 
       this.$forceUpdate()
-      
+
     },
 
-    form_add_cont_sure(row) { 
+    form_add_cont_sure(row) {
       console.log('点击了是否确认委外维修?',row)
       MessageBox.confirm('是否确认委外维修?', {
         confirmButtonText: '确认',
@@ -2485,14 +2629,22 @@ export default {
       }).then(() => {
         var send_data = {
         "common": { "returnmap": "0" },
-        "data": [ 
-          { 
+        "data": [
+          {
             "name": "editMaintainoutsourcing", "type": "e",
             "parammaps": { "outsourcing": 1, "id":row.id }
+           },
+           {
+             "name": "takeOutsourcing", "type": "e",
+             "parammaps": {
+               departmentId:this.createTempCont.departmentId,
+               id:row.id,
+               outsourcing:1
+             }
            }
           ]
         }
-        
+
         ExecDataByConfig(send_data).then(response => {
           this.get_table_data()
           this.$notify({
@@ -2510,12 +2662,16 @@ export default {
       })
     },
 
-     
+
 
     form_add_cont(row) {
 
       this.createTempCont = Object.assign({}, row)
-
+      console.log(this.createTempCont.description)
+      if(this.createTempCont.description == undefined || this.createTempCont.description == null){
+        this.$set(this.createTempCont,'description','')
+      }
+      console.log(this.createTempCont.description,'====')
       this.reset_create_cont()
       this.getDepartParam2.parammaps.pastureId = this.createTempCont.pastureId
       this.get_depart_list2()
@@ -2541,7 +2697,7 @@ export default {
     },
 
     reset_create_cont() {
-     
+
       this.createTempCont.pastureId =  parseInt(Cookies.get('pastureid'))
      this.createTempCont.departmentId = parseInt(Cookies.get('departmentid'))
 
@@ -2552,22 +2708,22 @@ export default {
      this.createTempCont.departmentName = Cookies.get('departmentname')
       this.createTempCont.employeId = parseInt(Cookies.get('employeid'))
       this.createTempCont.date = parseTime(new Date(), '{y}-{m}-{d}')
-      
+
       this.createTempCont.outsourcingCode = ''
       this.createTempCont.applicant = parseInt(Cookies.get('employeid'))
       this.createTempCont.providerId = ''
       this.createTempCont.contract = 1
 
       this.createTempCont.repairCode = ""
- 
+
       this.createTempCont.description = ''
-      
-   
- 
- 
+
+
+
+
 
       this.listAddCont = [{providerName:"",providerId: "0",eqId: "0",contractId: "0",amount:"",contractCode:"",date:"",eqCode:"",eqName:"",remark:"",typea:"",}]
-      
+
     },
 
     change_pasture2(item) {
@@ -2608,7 +2764,7 @@ export default {
         details : this.createTemp.details,
         requestTime : parseTime(new Date(), '{y}-{m}-{d}')
       }
-      
+
     },
     getRepairNumber() {
       GetDataByName(this.getRepairNumberParm).then(response => {
@@ -2665,10 +2821,10 @@ export default {
       this.requestParam.parammaps.details = detailString
 
       if(this.requestParam.parammaps.pickId.length != 0 && this.requestParam.parammaps.pickId){
- 
+
           this.requestParam.parammaps.pickId = this.requestParam.parammaps.pickId.toString()
       }
-     
+
       PostDataByName(this.requestParam).then(response => {
         console.log('新增保存发送参数', this.requestParam)
         if (response.msg !== 'fail') {
@@ -2743,10 +2899,10 @@ export default {
         this.$set(this.createTemp, 'deptName', '')
         this.$set(this.createTemp, 'departmentId', '')
       }
-      
-      
- 
-     
+
+
+
+
       this.getdataListParmDetail.parammaps.eqClassId = item.eqClassId
       this.getDetail()
       this.$forceUpdate()
@@ -2861,17 +3017,17 @@ export default {
           pickNameArr.push(item.empNameAndmt)
            pickidArr.push(item.id)
            depTiDArr.push(item.deptid)
-           
+
         })
 
-       
+
 
         _this.pickNameArr = pickNameArr
         _this.pickidArr = pickidArr
         _this.depTiDArr = depTiDArr
 
         _this.createTemp.pickId = pickidArr
-   
+
         _this.createTemp.repairDept =  depTiDArr[0]
 
         console.log(pickNameArr,pickidArr,depTiDArr)
@@ -3117,7 +3273,7 @@ export default {
         this.requestParam.name = 'takeRepirsEmp'
         this.requestParam.parammaps = {}
         this.requestParam.parammaps.id = this.receiptTemp.id
-        this.requestParam.parammaps.empid =  Cookies.get('employeid') 
+        this.requestParam.parammaps.empid =  Cookies.get('employeid')
         PostDataByName(this.requestParam).then((response) => {
           if (response.msg !== 'fail') {
             this.get_table_data()
@@ -3146,7 +3302,7 @@ export default {
       this.getFaultList()
 
       var send_data2 = {
-        "name": "getpartapplyListBybig",  
+        "name": "getpartapplyListBybig",
         "parammaps":{  "RUCode": row.repairCode }
       }
       GetDataByName(send_data2).then(response => {
@@ -3161,8 +3317,8 @@ export default {
         }, 100)
       })
 
- 
-   
+
+
     },
     changeIsOldProducts(val) {
       console.log(val)

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 364 - 157
src/views/maintenance/subcontractingMainten/tabPage/tab1.vue


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 214 - 161
src/views/maintenance/subcontractingMainten/tabPage/tab2.vue


+ 3 - 3
src/views/report/energyConsum/index.vue

@@ -314,19 +314,19 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="单头牛用电量价(元/吨):" prop="dtnydl">
+            <el-form-item label="单头牛用电量价(度/头日):" prop="dtnydl">
               <el-input ref="dtnydl" v-model="temp.dtnydl"  :disabled="dialogStatus==='see'" />
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="单头牛用水量价(吨/):" prop="dtnysl">
+            <el-form-item label="单头牛用水量价(吨/头日):" prop="dtnysl">
               <el-input ref="dtnysl" v-model="temp.dtnysl" :disabled="dialogStatus==='see'"  />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="单头牛用油量(吨/方):" prop="dtnyyl">
+            <el-form-item label="单头牛用油量(升/头日):" prop="dtnyyl">
               <el-input ref="dtnyyl" v-model="temp.dtnyyl" :disabled="dialogStatus==='see'"  />
             </el-form-item>
           </el-col>

+ 41 - 39
src/views/report/equipmentIndex/index.vue

@@ -231,6 +231,43 @@
           </el-table-column>
         </el-table>
       </div>
+      <div>
+        <h3 id="bioConsumptionTable">燃动费</h3>
+        <el-table
+          :key="bioConsumptionTable.tableKey"
+          v-loading="bioConsumptionTable.listLoading"
+          element-loading-text="给我一点时间"
+          :data="bioConsumptionTable.list"
+          border
+          fit
+          highlight-current-row
+          style="width: 100%;"
+          :row-style="rowStyle"
+          :cell-style="tableCellStyle"
+          class="elTable"
+          height="350"
+          @sort-change="tableSort8"
+        >
+          <el-table-column label="设备指标" align="center">
+            <el-table-column label="序号" align="center" type="index" width="50px" />
+            <el-table-column label="牧场" min-width="70px" align="center">
+              <template slot-scope="{row}">
+                <a @click="clickBioConsumption(row)">{{ row.pastureName }}</a>
+              </template>
+            </el-table-column>
+          </el-table-column>
+          <el-table-column label="总指标" align="center">
+            <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
+            <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
+            <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
+            <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
+            <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
+          </el-table-column>
+          <el-table-column label="单头牛指标" align="center">
+            <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
+          </el-table-column>
+        </el-table>
+      </div>
       <div>
         <h3 id="allConsumptionTable">水电柴油用量</h3>
         <el-table
@@ -379,43 +416,7 @@
       </div> -->
 
 
-      <!-- <div>
-        <h3 id="bioConsumptionTable">燃动用量</h3>
-        <el-table
-          :key="bioConsumptionTable.tableKey"
-          v-loading="bioConsumptionTable.listLoading"
-          element-loading-text="给我一点时间"
-          :data="bioConsumptionTable.list"
-          border
-          fit
-          highlight-current-row
-          style="width: 100%;"
-          :row-style="rowStyle"
-          :cell-style="tableCellStyle"
-          class="elTable"
-          height="350"
-          @sort-change="tableSort8"
-        >
-          <el-table-column label="设备指标" align="center">
-            <el-table-column label="序号" align="center" type="index" width="50px" />
-            <el-table-column label="牧场" min-width="70px" align="center">
-              <template slot-scope="{row}">
-                <a @click="clickBioConsumption(row)">{{ row.pastureName }}</a>
-              </template>
-            </el-table-column>
-          </el-table-column>
-          <el-table-column label="总指标" align="center">
-            <el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
-            <el-table-column label="迄今预算" sortable min-width="80px" align="center" prop="qmonthBudget" />
-            <el-table-column label="迄今实际" sortable min-width="80px" align="center" prop="sumPrice" />
-            <el-table-column label="实际节约" sortable min-width="80px" align="center" prop="asave" />
-            <el-table-column label="实际达成率" :sortable="true" :sort-method="(a,b) => sortMethod(a ,b , 'realReason')" min-width="90px" align="center" prop="realReason" />
-          </el-table-column>
-          <el-table-column label="单头牛指标" align="center">
-            <el-table-column label="单头牛迄今实际" sortable min-width="80px" align="center" prop="oneCowSumPrice" />
-          </el-table-column>
-        </el-table>
-      </div> -->
+      
 
 
 
@@ -637,7 +638,7 @@ export default {
     }else{
       this.yearDate = [parseTime(new Date(), '{y}-{m}-{d}'), parseTime(new Date(), '{y}-{m}-{d}')]
     }
-    
+
     this.getWindowWidth()
     this.getPastureDownList()
     this.getlistEquipmentIndex()
@@ -908,6 +909,7 @@ export default {
         setTimeout(() => {
           this.gasCostTable.listLoading = false
           this.get_table_dataallConsumption()
+          this.get_table_dataBioConsumptionTable()
         }, 100)
       })
     },
@@ -1157,7 +1159,7 @@ export default {
 
     clickBioConsumption(row) {
       if (row.pastureName !== '现代牧业') {
-        this.textMap.bioConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '柴油用量'
+        this.textMap.bioConsumption = row.pastureName + this.yearDate[0].substring(0, this.yearDate[0].lastIndexOf('-')) + '-' + this.yearDate[1].substring(0, this.yearDate[1].lastIndexOf('-')) + '燃动费'
         this.dialogStatus = 'bioConsumption'
         this.dialog.dialogFormVisible = true
         this.dialog.getdataListParm.name = 'getChooseMonthOilTDepartment'

+ 1 - 1
src/views/report/inventorySummary/index.vue

@@ -312,7 +312,7 @@ export default {
             const ExcelDatas = [
               {
                 tHeader:['牧场','库存标准','实际库存','差异','出库金额'	,'期初库存'	,'期末库存' ,'库存周转率'],
-                filterVal: ['pastureName', 'standard', 'psCount', 'different', 'ckje', 'earlymonth','endofmonth','rateofturnover'],
+                filterVal: ['pastureName', 'standard', 'psCountje', 'differentje', 'ckje', 'earlymonth','endofmonthje','rateofturnover'],
 
                 // tHeader: ['牧场', '供应商', '备件总数量', '总金额'],
                 // filterVal: ['pastureName', 'providerName', 'psCount', 'psSum'],

+ 5 - 5
src/views/report/queryElec/index.vue

@@ -9,7 +9,7 @@
 
     <el-row v-if="isBarChart1" style="position: relative;">
       <p style="position: absolute;top:-12px;left:40%;color:rgb(130, 165, 252);background:rgb(230, 243, 255);border:1px solid rgb(130, 165, 252);padding:10px;border-radius:10px">
-        {{ year }}年集团用电量:{{ total }}万千瓦
+        {{ year }}年集团用电量:{{ total }}万
       </p>
       <el-col :span="24">
         <div id="barChart1" style="width: 100%;height:400px;" />
@@ -298,7 +298,7 @@ export default {
         color: ['#2dc0e8', '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '4%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data1.pasture, axisLabel: { interval: 0, rotate: 30 }}],
-        yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}万' }}],
+        yAxis: [{ type: 'value', name: '电量()', axisLabel: { formatter: '{value}万' }}],
         series: [
           {
             name: '今年用量',
@@ -349,7 +349,7 @@ export default {
         color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data2.months, name: '月份', axisLabel: { interval: 0, rotate: 30 }}],
-        yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}万' }}],
+        yAxis: [{ type: 'value', name: '电量()', axisLabel: { formatter: '{value}万' }}],
         series: [
           {
             name: '今年用量',
@@ -402,7 +402,7 @@ export default {
         color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '5%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data3.day, name: '日期', axisLabel: { interval: 0 }}],
-        yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}' }}],
+        yAxis: [{ type: 'value', name: '电量()', axisLabel: { formatter: '{value}' }}],
         series: [
           {
             name: '今年日用量',
@@ -490,7 +490,7 @@ export default {
         color: [ '#769cfc', '#FFB800'],
         grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
         xAxis: [{ type: 'category', data: chart_data5.typeName, name: '电表名称', axisLabel: { interval: 0 }}],
-        yAxis: [{ type: 'value', name: '电量(千瓦)', axisLabel: { formatter: '{value}万' }}],
+        yAxis: [{ type: 'value', name: '电量()', axisLabel: { formatter: '{value}万' }}],
         series: [
           {
             name: '用电量',

+ 72 - 7
src/views/special/measure/index.vue

@@ -1,5 +1,9 @@
 <template>
   <div class="app-container">
+    <div v-if="isPercentage" class="percentage" style="width: 210px;height: 90px;background: #fff;position: fixed;bottom: 0;left: 0;z-index: 9999999999999;">
+      <h4 style="padding-left: 10px;line-height: 0;">导出进度:</h4>
+      <el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
+    </div>
     <div class="filter-container">
       <el-select v-model="getdataListParm.parammaps.pastureName" style="width: 140px;" placeholder="牧场" class="filter-item" @change="changePastureName">
         <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
@@ -18,6 +22,7 @@
       <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
       <div>
         <el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit" @click="form_add">新增</el-button>
+        <el-button 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-waves class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
         </el-upload>
@@ -185,13 +190,13 @@
               </el-form-item>
             </el-col>
           </el-row>
-          <!-- <el-row>
+          <el-row>
             <el-col :span="8">
               <el-form-item label="iot编号:" prop="iotNumber">
                 <el-input ref="iotNumber" v-model="createTemp.iotNumber" type="number" />
               </el-form-item>
             </el-col>
-          </el-row> -->
+          </el-row>
         </el-form>
       </div>
       <div slot="footer" class="dialog-footer">
@@ -274,6 +279,13 @@
                   </el-form-item>
                 </el-col>
               </el-row>
+              <el-row>
+                <el-col :span="8">
+                  <el-form-item label="iot编号:" prop="iotNumber">
+                    <el-input ref="iotNumber" v-model="seeTemp.iotNumber" disabled />
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </el-form>
           </el-tab-pane>
           <el-tab-pane label="用量记录" name="second">
@@ -402,7 +414,10 @@ export default {
         parammaps: {
           pastureName: Cookies.get('pasturename'),
           departName: '',
-          formNunber: ''
+          formNunber: '',
+          formName: '',
+          formType: '',
+          useType: ''
         }
       },
       createTemp: {
@@ -433,7 +448,9 @@ export default {
         pagecount: 10,
         returntype: 'Map',
         parammaps: {}
-      }
+      },
+      isPercentage: false,
+      percentage: 1,
     }
   },
   computed: {
@@ -447,7 +464,7 @@ export default {
     uploadData() {
       return {
         name: 'importMeasureNew',
-        importParams: '牧场,表名称,表编号,表结构,表类型,部门,位置,最后一次抄表值,单价,管理人,倍率',
+        importParams: '牧场,表名称,表编号,表结构,表类型,部门,位置,最后一次抄表值,单价,管理人,倍率,iot编号',
         sheetname: 'SheetJS'
       }
     },
@@ -739,10 +756,10 @@ export default {
            import('@/vendor/Export2Excel').then(excel => {
              const list1 = res.data.result
              const tHeader = [
-               '牧场', '表名称', '表编号', '表结构', '表类型', '部门', '位置', '最后一次抄表值', '单价', '管理人', '倍率', '错误信息'
+               '牧场', '表名称', '表编号', '表结构', '表类型', '部门', '位置', '最后一次抄表值', '单价', '管理人', '倍率','iot编号', '错误信息'
              ]
              const filterVal = [
-               '牧场', '表名称', '表编号', '表结构', '表类型', '部门', '位置', '最后一次抄表值', '单价', '管理人', '倍率', 'error_msg'
+               '牧场', '表名称', '表编号', '表结构', '表类型', '部门', '位置', '最后一次抄表值', '单价', '管理人', '倍率', 'iot编号','error_msg'
              ]
              const data1 = this.formatJson(filterVal, list1)
              excel.export_json_to_excel({
@@ -774,6 +791,54 @@ export default {
           }
         })
       )
+    },
+    handleDownloadTemp(){
+      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.name = 'getMeasureList'
+      this.requestParam.parammaps = this.getdataListParm.parammaps
+      GetDataByName(this.requestParam).then(response => {
+        this.$nextTick(() => {
+          import('@/vendor/Export2Excel').then(excel => {
+            // let day = parseTime(new Date(), '{y}-{m}-{d}')
+            // for(let i=0;i<response.data.list.length;i++){
+            //   this.$set(response.data.list[i], 'i', i+1)
+            //   this.$set(response.data.list[i], 'day', day)
+            //   this.$set(response.data.list[i], 'name', Cookies.get('employename'))
+            // }
+            const list1 = response.data.list
+            if (response.data.list !== '') {
+              this.percentage = 99
+              setTimeout(() => {
+                this.isPercentage = false
+              }, 2000)
+            }
+            const tHeader = [
+              '牧场','表名称','表编号','表结构','表类型','部门','位置','最后一次抄表值','单价','管理人','倍率','iot编号'
+            ]
+            const filterVal = [
+              'pastureName', 'formName', 'formNumber', 'useType', 'formType', 'departName', 'location', 'endAmount', 'price','employeName','Multiple','iotNumber'
+            ]
+            const data1 = this.formatJson(filterVal, list1)
+            excel.export_json_to_excel({
+              header: tHeader,
+              data: data1,
+              filename: '计量设备管理',
+              autoWidth: true,
+              bookType: 'xlsx'
+            })
+          })
+        })
+      })
     }
   }
 }

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác