|
@@ -9,48 +9,48 @@
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<a-card size="small" :bordered="false" class="productInfoEdit-table-page-wrapper">
|
|
|
<a-form-model
|
|
|
- id="productInfoEdit-form"
|
|
|
- ref="ruleForm"
|
|
|
- :model="form"
|
|
|
- :rules="rules"
|
|
|
- :label-col="formItemLayout.labelCol"
|
|
|
- :wrapper-col="formItemLayout.wrapperCol"
|
|
|
+ id="productInfoEdit-form"
|
|
|
+ ref="ruleForm"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ :label-col="formItemLayout.labelCol"
|
|
|
+ :wrapper-col="formItemLayout.wrapperCol"
|
|
|
>
|
|
|
- <a-form-model-item label="产品名称" prop="name">
|
|
|
- <a-input
|
|
|
- id="productInfoEdit-name"
|
|
|
- :maxLength="100"
|
|
|
- v-model.trim="form.name"
|
|
|
- @change="filterEmpty"
|
|
|
- placeholder="请输入产品名称(最多100个字符)"
|
|
|
- allowClear />
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="产品编码" prop="code">
|
|
|
- <a-input
|
|
|
- id="productInfoEdit-code"
|
|
|
- :maxLength="100"
|
|
|
- :disabled="!!$route.params.id"
|
|
|
- v-model="form.code"
|
|
|
- placeholder="请输入产品编码(最多100个字符)"
|
|
|
- allowClear />
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="原厂编码" prop="origCode">
|
|
|
- <a-input
|
|
|
- id="productInfoEdit-origCode"
|
|
|
- :maxLength="200"
|
|
|
- :disabled="!!$route.params.id"
|
|
|
- v-model="form.origCode"
|
|
|
- placeholder="请输入原厂编码(最多200个字符,多个编码用逗号隔开)"
|
|
|
- allowClear />
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="基本单位" prop="unit">
|
|
|
- <a-input-group compact>
|
|
|
- <a-input style="width: 80%" v-model="form.unit" id="productInfoEdit-unit-input" placeholder="请输入基本单位" allowClear/>
|
|
|
- <v-select style="width: 20%" code="UNIT" @change="unitChange" id="productInfoEdit-unit" placeholder="快速选择单位"></v-select>
|
|
|
- </a-input-group>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="产品品牌" prop="productBrandSn">
|
|
|
- <!-- <a-select
|
|
|
+ <a-form-model-item label="产品名称" prop="name">
|
|
|
+ <a-input
|
|
|
+ id="productInfoEdit-name"
|
|
|
+ :maxLength="100"
|
|
|
+ v-model.trim="form.name"
|
|
|
+ @change="filterEmpty"
|
|
|
+ placeholder="请输入产品名称(最多100个字符)"
|
|
|
+ allowClear />
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="产品编码" prop="code">
|
|
|
+ <a-input
|
|
|
+ id="productInfoEdit-code"
|
|
|
+ :maxLength="100"
|
|
|
+ :disabled="!!$route.params.id"
|
|
|
+ v-model="form.code"
|
|
|
+ placeholder="请输入产品编码(最多100个字符)"
|
|
|
+ allowClear />
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="原厂编码" prop="origCode">
|
|
|
+ <a-input
|
|
|
+ id="productInfoEdit-origCode"
|
|
|
+ :maxLength="200"
|
|
|
+ :disabled="!!$route.params.id"
|
|
|
+ v-model="form.origCode"
|
|
|
+ placeholder="请输入原厂编码(最多200个字符,多个编码用逗号隔开)"
|
|
|
+ allowClear />
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="基本单位" prop="unit">
|
|
|
+ <a-input-group compact>
|
|
|
+ <a-input style="width: 80%" v-model="form.unit" id="productInfoEdit-unit-input" placeholder="请输入基本单位" allowClear/>
|
|
|
+ <v-select style="width: 20%" code="UNIT" @change="unitChange" id="productInfoEdit-unit" placeholder="快速选择单位"></v-select>
|
|
|
+ </a-input-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="产品品牌" prop="productBrandSn">
|
|
|
+ <!-- <a-select
|
|
|
id="productInfoEdit-productBrand"
|
|
|
placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
|
|
|
:disabled="!!$route.params.id"
|
|
@@ -62,77 +62,77 @@
|
|
|
style="width: 90%;">
|
|
|
<a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
|
|
|
</a-select> -->
|
|
|
- <a-select
|
|
|
- show-search
|
|
|
- id="productInfoEdit-productBrand"
|
|
|
- v-model="form.productBrandSn"
|
|
|
- placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
|
|
|
- :disabled="!!$route.params.id"
|
|
|
- :filter-option="false"
|
|
|
- :not-found-content="fetching ? undefined : null"
|
|
|
- @search="fetchUser"
|
|
|
- @change="handleChange"
|
|
|
- style="width: 90%;"
|
|
|
- >
|
|
|
- <a-spin v-if="fetching" slot="notFoundContent" size="small" />
|
|
|
- <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- <a-button
|
|
|
- @click="openModal=true"
|
|
|
- :disabled="!!$route.params.id"
|
|
|
- icon="plus"
|
|
|
- size="small"
|
|
|
- id="productInfoEdit-add-btn"
|
|
|
- style="margin-left: 5px;"></a-button>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="产品分类" prop="productType">
|
|
|
- <a-cascader
|
|
|
- :disabled="!!$route.params.id"
|
|
|
- @change="changeProductType"
|
|
|
- expand-trigger="hover"
|
|
|
- :options="productTypeList"
|
|
|
- :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
|
- id="productInfoEdit-productType"
|
|
|
- placeholder="请选择产品分类"
|
|
|
- allowClear
|
|
|
- v-model="form.productType" />
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="经销批发价" prop="specialPrice">
|
|
|
- <a-input-number
|
|
|
- id="productInfoEdit-specialPrice"
|
|
|
- v-model="form.specialPrice"
|
|
|
- :min="1"
|
|
|
- :max="999999"
|
|
|
- :precision="2"
|
|
|
- style="width: 90%;margin-right: 5px;"
|
|
|
- placeholder="请输入经销批发价(1~999999)"
|
|
|
- allowClear /><span>元</span>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="终端价" prop="terminalPrice">
|
|
|
- <a-input-number
|
|
|
- id="productInfoEdit-terminalPrice"
|
|
|
- v-model="form.terminalPrice"
|
|
|
- :min="1"
|
|
|
- :max="999999"
|
|
|
- :precision="2"
|
|
|
- style="width: 90%;margin-right: 5px;"
|
|
|
- placeholder="请输入终端价(1~999999)"
|
|
|
- allowClear /><span>元</span>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="车主价" prop="carOwnersPrice">
|
|
|
- <a-input-number
|
|
|
- id="productInfoEdit-carOwnersPrice"
|
|
|
- v-model="form.carOwnersPrice"
|
|
|
- :min="1"
|
|
|
- :max="999999"
|
|
|
- :precision="2"
|
|
|
- style="width: 90%;margin-right: 5px;"
|
|
|
- placeholder="请输入车主价(1~999999)"
|
|
|
- allowClear /><span>元</span>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
|
|
|
- <a-button type="primary" @click="handleSubmit" size="large" id="productInfoEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
|
|
|
- </a-form-model-item>
|
|
|
+ <a-select
|
|
|
+ show-search
|
|
|
+ id="productInfoEdit-productBrand"
|
|
|
+ v-model="form.productBrandSn"
|
|
|
+ placeholder="请输入名称或拼音查询,如果没有请点击 '+' 新增"
|
|
|
+ :disabled="!!$route.params.id"
|
|
|
+ :filter-option="false"
|
|
|
+ :not-found-content="fetching ? undefined : null"
|
|
|
+ @search="fetchUser"
|
|
|
+ @change="handleChange"
|
|
|
+ style="width: 90%;"
|
|
|
+ >
|
|
|
+ <a-spin v-if="fetching" slot="notFoundContent" size="small" />
|
|
|
+ <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-button
|
|
|
+ @click="openModal=true"
|
|
|
+ :disabled="!!$route.params.id"
|
|
|
+ icon="plus"
|
|
|
+ size="small"
|
|
|
+ id="productInfoEdit-add-btn"
|
|
|
+ style="margin-left: 5px;"></a-button>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="产品分类" prop="productType">
|
|
|
+ <a-cascader
|
|
|
+ :disabled="!!$route.params.id"
|
|
|
+ @change="changeProductType"
|
|
|
+ expand-trigger="hover"
|
|
|
+ :options="productTypeList"
|
|
|
+ :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
|
|
|
+ id="productInfoEdit-productType"
|
|
|
+ placeholder="请选择产品分类"
|
|
|
+ allowClear
|
|
|
+ v-model="form.productType" />
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="经销批发价" prop="specialPrice">
|
|
|
+ <a-input-number
|
|
|
+ id="productInfoEdit-specialPrice"
|
|
|
+ v-model="form.specialPrice"
|
|
|
+ :min="1"
|
|
|
+ :max="999999"
|
|
|
+ :precision="2"
|
|
|
+ style="width: 90%;margin-right: 5px;"
|
|
|
+ placeholder="请输入经销批发价(1~999999)"
|
|
|
+ allowClear /><span>元</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="终端价" prop="terminalPrice">
|
|
|
+ <a-input-number
|
|
|
+ id="productInfoEdit-terminalPrice"
|
|
|
+ v-model="form.terminalPrice"
|
|
|
+ :min="1"
|
|
|
+ :max="999999"
|
|
|
+ :precision="2"
|
|
|
+ style="width: 90%;margin-right: 5px;"
|
|
|
+ placeholder="请输入终端价(1~999999)"
|
|
|
+ allowClear /><span>元</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item label="车主价" prop="carOwnersPrice">
|
|
|
+ <a-input-number
|
|
|
+ id="productInfoEdit-carOwnersPrice"
|
|
|
+ v-model="form.carOwnersPrice"
|
|
|
+ :min="1"
|
|
|
+ :max="999999"
|
|
|
+ :precision="2"
|
|
|
+ style="width: 90%;margin-right: 5px;"
|
|
|
+ placeholder="请输入车主价(1~999999)"
|
|
|
+ allowClear /><span>元</span>
|
|
|
+ </a-form-model-item>
|
|
|
+ <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
|
|
|
+ <a-button type="primary" @click="handleSubmit" size="large" id="productInfoEdit-btn-submit" style="padding: 0 60px;">保存</a-button>
|
|
|
+ </a-form-model-item>
|
|
|
</a-form-model>
|
|
|
<!-- 新增/编辑产品品牌 -->
|
|
|
<product-brand-edit-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
|
|
@@ -255,7 +255,7 @@ export default {
|
|
|
_this.$router.push({ path: '/productManagement/productInfo/list' })
|
|
|
_this.spinning = false
|
|
|
}, 1000)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
_this.spinning = false
|
|
|
}
|
|
|
})
|