产品关联政策

master
lion 3 months ago
parent 1747ab8d84
commit 6e1233cbc2

@ -2,5 +2,5 @@
ENV = 'production'
# base api
VUE_APP_BASE_API =
VUE_APP_BASE_API = /
#VUE_APP_BASE_DEV_API = https://yybtest.ali251.langye.net/

@ -103,7 +103,8 @@ export default {
auto_fee:'自动扣除佣金',
auto_refund_fee:'自动反佣',
manually_refund_fee:'手工返佣',
auto_finish:'自动核销'
auto_finish:'自动核销',
auto_return_by_due_date:'超过预产期指定时间自动退单'
},
detail:{},

@ -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()
}

Loading…
Cancel
Save