zhang_li
10 months ago
20 changed files with 136 additions and 1802 deletions
@ -1,103 +0,0 @@ |
|||
<template> |
|||
<view class="content"> |
|||
<view class="list"> |
|||
<view class="item" v-for="(item,index) in data.list" :key="index" @click="itemClick(item,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="time"> |
|||
{{item.time}} |
|||
</view> |
|||
<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> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: { |
|||
labelList:{ |
|||
type: Array, |
|||
default:()=>{return []}, |
|||
}, |
|||
data:{ |
|||
type: Object, |
|||
default:()=>{return {}}, |
|||
}, |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
} |
|||
}, |
|||
methods: { |
|||
itemClick(item,index){ |
|||
this.$emit('itemClick',item,index) |
|||
} |
|||
} |
|||
} |
|||
</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,400 +0,0 @@ |
|||
<template> |
|||
<!-- 添加维修工单 --> |
|||
<view class="add-form-container"> |
|||
<u-form :model="form" ref="form1" label-width="160rpx"> |
|||
<u-form-item label="类型" prop="receiverType" required> |
|||
<view class="select" @click="openSingleColumn('receiverType',form.receiverType,appDeviceMoldType)"> |
|||
<view class="input" v-if='form.receiverType'> |
|||
{{selectFormat(form.receiverType,appDeviceMoldType)}} |
|||
</view> |
|||
<view class="placeholder" v-else> |
|||
{{`请选择类型`}} |
|||
</view> |
|||
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="deviceNumber" required> |
|||
<view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)"> |
|||
<view class="input" v-if='form.deviceNumber'> |
|||
{{selectFormat(form.deviceNumber,deviceList)}} |
|||
</view> |
|||
<view class="placeholder" v-else> |
|||
{{`请选择${type=='DEVICE'?'设备' : '模具'}名称`}} |
|||
</view> |
|||
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
<u-form-item label="维修人员" prop="describes" required> |
|||
<view class="select" @click="openSelecUser('receiverUserId')"> |
|||
<view class="input" v-if='form.receiverUserId'> |
|||
{{selectFormatRadin(form.receiverUserId,selecUserList)}} |
|||
</view> |
|||
<view class="placeholder" v-else> |
|||
请选择维修人员 |
|||
</view> |
|||
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> |
|||
</view> |
|||
</u-form-item> |
|||
</u-form> |
|||
<view class="footer"> |
|||
<view class="btns"> |
|||
<button class="reset" @click="reset">重置</button> |
|||
<button class="sure" @click="submit" :loading='loading' :disabled='loading'>确定</button> |
|||
</view> |
|||
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> |
|||
</view> |
|||
<!-- 选择维修人员 --> |
|||
<u-popup v-model="isShowSelecUser" mode="center" border-radius="14"> |
|||
<view class="popup-title">选择维修人员</view> |
|||
<view class="popup"> |
|||
<u-radio-group v-model="form.receiverUserId" |
|||
@change="radioGroupChange('receiverUserId',form.receiverUserId,selecUserList)"> |
|||
<u-radio v-for="(item, index) in selecUserList" :key="index" :name="item.id"> |
|||
{{item.name}} |
|||
</u-radio> |
|||
</u-radio-group> |
|||
</view> |
|||
<view class="popup-footer"> |
|||
<view @click="isShowSelecUser = false">取消</view> |
|||
<view class="sure" @click="chooseUser">确认</view> |
|||
</view> |
|||
</u-popup> |
|||
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' |
|||
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as deviceApi from "@/api/device.js" |
|||
import * as moldApi from "@/api/mold.js" |
|||
import * as dictApi from "@/api/dict.js" |
|||
import * as repairOrderApi from "@/api/repairOrder.js" |
|||
import * as deptApi from "@/api/dept.js" |
|||
|
|||
|
|||
export default { |
|||
data() { |
|||
return { |
|||
loading: false, |
|||
type: "", |
|||
appDeviceMoldType: [], //类型列表字典 |
|||
form: { |
|||
id: '', |
|||
receiverType: "", |
|||
deviceNumber: '', |
|||
deviceName: '', |
|||
receiverUserId: '', |
|||
}, |
|||
deviceList: [], //设备列表 |
|||
singleColumnShow: false, |
|||
singleColumnDefaultValue: [], |
|||
singleColumnList: [], |
|||
field: '', |
|||
// 维修人员 |
|||
selecUserList: [], //维修人员 |
|||
isShowSelecUser: false, |
|||
} |
|||
}, |
|||
methods: { |
|||
// 触发提交表单 |
|||
submit() { |
|||
// 校验 |
|||
if (!this.form.receiverType) { |
|||
this.$modal.showToast('请选择类型') |
|||
return; |
|||
} |
|||
if (!this.form.deviceNumber) { |
|||
this.$modal.showToast(`请选择${this.type=='DEVICE'?'设备' : '模具'}名称`) |
|||
return; |
|||
} |
|||
if (!this.form.receiverUserId) { |
|||
this.$modal.showToast('请选择维修人员') |
|||
return; |
|||
} |
|||
const data = { |
|||
id: this.form && this.form.id ? this.form.id : '', |
|||
receiverType: this.form.receiverType, |
|||
deviceNumber: this.form.deviceNumber, |
|||
receiverUserId: this.form.receiverUserId, |
|||
} |
|||
this.$modal.confirm('是否转办维修工单').then(() => { |
|||
this.$modal.loading('加载中') |
|||
this.loading = true |
|||
repairOrderApi.transfer(data).then((res) => { |
|||
this.$modal.closeLoading() |
|||
if (res.data) { |
|||
this.$modal.showToast('转办成功') |
|||
setTimeout(() => { |
|||
this.$tab.navigateBack(2) |
|||
this.loading = false |
|||
}, 1500) |
|||
} else { |
|||
this.$modal.showToast('转办失败') |
|||
this.loading = false |
|||
} |
|||
}).catch(() => { |
|||
this.$modal.closeLoading() |
|||
this.loading = false |
|||
}) |
|||
}) |
|||
|
|||
}, |
|||
// 重置 |
|||
reset() { |
|||
if (this.form.id) { |
|||
this.form.receiverType = ""; |
|||
this.form.deviceNumber = ''; |
|||
this.form.deviceName = ''; |
|||
this.form.receiverUserId = ''; |
|||
} else { |
|||
|
|||
this.form = {} |
|||
} |
|||
}, |
|||
// |
|||
selectFormat(val, array) { |
|||
let str = array.filter(item => item.value == val)[0].label |
|||
return str |
|||
}, |
|||
// 单列模式 |
|||
openSingleColumn(field, val, list) { |
|||
this.singleColumnList = list |
|||
this.field = field |
|||
if (val) { |
|||
this.singleColumnDefaultValue = [list.findIndex(item => item.value == val)] |
|||
} else { |
|||
this.singleColumnDefaultValue = [] |
|||
} |
|||
this.singleColumnShow = true |
|||
}, |
|||
// 单列模式点击确定之后 |
|||
chooseSingleColumn(e) { |
|||
console.log(e[0]) |
|||
this.form[this.field] = e[0].value |
|||
if (this.field == 'receiverType') { |
|||
this.type = this.form[this.field] |
|||
this.form.deviceName = '' |
|||
this.form.deviceNumber = '' |
|||
this.getDeviceList() |
|||
} else if (this.field == 'deviceNumber') { |
|||
this.choosesingleColumnItem = this.singleColumnList.filter(item => item.number == e[0].value) |
|||
this.form.factoryAreaName = this.choosesingleColumnItem[0].factoryAreaName |
|||
this.form.factoryAreaNumber = this.choosesingleColumnItem[0].factoryAreaNumber |
|||
this.getSelecUser() |
|||
} |
|||
this.singleColumnShow = false |
|||
this.$emit('singleColumn', this.field, this.form[this.field]) |
|||
this.$forceUpdate() |
|||
}, |
|||
// 获取设备/模具列表 |
|||
async getDeviceList() { |
|||
if (this.type == 'DEVICE') { |
|||
await deviceApi.deviceList().then(res => { |
|||
res.data.map(item => { |
|||
item.value = item.number |
|||
item.label = item.name |
|||
}) |
|||
this.deviceList = res.data |
|||
}) |
|||
} else if (this.type == 'MOLD') { |
|||
await moldApi.moldList().then(res => { |
|||
res.data.map(item => { |
|||
item.value = item.number |
|||
item.label = item.name |
|||
}) |
|||
this.deviceList = res.data |
|||
}) |
|||
} |
|||
|
|||
}, |
|||
// 获取人员列表 |
|||
async getSelecUser() { |
|||
let data = { |
|||
classType: this.type, |
|||
factoryAreaNumber: this.form.factoryAreaNumber, |
|||
flag: 1 |
|||
} |
|||
let arr = [] |
|||
if (this.form.maintenances) { |
|||
arr = this.form.maintenances.split(',') |
|||
} |
|||
await deptApi.getSelecUser(data).then(res => { |
|||
res.data.forEach(item => { |
|||
item.checked = false |
|||
arr.forEach(cur => { |
|||
if (item.id == cur) { |
|||
item.checked = true |
|||
} |
|||
}) |
|||
}) |
|||
this.selecUserList = res.data |
|||
}) |
|||
}, |
|||
// 打开人员列表 |
|||
openSelecUser(field) { |
|||
this.field = field |
|||
this.isShowSelecUser = true |
|||
}, |
|||
radioGroupChange(field, e, list) { |
|||
this.chooseUserInfo = e |
|||
}, |
|||
// 多选选择框回显 |
|||
selectFormatRadin(val, array) { |
|||
let str = array.filter(item => item.id == val)[0].name |
|||
return str |
|||
}, |
|||
// 选择人员 |
|||
chooseUser() { |
|||
this.form[this.field] = this.chooseUserInfo |
|||
this.isShowSelecUser = false |
|||
}, |
|||
}, |
|||
async onLoad(option) { |
|||
if (option.type) this.type = option.type; |
|||
if (option.id) this.form.id = option.id; |
|||
this.appDeviceMoldType = await dictApi.getDict('app_device_mold_type') |
|||
this.appDeviceMoldType = this.appDeviceMoldType.filter(item => item.value != this.type) |
|||
} |
|||
} |
|||
</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; |
|||
} |
|||
} |
|||
} |
|||
|
|||
.right-button { |
|||
background: #409eff; |
|||
color: white; |
|||
padding: 0rpx 30rpx; |
|||
border-radius: 16rpx; |
|||
text-align: center; |
|||
font-size: 28rpx; |
|||
} |
|||
|
|||
.select { |
|||
display: flex; |
|||
align-items: center; |
|||
height: 72rpx; |
|||
width: 100%; |
|||
|
|||
.input { |
|||
flex: 1; |
|||
font-size: 28rpx; |
|||
color: #000000; |
|||
} |
|||
|
|||
.placeholder { |
|||
flex: 1; |
|||
font-size: 28rpx; |
|||
color: rgb(192, 196, 204); |
|||
|
|||
} |
|||
} |
|||
|
|||
.popup-title { |
|||
text-align: center; |
|||
font-size: 32rpx; |
|||
font-weight: bold; |
|||
color: #409eff; |
|||
padding: 30rpx 30rpx 0px |
|||
} |
|||
|
|||
.popup { |
|||
width: 600rpx; |
|||
padding: 30rpx 60rpx 30rpx; |
|||
|
|||
} |
|||
|
|||
.popup-footer { |
|||
display: flex; |
|||
border-top: 1px solid #e4e4e4; |
|||
|
|||
view { |
|||
line-height: 100rpx; |
|||
flex: 1; |
|||
text-align: center; |
|||
|
|||
&.sure { |
|||
color: #409eff; |
|||
} |
|||
} |
|||
} |
|||
|
|||
::v-deep .u-radio-group { |
|||
display: grid !important; |
|||
} |
|||
</style> |
@ -1,284 +0,0 @@ |
|||
<template> |
|||
<!-- 设备 --> |
|||
<view class="add-form-container"> |
|||
<Form :form='form' :data='data' ref="form1" @chickRightButton='chickRightButton' @blur='blur'></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' |
|||
import * as deviceApi from "@/api/device.js" |
|||
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: '', |
|||
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, |
|||
deviceNumber:'', |
|||
deviceName: '', |
|||
factoryName: '', |
|||
time: '2023-12-12 08:00:00' |
|||
} |
|||
} |
|||
}, |
|||
methods: { |
|||
// 扫描设备条码 |
|||
chickRightButton(field) { |
|||
// 允许从相机和相册扫码 |
|||
if(field == 'deviceNumber'){ |
|||
uni.scanCode({ |
|||
success: function (res) { |
|||
this.data.deviceNumber = res.result |
|||
this.getDetailsByNumber() |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
blur(val,field){ |
|||
console.log(field) |
|||
this.data.deviceNumber = val |
|||
if(field == 'deviceNumber'){ |
|||
this.getDetailsByNumber() |
|||
} |
|||
}, |
|||
// 根据设备/模具号查询信息 |
|||
getDetailsByNumber(){ |
|||
const data = { |
|||
number :this.data.deviceNumber, |
|||
type:this.type, |
|||
id:'' |
|||
} |
|||
console.log(data) |
|||
deviceApi.getDetailsByNumber(data).then((res)=>{ |
|||
this.data.deviceName = res.data.name |
|||
this.data.factoryName = res.data.factoryName |
|||
this.$forceUpdate() |
|||
}) |
|||
}, |
|||
// 触发提交表单 |
|||
submit() { |
|||
// 校验 |
|||
if(this.type == 1){ |
|||
|
|||
} |
|||
// 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:'添加报修' |
|||
}) |
|||
this.type = 'DEVICE' |
|||
this.form= { |
|||
disabled: false, |
|||
visible: true, |
|||
loading: false, |
|||
labelWidth: '180rpx', |
|||
border: true, |
|||
errorType: ['toast'], |
|||
formData: [{ |
|||
type: 'text', |
|||
field: 'describes', |
|||
label: '故障描述', |
|||
disabled: false, |
|||
required: true, |
|||
value: '' |
|||
}, { |
|||
type: 'text', |
|||
field: 'deviceNumber', |
|||
label: '设备编码', |
|||
disabled: false, |
|||
required: true, |
|||
value: '', |
|||
isRightButton: '扫描' |
|||
}, { |
|||
type: 'text', |
|||
field: 'deviceName', |
|||
label: '设备名称', |
|||
required: true, |
|||
}, { |
|||
type: 'text', |
|||
field: 'factoryName', |
|||
label: '所属厂区', |
|||
required: true, |
|||
}], |
|||
} |
|||
}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,161 +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