|
@@ -1,8 +1,53 @@
|
|
<!--客户管理-->
|
|
<!--客户管理-->
|
|
<template>
|
|
<template>
|
|
- <div class="content">
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <BaseHeaderLayout :leftSpan="12">
|
|
|
|
+ <template slot="left">
|
|
|
|
+ <ws-button type="primary" @click="getCustomer()">获取客户</ws-button>
|
|
|
|
+ <ws-button type="primary" @click="createCustomer()"
|
|
|
|
+ >创建新客户</ws-button
|
|
|
|
+ >
|
|
|
|
+ </template>
|
|
|
|
+ <template slot="right">
|
|
|
|
+ <ws-select
|
|
|
|
+ v-model="searchTypeText"
|
|
|
|
+ placeholder=""
|
|
|
|
+ @change="selecttaskType"
|
|
|
|
+ :value="searchType"
|
|
|
|
+ >
|
|
|
|
+ <ws-option
|
|
|
|
+ v-for="item in taskTypeList"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.value"
|
|
|
|
+ :value="item.value"
|
|
|
|
+ style="color: #8890b1"
|
|
|
|
+ />
|
|
|
|
+ </ws-select>
|
|
|
|
+ <div></div>
|
|
|
|
+ <ws-input
|
|
|
|
+ v-model="searchKeyWord"
|
|
|
|
+ placeholder="可按姓名、手机号查找"
|
|
|
|
+ clearable
|
|
|
|
+ maxlength="500"
|
|
|
|
+ type="input"
|
|
|
|
+ ></ws-input>
|
|
|
|
+ <ws-button class="find" type="primary" @click="find()"
|
|
|
|
+ ><img
|
|
|
|
+ width="16"
|
|
|
|
+ height="16"
|
|
|
|
+ style="
|
|
|
|
+ vertical-align: text-top;
|
|
|
|
+ position: relative;
|
|
|
|
+ top: 0px;
|
|
|
|
+ left: -8px;
|
|
|
|
+ "
|
|
|
|
+ src="../../../public/img/sousuo.png"
|
|
|
|
+ alt=""
|
|
|
|
+ /></ws-button>
|
|
|
|
+ </template>
|
|
|
|
+ </BaseHeaderLayout>
|
|
<div class="seach">
|
|
<div class="seach">
|
|
- <div class="search-left">
|
|
|
|
|
|
+ <!-- <div class="search-left">
|
|
<ws-input v-model="searchKeyWord" placeholder="可按姓名、手机号查找" clearable maxlength="500" type="input"
|
|
<ws-input v-model="searchKeyWord" placeholder="可按姓名、手机号查找" clearable maxlength="500" type="input"
|
|
class="findValue"></ws-input>
|
|
class="findValue"></ws-input>
|
|
<ws-button class="find" type="primary" @click="find()">
|
|
<ws-button class="find" type="primary" @click="find()">
|
|
@@ -13,19 +58,34 @@
|
|
left: -8px;
|
|
left: -8px;
|
|
" src="../../../public/img/sousuo.png" alt />
|
|
" src="../../../public/img/sousuo.png" alt />
|
|
</ws-button>
|
|
</ws-button>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
<div class="search-right">
|
|
<div class="search-right">
|
|
- <ws-button @click="getCustomer()">获取客户</ws-button>
|
|
|
|
- <el-dialog title="客户扫码" :visible.sync="customerDialogVisible" width="30%">
|
|
|
|
|
|
+ <!-- <ws-button @click="getCustomer()">获取客户</ws-button> -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="客户扫码"
|
|
|
|
+ :visible.sync="customerDialogVisible"
|
|
|
|
+ width="30%"
|
|
|
|
+ >
|
|
<div id="qrcode"></div>
|
|
<div id="qrcode"></div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <ws-button @click="createCustomer()">创建新客户</ws-button>
|
|
|
|
- <el-dialog title="创建新客户" :visible.sync="creatNewCustomerDialogVisible" width="50%">
|
|
|
|
- <customerManagementAdd></customerManagementAdd>
|
|
|
|
|
|
+ <!-- <ws-button @click="createCustomer()">创建新客户</ws-button> -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="创建新客户"
|
|
|
|
+ :visible.sync="creatNewCustomerDialogVisible"
|
|
|
|
+ width="50%"
|
|
|
|
+ >
|
|
|
|
+ <customerManagementAdd></customerManagementAdd>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-table class="wenzi" :data="customertList.records" style="width: 100%; margin-top: 10px" height="780">
|
|
|
|
|
|
+
|
|
|
|
+ <el-table
|
|
|
|
+ :data="customertList.records"
|
|
|
|
+ style="width: 100%; margin-top: 20px"
|
|
|
|
+ ref="warehouseList"
|
|
|
|
+ border
|
|
|
|
+ height="780"
|
|
|
|
+ >
|
|
<el-table-column type="index" label="序号">
|
|
<el-table-column type="index" label="序号">
|
|
<template scope="scope">
|
|
<template scope="scope">
|
|
<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
@@ -35,168 +95,209 @@
|
|
<el-table-column prop="contractNo" label="客户"></el-table-column>
|
|
<el-table-column prop="contractNo" label="客户"></el-table-column>
|
|
<el-table-column prop="goodsName" label="手机号"></el-table-column>
|
|
<el-table-column prop="goodsName" label="手机号"></el-table-column>
|
|
<el-table-column prop="weight" label="银行卡号"></el-table-column>
|
|
<el-table-column prop="weight" label="银行卡号"></el-table-column>
|
|
- <el-table-column prop="unitContractPrice" label="开户行"></el-table-column>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="unitContractPrice"
|
|
|
|
+ label="开户行"
|
|
|
|
+ ></el-table-column>
|
|
<el-table-column prop="packingMethod" label="收款人"></el-table-column>
|
|
<el-table-column prop="packingMethod" label="收款人"></el-table-column>
|
|
<el-table-column prop="status" label="状态"></el-table-column>
|
|
<el-table-column prop="status" label="状态"></el-table-column>
|
|
<el-table-column prop="address" label="操作">
|
|
<el-table-column prop="address" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
|
|
|
|
- src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
|
|
|
|
|
|
+ <img
|
|
|
|
+ width="16"
|
|
|
|
+ height="16"
|
|
|
|
+ style="vertical-align: text-top; margin: 0 6px"
|
|
|
|
+ src="../../../public/img/chakan.png"
|
|
|
|
+ @click="handleExamine(scope.row)"
|
|
|
|
+ v-hasPermission="
|
|
`contractManagement.buyContract.buyContractInfo.view`
|
|
`contractManagement.buyContract.buyContractInfo.view`
|
|
- " alt />
|
|
|
|
- <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
|
|
|
|
- src="../../../public/img/bianji.png" @click="handleEdit(scope.row)" v-hasPermission="
|
|
|
|
|
|
+ "
|
|
|
|
+ alt
|
|
|
|
+ />
|
|
|
|
+ <img
|
|
|
|
+ width="17"
|
|
|
|
+ height="16"
|
|
|
|
+ style="vertical-align: text-top; margin: 0 6px"
|
|
|
|
+ src="../../../public/img/bianji.png"
|
|
|
|
+ @click="handleEdit(scope.row)"
|
|
|
|
+ v-hasPermission="
|
|
`contractManagement.buyContract.buyContractInfo.edit`
|
|
`contractManagement.buyContract.buyContractInfo.edit`
|
|
- " alt />
|
|
|
|
- <img width="16" height="17" style="
|
|
|
|
|
|
+ "
|
|
|
|
+ alt
|
|
|
|
+ />
|
|
|
|
+ <img
|
|
|
|
+ width="16"
|
|
|
|
+ height="17"
|
|
|
|
+ style="
|
|
vertical-align: text-top;
|
|
vertical-align: text-top;
|
|
position: relative;
|
|
position: relative;
|
|
top: -1px;
|
|
top: -1px;
|
|
margin: 0 6px;
|
|
margin: 0 6px;
|
|
- " src="../../../public/img/shanchu.png" v-hasPermission="
|
|
|
|
|
|
+ "
|
|
|
|
+ src="../../../public/img/shanchu.png"
|
|
|
|
+ v-hasPermission="
|
|
`contractManagement.buyContract.buyContractInfo.delete`
|
|
`contractManagement.buyContract.buyContractInfo.delete`
|
|
- " @click="handleDelete(scope.row)" alt />
|
|
|
|
|
|
+ "
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ alt
|
|
|
|
+ />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
|
- :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
|
|
- </el-pagination>
|
|
|
|
|
|
+ <div style="text-align: center">
|
|
|
|
+ <el-pagination
|
|
|
|
+ @size-change="handleSizeChange"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ :current-page="currentPage"
|
|
|
|
+ :page-size="deptCircularPage.pageSize"
|
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
|
+ :total="deptBudgetTotal"
|
|
|
|
+ >
|
|
|
|
+ </el-pagination>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
- // import xx
|
|
|
|
- // '@/model/houseSelfCollect/index'
|
|
|
|
- import QRCode from 'qrcodejs2'
|
|
|
|
- import customerManagementAdd from './customerManagementAdd.vue'
|
|
|
|
- export default {
|
|
|
|
- components: {
|
|
|
|
- customerManagementAdd
|
|
|
|
- },
|
|
|
|
- watch: {},
|
|
|
|
- data() {
|
|
|
|
- return {
|
|
|
|
- searchKeyWord: '',
|
|
|
|
- customerDialogVisible: false,
|
|
|
|
- creatNewCustomerDialogVisible:false,
|
|
|
|
- customertList: {
|
|
|
|
- records: [{
|
|
|
|
|
|
+// import xx
|
|
|
|
+// '@/model/houseSelfCollect/index'
|
|
|
|
+import QRCode from 'qrcodejs2'
|
|
|
|
+import customerManagementAdd from './customerManagementAdd.vue'
|
|
|
|
+export default {
|
|
|
|
+ components: {
|
|
|
|
+ customerManagementAdd,
|
|
|
|
+ },
|
|
|
|
+ watch: {},
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ searchKeyWord: '',
|
|
|
|
+ customerDialogVisible: false,
|
|
|
|
+ creatNewCustomerDialogVisible: false,
|
|
|
|
+ customertList: {
|
|
|
|
+ records: [
|
|
|
|
+ {
|
|
contractNo: '小王',
|
|
contractNo: '小王',
|
|
goodsName: '17127741111',
|
|
goodsName: '17127741111',
|
|
weight: '111111111',
|
|
weight: '111111111',
|
|
unitContractPrice: '312321312132321',
|
|
unitContractPrice: '312321312132321',
|
|
packingMethod: '12213321231fsfssfd',
|
|
packingMethod: '12213321231fsfssfd',
|
|
- status: 'fsdfsdfsd'
|
|
|
|
- }]
|
|
|
|
- },
|
|
|
|
- currentPage: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- deptBudgetTotal: 0,
|
|
|
|
- deptCircularPage: {}
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- find() {
|
|
|
|
- console.log('搜索')
|
|
|
|
- },
|
|
|
|
- //获取客户
|
|
|
|
- getCustomer() {
|
|
|
|
- this.customerDialogVisible = true
|
|
|
|
- this.$nextTick(function() {
|
|
|
|
- document.getElementById('qrcode').innerHTML = ''
|
|
|
|
- let qrcode = new QRCode('qrcode', {
|
|
|
|
- width: 150,
|
|
|
|
- height: 150,
|
|
|
|
- text: 'https://www.baidu.com',
|
|
|
|
- colorDark: '#109dff',
|
|
|
|
- colorLight: '#d9d9d9'
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
|
|
+ status: 'fsdfsdfsd',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
},
|
|
},
|
|
- //创建客户
|
|
|
|
- createCustomer() {
|
|
|
|
- // this.creatNewCustomerDialogVisible = true
|
|
|
|
- this.$router.push({
|
|
|
|
- name: 'customerManagementAdd'
|
|
|
|
- // query: { id: row.id },
|
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ deptBudgetTotal: 0,
|
|
|
|
+ deptCircularPage: {},
|
|
|
|
+ taskTypeList: [], //选择仓库数组
|
|
|
|
+ searchTypeText: '', //仓库
|
|
|
|
+ searchType: '',
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ find() {
|
|
|
|
+ console.log('搜索')
|
|
|
|
+ },
|
|
|
|
+ //获取客户
|
|
|
|
+ getCustomer() {
|
|
|
|
+ this.customerDialogVisible = true
|
|
|
|
+ this.$nextTick(function () {
|
|
|
|
+ document.getElementById('qrcode').innerHTML = ''
|
|
|
|
+ let qrcode = new QRCode('qrcode', {
|
|
|
|
+ width: 150,
|
|
|
|
+ height: 150,
|
|
|
|
+ text: 'https://www.baidu.com',
|
|
|
|
+ colorDark: '#109dff',
|
|
|
|
+ colorLight: '#d9d9d9',
|
|
|
|
+
|
|
})
|
|
})
|
|
- },
|
|
|
|
- handleSizeChange(val) {
|
|
|
|
- console.log(`每页 ${val} 条`)
|
|
|
|
- this.pageSize = val
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
- handleCurrentChange(val) {
|
|
|
|
- this.currentPage = val
|
|
|
|
- console.log(`当前页: ${val}`)
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
- handleExamine(row) {
|
|
|
|
- console.log(row)
|
|
|
|
- // this.$router.push({
|
|
|
|
- // name: 'purchaseContractExamine',
|
|
|
|
- // query: { id: row.id, status: row.status },
|
|
|
|
- // })
|
|
|
|
- },
|
|
|
|
- handleEdit(row) {
|
|
|
|
- console.log(row)
|
|
|
|
- this.$router.push({
|
|
|
|
- name: 'customerManagementEdit',
|
|
|
|
- query: {
|
|
|
|
- id: row.id
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //选择仓库改变事件
|
|
|
|
+ selecttaskType() {},
|
|
|
|
+ //创建客户
|
|
|
|
+ createCustomer() {
|
|
|
|
+ // this.creatNewCustomerDialogVisible = true
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'customerManagementAdd',
|
|
|
|
+ // query: { id: row.id },
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleSizeChange(val) {
|
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
|
+ this.pageSize = val
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.currentPage = val
|
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
|
+ this.getList()
|
|
|
|
+ },
|
|
|
|
+ handleExamine(row) {
|
|
|
|
+ console.log(row)
|
|
|
|
+ // this.$router.push({
|
|
|
|
+ // name: 'purchaseContractExamine',
|
|
|
|
+ // query: { id: row.id, status: row.status },
|
|
|
|
+ // })
|
|
|
|
+ },
|
|
|
|
+ handleEdit(row) {
|
|
|
|
+ console.log(row)
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'customerManagementEdit',
|
|
|
|
+ query: {
|
|
|
|
+ id: row.id,
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleDelete(row) {
|
|
|
|
+ this.$confirm('确定删除该客户?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {})
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return false
|
|
})
|
|
})
|
|
- },
|
|
|
|
- handleDelete(row) {
|
|
|
|
- console.log(row)
|
|
|
|
- // var text = ''
|
|
|
|
- // if (row.deliverType == 1) {
|
|
|
|
- // text =
|
|
|
|
- // '删除该合同将同时永久删除合同对应的临时仓库相关数据,是否确定删除?'
|
|
|
|
- // } else {
|
|
|
|
- // text = '合同删除后不可恢复,是否继续删除?'
|
|
|
|
- // }
|
|
|
|
- // this.$confirm(text, '提示', {
|
|
|
|
- // confirmButtonText: '确定',
|
|
|
|
- // cancelButtonText: '取消',
|
|
|
|
- // type: 'warning',
|
|
|
|
- // })
|
|
|
|
- // .then(() => {
|
|
|
|
- // deletecontract({ id: row.id })
|
|
|
|
- // .toPromise()
|
|
|
|
- // .then((response) => {
|
|
|
|
- // this.$notify.success({
|
|
|
|
- // title: '成功',
|
|
|
|
- // message: '删除成功',
|
|
|
|
- // })
|
|
|
|
- // this.getList()
|
|
|
|
- // })
|
|
|
|
- // .catch((response) => {})
|
|
|
|
- // })
|
|
|
|
- // .catch(() => {
|
|
|
|
- // return false
|
|
|
|
- // })
|
|
|
|
- },
|
|
|
|
- getList() {}
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ getList() {},
|
|
|
|
+ },
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
- .content {
|
|
|
|
- padding: 20px;
|
|
|
|
|
|
+.seach {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .find {
|
|
|
|
+ width: 32px;
|
|
}
|
|
}
|
|
|
|
|
|
- .seach {
|
|
|
|
|
|
+ .search-left {
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
-
|
|
|
|
- .find {
|
|
|
|
- width: 32px;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- .search-left {
|
|
|
|
- display: flex;
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
+.ws-info-table {
|
|
|
|
+ border: none;
|
|
|
|
+}
|
|
|
|
+.ws-info-table .el-form-item {
|
|
|
|
+ width: 50%;
|
|
|
|
+ border: none;
|
|
|
|
+}
|
|
|
|
+/deep/.ws-info-table .el-form-item .el-form-item__label {
|
|
|
|
+ width: 30%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ background: #ffffff;
|
|
|
|
+ color: #8890b1;
|
|
|
|
+}
|
|
|
|
+/deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
|
|
+ border: none;
|
|
|
|
+}
|
|
|
|
+/deep/.el-table .el-table__header .cell,
|
|
|
|
+.el-table .el-table__body .cell {
|
|
|
|
+ text-align: center;
|
|
|
|
+}
|
|
|
|
+/deep/.el-table--enable-row-transition .el-table__body td {
|
|
|
|
+ text-align: center;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|