This commit is contained in:
gtz217 2022-08-03 20:41:15 +08:00
parent d61171ee58
commit 14d7d91c7c
18 changed files with 1926 additions and 69 deletions

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-25 14:18:00 * @Date: 2022-07-25 14:18:00
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-08-02 13:55:00 * @LastEditTime: 2022-08-03 16:08:03
* @Description: file content * @Description: file content
* @FilePath: \hf-pda\src\api\eqInspection.js * @FilePath: \hf-pda\src\api\eqInspection.js
*/ */
@ -17,7 +17,7 @@ export const list = data => {
}) })
} }
// 获取巡检记录列表 // 新增巡检记录
export const add = data => { export const add = data => {
return request({ return request({
url: '/api/equipment/inspectionLog/add', url: '/api/equipment/inspectionLog/add',
@ -26,7 +26,7 @@ export const add = data => {
}) })
} }
// 获取巡检记录列表 // 更新巡检记录
export const update = data => { export const update = data => {
return request({ return request({
url: '/api/equipment/inspectionLog/update', url: '/api/equipment/inspectionLog/update',
@ -98,3 +98,21 @@ export const updateInsStatus = data => {
data data
}) })
} }
// 获取巡检内容详情
export const detailIns = data => {
return request({
url: '/api/equipment/equipmentinspection-inspectionitem/get',
method: 'POST',
data
})
}
// 更新巡检内容详情
export const updateIns = data => {
return request({
url: '/api/equipment/equipmentinspection-inspectionitem/update',
method: 'POST',
data
})
}

View File

@ -2,17 +2,90 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-25 16:38:30 * @Date: 2022-07-25 16:38:30
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-07-25 16:38:51 * @LastEditTime: 2022-08-03 18:24:13
* @Description: file content * @Description: file content
* @FilePath: \xbapp\src\api\material.js * @FilePath: \hf-pda\src\api\material.js
*/ */
import request from '@/util/request' import request from '@/util/request'
// 获取在线库存列表 // 获取换料记录列表
export const list = params => { export const list = data => {
return request({ return request({
url: '/wms/mt/alone/stock/products/list/part', url: '/api/material/equipment-material-replace/page',
method: 'GET', method: 'POST',
params data
})
}
// 新增换料记录
export const add = data => {
return request({
url: '/api/material/equipment-material-replace/add',
method: 'POST',
data
})
}
// 更新换料记录
export const update = data => {
return request({
url: '/api/material/equipment-material-replace/update',
method: 'POST',
data
})
}
// 获取换料记录详情
export const detail = data => {
return request({
url: '/api/material/equipment-material-replace/get',
method: 'POST',
data
})
}
// 获取设备列表
export const eqList = data => {
return request({
url: '/api/basic/equipment/list',
method: 'POST',
data
})
}
// 获取批次列表
export const batchList = data => {
return request({
url: '/api/material/material-date/list',
method: 'POST',
data
})
}
// 获取操作员列表
export const workerList = data => {
return request({
url: '/api/basic/worker/page',
method: 'POST',
data
})
}
// 根据批次获取物料信息
export const materialInfo = data => {
return request({
url: '/api/material/material-date/getByCode',
method: 'POST',
data
})
}
// 获取设备信息
export const getEqInfo = data => {
return request({
url: '/api/basic/equipment/PDAget',
method: 'POST',
formState: true,
data
}) })
} }

View File

@ -0,0 +1,181 @@
<template>
<div class="dh-field">
<div class="van-picker__toolbar">
<button type="button" class="van-picker__cancel" @click="cancel">取消</button>
<div class="van-ellipsis van-picker__title">{{$attrs.label}}</div>
<button type="button" class="van-picker__confirm" @click="onConfirm">确认</button>
</div>
<div style="max-height:264px; overflow-y:auto;">
<van-field v-if="isSearch" v-model="searchVal" input-align="left" placeholder="搜索" @input="search"/>
<van-cell title="全选">
<template #right-icon>
<van-checkbox v-model="checkedAll" name="all" @click="toggleAll"/>
</template>
</van-cell>
<van-checkbox-group ref="checkboxGroup" v-model="checkboxValue" @change="change">
<van-cell-group>
<van-cell
v-for="(item, index) in columnsData"
:key="item[option.value]"
:title="item[option.label]"
clickable
@click="toggle(index)"
>
<template #right-icon>
<van-checkbox ref="checkboxes" :name="item[option.value]" />
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</div>
</div>
</template>
<script>
export default {
name: 'VanFieldCheckbox',
model: {
prop: 'selectValue'
},
props: {
columns: {
type: Array,
default: function () {
return []
}
},
selectValue: {
type: Array,
default: function () {
return []
}
},
option: {
type: Object,
default: function () {
return { label: 'label', value: 'value' }
}
},
//
isSearch: {
type: Boolean,
default: true
}
},
computed: {
resultLabel: {
get () {
const res = this.columns.filter(item => {
return this.resultValue.indexOf(item[this.option.value]) > -1
})
const resLabel = res.map(item => {
return item[this.option.label]
})
return resLabel.join(',')
}
}
},
data () {
return {
show: false,
searchVal: '',
columnsData: JSON.parse(JSON.stringify(this.columns)),
checkboxValue: JSON.parse(JSON.stringify(this.selectValue)),
checkedAll: false,
resultValue: JSON.parse(JSON.stringify(this.selectValue))
}
},
methods: {
//
search (val) {
if (val) {
this.columnsData = this.columnsData.filter(item => {
return item[this.option.label].indexOf(val) > -1
})
} else {
this.columnsData = JSON.parse(JSON.stringify(this.columns))
}
},
getData (val) {
const res = this.columnsData.filter(item => {
return val.indexOf(item[this.option.value]) > -1
})
return res
},
onConfirm () {
this.resultValue = this.checkboxValue
this.show = !this.show
this.$emit('confirm', this.resultValue, this.getData(this.resultValue))
},
change (val) {
this.$emit('change', val, this.getData(this.resultValue))
},
cancel () {
this.show = !this.show
this.$emit('cancel', this.resultValue)
},
toggle (index) {
this.$refs.checkboxes[index].toggle()
},
toggleAll (all) {
this.$refs.checkboxGroup.toggleAll(this.checkedAll)
},
showPopu (disabled) {
this.columnsData = JSON.parse(JSON.stringify(this.columns))
this.checkboxValue = JSON.parse(JSON.stringify(this.selectValue))
this.resultValue = JSON.parse(JSON.stringify(this.selectValue))
if (disabled !== undefined && disabled !== false) {
return false
} else {
this.show = !this.show
}
}
},
watch: {
selectValue: function (newVal) {
this.resultValue = newVal
},
resultValue (val) {
this.searchVal = ''
this.columnsData = JSON.parse(JSON.stringify(this.columns))
this.$emit('input', val)
},
columnsData: {
handler (val) {
if (val.length && val.length === this.checkboxValue.length) {
this.checkedAll = true
} else {
this.checkedAll = false
}
},
immediate: true
},
checkboxValue: {
handler (val) {
if (val.length && val.length === this.columnsData.length) {
this.checkedAll = true
} else {
this.checkedAll = false
}
},
immediate: true
}
}
}
</script>
<style lang="scss" scoped>
.dh-field {
padding: 0;
background:#fff;
.dh-cell.van-cell {
padding: 10px 0;
}
.dh-cell.van-cell--required::before {
left: -8px;
}
.van-popup {
border-radius: 20px 20px 0 0;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-28 10:22:30 * @Date: 2022-07-28 10:22:30
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-07-29 13:26:58 * @LastEditTime: 2022-08-03 13:52:32
* @Description: file content * @Description: file content
* @FilePath: \hf-pda\src\pages\eqInspection\components\eqItem.vue * @FilePath: \hf-pda\src\pages\eqInspection\components\eqItem.vue
--> -->
@ -63,7 +63,6 @@ export default {
this.$router.push({ this.$router.push({
name: 'eqInspectionEdit', name: 'eqInspectionEdit',
query: { query: {
equipmentId: this.injectData.equipmentId,
id: this.injectData.id id: this.injectData.id
} }
}) })
@ -93,6 +92,7 @@ export default {
white-space:nowrap; white-space:nowrap;
} }
.eqItem-user { .eqItem-user {
padding-left: .5rem;
flex: 1; flex: 1;
text-align: right; text-align: right;
overflow:hidden; overflow:hidden;

View File

@ -2,14 +2,14 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-28 10:22:30 * @Date: 2022-07-28 10:22:30
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-07-28 15:29:27 * @LastEditTime: 2022-08-03 10:08:25
* @Description: file content * @Description: file content
* @FilePath: \hf-pda\src\pages\eqInspection\components\eqPopup.vue * @FilePath: \hf-pda\src\pages\eqInspection\components\eqPopup.vue
--> -->
<template> <template>
<van-popup v-model="show" position="bottom" class="eqPopup"> <van-popup v-model="show" position="bottom" class="eqPopup">
<van-picker <van-picker
title="标题" title="选择设备"
show-toolbar show-toolbar
:columns="showEqList" :columns="showEqList"
@confirm="onConfirm" @confirm="onConfirm"

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-28 10:22:30 * @Date: 2022-07-28 10:22:30
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-07-29 16:02:15 * @LastEditTime: 2022-08-03 10:12:31
* @Description: file content * @Description: file content
* @FilePath: \hf-pda\src\pages\eqInspection\eqInspection-add.vue * @FilePath: \hf-pda\src\pages\eqInspection\eqInspection-add.vue
--> -->
@ -35,7 +35,7 @@
placeholder="扫描或手动获取" placeholder="扫描或手动获取"
> >
<template #button> <template #button>
<van-button size="small" type="primary" @click="submitEqCode">确定</van-button> <van-button size="small" type="primary" @click="handleSelectEq">选择</van-button>
</template> </template>
</van-field> </van-field>
</van-col> </van-col>
@ -43,27 +43,56 @@
<div class="eq-main-img"> <div class="eq-main-img">
<img src="../../assets/img/back.png" alt=""> <img src="../../assets/img/back.png" alt="">
</div> </div>
<van-row style="position: absolute; bottom: 1rem; width: 100%">
<van-col :span="22" :offset="1">
<van-button type="info" round size="large" @click="submitEqCode"> </van-button>
</van-col>
</van-row>
<eq-popup ref="eqPopup" :eq-list="list" @changeEq="changeEq" />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import shortLine from '@/components/shortLine.vue' import shortLine from '@/components/shortLine.vue'
import { getEqInfo } from '@/api/eqInspection' import eqPopup from './components/eqPopup.vue'
import { getEqInfo, eqList } from '@/api/eqInspection'
export default { export default {
name: 'eqInspectionAdd', name: 'eqInspectionAdd',
components: { shortLine }, components: { shortLine, eqPopup },
data () { data () {
return { return {
eqCode: null eqCode: null,
list: []
} }
}, },
mounted () {
this.getEqList()
},
methods: { methods: {
// //
onClickLeft () { onClickLeft () {
this.$router.goBack() this.$router.goBack()
}, },
//
async getEqList () {
const result = await eqList({
current: 1,
size: 999
})
if (result.success) {
this.list = result.data
}
},
//
handleSelectEq () {
this.$refs.eqPopup.init()
},
//
changeEq (index) {
this.eqCode = this.list[index].code
},
// CODE // CODE
async submitEqCode () { async submitEqCode () {
const result = await getEqInfo({ const result = await getEqInfo({

View File

@ -0,0 +1,285 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 09:13:02
* @Description: file content
* @FilePath: \hf-pda\src\pages\eqInspection\eqInspection-detail.vue
-->
<template>
<div class="eqInspectionEdit">
<!-- navbar -->
<van-sticky :offset-top="0">
<van-nav-bar
title="PDA巡检信息"
left-arrow
sticky
class="eq-header"
@click-left="onClickLeft"
/>
<!-- @click-right="onClickRight" -->
</van-sticky>
<div class="eq-edit-main">
<div class="eq-main-item">
<van-row class="eq-field-item">
<van-col :span="12" class="eq-field-item-lable">
<short-line />
巡检内容
</van-col>
<van-col :span="11" style="text-align: right">
{{ dataForm.inspectionContent }}
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="12" class="eq-field-item-lable">
<short-line />
巡检内容编码
</van-col>
<van-col :span="11" style="text-align: right">
{{ dataForm.inspectionItem }}
</van-col>
</van-row>
</div>
<div class="eq-main-edit-item">
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
详情记录
</van-col>
<van-col :span="15" :offset="1" />
<van-field
v-model="dataForm.description"
type="textarea"
rows="5"
autosize
/>
</van-row>
</div>
<div class="eq-main-edit-item">
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
附件
</van-col>
<van-col :span="15" :offset="1" />
<van-col :span="24" style="padding-left: .25rem">
<van-uploader
v-model="fileList"
:max-count="1"
accept=".doc,.docx,.xls,.xlsx,.pdf,image/*"
:after-read="upload"
/>
</van-col>
<van-col :span="22" :offset="1">
<van-button type="info" round size="large" @click="handleSubmit">
提交
</van-button>
</van-col>
</van-row>
</div>
</div>
</div>
</template>
<script>
import { detailIns, updateIns } from '@/api/eqInspection'
import { uploadFile, downloadFile } from '@/api/file'
import { blobToBase64 } from '@/util/utils'
import shortLine from '@/components/shortLine.vue'
import { Toast } from 'vant'
export default {
name: 'eqInspectionD',
components: { shortLine },
data () {
return {
eqList: [],
dataForm: {
id: null,
annexUrl: null,
inspectionItem: null,
inspectionContent: null,
description: null
},
fileList: []
}
},
mounted () {
this.getDetail()
},
methods: {
//
onClickLeft () {
this.$router.goBack()
},
//
async getDetail () {
const result = await detailIns({
id: this.$route.query.id
})
if (result.success) {
this.dataForm = result.data
if (result.data.annexUrl) {
const result2 = await downloadFile({
type: 'file',
attachmentId: result.data.annexUrl
})
blobToBase64(result2.data.data, (v) => {
const file = new File([result2.data.data], result2.data.headers['content-disposition'].slice(result2.data.headers['content-disposition'].indexOf('filename=') + 9), { type: '*' })
this.fileList.push({
content: v,
file
})
})
}
}
},
//
async upload (file) {
const data = new FormData()
data.append('files', file.file)
data.append('typeCode', 'file')
const result = await uploadFile(data)
if (result.success) {
this.dataForm.annexUrl = result.data[0].id
}
},
//
async handleSubmit () {
const result = await updateIns(this.dataForm)
if (result.success) {
Toast.success({
message: '操作成功',
onClose: () => {
this.$router.push({
name: 'eqInspectionEdit',
query: {
id: this.$route.query.insId
}
})
}
})
}
}
}
}
</script>
<style lang="scss">
.eqInspectionEdit {
width: 100%;
background: #F6F6F6;
.eq-header {
background: #4271FF;
.van-icon {
color: #fff;
font-size: .4375rem;
}
.van-nav-bar__content {
height: 1.5rem;
line-height: 1.5rem;
.van-nav-bar__title {
color: #fff;
font-size: .4375rem;
}
}
}
.eq-edit-main {
width: 100%;
position: absolute;
top: 1.5rem;
bottom: 0;
overflow: scroll;
input::-webkit-input-placeholder {
font-size: .375rem;
}
input:-moz-placeholder {
font-size: .375rem;
}
input::-moz-placeholder {
font-size: .375rem;
}
input:-ms-input-placeholder {
font-size: .375rem;
}
.eq-main-item {
background: #fff;
padding-bottom: .25rem;
margin-bottom: .25rem;
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-indent: .375rem;
font-size: .375rem;
}
.van-cell {
padding: 0 .25rem;
height: .875rem;
background: #F6F6F6;
border-radius: .1875rem;
.van-field__body {
height: .875rem;
.van-field__control {
height: .875rem;
}
}
}
}
}
.eq-main-edit-item {
background: #fff;
padding-bottom: .25rem;
margin-bottom: .25rem;
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-indent: .375rem;
font-size: .375rem;
}
.van-cell {
width: calc(100% - .75rem);
margin: 0 .375rem;
padding: 0 .25rem;
background: #F6F6F6;
border-radius: .125rem;
}
}
}
.eq-main-edit-neirong-item {
background: #fff;
padding-bottom: .25rem;
margin-bottom: .25rem;
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-indent: .375rem;
font-size: .375rem;
}
.eq-main-edit-neirong-item-item {
border-bottom: 1px solid #F6F6F6;
.van-cell__title {
font-size: .3125rem;
}
.van-cell__label {
font-size: .3125rem;
}
.van-button {
height: 100%;
border: 0;
background: #42D1A5;
color: #fff;
font-size: .3125rem;
.van-icon {
font-size: .5rem;
margin-bottom: .1rem;
}
}
}
}
}
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-28 10:22:30 * @Date: 2022-07-28 10:22:30
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-08-02 15:15:11 * @LastEditTime: 2022-08-03 09:06:45
* @Description: file content * @Description: file content
* @FilePath: \hf-pda\src\pages\eqInspection\eqInspection-edit.vue * @FilePath: \hf-pda\src\pages\eqInspection\eqInspection-edit.vue
--> -->
@ -81,7 +81,7 @@
</template> </template>
</van-cell> </van-cell>
<template #right> <template #right>
<van-button square> <van-button square @click="toInsDetail(item)">
<van-icon name="add-o" /> <van-icon name="add-o" />
<div>编辑详情</div> <div>编辑详情</div>
</van-button> </van-button>
@ -238,7 +238,6 @@ export default {
}, },
// //
async upload (file) { async upload (file) {
console.log(this.fileList)
const data = new FormData() const data = new FormData()
data.append('files', file.file) data.append('files', file.file)
data.append('typeCode', 'file') data.append('typeCode', 'file')
@ -249,7 +248,6 @@ export default {
}, },
// //
async updateStatus (item) { async updateStatus (item) {
console.log(item)
const result = await updateInsStatus({ const result = await updateInsStatus({
id: item.id, id: item.id,
status: item.statusBoolean ? '1' : '0' status: item.statusBoolean ? '1' : '0'
@ -300,6 +298,16 @@ export default {
} }
}) })
} }
},
//
toInsDetail (item) {
this.$router.push({
name: 'eqInspectionDetail',
query: {
id: item.id,
insId: this.dataForm.id
}
})
} }
} }
} }

View File

@ -0,0 +1,135 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 14:06:58
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\components\materialItem.vue
-->
<template>
<div class="materialItem">
<div class="eqItem-header">
<div class="eqItem-title">
<short-line />
{{ injectData.equipmentName }}
</div>
<div class="eqItem-user">
{{ injectData.operator }}
</div>
</div>
<div class="eqItem-main">
<div class="eqItem-main-left">
<div class="eqItem-main-left-item">
物料批次
<span>{{ injectData.materialDateCode ? injectData.materialDateCode : '暂无' }}</span>
</div>
<div class="eqItem-main-left-item">
换料时间
<span>{{ injectData.replaceTime ? moment(injectData.replaceTime).format('YYYY-MM-DD HH:mm:ss') : '暂无' }}</span>
</div>
</div>
<div class="eqItem-main-right" @click="toDetail">
<div class="eqItem-main-right-box">
<div style="opacity: .5;">查看详情</div>
<div>
<van-icon class-prefix="iconfont" name="jiantou" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import moment from 'moment'
import shortLine from '@/components/shortLine.vue'
export default {
name: 'materialItem',
components: { shortLine },
props: {
injectData: {
type: Object,
default: () => {}
}
},
data () {
return {
moment
}
},
methods: {
toDetail () {
this.$router.push({
name: 'materialEdit',
query: {
id: this.injectData.id
}
})
}
}
}
</script>
<style lang="scss" scoped>
.materialItem {
width: calc(100% - .75rem);
padding: .125rem .375rem;
border-radius: .25rem;
height: 2.125rem;
background: #fff;
box-shadow: .02rem .02rem .1rem rgba($color: #000000, $alpha: .2);
margin: .125rem 0;
.eqItem-header {
line-height: .875rem;
display: flex;
font-size: .34375rem;
.eqItem-title {
font-weight: bold;
max-width: 2.75rem;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
.eqItem-user {
padding-left: .5rem;
flex: 1;
text-align: right;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
}
.eqItem-main {
display: flex;
.eqItem-main-left {
flex: 1;
padding-right: .1rem;
.eqItem-main-left-item {
line-height: .59375rem;
font-size: .3125rem;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
span {
opacity: .5;
}
}
}
.eqItem-main-right {
font-size: .3125rem;
width: 1.6rem;
display: flex;
align-items: flex-end;
justify-content: center;
.eqItem-main-right-box {
padding-bottom: .1rem;
.iconfont {
font-size: 0.17rem;
color: #4271FF;
}
}
}
}
}
</style>

View File

@ -0,0 +1,59 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 20:27:20
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\components\materialPopup-batch.vue
-->
<template>
<van-popup v-model="show" position="bottom" class="eqPopup">
<van-picker
title="选择设备"
show-toolbar
:columns="showList"
@confirm="onConfirm"
@cancel="onCancel"
/>
</van-popup>
</template>
<script>
export default {
name: 'eqPopup',
props: {
batchList: {
type: Array,
default: () => []
}
},
data () {
return {
show: false
}
},
computed: {
showList: function () {
return this.batchList.map(item => {
return item.name
})
}
},
methods: {
init () {
this.show = true
},
onConfirm (val, index) {
this.$emit('changeBatch', index)
this.show = false
},
onCancel () {
this.show = false
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,60 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 20:27:07
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\components\materialPopup-source.vue
-->
<template>
<van-popup v-model="show" position="bottom" class="eqPopup">
<van-picker
title="选择设备"
show-toolbar
:columns="showList"
:default-index="1"
@confirm="onConfirm"
@cancel="onCancel"
/>
</van-popup>
</template>
<script>
export default {
name: 'eqPopup',
props: {
sourceList: {
type: Array,
default: () => []
}
},
data () {
return {
show: false
}
},
computed: {
showList: function () {
return this.sourceList.map(item => {
return item
})
}
},
methods: {
init () {
this.show = true
},
onConfirm (val) {
this.$emit('changeSource', val)
this.show = false
},
onCancel () {
this.show = false
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,81 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 20:16:41
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\components\materialPopup-worker.vue
-->
<template>
<van-popup v-model="show" position="bottom" class="eqPopup">
<van-field-check-box
title="选择设备"
show-toolbar
ref="worker-picker"
:columns="showList"
:select-value="defaultValue"
@confirm="onConfirm"
@cancel="onCancel"
/>
<!-- <van-picker
title="选择设备"
show-toolbar
ref="worker-picker"
:columns="showList"
@confirm="onConfirm"
@cancel="onCancel"
>
<template #title>
<span @click="selectConfirm" style="font-size: .28rem; color: #1989fa">选择</span>
</template>
</van-picker> -->
</van-popup>
</template>
<script>
import VanFieldCheckBox from '@/components/VanFieldCheckBox'
export default {
name: 'eqPopup',
components: { VanFieldCheckBox },
props: {
workerList: {
type: Array,
default: () => []
}
},
data () {
return {
show: false,
defaultValue: []
}
},
computed: {
showList: function () {
return this.workerList.map(item => {
return { label: item.name, value: item.name }
})
}
},
methods: {
init (operator) {
if (operator) {
this.defaultValue = operator.split('、')
}
this.$nextTick(() => {
this.show = true
})
},
onConfirm (val) {
this.$emit('changeWorker', val.join('、'))
this.show = false
},
onCancel () {
this.show = false
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,59 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 20:26:56
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\components\materialPopup.vue
-->
<template>
<van-popup v-model="show" position="bottom" class="eqPopup">
<van-picker
title="选择设备"
show-toolbar
:columns="showEqList"
@confirm="onConfirm"
@cancel="onCancel"
/>
</van-popup>
</template>
<script>
export default {
name: 'eqPopup',
props: {
eqList: {
type: Array,
default: () => []
}
},
data () {
return {
show: false
}
},
computed: {
showEqList: function () {
return this.eqList.map(item => {
return item.name
})
}
},
methods: {
init () {
this.show = true
},
onConfirm (val, index) {
this.$emit('changeEq', index)
this.show = false
},
onCancel () {
this.show = false
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,78 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-07-28 17:26:08
* @Description: file content
* @FilePath: \hf-pda\src\pages\eqInspection\components\timePopup.vue
-->
<template>
<van-calendar
class="timePopup"
v-model="show"
type="range"
:min-date="minDate"
:default-date="defaultDate"
@confirm="onConfirm"
/>
</template>
<script>
import moment from 'moment'
export default {
props: {
defaultDate: {
type: Array,
default: () => {
return [new Date(), new Date() + 86400000]
}
}
},
name: 'timePopup',
data () {
return {
show: false,
date: null,
minDate: new Date(2020, 1, 1)
}
},
methods: {
init () {
this.show = true
},
formatDate (date) {
return moment(date).format('YYYY-MM-DDTHH:mm:ss')
},
onConfirm (date) {
const [start, end] = date
this.show = false
this.date = [
this.formatDate(start - (start.valueOf() + 28800000) % 86400000),
this.formatDate(end - (start.valueOf() + 28800000) % 86400000 + 86399000)
]
this.$emit('changeDate', this.date)
}
}
}
</script>
<style lang="scss">
.timePopup {
.van-calendar__day--start, .van-calendar__day--end {
background-color: #4271FF;
}
.van-calendar__day--middle::after {
background-color: transparent;
}
.van-calendar__day--middle {
background: rgba($color: #4271FF, $alpha: .2);
color: #fff;
}
.van-button--danger {
color: #fff;
background-color: #4271FF;
border: 0.02rem solid #4271FF;
}
}
</style>

View File

@ -0,0 +1,185 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 13:50:15
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\material-add.vue
-->
<template>
<div class="materialAdd">
<!-- @keypress.enter="submitEqCode" -->
<!-- navbar -->
<van-sticky :offset-top="0">
<van-nav-bar
title="PDA换料扫描设备信息"
left-arrow
sticky
class="eq-header"
@click-left="onClickLeft"
/>
<!-- @click-right="onClickRight" -->
</van-sticky>
<div class="eq-add-main">
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
设备编码
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="eqCode"
ref="eqCodeInput"
clearable
autofocus
placeholder="扫描或手动获取"
>
<template #button>
<van-button size="small" type="primary" @click="handleSelectEq">选择</van-button>
</template>
</van-field>
</van-col>
</van-row>
<div class="eq-main-img">
<img src="../../assets/img/back.png" alt="">
</div>
<van-row style="position: absolute; bottom: 1rem; width: 100%">
<van-col :span="22" :offset="1">
<van-button type="info" round size="large" @click="submitEqCode"> </van-button>
</van-col>
</van-row>
<material-popup ref="eqPopup" :eq-list="list" @changeEq="changeEq" />
</div>
</div>
</template>
<script>
import shortLine from '@/components/shortLine.vue'
import materialPopup from './components/materialPopup.vue'
import { getEqInfo, eqList } from '@/api/material'
export default {
name: 'materialAdd',
components: { shortLine, materialPopup },
data () {
return {
eqCode: null,
list: []
}
},
mounted () {
this.getEqList()
},
methods: {
//
onClickLeft () {
this.$router.goBack()
},
//
async getEqList () {
const result = await eqList({
current: 1,
size: 999
})
if (result.success) {
this.list = result.data
}
},
//
handleSelectEq () {
this.$refs.eqPopup.init()
},
//
changeEq (index) {
this.eqCode = this.list[index].code
},
// CODE
async submitEqCode () {
const result = await getEqInfo({
key: this.eqCode
})
if (result.success) {
this.$router.push({
name: 'materialEdit',
query: {
equipmentId: result.data.id,
equipmentName: result.data.name
}
})
}
console.log(result)
}
}
}
</script>
<style lang="scss">
.materialAdd {
width: 100%;
.eq-header {
background: #4271FF;
.van-icon {
color: #fff;
font-size: .4375rem;
}
.van-nav-bar__content {
height: 1.5rem;
line-height: 1.5rem;
.van-nav-bar__title {
color: #fff;
font-size: .4375rem;
}
}
}
.eq-add-main {
width: 100%;
position: absolute;
top: 1.5rem;
bottom: 0;
overflow: scroll;
input::-webkit-input-placeholder {
font-size: .375rem;
}
input:-moz-placeholder {
font-size: .375rem;
}
input::-moz-placeholder {
font-size: .375rem;
}
input:-ms-input-placeholder {
font-size: .375rem;
}
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-align: right;
font-size: .375rem;
}
.van-cell {
padding: 0 .25rem;
height: .875rem;
background: #F6F6F6;
border-radius: .1875rem;
.van-field__body {
height: .875rem;
.van-field__control {
height: .875rem;
}
}
}
}
.eq-main-img {
width: 100%;
min-height: 70vh;
display: flex;
align-items: center;
justify-content: center;
img {
width: 4.4rem;
height: 3.6rem;
}
}
}
}
</style>

View File

@ -0,0 +1,459 @@
<!--
* @Author: gtz
* @Date: 2022-07-28 10:22:30
* @LastEditors: gtz
* @LastEditTime: 2022-08-03 20:39:43
* @Description: file content
* @FilePath: \hf-pda\src\pages\material\material-edit.vue
-->
<template>
<div class="materialEdit">
<!-- navbar -->
<van-sticky :offset-top="0">
<van-nav-bar
title="PDA换料信息"
left-arrow
sticky
class="eq-header"
@click-left="onClickLeft"
/>
<!-- @click-right="onClickRight" -->
</van-sticky>
<div class="eq-edit-main">
<div class="eq-main-item">
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
批次
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.materialDateName"
disabled
placeholder="请选择批次"
@click="handleSelectBatch"
right-icon="arrow-down"
/>
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
换料时间
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.replaceTime"
disabled
placeholder="请选择换料时间"
@click="handleDate"
right-icon="arrow-down"
/>
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
物料名称
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.materialName"
disabled
placeholder="请选择批次"
/>
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
物料编码
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.materialCode"
disabled
placeholder="请选择批次"
/>
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
设备名
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.equipmentName"
disabled
placeholder="请选择设备"
@click="handleSelectEq"
right-icon="arrow-down"
/>
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
数据来源
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.source"
disabled
placeholder="请选择数据来源"
right-icon="arrow-down"
@click="handleSelectSource"
/>
</van-col>
</van-row>
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
操作员
</van-col>
<van-col :span="15" :offset="1" class="eq-field-item-input">
<van-field
v-model="dataForm.operator"
disabled
placeholder="请选择操作员"
right-icon="arrow-down"
@click="handleSelectWorker"
/>
</van-col>
</van-row>
</div>
<div class="eq-main-edit-item">
<van-row class="eq-field-item">
<van-col :span="7" class="eq-field-item-lable">
<short-line />
备注
</van-col>
<van-col :span="15" :offset="1" />
<van-field
v-model="dataForm.remark"
type="textarea"
rows="5"
autosize
/>
<van-col style="margin-top: .2rem" :span="10" :offset="1">
<van-button type="primary" round size="large" @click="resetForm">
重置
</van-button>
</van-col>
<van-col style="margin-top: .2rem" :span="10" :offset="2">
<van-button type="info" round size="large" @click="handleSubmit">
提交
</van-button>
</van-col>
</van-row>
</div>
</div>
<van-popup v-model="showDate" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="datetime"
title="换料时间"
:min-date="minDate"
@confirm="setDate"
@cancel="showDate = false"
/>
</van-popup>
<material-popup ref="eqPopup" :eq-list="eqList" @changeEq="changeEq" />
<material-popup-batch ref="batchPopup" :batch-list="batchList" @changeBatch="changeBatch" />
<material-popup-worker ref="workerPopup" :worker-list="workerList" @changeWorker="changeWorker" />
<material-popup-source ref="sourcePopup" :source-list="sourceList" @changeSource="changeSource" />
</div>
</template>
<script>
import moment from 'moment'
import { detail, eqList, batchList, workerList, materialInfo, add, update } from '@/api/material'
import shortLine from '@/components/shortLine.vue'
import materialPopup from './components/materialPopup'
import materialPopupBatch from './components/materialPopup-batch'
import materialPopupWorker from './components/materialPopup-worker'
import materialPopupSource from './components/materialPopup-source'
import { Toast } from 'vant'
export default {
name: 'materialEdit',
components: { shortLine, materialPopup, materialPopupBatch, materialPopupWorker, materialPopupSource },
data () {
return {
eqList: [],
batchList: [],
workerList: [],
sourceList: ['手动', 'PDA'],
dataForm: {
id: null,
equipmentId: null,
equipmentName: null,
materialDateName: null,
materialDateCode: null,
materialName: null,
materialCode: null,
replaceTime: null,
operator: null,
source: null,
remark: null
},
minDate: new Date(2020, 0, 1),
showDate: false,
currentDate: null
}
},
mounted () {
if (this.$route.query.equipmentName) {
this.dataForm.equipmentName = this.$route.query.equipmentName
}
this.getDictList()
},
methods: {
//
onClickLeft () {
this.$router.goBack()
},
async getDictList () {
const listQuery = {
current: 1,
size: 999
}
const resultEq = await eqList(listQuery)
if (resultEq.success) {
this.eqList = resultEq.data
}
const resultBatch = await batchList(listQuery)
if (resultBatch.success) {
this.batchList = resultBatch.data
}
const resultWorker = await workerList(listQuery)
if (resultWorker.success) {
this.workerList = resultWorker.data.records
}
if (this.$route.query.id) {
this.getDetail()
} else {
this.dataForm.equipmentId = this.$route.query.equipmentId
this.dataForm.equipmentName = this.$route.query.equipmentName
}
},
//
async getDetail () {
const result = await detail({
id: this.$route.query.id
})
if (result.success) {
this.dataForm = result.data
}
},
//
setDate (v) {
this.dataForm.replaceTime = moment(v).format('YYYY-MM-DDTHH:mm:ss')
this.showDate = false
},
//
handleDate () {
this.showDate = true
},
//
changeEq (index) {
this.dataForm.equipmentId = this.eqList[index].id
this.dataForm.equipmentName = this.eqList[index].name
},
//
handleSelectEq () {
this.$refs.eqPopup.init(this.dataForm.equipmentName)
},
//
async changeBatch (index) {
const result = await materialInfo({
externalCode: this.batchList[index].code
})
if (result.success) {
this.dataForm.materialDateName = result.data.name
this.dataForm.materialDateCode = result.data.code
this.dataForm.materialName = result.data.materialName
this.dataForm.materialCode = result.data.materialCode
this.dataForm.materialId = result.data.materialId
}
},
//
handleSelectBatch () {
this.$refs.batchPopup.init(this.dataForm.materialDateName)
},
//
changeWorker (val) {
this.dataForm.operator = val
},
//
handleSelectWorker () {
this.$refs.workerPopup.init(this.dataForm.operator)
},
changeSource (val) {
this.dataForm.source = val
},
handleSelectSource () {
this.$refs.sourcePopup.init(this.dataForm.source)
},
//
async handleSubmit () {
if (this.dataForm.replaceTime && this.dataForm.materialDateCode && this.dataForm.equipmentId) {
let result = {}
if (this.$route.query.id) {
result = await update(this.dataForm)
} else {
result = await add(this.dataForm)
}
if (result.success) {
Toast.success({
message: '操作成功',
onClose: () => {
this.$router.push({
name: 'material'
})
}
})
}
} else {
this.$notify('批次号、设备、换料时间必须选择!')
}
},
//
resetForm () {
this.dataForm = {
id: null,
equipmentId: null,
equipmentName: null,
materialDateName: null,
materialDateCode: null,
materialName: null,
materialCode: null,
replaceTime: null,
operator: null,
source: null,
remark: null
}
}
}
}
</script>
<style lang="scss">
.materialEdit {
width: 100%;
background: #F6F6F6;
.eq-header {
background: #4271FF;
.van-icon {
color: #fff;
font-size: .4375rem;
}
.van-nav-bar__content {
height: 1.5rem;
line-height: 1.5rem;
.van-nav-bar__title {
color: #fff;
font-size: .4375rem;
}
}
}
.eq-edit-main {
width: 100%;
position: absolute;
top: 1.5rem;
bottom: 0;
overflow: scroll;
input::-webkit-input-placeholder {
font-size: .375rem;
}
input:-moz-placeholder {
font-size: .375rem;
}
input::-moz-placeholder {
font-size: .375rem;
}
input:-ms-input-placeholder {
font-size: .375rem;
}
.eq-main-item {
background: #fff;
padding-bottom: .25rem;
margin-bottom: .25rem;
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-indent: .375rem;
font-size: .375rem;
}
.van-cell {
padding: 0 .25rem;
height: .875rem;
background: #F6F6F6;
border-radius: .1875rem;
.van-field__body {
height: .875rem;
.van-field__control {
height: .875rem;
}
}
}
}
}
.eq-main-edit-item {
background: #fff;
padding-bottom: .25rem;
margin-bottom: .25rem;
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-indent: .375rem;
font-size: .375rem;
}
.van-cell {
width: calc(100% - .75rem);
margin: 0 .375rem;
padding: 0 .25rem;
background: #F6F6F6;
border-radius: .125rem;
}
}
}
.eq-main-edit-neirong-item {
background: #fff;
padding-bottom: .25rem;
margin-bottom: .25rem;
.eq-field-item {
padding-top: .25rem;
line-height: .875rem;
.eq-field-item-lable {
text-indent: .375rem;
font-size: .375rem;
}
.eq-main-edit-neirong-item-item {
border-bottom: 1px solid #F6F6F6;
.van-cell__title {
font-size: .3125rem;
}
.van-cell__label {
font-size: .3125rem;
}
.van-button {
height: 100%;
border: 0;
background: #42D1A5;
color: #fff;
font-size: .3125rem;
.van-icon {
font-size: .5rem;
margin-bottom: .1rem;
}
}
}
}
}
}
}
</style>

View File

@ -3,16 +3,42 @@
<!-- navbar --> <!-- navbar -->
<van-sticky :offset-top="0"> <van-sticky :offset-top="0">
<van-nav-bar <van-nav-bar
title="物料耗材" title="PDA换料记录"
left-arrow left-arrow
sticky sticky
class="material-header" class="eq-header"
@click-left="onClickLeft" @click-left="onClickLeft"
/> />
<!-- @click-right="onClickRight" --> <!-- @click-right="onClickRight" -->
</van-sticky> </van-sticky>
<van-pull-refresh class="material-main" v-model="isLoading" @refresh="onRefresh" ref="listMain"> <van-pull-refresh class="eq-main" v-model="isLoading" @refresh="onRefresh" ref="listMain">
<!-- 信息列表主体 --> <!-- 信息列表主体 -->
<!-- 搜索区域 -->
<div class="eq-search">
<div class="eq-search-back" />
<div class="eq-search-main">
<van-row class="eq-search-item">
<van-col :span="7" class="eq-search-item-lable">关键字</van-col>
<van-col :span="15" :offset="1" class="eq-search-item-input">
<van-field
v-model="queryList.key"
placeholder="批次号/物料编码/名称"
/>
</van-col>
</van-row>
<van-row class="eq-search-btn">
<van-col :span="9" :offset="1">
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
</van-col>
<van-col :span="12" :offset="1">
<van-button class="eq-search-btn-item eq-search-btn-right" round @click="getDataList"> </van-button>
</van-col>
</van-row>
</div>
</div>
<div class="eq-list">
<material-item v-for="item in dataList" :inject-data="item" :key="item.id" />
</div>
<water-fall @click.native="getMore" :isOver="isOver"></water-fall> <water-fall @click.native="getMore" :isOver="isOver"></water-fall>
</van-pull-refresh> </van-pull-refresh>
</div> </div>
@ -20,13 +46,18 @@
<script> <script>
import { list } from '@/api/material' import { list } from '@/api/material'
import materialItem from './components/materialItem.vue'
export default { export default {
name: 'material', name: 'material',
components: { materialItem },
data () { data () {
return { return {
pageNum: 1, queryList: {
pageSize: 10, current: 1,
key: '',
size: 10
},
isLoading: false, isLoading: false,
isOver: true, isOver: true,
dataList: [] dataList: []
@ -34,35 +65,18 @@ export default {
}, },
mounted () { mounted () {
this.getDataList() this.getDataList()
document.querySelector('.material-main').addEventListener('scroll', this.handleScroll, true) document.querySelector('.eq-main').addEventListener('scroll', this.handleScroll, true)
// // },
// window.history.pushState(null, null, document.URL) destroyed () {
// // windowpopstatethis.onBrowserBackaddEventListener document.querySelector('.eq-main').removeEventListener('scroll', this.handleScroll, false)
// window.addEventListener('popstate', this.onBrowserBack, false)
}, },
// destroyed () {
// window.removeEventListener('popstate', this.onBrowserBack, false)
// document.querySelector('.ol-main').removeEventListener('scroll', this.handleScroll, false)
// },
methods: { methods: {
//
// onBrowserBack () {
// if (this.show || this.showItem || this.showTypeId || this.showTypeCode) {
// this.show = false
// this.showItem = false
// this.showTypeId = false
// this.showTypeCode = false
// window.history.pushState(null, null, document.URL)
// } else {
// this.$router.goBack()
// }
// },
// //
handleScroll () { handleScroll () {
let clientHeight = document.documentElement.clientHeight // let clientHeight = document.documentElement.clientHeight //
let scrollHeight = document.querySelector('.material-main').scrollHeight // let scrollHeight = document.querySelector('.eq-main').scrollHeight //
let scrollTop = document.querySelector('.material-main').scrollTop // let scrollTop = document.querySelector('.eq-main').scrollTop //
let headerHeight = document.querySelector('.material-header').offsetHeight// header let headerHeight = document.querySelector('.eq-header').offsetHeight// header
let listHeight = clientHeight - headerHeight // list let listHeight = clientHeight - headerHeight // list
if (scrollTop - (scrollHeight - listHeight) >= -80 && this.isFirstScroll) { if (scrollTop - (scrollHeight - listHeight) >= -80 && this.isFirstScroll) {
this.isFirstScroll = false this.isFirstScroll = false
@ -79,27 +93,23 @@ export default {
// //
getMore () { getMore () {
if (this.isOver) { if (this.isOver) {
this.pageNum += 1 this.queryList.current += 1
this.getDataList() this.getDataList()
} }
}, },
// //
async getDataList () { async getDataList () {
const result = await list({ const result = await list(this.queryList)
pageSize: this.pageSize,
pageNum: this.pageNum
})
if (result.success) { if (result.success) {
this.dataList = result.data this.dataList = result.data.records
if (this.dataOption.isLastPage) { this.dataOption = result.data
if (this.dataOption.total / 10 <= this.queryList.current) {
this.isOver = false this.isOver = false
} else { } else {
this.isOver = true this.isOver = true
} }
this.show = false this.show = false
} else { } else {
this.dataOption.firstPage = 1
this.dataOption.lastPage = 1
this.isOver = true this.isOver = true
} }
}, },
@ -109,11 +119,27 @@ export default {
}, },
// //
onClickLeft () { onClickLeft () {
this.$router.goBack() this.$router.push({
name: 'index'
})
},
//
toAdd () {
this.$router.push({
name: 'materialAdd'
})
},
//
resetQuery () {
this.queryList = {
current: 1,
key: '',
size: 10
}
}, },
// //
async onRefresh () { async onRefresh () {
this.resetList() this.resetQuery()
await this.getDataList() await this.getDataList()
this.$toast.success('刷新成功') this.$toast.success('刷新成功')
this.isLoading = false this.isLoading = false
@ -122,17 +148,117 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.material{ .material {
width: 100%; width: 100%;
background: #F6F6F6; background: #F6F6F6;
.material-main{ .eq-main {
width: 100%; width: 100%;
position: absolute; position: absolute;
top: .92rem; top: 1.5rem;
bottom: 0; bottom: 0;
overflow: scroll; overflow: scroll;
line-height: 1rem; }
.eq-header {
background: #4271FF;
.van-icon {
color: #fff;
font-size: .4375rem;
}
.van-nav-bar__content {
height: 1.5rem;
line-height: 1.5rem;
.van-nav-bar__title {
color: #fff;
font-size: .4375rem;
}
}
}
.van-hairline--bottom::after {
border-bottom-width: 0;
}
.eq-search {
width: 100%;
height: 2.75rem;
position: relative;
.iconfont {
font-size: .5rem;
position: relative;
top: .05rem;
left: .09rem;
color: #0B58FF;
}
.eq-search-back {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 1rem;
background: #4271FF;
}
.eq-search-main {
position: relative;
padding-top: .125rem;
width: 94%;
margin-left: 3%;
height: 2.625rem;
border-radius: .25rem;
background: #fff;
box-shadow: .02rem .02rem .1rem rgba($color: #000000, $alpha: .2);
input::-webkit-input-placeholder {
font-size: .375rem;
}
input:-moz-placeholder {
font-size: .375rem;
}
input::-moz-placeholder {
font-size: .375rem;
}
input:-ms-input-placeholder {
font-size: .375rem;
}
}
.eq-search-item {
padding-top: .25rem;
line-height: .875rem;
.eq-search-item-lable {
text-align: right;
font-size: .375rem;
}
.van-cell {
padding: 0 .25rem;
height: .875rem;
background: #F6F6F6;
border-radius: .1875rem;
.van-field__body {
height: .875rem;
.van-field__control {
height: .875rem;
}
}
}
}
.eq-search-btn {
margin-top: .25rem;
.eq-search-btn-item {
width: 100%;
font-size: .375rem;
}
.eq-search-btn-left {
color: #42D1A5;
border: 0.02rem solid #42D1A5;
}
.eq-search-btn-right {
color: #fff;
background: #4271FF;
border: 0.02rem solid #4271FF;
}
}
}
.eq-list {
width: 94%;
padding: 0 3%;
} }
} }
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: gtz * @Author: gtz
* @Date: 2022-07-25 14:18:00 * @Date: 2022-07-25 14:18:00
* @LastEditors: gtz * @LastEditors: gtz
* @LastEditTime: 2022-07-29 13:24:07 * @LastEditTime: 2022-08-03 13:48:48
* @Description: file content * @Description: file content
* @FilePath: \hf-pda\src\router\index.js * @FilePath: \hf-pda\src\router\index.js
*/ */
@ -14,7 +14,10 @@ import index from '@/pages/index/index'
import eqInspection from '@/pages/eqInspection/eqInspection' import eqInspection from '@/pages/eqInspection/eqInspection'
import eqInspectionAdd from '@/pages/eqInspection/eqInspection-add' import eqInspectionAdd from '@/pages/eqInspection/eqInspection-add'
import eqInspectionEdit from '@/pages/eqInspection/eqInspection-edit' import eqInspectionEdit from '@/pages/eqInspection/eqInspection-edit'
import eqInspectionDetail from '@/pages/eqInspection/eqInspection-detail'
import material from '@/pages/material/material' import material from '@/pages/material/material'
import materialAdd from '@/pages/material/material-add'
import materialEdit from '@/pages/material/material-edit'
Vue.use(Router) Vue.use(Router)
@ -49,12 +52,30 @@ const router = new Router({
meta: {requireAuth: true}, meta: {requireAuth: true},
component: eqInspectionEdit component: eqInspectionEdit
}, },
{
path: '/eqInspection-detail',
name: 'eqInspectionDetail',
meta: {requireAuth: true},
component: eqInspectionDetail
},
{ {
path: '/material', path: '/material',
name: 'material', name: 'material',
meta: {requireAuth: true}, meta: {requireAuth: true},
component: material component: material
}, },
{
path: '/material-add',
name: 'materialAdd',
meta: {requireAuth: true},
component: materialAdd
},
{
path: '/material-edit',
name: 'materialEdit',
meta: {requireAuth: true},
component: materialEdit
},
{ {
path: '/404', path: '/404',
name: 'notFound', name: 'notFound',