Commit 61297a88 authored by 李苏's avatar 李苏 💬

保养项目

parent 429cf904
import request from 'common/src/utils/request'
/* 查询 */
export function doQuery(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/add',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/delete',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/aqgl/sbgl/sbbyjl/update',
method: 'post',
data: query||{}
})
}
\ No newline at end of file
......@@ -37,3 +37,12 @@ method: 'post',
data: query||{}
})
}
export function querySbbyjl(query) {
return request({
url: '/aqgl/sbgl/sbbymx/querySbbyjl',
method: 'post',
data: query||{}
})
}
This diff is collapsed.
<template>
<DefaultDialog :app='app'>
<div class="min_full" slot='form' style="height: 550px;border: 0px;">
<Selector :app='this' v-if='showDialog&&DialogName=="ksry"' ></Selector>
<!-- 按钮操作-->
<el-row class="tool-bar">
<!-- <ViewButton ref="view" :app='this'></ViewButton>
<AddButton ref="add" :app='this'></AddButton>
<CopyButton ref="copy" :app='this'></CopyButton>
<EditButton ref="edit" :app='this'></EditButton> -->
<AttachFileShow :app='this' ></AttachFileShow>
<!-- <el-button @click="xzry" size='mini' type="primary">导入项目</el-button> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers" style="height: 380px;">
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :delParams="'mxid'"
@getRow='getRow'>
</TablePager>
</div>
</div>
</DefaultDialog>
</template>
<script>
/* 引入需要的接口*/
import Selector from './selector'
import {
querySbbyjl
} from '@/api/equipment/sbbymx.js';
//
/* edit页面*/
import DtlEdit from './dtlEdit.vue'
import {
tableMixin_noapp
} from 'common'
export default {
props:['app'],
mixins: [tableMixin_noapp],
/* 初始额外赋值*/
async mounted() {
this.queryParams.xmid=this.app.rowItem.xmid
this.queryParams.sbid=this.app.queryParams.mid
this.$nextTick(()=>{
this.$refs['TablePager'].pageQuery()
})
},
data() {
return {
sjdata:{},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogWidth:'85%',
DialogTitle:'',
/* 基础url*/
baseUrl: '/aqgl/sbgl/sbbyjl',
/* 查询参数*/
queryParams: {
// info: '',
// mid:''
},
/* 表格标题对应参数*/
tableTitle: [
// {label: "设备ID", prop: "mid", fieldType: "ftString",width:192},
// {label: "序号", prop: "xh", fieldType: "int"},
// {label: "保养项目", prop: "xmid", fieldType: "ftString",width:192},
{label: "上次保养日期", prop: "scbyrq", fieldType: "ftDateTime"},
{label: "预计下次计划日期", prop: "xcbyrq", fieldType: "ftDateTime"},
{label: "上次保养人", prop: "scbyrName", fieldType: "ftString",width:192},
{label: "保养说明", prop: "bysm", fieldType: "ftString",width:300},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
{label: "维护人", prop: "whr", fieldType: "ftString"},
{label: "维护时间", prop: "whsj", fieldType: "ftDateTime"},
{label: "创建人", prop: "cjr", fieldType: "ftString"},
{label: "创建时间", prop: "cjsj", fieldType: "ftDateTime"},
// {label: "上次保养记录ID", prop: "scbyjlid", fieldType: "ftString",width:192},
]
}
},
methods: {
xzry(){
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle='选择保养项目'
this.showDialog=true
this.DialogName='ksry'
} else {
this.$warning('请选中一行操作');
}
},
drst(){
this.showDialog=true
},
/* 基础查询*/
query: querySbbyjl,
/* 基础增*/
// apiAdd: doDtlAdd,
// /* 基础更新*/
// apiUpdate: doDtlUpdate,
// /* 删除操作*/
// apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
DtlEdit,
Selector
}
}
</script>
<style scoped>
</style>
<template>
<div class="min_full" slot='form' style="height:100%;width:100%">
<CkxmEdit :app='this' v-if='showDialog&&DialogName=="byfk"' ></CkxmEdit>
<Selector :app='this' v-if='showDialog&&DialogName=="ksry"' ></Selector>
<Byjl :app='this' v-if='showDialog&&DialogName=="byjl"' ></Byjl>
<!-- 按钮操作-->
<el-row class="tool-bar">
<el-button @click="xzry" size='mini' type="primary">导入项目</el-button>
<el-button @click="xzry" size='mini' type="primary">保养记录</el-button>
<el-button @click="byfk" size='mini' type="primary">保养反馈</el-button>
<el-button @click="byjl" size='mini' type="primary">保养记录</el-button>
</el-row>
<!-- 表格-->
<div class="tablePagers" style="height: 380px;">
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :delParams="'mxid'"
<TablePager :showPagination='false' @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
......@@ -20,6 +22,8 @@
<script>
/* 引入需要的接口*/
import Selector from './selector'
import CkxmEdit from './ckxmEdit'
import Byjl from './byjl'
import {
doQuery,
doAdd,
......@@ -73,12 +77,12 @@
},
/* 表格标题对应参数*/
tableTitle: [
{label: "编码", prop: "code", fieldType: "ftString",width:120},
{label: "名称", prop: "name", fieldType: "ftString",width:300},
// {label: "编码", prop: "code", fieldType: "ftString",width:120},
{label: "名称", prop: "byxmName", fieldType: "ftString",width:300},
{label: "保养周期-天", prop: "byzq", fieldType: "int",width:252},
{label: "公司", prop: "gsName", fieldType: "ftString",width:192},
{label: "停用标志", prop: "tybz", fieldType: "ftString",width:100},
{label: "停用日期", prop: "tyrq", ...this.$common('ftDateTime'),width:192},
// {label: "公司", prop: "gsName", fieldType: "ftString",width:192},
// {label: "停用标志", prop: "tybz", fieldType: "ftString",width:100},
// {label: "停用日期", prop: "tyrq", ...this.$common('ftDateTime'),width:192},
{label: "标准工时", prop: "bzgs", fieldType: "float",width:192},
{label: "附件数", prop: "attachcount", fieldType: "int",width:192},
{label: "备注", prop: "bz", fieldType: "ftString",width:300},
......@@ -90,18 +94,36 @@
}
},
methods: {
byjl(){
if (this.selectOne || this.clickOne) {
this.DialogTitle='保养记录'
this.showDialog=true
this.DialogName='byjl'
this.DialogWidth='85%'
} else {
this.$warning('请选中一行操作');
}
},
byfk(){
if (this.selectOne || this.clickOne) {
this.DialogTitle='反馈记录'
this.showDialog=true
this.DialogName='byfk'
this.DialogWidth='50%'
} else {
this.$warning('请选中一行操作');
}
},
xzry(){
if (this.app.selectOne || this.app.clickOne) {
this.DialogTitle='选择保养项目'
this.showDialog=true
this.DialogName='ksry'
this.DialogWidth='85%'
} else {
this.$warning('请选中一行操作');
}
},
drst(){
this.showDialog=true
},
/* 基础查询*/
query: doQuery,
......@@ -118,7 +140,9 @@
},
components: {
DtlEdit,
Selector
Selector,
CkxmEdit,
Byjl
}
......
<template>
<DefaultDialog :app='app'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules">
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="上次保养日期" ref="scbyrq" prop="scbyrq">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.scbyrq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="预计下次计划日期" ref="xcbyrq" prop="xcbyrq">
<el-date-picker style="width: 100%;" :readonly="readonly" type="date"
v-model="form.xcbyrq" placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="保养说明" ref="bysm" prop="bysm">
<el-input type="textarea" :readonly="readonly" v-model="form.bysm" ></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz" ></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row :gutter="20">
<el-col :span="12">
<el-form-item label="上次保养记录ID" ref="scbyjlid" prop="scbyjlid">
<el-input :readonly="readonly" v-model="form.scbyjlid" ></el-input>
</el-form-item>
</el-col>
</el-row> -->
</el-form>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button type="primary" @click="save()">确 认</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
/* 引入需要的接口*/
import {
doQuery,
doAdd,
// doUpdate,
// doDelete
} from '@/api/equipment/sbbyjl.js';
import {
doSave
} from "@/api/equipment/sbbymx.js"
/* edit页面*/
import {
tableMixin_noapp
} from 'common'
export default {
mixins: [tableMixin_noapp],
props:['app'],
/* 初始额外赋值*/
async mounted() {
this.form.xmid=this.app.rowItem.xmid
this.form.mid=this.app.queryParams.mid
},
data() {
return {
form: {
//ID
id:'',
//设备ID
mid:'',
//序号
//保养项目
xmid:'',
//上次保养日期
scbyrq:new Date().getTime(),
//预计下次计划日期
xcbyrq:new Date().getTime(),
//备注
bz:'',
},
}
},
methods: {
/* 基础查询*/
query: doQuery,
/* treeQuery */
/* 初始化赋值操作*/
init() {
},
save(){
doAdd({...this.form}).then(res=>{
})
}
},
components:{
}
}
</script>
<style scoped>
</style>
......@@ -62,7 +62,7 @@
</div>
<!-- 保养项目详情-->
<div class="min_full" style="height: 60vh;" >
<Ckxm ref='ckxm' :app='this' ></Ckxm>
<Ckxm v-if="tabData.length>0&&singleItem.id" ref='ckxm' :app='this' ></Ckxm>
</div>
</div>
......@@ -155,7 +155,9 @@
},
selectedTree(e){
this.queryParams.gsid=e.id||'root'
this.$refs['TablePager'].pageQuery()
this.$refs['TablePager'].pageQuery({
setFirstCurrent:true
})
},
/* 查看人员*/
byxm(){
......
......@@ -82,7 +82,7 @@ export default {
props:['app'],
/* 初始额外赋值*/
async mounted() {
this.selectedList=_.cloneDeep(this.app.tabData)
this.selectedList=[]
this.getData(this.currentPage, this.pageSize);
},
data() {
......@@ -234,13 +234,29 @@ props:['app'],
},
save(){
/* 查看是否重复*/
let arlList=[]
let iscf=true
this.app.tabData.forEach(item=>{
arlList.push(item.xmid)
})
this.selectedList.forEach(item=>{
if( arlList.indexOf(item.id)!=-1){
iscf=false
}
})
if(iscf==false){
this.$warning('已选保养项目存在')
return
}
let xmList=[]
this.selectedList.forEach(row=>{
row.xmid=row.id
xmList.push({xmid:row.id})
// delete row.id
})
let params={
sbid:this.app.queryParams.mid,
data:this.selectedList
datas:xmList
}
doSave(params).then(res=>{
if(res.success){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment