931 lines
26 KiB
Vue
Executable File
931 lines
26 KiB
Vue
Executable File
<template>
|
||
<view class="page">
|
||
<view class="top-row-class" v-if="scannFlag" style="height: 60rpx;">
|
||
<text class="top-row-title-class">条码:</text>
|
||
<input class="top-row-input-class" style="margin-right: 20rpx;"
|
||
v-model="barcode" @confirm="newTaskConfirm" @input="onKeyInput"></input>
|
||
<image src="../../../static/img/scanning.png" @tap="scanOnClick"></image>
|
||
</view>
|
||
<view class="top-row-class">
|
||
<text class="top-row-title-class">单据编号:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FBillNO}}</text>
|
||
</view>
|
||
<view class="top-row-class">
|
||
<text class="top-row-title-class">工序:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FProcessName}}</text>
|
||
</view>
|
||
<view class="top-row-class">
|
||
<text class="top-row-title-class">料号名称:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FMaterialName}}</text>
|
||
</view>
|
||
<view class="top-row-class">
|
||
<text class="top-row-title-class">规格型号:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FModel}}</text>
|
||
</view>
|
||
<view class="top-row-class">
|
||
<text class="top-row-title-class">单位:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FUnitName}}</text>
|
||
</view>
|
||
<view class="top-row-class" v-if="prgKey=='MESQS19'">
|
||
<text class="top-row-title-class">部门:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FDeptName}}</text>
|
||
</view>
|
||
<view class="top-row-class" v-if="prgKey=='MESQS19'">
|
||
<text class="top-row-title-class">任务单号:</text>
|
||
<text class="top-row-context-class">{{taskItem.headData.FFCBillNO}}</text>
|
||
</view>
|
||
<view class="top-row-multi-class" v-if="prgKey=='MESQS19'">
|
||
<text class="top-row-title-class">备注:</text>
|
||
<textarea class="top-row-multi-text-class" :disabled="taskItem.headData.FStatus==40"
|
||
v-model="taskItem.headData.FNote" @input="onKeyInput"></textarea>
|
||
</view>
|
||
<view class="top-row-class" v-if="prgKey=='MESQS11'">
|
||
<text class="top-row-title-class">检验方式:</text>
|
||
<xfl-select :list="checkWayArray" :clearable="false" :isCanInput="false" ref="checkWayArrayRef"
|
||
@change="checkWayChange" :defaultSelectText="taskItem.headData.FTestTypeName" class="top-row-xfl-class"/>
|
||
</view>
|
||
<view class="top-row-class" v-if="prgKey=='MESQS11'" style="height: 60rpx; margin-top: 10rpx;">
|
||
<view class="top-row-col-class">
|
||
<text class="top-row-title-class">数量:</text>
|
||
<input class="top-row-input-class" style="margin-right:20rpx;"
|
||
v-model="taskItem.headData.FQty" @input="onKeyInput"></input>
|
||
</view>
|
||
<view class="top-row-col-class">
|
||
<text class="top-row-title-class">送检数量:</text>
|
||
<input class="top-row-input-class" @input="onKeyInput"
|
||
v-model="taskItem.headData.FCount"></input>
|
||
</view>
|
||
</view>
|
||
<view class="top-row-class" v-if="prgKey=='MESQS11'" style="height: 60rpx; margin-top: 10rpx;">
|
||
<view class="top-row-col-class">
|
||
<text class="top-row-title-class">合格数:</text>
|
||
<input class="top-row-input-class" style="margin-right:20rpx;"
|
||
v-model="taskItem.headData.FAcceptQty" @input="onKeyInput"></input>
|
||
</view>
|
||
<view class="top-row-col-class">
|
||
<text class="top-row-title-class">不合格数:</text>
|
||
<input class="top-row-input-class" v-model="taskItem.headData.FUnAcceptQty" @input="onKeyInput"></input>
|
||
</view>
|
||
</view>
|
||
<view class="top-row-class" style="height: 60rpx; margin-top: 10rpx;">
|
||
<text class="top-row-title-class">检验结果:</text>
|
||
<xfl-select :list="checkResultArray" :clearable="false" :isCanInput="false" ref="checkResultArrayRef"
|
||
@change="checkResultChange" :defaultSelectText="taskItem.headData.FTestResultName" class="top-row-xfl-class"/>
|
||
</view>
|
||
<view style="height: 10px; background-color: #FFFFFF;"></view>
|
||
<view style="height: 10px; background-color: #F8F8F8"></view>
|
||
|
||
<view class="detail-subtitle-class">首检项目</view>
|
||
<view v-for="(item,index) in this.taskItem.itemArray">
|
||
<view class= "detail-row-class" @tap="itemClick(index)">
|
||
<image class="detail-row-item-image-class" src="../../../static/img/FCheckIteam.png"></image>
|
||
<view class="detail-row-content">
|
||
<text class="detail-row-title1-class">项目序号:{{item.FEntryID}}</text>
|
||
<text class="detail-row-title1-class">项目名称:{{item.FTestProjectName}}</text>
|
||
</view>
|
||
<text class="detail-row-content-red-class" v-if="item.FTestResult == 0">未完成</text>
|
||
<image class="my-image" src="../../../static/img/rightarrowred.png" v-if="item.FTestResult == 0"></image>
|
||
<text class="detail-row-content-green-class" v-if="item.FTestResult == 1">合格</text>
|
||
<text class="detail-row-content-green-class" v-if="item.FTestResult == 2">不合格</text>
|
||
<image class="my-image" src="../../../static/img/rightarrowgreen.png" v-if="item.FTestResult != 0"></image>
|
||
</view>
|
||
<view class="detail-row-line-class"/>
|
||
</view>
|
||
<view style="height: 80rpx; flex-shrink: 0; flex-grow: 0;"></view>
|
||
<view class="bottom-row-class">
|
||
<view @tap="saveBtnClick()" class="saveBtnClass" v-if="taskItem.headData.FStatus!=40">保存</view>
|
||
<view @tap="sumbitBtnClick()" class="sumbitBtnClass" v-if="taskItem.headData.FStatus!=40">提交</view>
|
||
<view @tap="cancelBtnClick()" class="cancelBtnClass" v-if="taskItem.headData.FStatus==40">取消提交</view>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<script>
|
||
import xflSelect from '../../../components/xfl-select/xfl-select.vue';
|
||
import Vue from 'vue';
|
||
import {
|
||
mapState,
|
||
mapMutations
|
||
} from 'vuex';
|
||
var _self;
|
||
|
||
export default {
|
||
data() {
|
||
return {
|
||
scrollTop: 0,
|
||
old: {
|
||
scrollTop: 0
|
||
},
|
||
|
||
barcode:null,
|
||
scannFlag:false,
|
||
taskItem: new Object(),
|
||
prgKey:"MESQS19",
|
||
backFlag:true,
|
||
checkWayArray:[{value:"全检", key:1}, {value:"抽检", key:2}],
|
||
checkResultArray:[{value:"合格", key:0}, {value:"不合格", key:1}],
|
||
saveDataAction:"SaveData",
|
||
nextPage:"MESQS19Detail",
|
||
defaultKey:"defaultKey",
|
||
}
|
||
},
|
||
|
||
onBackPress() {
|
||
if(this.taskItem.headData.FStatus == 40) {
|
||
this.backFlag = false;
|
||
}
|
||
|
||
let checkFlag = false;
|
||
if (this.backFlag && this.taskItem.updateFlag == "Y") {
|
||
checkFlag = true;
|
||
}
|
||
|
||
if (!this.taskItem.headData.FInterID && this.backFlag) {
|
||
checkFlag = true;
|
||
}
|
||
|
||
if(checkFlag && this.taskItem.headData.FMaterialName) {
|
||
uni.showModal({
|
||
title: '提示',
|
||
content: '请确认是否保存数据',
|
||
success: function (res) {
|
||
if (res.confirm) {
|
||
_self.backFlag = false;
|
||
_self.saveData(1);
|
||
}else if (res.cancel) {
|
||
_self.backFlag = false;
|
||
_self.taskItem.updateFlag = "N";
|
||
uni.navigateBack({
|
||
delta:1
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}
|
||
else {
|
||
this.backFlag = false;
|
||
}
|
||
|
||
return this.backFlag;
|
||
},
|
||
|
||
onLoad(options) {
|
||
_self = this;
|
||
|
||
if(options.item) {
|
||
this.taskItem = JSON.parse(options.item);
|
||
this.taskItem.updateFlag = "N";
|
||
if(!this.taskItem.headData) {
|
||
this.taskItem.headData = new Object();
|
||
this.taskItem.headData.FBillNO = null;
|
||
this.taskItem.headData.FProcessName = null;
|
||
this.taskItem.headData.FMaterialName = null;
|
||
this.taskItem.headData.FModel = null;
|
||
this.taskItem.headData.FUnitName = null;
|
||
this.taskItem.headData.FTestTypeName = "请选择";
|
||
this.taskItem.headData.FQty = null;
|
||
this.taskItem.headData.FCount = null;
|
||
this.taskItem.headData.FAcceptQty = null;
|
||
this.taskItem.headData.FUnAcceptQty = null;
|
||
this.taskItem.headData.FTestResultName = "请选择";
|
||
}
|
||
|
||
if(!this.taskItem.headData.FTestTypeName){
|
||
this.taskItem.headData.FTestTypeName = "请选择";
|
||
}
|
||
|
||
if(!this.taskItem.headData.FTestResultName){
|
||
this.taskItem.headData.FTestResultName = "请选择";
|
||
}
|
||
|
||
this.getItemList(this.taskItem.FInterID);
|
||
} else {
|
||
this.scannFlag = true;
|
||
this.taskItem.headData = new Object();
|
||
this.taskItem.headData.FBillNO = null;
|
||
this.taskItem.headData.FProcessName = null;
|
||
this.taskItem.headData.FMaterialName = null;
|
||
this.taskItem.headData.FModel = null;
|
||
this.taskItem.headData.FUnitName = null;
|
||
this.taskItem.headData.FTestTypeName = "请选择";
|
||
this.taskItem.headData.FQty = null;
|
||
this.taskItem.headData.FCount = null;
|
||
this.taskItem.headData.FAcceptQty = null;
|
||
this.taskItem.headData.FUnAcceptQty = null;
|
||
this.taskItem.headData.FTestResultName = "请选择";
|
||
}
|
||
},
|
||
|
||
onShow() {
|
||
if(this.taskItem.newPage == "N") {
|
||
let newItem = new Object();
|
||
if(this.taskItem.headData.FInterID) {
|
||
newItem = uni.getStorageSync(this.taskItem.headData.FInterID);
|
||
} else {
|
||
newItem = uni.getStorageSync(this.defaultKey);
|
||
}
|
||
if(newItem.updateFlag == "Y"){
|
||
this.taskItem = newItem;
|
||
}
|
||
uni.removeStorage({
|
||
key:this.taskItem.headData.FInterID
|
||
})
|
||
}
|
||
},
|
||
|
||
computed: {
|
||
...mapState(['userInfo']),
|
||
},
|
||
|
||
methods: {
|
||
upper: function(e) {
|
||
console.log(e)
|
||
},
|
||
|
||
lower: function(e) {
|
||
console.log(e)
|
||
},
|
||
|
||
scroll: function(e) {
|
||
console.log(e)
|
||
this.old.scrollTop = e.detail.scrollTop
|
||
},
|
||
|
||
goTop: function(e) {
|
||
// 解决view层不同步的问题
|
||
this.scrollTop = this.old.scrollTop
|
||
this.$nextTick(function() {
|
||
this.scrollTop = 0
|
||
});
|
||
uni.showToast({
|
||
icon:"none",
|
||
title:"纵向滚动 scrollTop 值已被修改为 0"
|
||
})
|
||
},
|
||
|
||
checkResultChange: function({
|
||
newVal,
|
||
oldVal,
|
||
index,
|
||
orignItem
|
||
}) {
|
||
this.taskItem.headData.FTestResultName = orignItem.value;
|
||
this.$refs.checkResultArrayRef.selectText = orignItem.value;
|
||
this.taskItem.headData.FTestResult = orignItem.key;
|
||
this.taskItem.updateFlag = "Y";
|
||
this.$forceUpdate();
|
||
},
|
||
|
||
checkWayChange: function({
|
||
newVal,
|
||
oldVal,
|
||
index,
|
||
orignItem
|
||
}) {
|
||
this.taskItem.headData.FTestTypeName = orignItem.value;
|
||
this.taskItem.headData.FTestType = orignItem.key;
|
||
this.taskItem.updateFlag = "Y";
|
||
this.$forceUpdate();
|
||
},
|
||
|
||
getItemList: function(FInterID) {
|
||
let userInfoLocal = uni.getStorageSync("userInfo");
|
||
let userID = this.userInfo.token;
|
||
if(userInfoLocal && userInfoLocal.ID) {
|
||
if(userInfoLocal.ID.length > 0) {
|
||
if((!userID) || (userID.length <= 0)) {
|
||
userID = userInfoLocal.ID;
|
||
}
|
||
}
|
||
}
|
||
let requestParams = {
|
||
"id": userID,
|
||
"FInterID": FInterID,
|
||
"PrgKey":this.prgKey
|
||
};
|
||
|
||
uni.showLoading({
|
||
icon:'loading',
|
||
title:'加载中……',
|
||
mask:true
|
||
});
|
||
|
||
this.$request.post(
|
||
{
|
||
data: {
|
||
action: 'GetBillDatas',
|
||
params: requestParams
|
||
}
|
||
}
|
||
).then(res => {
|
||
uni.hideLoading();
|
||
let newPage = this.taskItem.newPage;
|
||
let updateFlag = this.taskItem.updateFlag;
|
||
let data = JSON.parse(res);
|
||
this.taskItem.headData = data.BillHeadData[0];
|
||
this.taskItem.itemArray = data.BillBodyData;
|
||
this.taskItem.newPage = newPage;
|
||
this.taskItem.updateFlag = updateFlag;
|
||
|
||
if(!this.taskItem.headData) {
|
||
this.taskItem.headData = new Object();
|
||
}
|
||
if(!this.taskItem.headData.FTestResult) {
|
||
this.taskItem.headData.FTestResult = -1;
|
||
this.taskItem.headData.FTestResultName = "";
|
||
if(this.$refs.checkResultArrayRef){
|
||
this.$refs.checkResultArrayRef.selectText = "请选择";
|
||
}
|
||
}
|
||
if(this.taskItem.headData.FTestResult == 0) {
|
||
this.taskItem.headData.FTestResultName = "合格";
|
||
if(this.$refs.checkResultArrayRef){
|
||
this.$refs.checkResultArrayRef.selectText = "合格";
|
||
}
|
||
}
|
||
if(this.taskItem.headData.FTestResult == 1) {
|
||
this.taskItem.headData.FTestResultName = "不合格";
|
||
if(this.$refs.checkResultArrayRef){
|
||
this.$refs.checkResultArrayRef.selectText = "不合格";
|
||
}
|
||
}
|
||
|
||
if(!this.taskItem.headData.FTestType) {
|
||
this.taskItem.headData.FTestType = 0;
|
||
this.taskItem.headData.FTestTypeName = "";
|
||
}
|
||
if(this.taskItem.headData.FTestType == 1) {
|
||
this.taskItem.headData.FTestTypeName = "全检";
|
||
}
|
||
if(this.taskItem.headData.FTestType == 2) {
|
||
this.taskItem.headData.FTestTypeName = "抽检";
|
||
}
|
||
|
||
if(!this.taskItem.itemArray) {
|
||
this.taskItem.itemArray = new Array();
|
||
}
|
||
this.$forceUpdate();
|
||
});
|
||
},
|
||
|
||
itemClick: function(index){
|
||
if(this.taskItem.newPage == "Y"){
|
||
this.taskItem.newPage = "N"
|
||
}
|
||
this.taskItem.currentdIndex = index;
|
||
let itemString = JSON.stringify(this.taskItem);
|
||
uni.navigateTo({
|
||
// ? 后面加要传的参数, 多个参数用 & 隔开
|
||
url: '../../views/' + this.nextPage + '/' + this.nextPage + '?item=' + itemString,
|
||
});
|
||
},
|
||
|
||
saveBtnClick: function(){
|
||
if(this.barcode || this.taskItem.headData.FBillNO) {
|
||
this.saveData(0);
|
||
} else {
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: "页面无数据保存",
|
||
});
|
||
}
|
||
},
|
||
|
||
saveData: function(typeFlag){
|
||
let userID = this.userInfo.token;
|
||
let userName = this.userInfo.UserID;
|
||
let bodyData = new Array();
|
||
this.taskItem.itemArray.forEach(
|
||
function(el) {
|
||
let data = {
|
||
"FInterID":el.FInterID, "FEntryID":el.FEntryID,
|
||
"FAnalysisWay":el.FAnalysisWay ? el.FAnalysisWay : "0", "FQualTestValue":el.FQualTestValue, "FQuanTestValue":el.FQuanTestValue,
|
||
"FOtherTestValue":el.FOtherTestValue ? el.FOtherTestValue : "0", "FTestResult":el.FTestResult, "FValue":el.FValue? el.FValue: "0",
|
||
"FUpperLimit":el.FUpperLimit, "FLwerLimit":el.FLwerLimit, "FFaultLevel":el.FFaultLevel,
|
||
"FkeyPointTest":el.FkeyPointTest, "FDestoryTest":el.FDestoryTest, "FTestLevel":el.FTestLevel,
|
||
"FStringency":el.FStringency, "FTestProjectID":el.FTestProjectID, "FTestWayID":el.FTestWayID,
|
||
"FTestStandardID":el.FTestStandardID, "FTestInstrumentID":el.FTestInstrumentID, "FCOMPANYID":el.FCOMPANYID
|
||
};
|
||
if(el.FDetailID){
|
||
data.FDetailID = el.FDetailID;
|
||
}
|
||
bodyData.push(data);
|
||
}
|
||
);
|
||
let requestParams = {
|
||
"id": userID,
|
||
"UserID": userName
|
||
};
|
||
|
||
uni.showLoading({
|
||
icon:'loading',
|
||
title:'加载中……',
|
||
mask:true
|
||
});
|
||
|
||
this.$request.post(
|
||
{
|
||
data: {
|
||
action: this.saveDataAction,
|
||
params: requestParams,
|
||
data:{ "BillHeadData": [{"FInterID":this.taskItem.headData.FInterID, "FCount":this.taskItem.headData.FCount,
|
||
"FAcceptQty":this.taskItem.headData.FAcceptQty, "FUnAcceptQty":this.taskItem.headData.FUnAcceptQty,
|
||
"FTestResult":this.taskItem.headData.FTestResult, "FQty":this.taskItem.headData.FQty,
|
||
"FTestWayID":this.taskItem.headData.FTestWayID, "FMaterialID":this.taskItem.headData.FMaterialID,
|
||
"FUnitID":this.taskItem.headData.FUnitID, "FUseOrgID":this.taskItem.headData.FUseOrgID,
|
||
"FDepartmentID":this.taskItem.headData.FDepartmentID, "FEmpID":this.taskItem.headData.FEmpID,
|
||
"FTestType":this.taskItem.headData.FTestType, "FCheckerID":this.taskItem.headData.FCheckerID,
|
||
"FFlowCardID":this.taskItem.headData.FFlowCardID, "FFlowCardDetailID":this.taskItem.headData.FFlowCardDetailID,
|
||
"FProcessID":this.taskItem.headData.FProcessID, "FCode":this.taskItem.headData.FCode,
|
||
"FCOMPANYID":this.taskItem.headData.FCOMPANYID, "FNote":this.taskItem.headData.FNote, "c_user":userName}],
|
||
"BillBodyData": [{"BodyName":"ODK_FirstInspection", "BodyData":bodyData }] ,
|
||
}
|
||
}
|
||
}
|
||
).then(res => {
|
||
uni.hideLoading();
|
||
let data = JSON.parse(res);
|
||
let type = typeof data;
|
||
if(type == "string" && data.substring(0,2) == "保存") {
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: data,
|
||
success: function(){
|
||
if(typeFlag == 1) {
|
||
uni.navigateBack({
|
||
delta:1
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}
|
||
else {
|
||
if(data[0] && data[0] == "单据保存成功"){
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: data[0],
|
||
success: function(){
|
||
if(typeFlag == 1) {
|
||
uni.navigateBack({
|
||
delta:1
|
||
});
|
||
}
|
||
}
|
||
});
|
||
}else {
|
||
this.taskItem.headData.FInterID = data[0];
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: "新单据保存成功",
|
||
success: function(){
|
||
if(typeFlag == 1) {
|
||
setTimeout(function(){
|
||
uni.navigateBack({
|
||
delta:1
|
||
});
|
||
}, 2000);
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
this.taskItem.updateFlag = "N";
|
||
if(typeFlag == 0 || data[0].substring(0,2) != "保存") {
|
||
this.getItemList(this.taskItem.headData.FInterID);
|
||
}
|
||
});
|
||
},
|
||
|
||
cancelBtnClick: function(){
|
||
this.updateStatus(0);
|
||
},
|
||
|
||
sumbitBtnClick: function(){
|
||
this.updateStatus(1);
|
||
},
|
||
|
||
updateStatus:function(flag){
|
||
if(this.taskItem.updateFlag == "Y"){
|
||
uni.showToast({
|
||
icon:"none",
|
||
title:"请先保存数据"
|
||
})
|
||
return false;
|
||
}
|
||
|
||
let userID = this.userInfo.token;
|
||
let userInfoLocal = uni.getStorageSync("userInfo");
|
||
if(userInfoLocal && userInfoLocal.ID) {
|
||
if(userInfoLocal.ID.length > 0) {
|
||
if((!userID) || (userID.length <= 0)) {
|
||
userID = userInfoLocal.ID;
|
||
}
|
||
}
|
||
}
|
||
let userName = this.userInfo.UserID;
|
||
|
||
//"UserID":"OPSOFT",
|
||
let requestParams = {
|
||
"id": userID,
|
||
"UserID": userName,
|
||
"FInterID": this.taskItem.headData.FInterID,
|
||
"Flag": flag,
|
||
"PrgKey": this.prgKey
|
||
};
|
||
this.$request.post({
|
||
data: {
|
||
action: 'DoFinished',
|
||
params: requestParams
|
||
}
|
||
}).then(res => {
|
||
let data = JSON.parse(res);
|
||
uni.showToast({
|
||
icon: 'none',
|
||
title: data
|
||
});
|
||
this.getItemList(this.taskItem.headData.FInterID);
|
||
});
|
||
},
|
||
|
||
scanOnClick: function(){
|
||
uni.scanCode({
|
||
onlyFromCamera: true,
|
||
success: function (res) {
|
||
_self.barcode = res.result;
|
||
console.log(res);
|
||
_self.$forceUpdate();
|
||
}
|
||
});
|
||
},
|
||
|
||
newTaskConfirm: function(){
|
||
let userID = this.userInfo.token;
|
||
let userInfoLocal = uni.getStorageSync("userInfo");
|
||
if(userInfoLocal && userInfoLocal.ID) {
|
||
if(userInfoLocal.ID.length > 0) {
|
||
if((!userID) || (userID.length <= 0)) {
|
||
userID = userInfoLocal.ID;
|
||
}
|
||
}
|
||
}
|
||
//let userName = this.userInfo.UserID;
|
||
//"UserID":"OPSOFT",
|
||
let requestParams = {
|
||
"id": userID,
|
||
"strBarcode": this.barcode,
|
||
"FTestType": ""
|
||
};
|
||
|
||
this.$request.post({
|
||
data: {
|
||
action: 'FBarcode_KeyDown',
|
||
params: requestParams
|
||
}
|
||
}).then(res => {
|
||
let data = JSON.parse(res);
|
||
this.taskItem.headData = data.BillHeadData[0];
|
||
this.taskItem.itemArray = data.BillBodyData;
|
||
this.taskItem.newPage = "Y";
|
||
this.taskItem.updateFlag = "Y";
|
||
if(!this.taskItem.headData) {
|
||
this.taskItem.headData = new Object();
|
||
}
|
||
if(!this.taskItem.headData.FTestResult) {
|
||
this.taskItem.headData.FTestResult = -1;
|
||
this.taskItem.headData.FTestResultName = "";
|
||
if(this.$refs.checkResultArrayRef){
|
||
this.$refs.checkResultArrayRef.selectText = "请选择";
|
||
}
|
||
}
|
||
if(this.taskItem.headData.FTestResult == 0) {
|
||
this.taskItem.headData.FTestResultName = "合格";
|
||
if(this.$refs.checkResultArrayRef){
|
||
this.$refs.checkResultArrayRef.selectText = "合格";
|
||
}
|
||
}
|
||
if(this.taskItem.headData.FTestResult == 1) {
|
||
this.taskItem.headData.FTestResultName = "不合格";
|
||
if(this.$refs.checkResultArrayRef){
|
||
this.$refs.checkResultArrayRef.selectText = "不合格";
|
||
}
|
||
}
|
||
if(!this.taskItem.headData.FTestType) {
|
||
this.taskItem.headData.FTestType = 0;
|
||
this.taskItem.headData.FTestTypeName = "";
|
||
}
|
||
if(this.taskItem.headData.FTestType == 1) {
|
||
this.taskItem.headData.FTestTypeName = "全检";
|
||
}
|
||
if(this.taskItem.headData.FTestType == 2) {
|
||
this.taskItem.headData.FTestTypeName = "抽检";
|
||
}
|
||
|
||
this.taskItem.itemArray.forEach(
|
||
function(el){
|
||
el.FTestResult = "0";
|
||
}
|
||
);
|
||
this.$forceUpdate();
|
||
});
|
||
},
|
||
|
||
onKeyInput: function(){
|
||
this.taskItem.updateFlag = "Y";
|
||
}
|
||
},
|
||
|
||
components: {
|
||
xflSelect
|
||
},
|
||
}
|
||
</script>
|
||
|
||
<style lang="scss">
|
||
.page{
|
||
width: 100%;
|
||
height: 100%;
|
||
display: flex;
|
||
flex-direction:column;
|
||
flex-wrap: nowrap;
|
||
background-color: #FFFFFF;
|
||
}
|
||
|
||
scroll-view{
|
||
height: 50%;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
display: flex;
|
||
flex-direction:column;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
}
|
||
|
||
button{
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
width: 180rpx;
|
||
height: 70rpx;
|
||
line-height: 70rpx;
|
||
background-color: #007AFF;
|
||
margin-bottom: 10rpx;
|
||
font-size: 30rpx;
|
||
font-style: auto;
|
||
font-weight: 1000;
|
||
color: #FFFFFF;
|
||
}
|
||
|
||
.top-row-class{
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
height: 50rpx;
|
||
line-height: 50rpx;
|
||
padding-top: 5rpx;
|
||
padding-bottom: 5rpx;
|
||
padding-right: 25rpx;
|
||
padding-left: 25rpx;
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
background-color: #FFFFFF;
|
||
}
|
||
|
||
.top-row-col-class{
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
height: 50rpx;
|
||
line-height: 50rpx;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
}
|
||
|
||
.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;
|
||
}
|
||
|
||
.top-row-context-class{
|
||
font-size: 28rpx;
|
||
font-style: auto;
|
||
color: #333333;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
line-height: 50rpx;
|
||
word-break: break-all;
|
||
margin-top: 10rpx;
|
||
margin-bottom: 10rpx;
|
||
overflow: hidden;
|
||
white-space: nowrap;
|
||
text-overflow: ellipsis;
|
||
}
|
||
|
||
.top-row-input-class{
|
||
font-size: 30rpx;
|
||
color: #6B6B6B;
|
||
width: 50rpx;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
margin-top: 10rpx;
|
||
margin-bottom: 10rpx;
|
||
padding-left: 15rpx;
|
||
padding-right: 15rpx;
|
||
border-radius: 10rpx;
|
||
border: 1px solid #D8D8D8;
|
||
height: 60rpx; line-height: 60rpx;
|
||
}
|
||
|
||
.top-row-xfl-class{
|
||
height: 60rpx; line-height: 60rpx; font-size: 30rpx;
|
||
color: #333333;
|
||
}
|
||
|
||
.top-row-multi-class{
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
height: 120rpx;
|
||
line-height: 120rpx;
|
||
padding-top: 5rpx;
|
||
padding-bottom: 20rpx;
|
||
padding-right: 25rpx;
|
||
padding-left: 25rpx;
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
background-color: #FFFFFF;
|
||
}
|
||
|
||
.top-row-multi-class text{
|
||
margin-top: 10rpx;
|
||
}
|
||
|
||
.top-row-multi-text-class{
|
||
font-size: 30rpx;
|
||
height: 120rpx;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
margin-top: 10rpx;
|
||
margin-bottom: 10rpx;
|
||
padding: 5rpx 20rpx;
|
||
border-radius: 5px;
|
||
border: 1px solid #D8D8D8;
|
||
}
|
||
|
||
.detail-row-class{
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
margin-top: 10rpx;
|
||
padding-right: 25rpx;
|
||
padding-left: 25rpx;
|
||
line-height: 80rpx;
|
||
margin-bottom: 10rpx;
|
||
}
|
||
|
||
.detail-row-item-image-class{
|
||
height: 70rpx;
|
||
width: 70rpx;
|
||
}
|
||
|
||
.detail-row-content{
|
||
margin-left: 25rpx;
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
flex-direction: column;
|
||
justify-content: flex-start;
|
||
align-items: flex-start;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
}
|
||
|
||
.detail-row-title-class{
|
||
font-size: 30rpx;
|
||
font-style: auto;
|
||
color: #28282B;
|
||
font-weight: 600;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
padding-right: 25rpx;
|
||
padding-left: 25rpx;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.detail-row-title1-class{
|
||
font-size: 28rpx;
|
||
font-style: auto;
|
||
color: #28282B;
|
||
flex-shrink: 1;
|
||
flex-grow: 1;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.detail-row-content-green-class{
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
font-size: 28rpx;
|
||
font-style: auto;
|
||
color: #32CD32;
|
||
font-weight: 1000;
|
||
width: 120rpx;
|
||
}
|
||
|
||
.detail-row-content-red-class{
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
font-size: 28rpx;
|
||
font-style: auto;
|
||
color: #FF0000;
|
||
font-weight: 1000;
|
||
width: 120rpx;
|
||
}
|
||
|
||
.my-image{
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
height: 40rpx;
|
||
width: 40rpx;
|
||
}
|
||
|
||
.detail-row-line-class{
|
||
height: 0.9px;
|
||
background-color: #DCDCDC;
|
||
margin-left: 25rpx;
|
||
margin-right: 25rpx;
|
||
flex-shrink: 0;
|
||
flex-grow: 0;
|
||
}
|
||
|
||
.bottom-row-class{
|
||
width: 100%;
|
||
bottom: 0px;
|
||
position: fixed;
|
||
display: flex;
|
||
flex-wrap: nowrap;
|
||
justify-content: flex-start;
|
||
align-items: center;
|
||
margin-top: 5rpx;
|
||
}
|
||
|
||
.detail-subtitle-class {
|
||
font-size: 35rpx;
|
||
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
|
||
font-weight: bold;
|
||
color: #666666;
|
||
margin-left: 25rpx;
|
||
}
|
||
|
||
.detail-subtitle-class {
|
||
font-size: 35rpx;
|
||
font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
|
||
font-weight: bold;
|
||
color: #666666;
|
||
margin-left: 25rpx;
|
||
}
|
||
|
||
image{
|
||
width: 40rpx;
|
||
height: 40rpx;
|
||
}
|
||
|
||
.saveBtnClass {
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
font-size: 35rpx;
|
||
text-align: center;
|
||
background: #F5F5F4;
|
||
flex-grow: 1;
|
||
flex-shrink: 1;
|
||
color: #666666;
|
||
}
|
||
|
||
.sumbitBtnClass {
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
font-size: 35rpx;
|
||
text-align: center;
|
||
background: #5778FF;
|
||
flex-grow: 1;
|
||
flex-shrink: 1;
|
||
color: #FFFFFF;
|
||
}
|
||
|
||
.cancelBtnClass {
|
||
height: 80rpx;
|
||
line-height: 80rpx;
|
||
font-size: 35rpx;
|
||
text-align: center;
|
||
background: #5778FF;
|
||
flex-grow: 1;
|
||
flex-shrink: 1;
|
||
color: #FFFFFF;
|
||
}
|
||
</style> |