|
|
|
|
@ -79,6 +79,17 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:policy_id>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">关联政策:</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select clearable placeholder="请选择关联政策" style="width: 300px" v-model="form.policy_id">
|
|
|
|
|
<el-option v-for="item in policies" :key="item.id" :value="item.id" :label="item.name">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:model>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
@ -273,6 +284,9 @@
|
|
|
|
|
import {
|
|
|
|
|
index as merchantIndex
|
|
|
|
|
} from '@/api/merchant'
|
|
|
|
|
import {
|
|
|
|
|
index as policyIndex
|
|
|
|
|
} from '@/api/policy'
|
|
|
|
|
import {
|
|
|
|
|
Message
|
|
|
|
|
} from 'element-ui'
|
|
|
|
|
@ -314,6 +328,7 @@
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
productTypeName:'',
|
|
|
|
|
policies: [],
|
|
|
|
|
modelTable:[
|
|
|
|
|
{
|
|
|
|
|
label: "产品名称",
|
|
|
|
|
@ -335,6 +350,7 @@
|
|
|
|
|
shopIds: '',
|
|
|
|
|
productTypePid: '',
|
|
|
|
|
productTypeId: '',
|
|
|
|
|
policy_id: '',
|
|
|
|
|
model:[],
|
|
|
|
|
can_buy:1,
|
|
|
|
|
originalPrice: '',
|
|
|
|
|
@ -453,6 +469,7 @@
|
|
|
|
|
shopIds: res?.shop_ids,
|
|
|
|
|
productTypePid: res?.product_type_pid,
|
|
|
|
|
productTypeId: res?.product_type_id,
|
|
|
|
|
policy_id: res?.policy_id || '',
|
|
|
|
|
model:res.model?JSON.parse(res.model):[],
|
|
|
|
|
can_buy:res?.can_buy,
|
|
|
|
|
originalPrice: res?.original_price,
|
|
|
|
|
@ -510,6 +527,13 @@
|
|
|
|
|
this.merchantTotal = res.total
|
|
|
|
|
this.merchants = res.data
|
|
|
|
|
},
|
|
|
|
|
async getPolicies() {
|
|
|
|
|
const res = await policyIndex({
|
|
|
|
|
page_size: 999,
|
|
|
|
|
page: 1
|
|
|
|
|
})
|
|
|
|
|
this.policies = res.data || res.rows || []
|
|
|
|
|
},
|
|
|
|
|
searchMerchants(){
|
|
|
|
|
this.getMerchants()
|
|
|
|
|
},
|
|
|
|
|
@ -547,6 +571,7 @@
|
|
|
|
|
shop_ids: this.form.shopIds,
|
|
|
|
|
product_type_pid: this.form.productTypePid,
|
|
|
|
|
product_type_id: this.form.productTypeId,
|
|
|
|
|
policy_id: this.form.policy_id,
|
|
|
|
|
model:this.form.model,
|
|
|
|
|
can_buy:this.form.can_buy,
|
|
|
|
|
original_price: this.form.originalPrice.toString(),
|
|
|
|
|
@ -580,6 +605,7 @@
|
|
|
|
|
shop_ids: this.form.shopIds,
|
|
|
|
|
product_type_pid: this.form.productTypePid,
|
|
|
|
|
product_type_id: this.form.productTypeId,
|
|
|
|
|
policy_id: this.form.policy_id,
|
|
|
|
|
model:this.form.model,
|
|
|
|
|
can_buy:this.form.can_buy,
|
|
|
|
|
original_price: this.form.originalPrice.toString(),
|
|
|
|
|
@ -608,6 +634,7 @@
|
|
|
|
|
watch: {
|
|
|
|
|
isShow(newVal) {
|
|
|
|
|
if (newVal) {
|
|
|
|
|
this.getPolicies()
|
|
|
|
|
if (this.type === 'editor'||this.type === 'copy') {
|
|
|
|
|
this.getDetail()
|
|
|
|
|
}
|
|
|
|
|
|