工程师接单接口

master
chen 2022-04-06 16:05:38 +08:00
parent 42c488eaf7
commit 95fa9b7aef
8 changed files with 140 additions and 86 deletions

View File

@ -92,7 +92,6 @@ const tools = {
for(var i = 0; i < phoneStr.length; i++){
if (i==startNum||i==endNum){
phoneArr.push(`${character}` + phoneStr.charAt(i));
console.log(phoneArr);
} else {
phoneArr.push(phoneStr.charAt(i));
}

View File

@ -230,7 +230,7 @@
'/pagesB/personal-information/personal-information',
'/pagesB/electronic-certificate/electronic-certificate',
'/pagesB/service-range/service-range',
'/pages/workOrder/workOrderLlsit?status=已完成',
'/pages/workOrder/workOrderLlsit?status=已完成&statusId=8',
'/pagesB/my-account/my-account?index=0',
'/pagesB/set-up/set-up',
];

View File

@ -94,7 +94,7 @@
<view class="home-fun-box" v-if="role==4">
<view class="fun-title col3 fon28 disac bold">项目维修</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in projectRepairList" :key="index">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in projectRepairList" :key="index">
<view class="posir" style="height: 58rpx;">
<image :style="{width: [53,52,51][index]+'rpx',height:[58,58,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
@ -108,7 +108,7 @@
<view class="home-fun-box">
<view class="fun-title col3 fon28 disac bold">待办工单</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in stayWorkOrderList" :key="index">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in stayWorkOrderList" :key="index">
<view class="posir" style="height: 58rpx;">
<image :style="{width: [53,48,51,58][index]+'rpx',height:[58,58,58,53][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
@ -121,7 +121,7 @@
<view class="home-fun-box">
<view class="fun-title col3 fon28 disac bold">待办事件</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in stayEventList" :key="index">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in stayEventList" :key="index">
<view class="posir" style="height: 58rpx;">
<image :style="{width: [58,58,50][index]+'rpx',height:[58,54,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
@ -135,7 +135,7 @@
<view class="home-fun-box">
<view class="fun-title col3 fon28 disac bold">工单数据</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in workOrderList" :key="index">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in workOrderList" :key="index">
<view class="posir" style="height: 60rpx;">
<image :style="{width: [59,56,58,58][index]+'rpx',height:[49,58,58,60][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
@ -161,7 +161,7 @@
<view class="home-fun-box" v-if="role==4">
<view class="fun-title col3 fon28 disac bold">结算情况</view>
<view class="disac mar-s40">
<view @tap="stayEv(item.title)" class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index">
<view @tap="stayEv(item.title,item.id)" class="disjcac fc width25" v-for="(item,index) in settlementList" :key="index">
<view class="posir" style="height: 58rpx;">
<image :style="{width: [58,50,58][index]+'rpx',height:[54,58,58][index] + 'rpx'}" style="width: 58rpx;height: 53rpx;" :src="item.imgsrc" mode="widthFix"></image>
<view class="engineer-num" v-if="item.num!=0">{{item.num}}</view>
@ -242,7 +242,7 @@
},
data() {
return {
role: 1, // 1 2: 3: 4
role: uni.getStorageSync('type_id'), // 1 2: 3: 4
statusHeight: uni.getSystemInfoSync().statusBarHeight + 50,
messageNumber: 16 ,//
noticeList:['2021年11月06日公司团建维修服务暂停一天服务暂停一天服务暂停一天。','51akslfj;dkpiojasdjf;j1ij'],//
@ -274,35 +274,35 @@
],
//
projectRepairList:[
{imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:99},
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维修中',num:6},
{imgsrc:'/static/public/icon-home-staySingle.png',title:'待接单',num:0,id:2},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待执行',num:99,id:0},
{imgsrc:'/static/public/icon-home-repairIng.png',title:'维修中',num:6,id:4},
],
//
workOrderList:[
{imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0},
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0},
{imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0},
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:6,},
{imgsrc:'/static/public/icon-home-abnormalSingle.png',title:'异常单',num:0,id:100},
{imgsrc:'/static/public/icon-home-overdueSingle.png',title:'逾期单',num:0,id:101},
{imgsrc:'/static/public/icon-home-overtime.png',title:'超时单 ',num:0,id:0},
{imgsrc:'/static/public/icon-home-workOrderPool.png',title:'工单池',num:6,id:0},
],
//
settlementList:[
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:6},
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0},
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:6,id:7},
{imgsrc:'/static/public/icon-home-commission.png',title:'佣金',num:0,id:5},
],
//
stayWorkOrderList:[
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:6},
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维修',num:6},
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0},
{imgsrc:'/static/public/icon-home-stayImplement.png',title:'待受理',num:0,id:0},
{imgsrc:'/static/public/icon-home-stayAssign.png',title:'待指派',num:6,id:0},
{imgsrc:'/static/public/icon-home-stayRepair.png',title:'待维修',num:6,id:3},
{imgsrc:'/static/public/icon-home-returnVisit.png',title:'待回访',num:0,id:8},
],
//
stayEventList:[
{imgsrc:'/static/public/icon-home-stayBatch.png',title:'待审批',num:0},
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0},
{imgsrc:'/static/public/icon-home-stayBatch.png',title:'待审批',num:0,id:6},
{imgsrc:'/static/public/icon-home-stayCollection.png',title:'待收款',num:0,id:5},
{imgsrc:'/static/public/icon-home-received.png',title:'已收款',num:0,id:7},
],
//
dataQueryList:[
@ -335,12 +335,12 @@
})
},
//
stayEv(title) {
stayEv(title,statusId) {
let url = '';
if(title=='佣金') {
url = `/pagesB/my-account/my-account?index=1`
} else {
url = `/pages/workOrder/workOrderLlsit?status=${title}`
url = `/pages/workOrder/workOrderLlsit?status=${title}&statusId=${statusId}`
}
uni.navigateTo({
url:url

View File

@ -130,7 +130,21 @@
uni.removeStorageSync('partsList');
uni.removeStorageSync('targetObj');
},
onLoad(op) {
this.checkInfoSignIn(op.id);
},
methods: {
//
checkInfoSignIn(id){
let params = {
order_id:3,
steps:1,
start_address:'四川省成都市成华区'
}
this.$requst.post('/universal/api.order/process_order',params).then(res=>{
})
},
//
chooseImg(){
uni.chooseImage({

View File

@ -32,7 +32,7 @@
</view>
<view class="project-list">
<!-- 列表循环体 -->
<view class="li" @click="projectDetailsFun(item.order_status,item.order_id,item.statusText,item.backgroundColor)" v-for="(item,index) in dataList" :key="index">
<view class="li" @click="projectDetailsFun(item.order_status,item.order_id,item.attributes.text,item.attributes.color)" v-for="(item,index) in dataList" :key="index">
<view class="work-order-code">工单编号{{item.order_number}}</view>
<view class="message">
<image class="img" src="../../static/del/img001.png" mode="aspectFill"></image>
@ -47,10 +47,10 @@
<view class="date">{{item.failure_time}}</view>
</view>
<view class="specification scal09">
紧急程度<view class="text"> {{item.principal}}</view>
紧急程度<view class="text"> {{item.emergency_level_view}}</view>
</view>
<view class="specification scal09">主负责人{{item.name}}</view>
<view class="installation-site scal09">故障描述{{item.failure_description}}</view>
<view class="specification scal09">主负责人{{item.principal}}</view>
<view class="installation-site scal09 clips1" style="margin-bottom: -10rpx;">故障描述{{item.failure_description}}</view>
</view>
</view>
</view>
@ -66,7 +66,7 @@
</view>
</view>
</view>
<nothing-page v-if="total==dataList.length" content="暂无更多列表数据" currentType="0"></nothing-page>
<nothing-page v-if="dataList.length==0" content="暂无更多列表数据" currentType="0"></nothing-page>
</view>
</container-subgroup-two>
@ -89,7 +89,7 @@
})
return {
statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 40,
role: 1, // 1 2: 3: 4
role: uni.getStorageSync('type_id'), // 1 2: 3: 4
date: currentDate,
workeOrderStatus:'工单状态',
array: [
@ -104,26 +104,26 @@
keyword:""
},
total:0,
dataList:[]
dataList:[],
statusId:0
}
},
onLoad(option) {
onLoad(op) {
if(op.statusId!=undefined) this.statusId = op.statusId;
//
this.getType(option);
this.getType();
},
methods: {
//
getType(option){
getType(){
this.$requst.get('/universal/api.order/order_type').then(res => {
// this.$toolAll.tools.showToast(res.msg);
if (res.code) {
this.array=[...res.data]
//
if(option.status){
this.workeOrderStatusIndex = this.array.findIndex(item=>item.id==option.status);
if(this.statusId){
this.workeOrderStatusIndex = this.array.findIndex(item=>item.id==this.statusId);
if(this.workeOrderStatusIndex!=-1) this.workeOrderStatus = '';
}
this.getDatalist();
@ -145,8 +145,7 @@
},
//
projectDetailsFun(status,id,statusText,statusColor) {
// if (uni.getStorageSync('type_id')==4 && status == 3) {
if (status == 3) {
if (uni.getStorageSync('type_id')==4 && status == 2) {
//
uni.showModal({
cancelText:'取消',
@ -156,8 +155,15 @@
content:'确认接单',
success: (res) => {
if(res.confirm){
uni.navigateTo({
url: `/pages/workOrder/workOrder?id=${id}`
this.$requst.post('/universal/api.order/accept_order',{order_id:id,is_order:1}).then(res=>{
if(res.code){
this.$toolAll.tools.showToast('接单成功');
setTimeout(()=>{
uni.navigateTo({
url: `/pages/workOrder/workOrder?id=${id}`
})
},1000)
}
})
}
}
@ -385,7 +391,7 @@
.project-list .li .message .installation-site {
color: #9b9ba3;
font-size: 24rpx;
line-height: 24rpx;
/* line-height: 24rpx; */
}
.project-list-address {

View File

@ -28,13 +28,13 @@
</view>
</view>
<view class="work-order-from">
<picker mode="date" @change="serveDate">
<!-- <picker mode="date" @change="serveDate">
<view class="serve-date">
<view class="text" v-if="serviceTime==''"></view>
<view class="text" style="color: #000000;" v-else>{{serviceTime}}</view>
<image class="icon" src="../../static/iocn/jt.png" mode=""></image>
</view>
</picker>
</picker> -->
<view class="total-cost">
<view class="li">
<view class="text">上门费</view>
@ -42,15 +42,17 @@
</view>
<view class="li">
<view class="text on">税金</view>
<view class="price">{{detailObj.taxes}}</view>
<view class="price">{{taxesPrice}}</view>
</view>
<view class="li">
<view class="text">材料费</view>
<view class="price">{{detailObj.materialCost}}</view>
</view>
<view class="li">
<view class="text">其他费用</view>
<view class="price">{{detailObj.otherCost}}</view>
<view class="text flexs">其他费用</view>
<view class="price disac">
<input class="tright fon28" type="digit" v-model="detailObj.otherCost" placeholder="0.00" />
</view>
</view>
</view>
<view class="total-price">
@ -65,15 +67,20 @@
</picker>
<view class="is-invoice">
<view class="text">是否开票</view>
<view class="radio" @click="isInvoiceFun(true)">
<image v-if="isInvoice && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view class="radio" @click="isInvoiceFun(0)">
<image v-if="billingIndex==0 && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view>
<text></text>
<text>专票</text>
</view>
<view class="radio" @click="isInvoiceFun(false)">
<image v-if="!isInvoice && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view class="radio" @click="isInvoiceFun(1)">
<image v-if="billingIndex==1 && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view>
<text></text>
<text>普票</text>
</view>
<view class="radio" @click="isInvoiceFun(2)">
<image v-if="billingIndex==2 && currentWay!=1 && currentWay!=2" src="../../static/iocn/xz.png" class="icon" mode="" lazy-load></image>
<view v-else class="icon1"></view>
<text>不开票</text>
</view>
</view>
<view class="is-invoice">
@ -174,7 +181,7 @@
doorToDoorFee:'120.09',
taxes:'120.20',
materialCost:'120.02',
otherCost:'121.03',
otherCost:'',
address:'湖南省株洲市荷塘区红旗中路456号(五矿二十三冶)',
collectionCode:[
'/static/del/500478055.png',
@ -183,7 +190,7 @@
]
},
paymentMode:'',//
isInvoice: true,//
billingIndex:0,// 0: 1 2
isMoney: true,//
isCanvas: true,
signImage: '',//
@ -196,10 +203,23 @@
computed:{
totalPrice() {
let prices = 0;
prices = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.taxes,'+',2);
prices = this.$toolAll.tools.operationEv(prices,this.detailObj.materialCost,'+',2);
prices = this.$toolAll.tools.operationEv(prices,this.detailObj.otherCost,'+',2);
if(this.currentWay!=1 && this.currentWay!=2) {
prices = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.taxesPrice,'+',2);
prices = this.$toolAll.tools.operationEv(prices,this.detailObj.materialCost,'+',2);
prices = this.$toolAll.tools.operationEv(prices,this.detailObj.otherCost,'+',2);
}
return this.$toolAll.tools.addXiaoShu(prices);
},
taxesPrice() {
let taxesResult = 0
if(this.billingIndex!=0) {
taxesResult = '0.00';
} else {
taxesResult = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.materialCost,'+',2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,this.detailObj.otherCost,'+',2);
taxesResult = this.$toolAll.tools.operationEv(taxesResult,0.1,"*",2);
}
return taxesResult;
}
},
onLoad: function(options) {
@ -212,7 +232,9 @@
//线
content.setLineCap('round')
//线
content.setLineJoin('round')
content.setLineJoin('round');
//
// this.conversionEv();
},
methods: {
//
@ -229,7 +251,7 @@
f:this.detailObj.otherCost,
g:this.totalPrice,
h:this.paymentMode,
i:this.isInvoice,
i:this.billingIndex,
j:this.isMoney,
k:this.signImage,
m:this.remarkText
@ -254,7 +276,9 @@
},
//
openCollectionCodeEv(){
this.ifCollectionCode = !this.ifCollectionCode;
if(this.currentWay!=1 && this.currentWay!=2) {
this.ifCollectionCode = !this.ifCollectionCode;
}
},
clearingFormFun(index) {
this.currentWay = index;
@ -263,15 +287,29 @@
this.paymentModeIndex = data.detail.value;
this.paymentMode = this.array[this.paymentModeIndex];
},
serveDate(data) {
console.log(data)
this.serviceTime = data.detail.value;
},
isInvoiceFun(is) {
this.isInvoice = is
// serveDate(data) {
// this.serviceTime = data.detail.value;
// },
isInvoiceFun(index) {
if(this.currentWay!=1 && this.currentWay!=2) {
this.billingIndex = index;
// this.conversionEv();
}
},
//
// conversionEv(){
// if(this.billingIndex!=0) {
// this.detailObj.taxes = '0.00';
// } else {
// let priceTotal = this.$toolAll.tools.operationEv(this.detailObj.doorToDoorFee,this.detailObj.materialCost,'+',2);
// priceTotal = this.$toolAll.tools.operationEv(priceTotal,this.detailObj.otherCost,'+',2);
// this.detailObj.taxes = this.$toolAll.tools.operationEv(priceTotal,0.1,"*",2);
// }
// },
isMoneyFun(is) {
this.isMoney = is
if(this.currentWay!=1 && this.currentWay!=2) {
this.isMoney = is;
}
},
//
//

View File

@ -86,7 +86,7 @@
<view class="title">主维保人</view>
<input type="text" disabled class="input input-black" :value="targetObj.maintainer" />
</view>
<view class="li">
<!-- <view class="li">
<view class="title">更换配件</view>
<view class="rideo" style="margin-left: 14rpx;">
<view class="isrideo" @click="isrideoFun(true)">
@ -102,7 +102,7 @@
<view class=""></view>
</view>
</view>
</view>
</view> -->
</view>
<view class="work-order-from">
<view class="li">
@ -170,7 +170,7 @@
},
data() {
return {
isrideo: true,
// isrideo: true,
accessoriesData: [],
targetObj:''
}
@ -212,10 +212,10 @@
this.targetObj.maintenanceImgList.splice(index,1);
},
//
isrideoFun(is) {
this.isrideo = is;
this.targetObj.ifParts = this.isrideo;
},
//isrideoFun(is) {
// this.isrideo = is;
// this.targetObj.ifParts = this.isrideo;
//},
goWorkorderTwo(){
console.log(this.targetObj);
if(this.checkEmpty()) {

View File

@ -109,13 +109,10 @@
getData(){
this.$requst.get('/universal/api.user/user_info').then(res => {
if (res.code == 1 && res.data.length != 1) {
this.nickname=res.data.nickname
this.full_name=res.data.name
if(res.data.sex==0){
this.genderNum=1
}else{
this.genderNum=res.data.sex
}
this.nickname=res.data.nickname;
this.full_name=res.data.name;
// res.data.sex ==> 2 1 0
res.data.sex != 1 ? this.genderNum = 1 : this.genderNum = 2;
this.contact_number=res.data.phone
this.e_mail=res.data.email
this.id_card_no=res.data.idcard