修改维修报修下拉参数

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

@ -55,6 +55,29 @@ export class Repair extends VuexModule {
// debugger // debugger
return { Checklist }; 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 @MutationAction
async rowdatanull() { async rowdatanull() {
const rowdata: [] = []; const rowdata: [] = [];

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

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

@ -37,6 +37,17 @@ export class Repairbx extends VuexModule {
const equipmentlist = result.rows; const equipmentlist = result.rows;
return { equipmentlist }; 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 @MutationAction
async rowdatanull() { async rowdatanull() {
const rowdata: [] = []; const rowdata: [] = [];

@ -14,19 +14,7 @@
</view> </view>
<!-- <view v-for="item in newmenuList" :key="item.path"> --> <!-- <view v-for="item in newmenuList" :key="item.path"> -->
<view class="tubiao"> <view class="tubiao">
<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>
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>
</view> </view>
<!-- </view> --> <!-- </view> -->
</view> </view>
@ -37,6 +25,7 @@
import { Component } from 'vue-property-decorator'; import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page'; import { BasePage } from '@/components/base/page';
import { session } from '@/store/modules/session'; import { session } from '@/store/modules/session';
import model from './Repairbx/model';
@Component @Component
export default class RawAppointment extends BasePage { export default class RawAppointment extends BasePage {
childData: any; childData: any;
@ -51,6 +40,12 @@ export default class RawAppointment extends BasePage {
url: `/pages/shouye/index`, url: `/pages/shouye/index`,
}); });
} }
link1(item) {
model.rowdatanull();
uni.navigateTo({
url: item.path,
});
}
} }
</script> </script>

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

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

Loading…
Cancel
Save