app测试问题修改

This commit is contained in:
zzyuan 2024-09-10 10:26:17 +08:00
parent 321e85736f
commit ab77d91426
25 changed files with 2814 additions and 2164 deletions

View File

@ -37,7 +37,7 @@
}
.tab-header {
z-index: 9998;
// z-index: 99;
position: fixed;
top: 3.5vh;
width: 100%;

View File

@ -250,6 +250,10 @@
}
}).catch(error => {
console.log(error)
uni.showToast({
title: error.msg,
icon: "none"
})
})
},
//-

View File

@ -212,18 +212,31 @@
let serveVer = "";
let apkPath = "";
// app
plus.runtime.getProperty(plus.runtime.appid, (info) => {
nowVer = info.version.replace(/\./g, "");
});
// plus.runtime.getProperty(plus.runtime.appid, (info) => {
// nowVer = info.version.replace(/\./g, "");
// });
uni.getSystemInfo({
success: function(res) {
console.log(res)
console.log(res.appVersion, 'APP版本号')
nowVer=res.appVersion.replace(/\./g, "");
}
})
// console.log(nowVer,'nowVer')
// uni.showToast({
// title: nowVer,
// icon: 'none'
// });
// app
this.$http.post(getVersion,{}).then(res => {
console.log(res);
if (res.data.code == 200) {
serveVer = res.data.data[0].versionName.replace(
// console.log(res);
if (res.code == 200) {
serveVer = res.data[0].versionName.replace(
/\./g,
""
);
apkPath = res.data.data[0].apkPath;
// console.log(serveVer,'serveVer')
apkPath = res.data[0].apkPath;
//
setTimeout(() => {
console.log(nowVer, serveVer, apkPath);
@ -231,7 +244,7 @@
uni.showModal({
title: "版本升级",
content: "当前版本非最新版本,请前往升级!",
showCancel: false,
showCancel: true,
confirmText: "升级",
success: (res) => {
if (res.confirm) {

View File

@ -125,6 +125,7 @@
import eselect from '@/components/eselect.vue';
import searchSelect from '@/components/search-select.vue';
import AES from "@/utils/cryptoJs/aes.js";
import CONFIG from '../../service/config.js'
export default {
components: {
tabHeader,
@ -406,8 +407,9 @@
this.checkAll=[]
this.chosenNum=0;
const fileData = res.data; //
const fileUrl = 'http://192.168.0.14:11997/szgqj/' + fileData; // URL
this.downloadUlr = 'http://192.168.0.14:11997/szgqj/' + fileData; // URL
const fileUrl = CONFIG.TEST_URL+'/szgqj/' + fileData; // URL
this.downloadUlr = CONFIG.TEST_URL+'/szgqj/' + fileData; // URL
//
let _this = this;
const downloadTask = uni.downloadFile({
@ -440,14 +442,6 @@
}, function(e) {
});
}
// //
// uni.openDocument({
// filePath:res.savedFilePath,
// success:function(res){
// },
// fail(){
// }
// })
},1000)
},
fail:function(res){

View File

@ -137,6 +137,7 @@
import eselect from '@/components/eselect.vue';
import searchSelect from '@/components/search-select.vue';
import AES from "@/utils/cryptoJs/aes.js";
import CONFIG from '../../service/config.js'
export default {
components: {
tabHeader,
@ -430,8 +431,8 @@
this.checkAll=[]
this.chosenNum=0;
const fileData = res.data; //
const fileUrl = 'http://192.168.0.14:11997/szgqj/' + fileData; // URL
this.downloadUlr = 'http://192.168.0.14:11997/szgqj/' + fileData; // URL
const fileUrl = CONFIG.TEST_URL+'/szgqj/' + fileData; // URL
this.downloadUlr = CONFIG.TEST_URL+'/szgqj/' + fileData; // URL
//
let _this = this;
const downloadTask = uni.downloadFile({
@ -464,14 +465,6 @@
}, function(e) {
});
}
// //
// uni.openDocument({
// filePath:res.savedFilePath,
// success:function(res){
// },
// fail(){
// }
// })
},1000)
},
fail:function(res){

View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="topTab">
<view class="tab-header">
<view class="topTab" >
<view class="tab-header" style="z-index: 999;">
<view class="left" >
<image @click="customNavigateBack" src="@/static/img/back.png" mode=""></image>
</view>
@ -17,6 +17,7 @@
</view>
</view>
<view class="page-content">
<u-loading-page loading-text="loading..." :loading="isLoading" style="z-index: 99;"></u-loading-page>
<view class="main-header">
<view style="color: #A6A6A6;font-size: 24rpx;width: 110rpx;margin-left: 20rpx;">送样单位</view>
<view style="margin:0 20rpx;font-size: 24rpx;">{{customName}}</view>
@ -80,8 +81,8 @@
<u-form-item label="规格型号" prop="devModule" borderBottom required>
<u--input v-model="addForm.devModule" border="none" maxlength="20"></u--input>
</u-form-item>
<u-form-item label="设备编号" prop="devCode" borderBottom required>
<u--input v-model="addForm.devCode" border="none" maxlength="20"></u--input>
<u-form-item label="设备数量" prop="devNumber" borderBottom required>
<u--input v-model="addForm.devNumber" border="none" type="number" placeholder="请输入1~100的数字" maxlength="3" @change="matchScore"></u--input>
</u-form-item>
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;" >
<view style="width: 70%;">
@ -93,7 +94,9 @@
确定
</view>
</view>
<u-form-item label="总金额" prop="totalAmount" borderBottom>
<u--input v-model="totalAmount" border="none" type="text" disabled></u--input>
</u-form-item>
</u--form>
<!-- 设备类型 -->
<u-picker :show="showType" :columns="toolsList" keyName="name"
@ -145,7 +148,7 @@
<u--input v-model="editForm.devModule" border="none" maxlength="20"></u--input>
</u-form-item>
<u-form-item label="设备编号" prop="devCode" borderBottom required>
<u--input v-model="editForm.devCode" border="none" maxlength="20"></u--input>
<u--input v-model="editForm.devCode" border="none" maxlength="20" disabled></u--input>
</u-form-item>
</u--form>
@ -177,7 +180,7 @@
</template>
<script>
import { getDeptSelectedById,getToolsSelect,addSamples,getSampleLabelByQrCode } from '@/service/url.js';
import { getDeptSelectedById,getToolsSelect,addSamples,getSampleLabelByQrCode,getAmount } from '@/service/url.js';
import tabHeader from '@/components/tab-Header.vue';
import eselect from '@/components/eselect.vue';
import AES from "@/utils/cryptoJs/aes.js";
@ -188,6 +191,8 @@
},
data() {
return {
signAmount:0,
totalAmount:0,
addData:{},
collectId:'',
customName:'',
@ -214,7 +219,7 @@
sampleToolsId:'',
sampleTools:'',
devModule:'',
devCode:'',
devNumber:'1',
sampleDepartment:'',
departmentId:'',
},
@ -236,10 +241,10 @@
message: '请输入规格型号',
trigger: ['blur', 'change']
},
'devCode': {
'devNumber': {
type: 'string',
required: true,
message: '请填写设备编号',
message: '请填写设备数量',
trigger: ['blur', 'change']
},
'sampleDepartment': {
@ -292,6 +297,7 @@
listData:[],
page:1,
isLoading:false
};
},
@ -331,6 +337,26 @@
});
}
},
matchScore(e){
// console.log(e)
// console.log(this.signAmount)
if(!/^[0-9]+$/.test(e)){
this.addForm.devNumber=Number(e.replace(/\D/g,''));
if(this.addForm.devNumber>100){
this.addForm.devNumber=100;
}else if(this.addForm.devNumber<1||this.addForm.devNumber==0){
this.addForm.devNumber=1;
}
}else{
if(Number(e)>100){
this.addForm.devNumber=100;
}
if(Number(e)<1||e==''){
this.addForm.devNumber=1;
}
}
this.totalAmount=(Number(this.addForm.devNumber)*Number(this.signAmount)).toFixed(2);
},
//
getDeptSelectedById(){
let obj = {
@ -414,11 +440,8 @@
this.listData.forEach(item=>{
if(item.checked.length>0){
this.chosenNum=this.chosenNum+1
}else{
this.chosenNum=this.chosenNum-1
}
})
// console.log('delDevice')
},
//
openMore(){
@ -426,9 +449,12 @@
this.addForm.sampleToolsId="";
this.addForm.sampleTools="";
this.addForm.devModule="";
this.addForm.devCode="";
this.addForm.devNumber="1";
this.addForm.departmentId="";
this.addForm.sampleDepartment="";
this.totalAmount=0;
this.signAmount=0;
setTimeout(()=>{
this.$refs.uForm.clearValidate()
},500)
@ -436,11 +462,32 @@
},
// -
typeConfirm(e){
// console.log('confirm', e)
this.showType = false;
this.addForm.sampleToolsId = e.value[0].id;
this.addForm.sampleTools = e.value[0].name;
this.$refs.uForm.validateField('sampleTools')
let obj = { "sampleTools":e.value[0].name }
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
}
this.$http.post(getAmount,param).then(res => {
if (res) {
console.log(res)
if(res.code == 200){
this.signAmount=Number(res.data);
this.totalAmount=(Number(this.addForm.devNumber)*Number(res.data)).toFixed(2);
}
}
}).catch(error => {
console.log(error)
// this.$utils.showHttpError(error)
})
},
//-
// modelConfirm(e){
@ -459,37 +506,38 @@
addConfirm(){
// console.log(this.addForm)
this.$refs.uForm.validate().then(validate => {
//this.batchCode
let obj = {
customId:this.addData.customId,
customName:this.addData.customName,
sampleUser:this.addData.sampleUser,
sampleTime:this.addData.sampleTime,
departmentId:this.addForm.departmentId,
sampleDepartment:this.addForm.sampleDepartment,
sampleToolsId:this.addForm.sampleToolsId,
sampleTools:this.addForm.sampleTools,
devModule:this.addForm.devModule,
devCode:this.addForm.devCode,
checked:[]
}
if(this.batchCode&&this.batchCode!=''){
obj.batchCode=this.batchCode
}
var index = this.listData.findIndex(item => {return item.devCode == obj.devCode})
if (index != -1) {
uni.showToast({
title: "设备编码已存在",
icon: "none"
})
} else {
// console.log(this.addForm.devNumber)
let sum = Number(this.addForm.devNumber)//
var num=this.listData.length;//
// console.log(num)
for(let i=1;i<=sum;i++){
let obj = {
customId:this.addData.customId,
customName:this.addData.customName,
sampleUser:this.addData.sampleUser,
sampleTime:this.addData.sampleTime,
departmentId:this.addForm.departmentId,
sampleDepartment:this.addForm.sampleDepartment,
sampleToolsId:this.addForm.sampleToolsId,
sampleTools:this.addForm.sampleTools,
devModule:this.addForm.devModule,
max:Number(this.addForm.devNumber)+num,
devCode:'00'+(num+i),
checked:[]
}
if(this.batchCode&&this.batchCode!=''){
obj.batchCode=this.batchCode;
}
if(this.checkAll.length>0){
obj.checked=[obj.devCode];
this.chosenNum=this.chosenNum+1;
}
this.listData.push(obj)
this.showMore = !this.showMore;
}
// console.lo
this.showMore = !this.showMore;
}).catch(errors => {
})
@ -623,31 +671,40 @@
})
// console.log(paramsList)
if(paramsList.length>0){
let obj={
paramsList:paramsList
}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
this.$http.post(addSamples,param).then(res => {
if (res) {
if(res.code == '200'){
if(this.batchCode&&this.batchCode!=''){
uni.navigateBack({
delta: 1 //
});
}else{
uni.navigateBack({
delta: 2 //
});
}
}
this.isLoading=true;
let obj={
paramsList:paramsList
}
}).catch(error => {
console.log(error)
})
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
this.$http.post(addSamples,param).then(res => {
if (res) {
if(res.code == '200'){
if(this.batchCode&&this.batchCode!=''){
setTimeout(()=>{
uni.navigateBack({
delta: 1 //
});
this.isLoading=false;
},1000)
}else{
setTimeout(()=>{
uni.navigateBack({
delta: 2 //
});
this.isLoading=false;
},1000)
}
}else{
this.isLoading=false;
}
}
}).catch(error => {
this.isLoading=false;
console.log(error)
})
}else{
uni.showToast({title: "请选择设备",icon: "none"})
}
@ -751,7 +808,7 @@
}
.active{
min-height: 33vh!important;
min-height: 42vh!important;
transition: min-height 0.8s ease;
border-top-right-radius: 40rpx;
border-top-left-radius: 40rpx;
@ -768,7 +825,7 @@
width: 98%;
height: auto;
padding: 10rpx;
background-color: #FFF;
background-color: #FFF;
border-top-right-radius: 60rpx;
border-top-left-radius: 60rpx;
}

View File

@ -64,12 +64,18 @@
<text class="label">送样设备</text>
<text class="info">{{item.sampleTools}}</text>
</view>
<view class="item-text">
<view class="item-text" style="display: block;">
<image class="iconImg" src="../../static/images/number.png" alt="">
<text class="label">批次编号</text>
<text class="info">{{item.batchCode}}</text>
<image src="../../static/images/del.png" @click="delSamples(item)" style="width: 30rpx;height: 30rpx;float: right;margin-right: 20rpx;" alt="">
<!-- <image src="../../static/images/edit2.png" @click="editSamples(item)" style="width: 30rpx;height: 30rpx;float: right;margin-right: 20rpx;" alt=""> -->
<image src="../../static/images/download.png" @click="downloadSamples(item)" style="width: 30rpx;height: 30rpx;float: right;margin-right: 20rpx;" alt="">
</view>
<view class="item-text" @click="goCollectDetail(item)">
<u-icon class="iconImg" name="rmb-circle" color="#2979ff" size="30"></u-icon>
<text class="label">金额</text>
<text class="info">{{item.totalAmount}}</text>
</view>
</view>
</view>
@ -87,27 +93,33 @@
<u-list @scrolltolower="scrolltolower1" height="75vh">
<u-list-item v-for="(item, index) in listData1" :key="index">
<view class="list-item" >
<view class="item-header">
<view class="item-header" @click="goCollectDetail(item)">
<view class="header-name">
{{item.customName}}
</view>
</view>
<view class="item-content" @click="goCollectDetail(item)">
<view class="item-content" >
<view class="content-box">
<view class="item-text">
<view class="item-text" @click="goCollectDetail(item)">
<image class="iconImg" src="../../static/images/time.png" alt="">
<text class="label">送样时间</text>
<text class="info">{{item.sampleTime}}</text>
</view>
<view class="item-text">
<view class="item-text" @click="goCollectDetail(item)">
<image class="iconImg" src="../../static/images/device.png" alt="">
<text class="label">送样设备</text>
<text class="info">{{item.sampleTools}}</text>
</view>
<view class="item-text">
<view class="item-text" style="display: block;">
<image class="iconImg" src="../../static/images/number.png" alt="">
<text class="label">批次编号</text>
<text class="info">{{item.batchCode}}</text>
<image src="../../static/images/download.png" @click="downloadSamples(item)" style="width: 30rpx;height: 30rpx;float: right;margin-right: 20rpx;" alt="">
</view>
<view class="item-text" @click="goCollectDetail(item)">
<u-icon class="iconImg" name="rmb-circle" color="#2979ff" size="30"></u-icon>
<text class="label">金额</text>
<text class="info">{{item.totalAmount}}</text>
</view>
</view>
</view>
@ -249,11 +261,12 @@
</template>
<script>
import { getSamplesList,delSamplesList,updateSamplesList,getSamplesAuthority,getToolsSelect,getTestTeamSelected,dispatchWork,getCustomNameSelected } from '@/service/url.js';
import { getSamplesList,delSamplesList,updateSamplesList,getSamplesAuthority,getToolsSelect,getTestTeamSelected,dispatchWork,getCustomNameSelected,downloadEntrustContract } from '@/service/url.js';
import tabHeader from '@/components/tab-Header.vue';
import eselect from '@/components/eselect.vue';
import searchSelect from '@/components/search-select.vue';
import AES from "@/utils/cryptoJs/aes.js";
import CONFIG from '../../service/config.js'
export default {
components: {
tabHeader,
@ -352,6 +365,7 @@
teamList:[],//
sentData:{},//
editData:{},//
downloadUlr:'',
};
},
watch: {
@ -367,6 +381,10 @@
this.getCustomNameSelected()
},
onShow() {
this.page = 1;
this.listData=[]
this.page1 = 1;
this.listData1=[]
this.loadmore()
},
methods: {
@ -647,15 +665,115 @@
}
});
},
//
editSamples(chosen){
this.editData = chosen;
this.editForm.customName=chosen.customName;
this.editForm.customId=chosen.customId;
this.editForm.sampleUser=chosen.sampleUser;
this.editForm.sampleTime=chosen.sampleTime;
this.editPopup = true
downloadSamples(chosen){
uni.showModal({
title: '确认',
content: '请确认是否下载收样委托书!',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if (res.confirm) {
let obj = {
"id":chosen.id,
}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
let option = {
contentType: 'application/json',
};
this.$http.post(downloadEntrustContract, param, false, option).then(res => {
// console.log(res)
if (res.code == '200') {
const fileData = res.data; //
const fileUrl = CONFIG.TEST_URL+'/szgqj/' + fileData; // URL
this.downloadUlr = CONFIG.TEST_URL+'/szgqj/' + fileData; // URL
//
let _this = this;
const downloadTask = uni.downloadFile({
url: fileUrl,
success: (downloadResult) => {
console.log(downloadResult)
//
var filePath = downloadResult.tempFilePath;
var sFilePath = downloadResult.tempFilePath;
//
uni.saveFile({
tempFilePath: downloadResult.tempFilePath,//
success:function(res){
var savedFilePath = res.savedFilePath;
let osname = plus.os.name;
//iosAndroid
if (osname == 'Android') {
uni.showToast({
icon:'none',
mask:true,
title:'保存成功',
duration:1000,
});
_this.fSetFileName(res.savedFilePath, sFilePath);
}
setTimeout(() => {
//
if (plus.runtime.openFile) {
plus.runtime.openFile(filePath, {}, function(e) {
}, function(e) {
});
}
},1000)
},
fail:function(res){
}
});
},
fail: (error) => {
//
console.error('下载失败:', error);
}
});
//
if (plus.runtime.openFile) {
plus.runtime.openFile(filePath, {}, function(e) {
}, function(e) {
});
}
}
}).catch(error => {
console.log(error);
});
} else if (res.cancel) {}
}
});
},
//
fSetFileName(sFilePath, sFileName) {
var sFileName = sFileName.split('/')[sFileName.split('/').length - 1];//
var aFileUrl = sFilePath.split('/').splice(0, sFilePath.split('/').length - 1);//saveFile API
var url = this.downloadUlr;//
// 'url'
let dtask = plus.downloader.createDownload(url, {
filename: "file://storage/emulated/0/安全工机具下载/" + sFileName //AAA
},
(d, status) => {
if (status == 200) {
let fileSaveUrl = plus.io.convertLocalFileSystemURL(d.filename);
} else {
//
plus.downloader.clear(); //
}
})
dtask.start();
},
//
dateTimeConfirm2(e){
@ -924,7 +1042,7 @@
width: 95%;
margin-left: 20rpx;
margin-top: 15rpx;
// display: flex;
display: flex;
align-items: center;
.iconImg{

View File

@ -6,8 +6,8 @@
<image @click="customNavigateBack" style="width: 40rpx;height: 40rpx;margin:0 20rpx;" src="@/static/img/back.png" mode=""></image>
<u-search :showAction="false" style="margin-right: 20rpx;" :input-style="inputStyle" bgColor='#F3F3F3' :searchIconSize="36" v-model="searchValue" @change="searchList" ></u-search>
<view style="width: 20%;height: 100%;display: flex;align-items: center;justify-content: center;">
<view class="addBtn" v-if="!hasTeam" @click="addDevice">添加设备</view>
<view class="addBtn" v-if="hasTeam" @click="searchList">查询</view>
<view class="addBtn" @click="addDevice">添加设备</view>
<!-- <view class="addBtn" v-if="hasTeam" @click="searchList">查询</view> -->
</view>
</view>
@ -43,7 +43,7 @@
<view class="item-text">
<text class="label">收样编号</text>
<text class="info">{{item.customerCode}}</text>
<image src="../../static/images/del.png" v-if="!item.teamName" @click="delDevice(item)" style="width: 30rpx;height: 30rpx;float: right;margin-right: 20rpx;" alt="">
<image src="../../static/images/del.png" @click="delDevice(item)" v-if="item.experStatus==0" style="width: 30rpx;height: 30rpx;float: right;margin-right: 20rpx;" alt="">
</view>
</view>
</view>
@ -70,7 +70,7 @@
</template>
<script>
import { getDetailsList,delSamplesDetails } from '@/service/url.js';
import { getDetailsList,delSamplesDetails,getFlag } from '@/service/url.js';
import tabHeader from '@/components/tab-Header.vue';
import eselect from '@/components/eselect.vue';
import AES from "@/utils/cryptoJs/aes.js";
@ -109,6 +109,7 @@
trigger: ['blur', 'change']
},
},
isFlag:true,
listData:[],
page:1,
@ -161,6 +162,7 @@
// console.log(value)
// console.log(this.searchValue)
this.page = 1;
this.listData=[]
this.loadmore()
},
scrolltolower() {
@ -176,9 +178,7 @@
}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
// console.log(obj)
this.$http.post(getDetailsList,param).then(res => {
if (res) {
console.log(res)
@ -204,12 +204,29 @@
uni.navigateTo({
url: `/pages/samples/sampleCode?customerCode=sybq/${item.customerCode}`
})
},
//
hasFlag(){
},
//
addDevice(){
if(this.collectId){
uni.navigateTo({//
url: `/pages/samples/addDevice?id=${this.collectId}&customName=${this.customName}&customId=${this.customId}&batchCode=${this.batchCode}`
let obj = {"id":this.collectId}
let param = {encryptedData: AES.encrypt(JSON.stringify(obj))}
this.$http.post(getFlag,param).then(response => {
if (response) {
if(response.code == 200){
uni.navigateTo({//
url: `/pages/samples/addDevice?id=${this.collectId}&customName=${this.customName}&customId=${this.customId}&batchCode=${this.batchCode}`
})
}
}
}).catch(error => {
uni.showToast({
title: error.msg,
icon: "none"
})
})
}else{
uni.navigateTo({//
@ -220,45 +237,53 @@
},
//
delDevice(chosen){
uni.showModal({
title: '确认',
content: '请确认是否删除该设备!',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if (res.confirm) {
let obj = {
"id":chosen.id,
}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
this.$http.post(delSamplesDetails,param).then(response => {
if (response) {
if(response.code == '200'){
uni.showToast({
title: "删除成功",
icon: "none"
let obj = {"id":this.collectId}
let param = {encryptedData: AES.encrypt(JSON.stringify(obj))}
this.$http.post(getFlag,param).then(response => {
if (response){
if(response.code == 200){
uni.showModal({
title: '确认',
content: '请确认是否删除该设备!',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if (res.confirm) {
let obj = {
"id":chosen.id,
}
let param = {
encryptedData: AES.encrypt(JSON.stringify(obj))
// encryptedData: JSON.stringify(obj)
}
this.$http.post(delSamplesDetails,param).then(response => {
if (response) {
if(response.code == '200'){
uni.showToast({
title: "删除成功",
icon: "none"
})
this.page = 1;
this.listData=[];
this.loadmore()
}else{
uni.showToast({
title: "删除失败",
icon: "none"
})
}
}
}).catch(error => {
console.log(error)
})
this.page = 1;
this.listData=[];
this.loadmore()
}else{
uni.showToast({
title: "删除失败",
icon: "none"
})
}
} else if (res.cancel) {}
}
}).catch(error => {
console.log(error)
})
} else if (res.cancel) {}
});
}
}
});
}
}).catch(error => {})
},
},
}
</script>

View File

@ -46,10 +46,10 @@
@confirm="experTimeConfirm"
@cancel="experTimeShow = false"
></u-datetime-picker>
<u-form-item label="下次试验日期" prop="nextExperTime" borderBottom required v-if="isView">
<u-form-item label="下次试验日期" prop="nextExperTime" borderBottom required>
<u--input v-model="formData.nextExperTime" readonly border="none"></u--input>
</u-form-item>
<u-form-item label="下次试验日期" prop="nextExperTime" borderBottom required v-if="!isView" @click="openNextExperTimePick">
<!-- <u-form-item label="下次试验日期" prop="nextExperTime" borderBottom required v-if="!isView" @click="openNextExperTimePick">
<u--input v-model="formData.nextExperTime" suffixIcon="arrow-right" readonly suffixIconStyle="color: #909399;fontSize:24px;" border="none"></u--input>
</u-form-item>
<u-datetime-picker
@ -57,7 +57,7 @@
mode="date" ref="nextExperTime"
@confirm="nextExperTimeConfirm"
@cancel="nextExperTimeShow = false"
></u-datetime-picker>
></u-datetime-picker> -->
<u-form-item label="送检单位" prop="customName" borderBottom required>
<u--input v-model="formData.customName" readonly border="none"></u--input>
@ -242,6 +242,7 @@
remarsk:'',//
paramsData:{}
},
cycle:1,//
nextExperTimeShow:false,//
experTimeShow:false,//
experLocalShow:false,//
@ -265,12 +266,12 @@
message: '请选择试验日期',
trigger: ['blur', 'change']
},
'nextExperTime': {
type: 'string',
required: true,
message: '请选择试验日期',
trigger: ['blur', 'change']
},
// 'nextExperTime': {
// type: 'string',
// required: true,
// message: '',
// trigger: ['blur', 'change']
// },
'experLocal': {
type: 'string',
required: true,
@ -432,10 +433,8 @@
if (res) {
if(res.code == 200){
// this.$nextTick()
this.formData.sampleId=res.data.sampleId;
this.formData.devTypeCode=res.data.devTypeCode;
this.formData.devTypeName=res.data.devTypeName;
this.formData.devModule=res.data.devModule;
this.formData.sampleQuantity=res.data.sampleQuantity;
@ -443,6 +442,9 @@
this.formData.customId=res.data.customId;
this.formData.customName=res.data.customName;
this.cycle=Number(res.data.cycle);//
this.formData.experTime="";//
this.formData.nextExperTime="";//
this.formData.experLocalCode="";//
@ -486,12 +488,11 @@
this.formData.nextExperTime=res.data.nextExperTime;//
this.formData.experLocalCode=res.data.experLocalCode;//
this.formData.experLocal=res.data.experLocal;//
this.cycle=Number(res.data.cycle);//
this.formData.mainDevListData=res.data.mainDeviceVos[0];//
this.yjList=res.data.basisVos;//
this.infoList=res.data.experDevVos;//
this.configItemsList=res.data.configItemsVos;//-
this.formData.experStand=res.data.experStand;//
this.formData.experConclu=res.data.experConclu;//
this.formData.remarsk=res.data.remarsk;//
@ -509,6 +510,10 @@
experTimeConfirm(e){
this.experTimeShow = false;
this.formData.experTime = this.$u.date(e.value,'yyyy-mm-dd')
console.log(e)
let years=365*24*60*60*1000*this.cycle;//
// formData.nextExperTime/
this.formData.nextExperTime = this.$u.date((e.value+years),'yyyy-mm-dd')
// this.$refs.eForm.validateField('experTime')
},
openNextExperTimePick(){
@ -580,18 +585,20 @@
//-
goFillPage(item,index){
if(this.isView){
//
uni.navigateTo({//-
url: `/pages/test/testInfoFill?sampleId=${this.sampleId}&devTypeCode=${this.devTypeCode}&configItemsList=${JSON.stringify(this.configItemsList)}&itemData=${JSON.stringify(item)}&fillIndex=${index}&isView=isView`
url: `/pages/test/testInfoFill?sampleId=${this.sampleId}&devTypeCode=${this.devTypeCode}&configItemsList=${JSON.stringify(this.configItemsList)}&itemData=${JSON.stringify(this.infoList[index])}&fillIndex=${index}&isView=isView`
})
}else{
uni.navigateTo({//-
url: `/pages/test/testInfoFill?sampleId=${this.sampleId}&devTypeCode=${this.devTypeCode}&configItemsList=${JSON.stringify(this.configItemsList)}&itemData=${JSON.stringify(item)}&fillIndex=${index}`
url: `/pages/test/testInfoFill?sampleId=${this.sampleId}&devTypeCode=${this.devTypeCode}&configItemsList=${JSON.stringify(this.configItemsList)}&itemData=${JSON.stringify(this.infoList[index])}&fillIndex=${index}`
})
}
},
sumbitConfirm(){
console.log(this.infoList)
this.$refs.uForm.validate().then(res=>{
let basisIndex=this.yjList.length-1;
if(this.yjList[basisIndex].basisName==''){

View File

@ -54,6 +54,9 @@
<u-form-item label="外观状态" prop="devStatus" borderBottom required>
<u--input v-model="formData.devStatus" border="none" maxlength="30" :readonly="isView" placeholder="请填写外观状态"></u--input>
</u-form-item>
<u-form-item label="金额" prop="amount" borderBottom required>
<u--input v-model="formData.amount" type="number" border="none" maxlength="8" :readonly="isView" placeholder="请填写金额" ></u--input>
</u-form-item>
</view>
<!-- 测试 -->
<view v-for="(item,index) in configItemsList" :key="index">
@ -62,9 +65,13 @@
<view class="title-text">{{item.experTypeName}}</view>
</view>
<view class="content-box">
<u-form-item v-for="(titem,tindex) in item.itemList" :key="tindex" :label="titem.itemName" borderBottom required>
<u--input v-model="titem.value" border="none" maxlength="30" :readonly="isView" placeholder="请填写"></u--input>
</u-form-item>
<u-form-item label="金额" borderBottom required>
<u--input v-model="item.amount" border="none" readonly placeholder="金额"></u--input>
</u-form-item>
</view>
</view>
@ -111,7 +118,7 @@
manufacturer:'',//
manufactureDate:'',//
devStatus:'',//
amount:"0", // -0
amount:"", // -0
remarks:"''" ,//
devData:[]
},
@ -135,7 +142,22 @@
message: '请填写外观状态',
trigger: ['blur', 'change']
},
'amount': [
{
type: 'string',
required: true,
message: '请填写金额',
trigger: ['blur', 'change']
},
{
pattern: /^(([0-9]*)|(([0]\.\d{1,2}|[0-9]*\.\d{1,2})))$/,
transform(value) {
return String(value);
},
message: '大于等于0并且最多保留两位小数',
trigger: 'blur'
},
]
},
};
},
@ -152,7 +174,7 @@
this.itemData = JSON.parse(option.itemData) || {};
this.configItemsList = JSON.parse(option.configItemsList) || [];
console.log(this.itemData)
// console.log(this.itemData)
if(this.itemData.devId){
this.formData.devId=this.itemData.devId;
this.formData.experId=this.itemData.experId;
@ -160,7 +182,11 @@
this.formData.amount=this.itemData.amount;
this.formData.manufacturer=this.itemData.manufacturer;
this.formData.manufactureDate=this.itemData.manufactureDate;
this.formData.devData=JSON.parse(this.itemData.devData) || [];;
if(this.itemData.isTemp){
this.formData.devData=this.itemData.devData
}else{
this.formData.devData=JSON.parse(this.itemData.devData) || [];
}
let sum=0;
this.configItemsList.forEach(item=>{
// item.itemList.length
@ -219,7 +245,7 @@
let nowPage = pages[ pages.length - 1 ] //
let prevPage = pages[ pages.length - 2 ] //
this.$refs.uForm.validate().then(res=>{
this.$refs.uForm.validate().then(res=>{
// console.log('', this.formData);
// console.log(this.configItemsList)
var index=-1;
@ -239,6 +265,7 @@
icon: "none"
})
}else{// prevPage.$vm.status = false //
this.formData.isTemp=true;
prevPage.$vm.infoList[this.fillIndex]=this.formData;
uni.navigateBack({
delta:1 //

View File

@ -261,6 +261,7 @@
},
//
loadmore() {
this.chosenNum=0;
let obj = {
"keyWord":this.searchValue,
"sampleDev":this.sampleDev,
@ -275,19 +276,18 @@
if (res) {
console.log(res)
if(res.code == 200){
if(res.data?.length>0){
res.data.forEach(item=>{
item.checked=[];
})
if(this.page == 1){
this.listData = res.data;
}else{
this.listData = [...this.listData, ...res.data];
}
if(res.data?.length>0){
res.data.forEach(item=>{
item.checked=[];
})
if(this.page == 1){
this.listData = res.data;
}else{
console.log("没有更多了")
this.listData = [...this.listData, ...res.data];
}
}else{
console.log("没有更多了")
}
}
}
}).catch(error => {
@ -363,6 +363,10 @@
}
}).catch(error => {
console.log(error)
uni.showToast({
title: error.msg,
icon: "none"
})
})
}else{
uni.showToast({

View File

@ -4,7 +4,7 @@ const CONFIG = {
// PROD_URL: 'http://192.168.0.14:11997', // 生产环境
// TEST_URL: 'http://192.168.0.7:21997', // 测试环境
TEST_URL: 'http://192.168.0.14:11997', // 测试环境
// TEST_URL: 'http://192.168.2.162:11997',
// TEST_URL: 'http://192.168.2.161:11997',
};
// 页面路由白名单列表

View File

@ -78,7 +78,7 @@ const _fn = {
try {
res.data = JSON.parse(res.data);
} catch (e) {
console.error(`==接口出参string转json失败`);
// console.error(`==接口出参string转json失败`);
}
}
@ -149,10 +149,10 @@ const _fn = {
reject(res.data);
if (_config.isDev())
console.error(`==接口请求失败==`, res);
uni.showToast({
title: res?.data?.msg || '接口请求失败',
icon: 'none'
});
// uni.showToast({
// title: res?.data?.msg || '接口请求失败',
// icon: 'none'
// });
break;
}
},

View File

@ -9,7 +9,7 @@ export const getATeamCostForEcharts = '/szgqj/app/home/getATeamCostForEcharts';
// 大客户信息
export const getCostRank = '/szgqj/app/home/getCostRank';
//APP获取版本
export const getVersion = '/ljzhgd/app/home/getVersion';
export const getVersion = '/szgqj/app/home/getVersion';
// 下拉选
// 收样管理-工器具设备类型下拉选
export const getToolsSelect = '/szgqj/app/select/getToolsSelect';
@ -47,6 +47,12 @@ export const dispatchWork = '/szgqj/app/samples/dispatchWork';
export const addSamples = '/szgqj/app/samples/addSamples';
// 收样管理-二维码扫描-添加收样数据
export const getSampleLabelByQrCode = '/szgqj/app/qrCode/getSampleLabelByQrCode';
// 收样管理-是否可修改
export const getFlag = '/szgqj/app/samples/getFlag';
//获取金额
export const getAmount = '/szgqj/app/samples/getAmount';
//下载收样委托书
export const downloadEntrustContract = '/szgqj/app/samples/downloadEntrustContract';
//试验管理

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B