|
@@ -1,7 +1,7 @@
|
|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
- <title>收购商-添加/修改</title>
|
|
|
+ <title>企业收购商-添加/修改</title>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
|
<meta name="viewport"
|
|
|
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
|
|
@@ -61,53 +61,61 @@
|
|
|
<tr>
|
|
|
<th>企业名称</th>
|
|
|
<td>
|
|
|
- <el-input type="text" v-model="m.name" placeholder="请输入企业名称"></el-input>
|
|
|
+ <el-input type="text" v-model="m.businessName" placeholder="请输入企业名称"></el-input>
|
|
|
</td>
|
|
|
- <th>法人</th>
|
|
|
+ <th>企业法人</th>
|
|
|
<td>
|
|
|
- <el-input type="text" v-model="m.legalPerson" placeholder="请输入法人"></el-input>
|
|
|
+ <el-input type="text" v-model="m.legalPerson" placeholder="请输入企业法人"></el-input>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>身份证号</th>
|
|
|
+ <th>统一社会信用代码</th>
|
|
|
<td>
|
|
|
- <el-input type="text" v-model="m.idCard" placeholder="请输入身份证号"></el-input>
|
|
|
+ <el-input type="text" v-model="m.dutyParagraph" placeholder="请输入统一社会信用代码"></el-input>
|
|
|
</td>
|
|
|
- <th>手机号码</th>
|
|
|
+ <th>营业执照</th>
|
|
|
<td>
|
|
|
- <el-input type="text" v-model="m.contact" placeholder="请输入手机号码"></el-input>
|
|
|
+ <sa-item type="img-list" v-model="m.businessLicense" br></sa-item>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>税号</th>
|
|
|
+ <th>联系人</th>
|
|
|
<td>
|
|
|
- <el-input type="text" v-model="m.dutyParagraph" placeholder="请输入税号"></el-input>
|
|
|
+ <el-input type="text" v-model="m.name" placeholder="请输入联系人"></el-input>
|
|
|
</td>
|
|
|
- <th>营业执照</th>
|
|
|
+ <th>邮箱</th>
|
|
|
<td>
|
|
|
- <sa-item type="img-list" v-model="m.businessLicense" br></sa-item>
|
|
|
+ <el-input type="text" v-model="m.email" placeholder="请输入邮箱"></el-input>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <th>联系电话</th>
|
|
|
+ <td>
|
|
|
+ <el-input type="text" v-model="m.contact" placeholder="请输入联系电话"></el-input>
|
|
|
+ </td>
|
|
|
+ <th>身份证号</th>
|
|
|
+ <td>
|
|
|
+ <el-input type="text" v-model="m.idCard" placeholder="请输入身份证号"></el-input>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<th>银行名称</th>
|
|
|
<td>
|
|
|
- <el-select v-model="m.bankName" placeholder="请选择" filterable size="mini">
|
|
|
- <el-option v-for="(item,index) in banckList" :key="index" :label="item.name"
|
|
|
- :value="item.value"> </el-option>
|
|
|
+ <el-select v-model="m.bankNo" placeholder="请选择" filterable size="mini">
|
|
|
+ <el-option label="请选择" :value="0" disabled></el-option>
|
|
|
+ <el-option v-for="(item,index) in bankList" :key="index" :label="item.bankName" :value="item.bankCode"></el-option>
|
|
|
</el-select>
|
|
|
</td>
|
|
|
<th>银行账号</th>
|
|
|
<td>
|
|
|
<el-input type="text" v-model="m.bankAccount" placeholder="请输入银行账号"></el-input>
|
|
|
</td>
|
|
|
-
|
|
|
</tr>
|
|
|
<tr>
|
|
|
- <th>地址</th>
|
|
|
+ <th>企业地址</th>
|
|
|
<td colspan="3">
|
|
|
- <el-input type="text" v-model="m.address" placeholder="请输入地址"></el-input>
|
|
|
+ <el-input type="text" v-model="m.address" placeholder="请输入企业地址" style="width: 90%"></el-input>
|
|
|
</td>
|
|
|
-
|
|
|
</tr>
|
|
|
</table>
|
|
|
<sa-item name="" class="s-ok" br>
|
|
@@ -129,52 +137,60 @@
|
|
|
},
|
|
|
el: '.vue-box',
|
|
|
data: {
|
|
|
- banckList: [{
|
|
|
- name: '麻栗坡农商银行',
|
|
|
- value: '麻栗坡农商银行'
|
|
|
- }],
|
|
|
+ bankList: [],
|
|
|
id: sa.p('id', 0), // 获取超链接中的id参数(0=添加,非0=修改)
|
|
|
m: null, // 实体对象
|
|
|
},
|
|
|
methods: {
|
|
|
-
|
|
|
+ getBankList() {
|
|
|
+ sa.ajax('/sp-admin/TbBank/getAll', function(resp) {
|
|
|
+ this.bankList = resp.data;
|
|
|
+ }.bind(this));
|
|
|
+ },
|
|
|
// 创建一个 默认Model
|
|
|
createModel: function() {
|
|
|
return {
|
|
|
- name: '', // 名称
|
|
|
- legalPerson: '', // 法人
|
|
|
- idCard: '', // 身份证号
|
|
|
- contact: '', // 手机号码
|
|
|
- businessLicense: '', // 营业执照
|
|
|
- bankNo: '', // 银行编号
|
|
|
- bankName: '麻栗坡农商银行', // 银行名称
|
|
|
- bankAccount: '', // 银行账号
|
|
|
- dutyParagraph: '', // 税号
|
|
|
- addressIds: '', // 地址编号
|
|
|
- address: '', // 地址
|
|
|
+ businessName: '', // 企业名称
|
|
|
+ legalPerson: '', // 企业法人
|
|
|
+ dutyParagraph: '', // 统一社会信用代码
|
|
|
+ businessLicense: '', // 营业执照
|
|
|
+ name: '', // 联系人
|
|
|
+ email: '', // 邮箱
|
|
|
+ contact: '', // 手机号码
|
|
|
+ idCard: '', // 身份证号
|
|
|
+ bankNo: '', // 银行编号
|
|
|
+ bankName: '', // 银行名称
|
|
|
+ bankAccount: '', // 银行账号
|
|
|
+ address: '', // 企业地址
|
|
|
// judgeStatus: '', // 审核状态(0=未通过,1=已通过)
|
|
|
- // judgeContent: '', // 审核意见
|
|
|
+ // judgeContent: '', // 审核意见
|
|
|
// judgeTime: '', // 上次审核时间
|
|
|
- personId: '', // 人脸编号
|
|
|
- // deleteStatus: '', // 删除状态(0=禁用,1=启用)
|
|
|
+ // personId: '', // 人脸编号
|
|
|
+ // deleteStatus: '', // 删除状态(0=禁用,1=启用)
|
|
|
}
|
|
|
},
|
|
|
// 提交数据
|
|
|
ok: function() {
|
|
|
// 表单校验
|
|
|
let m = this.m;
|
|
|
- sa.checkNull(m.name, '请输入 [名称]');
|
|
|
- sa.checkNull(m.legalPerson, '请输入 [法人]');
|
|
|
+ sa.checkNull(m.businessName, '请输入 [企业名称]');
|
|
|
+ sa.checkNull(m.legalPerson, '请输入 [企业法人]');
|
|
|
+ sa.checkNull(m.dutyParagraph, '请输入 [统一社会信用代码]');
|
|
|
+ sa.checkNull(m.businessLicense, '请上传 [营业执照]');
|
|
|
+ sa.checkNull(m.name, '请输入 [联系人]');
|
|
|
sa.checkNull(m.idCard, '请输入 [身份证号]');
|
|
|
let contact = m.contact;
|
|
|
if (!sa.isPhone(contact)) {
|
|
|
sa.error('手机号不正确');
|
|
|
return;
|
|
|
}
|
|
|
- sa.checkNull(m.businessLicense, '请上传 [营业执照]');
|
|
|
- sa.checkNull(m.bankName, '请输入 [银行名称]');
|
|
|
+ let bankNo = m.bankNo;
|
|
|
+ sa.checkNull(bankNo, '请选择 [银行]');
|
|
|
sa.checkNull(m.bankAccount, '请输入 [银行账号]');
|
|
|
- sa.checkNull(m.dutyParagraph, '请输入 [税号]');
|
|
|
+ let bankList = this.bankList;
|
|
|
+ let bank = bankList.filter(bank => bank.bankCode === bankNo)[0];
|
|
|
+ this.m.bankName = bank.bankName;
|
|
|
+ m.type = 1; // 类型:企业收购商
|
|
|
// 开始增加或修改
|
|
|
if (this.id <= 0) { // 添加
|
|
|
sa.ajax('/level-two-server/TbPurchaser/add', m, function(res) {
|
|
@@ -197,6 +213,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted: function() {
|
|
|
+ this.getBankList();
|
|
|
// 初始化数据
|
|
|
if (this.id <= 0) {
|
|
|
this.m = this.createModel();
|
|
@@ -212,4 +229,4 @@
|
|
|
})
|
|
|
</script>
|
|
|
</body>
|
|
|
-</html>
|
|
|
+</html>
|