|
@@ -2,11 +2,8 @@
|
|
|
<view class="mx3" style="padding-bottom: 100rpx">
|
|
<view class="mx3" style="padding-bottom: 100rpx">
|
|
|
<u-toast ref="uToast" />
|
|
<u-toast ref="uToast" />
|
|
|
<view class="main-color-bg" style="height: 100rpx; margin: 0 -30rpx"></view>
|
|
<view class="main-color-bg" style="height: 100rpx; margin: 0 -30rpx"></view>
|
|
|
- <view
|
|
|
|
|
- class="p3 bg-color-white"
|
|
|
|
|
- style="margin-top: -50rpx; border-radius: 20rpx"
|
|
|
|
|
- >
|
|
|
|
|
- <u-form :model="form" ref="uForm" >
|
|
|
|
|
|
|
+ <view class="p3 bg-color-white" style="margin-top: -50rpx; border-radius: 20rpx">
|
|
|
|
|
+ <u-form :model="form" ref="uForm">
|
|
|
<view class="main-color-text f-size-32 f-weight-6 mt-2">设备信息</view>
|
|
<view class="main-color-text f-size-32 f-weight-6 mt-2">设备信息</view>
|
|
|
<u-form-item label="设备名称" :label-width="150">
|
|
<u-form-item label="设备名称" :label-width="150">
|
|
|
<u-input v-model="form.sbName" disabled />
|
|
<u-input v-model="form.sbName" disabled />
|
|
@@ -15,13 +12,13 @@
|
|
|
<u-input v-model="form.sbNo" disabled />
|
|
<u-input v-model="form.sbNo" disabled />
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<view class="main-color-text f-size-32 f-weight-6 mt-2">变更信息</view>
|
|
<view class="main-color-text f-size-32 f-weight-6 mt-2">变更信息</view>
|
|
|
- <u-form-item label="变更时间" required :label-width="150">
|
|
|
|
|
|
|
+ <u-form-item label="变更时间" required prop="changeTime" :label-width="150">
|
|
|
<u-input v-model="form.changeTime" @click="handleClick" :cursor-spacing="cursorSpacing" />
|
|
<u-input v-model="form.changeTime" @click="handleClick" :cursor-spacing="cursorSpacing" />
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<u-form-item label="变更原因" :label-width="150">
|
|
<u-form-item label="变更原因" :label-width="150">
|
|
|
<u-input v-model="form.changeReason" :cursor-spacing="cursorSpacing" />
|
|
<u-input v-model="form.changeReason" :cursor-spacing="cursorSpacing" />
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
- <u-form-item label="变更人" required :label-width="150">
|
|
|
|
|
|
|
+ <u-form-item label="变更人" required prop="actualUser" :label-width="150">
|
|
|
<u-input v-model="form.actualUser" :cursor-spacing="cursorSpacing" />
|
|
<u-input v-model="form.actualUser" :cursor-spacing="cursorSpacing" />
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
<u-form-item label="变更前状态" required :label-width="150">
|
|
<u-form-item label="变更前状态" required :label-width="150">
|
|
@@ -31,14 +28,11 @@
|
|
|
<text class="f-size-26 mr-3 state-r">{{ statusMap[form.afterStatus] }}</text>
|
|
<text class="f-size-26 mr-3 state-r">{{ statusMap[form.afterStatus] }}</text>
|
|
|
</u-form-item>
|
|
</u-form-item>
|
|
|
</u-form>
|
|
</u-form>
|
|
|
- <u-picker @confirm="confirm" @cancel="cancel" mode="time" v-model="isShow" :params="pickerParams"></u-picker>
|
|
|
|
|
|
|
+ <u-picker @confirm="confirm" @cancel="cancel" mode="time" v-model="isShow"
|
|
|
|
|
+ :params="pickerParams"></u-picker>
|
|
|
<!-- <button class="main-color-bg text-color-white" @tap='handleSubmit'>提交</button> -->
|
|
<!-- <button class="main-color-bg text-color-white" @tap='handleSubmit'>提交</button> -->
|
|
|
<view class="p-fixed d-flex j-around a-center footer">
|
|
<view class="p-fixed d-flex j-around a-center footer">
|
|
|
- <view
|
|
|
|
|
- class="main-color-bg text-color-white common"
|
|
|
|
|
- @tap="handleSubmit"
|
|
|
|
|
- >提交</view
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <view class="main-color-bg text-color-white common" @tap="handleSubmit">提交</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -73,6 +67,22 @@ export default {
|
|
|
timestamp: true
|
|
timestamp: true
|
|
|
},
|
|
},
|
|
|
statusMap: {},
|
|
statusMap: {},
|
|
|
|
|
+ rules: {
|
|
|
|
|
+ changeTime: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择变更时间',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ],
|
|
|
|
|
+ actualUser: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入变更人',
|
|
|
|
|
+ trigger: ['blur', 'change']
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
// #ifdef MP-WEIXIN
|
|
// #ifdef MP-WEIXIN
|
|
|
cursorSpacing: 50,
|
|
cursorSpacing: 50,
|
|
|
// #endif
|
|
// #endif
|
|
@@ -94,7 +104,8 @@ export default {
|
|
|
this.$DictCache.TYPE.SB_INFO_STATUS
|
|
this.$DictCache.TYPE.SB_INFO_STATUS
|
|
|
);
|
|
);
|
|
|
if (options && options.sbId) {
|
|
if (options && options.sbId) {
|
|
|
- this.sbId = options.sbId;
|
|
|
|
|
|
|
+ console.log(options)
|
|
|
|
|
+ this.form.sbId = options.sbId;
|
|
|
this.form.sbNo = options.sbNo;
|
|
this.form.sbNo = options.sbNo;
|
|
|
this.form.sbName = options.sbName;
|
|
this.form.sbName = options.sbName;
|
|
|
this.form.preStatus = options.preStatus;
|
|
this.form.preStatus = options.preStatus;
|
|
@@ -103,6 +114,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onReady() {
|
|
onReady() {
|
|
|
|
|
+ this.$refs.uForm.setRules(this.rules);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleClick() {
|
|
handleClick() {
|
|
@@ -123,6 +135,7 @@ export default {
|
|
|
if (this.form.changeTime != null) {
|
|
if (this.form.changeTime != null) {
|
|
|
time = this.$BaseTool.Date.formatter(this.form.changeTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN);
|
|
time = this.$BaseTool.Date.formatter(this.form.changeTime, BaseTool.Date.PICKER_NORM_DATETIME_PATTERN);
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(this.form)
|
|
|
const params = {
|
|
const params = {
|
|
|
sbId: this.form.sbId,
|
|
sbId: this.form.sbId,
|
|
|
actualUser: this.form.actualUser,
|
|
actualUser: this.form.actualUser,
|
|
@@ -132,7 +145,7 @@ export default {
|
|
|
remarks: this.form.remarks,
|
|
remarks: this.form.remarks,
|
|
|
changeReason: this.form.changeReason
|
|
changeReason: this.form.changeReason
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+ console.log(params)
|
|
|
// this.form.photo = a.join(',');
|
|
// this.form.photo = a.join(',');
|
|
|
var that = this;
|
|
var that = this;
|
|
|
this.$refs.uForm.validate((valid) => {
|
|
this.$refs.uForm.validate((valid) => {
|
|
@@ -157,19 +170,19 @@ export default {
|
|
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
.footer {
|
|
.footer {
|
|
|
- bottom: 0;
|
|
|
|
|
- left: 0;
|
|
|
|
|
- right: 0;
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- z-index: 10000;
|
|
|
|
|
- border-top: 1rpx solid #f4f4f4;
|
|
|
|
|
- height: 100rpx;
|
|
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ background-color: #fff;
|
|
|
|
|
+ z-index: 10000;
|
|
|
|
|
+ border-top: 1rpx solid #f4f4f4;
|
|
|
|
|
+ height: 100rpx;
|
|
|
|
|
|
|
|
- .common {
|
|
|
|
|
- padding: 15rpx 200rpx;
|
|
|
|
|
- border-radius: 30rpx;
|
|
|
|
|
- background-color: #0082ff;
|
|
|
|
|
- color: #fff;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .common {
|
|
|
|
|
+ padding: 15rpx 200rpx;
|
|
|
|
|
+ border-radius: 30rpx;
|
|
|
|
|
+ background-color: #0082ff;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|