Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
regional-assistant
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 e71f67aa
authored
Jul 31, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: require customer archive for create order
1 parent
4e329353
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
114 deletions
tabWorkOrder/pages/createOrder/createOrder.wxml
tabWorkOrder/pages/createOrder/tests/customerProfileOnlyTemplate.test.mjs
tabWorkOrder/pages/createOrder/createOrder.wxml
View file @
e71f67a
...
...
@@ -114,145 +114,45 @@ value="{{ orderObj.remark }}"
border
valueAlign="right"
label="车主姓名"
requiredAfter
titleBtn="客户档案"
bindtitleClick="showCustomPop"
iconSrc="{{ recordIcon }}"
labelWidth="var(--fontSize290)"
required
>
<input
placeholder="点击输入"
class="input"
placeholder-class="placeholder-class"
maxlength="16"
value="{{ orderObj.customer.customerName }}"
bindinput="input"
data-name="customer.customerName"
disabled="{{ orderObj.orderSource == 5 }}"
always-embed
></input>
</gl-cell>
value="{{ orderObj.customer.customerName || '请通过客户档案选择' }}"
/>
</view>
<gl-cell
border
label="客户来源"
value="{{ filter.getSalesTypeName(Sourcecolumns, orderObj.customer.salesType) }}"
bind:click="toSelectCustomerSource"
haveArrow="{{ true }}"
placeholder="点击选择"
requiredAfter
required
value="{{ filter.getSalesTypeName(Sourcecolumns, orderObj.customer.salesType) || '请通过客户档案选择' }}"
valueAlign="right"
labelWidth="var(--fontSize140)"
></gl-cell>
<gl-cell border label="性别" valueAlign="right" labelWidth="var(--fontSize140)">
<view class="gender-box">
<view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" />
<view class="male text-center {{ orderObj.customer.customerSex == 1?'active':'' }}" bindtap="changeGender" data-gender="1">男</view>
<view class="woman text-center {{ orderObj.customer.customerSex == 2?'active':'' }}" bindtap="changeGender" data-gender="2">女</view>
</view>
</gl-cell>
<view class="customerPhone" wx:if="{{ !phoneShow }}">
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="var(--fontSize140)" required>
<input
placeholder="点击输入"
class="input"
type="number"
maxlength="11"
placeholder-class="placeholder-class"
value="{{ orderObj.customer.customerPhone }}"
bindinput="input"
bindblur="phoneBlur"
data-name="customer.customerPhone"
disabled="{{ orderObj.orderSource == 5||orderObj.orderSource == 6 }}"
always-embed
></input>
</gl-cell>
</view>
/>
<gl-cell border label="性别" value="{{ orderObj.customer.customerSex == 1 ? '男' : (orderObj.customer.customerSex == 2 ? '女' : '请通过客户档案选择') }}" valueAlign="right" labelWidth="var(--fontSize140)" />
<gl-cell border valueAlign="right" label="手机号" value="{{ orderObj.customer.customerPhone || '请通过客户档案选择' }}" labelWidth="var(--fontSize140)" />
<gl-cell
required="{{ filter.isIncludesItem(requiredList ,'carBrand') }}"
border
valueAlign="right"
label="选择车型"
labelWidth="var(--fontSize140)"
haveArrow
requiredAfter
placeholder="点击选择"
bindclick="showPopup"
data-show-name="carBrandBox"
>
<block wx:if="{{ orderObj.customer.carSeriesName }}">
<view class="between">
{{orderObj.customer.carBrand}}
- {{orderObj.customer.carChildsBrandName}}
- {{orderObj.customer.carSeriesName}}
</view>
</block>
</gl-cell>
value="{{ orderObj.customer.carSeriesName ? orderObj.customer.carBrand + ' - ' + orderObj.customer.carChildsBrandName + ' - ' + orderObj.customer.carSeriesName : '请通过客户档案选择' }}"
/>
<gl-cell
wx:if="{{ orderObj.selectPayType !=0 }}"
required="{{ filter.isIncludesItem(requiredList ,'standNo') }}"
border
iconSrc="{{ scanIcon }}"
bindtitleClick="navOcr"
valueAlign="right"
label="车架号( VIN )"
requiredAfter
data-type="standNo"
labelWidth="var(--fontSize280)"
>
<input
placeholder="点击输入"
class="input"
placeholder-class="placeholder-class"
value="{{ orderObj.customer.standNo }}"
bindinput="input"
data-name="customer.standNo"
maxlength="17"
always-embed
></input>
</gl-cell>
value="{{ orderObj.customer.standNo || '请通过客户档案选择' }}"
/>
<gl-cell
wx:if="{{ orderObj.selectPayType !=0 }}"
required="{{ filter.isIncludesItem(requiredList ,'plateNumber') }}"
border
valueAlign="right"
iconSrc="{{ scanIcon }}"
bindtitleClick="navOcr"
data-type="plateNumber"
label="车牌号"
requiredAfter
labelWidth="var(--fontSize240)"
>
<input
placeholder="点击输入"
class="input"
placeholder-class="placeholder-class"
value="{{ orderObj.customer.plateNumber }}"
bindinput="input"
data-name="customer.plateNumber"
maxlength="8"
always-embed
></input>
</gl-cell>
<gl-cell wx:if="{{ orderObj.selectPayType !=0 }}" border label="是否体验" valueAlign="right" labelWidth="var(--fontSize140)">
<view class="gender-box">
<view class="block text-center {{ orderObj.customer.experienceFlag=='Y'?'':'right' }}" />
<view
class="male text-center {{ orderObj.customer.experienceFlag == 'Y'?'active':'' }}"
bindtap="changeExperience"
data-experience="Y"
>是</view>
<view
class="woman text-center {{ orderObj.customer.experienceFlag == 'N'?'active':'' }}"
bindtap="changeExperience"
data-experience="N"
>否</view>
</view>
</gl-cell>
value="{{ orderObj.customer.plateNumber || '请通过客户档案选择' }}"
/>
<gl-cell wx:if="{{ orderObj.selectPayType !=0 }}" border label="是否体验" value="{{ orderObj.customer.experienceFlag == 'Y' ? '是' : (orderObj.customer.experienceFlag == 'N' ? '否' : '请通过客户档案选择') }}" valueAlign="right" labelWidth="var(--fontSize140)" />
</view>
<view class="box" wx:if="{{ orderObj.userId && orderObj.baseSceneCode }}">
<block wx:if="{{ orderObj.merchantId }}">
...
...
@@ -992,4 +892,4 @@ value="{{ orderObj.remark }}"
<view class="approval-sheet__btn approval-sheet__btn--confirm" bindtap="onConfirmMinPriceApprovalSubmit">确认提交</view>
</view>
</view>
</van-popup>
\ No newline at end of file
</van-popup>
tabWorkOrder/pages/createOrder/tests/customerProfileOnlyTemplate.test.mjs
0 → 100644
View file @
e71f67a
import { readFileSync } from 'node:fs'
import { describe, it } from 'node:test'
import assert from 'node:assert/strict'
const template = readFileSync(
new URL('../createOrder.wxml', import.meta.url),
'utf8'
)
const start = template.indexOf('<view class="customerName">')
const end = template.indexOf(
'\n\t\t<view class="box" wx:if="{{ orderObj.userId && orderObj.baseSceneCode }}">',
start
)
const customerSection = template.slice(start, end)
describe('createOrder customer information template', () => {
it('keeps customer archive as the only manual customer-data entry', () => {
assert.ok(start >= 0)
assert.ok(end > start)
assert.match(customerSection, /bindtitleClick="showCustomPop"/)
assert.match(customerSection, /请通过客户档案选择/)
assert.doesNotMatch(customerSection, /<input/)
assert.doesNotMatch(customerSection, /bind:click="toSelectCustomerSource"/)
assert.doesNotMatch(customerSection, /bindtap="changeGender"/)
assert.doesNotMatch(customerSection, /data-show-name="carBrandBox"/)
assert.doesNotMatch(customerSection, /bindtitleClick="navOcr"/)
assert.doesNotMatch(customerSection, /bindtap="changeExperience"/)
})
})
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