|
|
@ -88,6 +88,7 @@ |
|
|
|
@row-click="handleRowClick" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
@filter-change="filterChange" |
|
|
|
@cell-dblclick="dblhandleCurrentChange" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="44px"></el-table-column> |
|
|
|
<el-table-column |
|
|
@ -106,6 +107,39 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="说明" width="400" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
ref="inputRef" |
|
|
|
v-if="scope.row.isEditCell" |
|
|
|
v-model.number="scope.row.remark" |
|
|
|
class="el-input" |
|
|
|
v-focus |
|
|
|
@blur="cellBlur(scope.row, scope.column)" |
|
|
|
/> |
|
|
|
<span v-else>{{ scope.row.remark }}</span> |
|
|
|
<el-button |
|
|
|
style="margin-left: 5px" |
|
|
|
v-if="scope.row.isEditCell" |
|
|
|
type="success" |
|
|
|
icon="el-icon-check" |
|
|
|
size="small" |
|
|
|
circle |
|
|
|
@click="submitName(scope.row)" |
|
|
|
></el-button> |
|
|
|
<el-button |
|
|
|
v-show="scope.row.isEditCell" |
|
|
|
class="cancel-btn" |
|
|
|
size="mini" |
|
|
|
icon="el-icon-refresh" |
|
|
|
type="warning" |
|
|
|
@click.native.prevent="handleCancel(scope.row)" |
|
|
|
> |
|
|
|
cancel |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column |
|
|
|
prop="stateName" |
|
|
|
label="状态(单击箭头过滤)" |
|
|
@ -557,7 +591,7 @@ export default { |
|
|
|
taskId: "", |
|
|
|
name: "", |
|
|
|
type: "", |
|
|
|
stateName:"" |
|
|
|
stateName: "", |
|
|
|
}, |
|
|
|
listBillQuery: { |
|
|
|
version: "", |
|
|
@ -570,7 +604,7 @@ export default { |
|
|
|
multipleSelection: [], |
|
|
|
tableHeight: document.documentElement.clientHeight - 260, |
|
|
|
isEdit: false, |
|
|
|
isTaskSuccess:false, |
|
|
|
isTaskSuccess: false, |
|
|
|
menuCateMap: [ |
|
|
|
{ label: "导出", value: "导出", cssName: "warning" }, |
|
|
|
{ label: "消息", value: "消息", cssName: "info" }, |
|
|
@ -641,11 +675,7 @@ export default { |
|
|
|
prop: "createdAt", |
|
|
|
width: 150, |
|
|
|
}); |
|
|
|
tempsTabs.push({ |
|
|
|
label: "说明", |
|
|
|
prop: "remark", |
|
|
|
width: 350, |
|
|
|
}); |
|
|
|
|
|
|
|
tempsTabs.push({ |
|
|
|
label: "审批状态", |
|
|
|
prop: "fileName", |
|
|
@ -655,6 +685,60 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
dblhandleCurrentChange(row, column, cell, event) { |
|
|
|
if (column.label === "说明") { |
|
|
|
row.isEditCell = true; |
|
|
|
this.$set(row, "isEditCell", true); |
|
|
|
this.$nextTick(() => { |
|
|
|
//自动获取焦点 element组件autofocus失效 |
|
|
|
//this.$refs.inputRef.focus(); |
|
|
|
this.$refs["inputRef"].focus(); |
|
|
|
}); |
|
|
|
} |
|
|
|
this.list = this.list.filter((item) => { |
|
|
|
return item; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 可以编辑框失去焦点 |
|
|
|
cellBlur(row, column) { |
|
|
|
row.isEditCell = false; |
|
|
|
this.$set(row, "isEditCell", false); |
|
|
|
}, |
|
|
|
// 在线编辑中提交 |
|
|
|
submitName(row) { |
|
|
|
let getguid = row.id; |
|
|
|
let getremark = row.remark; |
|
|
|
this.$axios |
|
|
|
.gets("/api/settleaccount/Job/updateRemark", { |
|
|
|
p_id: getguid, |
|
|
|
remark: getremark, |
|
|
|
}) |
|
|
|
.then((response) => { |
|
|
|
if (response == true) { |
|
|
|
this.$notify({ |
|
|
|
title: "成功", |
|
|
|
message: "更新成功", |
|
|
|
type: "success", |
|
|
|
duration: 2000, |
|
|
|
}); |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 取消 |
|
|
|
handleCancel(row) { |
|
|
|
row.isEditCell = false; |
|
|
|
//row.stockQty = row.originalstockQty; |
|
|
|
this.$set(row, "isEditCell", false); |
|
|
|
// this.$message({ |
|
|
|
// message: "取消后,恢复当前原值!", |
|
|
|
// type: "warning", |
|
|
|
// }); |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
sortChange(data) { |
|
|
|
const { prop, order } = data; |
|
|
|
if (!prop || !order) { |
|
|
@ -690,7 +774,7 @@ export default { |
|
|
|
//已确认 |
|
|
|
handleConfirm(row) { |
|
|
|
this.isEdit = false; |
|
|
|
this.isTaskSuccess=false; |
|
|
|
this.isTaskSuccess = false; |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
@ -699,22 +783,21 @@ export default { |
|
|
|
return; |
|
|
|
} else { |
|
|
|
var getbillNum = ""; |
|
|
|
var getTaskState=""; |
|
|
|
var getTaskState = ""; |
|
|
|
//判断已经生成出库单的不能再生成出库操作 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let state = element.fileName; |
|
|
|
if (state != "" && state != "已确认") { |
|
|
|
this.isEdit = true; |
|
|
|
getbillNum += state + ","; |
|
|
|
} |
|
|
|
else if(element.stateName != "Succeeded"){ |
|
|
|
this.isTaskSuccess=true; |
|
|
|
getTaskState+=element.taskId; |
|
|
|
} else if (element.stateName != "Succeeded") { |
|
|
|
this.isTaskSuccess = true; |
|
|
|
getTaskState += element.taskId; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
//任务不成功的不能单击确认 |
|
|
|
if(this.isTaskSuccess == true){ |
|
|
|
if (this.isTaskSuccess == true) { |
|
|
|
this.$message({ |
|
|
|
message: |
|
|
|
"有未成功的任务,不能单击确认!:" + |
|
|
@ -732,7 +815,6 @@ export default { |
|
|
|
}); |
|
|
|
return; |
|
|
|
} else { |
|
|
|
|
|
|
|
var params = []; |
|
|
|
let myalert = ""; //声明变量,其变量必须在此声明后使用 |
|
|
|
if (row) { |
|
|
@ -775,13 +857,12 @@ export default { |
|
|
|
message: "已取消操作", |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
//出库单 |
|
|
|
handleCreateBills(row) { |
|
|
|
this.isEdit = false; |
|
|
|
this.isTaskSuccess=false; |
|
|
|
this.isTaskSuccess = false; |
|
|
|
if (this.multipleSelection.length == 0) { |
|
|
|
this.$message({ |
|
|
|
message: "至少选择一行!", |
|
|
@ -790,21 +871,20 @@ export default { |
|
|
|
return; |
|
|
|
} else { |
|
|
|
var getbillNum = ""; |
|
|
|
var getTaskState=""; |
|
|
|
var getTaskState = ""; |
|
|
|
//判断已经生成出库单的不能再生成出库操作 |
|
|
|
this.multipleSelection.forEach((element) => { |
|
|
|
let state = element.fileName; |
|
|
|
if (state != "" && state != "已确认") { |
|
|
|
this.isEdit = true; |
|
|
|
getbillNum += state + ","; |
|
|
|
} |
|
|
|
else if(element.stateName != "Succeeded"){ |
|
|
|
this.isTaskSuccess=true; |
|
|
|
getTaskState+=element.taskId; |
|
|
|
} else if (element.stateName != "Succeeded") { |
|
|
|
this.isTaskSuccess = true; |
|
|
|
getTaskState += element.taskId; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
if(this.isTaskSuccess == true){ |
|
|
|
if (this.isTaskSuccess == true) { |
|
|
|
this.$message({ |
|
|
|
message: |
|
|
|
"有未成功的任务,不能单击确认!:" + |
|
|
@ -1033,11 +1113,11 @@ export default { |
|
|
|
}, |
|
|
|
getdateValue(val) { |
|
|
|
this.startTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
|
//this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
getdateVal(val) { |
|
|
|
this.endTime = val; |
|
|
|
this.getbalanceIndexData(); |
|
|
|
//this.getbalanceIndexData(); |
|
|
|
}, |
|
|
|
|
|
|
|
getCurrentMonthFirst() { |
|
|
@ -1156,8 +1236,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
console.log( |
|
|
|
"H平台核对明细-导出条件:" + |
|
|
|
JSON.stringify(this.listExportQuery) |
|
|
|
"H平台核对明细-导出条件:" + JSON.stringify(this.listExportQuery) |
|
|
|
); |
|
|
|
this.$axios |
|
|
|
.posts( |
|
|
@ -1186,9 +1265,12 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
handleCreate() { |
|
|
|
this.$nextTick(() => { |
|
|
|
// this.$nextTick(() => { |
|
|
|
// this.$refs["formCount"].resetFields(); |
|
|
|
// }); |
|
|
|
if (this.$refs["formCount"] !== undefined) { |
|
|
|
this.$refs["formCount"].resetFields(); |
|
|
|
}); |
|
|
|
} |
|
|
|
this.formTitle = "报表统计"; |
|
|
|
this.isEdit = false; |
|
|
|
this.form = {}; |
|
|
@ -1301,6 +1383,10 @@ export default { |
|
|
|
.posts("/api/settleaccount/Job/list", this.listQuery) |
|
|
|
.then((response) => { |
|
|
|
this.list = response; |
|
|
|
//动态加一个是否编辑的标识 |
|
|
|
this.list.forEach((element) => { |
|
|
|
element["isEditCell"] = false; |
|
|
|
}); |
|
|
|
setTimeout(() => { |
|
|
|
//大数据量加载时 |
|
|
|
this.listLoading = false; |
|
|
|