|
@@ -1,9 +1,9 @@
|
|
|
<!--客户管理-->
|
|
|
<template>
|
|
|
- <div class="content">
|
|
|
- <!-- <el-row>
|
|
|
+ <div class="center">
|
|
|
+ <el-row>
|
|
|
<el-col :span="12">
|
|
|
- <h2 class="bg-left titleup">{{ information }}质检信息</h2>
|
|
|
+ <h2 class="bg-left titleup">新增粮商</h2>
|
|
|
</el-col>
|
|
|
<el-col :span="12" class="bg-right">
|
|
|
<el-button class="bg-bottom" type="primary" size="small" @click="cancel"
|
|
@@ -16,42 +16,151 @@
|
|
|
/>返回</el-button
|
|
|
>
|
|
|
</el-col>
|
|
|
- </el-row> -->
|
|
|
- <div class="title">新增粮商</div>
|
|
|
+ </el-row>
|
|
|
+ <!-- <div>
|
|
|
+
|
|
|
+ </div> -->
|
|
|
+ <!-- <div class="title">新增粮商</div> -->
|
|
|
<div class="unload">
|
|
|
- <el-upload action="https://jsonplaceholder.typicode.com/posts/" :limit="2" list-type="picture-card"
|
|
|
- :on-preview="handlePictureCardPreview" :on-remove="handleRemove">
|
|
|
- <i class="el-icon-plus"></i>
|
|
|
- </el-upload>
|
|
|
- <el-form ref="form" :model="form" label-width="120px">
|
|
|
- <el-form-item label="姓名">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="身份证号">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="银行卡号">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开户行">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="开户支行">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="收款人姓名">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="收款人身份证号">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="手机号">
|
|
|
+ <ws-form ref="customerList" :model="customerList" label-width="120px">
|
|
|
+ <ws-info-table>
|
|
|
+ <div style="display: flex; width: 100%; text-align: center">
|
|
|
+ <div style="width: 50%;margin:0 auto">
|
|
|
+ 上传身份证正面
|
|
|
+ <el-upload
|
|
|
+ action="https://www.zthymaoyi.com/upload/admin"
|
|
|
+ :limit="1"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :auto-upload="true"
|
|
|
+ :on-success="upLoadSuccess1"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%;margin:0 auto">
|
|
|
+ 上传身份证反面
|
|
|
+ <el-upload
|
|
|
+ action="https://www.zthymaoyi.com/upload/admin"
|
|
|
+ :limit="1"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove"
|
|
|
+ :auto-upload="true"
|
|
|
+ :on-success="upLoadSuccess2"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <ws-form-item label="姓名" span="1" prop="customerName">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.customerName"
|
|
|
+ placeholder="请输入姓名"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="身份证号" span="1" prop="customerNumberCard">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.customerNumberCard"
|
|
|
+ placeholder="请输入身份证号"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <div style="display: flex; width: 100%; text-align: center">
|
|
|
+ <div style="width: 50%;margin:0 auto">
|
|
|
+ 上传银行卡正面
|
|
|
+ <el-upload
|
|
|
+ action="https://www.zthymaoyi.com/upload/admin"
|
|
|
+ :limit="1"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove1"
|
|
|
+ :auto-upload="true"
|
|
|
+ :on-success="bankSuccess1"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ <div style="width: 50%;margin:0 auto">
|
|
|
+ 上传银行卡反面
|
|
|
+ <el-upload
|
|
|
+ action="https://www.zthymaoyi.com/upload/admin"
|
|
|
+ :limit="1"
|
|
|
+ list-type="picture-card"
|
|
|
+ :on-preview="handlePictureCardPreview"
|
|
|
+ :on-remove="handleRemove1"
|
|
|
+ :auto-upload="true"
|
|
|
+ :on-success="bankSuccess2"
|
|
|
+ >
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <ws-form-item label="银行卡号" span="1" prop="bankCard">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.bankCard"
|
|
|
+ placeholder="请输入银行卡号"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="开户行" span="1" prop="bankDeposit">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.bankDeposit"
|
|
|
+ placeholder="请输入开户行"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="开户支行" span="1" prop="bankDepositBranch">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.bankDepositBranch"
|
|
|
+ placeholder="请输入开户支行"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="收款人姓名" span="1" prop="payeeName">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.payeeName"
|
|
|
+ placeholder="请输入收款人姓名"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="收款人身份证号" span="1" prop="payeeNumberCard">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.payeeNumberCard"
|
|
|
+ placeholder="请输入收款人身份证号"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <ws-form-item label="手机号" span="1" prop="customerPhone">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.customerPhone"
|
|
|
+ placeholder="请输入手机号"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ <!-- 验证码 -->
|
|
|
+ <!-- <el-form-item prop="veriCode" :label="$t('login.register08')">
|
|
|
<el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- <!-- 验证码 -->
|
|
|
- <el-form-item prop="veriCode" :label="$t('login.register08')">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- <!-- <div style="display: flex; justify-content: space-between">
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
<el-input
|
|
|
v-model="form.name"
|
|
|
:disabled="disabledFlag"
|
|
@@ -69,103 +178,228 @@
|
|
|
>{{ $t('login.retry') }}({{ count }})s</ws-button
|
|
|
>
|
|
|
</div>
|
|
|
- </div> -->
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="联系地址">
|
|
|
- <el-input v-model="form.name"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ </div>
|
|
|
+ </el-form-item> -->
|
|
|
+ <ws-form-item label="联系地址" span="1" prop="compAddress">
|
|
|
+ <ws-input
|
|
|
+ v-model="customerList.compAddress"
|
|
|
+ placeholder="请输入联系地址"
|
|
|
+ maxlength="100"
|
|
|
+ size="small"
|
|
|
+ :disabled="disabled"
|
|
|
+ />
|
|
|
+ </ws-form-item>
|
|
|
+ </ws-info-table>
|
|
|
+ <div class="but">
|
|
|
+ <el-button type="primary" @click="commit">提交</el-button>
|
|
|
+ <!-- <el-button type="primary">关闭</el-button> -->
|
|
|
+ </div>
|
|
|
+ </ws-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- // import xx
|
|
|
- // '@/model/houseSelfCollect/index'
|
|
|
-
|
|
|
- export default {
|
|
|
- components: {},
|
|
|
- watch: {},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- dialogImageUrl: '',
|
|
|
- dialogVisible: false,
|
|
|
- form:{
|
|
|
- name:'姓名'
|
|
|
- },
|
|
|
- disabledFlag: true,
|
|
|
+ import {
|
|
|
+ customerAdd
|
|
|
+ }from '@/model/houseSelfCollect/index'
|
|
|
|
|
|
- }
|
|
|
+export default {
|
|
|
+ components: {},
|
|
|
+ watch: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dialogImageUrl: '',
|
|
|
+ dialogVisible: false,
|
|
|
+ customerList:{},
|
|
|
+ disabledFlag: true,
|
|
|
+ disabled: false,
|
|
|
+ identity:[],
|
|
|
+ bank:[],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleRemove(file) {
|
|
|
+ for(let i = 0 ; i < this.identity.length; i++){
|
|
|
+ if(file.response.url == this.identity[i]){
|
|
|
+ this.identity.splice(i,1,"")
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- methods: {
|
|
|
- handleRemove(file, fileList) {
|
|
|
- console.log(file, fileList);
|
|
|
- },
|
|
|
- handlePictureCardPreview(file) {
|
|
|
- this.dialogImageUrl = file.url;
|
|
|
- this.dialogVisible = true;
|
|
|
- },
|
|
|
- // 发送验证码
|
|
|
- toSend() {
|
|
|
- if (this.registerForm.linkmanPhone) {
|
|
|
- if (validUserCellPhone(this.registerForm.linkmanPhone)) {
|
|
|
- this.disabledFlag = false
|
|
|
- clearInterval(this.timer)
|
|
|
- this.timer = null
|
|
|
- const TIME_COUNT = 60
|
|
|
- if (!this.timer) {
|
|
|
- this.count = TIME_COUNT
|
|
|
- this.verification = false
|
|
|
- let data = {
|
|
|
- mobilePhone: this.registerForm.linkmanPhone,
|
|
|
- }
|
|
|
- sendRegisterCode(data)
|
|
|
- .toPromise()
|
|
|
- .then((res) => {
|
|
|
- this.timer = setInterval(() => {
|
|
|
- if (this.count > 0 && this.count <= TIME_COUNT) {
|
|
|
- this.count--
|
|
|
- } else {
|
|
|
- this.verification = true
|
|
|
- clearInterval(this.timer)
|
|
|
- this.timer = null
|
|
|
- }
|
|
|
- }, 1000)
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- this.verification = true
|
|
|
- })
|
|
|
+ handleRemove1(file){
|
|
|
+ for(let i = 0 ; i < this.bank.length; i++){
|
|
|
+ if(file.response.url == this.bank[i]){
|
|
|
+ this.bank.splice(i,1,"")
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.bank)
|
|
|
+ },
|
|
|
+ handlePictureCardPreview(file) {
|
|
|
+ this.dialogImageUrl = file.url
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ // 发送验证码
|
|
|
+ toSend() {
|
|
|
+ if (this.registerForm.linkmanPhone) {
|
|
|
+ if (validUserCellPhone(this.registerForm.linkmanPhone)) {
|
|
|
+ this.disabledFlag = false
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.timer = null
|
|
|
+ const TIME_COUNT = 60
|
|
|
+ if (!this.timer) {
|
|
|
+ this.count = TIME_COUNT
|
|
|
+ this.verification = false
|
|
|
+ let data = {
|
|
|
+ mobilePhone: this.registerForm.linkmanPhone,
|
|
|
}
|
|
|
- } else {
|
|
|
- EventBus.$emit('error', this.$t('login.registerVerif09'))
|
|
|
+ sendRegisterCode(data)
|
|
|
+ .toPromise()
|
|
|
+ .then((res) => {
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ if (this.count > 0 && this.count <= TIME_COUNT) {
|
|
|
+ this.count--
|
|
|
+ } else {
|
|
|
+ this.verification = true
|
|
|
+ clearInterval(this.timer)
|
|
|
+ this.timer = null
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.verification = true
|
|
|
+ })
|
|
|
}
|
|
|
} else {
|
|
|
- EventBus.$emit('error', this.$t('login.registerVerif05'))
|
|
|
+ EventBus.$emit('error', this.$t('login.registerVerif09'))
|
|
|
}
|
|
|
- },
|
|
|
- }
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ EventBus.$emit('error', this.$t('login.registerVerif05'))
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.$router.push({ path: 'customerManagement' })
|
|
|
+ },
|
|
|
+ upLoadSuccess1(e){
|
|
|
+ this.identity[0] = e.url
|
|
|
+ },
|
|
|
+ upLoadSuccess2(e){
|
|
|
+ this.identity[1] = e.url
|
|
|
+ },
|
|
|
+ bankSuccess1(e){
|
|
|
+ this.bank[0] = e.url
|
|
|
+ },
|
|
|
+ bankSuccess2(e){
|
|
|
+ this.bank[1] = e.url
|
|
|
+ },
|
|
|
+ commit(){
|
|
|
+ this.$confirm(
|
|
|
+ '确定提交客户信息?',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ this.customerList. compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
+ this.customerList.cardAddressUrl = this.identity.toString()
|
|
|
+ this.customerList.payeeAddressUrl = this.bank.toString()
|
|
|
+ this.customerList.customerTypeFlag = 1
|
|
|
+ this.customerList.customerType ="个人"
|
|
|
+ console.log( this.customerList)
|
|
|
+
|
|
|
+
|
|
|
+ customerAdd(this.customerList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+
|
|
|
+ // if(response.code == 200){
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ this.$router.push({path:'customerManagement'})
|
|
|
+
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
- /deep/.el-form-item{
|
|
|
- margin-bottom: 0;
|
|
|
- }
|
|
|
- .content {
|
|
|
- padding: 20px;
|
|
|
- }
|
|
|
+// /deep/.el-form-item {
|
|
|
+// margin-bottom: 0;
|
|
|
+// }
|
|
|
+.center {
|
|
|
+ background: #f6f7fc;
|
|
|
+}
|
|
|
|
|
|
- .seach {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+.seach {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .find {
|
|
|
- width: 32px;
|
|
|
- }
|
|
|
+ .find {
|
|
|
+ width: 32px;
|
|
|
+ }
|
|
|
|
|
|
- .search-left {
|
|
|
- display: flex;
|
|
|
- }
|
|
|
+ .search-left {
|
|
|
+ display: flex;
|
|
|
}
|
|
|
- .titleup {
|
|
|
+}
|
|
|
+
|
|
|
+.ws-info-table {
|
|
|
+ border: none;
|
|
|
+ width: 50%;
|
|
|
+ margin: 0 auto;
|
|
|
+}
|
|
|
+.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;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #8890b1;
|
|
|
+}
|
|
|
+/deep/.ws-info-table .el-form-item .el-form-item__content {
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+.bg-left {
|
|
|
+ padding-left: 30px;
|
|
|
+}
|
|
|
+.bg-right {
|
|
|
+ padding-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+}
|
|
|
+.bg-bottom {
|
|
|
+ margin: 15px 0px;
|
|
|
+}
|
|
|
+.titleup {
|
|
|
position: relative;
|
|
|
}
|
|
|
+.titleup::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+}
|
|
|
+.unload {
|
|
|
+ background: #ffffff;
|
|
|
+ padding-top: 20px;
|
|
|
+}
|
|
|
+.but {
|
|
|
+ text-align: center;
|
|
|
+ margin: 20px auto;
|
|
|
+}
|
|
|
</style>
|