Browse Source

检修工单点检工单,保养工单,领用申请,领用申请审批,备件维修工单

master
zhang_li 9 months ago
parent
commit
1fbc85cdb1
  1. 7
      src/pages.json
  2. 2
      src/pages/deviceReport/addForm.vue
  3. 49
      src/pages/deviceReport/index.vue
  4. 56
      src/pages/deviceReport/myDeviceReport.vue
  5. 16
      src/pages/index.vue
  6. 12
      src/pages/mine/index.vue
  7. 18
      src/pages/mold/index.vue
  8. 14
      src/pages/overhaulOrder/addForm.vue
  9. 14
      src/pages/overhaulOrder/addServiceRecord.vue
  10. 50
      src/pages/overhaulOrder/detail.vue
  11. 2
      src/pages/overhaulOrder/index.vue
  12. 8
      src/pages/repairOrder/addForm.vue
  13. 2
      src/pages/repairOrder/addServiceRecord.vue
  14. 7
      src/pages/repairOrder/detail.vue
  15. 7
      src/pages/repairOrder/myOrder.vue
  16. 8
      src/pages/repairOrder/transfer.vue
  17. 67
      src/pages/spareParts/index.vue
  18. 4
      src/pages/sparePartsApplication/addForm.vue
  19. 7
      src/pages/sparePartsApplication/detail.vue
  20. 16
      src/pages/sparePartsApplication/mySparePartsApplication.vue
  21. 171
      src/pages/sparePartsApplicationApprove/mySparePartsApplicationApprove.vue
  22. 14
      src/pages/sparePartsServiceWorkOrderList/addForm.vue
  23. 10
      src/pages/spotCheckOrder/addForm.vue
  24. 30
      src/pages/upkeepOrder/addServiceRecord.vue
  25. 83
      src/pages/upkeepOrder/detail.vue
  26. 3
      src/pages/upkeepOrder/myOrder.vue
  27. 2
      src/permission.js
  28. BIN
      src/static/images/banner/icon7.png
  29. BIN
      src/static/images/icon6.png
  30. BIN
      src/static/images/icon7.png

7
src/pages.json

@ -217,6 +217,13 @@
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
},{
"path": "pages/sparePartsApplicationApprove/mySparePartsApplicationApprove",
"style": {
"navigationBarTitleText": "我的领用审批",
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
},{ },{
"path": "pages/mine/agreement", "path": "pages/mine/agreement",
"style": { "style": {

2
src/pages/deviceReport/addForm.vue

@ -60,7 +60,7 @@
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>

49
src/pages/deviceReport/index.vue

@ -33,14 +33,15 @@
<view class="dec"> <view class="dec">
所属厂区:<span>{{item.factoryAreaName}}</span> 所属厂区:<span>{{item.factoryAreaName}}</span>
</view> </view>
<view class="images"> <view class="images">
<image :src="cur" mode="" v-for="(cur,key) in item.filePathList" :key='key' @click="previewImage(key,item.filePathList)"></image> <image :src="cur" mode="" v-for="(cur,key) in item.filePathList" :key='key'
@click="previewImage(key,item.filePathList)"></image>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="status"> <view class="status">
<u-tag :text="item.result" bg-color='rgba(255,255,255,0)' color='#2ba471' <u-tag :text="item.result" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471'
border-color='#2ba471' type="primary" shape='circle' /> type="primary" shape='circle' />
</view> </view>
<view class="button"> <view class="button">
<u-button shape="circle" type="primary" size="mini" style="min-width: 120rpx;" <u-button shape="circle" type="primary" size="mini" style="min-width: 120rpx;"
@ -111,31 +112,31 @@
}) })
}, },
previewImage(current,array){ previewImage(current, array) {
uni.previewImage({ uni.previewImage({
urls: array, urls: array,
current:current, current: current,
longPressActions: { longPressActions: {
itemList: ['发送给朋友', '保存图片', '收藏'], itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) { success: function(data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
}, },
fail: function(err) { fail: function(err) {
console.log(err.errMsg); console.log(err.errMsg);
} }
} }
}); });
} }
}, },
onLoad(option) { onLoad(option) {
if (option.type) this.params.type = option.type; if (option.type) this.params.type = option.type;
if(this.type == 'DEVICE'){ if (this.type == 'DEVICE') {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title:'设备报修' title: '设备报修'
}) })
}else{ } else {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title:'模具报修' title: '模具报修'
}) })
} }
}, },
@ -264,10 +265,12 @@
} }
} }
} }
.images{
.images {
display: flex; display: flex;
width: 100%; width: 100%;
image{
image {
width: 30%; width: 30%;
margin-right: 20rpx; margin-right: 20rpx;
height: 200rpx; height: 200rpx;

56
src/pages/deviceReport/myDeviceReport.vue

@ -26,21 +26,25 @@
<view class="dec"> <view class="dec">
所属厂区:<span>{{item.factoryAreaName}}</span> 所属厂区:<span>{{item.factoryAreaName}}</span>
</view> </view>
<view class="images">
<image :src="cur" mode="" v-for="(cur,key) in item.filePathList" :key='key'
@click="previewImage(key,item.filePathList)"></image>
</view>
<view class="bottom"> <view class="bottom">
<view class="status"> <view class="status">
<u-tag :text="item.result" bg-color='rgba(255,255,255,0)' color='#2ba471' <u-tag :text="item.result" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471'
border-color='#2ba471' type="primary" shape='circle' /> type="primary" shape='circle' />
</view> </view>
<!-- <view class="button"> <!-- <view class="button">
<u-button shape="circle" type="primary" size="mini" style="min-width: 120rpx;" <u-button shape="circle" type="primary" size="mini" style="min-width: 120rpx;"
v-if="item.isCancel == 0" @click="cancle(item)">撤销</u-button> v-if="item.isCancel == 0" @click="cancle(item)">撤销</u-button>
</view> --> </view> -->
</view> </view>
</view> </view>
<view style="height: 94rpx;padding-top: 30rpx;"> <view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" /> <u-loadmore :status="status" v-if="status != 'loadmore'" />
</view> </view>
</view> </view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
@ -54,7 +58,7 @@
params: { params: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
flag:1 flag: 1
}, },
status: 'loadmore', // status: 'loadmore', //
list: [], list: [],
@ -84,8 +88,8 @@
}) })
}, },
// //
cancle(item){ cancle(item) {
this.$modal.confirm('确定撤销报修吗?').then(()=>{ this.$modal.confirm('确定撤销报修吗?').then(() => {
deviceApi.rejected(item.id).then((res) => { deviceApi.rejected(item.id).then((res) => {
this.params.pageNo = 1 this.params.pageNo = 1
this.list = [] this.list = []
@ -93,7 +97,22 @@
this.getList() this.getList()
}) })
}) })
},
previewImage(current, array) {
uni.previewImage({
urls: array,
current: current,
longPressActions: {
itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
},
fail: function(err) {
console.log(err.errMsg);
}
}
});
} }
}, },
onShow() { onShow() {
@ -155,7 +174,7 @@
border-top: 1px solid #E4E4E4; border-top: 1px solid #E4E4E4;
padding: 20rpx 0px; padding: 20rpx 0px;
height: 90rpx; height: 90rpx;
} }
} }
} }
@ -211,7 +230,8 @@
.status { .status {
flex: 1; flex: 1;
} }
.button{
.button {
position: absolute; position: absolute;
right: 0rpx; right: 0rpx;
} }
@ -219,4 +239,16 @@
} }
} }
} }
.images {
display: flex;
width: 100%;
image {
width: 30%;
margin-right: 20rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
</style> </style>

16
src/pages/index.vue

@ -102,7 +102,7 @@
</view> </view>
</u-col> </u-col>
<u-col span="3" v-if="$store.state.user.dept.classType == 'MOLD' "> <u-col span="3" v-if="$store.state.user.dept.classType == 'MOLD' ">
<view class="icon-item" @click="open('/pages/maintenWorkOrderList/index')"> <view class="icon-item" @click="open('/pages/upkeepOrder/index?type=MOLD')">
<image src="../static/images/icon1.svg" mode=""></image> <image src="../static/images/icon1.svg" mode=""></image>
<view>保养工单</view> <view>保养工单</view>
</view> </view>
@ -111,16 +111,16 @@
</view> </view>
<view class="title">备件管理</view> <view class="title">备件管理</view>
<u-row gutter="16"> <u-row gutter="16">
<u-col span="3" v-if=" $store.state.user.role == 'all_approve' || $store.state.user.role == 'normal_approve'"> <u-col span="3">
<view class="icon-item" @click="open('/pages/sparePartsApplicationApprove/index')"> <view class="icon-item" @click="open('/pages/sparePartsApplication/index?from=2')">
<image src="../static/images/icon6.png" mode=""></image> <image src="../static/images/icon6.png" mode=""></image>
<view>领用申请审批 </view> <view>领用申请</view>
</view> </view>
</u-col> </u-col>
<u-col span="3" v-else> <u-col span="3" v-if=" $store.state.user.role == 'all_approve' || $store.state.user.role == 'normal_approve'">
<view class="icon-item" @click="open('/pages/sparePartsApplication/index')"> <view class="icon-item" @click="open('/pages/sparePartsApplicationApprove/index?from=3')">
<image src="../static/images/icon6.png" mode=""></image> <image src="../static/images/icon7.png" mode=""></image>
<view>领用申请</view> <view>领用申请审批 </view>
</view> </view>
</u-col> </u-col>
<u-col span="3"> <u-col span="3">

12
src/pages/mine/index.vue

@ -45,14 +45,14 @@
<image src="../../static/images/banner/icon4.png" mode="widthFix"></image> <image src="../../static/images/banner/icon4.png" mode="widthFix"></image>
<text class="text">巡检点检</text> <text class="text">巡检点检</text>
</view> </view>
<view class="action-item action-item1" @click="handleSparePartsApplicationApprove" v-if=" $store.state.user.role == 'all_approve' || $store.state.user.role == 'normal_approve'"> <view class="action-item action-item1" @click="handleSparePartsApplication">
<image src="../../static/images/banner/icon5.png" mode="widthFix"></image>
<text class="text">领用审批</text>
</view>
<view class="action-item action-item1" @click="handleSparePartsApplication" v-else>
<image src="../../static/images/banner/icon5.png" mode="widthFix"></image> <image src="../../static/images/banner/icon5.png" mode="widthFix"></image>
<text class="text">我的领用</text> <text class="text">我的领用</text>
</view> </view>
<view class="action-item action-item1" @click="handleSparePartsApplicationApprove" v-if=" $store.state.user.role == 'all_approve' || $store.state.user.role == 'normal_approve'">
<image src="../../static/images/banner/icon7.png" mode="widthFix"></image>
<text class="text">领用审批</text>
</view>
<view class="action-item action-item1" @click="handleSparePartsService"> <view class="action-item action-item1" @click="handleSparePartsService">
<image src="../../static/images/banner/icon6.png" mode="widthFix"></image> <image src="../../static/images/banner/icon6.png" mode="widthFix"></image>
<text class="text">备件维修</text> <text class="text">备件维修</text>
@ -145,7 +145,7 @@
this.$tab.navigateTo('/pages/sparePartsApplication/mySparePartsApplication?flag=1') this.$tab.navigateTo('/pages/sparePartsApplication/mySparePartsApplication?flag=1')
}, },
handleSparePartsApplicationApprove(){ handleSparePartsApplicationApprove(){
this.$tab.navigateTo('/pages/sparePartsApplication/mySparePartsApplication?flag=2') this.$tab.navigateTo('/pages/sparePartsApplicationApprove/mySparePartsApplicationApprove?flag=1')
}, },
handleSparePartsService(){ handleSparePartsService(){
this.$tab.navigateTo('/pages/sparePartsServiceWorkOrderList/mySparePartsService') this.$tab.navigateTo('/pages/sparePartsServiceWorkOrderList/mySparePartsService')

18
src/pages/mold/index.vue

@ -1,7 +1,12 @@
<template> <template>
<!-- 设备 --> <!-- 设备 -->
<view class="work-container"> <view class="work-container">
<view class="cartNull" v-show="!token">
还没有登录<navigator open-type="navigate" url="/pages/login">先登录</navigator>
</view>
<view class="" v-show='token'>
<Search :searchData='searchData' @search='search' @screen='screen' :isShowScreen='false'/> <Search :searchData='searchData' @search='search' @screen='screen' :isShowScreen='false'/>
<view class="list"> <view class="list">
<view class="item" v-for="(item,index) in list" :key='index'> <view class="item" v-for="(item,index) in list" :key='index'>
<u-image :src="item.images" width='160' <u-image :src="item.images" width='160'
@ -29,6 +34,7 @@
<view style="height: 94rpx;padding-top: 30rpx;"> <view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" /> <u-loadmore :status="status" v-if="status != 'loadmore'" />
</view> </view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
</template> </template>
@ -51,6 +57,7 @@
}, },
status: 'loadmore', // status: 'loadmore', //
list: [], list: [],
token:''
} }
}, },
methods: { methods: {
@ -85,6 +92,7 @@
}, },
onShow() { onShow() {
if (getAccessToken()) { if (getAccessToken()) {
this.token = getAccessToken()
this.params.pageNo = 1 this.params.pageNo = 1
this.list = [] this.list = []
this.status = 'loadmore' this.status = 'loadmore'
@ -134,4 +142,14 @@
.image-error { .image-error {
text-align: center; text-align: center;
} }
.cartNull {
text-align: center;
padding: 500rpx 40rpx 0;
font-size: 28rpx;
color: #888;
}
.cartNull navigator {
color: #2979ff;
}
</style> </style>

14
src/pages/overhaulOrder/addForm.vue

@ -8,7 +8,7 @@
<u-form-item label="维修工单" prop="maintenanceNumber" :class="form.id?'disabled':''"> <u-form-item label="维修工单" prop="maintenanceNumber" :class="form.id?'disabled':''">
<view class="select" @click="openSingleColumn('maintenanceNumber',form.maintenanceNumber,repairOrderList)"> <view class="select" @click="openSingleColumn('maintenanceNumber',form.maintenanceNumber,repairOrderList)">
<view class="input" v-if='form.maintenanceNumber'> <view class="input" v-if='form.maintenanceNumber'>
{{selectFormat(form.maintenanceNumber,repairOrderList)}} {{form.maintenanceNumber}}
</view> </view>
<view class="placeholder" v-else> <view class="placeholder" v-else>
{{`请选择维修工单`}} {{`请选择维修工单`}}
@ -18,8 +18,8 @@
</u-form-item> </u-form-item>
<u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="factoryAreaName" required :class="isDisabled?'disabled':''"> <u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="factoryAreaName" required :class="isDisabled?'disabled':''">
<view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)"> <view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)">
<view class="input" v-if='form.deviceNumber'> <view class="input" v-if='form.deviceName'>
{{selectFormat(form.deviceNumber,deviceList)}} {{form.deviceName}}
</view> </view>
<view class="placeholder" v-else> <view class="placeholder" v-else>
{{`请输入${type=='DEVICE'?'设备' : '模具'}名称`}} {{`请输入${type=='DEVICE'?'设备' : '模具'}名称`}}
@ -50,7 +50,7 @@
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>
@ -71,6 +71,7 @@
id: '', id: '',
describes: "", describes: "",
maintenanceNumber: '', maintenanceNumber: '',
factoryAreaNumber:'',
faultType: '' faultType: ''
}, },
repairOrderList: [], // repairOrderList: [], //
@ -104,6 +105,8 @@
describes: this.form.describes, describes: this.form.describes,
maintenanceNumber: this.form.maintenanceNumber, maintenanceNumber: this.form.maintenanceNumber,
deviceNumber: this.form.deviceNumber, deviceNumber: this.form.deviceNumber,
factoryAreaNumber: this.form.factoryAreaNumber,
type:this.type,
faultType: this.form.faultType, faultType: this.form.faultType,
} }
if (this.form.id) { if (this.form.id) {
@ -191,6 +194,7 @@
this.choosesingleColumnItem = this.singleColumnList.filter(item => item.number == e[0].value) this.choosesingleColumnItem = this.singleColumnList.filter(item => item.number == e[0].value)
this.form.deviceName = this.choosesingleColumnItem[0].name this.form.deviceName = this.choosesingleColumnItem[0].name
this.form.deviceNumber = this.choosesingleColumnItem[0].deviceNumber this.form.deviceNumber = this.choosesingleColumnItem[0].deviceNumber
this.form.deviceName = this.choosesingleColumnItem[0].name
this.form.factoryAreaName = this.choosesingleColumnItem[0].factoryAreaName this.form.factoryAreaName = this.choosesingleColumnItem[0].factoryAreaName
this.form.factoryAreaNumber = this.choosesingleColumnItem[0].factoryAreaNumber this.form.factoryAreaNumber = this.choosesingleColumnItem[0].factoryAreaNumber
this.isDisabled = true this.isDisabled = true
@ -255,7 +259,7 @@
factoryAreaName: data.factoryAreaName, factoryAreaName: data.factoryAreaName,
faultType: data.faultType, faultType: data.faultType,
} }
this.isDisabled = this.form.maintenanceNumber ? true:false this.isDisabled = this.form.maintenanceNumber ||this.form.id ? true:false
}; };
await this.getRepairOrderList() await this.getRepairOrderList()
this.getDeviceList() this.getDeviceList()

14
src/pages/overhaulOrder/addServiceRecord.vue

@ -36,7 +36,7 @@
<u-icon name="arrow-right" color="#aaaaaa" size="28" v-if="!form.id"></u-icon> <u-icon name="arrow-right" color="#aaaaaa" size="28" v-if="!form.id"></u-icon>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="完成时间" prop="completionTime" required v-if='form.status == 0'> <u-form-item label="完成时间" prop="completionTime" required v-if='form.status === 0||form.status === "0"'>
<view class="select" @click="openDatetime('completionTime',formatDate,params,formatValue)"> <view class="select" @click="openDatetime('completionTime',formatDate,params,formatValue)">
<view class="input" v-if='formatDate'> <view class="input" v-if='formatDate'>
{{formatDate}} {{formatDate}}
@ -51,7 +51,7 @@
<u-input v-model="form.engineer" placeholder="请输入工程师确认" maxlength="50"/> <u-input v-model="form.engineer" placeholder="请输入工程师确认" maxlength="50"/>
</u-form-item> </u-form-item>
<u-form-item label="未完成原因" prop="uncompleted" required v-if='form.status == 1'> <u-form-item label="未完成原因" prop="uncompleted" required v-if='form.status === 1||form.status === "1"'>
<u-input type='textarea' v-model="form.uncompleted" placeholder="请输入未完成原因" maxlength="200"/> <u-input type='textarea' v-model="form.uncompleted" placeholder="请输入未完成原因" maxlength="200"/>
</u-form-item> </u-form-item>
</u-form> </u-form>
@ -133,7 +133,7 @@
</view> </view>
</u-popup> </u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
<u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime'></u-picker> <u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime'></u-picker>
</view> </view>
</template> </template>
@ -205,7 +205,7 @@
this.$modal.showToast('请输入检修描述') this.$modal.showToast('请输入检修描述')
return; return;
} }
if (!this.form.peoples) { if (!this.form.peoples || this.form.peoples==0) {
this.$modal.showToast('请输入预估人数') this.$modal.showToast('请输入预估人数')
return; return;
} }
@ -213,7 +213,7 @@
this.$modal.showToast('预估人数不得超出100') this.$modal.showToast('预估人数不得超出100')
return; return;
} }
if (!this.form.estimatedMinutes) { if (!this.form.estimatedMinutes || this.form.estimatedMinutes==0) {
this.$modal.showToast(`请输入预估分钟`) this.$modal.showToast(`请输入预估分钟`)
return; return;
} }
@ -396,7 +396,7 @@
this.$modal.showToast('请选择备件') this.$modal.showToast('请选择备件')
return; return;
} }
if (!this.form1.qty) { if (!this.form1.qty||this.form1.qty==0) {
this.$modal.showToast('请输入数量') this.$modal.showToast('请输入数量')
return; return;
} }
@ -461,7 +461,7 @@
.data)).id) { .data)).id) {
this.form = JSON.parse(decodeURIComponent(option.data)) this.form = JSON.parse(decodeURIComponent(option.data))
this.$set(this.form,'itemNumbers',this.form.items) this.$set(this.form,'itemNumbers',this.form.items)
this.formatDate =this.form.completionTime ? this.$time.formatDate(this.form.completionTime):'' this.formatDate =this.form.completionTime ? this.$time.formatDate(this.form.completionTime*1000):''
}; };
this.jxDetailsStatus = await dictApi.getDict('jx_details_status') this.jxDetailsStatus = await dictApi.getDict('jx_details_status')

50
src/pages/overhaulOrder/detail.vue

@ -18,9 +18,13 @@
<view>故障类型</view> <view>故障类型</view>
<view>{{data.faultTypeName}}</view> <view>{{data.faultTypeName}}</view>
</view> </view>
<view class="dec-item" v-if="data.createTime">
<view>创建时间</view>
<view>{{$time.formatDate(data.createTime)}}</view>
</view>
<view class="dec-item"> <view class="dec-item">
<view>维修工</view> <view>检修人员</view>
<view>{{data.maintenance}}</view> <view>{{data.maintenanceName}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -38,19 +42,19 @@
<view class="dec" v-if="current == 0"> <view class="dec" v-if="current == 0">
<view class="dec-item"> <view class="dec-item">
<view>设备编号</view> <view>设备编号</view>
<view>{{deviceInfo.number}}</view> <view>{{data.number}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>设备名称</view> <view>设备名称</view>
<view>{{deviceInfo.name}}</view> <view>{{data.name}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>所属厂区</view> <view>所属厂区</view>
<view>{{deviceInfo.factoryAreaName}}</view> <view>{{data.factoryAreaName}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>设备类型</view> <view>设备类型</view>
<view>{{deviceInfo.typeName}}</view> <view>{{data.type == 'DEVICE'?'设备':data.type == 'TECH'?'工艺':'模具'}}</view>
</view> </view>
</view> </view>
<view class="list" v-if="current == 1"> <view class="list" v-if="current == 1">
@ -82,17 +86,17 @@
</view> </view>
<view class="dec2" > <view class="dec2" >
<view>完成情况</view> <view>完成情况</view>
<view>{{item.status==0?'完成':'未完成'}}</view> <view>{{item.status===0 || item.status === '0'? '完成':item.status===1 ||item.status === '1'?'未完成':''}}</view>
</view> </view>
<view class="dec2" v-if='item.status == 0'> <view class="dec2" v-if='item.status === 0 || item.status === "0"'>
<view>完成时间</view> <view>完成时间</view>
<view>{{$time.formatDate(item.completionTime)}}</view> <view>{{$time.formatDate(item.completionTime*1000)}}</view>
</view> </view>
<view class="dec2"> <view class="dec2">
<view>工程师确认</view> <view>工程师确认</view>
<view>{{item.engineer}}</view> <view>{{item.engineer}}</view>
</view> </view>
<view class="dec2" v-if="item.status == 1"> <view class="dec2" v-if="item.status === 1 || item.status === '1'">
<view>未完成原因</view> <view>未完成原因</view>
<view>{{item.uncompleted}}</view> <view>{{item.uncompleted}}</view>
</view> </view>
@ -131,7 +135,6 @@
</template> </template>
<script> <script>
import * as deviceApi from "@/api/device.js"
import * as moldApi from "@/api/mold.js" import * as moldApi from "@/api/mold.js"
import * as overhaulOrderApi from "@/api/overhaulOrder.js" import * as overhaulOrderApi from "@/api/overhaulOrder.js"
export default { export default {
@ -180,30 +183,6 @@
cancle() { cancle() {
this.isPopupShow = false this.isPopupShow = false
}, },
// /
getDetailsByNumber() {
const data = {
number: this.data.deviceNumber,
id: ''
}
if (this.type == 'DEVICE') {
deviceApi.getDeviceDetailsByNumber(data).then((res) => {
if (res.data) {
this.deviceInfo = res.data
} else {
this.$modal.showToast(`找不到该${this.type=='DEVICE'?'设备' : '模具'}`)
}
})
} else if (this.type == 'MOLD') {
moldApi.getMoldDetailsByNumber(data).then((res) => {
if (res.data) {
this.deviceInfo = res.data
} else {
this.$modal.showToast(`找不到该${this.type=='DEVICE'?'设备' : '模具'}`)
}
})
}
},
// APP // APP
orderClick() { orderClick() {
if(!this.serviceList || this.serviceList&&this.serviceList.length == 0){ if(!this.serviceList || this.serviceList&&this.serviceList.length == 0){
@ -275,7 +254,6 @@
}, },
onShow() { onShow() {
this.getDetailsByNumber()
this.getOverhaulOrderDetailList() this.getOverhaulOrderDetailList()
} }
} }

2
src/pages/overhaulOrder/index.vue

@ -25,7 +25,7 @@
<view class="dec"> <view class="dec">
检修单号:<span>{{item.number}}</span> 检修单号:<span>{{item.number}}</span>
</view> </view>
<view class="dec"> <view class="dec" v-if="item.maintenanceNumber">
维修工单:<span>{{item.maintenanceNumber}}</span> 维修工单:<span>{{item.maintenanceNumber}}</span>
</view> </view>
<view class="dec"> <view class="dec">

8
src/pages/repairOrder/addForm.vue

@ -258,7 +258,13 @@
await this.getDeviceList() await this.getDeviceList()
this.maintenanceShift = await dictApi.getDict('maintenance_shift') this.maintenanceShift = await dictApi.getDict('maintenance_shift')
this.appDeviceMoldType = await dictApi.getDict('app_device_mold_type') this.appDeviceMoldType = await dictApi.getDict('app_device_mold_type')
this.appDeviceMoldType = this.appDeviceMoldType.filter((item=>item.value!="MOLD"))
if(this.type=='MOLD'){
this.appDeviceMoldType = this.appDeviceMoldType.filter((item=>item.value=="MOLD"))
}else{
this.appDeviceMoldType = this.appDeviceMoldType.filter((item=>item.value!="MOLD"))
}
this.faultType = await dictApi.getDict('fault_type') this.faultType = await dictApi.getDict('fault_type')
} }
} }

2
src/pages/repairOrder/addServiceRecord.vue

@ -100,7 +100,7 @@
</view> </view>
</u-popup> </u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>

7
src/pages/repairOrder/detail.vue

@ -83,7 +83,7 @@
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>设备类型</view> <view>设备类型</view>
<view>{{data.type == 'DEVICE'?'设备':data1.type == 'TECH'?'工艺':'模具'}}</view> <view>{{data.type == 'DEVICE'?'设备':data.type == 'TECH'?'工艺':'模具'}}</view>
</view> </view>
</view> </view>
<view class="dec" v-if="changeItem.value == 2"> <view class="dec" v-if="changeItem.value == 2">
@ -101,7 +101,7 @@
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>报修时间</view> <view>报修时间</view>
<view>{{data1.describes}}</view> <view>{{$time.formatDate(data.createTime)}}</view>
</view> </view>
<!-- <view>图片</view> --> <!-- <view>图片</view> -->
<view class="images"> <view class="images">
@ -303,7 +303,7 @@
status: this.data.status, status: this.data.status,
id: this.data.id, id: this.data.id,
result: type == 2 ? this.result : '', result: type == 2 ? this.result : '',
requestNumber: '' requestNumber: this.data.requestNumber,
} }
let tips = this.data.status == 'PENDING' ? '是否接单?' : this.data.status == 'PECEIVED' ? '是否完成?' : this.data let tips = this.data.status == 'PENDING' ? '是否接单?' : this.data.status == 'PECEIVED' ? '是否完成?' : this.data
.status == 'COMPLETED' ? '是否验证完结?' : '' .status == 'COMPLETED' ? '是否验证完结?' : ''
@ -329,6 +329,7 @@
}, },
// //
getDeviceRepairDetailsByNumber() { getDeviceRepairDetailsByNumber() {
repairOrderApi.getDeviceRepairDetailsByNumber({ repairOrderApi.getDeviceRepairDetailsByNumber({
type: this.data.type, type: this.data.type,
requestNumber: this.data.requestNumber requestNumber: this.data.requestNumber

7
src/pages/repairOrder/myOrder.vue

@ -3,9 +3,9 @@
<view class="container"> <view class="container">
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff' <u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff'
title="维修工单"> title="维修工单">
<template v-slot:right> <!-- <template v-slot:right>
<u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm"></u-icon> <u-icon name="plus" color="#fff" size="36" style="padding-right: 30rpx;" @click="addForm"></u-icon>
</template> </template> -->
</u-navbar> </u-navbar>
<!-- <Search @search='search' @screen='screen'/> --> <!-- <Search @search='search' @screen='screen'/> -->
<view class="list"> <view class="list">
@ -40,6 +40,9 @@
<view class="dec"> <view class="dec">
故障类型:<span>{{item.faultTypeName}}</span> 故障类型:<span>{{item.faultTypeName}}</span>
</view> </view>
<view class="dec">
完成时间:<span>{{$time.formatDate(item.completionTime)}}</span>
</view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="time" style="flex: 1;"> <view class="time" style="flex: 1;">

8
src/pages/repairOrder/transfer.vue

@ -13,13 +13,13 @@
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> <u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="deviceNumber" required> <u-form-item :label="`${type=='DEVICE'||type=='TECH'?'设备' : '模具'}名称`" prop="deviceNumber" required>
<view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)"> <view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)">
<view class="input" v-if='form.deviceNumber'> <view class="input" v-if='form.deviceNumber'>
{{selectFormat(form.deviceNumber,deviceList)}} {{selectFormat(form.deviceNumber,deviceList)}}
</view> </view>
<view class="placeholder" v-else> <view class="placeholder" v-else>
{{`请选择${type=='DEVICE'?'设备' : '模具'}名称`}} {{`请选择${type=='DEVICE'||type=='TECH'?'设备' : '模具'}名称`}}
</view> </view>
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon> <u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon>
</view> </view>
@ -60,7 +60,7 @@
</view> </view>
</u-popup> </u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>
@ -104,7 +104,7 @@
return; return;
} }
if (!this.form.deviceNumber) { if (!this.form.deviceNumber) {
this.$modal.showToast(`请选择${this.type=='DEVICE'?'设备' : '模具'}名称`) this.$modal.showToast(`请选择${this.type=='DEVICE'||this.type=='TECH'?'设备' : '模具'}名称`)
return; return;
} }
if (!this.form.receiverUserId) { if (!this.form.receiverUserId) {

67
src/pages/spareParts/index.vue

@ -1,33 +1,37 @@
<template> <template>
<!-- 设备 --> <!-- 设备 -->
<view class="work-container"> <view class="work-container">
<Search :searchData='searchData' @search='search' @screen='screen' :isShowScreen='false' /> <view class="cartNull" v-show="!token">
<view class="list"> 还没有登录<navigator open-type="navigate" url="/pages/login">先登录</navigator>
<view class="item" v-for="(item,index) in list" :key='index'> </view>
<u-image :src="item.images" width='160' <view class="" v-show='token'>
height="160"> <Search :searchData='searchData' @search='search' @screen='screen' :isShowScreen='false' />
<template v-slot:error> <view class="list">
<view class="image-error"> <view class="item" v-for="(item,index) in list" :key='index'>
<u-icon name="photo" color="#c7c7c7" size="38"></u-icon> <u-image :src="item.images" width='160' height="160">
<view style="font-size: 24rpx;">暂无图片</view> <template v-slot:error>
<view class="image-error">
<u-icon name="photo" color="#c7c7c7" size="38"></u-icon>
<view style="font-size: 24rpx;">暂无图片</view>
</view>
</template>
</u-image>
<view class="text">
<view class="title">
{{item.name}}
</view>
<view class="dec1">
备件编码{{item.number}}
</view>
<view class="dec2">
总库存{{item.qty}}
</view> </view>
</template>
</u-image>
<view class="text">
<view class="title">
{{item.name}}
</view>
<view class="dec1">
备件编码{{item.number}}
</view>
<view class="dec2">
总库存{{item.qty}}
</view> </view>
</view> </view>
</view> </view>
</view> <view style="height: 94rpx;padding-top: 30rpx;">
<view style="height: 94rpx;padding-top: 30rpx;"> <u-loadmore :status="status" v-if="status != 'loadmore'" />
<u-loadmore :status="status" v-if="status != 'loadmore'" /> </view>
</view> </view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
@ -35,7 +39,9 @@
<script> <script>
import * as sparePartsApi from "@/api/spareParts.js" import * as sparePartsApi from "@/api/spareParts.js"
import { getAccessToken } from '@/utils/auth' import {
getAccessToken
} from '@/utils/auth'
import Search from '../../components/search/index.vue' import Search from '../../components/search/index.vue'
export default { export default {
components: { components: {
@ -55,6 +61,7 @@
}, },
status: 'loadmore', // status: 'loadmore', //
list: [], list: [],
token: ''
} }
}, },
methods: { methods: {
@ -91,6 +98,7 @@
}, },
onShow() { onShow() {
if (getAccessToken()) { if (getAccessToken()) {
this.token = getAccessToken()
this.params.pageNo = 1 this.params.pageNo = 1
this.list = [] this.list = []
this.status = 'loadmore' this.status = 'loadmore'
@ -140,4 +148,15 @@
.image-error { .image-error {
text-align: center; text-align: center;
} }
.cartNull {
text-align: center;
padding: 500rpx 40rpx 0;
font-size: 28rpx;
color: #888;
}
.cartNull navigator {
color: #2979ff;
}
</style> </style>

4
src/pages/sparePartsApplication/addForm.vue

@ -117,7 +117,7 @@
</view> </view>
</u-popup> </u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>
@ -311,7 +311,7 @@
this.$modal.showToast('请选择设备') this.$modal.showToast('请选择设备')
return; return;
} }
if (!this.form1.qty) { if (!this.form1.qty || this.form1.qty==0) {
this.$modal.showToast('请输入数量') this.$modal.showToast('请输入数量')
return; return;
} }

7
src/pages/sparePartsApplication/detail.vue

@ -17,7 +17,7 @@
<view class="dec-item"> <view class="dec-item">
<view>申请备件</view> <view>申请备件</view>
</view> </view>
<view class="items" v-for="(cur,key) in data.subList" :key="key"> <view class="items" v-for="(cur,key) in data.subList" :key="key" style="margin-bottom: 20rpx;">
<view class="items-name"> <view class="items-name">
备件名称{{cur.itemName}} 备件名称{{cur.itemName}}
</view> </view>
@ -36,7 +36,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="footer" v-if="!from"> <view class="footer" v-if="from === 3">
<view class="btns"> <view class="btns">
<button class="reset" @click="reject">驳回</button> <button class="reset" @click="reject">驳回</button>
<button class="sure" @click="agree" :loading='loading' :disabled='loading'>通过</button> <button class="sure" @click="agree" :loading='loading' :disabled='loading'>通过</button>
@ -56,7 +56,7 @@
number: '', number: '',
data: '', data: '',
loading: false, loading: false,
from:'',// from:'',//1
} }
}, },
methods: { methods: {
@ -119,7 +119,6 @@
if (option.number) { if (option.number) {
this.number = option.number this.number = option.number
} }
console.log(this.data)
}, },
onShow() { onShow() {
this.getSparePartsApplicationDetail() this.getSparePartsApplicationDetail()

16
src/pages/sparePartsApplication/mySparePartsApplication.vue

@ -92,22 +92,6 @@
} }
}) })
}, },
//
cancle(item) {
this.$modal.confirm('确定撤回申请吗?').then(() => {
this.$modal.loading('加载中')
sparePartsApplicationApi.sparePartsApplicationCancle(item.id).then(async (res) => {
this.$modal.closeLoading()
this.params.pageNo = 1
this.list = []
this.status = 'loadmore'
await this.getList()
this.$modal.showToast('撤回成功')
})
})
}
}, },
onLoad(option) { onLoad(option) {
if (option.flag) this.params.flag = option.flag; if (option.flag) this.params.flag = option.flag;

171
src/pages/sparePartsApplicationApprove/mySparePartsApplicationApprove.vue

@ -0,0 +1,171 @@
<template>
<!-- 备件领用申请 -->
<view class="container">
<view class="list">
<view class="item" v-for="(item,index) in list" :key="index" @click="openDetail(item)">
<view class="title">
<view class="title-txt">
{{item.name}}
</view>
<view class="time">
{{`${$time.formatDate(item.createTime)}`}}
</view>
</view>
<view class="dec">
申请单号:<span>{{item.number}}</span>
</view>
<view class="dec">
:<span>{{item.applyName}}</span>
</view>
<view class="dec" v-if="item.status!=0">
审批时间:<span>{{`${$time.formatDate(item.approveTime)}`}}</span>
</view>
<view class="dec" v-if="item.status!=0">
:<span>{{item.approveName}}</span>
</view>
<view class="bottom">
<view class="status">
<u-tag text="待审批" v-if="item.status==0" bg-color='rgba(255,255,255,0)' color='#fe8463'
border-color='#fe8463' type="primary" shape='circle' />
<u-tag text="审批通过" v-else-if="item.status==1" bg-color='rgba(255,255,255,0)' color='#2EC7C9'
border-color='#2EC7C9' type="info" shape='circle' />
<u-tag text="审批驳回" v-else-if="item.status==2" bg-color='rgba(255,255,255,0)' color='#e01f54'
border-color='#e01f54' type="success" shape='circle' />
<u-tag text="出库中" v-else-if="item.status==3" bg-color='rgba(255,255,255,0)' color='#005eaa'
border-color='#005eaa ' type="error" shape='circle' />
<u-tag text="完成" v-else-if="item.status==4" bg-color='rgba(255,255,255,0)' color='#2ba471'
border-color='#2ba471' type="info" shape='circle' />
<u-tag text="撤单" v-else-if="item.status==5" bg-color='rgba(255,255,255,0)' color='#d7d7d7'
border-color='#d7d7d7 ' type="warning" shape='circle' />
</view>
</view>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" />
</view>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
</template>
<script>
import * as sparePartsApplicationApproveApi from "@/api/sparePartsApplicationApprove.js"
export default {
data() {
return {
params: {
pageNo: 1,
pageSize: 10,
flag:''
},
status: 'loadmore', //
list: [],
}
},
methods: {
//
screen() {
this.$tab.navigateTo(`/pages/sparePartsApplication/screen`)
},
addForm() {
this.$tab.navigateTo(`/pages/sparePartsApplication/addForm`)
},
openDetail(item){
this.$tab.navigateTo(`/pages/sparePartsApplication/detail?number=${item.number}&from=1`)
},
//
async getList() {
if (this.status == 'nomore') return;
this.status = 'loading';
this.$modal.loading('加载中')
await sparePartsApplicationApproveApi.sparePartsApplicationApprovePage(this.params).then((res) => {
this.$modal.closeLoading()
if (res.data.list.length > 0) {
this.list = this.list.concat(res.data.list);
this.params.pageNo++;
this.status = 'loadmore'
} else {
this.status = 'nomore'
}
})
},
},
onLoad(option) {
if (option.flag) this.params.flag = option.flag;
if(this.params.flag == 2){
uni.setNavigationBarTitle({
title:'领用申请审批'
})
}
},
onShow() {
this.params.pageNo = 1
this.list = []
this.status = 'loadmore'
this.getList()
},
onReachBottom() {
this.getList()
}
}
</script>
<style lang="scss" scoped>
.list {
background: #f5f5f5;
margin-top: 20rpx;
.item {
padding: 30rpx 30rpx 0px 30rpx;
margin-top: 20rpx;
background: white;
position: relative;
.title {
display: flex;
align-items: center;
padding-bottom: 20rpx;
.title-txt {
color: #409eff;
font-weight: bold;
font-size: 36rpx;
width: 0px;
flex: 1;
}
.time {
color: #919191;
}
}
.dec {
padding-bottom: 20rpx;
span {
color: #999999;
}
}
.last {
padding-bottom: 30rpx;
}
.bottom {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #E4E4E4;
padding: 20rpx 0px;
height: 90rpx;
}
}
}
</style>

14
src/pages/sparePartsServiceWorkOrderList/addForm.vue

@ -95,7 +95,7 @@
</view> </view>
</u-popup> </u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>
@ -223,13 +223,13 @@
chickRightButton(field) { chickRightButton(field) {
uni.scanCode({ uni.scanCode({
success: function(res) { success: function(res) {
this.form.locationNumber = res.result this.form1.locationNumber = res.result
this.getLocation() this.getLocation()
} }
}); });
}, },
getLocation(){ getLocation(){
locationApi.getLocation(this.form.locationNumber).then(res=>{ locationApi.getLocation(this.form1.locationNumber).then(res=>{
if(!res.data){ if(!res.data){
this.$modal.showToast('找不到该库位') this.$modal.showToast('找不到该库位')
return; return;
@ -296,7 +296,13 @@
return; return;
} }
} }
if (this.form.itemNumbers && this.form.itemNumbers.length > 0) {
let arr1 = this.form.itemNumbers.filter(item => item.locationNumber == this.form1.locationNumber)
if (arr1 && arr1.length > 0) {
this.$modal.showToast('该库位已经绑定备件')
return;
}
}
this.form.itemNumbers.push(this.form1) this.form.itemNumbers.push(this.form1)
this.isPopupShow = false this.isPopupShow = false
}, },

10
src/pages/spotCheckOrder/addForm.vue

@ -15,8 +15,8 @@
<u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="deviceName" required class="disabled"> <u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="deviceName" required class="disabled">
<u-input v-model="form.deviceName" :placeholder="`请输入${type=='DEVICE'?'设备' : '模具'}名称`" disabled /> <u-input v-model="form.deviceName" :placeholder="`请输入${type=='DEVICE'?'设备' : '模具'}名称`" disabled />
</u-form-item> </u-form-item>
<u-form-item label="维修人" prop="maintenances" required class="disabled"> <u-form-item label="维修人" prop="name" required class="disabled">
<u-input v-model="form.maintenances" placeholder="请输入维修人" disabled /> <u-input v-model=" $store.state.user.name" placeholder="请输入维修人" disabled />
</u-form-item> </u-form-item>
<u-form-item label="班次" prop="classes" required> <u-form-item label="班次" prop="classes" required>
<view class="select" @click="openSingleColumn('classes',form.classes,maintenanceShift)"> <view class="select" @click="openSingleColumn('classes',form.classes,maintenanceShift)">
@ -66,7 +66,7 @@
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view> <view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view> </view>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
</view> </view>
</template> </template>
@ -152,6 +152,10 @@
this.$modal.showToast('请选择班次') this.$modal.showToast('请选择班次')
return; return;
} }
if (this.subList.length==0) {
this.$modal.showToast('该设备无检修项目')
return;
}
const data = { const data = {
describes: this.form.describes, describes: this.form.describes,
deviceNumber: this.form.deviceNumber, deviceNumber: this.form.deviceNumber,

30
src/pages/upkeepOrder/addServiceRecord.vue

@ -8,10 +8,10 @@
<!-- <u-form-item label="保养部位" prop="equipmentParts" required> <!-- <u-form-item label="保养部位" prop="equipmentParts" required>
<u-input v-model="form.equipmentParts" placeholder="请输入保养部位" maxlength="50" disabled/> <u-input v-model="form.equipmentParts" placeholder="请输入保养部位" maxlength="50" disabled/>
</u-form-item> --> </u-form-item> -->
<u-form-item label="预估人数" prop="peoples" required> <u-form-item label="预估人数" prop="peoples" required class="disabled">
<u-input v-model="form.peoples" type="number" placeholder="请输入预估人数" maxlength="50"/> <u-input v-model="form.peoples" type="number" placeholder="请输入预估人数" maxlength="50"/>
</u-form-item> </u-form-item>
<u-form-item label="预估分钟" prop="estimatedMinutes" required> <u-form-item label="预估分钟" prop="estimatedMinutes" required class="disabled">
<u-input v-model="form.estimatedMinutes" type="number" placeholder="请输入预估分钟" maxlength="50"/> <u-input v-model="form.estimatedMinutes" type="number" placeholder="请输入预估分钟" maxlength="50"/>
</u-form-item> </u-form-item>
<u-form-item label="实际分钟" prop="actualMinutes" required> <u-form-item label="实际分钟" prop="actualMinutes" required>
@ -39,7 +39,7 @@
<u-icon name="arrow-right" color="#aaaaaa" size="28" v-if="!form.id"></u-icon> <u-icon name="arrow-right" color="#aaaaaa" size="28" v-if="!form.id"></u-icon>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="完成时间" prop="completionTime" required v-if='form.status == 0'> <u-form-item label="完成时间" prop="completionTime" required v-if='form.status === 0||form.status === "0"'>
<view class="select" @click="openDatetime('completionTime',formatDate,params,formatValue)"> <view class="select" @click="openDatetime('completionTime',formatDate,params,formatValue)">
<view class="input" v-if='formatDate'> <view class="input" v-if='formatDate'>
{{formatDate}} {{formatDate}}
@ -54,7 +54,7 @@
<u-input v-model="form.engineer" placeholder="请输入工程师确认" maxlength="50"/> <u-input v-model="form.engineer" placeholder="请输入工程师确认" maxlength="50"/>
</u-form-item> </u-form-item>
<u-form-item label="未完成原因" prop="uncompleted" required v-if='form.status == 1'> <u-form-item label="未完成原因" prop="uncompleted" required v-if='form.status === 1||form.status === "1"'>
<u-input type='textarea' v-model="form.uncompleted" placeholder="请输入未完成原因" maxlength="200"/> <u-input type='textarea' v-model="form.uncompleted" placeholder="请输入未完成原因" maxlength="200"/>
</u-form-item> </u-form-item>
</u-form> </u-form>
@ -136,8 +136,8 @@
</view> </view>
</u-popup> </u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue' <u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select> :list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
<u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime'></u-picker> <u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime' @cancle='datetimeShow = false'></u-picker>
</view> </view>
</template> </template>
@ -204,18 +204,18 @@
// //
submit() { submit() {
// //
if (!this.form.peoples) { // if (!this.form.peoples) {
this.$modal.showToast('请输入预估人数') // this.$modal.showToast('')
return; // return;
} // }
if (this.form.peoples>100) { if (this.form.peoples>100) {
this.$modal.showToast('预估人数不得超出100') this.$modal.showToast('预估人数不得超出100')
return; return;
} }
if (!this.form.estimatedMinutes) { // if (!this.form.estimatedMinutes) {
this.$modal.showToast(`请输入预估分钟`) // this.$modal.showToast(``)
return; // return;
} // }
if (!this.form.actualMinutes) { if (!this.form.actualMinutes) {
this.$modal.showToast('请输入实际分钟') this.$modal.showToast('请输入实际分钟')
return; return;
@ -461,7 +461,7 @@
.data)).id) { .data)).id) {
this.form = JSON.parse(decodeURIComponent(option.data)) this.form = JSON.parse(decodeURIComponent(option.data))
this.$set(this.form,'itemNumbers',this.form.items) this.$set(this.form,'itemNumbers',this.form.items)
this.formatDate =this.form.completionTime ? this.$time.formatDate(this.form.completionTime):'' this.formatDate =this.form.completionTime ? this.$time.formatDate(this.form.completionTime*1000):''
}; };
console.log(this.form) console.log(this.form)
this.jxDetailsStatus = await dictApi.getDict('jx_details_status') this.jxDetailsStatus = await dictApi.getDict('jx_details_status')

83
src/pages/upkeepOrder/detail.vue

@ -18,19 +18,34 @@
<view>故障类型</view> <view>故障类型</view>
<view>{{data.faultTypeName}}</view> <view>{{data.faultTypeName}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item" v-if="data.createTime">
<view>维修工</view> <view>创建时间</view>
<view>{{data.maintenance}}</view> <view>{{$time.formatDate(data.createTime)}}</view>
</view>
<view class="dec-item" v-if="data.creator">
<view>创建人员</view>
<view>{{data.creator}}</view>
</view>
<view class="dec-item" v-if="data.receivingTime">
<view>接单时间</view>
<view>{{$time.formatDate(data.receivingTime)}}</view>
</view>
<view class="dec-item" v-if="data.maintenanceName">
<view>维修人员</view>
<view>{{data.maintenanceName}}</view>
</view>
<view class="dec-item" v-if="data.completionTime">
<view>完成时间</view>
<view>{{$time.formatDate(data.completionTime)}}</view>
</view> </view>
</view> </view>
</view> </view>
<div class="line"></div> <div class="line"></div>
<view class="info" style="padding-bottom: 130rpx;"> <view class="info" style="padding-bottom: 130rpx;">
<view class="tab"> <view class="tab">
<u-tabs :list="list" :is-scroll="false" bar-height="2" bar-width="250" v-model="current" <u-tabs :list="list" :is-scroll="false" bar-height="2" bar-width="250" v-model="current"
@change="change"></u-tabs> @change="change"></u-tabs>
</view> </view>
<view> <view>
<view class="title"> <view class="title">
<view>{{changeItem.name}}</view> <view>{{changeItem.name}}</view>
@ -38,19 +53,19 @@
<view class="dec" v-if="current == 0"> <view class="dec" v-if="current == 0">
<view class="dec-item"> <view class="dec-item">
<view>设备编号</view> <view>设备编号</view>
<view>{{deviceInfo.number}}</view> <view>{{data.number}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>设备名称</view> <view>设备名称</view>
<view>{{deviceInfo.name}}</view> <view>{{data.name}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>所属厂区</view> <view>所属厂区</view>
<view>{{deviceInfo.factoryAreaName}}</view> <view>{{data.factoryAreaName}}</view>
</view> </view>
<view class="dec-item"> <view class="dec-item">
<view>设备类型</view> <view>设备类型</view>
<view>{{deviceInfo.typeName}}</view> <view>{{data.type == 'DEVICE'?'设备':data.type == 'TECH'?'工艺':'模具'}}</view>
</view> </view>
</view> </view>
<view class="list" v-if="current == 1"> <view class="list" v-if="current == 1">
@ -68,15 +83,15 @@
</view> --> </view> -->
<view class="dec2"> <view class="dec2">
<view>预估人数</view> <view>预估人数</view>
<view>{{item.peoples}}</view> <view v-if="item.peoples||item.peoples==0">{{item.peoples}}</view>
</view> </view>
<view class="dec2"> <view class="dec2">
<view>预估分钟</view> <view>预估分钟</view>
<view>{{item.estimatedMinutes}}分钟</view> <view v-if='item.estimatedMinutes'>{{item.estimatedMinutes}}分钟</view>
</view> </view>
<view class="dec2"> <view class="dec2">
<view>实际分钟</view> <view>实际分钟</view>
<view>{{item.actualMinutes}}分钟</view> <view v-if='item.actualMinutes'>{{item.actualMinutes}}分钟</view>
</view> </view>
<view class="dec2"> <view class="dec2">
<view>责任人</view> <view>责任人</view>
@ -84,17 +99,17 @@
</view> </view>
<view class="dec2" > <view class="dec2" >
<view>完成情况</view> <view>完成情况</view>
<view>{{item.status==0?'完成':'未完成'}}</view> <view>{{item.status===0 || item.status === '0'? '完成':item.status===1 ||item.status === '1'?'未完成':''}}</view>
</view> </view>
<view class="dec2" v-if='item.status == 0'> <view class="dec2" v-if='item.status === 0 || item.status === "0"'>
<view>完成时间</view> <view>完成时间</view>
<view>{{$time.formatDate(item.completionTime)}}</view> <view>{{$time.formatDate(item.completionTime*1000)}}</view>
</view> </view>
<view class="dec2"> <view class="dec2">
<view>工程师确认</view> <view>工程师确认</view>
<view>{{item.engineer}}</view> <view>{{item.engineer}}</view>
</view> </view>
<view class="dec2" v-if="item.status == 1"> <view class="dec2" v-if="item.status === 1 || item.status === '1'">
<view>未完成原因</view> <view>未完成原因</view>
<view>{{item.uncompleted}}</view> <view>{{item.uncompleted}}</view>
</view> </view>
@ -131,7 +146,6 @@
</template> </template>
<script> <script>
import * as deviceApi from "@/api/device.js"
import * as moldApi from "@/api/mold.js" import * as moldApi from "@/api/mold.js"
import * as upkeepOrderApi from "@/api/upkeepOrder.js" import * as upkeepOrderApi from "@/api/upkeepOrder.js"
export default { export default {
@ -147,7 +161,6 @@
data: '', // data: '', //
loading: false, loading: false,
type: "", type: "",
deviceInfo: '', //
serviceList: [], // serviceList: [], //
} }
}, },
@ -180,35 +193,16 @@
cancle() { cancle() {
this.isPopupShow = false this.isPopupShow = false
}, },
// /
getDetailsByNumber() {
const data = {
number: this.data.deviceNumber,
id: ''
}
if (this.type == 'DEVICE') {
deviceApi.getDeviceDetailsByNumber(data).then((res) => {
if (res.data) {
this.deviceInfo = res.data
} else {
this.$modal.showToast(`找不到该${this.type=='DEVICE'?'设备' : '模具'}`)
}
})
} else if (this.type == 'MOLD') {
moldApi.getMoldDetailsByNumber(data).then((res) => {
if (res.data) {
this.deviceInfo = res.data
} else {
this.$modal.showToast(`找不到该${this.type=='DEVICE'?'设备' : '模具'}`)
}
})
}
},
// APP // APP
orderClick(type) { orderClick(type) {
if(!this.serviceList || this.serviceList&&this.serviceList.length == 0){
this.$modal.showToast('没有保养内容')
return;
}
if(type == 2){ if(type == 2){
if(!this.serviceList || this.serviceList&&this.serviceList.length == 0){ this.isTrue = this.serviceList.some(item=>item.items.length == 0)
this.$modal.showToast('请添加保养内容') if(this.isTrue){
this.$modal.showToast('保养项目没有全部完成')
return; return;
} }
} }
@ -290,7 +284,6 @@
}, },
onShow() { onShow() {
this.getDetailsByNumber()
this.getUpkeepOrderDetailList() this.getUpkeepOrderDetailList()
} }
} }

3
src/pages/upkeepOrder/myOrder.vue

@ -36,6 +36,9 @@
<view class="dec"> <view class="dec">
故障类型:<span>{{item.faultTypeName}}</span> 故障类型:<span>{{item.faultTypeName}}</span>
</view> </view>
<view class="dec">
完成时间:<span>{{$time.formatDate(item.completionTime)}}</span>
</view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="time" style="flex: 1;"> <view class="time" style="flex: 1;">

2
src/permission.js

@ -5,7 +5,7 @@ const loginPage = "/pages/login"
// 页面白名单 // 页面白名单
const whiteList = [ const whiteList = [
'/pages/login', '/pages/index', '/pages/mold/index', '/pages/device/index', '/pages/spareParts/index', '/pages/mine/index' '/pages/login', '/', '/pages/index', '/pages/mold/index', '/pages/device/index', '/pages/spareParts/index', '/pages/mine/index'
] ]
// 检查地址白名单 // 检查地址白名单

BIN
src/static/images/banner/icon7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/static/images/icon6.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/static/images/icon7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Loading…
Cancel
Save