产品关联政策

master
lion 3 months ago
parent 1747ab8d84
commit 6e1233cbc2

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

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

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

Loading…
Cancel
Save