baseline: 小军 WMS 二开代码原始快照(含 SynOABusiness.cs Debugger.Break)

This commit is contained in:
Gaussian committed 2026-11-06 18:38:38 +08:00
commit c2b0e7be0d
6522 files changed
+3530643

No files matched your search

File diff suppressed because it is too large. Load diff
+196
View File
@@ -0,0 +1,196 @@
<template>
<view class="report" :style="containerStyle">
<view class="gray-title" style="display: flex;">
{{detailData}}
</view>
<view class="line-wrapper">
<view class="line-title">
编号
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
执行结果
</view>
<view v-if="detailData" class="line-child">
执行中
</view>
<view v-else-if="detailData" class="line-child">
完成
</view>
<view v-else class="line-child">-</view>
</view>
<view class="line-wrapper">
<view class="line-title">
汇报人
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
维修时间
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="gray-title">
汇报内容
</view>
<view class="textarea-wrapper" style="margin-bottom: 24rpx;">
<text>测试</text>
</view>
<view class="gray-title">
时间
</view>
<view class="line-wrapper">
<view class="line-title">
开始时间
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
结束时间
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
执行时长
</view>
<view class="line-child">
{{detailData}} 分钟
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
停机开始时间
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
停机结束时间
</view>
<view class="line-child">
{{detailData}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
停机时长
</view>
<view class="line-child">
{{detailData}} 分钟
</view>
</view>
<view class="gray-title">
备件领用
</view>
<view v-if="partsList.length>0" v-for="(i, k) in partsList" :key="k" class="line-wrapper">
<view class="line-title">
{{i.materialName}}
</view>
<view class="line-child">
{{i.num}}
</view>
</view>
<view v-if="partsList.length==0" class="line-wrapper">
<view class="line-title">
无备件领用
</view>
</view>
<view class="gray-title">
汇报图片
</view>
<view class="pic-wrapper">
<view v-if="picList.length == 0" style="width: 100%; color: gray; display: flex; justify-content: center; font-size: 12px;">
<text>- 没有图片 -</text>
</view>
<u-image @click="handleClickPic(item, index)" v-for="(item, index) in picList" :key="index" width="250rpx" height="250rpx"
:src="item"></u-image>
<view v-if="picList.length !== 0" style="width: 100%; color: gray; display: flex; justify-content: center; font-size: 12px; margin: 10rpx 0;"><text>已经到底了</text></view>
</view>
<view v-if="hasDelete" @click="handleDelete" style="background-color: #E30026;" class="fixed-bottom">删除</view>
</view>
</template>
<style lang="scss" scoped>
@import './style.scss';
.pic-wrapper {
display: flex;
flex-wrap: wrap;
}
</style>
<script>
import Vue from 'vue';
import {
mapState,
mapMutations
} from 'vuex';
var commonUtil = require('../../../common/util.js');
export default {
data() {
return {
detailData: [],
partsList:[],
picList:[],
hasEmpty: false,
getPartFailed: false,
containerStyle: "padding-bottom: 100rpx",
hasDelete: false,
loadPartsSuccessfully: false,
FInterID:'',
orgid:''
};
},
computed: {
...mapState(['userInfo'])
},
onLoad() {
this.FInterID = uni.getStorageSync('FInterID');
this.orgid = uni.getStorageSync('orgid');
this.getDetailreportInfo();
},
methods: {
getDetailreportInfo(){
let requestParams = {
"id": this.userInfo.ID,
"orgid":this.orgid,
"FInterID":'830c0621-cffd-4faa-9833-29fa66fde7b7',
"FAEndTime":'',
"OrderType":1
};
this.$request.post({
data: {
action: 'OrderIformation',
params: requestParams
}
}).then(res => {
let _self = this;
let data = JSON.parse(res);
_self.detailData = data;
});
},
}
};
</script>
<style lang="scss">
page {
background-color: #F7F7F7;
}
</style>
+449
View File
@@ -0,0 +1,449 @@
<template>
<view class="page">
<opsoft-dialog-notice
:dialogNoticeShow="showDialog"
:dialogNoticeType="dialogNoticeType"
:dialogNoticeTitle="dialogNoticeTitle"
:dialogNoticeContent="dialogNoticeContent"
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
>
</opsoft-dialog-notice>
<view class="order-title">工单信息</view>
<view class="head">
<view class="card-info-item">
<text class="card-info-item-text">工单代码:</text>
<text class="card-info-item-text-detail" v-if="ticketData.length>0">{{ticketData[0].FBILLNO}}</text>
</view>
<view class="card-info-item" v-if="ticketData.length>0">
<text class="card-info-item-text">工单来源:</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERFROM == 1"
style="color: #007AFF;">申请故障维修</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERFROM == 2"
style="color: #007AFF;">申请事故维修</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERFROM == 3"
style="color: #007AFF;">事后事故维修</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERFROM == 4"
style="color: #007AFF;">事后故障维修</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERFROM == 5"
style="color: #007AFF;">其它</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">工单日期:</text>
<text class="card-info-item-text-detail" v-if="ticketData.length>0">{{ticketData[0].FDATE}}</text>
</view>
<view class="card-info-item" v-if="ticketData.length>0">
<text class="card-info-item-text">工单状态:</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERSTATUS == 0">未安排</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERSTATUS == 1"
style="color: green;">已安排</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERSTATUS == 2"
style="color: #007AFF;">完工</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FORDERSTATUS == 3"
style="color: #007AFF;">验收</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">工单内容:</text>
<text class="card-info-item-text-detail" v-if="ticketData.length>0">{{ticketData[0].FNAME}}</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">负责人:</text>
<text class="card-info-item-text-detail" v-if="ticketData.length>0">{{ticketData[0].FEMPNAME}}</text>
</view>
<view class="card-info-item" v-if="ticketData.length>0">
<text class="card-info-item-text">是否停机:</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FISSTOPMACHINE==false"
style="color: #007AFF;">否</text>
<text class="card-info-item-text-detail" v-if="ticketData[0].FISSTOPMACHINE==true"
style="color: red;">是</text>
</view>
</view>
<view class="lable-change">
<view class="lable-change-item" @click="spanClick(1)">
<text :class="[spanFlag==1?'lable-change-text':'lable-change-text-gray']">维修记录</text>
<view class="lable-change-line" v-show="spanFlag == 1"></view>
</view>
<view class="lable-change-item" @click="spanClick(2)">
<text :class="[spanFlag==2?'lable-change-text':'lable-change-text-gray']">备件领用</text>
<view class="lable-change-line" v-show="spanFlag == 2"></view>
</view>
<view class="lable-change-item" @click="spanClick(3)">
<text :class="[spanFlag==3?'lable-change-text':'lable-change-text-gray']">维修人</text>
<view class="lable-change-line" v-show="spanFlag == 3"></view>
</view>
</view>
<view v-show="spanFlag==1">
<view class="work-center-item" v-for="(item,index) in recordList" :key="index">
<view class="container" @touchstart="touchS($event,index)" @touchmove="touchM($event,index)"
@touchend="touchE($event,index)" :style="{'left': (currIndex==index?leftStyle + 'rpx':'')}">
<view class="card-list">
<image class="img-left-large" src="../../../static/emapp/repair.png"></image>
<view class="card-info" @click="reportClick(item)">
<view class="card-info-item">
<text class="card-info-item-text">部件名称:</text>
<text class="card-info-item-text-detail">{{item.FPARTNAME}}</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">维修内容:</text>
<text class="card-info-item-text-detail">{{item.FCONTENTSANDREQUIREMENTS}}</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">执行结果:</text>
<text class="card-info-item-text-detail" v-if="item.FORDERSTATUS == 0"
style="color: red;">未执行</text>
<text class="card-info-item-text-detail" v-if="item.FORDERSTATUS == 1"
style="color: #FAAE12;">执行中</text>
<text class="card-info-item-text-detail" v-if="item.FORDERSTATUS == 2"
style="color: green;">完成</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">维修人:</text>
<text class="card-info-item-text-detail">{{item.FEMPNAME}}</text>
</view>
</view>
<image class="img-arrow" src="../../../static/myinfo/right-arrow.png"
style="width: 30rpx;height: 30rpx;"></image>
</view>
<view class="delete-icon" @click="delItem(index)">
删除
</view>
</view>
</view>
</view>
<view v-show="spanFlag==2">
<view class="card-list" v-for="(item,index) in sparePartList">
<image class="img-left-large" src="../../../static/emapp/part.png"></image>
<view class="card-info">
<view class="card-info-item">
<text class="card-info-item-text">备件名称:</text>
<text class="card-info-item-text-detail">{{item.FSPAREPARTNAME}}</text>
</view>
<view class="card-info-item">
<text class="card-info-item-text">领用数量:</text>
<text class="card-info-item-text-detail">{{item.FQTY}} {{item.FUNITNAME}}</text>
</view>
</view>
</view>
</view>
<view v-show="spanFlag==3">
<view class="card-list" v-for="(item,index) in workList">
<image class="img-left-middle" src="../../../static/emapp/human.png"></image>
<view class="card-info">
<view class="card-info-item">
<text class="card-info-item-text">维修人:</text>
<text class="card-info-item-text-detail">{{item.FEMPNAME}}</text>
</view>
</view>
</view>
</view>
<view class="addBtn" @click="addConfirm">新增维修记录</view>
</view>
</template>
<script>
import Vue from 'vue';
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
import errorStrUntil from '@/common/errorStrUntil.js';
import {
mapState,
mapMutations
} from 'vuex';
var commonUtil = require('../../../common/util.js');
var _self;
export default {
data() {
return {
dialogNoticeContent:'',
dialogNoticeTitle:'',
dialogNoticeType:'',
showDialog:false,
leftStyle: 0,
startX: 0,
hiddenFlag: true,
delBtnWidth: 220,
currIndex: '',
spanFlag: 1,
ticketData: [],
recordList: [],
sparePartList: [],
workList: [],
orgid: '',
equipmentInfo: [],
FBillNO: '',
FStdValue: '',
};
},
components: {
opsoftDialogNotice
},
onLoad(option) {
this.orgid = uni.getStorageSync('orgid');
let firstPageCurItemInfo = uni.getStorageSync('firstPageCurItemInfoRepair');
console.log(option, firstPageCurItemInfo, 'firstPageCurItemInfo')
if (Object.keys(option).length == 0) {
this.FBillNO = firstPageCurItemInfo.FBILLNO;
} else {
this.FBillNO = option.FBillNO
}
this.getOrderDetailInfo();
},
computed: {
indicatorStyle() {
return {
background: 'rgba(255,0,0,.2)',
height: '40px',
};
},
...mapState(['userInfo'])
},
onBackPress(options) {
if (options.from === 'navigateBack') {
return false;
}
this.back();
return true;
},
methods: {
back() {
uni.redirectTo({
url: 'EQUM03'
})
},
dialogNoticeConfirmClick(){
this.showDialog = false;
},
dialogNoticeProps(err,type){
err = errorStrUntil.handle(err);
this.showDialog = true;
this.dialogNoticeType = 'error';
this.dialogNoticeTitle = '异常提示';
if(type=='success'){
this.dialogNoticeType = 'success';
this.dialogNoticeTitle = '执行成功';
}
this.dialogNoticeContent = err;
},
addConfirm() {
let item = 'addRepairRecord';
uni.navigateTo({
url: 'EQUM03Report?item=' + item
});
},
getOrderDetailInfo: function() {
let requestParams = {
"billNO": this.FBillNO ? this.FBillNO : '',
"basicType": 1,
};
this.$request.get('/RepairOreder/MaintenanceOrder', {params:requestParams}).then(res => {
let _self = this;
let data = res;
_self.ticketData = data;
uni.setStorageSync('ticketDataInfoRepair', _self.ticketData);
_self.recordList = data[0].Body1;
_self.sparePartList = data[0].Body2;
_self.workList = data[0].Body3;
if (_self.ticketData.length > 0) {
if (_self.ticketData[0].FDATE) {
_self.ticketData[0].FDATE = commonUtil.removeLetter(_self.ticketData[0].FDATE);
_self.ticketData[0].FDATE = _self.ticketData[0].FDATE.substr(0, 10) + " " + _self
.ticketData[0].FDATE.substr(10, 8);
}
} else {
uni.showToast({
icon: 'none',
title: '工单表头信息为空'
})
}
}).catch(err => {
uni.hideLoading();
this.dialogNoticeProps(err,'error')
});
},
reportClick: function(item) {
uni.setStorageSync('currRecordListRepair', item);
uni.navigateTo({
url: './EQUM03Report'
})
},
spanClick: function(type) {
this.spanFlag = type;
},
delItem: function(index) {
let requestParams = {
"id": this.userInfo.UserID,
"repair": 1,
"basicType": 1,
"fID": this.recordList[index].FDetailID,
};
this.$request.post({
data: {
action: 'DelBodyAndSparePart',
params: requestParams
}
}).then(res => {
let _self = this;
this.recordList.splice(index, 1);
this.leftStyle = 0;
});
},
// 开始移动时
touchS($event, index) {
// startX记录开始移动的位置
console.log($event);
console.log(index);
this.currIndex = index;
if ($event.touches.length === 1) {
this.startX = $event.touches[0].clientX;
}
// hiddenFlag为true则是从右向左,为false则是从左向右
if (this.leftStyle === 0) {
this.hiddenFlag = true;
} else {
this.hiddenFlag = false;
}
},
touchM($event, index) {
if ($event.touches.length === 1) {
//手指移动时水平方向位置
const moveX = $event.touches[0].clientX;
this.moveFunc(moveX);
}
},
touchE($event, index) {
const {
leftStyle
} = this;
const {
delBtnWidth
} = this;
// 如果停止滑动的距离大于二分之一则直接弹出删除按钮,不然则left为0
if (-leftStyle > delBtnWidth / 2) {
this.leftStyle = -delBtnWidth;
} else {
this.leftStyle = 0;
}
},
moveFunc(moveX) {
// 原始位置向左,leftStyle为小于0;原始位置向右,leftStyle为大于0
// disX为相对最初位置的左右距离
// 大于0为向右,小于0为向左
const disX = moveX - this.startX;
const delBtnWidth = this.delBtnWidth;
let offsetNum = 0;
if (-disX >= delBtnWidth && this.leftStyle === -delBtnWidth) {
return;
}
console.log(disX, this.hiddenFlag);
// this.hiddenFlag为true则是从左到右,则应该将container向左移动
// this.hiddenFlag为false则是从右向左,则应该将container向右移动
if (this.hiddenFlag) {
// 此时container为最右边,则应该将container向左移动
// disX大于0为相对原始位置的向右移动,则直接将offsetNum置为0
// 否则为向左移动,offsetNum为disX相反的值,判断是否超过设置的最大位置
if (disX == 0 || disX > 0) {
offsetNum = 0;
} else {
offsetNum = disX;
if (disX <= -delBtnWidth) {
//控制手指移动距离最大值为删除按钮的宽度
offsetNum = -delBtnWidth;
}
}
} else {
// 此时container为最左边,应该向右移动
// disX小于0为相对原始位置的向左移动,则直接将offsetNum置为-this.delBtnWidth
// 否则为相对原始位置的向右移动,此时应该将最大位置与向右位置的差值为此刻位置,判断是否为大于0
if (disX < 0) {
offsetNum = -this.delBtnWidth;
} else {
offsetNum = -this.delBtnWidth + disX;
if (offsetNum > 0) {
offsetNum = 0;
}
}
}
this.leftStyle = offsetNum;
}
}
};
</script>
<style lang="scss" scoped>
page {
background-color: #F9F9F9;
}
.page {
overflow-x: hidden;
}
.card-info-title-text-detail-left {
color: #8F8F8F;
}
.card-list {
padding: 20rpx 32rpx;
border-radius: 10rpx;
align-items: center;
justify-content: center;
}
.card-info {
margin: 0 0;
padding: 0 0;
}
.img-arrow {
flex-grow: 0;
flex-shrink: 0;
}
.addBtn {
height: 80rpx;
line-height: 80rpx;
width: 100%;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
background-color: #2560C9;
position: fixed;
bottom: 0;
}
.container {
position: relative;
}
.delete-icon {
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
right: -175rpx;
width: 130rpx;
height: 62rpx;
line-height: 62rpx;
border-radius: 31rpx;
font-weight: 500;
font-size: 32rpx;
text-align: center;
color: #FFFFFF;
background: #FF1C1C;
}
</style>
+994
View File
@@ -0,0 +1,994 @@
<template>
<view class="report">
<!-- <date-time-picker ref='actualStarTime' :indicatorStyle='indicatorStyle'
:type='type' :datestring='dateString' @change='actualStarTimeChange'>
</date-time-picker>
<date-time-picker ref='actualEndTime' :indicatorStyle='indicatorStyle'
:type='type' :datestring='dateString' @change='actualEndTimeChange'>
</date-time-picker>
<date-time-picker ref='stopStarTime' :indicatorStyle='indicatorStyle'
:type='type' :datestring='dateString' @change='stopStarTimeChange'>
</date-time-picker>
<date-time-picker ref='stopEndTime' :indicatorStyle='indicatorStyle'
:type='type' :datestring='dateString' @change='stopEndTimeChange'>
</date-time-picker>
<view class="gray-title">
实际执行时间<text>*</text>
</view>
<view class="line-wrapper">
<view class="line-title">
实际开始时间
</view>
<view class="line-child" @click="actualStarDatePicker()">
{{actualStarlist[0].detail}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
实际结束时间
</view>
<view class="line-child" @click="actualEndDatePicker()">
{{actualEndlist[0].detail}}
</view>
</view>
<view class="gray-title">
停机时间<text>*</text>
</view>
<view class="line-wrapper">
<view class="line-title">
停机开始时间
</view>
<view class="line-child" @click="stopStarDatePicker()">
{{stopStarlist[0].detail}}
</view>
</view>
<view class="line-wrapper">
<view class="line-title">
停机结束时间
</view>
<view class="line-child" @click="stopEndDatePicker()">
{{stopEndlist[0].detail}}
</view>
</view> -->
<!-- <view class="gray-title-spare" @click="equipPartClick" v-show="isAddRepairRecode">
<view style="font-size: 26rpx;">
选择部件
</view>
<image src="../../../static/myinfo/right-arrow.png"
style="width: 30rpx;height: 30rpx;margin-right: 10%;"></image>
</view>
<view class="gray-title-spare" v-for="(item,index) in equipPartSelList" :key="index">
<view style="font-size: 22rpx;color: #6D6D72;">
{{item.FName}}
</view>
</view> -->
<view class="order-title">工单执行结果</view>
<view class="card-list">
<view class="card-info-item-text">执行结果</view>
<view class="card-info-item-text-detail">
<checkbox value="cb" :checked="FOrderStatus==0" @click="beforeStarChanged" style="transform:scale(0.7)"/>未执行
<checkbox value="cb" :checked="FOrderStatus==1" @click="onGoingChanged" style="margin-left: 24rpx;transform:scale(0.7)"/>执行中
<checkbox value="cb" :checked="FOrderStatus==2" @click="finishedChanged" style="margin-left: 24rpx;transform:scale(0.7)"/>完成
</view>
</view>
<view class="info-title" v-show="isAddRepairRecode">维修部件</view>
<view class="card-list" style="flex-direction: column;" v-show="isAddRepairRecode">
<view class="card-list-report" v-for="(item,index) in equipPartSelList" :key="index" style="border-bottom: 1px solid #f5f5f5;">
<image class="img-left-small" src="../../../static/emapp/del_red.png" @click="equipPartDel(index)"></image>
<view class="card-info-title-text-detail-left">{{item.FName}}</view>
</view>
<view class="card-list-report" @click="equipPartClick">
<image class="img-left-small" src="../../../static/emapp/add.png"></image>
<view class="card-info-item-text">添加部件</view>
<image class="img-report" src="../../../static/myinfo/right-arrow.png"></image>
</view>
</view>
<view class="info-title">备件领用</view>
<view class="card-list" style="flex-direction: column;">
<view class="card-list-report" v-for="(item,index) in partList" :key="index" style="border-bottom: 1px solid #f5f5f5;">
<image class="img-left-small" src="../../../static/emapp/del_red.png" @click="partDel(index)"></image>
<view class="card-info-title-text-detail-left">{{item.FName}}</view>
<view class="card-info-title-text-detail-left-report">数量:{{item.FQty}}</view>
</view>
<view class="card-list-report" @click="spareListClick">
<image class="img-left-small" src="../../../static/emapp/add.png"></image>
<view class="card-info-item-text">添加备件</view>
<image class="img-report" src="../../../static/myinfo/right-arrow.png"></image>
</view>
</view>
<view class="info-title">维修人</view>
<view class="card-list" style="flex-direction: column;">
<view class="card-list-report" v-for="(item,index) in selWorker" style="border-bottom: 1px solid #f5f5f5;">
<image class="img-left-small" src="../../../static/emapp/del_red.png" @click="workerDel(index)">
</image>
<view class="card-info-title-text-detail-left">{{item.FName}}</view>
<view class="card-info-title-text-detail-left-report">维修工时:{{item.FACraftTime?item.FACraftTime:0}}H
</view>
</view>
<view class="card-list-report" @click="workerListClick">
<image class="img-left-small" src="../../../static/emapp/add.png"></image>
<view class="card-info-item-text">添加维修人</view>
<image class="img-report" src="../../../static/myinfo/right-arrow.png"></image>
</view>
</view>
<view class="info-title">内容及要求</view>
<view class="info-body">
<textarea placeholder="输入内容及要求" v-model="FContentAndRequir" placeholder-class="text-area-holder" class="text-area"></textarea>
</view>
<view class="info-title">备注</view>
<view class="info-body">
<textarea placeholder="输入备注信息" v-model="FNote" placeholder-class="text-area-holder" class="text-area"></textarea>
</view>
<view class="info-title">图片上传<span>仅限jpg、png格式</span></view>
<view class="info-body" style="padding: 20rpx 32rpx;">
<imgUpload :imgArr="imgArray" imgCount="1" ref="imgUpload" :controlCarmalFlag="cameraType"></imgUpload>
</view>
<view @click="save" class="fixed-bottom" v-show="submitShow">提交</view>
<view class="alter" v-if="otherShow" @click="hideAlter"></view>
<view class="worker-alter" v-if="equipPartShow">
<scroll-view scroll-y="true" :style="{'height':scrollHeight}">
<view class="card-list" v-for="(item,index) in equipPartList" style="margin: 24rpx 32rpx;">
<image class="img-left-middle" src="../../../static/emapp/part_blue.png" v-if="item.isChoose"></image>
<image class="img-left-middle" src="../../../static/emapp/part_gray.png" v-if="!item.isChoose"></image>
<view style="display: flex;flex-direction: column;padding-left: 20rpx;">
<view class="worker-alter-details">{{item.FName}}({{item.FNO}})</view>
</view>
<checkbox :checked="item.isChoose" @click="chooseEquipPart(index)"
style="transform: scale(0.7);position: absolute;right: 0;"></checkbox>
</view>
</scroll-view>
<view class="worker-alter-confirm" @click="confirmEquipPart">确定</view>
</view>
<view class="worker-alter" v-if="workerShow" :style="{'height':scrollHeight}">
<scroll-view scroll-y="true" :style="{'height':scrollHeight}">
<view class="card-list" v-for="(item,index) in workerList" style="margin: 24rpx 32rpx;">
<image class="img-left-middle" src="../../../static/emapp/human.png" v-if="item.isChoose"></image>
<image class="img-left-middle" src="../../../static/emapp/human_gray.png" v-if="!item.isChoose">
</image>
<view style="display: flex;flex-direction: column;padding-left: 20rpx;">
<view class="worker-alter-details">{{item.FName}}({{item.FNO}})</view>
<view class="worker-alter-time">
维修工时:
<input v-model="item.FACraftTime" type="number"
:class="[item.isChoose?'worker-alter-time-input-select':'worker-alter-time-input']" />H
</view>
</view>
<checkbox :checked="item.isChoose" @click="chooseWorker(index)"
style="transform: scale(0.7);position: absolute;right: 0;"></checkbox>
</view>
</scroll-view>
<view class="worker-alter-confirm" @click="confirmWorker">确定</view>
</view>
<view class="sparePart" v-show="sparePartShow">
<scroll-view scroll-y="true" :style="{'height':scrollHeightPart}">
<view class="card-list" v-for="(i, k) in dataList" :key="k"
style="margin: 32rpx 32rpx 0 32rpx;padding: 0 0;">
<view class="card-info"
style="background-color: #FFFFFF;margin-left: 0;border-radius: 10rpx;padding-bottom: 20rpx;">
<view class="card-info-item"
style="margin: 0 32rpx;position: relative;padding: 20rpx 0 8rpx 0;">
<view class="sparePart-title">{{i.FName}}</view>
<view class="sparePart-count">
<view class="min" @click="minClick(k)">
<image class="sparePart-count-img" src="../../../static/emapp/min_blue.png"
v-if="!i.minForbidden"></image>
<image class="sparePart-count-img" src="../../../static/emapp/min_gray.png"
v-if="i.minForbidden"></image>
</view>
<input type="number" class="sparePart-count-input" v-model="i.num" @input="partCountInput(i)"></input>
<view class="pluse" @click="pluseClick(k)">
<image class="sparePart-count-img" src="../../../static/emapp/add.png"></image>
</view>
</view>
</view>
<view class="card-info-item-text"
style="width: 100%;color: #8a8a8e;font-size: 28rpx;padding-left: 32rpx;">备件代码: {{i.FBillNO}}
</view>
<view class="card-info-item-text"
style="width: 100%;color: #8a8a8e;font-size: 28rpx;padding-left: 32rpx;">
规格型号:{{i.FEqModel || '-'}}
</view>
<view class="card-info-item-text"
style="width: 100%;color: #8a8a8e;font-size: 28rpx;padding-left: 32rpx;">
备件库存:{{i.FQty ? i.FQty : '-'}}
</view>
</view>
</view>
</scroll-view>
<view class="confirmBtn" @click="confirm">确定</view>
</view>
<view style="height: 200rpx;width: 100%;"></view>
</view>
</template>
<script>
import DateTimePicker from '@/components/bory-dateTimePicker/bory-dateTimePicker.vue';
import imgUpload from '@/components/poiuy-uImgUpload/imgUpload.vue';
import { pathToBase64, base64ToPath } from '@/js_sdk/mmmm-image-tools/index.js';
import Vue from 'vue';
import {
mapState,
mapMutations
} from 'vuex';
var commonUtil = require('../../../common/util.js');
export default {
computed: {
indicatorStyle() {
return {
background: 'rgba(255,0,0,.2)',
height: '40px',
};
},
...mapState(['userInfo'])
},
components: {
DateTimePicker,
imgUpload
},
data() {
return {
cameraType:0,
windowHeight:'',
scrollHeight:'',
scrollHeightPart:'',
currRecordList:[],
ticketDataInfo:[],
FOrderStatus:0,
dateString: '',
type: 'datetime-all',
FContentAndRequir:'',
FNote:'',
actualStarlist: [{
type: 'datetime-all',
// title: '展示年月日时分秒',
detail: '选择开始时间'
}],
actualEndlist: [{
type: 'datetime-all',
// title: '展示年月日时分秒',
detail: '选择结束时间'
}],
stopStarlist: [{
type: 'datetime-all',
// title: '展示年月日时分秒',
detail: '选择停机开始时间'
}],
stopEndlist: [{
type: 'datetime-all',
// title: '展示年月日时分秒',
detail: '选择停机结束时间'
}],
partList:[],
workerList:[],
otherShow:false,
workerShow:false,
submitShow:true,
OrderEntryInfo:[],
FInterID:'',
IsNew:1,
FMaintManID:[],
FMachinePartID:'',
selWorker:[],
empNO:'',
imgArray:new Array(),
imgBase64Url:new Array(),
equipPartList:[],
equipPartSelList:[],
equipPartShow:false,
sparePartShow:false,
dataList: [],
orgid:'',
commitList:[],
userID:'',
selCondition:['全部备件查询', '设备编号查询', '备件名称查询', '设备编号+备件名称查询'],
selConditionIndex:0,
basicType:0,
equipID:'',
sparePartName:'',
isAddRepairRecode:false,
curDate: '',
};
},
onLoad(options) {
//debugger
const res = uni.getSystemInfoSync();
this.windowHeight = res.windowHeight;
this.scrollHeight = (this.windowHeight-180)+'px';
this.scrollHeightPart = (this.windowHeight-220)+'px';
let sysParameterCameraType = uni.getStorageSync('getSysParameterCameraType');
this.cameraType = parseInt(sysParameterCameraType);
this.userID = this.userInfo.ID;
this.orgid = uni.getStorageSync('orgid');
let firstPageInfo = uni.getStorageSync('firstPageCurItemInfoRepair');
if(Object.keys(options).length==0){
this.isAddRepairRecode = false;
this.currRecordList = uni.getStorageSync('currRecordListRepair');
this.ticketDataInfo = uni.getStorageSync('ticketDataInfoRepair');
this.FInterID = this.ticketDataInfo[0].FINTERID;
this.equipID = this.ticketDataInfo[0].FITEMID;
this.getReportInfo();
this.getWorkerInfo();
this.getPartList();
}else{
this.isAddRepairRecode = true;
this.ticketDataInfo = uni.getStorageSync('ticketDataInfoRepair');
this.FInterID = this.ticketDataInfo[0].FINTERID;
this.equipID = this.ticketDataInfo[0].FITEMID;
this.getWorkerInfo();
this.getPartList();
this.getEquipPartList(this.equipID);
}
},
methods: {
getReportInfo(){
let _self = this;
let requestParams = {
"basicType":1,
"detailID":this.currRecordList.FDETAILID,
};
this.$request.get('/RepairOreder/MaintenanceOrderEntry',{params:requestParams}).then(res => {
let data = res;
this.FMaintManID = [];
if(data){
if(data.Body1.length>0){
this.OrderEntryInfo = data.Body1[0];
this.FOrderStatus = this.OrderEntryInfo.FOrderStatus;
if(this.FOrderStatus == 3){
this.submitShow = false;
}
this.FCondition = this.OrderEntryInfo.FCONDITION;
this.FScore = this.OrderEntryInfo.FSCORE;
this.FExplain = this.OrderEntryInfo.FEXPLAIN;
this.FMachinePartID = this.OrderEntryInfo.FMACHINEPARTID;
this.FInterID = this.OrderEntryInfo.FINTERID;
this.FContentAndRequir = this.OrderEntryInfo.FCONTENTSANDREQUIREMENTS;
this.FNote = this.OrderEntryInfo.FNOTE
}
if(data.Body2.length>0){
data.Body2.forEach(
function(el){
let arr = {
FInterID:el.FSPAREPARTID,
FBillNO:_self.OrderEntryInfo.FBILLNO,
FName:el.FSPAREPARTNAME,
FEqModel:el.FEqModel,
FQty:el.FQTY
}
_self.partList.push(arr)
}
);
}
if(data.Body3.length>0){
data.Body3.forEach(
function(el){
let arr = {"FName":el.FEMPNAME,"FID":el.FMAINTMANID,"FACraftTime":el.FACRAFTTIME?el.FACRAFTTIME:0};
let arrID = {"FMaintID":el.FMAINTMANID,"FACraftTime":el.FACRAFTTIME?el.FACRAFTTIME:0};
_self.selWorker.push(arr);
_self.FMaintManID.push(arrID)
}
);
}
console.log(_self.selWorker)
}
});
},
getEquipPartList(equipPartNO){
let _self = this;
let requestParams = {
"basicType": 3,
"fNO": equipPartNO,
"fName": '',
"type": 0
};
this.$request.get('/RepairOreder/GetEquipmentBasicData', {
params: requestParams
}).then(res => {
let data = res
if (data && data.length > 0) {
let equipPartList = data;
_self.equipPartList = equipPartList.map(
function(el) {
return {
"FID": el.FID,
"FNO": el.FNO,
"FName": el.FNAME,
"FCOMPANYID": el.FCOMPANYID,
"isChoose": false
}
}
)
}
});
},
equipPartClick(){
this.otherShow = true;
this.equipPartShow = true;
this.submitShow = false;
},
chooseEquipPart:function(index){
this.equipPartList[index].isChoose = !this.equipPartList[index].isChoose;
this.equipPartSelList = this.equipPartList.filter(
function(el){
return el.isChoose == true;
}
);
},
confirmEquipPart:function(){
if(this.equipPartSelList.length==1){
this.FMachinePartID = this.equipPartSelList[0].FID;
this.otherShow = false;
this.equipPartShow = false;
this.submitShow = true;
}
else if(this.equipPartSelList.length>1){
uni.showModal({
title:"温馨提示",
content:"只能选择一个部件",
showCancel:false
})
this.equipPartSelList = [];
return false;
}
else{
uni.showModal({
title:"温馨提示",
content:"请选择一个部件",
showCancel:false
})
return false;
}
},
equipPartDel(index){
this.equipPartSelList.splice(index,1);
this.FMachinePartID = ''
},
getWorkerInfo(){
let _self = this;
let orgID = uni.getStorageSync('orgID');
//+orgId
let requestParams = {
"basicType": 10,
"basicNO":this.empNO,
"orgId":orgID
};
this.$request.get('/SysConfigData/QueryResource',{params:requestParams}).then(res => {
let data = res;
if(data && data.length>0){
let workerList = data;
_self.workerList = workerList.map(
function(el){
return {
"FID":el.FID,
"FNO":el.FNO,
"FName":el.FNAME,
"FCOMPANYID":el.FCOMPANYID,
"isChoose":false,
"FACraftTime":''
}
}
);
}
});
},
spareListClick(){
this.submitShow = false;
this.otherShow = true;
this.sparePartShow = true;
},
workerListClick(){
this.otherShow = true;
this.workerShow = true;
this.submitShow = false;
},
hideAlter(){
this.otherShow = false;
this.workerShow = false;
this.sparePartShow = false;
this.equipPartShow = false;
this.submitShow = true;
},
chooseWorker:function(index){
this.workerList[index].isChoose = !this.workerList[index].isChoose;
this.selWorker = this.workerList.filter(
function(el){
return el.isChoose == true;
}
);
},
workerDel(index) {
this.selWorker.splice(index, 1);
this.FMaintManID.splice(index, 1);
},
confirmWorker:function(){
if(this.selWorker.length>=1){
// this.FMaintManID = this.selWorker[0].FID;
let FMaintManIDList = [];
this.selWorker.forEach(
function(el) {
let arr = {"FMaintID":el.FID,"FACraftTime":el.FACraftTime?el.FACraftTime:0};
FMaintManIDList.push(arr)
}
)
this.FMaintManID = FMaintManIDList;
}
this.otherShow = false;
this.workerShow = false;
this.submitShow = true;
},
beforeStarChanged() {
this.FOrderStatus = 0;
},
onGoingChanged() {
this.FOrderStatus = 1;
let date = new Date();
this.curDate = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() + " " + date
.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
console.log(this.curDate)
},
finishedChanged() {
this.FOrderStatus = 2;
let date = new Date();
this.curDate = date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() + " " + date
.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
console.log(this.curDate)
},
actualStarDatePicker() {
this.type = 'datetime-all';
this.$refs['actualStarTime'].show();
},
actualStarTimeChange(value) {
let item = this.actualStarlist[0];
item['detail'] = value;
},
actualEndDatePicker() {
this.type = 'datetime-all';
this.$refs['actualEndTime'].show();
},
actualEndTimeChange(value) {
let item = this.actualEndlist[0];
item['detail'] = value;
},
stopStarDatePicker() {
this.type = 'datetime-all';
this.$refs['stopStarTime'].show();
},
stopStarTimeChange(value) {
let item = this.stopStarlist[0];
item['detail'] = value;
},
stopEndDatePicker() {
this.type = 'datetime-all';
this.$refs['stopEndTime'].show();
},
stopEndTimeChange(value) {
let item = this.stopEndlist[0];
item['detail'] = value;
},
timeCompare:function(sTime,eTime){
let compareResult;
let beginTime = sTime;
let endTime = eTime;
let beginTimes=beginTime.substring(0,10).split('-');
let endTimes=endTime.substring(0,10).split('-');
beginTime=beginTimes[1]+'-'+beginTimes[2]+'-'+beginTimes[0]+' '+beginTime.substring(10,19);
endTime=endTimes[1]+'-'+endTimes[2]+'-'+endTimes[0]+' '+endTime.substring(10,19);
let minTime =(Date.parse(endTime)-Date.parse(beginTime))/3600/1000;
if(minTime>0){
compareResult = true;
}else{
compareResult = false;
}
return compareResult;
},
save(){
let _self = this;
if(_self.$refs.imgUpload.imgArray.length > 0 && _self.$refs.imgUpload.imgArray != ""){
_self.uploadImageCurrent()
}
else {
_self.handleSubmit("")
}
},
handleSubmit(imagurl){
let _self = this;
let FIsStopMachine = true;
if(this.isAddRepairRecode){
FIsStopMachine = true;
this.IsNew = 1;
if(this.FMachinePartID.length<=0){
uni.showModal({
title:"温馨提示",
content:"请选择一个部件",
showCancel:false
})
return false;
}
}else{
this.IsNew = 0;
FIsStopMachine = this.ticketDataInfo[0].FISSTOPMACHINE;
}
this.imgBase64Url = imagurl;
let repair = [{"IsNew":this.IsNew,"FInterID":this.FInterID,"FDetailID":this.currRecordList.FDETAILID,
"FMachinePartID":this.FMachinePartID,
// "FAStartTime":this.actualStarlist[0].detail,"FAEndTime":this.actualEndlist[0].detail,"FMachineStopStart":this.stopStarlist[0].detail,"FMachineStopEnd":this.stopEndlist[0].detail,
"FIsStopMachine":FIsStopMachine,"FNote":this.FNote,
"FOrderStatus":this.FOrderStatus,"FRequirements":this.FContentAndRequir,"FImage":this.imgBase64Url}]
let spareParts = this.partList;
let empData = this.FMaintManID;
let requestParams = {
"basicType":1,
"repair":repair,
"empData": empData,
"spareParts":spareParts,
};
this.$request.post('/RepairOreder/MaintenanceReport',requestParams).then(res => {
let data = res;
uni.redirectTo({
url:'EQUM03Item'
});
});
},
uploadImageCurrent(){
let _self = this;
let imgCheck = false;
if(_self.$refs.imgUpload.imgArray.length > 0) {
let imgIndex = _self.$refs.imgUpload.imgArray[0].indexOf("http");
if(imgIndex != 0) {
imgCheck = true;
}
}
if(imgCheck) {
let url = _self.$global.globalData.requestUrl;
let fileName = _self.currRecordList.FDetailID +"-"+ Date.parse(new Date());
// _self.taskItem.SubItem[_self.currentIndex].imgArray = _self.$refs.imgUpload.imgArray;
_self.$refs.imgUpload.upload(
res=>{
let data = res[0];
if(data.StatusCode == "200") {
let imageUrl = data.Data;
// imageUrl = imageUrl + data.data;
// imageUrl = imageUrl.replace('"', '');
// imageUrl = imageUrl.replace('"', '');
// imageUrl = imageUrl.replace('\\', '');
// imageUrl = imageUrl.replace('\\', '/');
this.handleSubmit(imageUrl);
uni.showToast({
icon: 'success',
title: "图片上传成功"
});
}
else {
//用户没有上传图片的返回 code码为400
uni.showToast({
icon: 'none',
title: "图片上传失败"
});
}
},
_self.userInfo, fileName, url);
}
else{
let imageUrl = _self.$refs.imgUpload.imgArray[0];
this.handleSubmit(imageUrl);
}
return imgCheck;
},
bindPickerChange: function(e) {
this.selConditionIndex = e.target.value;
this.basicType = e.target.value;
},
getPartList(){
//debugger
let requestParams = {
"basicType":this.basicType,
"equipID":this.equipID,
"sparePartName":this.sparePartName,
};
this.$request.get('/SparePart/GetSparePart',{params:requestParams}).then(res => {
let _self = this;
let data = res;
_self.dataList = [];
if(data && data.length > 0){
data.forEach(
function(el){
let arr = {
FBillNO:el.FBILLNO,
FName:el.FNAME,
FEqModel:el.FEQMODEL,
FQty:el.FQTY,
FInterID:el.FINTERID,
num:0,
minForbidden:true,
};
_self.dataList.push(arr);
}
);
}
});
},
partCountInput:function(item){
let _self = this;
item.num = parseInt(item.num);
let storageQty = parseInt(item.FQty);
if (item.num <0) {
item.num = 0;
uni.showToast({
title:'数量不能小于0',
icon:'none'
})
return
}
if(item.num > storageQty){
uni.showModal({
title: '提示',
content:'领用数量不能大于库存数量',
showCancel:false,
success: function (res) {
if (res.confirm) {
item.num = 0;
}
}
});
}
},
minClick:function(k){
let _self = this;
let index = k;
if(this.dataList[index].num<=0){
this.dataList[index].minForbidden = true
uni.showToast({
title:'数量不可小于0',
icon:'none'
})
return false
}else{
this.dataList[index].num = this.dataList[index].num - 1;
let storageQty = parseInt(this.dataList[index].FQty);
if(this.dataList[index].num > storageQty){
uni.showModal({
title: '提示',
content:'领用数量不能大于库存数量',
showCancel:false,
success: function (res) {
if (res.confirm) {
_self.dataList[index].num = 0;
}
}
});
}
}
},
pluseClick:function(k){
let _self = this;
let index = k;
this.dataList[index].minForbidden = false;
this.dataList[index].num = Number(this.dataList[index].num)+ 1;
let storageQty = parseInt(this.dataList[index].FQty);
if(this.dataList[index].num > storageQty){
uni.showModal({
title: '提示',
content:'领用数量不能大于库存数量',
showCancel:false,
success: function (res) {
if (res.confirm) {
_self.dataList[index].num = 0;
}
}
});
}
},
partDel(index) {
this.partList.splice(index, 1)
},
confirm(){
let _self = this;
_self.commitList = [];
if(this.dataList && this.dataList.length>0){
this.dataList.forEach(
function(el){
if(el.num != 0){
let arr = {
FBillNO:el.FBillNO,
FEqModel:el.FEqModel,
FInterID:el.FInterID,
FName:el.FName,
FQty:el.num
};
_self.commitList.push(arr)
}
}
);
this.partList = this.commitList;
}
this.otherShow = false;
this.sparePartShow = false;
this.submitShow = true;
}
}
};
</script>
<style lang="scss">
page {
background-color: #F7F7F7;
// overflow: hidden;
}
.report{overflow: hidden;}
.card-list-report {
position: relative;
width: 100%;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
padding: 20rpx 0;
}
.card-info-title-text-detail-left-report {
position: absolute;
right: 0;
}
.img-report {
position: absolute;
right: 0;
height: 20rpx;
width: 20rpx;
}
.card-info-item-text {
text-align: left;
}
span {
font-size: 24rpx;
font-family: PingFangSC, PingFangSC-Regular;
font-weight: 400;
color: #cacaca;
margin-left: 16rpx;
}
.alter{
position: fixed;
left: 0;
right: 0;
top:0;
bottom: 0;
background-color: #333333;
opacity: 0.5;
}
.err{
position: fixed;
left: 100rpx;
right: 100rpx;
top: 400rpx;
background-color: #FFFFFF;
border-radius: 20rpx;
opacity: 1;
z-index: 5;
}
.alter-head{
display: flex;
flex-wrap: nowrap;
}
.errTitle{
height: 80rpx;
line-height: 80rpx;
width: 100%;
font-size: 32rpx;
text-align: center;
border-bottom: 2rpx solid #3D3D3D;
}
.errTitle-search{
height: 80rpx;
line-height: 80rpx;
width: 100%;
color: #C0C0C0;
font-size: 28rpx;
text-align: center;
border-bottom: 2rpx solid #3D3D3D;
}
.errList{
width: 100%;
margin-left: 30%;
display: flex;
align-items: center;
// justify-content: space-between;
// flex-direction: column;
}
.errDetails{
/* width: 90%; */
font-size: 26rpx;
color: #3D3D3D;
}
.errConfirm{
height: 80rpx;
line-height: 80rpx;
width: 100%;
font-size: 32rpx;
text-align: center;
color: #007AFF;
border-top: 2rpx solid #3D3D3D;
}
.confirmBtn{
height: 80rpx;
line-height: 80rpx;
width: 100%;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
background-color: #2560C9;
position: fixed;
bottom: 0;
}
.fixed-bottom {
height: 80rpx;
background-color: #2f7fe3;
font-size: 16px;
text-align: center;
line-height: 80rpx;
color: #fff;
position: fixed;
bottom: 0;
z-index: 20;
width: 100%;
}
</style>
+276
View File
@@ -0,0 +1,276 @@
<template>
<view>
<view class="top-row-class" style="height: 60rpx; justify-content: flex-end;">
<text class="top-row-title-class">查询条件:</text>
<view class="selCondition">
<picker @change="bindPickerChange" :value="selConditionIndex" :range="selCondition">
<view class="uni-input">{{selCondition[selConditionIndex]}}</view>
</picker>
</view>
<input class="top-row-input-class" placeholder="输入搜索内容"></input>
<image class="scanImg" src="../../../static/img/scanning.png"></image>
</view>
<view class="card-wrapper" style="padding-bottom: 24rpx;">
<view v-for="(i, k) in dataList" :key="k" class="inner">
<view class="left-content">
<view class="title-s">{{i.FName}}</view>
<view class="slave-s">物料代码: {{i.FBillNO}}</view>
<view class="slave-k">
<text>规格型号:{{i.FEqModel || '-'}}</text>
</view>
</view>
<view class="right-cintent" style="display: flex;">
<view class="min" @click="minClick(k)">
<image src="../../../static/icon/min.png" v-if="!i.minForbidden"
style="width: 40rpx;height: 40rpx;"></image>
<image src="../../../static/icon/min-gray.png" v-if="i.minForbidden"
style="width: 40rpx;height: 40rpx;"></image>
</view>
<input type="number" class="count-input" v-model="i.num"></input>
<view class="pluse" @click="pluseClick(k)">
<image src="../../../static/icon/plus.png" style="width: 40rpx;height: 40rpx;"></image>
</view>
</view>
</view>
</view>
<view class="confirmBtn" @click="confirm">确定</view>
</view>
</template>
<script>
import Vue from 'vue';
import {
mapState,
mapMutations
} from 'vuex';
export default {
computed: {
...mapState(['userInfo'])
},
onLoad(options) {
if(options.item && options.item.length>0){
this.pageKey = options.item;
}
this.userID = this.userInfo.ID;
this.orgid = uni.getStorageSync('orgid');
this.getPartList();
},
data() {
return {
dataList: [],
orgid:'',
commitList:[],
userID:'',
pageKey:'',
selCondition:['全部备件查询', '设备编号查询', '备件名称查询', '设备编号+备件名称查询'],
selConditionIndex:0,
basicType:0,
equipID:'',
sparePartName:''
};
},
methods: {
bindPickerChange: function(e) {
this.selConditionIndex = e.target.value;
this.basicType = e.target.value;
},
getPartList(){
let requestParams = {
"id": this.userInfo.UserID,
"basicType":this.basicType,
"equipID":this.equipID,
"sparePartName":this.sparePartName,
};
this.$request.post({
data: {
action: 'GetSparePart',
params: requestParams
}
}).then(res => {
let _self = this;
let data = JSON.parse(res);
_self.dataList = [];
if(data && data.length>0){
data.forEach(
function(el){
let arr = {
FBillNO:el.FBillNO,
FName:el.FName,
FEqModel:el.FEqModel,
FCount:el.FCount,
FItemID:el.FItemID,
num:0,
minForbidden:true
};
_self.dataList.push(arr);
}
);
}
});
},
minClick:function(k){
let index = k;
if(this.dataList[index].num<=0){
this.dataList[index].minForbidden = true
uni.showToast({
title:'数量不可小于0',
icon:'none'
})
return false
}else{
this.dataList[index].num = this.dataList[index].num - 1;
}
},
pluseClick:function(k){
let index = k;
this.dataList[index].minForbidden = false;
this.dataList[index].num = Number(this.dataList[index].num)+ 1;
},
confirm(){
let _self = this;
let FInterID = uni.getStorageSync('FInterID');
if(this.dataList && this.dataList.length>0){
this.dataList.forEach(
function(el){
if(el.num != 0){
let arr = {
FItemID:el.FItemID,
FCount:el.num,
FName:el.FName
};
_self.commitList.push(arr)
}
}
);
uni.setStorageSync('partInfo',this.commitList)
}else{
uni.showToast({
title:'当前未领用备件',
icon:'none'
})
uni.setStorageSync('partInfo',this.commitList)
}
let item = JSON.stringify(this.commitList);
}
},
}
</script>
<style lang="scss" scoped>
// @import './MESQS44/style.scss';
.top-row-class{
display: flex;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: center;
height: 50rpx;
line-height: 50rpx;
// padding-top: 10rpx;
// padding-bottom: 10rpx;
// padding-left: 24rpx;
// padding-right: 24rpx;
margin-left: 32rpx;
margin-right: 32rpx;
flex-shrink: 0;
flex-grow: 0;
background-color: #FFFFFF;
margin-top: 10rpx;
margin-bottom: 16rpx;
border-radius: 10rpx;
}
.uni-input{
display: flex;
border: 1px solid #D8D8D8;
color: #666666;
padding: 5rpx 10rpx;
border-radius: 10rpx;
flex-wrap: nowrap;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.top-row-title-class{
text-align: end;
font-size: 30rpx;
font-style: auto;
color: #666666;
flex-shrink: 0;
flex-grow: 0;
line-height: 50rpx;
height: 50rpx;
// width: 150rpx;
flex-wrap: nowrap;
}
.top-row-input-class{
position: relative;
font-size: 30rpx;
color: #6B6B6B;
// width: 100%;
padding-left: 15rpx;
padding-right: 15rpx;
border-radius: 10rpx;
border: 1px solid #D8D8D8;
height: 60rpx; line-height: 60rpx;
margin-left: 32rpx;
}
.scanImg{
height: 40rpx;
width: 40rpx;
position: absolute;
right: 48rpx;
}
.inner {
display: flex;
padding: 4rpx 5% 10rpx 5%;
border-bottom: 1px solid #F7F7F7;
align-items: center;
justify-content: space-between;
}
.title-s {
color: #222222;
font-size: 14px;
}
.slave-s {
color: #858585;
font-size: 12px;
}
.slave-k {
color: #858585;
font-size: 12px;
display: flex;
justify-content: space-between;
}
.count-input{
height: 40rpx;
line-height: 40rpx;
width: 100rpx;
border: 1px solid #6D6D72;
border-radius: 10rpx;
margin: 0 10rpx;
text-align: center;
}
.confirmBtn{
height: 80rpx;
line-height: 80rpx;
width: 100%;
position: fixed;
bottom: 0;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
background-color: #2560C9;
}
</style>
+159
View File
@@ -0,0 +1,159 @@
.search-wrapper {
z-index: 20;
display: flex;
padding: 12rpx 1% 12rpx 5%;
position: fixed;
width: 100%;
height: 88rpx;
line-height: 88rpx;
background-color: white;
.search-selector {
position: relative;
top: 1rpx;
height: 64rpx;
width: 25%;
background-color: #f5f5f5;
color: #666666;
text-align: center;
line-height: 64rpx;
}
}
.card-wrapper {
// padding-top: 92rpx;
.accurate-wrapper{
width: 100%;
background-color: white;
padding-left: 37rpx;
padding-bottom: 2%;
.accurate-title{
font-size: 16px;
font-weight: bold;
color: #454545;
}
.accurate-inner{
font-size: 14px;
font-weight: 400;
color: #2c2c2c;
text-align: right;
}
.accurate-input{
margin-left: 24rpx;
font-size: 14px;
font-weight: 400;
color: #7d7d7d;
}
}
.card-item {
width: 100%;
height: 128px;
background-color: #fff;
border-bottom: 1px solid #efefef;
display: flex;
.icon-wrapper{
display: flex;
flex-direction: column;
justify-content: center;
line-height: 85px;
width: 15%;
height: 100%;
padding-left: 5%;
}
.text-wrapper{
width: 80%;
padding-left: 6%;
display: flex;
flex-direction: column;
justify-content: center;
.text-title{
font-size: 16px;
font-weight: 500;
color: #474747;
}
text{
font-size: 12px;
font-weight: 400;
color: #474747;
}
}
.arrow-wrapper{
display: flex;
flex-direction: column;
justify-content: center;
line-height: 85px;
width: 10%;
padding-right: 5%;
}
}
}
.report{
padding-bottom: 120rpx;
overflow-x: hidden;
.gray-title{
padding: 0 5%;
height: 80rpx;
font-size: 12px;
font-weight: 400;
color: #797979;
line-height: 80rpx;
text{
position: relative;
top: 3px;
margin-left: 8rpx;
color: red;
}
}
.line-wrapper{
width: 100%;
height: 80rpx;
background-color: white;
padding: 0 1%;
padding-left: 5%;
border-bottom: 1px solid #F5F5F5;
display: flex;
justify-content: space-between;
.line-title{
line-height: 80rpx;
font-size: 26rpx;
font-weight: 400;
color: #2c2c2c;
}
.line-child{
line-height: 80rpx;
font-size: 26rpx;
font-weight: 400;
color: #7d7d7d;
padding-right: 10%;
}
}
.textarea-wrapper{
background-color: white;
padding: 0 5%;
border-bottom: 1px solid #F5F5F5;
}
}
.fixed-bottom {
height: 80rpx;
background-color: #2f7fe3;
font-size: 16px;
text-align: center;
line-height: 80rpx;
color: #fff;
position: fixed;
bottom: 0;
z-index: 20;
width: 100%;
}