Commit 62287744 by cen

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

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