处理工单页面签到执行静态数据调取、填写维保单静态数据调取、配件列表静态数据调取
parent
a9c291d3f7
commit
64ca9137cb
|
@ -0,0 +1,283 @@
|
||||||
|
<template>
|
||||||
|
<view class="datetime-picker">
|
||||||
|
<view
|
||||||
|
class="mask"
|
||||||
|
:class="{ show: open }"
|
||||||
|
@touchmove.stop.prevent
|
||||||
|
catchtouchmove="true"
|
||||||
|
></view>
|
||||||
|
<view class="wrap" :class="{ show: open }">
|
||||||
|
<view class="picker-header" @touchmove.stop.prevent catchtouchmove="true">
|
||||||
|
<view class="btn-picker cancel" @click="open = false">取消</view>
|
||||||
|
<view class="btn-picker submit" @click="_onSubmit">确定</view>
|
||||||
|
</view>
|
||||||
|
<view class="picker-body">
|
||||||
|
<picker-view :value="value" @change="_onChange">
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="column-item" v-for="item in years" :key="item">
|
||||||
|
{{ item + "年" }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="column-item" v-for="item in months" :key="item">
|
||||||
|
{{ formatNum(item) + "月" }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="column-item" v-for="item in days" :key="item">
|
||||||
|
{{ formatNum(item) + "日" }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="column-item" v-for="item in hours" :key="item">
|
||||||
|
{{ formatNum(item) + "时" }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
<picker-view-column>
|
||||||
|
<view class="column-item" v-for="item in minutes" :key="item">
|
||||||
|
{{ formatNum(item) + "分" }}
|
||||||
|
</view>
|
||||||
|
</picker-view-column>
|
||||||
|
</picker-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "buuug7-simple-datetime-picker",
|
||||||
|
props: {
|
||||||
|
startYear: {
|
||||||
|
type: Number,
|
||||||
|
default: 2000,
|
||||||
|
},
|
||||||
|
endYear: {
|
||||||
|
type: Number,
|
||||||
|
default: 2030,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
open: false,
|
||||||
|
years: [],
|
||||||
|
months: [],
|
||||||
|
days: [],
|
||||||
|
hours: [],
|
||||||
|
minutes: [],
|
||||||
|
currentDate: new Date(),
|
||||||
|
year: "",
|
||||||
|
month: "",
|
||||||
|
day: "",
|
||||||
|
hour: "",
|
||||||
|
minute: "",
|
||||||
|
value: [0, 0, 0, 0, 0],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.init();
|
||||||
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
month() {
|
||||||
|
this.initDays();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
init() {
|
||||||
|
this.initYears();
|
||||||
|
this.initMonths();
|
||||||
|
this.initDays();
|
||||||
|
this.initHours();
|
||||||
|
this.initMinutes();
|
||||||
|
this.setSelectValue();
|
||||||
|
},
|
||||||
|
|
||||||
|
initYears() {
|
||||||
|
const years = [];
|
||||||
|
for (let year = this.startYear; year <= this.endYear; year++) {
|
||||||
|
years.push(year);
|
||||||
|
if (this.currentDate.getFullYear() === year) {
|
||||||
|
this.$set(this.value, 0, year - this.startYear);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.years = years;
|
||||||
|
},
|
||||||
|
|
||||||
|
initMonths() {
|
||||||
|
const months = [];
|
||||||
|
for (let month = 1; month <= 12; month++) {
|
||||||
|
months.push(month);
|
||||||
|
if (this.currentDate.getMonth() + 1 === month) {
|
||||||
|
this.$set(this.value, 1, month - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.months = months;
|
||||||
|
},
|
||||||
|
|
||||||
|
initDays() {
|
||||||
|
const value = this.value;
|
||||||
|
const selectedYear = this.years[value[0]];
|
||||||
|
const selectedMonth = this.months[value[1]];
|
||||||
|
const days = [];
|
||||||
|
const totalDays = new Date(selectedYear, selectedMonth, 0).getDate();
|
||||||
|
for (let day = 1; day <= totalDays; day++) {
|
||||||
|
days.push(day);
|
||||||
|
if (this.currentDate.getDate() === day) {
|
||||||
|
this.$set(value, 2, day - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.days = days;
|
||||||
|
},
|
||||||
|
|
||||||
|
initHours() {
|
||||||
|
const hours = [];
|
||||||
|
for (let hour = 0; hour <= 23; hour++) {
|
||||||
|
hours.push(hour);
|
||||||
|
if (this.currentDate.getHours() === hour) {
|
||||||
|
this.$set(this.value, 3, hour);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.hours = hours;
|
||||||
|
},
|
||||||
|
|
||||||
|
initMinutes() {
|
||||||
|
const minutes = [];
|
||||||
|
for (let minute = 0; minute < 60; minute++) {
|
||||||
|
minutes.push(minute);
|
||||||
|
if (this.currentDate.getMinutes() === minute) {
|
||||||
|
this.$set(this.value, 4, minute);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.minutes = minutes;
|
||||||
|
},
|
||||||
|
|
||||||
|
show() {
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
hide() {
|
||||||
|
this.open = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_onChange(e) {
|
||||||
|
this.value = e.detail.value;
|
||||||
|
this.setSelectValue();
|
||||||
|
},
|
||||||
|
|
||||||
|
setSelectValue() {
|
||||||
|
const v = this.value;
|
||||||
|
|
||||||
|
this.year = this.years[v[0]];
|
||||||
|
this.month = this.months[v[1]];
|
||||||
|
this.day = this.days[v[2]];
|
||||||
|
this.hour = this.hours[v[3]];
|
||||||
|
this.minute = this.minutes[v[4]];
|
||||||
|
},
|
||||||
|
|
||||||
|
_onSubmit() {
|
||||||
|
const { year, month, day, hour, minute, formatNum } = this;
|
||||||
|
const result = {
|
||||||
|
year: formatNum(year),
|
||||||
|
month: formatNum(month),
|
||||||
|
day: formatNum(day),
|
||||||
|
hour: formatNum(hour),
|
||||||
|
minute: formatNum(minute),
|
||||||
|
};
|
||||||
|
this.$emit("submit", result);
|
||||||
|
this.hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
formatNum(num) {
|
||||||
|
return num < 10 ? "0" + num : num + "";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
$transition: all 0.3s ease;
|
||||||
|
$primary: #488ee9;
|
||||||
|
|
||||||
|
.datetime-picker {
|
||||||
|
position: relative;
|
||||||
|
z-index: 999;
|
||||||
|
picker-view {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.mask {
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1000;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.6);
|
||||||
|
visibility: hidden;
|
||||||
|
opacity: 0;
|
||||||
|
transition: $transition;
|
||||||
|
&.show {
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.wrap {
|
||||||
|
z-index: 1001;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
transition: $transition;
|
||||||
|
transform: translateY(100%);
|
||||||
|
&.show {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.picker-header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8px 8px;
|
||||||
|
background-color: darken(#fff, 2%);
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.picker-body {
|
||||||
|
width: 100%;
|
||||||
|
height: 420rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
.column-item {
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.btn-picker {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
line-height: 2;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #eee;
|
||||||
|
font-size: 14px;
|
||||||
|
// border-radius: 2px;
|
||||||
|
color: #000;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.btn-picker.submit {
|
||||||
|
background-color: $primary;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -63,6 +63,7 @@ const request = (method, url, options) => {
|
||||||
methods = 'GET'
|
methods = 'GET'
|
||||||
headers = {
|
headers = {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
|
'Authorization': 'Bearer '+uni.getStorageSync('token') || '',
|
||||||
'token':uni.getStorageSync('token') || ''
|
'token':uni.getStorageSync('token') || ''
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -70,14 +71,16 @@ const request = (method, url, options) => {
|
||||||
methods = 'POST'
|
methods = 'POST'
|
||||||
headers = {
|
headers = {
|
||||||
'Content-Type': 'application/json; charset=UTF-8',
|
'Content-Type': 'application/json; charset=UTF-8',
|
||||||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
'Authorization': 'Bearer '+uni.getStorageSync('token') || '',
|
||||||
|
'token':uni.getStorageSync('token') || ''
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'postForm':
|
case 'postForm':
|
||||||
methods = 'POST'
|
methods = 'POST'
|
||||||
headers = {
|
headers = {
|
||||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
'Authorization': 'Bearer '+uni.getStorageSync('token') || '',
|
||||||
|
'token':uni.getStorageSync('token') || ''
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +127,8 @@ const uploadFile = (url, options) => {
|
||||||
formData: tempData,
|
formData: tempData,
|
||||||
header: {
|
header: {
|
||||||
'Content-Type': 'multipart/form-data;charset=UTF-8',
|
'Content-Type': 'multipart/form-data;charset=UTF-8',
|
||||||
'Authorization': 'Bearer '+uni.getStorageSync('token') || ''
|
'Authorization': 'Bearer '+uni.getStorageSync('token') || '',
|
||||||
|
'token':uni.getStorageSync('token') || ''
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
|
|
|
@ -229,6 +229,65 @@ const tools = {
|
||||||
// console.log(time2);//1398250549123
|
// console.log(time2);//1398250549123
|
||||||
// console.log(time3);//1398250549000
|
// console.log(time3);//1398250549000
|
||||||
},
|
},
|
||||||
|
// 返回当前时间
|
||||||
|
returnCurrentTime(format,type) {
|
||||||
|
let date = new Date();
|
||||||
|
let year = date.getFullYear(); // 年
|
||||||
|
let month = date.getMonth() + 1; // 月
|
||||||
|
let day = date.getDate(); // 日
|
||||||
|
let time = date.getHours(); // 时
|
||||||
|
let minu = date.getSeconds(); // 分
|
||||||
|
let second = date.getMinutes(); // 秒
|
||||||
|
|
||||||
|
let newTime = '';
|
||||||
|
switch (type){
|
||||||
|
case 0:
|
||||||
|
newTime = `${year}${format}${month < 10? '0' + month : month}${format}${day < 10 ? '0' + day : day} ${time < 10 ? '0' + time : time}:${minu < 10 ? '0' + minu : minu}`; // 2022-03-31 16:05
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
newTime = `${year}${format}${month < 10? '0' + month : month}${format}${day < 10 ? '0' + day : day} ${time < 10 ? '0' + time : time}:${minu < 10 ? '0' + minu : minu}:${second < 10 ? '0' + second : second}`; // 2022-03-31 16:10:07
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return newTime;
|
||||||
|
},
|
||||||
|
// 返回时间xx天xx小时xx分钟
|
||||||
|
returnTimeFormat(startTime,endTime){
|
||||||
|
console.log(startTime,endTime);
|
||||||
|
let newTimeFormat = '';
|
||||||
|
let currentTimestamp = this.timeToTimestamp(endTime) - this.timeToTimestamp(startTime);
|
||||||
|
return this.returnTimestampToTime(currentTimestamp);
|
||||||
|
},
|
||||||
|
// 返回时间戳转时、分对象
|
||||||
|
returnTimestampToTime(timestamp){
|
||||||
|
let timeStr = '';
|
||||||
|
var day = parseInt((timestamp % (1000 * 60 * 60 * 24 * 12)) / (1000 * 60 * 60 * 24));
|
||||||
|
var hours = parseInt((timestamp % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||||
|
var seconds = parseInt((timestamp % (1000 * 60 * 60)) / (1000 * 60));
|
||||||
|
day = day < 10 ? ('0' + day) : day;
|
||||||
|
hours = hours < 10 ? ('0' + hours) : hours;
|
||||||
|
seconds = seconds < 10 ? ('0' + seconds) : seconds;
|
||||||
|
if(day*1==0) {
|
||||||
|
if(hours*1==0) {
|
||||||
|
seconds*1==0 ? timeStr = 0 : timeStr = `${seconds}分钟`;
|
||||||
|
} else {
|
||||||
|
timeStr = `${hours}小时${seconds}分钟`;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
timeStr = `${day}天${hours}小时${seconds}分钟`;
|
||||||
|
}
|
||||||
|
return timeStr;
|
||||||
|
},
|
||||||
|
// 时间戳转时分秒 00 : 00 : 00
|
||||||
|
formatDuring: function(mss) {
|
||||||
|
// let dangTime = Math.round(new Date()/1000)//获取当前时间戳
|
||||||
|
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||||
|
var seconds = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
|
||||||
|
var minutes = (mss % (1000 * 60)) / 1000;
|
||||||
|
hours = hours < 10 ? ('0' + hours) : hours;
|
||||||
|
seconds = seconds < 10 ? ('0' + seconds) : seconds;
|
||||||
|
minutes = minutes < 10 ? ('0' + minutes) : minutes;
|
||||||
|
return hours + ' : ' + seconds + ' : ' + minutes;
|
||||||
|
},
|
||||||
// 随机数生成
|
// 随机数生成
|
||||||
randomStr(){
|
randomStr(){
|
||||||
var strData = "";
|
var strData = "";
|
||||||
|
@ -281,16 +340,6 @@ const tools = {
|
||||||
duration:newTime
|
duration:newTime
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
formatDuring: function(mss) {
|
|
||||||
// let dangTime = Math.round(new Date()/1000)//获取当前时间戳
|
|
||||||
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
|
||||||
var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
|
|
||||||
var seconds = (mss % (1000 * 60)) / 1000;
|
|
||||||
hours = hours < 10 ? ('0' + hours) : hours;
|
|
||||||
minutes = minutes < 10 ? ('0' + minutes) : minutes;
|
|
||||||
seconds = seconds < 10 && seconds >= 1 ? ('0' + seconds) : seconds;
|
|
||||||
return hours + ' : ' + minutes + ' : ' + seconds;
|
|
||||||
},
|
|
||||||
// 富文本
|
// 富文本
|
||||||
escape2Html(str) {
|
escape2Html(str) {
|
||||||
var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' };
|
var arrEntities = { 'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"' };
|
||||||
|
|
|
@ -3,129 +3,149 @@
|
||||||
<statusNav returnColor="#c2c2c2" navBarTitle="配件列表"></statusNav>
|
<statusNav returnColor="#c2c2c2" navBarTitle="配件列表"></statusNav>
|
||||||
<container-subgroup-two>
|
<container-subgroup-two>
|
||||||
<view slot="content" style="margin:0rpx -25rpx 0rpx" :style="{paddingTop:statusBarHeight-40 + 'px'}">
|
<view slot="content" style="margin:0rpx -25rpx 0rpx" :style="{paddingTop:statusBarHeight-40 + 'px'}">
|
||||||
<view class="mountingsList-input" :style="{top:statusBarHeight + 'px'}">
|
<view class="mountingsList-input" :style="{top:statusBarHeight + 'px'}">
|
||||||
<input type="text" class="int" value="" placeholder="请输入关键字" />
|
<input type="text" class="int" value="" placeholder="请输入关键字" />
|
||||||
<image class="search" src="../../static/iocn/ss.png" mode=""></image>
|
<image class="search" src="../../static/iocn/ss.png" mode=""></image>
|
||||||
<view class="xian">
|
<view class="xian"></view>
|
||||||
|
</view>
|
||||||
|
<view class="mountings-list">
|
||||||
|
<view class="li" v-for="(item,index) in dataList.data">
|
||||||
|
<view class="textCon">
|
||||||
|
<view class="imgCon">
|
||||||
|
<image :src="item.images" class="img" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
<view class="title">
|
||||||
|
<view class="">{{item.name}}</view>
|
||||||
|
<view class="ispitchOn" @click="ispitchOnFun(item)">
|
||||||
|
<image v-if="item.isJob" src="../../static/iocn/pxz.png" class="icon1" mode=""></image>
|
||||||
|
<view v-else class="icon"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="brand p">配件品牌:{{item.brand}}</view>
|
||||||
|
<view class="model p">规格型号{{item.model}}</view>
|
||||||
|
<view class="num p">
|
||||||
|
<view class="">已用数量:{{item.remark}}张</view>
|
||||||
|
<view class="numBtn">
|
||||||
|
<view class="subtract" @click="addDelEv(item,0)">-</view>
|
||||||
|
<view class="sum">{{item.num}}</view>
|
||||||
|
<view class="add" @click="addDelEv(item,1)">+</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="p">*请注意规格型号的选择,不同型号不同价格。</view>
|
||||||
|
<view class="sum">费用合计:¥{{item.sum}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<button class="submit-button" @tap="submitEv" type="default">确认提交</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</container-subgroup-two>
|
||||||
<view class="mountings-list">
|
|
||||||
<view class="li" v-for="(item,index) in dataList.data">
|
|
||||||
<view class="textCon">
|
|
||||||
<view class="imgCon">
|
|
||||||
<image :src="item.images" class="img" mode="aspectFill"></image>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="text">
|
|
||||||
<view class="title">
|
|
||||||
<view class="">
|
|
||||||
{{item.name}}
|
|
||||||
</view>
|
|
||||||
<view class="ispitchOn" @click="ispitchOnFun(item)">
|
|
||||||
<image v-if="item.isJob" src="../../static/iocn/pxz.png" class="icon1" mode=""></image>
|
|
||||||
<view v-else class="icon">
|
|
||||||
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="brand p">
|
|
||||||
配件品牌:{{item.brand}}
|
|
||||||
</view>
|
|
||||||
<view class="model p">
|
|
||||||
规格型号{{item.model}}
|
|
||||||
</view>
|
|
||||||
<view class="num p">
|
|
||||||
|
|
||||||
<view class="">
|
|
||||||
已用数量:{{item.remark}}张
|
|
||||||
</view>
|
|
||||||
<view class="numBtn">
|
|
||||||
<view class="subtract" @click="subtractFun(item)">
|
|
||||||
-
|
|
||||||
</view>
|
|
||||||
<view class="sum">
|
|
||||||
{{item.num}}
|
|
||||||
</view>
|
|
||||||
<view class="add" @click="addFun(item)">
|
|
||||||
+
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="bottom">
|
|
||||||
<view class="p">
|
|
||||||
*请注意规格型号的选择,不同型号不同价格。
|
|
||||||
</view>
|
|
||||||
<view class="sum">
|
|
||||||
费用合计:¥{{item.sum}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<button class="submit-button" type="default">确认提交</button>
|
|
||||||
</view>
|
|
||||||
</container-subgroup-two>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import statusNav from '../../components/status-nav.vue';
|
import statusNav from '../../components/status-nav.vue';
|
||||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
statusNav,
|
statusNav,
|
||||||
containerSubgroupTwo
|
containerSubgroupTwo
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
statusBarHeight:uni.getSystemInfoSync().statusBarHeight+40,
|
statusBarHeight:uni.getSystemInfoSync().statusBarHeight+40,
|
||||||
dataList: {
|
dataList: {
|
||||||
list_rows: 10,
|
list_rows: 10,
|
||||||
page: 1,
|
page: 1,
|
||||||
data:{},
|
data:{},
|
||||||
}
|
},
|
||||||
|
temporaryList:[] // 暂时存储选中的配件列表
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
// 调用获取配件列表事件
|
||||||
this.getData()
|
this.getData()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 切换选取配件事件
|
||||||
ispitchOnFun(item) {
|
ispitchOnFun(item) {
|
||||||
item.isJob = !item.isJob
|
item.isJob = !item.isJob;
|
||||||
|
// 调用暂存配件列表事件
|
||||||
|
this.temporaryEv();
|
||||||
},
|
},
|
||||||
subtractFun(item) {
|
// 将选中的配件存储到暂存配件数组
|
||||||
if (item.num >= 1) {
|
temporaryEv(){
|
||||||
item.num--
|
this.temporaryList = [];
|
||||||
item.sum = item.price * item.num
|
this.dataList.data.forEach(item=>{
|
||||||
}
|
if(item.isJob) {
|
||||||
|
this.temporaryList.push(item);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uni.setStorageSync('partsList',this.temporaryList)
|
||||||
|
},
|
||||||
|
// 配件数量加减事件
|
||||||
|
addDelEv(item,index) {
|
||||||
|
if (index==0) {
|
||||||
|
// 减数量
|
||||||
|
if(item.num!=1) {
|
||||||
|
item.num--;
|
||||||
|
item.sum = this.$toolAll.tools.operationEv(item.price*1, item.num*1, '*',2);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 加数量
|
||||||
|
item.num++;
|
||||||
|
item.sum = this.$toolAll.tools.operationEv(item.price*1, item.num*1, '*',2);
|
||||||
|
}
|
||||||
|
// 调用暂存配件列表事件
|
||||||
|
this.temporaryEv();
|
||||||
},
|
},
|
||||||
|
// 获取配件列表事件
|
||||||
getData() {
|
getData() {
|
||||||
this.$requst.post('/universal/api.accessory/accessory_list', {
|
this.$requst.post('/universal/api.accessory/accessory_list', {
|
||||||
list_rows: this.dataList.list_rows,
|
list_rows: this.dataList.list_rows,
|
||||||
page: this.dataList.page,
|
page: this.dataList.page,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
// this.$toolAll.tools.showToast(res.msg);
|
|
||||||
console.log(res.data,"---")
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
this.dataList.data = res.data;
|
||||||
this.dataList.data = res.data
|
|
||||||
for (var i = 0; i < this.dataList.data.length; i++) {
|
for (var i = 0; i < this.dataList.data.length; i++) {
|
||||||
this.$set(this.dataList.data,i,{num:1,...this.dataList.data[i],sum:this.dataList.data[i].price,isJob:false})
|
this.$set(this.dataList.data,i,{num:1,...this.dataList.data[i],sum:this.dataList.data[i].price,isJob:false})
|
||||||
}
|
}
|
||||||
|
// 获取处理工单下的配件列表
|
||||||
|
let newList = uni.getStorageSync('partsList');
|
||||||
|
// 如果配件列表页面的列表数据不为空
|
||||||
|
if(this.dataList.data.length) {
|
||||||
|
this.dataList.data.forEach(item1=>{
|
||||||
|
// 如果处理工单下的配件列表不为空
|
||||||
|
if(newList.length!=0) {
|
||||||
|
newList.forEach((item,index)=>{
|
||||||
|
// 如果配件列表页面的配件id等于处理工单下的配件列表的配件id
|
||||||
|
if(item1.id==item.id) {
|
||||||
|
// 选中配件列表页面下的对应配件
|
||||||
|
item1.isJob = true;
|
||||||
|
// 设置配件列表页面下的配件数量
|
||||||
|
item1.num = item.num;
|
||||||
|
// 设置配件列表页面下的费用合计
|
||||||
|
item1.sum = item.sum;
|
||||||
|
// 删除临时处理工单下的配件列表对应数据
|
||||||
|
newList.splice(index,1)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addFun(item) {
|
// 确认提交事件
|
||||||
console.log(item)
|
submitEv(){
|
||||||
item.num++
|
console.log(uni.getStorageSync('partsList'),146);
|
||||||
item.sum = item.price * item.num
|
uni.navigateBack({delta:1})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -17,47 +17,46 @@
|
||||||
<view class="text">结算审核</view>
|
<view class="text">结算审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="work-order-from">
|
<view class="work-order-from">
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">工单编号:</view>
|
<view class="title flexs">工单编号:</view>
|
||||||
<input type="text" disabled class="input" value="GD20211203-001" />
|
<input type="text" disabled class="input" :value="targetObj.workOrderNo" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">项目编号:</view>
|
<view class="title flexs">项目编号:</view>
|
||||||
<input type="text" disabled class="input" value="GD20211203-001" />
|
<input type="text" disabled class="input" :value="targetObj.projectNo" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">项目名称:</view>
|
<view class="title flexs">项目名称:</view>
|
||||||
<input type="text" disabled class="input input-black" value="湖南省林业科学院11楼会议室P2.5" />
|
<input type="text" disabled class="input input-black" :value="targetObj.projectName" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">产品类型:</view>
|
<view class="title flexs">产品类型:</view>
|
||||||
<input type="text" class="input" v-model="productType" placeholder="请填写产品类型" :style="{color: productType!='' ? '#000' : ''}" />
|
<input type="text" class="input" v-model="targetObj.productType" placeholder="请填写产品类型" :style="{color: targetObj.productType!='' ? '#000' : ''}" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">安装位置:</view>
|
<view class="title flexs">安装位置:</view>
|
||||||
<input type="text" class="input" v-model="installLocation" placeholder="请填写安装位置(例:详细地址+某某栋11楼会议室)" :style="{color: installLocation!='' ? '#000' : ''}" />
|
<input type="text" class="input" v-model="targetObj.installLocation" placeholder="请填写安装位置(例:详细地址+某某栋11楼会议室)" :style="{color: targetObj.installLocation!='' ? '#000' : ''}" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">故障类型:</view>
|
<view class="title flexs">故障类型:</view>
|
||||||
<input type="text" class="input" v-model="faultType" placeholder="请填写故障类型(例:供电不足)" :style="{color: faultType!='' ? '#000' : ''}" />
|
<input type="text" class="input" v-model="targetObj.faultType" placeholder="请填写故障类型(例:供电不足)" :style="{color: targetObj.faultType!='' ? '#000' : ''}" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">紧急程度:</view>
|
<view class="title flexs">紧急程度:</view>
|
||||||
<input type="text" disabled class="input" placeholder="" value="紧急" />
|
<input type="text" disabled class="input" placeholder="" :value="targetObj.urgentDegree" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs"> 故障说明:</view>
|
<view class="title flexs"> 故障说明:</view>
|
||||||
<textarea class="input line-h36" v-model="faultExplain" style="height: 110rpx;" placeholder="请输入故障说明" :style="{color: faultExplain!='' ? '#000' : ''}" />
|
<textarea class="input line-h36" v-model="targetObj.faultExplain" style="height: 110rpx;" placeholder="请输入故障说明" :style="{color: targetObj.faultExplain!='' ? '#000' : ''}" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">故障图片:</view>
|
<view class="title flexs">故障图片:</view>
|
||||||
<view class="input">
|
<view class="input">
|
||||||
<view v-for="(item,index) in faultImgList" :key="index" v-if="faultImgList.length!=0">
|
<view v-for="(item,index) in targetObj.faultImgList" :key="index" v-if="targetObj.faultImgList.length!=0">
|
||||||
<image class="img" :src="item" mode="aspectFill" ></image>
|
<image class="img" :src="item" mode="aspectFill" ></image>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="faultImgList.length!=2" @tap="chooseImg" class="img disjcac" style="background-color: #DDDDDD;">
|
<view v-if="targetObj.faultImgList.length!=2" @tap="chooseImg" class="img disjcac" style="background-color: #DDDDDD;">
|
||||||
<image src="/static/iocn/jia.png" style="width: 80rpx;height: 80rpx;position: relative!important;" lazy-load></image>
|
<image src="/static/iocn/jia.png" style="width: 80rpx;height: 80rpx;position: relative!important;" lazy-load></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -66,19 +65,19 @@
|
||||||
<view class="work-order-from">
|
<view class="work-order-from">
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">报 单 人:</view>
|
<view class="title flexs">报 单 人:</view>
|
||||||
<input type="text" disabled class="input" placeholder="" value="林某" />
|
<input type="text" style="margin-left: 14rpx;" disabled class="input" placeholder="" :value="targetObj.reporter" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">报单时间:</view>
|
<view class="title flexs">报单时间:</view>
|
||||||
<input type="text" disabled disabled class="input" placeholder="" value="2021/12/3 12:00:05" />
|
<input type="text" disabled disabled class="input" placeholder="" :value="targetObj.declarationTime" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">服务方式:</view>
|
<view class="title flexs">服务方式:</view>
|
||||||
<input type="text" v-model="serviceMode" class="input input-black" placeholder="请填写服务方式(例:上门服务)" :style="{color: serviceMode!='' ? '#000' : ''}" />
|
<input type="text" v-model="targetObj.serviceMode" class="input input-black" placeholder="请填写服务方式(例:上门服务)" :style="{color: targetObj.serviceMode!='' ? '#000' : ''}" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title flexs">定位地址:</view>
|
<view class="title flexs">定位地址:</view>
|
||||||
<input type="text" disabled class="input" placeholder="定位地址" />
|
<input type="text" disabled class="input" :value="targetObj.address" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="submit-button" @click="goWorkOrderThree()" type="default">签到</button>
|
<button class="submit-button" @click="goWorkOrderThree()" type="default">签到</button>
|
||||||
|
@ -99,15 +98,38 @@
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
productType:'', // 产品类型
|
targetObj:{
|
||||||
installLocation:'', // 安装位置
|
workOrderNo:'GD20211203-001',// 工单编号
|
||||||
faultType:'', // 故障类型
|
projectNo:'GD20211203-001', // 项目编号
|
||||||
faultExplain:'', // 故障说明
|
projectName:'湖南省林业科学院11楼会议室P2.5', // 项目名称
|
||||||
faultImgList:[], // 故障图片
|
productType:'一拳超人', // 产品类型
|
||||||
serviceMode: '' ,// 服务方式
|
installLocation:'手臂', // 安装位置
|
||||||
|
faultType:'脱节', // 故障类型
|
||||||
|
urgentDegree:'紧急', // 紧急程度
|
||||||
|
faultExplain:'摔了一跤', // 故障说明
|
||||||
|
faultImgList:[], // 故障图片
|
||||||
|
reporter:'林某', // 报单人
|
||||||
|
declarationTime:'2022/3/31 12:01:00', //报单时间
|
||||||
|
serviceMode: '手把手' ,// 服务方式
|
||||||
|
address:'四川省成都市成华区' ,// 定位地址
|
||||||
|
startTime:'' ,// 开始时间
|
||||||
|
endTime:'', // 结束时间
|
||||||
|
maintenanceTime:'',// 维保用时
|
||||||
|
waitingTime:'',// 等待时长
|
||||||
|
maintainer:'陈志远',//主维保人
|
||||||
|
ifParts:false,//是否更换配件
|
||||||
|
workDescribe:'',// 工作描述
|
||||||
|
maintenanceImgList:[],//维保图片
|
||||||
|
faultReason:'',//故障原因
|
||||||
|
maintenancePersonnel:''//维保人员
|
||||||
|
},
|
||||||
flag:true
|
flag:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
uni.removeStorageSync('partsList');
|
||||||
|
uni.removeStorageSync('targetObj');
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 上传图片
|
// 上传图片
|
||||||
chooseImg(){
|
chooseImg(){
|
||||||
|
@ -116,7 +138,7 @@
|
||||||
sourceType:['album','camera'],
|
sourceType:['album','camera'],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
let imgsrc = res.tempFilePaths[0];
|
let imgsrc = res.tempFilePaths[0];
|
||||||
this.faultImgList.push(imgsrc);
|
this.targetObj.faultImgList.push(imgsrc);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -124,35 +146,29 @@
|
||||||
if(this.checkEmpty()){
|
if(this.checkEmpty()){
|
||||||
if(this.flag) {
|
if(this.flag) {
|
||||||
this.flag = false;
|
this.flag = false;
|
||||||
let params = {
|
this.targetObj.startTime = this.$toolAll.tools.returnCurrentTime('-',0);
|
||||||
a:this.productType,
|
uni.setStorageSync('targetObj',this.targetObj);
|
||||||
b:this.installLocation,
|
|
||||||
c:this.faultType,
|
|
||||||
d:this.faultExplain,
|
|
||||||
f:this.faultImgList.join(','),
|
|
||||||
e:this.serviceMode
|
|
||||||
}
|
|
||||||
console.log(params);
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/workOrder/workorderTwo"
|
url: "/pages/workOrder/workorderTwo"
|
||||||
})
|
})
|
||||||
|
this.flag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 判空
|
// 判空
|
||||||
checkEmpty(){
|
checkEmpty(){
|
||||||
let result = false;
|
let result = false;
|
||||||
if(!this.productType) {
|
if(!this.targetObj.productType) {
|
||||||
this.$toolAll.tools.showToast('请填写产品类型');
|
this.$toolAll.tools.showToast('请填写产品类型');
|
||||||
} else if(!this.installLocation) {
|
} else if(!this.targetObj.installLocation) {
|
||||||
this.$toolAll.tools.showToast('请填写安装位置');
|
this.$toolAll.tools.showToast('请填写安装位置');
|
||||||
} else if(!this.faultType) {
|
} else if(!this.targetObj.faultType) {
|
||||||
this.$toolAll.tools.showToast('请填写故障类型');
|
this.$toolAll.tools.showToast('请填写故障类型');
|
||||||
} else if(!this.faultExplain) {
|
} else if(!this.targetObj.faultExplain) {
|
||||||
this.$toolAll.tools.showToast('请填写故障说明');
|
this.$toolAll.tools.showToast('请填写故障说明');
|
||||||
} else if(this.faultImgList.length==0) {
|
} else if(this.targetObj.faultImgList.length==0) {
|
||||||
this.$toolAll.tools.showToast('请添加故障图片');
|
this.$toolAll.tools.showToast('请添加故障图片');
|
||||||
} else if(!this.serviceMode) {
|
} else if(!this.targetObj.serviceMode) {
|
||||||
this.$toolAll.tools.showToast('请填写服务方式');
|
this.$toolAll.tools.showToast('请填写服务方式');
|
||||||
} else {
|
} else {
|
||||||
result = true;
|
result = true;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<statusNav navBarTitle="处理工单"></statusNav>
|
<statusNav navBarTitle="处理工单" returnColor="#c2c2c2"></statusNav>
|
||||||
<container-subgroup-two>
|
<container-subgroup-two>
|
||||||
<view slot="content" returnColor="#c2c2c2" style="margin: -20rpx -25rpx 0rpx;">
|
<view slot="content" style="margin: -20rpx -25rpx 0rpx;">
|
||||||
<view class="work-order-schedule">
|
<view class="work-order-schedule">
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="icon icon-after">1</view>
|
<view class="icon icon-after">1</view>
|
||||||
|
@ -17,46 +17,44 @@
|
||||||
<view class="text">结算审核</view>
|
<view class="text">结算审核</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="work-order-from">
|
<view class="work-order-from">
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">工单编号:</view>
|
<view class="title">工单编号:</view>
|
||||||
<input type="text" class="input" disabled value="GD20211203-001" />
|
<input type="text" class="input" disabled :value="targetObj.workOrderNo" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">项目编号:</view>
|
<view class="title">项目编号:</view>
|
||||||
<input type="text" class="input" disabled value="XM20211203-001" />
|
<input type="text" class="input" disabled :value="targetObj.projectNo" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">项目名称:</view>
|
<view class="title">项目名称:</view>
|
||||||
<input type="text" class="input input-black" disabled value="湖南省林业科学院11楼会议室P2.5" />
|
<input type="text" class="input input-black" disabled :value="targetObj.projectName" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">产品类型:</view>
|
<view class="title">产品类型:</view>
|
||||||
<input type="text" class="input input-black" disabled value="Q2.5-E" />
|
<input type="text" class="input input-black" disabled :value="targetObj.productType" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">安装位置:</view>
|
<view class="title">安装位置:</view>
|
||||||
<input type="text" class="input input-black" disabled value="详细地址+某某栋11楼会议室" />
|
<input type="text" class="input input-black" disabled :value="targetObj.installLocation" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">故障类型:</view>
|
<view class="title">故障类型:</view>
|
||||||
<input type="text" class="input input-black" disabled value="供电不足" />
|
<input type="text" class="input input-black" disabled :value="targetObj.faultType" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">服务方式:</view>
|
<view class="title">服务方式:</view>
|
||||||
<input type="text" class="input input-black" disabled value="上门服务" />
|
<input type="text" class="input input-black" disabled :value="targetObj.serviceMode" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">故障说明:</view>
|
<view class="title">故障说明:</view>
|
||||||
<textarea auto-height disabled class="input input-black" value="确实供电不足" />
|
<textarea auto-height disabled class="input input-black" :value="targetObj.faultExplain" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">故障图片:</view>
|
<view class="title">故障图片:</view>
|
||||||
<view class="input add-display">
|
<view class="input add-display">
|
||||||
<view class="">
|
<view class="">
|
||||||
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image>
|
<image class="img" v-for="(item,index) in targetObj.faultImgList" :src="item" mode="aspectFill" lazy-load></image>
|
||||||
<image class="img" src="../../static/del/img001.png" mode="aspectFill" lazy-load></image>
|
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="add-img">
|
<!-- <view class="add-img">
|
||||||
<image class="icon" src="../../static/iocn/jia.png" mode="" lazy-load></image>
|
<image class="icon" src="../../static/iocn/jia.png" mode="" lazy-load></image>
|
||||||
|
@ -65,27 +63,28 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">开始时间:</view>
|
<view class="title">开始时间:</view>
|
||||||
<input type="text" disabled class="input" placeholder="请选择开始时间" />
|
<input type="text" disabled class="input" :value="targetObj.startTime" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">结束时间:</view>
|
<view class="title">结束时间:</view>
|
||||||
<input type="text" class="input input-black" placeholder="请选择结束时间" />
|
<input type="text" @tap="openDatetimePicker" disabled class="input input-black" :value="targetObj.endTime" placeholder="请选择结束时间" />
|
||||||
|
<yy-mm-dd-hh-ss ref="myPicker" @submit="handleSubmit" :start-year="2022" :end-year="2122"></yy-mm-dd-hh-ss>
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">维保用时:</view>
|
<view class="title">维保用时:</view>
|
||||||
<input type="text" disabled class="input " placeholder="(例:5小时51分钟)" />
|
<input type="text" disabled class="input" :value="targetObj.maintenanceTime" placeholder="请选择结束时间,进行结算" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">维保费用:</view>
|
<view class="title">维保费用:</view>
|
||||||
<input type="digit" disabled class="input input-black" placeholder="" />
|
<input type="text" disabled class="input input-black" placeholder="" v-model="maintenanceFee" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">等待时长:</view>
|
<view class="title">等待时长:</view>
|
||||||
<input type="text" disabled class="input" placeholder="请填写等待时长" />
|
<input type="text" disabled class="input" :value="targetObj.waitingTime" placeholder="请选择结束时间,进行结算" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">主维保人:</view>
|
<view class="title">主维保人:</view>
|
||||||
<input type="text" disabled class="input input-black" value="陈志远" />
|
<input type="text" disabled class="input input-black" :value="targetObj.maintainer" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">更换配件:</view>
|
<view class="title">更换配件:</view>
|
||||||
|
@ -108,12 +107,12 @@
|
||||||
<view class="work-order-from">
|
<view class="work-order-from">
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">工作描述:</view>
|
<view class="title">工作描述:</view>
|
||||||
<textarea maxlength="-1" class="input input-black line-h36" placeholder="请填写工作描述" style="height: 110rpx;" />
|
<textarea maxlength="-1" v-model="targetObj.workDescribe" class="input input-black line-h36" placeholder="请填写工作描述" style="height: 110rpx;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">维保图片:</view>
|
<view class="title">维保图片:</view>
|
||||||
<view class="input add-display">
|
<view class="input add-display">
|
||||||
<view class="posir" v-if="maintenanceImgList.length!=0" v-for="(item,index) in maintenanceImgList" :key="index">
|
<view class="posir" v-if="targetObj.maintenanceImgList.length!=0" v-for="(item,index) in targetObj.maintenanceImgList" :key="index">
|
||||||
<image class="img" :src="item" mode="aspectFill" lazy-load></image>
|
<image class="img" :src="item" mode="aspectFill" lazy-load></image>
|
||||||
<i @tap="delImg(index)" class="icon icon-del-white posia" style="font-size: 24rpx;top: 10rpx;right: 20rpx;"></i>
|
<i @tap="delImg(index)" class="icon icon-del-white posia" style="font-size: 24rpx;top: 10rpx;right: 20rpx;"></i>
|
||||||
</view>
|
</view>
|
||||||
|
@ -124,11 +123,11 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">故障原因:</view>
|
<view class="title">故障原因:</view>
|
||||||
<textarea maxlength="-1" class="input input-black line-h36" placeholder="请填写故障原因" style="height: 110rpx;" />
|
<textarea maxlength="-1" v-model="targetObj.faultReason" class="input input-black line-h36" placeholder="请填写故障原因" style="height: 110rpx;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="li">
|
<view class="li">
|
||||||
<view class="title">维保人员:</view>
|
<view class="title">维保人员:</view>
|
||||||
<input type="text" class="input input-black" placeholder="请填写维保人员" />
|
<input type="text" v-model="targetObj.maintenancePersonnel" class="input input-black" placeholder="请填写维保人员" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cost-breakdown">
|
<view class="cost-breakdown">
|
||||||
|
@ -146,12 +145,12 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="text" v-for="(item,index) in accessoriesData">
|
<view class="text" v-for="(item,index) in accessoriesData">
|
||||||
<view class="li">{{item.id}}</view>
|
<view class="li">{{item.id}}</view>
|
||||||
<view class="li">{{item.title}}</view>
|
<view class="li">{{item.name}}</view>
|
||||||
<view class="li">{{item.num}}</view>
|
<view class="li">{{item.num}}</view>
|
||||||
<view class="li">{{item.price}}元</view>
|
<view class="li">{{item.sum}}元</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button class="submit-button" @click="goWorkorderTwo()" type="default">下一步</button>
|
<button class="submit-button" @click="goWorkorderTwo" type="default">下一步</button>
|
||||||
</view>
|
</view>
|
||||||
</container-subgroup-two>
|
</container-subgroup-two>
|
||||||
</view>
|
</view>
|
||||||
|
@ -161,40 +160,39 @@
|
||||||
import statusNav from '../../components/status-nav.vue';
|
import statusNav from '../../components/status-nav.vue';
|
||||||
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
|
import footTabOne from "../../components/foot-tabs/foot-tab-one.vue"
|
||||||
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
import containerSubgroupTwo from '@/components/containers/container-subgroup-two.vue';
|
||||||
|
import yyMmDdHhSs from '@/components/dates/yy-mm-dd-hh-ss.vue';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
footTabOne,
|
footTabOne,
|
||||||
statusNav,
|
statusNav,
|
||||||
containerSubgroupTwo
|
containerSubgroupTwo,
|
||||||
|
yyMmDdHhSs
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isrideo: true,
|
isrideo: true,
|
||||||
accessoriesData: [{
|
accessoriesData: [],
|
||||||
id: 1,
|
targetObj:''
|
||||||
title: "全彩LED显示屏接收卡",
|
|
||||||
num: 1,
|
|
||||||
price: "430"
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: "上门服务费",
|
|
||||||
num: 1,
|
|
||||||
price: "4310"
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
title: "全彩LED显示屏接收卡",
|
|
||||||
num: 1,
|
|
||||||
price: "430"
|
|
||||||
|
|
||||||
},
|
|
||||||
],
|
|
||||||
maintenanceImgList:[]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
maintenanceFee(){
|
||||||
|
let totalPrice = '0.00';
|
||||||
|
if(this.accessoriesData.length) {
|
||||||
|
this.accessoriesData.forEach(item=>{
|
||||||
|
totalPrice = this.$toolAll.tools.operationEv(totalPrice*1, item.sum*1, "+", 2);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return `¥${totalPrice}元`;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// uni.removeStorageSync('partsList')
|
||||||
|
this.accessoriesData = uni.getStorageSync('partsList');
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.targetObj = uni.getStorageSync('targetObj');
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 维保图片选择
|
// 维保图片选择
|
||||||
chooseImg(){
|
chooseImg(){
|
||||||
|
@ -204,29 +202,46 @@
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
let imgsrc = res.tempFilePaths;
|
let imgsrc = res.tempFilePaths;
|
||||||
imgsrc.forEach(item=>{
|
imgsrc.forEach(item=>{
|
||||||
this.maintenanceImgList.push(item);
|
this.targetObj.maintenanceImgList.push(item);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 删除维保图片
|
// 删除维保图片
|
||||||
delImg(index) {
|
delImg(index) {
|
||||||
this.maintenanceImgList.splice(index,1);
|
this.targetObj.maintenanceImgList.splice(index,1);
|
||||||
},
|
},
|
||||||
|
// 更换配件切换事件
|
||||||
isrideoFun(is) {
|
isrideoFun(is) {
|
||||||
this.isrideo = is
|
this.isrideo = is;
|
||||||
|
this.targetObj.ifParts = this.isrideo;
|
||||||
},
|
},
|
||||||
goWorkorderTwo(){
|
goWorkorderTwo(){
|
||||||
uni.navigateTo({
|
console.log(this.targetObj);
|
||||||
url: "/pages/workOrder/workOrderThree"
|
// uni.navigateTo({
|
||||||
})
|
// url: "/pages/workOrder/workOrderThree"
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
addMountingsList() {
|
addMountingsList() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/mountingsList/mountingsList"
|
url: "/pages/mountingsList/mountingsList"
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
},
|
||||||
|
// 打开picker
|
||||||
|
openDatetimePicker() {
|
||||||
|
this.$refs.myPicker.show();
|
||||||
|
},
|
||||||
|
// 关闭picker
|
||||||
|
closeDatetimePicker() {
|
||||||
|
this.$refs.myPicker.hide();
|
||||||
|
},
|
||||||
|
handleSubmit(e) {
|
||||||
|
// {year: "2019", month: "07", day: "17", hour: "15", minute: "21"}
|
||||||
|
this.targetObj.endTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`;
|
||||||
|
this.targetObj.maintenanceTime = this.$toolAll.tools.returnTimeFormat(this.targetObj.startTime,this.targetObj.endTime);
|
||||||
|
this.targetObj.waitingTime = this.$toolAll.tools.returnTimeFormat(this.targetObj.declarationTime,this.targetObj.endTime);
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue