|
@@ -93,15 +93,15 @@
|
|
|
<span v-else>{{ row.returnsNumber }}</span>
|
|
|
</template>
|
|
|
<template slot-scope="{type,size,row,index,disabled}" slot="menu">
|
|
|
- <el-button v-if="mingxibaocun" :size="size" :disabled="form.status != '录入'|| editButton" :type="type"
|
|
|
- :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
+ <el-button v-if="mingxibaocun" :size="size" :disabled="form.status != '录入' || editButton"
|
|
|
+ :type="type" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
|
|
|
@click="hangeditBtn(row, index)">编辑
|
|
|
</el-button>
|
|
|
<el-button v-else :size="size" :disabled="disabled" :type="type"
|
|
|
:icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="inSave(row, index)">保存
|
|
|
</el-button>
|
|
|
- <el-button icon="el-icon-delete" :size="size" :disabled="form.status != '录入'|| editButton" :type="type"
|
|
|
- @click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
+ <el-button icon="el-icon-delete" :size="size" :disabled="form.status != '录入' || editButton"
|
|
|
+ :type="type" @click="rowDelBox(row, index, 'orderItemsList')">删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -747,7 +747,7 @@ export default {
|
|
|
})
|
|
|
getDetails({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
- if (res.data.data.status != '录入'||this.editButton) {
|
|
|
+ if (res.data.data.status != '录入' || this.editButton) {
|
|
|
this.findObject(this.optionForm.column, 'businesDate').disabled = true
|
|
|
this.findObject(this.optionForm.column, 'remarks').disabled = true
|
|
|
}
|
|
@@ -911,8 +911,8 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
// 监听多选
|
|
|
- selectionContacts(list){
|
|
|
- this.selectionMultilist=list
|
|
|
+ selectionContacts(list) {
|
|
|
+ this.selectionMultilist = list
|
|
|
},
|
|
|
// 一键删除
|
|
|
batchDelete() {
|
|
@@ -928,7 +928,12 @@ export default {
|
|
|
let arr = this.form.orderItemsList
|
|
|
// 获取有id 的数据
|
|
|
const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
|
|
|
- let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
|
|
|
+ let arrIds = []
|
|
|
+ itemsWithId.map(item => {
|
|
|
+ if (item.id) {
|
|
|
+ arrIds.push(item.id)
|
|
|
+ }
|
|
|
+ }) // 获取id 数据
|
|
|
// 把选中的删除掉
|
|
|
multiList.forEach((item) => {
|
|
|
for (let index in arr) {
|
|
@@ -938,11 +943,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
// 有id 的处理
|
|
|
- if (itemsWithId.length != 0) {
|
|
|
- delOrderItem({ ids: arrIds.join(',') }).then(res => {
|
|
|
- this.$message.success("操作成功!");
|
|
|
- });
|
|
|
+ if (arrIds.length != 0) {
|
|
|
+ if (itemsWithId.length != 0) {
|
|
|
+ delOrderItem({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
rowSave(form, done, loading) {
|