Browse Source

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

master
zhang_li 9 months ago
parent
commit
1fbc85cdb1
  1. 7
      src/pages.json
  2. 2
      src/pages/deviceReport/addForm.vue
  3. 47
      src/pages/deviceReport/index.vue
  4. 50
      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. 81
      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",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/sparePartsApplicationApprove/mySparePartsApplicationApprove",
"style": {
"navigationBarTitleText": "我的领用审批",
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
},{
"path": "pages/mine/agreement",
"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>
<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>
</template>

47
src/pages/deviceReport/index.vue

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

50
src/pages/deviceReport/myDeviceReport.vue

@ -26,10 +26,14 @@
<view class="dec">
所属厂区:<span>{{item.factoryAreaName}}</span>
</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="status">
<u-tag :text="item.result" bg-color='rgba(255,255,255,0)' color='#2ba471'
border-color='#2ba471' type="primary" shape='circle' />
<u-tag :text="item.result" bg-color='rgba(255,255,255,0)' color='#2ba471' border-color='#2ba471'
type="primary" shape='circle' />
</view>
<!-- <view class="button">
<u-button shape="circle" type="primary" size="mini" style="min-width: 120rpx;"
@ -38,9 +42,9 @@
</view>
</view>
<view style="height: 94rpx;padding-top: 30rpx;">
<u-loadmore :status="status" v-if="status != 'loadmore'" />
</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>
@ -54,7 +58,7 @@
params: {
pageNo: 1,
pageSize: 10,
flag:1
flag: 1
},
status: 'loadmore', //
list: [],
@ -84,8 +88,8 @@
})
},
//
cancle(item){
this.$modal.confirm('确定撤销报修吗?').then(()=>{
cancle(item) {
this.$modal.confirm('确定撤销报修吗?').then(() => {
deviceApi.rejected(item.id).then((res) => {
this.params.pageNo = 1
this.list = []
@ -94,6 +98,21 @@
})
})
},
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() {
@ -211,7 +230,8 @@
.status {
flex: 1;
}
.button{
.button {
position: absolute;
right: 0rpx;
}
@ -219,4 +239,16 @@
}
}
}
.images {
display: flex;
width: 100%;
image {
width: 30%;
margin-right: 20rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
</style>

16
src/pages/index.vue

@ -102,7 +102,7 @@
</view>
</u-col>
<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>
<view>保养工单</view>
</view>
@ -111,16 +111,16 @@
</view>
<view class="title">备件管理</view>
<u-row gutter="16">
<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/sparePartsApplicationApprove/index')">
<u-col span="3">
<view class="icon-item" @click="open('/pages/sparePartsApplication/index?from=2')">
<image src="../static/images/icon6.png" mode=""></image>
<view>领用申请审批 </view>
<view>领用申请</view>
</view>
</u-col>
<u-col span="3" v-else>
<view class="icon-item" @click="open('/pages/sparePartsApplication/index')">
<image src="../static/images/icon6.png" mode=""></image>
<view>领用申请</view>
<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/sparePartsApplicationApprove/index?from=3')">
<image src="../static/images/icon7.png" mode=""></image>
<view>领用申请审批 </view>
</view>
</u-col>
<u-col span="3">

12
src/pages/mine/index.vue

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

18
src/pages/mold/index.vue

@ -1,7 +1,12 @@
<template>
<!-- 设备 -->
<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'/>
<view class="list">
<view class="item" v-for="(item,index) in list" :key='index'>
<u-image :src="item.images" width='160'
@ -29,6 +34,7 @@
<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>
@ -51,6 +57,7 @@
},
status: 'loadmore', //
list: [],
token:''
}
},
methods: {
@ -85,6 +92,7 @@
},
onShow() {
if (getAccessToken()) {
this.token = getAccessToken()
this.params.pageNo = 1
this.list = []
this.status = 'loadmore'
@ -134,4 +142,14 @@
.image-error {
text-align: center;
}
.cartNull {
text-align: center;
padding: 500rpx 40rpx 0;
font-size: 28rpx;
color: #888;
}
.cartNull navigator {
color: #2979ff;
}
</style>

14
src/pages/overhaulOrder/addForm.vue

@ -8,7 +8,7 @@
<u-form-item label="维修工单" prop="maintenanceNumber" :class="form.id?'disabled':''">
<view class="select" @click="openSingleColumn('maintenanceNumber',form.maintenanceNumber,repairOrderList)">
<view class="input" v-if='form.maintenanceNumber'>
{{selectFormat(form.maintenanceNumber,repairOrderList)}}
{{form.maintenanceNumber}}
</view>
<view class="placeholder" v-else>
{{`请选择维修工单`}}
@ -18,8 +18,8 @@
</u-form-item>
<u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="factoryAreaName" required :class="isDisabled?'disabled':''">
<view class="select" @click="openSingleColumn('deviceNumber',form.deviceNumber,deviceList)">
<view class="input" v-if='form.deviceNumber'>
{{selectFormat(form.deviceNumber,deviceList)}}
<view class="input" v-if='form.deviceName'>
{{form.deviceName}}
</view>
<view class="placeholder" v-else>
{{`请输入${type=='DEVICE'?'设备' : '模具'}名称`}}
@ -50,7 +50,7 @@
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
<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>
</template>
@ -71,6 +71,7 @@
id: '',
describes: "",
maintenanceNumber: '',
factoryAreaNumber:'',
faultType: ''
},
repairOrderList: [], //
@ -104,6 +105,8 @@
describes: this.form.describes,
maintenanceNumber: this.form.maintenanceNumber,
deviceNumber: this.form.deviceNumber,
factoryAreaNumber: this.form.factoryAreaNumber,
type:this.type,
faultType: this.form.faultType,
}
if (this.form.id) {
@ -191,6 +194,7 @@
this.choosesingleColumnItem = this.singleColumnList.filter(item => item.number == e[0].value)
this.form.deviceName = this.choosesingleColumnItem[0].name
this.form.deviceNumber = this.choosesingleColumnItem[0].deviceNumber
this.form.deviceName = this.choosesingleColumnItem[0].name
this.form.factoryAreaName = this.choosesingleColumnItem[0].factoryAreaName
this.form.factoryAreaNumber = this.choosesingleColumnItem[0].factoryAreaNumber
this.isDisabled = true
@ -255,7 +259,7 @@
factoryAreaName: data.factoryAreaName,
faultType: data.faultType,
}
this.isDisabled = this.form.maintenanceNumber ? true:false
this.isDisabled = this.form.maintenanceNumber ||this.form.id ? true:false
};
await this.getRepairOrderList()
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>
</view>
</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="input" v-if='formatDate'>
{{formatDate}}
@ -51,7 +51,7 @@
<u-input v-model="form.engineer" placeholder="请输入工程师确认" maxlength="50"/>
</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-form-item>
</u-form>
@ -133,7 +133,7 @@
</view>
</u-popup>
<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>
</view>
</template>
@ -205,7 +205,7 @@
this.$modal.showToast('请输入检修描述')
return;
}
if (!this.form.peoples) {
if (!this.form.peoples || this.form.peoples==0) {
this.$modal.showToast('请输入预估人数')
return;
}
@ -213,7 +213,7 @@
this.$modal.showToast('预估人数不得超出100')
return;
}
if (!this.form.estimatedMinutes) {
if (!this.form.estimatedMinutes || this.form.estimatedMinutes==0) {
this.$modal.showToast(`请输入预估分钟`)
return;
}
@ -396,7 +396,7 @@
this.$modal.showToast('请选择备件')
return;
}
if (!this.form1.qty) {
if (!this.form1.qty||this.form1.qty==0) {
this.$modal.showToast('请输入数量')
return;
}
@ -461,7 +461,7 @@
.data)).id) {
this.form = JSON.parse(decodeURIComponent(option.data))
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')

50
src/pages/overhaulOrder/detail.vue

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

2
src/pages/overhaulOrder/index.vue

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

8
src/pages/repairOrder/addForm.vue

@ -258,7 +258,13 @@
await this.getDeviceList()
this.maintenanceShift = await dictApi.getDict('maintenance_shift')
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')
}
}

2
src/pages/repairOrder/addServiceRecord.vue

@ -100,7 +100,7 @@
</view>
</u-popup>
<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>
</template>

7
src/pages/repairOrder/detail.vue

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

7
src/pages/repairOrder/myOrder.vue

@ -3,9 +3,9 @@
<view class="container">
<u-navbar back-icon-color='#fff' :background="{ background: '#409eff'}" back-text="" title-color='#fff'
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>
</template>
</template> -->
</u-navbar>
<!-- <Search @search='search' @screen='screen'/> -->
<view class="list">
@ -40,6 +40,9 @@
<view class="dec">
故障类型:<span>{{item.faultTypeName}}</span>
</view>
<view class="dec">
完成时间:<span>{{$time.formatDate(item.completionTime)}}</span>
</view>
</view>
<view class="bottom">
<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>
</view>
</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="input" v-if='form.deviceNumber'>
{{selectFormat(form.deviceNumber,deviceList)}}
</view>
<view class="placeholder" v-else>
{{`请选择${type=='DEVICE'?'设备' : '模具'}名称`}}
{{`请选择${type=='DEVICE'||type=='TECH'?'设备' : '模具'}名称`}}
</view>
<u-icon name="arrow-right" color="#aaaaaa" size="28"></u-icon>
</view>
@ -60,7 +60,7 @@
</view>
</u-popup>
<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>
</template>
@ -104,7 +104,7 @@
return;
}
if (!this.form.deviceNumber) {
this.$modal.showToast(`请选择${this.type=='DEVICE'?'设备' : '模具'}名称`)
this.$modal.showToast(`请选择${this.type=='DEVICE'||this.type=='TECH'?'设备' : '模具'}名称`)
return;
}
if (!this.form.receiverUserId) {

67
src/pages/spareParts/index.vue

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

4
src/pages/sparePartsApplication/addForm.vue

@ -117,7 +117,7 @@
</view>
</u-popup>
<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>
</template>
@ -311,7 +311,7 @@
this.$modal.showToast('请选择设备')
return;
}
if (!this.form1.qty) {
if (!this.form1.qty || this.form1.qty==0) {
this.$modal.showToast('请输入数量')
return;
}

7
src/pages/sparePartsApplication/detail.vue

@ -17,7 +17,7 @@
<view class="dec-item">
<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">
备件名称{{cur.itemName}}
</view>
@ -36,7 +36,7 @@
</view>
</view>
</view>
<view class="footer" v-if="!from">
<view class="footer" v-if="from === 3">
<view class="btns">
<button class="reset" @click="reject">驳回</button>
<button class="sure" @click="agree" :loading='loading' :disabled='loading'>通过</button>
@ -56,7 +56,7 @@
number: '',
data: '',
loading: false,
from:'',//
from:'',//1
}
},
methods: {
@ -119,7 +119,6 @@
if (option.number) {
this.number = option.number
}
console.log(this.data)
},
onShow() {
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) {
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>
</u-popup>
<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>
</template>
@ -223,13 +223,13 @@
chickRightButton(field) {
uni.scanCode({
success: function(res) {
this.form.locationNumber = res.result
this.form1.locationNumber = res.result
this.getLocation()
}
});
},
getLocation(){
locationApi.getLocation(this.form.locationNumber).then(res=>{
locationApi.getLocation(this.form1.locationNumber).then(res=>{
if(!res.data){
this.$modal.showToast('找不到该库位')
return;
@ -296,7 +296,13 @@
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.isPopupShow = false
},

10
src/pages/spotCheckOrder/addForm.vue

@ -15,8 +15,8 @@
<u-form-item :label="`${type=='DEVICE'?'设备' : '模具'}名称`" prop="deviceName" required class="disabled">
<u-input v-model="form.deviceName" :placeholder="`请输入${type=='DEVICE'?'设备' : '模具'}名称`" disabled />
</u-form-item>
<u-form-item label="维修人" prop="maintenances" required class="disabled">
<u-input v-model="form.maintenances" placeholder="请输入维修人" disabled />
<u-form-item label="维修人" prop="name" required class="disabled">
<u-input v-model=" $store.state.user.name" placeholder="请输入维修人" disabled />
</u-form-item>
<u-form-item label="班次" prop="classes" required>
<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>
<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>
</template>
@ -152,6 +152,10 @@
this.$modal.showToast('请选择班次')
return;
}
if (this.subList.length==0) {
this.$modal.showToast('该设备无检修项目')
return;
}
const data = {
describes: this.form.describes,
deviceNumber: this.form.deviceNumber,

30
src/pages/upkeepOrder/addServiceRecord.vue

@ -8,10 +8,10 @@
<!-- <u-form-item label="保养部位" prop="equipmentParts" required>
<u-input v-model="form.equipmentParts" placeholder="请输入保养部位" maxlength="50" disabled/>
</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-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-form-item>
<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>
</view>
</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="input" v-if='formatDate'>
{{formatDate}}
@ -54,7 +54,7 @@
<u-input v-model="form.engineer" placeholder="请输入工程师确认" maxlength="50"/>
</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-form-item>
</u-form>
@ -136,8 +136,8 @@
</view>
</u-popup>
<u-select v-model="singleColumnShow" mode="single-column" :default-value='singleColumnDefaultValue'
:list="singleColumnList" @confirm="chooseSingleColumn"></u-select>
<u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime'></u-picker>
:list="singleColumnList" @confirm="chooseSingleColumn" @cancle='singleColumnShow = false'></u-select>
<u-picker mode="time" v-model="datetimeShow" :default-time='datetimeDefaultValue' :params="params" @confirm='chooseDatetime' @cancle='datetimeShow = false'></u-picker>
</view>
</template>
@ -204,18 +204,18 @@
//
submit() {
//
if (!this.form.peoples) {
this.$modal.showToast('请输入预估人数')
return;
}
// if (!this.form.peoples) {
// this.$modal.showToast('')
// return;
// }
if (this.form.peoples>100) {
this.$modal.showToast('预估人数不得超出100')
return;
}
if (!this.form.estimatedMinutes) {
this.$modal.showToast(`请输入预估分钟`)
return;
}
// if (!this.form.estimatedMinutes) {
// this.$modal.showToast(``)
// return;
// }
if (!this.form.actualMinutes) {
this.$modal.showToast('请输入实际分钟')
return;
@ -461,7 +461,7 @@
.data)).id) {
this.form = JSON.parse(decodeURIComponent(option.data))
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)
this.jxDetailsStatus = await dictApi.getDict('jx_details_status')

81
src/pages/upkeepOrder/detail.vue

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

3
src/pages/upkeepOrder/myOrder.vue

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

2
src/permission.js

@ -5,7 +5,7 @@ const loginPage = "/pages/login"
// 页面白名单
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