|
@@ -17,46 +17,75 @@
|
|
|
:label-col="formItemLayout.labelCol"
|
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
|
>
|
|
|
- <a-form-model-item label="调往对象" prop="targetType">
|
|
|
- <a-radio-group v-model="form.targetType" @change="targetTypeChange">
|
|
|
- <a-radio v-for="(item,index) in targetTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
|
|
|
- </a-radio-group>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="调往对象名称" :prop="isDealer ? 'targetSn' : 'targetName'">
|
|
|
- <a-select
|
|
|
- v-if="isDealer"
|
|
|
- show-search
|
|
|
- id="allocateBill-basicInfo-dealerName"
|
|
|
- v-model="form.targetSn"
|
|
|
- placeholder="请选择"
|
|
|
- :filter-option="false"
|
|
|
- :not-found-content="fetching ? undefined : null"
|
|
|
- @search="fetchUser"
|
|
|
- @change="handleChange"
|
|
|
- >
|
|
|
- <a-spin v-if="fetching" slot="notFoundContent" size="small" />
|
|
|
- <a-select-option v-for="item in dealerData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- <a-input v-if="!isDealer" v-model.trim="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="调拨类型" prop="allocateTypeSn">
|
|
|
- <a-select id="allocateBill-basicInfo-allocateTypeSn" v-model="form.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
|
|
|
- <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="起止时间" prop="time">
|
|
|
- <a-range-picker
|
|
|
- style="width:100%"
|
|
|
- v-model="form.time"
|
|
|
- show-time
|
|
|
- :format="dateFormat"
|
|
|
- @change="dateChange"
|
|
|
- @calendarChange="dateCalendarChange"
|
|
|
- :placeholder="['开始时间', '结束时间']" />
|
|
|
- </a-form-model-item>
|
|
|
- <a-form-model-item label="备注" prop="remark">
|
|
|
- <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
|
|
|
- </a-form-model-item>
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="调往对象" prop="targetType">
|
|
|
+ <a-radio-group v-model="form.targetType" @change="targetTypeChange">
|
|
|
+ <a-radio v-for="(item,index) in targetTypeList" :key="index" :value="item.code">{{ item.dispName }}</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="调往对象名称" :prop="isDealer ? 'targetSn' : 'targetName'">
|
|
|
+ <a-select
|
|
|
+ v-if="isDealer"
|
|
|
+ show-search
|
|
|
+ id="allocateBill-basicInfo-dealerName"
|
|
|
+ v-model="form.targetSn"
|
|
|
+ placeholder="请选择"
|
|
|
+ :filter-option="false"
|
|
|
+ :not-found-content="fetching ? undefined : null"
|
|
|
+ @search="fetchUser"
|
|
|
+ @change="handleChange"
|
|
|
+ >
|
|
|
+ <a-spin v-if="fetching" slot="notFoundContent" size="small" />
|
|
|
+ <a-select-option v-for="item in dealerData" :key="item.dealerSn" :value="item.dealerSn">{{ item.dealerName }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ <a-input v-if="!isDealer" v-model.trim="form.targetName" placeholder="请输入调往对象名称(最多30个字符)" allowClear :maxLength="30" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="费用类型" prop="costTypeSn">
|
|
|
+ <a-select id="allocateBill-basicInfo-costTypeSn" v-model="form.costTypeSn" placeholder="请选择费用类型" allowClear >
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.costTypeSn" :value="item.costTypeSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="调拨类型" prop="allocateTypeSn">
|
|
|
+ <a-select id="allocateBill-basicInfo-allocateTypeSn" v-model="form.allocateTypeSn" placeholder="请选择调拨类型" allowClear >
|
|
|
+ <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="费用归属品牌">
|
|
|
+ <ProductBrand id="allocateBill-basicInfo-productBrandSn" v-model="form.productBrandSn" placeholder="请选择费用归属品牌"></ProductBrand>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="费用归属品类">
|
|
|
+ <productTypeAll placeholder="请选择产品分类" @change="changeProductType" v-model="productType" id="allocateBill-basicInfo-productType"></productTypeAll>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="起止时间" prop="time">
|
|
|
+ <a-range-picker
|
|
|
+ style="width:100%"
|
|
|
+ v-model="form.time"
|
|
|
+ show-time
|
|
|
+ :format="dateFormat"
|
|
|
+ @change="dateChange"
|
|
|
+ @calendarChange="dateCalendarChange"
|
|
|
+ :placeholder="['开始时间', '结束时间']" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="12" :sm="24">
|
|
|
+ <a-form-model-item label="备注" prop="remark">
|
|
|
+ <a-textarea id="allocateBill-basicInfo-remark" :maxLength="120" v-model="form.remark" placeholder="请输入备注(最多120个字符)" allowClear />
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-form-model>
|
|
|
<div class="btn-cont">
|
|
|
<a-button type="primary" :loading="spinning" id="allocateBill-basicInfo-modal-save" @click="handleSave">保存</a-button>
|
|
@@ -75,10 +104,12 @@ import { allocateBillSave } from '@/api/allocateBill'
|
|
|
import { dealerSubareaScopeList } from '@/api/dealer'
|
|
|
import { getLookUpData } from '@/api/data'
|
|
|
import { allocateTypeAllList } from '@/api/allocateType'
|
|
|
+import ProductBrand from '@/views/common/productBrand.js'
|
|
|
+import productTypeAll from '@/views/common/productTypeAll.js'
|
|
|
export default {
|
|
|
name: 'TransferOutBasicInfoModal',
|
|
|
mixins: [commonMixin],
|
|
|
- components: { VSelect },
|
|
|
+ components: { VSelect, ProductBrand, productTypeAll },
|
|
|
props: {
|
|
|
openModal: {
|
|
|
// 弹框显示状态
|
|
@@ -92,14 +123,20 @@ export default {
|
|
|
isShow: this.openModal, // 是否打开弹框
|
|
|
spinning: false,
|
|
|
formItemLayout: {
|
|
|
- labelCol: { span: 4 },
|
|
|
- wrapperCol: { span: 20 }
|
|
|
+ labelCol: { span: 6 },
|
|
|
+ wrapperCol: { span: 18 }
|
|
|
},
|
|
|
+ productType: [],
|
|
|
form: {
|
|
|
targetType: 'DEALER',
|
|
|
targetSn: undefined,
|
|
|
targetName: '',
|
|
|
+ costTypeSn: undefined,
|
|
|
allocateTypeSn: undefined,
|
|
|
+ productBrandSn: undefined, // 产品品牌
|
|
|
+ productTypeSn1: '', // 产品一级分类
|
|
|
+ productTypeSn2: '', // 产品二级分类
|
|
|
+ productTypeSn3: '', // 产品三级分类
|
|
|
time: [],
|
|
|
promoStartDate: '',
|
|
|
promoEndDate: '',
|
|
@@ -108,6 +145,7 @@ export default {
|
|
|
rules: {
|
|
|
targetType: [{ required: true, message: '请选择调往对象', trigger: 'change' }],
|
|
|
targetSn: [{ required: true, message: '请选择调往对象名称', trigger: 'change' }],
|
|
|
+ costTypeSn: [{ required: true, message: '请选择费用类型', trigger: 'change' }],
|
|
|
targetName: [{ required: true, message: '请输入调往对象名称', trigger: 'blur' }],
|
|
|
allocateTypeSn: [{ required: true, message: '请选择调拨类型', trigger: 'change' }]
|
|
|
},
|
|
@@ -148,6 +186,12 @@ export default {
|
|
|
dateCalendarChange (date, dateStrings) {
|
|
|
this.selectPriceDate = date[0]
|
|
|
},
|
|
|
+ // 产品分类 change
|
|
|
+ changeProductType (val, opt) {
|
|
|
+ this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
|
|
|
+ this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
+ this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
+ },
|
|
|
// 搜索经销商
|
|
|
fetchUser (value) {
|
|
|
console.log('fetching user', value)
|
|
@@ -235,8 +279,13 @@ export default {
|
|
|
this.form = {
|
|
|
targetType: 'DEALER',
|
|
|
targetSn: undefined,
|
|
|
+ costTypeSn: undefined,
|
|
|
targetName: '',
|
|
|
allocateTypeSn: undefined,
|
|
|
+ productBrandSn: undefined, // 产品品牌
|
|
|
+ productTypeSn1: '', // 产品一级分类
|
|
|
+ productTypeSn2: '', // 产品二级分类
|
|
|
+ productTypeSn3: '', // 产品三级分类
|
|
|
time: [],
|
|
|
promoStartDate: '',
|
|
|
promoEndDate: '',
|