Compare commits

...

6 Commits

Author SHA1 Message Date
songyang 3ee01f9594 冲突合并 2023-12-08 15:31:51 +08:00
wlikett b527b37517 Merge branch 'main' into dev-wangyiming 2023-12-08 15:19:10 +08:00
wlikett ce5beac1d1 获取地址列表 和 类型列表 2023-12-08 15:18:34 +08:00
13218645326 ad5d31ccbc 合并代码 2023-12-08 15:18:01 +08:00
13218645326 ccd9f60a79 合并冲突 2023-12-08 15:09:00 +08:00
13218645326 22fc1dc911 接口调试 2023-12-08 15:04:24 +08:00
14 changed files with 582 additions and 368 deletions

3
components.d.ts vendored
View File

@ -17,7 +17,6 @@ declare module 'vue' {
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
@ -29,8 +28,6 @@ declare module 'vue' {
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElTable: typeof import('element-plus/es')['ElTable']

5
env/.env.serve1 vendored
View File

@ -7,9 +7,10 @@ VITE_API_URL = '/proxyApi'
# 开发环境接口地址
VITE_proxyTarget = 'http://10.40.92.66:9205' # 盛旭
VITE_proxyTarget = 'http://10.40.92.74:8080' # 盛旭
# VITE_proxyTarget = 'http://10.40.92.186:8080' # 福海
VITE_token = 'eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImMyN2M5N2Y5LWQwOGItNDJlNy05N2MzLTYwMDVmODVmNmVhZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.KNJdSL3g7tjju4OxkUQyBWHBTiuBo5bZFtDWkbZVmm7iR9hA06OS5FSI1_9kb4jPNjE6vc7MGkH4GhQJsIwHnA'
VITE_LocalFlag = true
VITE_LocalFlag = 0

View File

@ -14,6 +14,7 @@
:on-exceed="handleExceed"
:file-list="props.fileList"
:disabled="props.disabledFlag"
:on-change="changeFileFn"
:on-remove="(file, fileList) => removeFile(file, fileList)"
:on-preview="(file) => preview(file)"
:on-progress="(event, file, fileList) => onProgressFn(event, file, fileList)"
@ -30,6 +31,7 @@
import { ref, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import { Base64 } from 'js-base64'
const props = defineProps({
actionUrl: {
//
@ -91,6 +93,7 @@
default: 'picture'
},
extraData: {}, // name
/*
{
name:'12321'
@ -123,6 +126,10 @@
//
type: Boolean,
default: false
},
scuccesCallback:{
type:Function,
default:()=>{}
}
})
// office
@ -143,6 +150,7 @@
url: response.data,
name: file.name
})
} else {
ElMessage({
type: 'warning',
@ -231,6 +239,9 @@
})
}
}
const changeFileFn =(ev:any)=>{
props.scuccesCallback(ev)
}
</script>
<style lang="scss" scoped>

View File

@ -29,5 +29,5 @@ export const apiGetEquipTypeList = (params = {}) => {
}
//获取省市区列表 (级联)
export const apiGetAddressList = (params = {}) => {
return post('/zlpt-company/baseAddress/selectAddress',params)
return post('/zlpt-system/baseAddress/selectAddress',params)
}

View File

@ -1,5 +1,5 @@
import { get, post } from '../../index'
export const getGoodsClassListApi = () => {
return get('/maType/getEquipmentType', {})
return get('/zlpt-order/maType/getEquipmentType', {})
}

View File

@ -1,15 +1,34 @@
// 订单详情
import { get, post } from '../../index'
import { get, post, put } from '../../index'
// 申请企业信息认证接口
// 订单相亲接口
export const apiOrderDetails = (id: any) => {
let urlStr = `/details/${id}`
// let urlStr = `/zlpt-order/details/${id}`
let urlStr = `/zlpt-order/info/${id}`
return get(urlStr, {})
}
// 获取步骤列表
export const apiOrderInfoList = (params: any) => {
let urlStr = `/info/list/`
let urlStr = `/zlpt-order/info/list/`
return get(urlStr, params)
}
// 订单详情
export const apiOrderInfoDetails = (params: any) => {
let urlStr = `/zlpt-order/info/${params}`
return get(urlStr, {})
}
// 更新订单信息
export const apiUpdateOrderInfo = (params: any) => {
let urlStr = `/zlpt-order/info/`
return put(urlStr, params)
}
// 更新订单信息 拒绝
export const apiOrderReject = (params: any) => {
let urlStr = `/zlpt-order/info/reject`
return put(urlStr, params)
}

View File

@ -2,7 +2,8 @@ export const useStore = defineStore('main', {
state: () => {
return {
loadingFlag: false, //loading控制,
token: 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImMyN2M5N2Y5LWQwOGItNDJlNy05N2MzLTYwMDVmODVmNmVhZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.KNJdSL3g7tjju4OxkUQyBWHBTiuBo5bZFtDWkbZVmm7iR9hA06OS5FSI1_9kb4jPNjE6vc7MGkH4GhQJsIwHnA'
token: ""
// eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjQ1MzIwY2M3LTE0MDYtNDAwNy1iMTdhLTM3OTQ3ZmUxMjc2ZiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.XqWKkIRKVADdhGzNiOPNktmLJsv7bJCRZLDaSMJQALjhSyUBDTRGPE2KBWmb4qx3zV4fbsNGBHUODem1A7MEZA
}
},
getters: {},
@ -14,6 +15,7 @@ export const useStore = defineStore('main', {
this.loadingFlag = false
},
setToken(val: any) {
console.log("setToken",val)
this.token = val
}
},

View File

@ -21,7 +21,7 @@ export const ElConfirmBeforeOpert = (title = '操作确认', text = "是否确
}
export const ElMessageBoxOpert = (title = '', text = "", onfirmText = "", cancelText = "", inputValidator:any, inputErrorMessage = "",callBack: any,row:any,inputType="text") => {
export const ElMessageBoxOpert = (title = '', text = "", onfirmText = "", cancelText = "", inputValidator:any, inputErrorMessage = "",callBack: any,row:any,inputType="text",confirmButtonClass="") => {
ElMessageBox.prompt(text, title, {
draggable:true,
confirmButtonText: onfirmText,
@ -31,6 +31,7 @@ export const ElMessageBoxOpert = (title = '', text = "", onfirmText = "", cancel
},
inputType: inputType,
inputErrorMessage: inputErrorMessage,
confirmButtonClass:confirmButtonClass
})
.then(({ value }) => {
callBack(row,value)

View File

@ -12,7 +12,7 @@
const handlerLogin = async () => {
const res: any = await loginApi(loginForm.value)
console.log(res, '登录成功**')
console.log( '登录成功**',res)
if (res.code === 200) {
ElMessage({
showClose: true,

View File

@ -8,7 +8,7 @@
<div class="tags">
<el-tag
v-for="(tag,i) in screenTags"
:key="tag.id"
:key="i"
class="item"
@close="handleClose(tag,i)"
closable
@ -50,8 +50,12 @@
v-for="(v,i) in screenOptionList" :key="i">
{{ v.name }}
<template v-if="v.sort">
<el-icon class="icon" v-show="v.sort == 'asc' && v.id == optionActive"><CaretTop /></el-icon>
<el-icon class="icon" v-show="v.sort == 'desc' && v.id == optionActive"><CaretBottom /></el-icon>
<el-icon class="icon" v-show="v.sort == 'asc' && v.id == optionActive">
<CaretTop/>
</el-icon>
<el-icon class="icon" v-show="v.sort == 'desc' && v.id == optionActive">
<CaretBottom/>
</el-icon>
</template>
</div>
</div>
@ -59,20 +63,20 @@
<div class="showList" v-if="pageData.total > 0">
<equip-card
class="card"
v-for="(v,i) in equipList"
:key="i"
:url="v.picUrl"
:company="v.companyName"
:tags="[v.maStatus,v.location || '合肥市']"
:name="`${v.modelName}${v.deviceName}`"
:price="v.monthLeasePrice"
:id="v.maId"
time-unit="月"
@on-click="toDetail"></equip-card>
class="card"
v-for="(v,i) in equipList"
:key="i"
:url="v.picUrl"
:company="v.companyName"
:tags="[v.maStatus,v.city || '合肥市']"
:name="`${v.modelName}${v.deviceName}`"
:price="v.monthLeasePrice"
:id="v.maId"
time-unit="月"
@on-click="toDetail"></equip-card>
</div>
<div class="noData" v-else>
<el-empty :image-size="200" />
<el-empty :image-size="200"/>
</div>
<div class="pagination" v-if="pageData.total > 0">
@ -156,19 +160,19 @@ const screenChooseList = reactive([
select: [{
id: 1,
name: '5千元以下',
value:['',5000]
value: [0, 5000]
}, {
id: 1,
name: '5千-1万',
value:[5000,10000]
value: [5000, 10000]
}, {
id: 1,
name: '1万-5万',
value: [10000,50000]
value: [10000, 50000]
}, {
id: 1,
name: '5万-10万',
value: [50000,100000]
value: [50000, 100000]
},]
}
]
@ -185,19 +189,19 @@ const screenChooseList = reactive([
select: [{
id: 1,
name: '一年以下',
value: ['',1]
value: [0, 1]
}, {
id: 1,
name: '1年-3年',
value: [1,3]
value: [1, 3]
}, {
id: 1,
name: '3年-6年',
value: [3,6]
value: [3, 6]
}, {
id: 1,
name: '10年以上',
value: [10,'']
value: [10, 99999999]
}]
}
]
@ -213,19 +217,24 @@ const screenChooseList = reactive([
parent: 'time',
select: [{
id: 1,
name: '500小时以内'
name: '500小时以内',
value: [0, 500]
}, {
id: 1,
name: '500-2000小时'
name: '500-2000小时',
value: [500, 2000]
}, {
id: 1,
name: '2000-5000小时'
name: '2000-5000小时',
value: [2000, 5000]
}, {
id: 1,
name: '5000-10000小时'
name: '5000-10000小时',
value: [5000, 10000]
}, {
id: 1,
name: '10000小时以上'
name: '10000小时以上',
value: [10000, 9999999]
},]
}
]
@ -242,12 +251,10 @@ const screenOptionList = reactive([
name: '更新时间',
id: '2',
sort: 'asc', //asc or desc
key:'updateTimeOrderBy'
}, {
name: '月租金',
id: '3',
sort: 'asc',
key:'monthLeasePriceOrderBy'
},
])
//
@ -256,7 +263,7 @@ const optionActive = ref('1')
const screenTags = computed<Array<any>>(() => {
let arr = []
screenChooseList.forEach(key => {
arr = [...arr,...key.select]
arr = [...arr, ...key.select]
})
return arr
})
@ -265,7 +272,7 @@ const screenTags = computed<Array<any>>(() => {
const pageData = reactive({
pageNum: 1,
pageSize: 9,
total:0
total: 0
})
//
@ -273,7 +280,7 @@ const equipList = ref([])
onMounted(() => {
$bus.on('search',(val) => {
$bus.on('search', (val) => {
getData(val)
})
})
@ -284,6 +291,8 @@ onUnmounted(() => {
const handleClose = (tag, index) => {
screenChooseList[tag.parentIndex].select.splice(tag.index)
screenChooseList[tag.parentIndex].index = tag.index
getData()
}
//
const tagClear = () => {
@ -291,10 +300,12 @@ const tagClear = () => {
key.select = []
key.index = 0
})
getData()
}
const changeOption = (val) => {
if(val.sort && optionActive.value == val.id){
if (val.sort && optionActive.value == val.id) {
val.sort = val.sort == 'asc' ? 'desc' : 'asc'
}
optionActive.value = val.id
@ -312,23 +323,29 @@ const selectScreen = (parentIndex, val, index) => {
)
screenChooseList[parentIndex].index++
if(screenChooseList[parentIndex].index == screenChooseList[parentIndex].list.length){
getData()
if (screenChooseList[parentIndex].index == screenChooseList[parentIndex].list.length) {
return
}
switch (screenChooseList[parentIndex].name){
switch (screenChooseList[parentIndex].name) {
case 'address':
getAddressData(val.code)
break;
case 'type':
getTypeData(val.typeId)
break;
default:
break;
}
}
//card
const toDetail = (data) => {
router.push({
path:`/equipDetail/${data.id}`
path: `/equipDetail/${data.id}`
})
}
@ -340,57 +357,88 @@ const pageChange = (val) => {
//
const getAddressData = async (code = null) => {
let params = {}
if(code){
if (code) {
params = {
code
}
}
const res = await apiGetAddressList(params)
const index = screenChooseList.findIndex(key => key.name == 'address')
screenChooseList[index].list[ screenChooseList[index].index ].select = res.data
screenChooseList[index].list[screenChooseList[index].index].select = res.data
}
//
const getTypeData = async (typeId = null) => {
let params = {}
if(typeId){
if (typeId) {
params = {typeId}
}
const res = await apiGetEquipTypeList(params)
console.log('getTypeData ===============',res)
const list = res.rows.map(
item => {
return {
...item,
name:item.typeName,
id:item.typeId
}
}
)
const index = screenChooseList.findIndex(key => key.name == 'type')
screenChooseList[index].list[screenChooseList[index].index].select = list
console.log('getTypeData ===============', list)
}
//
const getData = async (text = '') => {
//
const address = screenChooseList.find(key => key.name == 'address').select
const address = screenChooseList.find(key => key.name == 'address').select.slice(-1)[0] || null
//
const type = screenChooseList.find(key => key.name == 'type').select
const type = screenChooseList.find(key => key.name == 'type').select.slice(-1)[0] || null
//
const rent = screenChooseList.find(key => key.name == 'rent').select.slice(-1)[0] || null
//
const age = screenChooseList.find(key => key.name == 'age').select.slice(-1)[0] || null
//
const time = screenChooseList.find(key => key.name == 'time').select.slice(-1)[0] || null
const params = {
keyWord: text,
pageSize:pageData.pageSize,
pageNum:pageData.pageNum,
updateTimeOrderBy:'',
monthLeasePriceOrderBy:'',
location: address && address.length > 0 ? address[address.length - 1] : '',
typeId: type && type.length > 0 ? type[address.length - 1] : '',
monthLeasePriceMin:0,
monthLeasePriceMax:'',
ageMin:'',
ageMax:'',
workingHoursMin:'',
workingHoursMax:''
pageSize: pageData.pageSize,
pageNum: pageData.pageNum,
updateTimeOrderBy: '',
monthLeasePriceOrderBy: '',
location: address ? address.id : '',
typeId: type ? type.typeId : '',
monthLeasePriceMin: '',
monthLeasePriceMax: '',
ageMin: '',
ageMax: '',
workingHoursMin: '',
workingHoursMax: ''
}
if(optionActive.value == '1'){
}else if(optionActive.value == '2'){
if (optionActive.value == '2') {
params.updateTimeOrderBy = screenOptionList[1].sort.toUpperCase()
} else if (optionActive.value == '3') {
params.monthLeasePriceOrderBy = screenOptionList[2].sort.toUpperCase()
}
if(rent){
params.monthLeasePriceMin = rent.value[0]
params.monthLeasePriceMax = rent.value[1]
}
if(age){
params.ageMin = age.value[0]
params.ageMax = age.value[1]
}
if(time){
params.workingHoursMin = time.value[0]
params.workingHoursMax = time.value[1]
}
console.log('getList =============',params)
const res = await getList(params)
pageData.total = res.total || 0
@ -401,37 +449,36 @@ const getParams = () => {
const paramsKey = ['keyWord']
let params = {}
paramsKey.forEach(key => {
if (history.state[key]){
if (history.state[key]) {
params[key] = history.state[key]
}
})
return params
}
const init = async () => {
const init = () => {
const params = getParams()
if(params && params.keyWord){
$bus.emit('callBackText',params.keyWord)
if (params && params.keyWord) {
$bus.emit('callBackText', params.keyWord)
$bus.off('callBackText')
}
await getTypeData()
await getAddressData()
await getData()
getTypeData()
getAddressData()
getData()
}
init()
</script>
<style lang="scss" scoped>
.equipList {
.showScreen {
margin-top: 20px;
margin-top: 20px;
display: flex;
align-items: center;
height: 30px;
.title {
font-size: 16px;
font-weight: 500;
@ -474,6 +521,7 @@ init()
color: #939393;
font-size: 15px;
line-height: 25px;
&:hover {
color: red;
}
@ -502,9 +550,10 @@ init()
margin-right: 10px;
cursor: pointer;
user-select: none;
.icon{
font-size: 15px;
}
.icon {
font-size: 15px;
}
}
}
}

View File

@ -33,9 +33,14 @@
}
/* 查看按钮 */
const clickPreviewDetails = () => {
console.log('查看')
router.push({ name: 'orderDetails' })
const clickPreviewDetails = (row: any) => {
console.log('查看', row)
router.push({
name: 'orderDetails',
query: {
orderId: row.orderId
}
})
}
/* 续租按钮 */
@ -45,9 +50,15 @@
}
/* 确认收货 */
const clickConfirmReceipt = () => {
const clickConfirmReceipt = (row: any) => {
console.log('确认收货')
router.push({ name: 'orderDetails' })
router.push({
name: 'orderDetails',
query: {
orderId: row.orderId,
confirm: 'true'
}
})
}
const time = ref([])

View File

@ -1,29 +1,45 @@
<template>
<el-page-header @back="goBack" @click="$router.go(-1)">
<template #content>
<span>详情</span>
</template>
</el-page-header>
<timeLineHorizontal themeColor="#2282fe" :timeLineList="timeLineList.list"></timeLineHorizontal>
<el-form
label-width="130px"
inline="true"
style="padding: 0 20px 0px 20px; width: 865px"
size="small">
<el-form label-width="130px" inline="true" style="padding: 0 20px 0px 20px; width: 865px" size="small">
<!-- <el-form-item label="订单编号" style="width: 600px;">
xxxxx
</el-form-item> -->
<el-form-item label="需求单位" class="table_item">xxxxx</el-form-item>
<el-form-item label="联系电话" class="table_item">xxxxx</el-form-item>
<el-form-item label="租赁时长" class="table_item">xxxxx</el-form-item>
<el-form-item label="设备进场地址:" class="table_item">xxxxx</el-form-item>
<el-form-item label="进场时间:" class="table_item">xxxxx</el-form-item>
<el-form-item label="是否需求机手:" class="table_item">xxxxx</el-form-item>
<el-form-item label="详细地址:" class="table_item">xxxxx</el-form-item>
<el-form-item label="工期时长:" class="table_item">xxxxx</el-form-item>
<el-form-item label="发票类型:" class="table_item">xxxxx</el-form-item>
<el-form-item label="需求单位" class="table_item">
{{ detailsInfo.needCompany }}
</el-form-item>
<el-form-item label="联系电话" class="table_item">{{
detailsInfo.phone
}}</el-form-item>
<el-form-item label="租赁时长" class="table_item">
<!-- {{ detailsInfo.}} -->
<!-- 暂无 --></el-form-item>
<el-form-item label="设备进场地址:" class="table_item">{{
detailsInfo.addressId
}}</el-form-item>
<el-form-item label="进场时间:" class="table_item">{{
detailsInfo.realStartTime
}}</el-form-item>
<el-form-item label="是否需求机手:" class="table_item">{{
detailsInfo.isMachinist
}}</el-form-item>
<el-form-item label="详细地址:" class="table_item">{{
detailsInfo.address
}}</el-form-item>
<el-form-item label="工期时长:" class="table_item">{{
detailsInfo.duration
}}</el-form-item>
<el-form-item label="发票类型:" class="table_item">{{
detailsInfo.invoiceType
}}</el-form-item>
<el-form-item label="项目说明:" style="width: 800px">
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
{{ detailsInfo.description }}
</el-form-item>
<!-- <el-form-item label="订单起止时间:" style="width: 800px;">
xxxx-xx-xx ~ xxxx-xx-xx
@ -62,46 +78,32 @@
xxxxx
</el-form-item> -->
<el-form-item label="订单合同:" style="width: 800px" v-if="stepVal == '1'">
<uploadComponent
:maxLimit="1"
listType="text"
:acceptTypeList="['.pdf']"
width="72px"
height="24px">
<template v-slot:default>
<el-button type="primary">上传文件</el-button>
</template>
</uploadComponent>
<div>
<uploadComponent :maxLimit="1" listType="text" :acceptTypeList="['.pdf']" :scuccesCallback="scuccesCallback" height="32px" width="360px">
<template v-slot:default>
<el-button type="primary">上传文件</el-button>
</template>
</uploadComponent>
<div class="error_tip_c" v-show="errorTipFlag==2">请上传文件</div>
</div>
</el-form-item>
<div v-else-if="stepVal == '2'">
<el-form-item label="机手姓名:" style="width: 300px">
<el-select
v-model="submitInfo.driver"
placeholder="请选择机手姓名"
clearable
filterable
style="width: 100%">
<el-option
v-for="item in driverInfo.list"
:key="item.value"
:label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="联系电话:" style="width: 300px">
<el-input
v-model.trim="submitInfo.driverPhone"
placeholder="请输入模版编号"
clearable
maxlength="30" />
</el-form-item>
<el-form-item label="物流司机电话:" style="width: 300px">
<el-input
v-model.trim="submitInfo.deliverPhone"
placeholder="请输入模版编号"
clearable
maxlength="30" />
</el-form-item>
<el-form :model="submitInfo" ref="ruleFormRef" :rules="formConfirmRules" label-width="136px">
<el-form-item label="机手姓名:" style="width: 300px" prop="driver">
<!-- <el-select v-model="submitInfo.driver" placeholder="请选择机手姓名" clearable filterable style="width: 100%">
<el-option v-for="item in driverInfo.list" :key="item.value" :label="item.label"
:value="item.value" />
</el-select> -->
<el-input v-model.trim="submitInfo.driver" placeholder="请输入机手姓名" clearable maxlength="30" />
</el-form-item>
<el-form-item label="联系电话:" style="width: 300px" prop="driverPhone">
<el-input v-model.trim="submitInfo.driverPhone" placeholder="请输入联系电话" clearable maxlength="30" />
</el-form-item>
<el-form-item label="物流司机电话:" style="width: 300px" prop="deliverPhone">
<el-input v-model.trim="submitInfo.deliverPhone" placeholder="请输入物流司机电话" clearable maxlength="30" />
</el-form-item>
</el-form>
</div>
<div v-else-if="stepVal == '3'">
<el-form-item label="机手姓名:" style="width: 300px">
@ -116,144 +118,247 @@
</div>
<el-form-item>
<div class="btn_opert">
<el-button type="primary" @click="demandConfirmFn" v-if="stepVal == '1'">
<el-button type="primary" @click="demandConfirmFn" v-if="stepVal == '0'">
需求确认
</el-button>
<el-button type="primary" @click="demandRejectFn" v-if="stepVal == '1'">
<el-button type="primary" @click="demandRejectFn" v-if="stepVal == '0'">
需求驳回
</el-button>
<el-button type="primary" @click="nextFn" v-else-if="stepVal == '2'">
<el-button type="primary" @click="nextFn" v-else-if="stepVal == '1'">
下一步
</el-button>
<el-button type="primary" @click="confirmSendFn" v-else-if="stepVal == '3'">
<el-button type="primary" @click="confirmSendFn" v-else-if="stepVal == '2'">
确认发货
</el-button>
<el-button type="primary" @click="backFn" v-else-if="stepVal == '3'">
返回
</el-button>
</div>
</el-form-item>
</el-form>
</template>
<script setup lang="ts">
import orderTable from './orderTable.vue'
import { reactive } from 'vue'
import { MoreFilled } from '@element-plus/icons-vue'
import timeLineHorizontal from './timeLineHorizontal.vue'
import uploadComponent from 'components/uploadComponent/index.vue'
import { ElMessageBoxOpert } from 'utils/elementCom'
const tableInfo = reactive({
v_equipment_title: '220E履带挖掘机',
v_equipment_code: '88888',
v_equipment_group_type: '挖掘机械',
v_equipment_brand: '挖掘机',
v_equipment_weight: '22吨',
v_equipment_volume: '1立方米',
v_equipment_address: '广东省广州市',
money: '2000',
unit: '月',
imgUrl: ''
})
import orderTable from './orderTable.vue'
import { reactive } from 'vue'
import timeLineHorizontal from './timeLineHorizontal.vue'
import uploadComponent from 'components/uploadComponent/index.vue'
import { ElMessageBoxOpert } from 'utils/elementCom'
import { ElMessage } from 'element-plus'
import { apiOrderInfoDetails, apiUpdateOrderInfo, apiOrderReject } from 'http/api/usercenter/order'
const router = useRouter()
const route = useRoute()
const ruleFormRef = ref()
const tableInfo = reactive({
v_equipment_title: '220E履带挖掘机',
v_equipment_code: '88888',
v_equipment_group_type: '挖掘机械',
v_equipment_brand: '挖掘机',
v_equipment_weight: '22吨',
v_equipment_volume: '1立方米',
v_equipment_address: '广东省广州市',
money: '2000',
unit: '月',
imgUrl: ''
})
const stepVal = ref('1')
const errorTipFlag= ref(0)
const timeLineList = reactive({
list: [
{
title: '订单需求审核',
content: '开工阶段',
done: true
},
{
title: '合同上传',
content: '请填写公司详细信息',
done: true
},
{
title: '装备发货',
content: '请填写公司财务信息',
done: true
const stepVal = ref('0')
const timeLineList = reactive({
list: [
{
title: '订单需求审核',
content: '开工阶段',
done: true
},
{
title: '合同上传',
content: '请填写公司详细信息',
done: false
},
{
title: '装备发货',
content: '请填写公司财务信息',
done: false
}
]
})
const driverInfo = reactive({
list: [
{
value: 'Option1',
label: 'Option1'
},
{
value: 'Option2',
label: 'Option2'
}
]
})
const submitInfo = reactive({
driver: '',
driverPhone: '',
deliverPhone: ''
})
const formConfirmRules = reactive<FormRules<any>>({
driver: [
{ required: true, message: '请选择机手姓名', trigger: 'change' },
],
driverPhone: [
{ required: true, message: '请输入联系电话', trigger: 'blur' },
],
deliverPhone: [
{ required: true, message: '请输入物流司机电话', trigger: 'blur' },
],
})
let fileItem:any=null
const demandConfirmFn = () => {
stepVal.value = '1'
timeLineList.list[1].done = true
}
const rejectCallBack = async (row: any, value: any) => {
console.log('editCallBack', row, value)
let params = {
}
const res = await apiOrderReject(params)
}
const demandRejectFn = (row: any) => {
ElMessageBoxOpert(
'驳回原因',
'填写驳回原因',
'确定',
'取消',
(val: any) => {
if (!val) {
return '请填写类型模板'
}
]
})
},
'请填写类型模板',
rejectCallBack,
row,
'textarea',
'dangerC'
)
}
const driverInfo = reactive({
list: [
{
value: 'Option1',
label: 'Option1'
},
{
value: 'Option2',
label: 'Option2'
}
]
})
const submitInfo = reactive({
driver: '',
driverPhone: '',
deliverPhone: ''
})
const demandConfirmFn = () => {
const nextFn = () => {
if(!fileItem){
errorTipFlag.value=2
}else{
stepVal.value = '2'
}
const editCallBack = (row: any, value: any) => {
console.log('editCallBack', row, value)
}
const demandRejectFn = (row: any) => {
ElMessageBoxOpert(
'驳回原因',
'填写驳回原因',
'确定',
'取消',
(val: any) => {
if (!val) {
return '请填写类型模板'
}
},
'请填写类型模板',
editCallBack,
row,
'textarea'
)
}
const nextFn = () => {
stepVal.value = '3'
}
const confirmSendFn = () => {}
}
const detailsInfo: any = reactive({})
const initApiOrderDetails = async () => {
let id = route.query.id||'1'
const res: any = await apiOrderInfoDetails(id)
// const res:any = dataJson
console.log('res-apiOrderDetails', res)
Object.assign(detailsInfo, res.data)
}
const confirmSendFn = () => {
if (!ruleFormRef) return
ruleFormRef.value.validate(async(valid: any) => {
if (valid) {
let params = {
orderId: detailsInfo.orderId,
contractUrl: 'https://hzgyp-prod-1259451974.cos.ap-guangzhou.myqcloud.com/enterprise/serviceAgreement.pdf',//
machinistName: submitInfo.driver,//
logisticsPhone: submitInfo.deliverPhone,//
phone: submitInfo.driverPhone//
}
const res = await apiUpdateOrderInfo(params)
console.log("resapiUpdateOrderInfo", res)
ElMessage({
message: '已经确认发货',
type: 'success'
})
stepVal.value = '3'
timeLineList.list[2].done = true
console.log('submit!')
} else {
console.log('error submit!')
return false
}
})
}
const backFn = () => {
router.go(-1)
}
const scuccesCallback =(ev:any)=>{
console.log("list0000",ev)
fileItem=ev
errorTipFlag.value=1
}
onBeforeMount(() => {
initApiOrderDetails()
})
</script>
<style scoped lang="scss">
.table_item {
width: 250px;
height: 20px;
}
.table_item {
width: 250px;
height: 20px;
}
.table_item_sub {
width: 250px;
height: 20px;
}
.table_item_sub {
width: 250px;
height: 20px;
}
.time_line_item {
display: flex;
justify-content: space-between;
.time_line_item {
display: flex;
justify-content: space-between;
.btn_c {
}
}
.btn_c {}
}
.total_money {
display: flex;
justify-content: flex-end;
height: 32px;
line-height: 32px;
width: 760px;
}
.total_money {
display: flex;
justify-content: flex-end;
height: 32px;
line-height: 32px;
width: 760px;
}
.btn_opert {
width: 760px;
display: flex;
justify-content: flex-end;
}
:deep(.el-upload) {
display: flex;
justify-content: flex-start;
}
.error_tip_c{
color: #ff0000;
}
</style>
<style>
.dangerC{
background-color: #F56C6C!important;
border: #F56C6C ;
}
.btn_opert {
width: 760px;
display: flex;
justify-content: flex-end;
}
</style>

View File

@ -1,14 +1,9 @@
<template>
<el-page-header @back="goBack" @click="$router.go(-1)">
<el-page-header @click="$router.go(-1)">
<template #content>
<span>详情</span>
</template>
</el-page-header>
<el-form
label-width="130px"
inline="true"
style="padding: 0 20px 0px 20px; width: 865px"
size="small">
<el-form label-width="130px" inline="true" style="padding: 0 20px 0px 20px; width: 865px" size="small">
<el-form-item label="订单编号" style="width: 600px">
{{ detailsInfo.code }}
</el-form-item>
@ -73,21 +68,16 @@
</el-form-item>
<el-timeline style="margin-left: 20px; width: 560px">
<el-timeline-item
v-for="(item, index) in activities"
:key="index"
:icon="item.icon"
:type="item.type"
:color="item.color"
:size="item.size"
:hollow="item.hollow"
:timestamp="item.timestamp">
<el-timeline-item v-for="(item, index) in stepListOrder.list" :key="index" :icon="item.icon" :type="item.type"
:color="item.color" :size="item.size" :hollow="item.hollow" :timestamp="item.timestamp">
<div class="time_line_item">
<div class="title">
{{ item.content }}
<!-- {{ item.content }} -->
订单状态
</div>
<div class="btn_c">
<el-button type="primary" v-if="item.last">确认到货</el-button>
<div class="btn_c" v-if="confimFlag">
<el-button type="primary" v-if="item.showBtnType == '2'" @click="confirmFn()">确认到货</el-button>
<el-button type="success" v-else-if="item.showBtnType == '3'">已收货</el-button>
</div>
</div>
</el-timeline-item>
@ -96,101 +86,124 @@
</template>
<script setup lang="ts">
import { reactive } from 'vue'
import orderTable from './orderTable.vue'
import { MoreFilled } from '@element-plus/icons-vue'
import { apiOrderDetails, apiOrderInfoList } from 'http/api/usercenter/order'
import dataJson from './json/details.json'
const tableInfo = reactive({
v_equipment_title: '220E履带挖掘机',
v_equipment_code: '88888',
v_equipment_group_type: '挖掘机械',
v_equipment_brand: '挖掘机',
v_equipment_weight: '22吨',
v_equipment_volume: '1立方米',
v_equipment_address: '广东省广州市',
money: '2000',
unit: '月',
imgUrl: ''
})
const activities = [
{
content: '订单状态',
timestamp: '需求已提交,等待供应商审核。',
size: 'large',
type: 'primary',
icon: MoreFilled
},
{
content: '订单状态',
timestamp: '订单已确认,供应商会与您联系,签订合同。',
color: '#0bbd87'
},
{
content: '订单状态',
timestamp: '装备已发出,到货后请及时确认。',
size: 'large'
},
{
content: '订单状态',
timestamp: '租赁进行中。',
type: 'primary',
hollow: true,
last: true
},
{
content: 'Default node',
timestamp: '2018-04-03 20:46'
}
import { reactive } from 'vue'
import orderTable from './orderTable.vue'
import { apiOrderInfoDetails, apiOrderInfoList, apiUpdateOrderInfo } from 'http/api/usercenter/order'
import { ElMessage } from 'element-plus'
const router = useRouter()
const route = useRoute()
const tableInfo = reactive({
v_equipment_title: '220E履带挖掘机',
v_equipment_code: '88888',
v_equipment_group_type: '挖掘机械',
v_equipment_brand: '挖掘机',
v_equipment_weight: '22吨',
v_equipment_volume: '1立方米',
v_equipment_address: '广东省广州市',
money: '2000',
unit: '月',
imgUrl: ''
})
const stepListOrder: any = reactive({
list: [
]
const detailsInfo: any = reactive({})
const initApiOrderDetails = async () => {
let id = '1'
const res: any = await apiOrderDetails(id)
// const res:any = dataJson
console.log('res-apiOrderDetails', res)
Object.assign(detailsInfo, res.data)
}
})
const detailsInfo: any = reactive({})
const initApiOrderDetails = async () => {
let id = route.query.id || '1'
const res: any = await apiOrderInfoDetails(id)
// const res:any = dataJson
console.log('res-apiOrderDetails', res)
Object.assign(detailsInfo, res.data)
}
const initApiOrderInfoList = async () => {
let params = {
orderId: '1'
const initApiOrderInfoList = async () => {
let params = {
orderId: route.query.id || '1'
}
const res: any = await apiOrderInfoList(params)
// const res:any = dataJson
console.log('res-apiOrderInfoList', res)
stepListOrder.list = res.rows.map((ele: any) => {
let timeStamp = "装备已发出,到货后请及时确认。"
let showBtnType = "1"
if (ele.orderStatus == '31') {
timeStamp = "需求已提交,等待供应商审核。"
} else if (ele.orderStatus == '32') {
timeStamp = "订单已确认,供应商会与您联系,签订合同。"
} else if (ele.orderStatus == '35') {
timeStamp = "装备已发出,到货后请及时确认。"
showBtnType = "2"
} else if (ele.orderStatus == '36') {
timeStamp = "租赁进行中。"
}
const res: any = await apiOrderInfoList(params)
// const res:any = dataJson
console.log('res-apiOrderInfoList', res)
}
const pdfPreview = (url: any) => {
window.open(url, '_blank')
}
onBeforeMount(() => {
initApiOrderDetails()
initApiOrderInfoList()
const item = {
content: '订单状态',
timestamp: timeStamp,
showBtnType
}
return item
})
}
const pdfPreview = (url: any) => {
window.open(url, '_blank')
}
const confirmFn = async () => {
let params = {
orderId: detailsInfo.orderId || '1',
orderStatus: "35"
}
const res: any = await apiUpdateOrderInfo(params)
console.log("res-confrim", res)
if (res.code == 200) {
console.log("stepListOrder", stepListOrder.list)
const item = stepListOrder.list.find((ele: any) => { return ele.showBtnType == '2' })
console.log("item666", item)
item.showBtnType = '3'
router.go(-1)
ElMessage({
message: '已经确认收货',
type: 'success'
})
}
}
const confimFlag: any = ref("")
const initPage = () => {
confimFlag.value = route.query.confirm
}
onBeforeMount(() => {
initPage()
initApiOrderDetails()
initApiOrderInfoList()
})
onBeforeMount(() => {
initApiOrderDetails()
})
</script>
<style scoped lang="scss">
.table_item {
width: 250px;
height: 20px;
}
.table_item {
width: 250px;
height: 20px;
}
.table_item_sub {
width: 250px;
height: 20px;
}
.table_item_sub {
width: 250px;
height: 20px;
}
.time_line_item {
display: flex;
justify-content: space-between;
.time_line_item {
display: flex;
justify-content: space-between;
.btn_c {
}
}
.btn_c {}
}
</style>

View File

@ -27,14 +27,19 @@
}
/* 确认按钮 */
const confirmBtn = () => {
router.push('/myuser/orderConfirm')
const confirmBtn = (row:any) => {
router.push({ name: 'orderConfirm',query:{
orderId:row.orderId
} })
}
/* 查看按钮 */
const clickPreviewDetails = () => {
const clickPreviewDetails = (row:any) => {
console.log('查看')
router.push({ name: 'orderDetails' })
router.push({ name: 'orderDetails',query:{
orderId:row.orderId
} })
}
const tableData: any = ref([{ address: '客户单位' }])
@ -93,7 +98,7 @@
<el-table-column align="center" prop="name" label="操作" width="260px">
<template #default="{ row }">
<el-button size="small" type="primary" @click="confirmBtn(row)">确认</el-button>
<el-button size="small" type="warning" @click="clickPreviewDetails">
<el-button size="small" type="warning" @click="clickPreviewDetails(row)">
查看
</el-button>
<el-button size="small" type="danger">删除</el-button>