|
@@ -1,16 +1,17 @@
|
|
|
<template>
|
|
|
- <el-dialog append-to-body :title="dialogTitle" :visible.sync="addExplosiveProductsSubsidiaryVisible" width="30%" :before-close="handleBeforeClose">
|
|
|
+ <el-dialog :close-on-click-modal="false" append-to-body :title="dialogTitle" :visible.sync="addExplosiveProductsSubsidiaryVisible" width="30%" :before-close="handleBeforeClose">
|
|
|
<div class="add-explosive-productsSubsidiary-container">
|
|
|
<el-form ref="formRef" :model="form" :rules="rules" label-width="auto">
|
|
|
<el-form-item label="配销商品" prop="subsidiaryProductId">
|
|
|
<el-select
|
|
|
+ :disabled="!!this.form.id"
|
|
|
@change="handleSelectGoods"
|
|
|
style="width: 100%"
|
|
|
v-model="form.subsidiaryProductId"
|
|
|
filterable
|
|
|
remote
|
|
|
reserve-keyword
|
|
|
- placeholder="请输入商品ID"
|
|
|
+ placeholder="请输入商品名称"
|
|
|
:remote-method="handleSearchGoods"
|
|
|
:loading="searchGoodsLoading"
|
|
|
>
|
|
@@ -96,7 +97,6 @@ export default {
|
|
|
this.form.subsidiaryPrice = Number(item.subsidiaryPrice) || 0
|
|
|
this.form.subsidiaryProductId = Number(item.subsidiaryProductId)
|
|
|
this.form.subsidiaryName = item.subsidiaryName
|
|
|
- this.handleSearchGoods(item.subsidiaryProductId)
|
|
|
this.dialogTitle = '编辑配销产品'
|
|
|
}
|
|
|
this.form.explosiveId = pid
|
|
@@ -117,7 +117,7 @@ export default {
|
|
|
if (query !== '') {
|
|
|
this.searchGoodsLoading = true
|
|
|
try {
|
|
|
- const queryData = { productId: query, page: 1, pageSize: 100 }
|
|
|
+ const queryData = { productName: query, page: 1, pageSize: 100 }
|
|
|
const res = await getClassifyGetAll(queryData)
|
|
|
this.goodsList = res.data.list
|
|
|
} catch (error) {
|