|
@@ -372,7 +372,7 @@
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddMkCmCustomersContact">添加
|
|
|
</el-button>
|
|
|
<el-button type="danger" icon="el-icon-delete" size="mini"
|
|
|
- @click="handleDeleteMkCmCustomersContact">
|
|
|
+ @click="handleDeleteTab('0')">
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -408,6 +408,19 @@
|
|
|
<dict-tag :options="dict.type.mk_bo_contact_state" :value="scope.row.state"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180px"
|
|
|
+ fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-search" @click="handleCheckAdd(scope.row, '0')">
|
|
|
+ 查看
|
|
|
+ </el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdateAdd(scope.row, '0')">修改
|
|
|
+ </el-button>
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteAdd(scope.row, '0')">
|
|
|
+ 删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
@@ -418,7 +431,7 @@
|
|
|
@click="handleAddMkCmCustomersResponsiblePerson">添加
|
|
|
</el-button>
|
|
|
<el-button type="danger" icon="el-icon-delete" size="mini"
|
|
|
- @click="handleDeleteMkCmCustomersResponsiblePerson">
|
|
|
+ @click="handleDeleteTab('1')">
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -469,7 +482,7 @@
|
|
|
添加
|
|
|
</el-button>
|
|
|
<el-button type="danger" icon="el-icon-delete" size="mini"
|
|
|
- @click="handleDeleteMkCmCustomersDepartment">
|
|
|
+ @click="handleDeleteTab('2')">
|
|
|
删除
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -478,7 +491,12 @@
|
|
|
@selection-change="handleMkCmCustomersDepartmentSelectionChange" ref="mkCmCustomersDepartment">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column type="index" label="序号" min-width="50" align="center" />
|
|
|
- <el-table-column label="科室名称" align="center" prop="name" min-width="150" />
|
|
|
+ <el-table-column label="科室名称" align="center" prop="name" min-width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag :options="dict.type.mk_bo_section" :value="scope.row.name"
|
|
|
+ show-overflow-tooltip />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="客户名称" align="center" prop="customersName" min-width="150" />
|
|
|
<el-table-column label="负责人姓名" align="center" prop="responsiblePersonName" min-width="150" />
|
|
|
<el-table-column label="联系人手机" align="center" prop="phone" min-width="150" />
|
|
@@ -510,7 +528,7 @@
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <AddContact v-model="isAdd0" v-if="isAdd0" :operatingState="operatingSta" :state="state" :customersId="form.id"
|
|
|
+ <AddContact v-model="isAdd0" v-if="isAdd0" :operatingState="operatingSta" :state="state" :row="rowDetail" :customersId="form.id"
|
|
|
:customersName="form.name" />
|
|
|
|
|
|
<AddPerson v-model="isAdd1" v-if="isAdd1" :pageStu="page" :disable="disable" :row="rowDetail" :customersId="form.id"
|
|
@@ -561,7 +579,7 @@
|
|
|
},
|
|
|
dicts: ['mk_cm_yes_no', 'mk_cm_classification', 'mk_cm_type', 'mk_cm_category', 'mk_cm_channel',
|
|
|
'mk_cm_business_type', 'mk_cm_industry', 'mk_cm_tax_type', 'mk_cm_enterprise_type', 'mk_cm_relationship_type',
|
|
|
- 'mk_cm_production_line'
|
|
|
+ 'mk_cm_production_line', 'mk_bo_section', 'sys_user_sex', 'mk_bo_position', 'mk_bo_power', 'mk_bo_contact_state'
|
|
|
],
|
|
|
data() {
|
|
|
return {
|
|
@@ -833,7 +851,12 @@
|
|
|
},
|
|
|
/** Add查看按钮操作 */
|
|
|
handleCheckAdd(row, type) {
|
|
|
- if (type == '1') {
|
|
|
+ if (type == '0') {
|
|
|
+ this.isAdd0 = true;
|
|
|
+ this.operatingSta = 'Browse';
|
|
|
+ this.rowDetail = row;
|
|
|
+ this.disable = true;
|
|
|
+ } else if (type == '1') {
|
|
|
this.isAdd1 = true;
|
|
|
this.page = 'check';
|
|
|
this.rowDetail = row;
|
|
@@ -860,7 +883,12 @@
|
|
|
},
|
|
|
/** Add修改按钮操作 */
|
|
|
handleUpdateAdd(row, type) {
|
|
|
- if (type == '1') {
|
|
|
+ if (type == '0') {
|
|
|
+ this.isAdd0 = true;
|
|
|
+ this.operatingSta = 'Update';
|
|
|
+ this.rowDetail = row;
|
|
|
+ this.disable = false;
|
|
|
+ } else if (type == '1') {
|
|
|
this.isAdd1 = true;
|
|
|
this.page = 'update';
|
|
|
this.rowDetail = row;
|
|
@@ -914,9 +942,20 @@
|
|
|
},
|
|
|
/** Add删除按钮操作 */
|
|
|
handleDeleteAdd(row, type) {
|
|
|
- const ids = row.id || this.ids;
|
|
|
- if (type == '1') {
|
|
|
- this.$modal.confirm('是否确认删除人员姓名为"' + row.personName + '"的数据项?').then(function () {
|
|
|
+ let ids = [];
|
|
|
+ ids[0] = row.id;
|
|
|
+ if (type == '0') {
|
|
|
+ console.log(row, 'row')
|
|
|
+ this.$modal.confirm('是否确认删除序号为"' + row.index + '"的数据项?').then(function () {
|
|
|
+ return delContact(ids);
|
|
|
+ }).then(() => {
|
|
|
+ getContactInfo(this.form.id).then(res => {
|
|
|
+ this.mkCmCustomersContactList = res.data;
|
|
|
+ })
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ } else if (type == '1') {
|
|
|
+ this.$modal.confirm('是否确认删除序号为"' + row.index + '"的数据项?').then(function () {
|
|
|
return delCustomersResponsiblePerson(ids);
|
|
|
}).then(() => {
|
|
|
getCustomers(row.customersId).then(res => {
|
|
@@ -925,7 +964,7 @@
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
}).catch(() => {});
|
|
|
} else if (type == '2') {
|
|
|
- this.$modal.confirm('是否确认删除科室名称为"' + row.name + '"的数据项?').then(function () {
|
|
|
+ this.$modal.confirm('是否确认删除序号为"' + row.index + '"的数据项?').then(function () {
|
|
|
return delCustomersDepartment(ids);
|
|
|
}).then(() => {
|
|
|
getCustomers(row.customersId).then(res => {
|
|
@@ -978,52 +1017,50 @@
|
|
|
this.page = 'add';
|
|
|
this.disable = false;
|
|
|
},
|
|
|
- /** 客户联系人删除按钮操作 */
|
|
|
- handleDeleteMkCmCustomersContact() {
|
|
|
+ /** 客户页签删除按钮操作 */
|
|
|
+ handleDeleteTab(type) {
|
|
|
let that = this;
|
|
|
- if (that.checkedMkCmCustomersContact.length == 0) {
|
|
|
- that.$modal.msgError("请先选择要删除的客户联系人数据");
|
|
|
- } else {
|
|
|
- that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersContact + '"的数据项?').then(function () {
|
|
|
- return delContact(that.checkedMkCmCustomersContactIds);
|
|
|
- }).then(() => {
|
|
|
- getContactInfo(that.form.id).then(res => {
|
|
|
- that.mkCmCustomersContactList = res.data;
|
|
|
- })
|
|
|
- that.$modal.msgSuccess("删除成功");
|
|
|
- }).catch((e) => {
|
|
|
- console.log(e, 'e');
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- /** 客户负责人删除按钮操作 */
|
|
|
- handleDeleteMkCmCustomersResponsiblePerson() {
|
|
|
- if (this.checkedMkCmCustomersResponsiblePerson.length == 0) {
|
|
|
- this.$modal.msgError("请先选择要删除的客户负责人数据");
|
|
|
- } else {
|
|
|
- this.$modal.confirm('是否确认删除序号为"' + this.checkedMkCmCustomersResponsiblePerson + '"的数据项?').then(function () {
|
|
|
- return delCustomersResponsiblePerson(this.checkedMkCmCustomersResponsiblePersonIds);
|
|
|
- }).then(() => {
|
|
|
- getCustomers(this.form.id).then(res => {
|
|
|
- this.mkCmCustomersResponsiblePersonList = res.data.mkCmCustomersResponsiblePersonList;
|
|
|
- })
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
- }
|
|
|
- },
|
|
|
- /** 客户科室删除按钮操作 */
|
|
|
- handleDeleteMkCmCustomersDepartment() {
|
|
|
- if (this.checkedMkCmCustomersDepartment.length == 0) {
|
|
|
- this.$modal.msgError("请先选择要删除的客户科室数据");
|
|
|
- } else {
|
|
|
- this.$modal.confirm('是否确认删除序号为"' + this.checkedMkCmCustomersDepartment + '"的数据项?').then(function () {
|
|
|
- return delCustomersDepartment(this.checkedMkCmCustomersDepartmentIds);
|
|
|
- }).then(() => {
|
|
|
- getCustomers(this.form.id).then(res => {
|
|
|
- this.mkCmCustomersDepartmentList = res.data.mkCmCustomersDepartmentList;
|
|
|
- })
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- }).catch(() => {});
|
|
|
+ if (type == '0') {
|
|
|
+ if (that.checkedMkCmCustomersContact.length == 0) {
|
|
|
+ that.$modal.msgError("请先选择要删除的客户联系人数据");
|
|
|
+ } else {
|
|
|
+ that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersContact + '"的数据项?').then(function () {
|
|
|
+ return delContact(that.checkedMkCmCustomersContactIds);
|
|
|
+ }).then(() => {
|
|
|
+ getContactInfo(that.form.id).then(res => {
|
|
|
+ that.mkCmCustomersContactList = res.data;
|
|
|
+ })
|
|
|
+ that.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch((e) => {
|
|
|
+ console.log(e, 'e');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else if (type == '1') {
|
|
|
+ if (that.checkedMkCmCustomersResponsiblePerson.length == 0) {
|
|
|
+ that.$modal.msgError("请先选择要删除的客户负责人数据");
|
|
|
+ } else {
|
|
|
+ that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersResponsiblePerson + '"的数据项?').then(function () {
|
|
|
+ return delCustomersResponsiblePerson(that.checkedMkCmCustomersResponsiblePersonIds);
|
|
|
+ }).then(() => {
|
|
|
+ getCustomers(that.form.id).then(res => {
|
|
|
+ that.mkCmCustomersResponsiblePersonList = res.data.mkCmCustomersResponsiblePersonList;
|
|
|
+ })
|
|
|
+ that.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ }
|
|
|
+ } else if (type == '2') {
|
|
|
+ if (that.checkedMkCmCustomersDepartment.length == 0) {
|
|
|
+ that.$modal.msgError("请先选择要删除的客户科室数据");
|
|
|
+ } else {
|
|
|
+ that.$modal.confirm('是否确认删除序号为"' + that.checkedMkCmCustomersDepartment + '"的数据项?').then(function () {
|
|
|
+ return delCustomersDepartment(that.checkedMkCmCustomersDepartmentIds);
|
|
|
+ }).then(() => {
|
|
|
+ getCustomers(that.form.id).then(res => {
|
|
|
+ that.mkCmCustomersDepartmentList = res.data.mkCmCustomersDepartmentList;
|
|
|
+ })
|
|
|
+ that.$modal.msgSuccess("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
/** 复选框选中数据 */
|