Merge branch 'ah-simple' of http://192.168.0.75:3000/bonus/Zlpt_Portal into ah-simple

This commit is contained in:
hongchao 2025-03-11 10:10:10 +08:00
commit ff4a303c97
6 changed files with 372 additions and 265 deletions

5
components.d.ts vendored
View File

@ -23,13 +23,11 @@ declare module 'vue' {
ElCollapse: typeof import('element-plus/es')['ElCollapse'] ElCollapse: typeof import('element-plus/es')['ElCollapse']
ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
ElCountdown: typeof import('element-plus/es')['ElCountdown']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDialog: typeof import('element-plus/es')['ElDialog'] ElDialog: typeof import('element-plus/es')['ElDialog']
ElEmpty: typeof import('element-plus/es')['ElEmpty'] ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm'] ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon'] ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage'] ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput'] ElInput: typeof import('element-plus/es')['ElInput']
@ -37,18 +35,15 @@ declare module 'vue' {
ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption'] ElOption: typeof import('element-plus/es')['ElOption']
ElPageHeader: typeof import('element-plus/es')['ElPageHeader']
ElPagination: typeof import('element-plus/es')['ElPagination'] ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElProgress: typeof import('element-plus/es')['ElProgress'] ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow'] ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect'] ElSelect: typeof import('element-plus/es')['ElSelect']
ElStep: typeof import('element-plus/es')['ElStep'] ElStep: typeof import('element-plus/es')['ElStep']
ElSteps: typeof import('element-plus/es')['ElSteps'] ElSteps: typeof import('element-plus/es')['ElSteps']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable'] ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTag: typeof import('element-plus/es')['ElTag'] ElTag: typeof import('element-plus/es')['ElTag']

4
env/.env.dev vendored
View File

@ -9,9 +9,9 @@ VITE_API_URL = '/proxyApi'
# VITE_proxyTarget = 'http://192.168.0.234:28080' # 马帅 # VITE_proxyTarget = 'http://192.168.0.234:28080' # 马帅
# VITE_proxyTarget = 'http://192.168.2.122:28080' # 梁超 # VITE_proxyTarget = 'http://192.168.2.122:28080' # 梁超
VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试÷服务 # VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试÷服务
# VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 # VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务
# VITE_proxyTarget = 'http://192.168.2.75:28080' # 盛旭 VITE_proxyTarget = 'http://192.168.0.96:28080' # 马帅
# VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型)
# VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证) # VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证)

View File

@ -1,6 +1,11 @@
<template> <template>
<div class="custom-date-picker"> <div class="custom-date-picker">
<el-button @click="showPicker = !showPicker" :size="size" class="date-picker-button"> <el-button
@click="showPicker = !showPicker"
:size="size"
class="date-picker-button"
:disabled="props.isDisabled"
>
{{ displayDate }} {{ displayDate }}
</el-button> </el-button>
<el-date-picker <el-date-picker
@ -25,7 +30,7 @@ const disabledDate = (date) => {
const today = new Date() const today = new Date()
// //
// return date.getTime() < today.getTime() // return date.getTime() < today.getTime()
return date.setHours(0, 0, 0, 0) < today.setHours(0, 0, 0, 0); return date.setHours(0, 0, 0, 0) < today.setHours(0, 0, 0, 0)
} }
const props = defineProps({ const props = defineProps({
@ -65,6 +70,10 @@ const props = defineProps({
type: Number, type: Number,
default: 0, default: 0,
}, },
isDisabled: {
type: Boolean,
default: true,
},
}) })
const emit = defineEmits(['update:modelValue', 'onLeaseDateChange']) const emit = defineEmits(['update:modelValue', 'onLeaseDateChange'])

View File

@ -72,12 +72,19 @@
v-model="goods.isChecked" v-model="goods.isChecked"
@change="onChangeGoods(index)" @change="onChangeGoods(index)"
:key="goods.id" :key="goods.id"
:disabled="goods.maStatus != 2"
> >
</el-checkbox> </el-checkbox>
</div> </div>
</el-col> </el-col>
<el-col :span="9" class="goods-info"> <el-col :span="9" class="goods-info">
<div class="img-box">
<img :src="goods.picUrl" alt="" /> <img :src="goods.picUrl" alt="" />
<div class="img-mask" v-if="goods.maStatus != 2">
<span> 装备已下架 </span>
</div>
</div>
<div class="goods-code"> <div class="goods-code">
<div style="font-size: 14px; font-weight: bold"> <div style="font-size: 14px; font-weight: bold">
{{ goods.deviceName }} {{ goods.deviceName }}
@ -112,6 +119,7 @@
size="large" size="large"
placeholder="选择日期" placeholder="选择日期"
@onLeaseDateChange="onLeaseDateChange" @onLeaseDateChange="onLeaseDateChange"
:isDisabled="goods.maStatus != 2"
/> />
</div> </div>
</el-col> </el-col>
@ -133,6 +141,7 @@
:min="1" :min="1"
:max="goods.deviceCount || 1" :max="goods.deviceCount || 1"
size="small" size="small"
:disabled="goods.maStatus != 2"
/> />
</div> </div>
</el-col> </el-col>
@ -406,7 +415,9 @@ const onChangeAll = (e: boolean) => {
cardList.value.forEach((item: any) => { cardList.value.forEach((item: any) => {
item.isChecked = e item.isChecked = e
item.devInfoVoList.forEach((j: any) => { item.devInfoVoList.forEach((j: any) => {
if (j.maStatus == 2) {
j.isChecked = e j.isChecked = e
}
}) })
}) })
} }
@ -419,7 +430,11 @@ const onChangeGoods = (index: number) => {
} }
// //
const onChangeCompany = (e: boolean, index: number, item: any) => { const onChangeCompany = (e: boolean, index: number, item: any) => {
cardList.value[index].devInfoVoList.every((j) => (j.isChecked = e)) cardList.value[index].devInfoVoList.every((j: any) => {
if (j.maStatus == 2) {
j.isChecked = e
}
})
} }
// //
@ -435,7 +450,7 @@ const allChecked = computed(() => {
if (cardList.value.length < 1) { if (cardList.value.length < 1) {
return false return false
} else { } else {
return cardList.value.every((e: any) => e.isChecked === true) return cardList.value.every((e: any) => e.maStatus == 2 && e.isChecked === true)
} }
}) })
@ -444,19 +459,19 @@ const amountDevice = computed(() => {
let amountNum = 0 let amountNum = 0
cardList.value.forEach((e: any) => { cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((g: any) => { e.devInfoVoList.forEach((g: any) => {
if (g.isChecked) { if (g.isChecked && g.maStatus == 2) {
amountNum++ amountNum++
} }
}) })
}) })
return amountNum return amountNum
}) })
// //
const amountDeviceList = computed(() => { const amountDeviceList = computed(() => {
let selectList: any = [] let selectList: any = []
cardList.value.forEach((e: any) => { cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((g: any) => { e.devInfoVoList.forEach((g: any) => {
if (g.isChecked) { if (g.isChecked && g.maStatus == 2) {
selectList.push(g) selectList.push(g)
} }
}) })
@ -469,7 +484,7 @@ const orderAmountPice = computed(() => {
let orderAmountPice = 0 let orderAmountPice = 0
cardList.value.forEach((e: any) => { cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((g: any) => { e.devInfoVoList.forEach((g: any) => {
if (g.isChecked) { if (g.isChecked && g.maStatus == 2) {
orderAmountPice = g.num * g.dayLeasePrice * g.days + orderAmountPice orderAmountPice = g.num * g.dayLeasePrice * g.days + orderAmountPice
} }
}) })
@ -854,6 +869,30 @@ getReceiptGoodsAddress()
display: flex; display: flex;
align-content: center; align-content: center;
.img-box {
position: relative;
.img-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 10px;
opacity: 0.6;
background-color: #333;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
span {
color: #fff;
font-weight: bold;
font-size: 16px;
}
}
}
img { img {
width: 160px; width: 160px;
height: 100px; height: 100px;

View File

@ -167,7 +167,7 @@ const onChangeGoods = (index: number) => {
// //
const confirmReceipt = () => { const confirmReceipt = () => {
pickUpCodeFormRef.value.validate((valid:any) => { pickUpCodeFormRef.value.validate((valid: any) => {
if (valid) { if (valid) {
ElMessageBox.confirm('是否确定收货?', { ElMessageBox.confirm('是否确定收货?', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -175,8 +175,16 @@ const confirmReceipt = () => {
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
console.log('xxxxxxxxxxxxxxxx',indexPickUpCode.value,pickUpCodeForm.pickUpCode) console.log(
return passApi({ orderId: cardList.value[indexPickUpCode.value].orderId, orderStatus: 4,pickupCode:pickUpCodeForm.pickUpCode }) 'xxxxxxxxxxxxxxxx',
indexPickUpCode.value,
pickUpCodeForm.pickUpCode,
)
return passApi({
orderId: cardList.value[indexPickUpCode.value].orderId,
orderStatus: 4,
pickupCode: pickUpCodeForm.pickUpCode,
})
}) })
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
@ -392,23 +400,23 @@ const downloadContract = () => {
// //
const downloadAnnex = async () => { const downloadAnnex = async () => {
const fileUrl = `https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2025/contract-annex.docx`; const fileUrl = `https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2025/contract-annex.docx`
try { try {
const response = await fetch(fileUrl); const response = await fetch(fileUrl)
if (!response.ok) throw new Error('网络响应不正常'); if (!response.ok) throw new Error('网络响应不正常')
const blob = await response.blob(); const blob = await response.blob()
const url = window.URL.createObjectURL(blob); const url = window.URL.createObjectURL(blob)
const a = document.createElement('a'); const a = document.createElement('a')
a.style.display = 'none'; a.style.display = 'none'
a.href = url; a.href = url
a.download = 'contract-annex.docx'; // a.download = 'contract-annex.docx' //
document.body.appendChild(a); document.body.appendChild(a)
a.click(); a.click()
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url)
} catch (error) { } catch (error) {
console.error('下载失败:', error); console.error('下载失败:', error)
} }
} }
@ -495,43 +503,51 @@ const costSubmit = () => {
} }
// //
const dialogVisiblePickUpCode = ref(false); const dialogVisiblePickUpCode = ref(false)
// //
const pickUpCode = ref(''); const pickUpCode = ref('')
const pickUpView = async(item: any) => { const pickUpView = async (item: any) => {
console.log('item',item) console.log('item', item)
const res: any = await getOrderCodeApi({orderId:item.orderId}) const res: any = await getOrderCodeApi({ orderId: item.orderId })
console.log('res',res) console.log('res', res)
pickUpCode.value = res.data pickUpCode.value = res.data
dialogVisiblePickUpCode.value = true; dialogVisiblePickUpCode.value = true
}; }
const indexPickUpCode = ref(0); const indexPickUpCode = ref(0)
// //
const dialogVisiblePickUpCodeOut = ref(false); const dialogVisiblePickUpCodeOut = ref(false)
// //
const pickUpCodeOut = ref(''); const pickUpCodeOut = ref('')
const pickUpViewOut = (index: number) => { const pickUpViewOut = (index: number) => {
indexPickUpCode.value = index; indexPickUpCode.value = index
pickUpCodeForm.pickUpCode = ''; pickUpCodeForm.pickUpCode = ''
dialogVisiblePickUpCodeOut.value = true; dialogVisiblePickUpCodeOut.value = true
}; }
const pickUpCodeFormRef = ref() const pickUpCodeFormRef = ref()
// //
const pickUpCodeRules = ref({ const pickUpCodeRules = ref({
pickUpCode:[ pickUpCode: [
{ {
required: true, required: true,
message: '请输入取件码', message: '请输入取件码',
trigger: 'blur', trigger: 'blur',
} },
], ],
}) })
const pickUpCodeForm = reactive<any>({ const pickUpCodeForm = reactive<any>({
pickUpCode: '', pickUpCode: '',
}) })
const onJumpDetails = (goods: any) => {
console.log(goods, 'goods')
router.push({
name: 'equipDetail',
query: {
id: goods.maId,
},
})
}
</script> </script>
<template> <template>
@ -722,7 +738,12 @@ const pickUpCodeForm = reactive<any>({
: '' : ''
" "
> >
<img :src="goods.url" style="width: 110px; height: 80px" alt="" /> <img
:src="goods.url"
style="width: 110px; height: 80px; cursor: pointer"
alt=""
@click="onJumpDetails(goods)"
/>
<div <div
style=" style="
flex: 1; flex: 1;
@ -752,11 +773,22 @@ const pickUpCodeForm = reactive<any>({
</span> </span>
<span v-if="item.orderStatus == 20"> <span v-if="item.orderStatus == 20">
{{ {{
isNaN(momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day')) isNaN(
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
),
)
? '-' ? '-'
: momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day') == 0 : momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
) == 0
? 1 ? 1
: momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day') : momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
)
}}{{ ' ' + '天' }} }}{{ ' ' + '天' }}
</span> </span>
@ -1476,7 +1508,6 @@ const pickUpCodeForm = reactive<any>({
<!-- </div> --> <!-- </div> -->
<div style="display: flex; justify-content: flex-end; margin-bottom: 10px"> <div style="display: flex; justify-content: flex-end; margin-bottom: 10px">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="downloadAnnex" type="success"> 下载附件 </el-button> <el-button @click="downloadAnnex" type="success"> 下载附件 </el-button>
<el-button @click="downloadContract" type="success"> 下载合同 </el-button> <el-button @click="downloadContract" type="success"> 下载合同 </el-button>
<el-button type="primary" @click="dialogFormVisibleSettleWord = false" <el-button type="primary" @click="dialogFormVisibleSettleWord = false"
@ -1497,13 +1528,18 @@ const pickUpCodeForm = reactive<any>({
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="取件码:" prop="pickUpCode" label-width="100px" style="font-size: 18px; font-weight:"> <el-form-item
label="取件码:"
prop="pickUpCode"
label-width="100px"
style="font-size: 18px; font-weight: "
>
<el-input <el-input
autocomplete="off" autocomplete="off"
maxlength="20" maxlength="20"
v-model="pickUpCode" v-model="pickUpCode"
clearable clearable
style="font-size: 18px; font-weight: bold;" style="font-size: 18px; font-weight: bold"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -1516,12 +1552,7 @@ const pickUpCodeForm = reactive<any>({
</el-dialog> </el-dialog>
<!-- 收货取件码弹窗 --> <!-- 收货取件码弹窗 -->
<el-dialog <el-dialog v-model="dialogVisiblePickUpCodeOut" title="出库" width="30%" align-center>
v-model="dialogVisiblePickUpCodeOut"
title="出库"
width="30%"
align-center
>
<el-form <el-form
ref="pickUpCodeFormRef" ref="pickUpCodeFormRef"
label-position="right" label-position="right"
@ -1530,7 +1561,7 @@ const pickUpCodeForm = reactive<any>({
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="取件码:" prop="pickUpCode" label-width="100px" > <el-form-item label="取件码:" prop="pickUpCode" label-width="100px">
<el-input <el-input
autocomplete="off" autocomplete="off"
maxlength="20" maxlength="20"
@ -1542,14 +1573,14 @@ const pickUpCodeForm = reactive<any>({
</el-row> </el-row>
</el-form> </el-form>
<div class="button-container"> <div class="button-container">
<el-button type="primary" class="primary-lease" @click="dialogVisiblePickUpCodeOut=false">
关闭
</el-button>
<el-button <el-button
type="primary" type="primary"
class="primary-lease" class="primary-lease"
@click="confirmReceipt" @click="dialogVisiblePickUpCodeOut = false"
> >
关闭
</el-button>
<el-button type="primary" class="primary-lease" @click="confirmReceipt">
收货 收货
</el-button> </el-button>
</div> </div>

View File

@ -158,16 +158,16 @@ const onAcceptOrders = (item: any) => {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(async() => { .then(async () => {
const passApiRes = await passApi({ orderId: item.orderId, orderStatus: 2 }); const passApiRes = await passApi({ orderId: item.orderId, orderStatus: 2 })
if (passApiRes && passApiRes.code === 200) { if (passApiRes && passApiRes.code === 200) {
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '接单成功', message: '接单成功',
duration: 1000, duration: 1000,
}); })
numberTemp.value = numberTemp.value + 1; numberTemp.value = numberTemp.value + 1
getList(); getList()
} }
// passApi // passApi
// if (passApiRes && passApiRes.code === 200) { // if (passApiRes && passApiRes.code === 200) {
@ -187,42 +187,40 @@ const onAcceptOrders = (item: any) => {
.catch(() => {}) .catch(() => {})
} }
const indexPickUpCode = ref(0)
const indexPickUpCode = ref(0);
// //
const dialogVisiblePickUpCodeOut = ref(false); const dialogVisiblePickUpCodeOut = ref(false)
// //
const pickUpCodeOut = ref(''); const pickUpCodeOut = ref('')
const pickUpViewOut = (index: number) => { const pickUpViewOut = (index: number) => {
indexPickUpCode.value = index; indexPickUpCode.value = index
pickUpCodeForm.pickUpCode = ''; pickUpCodeForm.pickUpCode = ''
pickUpCodeForm.orderRemark = ''; pickUpCodeForm.orderRemark = ''
dialogVisiblePickUpCodeOut.value = true; dialogVisiblePickUpCodeOut.value = true
}; }
const pickUpCodeFormRef = ref() const pickUpCodeFormRef = ref()
// //
const pickUpCodeRules = ref({ const pickUpCodeRules = ref({
pickUpCode:[ pickUpCode: [
{ {
required: true, required: true,
message: '请输入取件码', message: '请输入取件码',
trigger: 'blur', trigger: 'blur',
} },
], ],
orderRemark:[ orderRemark: [
{ {
required: true, required: true,
message: '请输入备注', message: '请输入备注',
trigger: 'blur', trigger: 'blur',
} },
] ],
}) })
const pickUpCodeForm = reactive<any>({ const pickUpCodeForm = reactive<any>({
pickUpCode: '', pickUpCode: '',
orderRemark: '', orderRemark: '',
}) })
// //
const confirmPass = async (index: number) => { const confirmPass = async (index: number) => {
ElMessageBox.confirm('是否确定出库?', { ElMessageBox.confirm('是否确定出库?', {
@ -753,43 +751,43 @@ const downloadContract = () => {
// //
const downloadAnnex = async () => { const downloadAnnex = async () => {
const fileUrl = `https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2025/contract-annex.docx`; const fileUrl = `https://zlpt-1259760603.cos.ap-nanjing.myqcloud.com/2025/contract-annex.docx`
try { try {
const response = await fetch(fileUrl); const response = await fetch(fileUrl)
if (!response.ok) throw new Error('网络响应不正常'); if (!response.ok) throw new Error('网络响应不正常')
const blob = await response.blob(); const blob = await response.blob()
const url = window.URL.createObjectURL(blob); const url = window.URL.createObjectURL(blob)
const a = document.createElement('a'); const a = document.createElement('a')
a.style.display = 'none'; a.style.display = 'none'
a.href = url; a.href = url
a.download = 'contract-annex.docx'; // a.download = 'contract-annex.docx' //
document.body.appendChild(a); document.body.appendChild(a)
a.click(); a.click()
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url)
} catch (error) { } catch (error) {
console.error('下载失败:', error); console.error('下载失败:', error)
} }
} }
const wordUrl = ref('') const wordUrl = ref('')
// //
const dialogVisiblePickUpCode = ref(false); const dialogVisiblePickUpCode = ref(false)
// //
const pickUpCode = ref(''); const pickUpCode = ref('')
const pickUpView = async(item: any) => { const pickUpView = async (item: any) => {
console.log('item',item) console.log('item', item)
const res: any = await getOrderCodeApi({orderId:item.orderId}) const res: any = await getOrderCodeApi({ orderId: item.orderId })
console.log('res',res) console.log('res', res)
pickUpCode.value = res.data pickUpCode.value = res.data
dialogVisiblePickUpCode.value = true; dialogVisiblePickUpCode.value = true
}; }
// //
const confirmReceipt = () => { const confirmReceipt = () => {
pickUpCodeFormRef.value.validate((valid:any) => { pickUpCodeFormRef.value.validate((valid: any) => {
if (valid) { if (valid) {
ElMessageBox.confirm('是否确定出库?', { ElMessageBox.confirm('是否确定出库?', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -797,8 +795,17 @@ const confirmReceipt = () => {
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
console.log('xxxxxxxxxxxxxxxx',indexPickUpCode.value,pickUpCodeForm.pickUpCode) console.log(
return passApi({ orderId: cardList.value[indexPickUpCode.value].orderId, orderStatus: 4,pickupCode:pickUpCodeForm.pickUpCode,orderRemark:pickUpCodeForm.orderRemark }) 'xxxxxxxxxxxxxxxx',
indexPickUpCode.value,
pickUpCodeForm.pickUpCode,
)
return passApi({
orderId: cardList.value[indexPickUpCode.value].orderId,
orderStatus: 4,
pickupCode: pickUpCodeForm.pickUpCode,
orderRemark: pickUpCodeForm.orderRemark,
})
}) })
.then((res) => { .then((res) => {
if (res.code === 200) { if (res.code === 200) {
@ -816,6 +823,16 @@ const confirmReceipt = () => {
}) })
} }
const onJumpDetails = (goods: any) => {
console.log(goods, 'goods')
router.push({
name: 'equipDetail',
query: {
id: goods.maId,
},
})
}
</script> </script>
<template> <template>
@ -1010,7 +1027,12 @@ const confirmReceipt = () => {
" "
style="min-height: 100px" style="min-height: 100px"
> >
<img :src="goods.url" style="width: 110px; height: 80px" alt="" /> <img
:src="goods.url"
style="width: 110px; height: 80px; cursor: pointer"
alt=""
@click="onJumpDetails(goods)"
/>
<div <div
style=" style="
min-height: 100px; min-height: 100px;
@ -1040,11 +1062,22 @@ const confirmReceipt = () => {
</span> </span>
<span v-if="item.orderStatus == 20"> <span v-if="item.orderStatus == 20">
{{ {{
isNaN(momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day')) isNaN(
momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
),
)
? '-' ? '-'
: momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day') == 0 : momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
) == 0
? 1 ? 1
: momentInit(goods.takeOverTime).diff(goods.rentOverTime, 'day') : momentInit(goods.takeOverTime).diff(
goods.rentOverTime,
'day',
)
}}{{ ' ' + '天' }} }}{{ ' ' + '天' }}
</span> </span>
@ -2144,13 +2177,18 @@ const confirmReceipt = () => {
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="取件码:" prop="pickUpCode" label-width="100px" style="font-size: 18px; font-weight:"> <el-form-item
label="取件码:"
prop="pickUpCode"
label-width="100px"
style="font-size: 18px; font-weight: "
>
<el-input <el-input
autocomplete="off" autocomplete="off"
maxlength="20" maxlength="20"
v-model="pickUpCode" v-model="pickUpCode"
clearable clearable
style="font-size: 18px; font-weight: bold;" style="font-size: 18px; font-weight: bold"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -2163,12 +2201,7 @@ const confirmReceipt = () => {
</el-dialog> </el-dialog>
<!-- 收货取件码弹窗 --> <!-- 收货取件码弹窗 -->
<el-dialog <el-dialog v-model="dialogVisiblePickUpCodeOut" title="出库" width="30%" align-center>
v-model="dialogVisiblePickUpCodeOut"
title="出库"
width="30%"
align-center
>
<el-form <el-form
ref="pickUpCodeFormRef" ref="pickUpCodeFormRef"
label-position="right" label-position="right"
@ -2177,7 +2210,7 @@ const confirmReceipt = () => {
> >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="取件码:" prop="pickUpCode" label-width="100px" > <el-form-item label="取件码:" prop="pickUpCode" label-width="100px">
<el-input <el-input
autocomplete="off" autocomplete="off"
maxlength="20" maxlength="20"
@ -2190,7 +2223,7 @@ const confirmReceipt = () => {
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="20"> <el-col :span="20">
<el-form-item label="备注:" prop="orderRemark" label-width="100px" > <el-form-item label="备注:" prop="orderRemark" label-width="100px">
<el-input <el-input
autocomplete="off" autocomplete="off"
maxlength="20" maxlength="20"
@ -2204,14 +2237,14 @@ const confirmReceipt = () => {
</el-row> </el-row>
</el-form> </el-form>
<div class="button-container"> <div class="button-container">
<el-button type="primary" class="primary-lease" @click="dialogVisiblePickUpCodeOut=false">
关闭
</el-button>
<el-button <el-button
type="primary" type="primary"
class="primary-lease" class="primary-lease"
@click="confirmReceipt" @click="dialogVisiblePickUpCodeOut = false"
> >
关闭
</el-button>
<el-button type="primary" class="primary-lease" @click="confirmReceipt">
出库 出库
</el-button> </el-button>
</div> </div>