|
@@ -4,7 +4,7 @@
|
|
|
<div class="customer-head">
|
|
|
<div class="customer-back">
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
- @click="backToList">返回列表
|
|
|
+ @click="backToList">返回列表
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
@@ -17,78 +17,66 @@
|
|
|
<avue-form ref="form" class="trading-form" v-model="form" :option="option">
|
|
|
<template slot="corpsTypeId">
|
|
|
<div style="display:flex;">
|
|
|
- <avue-input-tree v-model="form.corpsTypeId" placeholder="请选择客户分类" :dic="corpTypeList"
|
|
|
- :props="props">
|
|
|
+ <avue-input-tree v-model="form.corpsTypeId" placeholder="请选择客户分类" :dic="corpTypeList" :props="props">
|
|
|
</avue-input-tree>
|
|
|
- <i class="el-icon-setting" style="font-size:18px;line-height: 32px;margin-left:4px"
|
|
|
- @click="corpTypeVisible = true"></i>
|
|
|
+ <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
|
|
|
+ @click="corpTypeVisible = true"></i>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot="deliveryWarehouseId">
|
|
|
+ <div style="display:flex;">
|
|
|
+ <avue-input-tree v-model="form.deliveryWarehouseId" placeholder="请选择发货仓库" :dic="corpTypeListCk"
|
|
|
+ :props="propsCk">
|
|
|
+ </avue-input-tree>
|
|
|
+ <i class="el-icon-circle-plus-outline" style="font-size:18px;line-height: 32px;margin-left:4px"
|
|
|
+ @click="dialogVisibleCK = true"></i>
|
|
|
</div>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="客户联系人" v-loading="loadingBtn">
|
|
|
- <avue-crud
|
|
|
- ref="crudTwo"
|
|
|
- :option="customerContact"
|
|
|
- v-model="contactsForm"
|
|
|
- :data="contactsData"
|
|
|
- @saveColumn="saveColumnTwo"
|
|
|
- @resetColumn="resetColumnTwo"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @row-del="rowDelTwo">
|
|
|
+ <avue-crud ref="crudTwo" :option="customerContact" v-model="contactsForm" :data="contactsData"
|
|
|
+ @saveColumn="saveColumnTwo" @resetColumn="resetColumnTwo" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ @row-del="rowDelTwo">
|
|
|
<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.rowEdit(row,index)"
|
|
|
- >{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
+ <el-button :size="size" :disabled="disabled" :type="type"
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.crudTwo.rowEdit(row, index)">{{
|
|
|
+ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDelTwo(row,index)">删除
|
|
|
+ @click="rowDelTwo(row, index)">删除
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-check" :size="size" :type="type" @click="creatingUsers(row)">创建用户</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
<trade-card title="地址信息" v-loading="loadingBtn">
|
|
|
- <avue-crud :option="option2" ref="crud" :data="data"
|
|
|
- @row-save="rowSave"
|
|
|
- @row-update="rowUpdate"
|
|
|
- @saveColumn="saveColumn"
|
|
|
- @resetColumn="resetColumn">
|
|
|
+ <avue-crud :option="option2" ref="crud" :data="data" @row-save="rowSave" @row-update="rowUpdate"
|
|
|
+ @saveColumn="saveColumn" @resetColumn="resetColumn">
|
|
|
<template slot="headerSerial">
|
|
|
<el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
|
|
|
- :disabled="detailData.status == 1" circle></el-button>
|
|
|
+ :disabled="detailData.status == 1" circle></el-button>
|
|
|
</template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
- <el-button
|
|
|
- :size="size" :disabled="disabled" :type="type"
|
|
|
- :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
|
|
|
- @click="$refs.crud.rowEdit(row,index)"
|
|
|
- >{{ row.$cellEdit ? '确认' : '修改' }}
|
|
|
+ <el-button :size="size" :disabled="disabled" :type="type"
|
|
|
+ :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="$refs.crud.rowEdit(row, index)">{{
|
|
|
+ row.$cellEdit ? '确认' : '修改' }}
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
|
|
|
- @click="rowDel(row,index)">删除
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type" @click="rowDel(row, index)">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
<template slot="defaultAddres" slot-scope="{row,index,disabled}">
|
|
|
- <el-switch
|
|
|
- active-value="1"
|
|
|
- inactive-value="0"
|
|
|
- :disabled="disabled"
|
|
|
- v-model="row.defaultAddres"
|
|
|
- @change="addressUnique(row,index)">
|
|
|
+ <el-switch active-value="1" inactive-value="0" :disabled="disabled" v-model="row.defaultAddres"
|
|
|
+ @change="addressUnique(row, index)">
|
|
|
</el-switch>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
|
- <c-upload v-loading="loadingBtn" typeUpload="CD"
|
|
|
- deleteUrl="/api/blade-client/corpsfiles/remove" :data="corpsFiles" display
|
|
|
- :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>
|
|
|
+ <c-upload v-loading="loadingBtn" typeUpload="CD" deleteUrl="/api/blade-client/corpsfiles/remove" :data="corpsFiles"
|
|
|
+ display :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>
|
|
|
<el-dialog title="设置客户分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%"
|
|
|
- append-to-body @closed="corpTypeClosed">
|
|
|
+ append-to-body @closed="corpTypeClosed">
|
|
|
<span>
|
|
|
<corp-type></corp-type>
|
|
|
<!-- <avue-form :key="reload" ref="corpType" v-model="form4" :option="option4" style="margin-top:20px">
|
|
@@ -109,11 +97,19 @@
|
|
|
<el-button type="primary" @click="confirmSynchronizationTwo">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="新增仓库" :visible.sync="dialogVisibleCK" append-to-body width="60%">
|
|
|
+ <avue-form v-if="dialogVisibleCK" ref="formDataThree" v-model="formDataThree" :option="optionDataCK">
|
|
|
+ </avue-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisibleCK = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="confirmSynchronizationThree">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {option2, option3} from "./js/optionList";
|
|
|
+import { option2, option3 } from "./js/optionList";
|
|
|
// import {getDetails, addCorpType, getCorpType, submit, customerList, itemDel} from "@/api/basicData/client";
|
|
|
import {
|
|
|
getDetails,
|
|
@@ -124,16 +120,24 @@ import {
|
|
|
corpsattn
|
|
|
} from "@/api/tirePartsMall/basicData/customerInformation"
|
|
|
import corpType from '@/components/corpType/index'
|
|
|
-import {creatingUsersTwo} from "@/api/basicData/customerInformation";
|
|
|
-import {getRoleTree} from "@/api/system/role";
|
|
|
-import {getDeptTree} from "@/api/system/dept";
|
|
|
-import {getPostList} from "@/api/system/post";
|
|
|
+import { creatingUsersTwo } from "@/api/basicData/customerInformation";
|
|
|
+import { getRoleTree } from "@/api/system/role";
|
|
|
+import { getDeptTree } from "@/api/system/dept";
|
|
|
+import { getPostList } from "@/api/system/post";
|
|
|
import website from "@/config/website";
|
|
|
+import {
|
|
|
+ typeSave,
|
|
|
+ customerListAll
|
|
|
+} from "@/api/tirePartsMall/basicData/warehouse";
|
|
|
|
|
|
export default {
|
|
|
name: "index",
|
|
|
data() {
|
|
|
return {
|
|
|
+ propsCk: {
|
|
|
+ label: 'cname',
|
|
|
+ value: 'id'
|
|
|
+ },
|
|
|
props: {
|
|
|
label: 'title',
|
|
|
value: 'value'
|
|
@@ -200,12 +204,140 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ optionDataCK: {
|
|
|
+ span: 8,
|
|
|
+ menuBtn: false,
|
|
|
+ column: [{
|
|
|
+ label: "仓库编码",
|
|
|
+ prop: "code",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "仓库名称",
|
|
|
+ prop: "cname",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "联系人",
|
|
|
+ prop: "contacts",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "联系电话",
|
|
|
+ prop: "tel",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "是否计费",
|
|
|
+ prop: "chargeOrNot",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ type: "select",
|
|
|
+ dicData: [{
|
|
|
+ label: "是",
|
|
|
+ value: "0"
|
|
|
+ }, {
|
|
|
+ label: "否",
|
|
|
+ value: "1"
|
|
|
+ }],
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "库容",
|
|
|
+ prop: "storageCapacity",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "所属公司",
|
|
|
+ prop: "artsVisionId",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "共享公司",
|
|
|
+ prop: "sharedCompany",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ rules: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }, {
|
|
|
+ label: "备注",
|
|
|
+ prop: "remarks",
|
|
|
+ type: "textarea",
|
|
|
+ minRows: 3,
|
|
|
+ span: 24,
|
|
|
+ overHidden: true,
|
|
|
+ width: 200
|
|
|
+ }]
|
|
|
+ },
|
|
|
dialogVisibleBt: false,
|
|
|
formDataTwo: false,
|
|
|
+ dialogVisibleCK: false,
|
|
|
+ formDataThree: false,
|
|
|
customerContact: {},
|
|
|
contactsForm: {},
|
|
|
contactsData: [],
|
|
|
corpTypeList: [],
|
|
|
+ corpTypeListCk: [],
|
|
|
corpTypeVisible: false,
|
|
|
activeName: 'first',
|
|
|
loadingBtn: false,
|
|
@@ -338,17 +470,17 @@ export default {
|
|
|
],
|
|
|
span: 24,
|
|
|
},
|
|
|
- {
|
|
|
- label: "上级类型",
|
|
|
- prop: "parentId",
|
|
|
- dicData: [],
|
|
|
- type: "tree",
|
|
|
- props: {
|
|
|
- label: "cname",
|
|
|
- value: "id"
|
|
|
- },
|
|
|
- span: 24,
|
|
|
- }
|
|
|
+ {
|
|
|
+ label: "上级类型",
|
|
|
+ prop: "parentId",
|
|
|
+ dicData: [],
|
|
|
+ type: "tree",
|
|
|
+ props: {
|
|
|
+ label: "cname",
|
|
|
+ value: "id"
|
|
|
+ },
|
|
|
+ span: 24,
|
|
|
+ }
|
|
|
]
|
|
|
},
|
|
|
corpsFiles: [],
|
|
@@ -425,6 +557,7 @@ export default {
|
|
|
}
|
|
|
this.getCorpType()
|
|
|
this.getAllWorkDicts()
|
|
|
+ this.getCorpTypeCk()
|
|
|
},
|
|
|
methods: {
|
|
|
addressUnique(row, index) {
|
|
@@ -476,8 +609,26 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
,
|
|
|
+ //确认创建仓库
|
|
|
+ confirmSynchronizationThree() {
|
|
|
+ this.$refs["formDataThree"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ typeSave({
|
|
|
+ ...this.formDataThree,
|
|
|
+ }).then(res => {
|
|
|
+ this.dialogVisibleCK = false;
|
|
|
+ this.formDataThree = {}
|
|
|
+ this.getCorpTypeCk()
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ ,
|
|
|
getAllWorkDicts() {
|
|
|
- customerList({corpType: "KH"}).then(res => {
|
|
|
+ customerList({ corpType: "KH" }).then(res => {
|
|
|
this.findObject(this.option4.column, "parentId").dicData = res.data.data.records
|
|
|
});
|
|
|
this.getWorkDicts("abbreviation").then(res => {
|
|
@@ -501,7 +652,7 @@ export default {
|
|
|
,
|
|
|
getDetail(id) {
|
|
|
this.loadingBtn = true
|
|
|
- getDetails({id: id})
|
|
|
+ getDetails({ id: id })
|
|
|
.then(res => {
|
|
|
this.form = res.data.data;
|
|
|
this.data = res.data.data.corpsAddrList
|
|
@@ -518,7 +669,7 @@ export default {
|
|
|
}
|
|
|
,
|
|
|
addRow() {
|
|
|
- this.data.push({$cellEdit: true})
|
|
|
+ this.data.push({ $cellEdit: true })
|
|
|
}
|
|
|
,
|
|
|
rowCell(row, index) {
|
|
@@ -554,7 +705,7 @@ export default {
|
|
|
}
|
|
|
,
|
|
|
addRow2() {
|
|
|
- this.data2.push({$cellEdit: true, type: 1})
|
|
|
+ this.data2.push({ $cellEdit: true, type: 1 })
|
|
|
}
|
|
|
,
|
|
|
rowCell2(row, index) {
|
|
@@ -595,11 +746,18 @@ export default {
|
|
|
}
|
|
|
,
|
|
|
getCorpType() {
|
|
|
- getCorpType({corpType: 'KH'}).then(res => {
|
|
|
+ getCorpType({ corpType: 'KH' }).then(res => {
|
|
|
this.corpTypeList = res.data.data
|
|
|
})
|
|
|
}
|
|
|
,
|
|
|
+ getCorpTypeCk() {
|
|
|
+ customerListAll().then(res => {
|
|
|
+ this.corpTypeListCk = res.data.data
|
|
|
+ console.log("!111", this.corpTypeListCk)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ ,
|
|
|
addCorpType() {
|
|
|
// this.$refs["corpType"].validate((valid, done) => {
|
|
|
// done();
|
|
@@ -796,7 +954,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-;
|
|
|
+ ;
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|