|
@@ -21,13 +21,13 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="配件经销商" prop="dealerSn">
|
|
|
- <dealerList ref="dealerList" @change="dealerChange" v-if="!nowData" id="addGoodsShelve-dealerChange"></dealerList>
|
|
|
+ <dealerList ref="dealerList" @change="dealerChange" v-if="!nowData?true:false" id="addGoodsShelve-dealerChange"></dealerList>
|
|
|
<span v-else>{{ form.dealerName }}</span>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="汽车修理厂" prop="storeSn">
|
|
|
- <storeList ref="storeList" @change="storeChange" v-if="!nowData" id="addGoodsShelve-storeChange"></storeList>
|
|
|
+ <storeList ref="storeList" @change="storeChange" v-if="!nowData?true:false" id="addGoodsShelve-storeChange"></storeList>
|
|
|
<span v-else>{{ form.storeName }}</span>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -52,7 +52,7 @@
|
|
|
</a-row>
|
|
|
<a-row :gutter="24" v-if="form.ownerType===0">
|
|
|
<a-col :span="24">
|
|
|
- <a-form-model-item label="产品图片" prop="images" help="说明:请上传清晰、完整的图片,支持jpg/jpeg/png格式,不超过500KB(最多5张)。" :label-col="{span:3}" :wrapper-col="{span:20}">
|
|
|
+ <a-form-model-item label="货架图片" prop="images" help="说明:请上传清晰、完整的图片,支持jpg/jpeg/png格式,不超过500KB(最多5张)。" :label-col="{span:3}" :wrapper-col="{span:20}">
|
|
|
<Upload
|
|
|
class="upload"
|
|
|
id="addGoodsShelve-images"
|
|
@@ -68,7 +68,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="24">
|
|
|
<a-form-model-item label="备注" prop="remarks" :label-col="{span: 3}" :wrapper-col="{span: 20}">
|
|
|
- <a-textarea id="addGoodsShelve-remarks" v-model.trim="form.remarks":maxLength="500" allowClear placeholder="请输入备注(最多500个字符)"/>
|
|
|
+ <a-textarea id="addGoodsShelve-remarks" v-model.trim="form.remarks" :maxLength="500" allowClear placeholder="请输入备注(最多500个字符)"/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -214,23 +214,30 @@ export default {
|
|
|
this.$refs.ruleForm.resetFields()
|
|
|
this.titleText = '新增数字货架'
|
|
|
this.$emit('close')
|
|
|
- }
|
|
|
- },
|
|
|
- nowData: {
|
|
|
- handler (newValue, oldValue) {
|
|
|
- if (this.isshow && newValue) {
|
|
|
- if (this.nowData.id) { // 编辑
|
|
|
- this.titleText = '编辑数字货架'
|
|
|
- this.getShelfDetail()
|
|
|
- } else {
|
|
|
- this.$refs.storeList.resetForm()
|
|
|
- this.$refs.dealerList.resetForm()
|
|
|
- this.titleText = '新增数字货架'
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ if (this.nowData && this.nowData.id) { // 编辑
|
|
|
+ console.log(this.nowData.id, 'this.nowData.id')
|
|
|
+ this.titleText = '编辑数字货架'
|
|
|
+ this.getShelfDetail()
|
|
|
}
|
|
|
- },
|
|
|
- deep: true
|
|
|
+ }
|
|
|
}
|
|
|
+ // nowData: {
|
|
|
+ // handler (newValue, oldValue) {
|
|
|
+ // if (this.isshow && newValue) {
|
|
|
+ // // if (this.nowData.id) { // 编辑
|
|
|
+ // // console.log(this.nowData.id, 'this.nowData.id')
|
|
|
+ // // this.titleText = '编辑数字货架'
|
|
|
+ // // this.getShelfDetail()
|
|
|
+ // // } else {
|
|
|
+ // // // this.$refs.storeList.resetForm()
|
|
|
+ // // // this.$refs.dealerList.resetForm()
|
|
|
+ // // this.titleText = '新增数字货架'
|
|
|
+ // // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // deep: true
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
</script>
|