@@ -5,11 +5,10 @@ ENV = 'development'
# VUE_APP_BASE_API = '/dev-api'
# 线上正式地址
# VUE_APP_BASE_API = 'http://eam.modernfarming.cn:8000/'
-# 白少后台本地
+# 白少后台本地
# VUE_APP_BASE_API = 'http://192.168.1.77: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/'
@@ -92,7 +92,7 @@ export function SapTrans(data) {
method: 'post',
data
})
-}
+}
export function SapQuit(data) {
return request({
@@ -100,7 +100,7 @@ export function SapQuit(data) {
export function SapRef(data) {
@@ -108,7 +108,7 @@ export function SapRef(data) {
export function SapUse(data) {
@@ -116,7 +116,7 @@ export function SapUse(data) {
export function SapLaid(data) {
@@ -125,7 +125,7 @@ export function SapLaid(data) {
export function SapOrder(data) {
@@ -134,7 +134,7 @@ export function SapOrder(data) {
export function SrmOrder(data) {
@@ -193,7 +193,7 @@ export function removeimage(data) {
}
export function getJson(url,data) {
- url: process.env.VUE_APP_BASE_API + url + data,
+ url: url + data,
method: 'get'
@@ -336,4 +336,4 @@ export function getMonthFinalDay(year,month){
day = new Date(new Date(year,month).setDate(0)).getDate();
return year+"-"+month+"-"+day;
@@ -19,7 +19,7 @@ export function getInfo() { // token
export function logout() {
- url: '/authdata/logout',
- method: 'post'
+ url: '/api/v1/logout',
+ method: 'get'
@@ -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`) // 跳转到主页
+ console.log("注销了")
// this.$router.push(`/login?redirect=${this.$route.fullPath}`) //跳转到登陆前页面
},
@@ -3,9 +3,11 @@ import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
-import { getToken } from '@/utils/auth' // get token from cookie
+import { getToken,removeToken } from '@/utils/auth' // get token from cookie
+import Cookies from 'js-cookie'
import getPageTitle from '@/utils/get-page-title'
-
+// 1为单点登录,其他不是
+Cookies.set('sso',1)
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login'] // no redirect whitelist
@@ -20,6 +22,7 @@ router.beforeEach(async(to, from, next) => {
// determine whether the user has logged in
const hasToken = getToken()
+ console.log('hasToken==>',hasToken)
if (hasToken) {
if (to.path === '/login') {
// if is logged in, redirect to the home page
@@ -40,7 +43,7 @@ router.beforeEach(async(to, from, next) => {
// generate accessible routes map based on roles
const accessRoutes = await store.dispatch('permission/generateRoutes', roles)
+ console.log(accessRoutes,'accessRoutes')
// dynamically add accessible routes
router.addRoutes(accessRoutes)
@@ -53,6 +56,7 @@ router.beforeEach(async(to, from, next) => {
await store.dispatch('user/resetToken')
Message.error(error || 'Has Error')
// next(`/login?redirect=${to.path}`) //跳转到退出前界面
+ removeToken()
next(`/login`)
NProgress.done()
@@ -71,6 +75,20 @@ router.beforeEach(async(to, from, next) => {
next({ path: '/login' })
+ if(Cookies.get('sso') == 1){
+ // 单点登录
+ // 构建要跳转的URL
+ var url = process.env.VUE_APP_BASE_API
+ console.log(url,'url')
+ //获取当前url
+ if(url.indexOf('/')==0 && url.length==1){
+ url= window.location.protocol + "//"+window.location.host+url
+ }
+ const externalURL = "https://id.xiandaimuye.com/api/v1/oauth2/authorize?response_type=code&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I&redirect_uri="+url+'api/v1/oauth2/token';
+ // 使用 $router.push 进行页面跳转
+ // 注意: 这里的跳转是在当前窗口进行的,如果需要在新标签页打开,可以使用 window.open(externalURL)
+ window.open(externalURL, "_self");
@@ -99,21 +99,49 @@ const actions = {
const { username, password } = userInfo
return new Promise((resolve, reject) => {
login({ username: username.trim(), password: password }).then(response => {
- const { data, msg } = response
- if (msg !== 'ok') {
- Message({
- message: data,
- type: 'error',
- duration: 5 * 1000
- })
- reject(data)
- }
- commit('SET_TOKEN', data.token)
- if (Cookies == null) {
- console.log(1)
+ // 单点登录=============================
+ const fullURL = window.location.href;
+ // 使用正则表达式提取code参数的值
+ const codeMatch = fullURL.match(/[\?&]access=([^&]+)/);
+ console.log('codeMatch===>',codeMatch)
+ if (codeMatch) {
+ // 如果匹配成功,将code的值存储在组件的data中
+ var code = codeMatch[1];
+ //TODO 保存token
+ // 去除后面的#/login
+ if ( code && code.includes("#/login")) {
+ code = code.replace("#/login", "");
+ //base64解密this.cose
+ console.log('解密token',atob(code))
+ let token = atob(code)
+ commit('SET_TOKEN', token)
+ setToken(token)
+ resolve()
+ let url = window.location.href;
+ // 使用split方法将URL拆分为数组
+ let jmpurl = url.split('?')[0]+'#/dashboard'
+ window.open(jmpurl, "_self");
+ // =============================
+ }else{
+ const { data, msg } = response
+ if (msg !== 'ok') {
+ Message({
+ message: data,
+ type: 'error',
+ duration: 5 * 1000
+ })
+ reject(data)
+ commit('SET_TOKEN', data.token)
+ if (Cookies == null) {
+ console.log(1)
+ setToken(data.token)
- setToken(data.token)
- resolve()
}).catch(error => {
reject(error)
@@ -134,7 +162,33 @@ const actions = {
// roles must be a non-empty array
if (!role || role.length <= 0) {
- reject('getInfo: roles must be a non-null array!')
+ reject('该用户未分配角色!')
+ console.log('no=============')
+ setTimeout(()=>{
+ commit('SET_BUTTONS', [])
+ // console.log('-------------', state)
+ commit('SET_TOKEN', '')
+ commit('SET_ROLES', [])
+ Cookies.remove('employename')
+ Cookies.remove('employeid')
+ Cookies.remove('pastureid')
+ resetRouter()
+
+ const externalURL = "https://id.xiandaimuye.com/api/v1/logout?redirect_url="+url+ '&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I';
+ },2000)
GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': username }}).then(response => {
@@ -222,7 +276,33 @@ const actions = {
removeToken()
resetRouter()
resolve()
- location.reload()
+ const externalURL = "https://id.xiandaimuye.com/api/v1/logout?redirect_url=" + url + '&client_id=fTBm64I4k3kqHYtoFTUpvirCDxxCfx7I';
+ // location.reload()
+ location.reload()
@@ -7,6 +7,7 @@ export function getToken() {
export function setToken(token) {
+ // console.log(token,'token')
return Cookies.set(TokenKey, token)
@@ -110,13 +110,14 @@ service.interceptors.response.use(
config.__retryCount = config.__retryCount || 0
if (config.__retryCount >= 3) {
// Message({ message:error.message, type: 'error', duration: 5 * 1000 })
+ console.log('err' + error)
Message({ message:'请求超时', type: 'error', duration: 5 * 1000 })
// Message.error((error && error.data && error.data.msg) || '请求超时')
return Promise.reject(error)
config.__retryCount += 1
let backoff = new Promise((resolve) => {
setTimeout(() => {
@@ -0,0 +1,500 @@
+<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.pastureId" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
+ <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
+ </el-select>
+ <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
+ <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
+ <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="monthrange" style="width: 250px;top:-3px;" format="yyyy-MM" value-format="yyyy-MM" range-separator="至" start-placeholder="盘点日期" end-placeholder="盘点日期" />
+ <el-button class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
+ <el-button class="filter-item" type="info" icon="el-icon-tickets" style="" @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 class="filter-item" type="warning" icon="el-icon-upload2">导入</el-button>
+ </el-upload>
+ <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownload">导出</el-button>
+ <el-button class="filter-item" type="primary" icon="el-icon-edit" @click="handleDelete">批量删除</el-button>
+ <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"
+ @selection-change="handleSelectionChange"
+ :max-height="myHeight"
+ >
+ <el-table-column type="selection" width="55" />
+ <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="牧场" align="center" prop="pastureName" />
+ <el-table-column label="部门" align="center" prop="departmentName" />
+ <el-table-column label="资产编号" align="center" prop="assetCode" />
+ <el-table-column label="资产名称" align="center" prop="eqName" />
+ <el-table-column label="设备内部编号" align="center" prop="eqCode" />
+ <el-table-column label="实物入账日期" align="center" prop="rzdate" />
+ <el-table-column label="计量单位" align="center" prop="unit" />
+ <el-table-column label="规格" align="center" prop="specification" />
+ <el-table-column label="资产数量" align="center" prop="quantity" />
+ <el-table-column label="资产原值" sortable align="center" prop="yuanzhi" />
+ <el-table-column label="实际盘点数" sortable align="center" prop="count" />
+ <el-table-column label="盈亏量" sortable align="center" prop="profit" />
+ <el-table-column label="有无标签" sortable align="center" prop="tag" />
+ <el-table-column label="导入日期" sortable align="center" prop="importdate" />
+ <el-table-column label="盘点时间" sortable align="center" prop="inventorydate" />
+ <el-table-column label="盘点人" sortable align="center" prop="checkTakerName" />
+ <el-table-column label="备注" sortable align="center" prop="remark" />
+ <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
+ <template slot-scope="{row}">
+ <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
+ <el-button type="danger" size="mini" @click="form_delete(row)">删除</el-button>
+ </el-table>
+ <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+ <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="80%">
+ <div class="app-change">
+ <el-form ref="seeTemp" :model="see.temp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px" @click.native.prevent @submit.native.prevent>
+ <el-row>
+ <el-col :span="6">
+ <el-form-item label="牧场:" prop="pastureName">
+ <el-input ref="pastureName" v-model="see.temp.pastureName" placeholder="牧场" disabled />
+ </el-form-item>
+ </el-col>
+ <el-form-item label="部门:" prop="departmentName">
+ <el-input ref="departmentName" v-model="see.temp.departmentName" placeholder="部门" disabled />
+ </el-row>
+ <el-form-item label="资产编号:" prop="eqCode">
+ <el-input ref="eqCode" v-model="see.temp.eqCode" placeholder="资产编号" disabled />
+ <el-form-item label="资产名称:" prop="eqName">
+ <el-input ref="eqName" v-model="see.temp.eqName" placeholder="资产名称" disabled />
+ <el-form-item label="设备内部编号:" prop="assetCode">
+ <el-input ref="assetCode" v-model="see.temp.assetCode" placeholder="设备内部编号" disabled />
+ <el-form-item label="实物入账日期:" prop="rzdate">
+ <el-input ref="rzdate" v-model="see.temp.rzdate" placeholder="实物入账日期" disabled />
+ <el-form-item label="计量单位:" prop="unit">
+ <el-input ref="unit" v-model="see.temp.unit" placeholder="计量单位" disabled />
+ <el-form-item label="规格:" prop="specification">
+ <el-input ref="specification" v-model="see.temp.specification" placeholder="规格" disabled />
+ <el-form-item label="资产数量:" prop="quantity">
+ <el-input ref="quantity" v-model="see.temp.quantity" placeholder="资产数量" disabled />
+ <el-form-item label="资产原值:" prop="yuanzhi">
+ <el-input ref="yuanzhi" v-model="see.temp.yuanzhi" placeholder="资产原值" disabled />
+ <el-form-item label="实际盘点数:" prop="count">
+ <el-input ref="count" v-model="see.temp.count" placeholder="实际盘点数" disabled />
+ <el-form-item label="盈亏量:" prop="profit">
+ <el-input ref="profit" v-model="see.temp.profit" placeholder="盈亏量" disabled />
+ <el-form-item label="有无标签:" prop="tag">
+ <el-input ref="tag" v-model="see.temp.tag" placeholder="有无标签" disabled />
+ <el-form-item label="导入日期:" prop="importdate">
+ <el-input ref="importdate" v-model="see.temp.importdate" placeholder="导入日期" disabled />
+ <el-form-item label="盘点时间:" prop="inventorydate">
+ <el-input ref="inventorydate" v-model="see.temp.inventorydate" placeholder="盘点时间" disabled />
+ <el-form-item label="盘点人:" prop="checkTakerName">
+ <el-input ref="checkTakerName" v-model="see.temp.checkTakerName" placeholder="盘点人" disabled />
+ <el-form-item label="备注:" prop="remark">
+ <el-input ref="remark" v-model="see.temp.remark" placeholder="备注" disabled />
+ </el-form>
+ <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
+ <el-button @click="dialogFormVisible = false;">关闭</el-button>
+ </el-dialog>
+</template>
+<script>
+import { GetDataByName, GetDataByNames,checkButtons,postJson,getJson } from '@/api/common'
+import { parseTime, json2excel } from '@/utils/index.js'
+import Pagination from '@/components/Pagination'
+import { MessageBox } from 'element-ui'
+import { getToken } from '@/utils/auth'
+export default {
+ inject: ['reload'],
+ name: 'Assetinventory',
+ components: { Pagination },
+ data() {
+ return {
+ tableKey: 0,
+ list: [],
+ total: 0,
+ listLoading: true,
+ getdataListParm: {
+ name: 'getAssetList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+ parammaps: { pastureId: parseInt(Cookies.get('pastureid')), inputDatetime: '', startTime: '', stopTime: '', departmentId: '' }
+ },
+ isAssetinventorySee: [], isBasicsCard: [], isBasicsUpdate: [], isBasicsDel: [], isBasicsDel2: [], isBasic: [], isBasicSH: [], isBasicExamine: [],
+ requestParams: [
+ { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': "18" }}
+ ],
+ getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
+ findAllPasture: [], findAllDepart: [],
+ selectionList:[],
+ textMap: { see: '查看设备信息' },
+ dialogFormVisible: false,
+ dialogStatus: '',
+ see:{
+ temp:{}
+ isPercentage:false,
+ uploadImageUrl: process.env.VUE_APP_BASE_API + 'authdata/uploaderimage',
+ rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
+ cellStyle: { padding: 0 + 'px' },
+ myHeight:document.documentElement.clientHeight - 85- 150
+ computed: {
+ headers() {
+ // 设置token
+ token: getToken()
+ uploadData() {
+ // importParams: '牧场,部门, 资产编号, 资产名称, 设备内部编号, 实物入账日期, 计量单位, 规格, 资产数量, 资产原值, 实际盘点数, 盈亏量, 有无标签, 备注',
+ // sheetname: 'SheetJS'
+ // 设置上传地址
+ uploadExcelUrl() {
+ // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
+ return process.env.VUE_APP_BASE_API + 'authdata/stock/import'
+ created() {
+ // this.get_buttons()
+ this.get_table_data()
+ methods: {
+ // get_buttons() {
+ // // 新增
+ // const AssetinventorySee = 'asset:assetinventory:see'
+ // const isAssetinventorySee = checkButtons(this.$store.state.user.buttons, AssetinventorySee)
+ // this.isAssetinventorySee = isAssetinventorySee
+ // },
+ get_select_list() {
+ GetDataByNames(this.requestParams).then(response => {
+ if (response.data.list !== null) {
+ this.findAllPasture = response.data.findAllPasture.list
+ this.getDepartDownList()
+ getDepartDownList() {
+ GetDataByName(this.getDepartParam).then(response => {
+ this.findAllDepart = response.data.list
+ get_table_data() {
+ this.listLoading = true
+ if (this.getdataListParm.parammaps.inputDatetime == null || this.getdataListParm.parammaps.inputDatetime == []) {
+ this.getdataListParm.parammaps.inputDatetime = ''
+ this.getdataListParm.parammaps.startTime = ''
+ this.getdataListParm.parammaps.stopTime = ''
+ } else {
+ this.getdataListParm.parammaps.startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0],'{y}-{m}')+'-01'
+ this.getdataListParm.parammaps.stopTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1],'{y}-{m}')+ '-31'
+ // if( this.getdataListParm.parammaps.startTime == undefined){ this.getdataListParm.parammaps.startTime = ''}
+ // if( this.getdataListParm.parammaps.stopTime == undefined){ this.getdataListParm.parammaps.stopTime = ''}
+ if( this.getdataListParm.parammaps.departmentId == undefined){ this.getdataListParm.parammaps.departmentId = ''}
+ let url ='/authdata/stock/list?'
+ let data = 'offset=' + this.getdataListParm.offset
+ + '&pagecount=' + this.getdataListParm.pagecount
+ + '&pastureId=' + this.getdataListParm.parammaps.pastureId
+ + '&departmentId=' + this.getdataListParm.parammaps.departmentId
+ + '&startdate=' + this.getdataListParm.parammaps.startTime
+ + '&enddate=' + this.getdataListParm.parammaps.stopTime
+ getJson(url,data).then(response => {
+ console.log('table数据', response.data.list)
+ this.list = response.data.list
+ this.pageNum = 1
+ this.pageSize = response.data.pagecount
+ this.list = []
+ this.total = response.data.count
+ setTimeout(() => {
+ this.listLoading = false
+ }, 100)
+ this.get_select_list()
+ changePastureName(item) {
+ this.getDepartParam.parammaps.pastureId = this.getdataListParm.parammaps.pastureId
+ this.getdataListParm.parammaps.departmentId = ''
+ handleSelectionChange(item) {
+ this.selectionList = item
+ form_search() {
+ if (this.getdataListParm.parammaps.inputDatetime == null) {
+ this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
+ this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
+ this.getdataListParm.offset = 1
+ form_see(row){
+ this.see.temp = Object.assign({}, row) // copy obj
+ this.dialogStatus = 'see'
+ this.dialogFormVisible = true
+ form_delete(row){
+ MessageBox.confirm('确认删除此信息?', {
+ confirmButtonText: '确认',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ let url = 'authdata/stock/del'
+ let data = {
+ id:[row.id]
+ postJson(url,data).then(response => {
+ if (response.msg !== 'fail') {
+ this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
+ this.$notify({ title: '失败', message: response.data, type: 'warning', duration: 2000 })
+ handleDelete(){
+ if(this.selectionList.length == 0){
+ this.$message({ type: 'error', message: '请选择要删除的信息!', duration: 2000 })
+ return false
+ let array = []
+ this.selectionList.forEach((item)=>{
+ array.push(item.id)
+ let str = '确认删除选择的'+ array.length+ '条信息?'
+ MessageBox.confirm(str, {
+ id:array
+ handleDownloadTemp(){
+ const elecExcelDatas = [
+ {
+ tHeader: ['序号','牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签', '备注' ],
+ filterVal: ['','','', '', '', '', '', '', '', '', '', '', '', '', ''],
+ tableDatas: [],
+ sheetName: '资产盘点模板'
+ ]
+ json2excel(elecExcelDatas, '资产盘点模板', true, 'xlsx')
+ handleDownload() {
+ this.$alert('设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+ this.isPercentage = true
+ this.percentage = 1
+ var timer = setInterval(() => {
+ this.percentage += 5
+ if (this.percentage > 95) {
+ this.percentage = 99
+ clearInterval(timer)
+ this.percentage = this.percentage
+ }, 1000)
+ + '&pagecount='+9999999
+ var downLoadList = response.data.list
+ if (response.data.list !== '') {
+ this.isPercentage = false
+ }, 2000)
+ tHeader: ['牧场','部门', '资产编号', '资产名称', '设备内部编号', '实物入账日期', '计量单位', '规格', '资产数量', '资产原值', '实际盘点数', '盈亏量', '有无标签','导入日期','盘点日期','盘点人', '备注'],
+ filterVal: ['pastureName','departmentName', 'eqCode', 'eqName', 'assetCode', 'rzdate', 'unit', 'specification', 'quantity', 'yuanzhi', 'count', 'profit', 'tag', 'importdate', 'inventorydate', 'checkTakerName', 'remark'],
+ tableDatas: downLoadList,
+ sheetName: '资产盘点'
+ json2excel(elecExcelDatas, '资产盘点', true, 'xlsx')
+ // 导入
+ beforeImportExcel(file) {
+ const isLt2M = file.size / 1024 / 1024 < 10
+ if (!isLt2M) {
+ this.$message.error('上传文件大小不能超过 10MB!')
+ return isLt2M
+ handleImportExcelSuccess(res, file) {
+ 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'
+ 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])
+ return v[j]
+ )
+ formatJsonTemp(filterVal, jsonData) {
+ if (j === 'timestamp') { return parseTime(v[j]) } else { return v[j] } })
+</script>
+<style lang="scss" scoped>
+ .el-autocomplete-suggestion li{
+ padding:0 3px!important;
+ .el-table .warning-row {
+ background: oldlace;
+ .el-table .success-row {
+ background: #f0f9eb;
+</style>
@@ -83,7 +83,29 @@
</el-table-column>
<el-table-column label="牧场" align="center" prop="pastureName" />
<el-table-column label="设备类别" align="center" prop="eqClassName" />
- <el-table-column label="设备名称" align="center" prop="eqName" />
+ <el-table-column align="center" prop="eqName" width="120">
+ <template slot="header" slot-scope="scope">
+ <div>
+ 设备名称
+ <!-- <el-popover placement="top" width="200" trigger="click">
+ <p>多行信息多行信息多行信息<br/>第二行信息</p>
+ <i class="el-icon-question" slot="reference"></i>
+ </el-popover> -->
+ <!-- <el-tooltip placement="top" trigger="click">
+ <div slot="content">多行信息多行信息多行信息<br/>第二 行信息</div>
+ <i class="el-icon-question"></i>
+ </el-tooltip> -->
+ <div v-if="row.exceed == 1">
+ <div style="background:#EC808D;display:block;line-height: 50px;">{{ row.eqName }}</div>
+ <div v-else>
+ <div style="display:block;line-height: 50px;">{{ row.eqName }}</div>
<el-table-column label="设备内部编号" align="center" prop="eqCode" />
<el-table-column label="财务编号" align="center" prop="financeCode" />
<el-table-column label="规格" align="center" prop="specification" />
@@ -118,6 +140,7 @@
<el-table-column label="折旧年限" sortable align="center" prop="depreciation" />
<el-table-column label="使用时长(年)" sortable align="center" prop="serviceDuration" />
<el-table-column label="使用率(%)" sortable align="center" prop="utilizationRate" />
+ <el-table-column label="物联网编码" sortable align="center" prop="license" />
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="{row}">
@@ -1,2797 +0,0 @@
-<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>
- <el-tabs v-model="tabName" @tab-click="handleTabClick">
- <el-tab-pane v-if="isBasic" label="设备基础信息" name="first">
- <div class="filter-container">
- <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;" @change="changePastureName">
- <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
- </el-select>
- <tree-select
- v-model="getdataListParm.parammaps.eqClassId"
- :height="150"
- :width="250"
- class="typeSelect"
- size="small"
- :data="parentClass"
- :default-props="defaultProps"
- :node-key="nodeKey"
- clearable
- :disabled="disabled"
- :placeholder="placeholder"
- :checked-keys="defaultCheckedKeys"
- style="display: inline-block;"
- @popoverHide="popoverHide"
- />
- <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 120px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 150px;" class="filter-item" />
- <!-- <el-input v-model="getdataListParm.parammaps.financeCode" placeholder="财务编号" clearable style="width: 120px;" class="filter-item" /> -->
- <el-select v-model="getdataListParm.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
- <el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.id" />
- <el-select v-model="getdataListParm.parammaps.status" clearable placeholder="状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in getDictByName" :key="item.id" :label="item.label" :value="item.id" />
- <el-select v-model="getdataListParm.parammaps.warning" clearable placeholder="折旧预警" class="filter-item" style="width: 120px;">
- <el-option v-for="item in depreciationAlertList" :key="item.id" :label="item.name" :value="item.id" />
- <el-date-picker ref="inputDatetime1" v-model="getdataListParm.parammaps.inputDatetime1" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="审批日期" end-placeholder="审批日期" />
- <el-date-picker ref="inputDatetime2" v-model="getdataListParm.parammaps.inputDatetime2" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="购置日期" end-placeholder="购置日期" />
- <el-date-picker ref="inputDatetime3" v-model="getdataListParm.parammaps.inputDatetime3" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="报废日期" end-placeholder="报废日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
- <div>
- <el-button v-if="isBasicsAdd" class="filter-item" 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>
- <el-button class="filter-item" type="primary" icon="el-icon-edit" @click="handleBatchChange">批量变更</el-button>
- <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"
- @selection-change="handleSelectionChange"
- @sort-change="tableSort2"
- :max-height="myHeight"
- >
- <el-table-column type="selection" width="55" />
- <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="牧场" align="center" prop="pastureName" />
- <el-table-column label="设备类别" align="center" prop="eqClassName" />
- <el-table-column label="设备内部编号" align="center" prop="eqCode" />
- <!-- <el-table-column label="财务编号" align="center" prop="financeCode" /> -->
- <el-table-column label="规格" align="center" prop="specification" />
- <el-table-column label="品牌" align="center" prop="brandName" />
- <el-table-column label="状态" align="center" prop="status">
- <template slot-scope="{row}">
- <div v-if="row.status == '正常'">
- <div v-if="row.warning == 1" style="background:#EC808D;display:block;line-height: 50px;">{{ row.status }}</div>
- <div v-else-if="row.warning == 2" style="background:#FACD91;display:block;line-height: 50px;">{{ row.status }}</div>
- <div v-else>{{ row.status }}</div>
- <div v-else>
- <div style="background:#D7D7D7;display:block;line-height: 50px;">{{ row.status }}</div>
- <el-table-column label="部门" align="center" prop="deptName" />
- <el-table-column label="责任人" align="center" prop="employeName" />
- <el-table-column label="审批日期" sortable align="center" prop="spDate" />
- <el-table-column label="购置日期" sortable align="center" prop="purchaseDate" />
- <el-table-column label="入场日期" sortable align="center" prop="entranceDate" />
- <el-table-column label="报废日期" sortable align="center" prop="bfDate" />
- <el-table-column label="设备图片" prop="picpath" align="center" min-width="110px">
- <el-popover placement="right" title="" trigger="hover">
- <img v-if="scope.row.picpath !== '' && scope.row.srcpath !== ''" :src="scope.row.picpath">
- <img v-if="scope.row.picpath !== '' && scope.row.srcpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
- </el-popover>
- <el-table-column label="折旧年限" sortable align="center" prop="depreciation" />
- <el-table-column label="使用时长(年)" sortable align="center" prop="serviceDuration" />
- <el-table-column label="使用率(%)" sortable align="center" prop="utilizationRate" />
- <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width" fixed="right">
- <el-button v-if="isBasicsCard" type="primary" size="mini" @click="form_see(row)">查看</el-button>
- <el-button type="success" size="mini" @click="form_edit(row)">编辑</el-button>
- <el-button v-if="isBasicsDel2" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
- <el-button v-else style="display:none" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
- </el-table>
- <pagination v-show="total>=0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
- </el-tab-pane>
- <el-tab-pane v-if="isBasicSH" label="审核设备" name="second">
- <el-select v-model="getdataListParmSH.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 120px;">
- <el-input v-model="getdataListParmSH.parammaps.assetCode" placeholder="资产编号" clearable style="width: 180px;" class="filter-item" />
- <el-input v-model="getdataListParmSH.parammaps.eqName" placeholder="设备名称" clearable style="width: 120px;" class="filter-item" />
- <el-input v-model="getdataListParmSH.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 150px;" class="filter-item" />
- <el-input v-model="getdataListParmSH.parammaps.financeCode" placeholder="财务编码" clearable style="width: 120px;" class="filter-item" />
- <el-select v-model="getdataListParmSH.parammaps.departmentId" clearable placeholder="部门" class="filter-item" style="width: 120px;">
- <el-select v-model="getdataListParmSH.parammaps.status" clearable placeholder="状态" class="filter-item" style="width: 120px;">
- <el-select v-model="getdataListParmSH.parammaps.SHStatus" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in statues" :key="item.id" :label="item.name" :value="item.id" />
- <el-date-picker ref="inputDatetime1" v-model="getdataListParmSH.parammaps.inputDatetime1" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchSH">搜索</el-button>
- <el-button class="filter-item" type="success" icon="el-icon-download" style="" @click="handleDownloadSH">导出</el-button>
- v-loading="listLoadingSH"
- :data="listSH"
- <span>{{ scope.$index + (pageNumSH-1) * pageSizeSH + 1 }}</span>
- <el-table-column label="资产编号" align="center" prop="assetCode" />
- <el-table-column label="财务编号" align="center" prop="financeCode" />
- <el-table-column label="状态" align="center" prop="status" />
- <el-table-column label="录入日期" sortable align="center" prop="lrTime" />
- <el-table-column label="审核状态" min-width="110px" align="center" :formatter="SHStatus" />
- <el-table-column label="设备图片" prop="specifications" align="center" min-width="110px">
- <img v-if="scope.row.picpath !== ''" :src="scope.row.picpath">
- <img v-if="scope.row.picpath !== ''" slot="reference" :src="scope.row.picpath" :alt="scope.row.srcpath" style="height: 100px;width:100px;">
- <el-button v-if="isBasicsUpdate && row.SHStatus == 2" style="display:inline-block" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
- <el-button v-else style="display:none" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
- <el-button v-if="isBasicExamine && row.SHStatus == 0" style="display:inline-block" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
- <el-button v-else style="display:none" type="success" size="mini" @click="handleExamine(row)">审核</el-button>
- <el-button v-if="isBasicsDel && row.SHStatus == 2" style="display:inline-block" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
- <pagination v-show="totalSH>=0" :total="totalSH" :page.sync="getdataListParmSH.offset" :limit.sync="getdataListParmSH.pagecount" @pagination="get_table_dataSH" />
- </el-tabs>
- <!-- 新增 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" :close-on-click-modal="false" width="90%">
- <div class="app-add">
- <el-form ref="createTemp" :rules="rules" :model="createTemp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px">
- <el-row>
- <el-col :span="10">
- <el-form-item label="设备类别:" prop="eqClassId">
- v-model="createTemp.eqClassId"
- :height="200"
- :width="300"
- </el-form-item>
- </el-col>
- </el-row>
- <el-col :span="6">
- <el-form-item label="资产编号:" prop="assetCode">
- <el-input ref="assetCode" v-model="createTemp.assetCode" placeholder="请输入编号" disabled @popoverHide="popoverHide" />
- <el-form-item label="设备名称:" prop="eqName">
- <el-input ref="eqName" v-model="createTemp.eqName" placeholder="请输入设备名称" disabled/>
- <el-form-item label="设备内部编号:" prop="eqCode">
- <el-input ref="eqCode" v-model="createTemp.eqCode" placeholder="请输入设备内部编号" />
- <el-form-item label="财务编号:" prop="financeCode">
- <el-input ref="financeCode" v-model="createTemp.financeCode" placeholder="请输入财务编号" />
- <el-form-item label="设备规格:" prop="specification">
- <el-input ref="specification" v-model="createTemp.specification" placeholder="请输入设备规格" />
- <el-form-item label="品牌:" prop="brandName">
- <el-autocomplete v-model="createTemp.brandName" value-key="brandName" class="inline-input" :fetch-suggestions="brandSearch" placeholder="请输入品牌" style="width:100%;" @select="(value)=> {handleSelectBrand(value)}" />
- <el-form-item label="供应商:" prop="providerId">
- <el-select v-model="createTemp.providerId" filterable placeholder="请选择供应商" style="width:100%">
- <el-option v-for="item in findAllProvider" :key="item.id" clearable :label="item.name" :value="item.id" />
- <el-form-item label="用途:" prop="purpose">
- <el-input ref="purpose" v-model="createTemp.purpose" placeholder="请输入用途" />
- <el-form-item label="状态:" prop="status">
- <el-select v-model="createTemp.status" placeholder="状态" class="filter-item">
- <el-form-item label="购置日期:" prop="purchaseDate">
- <el-date-picker v-model="createTemp.purchaseDate" type="date" placeholder="选择日期" style="width:170px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
- <el-form-item label="入场日期:" prop="entranceDate">
- <el-date-picker v-model="createTemp.entranceDate" type="date" placeholder="选择日期" style="width:170px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
- <el-form-item label="折旧年限:" prop="depreciation">
- <el-input ref="depreciation" v-model="createTemp.depreciation" placeholder="请输入折旧年限" />
- <el-form-item label="原值:" prop="yuanzhi">
- <el-input ref="yuanzhi" v-model="createTemp.yuanzhi" placeholder="请输入原值" />
- <el-form-item label="残值:" prop="salvage">
- <el-input ref="salvage" v-model="createTemp.salvage" placeholder="请输入残值" />
- <el-form-item label="月核减值:" prop="subtractvalue">
- <el-input ref="subtractvalue" v-model="createTemp.subtractvalue" placeholder="请输入月核减值" />
- <el-form-item label="保养级别:" prop="upkeepgrade">
- <el-select ref="upkeepgrade" v-model="createTemp.upkeepgrade" placeholder="保养级别" class="filter-item" @visible-change="upkeepgradeChange" @change="changeUpkeepgrade">
- <el-option v-for="item in upkeepgrades" :key="item.id" :label="item.label" :value="item.id" />
- <el-form-item label="保养费用:" prop="yearUpkeepCost">
- <el-input ref="yearUpkeepCost" v-model="createTemp.yearUpkeepCost" placeholder="请输入近一年保养费用" />
- <el-form-item label="维修费用:" prop="yearMaintainCost">
- <el-input ref="yearMaintainCost" v-model="createTemp.yearMaintainCost" placeholder="请输入近一年维修费用" />
- <el-form-item label="基数(小时):" prop="baseHours">
- <el-input ref="baseHours" v-model="createTemp.baseHours" placeholder="请输入基数" />
- <el-form-item label="牧场:" prop="pastureId">
- <el-select v-model="createTemp.pastureId" placeholder="牧场" class="filter-item" @change="changePasture">
- <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.id" />
- <el-form-item label="部门:" prop="deptId">
- <el-select v-model="createTemp.deptId" :disabled="disabled" placeholder="部门" class="filter-item" style="width: 100%;" @change="changeDepart">
- <el-option v-for="item in createDepartList" :key="item.id" :label="item.name" :value="item.id" />
- <el-form-item label="责任人:" prop="employeName">
- <el-autocomplete v-model="createTemp.employeName" value-key="empname" class="inline-input" :fetch-suggestions="employeSearch" placeholder="请输入责任人" style="width:100%;" @select="handleSelectEmploye">
- <template slot-scope="{ item }">
- <div class="name" style="display: inline;">{{ item.name }}</div>
- </el-autocomplete>
- <el-form-item label="录入人:" prop="inputUser">
- <el-select v-model="createTemp.inputUser" placeholder="录入人" class="filter-item">
- <el-option v-for="item in findAllEmploye" :key="item.id" :label="item.name" :value="item.id" />
- <el-form-item label="录入时间:" prop="inputDatetime">
- <el-date-picker v-model="createTemp.inputDatetime" :picker-options="pickerOptions1" type="date" placeholder="录入时间" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:170px;" />
- <el-form-item label="设备图片:">
- <el-upload
- id="uploadPic"
- ref="upload"
- :limit="1"
- list-type="picture-card"
- :file-list="createTemp.fileList"
- :headers="headers"
- :action="uploadImageUrl"
- :auto-upload="true"
- :on-preview="handlePicPreview"
- :before-remove="beforeRemove"
- :class="{hide:showUpload}"
- :on-change="(file,fileList)=>{ return handlePicChange(file, fileList) }"
- :on-success="(response,file, fileList)=>{ return handlePicSuccess(response,file, fileList) }"
- :on-remove="(file, fileList)=>{ return handlePicRemove(file, fileList) }"
- <i class="el-icon-plus" />
- </el-upload>
- <el-dialog :visible.sync="dialogVisible" append-to-body :width="width">
- <img :src="dialogImageUrl" alt="" @load="onLoad">
- </el-dialog>
- </el-form>
- <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:5px">
- <el-button v-if="dialogStatus==='create'" ref="createb" type="success" :disabled="isokDisable" @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; getdataListParm.parammaps.inputDatetime = ''">取消并关闭</el-button>
- <!-- 查看 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" width="90%">
- <div class="app-contentcard">
- <div style="position: absolute;top:20px;left:150px;font:18px/24px '' ;color:#303133;">
- <span style="margin:0 10px;">设备名称:{{ seeTemp.eqName }}</span>
- <span>内部编号:{{ seeTemp.eqCode }}</span>
- <div class="card">
- <el-tabs v-model="activeName" @tab-click="form_seeTabClick">
- <el-tab-pane label="基础信息" name="first">
- <el-form ref="seeTemp" :rules="rules" :model="seeTemp" label-position="right" label-width="115px" style="width: 100%;margin-bottom:30px">
- <el-form-item label="设备类别:" prop="eqClassName">
- <el-input ref="eqClassName" v-model="seeTemp.eqClassName" placeholder="请输入设备类别" disabled />
- <el-input ref="assetCode" v-model="seeTemp.assetCode" placeholder="请输入资产编号" disabled />
- <el-input ref="eqName" v-model="seeTemp.eqName" placeholder="请输入设备名称" disabled />
- <el-input ref="eqCode" v-model="seeTemp.eqCode" placeholder="请输入设备内部编号" disabled />
- <el-input ref="financeCode" v-model="seeTemp.financeCode" placeholder="请输入财务编号" disabled />
- <el-input ref="specification" v-model="seeTemp.specification" placeholder="请输入设备规格" disabled />
- <el-input ref="brandName" v-model="seeTemp.brandName" placeholder="请输入品牌" disabled />
- <el-form-item label="供应商:" prop="providerName">
- <el-input ref="providerName" v-model="seeTemp.providerName" placeholder="请输入供应商" disabled />
- <el-input ref="purpose" v-model="seeTemp.purpose" placeholder="请输入用途" disabled />
- <el-input ref="status" v-model="seeTemp.status" placeholder="请输入状态" disabled />
- <el-input ref="purchaseDate" v-model="seeTemp.purchaseDate" placeholder="请输入购置日期" disabled />
- <el-input ref="entranceDate" v-model="seeTemp.entranceDate" placeholder="请输入入场日期" disabled />
- <el-input ref="depreciation" v-model="seeTemp.depreciation" placeholder="请输入折旧年限" disabled />
- <el-input ref="yuanzhi" v-model="seeTemp.yuanzhi" placeholder="请输入原值" disabled />
- <el-input ref="salvage" v-model="seeTemp.salvage" placeholder="请输入残值" disabled />
- <el-input ref="subtractvalue" v-model="seeTemp.subtractvalue" placeholder="请输入月核减值" disabled />
- <el-input ref="upkeepgrade" v-model="seeTemp.upkeepgrade" placeholder="请输入保养级别" disabled />
- <el-input ref="yearUpkeepCost" v-model="seeTemp.yearUpkeepCost" placeholder="请输入近一年保养费用" disabled />
- <el-input ref="yearMaintainCost" v-model="seeTemp.yearMaintainCost" placeholder="请输入近一年维修费用" disabled />
- <el-input ref="baseHours" v-model="seeTemp.baseHours" placeholder="请输入基数" disabled />
- <el-form-item label="牧场:" prop="pastureName">
- <el-input ref="pastureName" v-model="seeTemp.pastureName" placeholder="请输入牧场" disabled />
- <el-form-item label="部门:" prop="deptName">
- <el-input ref="deptName" v-model="seeTemp.deptName" placeholder="请输入部门" disabled />
- <el-input ref="employeName" v-model="seeTemp.employeName" placeholder="请输入责任人" disabled />
- <el-form-item label="录入人:" prop="inputUserName">
- <el-input ref="inputUserName" v-model="seeTemp.inputUserName" placeholder="请输入录入人" disabled />
- <el-input ref="inputDatetime" v-model="seeTemp.inputDatetime" placeholder="请输入录入时间" disabled />
- <el-col>
- <img v-if="seeTemp.picpath !== '' && seeTemp.srcpath !== ''" :src="seeTemp.picpath">
- <img v-if="seeTemp.picpath !== '' && seeTemp.srcpath !== ''" slot="reference" :src="seeTemp.picpath" :alt="seeTemp.srcpath" style="height: 100px;width:100px;">
- <div v-if="isFlowChart">
- <el-form-item label="流程进度" />
- <el-steps :active="active" align-center finish-status="success">
- <el-step
- v-for="(item,index) in activeList"
- :key="index"
- :title="item.title"
- :status="item.status"
- <template slot="description">
- <div class="step-row">
- <div>{{ item.name }} {{ item.date }}</div>
- <div>{{ item.reason }}</div>
- </el-step>
- </el-steps>
- <el-form-item label="操作:">
- <el-button v-if="isBasicExamine && seeTemp.SHStatus == 0" type="success" style="display:inline-block" @click="handleExamine()">审核</el-button>
- <el-button v-else type="success" style="display:none" @click="handleExamine()">审核</el-button>
- <el-tab-pane v-if="isDisplayRecord" label="点检记录" name="second">
- <el-date-picker ref="inputDatetimeCheck1" v-model="getAssetBigSpotCheckListParm.parammaps.inputDatetimeSpotCheck1" class="inputDatetime" type="datetimerange" style="width: 250px;margin-bottom:10px" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchSportCheck">搜索</el-button>
- v-loading="listLoadingSpotCheck1"
- :data="listSpotCheck1"
- <span>{{ scope.$index + (pageNumSpotCheck1-1) * pageSizeSpotCheck1 + 1 }}</span>
- <el-table-column label="点检结果" sortable prop="inspectionResults" min-width="110px" align="center" />
- <el-table-column label="点检日期" sortable prop="date" min-width="110px" align="center" />
- <el-table-column label="点检人" sortable prop="empname" min-width="110px" align="center" />
- <pagination v-show="total>=0" :total="totalSpotCheck1" :page.sync="getAssetBigSpotCheckListParm.offset" :limit.sync="getAssetBigSpotCheckListParm.pagecount" @pagination="getAssetBigSpotCheckList" />
- <el-tab-pane v-if="isDisplayRecord" label="保养记录" name="third">
- <el-input v-model="getBigupkeepbyeqParm.parammaps.upkeepCode" placeholder="保养单号" style="width: 140px;" class="filter-item" />
- <el-select v-model="getBigupkeepbyeqParm.parammaps.upkeepType" clearable placeholder="保养类型" class="filter-item" style="width: 120px;">
- <el-option v-for="item in maintainTypes" :key="item.id" :label="item.name" :value="item.name" />
- <el-date-picker ref="inputDatetimeUpkeepbyeq" v-model="getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq" class="inputDatetime" type="datetimerange" style="width: 250px;margin-bottom:10px" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchUpkeepbyeq">搜索</el-button>
- v-loading="listLoadingUpkeepbyeq"
- :data="listUpkeepbyeq"
- @sort-change="tableSort"
- <span>{{ scope.$index + (pageNumUpkeepbyeq-1) * pageSizeUpkeepbyeq + 1 }}</span>
- <el-table-column label="保养单号" prop="upkeepCode" min-width="110px" align="center" />
- <el-table-column label="保养日期" sortable prop="plantime" min-width="110px" align="center" />
- <el-table-column label="保养名称" prop="upkeepName" min-width="110px" align="center" />
- <el-table-column label="保养类型" prop="upkeepType" min-width="110px" align="center" />
- <el-table-column label="保养级别" prop="upkeepLevel" min-width="110px" align="center" />
- <el-table-column label="保养人" prop="upkeepPerson" min-width="110px" align="center" />
- <el-table-column label="保养费用" prop="upkeepCost" min-width="110px" align="center" />
- <pagination v-show="total>=0" :total="totalUpkeepbyeq" :page.sync="getBigupkeepbyeqParm.offset" :limit.sync="getBigupkeepbyeqParm.pagecount" @pagination="getBigupkeepbyeqList" />
- <el-tab-pane v-if="isDisplayRecord" label="维修记录" name="fouth">
- <el-input v-model="getAssetMaintainParm.parammaps.repairCode" placeholder="维修单号" style="width: 140px;" class="filter-item" />
- <el-date-picker ref="inputDatetimeAssetMaintain" v-model="getAssetMaintainParm.parammaps.inputDatetimeAssetMaintain" class="inputDatetime" type="datetimerange" style="width: 250px;margin-bottom:10px" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchAssetMaintain">搜索</el-button>
- v-loading="listLoadingAssetMaintain"
- :data="listAssetMaintain"
- <span>{{ scope.$index + (pageNumAssetMaintain-1) * pageSizeAssetMaintain + 1 }}</span>
- <el-table-column label="维修单号" prop="repairCode" min-width="110px" align="center" />
- <el-table-column label="报修人" prop="requestName" min-width="110px" align="center" />
- <el-table-column label="报修时间" sortable prop="requestTime" min-width="110px" align="center" />
- <el-table-column label="维修人" prop="empname" min-width="110px" align="center" />
- <el-table-column label="维修时间" sortable prop="stopTime" min-width="110px" align="center" />
- <el-table-column label="诊断故障" prop="details" min-width="110px" align="center" />
- <el-table-column label="维修费用" sortable prop="maintenanceCost" min-width="110px" align="center" />
- <pagination v-show="total>=0" :total="totalAssetMaintain" :page.sync="getAssetMaintainParm.offset" :limit.sync="getAssetMaintainParm.pagecount" @pagination="getAssetMaintainList" />
- <el-tab-pane v-if="isDisplayRecord" label="启停记录" name="fifth">
- <el-date-picker v-model="getAssetSTTParm.parammaps.startTime" type="date" placeholder="开启日期" style="width:170px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
- <el-date-picker v-model="getAssetSTTParm.parammaps.stopTime" type="date" placeholder="关闭日期" style="width:170px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchAssetSTT">搜索</el-button>
- v-loading="listLoadingAssetSTT"
- :data="listAssetSTT"
- <el-table-column label="序号" align="center" type="index" width="50">
- <span>{{ scope.$index + (pageNumAssetSTT-1) * pageSizeAssetSTT + 1 }}</span>
- <el-table-column label="开启时间" sortable prop="enabledTime" min-width="110px" align="center" />
- <el-table-column label="关闭时间" sortable prop="blockTime" min-width="110px" align="center" />
- <el-table-column label="运行时间(分钟)" sortable prop="runTime" min-width="110px" align="center" />
- <el-table-column label="关闭人" prop="blockName" min-width="110px" align="center" />
- <pagination v-show="total>=0" :total="totalAssetSTT" :page.sync="getAssetSTTParm.offset" :limit.sync="getAssetSTTParm.pagecount" @pagination="getAssetSTTList" />
- <el-tab-pane v-if="isDisplayRecord" label="变更记录" name="sixth">
- <el-select v-model="getAssetChangeParm.parammaps.changeStatue" clearable placeholder="变更状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in changeStates" :key="item.id" :label="item.name" :value="item.id" />
- <el-date-picker ref="inputDatetimeAssetChange" v-model="getAssetChangeParm.parammaps.inputDatetimeAssetChange" class="inputDatetime" type="datetimerange" style="width: 250px;margin-bottom:10px" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchAssetChange">搜索</el-button>
- v-loading="listLoadingAssetChange"
- :data="listAssetChange"
- <span>{{ scope.$index + (pageNumAssetChange-1) * pageSizeAssetChange + 1 }}</span>
- <el-table-column label="变更时间" sortable prop="changeTime" min-width="110px" align="center" />
- <el-table-column label="变更状态" :formatter="changeStatue" prop="blockTime" min-width="110px" align="center" />
- <el-table-column label="变更人" prop="changeName" min-width="110px" align="center" />
- <pagination v-show="total>=0" :total="totalAssetChange" :page.sync="getAssetChangeParm.offset" :limit.sync="getAssetChangeParm.pagecount" @pagination="getAssetChangeList" />
- <el-tab-pane v-if="isDisplayRecord" label="备件领用记录" name="seventh">
- <el-input v-model="getAssetPartApplyParm.parammaps.useCode" placeholder="出库单号" style="width: 140px;" class="filter-item" />
- <el-input v-model="getAssetPartApplyParm.parammaps.partCode" placeholder="备件编号" style="width: 140px;" class="filter-item" />
- <el-input v-model="getAssetPartApplyParm.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
- <el-date-picker ref="inputDatetimeAssetPartApply" v-model="getAssetPartApplyParm.parammaps.inputDatetimeAssetPartApply" class="inputDatetime" type="datetimerange" style="width: 250px;margin-bottom:10px" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchAssetPartApply">搜索</el-button>
- v-loading="listLoadingAssetPartApply"
- :data="listAssetPartApply"
- <span>{{ scope.$index + (pageNumAssetPartApply-1) * pageSizeAssetPartApply + 1 }}</span>
- <el-table-column label="出库单号" prop="useForm" min-width="110px" align="center" />
- <el-table-column label="备件编号" sortable prop="partCode" min-width="110px" align="center" />
- <el-table-column label="备件名称" prop="partName" min-width="110px" align="center" />
- <el-table-column label="备件规格" prop="specification" min-width="110px" align="center" />
- <el-table-column label="备件品牌" prop="brandName" min-width="110px" align="center" />
- <el-table-column label="计量单位" prop="unit" min-width="110px" align="center" />
- <el-table-column label="领用数量" sortable prop="useNumber" min-width="110px" align="center" />
- <el-table-column label="实际出库数量" sortable prop="checkoutNumber" min-width="110px" align="center" />
- <el-table-column label="单价" sortable prop="price" min-width="110px" align="center" />
- <el-table-column label="总价" sortable prop="sumPrice" min-width="110px" align="center" />
- <el-table-column label="领用部门" prop="departmentName" min-width="110px" align="center" />
- <el-table-column label="领用时间" sortable prop="receiveTime" min-width="110px" align="center" />
- <el-table-column label="距离上次时间(天)" sortable prop="dif" min-width="110px" align="center" />
- <pagination v-show="total>=0" :total="totalAssetPartApply" :page.sync="getAssetPartApplyParm.offset" :limit.sync="getAssetPartApplyParm.pagecount" @pagination="getAssetPartApplyList" />
- <el-tab-pane v-if="isDisplayRecord" label="费用统计" name="eighth">
- <el-col :span="12">
- <div v-if="activeName==='eighth'" id="barChart1" style="width: 100%;height:400px;" />
- <div v-if="activeName==='eighth'" id="barChart2" style="width: 100%;height:400px;" />
- <el-dialog :title="textMap[dialogStatus]" append-to-body :visible.sync="dialogFormVisible_ChartSee" :close-on-click-modal="false" width="80%">
- <div class="app-contentSee">
- <el-select v-model="getChartSeeParm.parammaps.useTypeV" placeholder="类型" clearable class="filter-item" style="width: 120px;">
- <el-option v-for="item in useTypes" :key="item.id" :label="item.name" :value="item.name" />
- <el-date-picker ref="inputDatetime2" v-model="getChartSeeParm.parammaps.inputDatetime2" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_searchChartSee">搜索</el-button>
- <el-button class="filter-item" style="margin-left: 10px;" type="success" icon="el-icon-edit" @click="handleDownloadChartSee">导出</el-button>
- v-loading="listLoadingChartSee"
- :data="listChartSee"
- <span>{{ scope.$index + (pageNumChartSee-1) * pageSizeChartSee + 1 }}</span>
- <el-table-column :key="1" label="类型" align="center">
- <span>{{ scope.row.useTypeV }}</span>
- <el-table-column :key="2" label="单号" width="140px" align="center">
- <span>{{ scope.row.RUcode }}</span>
- <el-table-column :key="3" label="领用日期" min-width="80px" align="center">
- <span>{{ scope.row.creatTime }}</span>
- <el-table-column :key="4" label="领用部门" min-width="100px" align="center">
- <span>{{ scope.row.departmentName }}</span>
- <el-table-column :key="5" label="备件编号" min-width="80px" align="center">
- <span>{{ scope.row.partCode }}</span>
- <el-table-column :key="6" label="备件名称" min-width="80px" align="center">
- <span>{{ scope.row.partName }}</span>
- <el-table-column :key="7" label="备件规格" min-width="80px" align="center">
- <span>{{ scope.row.specification }}</span>
- <el-table-column :key="8" label="备件品牌" min-width="100px" align="center">
- <span>{{ scope.row.brandName }}</span>
- <el-table-column :key="9" label="计量单位" min-width="80px" align="center">
- <span>{{ scope.row.unit }}</span>
- <el-table-column :key="10" label="出库数量" min-width="110px" align="center">
- <span>{{ scope.row.checkoutNumber }}</span>
- <el-table-column :key="11" label="退库数量" min-width="100px" align="center">
- <span>{{ scope.row.quitNumber }}</span>
- <el-table-column :key="12" label="单价" min-width="110px" align="center">
- <span>{{ scope.row.price }}</span>
- <el-table-column :key="13" label="总价" min-width="110px" align="center">
- <span>{{ scope.row.sumPrice }}</span>
- <pagination v-show="totalChartSee>=0" :total="totalChartSee" :page.sync="getChartSeeParm.offset" :limit.sync="getChartSeeParm.pagecount" @pagination="getChartSeeList" />
- <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
- <el-button @click="dialogFormVisible_See = false">关闭</el-button>
- <!-- 审核 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_Examine" :close-on-click-modal="false" width="30%">
- <div class="app-examine">
- <h3 style="width: 100%;margin:0 0 0 5%;line-height:50px;">请确认审核结果:</h3>
- <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 50%;margin:0 auto;">
- <el-row style="width:88%;height:150px;margin:0 auto;">
- <el-col :span="20">
- <el-form-item>
- <el-radio-group v-model="examineTemp.SHstatue" @change="changeSHStatue">
- <el-radio :label="1" checked>通过</el-radio>
- <el-radio :label="2">不通过</el-radio>
- </el-radio-group>
- <el-col v-if="statueReason" :span="22">
- <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 3}" placeholder="请输入不通过原因" />
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='examine'?createExamineData():createExamineData()">确认</el-button>
- <el-button @click="dialogFormVisible_Examine = false;">关闭</el-button>
- <!-- 变更 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_change" :close-on-click-modal="false" width="30%">
- <div class="app-change">
- <el-form ref="batchChangeTemp" :rules="rules" :model="batchChange.temp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px" @click.native.prevent @submit.native.prevent>
- <el-col :span="24">
- <el-form-item label="变更部门:" prop="departmentId">
- <el-select v-model="batchChange.temp.departmentId" placeholder="变更部门" class="filter-item" style="width: 100%;" @change="changeBatchDept">
- <el-option v-for="item in batchChange.deptList" :key="item.deptid" :label="item.departmentName" :value="item.deptid" />
- <el-form-item label="变更责任人:" prop="employeeId">
- <el-select v-model="batchChange.temp.employeeId" placeholder="变更责任人" class="filter-item" style="width: 100%;" @change="changeBatchPerson">
- <el-option v-for="item in batchChange.personList" :key="item.id" :label="item.empname" :value="item.id" />
- <el-button type="primary" :disabled="isokDisable" @click="changeData()">保存并关闭</el-button>
- <el-button @click="dialogFormVisible_change = false;">取消并关闭</el-button>
-</template>
-<script>
-import echarts from 'echarts'
-require('echarts/theme/macarons')
-// 引入
-import { GetDataByName, GetDataByNames, PostDataByName, PostDataByNames, getRecuData, checkButtons, ExecDataByConfig, failproccess, GetAccount, GetReportform } from '@/api/common'
-import waves from '@/directive/waves'
-import { parseTime, sortChange, json2excel } from '@/utils/index.js'
-import Pagination from '@/components/Pagination'
-import { MessageBox } from 'element-ui'
-import TreeSelect from '@/components/TreeSelect'
-import Cookies from 'js-cookie'
-import { getToken } from '@/utils/auth'
-export default {
- inject: ['reload'],
- name: 'Basics',
- components: { Pagination, TreeSelect },
- directives: { waves },
- data() {
- return {
- isBasicsAdd: [], isBasicsCard: [], isBasicsUpdate: [], isBasicsDel: [], isBasicsDel2: [], isBasic: [], isBasicSH: [], isBasicExamine: [],
- rules: {
- assetCode: [{ required: true, message: '必填', trigger: 'blur' }],
- eqName: [{ required: true, message: '必填', trigger: 'blur' }],
- eqCode: [{ required: true, message: '必填', trigger: 'blur' }],
- financeCode: [{ required: true, message: '必填', trigger: 'blur' }],
- departmentId: [{ required: true, message: '必填', trigger: 'blur' }],
- employeeId: [{ required: true, message: '必填', trigger: 'blur' }],
- depreciation: [{ type: 'number', required: true, validator: (rule, value, callback) => {
- if (!value) {
- callback(new Error('不能为空'))
- setTimeout(() => {
- const re = /^[0-9]*[1-9][0-9]*$/ // /^[0-9]*[1-9][0-9]*$/
- const rsCheck = re.test(value)
- if (!rsCheck) {
- callback(new Error('请输入正整数'))
- } else {
- callback()
- }, 0)
- }, trigger: 'blur' }]
- },
- findAllBrand: [], findAllProvider: [],
- findAllAssetType: [], findAllPasture: [], findAllDepart: [], findAllEmploye: [],
- getDictByName: [], upkeepgrades: [], createDepartList: [],
- statues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
- depreciationAlertList: [{ id: '0', name: '正常' }, { id: '1', name: '到期预警' }, { id: '2', name: '超期使用' }],
- requestParams: [
- { name: 'findAllBrand', offset: 0, pagecount: 0, params: [] },
- { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
- { name: 'findAlllAssetProvider', 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: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
- { name: 'getDictByName', offset: 0, pagecount: 0, params: ['资产状态'] },
- { name: 'getdictbyname', offset: 0, pagecount: 0, params: ['保养级别'] }
- ],
- getDepartParam: { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
- disabled: false, placeholder: '请选择设备类别',
- nodeKey: 'id',
- defaultCheckedKeys: [],
- parentClass: [],
- defaultProps: { children: 'children', label: 'typeName' },
- getRecuListParm: { name: 'getAssetTypeList', idname: 'id', params: [-1] },
- tableKey: 0,
- list: [],
- total: 0,
- listLoading: true,
- getdataListParm: {
- name: 'getAssetList', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
- parammaps: { eqCode: '', eqName: '', departmentId: '', pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), status: '', inputDatetime1: '', startTime: '', stopTime: '', inputDatetime2: '', startTime2: '', stopTime2: '', inputDatetime3: '', startTime3: '', stopTime3: '', warning: '', eqClassId: '' }
- listSH: [], totalSH: 0, listLoadingSH: true, tabName: '',
- getdataListParmSH: {
- name: 'getAssetListSH', page: 1, offset: 1, pagecount: 10, returntype: 'Map',
- parammaps: { eqCode: '', eqName: '', pastureName: Cookies.get('pasturename'), status: '', inputDatetime1: '', startTime: '', stopTime: '', SHStatus: '' }
- textMap: { update: '编辑', create: '新增', card: '查看设备信息', examine: '审核', change: '批量变更' },
- dialogFormVisible: false,
- dialogStatus: '',
- pickerOptions1: {
- disabledDate(time) {
- return time.getTime() > Date.now()// 当天之前的时间可选
- dialogImageUrl: '', dialogVisible: false,
- fileList: [], showUpload: false,
- headers: { optname: 'insertcustompic', id: 1, token: getToken() },
- uploadImageUrl: process.env.VUE_APP_BASE_API + 'authdata/uploaderimage',
- width: '',
- createTemp: { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), employeId: this.$store.state.user.employeid, inputUser: this.$store.state.user.employeid, deptId: this.$store.state.user.departmentid, departmentName: Cookies.get('departmentname'), pastureId: this.$store.state.user.pastureid, assetCode: '', eqClassName: '', eqClassId: '', eqCode: '', eqName: '', specification: '', providerName: '', brandName: '', financeCode: '', status: '正常', purpose: '', purchaseDate: parseTime(new Date(), '{y}-{m}-{d}'), entranceDate: parseTime(new Date(), '{y}-{m}-{d}'), yearUpkeepCost: '', yearMaintainDost: '', yuanzhi: '', baseHours: '', upkeepgrade: '', salvage: '', subtractvalue: '', yearMaintainCost: '', brandId: '', providerId: '', inputUserName: '', employeName: this.$store.state.user.employename, depreciation: '' },
- requestParam: { name: 'insertAsset', offset: 0, pagecount: 0, parammaps: {}},
- seeTemp: {},
- dialogFormVisible_Examine: false,
- dialogFormVisible_See: false,
- activeName: 'first',
- maintainTypes: [{ id: '0', name: '周保养' }, { id: '1', name: '月保养' }, { id: '2', name: '间隔保养' }],
- changeStates: [{ id: '17', name: '正常' }, { id: '18', name: '闲置' }, { id: '19', name: '报废' }, { id: '20', name: '封存' }],
- getdataEQNumber: { name: 'cerateEQNumber', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: {}},
- dialoFormVisible_Examine: false,
- examineTemp: { SHstatue: 1 },
- statueReason: false,
- activeList: [],
- active: 3,
- isFlowChart: false,
- isDisplayRecord: false,
- buttons: [],
- // 查看-点检记录
- getAssetBigSpotCheckListParm: { name: 'getAssetBigSpotCheck1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeSpotCheck1: '', startTime: '', stopTime: '' }},
- listLoadingSpotCheck1: false,
- listSpotCheck1: [],
- totalSpotCheck1: 0,
- // 查看-保养记录
- getBigupkeepbyeqParm: { name: 'getBigupkeepbyeq', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeUpkeepbyeq: '', startTime: '', stopTime: '', upkeepType: '', upkeepCode: '' }},
- listLoadingUpkeepbyeq: false,
- listUpkeepbyeq: [],
- totalUpkeepbyeq: 0,
- // 查看-维修记录
- getAssetMaintainParm: { name: 'getAssetMaintain1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputDatetimeAssetMaintain: '', startTime: '', stopTime: '', repairCode: '' }},
- listLoadingAssetMaintain: false,
- listAssetMaintain: [],
- totalAssetMaintain: 0,
- // 查看-启停记录
- getAssetSTTParm: { name: 'getAssetSTT1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '' }},
- listLoadingAssetSTT: false,
- listAssetSTT: [],
- totalAssetSTT: 0,
- // 查看-变更记录
- getAssetChangeParm: { name: 'getAssetChange1', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '', changeStatue: '', inputDatetimeAssetChange: '' }},
- listLoadingAssetChange: false,
- listAssetChange: [],
- totalAssetChange: 0,
- // 查看-备件领用记录
- getAssetPartApplyParm: { name: 'getAssetPartApply', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { startTime: '', stopTime: '', inputDatetimeAssetPartApply: '' }},
- listLoadingAssetPartApply: false,
- listAssetPartApply: [],
- totalAssetPartApply: 0,
- downLoadParm: {},
- downLoadList: [],
- requestBrand: {
- name: 'getBrandByPartCode',
- page: 0,
- offset: 0,
- pagecount: 10,
- returntype: 'Map',
- parammaps: {}
- BrandList: [],
- requestEmploye: {
- name: 'findAllEmployeV2',
- parammaps: {
- pastureId: Cookies.get('pastureid')
- employeList: [],
- totaltitle: 0,
- getBarChart1Parm: {
- name: 'getReportEqCostYear',
- barChart1: null,
- chart_data1: {},
- getBarChart2Parm: {
- name: 'getReportEqCostMonth',
- receiveTime: new Date().getFullYear()
- barChart2: null,
- chart_data2: {},
- dialogFormVisible_ChartSee: false,
- getChartSeeParm: {
- name: 'getEqPartuseDetailList',
- receiveTime: '',
- eqId: '',
- useTypeV: '',
- inputDatetime2: '',
- stopTime: '',
- startTime: ''
- listLoadingChartSee: false,
- totalChartSee: 0,
- listChartSee: [],
- pageNum: 0,
- pageSize: 0,
- pageNumSH: 0,
- pageSizeSH: 0,
- useTypes: [{ id: 0, name: '维修' }, { id: 1, name: '保养' }],
- downLoadParm2: {},
- downLoadList2: [],
- isPercentage: false,
- percentage: 1,
- isokDisable: false,
- edit: 0,
- selectionList: [],
- dialogFormVisible_change: false,
- batchChange: {
- temp: { departmentId: '', employeeId: '' },
- getdataListParmDept: { name: 'getAssetAndEmpList', offset: 0, pagecount: 0, parammaps: {}},
- deptList: [],
- getdataListParmPerson: { name: 'getAllEmp', offset: 0, pagecount: 0, parammaps: {}},
- personList: []
- rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
- cellStyle: { padding: 0 + 'px' },
- myHeight:document.documentElement.clientHeight - 85- 250
- created() {
- const that = this
- GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
- that.buttons = response.data.list
- that.get_auto_buttons()
- this.get_table_dataSH()
- this.getDownClassList()
- if (this.$route.query.tabName == undefined) {
- this.tabName = 'first'
- this.tabName = this.$route.query.tabName
- if (this.isBasic === false) {
- this.tabName = 'second'
- if (this.tabName == 'first') {
- this.isDisplayRecord = true
- this.isFlowChart = false
- this.isDisplayRecord = false
- this.isFlowChart = true
- if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'AssetStandardManagement') {
- if (this.$route.query.pastureName !== undefined && this.$route.query.pastureId !== undefined && this.$route.query.departmentId !== undefined) {
- this.getdataListParm.parammaps.pastureName = this.$route.query.pastureName
- this.getdataListParm.parammaps.pastureId = this.$route.query.pastureId
- // console.log(isNaN(this.$route.query.departmentId), '9999')
- this.getdataListParm.parammaps.eqClassId = this.$route.query.eqClassId
- this.getdataListParm.parammaps.eqClassName = this.$route.query.eqClassName
- this.defaultCheckedKeys = [this.getdataListParm.parammaps.eqClassId]
- this.getDepartParam.parammaps.pastureId = this.$route.query.pastureId
- if (isNaN(this.$route.query.departmentId)) {
- this.getdataListParm.parammaps.departmentId = ''
- this.getdataListParm.parammaps.departmentId = parseInt(this.$route.query.departmentId)
- this.getDepartDownList()
- this.$forceUpdate()
- this.getdataListParm.parammaps.pastureName = Cookies.get('pasturename')
- this.getdataListParm.parammaps.pastureId = Cookies.get('pastureid')
- this.get_table_data()
- }, 5000)
- if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'equipmentOverview') {
- if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'equipmentOverview2') {
- if (this.$route.query.pastureName !== undefined && this.$route.query.pastureId !== undefined && this.$route.query.eqClassId !== undefined) {
- this.getdataListParm.parammaps.eqClassId = ''
- // 设备购置报废统计
- if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'PurchaseScrap') {
- if (this.$route.query.project == '新购设备数') {
- this.getdataListParm.parammaps.inputDatetime2 = [parseTime(new Date(), '{y}') + '-01-01', parseTime(new Date(), '{y}') + '-12-31']
- this.getdataListParm.parammaps.inputDatetime3 = [parseTime(new Date(), '{y}') + '-01-01', parseTime(new Date(), '{y}') + '-12-31']
- // Window.addEventListener('keyup', )
- this.keyupSubmit()
- methods: {
- tableSort2(column) {
- sortChange(column, this.list)
- tableSort(column) {
- if (this.activeName == 'third') {
- sortChange(column, this.listUpkeepbyeq)
- } else if (this.activeName == 'fouth') {
- sortChange(column, this.listAssetMaintain)
- } else if (this.activeName == 'seventh') {
- sortChange(column, this.listAssetPartApply)
- get_auto_buttons() {
- // 新增
- const BasicsAdd = 'asset:basics:add'
- const isBasicsAdd = checkButtons(this.$store.state.user.buttons, BasicsAdd)
- this.isBasicsAdd = isBasicsAdd
- // 卡片
- const BasicsCard = 'asset:basics:kapian'
- const isBasicsCard = checkButtons(this.$store.state.user.buttons, BasicsCard)
- this.isBasicsCard = isBasicsCard
- // 编辑
- const BasicsUpdate = 'asset:basics:update'
- const isBasicsUpdate = checkButtons(this.$store.state.user.buttons, BasicsUpdate)
- this.isBasicsUpdate = isBasicsUpdate
- // 删除
- const BasicsDel = 'asset:basics:del'
- const isBasicsDel = checkButtons(this.$store.state.user.buttons, BasicsDel)
- this.isBasicsDel = isBasicsDel
- // 设备基础信息-删除
- const BasicsDel2 = 'asset:basics:del2'
- const isBasicsDel2 = checkButtons(this.$store.state.user.buttons, BasicsDel2)
- this.isBasicsDel2 = isBasicsDel2
- // 设备基础信息
- const Basic = 'asset:basic:basic'
- const isBasic = checkButtons(this.$store.state.user.buttons, Basic)
- this.isBasic = isBasic
- // 设备审核
- const BasicSH = 'asset:basic:shjm'
- const isBasicSH = checkButtons(this.$store.state.user.buttons, BasicSH)
- this.isBasicSH = isBasicSH
- // 审核
- const BasicExamine = 'asset:basic:shenhe'
- const isBasicExamine = checkButtons(this.$store.state.user.buttons, BasicExamine)
- this.isBasicExamine = isBasicExamine
- // 2-2:下拉框
- get_select_list() {
- GetDataByNames(this.requestParams).then(response => {
- if (response.data.list !== null) {
- this.findAllBrand = response.data.findAllBrand.list
- this.findAllProvider = response.data.findAllProvider.list
- this.findAllAssetType = response.data.findAllAssetType.list
- this.findAllPasture = response.data.findAllPasture.list
- this.findAllEmploye = response.data.findAllEmploye.list
- this.getDictByName = response.data.getDictByName.list
- this.upkeepgrades = response.data.getdictbyname.list
- getDepartDownList() {
- GetDataByName(this.getDepartParam).then(response => {
- this.findAllDepart = response.data.list
- changePastureName(item) {
- this.getDepartParam.parammaps.pastureId = this.findAllPasture.find(obj => obj.name == item).id
- getCreateDepartDownList() {
- this.createDepartList = response.data.list
- if (this.edit == 1) {
- if (this.createDepartList.find(obj => obj.id == Cookies.get('departmentid'))) {
- this.createTemp.departmentId = parseInt(Cookies.get('departmentid'))
- this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == Cookies.get('departmentid')).name
- this.createTemp.deptId = parseInt(Cookies.get('departmentid'))
- this.createTemp.departmentId = response.data.list[0].id
- this.createTemp.deptId = response.data.list[0].name
- changePasture(item) {
- this.getDepartParam.parammaps.pastureId = item
- this.edit = 1
- this.getCreateDepartDownList()
- changeDepart(item) {
- this.createTemp.departmentName = this.createDepartList.find(obj => obj.id == item).name
- get_table_data() {
- this.listLoading = true
- if (this.getdataListParm.parammaps.inputDatetime1 == null) {
- this.getdataListParm.parammaps.inputDatetime1 = ''
- this.getdataListParm.parammaps.startTime = ''
- this.getdataListParm.parammaps.stopTime = ''
- this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime1[0]
- this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime1[1]
- if (this.getdataListParm.parammaps.inputDatetime2 == null || this.getdataListParm.parammaps.inputDatetime2 == '') {
- this.getdataListParm.parammaps.inputDatetime2 = ''
- this.getdataListParm.parammaps.startTime2 = ''
- this.getdataListParm.parammaps.stopTime2 = ''
- this.getdataListParm.parammaps.startTime2 = this.getdataListParm.parammaps.inputDatetime2[0]
- this.getdataListParm.parammaps.stopTime2 = this.getdataListParm.parammaps.inputDatetime2[1]
- if (this.getdataListParm.parammaps.inputDatetime3 == null || this.getdataListParm.parammaps.inputDatetime3 == '') {
- this.getdataListParm.parammaps.inputDatetime3 = ''
- this.getdataListParm.parammaps.startTime3 = ''
- this.getdataListParm.parammaps.stopTime3 = ''
- this.getdataListParm.parammaps.startTime3 = this.getdataListParm.parammaps.inputDatetime3[0]
- this.getdataListParm.parammaps.stopTime3 = this.getdataListParm.parammaps.inputDatetime3[1]
- GetDataByName(this.getdataListParm).then(response => {
- console.log('table数据', response.data.list)
- this.list = response.data.list
- for (let i = 0; i < response.data.list.length; i++) {
- if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
- this.list[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
- this.list[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
- this.list[i].srcpath = ''
- this.list[i].picpath = ''
- this.pageNum = response.data.pageNum
- this.pageSize = response.data.pageSize
- this.list = []
- this.total = response.data.total
- this.listLoading = false
- }, 100)
- this.get_select_list()
- get_table_dataSH() {
- this.listLoadingSH = true
- console.log(this.$refs)
- console.log(this.$refs['inputDatetime1'])
- if (this.getdataListParmSH.parammaps.inputDatetime1 == null) {
- this.getdataListParmSH.parammaps.inputDatetime1 = ''
- this.getdataListParmSH.parammaps.startTime = this.getdataListParmSH.parammaps.inputDatetime1[0]
- this.getdataListParmSH.parammaps.stopTime = this.getdataListParmSH.parammaps.inputDatetime1[1]
- GetDataByName(this.getdataListParmSH).then(response => {
- this.listSH = response.data.list
- if (response.data.list[i].srcpath !== null && response.data.list[i].picpath) {
- this.listSH[i].srcpath = process.env.VUE_APP_BASE_API + response.data.list[i].srcpath
- this.listSH[i].picpath = process.env.VUE_APP_BASE_API + response.data.list[i].picpath
- this.listSH[i].srcpath = ''
- this.listSH[i].picpath = ''
- this.pageNumSH = response.data.pageNum
- this.pageSizeSH = response.data.pageSize
- this.listSH = []
- this.totalSH = response.data.total
- this.listLoadingSH = false
- SHStatus: function(cellValue) {
- if (cellValue.SHStatus == 0) {
- return '审核中'
- } else if (cellValue.SHStatus == 1) {
- return '已通过'
- } else if (cellValue.SHStatus == 2) {
- return '未通过'
- } else if (cellValue.SHStatus == 3) {
- return '历史数据'
- form_search() {
- this.getdataListParm.parammaps.pastureId = ''
- if (this.getdataListParm.parammaps.warning !== '') {
- this.getdataListParm.parammaps.d1 = 1
- this.getdataListParm.parammaps.d1 = ''
- console.log(this.getdataListParm.parammaps.inputDatetime2)
- if (this.getdataListParm.parammaps.inputDatetime2 == null) {
- if (this.getdataListParm.parammaps.inputDatetime3 == null) {
- this.getdataListParm.offset = 1
- form_searchSH() {
- this.getdataListParmSH.offset = 1
- handlePicChange(file, fileList) {
- if (fileList.length > 0) {
- this.$nextTick(() => {
- this.showUpload = true
- this.showUpload = false
- console.log(this.createTemp)
- handlePicSuccess(response, file, fileList) {
- if (this.createTemp.picpath === undefined || this.createTemp.picpath === '' || this.createTemp.picpath == -1) {
- this.$set(this.createTemp, 'picpath', response.execresult.LastInsertId)
- handlePicRemove(file, fileList) {
- if (this.dialogStatus === 'create') {
- if (fileList.length < 1) {
- for (const key in this.createTemp) {
- if (this.createTemp[key] === file.response.execresult.LastInsertId) {
- this.$delete(this.createTemp, key)
- const url = file.url
- console.log(url, 'url')
- console.log(this.createTemp[key], 'createTemp[key]')
- if (this.createTemp[key] === url) {
- console.log(key)
- if (key === 'picpath') {
- this.$delete(this.createTemp, 'picpath')
- this.$delete(this.createTemp, 'picId')
- console.log(this.createTemp, '文件列表移除文件时的钩子row')
- handlePicPreview(file) {
- this.dialogImageUrl = file.url
- this.dialogVisible = true
- onLoad(e) {
- const img = e.target
- let width = 0
- if (img.fileSize > 0 || (img.width > 1 && img.height > 1)) {
- width = img.width + 40
- this.width = width + 'px'
- add_dialog_saveAdd() {
- console.log('点击了保存')
- this.isokDisable = true
- this.isokDisable = false
- }, 1000)
- this.$refs['createTemp'].validate(valid => {
- if (valid) {
- for (var i = 0; i < this.listAdd.length; i++) {
- if (this.listAdd[i].score == null) {
- this.$message({ type: 'warning', message: '请检查检查结果是否为空', duration: 2000 })
- return false
- if (this.listAdd[i].pic1 == undefined) {
- this.listAdd[i].pic1 = -1
- if (this.listAdd[i].pic2 == undefined) {
- this.listAdd[i].pic2 = -1
- if (this.listAdd[i].pic3 == undefined) {
- this.listAdd[i].pic3 = -1
- this.postDataPramas.common = { 'returnmap': '0' }
- this.postDataPramas.data = []
- this.postDataPramas.data[0] = { 'name': 'insertBigjudge', 'type': 'e', 'parammaps': {
- pastureId: this.createTemp.pastureId,
- batime: this.createTemp.batime,
- empId: this.createTemp.empId
- }}
- this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
- this.postDataPramas.data[1].children = []
- this.postDataPramas.data[1].children[0] = { 'name': 'insertjudge', 'type': 'e', 'parammaps': {
- bigId: '@insertBigjudge.LastInsertId',
- statue: '@insertSpotList.statue',
- score: '@insertSpotList.score',
- note: '@insertSpotList.note',
- pic1: '@insertSpotList.pic1',
- pic2: '@insertSpotList.pic2',
- pic3: '@insertSpotList.pic3'
- ExecDataByConfig(this.postDataPramas).then(response => {
- console.log('新增保存发送参数', this.postDataPramas)
- if (response.msg === 'fail') {
- this.$notify({ title: '保存失败', message: response.data, type: 'warning', duration: 2000 })
- this.getdataListParm.parammaps.inputDatetime = ''
- this.dialogFormVisibleAdd = false
- this.createTemp.providerName = ''
- this.$notify({ title: '', message: '保存成功', type: 'success', duration: 2000 })
- beforeRemove(file, fileList) {
- console.log(file.response, '删除文件之前的钩子,参数为上传的文件和文件列表')
- return this.$confirm('删除当前图片, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' })
- resetCreateTemp() {
- this.defaultCheckedKeys = []
- this.createTemp.defaultCheckedKeys = []
- this.createTemp.brandId = ''
- this.createTemp.providerId = ''
- this.createTemp.inputDatetime = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTemp.eqClassName = ''
- this.createTemp.eqClassId = ''
- this.createTemp.employeName = Cookies.get('employename')
- this.createTemp.employeId = Cookies.get('employeid')
- this.createTemp.inputUser = Cookies.get('employeid')
- this.createTemp.departmentName = Cookies.get('departmentname')
- this.createTemp.pastureId = parseInt(Cookies.get('pastureid'))
- this.createTemp.eqCode = ''
- this.createTemp.eqName = ''
- this.createTemp.specification = ''
- this.createTemp.financeCode = ''
- this.createTemp.status = '正常'
- this.createTemp.brandName = ''
- this.createTemp.purpose = ''
- this.createTemp.purchaseDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTemp.entranceDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.createTemp.assetCode = ''
- this.createTemp.yearUpkeepCost = ''
- this.createTemp.yearMaintainDost = ''
- this.createTemp.yuanzhi = ''
- this.createTemp.baseHours = ''
- this.createTemp.upkeepgrade = 113
- this.createTemp.salvage = ''
- this.createTemp.subtractvalue = ''
- this.createTemp.yearMaintainCost = ''
- this.createTemp.inputUserName = ''
- this.createTemp.picpath = ''
- this.fileList = []
- this.createTemp.fileList = []
- this.createTemp.depreciation = ''
- form_add() {
- this.resetCreateTemp()
- this.getDepartParam.parammaps.pastureId = this.createTemp.pastureId
- this.dialogStatus = 'create'
- this.dialogFormVisible = true
- this.$refs['createTemp'].clearValidate()
- changeBrand(item) {
- this.createTemp.brandName = this.findAllBrand.find(obj => obj.id === item).name
- changeUpkeepgrade(item) {
- console.log(item)
- upkeepgradeChange(e) {
- if (!e) {
- this.$refs['upkeepgrade'].blur()
- popoverHide(checkedIds, checkedData) {
- console.log(checkedIds, checkedData)
- if (checkedIds !== null) {
- this.getdataEQNumber.parammaps.eqCode = checkedData.typeCode
- if (checkedData.children === undefined) {
- this.createTemp.eqClassId = checkedData.eqClassId
- this.createTemp.eqName = checkedData.NewName
- this.getdataListParm.parammaps.eqClassId = checkedData.eqClassId
- this.getEQNumber()
- this.$message({ type: 'warning', message: '请选择具体设备类型' })
- add_dialog_save() {
- this.requestParam.name = 'insertAsset'
- if (this.createTemp.status == '正常') { this.createTemp.status = 17 }
- if (this.createTemp.providerId == '') { this.createTemp.providerId = 0 }
- if (this.createTemp.brandId == '') { this.createTemp.brandId = 0 }
- if (this.createTemp.yuanzhi == '') { this.createTemp.yuanzhi = 0 }
- if (this.createTemp.salvage == '') { this.createTemp.salvage = 0 }
- if (this.createTemp.subtractvalue == '') { this.createTemp.subtractvalue = 0 }
- if (this.createTemp.yearUpkeepCost == '') { this.createTemp.yearUpkeepCost = 0 }
- if (this.createTemp.yearMaintainCost == '') { this.createTemp.yearMaintainCost = 0 }
- if (this.createTemp.baseHours == '') { this.createTemp.baseHours = 0 }
- // 原值yuanzhi残值salvage月核减值subtractvalue保养费用yearUpkeepCost维修费用yearMaintainCost
- var rulesValue = /^\d+(\.\d{1,3})?$/
- this.requestParam.parammaps = this.createTemp
- this.requestParam.parammaps.picpath = this.createTemp.picpath
- if (this.createTemp.yuanzhi !== '' || this.createTemp.salvage !== '' || this.createTemp.subtractvalue !== '' || this.createTemp.yearUpkeepCost !== '' || this.createTemp.yearMaintainCost !== '') {
- this.requestParam.parammaps.yuanzhi = parseFloat(this.createTemp.yuanzhi)
- if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi))) {
- this.$message({ type: 'error', message: '原值请输入自然数,最多保留三位小数点', duration: 2000 })
- if (!rulesValue.test(parseFloat(this.createTemp.salvage))) {
- this.$message({ type: 'error', message: '残值请输入自然数,最多保留三位小数点', duration: 2000 })
- if (!rulesValue.test(parseFloat(this.createTemp.subtractvalue))) {
- this.$message({ type: 'error', message: '月核减值请输入自然数,最多保留三位小数点', duration: 2000 })
- if (!rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost))) {
- this.$message({ type: 'error', message: '保养费用输入自然数,最多保留三位小数点', duration: 2000 })
- if (!rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))) {
- this.$message({ type: 'error', message: '维修费用请输入自然数,最多保留三位小数点', duration: 2000 })
- PostDataByName(this.requestParam).then(response => {
- console.log('新增保存发送参数', this.requestParam)
- if (response.msg !== 'fail') {
- if (this.getdataListParm.parammaps.inputDatetime1 === null) {
- this.dialogFormVisible = false
- this.$notify({ title: '成功', message: '新增成功', type: 'success', duration: 2000 })
- // this.reload()
- failproccess(response, this.$notify)
- // 继续新增
- add_dialog_save_again() {
- // if (!rulesValue.test(parseFloat(this.createTemp.yuanzhi)) || !rulesValue.test(parseFloat(this.createTemp.salvage)) || !rulesValue.test(parseFloat(this.createTemp.subtractvalue)) || !rulesValue.test(parseFloat(this.createTemp.yearUpkeepCost)) || !rulesValue.test(parseFloat(this.createTemp.yearMaintainCost))) {
- if (this.getdataListParm.parammaps.inputDatetime === null) {
- form_edit(row) {
- if (this.dialogFormVisible) {
- return
- this.edit = 0
- this.getDepartParam.parammaps.pastureId = row.pastureId
- this.createTemp = Object.assign({}, row) // copy obj
- if (row.inputUser !== undefined) {
- this.createTemp.inputUser = parseInt(row.inputUser)
- if (this.createTemp.eqClassId !== undefined) {
- this.defaultCheckedKeys = [this.createTemp.eqClassId]
- this.dialogStatus = 'update'
- const urlArray = []
- const fileList = []
- if (row.picpath == undefined) {
- urlArray.push()
- } else if (row.picpath == '') {
- urlArray.push(row.picpath)
- for (let i = 0; i < urlArray.length; i++) {
- const urlObj = {}
- this.$set(urlObj, 'url', urlArray[i])
- fileList.push(urlObj)
- this.$set(this.createTemp, 'fileList', fileList)
- if (this.createTemp.fileList.length >= 1) {
- edit_dialog_save() {
- console.log('-----------', this.createTemp)
- console.log(this.createTemp.providerId)
- if (this.createTemp.eqClassId == '' || this.createTemp.eqClassId == undefined || this.createTemp.eqClassId == null) {
- this.$message({ type: 'warning', message: '请选择设备类别' })
- this.requestParam.name = 'updateAsset'
- if (this.createTemp.status === '正常') { this.createTemp.status = 17 }
- if (this.createTemp.status === '闲置') { this.createTemp.status = 18 }
- if (this.createTemp.status === '报废') { this.createTemp.status = 19 }
- if (this.createTemp.status === '封存') { this.createTemp.status = 20 }
- if (this.createTemp.providerId === '' || this.createTemp.providerId === undefined) { this.createTemp.providerId = 0 }
- if (this.createTemp.brandId === '' || this.createTemp.brandId == undefined) { this.createTemp.brandId = 0 }
- if (this.createTemp.yuanzhi === '') { this.createTemp.yuanzhi = 0 }
- if (this.createTemp.salvage === '') { this.createTemp.salvage = 0 }
- if (this.createTemp.subtractvalue === '') { this.createTemp.subtractvalue = 0 }
- if (this.createTemp.yearUpkeepCost === '') { this.createTemp.yearUpkeepCost = 0 }
- if (this.createTemp.yearMaintainCost === '') { this.createTemp.yearMaintainCost = 0 }
- if (this.createTemp.baseHours === '') { this.createTemp.baseHours = 0 }
- if (this.createTemp.upkeepgrade === 'A' || this.createTemp.upkeepgrade === 'B' || this.createTemp.upkeepgrade === 'C') {
- this.createTemp.upkeepgrade = this.createTemp.upkeepgradeId
- this.createTemp.upkeepgradeId = ''
- this.createTemp.deptId = this.createTemp.deptId
- this.createTemp.departmentName = this.createTemp.departmentName
- this.createTemp.employeeId = this.createTemp.employeId
- // var rulesValue = /^\d+(\.\d{1,3})?$/
- if (this.tabName === 'first') {
- this.requestParam.parammaps.SHStatus = this.createTemp.SHStatus
- } else if (this.tabName === 'second') {
- this.requestParam.parammaps.SHStatus = 0
- const picpath = parseInt(this.createTemp.picpath)
- if (isNaN(picpath) == false) {
- this.requestParam.parammaps.picpath = this.createTemp.picId
- console.log(response)
- this.$notify({ title: '成功', message: '保存成功-', type: 'success', duration: 2000 })
- brandSearch(queryString, cb) {
- console.log('品牌模糊查询输入值', queryString)
- this.requestBrand.parammaps['brandName'] = queryString
- GetDataByName(this.requestBrand).then(response => {
- console.log('品牌模糊查询搜索data', response.data.list)
- this.BrandList = response.data.list
- cb(this.BrandList)
- handleSelectBrand(item) {
- console.log('品牌模糊查询选中值', item)
- this.$set(this.createTemp, 'brandName', item.brandName)
- this.$set(this.createTemp, 'brandId', item.brandId)
- employeSearch(queryString, cb) {
- console.log('责任人模糊查询输入值', queryString)
- this.requestEmploye.parammaps['empname'] = queryString
- GetDataByName(this.requestEmploye).then(response => {
- console.log('责任人模糊查询搜索data', response.data.list)
- this.employeList = response.data.list
- cb(this.employeList)
- handleSelectEmploye(item) {
- console.log('责任人模糊查询选中值', item)
- this.$set(this.createTemp, 'employeId', item.id)
- this.$set(this.createTemp, 'employeName', item.name)
- form_see(row) {
- console.log(row)
- this.seeTemp = Object.assign({}, row) // copy obj
- this.activeName = 'first'
- this.dialogStatus = 'card'
- this.dialogFormVisible_See = true
- // 流程图
- var reason = '未通过原因:' + this.seeTemp.workflowNote
- if (this.seeTemp.SHStatus === 0) {
- this.activeList = [{ title: '提交信息', date: this.seeTemp.inputDatetime, name: this.seeTemp.inputUserName }, { title: '设备中心审核' }]
- this.active = 1
- } else if (this.seeTemp.SHStatus === 1) {
- this.activeList = [{ title: '提交信息', date: this.seeTemp.inputDatetime, name: this.seeTemp.inputUserName }, { title: '设备中心审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
- this.active = 2
- } else if (this.seeTemp.SHStatus === 2) {
- this.activeList = [{ title: '提交信息', date: this.seeTemp.inputDatetime, name: this.seeTemp.inputUserName }, { title: '设备中心审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
- form_seeTabClick(val) {
- console.log(val)
- if (val.name == 'second') {
- this.getAssetBigSpotCheckList()
- } else if (val.name == 'third') {
- this.getBigupkeepbyeqList()
- } else if (val.name == 'fouth') {
- this.getAssetMaintainList()
- } else if (val.name == 'fifth') {
- this.getAssetSTTList()
- } else if (val.name == 'sixth') {
- this.getAssetChangeList()
- } else if (val.name == 'seventh') {
- this.getAssetPartApplyList()
- } else if (val.name == 'eighth') {
- this.getBarChart1Parm.parammaps.eqId = this.seeTemp.id
- this.getBarChart2Parm.parammaps.eqId = this.seeTemp.id
- this.getChartSeeParm.parammaps.eqId = this.seeTemp.id
- this.getBarChart1()
- this.getBarChart2()
- // 点检记录
- getAssetBigSpotCheckList() {
- this.listLoadingSpotCheck1 = true
- if (this.$refs['inputDatetimeCheck1'] !== undefined && this.$refs['inputDatetimeCheck1'].value !== null) {
- this.getAssetBigSpotCheckListParm.parammaps.startTime = this.$refs['inputDatetimeCheck1'].value[0]
- this.getAssetBigSpotCheckListParm.parammaps.stopTime = this.$refs['inputDatetimeCheck1'].value[1]
- this.getAssetBigSpotCheckListParm.parammaps.startTime = ''
- this.getAssetBigSpotCheckListParm.parammaps.stopTime = ''
- this.getAssetBigSpotCheckListParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetBigSpotCheckListParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetBigSpotCheckListParm).then(response => {
- console.log('点检记录-table数据', response.data.list)
- this.listSpotCheck1 = response.data.list
- this.pageNumSpotCheck1 = response.data.pageNum
- this.pageSizeSpotCheck1 = response.data.pageSize
- this.listSpotCheck1 = []
- this.totalSpotCheck1 = response.data.total
- this.listLoadingSpotCheck1 = false
- form_searchSportCheck() {
- if (this.getAssetBigSpotCheckListParm.parammaps.inputDatetimeCheck1 == null) {
- this.getAssetBigSpotCheckListParm.parammaps.inputDatetimeCheck1 = ''
- this.getAssetBigSpotCheckListParm.offset = 1
- // 保养记录
- getBigupkeepbyeqList() {
- if (this.$refs['inputDatetimeUpkeepbyeq'] !== undefined && this.$refs['inputDatetimeUpkeepbyeq'].value !== null) {
- this.getBigupkeepbyeqParm.parammaps.startTime = this.$refs['inputDatetimeUpkeepbyeq'].value[0]
- this.getBigupkeepbyeqParm.parammaps.stopTime = this.$refs['inputDatetimeUpkeepbyeq'].value[1]
- this.getBigupkeepbyeqParm.parammaps.startTime = ''
- this.getBigupkeepbyeqParm.parammaps.stopTime = ''
- this.getBigupkeepbyeqParm.parammaps.assetId = this.seeTemp.assetId
- this.getBigupkeepbyeqParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getBigupkeepbyeqParm).then(response => {
- console.log('保养记录-table数据', response.data.list)
- this.listUpkeepbyeq = response.data.list
- this.pageNumUpkeepbyeq = response.data.pageNum
- this.pageSizeUpkeepbyeq = response.data.pageSize
- this.listUpkeepbyeq = []
- this.totalUpkeepbyeq = response.data.total
- form_searchUpkeepbyeq() {
- if (this.getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq === null) {
- this.getBigupkeepbyeqParm.parammaps.inputDatetimeUpkeepbyeq = ''
- this.getBigupkeepbyeqParm.offset = 1
- // 维修记录
- getAssetMaintainList() {
- this.listLoadingAssetMaintain = true
- if (this.$refs['inputDatetimeAssetMaintain'] !== undefined && this.$refs['inputDatetimeAssetMaintain'].value !== null) {
- this.getAssetMaintainParm.parammaps.startTime = this.$refs['inputDatetimeAssetMaintain'].value[0]
- this.getAssetMaintainParm.parammaps.stopTime = this.$refs['inputDatetimeAssetMaintain'].value[1]
- this.getAssetMaintainParm.parammaps.startTime = ''
- this.getAssetMaintainParm.parammaps.stopTime = ''
- this.getAssetMaintainParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetMaintainParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetMaintainParm).then(response => {
- console.log('维修记录-tabile数据', response.data.list)
- this.listAssetMaintain = response.data.list
- this.pageNumAssetMaintain = response.data.pageNum
- this.pageSizeAssetMaintain = response.data.pageSize
- this.listAssetMaintain = []
- this.totalAssetMaintain = response.data.total
- this.listLoadingAssetMaintain = false
- form_searchAssetMaintain() {
- if (this.getBigupkeepbyeqParm.parammaps.inputDatetimeAssetMaintan === null) {
- this.getBigupkeepbyeqParm.parammaps.inputDatetimeAssetMaintan = ''
- // 启停记录
- getAssetSTTList() {
- this.listLoadingAssetSTT = true
- this.getAssetSTTParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetSTTParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetSTTParm).then(response => {
- console.log('启停记录-tabile数据', response.data.list)
- this.listAssetSTT = response.data.list
- this.pageNumAssetSTT = response.data.pageNum
- this.pageSizeAssetSTT = response.data.pageSize
- this.listAssetSTT = []
- this.totalAssetSTT = response.data.total
- this.listLoadingAssetSTT = false
- form_searchAssetSTT() {
- if (this.getAssetSTTParm.parammaps.startTime == null) {
- this.getAssetSTTParm.parammaps.startTime = ''
- if (this.getAssetSTTParm.parammaps.stopTime == null) {
- this.getAssetSTTParm.parammaps.stopTime = ''
- this.getAssetSTTParm.offset = 1
- // 变更记录
- getAssetChangeList() {
- this.listLoadingAssetChange = true
- console.log(this.$refs['inputDatetimeAssetChange'])
- if (this.$refs['inputDatetimeAssetChange'] !== undefined && this.$refs['inputDatetimeAssetChange'].value !== null) {
- this.getAssetChangeParm.parammaps.startTime = this.$refs['inputDatetimeAssetChange'].value[0]
- this.getAssetChangeParm.parammaps.stopTime = this.$refs['inputDatetimeAssetChange'].value[1]
- this.getAssetChangeParm.parammaps.startTime = ''
- this.getAssetChangeParm.parammaps.stopTime = ''
- this.getAssetChangeParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetChangeParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetChangeParm).then(response => {
- console.log('变更记录-tabile数据', response.data.list)
- this.listAssetChange = response.data.list
- this.pageNumAssetChange = response.data.pageNum
- this.pageSizeAssetChange = response.data.pageSize
- this.listAssetChange = []
- this.totalAssetChange = response.data.total
- this.listLoadingAssetChange = false
- form_searchAssetChange() {
- if (this.getAssetChangeParm.parammaps.inputDatetimeAssetChange === null) {
- this.getAssetChangeParm.parammaps.inputDatetimeAssetChange = ''
- this.getAssetChangeParm.offset = 1
- changeStatue: function(cellValue) {
- if (cellValue.changeStatue == 17) {
- return '正常'
- } else if (cellValue.changeStatue == 18) {
- return '闲置'
- } else if (cellValue.changeStatue == 19) {
- return '报废'
- } else if (cellValue.changeStatue == 20) {
- return '封存'
- // 备件领用记录
- getAssetPartApplyList() {
- console.log(this.$refs['inputDatetimeAssetPartApply'].value)
- if (this.$refs['inputDatetimeAssetPartApply'] !== undefined && this.$refs['inputDatetimeAssetPartApply'].value !== null && this.$refs['inputDatetimeAssetPartApply'].value !== '') {
- this.getAssetPartApplyParm.parammaps.startTime = this.$refs['inputDatetimeAssetPartApply'].value[0]
- this.getAssetPartApplyParm.parammaps.stopTime = this.$refs['inputDatetimeAssetPartApply'].value[1]
- this.getAssetPartApplyParm.parammaps.startTime = ''
- this.getAssetPartApplyParm.parammaps.stopTime = ''
- this.getAssetPartApplyParm.parammaps.assetId = this.seeTemp.assetId
- this.getAssetPartApplyParm.parammaps.pastureId = this.seeTemp.pastureId
- GetDataByName(this.getAssetPartApplyParm).then(response => {
- console.log('备件领用记录-tabile数据', response.data.list)
- this.listAssetPartApply = response.data.list
- this.pageNumAssetPartApply = response.data.pageNum
- this.pageSizeAssetPartApply = response.data.pageSize
- this.listAssetPartApply = []
- this.totalAssetPartApply = response.data.total
- this.listLoadingAssetPartApply = false
- form_searchAssetPartApply() {
- if (this.getAssetPartApplyParm.parammaps.inputDatetimeAssetChange == null) {
- this.getAssetPartApplyParm.parammaps.inputDatetimeAssetChange = ''
- this.getAssetPartApplyParm.offset = 1
- getBarChart1() {
- GetReportform(this.getBarChart1Parm).then(response => {
- console.log('图1', response)
- this.chart_data1 = response.data.chart_data
- var repireCost = response.data.chart_data.repireCost
- var upkeepCost = response.data.chart_data.upkeepCost
- var totaltitle1 = 0
- if (repireCost !== null || repireCost !== undefined) {
- repireCost.forEach(function(item, index) {
- console.log(parseFloat(item))
- totaltitle1 = totaltitle1 + parseFloat(item)
- var totaltitle2 = 0
- if (upkeepCost !== null || upkeepCost !== undefined) {
- upkeepCost.forEach(function(item, index) {
- totaltitle2 = totaltitle2 + parseFloat(item)
- this.totaltitle = totaltitle1 + totaltitle2
- this.roadBarChart1(this.chart_data1, this.totaltitle.toFixed(2))
- roadBarChart1(chart_data1, totaltitle) {
- console.log(chart_data1, totaltitle)
- if (this.barChart1 != null) {
- this.barChart1.dispose()
- this.barChart1 = echarts.init(document.getElementById('barChart1'))
- var option = {
- title: { text: '年度费用统计(总费用:' + totaltitle + '元)', textStyle: { color: '#769cfc' }},
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
- formatter: function(data) {
- console.log(data.length)
- var value = 0
- let val = ''
- if (data.length == 1) {
- val += data[0].seriesName + ':' + data[0].data + '元<br/>'
- value = (parseFloat(data[0].value) + parseFloat(data[1].value)).toFixed(2)
- // eslint-disable-next-line no-unused-vars
- val = data[0].name + '年设备总费用:' + value + '元' + '<br/>'
- val += '维修费用:' + data[0].data + '元<br/>'
- val += '保养费用:' + data[1].data + '元<br/>'
- return val
- legend: {
- data: ['维修费用', '保养费用'],
- x: 'right'
- color: ['#769cfc', '#42b983'],
- grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true },
- xAxis: [
- { type: 'category', data: this.chart_data1.year }
- yAxis: [
- { type: 'value', name: '费用(元)' }
- series: [
- { name: '维修费用', type: 'bar', barWidth: 60, stack: '广告', data: this.chart_data1.repireCost },
- { name: '保养费用', type: 'bar', barWidth: 60, stack: '广告', data: this.chart_data1.upkeepCost }
- ]
- this.barChart1.setOption(option)
- var that = this
- window.onresize = function() {
- that.barChart1.resize()
- this.barChart1.on('click', function(param, i) {
- console.log(param)
- that.getBarChart2Parm.parammaps.receiveTime = param.name
- that.getBarChart2()
- that.getBarChart1()
- getBarChart2() {
- GetReportform(this.getBarChart2Parm).then(response => {
- console.log('图2', response)
- this.chart_data2 = response.data.chart_data
- this.roadBarChart2(this.chart_data2)
- roadBarChart2(chart_data1) {
- if (this.barChart2 != null) {
- this.barChart2.dispose()
- this.barChart2 = echarts.init(document.getElementById('barChart2'))
- title: { text: this.getBarChart2Parm.parammaps.receiveTime + '年月度费用统计', textStyle: { color: '#769cfc' }},
- console.log(data)
- var val = ''
- val = data[0].name + '月设备总费用:' + value + '元' + '<br/>'
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- { type: 'category', data: this.chart_data2.months }
- { name: '维修费用', type: 'bar', stack: '广告', data: this.chart_data2.repireCost },
- { name: '保养费用', type: 'bar', stack: '广告', data: this.chart_data2.upkeepCost }
- this.barChart2.setOption(option)
- that.barChart2.resize()
- this.barChart2.on('click', function(param, i) {
- that.dialogFormVisible_ChartSee = true
- that.dialogStatus = 'card'
- that.getChartSeeParm.parammaps.receiveTime = param.name
- that.getChartSeeList()
- getChartSeeList() {
- this.listLoadingChartSee = true
- if (this.$refs['inputDatetime2'] !== undefined && this.$refs['inputDatetime2'].value !== null) {
- this.getChartSeeParm.parammaps.startTime = this.$refs['inputDatetime2'].value[0]
- this.getChartSeeParm.parammaps.stopTime = this.$refs['inputDatetime2'].value[1]
- this.getChartSeeParm.parammaps.startTime = ''
- this.getChartSeeParm.parammaps.stopTime = ''
- GetDataByName(this.getChartSeeParm).then(response => {
- this.listChartSee = response.data.list
- this.pageNumChartSee = response.data.pageNum
- this.pageSizeChartSee = response.data.pageSize
- if (response.data.total) {
- this.totalChartSee = response.data.total
- this.listChartSee = []
- this.listLoadingChartSee = false
- form_searchChartSee() {
- if (this.getChartSeeParm.parammaps.inputDatetime2 === null) {
- this.getChartSeeParm.parammaps.inputDatetime2 = ''
- this.getChartSeeParm.offset = 1
- this.getChartSeeList()
- handleDownloadChartSee() {
- 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
- this.downLoadParm2.name = 'getEqPartuseDetailList'
- this.downLoadParm2.returntype = 'Map'
- this.downLoadParm2.parammaps = this.getChartSeeParm.parammaps
- GetAccount(this.downLoadParm2).then(response => {
- this.downLoadList2 = response.data.list
- if (response.data.list !== '') {
- this.isPercentage = false
- }, 2000)
- console.log(this.downLoadList2)
- const ExcelDatas = [
- {
- tHeader: ['类型', '单号', '领用日期', '领用部门', '备件编号', '备件名称', '备件规格', '备件品牌', '计量单位', '出库数量', '退库数量', '单价', '总价'],
- filterVal: ['useTypeV', 'RUcode', 'creatTime', 'departmentName', 'partCode', 'partName', 'specification', 'brandName', 'unit', 'checkoutNumber', 'quitNumber', 'price', 'sumPrice'],
- tableDatas: this.downLoadList2,
- sheetName: '费用统计'
- json2excel(ExcelDatas, '费用统计', true, 'xlsx')
- form_delete(row) {
- MessageBox.confirm('确认删除此信息?', {
- confirmButtonText: '确认',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.requestParam.name = 'deleteAsset'
- this.requestParam.parammaps = {}
- this.requestParam.parammaps['id'] = row.id
- PostDataByName(this.requestParam).then(() => {
- this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
- }).catch(() => {
- this.$message({ type: 'info', message: '已取消删除' })
- getDownClassList() {
- getRecuData(this.getRecuListParm).then(response => {
- this.parentClass = response.data
- getEQNumber() {
- this.getdataEQNumber.parammaps.pastureId = Cookies.get('pastureid')
- GetDataByName(this.getdataEQNumber).then(response => {
- this.createTemp.assetCode = response.data.list[0].createNumber
- handleTabClick(val) {
- console.log('点击了基础信息/审核设备tab', val)
- if (val.name == 'first') {
- handleExamine(row) {
- if (row == undefined) {
- this.examineTemp = this.seeTemp
- this.$set(this.seeTemp, 'SHstatue', 1)
- this.$set(this.seeTemp, 'workflowNote', '')
- this.examineTemp = Object.assign({}, row)
- this.$set(this.examineTemp, 'SHstatue', 1)
- this.$set(this.examineTemp, 'workflowNote', '')
- this.dialogStatus = 'examine'
- this.dialogFormVisible_Examine = true
- this.statueReason = false
- changeSHStatue(val) {
- if (val == 2) {
- this.statueReason = true
- keyupSubmit() {
- document.onkeydown = e => {
- const _key = window.event.keyCode
- if (_key === 13) {
- this.createExamineData()
- createExamineData() {
- if (this.dialogStatus !== 'update' && this.dialogStatus !== 'create') {
- this.$refs['examineTemp'].validate(valid => {
- this.requestParam.name = 'eqCharge'
- this.requestParam.parammaps.id = this.examineTemp.id
- if (this.examineTemp.SHstatue == 1) {
- this.requestParam.parammaps.statue = 1
- this.requestParam.parammaps.statue = 2
- this.requestParam.parammaps.empId = Cookies.get('employeid')
- this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
- console.log('审核确认发送参数', this.requestParam)
- this.dialogFormVisible_Examine = false
- this.dialogFormVisible_See = false
- this.$notify({ title: '成功', message: '审核成功', type: 'success', duration: 2000 })
- this.activeName == 'second'
- handleDownload() {
- this.$alert('设备基础信息正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
- this.downLoadParm.name = 'getAssetList'
- this.downLoadParm.parammaps = this.getdataListParm.parammaps
- GetAccount(this.downLoadParm).then(response => {
- this.downLoadList = response.data.list
- console.log(this.downLoadList)
- const elecExcelDatas = [
- tHeader: ['牧场','设备类别', '资产编号', '设备名称', '设备内部编号', '设备规格', '品牌', '供应商', '用途', '状态', '购置日期', '入场日期', '折旧年限', '财务编号', '原值', '残值', '月核减值', '保养级别', '保养费用', '维修费用', '基数(小时)', '部门', '责任人', '录入人', '录入时间', '使用时长(年)', '使用率(%)'],
- filterVal: ['pastureName','eqClassName', 'assetCode', 'eqName', 'eqCode', 'specification', 'brandName', 'providerName', 'purpose', 'status', 'purchaseDate', 'entranceDate', 'depreciation', 'financeCode', 'yuanzhi', 'salvage', 'subtractvalue', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'baseHours', 'deptName', 'employeName', 'inputUserName', 'inputDatetime', 'serviceDuration', 'utilizationRate'],
- tableDatas: this.downLoadList,
- sheetName: '设备基础信息'
- json2excel(elecExcelDatas, '设备基础信息', true, 'xlsx')
- handleDownloadSH() {
- this.downLoadParm.name = 'getAssetListSH'
- this.downLoadParm.parammaps = this.getdataListParmSH.parammaps
- tHeader: ['设备类别', '资产编号', '设备名称', '设备内部编号', '设备规格', '品牌', '供应商', '用途', '状态', '购置日期', '入场日期', '折旧年限', '财务编号', '原值', '残值', '月核减值', '保养级别', '保养费用', '维修费用', '基数(小时)', '牧场', '部门', '责任人', '录入人', '录入时间'],
- filterVal: ['eqClassName', 'assetCode', 'eqName', 'eqCode', 'specification', 'brandName', 'providerName', 'purpose', 'status', 'purchaseDate', 'entranceDate', 'depreciation', 'financeCode', 'yuanzhi', 'salvage', 'subtractvalue', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'baseHours', 'pastureName', 'deptName', 'employeName', 'inputUserName', 'inputDatetime'],
- handleSelectionChange(item) {
- this.selectionList = item
- handleBatchChange() {
- if (this.selectionList.length > 0) {
- for (let i = 0; i < this.selectionList.length; i++) {
- if (this.selectionList[i].pastureId !== this.selectionList[0].pastureId) {
- this.$message({ type: 'error', message: '请检测变更牧场是否一致!', duration: 2000 })
- console.log('批量变更')
- this.batchChange.temp.departmentId = ''
- this.batchChange.temp.employeeId = ''
- this.batchChange.deptList = []
- this.batchChange.personList = []
- this.dialogFormVisible_change = true
- this.dialogStatus = 'change'
- this.batchChange.getdataListParmDept.parammaps.pastureId = this.selectionList[0].pastureId
- this.getBatchChangeDeptDownList()
- this.$message({ type: 'error', message: '请选择变更牧场', duration: 2000 })
- getBatchChangeDeptDownList() {
- GetDataByName(this.batchChange.getdataListParmDept).then(response => {
- this.batchChange.deptList = response.data.list
- changeBatchDept(item) {
- this.batchChange.getdataListParmPerson.parammaps.deptId = item
- this.batchChange.getdataListParmPerson.parammaps.pastureId = this.batchChange.deptList.find(obj => obj.deptid == item).pastureId
- this.getBatchChangePersonDownList()
- getBatchChangePersonDownList() {
- GetDataByName(this.batchChange.getdataListParmPerson).then(response => {
- this.batchChange.personList = response.data.list
- changeBatchPerson(item) {
- this.batchChange.temp.employeeId = item
- this.batchChange.temp.employeName = this.batchChange.personList.find(obj => obj.id == item).empname
- changeData() {
- this.$refs['batchChangeTemp'].validate(valid => {
- this.requestParam = {}
- var array = []
- var obj = {}
- var parammaps = {}
- obj.name = 'updateEquipmentALL'
- obj.offset = 0
- obj.pagecount = 0
- parammaps.departmentId = this.batchChange.temp.departmentId
- parammaps.employeeId = this.batchChange.temp.employeeId
- parammaps.employeName = this.batchChange.temp.employeName
- parammaps.id = this.selectionList[i].id
- obj.parammaps = parammaps
- array.push(obj)
- this.requestParam.array = array
- PostDataByNames(this.requestParam).then(response => {
- this.dialogFormVisible_change = false
- this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
-</script>
-<style lang="scss" scoped>
- .el-autocomplete-suggestion li{
- padding:0 3px!important;
- .el-table .warning-row {
- background: oldlace;
- .el-table .success-row {
- background: #f0f9eb;
-</style>
-<style lang="scss">
- .upkeepgrade .el-form-item__label{
- line-height: 20px;
- .inputDatetime .el-range-separator{
- padding: 0;
- margin: 0 10px;
- .el-radio__label{
- padding-left: 2px !important;
-<style>
- .el-table .goBeyond { background: #F47C7C ; }
- .el-table .warning { background: #989DF0; }
- .el-table .scrap { background: #D7D7D7; }
- <el-input ref="eqName" v-model="createTemp.eqName" placeholder="请输入设备名称" />
- <el-input ref="financeCode" v-model="createTemp.financeCode" placeholder="请输入财务编号" disabled/>
- myHeight:document.documentElement.clientHeight - 85- 150
@@ -1,3117 +0,0 @@
- placeholder="请选择设备类别"
- <el-input v-model="getdataListParm.parammaps.financeCode" placeholder="财务编号" clearable style="width: 120px;" class="filter-item" />
- <!-- <el-date-picker ref="inputDatetime1" v-model="getdataListParm.parammaps.inputDatetime1" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="审批日期" end-placeholder="审批日期" /> -->
- <!-- <el-date-picker ref="inputDatetime3" v-model="getdataListParm.parammaps.inputDatetime3" class="inputDatetime" type="daterange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="报废日期" end-placeholder="报废日期" /> -->
- <el-input v-model="getdataListParm.parammaps.assetCode" placeholder="资产编号" clearable style="width: 120px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.brand" placeholder="品牌" clearable style="width: 120px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.proName" placeholder="供应商" clearable style="width: 120px;" class="filter-item" />
- <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-table-column label="用途" align="center" prop="purpose" />
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" v-show = "dialogFormVisible" :close-on-click-modal="false" width="90%">
- <el-form ref="createTemp" :rules="rulesCreate" :model="createTemp" label-position="right" label-width="115px" style="width: 90%;margin:0 auto 30px">
- <el-input ref="assetCode" v-model="createTemp.assetCode" placeholder="请输入编号" disabled />
- <el-form-item label="指定维修人:" prop="maintenance">
- <el-select v-model="createTemp.maintenance" multiple filterable placeholder="指定维修人" class="filter-item" style="width: 100%;" >
- <!-- <el-col :span="6">
- <el-form-item label="间隔时间:" prop="pushTime">
- <el-select v-model="createTemp.pushTime" placeholder="间隔时间" class="filter-item">
- <el-option v-for="item in pushNameList" :key="item.id" :label="item.name" :value="item.id" />
- </el-col> -->
- <el-form-item label="一级督办:" prop="levelone">
- <el-select v-model="createTemp.levelone" filterable placeholder="设备主管" class="filter-item">
- <el-form-item label="一级间隔时间(小时)" prop="leveloneTime">
- <el-select v-model="createTemp.leveloneTime" placeholder="间隔时间" class="filter-item">
- <el-option v-for="item in pushNameList2" :key="item.id" :label="item.name" :value="item.id" />
- <el-form-item label="二级督办:" prop="leveltwo">
- <el-select v-model="createTemp.leveltwo" filterable placeholder="设备助理" class="filter-item">
- <el-form-item label="二级间隔时间(小时)" prop="leveltwoTime">
- <el-select v-model="createTemp.leveltwoTime" placeholder="间隔时间" class="filter-item">
- <el-form-item label="三级督办:" prop="levelthree">
- <el-select v-model="createTemp.levelthree" filterable placeholder="场长" class="filter-item">
- <el-form-item label="三级间隔时间(小时)" prop="levelthreeTime">
- <el-select v-model="createTemp.levelthreeTime" placeholder="间隔时间" class="filter-item">
- <el-form-item label="指定维修人:" prop="maintenanceName">
- <el-input ref="maintenanceName" v-model="seeTemp.maintenanceName" placeholder="" disabled />
- <el-form-item label="一级督办:" prop="leveloneName">
- <el-input ref="leveloneName" v-model="seeTemp.leveloneName" placeholder="" disabled />
- <el-form-item label="一级间隔时间(小时):" prop="leveloneTime">
- <el-input ref="leveloneTime" v-model="seeTemp.leveloneTime" placeholder="" disabled />
- <el-form-item label="二级督办:" prop="leveltwoName">
- <el-input ref="leveltwoName" v-model="seeTemp.leveltwoName" placeholder="" disabled />
- <el-form-item label="二级间隔时间(小时):" prop="leveltwoTime">
- <el-input ref="leveltwoTime" v-model="seeTemp.leveltwoTime" placeholder="" disabled />
- <el-form-item label="三级督办:" prop="levelthreeName">
- <el-input ref="levelthreeName" v-model="seeTemp.levelthreeName" placeholder="" disabled />
- <el-form-item label="三级间隔时间(小时):" prop="levelthreeTime">
- <el-input ref="levelthreeTime" v-model="seeTemp.levelthreeTime" placeholder="" disabled />
- // assetCode: [{ required: true, message: '必填', trigger: 'blur' }],
- //eqName: [{ required: true, message: '必填', trigger: 'blur' }],
- rulesCreate: {
- deptId: [{ required: true, message: '必填', trigger: 'blur' }],
- employeName: [{ required: true, message: '必填', trigger: 'blur' }],
- pastureId: [{ required: true, message: '必填', trigger: 'blur' }],
- maintenance: [{ required: true, message: '必填', trigger: 'blur' }],
- leveloneTime: [{ required: true, message: '必填', trigger: 'blur' }],
- leveltwoTime: [{ required: true, message: '必填', trigger: 'blur' }],
- levelthreeTime: [{ required: true, message: '必填', trigger: 'blur' }],
- levelone: [{ required: true, message: '必填', trigger: 'blur' }],
- leveltwo: [{ required: true, message: '必填', trigger: 'blur' }],
- levelthree: [{ required: true, message: '必填', trigger: 'blur' }],
- placeholder:"请选择设备类别",
- pushNameList: [{ id: '60', name: '60' }, { id: '120', name: '120' }, { id: '180', name: '180' }],
- pushNameList2: [{ id: '1', name: '1' }, { id: '2', name: '2' }, { id: '3', name: '3' }, { id: '5', name: '5' }, { id: '8', name: '8' }, { id: '12', name: '12' }, { id: '18', name: '18' }],
- disabled: false,
- parammaps: {proId:'',brandId:'', assetCode:'',eqCode: '', eqName: '', departmentId: '', pastureId: Cookies.get('pastureid'), pastureName: Cookies.get('pasturename'), status: '', inputDatetime1: '', startTime: '', stopTime: '', inputDatetime2: '', startTime2: '', stopTime2: '', inputDatetime3: '', startTime3: '', stopTime3: '', warning: '', eqClassId: '' }
- createTemp: { inputDatetime: parseTime(new Date(), '{y}-{m}-{d}'), employeId: this.$store.state.user.employeid, inputUser: this.$store.state.user.employeid, deptId: this.$store.state.user.departmentid, departmentName: Cookies.get('departmentname'), pastureId: this.$store.state.user.pastureid, assetCode: '', eqClassName: '', eqClassId: '', eqCode: '', eqName: '', specification: '', providerName: '', brandName: '', financeCode: '', status: '正常', purpose: '', purchaseDate: parseTime(new Date(), '{y}-{m}-{d}'), entranceDate: parseTime(new Date(), '{y}-{m}-{d}'), yearUpkeepCost: '', yearMaintainDost: '', yuanzhi: '', baseHours: '', upkeepgrade: '', salvage: '', subtractvalue: '', yearMaintainCost: '', brandId: '', providerId: '', inputUserName: '', employeName: this.$store.state.user.employename, depreciation: '5', maintenance: '', levelone: '', leveltwo: '', levelthree: '', pushTime: '', leveloneTime: '', leveltwoTime: '', levelthreeTime: '' },
- computed: {
- // 设置请求头
- // headers() {
- // return {
- // // 设置token
- // // eslint-disable-next-line no-undef
- // token: getToken()
- // }
- // },
- uploadData() {
- name: 'importStockUse',
- importParams: '牧场,设备类别,资产编号,设备名称,设备内部编号,设备规格,品牌,供应商,用途,状态,购置日期,入场日期,折旧年限,财务编号,原值,残值,月核减值,保养级别,保养费用,维修费用,维修费用,基数(小时),部门,责任人,录入人,录入时间,使用时长(年),使用率(%),SignColumn',
- sheetname: 'SheetJS'
- // 设置上传地址
- uploadExcelUrl() {
- // process.env.VUE_APP_BASE_API是服务器的路径,也是axios的基本路径
- return process.env.VUE_APP_BASE_API + 'authdata/equipment'
- // 导入
- beforeImportExcel(file) {
- const isLt2M = file.size / 1024 / 1024 < 10
- if (!isLt2M) {
- this.$message.error('上传文件大小不能超过 10MB!')
- return isLt2M
- handleImportExcelSuccess(res, file) {
- 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',
- message: '上传失败',
- formatJsonTemp(filterVal, jsonData) {
- return jsonData.map(v =>
- filterVal.map(j => {
- if (j === 'timestamp') {
- return parseTime(v[j])
- return v[j]
- )
- console.log('点击了保存',this.createTemp.maintenance)
- this.createTemp.depreciation = '5'
- // if (checkedData.children === undefined) {
- // this.createTemp.eqClassId = checkedData.eqClassId
- // this.createTemp.eqName = checkedData.NewName
- // this.getdataListParm.parammaps.eqClassId = checkedData.eqClassId
- // this.getEQNumber()
- // } else {
- // this.defaultCheckedKeys = []
- // this.createTemp.eqClassId = ''
- // this.getdataListParm.parammaps.eqClassId = ''
- // this.$message({ type: 'warning', message: '请选择具体设备类型' })
- if(this.requestParam.parammaps.maintenance.length != 0 && this.requestParam.parammaps.maintenance){
- if(this.requestParam.parammaps.maintenance.length > 4){
- this.$notify({ title: '提示', message: '指定维修人最多4个人!', type: 'success', duration: 2000 })
- this.requestParam.parammaps.maintenance = this.requestParam.parammaps.maintenance.toString()
- if (row.levelone !== undefined) {
- this.createTemp.levelone = parseInt(row.levelone)
- if (row.leveltwo !== undefined) {
- this.createTemp.leveltwo = parseInt(row.leveltwo)
- if (row.levelthree !== undefined) {
- this.createTemp.levelthree = parseInt(row.levelthree)
- if (row.leveloneTime !== undefined) {
- this.createTemp.leveloneTime = parseInt(row.leveloneTime)
- if (row.leveltwoTime !== undefined) {
- this.createTemp.leveltwoTime = parseInt(row.leveltwoTime)
- if (row.levelthreeTime !== undefined) {
- this.createTemp.levelthreeTime = parseInt(row.levelthreeTime)
- if (row.maintenance !== undefined) {
- var newArr = row.maintenance.split(",")
- var arr2 = []
- newArr.forEach(function(item){
- arr2.push(parseInt(item))
- console.log('arr2',arr2)
- this.createTemp.maintenance = arr2
- console.log(this.createTemp.maintenance)
- console.log(response.data.list[0].createNumber)
- console.log(this.createTemp.assetCode)
- tHeader: ['牧场','设备类别', '资产编号', '设备名称', '设备内部编号', '设备规格', '品牌', '供应商', '用途', '状态', '购置日期', '入场日期', '折旧年限', '财务编号', '原值', '残值', '月核减值', '保养级别', '保养费用', '维修费用', '基数(小时)', '部门', '责任人', '录入人', '录入时间', '使用时长(年)', '使用率(%)', '指定维修人', '一级督办', '一级间隔时间', '二级督办', '二级间隔时间', '三级督办', '三级间隔时间',],
- filterVal: ['pastureName','eqClassName', 'assetCode', 'eqName', 'eqCode', 'specification', 'brandName', 'providerName', 'purpose', 'status', 'purchaseDate', 'entranceDate', 'depreciation', 'financeCode', 'yuanzhi', 'salvage', 'subtractvalue', 'upkeepgrade', 'yearUpkeepCost', 'yearMaintainCost', 'baseHours', 'deptName', 'employeName', 'inputUserName', 'inputDatetime', 'serviceDuration', 'utilizationRate', 'maintenanceName', 'leveloneName', 'leveloneTime','leveltwoName', 'leveltwoTime','levelthreeName','levelthreeTime' ],
@@ -90,7 +90,7 @@
<el-select v-model="dataform.deviceId" style="width:500px;" placeholder="请选择" @change="change_deviceId">
<el-option v-for="item in viedoAccountList" :key="item.deviceId" :label="item.deviceId" :value="item.deviceId" />
</el-select>
<el-form-item label="是否保养工" prop="keeper">
<el-switch ref="keeper" v-model="dataform.keeper" active-color="#13ce66" inactive-color="#ff4949" :active-value="1" :inactive-value="0" />
</el-form-item>
@@ -214,7 +214,7 @@ export default {
{ name: 'getEmpall', offset: 0, pagecount: 0, params: [] },
{ name: 'getMaintenanceTypeList', offset: 0, pagecount: 0, params: [] },
{ name: 'getMcsAccounts', offset: 0, pagecount: 0, params: [] },
],
requestFilterParams: { returntype: 'Map', parammaps: {}},
UpdateDataRelationParam: { name: '', dataname: '', datavalue: '', valuename: '', values: [] },
@@ -392,17 +392,17 @@ export default {
- var pastureId = Cookies.get('pastureid')
+ var pastureId = Cookies.get('pastureid')
console.log(pastureid)
- var deviceId = this.dataform.deviceId
+ var deviceId = this.dataform.deviceId
var uId = this.dataform.uId
var pwd = this.dataform.pwd
console.log('pastureId', pastureId)
var send_data = {
@@ -439,7 +439,7 @@ export default {
]
console.log('记录仪保存发送参数===========', send_data)
ExecDataByConfig(send_data).then(response => {
@@ -454,8 +454,14 @@ export default {
'deviceId': this.dataform.deviceId
- MessageBox.confirm('该设备已经绑定,是否重新绑定?', {
+ let str1 = '启用'
+ if(this.dataform.enable == 1){
+ str1 = '启用'
+ str1 = '禁用'
+ let str = '是否'+ str1 +'该用户?'
confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
}).then(() => {
PostDataByName(send_data3).then(() => {
@@ -550,7 +556,7 @@ export default {
} else {
this.requestParam.params[4] = this.dataform.maintenancePerson
this.requestParam.params[5] = this.dataform.keeper
@@ -617,8 +623,15 @@ export default {
+ // MessageBox.confirm('该设备已经绑定,是否重新绑定?', {
@@ -28,7 +28,7 @@
<el-button v-if="isRetreatImport" v-waves class="filter-item" type="warning" icon="el-icon-upload2" @click="form_search">导入</el-button>
</el-upload>
<el-button v-if="isDieselExport" v-waves class="filter-item" type="success" icon="el-icon-download" @click="handleDownload">数据导出</el-button>
- <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button>
+ <!-- <el-button class="filter-item" type="danger" icon="el-icon-download" @click="form_delete">删除</el-button> -->
</div>
@@ -766,20 +766,19 @@ export default {
handleImportExcelSuccess(res, file) {
// if (res.msg === 'ok') {
if (res.msg === 'ok') {
- message: '导入成功',
if (res.data.err_count > 0) {
+ this.$message({
+ title: '失败',
+ message: '导入失败',
+ type: 'danger',
+ duration: 2000
this.$notify({
title: '失败',
message: '导入失败',
type: 'danger',
duration: 2000
import('@/vendor/Export2Excel').then(excel => {
const list1 = res.data.result
const tHeader = [
@@ -797,6 +796,19 @@ export default {
bookType: 'xlsx'
+ title: '成功',
+ message: '导入成功',
+ type: 'success',
+ this.$notify({
@@ -1106,7 +1118,7 @@ export default {
this.dialogFormVisible = false
title: '成功',
- message: '删除成功',
+ message: response.message,
type: 'success',
@@ -98,6 +98,7 @@
<el-button v-if="tab1.contractManagement.isContractAdd && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Create2">新增</el-button>
<el-button v-if="tab1.contractManagement.isContractChange && parseInt(tab1.detailsSpareParts.detailsList.pastureId) == parseInt(isGroupAdministrator) || parseInt(isEmployeid) == 0" class="filter-item" type="primary" icon="el-icon-edit" :disabled="tab1.detailsSpareParts.detailsList.statued=='终止' || tab1.detailsSpareParts.detailsList.statued=='已过期' || tab1.detailsSpareParts.detailsList.statued=='新增未通过'" @click="handleTab1Change2">变更</el-button>
<el-button v-if="tab1.contractManagement.isContractExport" class="filter-item" type="primary" icon="el-icon-edit" @click="handleTab1Export2">导出</el-button>
+ <el-button v-if="tab1.contractManagement.isContractUplaod" class="filter-item" type="success" icon="el-icon-upload2" @click="sapUpload">SAP上传</el-button>
<el-table
:key="tab1.detailsSpareParts.tableKey"
@@ -136,7 +137,9 @@
<el-table-column label="计量单位" min-width="120px" align="center" prop="unit" />
<el-table-column label="计划量" sortable min-width="120px" align="center" prop="planAmount" />
<el-table-column label="单价" sortable min-width="120px" align="center" prop="price" />
- <el-table-column label="备注" min-width="120px" align="center" prop="remark" />
+ <el-table-column label="备注" sortable min-width="120px" align="center" prop="remark" />
+ <!-- <el-table-column label="使用周期" min-width="120px" align="center" prop="lifeCycle" />
+ <el-table-column label="合同差异项" min-width="120px" align="center" prop="contractVarianceItem" /> -->
</el-table>
<pagination v-show="tab1.detailsSpareParts.total>0" :total="tab1.detailsSpareParts.total" :page.sync="tab1.detailsSpareParts.getdataListParm.offset" :limit.sync="tab1.detailsSpareParts.getdataListParm.pagecount" @pagination="getTab1List2" />
@@ -535,16 +538,21 @@
<el-input v-model="scope.row.price" />
</template>
- <el-table-column label="税码" min-width="80px" align="center" valign="middle">
- <el-input v-model="scope.row.taxcode" />
<el-table-column label="备注" min-width="110px" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" type="textarea" placeholder="备注" autosize maxlength="100" show-word-limit />
+ <!-- <el-table-column label="使用周期" min-width="110px" align="center" valign="middle">
+ <el-input v-model="scope.row.lifeCycle" />
+ <el-table-column label="合同差异项" min-width="110px" align="center" valign="middle">
+ <el-input v-model="scope.row.contractVarianceItem" />
+ </el-table-column> -->
<el-table-column label="操作" align="center" width="100px" class-name="small-padding fixed-width" fixed="right">
<a class="del" :disabled="isokDisable" @click="partDelete(row)">删除</a>
@@ -984,7 +992,7 @@
<script>
// 引入
-import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess } from '@/api/common'
+import { GetDataByName, GetDataByNames, checkButtons, ExecDataByConfig, UpdateDataRelation, PostDataByName, failproccess,postJson } from '@/api/common'
import waves from '@/directive/waves'
import { parseTime, json2excel, sortChange } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
@@ -1048,6 +1056,7 @@ export default {
radioAll: '全部',
isContractAdd: [],
isContractExport: [],
+ isContractUplaod: [],
isContractSee: [],
isContractChange: [],
isDisabled: false,
@@ -1369,6 +1378,10 @@ export default {
const ContractExport = 'customs:contract:export'
const isContractExport = checkButtons(this.$store.state.user.buttons, ContractExport)
this.tab1.contractManagement.isContractExport = isContractExport
+ // SAP上传
+ const ContractUplaod = 'customs:contract:sapupload'
+ const isContractUplaod = checkButtons(this.$store.state.user.buttons, ContractUplaod)
+ this.tab1.contractManagement.isContractUplaod = isContractUplaod
// 变更
const ContractChange = 'customs:contract:change'
const isContractChange = checkButtons(this.$store.state.user.buttons, ContractChange)
@@ -2198,7 +2211,9 @@ export default {
remark: '@insertSpotList.remark',
unit: '@insertSpotList.unit',
contractId: '@insertSpotList.contractId',
- taxcode: '@insertSpotList.taxcode'
+ taxcode: '@insertSpotList.taxcode',
+ // lifeCycle: '@insertSpotList.lifeCycle',
+ // contractVarianceItem: '@insertSpotList.contractVarianceItem',
}}
ExecDataByConfig(this.postDataPramas).then(response => {
console.log('新增保存发送参数', this.postDataPramas)
@@ -2287,7 +2302,9 @@ export default {
@@ -2584,7 +2601,9 @@ export default {
this.postDataPramas.data[1].children[0] = { 'name': 'checkcontracPartCode', 'type': 'v', 'parammaps': { pastureId: this.tab1.detailsSpareParts.detailsList.pastureId, providerId: this.tab1.detailsSpareParts.detailsList.providerId, stopTime: this.tab1.detailsSpareParts.detailsList.stopTime, flag: this.tab1.detailsSpareParts.detailsList.flag, isZeroStock: this.tab1.detailsSpareParts.detailsList.isZeroStock, statue: this.tab1.detailsSpareParts.detailsList.statue, partCode: '@insertSpotList.partCode', brandId: '@insertSpotList.brandId' }}
@@ -2603,6 +2622,8 @@ export default {
// taxcode: '@insertSpotList.taxcode'
@@ -2907,6 +2928,30 @@ export default {
json2excel(ExcelDatas, '合同明细', true, 'xlsx')
+ sapUpload(){
+ if(this.selectList.length == 0){
+ this.$notify({ title: '失败', message: '请勾选数据!' , type: 'error', duration: 2000 })
+ let url = 'authdata/contract/push'
+ let ids = []
+ this.selectList.forEach((i)=>{
+ ids.push(i.id)
+ console.log(i,'===')
+ pastureId:parseInt(Cookies.get('pastureid')),
+ providerId:this.tab1.detailsSpareParts.detailsList.providerId,
+ contractIdList:ids
+ this.$notify({ title: '成功', message: '上传成功', type: 'success', duration: 2000 })
+ this.$notify({ title: '上传失败', message: response.data, type: 'warning', duration: 2000 })
@@ -2915,4 +2960,12 @@ export default {
/deep/ .el-badge__content.is-fixed{
z-index: 1;
+ .el-notification__content {
+ white-space: pre-line !important;
+<style lang="scss">
</style>
@@ -1182,9 +1182,9 @@ export default {
// const list1 = this.downList
- '牧场', '备件名称', '备件编号', '规格', '供应商', '单位', '品牌', '单价', '当前库存', '在库天数','最小库存', '最大库存', '位置', '状态', '合同状态', '零库存']
+ '牧场', '备件名称', '备件编号', '规格', '供应商', '单位', '品牌', '单价', '当前库存', '在库天数','闲置备件','最小库存', '最大库存', '位置', '合同状态', '零库存']
const filterVal = [
- 'pastureName', 'partName', 'partCode', 'specification', 'providerName', 'unit', 'brand', 'price', 'reportery', 'daysInStorage','minRepertory', 'maxRepertory', 'location', 'statue', 'isZeroStock']
+ 'pastureName', 'partName', 'partCode', 'specification', 'providerName', 'unit', 'brand', 'price', 'reportery', 'daysInStorage','xzparts','minRepertory', 'maxRepertory', 'location', 'statue', 'isZeroStock']
const data1 = this.formatJsonTemp(filterVal, list1)
excel.export_json_to_excel({
@@ -6,6 +6,8 @@
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="备件出库" name="first">
+ <!-- <div class="el-icon-info" style="font-size: 30px;float: right;color: #009C69;" @click="handleDescription" /> -->
+ <div class="el-icon-info" style="font-size: 30px;float: right;color: #409EFF;" @click="handleDescription"/>
<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" />
@@ -120,6 +122,7 @@
<el-table-column prop="sterilisation" label="冲销状态" min-width="80px" align="center">
<span v-if="scope.row.sterilisation == 1">已冲销</span>
+ <span v-else-if="scope.row.sterilisation == 2">部分冲销</span>
<span v-else>未冲销</span>
@@ -1021,6 +1024,24 @@
<el-button @click="easStatus.dialogFormVisible = false;get_table_data()">关闭</el-button>
</el-dialog>
+ <el-dialog :title="textMap[description.dialogStatus]" :destroy-on-close="true" :visible.sync="description.dialogFormVisible" :close-on-click-modal="false" width="70%">
+ <b style="line-height: 28px;">常见问题1:出库保存报错</b>
+ <br>
+ <div class="app-description dialogMinHeight">
+ <div class="content">
+ 报错原因1: 请求超时
+ 报错原因2:牧场在SAP已出库
+ 解决方案:请在SAP冲销相应的未同步的出库。
+ <div slot="footer" class="dialog-footer">
+ <el-button class="cancelClose" @click="description.dialogFormVisible = false; ">关闭</el-button>
@@ -1065,7 +1086,7 @@ export default {
// isStorageExport: [],
// isStorageSee: [],
tableKey: 0,
- useTypes: [{ id: '0', name: '领用出库' }, { id: '1', name: '手动出库' }, { id: '4', name: '调拨出库' }, { id: '5', name: '报废出库' }],
+ useTypes: [{ id: '0', name: '领用出库' }, { id: '1', name: '手动出库' }, { id: '4', name: '调拨出库' }, { id: '5', name: '报废出库' }, { id: '6', name: '青贮出库' }],
// list2: [
// {
// orderNumber: '04.04.17.01.000069', stockName: '水箱', specifications: 'YC4E140-31', brand: '福田', supplier: '西安开泰门业有限', deviceName: '华农转盘机', equipmentNumber: '8.hnzpj004', unit: '个', storehouse: 'B-01-01', amount: '4', receivedQuantity: '3', currentStockQuantity: '1', price: '200', totalPrice: '600'
@@ -1167,7 +1188,8 @@ export default {
see: '查看详情',
update: '编辑',
create: '新增',
- easStatus: 'EAS同步—同步失败数据'
+ easStatus: 'EAS同步—同步失败数据',
+ description: '常见问题说明'
getdataListParm: {
name: 'getBigPartuseList',
@@ -1333,7 +1355,11 @@ export default {
pastureid: Cookies.get('pastureid')
+ description: {
+ dialogStatus: ''
computed: {
@@ -3259,8 +3285,11 @@ export default {
}).catch(() => {
this.$message({ type: 'info', message: '已取消忽略同步' })
+ handleDescription() {
+ this.description.dialogStatus = 'description'
+ this.description.dialogFormVisible = true
</script>
@@ -3288,5 +3317,16 @@ export default {
.el-form-item__content{
line-height: 0;
+ .app-description{
+ display:flex; justify-content: left; align-items: left;font-size: 14px;line-height: 28px;height: 300px;
+ .content{
+ display:flex;
@@ -533,9 +533,10 @@
<span>{{ scope.row.sumPrice }}</span>
- <el-table-column prop="dflag" label="冲销状态" min-width="80px" align="center">
+ <el-table-column prop="dflag" label="冲销状态" min-width="80px" align="center">
<span v-if="scope.row.dflag == 1">已冲销</span>
+ <span v-else-if="scope.row.dflag == 2">部分冲销</span>
@@ -108,6 +108,7 @@
@@ -83,8 +83,8 @@
<el-table-column label="申购日期" sortable prop="inputTime" min-width="80px" align="center" />
<el-table-column label="申购状态" min-width="80px" align="center">
- <span v-if="scope.row.purchase_type == 1">暂估</span>
- <span v-else-if="scope.row.purchase_type == 3">赠品</span>
+ <!-- <span v-if="scope.row.purchase_type == 1">暂估</span> -->
+ <span v-if="scope.row.purchase_type == 3">赠品</span>
<span v-else>正常</span>
@@ -188,7 +188,7 @@
</el-col>
<el-col v-if="dialogStatus==='special' && createTemp.purchaseType == '1' || createTemp.purchaseType == '3'" :span="8">
<el-form-item label="供应商:" prop="providerId">
- <el-select v-model="createTemp.providerId" placeholder="供应商" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
+ <el-select v-model="createTemp.providerId" filterable placeholder="供应商" class="filter-item" style="width:100%" :disabled="dialogStatus==='update'">
<el-option v-for="item in providerList" :key="item.id" :label="item.providerName" :value="item.id" />
@@ -212,7 +212,7 @@
<el-row v-if="dialogStatus==='special'">
<el-col :span="24">
<el-form-item label="申购类型:" prop="purchaseType">
- <el-radio v-model="createTemp.purchaseType" label="1" @change="changeType()">暂估</el-radio>
+ <!-- <el-radio v-model="createTemp.purchaseType" label="1" @change="changeType()">暂估</el-radio> -->
<!-- <el-radio v-model="createTemp.purchaseType" label="2" @change="changeType()">垫付</el-radio> -->
<el-radio v-model="createTemp.purchaseType" label="3" @change="changeType()">赠品</el-radio>
@@ -330,6 +330,8 @@
<el-input v-model="scope.row.purpose" />
<el-table-column
label="操作"
align="center"
@@ -387,8 +389,8 @@
<el-col :span="8">
- <el-form-item label="申购日期:" prop="createTime">
- <el-date-picker v-model="seeTemp.createTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
+ <el-form-item label="申购日期:" prop="inputTime">
+ <el-date-picker v-model="seeTemp.inputTime" :picker-options="pickerOptions" type="date" placeholder="申购日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width:100%" disabled />
<el-col :span="8" v-if="seeTemp.purchaseType == '2'">
@@ -415,7 +417,7 @@
<el-row v-if="seeTemp.purchase_type > 0">
- <el-radio v-model="seeTemp.purchaseType" disabled label="1">暂估</el-radio>
+ <!-- <el-radio v-model="seeTemp.purchaseType" disabled label="1">暂估</el-radio> -->
<!-- <el-radio v-model="seeTemp.purchaseType" disabled label="2">垫付</el-radio> -->
<el-radio v-model="seeTemp.purchaseType" disabled label="3">赠品</el-radio>
@@ -473,11 +475,9 @@
<el-table-column label="现有库存" sortable prop="storageAmount" align="center" min-width="60" />
<el-table-column label="价格" sortable prop="price" align="center" min-width="60" />
<el-table-column label="申购数量" sortable prop="amount" align="center" min-width="60" />
- <el-table-column label="备注" min-width="110px" align="center">
- <span>{{ scope.row.purpose }}</span>
+ <el-table-column label="备注" min-width="110px" align="center" prop="purpose" />
<el-form
ref="seeTemp"
@@ -647,7 +647,10 @@ export default {
findAllPasture: [],
findAllDepart: [],
findAllEmploye: [],
- subscriptionStatusList:[{id:0,name:'正常'},{id:1,name:'暂估'},{id:3,name:'赠品'}],//申购状态
+ subscriptionStatusList:[
+ {id:0,name:'正常'},
+ // {id:1,name:'暂估'},
+ {id:3,name:'赠品'}],//申购状态
onlineSubscriptionList: [], createDepartList: [], edit: 0,
requestParams: [
{ name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
@@ -667,7 +670,7 @@ export default {
textMap: {
- see: '查看/特殊申购l',
+ see: '查看',
examine1: '审核1',
examine2: '审核2',
examine3: '审核3',
@@ -803,6 +806,7 @@ export default {
apply_subscribeData:{},
+ isApplyEx4:true,
myHeight:document.documentElement.clientHeight - 85- 150
@@ -1386,6 +1390,12 @@ export default {
// 查看
form_see(row) {
+ // 查看/特殊申购
+ if(row.purchase_type == 1 || row.purchase_type == 3){
+ this.textMap.see = '特殊申购'
+ this.textMap.see = '查看'
this.dialogStatus = 'see'
this.dialogFormVisibleSee = true
this.seeTemp = Object.assign({}, row)
@@ -1393,13 +1403,14 @@ export default {
console.log('查看上方数据(从table读取)', this.seeTemp)
this.listSee = []
this.getdataListSee.parammaps.id = this.seeTemp.id
+ this.isApplyEx4 = false
this.getSeeList()
+ getFlowPath(){
// 流程图
var reason = '未通过原因:' + this.seeTemp.workflowNote
if (this.seeTemp.purchase_type < 0 || this.seeTemp.purchase_type == 0 ) {
+ if(this.isApplyEx4 == true){
if (this.seeTemp.statue === 2) {
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '场长审核' },{ title: '采购审核' }]
this.active = 1
@@ -1422,8 +1433,8 @@ export default {
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '场长审核' }, { title: '采购审核' }]
this.active = 4
} else if (this.seeTemp.statue === 11) {
- this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
- this.active = 5
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson }, { title: '采购审核' }]
+ this.active = 5
} else if (this.seeTemp.statue === 12) {
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核' , date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson, status: 'error', reason: reason }, { title: '采购审核' }]
this.active = 5
@@ -1435,11 +1446,46 @@ export default {
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '场长审核', date: this.seeTemp.fielddate, name: this.seeTemp.fieldPerson },{ title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
this.active = 6
+ if (this.seeTemp.statue === 2) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' },{ title: '采购审核' }]
+ this.active = 1
+ } else if (this.seeTemp.statue === 3) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
+ this.active = 2
+ } else if (this.seeTemp.statue === 4) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson, status: 'error', reason: reason },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '采购审核' }]
+ } else if (this.seeTemp.statue === 9) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson },{ title: '供应主管审核' }, { title: '采购审核' }]
+ this.active = 3
+ } else if (this.seeTemp.statue === 10) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson, status: 'error', reason: reason }, { title: '供应主管审核' }, { title: '采购审核' }]
+ } else if (this.seeTemp.statue === 5) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核' }]
+ this.active = 4
+ } else if (this.seeTemp.statue === 6) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }, { title: '采购审核' }]
+ } else if (this.seeTemp.statue === 11) {
+ } else if (this.seeTemp.statue === 12) {
+ } else if (this.seeTemp.statue === 7) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson }]
+ this.active = 6
+ } else if (this.seeTemp.statue === 8) {
+ this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核', date: this.seeTemp.KGChargedate, name: this.seeTemp.KGChargePerson }, { title: '设备主管审核', date: this.seeTemp.equipmentdate, name: this.seeTemp.equipmentPerson }, { title: '供应主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }, { title: '采购审核', date: this.seeTemp.CGChargedate, name: this.seeTemp.CGChargePerson, status: 'error', reason: reason }]
} else if(this.seeTemp.purchase_type == 3){
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }]
}else {
- // 待写
this.activeList = [{ title: '备件申购', date: this.seeTemp.inputTime, name: this.seeTemp.empname }, { title: '库管审核' },{ title: '设备主管审核' }, { title: '供应主管审核' }, { title: '财务审核' },{ title: '场长审核' },{ title: '采购审核' }]
@@ -1481,15 +1527,44 @@ export default {
this.active = 7
getSeeList() {
+ this.listLoadingSee = true
GetDataByName(this.getdataListSee).then(response => {
if (response.data.list !== null) {
console.log('查看下方table数据', response.data.list)
this.listSee = response.data.list
this.listAdd = response.data.list
+ var sumPrices = 0
+ response.data.list.forEach(function(i,j){
+ sumPrices = sumPrices + (parseFloat(i.price1) *parseFloat(i.amount) )
+ console.log("总价sumPrices",sumPrices)
+ var priceObj = false
+ var priceArr = []
+ if(parseFloat(i.price1) >= 500){
+ priceArr.push(true)
+ priceArr.push(false)
+ if (priceArr.includes(true)) {
+ priceObj = true
+ priceObj = false
+ console.log("priceObj",priceObj)
+ //总价大于2000 或单价>500
+ if(sumPrices >= 2000 || priceObj){
+ this.isApplyEx4 = true
+ this.getFlowPath()
for (let i = 0; i < response.data.list.length; i++) {
if (response.data.list[i].srcpath !== null && response.data.list[i].picpath !== null && response.data.list[i].srcpath !== undefined && response.data.list[i].picpath !== undefined) {
console.log(process.env.VUE_APP_BASE_API + response.data.list[i].srcpath, '=======1')
@@ -1506,8 +1581,6 @@ export default {
this.listAdd[i].srcpath = ''
this.listAdd[i].picpath = ''
- console.log(process.env.VUE_APP_BASE_API)
- console.log(this.listSee, '============')
if (response.data.total) {
@@ -1869,17 +1942,21 @@ export default {
this.examineTemp = this.seeTemp
this.$set(this.seeTemp, 'statue', 1)
this.$set(this.seeTemp, 'workflowNote', '')
+ this.getdataListSee.parammaps.id = this.seeTemp.id
this.examineTemp = Object.assign({}, row)
+ this.getdataListSee.parammaps.id = this.examineTemp.id
this.$set(this.examineTemp, 'statue', 1)
this.$set(this.examineTemp, 'workflowNote', '')
+ this.getSeeList()
this.dialogStatus = 'examine3'
this.dialogFormVisible_Examine = true
this.statueReason = false
createExamineData3() {
console.log('点击了供应主管审核')
+ console.log(this.isApplyEx4,'=====')
this.isokDisable = true
this.isokDisable = false
@@ -1891,12 +1968,30 @@ export default {
this.requestParam.parammaps = {}
this.requestParam.parammaps.id = this.examineTemp.id
if (this.examineTemp.statue == 1) {
- this.requestParam.parammaps.statue = 5
+ if(this.examineTemp.purchase_type !== 1 && this.examineTemp.purchase_type !== 3){
+ this.requestParam.parammaps.statue = 5
+ this.requestParam.parammaps.statue = 11
} else if (this.examineTemp.statue == 2) {
- this.requestParam.parammaps.statue = 6
+ this.requestParam.parammaps.statue = 6
+ this.requestParam.parammaps.statue = 12
this.requestParam.parammaps.empId = Cookies.get('employeid')
this.requestParam.parammaps.workflowNote = this.examineTemp.workflowNote
+ // return false
PostDataByName(this.requestParam).then(response => {
console.log('审核确认发送参数', this.requestParam)
@@ -2113,7 +2208,7 @@ export default {
getProviderList(){
let data = {
"name":"getProviderList",
- "page":1,"offset":1,"pagecount":100,
+ "page":1,"offset":1,"pagecount":0,
"returntype":"Map","parammaps":{"providerName":""}
GetDataByName(data).then(response => {
@@ -41,18 +41,18 @@
<el-table-column label="牧场" min-width="150px" align="center" prop="pastureName" />
<el-table-column label="物料凭证号" min-width="150px" align="center" prop="materialCode" />
- <el-table-column label="物料凭证年度" min-width="150px" align="center" prop="proofYear" />
+ <!-- <el-table-column label="物料凭证年度" min-width="150px" align="center" prop="proofYear" /> -->
<el-table-column label="凭证中的过账信息" min-width="150px" align="center" prop="chargeDate" />
<el-table-column label="设备管理平台单号" min-width="150px" align="center" prop="orderNumber" />
- <el-table-column label="是否已开票" min-width="150px" align="center" show-overflow-tooltip v-if="table1.getdataListParm.parammaps.writeoffType == '备件入库' || table1.getdataListParm.parammaps.writeoffType == '备件退货'" >
- <span v-if="scope.row.hasTicket == 1">是</span>
- <span v-if="scope.row.hasTicket == 0">否</span>
- <span v-if="scope.row.hasTicket == ''"> </span>
- <el-table-column label="设备管理平台行号" min-width="150px" align="center" prop="rowNumber" />
+ <!-- <el-table-column label="是否已开票" min-width="150px" align="center" show-overflow-tooltip v-if="table1.getdataListParm.parammaps.writeoffType == '备件入库' || table1.getdataListParm.parammaps.writeoffType == '备件退货'" >
+ <span v-if="scope.row.hasTicket == 1">是</span>
+ <span v-if="scope.row.hasTicket == 0">否</span>
+ <span v-if="scope.row.hasTicket == ''"> </span>
+ <!-- <el-table-column label="设备管理平台行号" min-width="150px" align="center" prop="rowNumber" /> -->
<el-table-column label="状态" min-width="150px" align="center" prop="status" />
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
@@ -1,1162 +0,0 @@
- <div class="generalTitle"> 现代牧业设备管理系统 </div>
- <div class="date"> {{ row1.date }} </div>
- <el-row :gutter="5" class="row2">
- <dv-border-box-8 :dur="-1" style="height:500px;">
- <!-- <div class="Title">费用统计</div> -->
- <div id="row2Chart1" style="width: 100%;height:450px;" />
- <el-row :gutter="5" class="groupNews">
- <el-col :span="8">
- <dv-border-box-8 :dur="-1" class="news">
- <b>设备指标预算</b><br>
- <span>{{ row2.chart1.list.monthBudgets }}万元</span>
- </dv-border-box-8>
- <b>设备指标实际</b><br>
- <span>{{ row2.chart1.list.sumPrice }}万元</span>
- <b>迄今达成率</b><br>
- <span>{{ row2.chart1.list.donerate }}</span>
- <div v-if="row2.chart1.isPastureList" class="pastureNews">
- <dv-border-box-8 :dur="-1" class="newsTitle"><b>{{ row2.chart1.pasture.pastureName }}</b></dv-border-box-8>
- <dv-border-box-8 :dur="-1" class="news2">
- <b>设备指标预算:</b><span>{{ row2.chart1.pasture.list.monthBudgets }}万元</span><br>
- <b>设备指标实际:</b><span>{{ row2.chart1.pasture.list.sumPrice }}万元</span><br>
- <b>迄今达成率:</b><span>{{ row2.chart1.pasture.list.donerate }}</span>
- <el-col :span="14">
- <div class="Title">设备状态统计</div>
- <div id="row2Chart2" style="width: 100%;height:480px;" />
- <div class="Indexbutton">
- <a @click="form_seeDetails('row2Chart2')">查看详情</a>
- <div class="Title">保养完成率</div>
- <div class="IndexTable">
- :key="row2.chart3.tableKey"
- v-loading="row2.chart3.listLoading"
- :data="row2.chart3.list"
- class="table-fixed Indextable"
- :height="480"
- :header-cell-style="{background:'#003366',color:'#fff',fontSize:'8px',lineHeight:'12px'}"
- <el-table-column v-if="row2.chart3.isPasture" label="牧场" min-width="80px" align="center" prop="name" />
- <el-table-column v-if="row2.chart3.isType" label="设备类型" min-width="80px" align="center" prop="typeName" />
- <el-table-column label="保养计划" min-width="70px" align="center" prop="totaluk" />
- <el-table-column label="完成数" min-width="60px" align="center" prop="doneuk" />
- <el-table-column label="保养完成率" min-width="80px" align="center" prop="donerate" />
- <a @click="form_seeDetails('row2Chart3')">查看详情</a>
- <el-col :span="24" style="display:none">
- <dv-border-box-8 :dur="-1" style="height:250px;">
- <div class="Title">资产运转率</div>
- <div id="row2Chart4" style="width: 100%;height:190px;" />
- <a @click="form_seeDetails('row2Chart4')">查看详情</a>
- <el-row :gutter="5" style="height:300px;color: #fff;">
- <dv-border-box-8 :dur="-1" style="height:300px;">
- <div class="Title">费用统计</div>
- <div class="costStatistics">
- <div class="content">
- <dv-border-box-8 :dur="-1" style="height:260px;">
- <div class="title">
- <svg-icon icon-class="维修成本分析" />
- 维修费
- <el-row :gutter="5" style="height:260px;color: #fff;">
- <el-col :span="8" style="padding:0 0 0 10px;">
- <div class="contentLeft">
- <b>预算</b><span>{{ row3.chart1.list.data1 }}元</span>
- <b>实际</b><span>{{ row3.chart1.list.data2 }}元</span>
- <b>单头牛实际</b><span>{{ row3.chart1.list.data3 }}元</span>
- <a @click="form_seeDetails('row3Chart1')">查看详情</a>
- <el-col :span="16" style="padding:0 10px 0 0 ;">
- <dv-border-box-8 :dur="-1" style="height:200px;">
- <div id="row3Chart1" style="width: 100%;height:200px;" />
- <svg-icon icon-class="水量分析" />
- 水费
- <b>预算</b><span>{{ row3.chart2.list.data1 }}元</span>
- <b>实际</b><span>{{ row3.chart2.list.data2 }}元</span>
- <b>单头牛实际</b><span>{{ row3.chart2.list.data3 }}元</span>
- <a @click="form_seeDetails('row3Chart2')">查看详情</a>
- <div id="row3Chart2" style="width: 100%;height:200px;" />
- <svg-icon icon-class="电量分析" />
- 电费
- <b>预算</b><span>{{ row3.chart3.list.data1 }}元</span>
- <b>实际</b><span>{{ row3.chart3.list.data2 }}元</span>
- <b>单头牛实际</b><span>{{ row3.chart3.list.data3 }}元</span>
- <a @click="form_seeDetails('row3Chart3')">查看详情</a>
- <div id="row3Chart3" style="width: 100%;height:200px;" />
- <svg-icon icon-class="燃动分析" />
- 燃动费
- <b>预算</b><span>{{ row3.chart4.list.data1 }}元</span>
- <b>实际</b><span>{{ row3.chart4.list.data2 }}元</span>
- <b>单头牛实际</b><span>{{ row3.chart4.list.data3 }}元</span>
- <a @click="form_seeDetails('row3Chart4')">查看详情</a>
- <div id="row3Chart4" style="width: 100%;height:200px;" />
-import { GetReportform, GetDataByName } from '@/api/common'
-import { parseTime } from '@/utils/index.js'
-import 'echarts/map/js/china'
-import $ from 'jquery'
- name: 'DashboardEditor',
- row1: {
- date: parseTime(new Date(), '{y}-{m}-{d}')
- row2: {
- chart1: {
- // 地图
- name: 'homepagePastureInfor',
- data: [],
- Chart: null,
- // 预算、实际、达成率
- get_table_dataParm: {
- name: 'homepageRate',
- pastureName: '现代牧业'
- list: {},
- isPastureList: false,
- pasture: {
- page: 1,
- offset: 1,
- pastureName: ''
- pastureName: '',
- list: []
- chart2: {
- name: 'homepageEqstatus',
- Chart: null
- chart3: {
- name: 'homepageUkdoneRatePasture',
- pagecount: 0,
- isType: false,
- isPasture: true
- chart4: {
- name: 'homepageEqRunstatueListPasture',
- type: '牧场'
- row3: {
- name: 'homepageFeeWX',
- type: '至今',
- list: {}
- name: 'homepageFeeWater',
- name: 'homepageFeeElec',
- name: 'homepageFeeDiesel',
- rowStyle: { maxHeight: 20 + 'px', height: 20 + 'px', background: '#003366', color: '#fff', fontSize: '8px' },
- cellStyle: { padding: 0 + 'px', background: '#003366', color: '#fff', fontSize: '8px' }
- this.getRow2List1()
- this.getRow2Chart1()
- form_seeDetails(item) {
- if (item == 'row2Chart2') {
- console.log('设备状态统计')
- this.$router.push('/report/EquipmentOverview')
- } else if (item == 'row2Chart3') {
- console.log('保养完成率')
- this.$router.push('/report/CompletionRateMaintenance')
- } else if (item == 'row2Chart4') {
- console.log('资产运转率')
- this.$router.push('/report/EquipmentOperation')
- } else if (item == 'row3Chart1') {
- console.log('维修费')
- this.$router.push('/report/QueryRepair')
- } else if (item == 'row3Chart2') {
- console.log('水费')
- this.$router.push('/report/QueryWater')
- } else if (item == 'row3Chart3') {
- console.log('电费')
- this.$router.push('/report/QueryElec')
- } else if (item == 'row3Chart4') {
- console.log('燃动费')
- this.$router.push('/report/QueryCombustion')
- getRow2List1() {
- GetDataByName(this.row2.chart1.get_table_dataParm).then(response => {
- this.row2.chart1.list = response.data.list[0]
- this.row2.chart1.list.donerate = ''
- this.row2.chart1.list.monthBudgets = ''
- this.row2.chart1.list.sumPrice = ''
- getRow2Chart1() {
- GetReportform(this.row2.chart1.getdataListParm).then(response => {
- console.log('row2图2', response)
- if (response.data !== null) {
- this.row2.chart1.data = response.data
- this.row2.chart1.data = []
- this.getRow2Chart2()
- this.roadRow2Chart1(this.row2.chart1.data)
- roadRow2Chart1(chart_data1) {
- if (this.row2.chart1.Chart != null) {
- this.row2.chart1.Chart.dispose()
- this.row2.chart1.Chart = echarts.init(document.getElementById('row2Chart1'))
- var uploadedDataURL = '/datas/myMap.json'
- $.getJSON(uploadedDataURL, function(geoJson) {
- echarts.registerMap('china', geoJson)
- var geoCoordMap = chart_data1.data1[0]
- var data = chart_data1.data2
- console.log('geoCoordMap', JSON.stringify(geoCoordMap) )
- console.log('data', JSON.stringify(data))
- var max = 480; var min = 9
- var maxSize4Pin = 100; var minSize4Pin = 20
- var convertData = function(data) {
- var res = []
- for (var i = 0; i < data.length; i++) {
- var geoCoord = geoCoordMap[data[i].name]
- if (geoCoord) {
- res.push({ name: data[i].name, value: geoCoord.concat(data[i].value) })
- return res
- console.log('convertData', JSON.stringify(convertData))
- var conDatatest1 = convertData(data)
- console.log('convertData Data', JSON.stringify(conDatatest1))
- var symbolImg = 'image://' + require('@/assets/images/1.png') // 或者import引入在拼接也行
- title: '',
- orient: 'vertical',
- y: 'bottom',
- x: 'right',
- data: ['pm2.5'],
- textStyle: {
- color: '#fff'
- visualMap: {
- show: false,
- min: 0,
- max: 600,
- left: 'left',
- top: 'bottom',
- text: ['高', '低'], // 文本,默认为数值文本
- calculable: true,
- seriesIndex: [1],
- inRange: {}
- geo: {
- map: 'china',
- show: true,
- roam: true, // 鼠标滚动放大缩小
- label: {
- normal: {
- show: false
- emphasis: {
- itemStyle: {
- areaColor: '#3a7fd5',
- borderColor: '#0a53e9', // 线
- shadowColor: '#092f8f', // 外发光
- shadowBlur: 20
- areaColor: '#0a2dae' // 悬浮区背景
- series: [{
- symbolSize: 5,
- formatter: '{b}',
- position: 'bottom',
- lineHeight: 30,
- show: true
- name: 'light',
- type: 'scatter',
- coordinateSystem: 'geo',
- data: convertData(data)
- }, {
- type: 'map',
- geoIndex: 0,
- aspectScale: 0.75, // 长宽比
- showLegendSymbol: false, // 存在legend时显示
- roam: true,
- areaColor: '#031525',
- borderColor: '#FFFFFF'
- areaColor: '#2B91B7'
- animation: false,
- data: data
- name: 'Top 5',
- // symbol: 'pin',
- symbol: symbolImg,
- symbolSize: [20, 20],
- right: 100,
- textStyle: { color: '#fff', fontSize: 9 },
- formatter(value) {
- return value.data.value[2]
- color: '#D8BC37',
- marginRight: 100
- data: convertData(data),
- showEffectOn: 'render',
- rippleEffect: {
- brushType: 'stroke'
- hoverAnimation: true,
- zlevel: 1
- }]
- that.row2.chart1.Chart.setOption(option)
- that.row2.chart1.Chart.on('click', function(param, i) {
- if (param.value.length !== undefined) {
- that.row2.chart2.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart3.getdataListParm.name = 'homepageUkdoneRateEqclass'
- that.row2.chart3.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart3.isType = true
- that.row2.chart3.isPasture = false
- that.row2.chart4.getdataListParm.name = 'homepageEqRunstatueListEqclass'
- that.row2.chart4.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart4.getdataListParm.parammaps.type = '设备类别'
- that.row2.chart1.pasture.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart1.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart2.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart3.getdataListParm.parammaps.pastureName = param.name
- that.row3.chart4.getdataListParm.parammaps.pastureName = param.name
- that.row2.chart1.pasture.pastureName = param.name
- that.getRow2PastureList()
- that.getRow2Chart2()
- that.row2.chart2.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row2.chart3.isType = false
- that.row2.chart3.isPasture = true
- that.row2.chart3.getdataListParm.name = 'homepageUkdoneRatePasture'
- that.row2.chart3.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row2.chart4.getdataListParm.name = 'homepageEqRunstatueListPasture'
- that.row2.chart4.getdataListParm.parammaps.type = '牧场'
- that.row2.chart4.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart1.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart2.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart3.getdataListParm.parammaps.pastureName = '现代牧业'
- that.row3.chart4.getdataListParm.parammaps.pastureName = '现代牧业'
- that.getRow2Chart1()
- that.row2.chart1.isPastureList = false
- that.row2.chart1.Chart.resize()
- // 牧场
- getRow2PastureList() {
- this.row2.chart1.pasture.listLoading = true
- GetDataByName(this.row2.chart1.pasture.getdataListParm).then(response => {
- this.row2.chart1.pasture.list = response.data.list[0]
- console.log('牧场数据', this.row2.chart1.pasture.list)
- this.row2.chart1.isPastureList = true
- this.row2.chart1.pasture.list.donerate = ''
- this.row2.chart1.pasture.list.monthBudgets = ''
- this.row2.chart1.pasture.list.sumPrice = ''
- this.row2.chart1.pasture.listLoading = false
- // 设备状态统计
- getRow2Chart2() {
- GetReportform(this.row2.chart2.getdataListParm).then(response => {
- this.row2.chart2.data = response.data
- this.row2.chart2.data = []
- this.getRow2Chart3()
- this.roadRow2Chart2(this.row2.chart2.data)
- roadRow2Chart2(chart_data1) {
- if (this.row2.chart2.Chart != null) {
- this.row2.chart2.Chart.dispose()
- this.row2.chart2.Chart = echarts.init(document.getElementById('row2Chart2'))
- title: { text: '', textStyle: { color: '#769cfc' }},
- tooltip: { trigger: 'axis' },
- color: ['#769cfc'],
- grid: { left: '3%', right: '13%', top: '15%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: '状态', data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '台数', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff' }}}],
- type: 'bar',
- barWidth: 30,
- data: chart_data1.data2,
- emphasis: { label: { show: true, position: 'inside' }}
- this.row2.chart2.Chart.setOption(option)
- this.row2.chart2.Chart.resize()
- // 保养完成率
- getRow2Chart3() {
- this.row2.chart3.listLoading = true
- GetDataByName(this.row2.chart3.getdataListParm).then(response => {
- this.row2.chart3.list = response.data.list
- this.row2.chart3.list = []
- this.getRow2Chart4()
- this.row2.chart3.listLoading = false
- // 资产运转率
- getRow2Chart4() {
- GetReportform(this.row2.chart4.getdataListParm).then(response => {
- console.log('row2图4', response)
- this.row2.chart4.data = response.data
- this.row2.chart4.data = []
- this.getRow3Chart1()
- this.roadRow2Chart4(this.row2.chart4.data)
- roadRow2Chart4(chart_data1) {
- if (this.row2.chart4.Chart != null) {
- this.row2.chart4.Chart.dispose()
- this.row2.chart4.Chart = echarts.init(document.getElementById('row2Chart4'))
- grid: { left: '3%', right: '8%', top: '15%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: chart_data1.data3[0],
- axisLabel: {
- interval: 0,
- rotate: 40
- data: chart_data1.data1, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '%', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff' }}}],
- this.row2.chart4.Chart.setOption(option)
- this.row2.chart4.Chart.resize()
- getRow3Chart1() {
- GetReportform(this.row3.chart1.getdataListParm).then(response => {
- console.log('row3图1', response)
- this.row3.chart1.data.data1 = response.data.data1
- this.row3.chart1.data.data2 = response.data.data2
- this.row3.chart1.data.data3 = response.data.data3
- this.row3.chart1.data.data4 = response.data.data4
- this.row3.chart1.data.data5 = response.data.data5
- this.row3.chart1.list.data1 = response.data.data6[0]
- this.row3.chart1.list.data2 = response.data.data7[0]
- this.row3.chart1.list.data3 = response.data.data8[0]
- this.row3.chart1.data = {}
- this.row3.chart1.list = {}
- this.getRow3Chart2()
- this.roadRow3Chart1(this.row3.chart1.data)
- roadRow3Chart1(chart_data1) {
- if (this.row3.chart1.Chart != null) {
- this.row3.chart1.Chart.dispose()
- this.row3.chart1.Chart = echarts.init(document.getElementById('row3Chart1'))
- data: [
- { name: '今年预算', icon: 'circle' },
- { name: '今年实际', icon: 'circle' },
- { name: '今年内控', icon: 'circle' },
- { name: '去年同期实际', icon: 'circle' }
- itemWidth: 5,
- itemHeight: 5,
- itemGap: 5,
- y: 10,
- textStyle: { color: '#fff', fontSize: '10' }
- color: ['#2dc0e8', '#769cfc', '#e69cfc', '#FFB800'],
- grid: { left: '3%', right: '10%', bottom: '4%', containLabel: true },
- xAxis: [{ type: 'category', name: '时间', nameTextStyle: { padding: [0, 0, -20, -30] }, data: chart_data1.data1, axisLabel: { interval: 0 }, axisLine: { lineStyle: { color: '#fff' }}}],
- yAxis: [{ type: 'value', name: '', axisLabel: { formatter: '{value}' }, axisLine: { lineStyle: { color: '#fff', width: 1 }}}],
- name: '今年预算',
- fontSize: 12,
- fontWeight: 'bolder',
- barWidth: 10,
- name: '今年实际',
- data: chart_data1.data3,
- name: '今年内控',
- data: chart_data1.data4,
- name: '去年同期实际',
- data: chart_data1.data5,
- this.row3.chart1.Chart.setOption(option)
- this.row3.chart1.Chart.resize()
- getRow3Chart2() {
- GetReportform(this.row3.chart2.getdataListParm).then(response => {
- console.log('row3图2', response)
- this.row3.chart2.data.data1 = response.data.data1
- this.row3.chart2.data.data2 = response.data.data2
- this.row3.chart2.data.data3 = response.data.data3
- this.row3.chart2.data.data4 = response.data.data4
- this.row3.chart2.data.data5 = response.data.data5
- this.row3.chart2.list.data1 = response.data.data6[0]
- this.row3.chart2.list.data2 = response.data.data7[0]
- this.row3.chart2.list.data3 = response.data.data8[0]
- this.row3.chart2.data = {}
- this.row3.chart2.list = {}
- this.getRow3Chart3()
- this.roadRow3Chart2(this.row3.chart2.data)
- roadRow3Chart2(chart_data1) {
- if (this.row3.chart2.Chart != null) {
- this.row3.chart2.Chart.dispose()
- this.row3.chart2.Chart = echarts.init(document.getElementById('row3Chart2'))
- this.row3.chart2.Chart.setOption(option)
- this.row3.chart2.Chart.resize()
- getRow3Chart3() {
- GetReportform(this.row3.chart3.getdataListParm).then(response => {
- console.log('row3图3', response)
- this.row3.chart3.data.data1 = response.data.data1
- this.row3.chart3.data.data2 = response.data.data2
- this.row3.chart3.data.data3 = response.data.data3
- this.row3.chart3.data.data4 = response.data.data4
- this.row3.chart3.data.data5 = response.data.data5
- this.row3.chart3.list.data1 = response.data.data6[0]
- this.row3.chart3.list.data2 = response.data.data7[0]
- this.row3.chart3.list.data3 = response.data.data8[0]
- this.row3.chart3.data = {}
- this.row3.chart3.list = {}
- this.getRow3Chart4()
- this.roadRow3Chart3(this.row3.chart3.data)
- roadRow3Chart3(chart_data1) {
- if (this.row3.chart3.Chart != null) {
- this.row3.chart3.Chart.dispose()
- this.row3.chart3.Chart = echarts.init(document.getElementById('row3Chart3'))
- this.row3.chart3.Chart.setOption(option)
- this.row3.chart3.Chart.resize()
- getRow3Chart4() {
- GetReportform(this.row3.chart4.getdataListParm).then(response => {
- console.log('row3图4', response)
- this.row3.chart4.data.data1 = response.data.data1
- this.row3.chart4.data.data2 = response.data.data2
- this.row3.chart4.data.data3 = response.data.data3
- this.row3.chart4.data.data4 = response.data.data4
- this.row3.chart4.data.data5 = response.data.data5
- this.row3.chart4.list.data1 = response.data.data6[0]
- this.row3.chart4.list.data2 = response.data.data7[0]
- this.row3.chart4.list.data3 = response.data.data8[0]
- this.row3.chart4.data = {}
- this.row3.chart4.list = {}
- this.roadRow3Chart4(this.row3.chart4.data)
- roadRow3Chart4(chart_data1) {
- if (this.row3.chart4.Chart != null) {
- this.row3.chart4.Chart.dispose()
- this.row3.chart4.Chart = echarts.init(document.getElementById('row3Chart4'))
- this.row3.chart4.Chart.setOption(option)
- this.row3.chart4.Chart.resize()
- .app-container {
- background-color: #003366; color: #fff;min-height: 100vh;
- .Title{height: 30px;line-height: 30px;text-align: left;padding-left: 10px;}
- .title{height: 30px;line-height: 30px;text-align: center;}
- .generalTitle{width: 100%;margin-left:150px;text-align: right;font-size: 30px;line-height: 60px;font-weight: 600;}
- .date{width: 100%;text-align: right;font-size: 14px;line-height: 60px;padding-right: 20px;}
- .Indexbutton{
- height: 20px;position: relative;width: 100%;
- a{display: inline-block;height: 20px;line-height: 20px;font-size:10px;text-align: center;background: #769cfc;color: #fff;border-radius: 2px;width: 55px;position: absolute;left: 0;right: 0;top: 5px;bottom: 0;margin: 0 auto;}
- .IndexTable{
- padding: 0 10px;
- .Indextable{background: #003366;}
- .row2{
- height:500px;position: relative;
- .groupNews{
- height:60px;width:70%;z-index: 1;position:absolute;top: 5px;left: 10px;
- .news{
- height:60px;text-align: center;
- b{line-height: 30px;font-size: 14px;}
- span{line-height: 20px;font-size: 12px;}
- .pastureNews{
- height:150px;width:40%;z-index: 1;position:absolute;bottom: 20px;left: 10px;background: #055597;
- .newsTitle{height: 30px;line-height: 30px;padding-left: 10px;}
- .news2{
- height: 120px;padding-left: 10px;font-size: 12px;
- div{
- padding-top: 10px;line-height: 30px;
- b{font-weight: 400;}
- // row3
- .costStatistics{
- display: flex;justify-content: space-between;margin: 0 5px;
- .content{
- flex: 1 1 1 1 auto;
- width: 100%;
- .contentLeft{
- height: 200px;position:relative;
- font-size: 10px;width: 100%;text-align: center;height: 130px;
- position: absolute; top: 0; bottom:0; left: 0; right: 0; margin: auto;
- b{display: block;line-height: 22px;height: 22px;margin-top: 10px;}
- span{display: block;line-height: 22px;height: 22px;}
- b:nth-child(1){
- margin-top: -10px;
- /deep/ .el-table__body-wrapper::-webkit-scrollbar {
- display:block;
- width: 8px;
- height: 8px;
- background-color: rgba(245, 245, 245, 0.47);
- /*定义滚动条的轨道,内阴影及圆角*/
- /deep/ .el-table__body-wrapper::-webkit-scrollbar-track {
- -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
- border-radius: 10px;
- background-color: #f5f5f5;
- /*定义滑块,内阴影及圆角*/
- /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
- /*width: 10px;*/
- height: 20px;
- background-color: rgba(85, 85, 85, 0.25);
@@ -1,72 +1,45 @@
<template>
- <div class="login-container">
- <img src="@/assets/images/logo.png" alt class="logo">
- <img src="@/assets/images/login-bujian.png" alt="" class="bujian">
- <div class="login">
- <div class="logo" />
- <el-form
- ref="loginForm"
- :model="loginForm"
- :rules="loginRules"
- class="login-form"
- auto-complete="on"
- label-position="left"
- <div class="title-container">
- <h3 class="title">设备管理系统</h3>
- <b>Equipment Management System</b>
- <hr>
+ <div v-if="isdisplay == 1"></div>
+ <div class="login-container" v-else>
+ <div class="content-l"></div>
+ <div class="login">
+ <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left" >
+ <div class="title-container">
+ <h3 class="title">万象设备管理系统</h3>
+ <b>WanXiang Equipment Management System</b>
+ <hr>
+ <el-form-item prop="username">
+ <span class="svg-container">
+ <svg-icon icon-class="user" />
+ </span>
+ <el-input ref="username" v-model="loginForm.username" placeholder="Username" name="username" type="text" tabindex="1" auto-complete="on" />
- <el-form-item prop="username">
- <span class="svg-container">
- <svg-icon icon-class="user" />
- </span>
- <el-input
- ref="username"
- v-model="loginForm.username"
- placeholder="Username"
- name="username"
- type="text"
- tabindex="1"
- <el-form-item prop="password">
- <svg-icon icon-class="password" />
- :key="passwordType"
- ref="password"
- v-model="loginForm.password"
- :type="passwordType"
- placeholder="Password"
- name="password"
- tabindex="2"
- @keyup.enter.native="handleLogin"
- <span class="show-pwd" @click="showPwd">
- <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
- <el-button
- :loading="loading"
- type="primary"
- style="width:100%;margin-bottom:30px;background:#009688;"
- @click.native.prevent="handleLogin"
- >登录</el-button>
+ <el-form-item prop="password">
+ <svg-icon icon-class="password" />
+ <el-input :key="passwordType" ref="password" v-model="loginForm.password" :type="passwordType" placeholder="Password" name="password" tabindex="2" auto-complete="on" @keyup.enter.native="handleLogin" />
+ <span class="show-pwd" @click="showPwd">
+ <svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
+ <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;background:#50b5ff;" @click.native.prevent="handleLogin" >登录</el-button>
import { validUsername } from '@/utils/validate'
+import { getJson } from '@/api/common'
+import axios from 'axios';
+import { setToken } from '@/utils/auth' // get token from cookie
export default {
name: 'Login',
data() {
@@ -102,7 +75,8 @@ export default {
loading: false,
passwordType: 'password',
- redirect: undefined
+ redirect: undefined,
+ isdisplay:Cookies.get('sso')
watch: {
@@ -114,13 +88,17 @@ export default {
created() {
- document.onkeydown = function(e) {
- e = window.event || e
- // eslint-disable-next-line eqeqeq
- if (that.$route.path == '/login' && (e.code == 'Enter' || e.code == 'Num Enter')) { // 验证在登录界面和按得键是回车键enter
- that.handleLogin('ruleForm2') // 登录函数 (handleSubmit2('ruleForm2')-登录按钮的点击事件)
+ // var that = this
+ // document.onkeydown = function(e) {
+ // e = window.event || e
+ // // eslint-disable-next-line eqeqeq
+ // if (that.$route.path == '/login' && (e.code == 'Enter' || e.code == 'Num Enter')) { // 验证在登录界面和按得键是回车键enter
+ // that.handleLogin('ruleForm2') // 登录函数 (handleSubmit2('ruleForm2')-登录按钮的点击事件)
+ // }
+ this.getcodeList()
methods: {
@@ -153,6 +131,12 @@ export default {
return false
+ getcodeList(){
+ this.$store.dispatch('user/login', this.loginForm) .then(() => {
+ }).catch(() => {
+ this.loading = false
@@ -220,9 +204,12 @@ $light_gray: #000;
min-height: 100%;
width: 100%;
position: relative;
- background: url("../../assets/images/login-bg.jpg") no-repeat;
- background-size:100%;
+ background: url("../../assets/images/login.png") no-repeat;
+ background-size:cover;
overflow: hidden;
+ display: flex;
+ justify-content: center;
+ align-items: center;
.logo{
padding: 5px;
@@ -235,71 +222,77 @@ $light_gray: #000;
margin: auto;
.login {
- border-radius: 5%;
padding: 30px;
- background: #fff;
- width: 300px;
- height: 310px;
- position: absolute;
- right: 95px;
- top: 0;
bottom: 0;
- .login-form {
- position: relative;
- width: 520px;
- max-width: 100%;
- overflow: hidden;
.tips {
- font-size: 14px;
- color: #fff;
- margin-bottom: 10px;
- span {
- &:first-of-type {
- margin-right: 16px;
+ font-size: 14px; color: #fff; margin-bottom: 10px;
+ span { &:first-of-type { margin-right: 16px; } }
- .svg-container {
- padding: 6px 5px 6px 15px;
- color: $dark_gray;
- vertical-align: middle;
- width: 30px;
- display: inline-block;
+ .svg-container { padding: 6px 5px 6px 15px; color: $dark_gray; vertical-align: middle; width: 30px; display: inline-block; }
.title-container {
- .title {
- font-size: 26px;
- color: $light_gray;
- margin: 0px auto 0 auto;
- text-align: center;
- font-weight: bold;
- b {
- font: 14px/2 "";
+ .title { font-size: 28px; color: $light_gray; margin: 0px auto 0 auto; text-align: center; font-weight: bold; }
+ b { text-align: center; font: 14px/2 ""; display: block; }
- .show-pwd {
- right: 10px;
- top: 7px;
- font-size: 16px;
- cursor: pointer;
- user-select: none;
+ .show-pwd { position: absolute; right: 10px; top: 7px; font-size: 16px; color: $dark_gray; cursor: pointer; user-select: none; }
+ hr { color: #ccc; margin: 20px 0; }
+.content{
+ left: 0;
+ right: 0;
+ bottom: 0;
+ top: 0;
+ margin: 0 auto;
+@media (min-width: 770px) {
+ width: 770px;
+ height: 420px;
- hr {
- color: #ccc;
+ .content-l{
+ float: left;
+ width: 420px;
+ background: url("../../assets/images/login-l.jpg") no-repeat;
+ .login{
+ width: 350px;
+ background: url("../../assets/images/login-r.jpg") no-repeat;
+ .login-form { position: relative; width: 224px; max-width: 100%; overflow: hidden; }
+ @media (min-width: 1100px) {
+ width: 1100px;
+ height: 600px;
+ width: 593px;
+ height: 593px;
+ width: 495px;
+ .login-form { position: relative; width: 330px; max-width: 100%; overflow: hidden; }
@@ -77,7 +77,7 @@
<span>{{ scope.row.departmentName }}</span>
- <el-table-column label="责任人" min-width="100px" align="center">
+ <el-table-column label="机修" min-width="100px" align="center">
<span>{{ scope.row.useEmpName }}</span>
@@ -1,2202 +0,0 @@
- <el-input v-model="getdataListParm.parammaps.upkeepCode" placeholder="保养单号" clearable style="width: 180px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqName" placeholder="设备名称" clearable style="width: 180px;" class="filter-item" />
- <el-input v-model="getdataListParm.parammaps.eqCode" placeholder="设备内部编号" clearable style="width: 180px;" class="filter-item" />
- <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 120px;">
- <el-select v-model="getdataListParm.parammaps.SHStatue" clearable placeholder="审核状态" class="filter-item" style="width: 120px;">
- <el-option v-for="item in SHStatues" :key="item.id" :label="item.name" :value="item.id" />
- <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
- <el-radio-group v-model="radioAll" style="margin-top:-9px" @change="changeAll()">
- <el-radio-button label="全部" />
- <el-badge :value="pending.total" class="item">
- <el-radio-button label="待处理" />
- </el-badge>
- <el-radio-button label="已处理" />
- :cell-style="tableCellStyle"
- class="elTable table-fixed"
- <el-table-column label="保养单号" min-width="140px" align="center">
- <span>{{ scope.row.upkeepCode }}</span>
- <el-table-column label="牧场" min-width="140px" align="center">
- <span>{{ scope.row.pastureName }}</span>
- <el-table-column label="设备内部编号" min-width="80px" align="center">
- <span>{{ scope.row.eqCode }}</span>
- <el-table-column label="设备名称" min-width="100px" align="center">
- <span>{{ scope.row.eqName }}</span>
- <el-table-column label="规格型号" min-width="80px" align="center">
- <el-table-column label="部门" min-width="80px" align="center">
- <span>{{ scope.row.employeName }}</span>
- <el-table-column label="保养人" min-width="100px" align="center">
- <span>{{ scope.row.upkeepPerson }}</span>
- <el-table-column label="保养日期" sortable prop="plantime" min-width="80px" align="center" />
- <el-table-column label="处理状态" min-width="100px" align="center" :formatter="statue" />
- <el-table-column label="领用单状态" min-width="80px" align="center">
- <span>{{ scope.row.LYStatue }}</span>
- <el-table-column label="旧品录入状态" min-width="110px" align="center">
- <span>{{ scope.row.LRStatue }}</span>
- <el-table-column label="审核状态" min-width="80px" align="center" :formatter="SHStatue" />
- <el-table-column prop="img" label="保养过程" width="180" align="center">
- <!-- <el-link @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }} </el-link> -->
- <a style="border-bottom: 1px solid #333;" @click="preview(scope.row)" v-if="scope.row.videoTxt == '已录制'">{{ scope.row.videoTxt }}</a>
- <el-link v-if="scope.row.videoTxt == '未录制'">未录制 </el-link>
- <el-link v-if="scope.row.videoTxt == '已录制未上传'">已录制未上传 </el-link>
- <el-table-column label="操作" align="center" min-width="300" class-name="small-padding fixed-width" fixed="right">
- <el-button v-if="isSee" type="primary" size="mini" @click="form_see(row)">查看</el-button>
- <!-- 保养及领用-->
- <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8 ) && row.LYStatue == '未领用' && row.statue !== 0 && isLingYong && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:80px;display:inline-block" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleReceivingSpareParts(row)">保养及领用</el-button>
- <!-- 完成保养 -->
- <el-button v-if="(row.SHStatue == 1 || row.SHStatue== 4 || row.SHStatue== 6 || row.SHStatue== 8) && row.statue !== 0 && isComplete && row.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleCompleteMaintenance(row)">完成保养</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleCompleteMaintenance(row)">完成保养</el-button>
- <!-- 保养审核 -->
- <el-button v-if="(row.SHStatue == 2 ) && isCharge && row.useEmpId == getdataListParm.parammaps.loginId" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine(row)">保养审核</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine(row)">保养审核</el-button>
- <!-- 保养审核3 -->
- <el-button v-if="(row.SHStatue == 3) && isLeaderCharge" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine2(row)">保养审核3</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine2(row)">保养审核3</el-button>
- <!-- 保养审核2 -->
- <!-- <el-button v-if="(row.SHStatue == 3) && isDepartmentCharge && (row.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" size="mini" style="width:70px;display:inline-block" @click="handleExamine3(row)">保养审核2</el-button>
- <el-button v-else type="success" size="mini" style="width:70px;display:none" @click="handleExamine3(row)">保养审核2</el-button> -->
- <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_See" :close-on-click-modal="false" v-if ="dialogFormVisible_See" width="90%">
- <div class="app-see">
- <div v-if="statue1" class="see">
- ref="seeTemp"
- :rules="rules"
- :model="seeTemp"
- label-position="right"
- label-width="120px"
- style="width: 90%;margin:0 auto;"
- <el-form-item label="保养单号:" prop="upkeepCode">
- <el-input ref="upkeepCode" v-model="seeTemp.upkeepCode" disabled />
- <el-form-item label="设备名称:" prop="eqName">
- <el-input ref="eqName" v-model="seeTemp.eqName" disabled />
- <el-form-item label="设备内部编号:" prop="eqCode">
- <el-input ref="eqCode" v-model="seeTemp.eqCode" disabled />
- <el-form-item label="牧场:" prop="pastureName">
- <el-input ref="pastureName" v-model="seeTemp.pastureName" disabled />
- <el-form-item label="部门:" prop="departmentName">
- <el-input ref="departmentName" v-model="seeTemp.departmentName" disabled />
- <el-form-item label="责任人:" prop="employeName">
- <el-input ref="employeName" v-model="seeTemp.employeName" disabled />
- <!-- <el-form-item label="保养人:" prop="upkeepPerson">
- <el-input ref="upkeepPerson" v-model="seeTemp.upkeepPerson" disabled />
- </el-form-item> -->
- <el-form-item label="保养人:" prop="useEmpName">
- <el-input ref="useEmpName" v-model="seeTemp.useEmpName" disabled />
- <el-form-item label="保养日期:" prop="plantime">
- <el-input ref="plantime" v-model="seeTemp.plantime" disabled />
- <!-- <el-form-item label="使用人:" prop="useEmpName">
- <el-form-item label="使用人:" prop="upkeepPerson">
- <el-form-item label="保养内容:" prop="upNameLevel">
- <el-input ref="upNameLevel" v-model="seeTemp.upNameLevel" disabled />
- v-loading="listLoadingMaintenanceContent"
- :data="listMaintenanceContent"
- <el-table-column label="部位" min-width="140px" align="center">
- <span>{{ scope.row.positionName }}</span>
- <el-table-column label="项目" min-width="140px" align="center">
- <span>{{ scope.row.program }}</span>
- <el-table-column label="标准" min-width="80px" align="center">
- <span>{{ scope.row.standard }}</span>
- <el-table-column label="执行动作" min-width="80px" align="center">
- <span>{{ scope.row.active }}</span>
- <div>{{ item.scores }}</div>
- <el-form-item label="操作:">
- <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.LYStatue == '未领用' && seeTemp.statue !== 0 && isLingYong && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <el-button v-else type="success" style="display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <el-button v-if="(seeTemp.SHStatue == 1 || seeTemp.SHStatue== 4 || seeTemp.SHStatue== 6 || seeTemp.SHStatue== 8) && seeTemp.statue !== 0 && isComplete && seeTemp.upkeepPersonId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleCompleteMaintenance()">完成保养</el-button>
- <el-button v-else type="success" style="display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
- <el-button v-if="seeTemp.SHStatue == 2 && isCharge && seeTemp.useEmpId == getdataListParm.parammaps.loginId" type="success" style="display:inline-block" @click="handleExamine()">保养审核</el-button>
- <el-button v-else type="success" style="display:none" @click="handleExamine()">保养审核</el-button>
- <el-button v-if="(seeTemp.SHStatue == 3) && isLeaderCharge" type="success" style="display:inline-block" @click="handleExamine2()">保养审核3</el-button>
- <el-button v-else type="success" style="display:none" @click="handleExamine2()">保养审核3</el-button>
- <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="width:70px;display:inline-block" @click="handleExamine3()">保养审核2</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine3()">保养审核2</el-button> -->
- <div v-if="statue2" class="see">
- <el-tabs v-model="activeName">
- <el-tab-pane label="保养信息" name="first">
- <el-button v-else type="success" style="width:70px;display:none" @click="handleReceivingSpareParts()">保养及领用</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleCompleteMaintenance()">完成保养</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine()">保养审核</el-button>
- <el-button v-else type="success" style="width:70px;display:none" @click="handleExamine2()">保养审核3</el-button>
- <!-- <el-button v-if="(seeTemp.SHStatue == 3) && isDepartmentCharge && (seeTemp.departmentId ==getdataListParm.parammaps.logindeptId)" type="success" style="display:inline-block" @click="handleExamine3()">保养审核2</el-button>
- <el-tab-pane label="领用记录" name="second">
- <el-form ref="collarUseTemp" :rules="rules" :model="collarUseTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
- <el-form-item label="领用单号:" prop="applyCode">
- <span>{{ collarUseTemp.applyCode }}</span>
- <el-form-item label="领用部门:" prop="departmentName">
- <span>{{ collarUseTemp.departmentName }}</span>
- <el-form-item label="领用日期:" prop="createDate">
- <span>{{ collarUseTemp.createDate }}</span>
- <el-form-item label="领用状态:" prop="statueName">
- <span>{{ collarUseTemp.statueName }}</span>
- v-loading="listLoadingCollarUse"
- :data="listCollarUse"
- @cell-click="openDetails"
- <el-table-column label="备件编号" min-width="110px" align="center">
- <el-table-column label="备件名称" min-width="110px" align="center">
- <el-table-column label="备件规格" min-width="110px" align="center">
- <el-table-column sortable prop="reportery" label="库存数" min-width="110px" align="center">
- <span>{{ scope.row.reportery }}</span>
- <el-table-column sortable prop="amount" label="领用数量" min-width="110px" align="center">
- <span>{{ scope.row.amount }}</span>
- <el-table-column label="用途" min-width="110px" align="center">
- <span>{{ scope.row.note }}</span>
- <el-tab-pane label="旧品录入记录" name="third">
- v-loading="listLoadingOldProducts"
- :data="listOldProducts"
- <el-table-column label="备件名称" prop="id" align="center">
- <el-table-column sortable prop="acturalAmount" label="录入数量" min-width="110px" align="center">
- <span>{{ scope.row.acturalAmount }}</span>
- <div slot="footer" class="dialog-footer" style="bottom:5px;">
- <el-button @click="close_diago()">关闭</el-button>
- <!-- 保养及领用 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_ReceivingSpareParts" :close-on-click-modal="false" width="90%">
- <el-tabs v-model="activeName2">
- <el-tab-pane label="保养" name="first">
- ref="maintainTemp"
- :model="maintainTemp"
- <el-form-item label="使用人:" prop="employeeId">
- <el-select v-model="maintainTemp.employeeId" placeholder="使用人" class="filter-item" style="width: 120px;">
- <el-option v-for="item in empdeptList" :key="item.id" :label="item.empname" :value="item.id" />
- <el-input ref="upNameLevel" v-model="maintainTemp.upNameLevel" disabled />
- <el-select v-model="scope.row.active" class="filter-item" style="width: 80%;">
- <el-option v-for="item in getDictByName" :key="item.id" :label="item. label" :value="item.value" />
- <el-tab-pane label="备件领用" name="second">
- <div class="app-receivingSpareParts">
- ref="receivingTemp"
- :model="receivingTemp"
- <span>{{ receivingTemp.applyCode }}</span>
- <span>{{ receivingTemp.departmentName }}</span>
- <span>{{ receivingTemp.createDate }}</span>
- <el-form-item label="所需备件:" prop="partCode">
- <el-autocomplete
- v-model="receivingTemp.partCode"
- value-key="name"
- class="inline-input"
- :fetch-suggestions="sparePartSearch"
- placeholder="请输入备件编号或备件名称或备件规格"
- style="width:100%"
- @select="handleSelectSparePart"
- <b>备件编号:</b><span class="name">{{ item.partCode }}</span>
- |<b>备件名称:</b><span class="addr">{{ item.partName }}</span>
- |<b style="padding-left:3em;">备件规格:</b><span class="addr">{{ item.specification }}</span>
- <!-- table表格 -->
- <el-table-column label="库存数" min-width="110px" align="center">
- <el-table-column label="领用数量" min-width="110px" align="center">
- <el-form :model="scope.row">
- <el-form-item prop="amount">
- <el-input ref="amount" v-model="scope.row.amount" style="margin-top:15px" />
- <el-table-column label="用途" prop="note" align="center" min-width="60">
- <el-form-item prop="note">
- <el-input ref="note" v-model="scope.row.note" style="margin-top:15px" />
- <el-table-column label="操作" align="center" width="60" class-name="small-padding fixed-width" fixed="right">
- <a class="del" @click="sparePartsDelete(row)">删除</a>
- <div slot="footer" class="dialog-footer" style="bottom: 5px">
- <el-button v-if="activeName2=='first'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData1()">确认</el-button>
- <el-button v-if="activeName2=='second'" type="primary" :disabled="isokDisable" @click="createReceivingSparePartseData2()">确认</el-button>
- <el-button @click="dialogFormVisible_ReceivingSpareParts = false;">关闭</el-button>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_maintainComplete" :close-on-click-modal="false" width="50%">
- <div class="maintainComplete">
- <el-form ref="maintainCompleteTemp" :rules="rules" :model="maintainCompleteTemp" label-position="right" label-width="120px" style="width: 90%;margin:0 auto;">
- <el-form-item label="是否录入旧品:" prop="isOldProducts">
- <el-radio-group v-model="maintainCompleteTemp.isOldProducts" @change="changeIsOldProducts">
- <el-radio :label="0" checked>否</el-radio>
- <el-radio :label="1">是</el-radio>
- <el-row v-if="No2">
- <el-form-item label="旧品录入:" prop="partCode">
- v-model="maintainCompleteTemp.partCode"
- :fetch-suggestions="oldProductsSearch"
- placeholder="请输入备件编号或备件名称或备件规格 "
- @select="handleSelectOldProducts"
- v-if="No2"
- :data="listAdd"
- style="width: 100%;margin-bottom:30px"
- <el-table-column type="index" label="序号" align="center" width="50px" />
- <el-table-column label="备件编号" min-width="90px" prop="partCode" align="center">
- <el-table-column label="备件名称" min-width="60px" align="center">
- <span>{{ scope.row.partName }}</span><br>
- <el-table-column label="备件规格" prop="specification" align="center" min-width="90">
- <el-table-column label="录入数量" prop="brand" align="center" min-width="60">
- <el-form :model="scope.row" :rules="rules">
- <el-form-item prop="acturalAmount">
- <el-input ref="acturalAmount" v-model="scope.row.acturalAmount" style="margin-top:15px" />
- <a class="del" @click="partDelete(row)">删除</a>
- <el-button type="primary" :disabled="isokDisable" @click="dialogStatus==='maintainComplete'?createMaintainCompleteData():createMaintainCompleteData()">确认</el-button>
- <el-button @click="dialogFormVisible_maintainComplete = false;">关闭</el-button>
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_examine" :close-on-click-modal="false" width="30%">
- <h3 style="width: 100%;margin:0 auto;line-height:50px">请确认保养审核结果:</h3>
- <el-form ref="examineTemp" :rules="rules" :model="examineTemp" label-position="right" style="width: 60%;height:150px;margin:0 auto;">
- <el-row style="width:88%;margin:0 auto;">
- <el-radio-group v-model="examineTemp.isStatue" @change="changeIsStatue">
- <el-radio :label="3">通过</el-radio>
- <el-radio :label="4">不通过</el-radio>
- <el-col v-if="isStatueReason" :span="20">
- <el-input v-model="examineTemp.workflowNote" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入保养不通过的原因" />
- <el-row v-if="examineTemp.SHStatue == 2 && examineTemp.isStatue == 3" style="width:90%;margin:0 auto;">
- <el-form-item label="评分:" prop="scores">
- <el-rate v-model="examineTemp.scores" show-text :texts="['1分','2分', '3分', '4分', '5分']" style="width:100%;margin-top:10px;" />
- <el-button v-if="dialogStatus==='examine'" type="primary" :disabled="isokDisable" @click="createExamineData()">确认</el-button>
- <el-button v-if="dialogStatus==='examine2'" type="primary" :disabled="isokDisable" @click="createExamineData2()">确认</el-button>
- <el-button v-if="dialogStatus==='examine3'" type="primary" :disabled="isokDisable" @click="createExamineData3()">确认</el-button>
- <el-button @click="dialogFormVisible_examine = false;">关闭</el-button>
- <!-- 视频 -->
- <el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible_video" :close-on-click-modal="false" width="60%">
- <div class="app-video">
- <el-form ref="videoTemp" :rules="rules" :model="videoTemp" label-position="right" style="width: 80%;min-height:150px;margin:0 auto;">
- <el-form-item label="" prop="scores">
- <video :src="videoTemp.videoPath" controls="controls" style="width:90%;height:450px;margin:0 auto;" />
-import { GetDataByName, GetDataByNames, PostDataByName, failproccess, ExecDataByConfig, checkButtons } from '@/api/common'
-// import { mapGetters } from 'vuex'
-import waves from '@/directive/waves' // waves directive
-import { parseTime, sortChange } from '@/utils/index.js'
-// eslint-disable-next-line no-unused-vars
-import Pagination from '@/components/Pagination' // secondary package based on el-pagination
- name: 'Maintain',
- components: { Pagination },
- myHeight:document.documentElement.clientHeight - 85- 250,
- active: 0,
- employeeId: [{ required: true, message: '必填', trigger: 'blur' }]
- findAllPasture: [],
- findAllDepart: [],
- findAllEmploye: [],
- { name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }},
- { name: 'getDictByName', offset: 0, pagecount: 0, params: ['保养模板执行动作'] }
- getDepartParam: {
- name: 'findAllDepart1', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid'), 'eId': Cookies.get('employeid') }
- statues: [{ id: '0', name: '已逾期' }, { id: '1', name: '保养中' }, { id: '2', name: '保养完成' }],
- SHStatues: [{ id: '0', name: '审核中' }, { id: '1', name: '已通过' }, { id: '2', name: '未通过' }],
- empdeptList: [],
- getDictByName: [],
- radio2: '全部',
- textMap: {
- see: '查看详情',
- receivingSpareParts: '保养及领用',
- maintainComplete: '完成保养',
- examine: '保养审核',
- examine2: '保养审核2',
- examine3: '保养审核3',
- video: '视频'
- radioAll: '全部',
- name: 'getBigupkeepList',
- inputDatetime: '',
- upkeepCode: '',
- eqName: '',
- eqCode: '',
- departmentId: '',
- statue: '',
- pastureName: Cookies.get('pasturename'),
- loginId: Cookies.get('employeid'),
- menu: 'Maintain',
- SHStatue: '',
- logindeptId: Cookies.get('departmentid'),
- loginpastureId: Cookies.get('pastureid')
- listLoading: false,
- // 查看
- statue1: false,
- statue2: false,
- listLoadingMaintenanceContent: false,
- listMaintenanceContent: [],
- getMaintenanceContentParm: {
- name: 'getUpkeepTemplateListbyeqV2',
- Reason: false,
- // 查看-领用记录
- getCollarUseParm: {
- name: 'getPartsapplybyMt',
- collarUseTemp: {},
- // 查看-领用记录table
- getCollarUseListParm: {
- name: 'getpartapplyListBybig',
- listLoadingCollarUse: false,
- listCollarUse: [],
- // 查看-旧品录入记录table
- getOldProductsParm: {
- name: 'getMaintainRefuse',
- listLoadingOldProducts: false,
- listOldProducts: [],
- // 保养及领用
- dialogFormVisible_ReceivingSpareParts: false,
- activeName2: 'first',
- maintainTemp: {},
- receivingTemp: {},
- getEmpdeptParm: {
- name: 'getEmpdept',
- deptId: ''
- getAutoCreatCodeParm: {
- name: 'autoCreatCode',
- pastureId: Cookies.get('pastureid'),
- codeType: 'LY'
- requestSparePart: {
- name: 'getPartsListLY',
- pagecount: 20,
- postDataPramas: {},
- // 完成保养
- dialogFormVisible_maintainComplete: false,
- maintainCompleteTemp: {},
- requestOldProducts: {
- name: 'getAllPartsListWB',
- No2: false,
- listAdd: [],
- // 保养审核
- dialogFormVisible_examine: false,
- requestParam: {},
- examineTemp: {
- isStatue: 3
- isStatueReason: false,
- // 权限按钮
- isSee: [],
- isLingYong: [],
- isComplete: [],
- isCharge: [],
- isLeaderCharge: [],
- isDepartmentCharge: [],
- pending: {
- name: 'getBigupkeepWebListNO', page: 1, offset: 1, getTotal: 'total3', pagecount: 10, returntype: 'Map',
- dialogFormVisible_video: false,
- videoTemp: {},
- requestParam2: {}
- // computed: {
- // ...mapGetters([
- // 'sidebar',
- // 'avatar',
- // 'employeid',
- // 'pastureid'
- // ])
- space() {
- const { isSimple, $parent: { space }} = this
- return isSimple ? '' : space
- style: function() {
- const style = {}
- const parent = this.$parent
- const len = parent.steps.length
- const space =
- typeof this.space === 'number'
- ? this.space + 'px'
- : this.space
- ? this.space
- : 100 / (len - (this.isCenter ? 0 : 1)) + '%'
- style.flexBasis = space
- if (this.isVertical) return style
- if (this.isLast) {
- style.maxWidth = 100 / this.stepsCount + '%'
- style.marginRight = -this.$parent.stepOffset + 'px'
- return style
- if (this.$route.query.myPath !== undefined && this.$route.query.myPath == 'MaintenancePlan') {
- this.getdataListParm.parammaps.eqCode = this.$route.query.eqCode
- this.getdataListParm.parammaps.inputDatetime = [this.$route.query.time, this.$route.query.time]
- this.getdataListParm.parammaps.startTime = this.$route.query.time
- this.getdataListParm.parammaps.stopTime = this.$route.query.time
- this.getPendingList()
- // handleCheck(row) {
- // this.playvideo = row.hotVideoPath // 存储用户点击的视频播放链接
- // this.playvideoName = row.hotVideoPath // 存储用户点击的视频播放链接
- if (this.activeName == 'second') {
- sortChange(column, this.listCollarUse)
- } else if (this.activeName == 'third') {
- sortChange(column, this.listOldProducts)
- const See = 'maintenance:maintain:see'
- const isSee = checkButtons(JSON.parse(sessionStorage.buttons), See)
- this.isSee = isSee
- const LingYong = 'maintenance:maintain:lingyong'
- const isLingYong = checkButtons(JSON.parse(sessionStorage.buttons), LingYong)
- this.isLingYong = isLingYong
- const Complete = 'maintenance:maintain:complete'
- const isComplete = checkButtons(JSON.parse(sessionStorage.buttons), Complete)
- this.isComplete = isComplete
- // 使用人保养审核
- const Charge = 'maintenance:maintain:charge'
- const isCharge = checkButtons(JSON.parse(sessionStorage.buttons), Charge)
- this.isCharge = isCharge
- // 主管审核
- const LeaderCharge = 'maintenance:maintain:leaderCharge'
- const isLeaderCharge = checkButtons(JSON.parse(sessionStorage.buttons), LeaderCharge)
- this.isLeaderCharge = isLeaderCharge
- // 部门审核
- const DeptCharge = 'maintenance:maintain:deptcharge'
- const isDepartmentCharge = checkButtons(JSON.parse(sessionStorage.buttons), DeptCharge)
- this.isDepartmentCharge = isDepartmentCharge
- // next() {
- // if (this.active++ > 2) this.active = 0
- // this.finishStatus = 'error'
- close_diago(){
- console.log(11111111111111)
- getPendingList() {
- this.pending.getdataListParm.parammaps = {
- inputDatetime: this.getdataListParm.parammaps.inputDatetime,
- pastureName: this.getdataListParm.parammaps.pastureName,
- SHStatue: this.getdataListParm.parammaps.SHStatue,
- upkeepCode: this.getdataListParm.parammaps.upkeepCode,
- eqName: this.getdataListParm.parammaps.eqName,
- eqCode: this.getdataListParm.parammaps.eqCode,
- departmentId: this.getdataListParm.parammaps.departmentId,
- statue: this.getdataListParm.parammaps.statue,
- loginpastureId: Cookies.get('pastureid'),
- empId: Cookies.get('employeid'),
- deptId: Cookies.get('departmentid')
- GetDataByName(this.pending.getdataListParm).then(response => {
- this.pending.total = response.data.total3
- if (this.getdataListParm.parammaps.inputDatetime !== undefined && this.getdataListParm.parammaps.inputDatetime !== '') {
- this.getdataListParm.parammaps.startTime = this.getdataListParm.parammaps.inputDatetime[0]
- this.getdataListParm.parammaps.stopTime = this.getdataListParm.parammaps.inputDatetime[1]
- this.$set(response.data.list[i], 'img', '视频')
- // Just to simulate the time of the request
- tableCellStyle({ row, column, rowIndex, columnIndex }) {
- if (row.statue == 0 && columnIndex === 10) {
- background: 'red',
- background: ''
- changeAll() {
- console.log(this.radioAll)
- if (this.radioAll === '全部') {
- this.getdataListParm.name = 'getBigupkeepList'
- this.getdataListParm.parammaps = {
- } else if (this.radioAll === '待处理') {
- this.getdataListParm.name = 'getBigupkeepWebListNO'
- } else if (this.radioAll === '已处理') {
- this.getdataListParm.name = 'getBigupkeepWebList'
- statue: function(cellValue) {
- // console.log(cellValue.isZeroStock)
- if (cellValue.statue == 0) {
- return '已逾期'
- } else if (cellValue.statue == 1) {
- return '保养中'
- } else if (cellValue.statue == 2) {
- return '已完成'
- SHStatue: function(cellValue) {
- if (cellValue.SHStatue == 1) {
- return ''
- } else if (cellValue.SHStatue == 2) {
- } else if (cellValue.SHStatue == 3) {
- } else if (cellValue.SHStatue == 4) {
- } else if (cellValue.SHStatue == 8) {
- } else if (cellValue.SHStatue == 7) {
- console.log('点击了table搜索')
- this.seeTemp = Object.assign({}, row)
- console.log('查看', this.seeTemp)
- var scores = '评分:' + this.seeTemp.scores + '分'
- if (this.seeTemp.SHStatue === 1) {
- this.activeList = [{ title: '保养人审核' }, { title: '机修审核' }, { title: '设备主管审核' }]
- this.active = 0
- } else if (this.seeTemp.SHStatue === 2) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核' }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 3) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 4) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: 'error', reason: reason }, { title: '设备主管审核' }]
- } else if (this.seeTemp.SHStatue === 7) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson }]
- this.active = 3
- } else if (this.seeTemp.SHStatue === 8) {
- this.activeList = [{ title: '保养人审核', name: this.seeTemp.upkeepPerson, date: this.seeTemp.finishedTime, status: '', reason: '' }, { title: '机修审核', date: this.seeTemp.useChargeDate, name: this.seeTemp.useChargePerson, status: '', reason: '', scores: scores }, { title: '设备主管审核', date: this.seeTemp.chargeDate, name: this.seeTemp.chargePerson, status: 'error', reason: reason }]
- this.dialogStatus = 'see'
- if (this.seeTemp.SHStatue !== 1) {
- // 查看显示类型2
- this.statue1 = false
- this.statue2 = true
- this.getMaintenanceContentList()
- if (this.seeTemp.SHStatue == 1 && this.seeTemp.LYStatue == '未领用' && this.seeTemp.LRStatue == '未录入') {
- // 查看显示类型1
- this.statue1 = true
- this.statue2 = false
- this.collarUseTemp = {}
- this.listCollarUse = []
- this.getCollarUse()
- this.getOldProductsList()
- getMaintenanceContentList() {
- this.getMaintenanceContentParm.parammaps.id = this.seeTemp.id
- this.listLoadingMaintenanceContent = false
- GetDataByName(this.getMaintenanceContentParm).then(response => {
- console.log('保养内容table数据', response.data.list)
- this.listMaintenanceContent = response.data.list
- openDetails(row, column, cell, event) {
- if (column.label !== '操作') {
- this.$router.push({ path: '/customs/Receive', query: { applyCode: this.collarUseTemp.applyCode }})
- getCollarUse() {
- this.getCollarUseParm.parammaps.RUCode = this.seeTemp.upkeepCode
- GetDataByName(this.getCollarUseParm).then(response => {
- this.collarUseTemp = response.data.list[0]
- if (response.data.list.length > 0) {
- console.log('领用记录数据', response.data.list[0])
- if (response.data.list[0].statue == 0) {
- this.$set(this.collarUseTemp, 'statueName', '未领用')
- this.$set(this.collarUseTemp, 'statueName', '已领用')
- this.getCollarUseList()
- getCollarUseList() {
- this.getCollarUseListParm.parammaps.id = this.collarUseTemp.id
- this.listLoadingCollarUse = true
- GetDataByName(this.getCollarUseListParm).then(response => {
- console.log('领用table数据', response.data.list)
- this.listCollarUse = response.data.list
- this.listLoadingCollarUse = false
- getOldProductsList() {
- this.getOldProductsParm.parammaps.repairCode = this.seeTemp.upkeepCode
- this.listLoadingOldProducts = true
- GetDataByName(this.getOldProductsParm).then(response => {
- console.log('旧品录入记录table数据', response.data.list)
- this.listOldProducts = response.data.list
- this.listLoadingOldProducts = false
- handleReceivingSpareParts(row) {
- console.log('点击了保养及领用')
- this.receivingTemp = this.seeTemp
- this.receivingTemp = Object.assign({}, row)
- this.maintainTemp = this.receivingTemp
- this.maintainTemp.employeeId = String(this.maintainTemp.useEmpId)
- this.seeTemp = this.maintainTemp
- this.getAutoCreatCode()
- this.receivingTemp.createDate = parseTime(new Date(), '{y}-{m}-{d}')
- this.getEmpdeptList()
- this.dialogStatus = 'receivingSpareParts'
- this.dialogFormVisible_ReceivingSpareParts = true
- getEmpdeptList() {
- this.getEmpdeptParm.parammaps.deptId = this.maintainTemp.departmentId
- GetDataByName(this.getEmpdeptParm).then(response => {
- console.log('保养使用人', response.data.list)
- this.empdeptList = response.data.list
- this.empdeptList = []
- getAutoCreatCode() {
- GetDataByName(this.getAutoCreatCodeParm).then(response => {
- console.log('领用领用单号', response.data.list[0])
- this.receivingTemp.applyCode = response.data.list[0].orderCode
- sparePartSearch(queryString, cb) {
- console.log('备件模糊查询输入值', queryString)
- this.requestSparePart.parammaps['partCode'] = queryString
- GetDataByName(this.requestSparePart).then(response => {
- console.log('备件模糊查询搜索data', response.data.list)
- if (response.data.list == null) {
- cb([])
- cb(response.data.list)
- handleSelectSparePart(item) {
- console.log('备件模糊查询选中值', item)
- if (this.listCollarUse.length > 0) {
- // eslint-disable-next-line no-redeclare
- if (this.listCollarUse.find(obj => obj.id === item.id)) {
- type: 'warning',
- message: '此备件已存在,请重新选择备件'
- this.listCollarUse.unshift(item)
- createReceivingSparePartseData1() {
- this.$refs['maintainTemp'].validate(valid => {
- this.postDataPramas.data[0] = { 'name': 'updateEquseEmpId', 'type': 'e', 'parammaps': {
- employeeId: this.maintainTemp.employeeId,
- id: this.maintainTemp.id
- this.postDataPramas.data[1] = { 'name': 'deleteutupbyBigid', 'type': 'e', 'parammaps': {
- this.postDataPramas.data[2] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listMaintenanceContent }}
- this.postDataPramas.data[2].children = []
- this.postDataPramas.data[2].children[0] = { 'name': 'insertutup', 'type': 'e', 'parammaps': {
- id: this.maintainTemp.id,
- positionName: '@insertSpotList.positionName',
- program: '@insertSpotList.program',
- standard: '@insertSpotList.standard',
- active: '@insertSpotList.active'
- console.log('添加领用保存发送参数', this.postDataPramas)
- this.dialogFormVisible_ReceivingSpareParts = false
- createReceivingSparePartseData2() {
- console.log('点击了保养及领用保存')
- this.$refs['receivingTemp'].validate(valid => {
- if (this.listCollarUse.length !== 0) {
- for (var i = 0; i < this.listCollarUse.length; i++) {
- console.log(this.listCollarUse[i].amount)
- if (this.listCollarUse[i].amount !== undefined) {
- var rulesAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
- if (!rulesAmount.test(this.listCollarUse[i].amount)) {
- this.$message({ type: 'error', message: '领用数量请输入正数,最多保留两位小数', duration: 2000 })
- } else if (parseFloat(this.listCollarUse[i].amount) > parseFloat(this.listCollarUse[i].reportery)) {
- this.$message({ type: 'error', message: '领用数量不可大于库存数', duration: 2000 })
- this.$message({ type: 'error', message: '请检查领用数量是否未填写', duration: 2000 })
- let mySumPrice = 0
- for (let i = 0; i < this.listCollarUse.length; i++) {
- mySumPrice += parseFloat(this.listCollarUse[i].price) * parseFloat(this.listCollarUse[i].amount)
- if (mySumPrice > 500) {
- this.receivingTemp.SHStatus = 2
- this.receivingTemp.SHStatus = 9
- this.postDataPramas.data[0] = { 'name': 'insertBigpartapply', 'type': 'e', 'parammaps': {
- pastureId: this.$store.state.user.pastureid,
- applyCode: this.receivingTemp.applyCode,
- applyType: 2,
- departmentId: this.receivingTemp.departmentId,
- empId: this.receivingTemp.upkeepPersonId,
- applyDate: this.receivingTemp.createDate,
- RUCode: this.receivingTemp.upkeepCode,
- SHStatus: this.receivingTemp.SHStatus
- this.postDataPramas.data[1] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listCollarUse }}
- this.postDataPramas.data[1].children[0] = { 'name': 'insertpartapply', 'type': 'e', 'parammaps': {
- bigId: '@insertBigpartapply.LastInsertId',
- pastureId: '@insertSpotList.pastureId',
- partId: '@insertSpotList.partId',
- partCode: '@insertSpotList.partCode',
- partName: '@insertSpotList.partName',
- specification: '@insertSpotList.specification',
- brandId: '@insertSpotList.brandId',
- price: '@insertSpotList.price',
- amount: '@insertSpotList.amount',
- eqName: this.receivingTemp.eqName,
- eqCode: this.receivingTemp.eqCode,
- providerId: '@insertSpotList.providerId',
- reportery: '@insertSpotList.reportery',
- contractId: '@insertSpotList.contractId',
- locationId: '@insertSpotList.locationId'
- // return true
- this.$notify({ title: '', message: '请选择备件', type: 'warning', duration: 2000 })
- handleCompleteMaintenance(row) {
- console.log('点击了完成保养', row)
- this.$set(this.seeTemp, 'isOldProducts', 0)
- this.maintainCompleteTemp = this.seeTemp
- this.maintainCompleteTemp = Object.assign({}, row)
- this.$set(this.maintainCompleteTemp, 'isOldProducts', 0)
- this.dialogStatus = 'maintainComplete'
- this.No2 = false
- this.dialogFormVisible_maintainComplete = true
- this.listAdd = []
- changeIsOldProducts(val) {
- if (val == 1) {
- this.No2 = true
- oldProductsSearch(queryString, cb) {
- console.log('旧品录入模糊查询输入值', queryString)
- this.requestOldProducts.parammaps.partCode = queryString
- this.requestOldProducts.parammaps.RUCode = this.maintainCompleteTemp.upkeepCode
- GetDataByName(this.requestOldProducts).then(response => {
- console.log('旧品录入模糊查询搜索data', response.data.list)
- handleSelectOldProducts(item) {
- this.maintainCompleteTemp.partCode = ''
- console.log('旧品录入模糊查询选中值', item)
- if (this.listAdd.length > 0) {
- if (this.listAdd.find(obj => obj.id === item.id)) {
- message: '此旧品已存在,请重新选择旧品'
- if (item.checkoutNumber == null) {
- this.$set(item, 'checkoutNumber', item.reportery)
- this.listAdd.unshift(item)
- sparePartsDelete(row) {
- MessageBox.confirm('设备名称:' + row.partName, '确认删除?', {
- // console.log(this.list2)
- console.log(this.listCollarUse[i])
- if (this.listCollarUse[i].id === row.id) {
- var listCollarUseIndex = this.listCollarUse.indexOf(this.listCollarUse[i])
- if (listCollarUseIndex > -1) {
- this.listCollarUse.splice(listCollarUseIndex, 1)
- partDelete(row) {
- console.log(this.listAdd)
- console.log(this.listAdd[i])
- if (this.listAdd[i].id === row.id) {
- var listAddIndex = this.listAdd.indexOf(this.listAdd[i])
- if (listAddIndex > -1) {
- this.listAdd.splice(listAddIndex, 1)
- // 完成保养-保存
- createMaintainCompleteData() {
- console.log('点击了完成保养确认', this.maintainCompleteTemp)
- console.log('点击了完成保养确认', this.maintainCompleteTemp.laidcou)
- if (this.maintainCompleteTemp.laidcou == 0) {
- if (this.maintainCompleteTemp.isOldProducts == 0) {
- console.log('否')
- this.requestParam.name = 'completeUpkeep'
- this.requestParam.parammaps.id = this.maintainCompleteTemp.id
- PostDataByName(this.requestParam).then((response) => {
- //如果有设备记录仪的权限
- if(this.maintainCompleteTemp.isVideoBtnShow == '1'){
- // 临时注释
- if (this.maintainCompleteTemp.videoTxt == '已录制') {
- this.requestParam2.name = 'upkeepChargDone'
- this.requestParam2.parammaps = {}
- this.requestParam2.parammaps.id = this.maintainCompleteTemp.id
- this.requestParam2.parammaps.statue = 7
- this.requestParam2.parammaps.orderStatue = 2
- this.requestParam2.parammaps.empId = Cookies.get('employeid')
- PostDataByName(this.requestParam2).then(response => {
- this.dialogFormVisible_maintainComplete = false
- this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
- }else{
- //正常流程。没有记录仪权限
- console.log('是')
- this.$refs['maintainCompleteTemp'].validate(valid => {
- if (this.listAdd.length !== 0) {
- if (this.listAdd[i].acturalAmount == null || this.listAdd[i].acturalAmount == '') {
- message: '请录入数量是否未填写',
- var rulesActuralAmount = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^\d\.\d{1,2}$)/
- if (!rulesActuralAmount.test(parseFloat(this.listAdd[i].acturalAmount))) {
- message: '录入数量请输入正数,最多保留两位小数点',
- this.postDataPramas.data[0] = { 'name': 'insertSpotList', 'resultmaps': { 'list': this.listAdd }}
- this.postDataPramas.data[0].children = []
- this.postDataPramas.data[0].children[0] = { 'name': 'insertRepirsRefuse', 'type': 'e', 'parammaps': {
- deptId: this.maintainCompleteTemp.departmentId,
- partId: '@insertSpotList.id',
- unit: '@insertSpotList.unit',
- acturalAmount: '@insertSpotList.acturalAmount',
- eqId: this.maintainCompleteTemp.eqId,
- eqCode: this.maintainCompleteTemp.eqCode,
- eqName: this.maintainCompleteTemp.eqName,
- repairCode: this.maintainCompleteTemp.upkeepCode,
- listType: 1
- this.postDataPramas.data[1] = { 'name': 'completeUpkeep', 'type': 'e', 'parammaps': {
- id: this.maintainCompleteTemp.id
- console.log('完成维修-是-保存发送参数', this.postDataPramas)
- title: '保存失败',
- message: response.data,
- return true
- message: '请完善旧品信息',
- this.$notify({ message: '备件未领用不可完成保养', type: 'warning', duration: 2000 })
- console.log('点击了保养审核')
- this.$set(this.seeTemp, 'isStatue', 3)
- this.$set(this.examineTemp, 'scores', '')
- this.$set(this.examineTemp, 'isStatue', 3)
- this.dialogFormVisible_examine = true
- changeIsStatue(val) {
- if (val == 4) {
- this.isStatueReason = true
- this.isStatueReason = false
- // 保养审核1
- console.log('点击了保养审核确认')
- this.requestParam.name = 'upkeepCharge'
- this.requestParam.parammaps.statue = this.examineTemp.isStatue
- if (this.requestParam.parammaps.statue == 4) {
- this.requestParam.parammaps.scores = 5
- this.requestParam.parammaps.scores = this.examineTemp.scores
- console.log('保养审核确认发送参数', this.requestParam)
- this.dialogFormVisible_examine = false
- // 保养审核2
- handleExamine2(row) {
- console.log('点击了保养审核------', row)
- this.dialogStatus = 'examine2'
- // 保养审核2-保存
- createExamineData2() {
- if (this.examineTemp.isStatue == 3) {
- console.log('点击了保养审核2确认-通过')
- this.requestParam.name = 'upkeepChargDone'
- this.requestParam.parammaps.statue = 7
- this.requestParam.parammaps.orderStatue = 2
- console.log('点击了保养审核2确认-不通过')
- this.requestParam.name = 'upkeepCharge1'
- this.requestParam.parammaps.statue = 8
- handleExamine3(row) {
- this.dialogStatus = 'examine3'
- // 保养审核3-保存
- createExamineData3() {
- console.log('点击了保养审核3确认-通过')
- this.requestParam.name = 'upkeepCharge3'
- console.log('点击了保养审核3确认-不通过')
- preview(row) {
- console.log(row, '=====666')
- this.dialogStatus = 'video'
- this.dialogFormVisible_video = true
- // row.videoPath = 'https://sys.mcs8.net:7706' + row.videoPath
- this.videoTemp = Object.assign({}, row)
- /deep/ .el-badge__content.is-fixed{
- z-index: 1;
-.el-step__head.is-success {
- color: #409EFF;
- border-color: #409EFF;
-.el-step__title.is-success{
-.el-step__head.is-process{
- .el-step__icon.is-text{
- background: #409EFF;
-.step-row{
- color: #000;
@@ -3748,6 +3748,7 @@ export default {
this.getCreateNumber()
getCreateNumber() {
+ this.getParmCreateNumber.parammaps.codeType = 'LY'
GetDataByName(this.getParmCreateNumber).then(response => {
this.$nextTick(() => {
console.log('新增领用单号', response.data.list[0].orderCode)
@@ -0,0 +1,207 @@
+ <el-select v-model="getdataListParm.parammaps.pastureid" placeholder="牧场" class="filter-item" style="width: 110px">
+ <el-date-picker v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime filter-item" clearable type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" style="width: 250px;margin-right: 10px;" />
+ <el-button class="filter-item" type="success" icon="el-icon-download" @click="handleDownload">导出</el-button>
+ <el-table-column label="牧场" min-width="90px" align="center" prop="pastureName" />
+ <el-table-column label="日期" min-width="90px" align="center" prop="dataTime" />
+ <el-table-column label="设备编码" min-width="90px" align="center" prop="eqCode" />
+ <el-table-column label="柳工机号" min-width="90px" align="center" prop="license" />
+ <el-table-column label="开机小时(H)" min-width="90px" align="center" prop="workHour" />
+ <el-table-column label="怠速小时(H)" min-width="90px" align="center" prop="idleHour" />
+ <el-table-column label="油耗(L)" min-width="90px" align="center" prop="fuelConsumption" />
+ <el-table-column label="怠速油耗(H)" min-width="90px" align="center" prop="idleFuel" />
+ <el-table-column label="平均油耗(L/H)" min-width="90px" align="center" prop="hoursConsumption" />
+ <el-table-column label="经度" min-width="90px" align="center" prop="longitude" />
+ <el-table-column label="维度" prop="latitude" min-width="120px" align="center" />
+ <el-table-column label="油位(%)" prop="fuelLevel" min-width="120px" align="center" />
+ <el-table-column label="耗电量" prop="powerConsumption" min-width="120px" align="center" />
+ <el-table-column label="平价耗电量" prop="hoursPowerConsumption" min-width="120px" align="center" />
+ <el-table-column label="充电量" prop="chargeCapacity" min-width="120px" align="center" />
+ <el-table-column label="充电时长" prop="chargeHour" min-width="120px" align="center" />
+ <el-table-column label="电动设备状态" prop="chargeStatus" min-width="120px" align="center" />
+ <el-table-column label="电池包 SOC(%)" prop="batteryPackSoc" min-width="120px" align="center" />
+ <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="get_table_data" />
+ import { GetDataByName,GetDataByNames,getJson, checkButtons } from '@/api/common'
+ import { parseTime } from '@/utils/index.js'
+ import Pagination from '@/components/Pagination' // secondary package based on el-pagination
+ import Cookies from 'js-cookie'
+ export default{
+ name:'VehicleRecords',
+ myHeight:document.documentElement.clientHeight - 85- 200,
+ buttons:[],
+ listLoading:false,pageNum:0,pageSize:0,total:0,tableKey: 0,
+ list:[],
+ page: 1, offset: 1, pagecount: 10, returntype: 'Map',
+ parammaps: {
+ pastureid: parseInt(Cookies.get('pastureid')),
+ inputDatetime:[],
+ startTime:'',
+ stopTime:''
+ findAllPasture: [],
+ { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
+ isPercentage: false,
+ percentage: 1,
+ const that = this
+ GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
+ that.buttons = response.data.list
+ that.get_auto_buttons()
+ methods:{
+ get_auto_buttons() {
+ // const shengweiwaidan = 'shengweiwaidan'
+ // const isshengweiwaidan = checkButtons(this.buttons, shengweiwaidan)
+ // this.isshengweiwaidan = isshengweiwaidan
+ get_table_data(){
+ var startTime = ''
+ var stopTime = ''
+ if(this.getdataListParm.parammaps.inputDatetime !== null && this.getdataListParm.parammaps.inputDatetime.length > 0){
+ startTime = parseTime(this.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
+ stopTime = parseTime(this.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
+ this.getdataListParm.parammaps.inputDatetime = []
+ startTime = ''
+ stopTime = ''
+ let url = 'authdata/vehicleL/list'
+ let data = "?pastureId=" + this.getdataListParm.parammaps.pastureid
+ + '&startTime='+ startTime
+ + '&endTime='+ stopTime
+ + '&offset='+ this.getdataListParm.offset
+ + '&pageCount='+ this.getdataListParm.pagecount
+ this.list = response.data
+ this.pageNum = response.data.pageNum
+ this.pageSize = response.data.pageSize
+ if (response.data.total) {
+ this.total = response.data.total
+ form_search(){
+ this.$alert('车辆记录正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
+ + '&pageCount='+ 0
+ this.$nextTick(() => {
+ const list1 = response.data
+ if (response.data !== '') {
+ '牧场','日期','设备编码','柳工机号','开机小时(H)','怠速小时(H)','油耗(L)','怠速油耗(H)','平均油耗(L/H)','经度','维度','油位(%)','耗电量','平价耗电量','充电量','充电时长','电动设备状态','电池包 SOC(%)'
+ 'pastureName','dataTime','eqCode','license','workHour','idleHour','fuelConsumption','idleFuel','hoursConsumption','longitude','latitude',
+ 'fuelLevel','powerConsumption','hoursPowerConsumption','chargeCapacity','chargeHour','chargeStatus','batteryPackSoc'
+ excel.export_json_to_excel({ header: tHeader, data: data1, filename: '车辆记录', autoWidth: true, bookType: 'xlsx' })
+ if (j === 'timestamp') { return parseTime(v[j]) } else { return v[j] }
+<style>
@@ -44,7 +44,7 @@
<a @click="clickEquipmentIndex(row)">{{ row.pastureName }}</a>
- <el-table-column label="饲养头日" sortable min-width="80px" align="center" prop="monthBudget" />
+ <el-table-column label="饲养头日" sortable min-width="80px" align="center" prop="cowSum" />
<el-table-column label="总指标(万元)" align="center">
<el-table-column label="预算" sortable min-width="80px" align="center" prop="monthBudget" />
@@ -5,7 +5,10 @@
<el-progress style="padding-left: 10px;" :text-inside="true" :stroke-width="26" :percentage="percentage" />
- <el-date-picker v-model="monthDate" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime" />
+ <el-date-picker v-model="monthDate" type="monthrange" :clearable="false" range-separator="至" start-placeholder="开始月份" class="filter-item" end-placeholder="结束月份" @change="changeTime" />
+ <el-select v-model="isZeroStock" placeholder="是否零库存" class="filter-item" style="width: 120px;" @change="changeIsZeroStock">
+ <el-option v-for="item in isZeroStockList" :key="item.id" :label="item.name" :value="item.id" />
<el-button class="filter-item" type="success" icon="el-icon-upload2" @click="handleDownload">导出</el-button>
<div v-if="isTable1" class="table">
@@ -115,6 +118,8 @@ export default {
return {
monthDate:[parseTime(new Date(), '{y}-{m}'), parseTime(new Date(), '{y}-{m}')],
+ isZeroStock:0,
+ isZeroStockList:[{id:0,'name':'非零库存'},{id:1,'name':'零库存'}],
rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
cellStyle: { padding: 0 + 'px' },
types: [{ id: 0, name: '按供应商' }, { id: 1, name: '按备件类别' }],
@@ -208,6 +213,9 @@ export default {
this.get_table_data()
+ changeIsZeroStock(item){
get_table_data() {
this.listLoading = true
if (Cookies.get('pastureid') == 18) {
@@ -217,6 +225,7 @@ export default {
this.getdataListParm.parammaps.startDate = this.monthDate[0]
this.getdataListParm.parammaps.endDate = this.monthDate[1]
+ this.getdataListParm.parammaps.isZeroStock = this.isZeroStock
GetDataByName(this.getdataListParm).then(response => {
console.log('table数据', response.data.list)
@@ -59,13 +59,6 @@
end-placeholder="维修结束时间"
/>
- <!-- 等后端接口 -->
- <el-select v-model="table2.getdataListParm.parammaps.eqClassId" filterable placeholder="类别" class="filter-item" style="width: 120px;" clearable @change="change_eqClass">
- <el-option v-for="item in typeNameList" :key="item.id" :label="item.remark" :value="item.id" />
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
@@ -210,10 +203,6 @@ export default {
- // 下拉框 - 状态
- typeNameList: [
- //{id: "刮粪机", name: "刮粪机"}
downLoadParm: {},
downLoadList: [],
@@ -240,7 +229,6 @@ export default {
GetDataByNames(this.requestParams).then(response => {
this.findAllPasture = response.data.findAllPasture.list
- this.typeNameList = response.data.getEqClassBengbu.list
@@ -370,18 +358,7 @@ export default {
- change_eqClass(e){
- // console.log(e)
- // if(e != ""){
- // this.tableIputShow1 = false
- // this.tableIputShow1 = true
handleDownload() {
this.$alert('维修周期效率统计正在导出中,请勿刷新或离开本页面,若导出时间过长,建议缩小导出数据范围重新导出', {})
this.isPercentage = true
@@ -10,8 +10,8 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// For example, Mac: sudo npm run
-const port = 9529 // dev port
+// const port = 9529 // dev port
+const port = 8082 // dev port
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
/**
@@ -27,6 +27,7 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
+ allowedHosts: ['tmrwatch.cn'],
port: port,
open: true,
overlay: {