Browse Source

转办类型改成不同类型才可以转办,去掉flage=1,维修工单获取人员去掉flag=1

master
zhang_li 8 months ago
parent
commit
018deee1ce
  1. 3
      src/pages/repairOrder/addServiceRecord.vue
  2. 18
      src/pages/repairOrder/detail.vue
  3. 2
      src/pages/repairOrder/index.vue
  4. 8
      src/pages/repairOrder/transfer.vue

3
src/pages/repairOrder/addServiceRecord.vue

@ -224,8 +224,7 @@
async getSelecUser() { async getSelecUser() {
let data = { let data = {
classType: this.type, classType: this.type,
factoryAreaNumber: this.factoryAreaNumber, factoryAreaNumber: this.factoryAreaNumber
flag: 1
} }
let arr = [] let arr = []
if (this.form.maintenances) { if (this.form.maintenances) {

18
src/pages/repairOrder/detail.vue

@ -18,7 +18,7 @@
<view>{{data.describes}}</view> <view>{{data.describes}}</view>
</view> </view>
<u-form :model="data" ref="form1" label-width="160rpx" style="border-top: 1px solid rgba(220,220,220,0.5);border-bottom: 1px solid rgba(220,220,220,0.5);margin-bottom: 20rpx;" v-if="data.status == 'PECEIVED'&& $store.state.user.post.code == 'worker'"> <u-form :model="data" ref="form1" label-width="160rpx" style="border-top: 1px solid rgba(220,220,220,0.5);border-bottom: 1px solid rgba(220,220,220,0.5);margin-bottom: 20rpx;" v-if="data.status == 'PECEIVED'">
<u-form-item label="班次" prop="classes" required> <u-form-item label="班次" prop="classes" required>
<view class="select" @click="openSingleColumn('classes',data.classes,maintenanceShift)"> <view class="select" @click="openSingleColumn('classes',data.classes,maintenanceShift)">
<view class="input" v-if='data.classes||data.classes==0'> <view class="input" v-if='data.classes||data.classes==0'>
@ -42,11 +42,11 @@
</view> </view>
</u-form-item> </u-form-item>
</u-form> </u-form>
<view class="dec-item" v-if="data.status != 'PECEIVED'|| $store.state.user.post.code != 'worker'"> <view class="dec-item" v-if="data.status != 'PECEIVED'">
<view>班次</view> <view>班次</view>
<view>{{data.classesName}}</view> <view>{{data.classesName}}</view>
</view> </view>
<view class="dec-item" v-if="data.status != 'PECEIVED'|| $store.state.user.post.code != 'worker'"> <view class="dec-item" v-if="data.status != 'PECEIVED'">
<view>故障类型</view> <view>故障类型</view>
<view>{{data.faultTypeName}}</view> <view>{{data.faultTypeName}}</view>
</view> </view>
@ -141,7 +141,7 @@
<view class="title-txt"> <view class="title-txt">
{{item.describes}} {{item.describes}}
</view> </view>
<u-icon name="trash" color="#aaaaaa" size="40" v-if="(data.status == 'PENDING' || data.status == 'PECEIVED')&& $store.state.user.post.code == 'worker'" <u-icon name="trash" color="#aaaaaa" size="40" v-if="(data.status == 'PENDING' || data.status == 'PECEIVED')"
@click.native.stop="delService(item)"></u-icon> @click.native.stop="delService(item)"></u-icon>
</view> </view>
<view class="dec2"> <view class="dec2">
@ -174,7 +174,7 @@
<!-- <u-icon name="minus-circle" color="#aaaaaa" size="60" ></u-icon> --> <!-- <u-icon name="minus-circle" color="#aaaaaa" size="60" ></u-icon> -->
</view> </view>
<view class="add-btn" <view class="add-btn"
v-if="(data.status == 'PENDING' || data.status == 'PECEIVED')&& $store.state.user.post.code == 'worker'"> v-if="(data.status == 'PENDING' || data.status == 'PECEIVED')">
<u-button type="primary" @click="addSubForm('creat')"><u-icon name="plus-circle" color="#ffffff" <u-button type="primary" @click="addSubForm('creat')"><u-icon name="plus-circle" color="#ffffff"
size="36"></u-icon>添加维修内容</u-button> size="36"></u-icon>添加维修内容</u-button>
</view> </view>
@ -182,11 +182,11 @@
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
<view class="btns" v-if="data.status == 'PENDING'&& $store.state.user.post.code == 'worker'"> <view class="btns" v-if="data.status == 'PENDING'">
<u-button type="primary" @click="orderClick(1)" :loading='loading' :disabled='loading'>接单</u-button> <u-button type="primary" @click="orderClick(1)" :loading='loading' :disabled='loading'>接单</u-button>
</view> </view>
<view class="btns" v-if="data.status == 'PECEIVED'&& $store.state.user.post.code == 'worker'"> <view class="btns" v-if="data.status == 'PECEIVED'">
<u-button shape="shape" type="warning" style="min-width: 120rpx;" :loading='loading1' @click="editForm" :disabled='loading1'>修改工单</u-button> <u-button shape="shape" type="warning" style="min-width: 120rpx;" :loading='loading1' @click="editForm" :disabled='loading1'>修改工单</u-button>
<u-button type="primary" @click="orderClickSuccess()" :loading='loading' <u-button type="primary" @click="orderClickSuccess()" :loading='loading'
:disabled='loading'>完成</u-button> :disabled='loading'>完成</u-button>
@ -292,10 +292,6 @@
orderClickSuccess() { orderClickSuccess() {
// //
if (this.data.status == 'PECEIVED') { if (this.data.status == 'PECEIVED') {
if (this.$store.state.user.id != this.data.maintenance) {
this.$modal.showToast('当前人员与接单人员不一致')
return;
}
if (!this.serviceList || this.serviceList && this.serviceList.length == 0) { if (!this.serviceList || this.serviceList && this.serviceList.length == 0) {
this.$modal.showToast('请添加维修内容') this.$modal.showToast('请添加维修内容')

2
src/pages/repairOrder/index.vue

@ -4,7 +4,7 @@
<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" v-if=" $store.state.user.post.code == 'worker'"></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'/> -->

8
src/pages/repairOrder/transfer.vue

@ -218,8 +218,7 @@
if (this.type == 'DEVICE'||this.type == 'TECH') { if (this.type == 'DEVICE'||this.type == 'TECH') {
deviceApi.getDeviceDetailsByNumber({ deviceApi.getDeviceDetailsByNumber({
number:this.form.deviceNumber, number:this.form.deviceNumber,
type:this.type, type:this.type
flag:1
}).then(async (res) => { }).then(async (res) => {
if(!res.data){ if(!res.data){
this.$modal.showToast('找不到该设备') this.$modal.showToast('找不到该设备')
@ -242,8 +241,7 @@
}) })
} else if (this.type == 'MOLD') { } else if (this.type == 'MOLD') {
moldApi.getMoldDetailsByNumber({ moldApi.getMoldDetailsByNumber({
number:this.form.deviceNumber, number:this.form.deviceNumber
flag:1
}).then(async (res) => { }).then(async (res) => {
if(!res.data){ if(!res.data){
this.$modal.showToast('找不到该设备') this.$modal.showToast('找不到该设备')
@ -388,7 +386,7 @@
this.deviceMoldType = await dictApi.getDict('app_device_mold_type') this.deviceMoldType = await dictApi.getDict('app_device_mold_type')
this.form.receiverType = this.deviceMoldType[0].value this.form.receiverType = this.deviceMoldType[0].value
// this.deviceMoldType = this.deviceMoldType.filter(item => item.value != this.type) this.deviceMoldType = this.deviceMoldType.filter(item => item.value != this.type)
this.getFactoryAreaList() this.getFactoryAreaList()
} }
} }

Loading…
Cancel
Save