Commit 62287744 by cen

fix: 多选交易号补录跳转带参数

1 parent b4400548
......@@ -17,8 +17,7 @@
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
<input class="uni-input" type="digit" placeholder="请输入价格" placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
......@@ -49,8 +48,7 @@
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
<input class="uni-input" type="digit" placeholder="请输入价格" placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
......@@ -68,8 +66,7 @@
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
<input class="uni-input" type="digit" placeholder="请输入价格" placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
......@@ -97,7 +94,7 @@
<script>
import OrderPopup from '@/components/OrderPopup/index.vue'
import GlCell from '../../../../components/Form/GlCell.vue';
import GlCell from '../../../../components/Form/GlCell.vue'
import { FORM_LIST, popupTypeEnum } from '../contant'
export default {
name: 'CreateOrder',
......@@ -105,6 +102,22 @@ export default {
GlCell,
OrderPopup
},
props: {
selectedTradeData: {
type: Object,
default: () => null
}
},
watch: {
selectedTradeData: {
handler(newVal) {
if (newVal) {
console.log('接收到的交易数据:', newVal)
}
},
immediate: true
}
},
data() {
return {
orderObj: {
......@@ -117,7 +130,7 @@ export default {
experienceFlag: 'Y',
payeeType: 0,
selectPayType: '3',
carBrand: {}
carBrand: {}
},
formList: FORM_LIST,
userInfo: {},
......@@ -126,7 +139,7 @@ export default {
customer: {}
},
popupType: 0,
popupTypeEnum,
popupTypeEnum
}
},
computed: {
......@@ -158,9 +171,9 @@ export default {
// 选择行事件
handleCell(val) {
console.log(val)
this.popupType = Object.keys(this.popupTypeEnum).find(key => this.popupTypeEnum[key] === val.value) * 1;
this.popupType = Object.keys(this.popupTypeEnum).find(key => this.popupTypeEnum[key] === val.value) * 1
console.log(this.popupType)
this.$refs.orderPopup.open();
this.$refs.orderPopup.open()
},
// 单选框change事件
radioChange(e, val) {
......@@ -170,8 +183,8 @@ export default {
onConfirm(val) {
console.log(val, 'onConfirm')
// 根据popupTypeEnum优化处理
const typeKey = this.popupTypeEnum[this.popupType];
if (typeKey) this.orderObj[typeKey] = val;
const typeKey = this.popupTypeEnum[this.popupType]
if (typeKey) this.orderObj[typeKey] = val
if (typeKey == 'carBrand') {
this.orderObj[typeKey].carInfo = `${val.carBrand}-${val.carChildsBrandName}-${val.carSeriesName}`
}
......@@ -184,9 +197,9 @@ export default {
const res = await uni.$api.boutiqueApi.getShopMerchantPointConfig({ merchantId })
if (res.pointsMultiRole == 'Y') {
// 找到formList中label为"交付专员"的对象,添加hidden: true
const deliveryCell = this.formList[0].find(item => item.label === '交付专员');
const deliveryCell = this.formList[0].find(item => item.label === '交付专员')
if (deliveryCell) {
deliveryCell.hidden = false;
deliveryCell.hidden = false
}
}
},
......@@ -195,9 +208,9 @@ export default {
const res = await uni.$api.boutiqueApi.getSubShopMerchantList({ merchantId })
console.log(res, '流量方')
if (res && res.length) {
const cell = this.formList[0].find(item => item.label === '二级流量方');
const cell = this.formList[0].find(item => item.label === '二级流量方')
if (cell) {
cell.hidden = false;
cell.hidden = false
}
}
},
......@@ -223,18 +236,16 @@ export default {
const res = await this.getYQorderInfo()
console.log(res, '========')
const dictionaryObj = {
carTypeRequiredFlag: "carBrand",
standNoRequiredFlag: "standNo",
plateNumRequiredFlag: "plateNumber",
carTypeRequiredFlag: 'carBrand',
standNoRequiredFlag: 'standNo',
plateNumRequiredFlag: 'plateNumber'
}
for (const key in dictionaryObj) {
const cell = this.formList[1].find(item => item.value === dictionaryObj[key]);
if (cell) cell.required = (res[key] == 'Y')
const cell = this.formList[1].find(item => item.value === dictionaryObj[key])
if (cell) cell.required = res[key] == 'Y'
}
},
async getConfig() {
}
async getConfig() {}
}
}
</script>
......@@ -262,7 +273,7 @@ export default {
.shop-item {
display: flex;
align-items: center;
background-color: #F5F7FA;
background-color: #f5f7fa;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
padding: toRpx(24);
......@@ -273,7 +284,7 @@ export default {
margin-left: toRpx(24);
.shop-name {
color: #FF781F;
color: #ff781f;
}
.alias {
......@@ -281,7 +292,6 @@ export default {
font-size: toRpx(24);
color: #666;
}
}
}
}
......@@ -304,7 +314,7 @@ export default {
.front-gear-input {
position: relative;
display: flex;
border: toRpx(2) solid #EFF0F2;
border: toRpx(2) solid #eff0f2;
background-color: #fff;
font-size: toRpx(28);
height: toRpx(70);
......@@ -334,7 +344,7 @@ export default {
width: toRpx(94);
height: toRpx(74);
background-color: #fff;
border: toRpx(2) solid #EFF0F2;
border: toRpx(2) solid #eff0f2;
padding: 0 toRpx(10);
text-align: center;
}
......@@ -346,18 +356,18 @@ export default {
line-height: toRpx(70);
text-align: center;
background-color: #fff;
border-top: toRpx(2) solid #EFF0F2;
border-bottom: toRpx(2) solid #EFF0F2;
border-top: toRpx(2) solid #eff0f2;
border-bottom: toRpx(2) solid #eff0f2;
}
.minus {
border-radius: toRpx(12) 0 0 toRpx(12);
border-left: toRpx(2) solid #EFF0F2;
border-left: toRpx(2) solid #eff0f2;
}
.add {
border-radius: 0 toRpx(12) toRpx(12) 0;
border-right: toRpx(2) solid #EFF0F2;
border-right: toRpx(2) solid #eff0f2;
}
}
}
......@@ -366,7 +376,7 @@ export default {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.package-item {
background-color: #F5F7FA;
background-color: #f5f7fa;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
......@@ -402,7 +412,7 @@ export default {
}
.goods-name {
color: #FF781F;
color: #ff781f;
font-size: toRpx(28);
}
......@@ -419,4 +429,4 @@ export default {
font-size: toRpx(24);
color: #999;
}
</style>
\ No newline at end of file
</style>
......@@ -38,7 +38,7 @@
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" v-show="activeIndex === 0" @scrolltolower="pageonReachBottom">
<view v-if="normalOrderNoList.length > 0" class="order-gap">
<view v-for="(item, index) in normalOrderNoList" :key="index" class="order_no_item">
<view v-for="(item, index) in normalOrderNoList" :key="index" class="order_no_item" :class="{ checkActive: checkListObj[item.tradeNo] }" @click="activeClick(item)">
<view class="message">
<view v-for="(subItem, idx) in itemFormObj" :key="idx" class="item flex align-center">
<view class="label">{{ subItem.label }}</view>
......@@ -59,13 +59,14 @@
</view>
</view>
</view>
<view class="sprite-icon icon-tag-checked checked" v-if="checkListObj[item.tradeNo]"></view>
</view>
</view>
</scroll-view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="true" v-show="activeIndex === 1" @scrolltolower="pageonReachBottom">
<view v-if="abnormalOrderNoList.length > 0" class="order-gap">
<view v-for="(item, index) in abnormalOrderNoList" :key="index" class="order_no_item">
<view v-for="(item, index) in abnormalOrderNoList" :key="index" class="order_no_item" :class="{ checkActive: checkListObj[item.tradeNo] }" @click="activeClick(item)">
<view class="message">
<view v-for="(subItem, idx) in itemFormObj" :key="idx" class="item flex align-center">
<view class="label">{{ subItem.label }}</view>
......@@ -86,6 +87,7 @@
</view>
</view>
</view>
<view class="sprite-icon icon-tag-checked checked" v-if="checkListObj[item.tradeNo]"></view>
</view>
</view>
</scroll-view>
......@@ -93,8 +95,8 @@
</template>
<template #footer>
<view class="footer-box flex justify-center">
<view class="cancle-btn btn">取消</view>
<view class="sure-btn btn">确认</view>
<view class="cancle-btn btn" @click="cancelSelection">取消</view>
<view class="sure-btn btn" @click="confirmSelection">确认</view>
</view>
</template>
</PublishPopup>
......@@ -188,6 +190,7 @@ export default {
normalCurrentPage: 1,
abnormalPages: 1,
normalPages: 1,
checkListObj: {},
...order_mixins.data
}
},
......@@ -223,7 +226,12 @@ export default {
},
tabChange(index) {
this.activeIndex = index
this.getTransactionSerialNumber()
if (!this.normalOrderNoList.length) {
this.getTransactionSerialNumber()
}
if (!this.abnormalOrderNoList.length) {
this.getTransactionSerialNumber()
}
},
getStatByStatus() {
uni.$api.boutiqueApi
......@@ -407,6 +415,31 @@ export default {
},
showQuestionPopup() {
this.$refs.abnormalTipsPopup.open()
},
activeClick(item) {
if (this.checkListObj[item.tradeNo]) {
this.$delete(this.checkListObj, item.tradeNo)
} else {
this.$set(this.checkListObj, item.tradeNo, item)
}
},
confirmSelection() {
const selectedItems = Object.values(this.checkListObj)
if (selectedItems.length === 0) {
uni.showToast({
title: '请选择交易参考号',
icon: 'none'
})
return
}
this.$refs.WaitinputorderPopup.closePopup()
this.$emit('jump', 'CreateOrder', {
selectedItems: selectedItems
})
},
cancelSelection() {
this.checkListObj = {}
this.$refs.WaitinputorderPopup.closePopup()
}
}
}
......@@ -584,6 +617,7 @@ export default {
border: toRpx(2) solid #dce0e6;
padding: toRpx(24) toRpx(32);
background: #f5f7fa;
position: relative;
.message {
.item {
margin-bottom: toRpx(12);
......@@ -601,6 +635,15 @@ export default {
font-weight: 400;
}
}
.checked {
position: absolute;
top: 0;
right: 0;
}
}
.checkActive {
border: toRpx(2) solid #4673ff;
background: #4673ff1a;
}
.copy-btn {
display: flex;
......
<template>
<view class="detail-box">
<view class="nav-bar">
<view
class="back"
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">展业工具</view>
</view>
......@@ -17,28 +10,22 @@
<view class="detail-left">
<view class="common-title">展业</view>
<view class="content">
<image
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
<template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance>
</template>
<template v-else>
</template>
<template v-else></template>
</view>
</view>
<view class="detail-right">
<component :is="toolComponentName" />
<component :is="toolComponentName" @jump="jump" :selected-trade-data="selectedTradeData" />
</view>
</view>
</view>
</template>
<script>
import Entrance from '@/components/Entrance.vue';
import Entrance from '@/components/Entrance.vue'
import CreateOrder from './components/CreateOrder.vue'
import DailyReport from './components/DailyReport.vue'
import DefeatOrder from './components/DefeatOrder.vue'
......@@ -51,22 +38,34 @@ export default {
DefeatOrder,
OrderManagement
},
data () {
data() {
return {
toolComponentName: ''
toolComponentName: '',
selectedTradeData: null
}
},
onLoad (options) {
onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName
},
methods: {
entranceClick (item) {
entranceClick(item) {
console.log(item)
this.toolComponentName = item.name
if (item.name !== 'CreateOrder') {
this.selectedTradeData = null
}
},
backPage () {
uni.navigateBack();
backPage() {
uni.navigateBack()
},
// name:跳转组件名,val:跳转参数
jump(name, val) {
this.toolComponentName = name
console.log(this.toolComponentName)
if (val) {
this.selectedTradeData = val
}
}
}
}
</script>
......@@ -110,4 +109,4 @@ export default {
font-size: toRpx(34);
}
}
</style>
\ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!