|
|
|
@ -63,6 +63,10 @@ |
|
|
|
|
<i v-if="!isDetail" |
|
|
|
|
class="el-icon-circle-plus-outline plus-cus" |
|
|
|
|
@click="addCustomer"></i> |
|
|
|
|
<!-- <el-button style="margin-left: 5px" |
|
|
|
|
type="primary" |
|
|
|
|
size="mini" |
|
|
|
|
@click="addCustomer">设置</el-button> --> |
|
|
|
|
</div> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item prop="cityId" |
|
|
|
@ -557,6 +561,79 @@ |
|
|
|
|
@click="submitCustomer">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
<el-dialog title="客户设置" |
|
|
|
|
:visible.sync="customerListVisible" |
|
|
|
|
width="800px" |
|
|
|
|
class="dialog" |
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
custom-class="customer-dia"> |
|
|
|
|
<div style="width: 300px;margin-bottom: 10px"> |
|
|
|
|
<el-input placeholder="请输入客户名称" |
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
v-model="customerKeyword" |
|
|
|
|
clearable></el-input> |
|
|
|
|
</div> |
|
|
|
|
<el-table :data="customers" |
|
|
|
|
class="table" |
|
|
|
|
ref="table" |
|
|
|
|
stripe |
|
|
|
|
header-align="center" |
|
|
|
|
row-key="customerId"> |
|
|
|
|
<el-table-column type="index" |
|
|
|
|
width="100" |
|
|
|
|
label="序号" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{scope.$index + (page - 1) * pageSize + 1}} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="customerName" |
|
|
|
|
label="客户名称" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="provinceName" |
|
|
|
|
label="省份" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="cityName" |
|
|
|
|
label="城市" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="countries" |
|
|
|
|
label="是否创建" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
是 |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
width="100" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<i class="el-icon-edit icon" |
|
|
|
|
@click="editCustomer(item)"></i> |
|
|
|
|
<i class="el-icon-delete icon" |
|
|
|
|
@click="delCustomer(item, i)"></i> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
<div class="pagination"> |
|
|
|
|
<el-pagination background |
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
:total="totalCustomer" |
|
|
|
|
@current-change="handleCurrentChangeCustomer" |
|
|
|
|
:current-page="pageCustomer" |
|
|
|
|
:page-size="pageSizeCustomer"> |
|
|
|
|
</el-pagination> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" |
|
|
|
|
class="dialog-footer"> |
|
|
|
|
<el-button @click="customerListVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" |
|
|
|
|
@click="submitCustomer">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
<pdf :visible.sync="pdfVisible" |
|
|
|
|
:src.sync="fileSrc"></pdf> |
|
|
|
|
</div> |
|
|
|
@ -784,7 +861,14 @@ export default { |
|
|
|
|
schoolName: '', |
|
|
|
|
provinceName: '', |
|
|
|
|
cityName: '', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
customerListVisible: false, |
|
|
|
|
customers: [{}], |
|
|
|
|
pageCustomer: 1, |
|
|
|
|
pageSizeCustomer: 10, |
|
|
|
|
totalCustomer: 0, |
|
|
|
|
customerKeyword: '', |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -948,7 +1032,6 @@ export default { |
|
|
|
|
1 |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
console.log("🚀 ~ file: AddCustomer.vue:651 ~ getProduct ~ data:", data) |
|
|
|
|
this.productAll = data |
|
|
|
|
this.totalProduct = data.length |
|
|
|
|
this.handlePage() |
|
|
|
@ -969,7 +1052,38 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 创建客户 |
|
|
|
|
addCustomer () { |
|
|
|
|
// this.customerListVisible = true |
|
|
|
|
this.customerVisible = true |
|
|
|
|
}, |
|
|
|
|
handleCurrentChangeCustomer (val) { |
|
|
|
|
this.pageCustomer = val |
|
|
|
|
// this.getCustomer() |
|
|
|
|
}, |
|
|
|
|
// 获取客户列表 |
|
|
|
|
getCustomer () { |
|
|
|
|
this.$get(this.api.queryCity, { |
|
|
|
|
provinceId: this.provinceList.find(e => e.provinceName == name).provinceId |
|
|
|
|
}).then(({ list }) => { |
|
|
|
|
this.cities = list |
|
|
|
|
this.customerForm.cityName = '' |
|
|
|
|
}).catch(res => { }); |
|
|
|
|
}, |
|
|
|
|
// 编辑客户 |
|
|
|
|
editCustomer (row) { |
|
|
|
|
this.customerVisible = true |
|
|
|
|
// this.customerForm = { |
|
|
|
|
// schoolName: '', |
|
|
|
|
// provinceName: '', |
|
|
|
|
// cityName: '', |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
// 删除客户 |
|
|
|
|
delCustomer (row, i) { |
|
|
|
|
this.$confirm('确定要删除吗?', '提示', { |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
|
|
}).catch(() => { }) |
|
|
|
|
}, |
|
|
|
|
// 获取城市 |
|
|
|
|
provinceChange (name) { |
|
|
|
@ -1018,7 +1132,7 @@ export default { |
|
|
|
|
data.push({ |
|
|
|
|
productName: e.productName, |
|
|
|
|
productStatus: e.status, |
|
|
|
|
productType: e.productName, |
|
|
|
|
productType: e.productTypeName, |
|
|
|
|
remainingPeriod: e.remain, |
|
|
|
|
startAndEndTime: e.startAndEndTime, |
|
|
|
|
subscriptionStatus: e.isEnable ? '启用' : '禁用', |
|
|
|
@ -1332,7 +1446,7 @@ export default { |
|
|
|
|
if ((id && updateTime > 1) || (!id && updateTime)) { |
|
|
|
|
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', { |
|
|
|
|
type: 'warning', |
|
|
|
|
closeOnClickModal: false |
|
|
|
|
closeOnClickModal: false |
|
|
|
|
}).then(() => { |
|
|
|
|
this.saveAdd(i) |
|
|
|
|
}).catch(() => { |
|
|
|
@ -1395,4 +1509,15 @@ export default { |
|
|
|
|
color: #666; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
/deep/.customer-dia { |
|
|
|
|
.icon { |
|
|
|
|
margin-right: 10px; |
|
|
|
|
font-size: 16px; |
|
|
|
|
color: #7a7a7a; |
|
|
|
|
cursor: pointer; |
|
|
|
|
&:hover { |
|
|
|
|
color: #9076ff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|