Commit c817895a by 李伟康

fix(Form): 更新表单组件中的只读属性为禁用属性

将 GlCell.vue 中的 `readonly` 属性替换为 `disabled`,以统一控制输入框状态。

feat(equity-form): 优化权益商品表单数据初始化逻辑

避免在 externalData 变化时重复覆盖 goodInfoList 数据,提升表单稳定性。

feat(equity-tire): 防止轮胎表单数据被意外重置

在监听 externalData 时增加判断,若 tireObj 已有数据则不再重新赋值,防止数据丢失。
1 parent 49e47de8
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
:maxlength="item.maxlength ? item.maxlength : -1" :maxlength="item.maxlength ? item.maxlength : -1"
placeholder-class="input-placeholder" placeholder-class="input-placeholder"
@input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null" @input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null"
:readonly="item.readonly || false" :disabled="item.readonly || item.disabled || false"
/> />
<view <view
v-if="item.valueIcon" v-if="item.valueIcon"
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
watch: { watch: {
externalData: { externalData: {
handler (val) { handler (val) {
this.goodInfoList = val.goodInfoList || [] if (!this.goodInfoList.length) this.goodInfoList = val.goodInfoList || []
}, },
deep: true, deep: true,
immediate: true immediate: true
...@@ -191,7 +191,7 @@ export default { ...@@ -191,7 +191,7 @@ export default {
extendServiceFormList, extendServiceFormList,
oilProFormList, oilProFormList,
cellBoxStyle: 'background: #f5f7fa;', cellBoxStyle: 'background: #f5f7fa;',
goodInfoList:[], goodInfoList: [],
viewKey: Date.now(), viewKey: Date.now(),
currentData: {}, currentData: {},
popupType: 0, popupType: 0,
......
...@@ -64,6 +64,7 @@ export default { ...@@ -64,6 +64,7 @@ export default {
watch: { watch: {
externalData: { externalData: {
handler (val) { handler (val) {
if (Object.keys(this.tireObj).length) return
const keyList = [ const keyList = [
'tireBrand', 'tireScale', 'tireBrand', 'tireScale',
'leftFrontDTO', 'leftFrontBatch', 'leftFrontDTO', 'leftFrontBatch',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!