Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
uplus-fapai-mp
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6ae0b299
authored
Apr 21, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
重构编辑订单页面,新增第一步组件,移除旧的编辑订单页面及相关样式,更新表单组件,优化代码结构
1 parent
28cf3400
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
831 additions
and
402 deletions
app.json
app.wxss → app.sass
components/GLCustForm/GLCustForm.js
components/GLCustForm/GLCustForm.json
components/GLCustForm/GLCustForm.wxml
components/GLCustForm/GLCustForm.sass → components/GLCustForm/GLCustForm.wxss
components/GLCustForm/GLForm.wxs
packageIndex/pages/editOrder/components/FirstStep/FirstStep.js
packageIndex/pages/editOrder/components/FirstStep/FirstStep.json
packageIndex/pages/editOrder/components/FirstStep/FirstStep.scss
packageIndex/pages/editOrder/components/FirstStep/FirstStep.wxml
packageIndex/pages/editOrder/editOrder.json
packageIndex/pages/editOrder/editOrder.scss
packageIndex/pages/editOrder/editOrder.wxml
packageIndex/pages/editOrder/editOrder.wxss
packageIndex/pages/editOrder/editOrder.js → packageIndex/pages/editOrder/index/index.js
packageIndex/pages/editOrder/index/index.json
packageIndex/pages/editOrder/index/index.sass
packageIndex/pages/editOrder/index/index.wxml
pages/tab/index/index.js
app.json
View file @
6ae0b29
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
"root"
:
"packageIndex"
,
"root"
:
"packageIndex"
,
"pages"
:
[
"pages"
:
[
"pages/goodsDetail/index"
,
"pages/goodsDetail/index"
,
"pages/editOrder/
editOrder
"
"pages/editOrder/
index/index
"
]
]
},
},
{
{
...
...
app.
wx
ss
→
app.
sa
ss
View file @
6ae0b29
@import
"assets/style/common.wxss";
@import
"assets/style/common.wxss";
@font-face
{
font-family
:
"numberNor"
;
src
:
url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-500-Medium.ttf")
;
}
@font-face
{
font-family
:
"numberBold"
;
src
:
url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/font/D-DIN-PRO-700-Bold.ttf")
;
}
page
{
page
{
/* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom
:
constant
(
safe-area-inset-bottom
)
;
/* 兼容 IOS>11.2 */
--envSafeAreaInsetBottom
:
env
(
safe-area-inset-bottom
)
;
background-color
:
#F7F8FA
!
important
;
background-color
:
#F7F8FA
!
important
;
color
:
#282829
;
color
:
#282829
;
font-size
:
28rpx
;
font-size
:
28rpx
;
--themeColor: #
FC5B32
;
--themeColor
:
#
185EFE
;
--btnColor: #
FC8A32
;
--btnColor
:
#
185EFE
;
--fontColor: #
7E4C15
;
--fontColor
:
#
000000
0
;
--borderRadius
:
8rpx
;
--borderRadius
:
8rpx
;
--margin
:
32rpx
;
--margin
:
32rpx
;
/* 兼容 IOS<11.2 先constant再env */
/* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom
:
constant
(
safe-area-inset-bottom
)
;
--constantSafeAreaInsetBottom
:
constant
(
safe-area-inset-bottom
)
;
/* 兼容 IOS>11.2 */
/* 兼容 IOS>11.2 */
--envSafeAreaInsetBottom
:
env
(
safe-area-inset-bottom
)
;
--envSafeAreaInsetBottom
:
env
(
safe-area-inset-bottom
)
;
}
image {
@for
$i
from
1
through
1300
{
width: 100%;
--fontSize
#{
$i
}
:
calc
(
#{
$i
}
vmin
/
7
.5
)
;
height: 100%;
--fontSizeContent
#{
$i
}
:
calc
(
#{
$i
}
vmin
/
7
.176
)
;
vertical-align: top;
}
}
.flex_sc {
@media
screen
and
(
min-device-width
:
768px
)
and
(
-
webkit-min-device-pixel-ratio
:
1
)
{
display: flex;
@for
$i
from
1
through
1300
{
align-items: center;
--fontSize
#{
$i
}
:
calc
(
#{
$i
}
vmin
/
8
.5
)
;
}
--fontSizeContent
#{
$i
}
:
calc
(
#{
$i
}
vmin
/
6
.719
)
;
}
}
.flex_cc
{
image
{
display: flex
;
width
:
100%
;
align-items: center
;
height
:
100%
;
justify-content: center
;
vertical-align
:
top
;
}
}
.flex_scb {
.y-center
{
display: flex;
top
:
50%
;
align-items: center;
transform
:
translateY
(
-50%
)
;
justify-content: space-between;
}
}
.suggest-box
{
.x-center
{
font-size: 28rpx
;
left
:
50%
;
color: #1B233D
;
transform
:
translateX
(
-50%
)
;
}
}
.btn_primary {
.box-center
{
color: #FC5B32;
position
:
absolute
;
font-weight: 500;
top
:
50%
;
font-size: 28rpx;
left
:
50%
;
}
transform
:
translate
(
-50%
,
-50%
)
;
}
.btn_cancel {
.text-hide
{
font-weight: 400;
white-space
:
nowrap
;
font-size: 28rpx;
overflow
:
hidden
;
color: #1B233D;
text-overflow
:
ellipsis
;
}
}
.express-wrap{
height:1200rpx;
.text-center
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.two-text
{
display
:
inline-block
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
}
.isFullSucreen
{
box-sizing
:
border-box
;
padding-bottom
:
constant
(
safe-area-inset-bottom
)
!
important
;
padding-bottom
:
env
(
safe-area-inset-bottom
)
!
important
;
// padding-bottom: 34px !important;
}
.isFullSucreen-bottom
{
bottom
:
34px
!
important
;
}
.list-nothing
{
padding
:
var
(
--
fontSize30
)
0
;
text-align
:
center
;
font-size
:
var
(
--
fontSize28
)
;
color
:
#666666
;
}
.list-not
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#999
;
font-size
:
var
(
--
fontSize24
)
;
height
:
100%
;
}
.bgcw
{
background-color
:
#fff
;
}
.flex_sc
{
display
:
flex
;
align-items
:
center
;
}
.flex_cc
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.flex_scb
{
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.suggest-box
{
font-size
:
28rpx
;
color
:
#1B233D
;
}
.btn_primary
{
color
:
#FC5B32
;
font-weight
:
500
;
font-size
:
28rpx
;
}
.btn_cancel
{
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#1B233D
;
}
.express-wrap
{
height
:
1200rpx
;
}
.express-wrap
.weui-actionsheet__menu
{
height
:calc
(
100
%
-
100rpx
);
overflow-y
:
auto
;
}
}
}
.express-wrap .weui-actionsheet__menu{
height:calc(100% - 100rpx);
overflow-y: auto;
}
\ No newline at end of file
\ No newline at end of file
components/GLCustForm/GLCustForm.js
View file @
6ae0b29
This diff is collapsed.
Click to expand it.
components/GLCustForm/GLCustForm.json
View file @
6ae0b29
{
{
"component"
:
true
,
"component"
:
true
,
"usingComponents"
:
{
"usingComponents"
:
{
"van-area"
:
"@vant/weapp/area/index"
,
"van-area"
:
"@vant/weapp/area/index"
,
"van-popup"
:
"@vant/weapp/popup/index"
"van-popup"
:
"@vant/weapp/popup/index"
}
}
}
}
\ No newline at end of file
\ No newline at end of file
components/GLCustForm/GLCustForm.wxml
View file @
6ae0b29
<!--components/GLCustForm/GLCustForm.wxml-->
<wxs src="./GLForm.wxs" module="filterUtils" />
<wxs src="./GLForm.wxs" module="filterUtils" />
<!-- <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> -->
<view wx:for="{{ formDataList }}" wx:key="index" class="custom-class gl-form">
<glsx-privacy appletName="优加发拍">
</glsx-privacy>
<view
wx:for="{{formDataList}}"
wx:key="index"
class="custom-class gl-cust-form"
>
<gl-cell
<gl-cell
wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot'
&& !item.isHide
}}"
wx:if="{{filterUtils.isShowFn(formData, item) && item.type != 'otherSlot'}}"
border="{{
!item.noBorder
}}"
border="{{
!item.noBorder
}}"
class="{{
item.name
}}"
class="{{
item.name
}}"
haveArrow="{{
item.haveArrow || false
}}"
haveArrow="{{
item.haveArrow || false
}}"
valueAlign="right"
valueAlign="right"
label="{{
item.label
}}"
label="{{
item.label
}}"
labelWidth="{{
item.labelWidth || labelWidth
}}"
labelWidth="{{
item.labelWidth || labelWidth
}}"
placeholder="{{
item.placeholder || ''
}}"
placeholder="{{
item.placeholder || ''
}}"
bindclick="handleCellClick"
bindclick="handleCellClick"
data-target="{{item}}"
data-target="{{ item }}"
data-idx="{{index}}"
data-idx="{{ index }}"
background="{{background}}"
background="{{ background }}"
required="{{item.required}}"
required="{{ item.required }}"
requiredBefore="false"
requiredAfter="{{ item.requiredAfter }}"
requiredAfter="true"
cellHeight="{{ !item.noCellHeight }}"
cellHeight="{{!item.noCellHeight}}"
cellStyle="{{ item.cellStyle || '' }}"
cellStyle="{{item.cellStyle||''}}"
labelStyle="{{ item.labelStyle }}"
labelStyle="{{item.labelStyle}}"
cellBoxStyle="{{ item.cellBoxStyle || '' }}"
cellValueStyle="{{item.cellValueStyle}}"
cellBoxStyle="{{item.cellBoxStyle||''}}"
show-word-limit
noPadding="{{item.noPadding}}"
>
>
<!-- slot -->
<!-- slot -->
<slot wx:if="{{item.type == 'slot'}}" name="{{item.slotName || item.name}}" />
<slot wx:if="{{ item.type == 'slot' }}" name="{{ item.name }}" />
<!-- radio -->
<!-- input / textarea -->
<view wx:if="{{item.type == 'radio'}}">
<view wx:if="{{ item.type == 'input' }}" class="input-box">
<van-radio-group
value="{{formData[item.name]}}"
disabled="{{item.disabled||disable}}"
class="radio-box"
data-attr="{{item.name}}"
bindchange="handleRadio"
>
<van-radio
wx:for="{{item.optionList}}"
class="radio-item"
wx:for-item="k"
wx:for-index="kIdx"
wx:key="kIdx"
name="{{k[item.optionLabel]}}"
>
{{k[item.optionLabel]}}
</van-radio>
</van-radio-group>
</view>
<!-- input -->
<view
wx:if="{{item.type == 'input'}}"
class="input-box"
style="{{item.customStyle}}"
>
<!-- rows="1" -->
<!-- rows="1" -->
<van-field
<van-field
class="textarea"
class="textarea"
custom-style="padding: var(--fontSize30) 0; font-size: var(--fontSize28); background: {{background}}
{{item.inputCustomStyle}}
;"
custom-style="padding: var(--fontSize30) 0; font-size: var(--fontSize28); background: {{background}};"
border="{{
false
}}"
border="{{
false
}}"
value="{{
formData[item.name]
}}"
value="{{
formData[item.name]
}}"
input-align="{{
item.inputAlign || 'right'
}}"
input-align="{{
itme.inputAlign || 'right'
}}"
autosize
autosize
hold-keyboard
hold-keyboard
type="{{item.fieldType || 'text'}}"
type="{{ item.fieldType || 'text' }}"
rows="{{item.rows || '1'}}"
placeholder="{{ item.placeholder || '请输入' }}"
placeholder="{{item.placeholder || '请输入'}}"
maxlength="{{ item.maxlength || 140 }}"
maxlength="{{item.maxlength || 140}}"
disabled="{{ item.disabled || disable }}"
disabled="{{item.disabled||disable}}"
readonly="{{ item.readonly }}"
readonly="{{item.readonly}}"
data-attr="{{ item.name }}"
data-attr="{{item.name}}"
data-item="{{ item }}"
data-item="{{item}}"
bindinput="handleInput"
bindinput="handleInput" />
bindblur="handleBlur"
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
/>
</view>
<view class="scan-box" wx:if="{{ item.scan }}" data-type="vin" bindtap="navOcr">
<!-- textarea -->
<image src="/images/scan.png" class="scan-icon" />
<view wx:if="{{item.type == 'textarea'}}" class="meeting-box">
<view class="meeting-textarea">
<van-field
value="{{formData[item.name]}}"
hold-keyboard
type="textarea"
rows="{{item.rows || '4'}}"
autosize="{ minHeight: 50 }"
show-word-limit
placeholder="{{item.placeholder || '请输入'}}"
maxlength="{{item.maxlength || 140}}"
disabled="{{item.disabled||disable}}"
data-attr="{{item.name}}"
data-item="{{item}}"
bindinput="handleInput" />
</view>
</view>
<text wx:if="{{ item.suffix }}" class="input-suffix">{{
item.suffix
}}</text>
</view>
</view>
<!-- picker -->
<!-- picker -->
<picker
<picker
wx:if="{{
item.type == 'select'
}}"
wx:if="{{
item.type == 'select'
}}"
bindchange="handlePickerChange"
bindchange="handlePickerChange"
data-target="{{item}}"
data-target="{{ item }}"
disabled="{{item.disabled||disable}}"
value="{{ pickerIndexMap[item.name] !== undefined ? pickerIndexMap[item.name] : filterUtils.getPickerIndex(formData, item) }}"
range="{{item.optionList}}"
disabled="{{ item.disabled || disable }}"
range-key="{{item.optionLabel}}"
range="{{ item.optionList }}"
range-key="{{ item.optionLabel }}"
>
>
<view class="picker">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">{{formData[item.labelName]}}</view>
<view class="text-hide" wx:if="{{ formData[item.labelName] }}">
<text class="placeholder" wx:else>点击选择</text>
{{ formData[item.labelName] }}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</view>
</picker>
</picker>
<!-- 省市区 -->
<!-- 省市区 -->
<block wx:if="{{
item.type == 'region'
}}">
<block wx:if="{{
item.type == 'region'
}}">
<view class="picker" bindtap="showAreaFun">
<view class="picker" bindtap="showAreaFun"
data-target="{{ item }}"
>
<image class="arrow" src="/components/images/arrow-x.png" />
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">{{formData[item.labelName]}}</view>
<view class="text-hide" wx:if="{{ formData[item.labelName] }}">
<text class="placeholder" wx:else>点击选择</text>
{{ formData[item.labelName] }}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</view>
<van-popup
<van-popup
show="{{ showArea }}"
show="{{ showArea }}"
position="bottom"
position="bottom"
z-index="99999"
root-portal="{{true}}"
bind:close="showAreaFun"
bind:close="showAreaFun"
>
>
<van-area
<van-area
root-portal="true"
area-list="{{ areaList }}"
area-list="{{ areaList }}"
columns-num="{{ item.columnsNum }}"
columns-num="{{ item.columnsNum }}"
title="{{
item.label
}}"
title="{{
areaTitle || ''
}}"
bind:confirm="bindRegionChange"
bind:confirm="bindRegionChange"
bind:cancel="showAreaFun" />
bind:cancel="showAreaFun"
data-target="{{ item }}"
/>
</van-popup>
</van-popup>
</block>
</block>
<!-- <picker
mode="region"
bindchange="bindRegionChange"
data-target="{{item}}"
value="{{index}}"
level="{{item.level}}"
disabled="{{item.disabled||disable}}">
<view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</picker> -->
<!-- 时间选择器 -->
<!-- 时间选择器 -->
<picker
<picker
wx:if="{{
item.type == 'pickerTime'
}}"
wx:if="{{
item.type == 'pickerTime'
}}"
mode="date"
mode="date"
value="{{
formData[name] || formData[item.name]
}}"
value="{{
formData[name] || formData[item.name]
}}"
start="{{
item.start || ''
}}"
start="{{
item.start || ''
}}"
end="{{
item.end || ''
}}"
end="{{
(item.name === 'registrationDate' || item.name === 'productionDate') ? currentDate : (item.end || '')
}}"
bindchange="handleTimeChange"
bindchange="handleTimeChange"
data-target="{{
item
}}"
data-target="{{
item
}}"
>
>
<view class="picker">
<view class="picker">
<view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view>
<view class="text-hide" wx:if="{{ formData[item.name] }}">
<text class="placeholder" wx:else>点击选择</text>
{{ formData[item.name] }}
</view>
<text class="placeholder" wx:else>请选择</text>
</view>
</view>
</picker>
</picker>
<!-- 品牌车型 -->
<!-- 品牌车型 -->
<view wx:if="{{
item.type == 'brand'
}}" class="brand">
<view wx:if="{{
item.type == 'brand'
}}" class="brand">
<view wx:if="{{
formData.vehicleBrandId
}}">
<view wx:if="{{
formData.carSeriesName
}}">
{{
formData.vehicleBrandName || ''}}/{{formData.vehicleSubBrandName || ''}}/{{formData.vehicleSeriesName || ''}}/{{formData.vehicleShapeName || ''
}}
{{
formData.carSeriesName || "" }} {{ formData.carTypeName || ""
}}
</view>
</view>
<view wx:else class="placeholder-class">{{item.placeholder || '点击选择'}}</view>
<view wx:else class="placeholder-class">{{
item.placeholder || "请选择"
}}</view>
</view>
</view>
</gl-cell>
</gl-cell>
<slot wx:if="{{
item.type == 'otherSlot'}}" name="{{item.name
}}" />
<slot wx:if="{{
item.type == 'otherSlot' }}" name="{{ item.name
}}" />
</view>
</view>
components/GLCustForm/GLCustForm.
sa
ss
→
components/GLCustForm/GLCustForm.
wx
ss
View file @
6ae0b29
/* components/GLCustForm/GLCustForm.wxss */
/* components/GLCustForm/GLCustForm.wxss */
.gl-cust-form
{
.input-box {
.input-box
{
display: flex;
display
:
flex
;
align-items: center;
align-items
:
center
;
justify-content: space-between;
justify-content
:
space-between
;
align-items: center;
align-items
:
center
;
--cell-line-height: calc(28vmin / 7.5) !important;
--cell-line-height
:
40rpx
!
important
;
min-width: 0; /* 防止 flex 子元素溢出 */
}
}
.radio-box
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.radio-item
{
display
:
inline-block
;
width
:
270rpx
;
}
.textarea
{
.textarea {
text-align
:
right
;
text-align: right;
font-size
:
var
(
--
fontSize28
)
!
important
;
font-size: var(--fontSize28) !important;
flex-grow
:
1
;
flex: 1;
}
min-width: 0; /* 允许 flex 子元素收缩 */
overflow: hidden; /* 防止内容溢出 */
}
.meeting-box
{
.input-suffix {
.van-cell
{
/* height: var(--fontSize88);
line-height
:
auto
!
important
;
line-height: var(--fontSize88); */
border
:
2rpx
solid
#ececec
;
/* height: var(--fontSize132);
border-radius
:
16rpx
;
line-height: var(--fontSize132); */
margin-top
:
16rpx
;
margin-left: var(--fontSize12);
padding
:
16rpx
24rpx
!
important
;
flex-shrink: 0; /* 防止被压缩 */
}
white-space: nowrap; /* 防止换行 */
.van-field__control--textarea
{
}
min-height
:
var
(
--
field-text-area-min-height
,
144rpx
)
!
important
;
}
}
.input-suffix
{
/* height: var(--fontSize88);
line-height: var(--fontSize88); */
/* height: var(--fontSize132);
line-height: var(--fontSize132); */
margin-left
:
var
(
--
fontSize4
)
;
}
.placeholder-class
{
.placeholder-class {
color
:
#C3C3C
3
;
color: #c3c3c
3;
}
}
.picker
{
.picker {
display
:
flex
;
display: flex;
flex-direction
:
row-reverse
;
flex-direction: row-reverse;
height
:
var
(
--
fontSize40
)
!
important
;
height: var(--fontSize80)
;
line-height
:
var
(
--
fontSize40
)
!
important
;
line-height: var(--fontSize80)
;
text-align
:
right
;
text-align: right;
}
}
.arrow
{
.placeholder {
// width: var(--fontSize28);
font-weight: 400;
// height: var(--fontSize26);
font-size: var(--fontSize28);
// margin-top: var(--fontSize26);
color: #b6b6b8;
// flex-shrink: 0;
}
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize6);
transform: 0;
flex-shrink: 0;
}
.text-hide
{
.gl-form .arrow {
white-space
:
nowrap
;
width: var(--fontSize28);
overflow
:
hidden
;
height: var(--fontSize26);
text-overflow
:
ellipsis
;
margin-top: var(--fontSize26);
}
flex-shrink: 0;
}
.brand
{
.text-hide {
text-align
:
right
;
white-space: nowrap;
padding
:
var
(
--
fontSize40
)
0
;
overflow: hidden;
}
text-overflow: ellipsis;
}
.textarea
.van-field__control
{
.brand {
//padding: 16rpx 24rpx !important;
text-align: right;
height
:
38px
;
padding: var(--fontSize40) 0;
line-height
:
38px
;
}
padding-left
:
24rpx
;
}
.placeholder
{
.gl-form .van-field__control--disabled {
font-weight
:
400
;
color: #666666;
font-size
:
var
(
--
fontSize28
)
;
-webkit-text-fill-color: #666666;
color
:
#B6B6B8
;
}
}
}
//
.input-box .textarea input {
.input-box .textarea input {
// height: var(--fontSize40
);
height: var(--fontSize72
);
//
}
}
// .gl-cust
-form .van-cell--borderless {
.gl
-form .van-cell--borderless {
//
padding: var(--fontSize10) 0 !important;
padding: var(--fontSize10) 0 !important;
//
}
}
// .between .van-cell--borderless {
.between .van-cell--borderless {
// padding: var(--fontSize30) 0 !important;
padding: var(--fontSize30) 0 !important;
// }
}
.gl-form .scan-box {
width: var(--fontSize60);
height: var(--fontSize40);
border-radius: var(--fontSize32);
opacity: 1;
background: #f2f2f2;
align-items: center;
justify-content: center;
display: flex;
margin-left: var(--fontSize16);
flex-shrink: 0; /* 防止被压缩 */
}
.gl-form .scan-box .scan-icon {
width: var(--fontSize28);
height: var(--fontSize28);
}
/* @media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
/* @media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
} */
\ No newline at end of file
\ No newline at end of file
} */
components/GLCustForm/GLForm.wxs
View file @
6ae0b29
var isShowFn = function (formData, targetItem) {
var isShowFn = function (formData, targetItem) {
var flag = false
var flag = false
;
if (targetItem.isShowObj && formData) {
if (targetItem.isShowObj && formData) {
for (var i = 0; i <= targetItem.isShowObj.list.length; i++) {
for (var i = 0; i <= targetItem.isShowObj.list.length; i++) {
var item = targetItem.isShowObj.list[i]
var item = targetItem.isShowObj.list[i]
;
if (item == formData[targetItem.isShowObj.attr]) {
if (item == formData[targetItem.isShowObj.attr]) {
flag = true
flag = true
;
break
break
;
}
}
}
}
} else {
} else {
flag = true
flag = true
;
}
}
return flag
return flag;
}
};
// 根据 formData 的值和 optionList 计算 picker 的选中索引
var getPickerIndex = function (formData, item) {
if (!formData || !item) {
return 0;
}
var optionList = item.optionList;
var optionId = item.optionId;
var fieldName = item.name;
if (!optionList || optionList.length === 0 || !optionId || !fieldName) {
return 0;
}
var currentValue = formData[fieldName];
if (
currentValue === null ||
currentValue === undefined ||
currentValue === ""
) {
return 0;
}
// WXS 不支持 String(),使用 "" + value 的方式转换为字符串
var currentValueStr = "" + currentValue;
for (var i = 0; i < optionList.length; i++) {
var option = optionList[i];
if (!option) continue;
// 在 WXS 中,需要使用字符串键名访问对象属性
var optionValue = null;
if (optionId === "value") {
optionValue = option.value;
} else if (optionId === "name") {
optionValue = option.name;
} else {
optionValue = option[optionId];
}
if (optionValue === null || optionValue === undefined) continue;
// WXS 不支持 String(),使用 "" + value 的方式转换为字符串
var optionValueStr = "" + optionValue;
// 比较字符串值(已确保数据类型一致,直接字符串比较即可)
if (optionValueStr === currentValueStr) {
return i;
}
}
return 0;
};
module.exports = {
module.exports = {
isShowFn: isShowFn
}
\ No newline at end of file
\ No newline at end of file
isShowFn: isShowFn,
getPickerIndex: getPickerIndex,
};
packageIndex/pages/editOrder/components/FirstStep/FirstStep.js
0 → 100644
View file @
6ae0b29
// packageIndex/pages/editOrder/components/FirstStep/FirstStep.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
}
})
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/components/FirstStep/FirstStep.json
0 → 100644
View file @
6ae0b29
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/components/FirstStep/FirstStep.scss
0 → 100644
View file @
6ae0b29
/* packageIndex/pages/editOrder/components/FirstStep/FirstStep.wxss */
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/components/FirstStep/FirstStep.wxml
0 → 100644
View file @
6ae0b29
<!--packageIndex/pages/editOrder/components/FirstStep/FirstStep.wxml-->
<text>packageIndex/pages/editOrder/components/FirstStep/FirstStep.wxml</text>
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/editOrder.json
deleted
100644 → 0
View file @
28cf340
{
"usingComponents"
:
{
"van-steps"
:
"@vant/weapp/steps/index"
,
"gl-cust-form"
:
"/components/GLCustForm/index"
},
"navigationBarTitleText"
:
"发布车辆"
,
"navigationBarBackgroundColor"
:
"#ffffff"
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/editOrder.scss
deleted
100644 → 0
View file @
28cf340
/* packageIndex/pages/editOrder/editOrder.wxss */
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/editOrder.wxml
deleted
100644 → 0
View file @
28cf340
<!--packageIndex/pages/editOrder/editOrder.wxml-->
<view class="container">
<!-- 顶部步骤条 -->
<view class="step-wrap">
<van-steps
steps="{{ steps }}"
active="{{ active }}"
active-color="#ff6600"
/>
</view>
<!-- 表单内容 -->
<view class="form-wrap">
<gl-cust-form
config="{{ formConfig }}"
formData="{{ formData }}"
bind:change="onFormChange"
/>
<!-- 底部灰色占位区域(视需求) -->
<view class="grey-box"></view>
</view>
<!-- 底部固定栏占位 -->
<view class="footer-placeholder"></view>
<!-- 底部操作栏 -->
<view class="footer-bar">
<view class="dots-indicator">
<view class="dot active"></view>
<view class="dot"></view>
<view class="dot"></view>
<view class="dot"></view>
</view>
<view class="action-row">
<text class="draft-btn" bindtap="saveDraft">保存草稿</text>
<view class="next-btn" bindtap="nextStep">下一步</view>
</view>
</view>
</view>
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/editOrder.wxss
deleted
100644 → 0
View file @
28cf340
page {
background-color: #f7f8fa;
}
.container {
min-height: 100vh;
}
.step-wrap {
background-color: #ffffff;
padding: 30rpx 0;
margin-bottom: 20rpx;
}
.form-wrap {
background-color: #ffffff;
}
.grey-box {
background-color: #f5f5f5;
height: 300rpx;
margin: 0 30rpx 30rpx;
border-radius: 8rpx;
}
.footer-placeholder {
height: 160rpx;
}
.footer-bar {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #ffffff;
box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
z-index: 100;
padding-bottom: env(safe-area-inset-bottom);
}
.dots-indicator {
display: flex;
justify-content: center;
align-items: center;
padding-top: 10rpx;
}
.dot {
width: 24rpx;
height: 6rpx;
background-color: #e5e5e5;
border-radius: 3rpx;
margin: 0 6rpx;
}
.dot.active {
background-color: #ff6600;
}
.action-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20rpx 30rpx;
}
.draft-btn {
font-size: 28rpx;
color: #666666;
padding: 20rpx;
}
.next-btn {
flex: 1;
background-color: #ff6600;
color: #ffffff;
font-size: 32rpx;
text-align: center;
height: 88rpx;
line-height: 88rpx;
border-radius: 44rpx;
margin-left: 40rpx;
}
packageIndex/pages/editOrder/
editOrder
.js
→
packageIndex/pages/editOrder/
index/index
.js
View file @
6ae0b29
// packageIndex/pages/editOrder/
editOrder
.js
// packageIndex/pages/editOrder/
index/index
.js
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
title
:
"新增申请"
,
step
:
"first"
,
// first | second | third | fourth
currentStep
:
1
,
// 当前步骤:1-基本信息 | 2-车辆详情 | 3-价格设置 | 4-照片上传
stepList
:
[
{
step
:
1
,
name
:
"基本信息"
},
{
step
:
2
,
name
:
"车辆详情"
},
{
step
:
3
,
name
:
"价格设置"
},
{
step
:
4
,
name
:
"照片上传"
},
],
},
},
/**
/**
...
@@ -15,6 +23,13 @@ Page({
...
@@ -15,6 +23,13 @@ Page({
},
},
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
;
this
.
setData
({
navBarHeight
,
});
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
...
...
packageIndex/pages/editOrder/index/index.json
0 → 100644
View file @
6ae0b29
{
"navigationBarTitleText"
:
"新增申请"
,
"usingComponents"
:
{
"first-step"
:
"../components/FirstStep/FirstStep"
,
"van-sticky"
:
"@vant/weapp/sticky/index"
}
}
\ No newline at end of file
\ No newline at end of file
packageIndex/pages/editOrder/index/index.sass
0 → 100644
View file @
6ae0b29
/* packageIndex/pages/editOrder/index/index.wxss */
.addEvaluationForm-layout
{
min-height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.bg
{
width
:
100%
;
height
:
var
(
--
fontSize800
)
;
background
:
url("https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/evaluationForm-bg.png")
no-repeat
;
background-size
:
100%
100%
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
-1
;
}
.navigation-bar
{
background-color
:
rgb
(
246
,
247
,
247
)
;
box-shadow
:
none
;
}
}
page
{
background-color
:
rgb
(
246
,
247
,
247
)
;
}
.main
{
box-sizing
:
border-box
;
// padding: 0 var(--fontSize20) var(--fontSize376);
padding
:
0rpx
20rpx
200rpx
;
padding-bottom
:
250rpx
;
&
.showTips
{
padding-bottom
:
360rpx
;
}
}
.isFullSucreen
{
// padding-bottom: 702rpx !important;
// padding-bottom: 166px !important;
}
.isFullSucreen.fullSucreen-tips
{
padding-bottom
:
136px
!
important
;
}
.isFullSucreen-btn
{
padding-bottom
:
34px
!
important
;
}
.input
{
text-align
:
right
;
font-size
:
var
(
--
fontSize28
)
;
height
:
100%
;
}
.placeholder-class
{
color
:
#bec1c7
;
}
.between
{
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-end
;
}
.between
.start
{
max-width
:
70%
;
}
.between
.end
text
{
margin
:
0
var
(
--
fontSize6
)
;
}
.btns
{
width
:
100%
;
flex-shrink
:
0
;
background
:
#ffffff
;
box-sizing
:
border-box
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
var
(
--
fontSize32
)
;
font-weight
:
500
;
flex-direction
:
column
;
margin-top
:
var
(
--
fontSize32
)
;
padding
:
var
(
--
fontSize20
)
0
;
}
.btns-con
{
box-sizing
:
border-box
;
display
:
flex
;
padding
:
var
(
--
fontSize20
)
0
;
width
:
calc
(
100%
-
var
(
--
fontSize80
))
;
}
.tipsIcon
,
.closeIcon
{
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
}
.btns
.btns-con
view
{
border
:
var
(
--
fontSize2
)
solid
#0075f9
;
border-radius
:
var
(
--
fontSize12
)
;
height
:
var
(
--
fontSize80
)
;
box-sizing
:
border-box
;
}
.btns
.save
,
.confirm
{
border
:
var
(
--
fontSize2
)
solid
#0075f9
;
border-radius
:
var
(
--
fontSize12
)
;
height
:
var
(
--
fontSize80
)
;
box-sizing
:
border-box
;
}
.btns
.save
{
/* width: var(--fontSize186); */
width
:
50%
;
margin-right
:
var
(
--
fontSize20
)
;
color
:
#347bff
;
margin-right
:
var
(
--
fontSize20
)
;
}
.btns
.confirm
{
/* width: var(--fontSize480); */
width
:
50%
;
color
:
#fff
;
background-color
:
#347bff
;
}
.btns
.save.disabled
{
border
:
1px
solid
#dcdee0
;
color
:
#c0c0cc
;
}
.waitOrderCon
{
box-sizing
:
border-box
;
position
:
fixed
;
bottom
:
165rpx
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
font-size
:
var
(
--
fontSize24
)
;
font-weight
:
600
;
color
:
#347bff
;
z-index
:
10
;
/* padding: 0 var(--fontSize20); */
height
:
var
(
--
fontSize74
)
;
background
:
#eff5fe
;
z-index
:
10
;
&
.showTips
{
bottom
:
305rpx
;
}
}
.waitOrderCon
.tipsIcon
{
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
margin-right
:
var
(
--
fontSize20
)
;
z-index
:
1
;
}
.waitOrderCon
.btn
{
color
:
#f24724
;
padding
:
var
(
--
fontSize6
)
var
(
--
fontSize20
)
;
margin-left
:
auto
;
border
:
1px
solid
#f24724
;
border-radius
:
var
(
--
fontSize28
)
;
}
.tipsadd
{
position
:
relative
;
box-sizing
:
border-box
;
display
:
flex
;
justify-content
:
space-between
;
/* align-items: center; */
padding
:
var
(
--
fontSize20
)
;
background
:
#eff5fe
;
height
:
var
(
--
fontSize140
)
;
width
:
100%
;
color
:
#333333
;
font-size
:
var
(
--
fontSize24
)
;
}
.tipsadd
.contentText
{
margin-left
:
var
(
--
fontSize20
)
;
margin-right
:
auto
;
display
:
flex
;
font-weight
:
500
;
flex-direction
:
column
;
.tradeNo
{
max-width
:
400rpx
;
margin-right
:
10rpx
;
}
.tradeNoCon
{
display
:
flex
;
justify-content
:
space-between
;
}
.tipsbox
{
margin-top
:
20rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
}
.tipsbtn
{
position
:
absolute
;
right
:
120rpx
;
bottom
:
20rpx
;
color
:
#347bff
;
padding
:
var
(
--
fontSize6
)
var
(
--
fontSize20
)
;
margin-left
:
auto
;
border
:
1px
solid
#347bff
;
border-radius
:
var
(
--
fontSize28
)
;
margin-top
:
-26rpx
;
margin-right
:
-90rpx
;
}
}
.btns-con
{
box-sizing
:
border-box
;
display
:
flex
;
padding
:
var
(
--
fontSize10
)
0
;
width
:
calc
(
100%
-
var
(
--
fontSize80
))
;
}
.btn-box
.contentText
{
margin
:
0
var
(
--
fontSize20
)
;
}
/* 固定在顶部的区域 */
.fixed-header
{
background-color
:
#ffffff
;
height
:
auto
;
flex-shrink
:
0
;
position
:
relative
;
z-index
:
1
;
margin
:
0
;
padding
:
20rpx
24rpx
18rpx
;
.stepper-container
{
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
center
;
.step-item
{
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
min-width
:
90rpx
;
}
.step-number-circle
{
width
:
44rpx
;
height
:
44rpx
;
border-radius
:
50%
;
background-color
:
#e3e3e3
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
&
.active
{
background-color
:
#2f63f8
;
}
}
.step-number
{
font-size
:
26rpx
;
color
:
#a6a6a6
;
font-weight
:
500
;
}
.step-number-circle.active
.step-number
{
color
:
#ffffff
;
}
.step-name
{
margin-top
:
14rpx
;
font-size
:
28rpx
;
line-height
:
1
;
color
:
#999999
;
white-space
:
nowrap
;
&
.active
{
color
:
#2f63f8
;
font-weight
:
500
;
}
}
.step-line
{
width
:
92rpx
;
height
:
0
;
border-top
:
2rpx
solid
#d3d3d3
;
margin
:
22rpx
14rpx
0
;
&
.active
{
border-top
:
2rpx
solid
#2f63f8
;
}
}
}
.scan-box-container
{
.scan-box
{
height
:
var
(
--
fontSize64
)
;
border-radius
:
var
(
--
fontSize64
)
;
border
:
var
(
--
fontSize2
)
solid
#999ea8
33
;
background
:
#ffffff
;
justify-content
:
center
;
}
.scan-icon
{
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
}
.scan-text
{
font-size
:
var
(
--
fontSize28
)
;
color
:
#333333
;
margin-left
:
var
(
--
fontSize5
)
;
}
}
}
/* 可滚动的内容区域 */
.scroll-content
{
padding
:
var
(
--
fontSize16
)
var
(
--
fontSize20
)
;
box-sizing
:
border-box
;
}
.flex
{
display
:
flex
;
}
.flex-1
{
flex
:
1
;
}
.justify-between
{
-webkit-box-pack
:
justify
;
-ms-flex-pack
:
justify
;
-webkit-justify-content
:
space-between
;
justify-content
:
space-between
;
}
.align-center
{
align-items
:
center
;
}
.step-content
{
padding
:
var
(
--
fontSize32
)
;
.temp-placeholder
{
padding
:
var
(
--
fontSize80
)
var
(
--
fontSize32
)
;
text-align
:
center
;
color
:
#999
;
font-size
:
var
(
--
fontSize28
)
;
background
:
#f5f5f5
;
border-radius
:
var
(
--
fontSize16
)
;
}
}
packageIndex/pages/editOrder/index/index.wxml
0 → 100644
View file @
6ae0b29
<glsx-privacy
appletName="优加发拍"
bind:agreeClick="agreeClick"
bind:disagreeClick="disagreeClick"
>
</glsx-privacy>
<view class="addEvaluationForm-layout">
<!-- 步骤条,固定在顶部的区域 -->
<van-sticky offset-top="{{navBarHeight}}">
<view class="fixed-header">
<view class="stepper-container flex flex-1">
<block wx:for="{{stepList}}" wx:key="step">
<view class="step-item">
<view class="step-number-circle {{currentStep >= item.step ? 'active' : ''}}">
<view class="step-number">{{item.step}}</view>
</view>
<view class="step-name {{currentStep >= item.step ? 'active' : ''}}">{{item.name}}</view>
</view>
<view
wx:if="{{index < stepList.length - 1}}"
class="step-line {{currentStep > item.step ? 'active' : ''}}"
>
</view>
</block>
</view>
</view>
</van-sticky>
</view>
pages/tab/index/index.js
View file @
6ae0b29
...
@@ -194,7 +194,7 @@ Page({
...
@@ -194,7 +194,7 @@ Page({
},
},
jump
()
{
jump
()
{
wx
.
p
.
router
.
go
(
"/packageIndex/pages/editOrder/
editOrder
"
);
wx
.
p
.
router
.
go
(
"/packageIndex/pages/editOrder/
index/index
"
);
},
},
// 跳转积分中心
// 跳转积分中心
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment