|
@@ -17,9 +17,12 @@
|
|
:label-col="formItemLayout.labelCol"
|
|
:label-col="formItemLayout.labelCol"
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
:wrapper-col="formItemLayout.wrapperCol"
|
|
>
|
|
>
|
|
- <a-form-model-item label="选择二级分类" prop="productTypeSn2">
|
|
|
|
- <a-select id="pushOrderManagement-print-form" v-model="form.productTypeSn2" placeholder="请选择分类">
|
|
|
|
- <a-select-option v-for="item in typeList" :value="item.productTypeSn2" :key="item.productTypeSn2">{{ item.productTypeName2 }}</a-select-option>
|
|
|
|
|
|
+ <a-form-model-item label="产品分类" prop="id">
|
|
|
|
+ <a-select id="pushOrderManagement-print-form" v-model="form.id" placeholder="请选择产品分类">
|
|
|
|
+ <a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
|
|
|
|
+ <span v-if="item.id != 'all'">{{ item.productBrandName }} - {{ item.productTypeName3 }}</span>
|
|
|
|
+ <span v-else>全部</span>
|
|
|
|
+ </a-select-option>
|
|
</a-select>
|
|
</a-select>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
</a-form-model>
|
|
</a-form-model>
|
|
@@ -48,10 +51,10 @@ export default {
|
|
return {
|
|
return {
|
|
isShow: this.openModal, // 是否打开弹框
|
|
isShow: this.openModal, // 是否打开弹框
|
|
form: {
|
|
form: {
|
|
- productTypeSn2: undefined
|
|
|
|
|
|
+ id: undefined
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- productTypeSn2: [{ required: true, message: '请选择分类', trigger: 'change' }]
|
|
|
|
|
|
+ id: [{ required: true, message: '请选择产品分类', trigger: 'change' }]
|
|
},
|
|
},
|
|
formItemLayout: {
|
|
formItemLayout: {
|
|
labelCol: { span: 6 },
|
|
labelCol: { span: 6 },
|
|
@@ -67,7 +70,14 @@ export default {
|
|
const _this = this
|
|
const _this = this
|
|
this.$refs.ruleForm.validate(valid => {
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- _this.$emit('ok', _this.form.productTypeSn2)
|
|
|
|
|
|
+ const item = this.typeList.find(item => item.id == this.form.id)
|
|
|
|
+ if (item) {
|
|
|
|
+ const obj = {
|
|
|
|
+ productBrandSn: item.productBrandSn,
|
|
|
|
+ productTypeSn3: item.productTypeSn3
|
|
|
|
+ }
|
|
|
|
+ _this.$emit('ok', obj)
|
|
|
|
+ }
|
|
_this.isShow = false
|
|
_this.isShow = false
|
|
} else {
|
|
} else {
|
|
console.log('error submit!!')
|
|
console.log('error submit!!')
|
|
@@ -82,7 +92,7 @@ export default {
|
|
},
|
|
},
|
|
// 获取该销售单产品二级分类
|
|
// 获取该销售单产品二级分类
|
|
getTypeData () {
|
|
getTypeData () {
|
|
- this.typeList = [{ productTypeSn2: 'all', productTypeName2: '全部' }]
|
|
|
|
|
|
+ this.typeList = [{ id: 'all' }]
|
|
dispatchDetailType({ dispatchBillSn: this.outBizSubSn || this.$route.params.sn }).then(res => {
|
|
dispatchDetailType({ dispatchBillSn: this.outBizSubSn || this.$route.params.sn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
if (res.data && res.data.length > 0) {
|
|
if (res.data && res.data.length > 0) {
|