Commit 137c33aa authored by Marcus's avatar Marcus

授权客户主体

parent b9d9c73d
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
width="100px" width="100px"
label="操作"> label="操作">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="primary" size="mini">添加</el-button> <el-button type="primary" size="mini" @click="handleAdd(row)">添加</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -61,19 +61,51 @@ ...@@ -61,19 +61,51 @@
</el-tabs> </el-tabs>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
import { import {
createProductBrandEmpower,
deleteProductBrandEmpower, deleteProductBrandEmpower,
getProductBrandEmpowerPageAuth, getProductBrandEmpowerPageAuth,
getProductBrandEmpowerPageUnauth getProductBrandEmpowerPageUnauth
} from "@/api/ecw/productBrandEmpower" } from "@/api/ecw/productBrandEmpower"
import DictSelector from "@/components/DictSelector"
import {DICT_TYPE} from "@/utils/dict"
export default { export default {
name: "Empower", name: "Empower",
components: {
DictSelector
},
props: { props: {
id: { id: {
type: Number, type: Number,
...@@ -87,19 +119,52 @@ export default { ...@@ -87,19 +119,52 @@ export default {
}, },
data() { data() {
return { return {
DICT_TYPE,
dialogVisible: false, dialogVisible: false,
activeName: 'first', activeName: 'first',
customerKey: '', customerKey: '',
list1: [], 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: { 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() {}, handleClose() {},
filterCustomer() {}, filterCustomer() {},
handleAdd(row) {
this.addDialog.form.customerId = row.customerId
this.addDialog.form.customerName = row.customerName
this.addDialog.dialogVisible = true
},
handleDelete(id) { handleDelete(id) {
deleteProductBrandEmpower(id).then(r => { deleteProductBrandEmpower(id).then(r => {
this.getList2() this.getList2()
...@@ -126,6 +191,11 @@ export default { ...@@ -126,6 +191,11 @@ export default {
}, },
dialogVisible(v) { dialogVisible(v) {
this.$emit('update:visible', 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 @@ ...@@ -120,6 +120,7 @@
<el-button type="primary" @click="form.trademarkList.push({ <el-button type="primary" @click="form.trademarkList.push({
brandName: '', brandName: '',
productBrandId: form.id,
trademarkCategoryRelList: [] trademarkCategoryRelList: []
})">添加商标</el-button> })">添加商标</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