|
@@ -27,7 +27,21 @@
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="地址管理" v-loading="loadingBtn">
|
|
|
- <el-tabs v-model="activeName">
|
|
|
+ <avue-crud ref="crud" :option="option2" :data="data" :table-loading="loading" @saveColumn="saveColumn"
|
|
|
+ @resetColumn="resetColumn" :cell-style="cellStyle" class="address">
|
|
|
+ <template slot="headerSerial">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"
|
|
|
+ :disabled="detailData.status == 1" circle></el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button size="small" type="text" @click="rowCell(row, index)">{{
|
|
|
+ row.$cellEdit ? "保存" : "修改"
|
|
|
+ }}</el-button>
|
|
|
+ <el-button size="small" type="text" @click="rowDel(row, index)">删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ <!-- <el-tabs v-model="activeName">
|
|
|
<el-tab-pane label="客户地址" name="first">
|
|
|
<avue-crud ref="crud" :option="option2" :data="data1" :table-loading="loading" @saveColumn="saveColumn"
|
|
|
@resetColumn="resetColumn" :cell-style="cellStyle" class="address">
|
|
@@ -60,7 +74,7 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
+ </el-tabs> -->
|
|
|
|
|
|
</trade-card>
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
@@ -103,6 +117,7 @@ export default {
|
|
|
form2: {},
|
|
|
form3: {},
|
|
|
form4: {},
|
|
|
+ data:[],
|
|
|
data1: [],
|
|
|
data2: [],
|
|
|
option: {
|
|
@@ -200,13 +215,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async created() {
|
|
|
- console.log(await this.getColumnData(this.getColumnName(208), option2))
|
|
|
this.option2 = await this.getColumnData(this.getColumnName(208), option2);
|
|
|
- console.log(this.option2)
|
|
|
- this.option3 = await this.getColumnData(this.getColumnName(208.4), option3);
|
|
|
- if (this.detailData.id) {
|
|
|
- this.getDetail(this.detailData.id);
|
|
|
- }
|
|
|
+ // this.option3 = await this.getColumnData(this.getColumnName(208.4), option3);
|
|
|
+ // if (this.detailData.id) {
|
|
|
+ // this.getDetail(this.detailData.id);
|
|
|
+ // }
|
|
|
if (this.detailData.status == 1) {
|
|
|
this.option.disabled = true;
|
|
|
}
|
|
@@ -221,7 +234,7 @@ export default {
|
|
|
// this.getWorkDicts("abbreviation").then(res => {
|
|
|
// this.findObject(this.option2.column, "abbreviation").dicData = res.data.data;
|
|
|
// });
|
|
|
- this.$refs.crud.init();
|
|
|
+ // this.$refs.crud.init();
|
|
|
},
|
|
|
cellStyle() {
|
|
|
return "padding:0;height:40px;";
|
|
@@ -238,8 +251,7 @@ export default {
|
|
|
getDetails({ id: id })
|
|
|
.then(res => {
|
|
|
this.form = res.data.data;
|
|
|
- this.data1 = res.data.data.corpsAddrList.filter(e => e.type == 0);
|
|
|
- this.data2 = res.data.data.corpsAddrList.filter(e => e.type == 1);
|
|
|
+ this.data= res.data.data.corpsAddrList
|
|
|
this.corpsFiles=res.data.data.corpsFiles
|
|
|
})
|
|
|
.finally(() => {
|
|
@@ -250,7 +262,7 @@ export default {
|
|
|
this.form.corpName = row.cname
|
|
|
},
|
|
|
addRow() {
|
|
|
- this.data1.push({ $cellEdit: true, type: 0 })
|
|
|
+ this.data.push({ $cellEdit: true})
|
|
|
},
|
|
|
rowCell(row, index) {
|
|
|
if (row.$cellEdit == true) {
|
|
@@ -278,7 +290,7 @@ export default {
|
|
|
type: "success",
|
|
|
message: "删除成功!"
|
|
|
});
|
|
|
- this.data1.splice(index, 1);
|
|
|
+ this.data.splice(index, 1);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -345,12 +357,11 @@ export default {
|
|
|
done();
|
|
|
if (valid) {
|
|
|
this.loadingBtn = true;
|
|
|
- submit({ ...this.form, code: this.form.cname, corpType: "KH", corpsAddrList: this.data1.concat(this.data2) })
|
|
|
+ submit({ ...this.form, code: this.form.cname, corpType: "KH", corpsAddrList: this.data})
|
|
|
.then(res => {
|
|
|
this.$message.success("保存成功");
|
|
|
this.form = res.data.data;
|
|
|
- this.data1 = res.data.data.corpsAddrList.filter(e => e.type == 0);
|
|
|
- this.data2 = res.data.data.corpsAddrList.filter(e => e.type == 1);
|
|
|
+ this.data = res.data.data.corpsAddrList
|
|
|
this.corpsFiles=res.data.data.corpsFiles
|
|
|
})
|
|
|
.finally(() => {
|