zhang_li
10 months ago
23 changed files with 41 additions and 4051 deletions
@ -1,88 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="work-container"> |
|||
<Search @search='search' @screen='screen'/> |
|||
<view class="list"> |
|||
<view class="item" v-for="index in 6" :key='index'> |
|||
<u-image src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" width='160' height="160"> |
|||
<template v-slot:error> |
|||
<view class="image-error"> |
|||
<u-icon name="photo" color="#c7c7c7" size="38"></u-icon> |
|||
<view style="font-size: 24rpx;">暂无图片</view> |
|||
</view> |
|||
</template> |
|||
</u-image> |
|||
<view class="text"> |
|||
<view class="title"> |
|||
电梯设备 |
|||
</view> |
|||
<view class="dec1"> |
|||
SB52225456 |
|||
</view> |
|||
<view class="dec2"> |
|||
四厂区二楼三车间 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
// 搜索 |
|||
search(keyWord) { |
|||
console.log(keyWord) |
|||
}, |
|||
// 筛选 |
|||
screen() { |
|||
console.log(222) |
|||
this.$tab.navigateTo(`/pages/device/screen`) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
.text{ |
|||
margin-left: 20rpx; |
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.image-error{ |
|||
text-align: center; |
|||
} |
|||
</style> |
@ -1,242 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '设备编号', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'text', |
|||
field: 'name', |
|||
label: '设备名称', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'location', |
|||
label: '存放位置', |
|||
list: [{ |
|||
label: '位置1', |
|||
value: 1 |
|||
}, { |
|||
label: '位置2', |
|||
value: 2 |
|||
}, { |
|||
label: '位置3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '设备类型', |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'dept', |
|||
label: '所在部门', |
|||
list: [{ |
|||
label: '部门1', |
|||
value: 1 |
|||
}, { |
|||
label: '部门2', |
|||
value: 2 |
|||
}, { |
|||
label: '部门3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'fuzeren', |
|||
label: '负责人', |
|||
list: [{ |
|||
label: '负责人1', |
|||
value: 1 |
|||
}, { |
|||
label: '负责人2', |
|||
value: 2 |
|||
}, { |
|||
label: '负责人3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'status', |
|||
label: '当前状态', |
|||
list: [{ |
|||
label: '全部', |
|||
value: 1 |
|||
}, { |
|||
label: '报废', |
|||
value: 2 |
|||
}, { |
|||
label: '停用', |
|||
value: 3 |
|||
}, { |
|||
label: '故障', |
|||
value: 4 |
|||
}, { |
|||
label: '正常运行', |
|||
value: 5 |
|||
}] |
|||
}], |
|||
rules: { |
|||
// 对name字段进行必填验证 |
|||
name: [ |
|||
{ |
|||
min: 5, |
|||
message: '简介不能少于5个字', |
|||
trigger: 'change' |
|||
}, |
|||
// 对name字段进行必填验证 |
|||
{ |
|||
required: true, |
|||
message: '请填写姓名', |
|||
trigger: ['change', 'blur'] |
|||
}, |
|||
] |
|||
} |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.$refs.form1.$refs.form.validate().then(res => { |
|||
console.log('表单数据信息:', res); |
|||
}).catch(err => { |
|||
console.log('表单错误信息:', err); |
|||
}) |
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data={} |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,261 +1,24 @@ |
|||
<template> |
|||
<view class="index-content"> |
|||
<u-navbar back-icon-color='#fff' back-icon-name='' :background="{ background: 'rgba(64, 158,255,'+bgOpacity+')'}" back-text="" |
|||
title-color='#fff' :immersive='true' :border-bottom='false' title="首页"> |
|||
<template v-slot:right> |
|||
<u-icon name="bell" color="#fff" size="36" style="padding-right: 30rpx;" @click="open('/pages/notaic/index')"></u-icon> |
|||
</template> |
|||
</u-navbar> |
|||
<view class="top"> |
|||
<image src="../static/images/mobile_bg.png" class="bg" mode=""></image> |
|||
<view class="top-box"> |
|||
<view class="number"> |
|||
<view class="number-item"> |
|||
<view>32</view> |
|||
<view>设备总数</view> |
|||
</view> |
|||
<view class="number-item"> |
|||
<view>32</view> |
|||
<view>故障中设备</view> |
|||
</view> |
|||
<view class="number-item"> |
|||
<view>32</view> |
|||
<view>已报修设备</view> |
|||
</view> |
|||
</view> |
|||
<view class="status"> |
|||
<view class="status-item"> |
|||
<view>32</view> |
|||
<view>待接单</view> |
|||
</view> |
|||
<view class="status-item"> |
|||
<view>32</view> |
|||
<view>待验证</view> |
|||
</view> |
|||
<view class="status-item"> |
|||
<view>32</view> |
|||
<view>待审核</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="box"> |
|||
<view class="title">设备维护</view> |
|||
<u-row gutter="16" style="padding:0px 20rpx ;"> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/workOrderList/index?type=1')"> |
|||
<image src="../static/images/icon4.svg" mode=""></image> |
|||
<view>设备报修</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/workOrderList/index?type=2')"> |
|||
<image src="../static/images/icon5.svg" mode=""></image> |
|||
<view>维修工单</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/workOrderList/index?type=3')"> |
|||
<image src="../static/images/icon3.svg" mode=""></image> |
|||
<view>检修工单</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/workOrderList/index?type=4')"> |
|||
<image src="../static/images/icon2.svg" mode=""></image> |
|||
<view>点检工单</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/workOrderList/index?type=5')"> |
|||
<image src="../static/images/icon1.svg" mode=""></image> |
|||
<view>保养工单</view> |
|||
</view> |
|||
</u-col> |
|||
</u-row> |
|||
<view class="title">模具维护</view> |
|||
<u-row gutter="16"> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/device/deviceRepair/index')"> |
|||
<image src="../static/images/icon4.svg" mode=""></image> |
|||
<view>设备报修</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/serviceWorkOrderList/index')"> |
|||
<image src="../static/images/icon5.svg" mode=""></image> |
|||
<view>维修工单</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/overhaulWorkOrderList/index')"> |
|||
<image src="../static/images/icon2.svg" mode=""></image> |
|||
<view>检修工单</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/maintenWorkOrderList/index')"> |
|||
<image src="../static/images/icon1.svg" mode=""></image> |
|||
<view>保养工单</view> |
|||
</view> |
|||
</u-col> |
|||
</u-row> |
|||
<view class="title">备件管理</view> |
|||
<u-row gutter="16"> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/sparePartsApplication/index')"> |
|||
<image src="../static/images/icon6.png" mode=""></image> |
|||
<view>领用申请</view> |
|||
</view> |
|||
</u-col> |
|||
<u-col span="3"> |
|||
<view class="icon-item" @click="open('/pages/sparePartsServiceWorkOrderList/index')"> |
|||
<image src="../static/images/icon5.svg" mode=""></image> |
|||
<view>维修工单</view> |
|||
</view> |
|||
</u-col> |
|||
</u-row> |
|||
</view> |
|||
|
|||
1 |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { data() { |
|||
return { |
|||
bgOpacity: 0, |
|||
|
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
open(url) { |
|||
this.$tab.navigateTo(url) |
|||
}, |
|||
|
|||
}, |
|||
onLoad: function() {}, |
|||
onPageScroll(e) { |
|||
if (e.scrollTop > 0) { |
|||
this.bgOpacity = e.scrollTop / 200; |
|||
} else { |
|||
this.bgOpacity = 0 |
|||
} |
|||
}, |
|||
|
|||
} |
|||
</script> |
|||
|
|||
<style scoped lang="scss"> |
|||
.index-content { |
|||
background-color: white; |
|||
min-height: 100vh; |
|||
} |
|||
|
|||
.bg { |
|||
width: 100%; |
|||
} |
|||
|
|||
.top { |
|||
position: relative; |
|||
|
|||
image { |
|||
height: 410rpx; |
|||
} |
|||
} |
|||
|
|||
.top-box { |
|||
position: absolute; |
|||
width: 100%; |
|||
bottom: 0px; |
|||
|
|||
.number { |
|||
padding: 30rpx 80rpx 50rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
|
|||
.number-item { |
|||
text-align: center; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
color: white; |
|||
font-size: 40rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
color: rgba(255, 255, 255, 0.7); |
|||
font-size: 28rpx; |
|||
margin-top: 10rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.status { |
|||
margin: 0px 40rpx; |
|||
padding: 40rpx 0rpx; |
|||
background: white; |
|||
border-radius: 20rpx 20rpx 0px 0px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
|
|||
.status-item { |
|||
text-align: center; |
|||
position: relative; |
|||
flex: 1; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
color: black; |
|||
font-size: 40rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
color: rgba(0, 0, 0, 0.5); |
|||
font-size: 28rpx; |
|||
margin-top: 10rpx; |
|||
} |
|||
} |
|||
|
|||
&::after { |
|||
content: ""; |
|||
border-right: 1px solid #dedede; |
|||
position: absolute; |
|||
height: 60rpx; |
|||
right: 0px; |
|||
top: 50%; |
|||
margin-top: -30rpx; |
|||
|
|||
} |
|||
|
|||
&:nth-last-child(1)::after { |
|||
border: none; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.box{ |
|||
.title{ |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
padding: 50rpx 50rpx 30rpx; |
|||
} |
|||
.icon-item{ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
flex-direction: column; |
|||
margin: 20rpx 0px; |
|||
image{ |
|||
width: 80rpx; |
|||
height: 80rpx; |
|||
} |
|||
view{ |
|||
margin-top: 20rpx; |
|||
color: #999999; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,225 +1,23 @@ |
|||
<template> |
|||
<view class="normal-login-container"> |
|||
|
|||
<view class="logo-img"> |
|||
<view class="logo-title"> |
|||
<view>智慧设备管理综合系统</view> |
|||
<view>让设备管理更智能、更高效</view> |
|||
</view> |
|||
<image src="../static/images/banner/logo-banner.png" mode="widthFix"></image> |
|||
</view> |
|||
<view class="box"> |
|||
<view class="box-shadow"> |
|||
|
|||
</view> |
|||
<view class="logo-content"> |
|||
<text class="title">您好,欢迎登录</text> |
|||
</view> |
|||
<view class="login-form-content"> |
|||
<view class="input-item-label">登录账号</view> |
|||
<view class="input-item flex align-center"> |
|||
<input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" /> |
|||
</view> |
|||
<view class="input-item-label">登录密码</view> |
|||
<view class="input-item flex align-center"> |
|||
<input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" /> |
|||
</view> |
|||
<Verify @success="pwdLogin" :mode="'pop'" :captchaType="'blockPuzzle'" |
|||
:imgSize="{ width: '330px', height: '155px' }" ref="verify"></Verify> |
|||
<view class="action-btn"> |
|||
<button @click="handleLogin" class="login-btn cu-btn block bg-blue lg ">登录</button> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="xieyi text-center"> |
|||
<text class="text-grey1">登录即代表同意</text> |
|||
<text @click="handleUserAgrement" class="text-blue">《用户协议》</text> |
|||
<text @click="handlePrivacy" class="text-blue">《隐私协议》</text> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Verify from "@/components/verifition/Verify" |
|||
|
|||
export default { |
|||
name: 'Login', |
|||
components: { |
|||
Verify |
|||
}, |
|||
data() { |
|||
return { |
|||
captchaEnabled: true, // 验证码开关 TODO 芋艿:需要抽到配置里 |
|||
globalConfig: getApp().globalData.config, |
|||
loginForm: { |
|||
username: "admin", |
|||
password: "admin123", |
|||
captchaVerification: "" |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 隐私协议 |
|||
handlePrivacy() { |
|||
let site = this.globalConfig.appInfo.agreements[0] |
|||
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`) |
|||
}, |
|||
// 用户协议 |
|||
handleUserAgrement() { |
|||
let site = this.globalConfig.appInfo.agreements[1] |
|||
this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`) |
|||
}, |
|||
// 登录方法 |
|||
async handleLogin(params) { |
|||
if (this.loginForm.username === "") { |
|||
this.$modal.msgError("请输入您的账号") |
|||
} else if (this.loginForm.password === "") { |
|||
this.$modal.msgError("请输入您的密码") |
|||
} else { |
|||
this.$tab.reLaunch('/pages/index') |
|||
// 显示验证码 |
|||
// if (this.captchaEnabled) { |
|||
// this.$refs.verify.show() |
|||
// } else { // 直接登录 |
|||
// await this.pwdLogin({}) |
|||
// } |
|||
} |
|||
}, |
|||
// 密码登录 |
|||
async pwdLogin(captchaParams) { |
|||
this.$modal.loading("登录中,请耐心等待...") |
|||
// 执行登录 |
|||
this.loginForm.captchaVerification = captchaParams.captchaVerification |
|||
this.$store.dispatch('Login', this.loginForm).then(() => { |
|||
this.$modal.closeLoading() |
|||
this.loginSuccess() |
|||
}) |
|||
}, |
|||
// 登录成功后,处理函数 |
|||
loginSuccess(result) { |
|||
// 设置用户信息 |
|||
this.$store.dispatch('GetInfo').then(res => { |
|||
this.$tab.reLaunch('/pages/index') |
|||
}) |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
page { |
|||
background-color: #ffffff; |
|||
} |
|||
|
|||
.normal-login-container { |
|||
width: 100%; |
|||
|
|||
.logo-content { |
|||
width: 100%; |
|||
font-size: 40rpx; |
|||
padding: 50rpx 80rpx 0rpx; |
|||
|
|||
.title { |
|||
font-weight: bold; |
|||
color: #000000; |
|||
|
|||
} |
|||
} |
|||
.box{ |
|||
position: relative; |
|||
} |
|||
.box-shadow{ |
|||
box-shadow: 0px -10rpx 16rpx rgba(64, 158, 254, 0.5); |
|||
width: 100%; |
|||
position: absolute; |
|||
height: 30rpx; |
|||
border-radius: 30rpx 30rpx 0px 0px ; |
|||
} |
|||
|
|||
.logo-img { |
|||
background-color: #fafcff; |
|||
height: 400rpx; |
|||
position: relative; |
|||
.logo-title{ |
|||
position: absolute; |
|||
left: 50rpx; |
|||
top: 50rpx; |
|||
z-index: 11; |
|||
view{ |
|||
&:nth-child(1){ |
|||
color: #409eff; |
|||
font-weight: bold; |
|||
font-size: 36rpx; |
|||
} |
|||
&:nth-child(2){ |
|||
color: #999999; |
|||
font-size: 24rpx; |
|||
} |
|||
} |
|||
} |
|||
image { |
|||
width: 75%; |
|||
display: block; |
|||
position: absolute; |
|||
bottom: 0px; |
|||
right: 0px; |
|||
} |
|||
} |
|||
|
|||
.login-form-content { |
|||
margin: 40rpx auto; |
|||
width: 80%; |
|||
|
|||
.input-item-label { |
|||
font-size: 30rpx; |
|||
// font-weight: bold; |
|||
color: #888888; |
|||
} |
|||
|
|||
.input-item { |
|||
margin: 20rpx auto 40rpx; |
|||
border: 1px solid #E4E4E4; |
|||
padding: 0px 20rpx; |
|||
height: 90rpx; |
|||
|
|||
.icon { |
|||
font-size: 38rpx; |
|||
margin-left: 20rpx; |
|||
color: #999; |
|||
} |
|||
|
|||
.input { |
|||
width: 100%; |
|||
font-size: 28rpx; |
|||
line-height: 40rpx; |
|||
text-align: left; |
|||
} |
|||
|
|||
} |
|||
|
|||
.login-btn { |
|||
margin-top: 80rpx; |
|||
height: 80rpx; |
|||
background: #409eff; |
|||
color: white; |
|||
} |
|||
|
|||
} |
|||
|
|||
.xieyi { |
|||
color: #333; |
|||
margin-top: 40rpx; |
|||
font-size: 24rpx; |
|||
} |
|||
|
|||
.easyinput { |
|||
width: 100%; |
|||
} |
|||
} |
|||
|
|||
.login-code-img { |
|||
height: 90rpx; |
|||
} |
|||
</style> |
@ -1,53 +0,0 @@ |
|||
<template> |
|||
<view class=""> |
|||
<view class="u-padding-20"> |
|||
<view class="box"> |
|||
<u-parse :html="content"></u-parse> |
|||
</view> |
|||
|
|||
</view> |
|||
<!-- <view class="u-padding-top-30 u-padding-bottom-30 u-padding-left-10 u-padding-right-10"> |
|||
<image src="../../static/image/kefu.png" class="kefu" mode="" @click="$call(phone)"></image> |
|||
</view> --> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
data:"", |
|||
content:"11111111111", |
|||
} |
|||
}, |
|||
onShow() { |
|||
}, |
|||
methods: { |
|||
}, |
|||
onReachBottom() { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page { |
|||
background: #f8f9fb; |
|||
} |
|||
|
|||
.box { |
|||
border-radius: 20rpx; |
|||
background: white; |
|||
padding: 40rpx 30rpx; |
|||
box-shadow: 0px 0px 20rpx rgba(145, 165, 205, 0.5); |
|||
} |
|||
|
|||
.kefu { |
|||
width: 100%; |
|||
height: 114rpx; |
|||
} |
|||
/deep/._img{ |
|||
display: block!important; |
|||
} |
|||
</style> |
@ -1,149 +0,0 @@ |
|||
<template> |
|||
<view> |
|||
<view class="box"> |
|||
<view class="item"> |
|||
<!-- <image src="../../static/icon/user_password_icon_blue.png"></image> --> |
|||
<view class="item2 padd35"> |
|||
<input type="text" v-model="old_password" placeholder="请输入原密码" /> |
|||
</view> |
|||
</view> |
|||
<view class="item"> |
|||
<!-- <image src="../../static/icon/user_password_icon_red.png"></image> --> |
|||
<view class="item2 padd35"> |
|||
<input type="text" v-model="newpassword" placeholder="请输入新密码" /> |
|||
</view> |
|||
</view> |
|||
<view class="item"> |
|||
<!-- <image src="../../static/icon/user_password_icon.png"></image> --> |
|||
<view class="item2 padd35"> |
|||
<input type="text" v-model="confirmpassword" placeholder="请确认新密码" /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="btn" @click="submit">确认</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
newpassword: "", |
|||
old_password: "", |
|||
confirmpassword: "", |
|||
} |
|||
}, |
|||
|
|||
onLoad() { |
|||
|
|||
}, |
|||
onShow() { |
|||
|
|||
}, |
|||
methods: { |
|||
submit() { |
|||
if(!this.old_password){ |
|||
this.$toast('请输入原密码'); |
|||
return; |
|||
} |
|||
if(!this.newpassword){ |
|||
this.$toast('请输入新密码'); |
|||
return; |
|||
} |
|||
if(!this.confirmpassword){ |
|||
this.$toast('请确认新密码'); |
|||
return; |
|||
} |
|||
if(this.confirmpassword != this.newpassword){ |
|||
this.$toast('两次输入的密码不一致,请重新输入'); |
|||
return; |
|||
} |
|||
this.$ajax('editpassword', { |
|||
userToken: this.$getSync('userToken'), |
|||
newpassword:this.newpassword, |
|||
old_password:this.old_password, |
|||
confirmpassword:this.confirmpassword, |
|||
}).then(ret => { |
|||
this.$closeLoading() |
|||
if (ret.status == 0) { |
|||
this.$alert('修改成功',()=>{ |
|||
this.$backT() |
|||
}) |
|||
} else { |
|||
this.$toast(ret.message); |
|||
} |
|||
}); |
|||
}, |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page { |
|||
background-color: #f8f9fb; |
|||
} |
|||
|
|||
.box { |
|||
width: 94vw; |
|||
margin: 20rpx auto; |
|||
border-radius: 20rpx; |
|||
overflow: hidden; |
|||
} |
|||
|
|||
.item { |
|||
background-color: #FFFFFF; |
|||
padding: 0rpx 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 44rpx; |
|||
height: 44rpx; |
|||
margin-right: 30rpx; |
|||
} |
|||
|
|||
.item2 { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
flex: 1; |
|||
border-bottom: 1rpx solid #efefef; |
|||
padding: 25rpx 0rpx; |
|||
|
|||
input { |
|||
font-size: 28rpx; |
|||
} |
|||
|
|||
view { |
|||
color: #1a4f9f; |
|||
border: 1rpx solid #1a4f9f; |
|||
font-size: 30rpx; |
|||
border-radius: 50rpx; |
|||
padding: 10rpx 18rpx; |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
.btn { |
|||
width: calc(100vw - 80rpx); |
|||
position: fixed; |
|||
bottom: 200rpx; |
|||
left: 40rpx; |
|||
background-color: rgb(64, 158, 255); |
|||
color: #FFFFFF; |
|||
height: 90rpx; |
|||
line-height: 90rpx; |
|||
text-align: center; |
|||
border-radius: 50rpx; |
|||
font-size: 32rpx; |
|||
} |
|||
|
|||
.noborder { |
|||
border-bottom: none !important; |
|||
} |
|||
|
|||
.padd35 { |
|||
padding: 35rpx 0 !important; |
|||
} |
|||
</style> |
@ -1,200 +0,0 @@ |
|||
<template> |
|||
<view class="mine-container" :style="{height: `${windowHeight}px`}"> |
|||
<!--顶部个人信息栏--> |
|||
<view class="header-section"> |
|||
<view class="flex padding justify-between"> |
|||
<view class="flex align-center"> |
|||
<view v-if="!avatar" class="cu-avatar xl round bg-white"> |
|||
<view class="iconfont icon-people text-gray icon"></view> |
|||
</view> |
|||
<image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"> |
|||
</image> |
|||
<!-- <view v-if="!name" @click="handleToLogin" class="login-tip"> |
|||
点击登录 |
|||
</view> --> |
|||
<view @click="handleToInfo" class="user-info"> |
|||
<view class="u_title"> |
|||
<span>用户名:找刚子</span> 部门主任 |
|||
</view> |
|||
<view class="u_dept"> |
|||
生产部门 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- <view @click="handleToInfo" class="flex align-center"> |
|||
<text>个人信息</text> |
|||
<view class="iconfont icon-right"></view> |
|||
</view> --> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="content-section"> |
|||
<view class="mine-actions grid col-4 text-center"> |
|||
<view class="action-item" @click="handleJiaoLiuQun"> |
|||
<image src="../../static/images/banner/icon1.png" mode="widthFix"></image> |
|||
<text class="text">我的报修</text> |
|||
</view> |
|||
<view class="action-item" @click="handleBuilding"> |
|||
<image src="../../static/images/banner/icon2.png" mode="widthFix"></image> |
|||
<text class="text">我的维修</text> |
|||
</view> |
|||
<view class="action-item" @click="handleBuilding"> |
|||
<image src="../../static/images/banner/icon3.png" mode="widthFix"></image> |
|||
<text class="text">我的保养</text> |
|||
</view> |
|||
<view class="action-item" @click="handleBuilding"> |
|||
<image src="../../static/images/banner/icon4.png" mode="widthFix"></image> |
|||
<text class="text">巡检点检</text> |
|||
</view> |
|||
</view> |
|||
|
|||
<view class="menu-list"> |
|||
<view class="list-cell list-cell-arrow" @click="handleToEditInfo"> |
|||
<view class="menu-item-box"> |
|||
<u-icon name="lock" color="#2979ff" size="32"></u-icon> |
|||
<view style="margin-left: 10rpx;">修改密码</view> |
|||
</view> |
|||
</view> |
|||
<view class="list-cell list-cell-arrow" @click="handleHelp"> |
|||
<view class="menu-item-box"> |
|||
<!-- <view class="iconfont icon-help menu-icon"></view> --> |
|||
<u-icon name="info-circle" color="#2979ff" size="32"></u-icon> |
|||
<view style="margin-left: 10rpx;">版本更新</view> |
|||
</view> |
|||
</view> |
|||
<view class="list-cell list-cell-arrow" @click="handleAbout"> |
|||
<view class="menu-item-box"> |
|||
<u-icon name="heart" color="#2979ff" size="32"></u-icon> |
|||
<view style="margin-left: 10rpx;">关于我们</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import storage from '@/utils/storage' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
name: this.$store.state.user.name, |
|||
version: getApp().globalData.config.appInfo.version |
|||
} |
|||
}, |
|||
computed: { |
|||
avatar() { |
|||
return this.$store.state.user.avatar |
|||
}, |
|||
windowHeight() { |
|||
return uni.getSystemInfoSync().windowHeight - 50 |
|||
} |
|||
}, |
|||
methods: { |
|||
handleToInfo() { |
|||
this.$tab.navigateTo('/pages/mine/info/index') |
|||
}, |
|||
handleToEditInfo() { |
|||
this.$tab.navigateTo('/pages/mine/changePassword') |
|||
}, |
|||
handleToSetting() { |
|||
this.$tab.navigateTo('/pages/mine/setting/index') |
|||
}, |
|||
handleToLogin() { |
|||
this.$tab.reLaunch('/pages/login') |
|||
}, |
|||
handleToAvatar() { |
|||
this.$tab.navigateTo('/pages/mine/avatar/index') |
|||
}, |
|||
handleLogout() { |
|||
this.$modal.confirm('确定注销并退出系统吗?').then(() => { |
|||
this.$store.dispatch('LogOut').then(() => { |
|||
this.$tab.reLaunch('/pages/index') |
|||
}) |
|||
}) |
|||
}, |
|||
handleHelp() { |
|||
this.$tab.navigateTo('/pages/mine/help/index') |
|||
}, |
|||
handleAbout() { |
|||
this.$tab.navigateTo('/pages/mine/aboutUs') |
|||
}, |
|||
handleJiaoLiuQun() { |
|||
this.$modal.showToast('微信搜索 naidaguo 后,添加好友后拉你进技术交流群') |
|||
}, |
|||
handleBuilding() { |
|||
this.$modal.showToast('模块建设中~') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
page { |
|||
background-color: #f5f6f7; |
|||
} |
|||
|
|||
.mine-container { |
|||
width: 100%; |
|||
height: 100%; |
|||
|
|||
|
|||
.header-section { |
|||
padding: 30rpx 30rpx 90rpx 30rpx; |
|||
background-color: #409eff; |
|||
color: white; |
|||
|
|||
.login-tip { |
|||
font-size: 36rpx; |
|||
margin-left: 20rpx; |
|||
} |
|||
|
|||
.cu-avatar { |
|||
border: 4rpx solid #eaeaea; |
|||
|
|||
.icon { |
|||
font-size: 80rpx; |
|||
} |
|||
} |
|||
|
|||
.user-info { |
|||
margin-left: 30rpx; |
|||
|
|||
.u_title { |
|||
line-height: 60rpx; |
|||
span{ |
|||
font-size: 36rpx; |
|||
line-height: 60rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
.content-section { |
|||
position: relative; |
|||
top: -100rpx; |
|||
|
|||
.mine-actions { |
|||
margin: 30rpx 30rpx; |
|||
padding: 40rpx 0px; |
|||
border-radius: 16rpx; |
|||
background-color: white; |
|||
|
|||
.action-item { |
|||
image { |
|||
width: 60rpx; |
|||
} |
|||
|
|||
.text { |
|||
display: block; |
|||
font-size: 26rpx; |
|||
margin: 16rpx 0px; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,22 +0,0 @@ |
|||
<template> |
|||
<view class="work-container"> |
|||
1 |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
|
|||
</style> |
@ -1,139 +0,0 @@ |
|||
<template> |
|||
<view class="notaic"> |
|||
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' |
|||
title="系统消息"> |
|||
<template v-slot:right> |
|||
<view class="clear">清除未读</view> |
|||
</template> |
|||
</u-navbar> |
|||
<view class="tab"> |
|||
<view class="tab-box"> |
|||
<view class="tab-item" :class="tabIndex == 0 ? 'active' : ''" @click="tab(0)"> |
|||
全部 |
|||
</view> |
|||
<view class="tab-item" :class="tabIndex == 1 ? 'active' : ''" @click="tab(1)"> |
|||
已读 |
|||
</view> |
|||
<view class="tab-item" :class="tabIndex == 2 ? 'active' : ''" @click="tab(2)"> |
|||
未读 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="list"> |
|||
<view class="item"> |
|||
<view class="time"> |
|||
<view class="red"></view> |
|||
<view class="text">2024-12-12 08:00:00</view> |
|||
<u-icon name="arrow-right" color="#c1c1c1" size="28"></u-icon> |
|||
</view> |
|||
<view class="dec"> |
|||
您有一个保养任务,请及时处理。 |
|||
</view> |
|||
<view class="type"> |
|||
消息类型 <span>保养任务</span> |
|||
</view> |
|||
<view class="type"> |
|||
任务时间 <span>2023-06-02 09:00~2023-06-02 09:00</span> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import storage from '@/utils/storage' |
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
tabIndex: 0 |
|||
} |
|||
}, |
|||
|
|||
methods: { |
|||
tab(index) { |
|||
this.tabIndex = index |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.clear { |
|||
color: white; |
|||
padding-right: 20rpx |
|||
} |
|||
|
|||
.tab { |
|||
position: fixed; |
|||
width: 100%; |
|||
background: white; |
|||
padding: 20rpx 30rpx; |
|||
} |
|||
|
|||
.tab-box { |
|||
border-radius: 16rpx; |
|||
border: 1px solid #409eff; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
overflow: hidden; |
|||
|
|||
.tab-item { |
|||
flex: 1; |
|||
border-right: 1px solid #409eff; |
|||
color: #409eff; |
|||
height: 70rpx; |
|||
line-height: 70rpx; |
|||
text-align: center; |
|||
|
|||
&:nth-last-child(1) { |
|||
border: none; |
|||
} |
|||
} |
|||
|
|||
.active { |
|||
background: #409eff; |
|||
color: white; |
|||
} |
|||
} |
|||
.list{ |
|||
padding: 140rpx 30rpx 20rpx ; |
|||
.item{ |
|||
background: white; |
|||
border-radius: 16rpx; |
|||
.time{ |
|||
display: flex; |
|||
padding: 20rpx 30rpx; |
|||
border-bottom: 1px solid #e4e4e4; |
|||
position: relative; |
|||
.red{ |
|||
position: absolute; |
|||
left: 16rpx; |
|||
top: 50%; |
|||
width: 6rpx; |
|||
height: 6rpx; |
|||
background: red; |
|||
border-radius: 50%; |
|||
margin-top: -3rpx; |
|||
} |
|||
.text{ |
|||
color: #717171; |
|||
width: 0px; |
|||
flex: 1; |
|||
} |
|||
} |
|||
.dec{ |
|||
padding: 30rpx; |
|||
} |
|||
.type{ |
|||
padding:0px 30rpx 20rpx; |
|||
color: #888888; |
|||
span{ |
|||
color: #000; |
|||
margin-left: 20rpx; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,94 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="work-container"> |
|||
<Search @search='search' @screen='screen'/> |
|||
<view class="list"> |
|||
<view class="item" v-for="index in 6" :key='index'> |
|||
<u-image src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/unicloudlogo.png" width='160' height="160"> |
|||
<template v-slot:error> |
|||
<view class="image-error"> |
|||
<u-icon name="photo" color="#c7c7c7" size="38"></u-icon> |
|||
<view style="font-size: 24rpx;">暂无图片</view> |
|||
</view> |
|||
</template> |
|||
</u-image> |
|||
<view class="text"> |
|||
<view class="title"> |
|||
备件025 |
|||
</view> |
|||
<view class="dec1"> |
|||
备件编码:SB52225456 |
|||
</view> |
|||
<view class="dec2"> |
|||
规格型号:SB52225456 |
|||
</view> |
|||
<view class="dec2"> |
|||
总库存:25 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Search from '../../components/search/index.vue' |
|||
export default { |
|||
components: { |
|||
Search |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
// 搜索 |
|||
search(keyWord) { |
|||
console.log(keyWord) |
|||
}, |
|||
// 筛选 |
|||
screen() { |
|||
console.log(222) |
|||
this.$tab.navigateTo(`/pages/spareParts/screen`) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
.text{ |
|||
margin-left: 20rpx; |
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.image-error{ |
|||
text-align: center; |
|||
} |
|||
</style> |
@ -1,149 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data'></Form> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '备件编号', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'text', |
|||
field: 'name', |
|||
label: '备件名称', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '设备类型', |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'dept', |
|||
label: '设备单位', |
|||
list: [{ |
|||
label: '部门1', |
|||
value: 1 |
|||
}, { |
|||
label: '部门2', |
|||
value: 2 |
|||
}, { |
|||
label: '部门3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'range', |
|||
field: 'min', |
|||
label: '当前库存', |
|||
placeholder:'请输入' |
|||
}, { |
|||
type: 'range', |
|||
field: 'min', |
|||
label: '当前库存', |
|||
placeholder:'请输入' |
|||
}], |
|||
rules: { |
|||
// 对name字段进行必填验证 |
|||
name: [ |
|||
{ |
|||
min: 5, |
|||
message: '简介不能少于5个字', |
|||
trigger: 'change' |
|||
}, |
|||
// 对name字段进行必填验证 |
|||
{ |
|||
required: true, |
|||
message: '请填写姓名', |
|||
trigger: ['change', 'blur'] |
|||
}, |
|||
] |
|||
} |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,283 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<SparePartsCard :subForm='subForm' :data='data' @addSubForm='addSubForm' @delSubFormItem='delSubFormItem'> |
|||
</SparePartsCard> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="sure" @click="submit">提交</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
<u-popup v-model="isPopupShow" mode="center" border-radius="14"> |
|||
<view class="popup-title">添加备件</view> |
|||
<view class="popup"> |
|||
<Form :form='subForm' :data='data' ref="form2"></Form> |
|||
</view> |
|||
<view class="popup-footer"> |
|||
<view @click="cancle">取消</view> |
|||
<view class="sure" @click="addSpare">确认</view> |
|||
</view> |
|||
</u-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
import SparePartsCard from '@/components/sparePartsCard/index.vue' |
|||
export default { |
|||
components: { |
|||
Form, |
|||
SparePartsCard |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '申请主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '申请类型', |
|||
disabled: false, |
|||
required: true, |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}], |
|||
}, |
|||
data: { |
|||
name: '', |
|||
subList: [{ |
|||
name: '备件111111', |
|||
stork: '1', |
|||
number: '30', |
|||
}, { |
|||
name: '备件111111', |
|||
stork: '1', |
|||
number: '30', |
|||
}] |
|||
}, |
|||
subForm: { |
|||
formLabel: '申请备件', |
|||
formField: 'subList', |
|||
required: true, |
|||
isShowButton: true, |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'singleColumn', |
|||
field: 'name', |
|||
label: '备件名称', |
|||
disabled: false, |
|||
required: true, |
|||
span: 12, |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'text', |
|||
field: 'stork', |
|||
label: '库存', |
|||
disabled: false, |
|||
required: true, |
|||
isList: true, |
|||
span: 6 |
|||
}, { |
|||
type: 'text', |
|||
field: 'number', |
|||
label: '数量', |
|||
disabled: false, |
|||
required: true, |
|||
isList: true, |
|||
span: 6 |
|||
}], |
|||
}, |
|||
isPopupShow: false, |
|||
|
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.$refs.form1.$refs.form.validate().then(res => { |
|||
console.log('表单数据信息:', res); |
|||
}).catch(err => { |
|||
console.log('表单错误信息:', err); |
|||
}) |
|||
console.log(this.data.subList) |
|||
let isTrue = this.data.subList.some(item => { |
|||
return !item.name || item.number === '' |
|||
}) |
|||
if (isTrue) { |
|||
this.$modal.showToast('申请备件信息请填写完全') |
|||
return; |
|||
} |
|||
|
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data = {} |
|||
}, |
|||
// 添加表格表单 |
|||
addSubForm() { |
|||
console.log(5) |
|||
this.isPopupShow = true |
|||
// this.data.subList.push({ |
|||
// name:1, |
|||
// stork:2, |
|||
// number:'300' |
|||
// }) |
|||
}, |
|||
// 添加备件 |
|||
addSpare(){ |
|||
// this.data.subList |
|||
this.$refs.form2.$refs.form.validate().then(res => { |
|||
console.log('表单数据信息:', res); |
|||
}).catch(err => { |
|||
console.log('表单错误信息:', err); |
|||
}) |
|||
}, |
|||
// 取消添加备件 |
|||
cancle(){ |
|||
this.isPopupShow = false |
|||
}, |
|||
delTableFormItem(index) { |
|||
this.data.subList.splice(index, 1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
|
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
background: white; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
padding: 20rpx; |
|||
box-shadow: 0px -2rpx 20rpx rgba(0, 0, 0, 0.1); |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 8rpx; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.popup-title { |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
color: #409eff; |
|||
padding: 30rpx |
|||
} |
|||
|
|||
.popup { |
|||
width: 600rpx; |
|||
padding: 0rpx 60rpx 0rpx; |
|||
|
|||
} |
|||
.popup-footer{ |
|||
display: flex; |
|||
border-top: 1px solid #e4e4e4; |
|||
view{ |
|||
line-height: 100rpx; |
|||
flex: 1; |
|||
text-align: center; |
|||
&.sure{ |
|||
color: #409eff; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,149 +0,0 @@ |
|||
<template> |
|||
<!-- 备件领用申请 --> |
|||
<view class="container"> |
|||
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' |
|||
title="备件领用申请"> |
|||
<template v-slot:right> |
|||
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm"></u-icon> |
|||
</template> |
|||
</u-navbar> |
|||
<Search @search='search' @screen='screen' /> |
|||
<view class="list"> |
|||
<view class="item" v-for="(item,index) in data.list" :key="index"> |
|||
<view class="title"> |
|||
<view class="title-txt"> |
|||
{{item.title}} |
|||
</view> |
|||
<view class="time" v-if="data.isShowTime"> |
|||
2023-12-12 08:00:00 |
|||
</view> |
|||
</view> |
|||
<view class="dec" v-for="(cur,key) in labelList" :key="key"> |
|||
{{cur.label}}:<span>{{item[cur.field]}}</span> |
|||
</view> |
|||
<view class="bottom" v-if="data.isShowStatus"> |
|||
<view class="status"> |
|||
<u-tag text="待领取" v-if="item.status==1" bg-color='rgba(255,255,255,0)' color='#fe8463' border-color='#fe8463' type="primary" shape='circle'/> |
|||
<u-tag text="撤单" v-else-if="item.status==2" bg-color='rgba(255,255,255,0)' color='#d7d7d7' border-color='#d7d7d7 ' type="warning" shape='circle'/> |
|||
<u-tag text="待执行" v-else-if="item.status==3" bg-color='rgba(255,255,255,0)' color='#e01f54' border-color='#e01f54' type="success" shape='circle'/> |
|||
<u-tag text="维修中" v-else-if="item.status==4" bg-color='rgba(255,255,255,0)' color='#005eaa' border-color='#005eaa ' type="error" shape='circle'/> |
|||
<u-tag text="待验证" v-else-if="item.status==5" bg-color='rgba(255,255,255,0)' color='#2EC7C9' border-color='#2EC7C9' type="info" shape='circle'/> |
|||
<u-tag text="已完成" v-else-if="item.status==6" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471' type="info" shape='circle'/> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
labelList: [{ |
|||
label: '申请单号', |
|||
field: 'dec1', |
|||
}, { |
|||
label: '申请类型', |
|||
field: 'dec2', |
|||
}, { |
|||
label: ' 申 请 人', |
|||
field: 'dec3', |
|||
}], |
|||
data: { |
|||
isShowTime: true, |
|||
isShowStatus: true, |
|||
list: [{ |
|||
title: '备件002领用', |
|||
dec1: '维修领用', |
|||
dec2: '刘冰雨', |
|||
status: 6 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 2 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 3 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 4 |
|||
}] |
|||
} |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
// 筛选 |
|||
screen() { |
|||
this.$tab.navigateTo(`/pages/sparePartsApplication/screen`) |
|||
}, |
|||
addForm() { |
|||
this.$tab.navigateTo(`/pages/sparePartsApplication/addForm`) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
.list{ |
|||
background: #f5f5f5; |
|||
margin-top: 20rpx; |
|||
.item{ |
|||
padding: 30rpx 30rpx 0px 30rpx; |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
position: relative; |
|||
.title{ |
|||
display: flex; |
|||
align-items: center; |
|||
padding-bottom: 20rpx; |
|||
.title-txt{ |
|||
color: #409eff; |
|||
font-weight: bold; |
|||
font-size: 36rpx; |
|||
width: 0px; |
|||
flex: 1; |
|||
} |
|||
.time{ |
|||
color: #919191; |
|||
|
|||
} |
|||
} |
|||
.dec{ |
|||
padding-bottom: 20rpx; |
|||
span{ |
|||
color: #999999; |
|||
} |
|||
} |
|||
.last{ |
|||
padding-bottom: 30rpx; |
|||
} |
|||
.bottom{ |
|||
position: absolute; |
|||
right: 30rpx; |
|||
bottom:40rpx; |
|||
|
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,188 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '申请主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '申请类型', |
|||
disabled: false, |
|||
required: true, |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type1', |
|||
label: '备件类型', |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'datetime', |
|||
field: 'datetime', |
|||
label: '申请时间', |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '申请人', |
|||
disabled: false, |
|||
required: true, |
|||
list: [{ |
|||
label: '申请人1', |
|||
value: 1 |
|||
}, { |
|||
label: '申请人2', |
|||
value: 2 |
|||
}, { |
|||
label: '申请人3', |
|||
value: 3 |
|||
}] |
|||
}], |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data={} |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,261 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="work-container"> |
|||
<Form :form='form' :data='data' ref="form1" @tableFormSingleColumn='tableFormSingleColumn' |
|||
@addTableFormItem='addTableFormItem' @delTableFormItem='delTableFormItem'></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '申请主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '申请类型', |
|||
disabled: false, |
|||
required: true, |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'tableForm', |
|||
field: 'subList', |
|||
labelPosition: 'top', |
|||
label: '申请备件', |
|||
disabled: false, |
|||
required: true, |
|||
tableThlist: [{ |
|||
label: '备用名称', |
|||
field: 'name', |
|||
type: 'singleColumn', |
|||
disabled: false, |
|||
required: true, |
|||
list: 'list' |
|||
}, { |
|||
label: '库存', |
|||
field: 'stork', |
|||
type: 'singleColumn', |
|||
disabled: false, |
|||
required: true, |
|||
list: 'list1' |
|||
}, { |
|||
label: '申请数量', |
|||
field: 'number', |
|||
type: 'number', |
|||
disabled: false, |
|||
required: true, |
|||
}] |
|||
}], |
|||
rules: { |
|||
// 对name字段进行必填验证 |
|||
name: [{ |
|||
min: 5, |
|||
message: '简介不能少于5个字', |
|||
trigger: 'change' |
|||
}, |
|||
// 对name字段进行必填验证 |
|||
{ |
|||
required: true, |
|||
message: '请填写姓名', |
|||
trigger: ['change', 'blur'] |
|||
}, |
|||
] |
|||
} |
|||
}, |
|||
data: { |
|||
name: '', |
|||
subList: [{ |
|||
name: 1, |
|||
stork: '1', |
|||
number: '', |
|||
inputType: 'singleColumn', |
|||
list: [{ |
|||
value: 1, |
|||
label: '哈哈' |
|||
}, { |
|||
value: 2, |
|||
label: '呵呵' |
|||
}], |
|||
list1: [{ |
|||
value: 1, |
|||
label: '哈哈1111' |
|||
}, { |
|||
value: 2, |
|||
label: '呵呵111' |
|||
}], |
|||
}] |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.$refs.form1.$refs.form.validate().then(res => { |
|||
console.log('表单数据信息:', res); |
|||
}).catch(err => { |
|||
console.log('表单错误信息:', err); |
|||
}) |
|||
console.log(this.data.subList) |
|||
let isTrue = this.data.subList.some(item => { |
|||
return !item.name || item.number === '' |
|||
}) |
|||
if (isTrue) { |
|||
this.$modal.showToast('申请备件信息请填写完全') |
|||
return; |
|||
} |
|||
|
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data = {} |
|||
}, |
|||
// 表格表单组件方法 |
|||
tableFormSingleColumn(field, tableFormField, tableFormVal) { |
|||
console.log(field) |
|||
console.log(tableFormField) |
|||
console.log(tableFormVal) |
|||
}, |
|||
// 添加表格表单 |
|||
addTableFormItem() { |
|||
this.data.subList.push({ |
|||
name: 1, |
|||
stork: 2, |
|||
number: '300', |
|||
inputType: 'singleColumn', |
|||
list: [{ |
|||
value: 1, |
|||
label: '哈哈额' |
|||
}, { |
|||
value: 2, |
|||
label: '呵呵额' |
|||
}], |
|||
list1: [{ |
|||
value: 1, |
|||
label: '哈哈222' |
|||
}, { |
|||
value: 2, |
|||
label: '呵呵333' |
|||
}], |
|||
}) |
|||
}, |
|||
delTableFormItem(index) { |
|||
this.data.subList.splice(index, 1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
|
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,88 +0,0 @@ |
|||
<template> |
|||
<!-- 备件维修工单 --> |
|||
<view class="container"> |
|||
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' |
|||
title="备件维修工单"> |
|||
<template v-slot:right> |
|||
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm"></u-icon> |
|||
</template> |
|||
</u-navbar> |
|||
<Search @search='search' @screen='screen' /> |
|||
<sparePartsApplicationList :data="data" :labelList='labelList'></sparePartsApplicationList> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import sparePartsApplicationList from '@/components/sparePartsApplicationList/index.vue' |
|||
export default { |
|||
components: { |
|||
sparePartsApplicationList |
|||
}, |
|||
data() { |
|||
return { |
|||
labelList: [{ |
|||
label: '申请单号', |
|||
field: 'dec1', |
|||
}, { |
|||
label: '申请类型', |
|||
field: 'dec2', |
|||
}, { |
|||
label: ' 申 请 人', |
|||
field: 'dec3', |
|||
}], |
|||
data: { |
|||
isShowTime: true, |
|||
isShowStatus: true, |
|||
list: [{ |
|||
title: '备件002领用', |
|||
dec1: '维修领用', |
|||
dec2: '刘冰雨', |
|||
status: 6 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 2 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 3 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 4 |
|||
}] |
|||
} |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
// 筛选 |
|||
screen() { |
|||
this.$tab.navigateTo(`/pages/sparePartsApplication/screen`) |
|||
}, |
|||
addForm() { |
|||
this.$tab.navigateTo(`/pages/sparePartsApplication/addForm`) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
</style> |
@ -1,211 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '申请主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '申请类型', |
|||
disabled: false, |
|||
required: true, |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type1', |
|||
label: '备件类型', |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'datetime', |
|||
field: 'datetime', |
|||
label: '申请时间', |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '申请人', |
|||
disabled: false, |
|||
required: true, |
|||
list: [{ |
|||
label: '申请人1', |
|||
value: 1 |
|||
}, { |
|||
label: '申请人2', |
|||
value: 2 |
|||
}, { |
|||
label: '申请人3', |
|||
value: 3 |
|||
}] |
|||
}], |
|||
rules: { |
|||
// 对name字段进行必填验证 |
|||
name: [ |
|||
{ |
|||
min: 5, |
|||
message: '简介不能少于5个字', |
|||
trigger: 'change' |
|||
}, |
|||
// 对name字段进行必填验证 |
|||
{ |
|||
required: true, |
|||
message: '请填写姓名', |
|||
trigger: ['change', 'blur'] |
|||
}, |
|||
] |
|||
} |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.$refs.form1.$refs.form.validate().then(res => { |
|||
console.log('表单数据信息:', res); |
|||
}).catch(err => { |
|||
console.log('表单错误信息:', err); |
|||
}) |
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data={} |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
|
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,211 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '报修主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'text', |
|||
field: 'name', |
|||
label: '设备名称', |
|||
disabled: false, |
|||
required: true, |
|||
value: '', |
|||
isRightButton: '扫描' |
|||
}, { |
|||
type: 'text', |
|||
field: 'location', |
|||
label: '存放位置', |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '紧急程度', |
|||
required: true, |
|||
list: [{ |
|||
label: '程度1', |
|||
value: 1 |
|||
}, { |
|||
label: '程度2', |
|||
value: 2 |
|||
}, { |
|||
label: '程度3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'text', |
|||
field: 'location', |
|||
label: '故障描述', |
|||
}], |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
// 校验 |
|||
for (let i = 0; i < this.form.formData.length; i++) { |
|||
if (this.form.formData[i].required === true) { |
|||
if (!this.data[this.form.formData[i].field]) { |
|||
let placeholder = '请输入' |
|||
if (this.form.formData[i].type == 'text' || this.form.formData[i].type == 'textarea') { |
|||
placeholder = '请输入' |
|||
} else { |
|||
placeholder = '请选择' |
|||
} |
|||
this.$modal.showToast(placeholder + this.form.formData[i].label) |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
console.log('表单数据信息1:', this.data); |
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data = {} |
|||
}, |
|||
|
|||
}, |
|||
onLoad(option) { |
|||
this.type = option.type |
|||
if(option.type == 1){ |
|||
uni.setNavigationBarTitle({ |
|||
title:'添加报修' |
|||
}) |
|||
}else if(option.type == 2){ |
|||
uni.setNavigationBarTitle({ |
|||
title:'添加维修工单' |
|||
}) |
|||
}else if(option.type == 3){ |
|||
uni.setNavigationBarTitle({ |
|||
title:'添加检修工单' |
|||
}) |
|||
}else if(option.type == 4){ |
|||
uni.setNavigationBarTitle({ |
|||
title:'添加点检工单' |
|||
}) |
|||
}else if(option.type == 5){ |
|||
uni.setNavigationBarTitle({ |
|||
title:'添加保养工单' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
|
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,349 +0,0 @@ |
|||
<template> |
|||
<!-- 详情 --> |
|||
<view class="detail-container"> |
|||
<view class="info"> |
|||
<view class="title"> |
|||
<view>维修工单</view> |
|||
<view>转班</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view class="dec-item"> |
|||
<view>工单单号</view> |
|||
<view>WXDH2051351</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工单主题</view> |
|||
<view>设备一维修2554</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工单类型</view> |
|||
<view>报修工单</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>维修班组</view> |
|||
<view>维修班组一</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>工程师</view> |
|||
<view>橙子</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>维修工</view> |
|||
<view>香蕉</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="info" style="padding-bottom: 130rpx;"> |
|||
<view class="tab"> |
|||
<u-tabs :list="list" :is-scroll="false" bar-height="2" bar-width="250" v-model="current" |
|||
@change="change"></u-tabs> |
|||
</view> |
|||
|
|||
<view> |
|||
<view class="title"> |
|||
<view>{{changeItem.name}}</view> |
|||
</view> |
|||
<view class="dec" v-if="current == 0"> |
|||
<view class="dec-item"> |
|||
<view>设备编号</view> |
|||
<view>WXDH2051351</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>设备名称</view> |
|||
<view>设备一维修2554</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>规格型号</view> |
|||
<view>报修工单</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>设备类型</view> |
|||
<view>维修班组一</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>存放位置</view> |
|||
<view>橙子</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>使用部门</view> |
|||
<view>香蕉</view> |
|||
</view> |
|||
</view> |
|||
<view class="dec" v-if="current == 1"> |
|||
<view class="dec-item"> |
|||
<view>设备编号</view> |
|||
<view>WXDH2051351</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>设备名称</view> |
|||
<view>设备一维修2554</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>规格型号</view> |
|||
<view>报修工单</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>设备类型</view> |
|||
<view>维修班组一</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>存放位置</view> |
|||
<view>橙子</view> |
|||
</view> |
|||
<view class="dec-item"> |
|||
<view>使用部门</view> |
|||
<view>香蕉</view> |
|||
</view> |
|||
</view> |
|||
<view class="dec" v-if="current == 2"> |
|||
<SparePartsCard :subForm='subForm' :data='data' @addSubForm='addSubForm' @delSubFormItem='delSubFormItem'> |
|||
</SparePartsCard> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<u-button type="primary">保存/接单</u-button> |
|||
<u-button type="primary">完成</u-button> |
|||
<u-button type="primary">验证完结</u-button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
<u-popup v-model="isPopupShow" mode="center" border-radius="14"> |
|||
<view class="popup-title">添加记录</view> |
|||
<view class="popup"> |
|||
<Form :form='subForm' :data='data' ref="form2"></Form> |
|||
</view> |
|||
<view class="popup-footer"> |
|||
<view @click="cancle">取消</view> |
|||
<view class="sure" @click="addSpare">确认</view> |
|||
</view> |
|||
</u-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
import SparePartsCard from '@/components/sparePartsCard/index.vue' |
|||
export default { |
|||
components: { |
|||
Form, |
|||
SparePartsCard |
|||
}, |
|||
data() { |
|||
return { |
|||
list: [{ |
|||
name: '设备信息' |
|||
}, { |
|||
name: '报修信息' |
|||
}, { |
|||
name: '维修记录' |
|||
}], |
|||
current: 0, |
|||
changeItem: '', |
|||
data: { |
|||
name: '', |
|||
subList: [{ |
|||
name: '备件111111', |
|||
stork: '1', |
|||
number: '30', |
|||
}, { |
|||
name: '备件111111', |
|||
stork: '1', |
|||
number: '30', |
|||
}] |
|||
}, |
|||
isPopupShow:false, |
|||
subForm: { |
|||
formLabel: '', |
|||
formField: 'subList', |
|||
required: true, |
|||
isShowButton: true, |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'singleColumn', |
|||
field: 'name', |
|||
label: '模具', |
|||
disabled: false, |
|||
required: true, |
|||
span: 12, |
|||
list: [{ |
|||
label: '类型1', |
|||
value: 1 |
|||
}, { |
|||
label: '类型2', |
|||
value: 2 |
|||
}, { |
|||
label: '类型3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'text', |
|||
field: 'stork', |
|||
label: '库存', |
|||
disabled: false, |
|||
required: true, |
|||
isList: true, |
|||
span: 6 |
|||
}, { |
|||
type: 'text', |
|||
field: 'number', |
|||
label: '数量', |
|||
disabled: false, |
|||
required: true, |
|||
isList: true, |
|||
span: 6 |
|||
}], |
|||
}, |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
change(index) { |
|||
console.log("index", index); |
|||
this.current = index |
|||
this.changeItem = this.list[this.current] |
|||
}, |
|||
// 添加表格表单 |
|||
addSubForm() { |
|||
console.log(5) |
|||
this.isPopupShow = true |
|||
}, |
|||
// 添加备件 |
|||
addSpare(){ |
|||
// 校验 |
|||
for (let i = 0; i < this.subForm.formData.length; i++) { |
|||
if (this.subForm.formData[i].required === true) { |
|||
if (!this.data[this.subForm.formData[i].field]) { |
|||
let placeholder = '请输入' |
|||
if (this.subForm.formData[i].type == 'text' || this.subForm.formData[i].type == 'textarea') { |
|||
placeholder = '请输入' |
|||
} else { |
|||
placeholder = '请选择' |
|||
} |
|||
this.$modal.showToast(placeholder + this.subForm.formData[i].label) |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
// 取消添加备件 |
|||
cancle(){ |
|||
this.isPopupShow = false |
|||
}, |
|||
}, |
|||
onLoad() { |
|||
this.changeItem = this.list[this.current] |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.info { |
|||
background: white; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
|
|||
.tab { |
|||
border-bottom: 1px solid #e4e4e4; |
|||
|
|||
} |
|||
|
|||
.title { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 20rpx 30rpx; |
|||
border-bottom: 1px solid #e4e4e4; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
flex: 1; |
|||
border-left: 10rpx solid #409eff; |
|||
padding-left: 20rpx; |
|||
font-weight: bold; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.dec { |
|||
padding: 30rpx; |
|||
|
|||
.dec-item { |
|||
padding-bottom: 30rpx; |
|||
display: flex; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
width: 160rpx; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
color: #888888; |
|||
flex: 1; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
.popup-title { |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
color: #409eff; |
|||
padding: 30rpx |
|||
} |
|||
|
|||
.popup { |
|||
width: 600rpx; |
|||
padding: 0rpx 60rpx 0rpx; |
|||
|
|||
} |
|||
.popup-footer{ |
|||
display: flex; |
|||
border-top: 1px solid #e4e4e4; |
|||
view{ |
|||
line-height: 100rpx; |
|||
flex: 1; |
|||
text-align: center; |
|||
&.sure{ |
|||
color: #409eff; |
|||
} |
|||
} |
|||
} |
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
background: white; |
|||
z-index: 22; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
padding: 20rpx; |
|||
box-shadow: 0px -2rpx 20rpx rgba(0, 0, 0, 0.1); |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
margin: 0px 10rpx; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 8rpx; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,159 +0,0 @@ |
|||
<template> |
|||
<view class="container"> |
|||
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' |
|||
:title="title"> |
|||
<template v-slot:right> |
|||
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm"></u-icon> |
|||
</template> |
|||
</u-navbar> |
|||
<Search @search='search' @screen='screen' /> |
|||
|
|||
<workOrderList :data="data" :labelList='labelList' @itemClick="itemClick"></workOrderList> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import workOrderList from '@/components/workOrderList/index.vue' |
|||
export default { |
|||
components: { |
|||
workOrderList |
|||
}, |
|||
data() { |
|||
return { |
|||
title:'', |
|||
type:'', |
|||
labelList:[{ |
|||
label: '报修单号', |
|||
field: 'dec1', |
|||
},{ |
|||
label: '设备名称', |
|||
field: 'dec2', |
|||
},{ |
|||
label: '设备编号', |
|||
field: 'dec3', |
|||
},{ |
|||
label: '存放位置', |
|||
field: 'dec4', |
|||
},{ |
|||
label: '紧急程度', |
|||
field: 'dec5', |
|||
}], |
|||
data: { |
|||
isShowTime: true, |
|||
list: [{ |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 6 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 2 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 3 |
|||
}, { |
|||
title: '设备报修205245', |
|||
dec1: 'BX-20224648', |
|||
dec2: 'BX-20224648', |
|||
dec3: 'BX-20224648', |
|||
dec4: 'BX-20224648', |
|||
dec5: 'BX-20224648', |
|||
time: '2023-12-12 06:00:00', |
|||
status: 4 |
|||
}] |
|||
} |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
// 筛选 |
|||
screen() { |
|||
this.$tab.navigateTo(`/pages/workOrderList/screen?type=${this.type}`) |
|||
}, |
|||
itemClick(item,index){ |
|||
this.$tab.navigateTo(`/pages/workOrderList/detail?type=${this.type}`) |
|||
}, |
|||
addForm(){ |
|||
this.$tab.navigateTo(`/pages/workOrderList/addForm?type=${this.type}`) |
|||
} |
|||
}, |
|||
onLoad(option) { |
|||
this.type = option.type |
|||
if(option.type == 1){ |
|||
this.title = '设备报修' |
|||
}else if(option.type == 2){ |
|||
this.title = '维修工单' |
|||
}else if(option.type == 3){ |
|||
this.title = '检修工单' |
|||
}else if(option.type == 4){ |
|||
this.title = '点检工单' |
|||
}else if(option.type == 5){ |
|||
this.title = '保养工单' |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
.list{ |
|||
background: #f5f5f5; |
|||
margin-top: 20rpx; |
|||
.item{ |
|||
padding: 30rpx 30rpx 0px 30rpx; |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
.title{ |
|||
display: flex; |
|||
align-items: center; |
|||
padding-bottom: 20rpx; |
|||
.title-txt{ |
|||
color: #409eff; |
|||
font-weight: bold; |
|||
font-size: 36rpx; |
|||
width: 0px; |
|||
flex: 1; |
|||
} |
|||
.time{ |
|||
color: #919191; |
|||
|
|||
} |
|||
} |
|||
.dec{ |
|||
padding-bottom: 20rpx; |
|||
span{ |
|||
color: #999999; |
|||
} |
|||
} |
|||
.last{ |
|||
padding-bottom: 30rpx; |
|||
} |
|||
.bottom{ |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border-top: 1px solid #E4E4E4; |
|||
padding: 20rpx 0px; |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
</style> |
@ -1,223 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
type:'', |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '报修主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'text', |
|||
field: 'name', |
|||
label: '设备名称', |
|||
disabled: false, |
|||
required: true, |
|||
value: '', |
|||
}, { |
|||
type: 'text', |
|||
field: 'location', |
|||
label: '存放位置', |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '紧急程度', |
|||
list: [{ |
|||
label: '程度1', |
|||
value: 1 |
|||
}, { |
|||
label: '程度2', |
|||
value: 2 |
|||
}, { |
|||
label: '程度3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '工单状态', |
|||
list: [{ |
|||
label: '状态1', |
|||
value: 1 |
|||
}, { |
|||
label: '状态2', |
|||
value: 2 |
|||
}, { |
|||
label: '状态3', |
|||
value: 3 |
|||
}] |
|||
}], |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
|
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data={} |
|||
}, |
|||
|
|||
}, |
|||
onLoad(option) { |
|||
this.type = option.type |
|||
if(option.type == 1){ |
|||
}else if(option.type == 2){ |
|||
this.form.formData[0] = { |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '维修主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
} |
|||
}else if(option.type == 3){ |
|||
this.form.formData[0] = { |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '检修主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
} |
|||
this.form.formData.pop() |
|||
}else if(option.type == 4){ |
|||
this.form.formData[0] = { |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '点检主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
} |
|||
this.form.formData.pop() |
|||
}else if(option.type == 5){ |
|||
this.form.formData[0] = { |
|||
type: 'text', |
|||
field: 'code', |
|||
label: '保养主题', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
} |
|||
this.form.formData.pop() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,181 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1"></Form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit">确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import Form from '@/components/form/index.vue' |
|||
export default { |
|||
components: { |
|||
Form |
|||
}, |
|||
data() { |
|||
return { |
|||
form: { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '模具', |
|||
list: [{ |
|||
label: '程度1', |
|||
value: 1 |
|||
}, { |
|||
label: '程度2', |
|||
value: 2 |
|||
}, { |
|||
label: '程度3', |
|||
value: 3 |
|||
}] |
|||
}, { |
|||
type: 'singleColumn', |
|||
field: 'type', |
|||
label: '维修工', |
|||
list: [{ |
|||
label: '状态1', |
|||
value: 1 |
|||
}, { |
|||
label: '状态2', |
|||
value: 2 |
|||
}, { |
|||
label: '状态3', |
|||
value: 3 |
|||
}] |
|||
}], |
|||
rules: { |
|||
// 对name字段进行必填验证 |
|||
name: [ |
|||
{ |
|||
min: 5, |
|||
message: '简介不能少于5个字', |
|||
trigger: 'change' |
|||
}, |
|||
// 对name字段进行必填验证 |
|||
{ |
|||
required: true, |
|||
message: '请填写姓名', |
|||
trigger: ['change', 'blur'] |
|||
}, |
|||
] |
|||
} |
|||
}, |
|||
data: { |
|||
name: '', |
|||
sex: 2, |
|||
hobby: [1, 2], |
|||
open: true, |
|||
duoxuan: 3, |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.$refs.form1.$refs.form.validate().then(res => { |
|||
console.log('表单数据信息:', res); |
|||
}).catch(err => { |
|||
console.log('表单错误信息:', err); |
|||
}) |
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
console.log('表单数据信息1:', this.data); |
|||
this.data={} |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: calc(100vh - 140rpx); |
|||
background: white; |
|||
padding: 0px 30rpx 140rpx; |
|||
} |
|||
.list { |
|||
padding-bottom: 20rpx; |
|||
|
|||
.item { |
|||
margin-top: 20rpx; |
|||
background: white; |
|||
padding: 30rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
|
|||
image { |
|||
width: 160rpx; |
|||
height: 160rpx; |
|||
margin-right: 20rpx; |
|||
} |
|||
|
|||
.title { |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
} |
|||
|
|||
.dec1 { |
|||
font-size: 28rpx; |
|||
margin-top: 16rpx; |
|||
color: #acacac; |
|||
} |
|||
|
|||
.dec2 { |
|||
font-size: 28rpx; |
|||
margin-top: 6rpx; |
|||
color: #acacac; |
|||
} |
|||
} |
|||
} |
|||
.footer { |
|||
position: fixed; |
|||
bottom: 0px; |
|||
left: 0px; |
|||
width: 100%; |
|||
} |
|||
|
|||
.btns { |
|||
display: flex; |
|||
|
|||
|
|||
button { |
|||
flex: 1; |
|||
} |
|||
|
|||
.sure { |
|||
background: #409eff; |
|||
color: white; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border: 1px solid #409eff; |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
|
|||
.reset { |
|||
background: #F5F5F5; |
|||
border-radius: 0px; |
|||
|
|||
&::after { |
|||
border-radius: 0px; |
|||
} |
|||
} |
|||
} |
|||
</style> |
Loading…
Reference in new issue