|
@@ -37,11 +37,11 @@
|
|
|
@row-save="rowSave"
|
|
|
@row-update="rowUpdate"
|
|
|
@row-del="rowDelTwo">
|
|
|
- <template slot-scope="{ type, size, row, disabled}" slot="menu">
|
|
|
+ <template slot-scope="{ type, size, row, disabled,index}" slot="menu">
|
|
|
<el-button
|
|
|
:size="size" :disabled="disabled" :type="type"
|
|
|
:icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
|
|
|
- @click="$refs.crudTwo.rowCell(row,index)"
|
|
|
+ @click="$refs.crudTwo.rowEdit(row,index)"
|
|
|
>{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
@@ -65,7 +65,7 @@
|
|
|
<el-button
|
|
|
:size="size" :disabled="disabled" :type="type"
|
|
|
:icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
|
|
|
- @click="$refs.crud.rowCell(row,index)"
|
|
|
+ @click="$refs.crud.rowEdit(row,index)"
|
|
|
>{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
@@ -115,9 +115,16 @@
|
|
|
<script>
|
|
|
import {option2, option3} from "./js/optionList";
|
|
|
// import {getDetails, addCorpType, getCorpType, submit, customerList, itemDel} from "@/api/basicData/client";
|
|
|
-import {getDetails, getCorpType, submit, customerList, itemDel} from "@/api/tirePartsMall/basicData/customerInformation"
|
|
|
+import {
|
|
|
+ getDetails,
|
|
|
+ getCorpType,
|
|
|
+ submit,
|
|
|
+ customerList,
|
|
|
+ itemDel,
|
|
|
+ corpsattn
|
|
|
+} from "@/api/tirePartsMall/basicData/customerInformation"
|
|
|
import corpType from '@/components/corpType/index'
|
|
|
-import {corpsattn, creatingUsersTwo} from "@/api/basicData/customerInformation";
|
|
|
+import {creatingUsersTwo} from "@/api/basicData/customerInformation";
|
|
|
import {getRoleTree} from "@/api/system/role";
|
|
|
import {getDeptTree} from "@/api/system/dept";
|
|
|
import {getPostList} from "@/api/system/post";
|
|
@@ -351,10 +358,10 @@ export default {
|
|
|
addBtnText: "录入明细",
|
|
|
refreshBtn: false,
|
|
|
dialogDrag: true,
|
|
|
- addBtn: false,
|
|
|
+ addBtn: true,
|
|
|
span: 8,
|
|
|
height: 600,
|
|
|
- addRowBtn: true,
|
|
|
+ addRowBtn: false,
|
|
|
editBtn: false,
|
|
|
delBtn: false,
|
|
|
menuWidth: 200,
|
|
@@ -363,11 +370,25 @@ export default {
|
|
|
column: [{
|
|
|
label: '联系人',
|
|
|
prop: 'cname',
|
|
|
- cell: true
|
|
|
+ cell: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
}, {
|
|
|
label: '电话',
|
|
|
prop: 'tel',
|
|
|
- cell: true
|
|
|
+ cell: true,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
}, {
|
|
|
label: '备注',
|
|
|
prop: 'remarks',
|
|
@@ -378,14 +399,12 @@ export default {
|
|
|
},
|
|
|
components: {
|
|
|
corpType
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
props: {
|
|
|
detailData: {
|
|
|
type: Object
|
|
|
}
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
async created() {
|
|
|
this.customerContact = await this.getColumnData(
|
|
|
this.getColumnName(263.1),
|
|
@@ -406,9 +425,18 @@ export default {
|
|
|
}
|
|
|
this.getCorpType()
|
|
|
this.getAllWorkDicts()
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ addressUnique(row, index) {
|
|
|
+ for (let item in this.data) {
|
|
|
+ if (index != item) {
|
|
|
+ if (this.data[item].defaultAddres == 1) {
|
|
|
+ this.$message.warning("默认地址只能唯一")
|
|
|
+ return row.defaultAddres = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
initData(tenantId) {
|
|
|
getRoleTree(tenantId).then(res => {
|
|
|
const column = this.findObject(this.optionData.column, "roleId");
|
|
@@ -422,8 +450,7 @@ export default {
|
|
|
const column = this.findObject(this.optionData.column, "postId");
|
|
|
column.dicData = res.data.data;
|
|
|
});
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
//确认创建用户
|
|
|
confirmSynchronizationTwo() {
|
|
|
this.$refs["formDataTwo"].validate((valid, done) => {
|
|
@@ -668,9 +695,7 @@ export default {
|
|
|
,
|
|
|
//新增客户联系人保存触发
|
|
|
rowSave(row, done, loading) {
|
|
|
- console.log(row, done, loading);
|
|
|
- this.contactsData.push(row);
|
|
|
- done();
|
|
|
+ done(row);
|
|
|
}
|
|
|
,
|
|
|
//修改客户联系人触发
|