|
|
@@ -12,7 +12,7 @@
|
|
|
<div v-else>{{scope.column.data[scope.column.columnname]||scope.column.columnname ==='operation'?scope.column.data[scope.column.columnname] : '--'}}</div>
|
|
|
</template>
|
|
|
<template v-slot:opreation="scope">
|
|
|
- <el-button type="text" @click="deleteDisBill(scope.data)" size="small" :disabled="status != '新建'">{{$t('删 除')}}</el-button>
|
|
|
+ <el-button type="text" @click="deleteDisBill(scope.data,'删除')" size="small" :disabled="status != '新建'">{{$t('删 除')}}</el-button>
|
|
|
</template>
|
|
|
</tableDetail>
|
|
|
</div>
|
|
|
@@ -33,7 +33,10 @@
|
|
|
this.needQuery?this.listData():''
|
|
|
},
|
|
|
methods:{
|
|
|
- async deleteDisBill (row) {
|
|
|
+ async deleteDisBill (row,val) {
|
|
|
+ if (val == '删除'){
|
|
|
+ this.needQuery = true
|
|
|
+ }
|
|
|
if (this.needQuery) {
|
|
|
const res = await this.$api.requested({
|
|
|
"id": "20221122133404",
|
|
|
@@ -42,13 +45,18 @@
|
|
|
"sa_logistics_itemsids":[row.sa_logistics_itemsid]
|
|
|
}
|
|
|
})
|
|
|
- this.tool.showMessage(res,()=>{
|
|
|
+ if (res.code == 0){
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ })
|
|
|
+ }else {
|
|
|
this.listData('删除')
|
|
|
- })
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
this.tableData = this.tableData.filter(e=>{
|
|
|
return e.sa_dispatchid !== row.sa_dispatchid
|
|
|
})
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
async listData(val){
|
|
|
@@ -63,7 +71,6 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- console.log(res.data,'111111数据输出')
|
|
|
if(res.data && res.data.length > 0) this.$emit('onInit',res.data[0]);
|
|
|
this.tableData = res.data
|
|
|
if (res.data && res.data.length){
|