修改维修报修下拉参数

master
LAPTOP-R6EHHS26\86155 2 years ago
parent cbfb8b1d6b
commit 1f8354d880

@ -55,6 +55,29 @@ export class Repair extends VuexModule {
// debugger
return { Checklist };
}
//维修原因分析下拉列表
locList: any = [];
@MutationAction
async getFaultMeasuresList() {
const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultMeasuresList);
const DictListoild: [] = result.data;
const locList = DictListoild.map((item: any) => ({
label: item.faultSubclass,
value: item.faultSubclass,
}));
return { locList };
}
locList2: any = [];
@MutationAction
async getFaultDescriptionList() {
const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultDescriptionList);
const DictListoild: [] = result.data;
const locList2 = DictListoild.map((item: any) => ({
label: item.faultSubclass,
value: item.faultSubclass,
}));
return { locList2 };
}
@MutationAction
async rowdatanull() {
const rowdata: [] = [];

@ -143,7 +143,7 @@
</div>
</u-form-item> -->
<!-- 单号 -->
<u-form-item label="维修费用:">
<u-form-item class="listbottom1" label="维修费用:">
<u-input v-model="formdata.workCost" placeholder="" />
</u-form-item>
<!-- <u-form-item label="维修用时(分钟):">
@ -154,7 +154,10 @@
</u-form-item> -->
<!-- 工单 -->
<u-form-item label="原因分析:">
<u-input v-model="formdata.workReason" placeholder="" type="" />
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductlocCode" showKey="label" valKey="value" :val="workReason.value" :options="model.locList" />
</u-form-item>
<u-form-item label="维修措施:">
<jPicker sureColor="#ff0000" :moren="moren2" @bindpicker="selectProductlocCode2" showKey="label" valKey="value" :val="repairMeasures.value" :options="model.locList2" />
</u-form-item>
<u-form-item label="上传图片:">
<scroll-view class="scroll-view_H" scroll-x="true" :scroll-left="scrollLeft1()">
@ -239,6 +242,8 @@ export default class ChangePalletNew extends BasePage {
cate_name: '巡检记录',
},
];
moren = '选择原因分析';
moren2 = '选择维修措施';
current: any = 0;
shouciFocus = true;
//
@ -298,6 +303,8 @@ export default class ChangePalletNew extends BasePage {
imgformList: any = [];
deleteimgList1: any = [];
isvalue = false;
workReason: any = {};
repairMeasures: any = {};
async onReady() {
//await this.model.getpalletLocation();
//this.remove = this.model.WlList[0];
@ -376,6 +383,8 @@ export default class ChangePalletNew extends BasePage {
console.log(item);
}
async onLoad(options) {
await this.model.getFaultMeasuresList();
await this.model.getFaultDescriptionList();
let str = decodeURIComponent(options.listitem);
if (str) {
this.detailsinfo = JSON.parse(str);
@ -429,6 +438,14 @@ export default class ChangePalletNew extends BasePage {
this.imgList = this.imgList.split(',');
}
}
async selectProductlocCode(e: any) {
this.workReason = e.pickerName;
// await this.model.getpalletDestination(params);
}
async selectProductlocCode2(e: any) {
this.workReason = e.pickerName;
// await this.model.getpalletDestination(params);
}
scrollLeft() {
return 222 * (this.imgList.length + 1);
}
@ -614,6 +631,7 @@ export default class ChangePalletNew extends BasePage {
});
}
});
// if (this.orderNo == '' || this.orderNo.length == 0) {
// this.customToast('nficl');
// return;
@ -634,11 +652,26 @@ export default class ChangePalletNew extends BasePage {
});
return;
}
if (this.workReason.value == '' || this.workReason.value == undefined) {
(this.$refs.uToast as any).show({
title: '原因分析不能为空',
type: 'default',
});
return;
}
if (this.repairMeasures.value == '' || this.repairMeasures.value == undefined) {
(this.$refs.uToast as any).show({
title: '维修措施不能为空',
type: 'default',
});
return;
}
let query = this.detailsinfolist;
query.applyList = this.Sparepartlist;
query.fileList = this.imgformList.join(',');
query.workCost = this.formdata.workCost;
query.workReason = this.formdata.workReason;
query.workReason = this.workReason.value;
query.repairMeasures = this.repairMeasures.value;
console.log(query, this.isvalue);
await this.model.updateMaintenanceRecords(query);
if (this.model.SubmitCode.code == '200') {
@ -646,6 +679,7 @@ export default class ChangePalletNew extends BasePage {
title: '成功',
type: 'default',
});
this.Clear(); //
setTimeout(() => {
uni.navigateTo({
url: `/pages/equipment/Repair/index?listitem=`,
@ -662,6 +696,17 @@ export default class ChangePalletNew extends BasePage {
// return;
// }
}
Clear() {
this.orderNo = '';
this.formdata = {};
this.imgformList = [];
this.workReason = {};
this.repairMeasures = {};
// this.shouciFocus = false;
// this.$nextTick(() => {
// this.shouciFocus = true;
// });
}
search(value) {
console.log(value);
if (value == this.detailsinfolist.equipmentCode) {
@ -1039,11 +1084,14 @@ export default class ChangePalletNew extends BasePage {
white-space: nowrap;
}
.listbottom ::v-deep .uni-input-input {
border: 1px solid black;
width: 98%;
padding: 10px 5px;
box-sizing: border-box;
font-weight: 500;
height: 30px;
}
.listbottom1 ::v-deep .uni-input-input {
border: 1px solid black;
}
::v-deep .u-form-item {
padding: 6px 0;

@ -40,10 +40,10 @@
<u-input v-model="formdata.orderConnection" placeholder="" type="text" />
</u-form-item> -->
<u-form-item label="故障描述:">
<u-input v-model="formdata.orderDesc" placeholder="" type="textarea" />
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductlocCode" showKey="label" valKey="value" :val="orderDesc.value" :options="model.locList" />
</u-form-item>
<!-- 机台 -->
<u-form-item label="故障时间:">
<u-form-item class="listbottom1" label="故障时间:">
<u-input @click="blur()" type="select" v-model="orderBreakdownTime" />
<u-picker mode="time" :default-time="defaulttime" :params="params" v-model="showtime" @confirm="timeConfirm" :timeEnd="endTime"></u-picker>
</u-form-item>
@ -100,10 +100,9 @@ import moment from 'moment';
})
export default class ChangePalletNew extends BasePage {
params: any = { year: true, month: true, day: true, hour: true, minute: true, second: true };
endTime: any = {};
model = model;
moren = '选择缓存区';
moren = '选择故障描述';
shouciFocus = true;
zaiciFocus = false;
switchListText = [
@ -148,11 +147,12 @@ export default class ChangePalletNew extends BasePage {
isaccord = false;
showtime = false;
defaulttime: any = '';
orderDesc: any = {};
async onReady() {
this.defaulttime = moment().format('YYYY-MM-DD HH:mm:ss');
console.log(this.defaulttime);
// await this.model.getDictList();
//await this.model.getpalletLocation();
await this.model.getFaultReasonList();
//this.remove = this.model.WlList[0];
}
onShow() {
@ -164,6 +164,9 @@ export default class ChangePalletNew extends BasePage {
}
}
async query() {
this.formdata = {};
this.imgList = [];
this.orderDesc = {};
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请扫码条码',
@ -174,12 +177,14 @@ export default class ChangePalletNew extends BasePage {
await this.model.queryOrderNo(this.orderNo);
//console.log('???',model.orderNoItemList)
if (model.orderNoItemList == undefined) {
this.isaccord = false;
(this.$refs.uToast as any).show({
title: '该条码未查到数据,请使用正确的条码!',
type: 'default',
});
} else {
if (this.orderNoItemList.productCode == 'EmptyPallet') {
this.isaccord = false;
(this.$refs.uToast as any).show({
title: '该条码未查到数据,请使用正确的条码!',
type: 'default',
@ -205,6 +210,10 @@ export default class ChangePalletNew extends BasePage {
return v.toString(16);
});
}
async selectProductlocCode(e: any) {
this.orderDesc = e.pickerName;
// await this.model.getpalletDestination(params);
}
timeConfirm(e) {
this.orderBreakdownTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.month;
this.formdata.orderBreakdownTime = this.orderBreakdownTime;
@ -225,9 +234,9 @@ export default class ChangePalletNew extends BasePage {
});
return;
}
if (this.formdata.orderDesc == '' || this.formdata.orderDesc == undefined) {
if (this.orderDesc.value == '' || this.orderDesc.value == undefined) {
(this.$refs.uToast as any).show({
title: '请输入故障描述',
title: '故障描述不能为空',
type: 'default',
});
return;
@ -238,7 +247,7 @@ export default class ChangePalletNew extends BasePage {
equipmentCode: this.formdata.equipmentCode,
equipmentName: this.formdata.equipmentName,
equipmentLocation: this.formdata.equipmentLocation,
orderDesc: this.formdata.orderDesc,
orderDesc: this.orderDesc.value,
orderBreakdownTime: this.formdata.orderBreakdownTime,
fileList: fileList,
orderSource: '手持PDA',
@ -274,15 +283,12 @@ export default class ChangePalletNew extends BasePage {
this.orderNo = '';
this.formdata = {};
this.imgList = [];
this.location = '';
(this.orderBreakdownTime = ''), (this.locationStatus = 1);
this.productCodeList = {};
this.productCodelocList = {};
this.shouciFocus = false;
this.orderDesc = {};
// this.shouciFocus = false;
this.model.empty();
this.$nextTick(() => {
this.shouciFocus = true;
});
// this.$nextTick(() => {
// this.shouciFocus = true;
// });
}
switchChangeFun(e) {
//console.log(e);
@ -563,6 +569,10 @@ export default class ChangePalletNew extends BasePage {
width: 50%;
}
.listbottom ::v-deep .uni-input-input {
width: 94%;
padding: 5px;
}
.listbottom1 ::v-deep .uni-input-input {
border: 1px solid black;
width: 94%;
padding: 5px;

@ -37,6 +37,17 @@ export class Repairbx extends VuexModule {
const equipmentlist = result.rows;
return { equipmentlist };
}
locList: any = [];
@MutationAction
async getFaultReasonList() {
const result: any = await http.get(url.lanjuequipment.product.Repair.getFaultReasonList);
const DictListoild: [] = result.data;
const locList = DictListoild.map((item: any) => ({
label: item.faultSubclass,
value: item.faultSubclass,
}));
return { locList };
}
@MutationAction
async rowdatanull() {
const rowdata: [] = [];

@ -14,19 +14,7 @@
</view>
<!-- <view v-for="item in newmenuList" :key="item.path"> -->
<view class="tubiao">
<u-icon
v-for="item in newmenuList"
:key="item.path"
@click="
uni.navigateTo({
url: item.path,
})
"
:label="item.menuName"
label-pos="bottom"
size="80"
name="../../static/icons/icon-01.png"
></u-icon>
<u-icon v-for="item in newmenuList" :key="item.path" @click="link1(item)" :label="item.menuName" label-pos="bottom" size="80" name="../../static/icons/icon-01.png"></u-icon>
</view>
<!-- </view> -->
</view>
@ -37,6 +25,7 @@
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { session } from '@/store/modules/session';
import model from './Repairbx/model';
@Component
export default class RawAppointment extends BasePage {
childData: any;
@ -51,6 +40,12 @@ export default class RawAppointment extends BasePage {
url: `/pages/shouye/index`,
});
}
link1(item) {
model.rowdatanull();
uni.navigateTo({
url: item.path,
});
}
}
</script>

@ -65,7 +65,7 @@ export default class RawHome extends BasePage {
model = model;
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg';
today = dayjs().format('YYYY-MM-DD dddd');
version = '0.0.19';
version = '0.0.20';
checkversion: any = {};
sessiondata: any = '';
onLoad() {

@ -129,6 +129,12 @@ export const url = {
updateMaintenanceRecords: qianzhuione + '/device/devicePDA/updateMaintenanceRecords',
// 备件list
list: qianzhuione + '/device/sparePartsLedger/list',
// 维修详情里的原因分析
getFaultMeasuresList: qianzhuione + '/device/devicePDA/getFaultMeasuresList',
// 维修详情里的原因分析
getFaultDescriptionList: qianzhuione + '/device/devicePDA/getFaultDescriptionList',
// 维修详情里的原因分析
getFaultReasonList: qianzhuione + '/device/devicePDA/getFaultReasonList',
},
// 保养
Upkeep: {

Loading…
Cancel
Save