Commit f14d189b by 张立顺

feat cdn图片替换

1 parent 5a189fdb
Showing 164 changed files with 633 additions and 483 deletions
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
data-that="{{c}}"> data-that="{{c}}">
{{c.name}} {{c.name}}
<view class="icon"> <view class="icon">
<image src="../images/choose.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" />
</view> </view>
</view> </view>
</block> </block>
...@@ -77,4 +77,3 @@ ...@@ -77,4 +77,3 @@
</view> </view>
</view> </view>
</popup> </popup>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</span> </span>
<span class="phone">{{item.customer.customerPhone}}</span> <span class="phone">{{item.customer.customerPhone}}</span>
<view class="icon"> <view class="icon">
<image src="../images/choose.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" />
</view> </view>
</view> </view>
</block> </block>
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
<view class='placeholder'>{{placeholder}}</view> <view class='placeholder'>{{placeholder}}</view>
</block> </block>
</view> </view>
<image wx:if='{{haveArrow}}' class='arrow' src="../images/arrow-x.png" /> <image wx:if='{{haveArrow}}' class='arrow' src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
</view> </view>
</view> </view>
</view> </view>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
range="{{ specific.specificationSelectValueList }}" range="{{ specific.specificationSelectValueList }}"
> >
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{ specific.value }}">{{specific.value}}</view> <view class="text-hide" wx:if="{{ specific.value }}">{{specific.value}}</view>
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
......
...@@ -11,7 +11,9 @@ var replaceItemText = function (item) { ...@@ -11,7 +11,9 @@ var replaceItemText = function (item) {
} }
var getImageSrc = function (active) { var getImageSrc = function (active) {
var baseImagePath = active ? '../images/radio.png' : '../images/radio_icon.png'; var baseImagePath = active
? 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio.png'
: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio_icon.png';
var timestamp = Date.now(); // 使用 Date.now() 获取当前时间戳 var timestamp = Date.now(); // 使用 Date.now() 获取当前时间戳
return baseImagePath + '?t=' + timestamp; // 使用字符串拼接 return baseImagePath + '?t=' + timestamp; // 使用字符串拼接
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</view> </view>
<block wx:if="{{merchantList.length > 3}}"> <block wx:if="{{merchantList.length > 3}}">
<view class="more" bindtap="showMoreMerchant"> <view class="more" bindtap="showMoreMerchant">
<image src="../images/open.png" class="icon {{moreMerchant ? 'hide':''}}"></image> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/open.png" class="icon {{moreMerchant ? 'hide':''}}"></image>
</view> </view>
</block> </block>
<view class="sub-title">{{subTitle}} <view class="sub-title">{{subTitle}}
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="item-wrap {{i.active?'active':''}}" wx:for="{{goodsData.multipleSpecificationsGoods.skuGoodsList}}" wx:key="ind" wx:for-index="index" wx:for-item="i"> <view class="item-wrap {{i.active?'active':''}}" wx:for="{{goodsData.multipleSpecificationsGoods.skuGoodsList}}" wx:key="ind" wx:for-index="index" wx:for-item="i">
<view class="icon" catchtap="choose" data-index="{{index}}" data-item="{{i}}"> <view class="icon" catchtap="choose" data-index="{{index}}" data-item="{{i}}">
<block wx:if="{{i.active}}"> <block wx:if="{{i.active}}">
<image src="./images/radio.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/SkuGoods/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" /> <view class="arc" />
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
data-index="{{index}}" data-index="{{index}}"
data-item="{{item}}"> data-item="{{item}}">
<block wx:if="{{item.active}}"> <block wx:if="{{item.active}}">
<image src="../images/radio.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" /> <view class="arc" />
......
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
<view class="set_item" bindtap="changeScene"> <view class="set_item" bindtap="changeScene">
<view class="title">场景切换</view> <view class="title">场景切换</view>
<view class="set_tips">{{selectedSceneName}}</view> <view class="set_tips">{{selectedSceneName}}</view>
<image class="icon_image" src="./images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/TabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item" bindtap="goVersionPage"> <view class="set_item" bindtap="goVersionPage">
<view class="title">更新日志</view> <view class="title">更新日志</view>
<view class="set_tips">最新{{versionData.version}}版</view> <view class="set_tips">最新{{versionData.version}}版</view>
<image class="icon_image" src="./images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/TabMine/images/right.png" mode="" />
</view> </view>
</view> </view>
</block> </block>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<view class="set_item" bindtap="goCollegeScene"> <view class="set_item" bindtap="goCollegeScene">
<view class="title">工资绩效(员工绩效)</view> <view class="title">工资绩效(员工绩效)</view>
<view class="set_tips">去查看</view> <view class="set_tips">去查看</view>
<image class="icon_image" src="./images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/TabMine/images/right.png" mode="" />
</view> </view>
</view> </view>
</view> </view>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
> >
<view class="checked_img"> <view class="checked_img">
<block wx:if="{{ multiple }}"> <block wx:if="{{ multiple }}">
<image src="{{ item.active ? '../images/radio.png' : '../images/radio_icon.png' }}" /> <image src="{{ item.active ? 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio.png' : 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio_icon.png' }}" />
</block> </block>
<block wx:else> <block wx:else>
<image wx:if="{{ item.active }}" src="{{ IMG_URL }}checked.png"></image> <image wx:if="{{ item.active }}" src="{{ IMG_URL }}checked.png"></image>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="prompt_content"> <view class="prompt_content">
<view class="select_item" wx:if="{{ !djQrOnlyMode }}"> <view class="select_item" wx:if="{{ !djQrOnlyMode }}">
<block wx:if="{{infoData.payFlag == 1}}"> <block wx:if="{{infoData.payFlag == 1}}">
<image class="radio-icon" src="/components/images/radio.png" /> <image class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" bindtap="chooseParent" data-type="1" /> <view class="arc" bindtap="chooseParent" data-type="1" />
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
<view class="select_item" style="border-bottom: 0rpx;"> <view class="select_item" style="border-bottom: 0rpx;">
<block wx:if="{{infoData.payFlag == 2}}"> <block wx:if="{{infoData.payFlag == 2}}">
<image class="radio-icon" src="/components/images/radio.png" /> <image class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" bindtap="chooseParent" data-type="2" /> <view class="arc" bindtap="chooseParent" data-type="2" />
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="child_select_content" wx:if="{{infoData.payFlag == 2}}"> <view class="child_select_content" wx:if="{{infoData.payFlag == 2}}">
<view wx:for="{{payTypeList}}" class="child_select_item" wx:key="index"> <view wx:for="{{payTypeList}}" class="child_select_item" wx:key="index">
<block wx:if="{{infoData.payType == item.value}}"> <block wx:if="{{infoData.payType == item.value}}">
<image class="radio-icon" src="/components/images/radio.png" /> <image class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/radio.png" />
</block> </block>
<block wx:else> <block wx:else>
<view class="arc" bindtap="chooseChild" data-type="{{item.value}}" /> <view class="arc" bindtap="chooseChild" data-type="{{item.value}}" />
......
...@@ -22,7 +22,7 @@ export const RECRUIT_MENU_ENABLED = false ...@@ -22,7 +22,7 @@ export const RECRUIT_MENU_ENABLED = false
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 1; let index = 2;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = getSystemInfoSync(); const systemInfo = getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
## 背景 ## 背景
为减小主包体积,将原工程根目录 `images/` 及权益分包内大量本地静态图迁移至 CDN,运行时通过 `IMG_URL` 或专用 helper 拼接 URL。 为减小主包体积,将原工程根目录 `images/`、主包组件/页面图片及权益分包内大量本地静态图迁移至 CDN,运行时通过 `IMG_URL` 或专用 helper 拼接 URL。主包只保留微信原生 TabBar 必需的 10 张本地图。
**CDN 基址**([`config.js`](../config.js)): **CDN 基址**([`config.js`](../config.js)):
...@@ -23,6 +23,7 @@ https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat ...@@ -23,6 +23,7 @@ https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat
| 3 | CDN 404 / 双 URL 修复 | `SideSelectPopup`、`GlImage`、`tabIndex` order 快捷入口 | | 3 | CDN 404 / 双 URL 修复 | `SideSelectPopup`、`GlImage`、`tabIndex` order 快捷入口 |
| 4 | WXML 混用引号编译错误修复 | 5 个 wxml | | 4 | WXML 混用引号编译错误修复 | 5 个 wxml |
| 5 | WXS 上传 `index.wxs not found` | [WXS-UPLOAD-FIX.md](./WXS-UPLOAD-FIX.md)(已验证) | | 5 | WXS 上传 `index.wxs not found` | [WXS-UPLOAD-FIX.md](./WXS-UPLOAD-FIX.md)(已验证) |
| 6 | 主包剩余图片迁 CDN、历史残留清理 | `components/`、`pages/`、`tabIndex/`、[`cdn-upload/`](../cdn-upload/) |
--- ---
...@@ -35,6 +36,7 @@ https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat ...@@ -35,6 +36,7 @@ https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat
```javascript ```javascript
export const IMG_URL = `${ImgUrl}/` // 末尾带 / export const IMG_URL = `${ImgUrl}/` // 末尾带 /
export const rootImageUrl = name => `${ImgUrl}/images/${name}` export const rootImageUrl = name => `${ImgUrl}/images/${name}`
export const componentsImageUrl = name => `${IMG_URL}components/images/${name}`
``` ```
**WXML 用法**:页面 js 注入 `data.IMG_URL`,模板中: **WXML 用法**:页面 js 注入 `data.IMG_URL`,模板中:
...@@ -77,6 +79,14 @@ WXML 中亦常见:`{{ IMG_URL }}packageEquity/pages/image/xxx.png`(`IMG_URL` ...@@ -77,6 +79,14 @@ WXML 中亦常见:`{{ IMG_URL }}packageEquity/pages/image/xxx.png`(`IMG_URL`
- `tab-home`、`tab-date`、`tab-order`、`tab-repair`、`tab-mine` 及对应 `-active` 图标 - `tab-home`、`tab-date`、`tab-order`、`tab-repair`、`tab-mine` 及对应 `-active` 图标
### 主包其他图片(2026-08-18)
- 17 张仍有消费者的图片已改为 CDN 地址,覆盖公共组件、登录输入框、个人中心、工单列表和工单详情等场景。
- 56 张确认无代码消费者的历史残留已清理。
- 连同 17 张已迁移图片,主包共删除 73 张本地图;自动化扫描确认当前只剩上述 10 张 TabBar 图片。
- [`project.config.json`](../project.config.json) 已移除 `components/images/close.png` 的强制打包项。
- 上传暂存区 20 张图片逐一请求均返回 HTTP 200、`image/png`,响应内容 SHA-256 与本地文件一致。
### 分包自定义 TabBar(已改 CDN) ### 分包自定义 TabBar(已改 CDN)
以下 Tab 页 `iconPath` 使用 `IMG_URL + 'images/tab-*.png'`: 以下 Tab 页 `iconPath` 使用 `IMG_URL + 'images/tab-*.png'`:
...@@ -97,7 +107,7 @@ WXML 中亦常见:`{{ IMG_URL }}packageEquity/pages/image/xxx.png`(`IMG_URL` ...@@ -97,7 +107,7 @@ WXML 中亦常见:`{{ IMG_URL }}packageEquity/pages/image/xxx.png`(`IMG_URL`
| `arrow-bottom.png`、`server-center-icons.png`、`arrSolid.png` | `{{ IMG_URL }}images/...` | | `arrow-bottom.png`、`server-center-icons.png`、`arrSolid.png` | `{{ IMG_URL }}images/...` |
| order1 / order3 快捷入口 | `<gl-image src="/miniProgram/order1.png">`(相对 CDN 路径,**不要**写完整 `https://`) | | order1 / order3 快捷入口 | `<gl-image src="/miniProgram/order1.png">`(相对 CDN 路径,**不要**写完整 `https://`) |
`arrSolid.png` 运维待上传目录:[`cdn-upload/images/arrSolid.png`](../cdn-upload/images/arrSolid.png) `arrSolid.png` 上传留档:[`cdn-upload/images/arrSolid.png`](../cdn-upload/images/arrSolid.png);2026-08-18 已验证 CDN 可访问且内容一致。
--- ---
...@@ -168,8 +178,11 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}` ...@@ -168,8 +178,11 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}`
| `packageEquity/images/*` | 权益分包根级图 | | `packageEquity/images/*` | 权益分包根级图 |
| `packageEquity/pages/ocrEquityModules/image/*` | OCR 贴图 | | `packageEquity/pages/ocrEquityModules/image/*` | OCR 贴图 |
| `miniProgram/order1.png`、`miniProgram/order3.png` | 首页 gl-image 快捷入口 | | `miniProgram/order1.png`、`miniProgram/order3.png` | 首页 gl-image 快捷入口 |
| `components/images/*`、`components/SkuGoods/images/radio.png`、`components/TabMine/images/right.png` | 主包共享组件图片 |
| `pages/tabMine/images/*`、`pages/tabWorkOrder/images/stockIcon.png` | 主包页面图片 |
| `pages/wxLogin/components/InputIcon/images/*` | 登录输入框图片 |
本地待上传 staging:[`cdn-upload/`](../cdn-upload/) 本地上传留档:[`cdn-upload/`](../cdn-upload/)。2026-08-18 对其中 20 张图片逐一校验:全部 HTTP 200、Content-Type 为 `image/png`,远端响应 SHA-256 与本地文件一致。
--- ---
...@@ -178,6 +191,7 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}` ...@@ -178,6 +191,7 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}`
| 范围 | 命令 | 用例 | | 范围 | 命令 | 用例 |
|------|------|------| |------|------|------|
| imageBase | `npm run test:equity` | IT-IMG-BASE-001/002(`IMG_URL` 末尾 `/`、`rootImageUrl` 路径) | | imageBase | `npm run test:equity` | IT-IMG-BASE-001/002(`IMG_URL` 末尾 `/`、`rootImageUrl` 路径) |
| 主包图片迁移 | `node --test tests/componentsImageUrl.test.mjs tests/mainPackageImageCdnMigration.test.mjs` | 公共组件 CDN URL、主包仅保留 10 张 TabBar 图、无强制打包残留 |
| wxs 纯函数 | `node --test tests/wxsFilters.test.mjs` | IT-WXS-PRICE/PCT/GOODS 共 4 项 | | wxs 纯函数 | `node --test tests/wxsFilters.test.mjs` | IT-WXS-PRICE/PCT/GOODS 共 4 项 |
| 全量 | `npm test` | 含上述 + 各分包测试 | | 全量 | `npm test` | 含上述 + 各分包测试 |
...@@ -188,6 +202,9 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}` ...@@ -188,6 +202,9 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}`
| 2026-06-24 | `npm run test:equity` | **83/83 通过**(含 imageBase) | | 2026-06-24 | `npm run test:equity` | **83/83 通过**(含 imageBase) |
| 2026-06-24 | `node --test tests/wxsFilters.test.mjs` | **4/4 通过** | | 2026-06-24 | `node --test tests/wxsFilters.test.mjs` | **4/4 通过** |
| 2026-06-24 | `npm test` | **672/673 通过**;1 失败为 `packageDynamicForm` 既有 `daily-report-calendar`(日期周界,与本次无关) | | 2026-06-24 | `npm test` | **672/673 通过**;1 失败为 `packageDynamicForm` 既有 `daily-report-calendar`(日期周界,与本次无关) |
| 2026-08-18 | `node --test tests/componentsImageUrl.test.mjs tests/mainPackageImageCdnMigration.test.mjs` | **6/6 通过** |
| 2026-08-18 | `npm run test:components` | **40/40 通过** |
| 2026-08-18 | `npm test` | **全部通过** |
--- ---
...@@ -202,6 +219,8 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}` ...@@ -202,6 +219,8 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}`
| 3 | 同上 | 底部 order1 / order3 快捷入口 | 图标正常,无双 URL | | 3 | 同上 | 底部 order1 / order3 快捷入口 | 图标正常,无双 URL |
| 4 | **SideSelectPopup** | 首页切店 / 店面列表弹窗 | `search.png` 正常 | | 4 | **SideSelectPopup** | 首页切店 / 店面列表弹窗 | `search.png` 正常 |
| 5 | **主 TabBar** | 切换 5 个 tab | 本地 `images/tab-*.png` 正常 | | 5 | **主 TabBar** | 切换 5 个 tab | 本地 `images/tab-*.png` 正常 |
| 6 | **登录页** | 密码显隐、清空输入 | InputIcon 三张 CDN 图正常,无本地图片 404 |
| 7 | **工单详情/施工详情** | 触发企微活码加载失败 | CDN 刷新图正常显示 |
### 搜索框 / 筛选图(抽测) ### 搜索框 / 筛选图(抽测)
...@@ -253,3 +272,4 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}` ...@@ -253,3 +272,4 @@ imagePath: isAbsolute ? url : `${ImgUrl}${url}`
2. `gl-image` 的 `src` 使用 `/miniProgram/...` 等相对 CDN 路径,避免在属性里写完整 `https://` 2. `gl-image` 的 `src` 使用 `/miniProgram/...` 等相对 CDN 路径,避免在属性里写完整 `https://`
3. 组件引用 wxs 使用绝对路径 `/分包/.../xxx.wxs`(见 WXS 文档) 3. 组件引用 wxs 使用绝对路径 `/分包/.../xxx.wxs`(见 WXS 文档)
4. 修改 `priceFilter` 等 wxs 算法时同步 `balanceNote.js` 与 `tests/wxsFilters.test.mjs` 4. 修改 `priceFilter` 等 wxs 算法时同步 `balanceNote.js` 与 `tests/wxsFilters.test.mjs`
5. 主包不新增 TabBar 之外的本地图片;上传源文件保留在 `cdn-upload/` 的同构路径中
...@@ -26,16 +26,16 @@ ...@@ -26,16 +26,16 @@
## 3. 静态资源(close 图标) ## 3. 静态资源(close 图标)
close 图标使用**本地包内路径**(非 CDN): close 图标使用已上传并完成内容校验的 **CDN 路径**:
```js ```js
import { CLOSE_ICON_URL } from '../../utils/imageBase.js' import { CLOSE_ICON_URL } from '../../utils/imageBase.js'
// CLOSE_ICON_URL → /components/images/close.png // CLOSE_ICON_URL → https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/close.png
``` ```
`rootImageUrl('close.png')` 会拼 CDN `images/close.png`,该文件**未上传 CDN**,会导致 404,勿用于 close 图标。 公共组件图片统一通过 `componentsImageUrl(name)` 拼接 `components/images/` CDN 路径,不要改用 `rootImageUrl(name)`,两者目录语义不同。
涉及:`Popup`、`CalendarMonth`、`tipsBottom`。`packOptions.include` 已登记 `components/images/close.png`。 涉及:`Popup`、`CalendarMonth`、`tipsBottom`。本地 `components/images/close.png` 及其 `packOptions.include` 已移除。
## 4. WXML 布尔属性 ## 4. WXML 布尔属性
...@@ -51,7 +51,7 @@ show-close-icon="{{ true }}" ...@@ -51,7 +51,7 @@ show-close-icon="{{ true }}"
- `attached` 读 `this.properties.monthOnly` / `monType`,设置 `_monthOnlyMode`,实例化 `CalendarMonthOnly` - `attached` 读 `this.properties.monthOnly` / `monType`,设置 `_monthOnlyMode`,实例化 `CalendarMonthOnly`
- `monChoose` / `done`:monthOnly 下固定走 `this.properties.dateType`(single)及 `CalendarMonthOnly.done()` - `monChoose` / `done`:monthOnly 下固定走 `this.properties.dateType`(single)及 `CalendarMonthOnly.done()`
- WXML:monthOnly 仅绑 `active` class;`calender-view--monthOnly` 单选四角圆角 - WXML:monthOnly 仅绑 `active` class;`calender-view--monthOnly` 单选四角圆角
- close 图标:`CLOSE_ICON_URL`(本地 `/components/images/close.png`) - close 图标:`CLOSE_ICON_URL`(CDN `components/images/close.png`)
- helper 仅 `getInitialDayType` / `resolveMonthOnly`(`calendarMonth.helpers.js`) - helper 仅 `getInitialDayType` / `resolveMonthOnly`(`calendarMonth.helpers.js`)
## 6. Popup CSS 变体兼容 ## 6. Popup CSS 变体兼容
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
| C-01 | Popup 标题栏 X | 补录流水 → 打开流水弹层 → 点「超分账期」旁 **?** → 说明弹层 | 说明弹层标题栏 X 正常显示、可关闭 | ☐ | | C-01 | Popup 标题栏 X | 补录流水 → 打开流水弹层 → 点「超分账期」旁 **?** → 说明弹层 | 说明弹层标题栏 X 正常显示、可关闭 | ☐ |
| C-02 | CalendarMonth 关闭图标 | 首页绩效月历弹层 | 右上角 X 正常显示 | ☐ | | C-02 | CalendarMonth 关闭图标 | 首页绩效月历弹层 | 右上角 X 正常显示 | ☐ |
| C-03 | tips-bottom 关闭图标 | 各页带关闭按钮的 tips-bottom 条 | 关闭图标正常显示 | ☐ | | C-03 | tips-bottom 关闭图标 | 各页带关闭按钮的 tips-bottom 条 | 关闭图标正常显示 | ☐ |
| C-04 | Network 面板 | C-01 ~ C-03 场景 | **不应**请求 `img02.glsx.com.cn/.../images/close.png` | ☐ | | C-04 | Network 面板 | C-01 ~ C-03 场景 | 请求 `img02.glsx.com.cn/.../components/images/close.png` 且 HTTP 200 | ☐ |
| C-05 | Network 面板 | 同上 | 使用本地 `/components/images/close.png` | ☐ | | C-05 | Network 面板 | 同上 | 不再读取本地 `/components/images/close.png`,无图片 404 | ☐ |
**不测**:主流水弹层标题栏 X(产品设计无此按钮)。 **不测**:主流水弹层标题栏 X(产品设计无此按钮)。
......
# 主包图片 CDN 清单
本次不修改后端业务 API。静态资源统一使用以下 CDN 基址:
`https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat`
| CDN 路径 | 消费方 | 迁移处理 | 验证要求 |
| --- | --- | --- | --- |
| `components/images/{arrow-x,choose,close,kfrefresh,open,question,radio,radio_icon}.png` | 全局组件、工单、权益、二手车、动态表单等跨分包页面 | 本地路径改为 CDN URL | HTTP 200、`image/png`、SHA-256 与暂存文件一致 |
| `components/SkuGoods/images/radio.png` | `components/SkuGoods` | 本地组件图片改为 CDN URL | 同上 |
| `components/TabMine/images/right.png` | 四个场景自定义个人中心 | 本地组件图片改为 CDN URL | 同上 |
| `pages/tabMine/images/{arrow_icon,right}.png` | 主包个人中心 | 本地页面图片改为 CDN URL | 同上 |
| `pages/tabWorkOrder/images/stockIcon.png` | 主包客户工单列表 | 本地页面图片改为 CDN URL | 同上 |
| `pages/wxLogin/components/InputIcon/images/{clear,hidePwd,seePwd}.png` | 微信登录输入框 | JS 数据路径改为 CDN URL | 同上 |
| `images/arrSolid.png` | 工单建档、战败单、驻店时间选择、权益战败单 | 原 `/tabIndex/images/arrSolid.png` 改为 CDN 根图片路径 | 同上 |
`pages/tabDateIndex/images/date.png` 与 `phone.png` 已上传但主包没有消费者,不新增运行时引用。根目录十张 `images/tab-*.png` 继续由原生 TabBar 本地加载。
{
"id": "main-package-image-cdn",
"title": "主包本地图片迁移 CDN 并清理历史残留",
"sourceProject": "dj-car-boutique-work-wechat",
"affectedPaths": [
"components",
"pages",
"tabIndex",
"tabWorkOrder",
"utils",
"cdn-upload",
"project.config.json",
"tests",
"docs/CDN-IMAGE-MIGRATION.md"
],
"interfaces": [
"componentsImageUrl(name) returns CDN URL",
"CLOSE_ICON_URL remains exported",
"IMG_URL remains the CDN root with trailing slash",
"Native app.json TabBar icon paths remain local"
],
"tests": [
{
"id": "components-image-url-cdn-contract",
"file": "tests/componentsImageUrl.test.mjs",
"level": "contract",
"expectedBefore": "pass",
"status": "pass"
},
{
"id": "main-package-image-footprint",
"file": "tests/mainPackageImageCdnMigration.test.mjs",
"level": "integration",
"expectedBefore": "pass",
"status": "pass"
},
{
"id": "upload-exclusions",
"file": "tests/migration-readiness/uploadExclusions.test.mjs",
"level": "contract",
"expectedBefore": "pass",
"status": "pass"
}
],
"baseline": {
"command": "node --test tests/componentsImageUrl.test.mjs",
"result": "2/2 pass before changing the local-path expectations"
},
"apiInventory": "docs/migrations/main-package-image-cdn/api-inventory.md",
"acceptance": "docs/migrations/main-package-image-cdn/test-acceptance.md",
"verification": {
"commands": [
{
"command": "node --test tests/componentsImageUrl.test.mjs tests/mainPackageImageCdnMigration.test.mjs tests/migration-readiness/uploadExclusions.test.mjs",
"status": "pass"
},
{
"command": "npm run test:components",
"status": "pass"
},
{
"command": "npm test",
"status": "pass"
},
{
"command": "git diff --check",
"status": "pass"
}
]
}
}
# 主包图片 CDN 迁移测试验收
## 修改前基线
- 基线提交:`6b0e9a15`。
- `node --test tests/componentsImageUrl.test.mjs`:2 项通过,证明修改前共享关闭图仍使用本地路径。
- 主包目录共有 83 张物理图片,其中 10 张为原生 TabBar 图标。
- CDN 暂存区共 20 张图片;2026-08-18 实测全部 HTTP 200、`image/png`,且响应 SHA-256 与本地暂存文件一致。
## 完成标准
1. `utils/imageBase.js` 的 `componentsImageUrl()` 与 `CLOSE_ICON_URL` 返回 CDN URL。
2. 主包目录只保留十张 `images/tab-*.png`。
3. `project.config.json` 不再强制 include 已删除的 `components/images/close.png`。
4. 活跃消费者全部改为已验证的 CDN 路径;无代码继续引用被删除的主包图片。
5. `cdn-upload/` 保留上传证据,分包图片不在本次删除范围。
6. 聚焦测试、组件测试、全量测试、`git diff --check` 与迁移 post 门禁完成验证。
## 验证结果(2026-08-18)
- CDN 暂存区 20/20 张图片返回 HTTP 200、`image/*`,远端响应 SHA-256 与本地文件一致。
- 新增的 123 个 CDN 图片引用全部含具体图片路径,并能映射到 `cdn-upload/` 的对应文件。
- 主包物理图片由 83 张降为 10 张,仅保留原生 TabBar 图;73 张已删除,`cdn-upload/` 未清理。
- 已恢复 8 个被固定字符替换污染的 WXML,并修正 25 处遗漏文件名的 CDN URL;全仓同类污染特征、重复 CDN 前缀均为 0。
- `node --test tests/componentsImageUrl.test.mjs tests/mainPackageImageCdnMigration.test.mjs tests/migration-readiness/uploadExclusions.test.mjs`:9/9 通过。
- `npm run test:components`:40/40 通过。
- `npm test`:退出码 0,所有测试通过。
- `git diff --check`:通过。
## 手动回归路径
1. 微信登录页:密码显隐与清空按钮。
2. 精品首页及新建工单弹层:问号、选择、箭头图标。
3. 客户工单列表:出库状态图标。
4. 工单详情与施工详情:企微活码失败刷新图。
5. 个人中心:列表右箭头与设置入口箭头。
6. 商品、技师、门店选择弹层:单选态、选中态与右箭头。
# Main Package Image CDN Cleanup Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Verify uploaded image bytes, replace every active main-package local image reference with its CDN URL, and remove every non-TabBar local image from the main package.
**Architecture:** Keep the ten native `app.json` TabBar icons local. Route JavaScript consumers through `utils/imageBase.js`, use the uploaded CDN-relative paths for WXML/WXS consumers, retain `cdn-upload/` as the upload evidence directory, and remove local source images only after all CDN responses match the staged SHA-256 hashes.
**Tech Stack:** WeChat Mini Program WXML/WXS/JavaScript, Node.js test runner, PowerShell, HTTPS CDN.
**Spec:** `docs/CDN-IMAGE-MIGRATION.md`
## Global Constraints
- CDN base is exactly `https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat`.
- Replace an image only when the CDN response is HTTP 200 and its SHA-256 matches `cdn-upload/<relative-path>`.
- Keep the ten `images/tab-*.png` files local because native Mini Program TabBar paths cannot use remote URLs.
- Preserve unrelated working-tree changes.
- Run `npm run check:migration -- --manifest docs/migrations/main-package-image-cdn/manifest.json --phase pre` before production changes and `--phase post` after verification.
---
### Task 1: Lock the migration contract and pass the pre gate
**Files:**
- Create: `docs/migrations/main-package-image-cdn/manifest.json`
- Create: `docs/migrations/main-package-image-cdn/api-inventory.md`
- Create: `docs/migrations/main-package-image-cdn/test-acceptance.md`
- Create: `tests/mainPackageImageCdnMigration.test.mjs`
- Modify: `tests/componentsImageUrl.test.mjs`
**Interfaces:**
- Consumes: current main-package filesystem, `utils/imageBase.js`, `project.config.json`
- Produces: a failing pre-migration contract and migration-readiness evidence
- [ ] **Step 1: Write the CDN helper expectation first**
```js
assert.equal(
componentsImageUrl('close.png'),
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/close.png'
)
```
- [ ] **Step 2: Write the main-package footprint expectation first**
```js
assert.deepEqual(actualMainImages, [
'images/tab-date-active.png',
'images/tab-date.png',
'images/tab-home-active.png',
'images/tab-home.png',
'images/tab-mine-active.png',
'images/tab-mine.png',
'images/tab-order-active.png',
'images/tab-order.png',
'images/tab-repair-active.png',
'images/tab-repair.png'
])
```
- [ ] **Step 3: Run the tests and observe the intended RED state**
Run: `node --test tests/componentsImageUrl.test.mjs tests/mainPackageImageCdnMigration.test.mjs`
Expected: helper still returns `/components/images/close.png`; main package still contains non-TabBar images.
- [ ] **Step 4: Run the migration pre gate**
Run: `npm run check:migration -- --manifest docs/migrations/main-package-image-cdn/manifest.json --phase pre`
Expected: `Migration readiness pre check passed`.
### Task 2: Replace active image consumers and remove local assets
**Files:**
- Modify: `utils/imageBase.js`
- Modify: `project.config.json`
- Modify: WXML/WXS consumers found by full-path image reference scanning
- Modify: `pages/wxLogin/components/InputIcon/InputIcon.js`
- Modify: `tabWorkOrder/pages/orderDetail/orderDetail.js`
- Modify: `tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail.js`
- Delete: all main-package image files except `images/tab-*.png`
**Interfaces:**
- Consumes: `IMG_URL`, verified CDN-relative paths, staged upload bytes
- Produces: CDN URLs for all active consumers and a main-package filesystem containing only native TabBar images
- [ ] **Step 1: Change the shared helper to CDN semantics**
```js
export const componentsImageUrl = name => `${IMG_URL}components/images/${name}`
export const CLOSE_ICON_URL = componentsImageUrl('close.png')
```
- [ ] **Step 2: Replace WXML/WXS local paths with verified CDN paths**
Use `https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/<cdn-upload-relative-path>` for static WXML/WXS values so subpackage consumers do not require new page data wiring.
- [ ] **Step 3: Replace JavaScript data URLs through `IMG_URL`**
```js
failCustomerService: `${IMG_URL}components/images/kfrefresh.png`
```
- [ ] **Step 4: Remove the obsolete forced include**
Delete `components/images/close.png` from `project.config.json` `packOptions.include`.
- [ ] **Step 5: Delete non-TabBar main-package images**
Delete only the audited main-package image set; retain `cdn-upload/`, every subpackage image, and the ten root TabBar icons.
- [ ] **Step 6: Run focused tests and observe GREEN**
Run: `node --test tests/componentsImageUrl.test.mjs tests/mainPackageImageCdnMigration.test.mjs`
Expected: all tests pass.
### Task 3: Verify the migration and update durable evidence
**Files:**
- Modify: `docs/CDN-IMAGE-MIGRATION.md`
- Modify: `docs/components-optimization/COMPATIBILITY.md`
- Modify: `docs/migrations/main-package-image-cdn/manifest.json`
- Modify: `docs/migrations/main-package-image-cdn/test-acceptance.md`
**Interfaces:**
- Consumes: completed filesystem and code changes
- Produces: verified migration record and post-gate evidence
- [ ] **Step 1: Re-run CDN byte verification**
Run the concurrent HTTPS check against every image under `cdn-upload/` and require HTTP 200 plus SHA-256 equality.
- [ ] **Step 2: Scan for residual local main-package image references**
Run: `rg -n '/components/images/|/tabIndex/images/|\.\.?/images/' --glob '*.wxml' --glob '*.wxs' --glob '*.js'`
Expected: no references to deleted main-package image files.
- [ ] **Step 3: Run focused and full tests**
Run: `npm run test:components`
Run: `npm test`
- [ ] **Step 4: Check formatting and diff integrity**
Run: `git diff --check`
- [ ] **Step 5: Run the migration post gate**
Run: `npm run check:migration -- --manifest docs/migrations/main-package-image-cdn/manifest.json --phase post`
Expected: `Migration readiness post check passed`.
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view> <view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view> </view>
<view class="picker" wx:if="{{item.type == 'select'}}"> <view class="picker" wx:if="{{item.type == 'select'}}">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.optionName]}}"> <view class="text-hide" wx:if="{{formData[item.optionName]}}">
{{formData[item.optionName]}} {{formData[item.optionName]}}
</view> </view>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</block> </block>
</view> </view>
<view class="checked" wx:if="{{item.active}}"> <view class="checked" wx:if="{{item.active}}">
<image src="/components/images/choose.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" />
</view> </view>
</view> </view>
</block> </block>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="picker_item {{item.active?'active':''}}" bindtap="changeitem" data-target="{{item}}"> <view class="picker_item {{item.active?'active':''}}" bindtap="changeitem" data-target="{{item}}">
<view class="checked"> <view class="checked">
<view class="checked_icon" hidden="{{!item.active}}"> <view class="checked_icon" hidden="{{!item.active}}">
<image src="../../../components/images/choose.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" />
</view> </view>
</view> </view>
<view class="value"> <view class="value">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> </view>
<view class="checked"> <view class="checked">
<view class="checked_icon" hidden="{{!item.active}}"> <view class="checked_icon" hidden="{{!item.active}}">
<image src="../../../components/images/choose.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" />
</view> </view>
</view> </view>
</view> </view>
......
const DEFAULT_OCR_ICON = const DEFAULT_OCR_ICON =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png' 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png'
const { formatVinInput } = require('~/utils/vinVaildate.js')
Component({ Component({
properties: { properties: {
...@@ -22,7 +21,8 @@ Component({ ...@@ -22,7 +21,8 @@ Component({
data: { data: {
displayValue: '', displayValue: '',
showOcr: false, showOcr: false,
scanIcon: '' scanIcon: '',
maxLength: 140
}, },
lifetimes: { lifetimes: {
...@@ -36,9 +36,15 @@ Component({ ...@@ -36,9 +36,15 @@ Component({
}, },
methods: { methods: {
/**
* 字段配置变化时同步 OCR 展示态,并仅从模板 rules 读取输入长度。
* @param {Object} field 当前模板字段
*/
observeField(field = {}) { observeField(field = {}) {
const configuredMaxLength = Number(field.rules?.maxLength)
this.setData({ this.setData({
showOcr: field.prefixComponent === 'scan' && !this.data.disabled showOcr: field.prefixComponent === 'scan' && !this.data.disabled,
maxLength: configuredMaxLength > 0 ? configuredMaxLength : 140
}) })
}, },
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
class="form-info-row__input {{ error ? 'is-error' : '' }}" class="form-info-row__input {{ error ? 'is-error' : '' }}"
placeholder="请输入" placeholder="请输入"
placeholder-class="form-info-row__placeholder" placeholder-class="form-info-row__placeholder"
maxlength="{{ showOcr ? (field.rules.maxLength || 20) : (field.rules.maxLength || 140) }}" maxlength="{{ maxLength }}"
bindinput="onInput" bindinput="onInput"
bindblur="onBlur" bindblur="onBlur"
/> />
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
bindtap="onToggle" bindtap="onToggle"
> >
<view class="picker-popup__icon"> <view class="picker-popup__icon">
<image class="picker-popup__icon-img" src="/components/images/choose.png" mode="aspectFit" /> <image class="picker-popup__icon-img" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" mode="aspectFit" />
</view> </view>
<view class="picker-popup__label">{{ item.label }}</view> <view class="picker-popup__label">{{ item.label }}</view>
</view> </view>
......
# DEVLOG — packageDynamicForm # DEVLOG — packageDynamicForm
## 2026-08-18 — 门店日报与洽谈明细车架号改为模板校验
- **校验边界**:门店日报、洽谈明细不再因 `prefixComponent: 'scan'` 附加固定 17 位格式校验,也不再使用 `vinApiValidMap` 参与提交;车架号与其他输入字段一致,只执行模板的 `required`、`maxLength` 等声明规则。
- **页面链路**:移除失焦、OCR 回填和提交前的 VIN 接口调用及状态维护;保存/提交直接运行表单引擎模板校验。
- **扫码能力**:VIN OCR/扫码入口及精确行回填保持不变;输入组件只从模板 `rules.maxLength` 读取长度,未声明时沿用普通输入默认值。门店 `F2-107-9` 当前为可选且最多 20 字,洽谈 F3 车架号当前仅必填。
- **验证**:新增 `vin-template-only-validation.test.mjs`,并更新表单引擎、输入组件、门店页面合约及 V2.3 四份模板断言,覆盖模板规则、忽略历史 API 结果及页面/组件不加载 VIN 校验服务。
## 2026-08-14 — V2.3 本月待邀约数兼容初始化 ## 2026-08-14 — V2.3 本月待邀约数兼容初始化
- **问题**:门店 V2.3 将本月待邀约字段从 `F2-24` 调整为 `F2-102`,页面初始化逻辑仍写死旧 key,导致新模板不调用已有接口也不回填默认值。 - **问题**:门店 V2.3 将本月待邀约字段从 `F2-24` 调整为 `F2-102`,页面初始化逻辑仍写死旧 key,导致新模板不调用已有接口也不回填默认值。
......
...@@ -121,8 +121,8 @@ ...@@ -121,8 +121,8 @@
- **上报**:点击「上报数据」先二次确认,然后只执行 **`detail.get` → `dynamic.data.push({ dailyReportRecordId })`**。此路径绝不隐式保存,也不以当前未保存的表单值替换服务端记录;缺记录 id 或读取失败时不 push。 - **上报**:点击「上报数据」先二次确认,然后只执行 **`detail.get` → `dynamic.data.push({ dailyReportRecordId })`**。此路径绝不隐式保存,也不以当前未保存的表单值替换服务端记录;缺记录 id 或读取失败时不 push。
- **上报确认弹窗**:`title: "确定上报数据?"`;`content: "请确认已记录今日所有非成交客户信息,并确保成交客户已完成录单。门店日报上报后,将立即发送相关门店经营统计数据到指定消息群。"`;`cancelText: "我再想想"`;`confirmText: "确定"`。 - **上报确认弹窗**:`title: "确定上报数据?"`;`content: "请确认已记录今日所有非成交客户信息,并确保成交客户已完成录单。门店日报上报后,将立即发送相关门店经营统计数据到指定消息群。"`;`cancelText: "我再想想"`;`confirmText: "确定"`。
- **上报按钮**:只有「今天 + 已保存 + 未上报 + 非编辑态」可用;过去日期显示为禁用,已上报时不可再次上报。 - **上报按钮**:只有「今天 + 已保存 + 未上报 + 非编辑态」可用;过去日期显示为禁用,已上报时不可再次上报。
- **保存防护**:同一门店、日报日期和员工保存成功后 60 秒内再次保存提示「操作过于频繁,请稍后再试」;子表单按模板 `validateDuplicates` 声明的字段检查重复,空值忽略、字符串去除首尾空格,命中时在 VIN 接口前阻止保存并列出全部重复行号。V2.3 `F2-107` 声明 `['F2-107-2']`,提示如「第1,3行客户手机号重复」。 - **保存防护**:同一门店、日报日期和员工保存成功后 60 秒内再次保存提示「操作过于频繁,请稍后再试」;子表单按模板 `validateDuplicates` 声明的字段检查重复,空值忽略、字符串去除首尾空格,命中时阻止保存并列出全部重复行号。V2.3 `F2-107` 声明 `['F2-107-2']`,提示如「第1,3行客户手机号重复」。
- **客户车架号**:V2.3.0 `F2-107-9` 为可选字段;一旦填写必须通过 17 位 VIN 格式校验。失焦、OCR 回填及保存前均调用 VIN 校验接口,失败时当前子表行标红并阻止保存;OCR 结果只写回发起识别的行。 - **客户车架号**:V2.3.0 `F2-107-9` 为可选字段,只执行模板声明的 `maxLength: 20`;不执行固定 17 位格式或 VIN 接口校验。扫码/OCR 能力保留,识别结果只写回发起识别的子表行。
- **并发冲突弹窗**:进入编辑时记录详情接口返回的记录 ID;保存前重新 `detail.get`,仅当两次 ID 不一致(包括初始无 ID、最新有 ID)时提示覆盖。两次均无 ID 或 ID 相同均直接保存;ID 相同但内容变化不提示。 - **并发冲突弹窗**:进入编辑时记录详情接口返回的记录 ID;保存前重新 `detail.get`,仅当两次 ID 不一致(包括初始无 ID、最新有 ID)时提示覆盖。两次均无 ID 或 ID 相同均直接保存;ID 相同但内容变化不提示。
- **离开编辑态弹窗**:换日、切周和返回均使用 `title: "重要提示"`、`content: "内容尚未提交,是否退出编辑?"`、`cancelText: "继续编辑"`、`confirmText: "确定退出"`。取消留在原页并保留填写值,确认才离开。 - **离开编辑态弹窗**:换日、切周和返回均使用 `title: "重要提示"`、`content: "内容尚未提交,是否退出编辑?"`、`cancelText: "继续编辑"`、`confirmText: "确定退出"`。取消留在原页并保留填写值,确认才离开。
- **detail.get** 回显:`submissionStatus`(1 已上报 / 2 未上报)、`submissionDate`(`yyyy-MM-dd HH:mm:ss`) - **detail.get** 回显:`submissionStatus`(1 已上报 / 2 未上报)、`submissionDate`(`yyyy-MM-dd HH:mm:ss`)
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
- `IT-V211-STORE-007`~`013` — `v211-template-visibility.test.mjs`(岚图 or 其他品牌) - `IT-V211-STORE-007`~`013` — `v211-template-visibility.test.mjs`(岚图 or 其他品牌)
- `IT-V211-*` — `v211-template-visibility.test.mjs` - `IT-V211-*` — `v211-template-visibility.test.mjs`
- `IT-STORE-STAFF-COUNT-*` — `store-staff-count.test.mjs` - `IT-STORE-STAFF-COUNT-*` — `store-staff-count.test.mjs`
- `IT-STORE-DAILY-PAGE-VIN-*` / `IT-VIN-SYNC-*` — 门店页 VIN 失焦、提交、OCR 与 17 位格式 - `vin-template-only-validation.test.mjs` / `IT-STORE-DAILY-PAGE-VIN-*` — 门店与洽谈车架号模板校验、页面不依赖 VIN 校验服务、OCR 精确回填
--- ---
...@@ -220,6 +220,7 @@ ...@@ -220,6 +220,7 @@
### 保存 ### 保存
- **提交**:`dynamic.save`(保持与门店相同接口;payload 以 **App jsonContent** 为主) - **提交**:`dynamic.save`(保持与门店相同接口;payload 以 **App jsonContent** 为主)
- **车架号**:扫码/OCR 只负责回填;不调用 VIN 校验接口,也不附加固定 17 位格式规则。当前 F3 模板的车架号字段仅按 `required: true` 校验,后续规则变更以配置中心模板的 `rules` 为准。
- **jsonContent 形态**:subform 入库 **`childrenValue` + `origin_children`**;远程 select 行内 `{ text, value }`;与 gl_tape 互显。详见 [daily-report-save-and-json.md](./daily-report-save-and-json.md) - **jsonContent 形态**:subform 入库 **`childrenValue` + `origin_children`**;远程 select 行内 `{ text, value }`;与 gl_tape 互显。详见 [daily-report-save-and-json.md](./daily-report-save-and-json.md)
- **apiSwitch**:三页 `detail`/`schema`/`fieldOptions`/`weekly`/`scene`/`brand`/`save` 默认 `real`;洽谈另 `discussionStaffList: real`、`todayPlanStore: real`;门店另 `monthlyPendingCount: real`;`saveEcho: off` - **apiSwitch**:三页 `detail`/`schema`/`fieldOptions`/`weekly`/`scene`/`brand`/`save` 默认 `real`;洽谈另 `discussionStaffList: real`、`todayPlanStore: real`;门店另 `monthlyPendingCount: real`;`saveEcho: off`
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
| IT-STORE-SAVE-001 | E2E | F2-107 有重复手机号 | 点击保存 | 阻止请求并提示所有重复客户手机号的行号 | 待测 | | IT-STORE-SAVE-001 | E2E | F2-107 有重复手机号 | 点击保存 | 阻止请求并提示所有重复客户手机号的行号 | 待测 |
| IT-STORE-SAVE-002 | E2E | 同门店/日期/员工刚保存 | 60 秒内再次保存 | 阻止请求并提示操作过于频繁 | 待测 | | IT-STORE-SAVE-002 | E2E | 同门店/日期/员工刚保存 | 60 秒内再次保存 | 阻止请求并提示操作过于频繁 | 待测 |
| IT-STORE-SAVE-003 | E2E | 已进入编辑且服务端 revision 变化 | 点击保存 | 显示覆盖警告;取消不保存,确认「直接保存」才继续 | 待测 | | IT-STORE-SAVE-003 | E2E | 已进入编辑且服务端 revision 变化 | 点击保存 | 显示覆盖警告;取消不保存,确认「直接保存」才继续 | 待测 |
| IT-VIN-TEMPLATE-001 | E2E | 门店日报客户车架号填写非 17 位、长度不超过 20 | 失焦并保存 | 不请求 VIN 校验接口,按模板 `maxLength: 20` 通过保存;超过 20 字时提示模板长度错误 | 待测 |
| IT-VIN-TEMPLATE-002 | E2E | 洽谈明细车架号填写非 17 位非空值 | 失焦并提交 | 不请求 VIN 校验接口,仅空值触发模板必填错误 | 待测 |
| IT-STORE-LEAVE-001 | E2E | 已保存记录处于编辑态且有未保存修改 | 换日、切周或返回 | 显示「内容尚未提交,是否退出编辑?」;取消继续编辑并保留值 | 待测 | | IT-STORE-LEAVE-001 | E2E | 已保存记录处于编辑态且有未保存修改 | 换日、切周或返回 | 显示「内容尚未提交,是否退出编辑?」;取消继续编辑并保留值 | 待测 |
| IT-MENU-STORE-001 | E2E | gate=true 的门店 | 打开首页 | 仅有一个动态「门店日报」入口,跳转 storeDailyReport | 待测 | | IT-MENU-STORE-001 | E2E | gate=true 的门店 | 打开首页 | 仅有一个动态「门店日报」入口,跳转 storeDailyReport | 待测 |
| IT-MENU-STORE-002 | E2E | gate=false 或 gate 请求失败 | 打开首页/触发待办跳转 | 不注入动态入口;legacy 日报入口、`navigateToRequiredDailyReport` fallback 路由保持可用 | 待测 | | IT-MENU-STORE-002 | E2E | gate=false 或 gate 请求失败 | 打开首页/触发待办跳转 | 不注入动态入口;legacy 日报入口、`navigateToRequiredDailyReport` fallback 路由保持可用 | 待测 |
...@@ -42,6 +44,7 @@ ...@@ -42,6 +44,7 @@
6. 编辑后分别换日、切周和返回:均显示标题「重要提示」及 `内容尚未提交,是否退出编辑?`;点「继续编辑」保留值。 6. 编辑后分别换日、切周和返回:均显示标题「重要提示」及 `内容尚未提交,是否退出编辑?`;点「继续编辑」保留值。
7. 车型:点 L3 左区域选三级、点右箭头只展开、点 L4 shape 行选四级;固定「确定」返回并分别验证三级/四级提交值。 7. 车型:点 L3 左区域选三级、点右箭头只展开、点 L4 shape 行选四级;固定「确定」返回并分别验证三级/四级提交值。
8. 在目标设备宽度截屏:门店页与车型页布局对照设计稿,确认底部安全区未遮挡固定「确定」或操作按钮。 8. 在目标设备宽度截屏:门店页与车型页布局对照设计稿,确认底部安全区未遮挡固定「确定」或操作按钮。
9. 门店日报输入短车架号、洽谈明细输入任意非空车架号后分别保存/提交:网络面板无 VIN 校验请求;门店超过模板 20 字时仍被长度规则拦截。
## 单元测试(Node) ## 单元测试(Node)
...@@ -72,6 +75,7 @@ ...@@ -72,6 +75,7 @@
| IT-PLAN-DATE-001 ~ 005 | today-plan-date.test.mjs | `npm test` | 弹层日期文案、前后各 6 天边界、手机号脱敏 | | IT-PLAN-DATE-001 ~ 005 | today-plan-date.test.mjs | `npm test` | 弹层日期文案、前后各 6 天边界、手机号脱敏 |
| IT-PLAN-ADAPTER-001 ~ 004 | negotiationTodayPlanStoreAdapters.test.mjs | `npm test` | todayPlanStore mock/real 与响应归一 | | IT-PLAN-ADAPTER-001 ~ 004 | negotiationTodayPlanStoreAdapters.test.mjs | `npm test` | todayPlanStore mock/real 与响应归一 |
| IT-PLAN-IMPORT-001 ~ 003 | negotiationCustomerImport.test.mjs | `npm test` | F3 字段映射、20 行上限、engine 写入 | | IT-PLAN-IMPORT-001 ~ 003 | negotiationCustomerImport.test.mjs | `npm test` | F3 字段映射、20 行上限、engine 写入 |
| VIN template-only validation | vin-template-only-validation.test.mjs | `npm test` | 两页不加载 VIN 校验服务;门店按 maxLength、洽谈按 required;扫码输入长度跟随模板 |
| upgrade-icon-url.test.mjs | upgrade-icon-url | `npm test` | CDN 图标 URL 三类路径拼接 | | upgrade-icon-url.test.mjs | upgrade-icon-url | `npm test` | CDN 图标 URL 三类路径拼接 |
## form-engine / 页面集成 ## form-engine / 页面集成
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
| 保存 jsonContent | `app-subform-json.js` | F2-1 双 key;subform `childrenValue` | | 保存 jsonContent | `app-subform-json.js` | F2-1 双 key;subform `childrenValue` |
| subform `validateDuplicates` | `subform-duplicate-validation.js` + `validator.js` | 按配置顺序检查当前可见子字段;空值忽略、字符串 trim;仅报告首个重复字段并把错误写入全部重复行 | | subform `validateDuplicates` | `subform-duplicate-validation.js` + `validator.js` | 按配置顺序检查当前可见子字段;空值忽略、字符串 trim;仅报告首个重复字段并把错误写入全部重复行 |
| 洽谈汇总 | `negotiation-summary` + `discussion.staff.list` | 非本模版字段,门店页能力 | | 洽谈汇总 | `negotiation-summary` + `discussion.staff.list` | 非本模版字段,门店页能力 |
| V2.3.0 F2-107-9 客户车架号 | `prefixComponent:'scan'` + `field-format-rules.js` + `vinVaildate.js` + `vinOcrBridge.js` | 非空时须为 17 位 VIN;失焦/OCR/保存前走接口校验,OCR 按 subform 行上下文回填 | | V2.3.0 F2-107-9 客户车架号 | `prefixComponent:'scan'` + `rules.maxLength:20` + `vinOcrBridge.js` | 字段可选,仅按模板限制最多 20 字;不附加固定 17 位或接口校验,OCR 按 subform 行上下文回填 |
### V2.3.0 客户来源与客户标签值协议 ### V2.3.0 客户来源与客户标签值协议
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
- `F2-107` 声明 `validateDuplicates: ['F2-107-2']`,转换器同时验证该 key 必须存在于真实子字段中。 - `F2-107` 声明 `validateDuplicates: ['F2-107-2']`,转换器同时验证该 key 必须存在于真实子字段中。
- 引擎在 `prepareForSubmit` 同步行缓存后按当前字段显隐检查;同一手机号涉及的全部行去重、升序并写入对应单元格错误键。 - 引擎在 `prepareForSubmit` 同步行缓存后按当前字段显隐检查;同一手机号涉及的全部行去重、升序并写入对应单元格错误键。
- 门店保存入口在 VIN API 前执行同一引擎预检;例如第 1、3 行重复时提示「第1,3行客户手机号重复」并定位第 1 行,不再使用页面固定字段 helper。 - 门店保存入口在模板表单校验和保存请求前执行同一引擎预检;例如第 1、3 行重复时提示「第1,3行客户手机号重复」并定位第 1 行,不再使用页面固定字段 helper。
- 属性支持多个子字段 key;同时存在多种重复时只报告配置数组中第一个命中的字段。未配置属性的旧模板不执行重复校验。 - 属性支持多个子字段 key;同时存在多种重复时只报告配置数组中第一个命中的字段。未配置属性的旧模板不执行重复校验。
--- ---
......
...@@ -22,12 +22,7 @@ import { ...@@ -22,12 +22,7 @@ import {
unwrapPlanImportDate unwrapPlanImportDate
} from './plan-import-date-value.js' } from './plan-import-date-value.js'
import { import {
isVinScanField, validatePhoneFormat
validatePhoneFormat,
validateVinSyncFormat,
resolveVinInputMaxLength,
shouldCheckVinApi,
VIN_API_FAIL_MSG
} from './field-format-rules.js' } from './field-format-rules.js'
import { resolveSubformMaxRows } from './subform-limits.js' import { resolveSubformMaxRows } from './subform-limits.js'
import { resolveSubformChildValue } from './subform-child-validation-value.js' import { resolveSubformChildValue } from './subform-child-validation-value.js'
...@@ -56,18 +51,6 @@ function parseFieldDate(value) { ...@@ -56,18 +51,6 @@ function parseFieldDate(value) {
return Number.isNaN(date.getTime()) ? null : date return Number.isNaN(date.getTime()) ? null : date
} }
function appendVinApiError(field, value, errors, vinApiValidMap, errorKey) {
if (!isVinScanField(field) || !shouldCheckVinApi(value)) {
return
}
if (!vinApiValidMap) {
return
}
if (vinApiValidMap[errorKey] !== true) {
errors.push(VIN_API_FAIL_MSG)
}
}
function validateField(field, value, options = {}) { function validateField(field, value, options = {}) {
const fieldType = field.type === 'date' ? 'datetime' : field.type const fieldType = field.type === 'date' ? 'datetime' : field.type
if (fieldType === 'divider' || field.disabled) { if (fieldType === 'divider' || field.disabled) {
...@@ -152,16 +135,6 @@ function validateField(field, value, options = {}) { ...@@ -152,16 +135,6 @@ function validateField(field, value, options = {}) {
} }
} }
if (fieldType === 'input' && isVinScanField(field)) {
const vinMsg = validateVinSyncFormat(
value,
resolveVinInputMaxLength(field)
)
if (vinMsg) {
errors.push(vinMsg)
}
}
const dateOnly = field.type === 'date' || rules.format === 'date' const dateOnly = field.type === 'date' || rules.format === 'date'
const skipMaxDate = hasPlanImportDateMarker(value) const skipMaxDate = hasPlanImportDateMarker(value)
const dateValue = skipMaxDate ? unwrapPlanImportDate(value) : value const dateValue = skipMaxDate ? unwrapPlanImportDate(value) : value
...@@ -190,13 +163,18 @@ function validateField(field, value, options = {}) { ...@@ -190,13 +163,18 @@ function validateField(field, value, options = {}) {
errors.push(`${field.label}不能为空`) errors.push(`${field.label}不能为空`)
} }
appendVinApiError(field, value, errors, options.vinApiValidMap, options.errorKey)
return errors return errors
} }
/** 校验可见固定字段与 subform 行内字段 /**
* @returns {{ ok: boolean, errors: Array, errorMap: object }} */ * 按模板声明校验可见固定字段、subform 行内字段及重复值规则。
* @param {Array<Object>} list 模板字段列表
* @param {Object} ctx 页面上下文
* @param {Object} values 当前表单值
* @param {Object<string, Array<Object>>} groupRowsCache subform 行字段缓存
* @param {Object} options 字段类型策略的通用校验参数
* @returns {{ ok: boolean, errors: Array<Object>, errorMap: Object<string, string> }}
*/
export function validateForm(list = [], ctx, values, groupRowsCache = {}, options = {}) { export function validateForm(list = [], ctx, values, groupRowsCache = {}, options = {}) {
const duplicateValidation = validateSubformDuplicates( const duplicateValidation = validateSubformDuplicates(
list, list,
...@@ -209,10 +187,7 @@ export function validateForm(list = [], ctx, values, groupRowsCache = {}, option ...@@ -209,10 +187,7 @@ export function validateForm(list = [], ctx, values, groupRowsCache = {}, option
const visibleList = getVisibleList(list, ctx, values) const visibleList = getVisibleList(list, ctx, values)
getVisibleLeafFields(list, ctx, values).forEach(field => { getVisibleLeafFields(list, ctx, values).forEach(field => {
const fieldErrors = validateField(field, values[field.key], { const fieldErrors = validateField(field, values[field.key], options)
vinApiValidMap: options.vinApiValidMap,
errorKey: field.key
})
if (fieldErrors.length) { if (fieldErrors.length) {
if (!(field.key in errorMap)) { if (!(field.key in errorMap)) {
errorMap[field.key] = fieldErrors[0] errorMap[field.key] = fieldErrors[0]
...@@ -267,7 +242,7 @@ export function validateForm(list = [], ctx, values, groupRowsCache = {}, option ...@@ -267,7 +242,7 @@ export function validateForm(list = [], ctx, values, groupRowsCache = {}, option
const fieldValue = resolveSubformChildValue(child, row, rowField) const fieldValue = resolveSubformChildValue(child, row, rowField)
const errorKey = buildGroupErrorKey(group.key, rowIndex, child.key) const errorKey = buildGroupErrorKey(group.key, rowIndex, child.key)
const fieldErrors = validateField(child, fieldValue, { const fieldErrors = validateField(child, fieldValue, {
vinApiValidMap: options.vinApiValidMap, ...options,
errorKey errorKey
}) })
if (fieldErrors.length) { if (fieldErrors.length) {
......
...@@ -31,25 +31,6 @@ const { ...@@ -31,25 +31,6 @@ const {
isNegotiationDealDateFieldKey isNegotiationDealDateFieldKey
} = require('../../form-engine/select-complete-fun.js') } = require('../../form-engine/select-complete-fun.js')
const { isOrderListField } = require('../../utils/order-list-params.js') const { isOrderListField } = require('../../utils/order-list-params.js')
import {
validateVin,
validateVinImmediate,
cancelPendingVinDebounce
} from '~/utils/vinVaildate.js'
const {
isVinScanField,
validateVinSyncFormat,
resolveVinInputMaxLength,
VIN_API_FAIL_MSG
} = require('../../form-engine/field-format-rules.js')
const {
buildVinErrorKey,
shouldRunVinApiValidate,
runVinApiValidate,
runVinApiValidateImmediate,
listVinScanCellsFromCache,
buildVinApiValidMapFromEntries
} = require('../../form-engine/vin-api-valid-tracker.js')
const dailyReportPage = require('../behaviors/dailyReportPage.js') const dailyReportPage = require('../behaviors/dailyReportPage.js')
const dailyReportPageMethods = require('../behaviors/dailyReportPageMethods.js') const dailyReportPageMethods = require('../behaviors/dailyReportPageMethods.js')
const { applyCustomersToEngine } = require('../../services/negotiationCustomerImport.js') const { applyCustomersToEngine } = require('../../services/negotiationCustomerImport.js')
...@@ -80,7 +61,6 @@ Page({ ...@@ -80,7 +61,6 @@ Page({
groupFields: [], groupFields: [],
values: {}, values: {},
errors: {}, errors: {},
vinApiValidMap: {},
formDisabled: false, formDisabled: false,
requestContext: {}, requestContext: {},
groupActiveIndex: {}, groupActiveIndex: {},
...@@ -415,37 +395,6 @@ Page({ ...@@ -415,37 +395,6 @@ Page({
structureChanged: false, structureChanged: false,
changedGroupKey: groupKey changedGroupKey: groupKey
}) })
if (childField && isVinScanField(childField)) {
this.scheduleVinApiValidate({ childKey, groupKey, rowIndex, vin: value })
}
},
/** 顶层字段失焦 */
onFieldBlur(e) {
if (this.data.formDisabled) return
const { key, value } = e.detail || {}
if (!key) return
const field = (this.data.fixedFields || []).find(item => item.key === key)
if (field && isVinScanField(field)) {
this.scheduleVinApiValidate({ childKey: key, vin: value })
}
},
/** subform 单元格失焦(车架号 API 校验) */
onGroupFieldBlur(e) {
if (this.data.formDisabled) return
const { key, groupKey, rowIndex, value } = e.detail || {}
if (!groupKey || key == null || rowIndex == null) return
const group = this.findGroupByKey(groupKey)
const childField = group ? this.findChildFieldDef(group, key) : null
if (childField && isVinScanField(childField)) {
this.scheduleVinApiValidate({
childKey: key,
groupKey,
rowIndex,
vin: value
})
}
}, },
/** 周历圆点:标记本周已填日期(templateType=3) */ /** 周历圆点:标记本周已填日期(templateType=3) */
...@@ -593,7 +542,7 @@ Page({ ...@@ -593,7 +542,7 @@ Page({
this.applyEngineView(viewState, { errors, structureChanged: false }) this.applyEngineView(viewState, { errors, structureChanged: false })
}, },
/** 提交:校验通过后 dynamic.save */ /** 提交:只执行模板声明的通用校验,通过后调用 dynamic.save。 */
async submit() { async submit() {
if (this._submitting) { if (this._submitting) {
return wx.$util.showToast('正在提交中,请稍候') return wx.$util.showToast('正在提交中,请稍候')
...@@ -607,15 +556,12 @@ Page({ ...@@ -607,15 +556,12 @@ Page({
} }
wx.$util.showLoading() wx.$util.showLoading()
try { try {
cancelPendingVinDebounce()
if (typeof this.engine.prepareForSubmit === 'function') { if (typeof this.engine.prepareForSubmit === 'function') {
this.engine.prepareForSubmit() this.engine.prepareForSubmit()
} }
const { vinApiValidMap, vinApiFailures } = await this.flushAllVinApiValidation() const validation = this.engine.validate()
const validation = this.engine.validate({ vinApiValidMap })
if (!validation.ok) { if (!validation.ok) {
this.logSubmitValidationFailures({ this.logSubmitValidationFailures({
vinApiFailures,
errors: validation.errors, errors: validation.errors,
errorMap: validation.errorMap errorMap: validation.errorMap
}) })
...@@ -715,7 +661,7 @@ Page({ ...@@ -715,7 +661,7 @@ Page({
this.loadFormData() this.loadFormData()
}, },
/** 打开 VIN OCR 页:解析 group/row 上下文并注册 onResult 回调 */ /** 打开 VIN OCR 页并注册精确行回填;识别结果不触发接口校验。 */
openVinOcrForField({ childKey, groupKey, rowIndex } = {}) { openVinOcrForField({ childKey, groupKey, rowIndex } = {}) {
if (this.data.formDisabled || !childKey) return if (this.data.formDisabled || !childKey) return
const page = this const page = this
...@@ -731,7 +677,6 @@ Page({ ...@@ -731,7 +677,6 @@ Page({
onResult(vin) { onResult(vin) {
page._vinOcrCtx = null page._vinOcrCtx = null
page.queueVinOcrApply({ ...resolved, vin }) page.queueVinOcrApply({ ...resolved, vin })
page.runVinValidate(vin)
} }
}) })
}, },
...@@ -756,7 +701,7 @@ Page({ ...@@ -756,7 +701,7 @@ Page({
this.applyVinOcrResult(pending) this.applyVinOcrResult(pending)
}, },
/** 将 OCR 识别的 VIN 写入顶层或 subform 字段 */ /** 将 OCR 识别的 VIN 原样写入顶层或 subform,提交时由模板规则校验。 */
applyVinOcrResult({ childKey, groupKey, rowIndex, vin } = {}) { applyVinOcrResult({ childKey, groupKey, rowIndex, vin } = {}) {
if (!this.engine || !childKey || vin == null || vin === '') return if (!this.engine || !childKey || vin == null || vin === '') return
const resolved = resolveVinFieldContext( const resolved = resolveVinFieldContext(
...@@ -785,7 +730,7 @@ Page({ ...@@ -785,7 +730,7 @@ Page({
}, },
/** 提交校验未通过时输出失败项(控制台),供联调定位 */ /** 提交校验未通过时输出失败项(控制台),供联调定位 */
logSubmitValidationFailures({ vinApiFailures = [], errors = [], errorMap = {} } = {}) { logSubmitValidationFailures({ errors = [], errorMap = {} } = {}) {
const items = (errors || []).map(err => ({ const items = (errors || []).map(err => ({
key: err.key, key: err.key,
label: err.label, label: err.label,
...@@ -793,96 +738,11 @@ Page({ ...@@ -793,96 +738,11 @@ Page({
groupKey: err.groupKey, groupKey: err.groupKey,
rowIndex: err.rowIndex rowIndex: err.rowIndex
})) }))
if (vinApiFailures.length) {
console.warn('[negotiationDetail] submit vin api failed', vinApiFailures)
}
if (items.length) { if (items.length) {
console.warn('[negotiationDetail] submit validation failed', { items, errorMap }) console.warn('[negotiationDetail] submit validation failed', { items, errorMap })
} }
}, },
/**
* 提交前补跑可见行内 17 位车架号的 API 校验(无防抖、静默,成功不 Toast)
* @returns {Promise<{ vinApiValidMap: Record<string, boolean>, vinApiFailures: Array }>}
*/
async flushAllVinApiValidation() {
const baseMap = { ...(this.data.vinApiValidMap || {}) }
if (!this.engine) {
return { vinApiValidMap: baseMap, vinApiFailures: [] }
}
const { groupRowsCache } = this.engine.getViewState()
const entries = listVinScanCellsFromCache(groupRowsCache)
const built = await buildVinApiValidMapFromEntries(entries, vin =>
runVinApiValidateImmediate(vin, validateVinImmediate, { silent: true })
)
const vinApiValidMap = { ...baseMap, ...built }
const vinApiFailures = entries
.filter(entry => built[entry.errorKey] !== true)
.map(entry => ({
errorKey: entry.errorKey,
vin: entry.vin,
message: VIN_API_FAIL_MSG
}))
const errors = { ...(this.data.errors || {}) }
Object.keys(built).forEach(errorKey => {
if (built[errorKey] === true) {
delete errors[errorKey]
} else {
errors[errorKey] = VIN_API_FAIL_MSG
}
})
this.setData({ vinApiValidMap, errors })
return { vinApiValidMap, vinApiFailures }
},
/** 异步 API 校验车架号并更新 vinApiValidMap / errors */
async scheduleVinApiValidate({ childKey, groupKey, rowIndex, vin } = {}) {
if (!childKey) return
const errorKey = buildVinErrorKey({ groupKey, rowIndex, childKey })
let vinMaxLength
if (groupKey && this.engine) {
const group = this.engine
.getViewState()
?.list?.find(item => item.key === groupKey)
const childField = group ? this.findChildFieldDef(group, childKey) : null
if (childField) {
vinMaxLength = resolveVinInputMaxLength(childField)
}
}
const syncMsg = validateVinSyncFormat(vin, vinMaxLength)
const vinApiValidMap = { ...(this.data.vinApiValidMap || {}) }
const errors = { ...(this.data.errors || {}) }
if (syncMsg || !shouldRunVinApiValidate(vin)) {
delete vinApiValidMap[errorKey]
if (syncMsg) {
errors[errorKey] = syncMsg
} else {
delete errors[errorKey]
}
this.setData({ vinApiValidMap, errors })
return
}
const { ok, valid, cancelled } = await runVinApiValidate(vin, validateVin)
if (cancelled) {
return
}
vinApiValidMap[errorKey] = ok && valid
if (!ok || !valid) {
errors[errorKey] = VIN_API_FAIL_MSG
} else {
delete errors[errorKey]
}
this.setData({ vinApiValidMap, errors })
},
/** 车架号 OCR / 失焦后触发 API 校验 */
runVinValidate(vin, ctx = {}) {
if (!vin) return
this.scheduleVinApiValidate({ ...ctx, vin })
},
/** 打开品牌选择页:四级车型走真实 merchant.info + scrm 接口(与 Loader brand mock 无关) */ /** 打开品牌选择页:四级车型走真实 merchant.info + scrm 接口(与 Loader brand mock 无关) */
openCarBrandForField({ childKey, groupKey, rowIndex } = {}) { openCarBrandForField({ childKey, groupKey, rowIndex } = {}) {
if (this.data.formDisabled || !childKey) return if (this.data.formDisabled || !childKey) return
...@@ -943,7 +803,7 @@ Page({ ...@@ -943,7 +803,7 @@ Page({
this.applyEngineView(viewState, extra) this.applyEngineView(viewState, extra)
}, },
/** 全局 reWrite 桥:standNo 类型回填 VIN 或交给 vinOcrBridge 处理 */ /** 全局 reWrite 桥:standNo 只回填 VIN 或交给 vinOcrBridge 处理。 */
reWrite(type, data) { reWrite(type, data) {
if (vinOcrBridge.handleReWrite(type, data)) { if (vinOcrBridge.handleReWrite(type, data)) {
this._vinOcrCtx = null this._vinOcrCtx = null
...@@ -961,7 +821,6 @@ Page({ ...@@ -961,7 +821,6 @@ Page({
this.data.groupActiveIndex || {} this.data.groupActiveIndex || {}
) )
this.queueVinOcrApply({ ...resolved, vin }) this.queueVinOcrApply({ ...resolved, vin })
this.runVinValidate(vin, resolved)
}, },
/** 初始化今日计划入口条 CDN 切图(class.png、arrow_right.png) */ /** 初始化今日计划入口条 CDN 切图(class.png、arrow_right.png) */
......
...@@ -64,8 +64,6 @@ ...@@ -64,8 +64,6 @@
group-row-visible-map="{{ groupRowVisibleMap }}" group-row-visible-map="{{ groupRowVisibleMap }}"
group-row-total-map="{{ groupRowTotalMap }}" group-row-total-map="{{ groupRowTotalMap }}"
bind:change="onFieldChange" bind:change="onFieldChange"
bind:blur="onFieldBlur"
bind:groupblur="onGroupFieldBlur"
bind:groupadd="onGroupAdd" bind:groupadd="onGroupAdd"
bind:groupremove="onGroupRemove" bind:groupremove="onGroupRemove"
bind:groupnav="onGroupNav" bind:groupnav="onGroupNav"
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
* @see packageDynamicForm/docs/PAGES.md#门店日报storedailyreport * @see packageDynamicForm/docs/PAGES.md#门店日报storedailyreport
* @see packageDynamicForm/docs/ARCHITECTURE.md * @see packageDynamicForm/docs/ARCHITECTURE.md
* *
* 职责:周历选日、日报编辑/保存、独立上报、VIN 校验/OCR、洽谈明细表汇总 * 职责:周历选日、日报编辑/保存、独立上报、VIN OCR、洽谈明细表汇总
* 加载:loadStoreDailyForm → brand|scene|detail 并行 → pageContext → schema → engine.init * 加载:loadStoreDailyForm → brand|scene|detail 并行 → pageContext → schema → engine.init
* 写入:字段变更进入 engine;VIN 失焦/OCR/保存前走接口校验;保存调用 dynamic.save,上报二次确认后独立 push * 写入:字段变更进入 engine,校验遵循模板 rules;保存调用 dynamic.save,上报二次确认后独立 push
* 上下文:buildFormRequestContext 透传 merchantId、sceneType 给 fieldOptions * 上下文:buildFormRequestContext 透传 merchantId、sceneType 给 fieldOptions
* 联调:STORE_DAILY_API_SWITCH(../config/apiSwitch.js) * 联调:STORE_DAILY_API_SWITCH(../config/apiSwitch.js)
* 维护:改动 Page 方法 / 加载链 / 保存逻辑时,同步 PAGES.md、DEVLOG.md 并补方法 JSDoc(见 MAINTENANCE.md § 三页 Page 后续开发) * 维护:改动 Page 方法 / 加载链 / 保存逻辑时,同步 PAGES.md、DEVLOG.md 并补方法 JSDoc(见 MAINTENANCE.md § 三页 Page 后续开发)
...@@ -33,25 +33,6 @@ const carBrandPickerBridge = require('../../services/carBrandPickerBridge.js') ...@@ -33,25 +33,6 @@ const carBrandPickerBridge = require('../../services/carBrandPickerBridge.js')
const { resolveCarBrandValueForValidation } = require('../../form-engine/car-brand-value.js') const { resolveCarBrandValueForValidation } = require('../../form-engine/car-brand-value.js')
const { getSubformRowTemplateForAdd } = require('../../form-engine/field-types.js') const { getSubformRowTemplateForAdd } = require('../../form-engine/field-types.js')
const { const {
validateVin,
validateVinImmediate,
cancelPendingVinDebounce
} = require('~/utils/vinVaildate.js')
const {
isVinScanField,
validateVinSyncFormat,
resolveVinInputMaxLength,
VIN_API_FAIL_MSG
} = require('../../form-engine/field-format-rules.js')
const {
buildVinErrorKey,
shouldRunVinApiValidate,
runVinApiValidate,
runVinApiValidateImmediate,
listVinScanCellsFromCache,
buildVinApiValidMapFromEntries
} = require('../../form-engine/vin-api-valid-tracker.js')
const {
buildStoreDailySubmitConfirmModal, buildStoreDailySubmitConfirmModal,
buildStoreDailyConflictModal, buildStoreDailyConflictModal,
buildStoreDailyLeaveModal buildStoreDailyLeaveModal
...@@ -126,7 +107,6 @@ Page({ ...@@ -126,7 +107,6 @@ Page({
groupFields: [], groupFields: [],
values: {}, values: {},
errors: {}, errors: {},
vinApiValidMap: {},
formDisabled: false, formDisabled: false,
writeInProgress: false, writeInProgress: false,
requestContext: {}, requestContext: {},
...@@ -470,8 +450,6 @@ Page({ ...@@ -470,8 +450,6 @@ Page({
if (this._savingDraft || this.data.writeInProgress || this.data.formDisabled) return if (this._savingDraft || this.data.writeInProgress || this.data.formDisabled) return
const { groupKey, rowIndex, childKey, value, displayLabel } = e.detail || {} const { groupKey, rowIndex, childKey, value, displayLabel } = e.detail || {}
if (!this.engine || !groupKey || childKey == null || rowIndex == null) return if (!this.engine || !groupKey || childKey == null || rowIndex == null) return
const group = this.findGroupByKey(groupKey)
const childField = group ? this.findChildFieldDef(group, childKey) : null
let viewState let viewState
const useAppDualKey = const useAppDualKey =
(displayLabel != null && displayLabel !== '') || (displayLabel != null && displayLabel !== '') ||
...@@ -498,31 +476,6 @@ Page({ ...@@ -498,31 +476,6 @@ Page({
structureChanged: false, structureChanged: false,
changedGroupKey: groupKey changedGroupKey: groupKey
}) })
if (childField && isVinScanField(childField)) {
this.scheduleVinApiValidate({ childKey, groupKey, rowIndex, vin: value })
}
},
/** 顶层 VIN 字段失焦校验。 */
onFieldBlur(e) {
if (this.data.formDisabled || this.data.writeInProgress) return
const { key, value } = e.detail || {}
const field = (this.data.fixedFields || []).find(item => item.key === key)
if (field && isVinScanField(field)) {
this.scheduleVinApiValidate({ childKey: key, vin: value })
}
},
/** subform VIN 字段失焦校验。 */
onGroupFieldBlur(e) {
if (this.data.formDisabled || this.data.writeInProgress) return
const { key, groupKey, rowIndex, value } = e.detail || {}
if (!groupKey || key == null || rowIndex == null) return
const group = this.findGroupByKey(groupKey)
const childField = group ? this.findChildFieldDef(group, key) : null
if (childField && isVinScanField(childField)) {
this.scheduleVinApiValidate({ childKey: key, groupKey, rowIndex, vin: value })
}
}, },
/** 周历圆点:标记本周已填日期 */ /** 周历圆点:标记本周已填日期 */
...@@ -993,12 +946,12 @@ Page({ ...@@ -993,12 +946,12 @@ Page({
}, },
/** /**
* 必填校验;失败时标红并 Toast * 执行模板声明的 required、maxLength 等通用校验;失败时标红并 Toast。
* @returns {boolean} * @returns {boolean}
*/ */
validateFormRequired(vinApiValidMap = this.data.vinApiValidMap) { validateFormRequired() {
if (!this.engine) return false if (!this.engine) return false
const validation = this.engine.validate({ vinApiValidMap }) const validation = this.engine.validate()
if (!validation.ok) { if (!validation.ok) {
this.applyEngineView(this.engine.getViewState(), { this.applyEngineView(this.engine.getViewState(), {
errors: validation.errorMap, errors: validation.errorMap,
...@@ -1029,7 +982,7 @@ Page({ ...@@ -1029,7 +982,7 @@ Page({
return false return false
}, },
/** 打开 VIN OCR,并保留 subform 行上下文。 */ /** 打开 VIN OCR 并保留 subform 行上下文;识别结果只回填,不触发接口校验。 */
openVinOcrForField({ childKey, groupKey, rowIndex } = {}) { openVinOcrForField({ childKey, groupKey, rowIndex } = {}) {
if (this.data.formDisabled || this.data.writeInProgress || !childKey) return if (this.data.formDisabled || this.data.writeInProgress || !childKey) return
const page = this const page = this
...@@ -1043,7 +996,6 @@ Page({ ...@@ -1043,7 +996,6 @@ Page({
onResult(vin) { onResult(vin) {
page._vinOcrCtx = null page._vinOcrCtx = null
page.queueVinOcrApply({ ...resolved, vin }) page.queueVinOcrApply({ ...resolved, vin })
page.runVinValidate(vin, resolved)
} }
}) })
}, },
...@@ -1066,7 +1018,7 @@ Page({ ...@@ -1066,7 +1018,7 @@ Page({
this.applyVinOcrResult(pending) this.applyVinOcrResult(pending)
}, },
/** 将 OCR VIN 回填到顶层或指定 subform 行。 */ /** 将 OCR VIN 原样回填到顶层或指定 subform 行,后续由模板规则统一校验。 */
applyVinOcrResult({ childKey, groupKey, rowIndex, vin } = {}) { applyVinOcrResult({ childKey, groupKey, rowIndex, vin } = {}) {
if (!this.engine || !childKey || vin == null || vin === '') return if (!this.engine || !childKey || vin == null || vin === '') return
const resolved = resolveVinFieldContext( const resolved = resolveVinFieldContext(
...@@ -1093,64 +1045,7 @@ Page({ ...@@ -1093,64 +1045,7 @@ Page({
this.applyEngineView(viewState, extra) this.applyEngineView(viewState, extra)
}, },
/** 提交前校验所有可见行内的 17 位 VIN。 */ /** 兼容 OCR 页的全局 reWrite 回调;这里只入队回填,不请求 VIN 校验接口。 */
async flushAllVinApiValidation() {
const baseMap = { ...(this.data.vinApiValidMap || {}) }
if (!this.engine) return { vinApiValidMap: baseMap, vinApiFailures: [] }
const entries = listVinScanCellsFromCache(
this.engine.getViewState().groupRowsCache || {}
)
const built = await buildVinApiValidMapFromEntries(entries, vin =>
runVinApiValidateImmediate(vin, validateVinImmediate, { silent: true })
)
const vinApiValidMap = { ...baseMap, ...built }
const vinApiFailures = entries
.filter(entry => built[entry.errorKey] !== true)
.map(entry => ({ ...entry, message: VIN_API_FAIL_MSG }))
const errors = { ...(this.data.errors || {}) }
Object.keys(built).forEach(errorKey => {
if (built[errorKey] === true) delete errors[errorKey]
else errors[errorKey] = VIN_API_FAIL_MSG
})
this.setData({ vinApiValidMap, errors })
return { vinApiValidMap, vinApiFailures }
},
/** 失焦/OCR 后进行同步格式和异步 API 校验。 */
async scheduleVinApiValidate({ childKey, groupKey, rowIndex, vin } = {}) {
if (!childKey) return
const errorKey = buildVinErrorKey({ groupKey, rowIndex, childKey })
let field
if (groupKey) {
const group = this.findGroupByKey(groupKey)
field = group ? this.findChildFieldDef(group, childKey) : null
} else {
field = (this.data.fixedFields || []).find(item => item.key === childKey)
}
const syncMsg = validateVinSyncFormat(vin, resolveVinInputMaxLength(field || {}))
const vinApiValidMap = { ...(this.data.vinApiValidMap || {}) }
const errors = { ...(this.data.errors || {}) }
if (syncMsg || !shouldRunVinApiValidate(vin)) {
delete vinApiValidMap[errorKey]
if (syncMsg) errors[errorKey] = syncMsg
else delete errors[errorKey]
this.setData({ vinApiValidMap, errors })
return
}
const { ok, valid, cancelled } = await runVinApiValidate(vin, validateVin)
if (cancelled) return
vinApiValidMap[errorKey] = ok && valid
if (ok && valid) delete errors[errorKey]
else errors[errorKey] = VIN_API_FAIL_MSG
this.setData({ vinApiValidMap, errors })
},
runVinValidate(vin, ctx = {}) {
if (!vin) return
this.scheduleVinApiValidate({ ...ctx, vin })
},
/** 兼容 OCR 页的全局 reWrite 回调。 */
reWrite(type, data) { reWrite(type, data) {
if (vinOcrBridge.handleReWrite(type, data)) { if (vinOcrBridge.handleReWrite(type, data)) {
this._vinOcrCtx = null this._vinOcrCtx = null
...@@ -1163,7 +1058,6 @@ Page({ ...@@ -1163,7 +1058,6 @@ Page({
this._vinOcrCtx = null this._vinOcrCtx = null
const resolved = resolveVinFieldContext(ctx, this.data.groupActiveIndex || {}) const resolved = resolveVinFieldContext(ctx, this.data.groupActiveIndex || {})
this.queueVinOcrApply({ ...resolved, vin }) this.queueVinOcrApply({ ...resolved, vin })
this.runVinValidate(vin, resolved)
}, },
/** /**
...@@ -1256,7 +1150,7 @@ Page({ ...@@ -1256,7 +1150,7 @@ Page({
}) })
}, },
/** 保存:频控、重复校验和冲突确认后只请求一次 dynamic.save。 */ /** 保存:频控、模板校验和冲突确认通过后只请求一次 dynamic.save。 */
async onSave() { async onSave() {
if (this.guardStoreDailyWriteInProgress()) return if (this.guardStoreDailyWriteInProgress()) return
const writeContext = this.captureStoreDailyWriteContext() const writeContext = this.captureStoreDailyWriteContext()
...@@ -1279,13 +1173,11 @@ Page({ ...@@ -1279,13 +1173,11 @@ Page({
this.data.writeInProgress = true this.data.writeInProgress = true
this.setData({ writeInProgress: true }) this.setData({ writeInProgress: true })
try { try {
cancelPendingVinDebounce()
if (typeof writeContext.engine.prepareForSubmit === 'function') { if (typeof writeContext.engine.prepareForSubmit === 'function') {
writeContext.engine.prepareForSubmit() writeContext.engine.prepareForSubmit()
} }
const { vinApiValidMap } = await this.flushAllVinApiValidation()
if (!this.isCurrentStoreDailyWriteContext(writeContext)) return if (!this.isCurrentStoreDailyWriteContext(writeContext)) return
if (!this.validateFormRequired(vinApiValidMap)) return if (!this.validateFormRequired()) return
const detailRes = await this.fetchLatestStoreDailyDetail(writeContext) const detailRes = await this.fetchLatestStoreDailyDetail(writeContext)
if (!this.isCurrentStoreDailyWriteContext(writeContext)) return if (!this.isCurrentStoreDailyWriteContext(writeContext)) return
if (!isApiSuccess(detailRes.code) || !detailRes.data) { if (!isApiSuccess(detailRes.code) || !detailRes.data) {
...@@ -1561,7 +1453,6 @@ Page({ ...@@ -1561,7 +1453,6 @@ Page({
onUnload() { onUnload() {
this._vinOcrCtx = null this._vinOcrCtx = null
this._pendingVinApply = null this._pendingVinApply = null
cancelPendingVinDebounce()
vinOcrBridge.clearPending() vinOcrBridge.clearPending()
carBrandPickerBridge.clearPending() carBrandPickerBridge.clearPending()
}, },
......
...@@ -60,8 +60,6 @@ ...@@ -60,8 +60,6 @@
group-row-visible-map="{{ groupRowVisibleMap }}" group-row-visible-map="{{ groupRowVisibleMap }}"
group-row-total-map="{{ groupRowTotalMap }}" group-row-total-map="{{ groupRowTotalMap }}"
bind:change="onFieldChange" bind:change="onFieldChange"
bind:blur="onFieldBlur"
bind:groupblur="onGroupFieldBlur"
bind:groupadd="onGroupAdd" bind:groupadd="onGroupAdd"
bind:groupremove="onGroupRemove" bind:groupremove="onGroupRemove"
bind:groupnav="onGroupNav" bind:groupnav="onGroupNav"
......
...@@ -94,9 +94,9 @@ describe('vin-api-valid-tracker', async () => { ...@@ -94,9 +94,9 @@ describe('vin-api-valid-tracker', async () => {
}) })
}) })
describe('validateForm phone and vin', async () => { describe('validateForm phone and template-driven VIN', async () => {
const { validateForm } = await import('../form-engine/validator.js') const { validateForm } = await import('../form-engine/validator.js')
const { VIN_API_FAIL_MSG, PHONE_FORMAT_MSG } = await import( const { PHONE_FORMAT_MSG } = await import(
'../form-engine/field-format-rules.js' '../form-engine/field-format-rules.js'
) )
...@@ -136,7 +136,7 @@ describe('validateForm phone and vin', async () => { ...@@ -136,7 +136,7 @@ describe('validateForm phone and vin', async () => {
assert.equal(result.errorMap['G1__0__F3-1-5'], PHONE_FORMAT_MSG) assert.equal(result.errorMap['G1__0__F3-1-5'], PHONE_FORMAT_MSG)
}) })
it('IT-VIN-VALID-001: vinApiValidMap false blocks submit validation', () => { it('IT-VIN-VALID-001: VIN API result does not override template validation', () => {
const vinChild = { const vinChild = {
key: 'F3-1-7', key: 'F3-1-7',
type: 'input', type: 'input',
...@@ -154,7 +154,7 @@ describe('validateForm phone and vin', async () => { ...@@ -154,7 +154,7 @@ describe('validateForm phone and vin', async () => {
children: [[vinChild]] children: [[vinChild]]
} }
] ]
const vin = 'LSGGF53W8CH045613' const vin = 'SHORT'
const values = { G1: [{ 'F3-1-7': vin }] } const values = { G1: [{ 'F3-1-7': vin }] }
const groupRowsCache = { const groupRowsCache = {
G1: [ G1: [
...@@ -173,7 +173,6 @@ describe('validateForm phone and vin', async () => { ...@@ -173,7 +173,6 @@ describe('validateForm phone and vin', async () => {
const result = validateForm(list, {}, values, groupRowsCache, { const result = validateForm(list, {}, values, groupRowsCache, {
vinApiValidMap: { 'G1__0__F3-1-7': false } vinApiValidMap: { 'G1__0__F3-1-7': false }
}) })
assert.equal(result.ok, false) assert.equal(result.ok, true, JSON.stringify(result.errorMap))
assert.equal(result.errorMap['G1__0__F3-1-7'], VIN_API_FAIL_MSG)
}) })
}) })
...@@ -2066,11 +2066,7 @@ describe('negotiation schema (F3)', async () => { ...@@ -2066,11 +2066,7 @@ describe('negotiation schema (F3)', async () => {
engine.setGroupFieldValue(groupKey, 0, `${groupKey}-10`, '否') engine.setGroupFieldValue(groupKey, 0, `${groupKey}-10`, '否')
engine.setGroupFieldValue(groupKey, 0, `${groupKey}-11`, '未成交原因') engine.setGroupFieldValue(groupKey, 0, `${groupKey}-11`, '未成交原因')
} }
const vinApiValidMap = { const result = engine.validate()
'F3-1__0__F3-1-7': true,
'F3-2__0__F3-2-7': true
}
const result = engine.validate({ vinApiValidMap })
assert.equal(result.ok, true, JSON.stringify(result.errorMap)) assert.equal(result.ok, true, JSON.stringify(result.errorMap))
}) })
...@@ -2118,9 +2114,7 @@ describe('negotiation schema (F3)', async () => { ...@@ -2118,9 +2114,7 @@ describe('negotiation schema (F3)', async () => {
engine.setGroupFieldValue(gk, 0, 'F3-4-15', 300) engine.setGroupFieldValue(gk, 0, 'F3-4-15', 300)
engine.setGroupFieldValue(gk, 0, 'F3-4-16', 400) engine.setGroupFieldValue(gk, 0, 'F3-4-16', 400)
engine.prepareForSubmit() engine.prepareForSubmit()
const result = engine.validate({ const result = engine.validate()
vinApiValidMap: { [`${gk}__0__F3-4-8`]: true }
})
assert.equal(result.ok, true, JSON.stringify(result.errorMap)) assert.equal(result.ok, true, JSON.stringify(result.errorMap))
const payload = buildAppDailySavePayload({ const payload = buildAppDailySavePayload({
reportTemplateId: 1, reportTemplateId: 1,
......
...@@ -89,9 +89,25 @@ describe('store daily template V2.3.0 schema', () => { ...@@ -89,9 +89,25 @@ describe('store daily template V2.3.0 schema', () => {
assert.equal(findDeep(daily.list, 'F2-107-8')?.type, 'carBrandSelect') assert.equal(findDeep(daily.list, 'F2-107-8')?.type, 'carBrandSelect')
assert.equal(findDeep(daily.list, 'F2-107-8')?.rules?.level, 4) assert.equal(findDeep(daily.list, 'F2-107-8')?.rules?.level, 4)
assert.equal(findDeep(daily.list, 'F2-107-9')?.prefixComponent, 'scan') assert.equal(findDeep(daily.list, 'F2-107-9')?.prefixComponent, 'scan')
assert.equal(findDeep(daily.list, 'F2-107-9')?.required, false)
assert.equal(findDeep(daily.list, 'F2-107-9')?.rules?.maxLength, 20) assert.equal(findDeep(daily.list, 'F2-107-9')?.rules?.maxLength, 20)
}) })
it('IT-V230-002b: all latest fixtures keep VIN optional with template maxLength only', () => {
const schemas = [
daily.list,
production.list,
loadBareArray('schema-store-daily-v2.3.0.js'),
loadBareArray('schema-store-daily-v2.3.0.prod.js')
]
for (const list of schemas) {
const vin = findDeep(list, 'F2-107-9')
assert.equal(vin?.prefixComponent, 'scan')
assert.equal(vin?.required, false)
assert.deepEqual(vin?.rules, { maxLength: 20 })
}
})
it('IT-V230-003: unsupported source Rule metadata is not emitted', () => { it('IT-V230-003: unsupported source Rule metadata is not emitted', () => {
const monthly = findDeep(daily.list, 'F2-102') const monthly = findDeep(daily.list, 'F2-102')
assert.equal(Object.hasOwn(monthly, 'sourceDefaultRule'), false) assert.equal(Object.hasOwn(monthly, 'sourceDefaultRule'), false)
......
...@@ -490,13 +490,14 @@ describe('storeDailyReport page contract', () => { ...@@ -490,13 +490,14 @@ describe('storeDailyReport page contract', () => {
assert.equal(page._hasUnsavedChanges, false) assert.equal(page._hasUnsavedChanges, false)
}) })
it('IT-STORE-DAILY-PAGE-DUP-001: duplicate template preflight runs before VIN and replaces the fixed phone helper', () => { it('IT-STORE-DAILY-PAGE-DUP-001: duplicate template preflight runs before submit preparation and replaces the fixed phone helper', () => {
const saveSource = js.slice(js.indexOf('async onSave()'), js.indexOf('\n\t/** @deprecated', js.indexOf('async onSave()'))) const saveSource = js.slice(js.indexOf('async onSave()'), js.indexOf('\n\t/** @deprecated', js.indexOf('async onSave()')))
assert.match(saveSource, /validateFormDuplicates\(\)/) assert.match(saveSource, /validateFormDuplicates\(\)/)
assert.ok( assert.ok(
saveSource.indexOf('validateFormDuplicates()') < saveSource.indexOf('validateFormDuplicates()') <
saveSource.indexOf('flushAllVinApiValidation()') saveSource.indexOf('prepareForSubmit')
) )
assert.doesNotMatch(saveSource, /flushAllVinApiValidation/)
assert.doesNotMatch(js, /findDuplicateStoreDailyPhoneRows/) assert.doesNotMatch(js, /findDuplicateStoreDailyPhoneRows/)
}) })
...@@ -682,21 +683,18 @@ describe('storeDailyReport page contract', () => { ...@@ -682,21 +683,18 @@ describe('storeDailyReport page contract', () => {
assert.equal(getClearVinPendingCalls(), 1) assert.equal(getClearVinPendingCalls(), 1)
}) })
it('IT-STORE-DAILY-PAGE-015: wires VIN blur events and validates with the API result map', () => { it('IT-STORE-DAILY-PAGE-015: validates the form without a VIN API result map', () => {
assert.match(wxml, /bind:blur="onFieldBlur"/)
assert.match(wxml, /bind:groupblur="onGroupFieldBlur"/)
const { page } = createStorePageHarness() const { page } = createStorePageHarness()
let validateOptions let validateArgs
page.engine = { page.engine = {
validate(options) { validate(...args) {
validateOptions = options validateArgs = args
return { ok: true, errorMap: {} } return { ok: true, errorMap: {} }
}, },
getViewState: () => ({ values: {}, groupRowsCache: {} }) getViewState: () => ({ values: {}, groupRowsCache: {} })
} }
assert.equal(page.validateFormRequired({ vin: true }), true) assert.equal(page.validateFormRequired(), true)
assert.deepEqual(validateOptions, { vinApiValidMap: { vin: true } }) assert.deepEqual(validateArgs, [])
}) })
it('IT-STORE-DAILY-PAGE-016: exposes the historical VIN OCR write-back bridge', () => { it('IT-STORE-DAILY-PAGE-016: exposes the historical VIN OCR write-back bridge', () => {
...@@ -704,11 +702,9 @@ describe('storeDailyReport page contract', () => { ...@@ -704,11 +702,9 @@ describe('storeDailyReport page contract', () => {
assert.equal(typeof page.openVinOcrForField, 'function') assert.equal(typeof page.openVinOcrForField, 'function')
assert.equal(typeof page.applyVinOcrResult, 'function') assert.equal(typeof page.applyVinOcrResult, 'function')
assert.equal(typeof page.reWrite, 'function') assert.equal(typeof page.reWrite, 'function')
assert.match(js, /flushAllVinApiValidation/)
assert.match(js, /validateVinImmediate/)
}) })
it('IT-STORE-DAILY-PAGE-VIN-017: reports the concrete VIN validation message', () => { it('IT-STORE-DAILY-PAGE-VIN-017: reports the concrete template validation message', () => {
let toastMessage = '' let toastMessage = ''
const { page } = createStorePageHarness({ const { page } = createStorePageHarness({
wx: { wx: {
...@@ -723,14 +719,14 @@ describe('storeDailyReport page contract', () => { ...@@ -723,14 +719,14 @@ describe('storeDailyReport page contract', () => {
page.engine = { page.engine = {
validate: () => ({ validate: () => ({
ok: false, ok: false,
errorMap: { 'F2-107__0__F2-107-9': '请输入 17 位有效字符' }, errorMap: { 'F2-107__0__F2-107-9': '客户车架号不能超过20字' },
errors: [{ message: '请输入 17 位有效字符' }] errors: [{ message: '客户车架号不能超过20字' }]
}), }),
getViewState: () => ({ values: {}, groupRowsCache: {} }) getViewState: () => ({ values: {}, groupRowsCache: {} })
} }
assert.equal(page.validateFormRequired(), false) assert.equal(page.validateFormRequired(), false)
assert.equal(toastMessage, '请输入 17 位有效字符') assert.equal(toastMessage, '客户车架号不能超过20字')
}) })
it('IT-STORE-DAILY-PAGE-VIN-018: writes OCR VIN into the addressed subform row', () => { it('IT-STORE-DAILY-PAGE-VIN-018: writes OCR VIN into the addressed subform row', () => {
...@@ -768,51 +764,9 @@ describe('storeDailyReport page contract', () => { ...@@ -768,51 +764,9 @@ describe('storeDailyReport page contract', () => {
assert.deepEqual(appliedExtra.errors, { other: 'keep' }) assert.deepEqual(appliedExtra.errors, { other: 'keep' })
}) })
it('IT-STORE-DAILY-PAGE-VIN-019: save-time flush immediately validates every VIN through the API', async () => { it('IT-STORE-DAILY-PAGE-VIN-019: does not expose a save-time VIN API flush', () => {
let immediateCall const { page } = createStorePageHarness()
const errorKey = 'F2-107__0__F2-107-9' assert.equal(page.flushAllVinApiValidation, undefined)
const { page } = createStorePageHarness({
modules: {
'~/utils/vinVaildate.js': {
validateVin: async () => ({ data: { data: { valid: true } } }),
async validateVinImmediate(vin, options) {
immediateCall = { vin, options }
return { data: { data: { valid: false } } }
},
cancelPendingVinDebounce() {}
},
'../../form-engine/vin-api-valid-tracker.js': {
buildVinErrorKey: ({ groupKey, rowIndex, childKey }) =>
groupKey ? `${groupKey}__${rowIndex}__${childKey}` : childKey,
shouldRunVinApiValidate: value => String(value || '').length === 17,
runVinApiValidate: async () => ({ ok: true, valid: true }),
async runVinApiValidateImmediate(vin, validateFn, options) {
const result = await validateFn(vin, options)
return { ok: true, valid: result?.data?.data?.valid !== false }
},
listVinScanCellsFromCache: () => [{
errorKey,
vin: 'LHGCM82633A123456'
}],
async buildVinApiValidMapFromEntries(entries, runOne) {
const result = await runOne(entries[0].vin)
return { [entries[0].errorKey]: result.ok && result.valid }
}
}
}
})
page.engine = {
getViewState: () => ({ groupRowsCache: { 'F2-107': [] } })
}
const result = await page.flushAllVinApiValidation()
assert.deepEqual(immediateCall, {
vin: 'LHGCM82633A123456',
options: { silent: true }
})
assert.equal(result.vinApiValidMap[errorKey], false)
assert.equal(page.data.errors[errorKey], '车架号校验不匹配,请核对后重新输入')
}) })
async function runSaveConflictScenario({ async function runSaveConflictScenario({
......
import { describe, it } from 'node:test'
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
function validateFixedField(validateForm, field, value, options = {}) {
return validateForm(
[field],
{},
{ [field.key]: value },
{},
options
)
}
function loadPageWithoutVinValidationService(relativePath) {
const source = readFileSync(new URL(relativePath, import.meta.url), 'utf8').replace(
/import\s*{([\s\S]*?)}\s*from\s*'~\/utils\/vinVaildate\.js'/,
"const {$1} = require('~/utils/vinVaildate.js')"
)
let definition
const fallbackModule = new Proxy(
{},
{
get: () => () => ({})
}
)
const requireForPage = specifier => {
if (specifier === '~/utils/vinVaildate.js') {
throw new Error('daily report pages must not load the VIN validation service')
}
return fallbackModule
}
new Function('require', 'Page', 'wx', source)(
requireForPage,
config => {
definition = config
},
{}
)
return definition
}
function loadInputComponentWithoutVinValidationService() {
const source = readFileSync(
new URL('../components/form-field-input/form-field-input.js', import.meta.url),
'utf8'
)
let definition
const requireForComponent = specifier => {
if (specifier === '~/utils/vinVaildate.js') {
throw new Error('input component must not load the VIN validation service')
}
return {}
}
new Function('require', 'Component', 'wx', source)(
requireForComponent,
config => {
definition = config
},
{}
)
return definition
}
describe('VIN template-only validation', async () => {
const { validateForm } = await import('../form-engine/validator.js')
it('accepts an optional store VIN when it satisfies the template maxLength rule', () => {
const field = {
key: 'F2-107-9',
type: 'input',
label: '客户车架号',
required: false,
prefixComponent: 'scan',
rules: { maxLength: 20 }
}
const result = validateFixedField(validateForm, field, 'SHORT', {
vinApiValidMap: { 'F2-107-9': false }
})
assert.equal(result.ok, true, JSON.stringify(result.errorMap))
})
it('rejects a store VIN longer than the template maxLength', () => {
const field = {
key: 'F2-107-9',
type: 'input',
label: '客户车架号',
required: false,
prefixComponent: 'scan',
rules: { maxLength: 20 }
}
const result = validateFixedField(validateForm, field, 'A'.repeat(21))
assert.equal(result.ok, false)
assert.equal(result.errorMap['F2-107-9'], '客户车架号不能超过20字')
})
it('uses only the negotiation template required rule for VIN', () => {
const field = {
key: 'F3-1-7',
type: 'input',
label: '车架号',
required: true,
prefixComponent: 'scan',
rules: {}
}
const empty = validateFixedField(validateForm, field, '')
const filled = validateFixedField(validateForm, field, 'SHORT', {
vinApiValidMap: { 'F3-1-7': false }
})
assert.equal(empty.ok, false)
assert.equal(empty.errorMap['F3-1-7'], '车架号不能为空')
assert.equal(filled.ok, true, JSON.stringify(filled.errorMap))
})
it('loads both daily report pages without the VIN validation service', () => {
assert.ok(loadPageWithoutVinValidationService('../pages/storeDailyReport/storeDailyReport.js'))
assert.ok(loadPageWithoutVinValidationService('../pages/negotiationDetail/negotiationDetail.js'))
})
it('keeps scan input length driven by the same template rule as a normal input', () => {
const component = loadInputComponentWithoutVinValidationService()
const context = {
data: structuredClone(component.data),
setData(patch) {
Object.assign(this.data, patch)
}
}
component.methods.observeField.call(context, {
prefixComponent: 'scan',
rules: {}
})
assert.equal(context.data.maxLength, 140)
component.methods.observeField.call(context, {
prefixComponent: 'scan',
rules: { maxLength: 20 }
})
assert.equal(context.data.maxLength, 20)
})
})
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<!-- picker --> <!-- picker -->
<picker wx:if="{{item.type == 'select'}}" bindchange="handlePickerChange" data-target="{{item}}" value="{{filterUtils.getPickerIndex(formData, item)}}" disabled="{{item.disabled||disable}}" range="{{item.optionList}}" range-key="{{item.optionLabel}}"> <picker wx:if="{{item.type == 'select'}}" bindchange="handlePickerChange" data-target="{{item}}" value="{{filterUtils.getPickerIndex(formData, item)}}" disabled="{{item.disabled||disable}}" 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="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}"> <view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}} {{formData[item.labelName]}}
</view> </view>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<!-- 省市区 --> <!-- 省市区 -->
<block wx:if="{{item.type == 'region'}}"> <block wx:if="{{item.type == 'region'}}">
<view class="picker" bindtap="showAreaFun"> <view class="picker" bindtap="showAreaFun">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}"> <view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}} {{formData[item.labelName]}}
</view> </view>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
level="{{item.level}}" level="{{item.level}}"
disabled="{{item.disabled||disable}}"> disabled="{{item.disabled||disable}}">
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}"> <view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}} {{formData[item.labelName]}}
</view> </view>
......
<!--packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.wxml--> <!--packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.wxml-->
<wxs src="/packageEquity/components/OrderNoPopup/index.wxs" module="filter" /> <wxs src="/packageEquity/components/OrderNoPopup/index.wxs" module="filter" />
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="80%" title="{{title}}"> <popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="80%" title="{{title}}">
<view class="switch-box"> <view class="switch-box">
<view class="block text-center {{ switchValue== 1?'':'labelRight' }}" /> <view class="block text-center {{ switchValue== 1?'':'labelRight' }}" />
<view class="left text-center {{ switchValue == 1?'active':'' }}" bindtap="changeSwitch" data-value="1">正常分账期</view> <view class="left text-center {{ switchValue == 1?'active':'' }}" bindtap="changeSwitch" data-value="1">正常分账期</view>
<view class="right text-center {{ switchValue == 2?'active':'' }}" bindtap="changeSwitch" data-value="2">超分账期 <view class="right text-center {{ switchValue == 2?'active':'' }}" bindtap="changeSwitch" data-value="2">超分账期
<image class="question" src="/components/images/question.png" catch:tap="showTips"></image> <image class="question" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/question.png" catch:tap="showTips"></image>
</view> </view>
</view> </view>
<scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="restPageNum" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" scroll-top="{{scrollTop}}" refresher-triggered="{{triggered}}"> <scroll-view class="order_no_box" scroll-y enable-back-to-top refresher-enabled="{{true}}" bindrefresherrefresh="restPageNum" bindscrolltolower="scrollonReachBottom" refresher-threshold="104" scroll-top="{{scrollTop}}" refresher-triggered="{{triggered}}">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</block> </block>
</view> </view>
<view class="checked" wx:if="{{item.active}}"> <view class="checked" wx:if="{{item.active}}">
<image src="../../../components/images/choose.png" /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png" />
</view> </view>
</view> </view>
</block> </block>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="popup-title text-center"> <view class="popup-title text-center">
接待客户列表 接待客户列表
<view class="close text-center" bindtap="hidePopup"> <view class="close text-center" bindtap="hidePopup">
<image src="/components/images/close.png" class='close-image' /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/close.png" class='close-image' />
</view> </view>
</view> </view>
<view class="popup-sub-title">选中对应接待记录,可实现便捷提单</view> <view class="popup-sub-title">选中对应接待记录,可实现便捷提单</view>
......
<!--packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml--> <!--packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml-->
<wxs src="/packageEquity/pages/carEquity/components/SecondStep/find.wxs" module="find" /> <wxs src="/packageEquity/pages/carEquity/components/SecondStep/find.wxs" module="find" />
<view> <view>
<view class="box"> <view class="box">
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
catchtap="handlePopupShow" catchtap="handlePopupShow"
> >
{{item.gearbox}} {{item.gearbox}}
<image class="arrow" src="/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" />
</view> </view>
</gl-form> </gl-form>
<gl-form <gl-form
......
<!-- packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxml --> <!-- packageEquity/pages/carEquity/components/FirstStep/FirstStep.wxml -->
<view class="firstStep"> <view class="firstStep">
<view class="box employeeBox"> <view class="box employeeBox">
<gl-cell border valueAlign="right" label="场景名称" class="pickerCell" required="{{true}}" requiredAfter="{{true}}" labelWidth="{{defaultLabelWidth}}"> <gl-cell border valueAlign="right" label="场景名称" class="pickerCell" required="{{true}}" requiredAfter="{{true}}" labelWidth="{{defaultLabelWidth}}">
<view class="picker" bindtap="handleScenePicker"> <view class="picker" bindtap="handleScenePicker">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <image class="pickerArrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{orderInfo.baseSceneCode }}">{{orderInfo.baseSceneName }}</view> <view class="text-hide" wx:if="{{orderInfo.baseSceneCode }}">{{orderInfo.baseSceneName }}</view>
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
range="{{employeeList}}" range="{{employeeList}}"
range-key="staffName"> --> range-key="staffName"> -->
<view class="picker" bindtap="handleReferrerPicker"> <view class="picker" bindtap="handleReferrerPicker">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <image class="pickerArrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{orderInfo.referrerId }}">{{orderInfo.referrer }}</view> <view class="text-hide" wx:if="{{orderInfo.referrerId }}">{{orderInfo.referrer }}</view>
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<block wx:if="{{pointsMultiRole=='Y'}}"> <block wx:if="{{pointsMultiRole=='Y'}}">
<gl-cell border valueAlign="right" label="交付专员" class="pickerCell" required="{{true}}" requiredAfter="{{true}}" labelWidth="{{defaultLabelWidth}}"> <gl-cell border valueAlign="right" label="交付专员" class="pickerCell" required="{{true}}" requiredAfter="{{true}}" labelWidth="{{defaultLabelWidth}}">
<view class="picker" bindtap="handleDeliveryPicker"> <view class="picker" bindtap="handleDeliveryPicker">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <image class="pickerArrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{orderInfo.deliveryId }}">{{orderInfo.deliveryName }}</view> <view class="text-hide" wx:if="{{orderInfo.deliveryId }}">{{orderInfo.deliveryName }}</view>
<text class="placeholder" wx:else>请选择</text> <text class="placeholder" wx:else>请选择</text>
</view> </view>
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<gl-cell border valueAlign="right" label="{{specific.specificationName}}" labelWidth="var(--fontSize180)" placeholder="请选择" bindclick="showPopup" background="#F7F7F7" data-show-name="specificBox" > <gl-cell border valueAlign="right" label="{{specific.specificationName}}" labelWidth="var(--fontSize180)" placeholder="请选择" bindclick="showPopup" background="#F7F7F7" data-show-name="specificBox" >
<picker bindchange="handlePickerChange" data-item="{{i}}" value="{{specific.value}}" data-specIndex="{{specInd}}" data-index="{{ind}}" range="{{specific.specificationSelectValueList}}"> <picker bindchange="handlePickerChange" data-item="{{i}}" value="{{specific.value}}" data-specIndex="{{specInd}}" data-index="{{ind}}" range="{{specific.specificationSelectValueList}}">
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{specific.value}}"> <view class="text-hide" wx:if="{{specific.value}}">
{{specific.value}} {{specific.value}}
</view> </view>
......
<!-- packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml --> <!-- packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml -->
<!-- <scroll-view scroll-y style="height:100vh;"> --> <!-- <scroll-view scroll-y style="height:100vh;"> -->
<view class="testFormCon"> <view class="testFormCon">
<view class="selectBox insuranceCompany" data-attrtype="business" data-attrname="company" data-typename="companytype" catchtap="handlePopupShow"> <view class="selectBox insuranceCompany" data-attrtype="business" data-attrname="company" data-typename="companytype" catchtap="handlePopupShow">
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class="right"> <view class="right">
<view class="Company" wx:if="{{ orderInfo.business.company }}">{{orderInfo.business.company}}</view> <view class="Company" wx:if="{{ orderInfo.business.company }}">{{orderInfo.business.company}}</view>
<view class="Company placeHolder" wx:else>请选择</view> <view class="Company placeHolder" wx:else>请选择</view>
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
</view> </view>
</view> </view>
<van-collapse value="{{ activeNames }}" bind:change="onChange"> <van-collapse value="{{ activeNames }}" bind:change="onChange">
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<view class="title">第三方责任险</view> <view class="title">第三方责任险</view>
<view class="selectItem" data-attrType="business" data-attrName="three" data-typename="threetype" catchtap="handlePopupShow"> <view class="selectItem" data-attrType="business" data-attrName="three" data-typename="threetype" catchtap="handlePopupShow">
{{orderInfo.business.three}} {{orderInfo.business.three}}
<image class="arrow" src="/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" />
</view> </view>
<van-field class="inputBox" border="{{ false }}" disabled="{{ disable }}" placeholder="请输入保费" data-hold-keyboard value="{{ orderInfo.business.threePremium }}" type="digit" data-type="number" data-attrType="business" data-attrName="threePremium" bindinput="handleInput"> <van-field class="inputBox" border="{{ false }}" disabled="{{ disable }}" placeholder="请输入保费" data-hold-keyboard value="{{ orderInfo.business.threePremium }}" type="digit" data-type="number" data-attrType="business" data-attrName="threePremium" bindinput="handleInput">
<view slot="left-icon"> <view slot="left-icon">
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<view class="title">车上人员责任险(司机)</view> <view class="title">车上人员责任险(司机)</view>
<view class="selectItem" data-attrType="business" data-attrName="driver" data-typename="drivertype" catchtap="handlePopupShow"> <view class="selectItem" data-attrType="business" data-attrName="driver" data-typename="drivertype" catchtap="handlePopupShow">
{{orderInfo.business.driver}} {{orderInfo.business.driver}}
<image class="arrow" src="/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" />
</view> </view>
<van-field class="inputBox" border="{{ false }}" data-hold-keyboard disabled="{{ disable }}" placeholder="请输入保费" data-type="number" value="{{ orderInfo.business.carInsidePremium }}" data-attrType="business" data-attrName="carInsidePremium" type="digit" bindinput="handleInput"> <van-field class="inputBox" border="{{ false }}" data-hold-keyboard disabled="{{ disable }}" placeholder="请输入保费" data-type="number" value="{{ orderInfo.business.carInsidePremium }}" data-attrType="business" data-attrName="carInsidePremium" type="digit" bindinput="handleInput">
<view slot="left-icon"> <view slot="left-icon">
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<view class="title">车上人员责任险(乘客)</view> <view class="title">车上人员责任险(乘客)</view>
<view class="selectItem" data-attrType="business" data-attrName="passenger" data-typename="passengertype" catchtap="handlePopupShow"> <view class="selectItem" data-attrType="business" data-attrName="passenger" data-typename="passengertype" catchtap="handlePopupShow">
{{orderInfo.business.passenger}} {{orderInfo.business.passenger}}
<image class="arrow" src="/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" />
</view> </view>
<van-field class="inputBox" border="{{ false }}" data-hold-keyboard disabled="{{ disable }}" placeholder="请输入保费" data-type="number" value="{{ orderInfo.business.passengerPremium }}" data-attrType="business" data-attrName="passengerPremium" type="digit" bindinput="handleInput"> <van-field class="inputBox" border="{{ false }}" data-hold-keyboard disabled="{{ disable }}" placeholder="请输入保费" data-type="number" value="{{ orderInfo.business.passengerPremium }}" data-attrType="business" data-attrName="passengerPremium" type="digit" bindinput="handleInput">
<view slot="left-icon"> <view slot="left-icon">
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<view class="title">车船税</view> <view class="title">车船税</view>
<view bind:tap="chooseYear" class="selectItem"> <view bind:tap="chooseYear" class="selectItem">
{{orderInfo.vehiclesAndVessels.compensation||''}} {{orderInfo.vehiclesAndVessels.compensation||''}}
<image class="arrow" src="/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" />
</view> </view>
<van-field class="inputBox" border="{{ false }}" data-hold-keyboard disabled="{{ disable }}" placeholder="请输入保费" data-type="number" value="{{ orderInfo.vehiclesAndVessels.payPrice }}" data-attrType="vehiclesAndVessels" data-attrName="payPrice" type="digit" bindinput="handleInput"> <van-field class="inputBox" border="{{ false }}" data-hold-keyboard disabled="{{ disable }}" placeholder="请输入保费" data-type="number" value="{{ orderInfo.vehiclesAndVessels.payPrice }}" data-attrType="vehiclesAndVessels" data-attrName="payPrice" type="digit" bindinput="handleInput">
<view slot="left-icon"> <view slot="left-icon">
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<gl-cell border valueAlign="right" label="客户类型" labelWidth="var(--fontSize140)"> <gl-cell border valueAlign="right" label="客户类型" labelWidth="var(--fontSize140)">
<picker bindchange="handlePickerChange" value="{{orderObj.owner.salesType}}" range="{{salesTypeList}}" > <picker bindchange="handlePickerChange" value="{{orderObj.owner.salesType}}" range="{{salesTypeList}}" >
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide"> <view class="text-hide">
{{salesTypeList[orderObj.owner.salesType]}} {{salesTypeList[orderObj.owner.salesType]}}
</view> </view>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" rangeAll dateType="single" calenderColor="#347BFF" vertical minDate="2020-10-01" maxDate="{{ dateObj.maxDate }}" isComponents> <calendar id="calender" class="calendar" allowSameDay shortcut bindselect="rangeSelect" rangeAll dateType="single" calenderColor="#347BFF" vertical minDate="2020-10-01" maxDate="{{ dateObj.maxDate }}" isComponents>
<view class="calendarItem text-center dateNum"> <view class="calendarItem text-center dateNum">
{{dateObj.todayShow}} {{dateObj.todayShow}}
<image class="solidArrow" src="/tabIndex/images/arrSolid.png" /> <image class="solidArrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/images/arrSolid.png" />
</view> </view>
</calendar> </calendar>
</view> </view>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<!-- <calendar id="calender" class="calendar" disabled="{{true}}" allowSameDay shortcut bindselect="rangeSelect" rangeAll dateType="single" calenderColor="#347BFF" vertical minDate="2020-10-01" maxDate="{{ dateObj.maxDate }}" isComponents> --> <!-- <calendar id="calender" class="calendar" disabled="{{true}}" allowSameDay shortcut bindselect="rangeSelect" rangeAll dateType="single" calenderColor="#347BFF" vertical minDate="2020-10-01" maxDate="{{ dateObj.maxDate }}" isComponents> -->
<view class="calendarItem text-center dateNum"> <view class="calendarItem text-center dateNum">
{{dateObj.todayShow}} {{dateObj.todayShow}}
<image class="solidArrow" src="/tabIndex/images/arrSolid.png" /> <image class="solidArrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/images/arrSolid.png" />
</view> </view>
<!-- </calendar> --> <!-- </calendar> -->
</view> </view>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="popup-title text-center"> <view class="popup-title text-center">
接待客户列表 接待客户列表
<view class="close text-center" bindtap="hidePopup"> <view class="close text-center" bindtap="hidePopup">
<image src="/components/images/close.png" class='close-image' /> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/close.png" class='close-image' />
</view> </view>
</view> </view>
<view class="popup-sub-title">选中对应接待记录,可实现便捷提单</view> <view class="popup-sub-title">选中对应接待记录,可实现便捷提单</view>
......
...@@ -33,6 +33,6 @@ ...@@ -33,6 +33,6 @@
<image class="btn-icon" catchtap="jumpClueIndex" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/material/scene.png" /> <image class="btn-icon" catchtap="jumpClueIndex" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/material/scene.png" />
</block> </block>
<block wx:else> <block wx:else>
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
</block> </block>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
目录 目录
</block> </block>
<block wx:else> <block wx:else>
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
</block> </block>
</view> </view>
</block> </block>
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</view> </view>
</view> </view>
</view> </view>
<image class="icon-detail-arrow" src="/components/images/arrow-x.png" mode=""/> <image class="icon-detail-arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode=""/>
</view> </view>
<view wx:if="{{index < courseDetail.defeatReviewDetailList.length - 1}}" class="line"></view> <view wx:if="{{index < courseDetail.defeatReviewDetailList.length - 1}}" class="line"></view>
</block> </block>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
range-key="{{ item.optionLabel }}" range-key="{{ item.optionLabel }}"
> >
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{ formData[item.labelName] }}"> <view class="text-hide" wx:if="{{ formData[item.labelName] }}">
{{ formData[item.labelName] }} {{ formData[item.labelName] }}
</view> </view>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<!-- 省市区 --> <!-- 省市区 -->
<block wx:if="{{ item.type == 'region' }}"> <block wx:if="{{ item.type == 'region' }}">
<view class="picker" bindtap="showAreaFun" data-target="{{ item }}"> <view class="picker" bindtap="showAreaFun" data-target="{{ item }}">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{ formData[item.labelName] }}"> <view class="text-hide" wx:if="{{ formData[item.labelName] }}">
{{ formData[item.labelName] }} {{ formData[item.labelName] }}
</view> </view>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
level="{{item.level}}" level="{{item.level}}"
disabled="{{item.disabled||disable}}"> disabled="{{item.disabled||disable}}">
<view class="picker"> <view class="picker">
<image class="arrow" src="/components/images/arrow-x.png" /> <image class="arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.labelName]}}"> <view class="text-hide" wx:if="{{formData[item.labelName]}}">
{{formData[item.labelName]}} {{formData[item.labelName]}}
</view> </view>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{{item.name}}<text wx:if="{{item.name && item.phone}}" class="split">|</text>{{item.phone}} {{item.name}}<text wx:if="{{item.name && item.phone}}" class="split">|</text>{{item.phone}}
</view> </view>
<view class="active-icon" wx:if="{{item.active}}"> <view class="active-icon" wx:if="{{item.active}}">
<image src="/components/images/choose.png"></image> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/choose.png"></image>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<gl-form wx:if="{{ isShowObj.customer }}" id="customer" formData="{{ serviceInfo }}" dataAttrName="{{ dataAttrName }}" formDataList="{{ secondObj.customerFormList }}" bind:inputEvent="inputEvent" bind:inputBlur="inputBlur"> <gl-form wx:if="{{ isShowObj.customer }}" id="customer" formData="{{ serviceInfo }}" dataAttrName="{{ dataAttrName }}" formDataList="{{ secondObj.customerFormList }}" bind:inputEvent="inputEvent" bind:inputBlur="inputBlur">
<!-- 使用 slot 插入自定义内容 --> <!-- 使用 slot 插入自定义内容 -->
<view slot="referrerId" class="picker" catchtap="handleReferrerPicker"> <view slot="referrerId" class="picker" catchtap="handleReferrerPicker">
<image class="pickerArrow" src="/components/images/arrow-x.png" /> <image class="pickerArrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{evalOrderBasicReqDTO.sellerUserId}}"> <view class="text-hide" wx:if="{{evalOrderBasicReqDTO.sellerUserId}}">
{{evalOrderBasicReqDTO.sellerName}} {{evalOrderBasicReqDTO.sellerName}}
</view> </view>
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
bindtap="openDateTimePicker"> bindtap="openDateTimePicker">
<text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text> <text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text>
<text wx:else class="placeholder">请选择</text> <text wx:else class="placeholder">请选择</text>
<image src="/components/images/arrow-x.png" class="arrow-icon"></image> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" class="arrow-icon"></image>
</view> </view>
<input wx:if="{{item.type === 'input'}}" <input wx:if="{{item.type === 'input'}}"
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<image wx:if="{{item.location}}" class="location-icon" catch:tap="getLocation" data-key="{{item.key}}" src="{{IMG_URL}}usedCar/loaction-icon.png" mode=""/> <image wx:if="{{item.location}}" class="location-icon" catch:tap="getLocation" data-key="{{item.key}}" src="{{IMG_URL}}usedCar/loaction-icon.png" mode=""/>
<view class="flex align-center" style="width: 100%;justify-content: flex-end;" wx:if="{{item.type === 'pdf'}}" bindtap="handlePdf"> <view class="flex align-center" style="width: 100%;justify-content: flex-end;" wx:if="{{item.type === 'pdf'}}" bindtap="handlePdf">
<view class="placeholder">{{isShowPreview ? '点击编辑' : '点击添加'}}</view> <view class="placeholder">{{isShowPreview ? '点击编辑' : '点击添加'}}</view>
<image src="/components/images/arrow-x.png" class="arrow-icon"></image> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" class="arrow-icon"></image>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<block wx:else> <block wx:else>
<text class="placeholder">请选择</text> <text class="placeholder">请选择</text>
</block> </block>
<image class="icon" src="/components/images/arrow-x.png" mode=""/> <image class="icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" mode=""/>
</view> </view>
<view class="btn" bindtap="addSignAgreement"><image class="add-icon" src="{{IMG_URL}}zy-upload_icon.png" />新增保管人</view> <view class="btn" bindtap="addSignAgreement"><image class="add-icon" src="{{IMG_URL}}zy-upload_icon.png" />新增保管人</view>
</view> </view>
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
bindtap="openDateTimePicker"> bindtap="openDateTimePicker">
<text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text> <text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text>
<text wx:else class="placeholder">{{item.placeholder || '请选择'}}</text> <text wx:else class="placeholder">{{item.placeholder || '请选择'}}</text>
<image src="/components/images/arrow-x.png" class="arrow-icon"></image> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" class="arrow-icon"></image>
</view> </view>
<block wx:if="{{item.type == 'radio'}}"> <block wx:if="{{item.type == 'radio'}}">
<view class="radio-item mr-20" wx:key="index" bindtap="typeChange" data-value="{{0}}"> <view class="radio-item mr-20" wx:key="index" bindtap="typeChange" data-value="{{0}}">
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
bindtap="openDateTimePicker"> bindtap="openDateTimePicker">
<text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text> <text wx:if="{{formData[item.key]}}">{{formData[item.key]}}</text>
<text wx:else class="placeholder">请选择</text> <text wx:else class="placeholder">请选择</text>
<image src="/components/images/arrow-x.png" class="arrow-icon"></image> <image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/components/images/arrow-x.png" class="arrow-icon"></image>
</view> </view>
<input wx:if="{{item.type === 'input'}}" <input wx:if="{{item.type === 'input'}}"
......
...@@ -49,59 +49,59 @@ ...@@ -49,59 +49,59 @@
<view class="set_box"> <view class="set_box">
<view class="set_item " bindtap="showWork" wx:if="{{isForbidden}}"> <view class="set_item " bindtap="showWork" wx:if="{{isForbidden}}">
<view class="title">工位设置 <view class="title">工位设置
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<!-- font-size: var(--fontSize32); --> <!-- font-size: var(--fontSize32); -->
<view class="set_tips" wx:if="{{workCount>0}}"><text style="color: #333333; font-weight: 500;">{{workCount}}</text> 个</view> <view class="set_tips" wx:if="{{workCount>0}}"><text style="color: #333333; font-weight: 500;">{{workCount}}</text> 个</view>
<view class="set_tips" wx:else>根据门店设置工位数</view> <view class="set_tips" wx:else>根据门店设置工位数</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="showMerchantPop" wx:if="{{isForbidden}}"> <view class="set_item " bindtap="showMerchantPop" wx:if="{{isForbidden}}">
<view class="title">录单设置 <view class="title">录单设置
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">设置录单必填项</view> <view class="set_tips">设置录单必填项</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="changeScene"> <view class="set_item " bindtap="changeScene">
<view class="title">场景切换 <view class="title">场景切换
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">{{selectedSceneName}}</view> <view class="set_tips">{{selectedSceneName}}</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goReservationCouponPage" wx:if="{{isForbidden}}"> <view class="set_item " bindtap="goReservationCouponPage" wx:if="{{isForbidden}}">
<view class="title">领券预约 <view class="title">领券预约
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">设置接待电话</view> <view class="set_tips">设置接待电话</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goTechnicianSetupPage" wx:if="{{isForbidden}}"> <view class="set_item " bindtap="goTechnicianSetupPage" wx:if="{{isForbidden}}">
<view class="title">技师设置 <view class="title">技师设置
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">设置园区店技师</view> <view class="set_tips">设置园区店技师</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goConstructSetupPage" wx:if="{{isForbidden}}"> <view class="set_item " bindtap="goConstructSetupPage" wx:if="{{isForbidden}}">
<view class="title">完成施工 <view class="title">完成施工
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">设置施工完成上传图片</view> <view class="set_tips">设置施工完成上传图片</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<view class="set_item " bindtap="goVersionPage"> <view class="set_item " bindtap="goVersionPage">
<view class="title">更新日志 <view class="title">更新日志
<!-- <image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> --> <!-- <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" /> -->
</view> </view>
<view class="set_tips">最新{{versionData.version}}版</view> <view class="set_tips">最新{{versionData.version}}版</view>
<image class="icon_image" src="../../images/right.png" mode="" /> <image class="icon_image" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/right.png" mode="" />
</view> </view>
<!-- <view class="set_item item_1" bindtap="showWork"> <!-- <view class="set_item item_1" bindtap="showWork">
<view class="title">工位设置 <view class="title">工位设置
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips" wx:if="{{workCount>0}}"><text style="font-size: var(--fontSize32);color: #333333; font-weight: 500;">{{workCount}}</text>个</view> <view class="set_tips" wx:if="{{workCount>0}}"><text style="font-size: var(--fontSize32);color: #333333; font-weight: 500;">{{workCount}}</text>个</view>
<view class="set_tips" wx:else>根据门店设置工位数</view> <view class="set_tips" wx:else>根据门店设置工位数</view>
...@@ -109,42 +109,42 @@ ...@@ -109,42 +109,42 @@
</view> </view>
<view class="set_item item_2" bindtap="showMerchantPop"> <view class="set_item item_2" bindtap="showMerchantPop">
<view class="title">录单设置 <view class="title">录单设置
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips">设置录单必填项</view> <view class="set_tips">设置录单必填项</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_2.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}mine_icon_2.png" mode="" />
</view> </view>
<view class="set_item item_3" bindtap="changeScene"> <view class="set_item item_3" bindtap="changeScene">
<view class="title">场景切换 <view class="title">场景切换
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips">{{selectedSceneName}}</view> <view class="set_tips">{{selectedSceneName}}</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}mine_icon_3.png" mode="" />
</view> </view>
<view class="set_item item_4" bindtap="goVersionPage"> <view class="set_item item_4" bindtap="goVersionPage">
<view class="title">更新日志 <view class="title">更新日志
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips">最新{{versionData.version}}版</view> <view class="set_tips">最新{{versionData.version}}版</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}mine_icon_1.png" mode="" />
</view> </view>
<view class="set_item item_5" bindtap="goReservationCouponPage"> <view class="set_item item_5" bindtap="goReservationCouponPage">
<view class="title">领券预约 <view class="title">领券预约
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips">设置接待电话</view> <view class="set_tips">设置接待电话</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_5.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}mine_icon_5.png" mode="" />
</view> </view>
<view class="set_item item_6" bindtap="goTechnicianSetupPage"> <view class="set_item item_6" bindtap="goTechnicianSetupPage">
<view class="title">技师设置 <view class="title">技师设置
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips">设置园区店技师</view> <view class="set_tips">设置园区店技师</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_6.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}mine_icon_6.png" mode="" />
</view> </view>
<view class="set_item item_7" bindtap="goConstructSetupPage"> <view class="set_item item_7" bindtap="goConstructSetupPage">
<view class="title">完成施工 <view class="title">完成施工
<image class="arrow_icon" src="../../images/arrow_icon.png" mode="" /> <image class="arrow_icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/pages/tabMine/images/arrow_icon.png" mode="" />
</view> </view>
<view class="set_tips">设置施工完成上传图片</view> <view class="set_tips">设置施工完成上传图片</view>
<image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode="" /> <image class="icon_image" src="{{IMG_URL}}mine_icon_7.png" mode="" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!