Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-repair-app
This commit is contained in:
commit
20a6b27723
@ -1,19 +1,21 @@
|
||||
<template>
|
||||
<view class="orderCard" @click="viewDetail">
|
||||
<view class="title">
|
||||
{{ order.licenseNumber }} 的配件申请
|
||||
{{ order.licenseNumber }} 的{{titleText}}
|
||||
</view>
|
||||
<view class="desc">
|
||||
申请时间:{{formatTimestamp(order.createTime)}}
|
||||
{{'配件申请单'==titleText?'申请':'发起'}}时间:{{formatTimestamp(order.createTime)}}
|
||||
</view>
|
||||
<view class="message red" v-if="order.status=='05'">
|
||||
<view class="remark">
|
||||
原因:{{ order.remark }}
|
||||
</view>
|
||||
</view>
|
||||
<image v-if="order.status=='05'" class="stateImg" src="@/pages-repair/static/weitongguo.png" ></image>
|
||||
<image v-if="order.status=='01'" class="stateImg" src="@/pages-repair/static/daishenhe.png" ></image>
|
||||
<image v-if="order.status=='02'" class="stateImg" src="@/pages-repair/static/yitongguo.png" ></image>
|
||||
<view v-if="'配件申请单'==titleText">
|
||||
<image v-if="order.status=='05'" class="stateImg" src="@/pages-repair/static/weitongguo.png" ></image>
|
||||
<image v-else-if="order.status=='01'" class="stateImg" src="@/pages-repair/static/daishenhe.png" ></image>
|
||||
<image v-else class="stateImg" src="@/pages-repair/static/yitongguo.png" ></image>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -32,7 +34,13 @@ export default {
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
titleText: {
|
||||
type: String,
|
||||
default: () => {
|
||||
return ""
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -34,15 +34,15 @@
|
||||
<!-- </view>-->
|
||||
<view class="projList">
|
||||
<!-- <view v-for="(proj, index) in item.projList" :key="proj.id" class="projItem" @click="chooseProj(proj)">-->
|
||||
<view class="addProj" @click="addProject()" v-if="show">
|
||||
<!-- <text class="projName">新增维修项目</text>-->
|
||||
<button type="primary" size="mini" class="addBtn" >新增</button>
|
||||
</view>
|
||||
<view v-for="item in groupList" :key="item.id" class="projItem" @click="chooseProj(item)">
|
||||
<text class="projName">{{ item.name }}</text>
|
||||
<image v-if="selectedProj && selectedProj.find(f => f.id === item.id)" class="projChooseIcon"
|
||||
mode="aspectFit" src="/static/icons/duihao.png"></image>
|
||||
</view>
|
||||
<view class="projItem" @click="addProject()" v-if="show">
|
||||
<!-- <text class="projName">新增维修项目</text>-->
|
||||
<button class="addBtn">新增维修项目</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -245,6 +245,7 @@ export default {
|
||||
|
||||
.type {
|
||||
width: 200rpx;
|
||||
overflow-y: scroll;
|
||||
background: #FFFFFF;
|
||||
|
||||
.typeItem {
|
||||
@ -261,7 +262,7 @@ export default {
|
||||
.container {
|
||||
flex: 1;
|
||||
width: 0;
|
||||
|
||||
overflow-y: scroll;
|
||||
padding: 30rpx;
|
||||
|
||||
.groupList {
|
||||
@ -283,11 +284,14 @@ export default {
|
||||
}
|
||||
|
||||
.projList {
|
||||
padding: 40rpx 0;
|
||||
padding-bottom: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
row-gap: 40rpx;
|
||||
|
||||
.addProj{
|
||||
text-align: right;
|
||||
}
|
||||
.projItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -7,14 +7,6 @@
|
||||
<view class="phoneHeader">
|
||||
<view class="title">查找手机号</view>
|
||||
<view class="desc">根据手机号查找/建立客户信息</view>
|
||||
<view>
|
||||
<radio-group @change="handleChange">
|
||||
<label v-for="(option, index) in options" :key="index" class="radio-label">
|
||||
<radio :value="option.value" :checked="option.value === ticketType"/>
|
||||
<text>{{ option.label }}</text>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="phoneBody">
|
||||
<view class="searchBox">
|
||||
@ -26,7 +18,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card" style="padding-bottom: 20rpx">
|
||||
<view class="carTitle">单据类型</view>
|
||||
<radio-group @change="handleChange" style="padding: 0 20rpx">
|
||||
<label v-for="(option, index) in options" :key="index" class="radio-label">
|
||||
<radio :value="option.value" :checked="option.value === ticketType"/>
|
||||
<text>{{ option.label }}</text>
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
<view :class="{ 'none': !carList || carList.length === 0 }" class="card cardInfo carCard">
|
||||
<template v-if="!carList || carList.length === 0">
|
||||
<image class="cardNoneIcon" mode="widthFix" src="/pages-order/static/carNoneIcon.png"></image>
|
||||
@ -676,7 +676,7 @@ export default {
|
||||
}
|
||||
|
||||
.radio-label {
|
||||
display: flex;
|
||||
//display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
@ -146,15 +146,20 @@ export default {
|
||||
pageSize: 9999
|
||||
}
|
||||
}).then(res => {
|
||||
this.list = res.data.records
|
||||
this.list.map((item) => {
|
||||
getDictTextByCodeAndValue("repair_work_type",item.workType).then(value => {
|
||||
item.workTypeText = value
|
||||
}).catch(error => {
|
||||
item.workTypeText = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
})
|
||||
if (res.code == 200) {
|
||||
let thisList = res.data.records
|
||||
thisList.map((item) => {
|
||||
getDictTextByCodeAndValue("repair_work_type", item.workType).then(value => {
|
||||
item.workTypeText = value
|
||||
}).catch(error => {
|
||||
item.workTypeText = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
})
|
||||
this.list = thisList
|
||||
} else {
|
||||
this.list = []
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
@ -166,15 +171,16 @@ export default {
|
||||
method: 'get',
|
||||
params: {ticketId: this.ticketId}
|
||||
}).then((res) => {
|
||||
this.list = res.data
|
||||
this.list.map((item) => {
|
||||
getDictTextByCodeAndValue("repair_work_type",item.workType).then(value => {
|
||||
let thisList = res.data
|
||||
thisList.map((item) => {
|
||||
getDictTextByCodeAndValue("repair_work_type", item.workType).then(value => {
|
||||
item.workTypeText = value
|
||||
}).catch(error => {
|
||||
item.workTypeText = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
})
|
||||
this.list = thisList
|
||||
if (this.list.length > 0) {
|
||||
console.log(this.list[0].userId)
|
||||
this.checkedUserId = this.list[0].userId
|
||||
|
@ -145,8 +145,8 @@
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="isDetail == '0'">
|
||||
<image src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
||||
<text class="addText" @click="editPeople('xs', item)">添加销售人员</text>
|
||||
<image @click="editPeople('xs', item)"src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
||||
<!-- <text class="addText" @click="editPeople('xs', item)">添加销售人员</text>-->
|
||||
</template>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
@ -162,8 +162,8 @@
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="isDetail == '0'">
|
||||
<image src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
||||
<text class="addText" @click="editPeople('sg', item)">添加施工人员</text>
|
||||
<image @click="editPeople('sg', item)" src="/pages-order/static/addIcon.png" style="width: 28rpx;height: 28rpx"></image>
|
||||
<!-- <text class="addText" @click="editPeople('sg', item)">添加施工人员</text>-->
|
||||
</template>
|
||||
|
||||
</view>
|
||||
|
@ -12,7 +12,7 @@
|
||||
<view class="orderList">
|
||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||
<order-card v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="viewDetail" ></order-card>
|
||||
<order-card v-for="(item, index) in orderList" :titleText="(0==activeKey || 1==activeKey)?'配件申请单':(2==activeKey)?'领料单':'退料单'" :key="index" :order="item" @childEvent="viewDetail" ></order-card>
|
||||
<view style="text-align: center" v-if="orderList.length==0">
|
||||
<image class="" src="@/static/images/nothing.png" ></image>
|
||||
</view>
|
||||
@ -86,6 +86,8 @@
|
||||
onLoad(){
|
||||
this.userInfo = getUserInfo()
|
||||
console.log(this.userInfo)
|
||||
},
|
||||
onShow(){
|
||||
this.getOrderList()
|
||||
},
|
||||
methods:{
|
||||
@ -126,10 +128,15 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages-repair/applyList/todoDetail?viewType=apply&id='+item.id
|
||||
})
|
||||
}else{
|
||||
//领料单\退料单详情
|
||||
}else if(2==this.activeKey){
|
||||
//领料单详情
|
||||
uni.navigateTo({
|
||||
url: '/pages-repair/applyList/todoDetail?viewType=receive&id='+item.id
|
||||
url: '/pages-repair/applyList/todoDetail?viewType=receive&canOperate=true&id='+item.id
|
||||
})
|
||||
}else {
|
||||
//退料单详情
|
||||
uni.navigateTo({
|
||||
url: '/pages-repair/applyList/todoDetail?viewType=back&canOperate=true&id='+item.id
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<VNavigationBar background-color="#fff" title="申请单详情" title-color="#333"></VNavigationBar>
|
||||
<VNavigationBar background-color="#fff" :title="title" title-color="#333"></VNavigationBar>
|
||||
<view class="body">
|
||||
<view class="repairInfo">
|
||||
<view class="header">
|
||||
部件信息
|
||||
配件信息
|
||||
</view>
|
||||
<view class="repairItem" v-for="(item, index) in repairList" :key="index">
|
||||
<view class="repairName">{{ item.waresName }} <text class="repairNum">×{{item.waresCount}}</text></view>
|
||||
@ -29,6 +29,14 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="canOperate" class="footer">
|
||||
<view class="no" @click="confirmOpe('no')">
|
||||
{{ backText }}
|
||||
</view>
|
||||
<view class="yes" @click="confirmOpe('yes')">
|
||||
{{ yesText }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -44,6 +52,10 @@ export default {
|
||||
return {
|
||||
viewType:"",
|
||||
id:"",
|
||||
title:"",
|
||||
canOperate:false,
|
||||
backText:"",
|
||||
yesText:"",
|
||||
repairList: [
|
||||
// {
|
||||
// name: '7字小钩',
|
||||
@ -66,6 +78,7 @@ export default {
|
||||
},
|
||||
onLoad(data){
|
||||
this.viewType = data.viewType
|
||||
this.canOperate = data.canOperate
|
||||
this.id = data.id
|
||||
this.getDetail()
|
||||
},
|
||||
@ -74,31 +87,116 @@ export default {
|
||||
let url;
|
||||
let params={};
|
||||
if("apply"==this.viewType){
|
||||
this.title = "配件申请单详情"
|
||||
//配件申请单
|
||||
url = "/admin-api/repair/twi/list"
|
||||
params.twId = this.id
|
||||
}else{
|
||||
if("receive"==this.viewType){
|
||||
//领料
|
||||
this.title = "领料单详情"
|
||||
this.yesText="我已领料"
|
||||
this.backText="未领料(拒绝)"
|
||||
}else{
|
||||
this.title = "退料单详情"
|
||||
this.yesText="我已退料"
|
||||
this.backText="未退料(拒绝)"
|
||||
}
|
||||
//领料单、退料单
|
||||
|
||||
url = "/admin-api/repair/so/get"
|
||||
params.id = this.id
|
||||
}
|
||||
request({
|
||||
url: url,
|
||||
method: 'get',
|
||||
params:params
|
||||
}).then((res) => {
|
||||
if (res.code == 200 && res.data.length>0) {
|
||||
this.repairList = res.data
|
||||
this.repairList.map((item)=>{
|
||||
getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => {
|
||||
item.wares.unit = value
|
||||
}).catch(error => {
|
||||
item.wares.unit = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
})
|
||||
if (res.code == 200) {
|
||||
if("apply"==this.viewType){
|
||||
//配件申请单
|
||||
res.data.map((item)=>{
|
||||
getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => {
|
||||
item.wares.unit = value
|
||||
}).catch(error => {
|
||||
item.wares.unit = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
})
|
||||
this.repairList = res.data
|
||||
}else{
|
||||
//领料单、退料单
|
||||
let goodsList = res.data.goodsList
|
||||
let thisRepairList = []
|
||||
goodsList.map((item)=>{
|
||||
getDictTextByCodeAndValue("repair_unit",item.wares.unit).then(value => {
|
||||
item.wares.unit = value
|
||||
}).catch(error => {
|
||||
item.wares.unit = "未知"
|
||||
console.error(error);
|
||||
});
|
||||
thisRepairList.push({
|
||||
waresName:item.wares.name,
|
||||
waresCount:item.goodsCount,
|
||||
typeName:item.typeName,
|
||||
wares:item.wares
|
||||
})
|
||||
})
|
||||
this.repairList = thisRepairList
|
||||
console.log(this.repairList,"this.repairList")
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
confirmOpe(type){
|
||||
if("yes"==type){
|
||||
let url;
|
||||
let params={id:this.id};
|
||||
if("receive"==this.viewType) {
|
||||
//领料
|
||||
url = "/admin-api/repair/so/confirmGet"
|
||||
}else{
|
||||
//退料
|
||||
url = "/admin-api/repair/so/confirmBack"
|
||||
}
|
||||
request({
|
||||
url: url,
|
||||
method: 'get',
|
||||
params:params
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '操作成功!',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 700)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//作废单据
|
||||
let url = "/admin-api/repair/so/void"
|
||||
let dataObj={
|
||||
id:this.id,
|
||||
soStatus:'06'
|
||||
}
|
||||
request({
|
||||
url: url,
|
||||
method: 'POST',
|
||||
data:dataObj
|
||||
}).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: '操作成功!',
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 700)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -23,7 +23,7 @@
|
||||
</view>
|
||||
<view class="repairInfo">
|
||||
<view class="header">
|
||||
部件信息
|
||||
配件信息
|
||||
</view>
|
||||
<view class="repairItem" v-for="(item, index) in repairList" :key="index">
|
||||
<view class="repairName">{{ item.name }} <text class="repairNum">×{{item.num}}</text></view>
|
||||
|
Loading…
Reference in New Issue
Block a user