Commit 137c33aa authored by Marcus's avatar Marcus

授权客户主体

parent b9d9c73d
......@@ -32,7 +32,7 @@
width="100px"
label="操作">
<template v-slot="{row}">
<el-button type="primary" size="mini">添加</el-button>
<el-button type="primary" size="mini" @click="handleAdd(row)">添加</el-button>
</template>
</el-table-column>
</el-table>
......@@ -61,19 +61,51 @@
</el-tabs>
</el-dialog>
<el-dialog
title="添加"
:visible.sync="addDialog.dialogVisible"
width="500px">
<el-form ref="form" :model="addDialog.form" label-width="80px">
<el-form-item label="客户名称">{{ addDialog.form.customerName }}</el-form-item>
<el-form-item label="授权时间">
<el-date-picker
v-model="addDialog.dateRange"
@chang="handleDatePick"
type="daterange"
range-separator="至"
value-format="timestamp"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="收费模式">
<dict-selector v-model="addDialog.form.feeScale" :type="DICT_TYPE.BRAND_CUSTOMER_CHARGING_MODEL"></dict-selector>
</el-form-item>
<el-form-item label="授权证明"></el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="addDialog.dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleAddSubmit">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
createProductBrandEmpower,
deleteProductBrandEmpower,
getProductBrandEmpowerPageAuth,
getProductBrandEmpowerPageUnauth
} from "@/api/ecw/productBrandEmpower"
import DictSelector from "@/components/DictSelector"
import {DICT_TYPE} from "@/utils/dict"
export default {
name: "Empower",
components: {
DictSelector
},
props: {
id: {
type: Number,
......@@ -87,19 +119,52 @@ export default {
},
data() {
return {
DICT_TYPE,
dialogVisible: false,
activeName: 'first',
customerKey: '',
list1: [],
list2: []
list2: [],
addDialog: {
dialogVisible: false,
customerName: '',
form: {
"customerContactsId": 0,
"customerId": 0,
"endTime": "",
"feeScale": 0,
"fileUrl": "",
"productBrandId": null,
"startTime": "",
"status": 0
},
dateRange: []
}
}
},
created() {
mounted() {
},
methods: {
handleAddSubmit(){
this.addDialog.form.productBrandId = this.id
createProductBrandEmpower(this.addDialog.form).then(() => {
this.addDialog.dialogVisible = false
this.getList1()
this.getList2()
})
},
handleDatePick(e){
console.log(e)
},
handleClose() {},
filterCustomer() {},
handleAdd(row) {
this.addDialog.form.customerId = row.customerId
this.addDialog.form.customerName = row.customerName
this.addDialog.dialogVisible = true
},
handleDelete(id) {
deleteProductBrandEmpower(id).then(r => {
this.getList2()
......@@ -126,6 +191,11 @@ export default {
},
dialogVisible(v) {
this.$emit('update:visible', v)
},
'addDialog.dateRange'(v) {
this.addDialog.form.startTime = v[0]
this.addDialog.form.endTime = v[1]
}
}
}
......
......@@ -120,6 +120,7 @@
<el-button type="primary" @click="form.trademarkList.push({
brandName: '',
productBrandId: form.id,
trademarkCategoryRelList: []
})">添加商标</el-button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment