设备模块

This commit is contained in:
2023-11-02 18:05:28 +08:00
parent fbaa66a715
commit bd17db7d04
10 changed files with 677 additions and 122 deletions

View File

@@ -0,0 +1,68 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item">
<div class="search-label">单据编码</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="code" disabled>
</div>
</div>
<div class="search-item_2">
<button class="button button--primary" @click="toJump">关闭</button>
</div>
</div>
</div>
<div class="grid_wraper">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>项目编码</th>
<th>项目名称</th>
<th>项目要求</th>
<th>项目备注</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ e.repair_item_code }}</td>
<td>{{e.repair_item_name}}</td>
<td>{{e.requirement}}</td>
<td>{{e.dtl_remark}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import {devicesportcheckmstGetDtl} from '@config/getData2.js'
export default {
name: 'checkorderdetail',
data () {
return {
code: this.$route.query.id,
dataList: []
}
},
created () {
this._devicesportcheckmstGetDtl()
},
methods: {
// grid
async _devicesportcheckmstGetDtl () {
let res = await devicesportcheckmstGetDtl(this.$route.query.id)
this.dataList = [...res.data]
},
toJump () {
this.$router.push('/checkorder')
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -0,0 +1,114 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item_3">
<button class="button button--primary" @click="_devicesportcheckmstByuser">查询</button>
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toDetail">查看明细</button>
</div>
</div>
</div>
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>设备号</th>
<th>单据编码</th>
<th>单据状态</th>
<th>计划开始时间</th>
<th>单据类型</th>
<th>操作人</th>
<th>创建人</th>
<th>创建时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.repair_code}" @click="toRadio(e)">
<td>{{ i+1 }}</td>
<td>{{e.device_code}}</td>
<td>{{e.repair_code}}</td>
<td>{{ e.invstatus }}</td>
<td>{{e.plan_start_date}}</td>
<td>{{ e.maintenancecycle }}</td>
<td>{{ e.update_optname }}</td>
<td>{{e.input_optname}}</td>
<td>{{ e.input_time }}</td>
</tr>
</tbody>
</table>
<div class="loading-tips">{{desc}}</div>
</div>
</div>
</template>
<script>
import {devicesportcheckmstByuser} from '@config/getData2.js'
export default {
name: 'checkorder',
data () {
return {
dataList: [],
pkId: '',
pkObj: {},
page: 1,
size: '30',
busy: false,
desc: ''
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
},
created () {
this._devicesportcheckmstByuser()
},
methods: {
// grid
async _devicesportcheckmstByuser () {
this.page = 1
this.busy = false
this.desc = ''
let res = await devicesportcheckmstByuser(this.page + '', this.size)
this.dataList = []
this.dataList = [...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
}
},
async loadMore () {
this.busy = true
this.page++
let res = await devicesportcheckmstByuser(this.page + '', this.size)
this.dataList = [...this.dataList, ...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
}
},
toDetail () {
if (this.pkId) {
this.$router.push({
path: '/checkorderdetail',
query: {id: this.pkId}
})
}
},
toRadio (e) {
this.pkId = this.pkId === e.repair_code ? '' : e.repair_code
this.pkObj = this.pkId === e.repair_code ? e : {}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -0,0 +1,68 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item">
<div class="search-label">单据编码</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="code" disabled>
</div>
</div>
<div class="search-item_2">
<button class="button button--primary" @click="toJump">关闭</button>
</div>
</div>
</div>
<div class="grid_wraper">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>项目编码</th>
<th>项目名称</th>
<th>项目要求</th>
<th>项目备注</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ e.repair_item_code }}</td>
<td>{{e.repair_item_name}}</td>
<td>{{e.requirement}}</td>
<td>{{e.dtl_remark}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import {devicelubricatemstGetDtl} from '@config/getData2.js'
export default {
name: 'lubricorderdetail',
data () {
return {
code: this.$route.query.id,
dataList: []
}
},
created () {
this._devicelubricatemstGetDtl()
},
methods: {
// grid
async _devicelubricatemstGetDtl () {
let res = await devicelubricatemstGetDtl(this.$route.query.id)
this.dataList = [...res.data]
},
toJump () {
this.$router.push('/lubricorder')
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -0,0 +1,114 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item_3">
<button class="button button--primary" @click="_devicelubricatemstByuser">查询</button>
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toDetail">查看明细</button>
</div>
</div>
</div>
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>设备号</th>
<th>单据编码</th>
<th>单据状态</th>
<th>计划开始时间</th>
<th>单据类型</th>
<th>操作人</th>
<th>创建人</th>
<th>创建时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.repair_code}" @click="toRadio(e)">
<td>{{ i+1 }}</td>
<td>{{e.device_code}}</td>
<td>{{e.repair_code}}</td>
<td>{{ e.invstatus }}</td>
<td>{{e.plan_start_date}}</td>
<td>{{ e.maintenancecycle }}</td>
<td>{{ e.update_optname }}</td>
<td>{{e.input_optname}}</td>
<td>{{ e.input_time }}</td>
</tr>
</tbody>
</table>
<div class="loading-tips">{{desc}}</div>
</div>
</div>
</template>
<script>
import {devicelubricatemstByuser} from '@config/getData2.js'
export default {
name: 'lubricorder',
data () {
return {
dataList: [],
pkId: '',
pkObj: {},
page: 1,
size: '30',
busy: false,
desc: ''
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
},
created () {
this._devicelubricatemstByuser()
},
methods: {
// grid
async _devicelubricatemstByuser () {
this.page = 1
this.busy = false
this.desc = ''
let res = await devicelubricatemstByuser(this.page + '', this.size)
this.dataList = []
this.dataList = [...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
}
},
async loadMore () {
this.busy = true
this.page++
let res = await devicelubricatemstByuser(this.page + '', this.size)
this.dataList = [...this.dataList, ...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
}
},
toDetail () {
if (this.pkId) {
this.$router.push({
path: '/lubricorderdetail',
query: {id: this.pkId}
})
}
},
toRadio (e) {
this.pkId = this.pkId === e.repair_code ? '' : e.repair_code
this.pkObj = this.pkId === e.repair_code ? e : {}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -0,0 +1,68 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item">
<div class="search-label">单据编码</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="code" disabled>
</div>
</div>
<div class="search-item_2">
<button class="button button--primary" @click="toJump">关闭</button>
</div>
</div>
</div>
<div class="grid_wraper">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>项目编码</th>
<th>项目名称</th>
<th>项目要求</th>
<th>项目备注</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ e.repair_item_code }}</td>
<td>{{e.repair_item_name}}</td>
<td>{{e.requirement}}</td>
<td>{{e.dtl_remark}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script>
import {devicemaintenancemstGetDtl} from '@config/getData2.js'
export default {
name: 'maintainorderdetail',
data () {
return {
code: this.$route.query.id,
dataList: []
}
},
created () {
this._devicemaintenancemstGetDtl()
},
methods: {
// grid
async _devicemaintenancemstGetDtl () {
let res = await devicemaintenancemstGetDtl(this.$route.query.id)
this.dataList = [...res.data]
},
toJump () {
this.$router.push('/maintainorder')
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -0,0 +1,114 @@
<template>
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item_3">
<button class="button button--primary" @click="_devicemaintenancemstByuser">查询</button>
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toDetail">查看明细</button>
</div>
</div>
</div>
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
<table class="filter-table">
<thead>
<tr>
<th>序号</th>
<th>设备号</th>
<th>单据编码</th>
<th>单据状态</th>
<th>计划开始时间</th>
<th>单据类型</th>
<th>操作人</th>
<th>创建人</th>
<th>创建时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.repair_code}" @click="toRadio(e)">
<td>{{ i+1 }}</td>
<td>{{e.device_code}}</td>
<td>{{e.repair_code}}</td>
<td>{{ e.invstatus }}</td>
<td>{{e.plan_start_date}}</td>
<td>{{ e.maintenancecycle }}</td>
<td>{{ e.update_optname }}</td>
<td>{{e.input_optname}}</td>
<td>{{ e.input_time }}</td>
</tr>
</tbody>
</table>
<div class="loading-tips">{{desc}}</div>
</div>
</div>
</template>
<script>
import {devicemaintenancemstByuser} from '@config/getData2.js'
export default {
name: 'maintainorder',
data () {
return {
dataList: [],
pkId: '',
pkObj: {},
page: 1,
size: '30',
busy: false,
desc: ''
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
},
created () {
this._devicemaintenancemstByuser()
},
methods: {
// grid
async _devicemaintenancemstByuser () {
this.page = 1
this.busy = false
this.desc = ''
let res = await devicemaintenancemstByuser(this.page + '', this.size)
this.dataList = []
this.dataList = [...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
}
},
async loadMore () {
this.busy = true
this.page++
let res = await devicemaintenancemstByuser(this.page + '', this.size)
this.dataList = [...this.dataList, ...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
}
},
toDetail () {
if (this.pkId) {
this.$router.push({
path: '/maintainorderdetail',
query: {id: this.pkId}
})
}
},
toRadio (e) {
this.pkId = this.pkId === e.repair_code ? '' : e.repair_code
this.pkObj = this.pkId === e.repair_code ? e : {}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -5,11 +5,11 @@
<div class="search-item">
<div class="search-label">单据编码</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="remark">
<input type="text" class="filter-input" v-model="code" disabled>
</div>
</div>
<div class="search-item_2">
<button class="button button--primary">关闭</button>
<button class="button button--primary" @click="toJump">关闭</button>
</div>
</div>
</div>
@@ -22,19 +22,15 @@
<th>项目名称</th>
<th>项目要求</th>
<th>项目备注</th>
<th>重量(g)</th>
<th>单重(g)</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
<tr v-for="(e, i) in dataList" :key="i">
<td>{{ i + 1 }}</td>
<td>{{ e.sect_name }}</td>
<td>{{e.struct_name}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.canuse_qty | numeric(3)}}</td>
<td>{{ e.unit_weight | numeric(3) }}</td>
<td>{{ e.repair_item_code }}</td>
<td>{{e.repair_item_name}}</td>
<td>{{e.requirement}}</td>
<td>{{e.dtl_remark}}</td>
</tr>
</tbody>
</table>
@@ -43,109 +39,30 @@
</template>
<script>
import {accMul} from '@config/utils.js'
import {checkGetBcpStor, checkCreate} from '@config/getData2.js'
import {devicerepairmstGetDtl} from '@config/getData2.js'
export default {
name: 'semifinishedcheck',
name: 'repairorderdetail',
data () {
return {
options1: [],
value1: '',
options2: [{device_code: '32', device_name: '临时盘点'}],
value2: '32',
remark: '',
dataList: [],
pkId: '',
pkObj: {},
disabled1: false
}
},
beforeRouteLeave (to, from, next) {
if (to.path === '/home' || to.path === '/login') {
this.$store.dispatch('setKeepAlive', [])
}
next()
},
activated () {
if (this.$store.getters.materArr.length > 0) {
let arr = this.$store.getters.materArr
this.removeRepeat(this.dataList, arr)
this.dataList = [...this.dataList, ...arr]
this.dataList.map(el => {
let res = accMul(el.canuse_qty, el.unit_weight)
this.$set(el, 'base_qty', res)
})
code: this.$route.query.id,
dataList: []
}
},
created () {
this._checkGetBcpStor()
this._devicerepairmstGetDtl()
},
methods: {
// 数组去重
removeRepeat (arr1, arr2) {
for (let i = 0; i < arr1.length; i++) {
for (let j = 0; j < arr2.length; j++) {
if (arr1[i].struct_name === arr2[j].struct_name) {
arr2.splice(j, 1)
j--
}
}
}
// grid
async _devicerepairmstGetDtl () {
let res = await devicerepairmstGetDtl(this.$route.query.id)
this.dataList = [...res.data]
},
// 仓库下拉框
async _checkGetBcpStor () {
let res = await checkGetBcpStor()
this.options1 = [...res.data]
},
// 生产盘点单
async _checkCreate () {
this.disabled1 = true
if (this.value1 === '' || this.dataList.length === 0) {
this.disabled1 = false
return
}
try {
let from = {
stor_id: this.value1,
check_type: '32',
remark: this.remark,
rows: this.dataList
}
let res = await checkCreate(from)
this.toast(res.message)
this.value1 = ''
this.remark = ''
this.$store.dispatch('setMaterArr', [])
this.dataList = []
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
searchMater () {
this.$store.dispatch('setMaterArr', [])
this.$router.push('/structmatersearch')
},
toJumpSearch () {
this.$router.push('/semifinishedchecksearch')
},
toRadio (e) {
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
this.pkObj = this.pkId === e.struct_name ? e : {}
},
delRow () {
if (!this.pkId) {
return
}
this.dataList = this.dataList.filter(el => el.struct_name !== this.pkId)
this.$store.dispatch('setMaterArr', this.dataList)
toJump () {
this.$router.push('/repairorder')
}
}
}
</script>
<style lang="stylus" scoped>
.grid_wraper
height calc(100% - 1.1rem)
</style>

View File

@@ -3,12 +3,12 @@
<div class="search-confirm-wrap">
<div class="search-wrap">
<div class="search-item_3">
<button class="button button--primary">查询</button>
<button class="button button--primary" @click="_devicerepairmstByuser">查询</button>
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toDetail">查看明细</button>
</div>
</div>
</div>
<div class="grid_wraper">
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
<table class="filter-table">
<thead>
<tr>
@@ -24,32 +24,37 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="e.struct_name" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
<td>{{ i + 1 }}</td>
<td>{{ e.sect_name }}</td>
<td>{{e.struct_name}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td>
<td>{{e.canuse_qty | numeric(3)}}</td>
<td>{{ e.unit_weight | numeric(3) }}</td>
<td>{{ e.qty | numeric(3) }}</td>
<td>{{ e.storagevehicle_code }}</td>
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.repair_code}" @click="toRadio(e)">
<td>{{ i+1 }}</td>
<td>{{e.device_code}}</td>
<td>{{e.repair_code}}</td>
<td>{{ e.invstatus }}</td>
<td>{{e.plan_start_date}}</td>
<td>{{ e.maintenancecycle }}</td>
<td>{{ e.update_optname }}</td>
<td>{{e.input_optname}}</td>
<td>{{ e.input_time }}</td>
</tr>
</tbody>
</table>
<div class="loading-tips">{{desc}}</div>
</div>
</div>
</template>
<script>
// import {checkGetBcpStor} from '@config/getData2.js'
import {devicerepairmstByuser} from '@config/getData2.js'
export default {
name: 'checkorder.vue',
name: 'repairorder',
data () {
return {
dataList: [],
pkId: '',
pkObj: {}
pkObj: {},
page: 1,
size: '30',
busy: false,
desc: ''
}
},
beforeRouteLeave (to, from, next) {
@@ -61,20 +66,49 @@ export default {
activated () {
},
created () {
this._devicerepairmstByuser()
},
methods: {
// grid
async _devicerepairmstByuser () {
this.page = 1
this.busy = false
this.desc = ''
let res = await devicerepairmstByuser(this.page + '', this.size)
this.dataList = []
this.dataList = [...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
}
},
async loadMore () {
this.busy = true
this.page++
let res = await devicerepairmstByuser(this.page + '', this.size)
this.dataList = [...this.dataList, ...res.data]
if (res.data.length < 30) {
this.busy = true
this.desc = '已加载全部数据'
} else {
this.busy = false
}
},
toDetail () {
this.$router.push('/repairorderdetail')
if (this.pkId) {
this.$router.push({
path: '/repairorderdetail',
query: {id: this.pkId}
})
}
},
toRadio (e) {
this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
this.pkObj = this.pkId === e.struct_name ? e : {}
this.pkId = this.pkId === e.repair_code ? '' : e.repair_code
this.pkObj = this.pkId === e.repair_code ? e : {}
}
}
}
</script>
<style lang="stylus" scoped>
.grid_wraper
height calc(100% - 1.1rem)
</style>