|
@@ -130,6 +130,8 @@
|
|
|
@click="allClick('一键保存')">一键保存</el-button>
|
|
|
<el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
@click="allClick('一键编辑')">一键编辑</el-button>
|
|
|
+ <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
+ @click="allClick('批量删除')">批量删除</el-button>
|
|
|
<el-button type="success" size="small" :disabled="editDisabled || !form.id"
|
|
|
@click="allClick('首款账单')">首款账单
|
|
|
</el-button>
|
|
@@ -557,6 +559,11 @@ export default {
|
|
|
label: '所属公司',
|
|
|
prop: "affiliatedCompanyName",
|
|
|
disabled: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: '业务员',
|
|
@@ -1374,6 +1381,7 @@ export default {
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
this.$set(row, "$cellEdit", false);
|
|
|
+ this.submit()
|
|
|
}
|
|
|
}
|
|
|
if (name == '一键编辑') {
|
|
@@ -1381,6 +1389,42 @@ export default {
|
|
|
this.$set(row, "$cellEdit", true);
|
|
|
}
|
|
|
}
|
|
|
+ if (name == '批量删除') {
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.selectionList
|
|
|
+ arr = this.form.agentItemsList
|
|
|
+ // 获取有id 的数据
|
|
|
+ const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
|
|
|
+ let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
|
|
|
+ // 把选中的删除掉
|
|
|
+ multiList.forEach((item) => {
|
|
|
+ for (let index in arr) {
|
|
|
+ if (JSON.stringify(item) == JSON.stringify(arr[index])) {
|
|
|
+ arr.splice(Number(index), 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (itemsWithId.length != 0) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ remove({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
if (name == '首款账单') {
|
|
|
if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
|