检测流程

This commit is contained in:
13405411873 2024-11-04 16:47:54 +08:00
parent 4f936d1f0a
commit 075b14bf22
8 changed files with 233 additions and 14 deletions

View File

@ -11,8 +11,8 @@
method: 'get',
params:''
}).then(res => {
if (res.code == 200&&res.msg &&res.msg != version){
console.log(res,1444);
if (res.code == 200 && res.data &&res.data != version){
uni.showModal({
title:'版本升级',
content:'新版本上线了,根据您自己的选择是否升级',

View File

@ -1,7 +1,7 @@
// 应用全局配置
module.exports = {
baseUrl: 'https://www.nuoyunr.com/admin-api',
//baseUrl: 'http://127.0.0.1:48080/admin-api',
//baseUrl: 'https://www.nuoyunr.com/admin-api',
baseUrl: 'http://127.0.0.1:48080/admin-api',
imagesUrl: 'http://www.nuoyunr.com/lananRsc',
baseImageUrl: 'https://www.nuoyunr.com/minio',
// 应用信息

View File

@ -337,6 +337,14 @@
"navigationStyle": "custom"
}
},
{
"path" : "pages/index/selectProject",
"style" :
{
"navigationBarTitleText" : "选择项目",
"navigationStyle": "custom"
}
}
],
"globalStyle": {

View File

@ -212,13 +212,14 @@
});
console.log('员工');
request({
url: '/getJcWorkerInfo',
url: '/rescue/getJcWorkerInfo',
method: 'get',
}).then((res)=>{
console.log(res,219219);
if(res.code == 200){
uni.setStorageSync('staffinfo',res.user)
uni.setStorageSync('partnerId',res.partnerInfo.partnerId)
uni.setStorageSync('staffinfo',res.data.user)
uni.setStorageSync('partnerId',res.data.partnerId)
uni.setStorageSync('roleSelect','worker')
uni.hideLoading();
uni.redirectTo({

View File

@ -101,7 +101,13 @@
</view>
</view>
<view class="list-box" @click="toSelectProject()" >
<view class="l-left">检测流程</view>
<view class="l-right">
<input type="textarea" v-model="inspectionWorkNodeStr" placeholder="点击选择检测流程">
</view>
</view>
</view>
@ -150,6 +156,7 @@
showxin:false,
showzhi:false,
skuId:0,
inspectionWorkNodes:[],
columns: [],
options:[],
nature:[],
@ -171,12 +178,21 @@
unitName:'',
kehui:'',
naturetext:'',
customerData:[]
customerData:[],
inspectionWorkNodeStr:""
}
},
onLoad() {
this.getinitialize()
uni.$on('selectProject', (data) => {
this.inspectionWorkNodes = data
for (var i = 0; i < this.inspectionWorkNodes.length; i++) {
this.inspectionWorkNodeStr = this.inspectionWorkNodeStr + this.inspectionWorkNodes[i].projectName +" "
this.inspectionWorkNodes[i].orderNum = i+1
}
});
},
onShow() {
@ -275,6 +291,11 @@
this.zhilist.push(reszhi.data)
},
toSelectProject(){
uni.navigateTo({
url: '/pages/index/selectProject'
})
},
async getgoodes(){
if(this.carNum == ''|| this.customerSource == "" || this.skuId == ''){
uni.showToast({
@ -283,7 +304,13 @@
})
return
}
if(this.inspectionWorkNodes.length == 0){
uni.showToast({
title:'请选择检测流程!',
icon:'none'
})
return
}
let data = {
partnerId:uni.getStorageSync('partnerId'),
@ -298,6 +325,7 @@
customerSource:this.customerSource,
skuId :this.skuId,
carNature:this.carNature,
inspectionWorkNodes:this.inspectionWorkNodes
}
let res = await request({

View File

@ -38,7 +38,7 @@
<view class="m-top">
<view class="top-left">
<view class="dhei">{{item.goodsName}}</view>
<text class="xhui">接待{{item.workerName}}</text>
<text class="xhui">施工人{{item.workerName}}</text>
</view>
<view @click="callUser(item.buyPhone)" class="top-right">
<image src="../../static/detection/teel.png" mode=""></image>

View File

@ -0,0 +1,178 @@
<template>
<view class="content">
<view style="width: 100%; height: 44px;"></view>
<view class="top-heder">
<view class="t-left" @click="getback()">
<uni-icons type="left" size="18"></uni-icons>
</view>
<view class="t-title">
<text>选择检测项目</text>
</view>
<view class="t-you"></view>
</view>
<view class="cont_box">
<view class="title_">
可选检测项目
</view>
<view class="box_">
<view class="box_button " :class="{ 'box_button_x' :selectProject.indexOf(item)>-1 }" v-for="item in inpectionProjects" @click="clickProject(item)">{{item.projectName}}</view>
</view>
<view class="title_">
已选检测项目
</view>
<u-steps activeColor="#0D2E8D" direction="column">
<u-steps-item :iconSize="iconSize" v-for="item in selectProject" :title="item.projectName" >
</u-steps-item>
</u-steps>
</view>
<view class="dlanniu" @click="sureChoose()" >
<text>确定选择</text>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
iconSize:130,
inpectionProjects:[],
selectProject:[]
}
},
onShow() {
this.getProjects()
},
methods: {
sureChoose(){
if(this.selectProject.length == 0){
uni.showToast({
title:'请选择项目!',
icon:'none'
})
return
}
uni.$emit('selectProject', this.selectProject);
this.getback()
},
getback(){
uni.navigateBack()
},
async getProjects(){
let res = await request({
url:'/inspection/dl-inspection-project/page',
method: 'get',
params:{
pageNo:1,
pageSize:100
}
})
this.inpectionProjects = res.data.records
},
clickProject(data){
let idx = this.selectProject.indexOf(data)
if(idx>-1){
// 使splice
this.selectProject.splice(idx, 1);
}else{
this.selectProject.push(data)
}
}
}
}
</script>
<style scoped>
.cont_box{
box-sizing: border-box;
padding: 10px;
}
.title_{
font-weight: bold;
margin-bottom: 5px;
}
.box_{
width: 100%;
display: flex;
flex-wrap: wrap;
}
.box_button_x{
border-radius: 6px;
border: 1px solid #0D2E8D;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
box-sizing: border-box;
padding: 5px 10px;
margin-right: 5px;
margin-bottom: 5px;
background: #0D2E8D;
color: #fff;
}
.box_button{
border-radius: 6px;
border: 1px solid #999;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
box-sizing: border-box;
padding: 5px 10px;
margin-right: 5px;
margin-bottom: 5px;
}
.dlanniu{
width: 80%;
height: 45px;
background: linear-gradient(180deg, #3F61C0 0%, #0D2E8D 100%);
border-radius: 50px;
display: flex;
align-items: center;
justify-content: center;
margin: 20px auto;
color: white;
}
.t-you{
height: 100%;
width: 20%;
}
.content {
box-sizing: border-box;
width: 100%;
height: calc(100vh);
background: white;
}
.top-heder{
width: 100%;
height: 46px;
background: white;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 5px 15px;
}
.t-title{
font-size: 17px;
font-weight: bold;
color: #333333;
}
.t-left{
width: 10%;
}
</style>

View File

@ -104,14 +104,18 @@
pageSize: 20,//
totalPages: 0,//
tapList:[
{
text:"待接受",
value:"1"
},
{
text:"进行中",
value:"0"
value:"2"
},
{
text:"已完成",
value:"1",
value:"3",
}
]
}
@ -148,7 +152,7 @@
},
async getList(){
let res = await request({
url:'/partnerOwn/partner/inspectionList',
url:'/system/info/geStelectInspection',
method: 'get',
params:{
partnerId:this.partnerId,