Browse Source

所有出库单加上防抖功能,确认出库和取消出库

branch_ccpg_220107
44673626 3 years ago
parent
commit
d44b97319d
  1. 1
      vue/package.json
  2. 159
      vue/src/views/ux/billManage/WMSOutputSumReport/index.vue
  3. 589
      vue/src/views/ux/billManage/kanbanOutOrder/detail.vue
  4. 550
      vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue
  5. 452
      vue/src/views/ux/billManage/sparepartOutOrder/detail.vue
  6. 509
      vue/src/views/ux/billManage/sparepartOutOrder90/detail.vue
  7. 499
      vue/src/views/ux/billManage/vwOutOrder/detail.vue
  8. 507
      vue/src/views/ux/billManage/wmsCusomerKanban/detail.vue
  9. 517
      vue/src/views/ux/vw/dataInput/OnetimeSale/detail.vue
  10. 608
      vue/src/views/ux/vw/dataInput/hq_h_outorder/detail.vue
  11. 506
      vue/src/views/ux/vw/dataInput/hq_kb_output/detail.vue

1
vue/package.json

@ -61,6 +61,7 @@
"jsonlint": "1.6.3", "jsonlint": "1.6.3",
"jszip": "3.2.1", "jszip": "3.2.1",
"lockr": "^0.8.5", "lockr": "^0.8.5",
"lodash": "^4.17.21",
"moment": "^2.29.1", "moment": "^2.29.1",
"normalize.css": "^7.0.0", "normalize.css": "^7.0.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",

159
vue/src/views/ux/billManage/WMSOutputSumReport/index.vue

@ -360,8 +360,8 @@
<el-button type="text" @click="dialogAccounDateVisible = false" <el-button type="text" @click="dialogAccounDateVisible = false"
>取消</el-button >取消</el-button
> >
<!-- <el-button @click="resetForm('formCount')">重置</el-button> --> <!--v-loading="formLoading" <el-button @click="resetForm('formCount')">重置</el-button> -->
<el-button v-loading="formLoading" type="primary" @click="saveDate" <el-button type="primary" @click="saveDate"
>确认</el-button >确认</el-button
> >
</div> </div>
@ -378,6 +378,7 @@ import moment from "moment";
import Lockr from "lockr"; import Lockr from "lockr";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import _ from "lodash";
export default { export default {
name: "WMSOutputSumReport", name: "WMSOutputSumReport",
@ -462,6 +463,7 @@ export default {
MaxResultCount: 15, MaxResultCount: 15,
version: "", version: "",
state: 4, state: 4,
isDisable: false,
accountDate: undefined, accountDate: undefined,
type: undefined, type: undefined,
//materialGroup: undefined, //materialGroup: undefined,
@ -734,6 +736,7 @@ export default {
this.dataValue = ""; this.dataValue = "";
this.formTitle = "同步MWS至SAP"; this.formTitle = "同步MWS至SAP";
this.isEdit = false; this.isEdit = false;
this.isDisable = false;
this.form = {}; this.form = {};
this.dialogAccounDateVisible = true; this.dialogAccounDateVisible = true;
this.resultData = {}; this.resultData = {};
@ -784,54 +787,110 @@ export default {
}); });
}, },
//SAP //SAP
saveDate() { saveDate: _.debounce(
this.$refs.formCount.validate((valid) => { function () {
if (valid) { this.resultData.errSize == 0; //
this.formLoading = true; if (this.dataValue === "") {
this.resultData.errSize == 0; // this.$message.error("必需选择过账日期!");
if (this.dataValue === "") { this.formLoading = false;
this.$message.error("必需选择过账日期!"); return;
this.formLoading = false; }
return;
}
if (this.JobversionValue != "") { if (this.JobversionValue != "") {
this.listQuery.version = this.JobversionValue; this.listQuery.version = this.JobversionValue;
}
this.listQuery.accountDate = this.dataValue;
//this.listQuery.type = this.selectType; //
console.log("同步SAP传参:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/WMSOutputSumReport/SyncSap",
this.listQuery
)
.then((res) => {
if (res === "Success") {
this.$notify({
title: "成功",
message: "数据同步SAP成功!",
type: "success",
duration: 2000,
});
this.resultData.errSize = 0;
this.resultData.successMessage = "同步SAP成功!";
this.getList();
} else {
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "同步SAP失败!";
}
this.formLoading = false;
this.dialogAccounDateVisible = false;
})
.catch(() => {
this.formLoading = false;
this.dialogAccounDateVisible = false;
});
} }
}); this.listQuery.accountDate = this.dataValue;
}, //this.listQuery.type = this.selectType; //
console.log("同步SAP传参:" + JSON.stringify(this.listQuery));
this.$axios
.posts(
"/api/settleaccount/WMSOutputSumReport/SyncSap",
this.listQuery
)
.then((res) => {
if (res === "Success") {
this.$notify({
title: "成功",
message: "数据同步SAP成功!",
type: "success",
duration: 2000,
});
this.resultData.errSize = 0;
this.resultData.successMessage = "同步SAP成功!";
this.getList();
} else {
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "同步SAP失败!";
}
this.dialogAccounDateVisible = false;
})
.catch(() => {
this.dialogAccounDateVisible = false;
});
},
2000,
{
leading: true, //
trailing: false, //,
}
),
// saveDate() {
// this.$refs.formCount.validate((valid) => {
// if (valid) {
// //this.formLoading = true;
// this.isDisable = true;
// this.resultData.errSize == 0; //
// if (this.dataValue === "") {
// this.$message.error("");
// this.formLoading = false;
// return;
// }
// if (this.JobversionValue != "") {
// this.listQuery.version = this.JobversionValue;
// }
// this.listQuery.accountDate = this.dataValue;
// //this.listQuery.type = this.selectType; //
// console.log("SAP" + JSON.stringify(this.listQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WMSOutputSumReport/SyncSap",
// this.listQuery
// )
// .then((res) => {
// if (res === "Success") {
// this.$notify({
// title: "",
// message: "SAP!",
// type: "success",
// duration: 2000,
// });
// this.resultData.errSize = 0;
// this.resultData.successMessage = "SAP";
// this.getList();
// } else {
// this.resultData.errTemplate = res; //
// this.resultData.errSize = 1; //0
// this.resultData.successMessage = "SAP";
// }
// setTimeout(() => {
// //
// //this.formLoading = false;
// this.isDisable = false;
// }, 2000);
// this.dialogAccounDateVisible = false;
// })
// .catch(() => {
// // this.formLoading = false;
// this.dialogAccounDateVisible = false;
// });
// }
// });
// },
// //
async handleDownload() { async handleDownload() {
this.listLoading = true; this.listLoading = true;
@ -1023,8 +1082,8 @@ export default {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
this.searchContent = ""; this.searchContent = "";
this.searchContentSaleCode=""; this.searchContentSaleCode = "";
this.searchContentMaterialCode=""; this.searchContentMaterialCode = "";
this.getmaterialGroupValue = ""; this.getmaterialGroupValue = "";
this.selectType = ""; this.selectType = "";
this.listQuery.type = undefined; this.listQuery.type = undefined;

589
vue/src/views/ux/billManage/kanbanOutOrder/detail.vue

@ -10,7 +10,9 @@
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -28,6 +30,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -36,6 +41,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -43,6 +58,15 @@
@click="handleDelete()" @click="handleDelete()"
>出库单删除 >出库单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>出库单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -170,6 +194,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -452,101 +477,102 @@ export default {
}); });
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("确认出库条件:" + JSON.stringify(this.listOutPutQuery)); console.log("确认出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
// console.log( if (getAccountMonth < currentMonth) {
// ":" + myalert = "过账日期小于当前月份";
// JSON.stringify(getAccountMonth) + this.$confirm("是否确认" + myalert + "?", "提示", {
// ":" + confirmButtonText: "确定",
// JSON.stringify(currentMonth) cancelButtonText: "取消",
// ); type: "warning",
if (getAccountMonth < currentMonth) { })
myalert = "过账日期小于当前月份"; .then(() => {
this.$confirm("是否确认" + myalert + "?", "提示", { this.$axios
confirmButtonText: "确定", .posts(
cancelButtonText: "取消", "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
type: "warning", this.listOutPutQuery
}) )
.then(() => { .then((response) => {
this.$axios const index = this.list.indexOf(row);
.posts( this.$notify({
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", title: "成功",
this.listOutPutQuery message: "生成成功",
) type: "success",
.then((response) => { duration: 2000,
const index = this.list.indexOf(row); });
this.$notify({ this.accountDatelist.accountDate = "";
title: "成功", this.dialogFormVisible = false;
message: "生成成功", this.getList();
type: "success", this.formLoading = false;
duration: 2000, })
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// saveBills(row) { // saveBills(row) {
// this.listOutPutQuery.guids = []; // this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version; // this.listOutPutQuery.version = this.customerInfo.version;
@ -557,13 +583,55 @@ export default {
// type: "warning", // type: "warning",
// }); // });
// return; // return;
// } else { // }
// if (this.accountDatelist != "") { // this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// }
// //this.listOutPutQuery.accountDate = this.accountDatelist;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// console.log("" + JSON.stringify(this.listOutPutQuery));
// let myalert = "";
// var getAccountMonth = moment(this.accountDatelist.accountDate).format(
// "YYYY-MM"
// );
// let date = new Date();
// let currentMonth = moment(date).format("YYYY-MM");
// if (getAccountMonth < currentMonth) {
// myalert = "";
// this.$confirm("" + myalert + "?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// })
// .then(() => {
// this.$axios
// .posts(
// "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "",
// });
// this.formLoading = false;
// });
// } else if (getAccountMonth === currentMonth) {
// this.$axios // this.$axios
// .posts( // .posts(
// "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass", // "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Pass",
@ -585,122 +653,137 @@ export default {
// .catch(() => { // .catch(() => {
// this.formLoading = false; // this.formLoading = false;
// }); // });
// } else {
// this.$message({
// type: "warning",
// message: "",
// });
// this.formLoading = false;
// return;
// } // }
// }, // },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
let myalert = ""; console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
var getAccountMonth = moment(this.accountDatelist.accountDate).format( let myalert = "";
"YYYY-MM" var getAccountMonth = moment(this.accountDatelist.accountDate).format(
); // "YYYY-MM"
let date = new Date(); ); //
let currentMonth = moment(date).format("YYYY-MM"); // let date = new Date();
console.log( let currentMonth = moment(date).format("YYYY-MM"); //
"过账日期:" + console.log(
JSON.stringify(getAccountMonth) + "过账日期:" +
"当前日期:" + JSON.stringify(getAccountMonth) +
JSON.stringify(currentMonth) "当前日期:" +
); JSON.stringify(currentMonth)
if (getAccountMonth < currentMonth) { );
myalert = "过账日期小于当前月份"; if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel", "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel",
.posts( this.listOutPutQuery
"/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "操作成功",
title: "成功", type: "success",
message: "操作成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
}); this.dialogFormVisible = false;
this.accountDatelist.accountDate = ""; this.getList();
this.dialogFormVisible = false; this.formLoading = false;
this.getList(); })
this.formLoading = false; .catch(() => {
}) this.formLoading = false;
.catch(() => { this.$message({
this.formLoading = false; type: "info",
this.$message({ message: "调用服务出错!",
type: "info", });
message: "调用服务出错!",
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) { // CancelBills(row) {
// if (this.accountDatelist.accountDate == "") { // if (this.accountDatelist.accountDate == "") {
// this.$message({ // this.$message({
@ -725,32 +808,94 @@ export default {
// this.listOutPutQuery.billNum = this.customerInfo.parentId; // this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; // this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery)); // console.log("" + JSON.stringify(this.listOutPutQuery));
// let myalert = "";
// var getAccountMonth = moment(this.accountDatelist.accountDate).format(
// "YYYY-MM"
// ); //
// let date = new Date();
// let currentMonth = moment(date).format("YYYY-MM"); //
// console.log(
// ":" +
// JSON.stringify(getAccountMonth) +
// ":" +
// JSON.stringify(currentMonth)
// );
// if (getAccountMonth < currentMonth) {
// myalert = "";
// this.$axios // this.$confirm("" + myalert + "?", "", {
// .posts( // confirmButtonText: "",
// "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel", // cancelButtonText: "",
// this.listOutPutQuery // type: "warning",
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// }) // })
// .catch(() => { // .then(() => {
// this.formLoading = false; // this.$axios
// this.$message({ // .posts(
// type: "info", // "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel",
// message: "", // this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "",
// });
// this.formLoading = false;
// });
// } else if (getAccountMonth === currentMonth) {
// this.$axios
// .posts(
// "/api/settleaccount/wmskanbanoutput/WmsKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// }); // });
// } else {
// this.$message({
// type: "warning",
// message: "",
// }); // });
// this.formLoading = false;
// return;
// }
// }, // },
// //

550
vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue

@ -22,7 +22,9 @@
></el-option> ></el-option>
</el-select> --> </el-select> -->
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -40,6 +42,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -48,6 +53,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -55,6 +70,15 @@
@click="handleDelete()" @click="handleDelete()"
>整单删除 >整单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>整单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -224,6 +248,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -554,337 +579,246 @@ export default {
this.formTitle = "创建出库单"; this.formTitle = "创建出库单";
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.resultData.errSize == 0; // function (row) {
this.listOutPutQuery.guids = []; this.resultData.errSize == 0; //
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
return;
}
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log(
"无条码看板-全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM"
);
let date = new Date();
let currentMonth = moment(date).format("YYYY-MM");
// console.log(
// ":" +
// JSON.stringify(getAccountMonth) +
// ":" +
// JSON.stringify(currentMonth)
// );
if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((res) => {
const index = this.list.indexOf(row);
if (res === "Success") {
this.$notify({
title: "成功",
message: "确认成功!",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.resultData.errSize = 0;
this.dialogFormVisible = false;
this.resultData.successMessage = "出库成功!";
this.getList();
} else {
this.dialogFormVisible = false;
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "有错误检验信息!";
//alert(JSON.stringify(this.resultData));
}
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.formLoading = false;
});
} else if (getAccountMonth === currentMonth) {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((res) => {
const index = this.list.indexOf(row);
if (res === "Success") {
this.$notify({
title: "成功",
message: "确认成功!",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.resultData.errSize = 0;
this.dialogFormVisible = false;
this.resultData.successMessage = "出库成功!";
this.getList();
} else {
this.dialogFormVisible = false;
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "有错误检验信息!";
//alert(JSON.stringify(this.resultData));
}
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
});
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
});
this.formLoading = false;
return;
}
},
1000,
{
leading: true, //
trailing: false, //,
} }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; ),
//
CancelBills: _.debounce(
function (row) {
if (this.accountDatelist.accountDate == "") {
this.$message({
message: "请选择日期!",
type: "warning",
});
return;
}
var params = [];
if (row) {
//
params.push(row.id);
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
console.log( let myalert = "";
"无条码看板-全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) var getAccountMonth = moment(this.accountDatelist.accountDate).format(
); "YYYY-MM"
let myalert = ""; ); //
var getAccountMonth = moment(this.accountDatelist.accountDate).format( let date = new Date();
"YYYY-MM" let currentMonth = moment(date).format("YYYY-MM"); //
); if (getAccountMonth < currentMonth) {
let date = new Date(); myalert = "过账日期小于当前月份";
let currentMonth = moment(date).format("YYYY-MM");
// console.log( this.$confirm("是否确认" + myalert + "?", "提示", {
// ":" + confirmButtonText: "确定",
// JSON.stringify(getAccountMonth) + cancelButtonText: "取消",
// ":" + type: "warning",
// JSON.stringify(currentMonth) })
// ); .then(() => {
if (getAccountMonth < currentMonth) { this.$axios
myalert = "过账日期小于当前月份"; .posts(
this.$confirm("是否确认" + myalert + "?", "提示", { "/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Cancel",
confirmButtonText: "确定", this.listOutPutQuery
cancelButtonText: "取消", )
type: "warning", .then((response) => {
}) const index = this.list.indexOf(row);
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Pass",
this.listOutPutQuery
)
.then((res) => {
const index = this.list.indexOf(row);
if (res === "Success") {
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "确认成功!", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.resultData.errSize = 0;
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.resultData.successMessage = "出库成功!";
this.getList(); this.getList();
} else { this.formLoading = false;
this.dialogFormVisible = false; })
this.resultData.errTemplate = res; // .catch(() => {
this.resultData.errSize = 1; //0 this.formLoading = false;
this.resultData.successMessage = "有错误检验信息!"; this.$message({
//alert(JSON.stringify(this.resultData)); type: "info",
} message: "调用服务出错!",
this.formLoading = false; });
}) });
.catch(() => { })
this.formLoading = false; .catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Cancel",
.posts( this.listOutPutQuery
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((res) => {
const index = this.list.indexOf(row);
if (res === "Success") {
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "确认成功!", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.resultData.errSize = 0;
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.resultData.successMessage = "出库成功!";
this.getList(); this.getList();
} else { this.formLoading = false;
this.dialogFormVisible = false; })
this.resultData.errTemplate = res; // .catch(() => {
this.resultData.errSize = 1; //0 this.formLoading = false;
this.resultData.successMessage = "有错误检验信息!"; this.$message({
//alert(JSON.stringify(this.resultData)); type: "info",
} message: "调用服务出错!",
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
});
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
});
this.formLoading = false;
return;
}
},
// saveBills(row) {
// this.resultData.errSize == 0; //
// this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// } else {
// if (this.accountDatelist != "") {
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// }
// console.log(
// "-" + JSON.stringify(this.listOutPutQuery)
// );
// this.$axios
// .posts(
// "/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Pass",
// this.listOutPutQuery
// )
// .then((res) => {
// const index = this.list.indexOf(row);
// if (res === "Success") {
// this.$notify({
// title: "",
// message: "!",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.resultData.errSize = 0;
// this.dialogFormVisible = false;
// this.resultData.successMessage = "";
// this.getList();
// } else {
// this.dialogFormVisible = false;
// this.resultData.errTemplate = res; //
// this.resultData.errSize = 1; //0
// this.resultData.successMessage = "";
// //alert(JSON.stringify(this.resultData));
// }
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// }
// },
//
CancelBills(row) {
if (this.accountDatelist.accountDate == "") {
this.$message({
message: "请选择日期!",
type: "warning",
});
return;
}
var params = [];
if (row) {
//
params.push(row.id);
} else {
//
this.multipleSelection.forEach((element) => {
let id = element.id;
params.push(id);
});
}
this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.guids = params;
this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM"
); //
let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); //
if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
this.$message({
type: "info",
message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.formLoading = false;
});
} else if (getAccountMonth === currentMonth) {
this.$axios
.posts(
"/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
this.$message({
type: "info",
message: "调用服务出错!",
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) {
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// if (row) {
// //
// params.push(row.id);
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/wmskanbanoutputextend/WmsKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
// //
handleDelete(row) { handleDelete(row) {

452
vue/src/views/ux/billManage/sparepartOutOrder/detail.vue

@ -18,7 +18,9 @@
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -36,6 +38,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -44,6 +49,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -51,6 +66,15 @@
@click="handleDelete()" @click="handleDelete()"
>出库单删除 >出库单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>出库单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -202,6 +226,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -522,107 +547,114 @@ export default {
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
this.formLoading = false; });
return; this.formLoading = false;
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
console.log( this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
"全部确认出库条件:" + console.log(
JSON.stringify(this.listOutPutQuery) + "全部确认出库条件:" +
"选择日期:" + JSON.stringify(this.listOutPutQuery) +
JSON.stringify(this.accountDatelist.accountDate) "选择日期:" +
); JSON.stringify(this.accountDatelist.accountDate)
let myalert = ""; );
var getAccountMonth = moment(this.accountDatelist.accountDate).format( let myalert = "";
"YYYY-MM" var getAccountMonth = moment(this.accountDatelist.accountDate).format(
); "YYYY-MM"
let date = new Date(); );
let currentMonth = moment(date).format("YYYY-MM"); let date = new Date();
// console.log( let currentMonth = moment(date).format("YYYY-MM");
// ":" + // console.log(
// JSON.stringify(getAccountMonth) + // ":" +
// ":" + // JSON.stringify(getAccountMonth) +
// JSON.stringify(currentMonth) // ":" +
// ); // JSON.stringify(currentMonth)
if (getAccountMonth < currentMonth) { // );
myalert = "过账日期小于当前月份"; if (getAccountMonth < currentMonth) {
this.$confirm("是否确认" + myalert + "?", "提示", { myalert = "过账日期小于当前月份";
confirmButtonText: "确定", this.$confirm("是否确认" + myalert + "?", "提示", {
cancelButtonText: "取消", confirmButtonText: "确定",
type: "warning", cancelButtonText: "取消",
}) type: "warning",
.then(() => { })
//this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; .then(() => {
//this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Pass", "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// //
HandleOutPutCancel() { HandleOutPutCancel() {
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
@ -653,127 +685,133 @@ export default {
}); });
}, },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
this.formLoading = false; });
return; this.formLoading = false;
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
console.log( console.log(
"过账日期:" + "过账日期:" +
JSON.stringify(getAccountMonth) + JSON.stringify(getAccountMonth) +
"当前日期:" + "当前日期:" +
JSON.stringify(currentMonth) JSON.stringify(currentMonth)
); );
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
//this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; //this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log( console.log(
"取消出库条件:" + JSON.stringify(this.listOutPutQuery) "取消出库条件:" + JSON.stringify(this.listOutPutQuery)
); );
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Cancel", "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Cancel",
.posts( this.listOutPutQuery
"/api/settleaccount/wmsSharePartoutput/WmsSharePartOutPut-Cancel", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "操作成功",
title: "成功", type: "success",
message: "操作成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
}); this.dialogFormVisible = false;
this.accountDatelist.accountDate = ""; this.getList();
this.dialogFormVisible = false; this.formLoading = false;
this.getList(); })
this.formLoading = false; .catch(() => {
}) this.formLoading = false;
.catch(() => { this.$message({
this.formLoading = false; type: "info",
this.$message({ message: "调用服务出错!",
type: "info", });
message: "调用服务出错!",
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// //
handleDelete(row) { handleDelete(row) {
var params = []; var params = [];

509
vue/src/views/ux/billManage/sparepartOutOrder90/detail.vue

@ -17,7 +17,9 @@
@value-change="JobVersionValue" @value-change="JobVersionValue"
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -35,6 +37,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -43,6 +48,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -50,6 +65,15 @@
@click="handleDelete()" @click="handleDelete()"
>出库单删除 >出库单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>出库单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -177,6 +201,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -430,139 +455,106 @@ export default {
this.formTitle = "创建出库单"; this.formTitle = "创建出库单";
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)); console.log(
"全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Pass", "/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios;
} else if (getAccountMonth === currentMonth) { this.$axios
this.$axios; .posts(
this.$axios "/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// saveBills(row) {
// this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// //this.getList();
// } else {
// if (this.accountDatelist != "") {
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// }
// //this.listOutPutQuery.accountDate = this.accountDatelist;
// console.log(
// "" + JSON.stringify(this.listOutPutQuery)
// );
// this.$axios
// .posts(
// "/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// }
// }, // },
// //
@ -596,172 +588,127 @@ export default {
}, },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
//this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; //this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log( console.log(
"取消出库条件:" + JSON.stringify(this.listOutPutQuery) "取消出库条件:" + JSON.stringify(this.listOutPutQuery)
); );
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Cancel", "/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.formLoading = false;
});
} else if (getAccountMonth === currentMonth) {
this.$axios
.posts(
"/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
}); });
this.accountDatelist.accountDate = ""; } else if (getAccountMonth === currentMonth) {
this.dialogFormVisible = false; this.$axios
this.getList(); .posts(
this.formLoading = false; "/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Cancel",
}) this.listOutPutQuery
.catch(() => { )
this.formLoading = false; .then((response) => {
this.$message({ const index = this.list.indexOf(row);
type: "info", this.$notify({
message: "调用服务出错!", title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
this.$message({
type: "info",
message: "调用服务出错!",
});
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) {
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// if (row) {
// //
// params.push(row.id);
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/wmsSharePart90output/WmsSharePartOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
// //
handleDelete(row) { handleDelete(row) {
var params = []; var params = [];

499
vue/src/views/ux/billManage/vwOutOrder/detail.vue

@ -17,7 +17,9 @@
>确认出库单</el-button >确认出库单</el-button
> --> > -->
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -35,6 +37,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -43,6 +48,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -50,6 +65,15 @@
@click="handleDelete()" @click="handleDelete()"
>出库单删除 >出库单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>出库单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -161,9 +185,7 @@
<el-button type="text" @click="dialogFormVisible = false" <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button >取消</el-button
> >
<el-button v-loading="formLoading" type="primary" @click="save()" <el-button type="primary" @click="save()">确认</el-button>
>确认</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -177,6 +199,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -410,120 +433,128 @@ export default {
}, },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
console.log( console.log(
"过账日期:" + "过账日期:" +
JSON.stringify(getAccountMonth) + JSON.stringify(getAccountMonth) +
"当前日期:" + "当前日期:" +
JSON.stringify(currentMonth) JSON.stringify(currentMonth)
); );
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel", "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel",
.posts( this.listOutPutQuery
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Cancel", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "操作成功",
title: "成功", type: "success",
message: "操作成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
}); this.dialogFormVisible = false;
this.accountDatelist.accountDate = ""; this.getList();
this.dialogFormVisible = false; this.formLoading = false;
this.getList(); })
this.formLoading = false; .catch(() => {
}) this.formLoading = false;
.catch(() => { this.$message({
this.formLoading = false; type: "info",
this.$message({ message: "调用服务出错!",
type: "info", });
message: "调用服务出错!",
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) { // CancelBills(row) {
// if (this.accountDatelist.accountDate == "") { // if (this.accountDatelist.accountDate == "") {
// this.$message({ // this.$message({
@ -584,97 +615,108 @@ export default {
} }
this.formTitle = "创建出库单"; this.formTitle = "创建出库单";
}, },
// //()
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
//this.getList(); });
return; //this.getList();
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)); console.log(
"全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
);
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass", "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
//this.formLoading = false;
})
.catch(() => {
//this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) //this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
//this.formLoading = false;
})
.catch(() => {
// this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { //this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
//
// saveBills(row) { // saveBills(row) {
// this.listOutPutQuery.guids = []; // this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version; // this.listOutPutQuery.version = this.customerInfo.version;
@ -686,15 +728,55 @@ export default {
// }); // });
// //this.getList(); // //this.getList();
// return; // return;
// } else { // }
// if (this.accountDatelist != "") { // this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// } // console.log("" + JSON.stringify(this.listOutPutQuery));
// //this.listOutPutQuery.accountDate = this.accountDatelist;
// console.log(
// "" + JSON.stringify(this.listOutPutQuery)
// );
// let myalert = "";
// var getAccountMonth = moment(this.accountDatelist.accountDate).format(
// "YYYY-MM"
// );
// let date = new Date();
// let currentMonth = moment(date).format("YYYY-MM");
// if (getAccountMonth < currentMonth) {
// myalert = "";
// this.$confirm("" + myalert + "?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// })
// .then(() => {
// this.$axios
// .posts(
// "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "",
// });
// this.formLoading = false;
// });
// } else if (getAccountMonth === currentMonth) {
// this.$axios // this.$axios
// .posts( // .posts(
// "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass", // "/api/settleaccount/wmsjitoutput/WmsJitOutPut-Pass",
@ -716,8 +798,16 @@ export default {
// .catch(() => { // .catch(() => {
// this.formLoading = false; // this.formLoading = false;
// }); // });
// } else {
// this.$message({
// type: "warning",
// message: "",
// });
// this.formLoading = false;
// return;
// } // }
// }, // },
// //
handleCreateBills_old(row) { handleCreateBills_old(row) {
if (this.multipleSelection.length == 0) { if (this.multipleSelection.length == 0) {
@ -947,10 +1037,9 @@ export default {
this.list = response.items; this.list = response.items;
//alert(JSON.stringify(response.Items)) //alert(JSON.stringify(response.Items))
this.totalCount = response.totalCount; this.totalCount = response.totalCount;
setTimeout(() => {
// //
this.listLoading = false; this.listLoading = false;
}, 500);
}) })
.catch(() => { .catch(() => {
this.listLoading = false; this.listLoading = false;

507
vue/src/views/ux/billManage/wmsCusomerKanban/detail.vue

@ -9,7 +9,9 @@
@value-change="JobVersionValue" @value-change="JobVersionValue"
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -27,6 +29,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -35,6 +40,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -42,6 +57,15 @@
@click="handleDelete()" @click="handleDelete()"
>删除出库单 >删除出库单
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>删除出库单
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -169,6 +193,7 @@ import CRMTableHead from "../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -463,301 +488,223 @@ export default {
}); });
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
console.log("确认出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("确认出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Pass", "/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// saveBills(row) {
// this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// } else {
// if (this.accountDatelist != "") {
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// }
// //this.listOutPutQuery.accountDate = this.accountDatelist;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// }
// },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
console.log( console.log(
"过账日期:" + "过账日期:" +
JSON.stringify(getAccountMonth) + JSON.stringify(getAccountMonth) +
"当前日期:" + "当前日期:" +
JSON.stringify(currentMonth) JSON.stringify(currentMonth)
); );
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Cancel", "/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.formLoading = false;
});
} else if (getAccountMonth === currentMonth) {
this.$axios
.posts(
"/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
}); });
this.accountDatelist.accountDate = ""; } else if (getAccountMonth === currentMonth) {
this.dialogFormVisible = false; this.$axios
this.getList(); .posts(
this.formLoading = false; "/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Cancel",
}) this.listOutPutQuery
.catch(() => { )
this.formLoading = false; .then((response) => {
this.$message({ const index = this.list.indexOf(row);
type: "info", this.$notify({
message: "调用服务出错!", title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
this.$message({
type: "info",
message: "调用服务出错!",
});
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) {
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// if (row) {
// //
// params.push(row.id);
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WMSCusomerKanbanoutput/WmsCustomerKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
// //
handleDelete(row) { handleDelete(row) {
var params = []; var params = [];

517
vue/src/views/ux/vw/dataInput/OnetimeSale/detail.vue

@ -1,4 +1,4 @@
<!---明细数据--> <!---一次性寄售销售结算-->
<template> <template>
<div class="cr-body-content"> <div class="cr-body-content">
<flexbox class="content-header"> <flexbox class="content-header">
@ -10,7 +10,9 @@
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -28,6 +30,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -36,6 +41,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -43,6 +58,15 @@
@click="handleDelete()" @click="handleDelete()"
>删除出库单 >删除出库单
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>删除出库单
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -194,6 +218,7 @@ import CRMTableHead from "../../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -533,308 +558,226 @@ export default {
this.formTitle = "创建出库单"; this.formTitle = "创建出库单";
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log( console.log(
"一次性销售-确认出库条件:" + JSON.stringify(this.listOutPutQuery) "一次性销售-确认出库条件:" + JSON.stringify(this.listOutPutQuery)
); );
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Pass", "/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// saveBills(row) {
// this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// this.getList();
// return;
// //this.getList();
// } else {
// if (this.accountDatelist != "") {
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// }
// //this.listOutPutQuery.accountDate = this.accountDatelist;
// console.log(
// "-" + JSON.stringify(this.listOutPutQuery)
// );
// this.$axios
// .posts(
// "/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// }
// },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
console.log( console.log(
"过账日期:" + "过账日期:" +
JSON.stringify(getAccountMonth) + JSON.stringify(getAccountMonth) +
"当前日期:" + "当前日期:" +
JSON.stringify(currentMonth) JSON.stringify(currentMonth)
); );
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Cancel", "/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.formLoading = false;
});
} else if (getAccountMonth === currentMonth) {
this.$axios
.posts(
"/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
}); });
this.accountDatelist.accountDate = ""; } else if (getAccountMonth === currentMonth) {
this.dialogFormVisible = false; this.$axios
this.getList(); .posts(
this.formLoading = false; "/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Cancel",
}) this.listOutPutQuery
.catch(() => { )
this.formLoading = false; .then((response) => {
this.$message({ const index = this.list.indexOf(row);
type: "info", this.$notify({
message: "调用服务出错!", title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
this.$message({
type: "info",
message: "调用服务出错!",
});
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) {
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// if (row) {
// //
// params.push(row.id);
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WmsOneTimeSaleOutput/WmsKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
// //
handleDelete(row) { handleDelete(row) {
var params = []; var params = [];

608
vue/src/views/ux/vw/dataInput/hq_h_outorder/detail.vue

@ -9,7 +9,9 @@
@value-change="JobVersionValue" @value-change="JobVersionValue"
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -27,6 +29,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -35,6 +40,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -42,6 +57,15 @@
@click="handleDelete()" @click="handleDelete()"
>出库单删除 >出库单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>出库单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -153,9 +177,7 @@
<el-button type="text" @click="dialogFormVisible = false" <el-button type="text" @click="dialogFormVisible = false"
>取消</el-button >取消</el-button
> >
<el-button v-loading="formLoading" type="primary" @click="save()" <el-button type="primary" @click="save()">确认</el-button>
>确认</el-button
>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -169,6 +191,7 @@ import CRMTableHead from "../../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "sendUnsettledDiffReport", name: "sendUnsettledDiffReport",
@ -245,7 +268,7 @@ export default {
billNum: "", billNum: "",
}, },
listOutPutQuery: { listOutPutQuery: {
Filters: [ Filters: [
{ {
logic: 0, logic: 0,
column: "state", column: "state",
@ -372,7 +395,7 @@ export default {
logic: 0, logic: 0,
column: column, column: column,
action: 0, action: 0,
value:this.selectJobVersionValue, value: this.selectJobVersionValue,
}; };
this.listOutPutQuery.Filters.push(filter); this.listOutPutQuery.Filters.push(filter);
@ -475,228 +498,128 @@ export default {
}, },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
console.log( console.log(
"过账日期:" + "过账日期:" +
JSON.stringify(getAccountMonth) + JSON.stringify(getAccountMonth) +
"当前日期:" + "当前日期:" +
JSON.stringify(currentMonth) JSON.stringify(currentMonth)
); );
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Cancel", "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Cancel",
.posts( this.listOutPutQuery
"/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Cancel", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "操作成功",
title: "成功", type: "success",
message: "操作成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
}); this.dialogFormVisible = false;
this.accountDatelist.accountDate = ""; this.getList();
this.dialogFormVisible = false; this.formLoading = false;
this.getList(); })
this.formLoading = false; .catch(() => {
}) this.formLoading = false;
.catch(() => { this.$message({
this.formLoading = false; type: "info",
this.$message({ message: "调用服务出错!",
type: "info", });
message: "调用服务出错!",
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) {
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// if (row) {
// //
// params.push(row.id);
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
//
// handleCancelBills(row) {
// if (this.multipleSelection.length == 0) {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// let myalert = ""; //使
// if (row) {
// //
// params.push(row.id);
// myalert = row.name;
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// myalert = "";
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$confirm("" + myalert + "?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// })
// .then(() => {
// this.$axios
// .posts(
// "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.getList();
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
// //
handleCreateBills() { handleCreateBills() {
this.dialogFormVisible = true; this.dialogFormVisible = true;
@ -710,99 +633,107 @@ export default {
this.getList(); this.getList();
}, },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log( console.log(
"未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery) "未选择时全部确认出库条件:" + JSON.stringify(this.listOutPutQuery)
); );
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass", "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
this.dialogFormVisible = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
this.dialogFormVisible = false; message: "已取消操作",
})
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
this.dialogFormVisible = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
this.dialogFormVisible = false;
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// saveBills(row) { // saveBills(row) {
// this.listOutPutQuery.guids = []; // this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version; // this.listOutPutQuery.version = this.customerInfo.version;
@ -812,18 +743,59 @@ export default {
// message: "", // message: "",
// type: "warning", // type: "warning",
// }); // });
// this.getList();
// return; // return;
// //this.getList(); // }
// } else { // this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// if (this.accountDatelist != "") {
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; // console.log(
// } // "" + JSON.stringify(this.listOutPutQuery)
// //this.listOutPutQuery.accountDate = this.accountDatelist; // );
// console.log(
// "" + JSON.stringify(this.listOutPutQuery)
// );
// let myalert = "";
// var getAccountMonth = moment(this.accountDatelist.accountDate).format(
// "YYYY-MM"
// );
// let date = new Date();
// let currentMonth = moment(date).format("YYYY-MM");
// if (getAccountMonth < currentMonth) {
// myalert = "";
// this.$confirm("" + myalert + "?", "", {
// confirmButtonText: "",
// cancelButtonText: "",
// type: "warning",
// })
// .then(() => {
// this.$axios
// .posts(
// "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// this.dialogFormVisible = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// })
// .catch(() => {
// this.$message({
// type: "info",
// message: "",
// });
// this.formLoading = false;
// });
// } else if (getAccountMonth === currentMonth) {
// this.$axios // this.$axios
// .posts( // .posts(
// "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass", // "/api/settleaccount/WmsHQHKanbanoutput/WmsHQHKanbanOutPut-Pass",
@ -846,8 +818,16 @@ export default {
// .catch(() => { // .catch(() => {
// this.formLoading = false; // this.formLoading = false;
// }); // });
// } else {
// this.$message({
// type: "warning",
// message: "",
// });
// this.formLoading = false;
// return;
// } // }
// }, // },
// //
handleDelete(row) { handleDelete(row) {
var params = []; var params = [];

506
vue/src/views/ux/vw/dataInput/hq_kb_output/detail.vue

@ -10,7 +10,9 @@
></JobSelectVerson> ></JobSelectVerson>
<el-button <el-button
v-if="this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3" v-if="
this.selectJobVersionValue == 0 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
type="success" type="success"
icon="el-icon-check" icon="el-icon-check"
@ -28,6 +30,9 @@
>确认出库单</el-button >确认出库单</el-button
> >
<el-button <el-button
v-if="
this.selectJobVersionValue == 2 || this.selectJobVersionValue == 3
"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="warning" type="warning"
@ -36,6 +41,16 @@
>取消出库(支持批量) >取消出库(支持批量)
</el-button> </el-button>
<el-button <el-button
v-else
disabled
class="filter-item"
size="mini"
type="warning"
icon="el-icon-download"
>取消出库(支持批量)
</el-button>
<el-button
v-if="this.selectJobVersionValue == 0"
class="filter-item" class="filter-item"
size="mini" size="mini"
type="danger" type="danger"
@ -43,6 +58,15 @@
@click="handleDelete()" @click="handleDelete()"
>出库单删除 >出库单删除
</el-button> </el-button>
<el-button
v-else
disabled
class="filter-item"
size="mini"
type="danger"
icon="el-icon-download"
>出库单删除
</el-button>
<el-input <el-input
v-model="searchContent" v-model="searchContent"
clearable clearable
@ -194,6 +218,7 @@ import CRMTableHead from "../../../components/CRMTableHead";
import { downloadFile } from "@/utils/crmindex.js"; import { downloadFile } from "@/utils/crmindex.js";
import JobSelectVerson from "@/components/CreateCom/Job-Select.vue"; import JobSelectVerson from "@/components/CreateCom/Job-Select.vue";
import moment from "moment"; import moment from "moment";
import _ from "lodash";
export default { export default {
name: "HQkboutput", name: "HQkboutput",
@ -536,301 +561,224 @@ export default {
this.formTitle = "创建出库单"; this.formTitle = "创建出库单";
}, },
// //
CancelBills(row) { CancelBills: _.debounce(
if (this.accountDatelist.accountDate == "") { function (row) {
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
var params = []; }
if (row) { var params = [];
// if (row) {
params.push(row.id); //
} else { params.push(row.id);
// } else {
this.multipleSelection.forEach((element) => { //
let id = element.id; this.multipleSelection.forEach((element) => {
params.push(id); let id = element.id;
}); params.push(id);
} });
this.listOutPutQuery.version = this.customerInfo.version; }
this.listOutPutQuery.guids = params; this.listOutPutQuery.version = this.customerInfo.version;
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.guids = params;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; this.listOutPutQuery.billNum = this.customerInfo.parentId;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery)); this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("取消出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); // ); //
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); // let currentMonth = moment(date).format("YYYY-MM"); //
console.log( console.log(
"过账日期:" + "过账日期:" +
JSON.stringify(getAccountMonth) + JSON.stringify(getAccountMonth) +
"当前日期:" + "当前日期:" +
JSON.stringify(currentMonth) JSON.stringify(currentMonth)
); );
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Cancel", "/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
}); });
this.accountDatelist.accountDate = ""; this.accountDatelist.accountDate = "";
this.dialogFormVisible = false; this.dialogFormVisible = false;
this.getList(); this.getList();
this.formLoading = false; this.formLoading = false;
}) })
.catch(() => { .catch(() => {
this.formLoading = false; this.formLoading = false;
this.$message({ this.$message({
type: "info", type: "info",
message: "调用服务出错!", message: "调用服务出错!",
});
}); });
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
this.formLoading = false;
});
} else if (getAccountMonth === currentMonth) {
this.$axios
.posts(
"/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Cancel",
this.listOutPutQuery
)
.then((response) => {
const index = this.list.indexOf(row);
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
}); });
this.accountDatelist.accountDate = ""; } else if (getAccountMonth === currentMonth) {
this.dialogFormVisible = false; this.$axios
this.getList(); .posts(
this.formLoading = false; "/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Cancel",
}) this.listOutPutQuery
.catch(() => { )
this.formLoading = false; .then((response) => {
this.$message({ const index = this.list.indexOf(row);
type: "info", this.$notify({
message: "调用服务出错!", title: "成功",
message: "操作成功",
type: "success",
duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
this.$message({
type: "info",
message: "调用服务出错!",
});
}); });
} else {
this.$message({
type: "warning",
message: "选择的过账日期不能大于当前月份!",
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// CancelBills(row) {
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// }
// var params = [];
// if (row) {
// //
// params.push(row.id);
// } else {
// //
// this.multipleSelection.forEach((element) => {
// let id = element.id;
// params.push(id);
// });
// }
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.guids = params;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Cancel",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// this.$message({
// type: "info",
// message: "",
// });
// });
// },
// //
saveBills(row) { saveBills: _.debounce(
this.listOutPutQuery.guids = []; function (row) {
this.listOutPutQuery.version = this.customerInfo.version; this.listOutPutQuery.guids = [];
this.listOutPutQuery.billNum = this.customerInfo.parentId; this.listOutPutQuery.version = this.customerInfo.version;
if (this.accountDatelist.accountDate == "") { this.listOutPutQuery.billNum = this.customerInfo.parentId;
this.$message({ if (this.accountDatelist.accountDate == "") {
message: "请选择日期!", this.$message({
type: "warning", message: "请选择日期!",
}); type: "warning",
return; });
} return;
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate; }
this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
console.log("确认出库条件:" + JSON.stringify(this.listOutPutQuery)); console.log("确认出库条件:" + JSON.stringify(this.listOutPutQuery));
let myalert = ""; let myalert = "";
var getAccountMonth = moment(this.accountDatelist.accountDate).format( var getAccountMonth = moment(this.accountDatelist.accountDate).format(
"YYYY-MM" "YYYY-MM"
); );
let date = new Date(); let date = new Date();
let currentMonth = moment(date).format("YYYY-MM"); let currentMonth = moment(date).format("YYYY-MM");
if (getAccountMonth < currentMonth) { if (getAccountMonth < currentMonth) {
myalert = "过账日期小于当前月份"; myalert = "过账日期小于当前月份";
this.$confirm("是否确认" + myalert + "?", "提示", { this.$confirm("是否确认" + myalert + "?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
this.$axios this.$axios
.posts( .posts(
"/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Pass", "/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Pass",
this.listOutPutQuery this.listOutPutQuery
) )
.then((response) => { .then((response) => {
const index = this.list.indexOf(row); const index = this.list.indexOf(row);
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "生成成功", message: "生成成功",
type: "success", type: "success",
duration: 2000, duration: 2000,
});
this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; })
this.dialogFormVisible = false; .catch(() => {
this.getList(); this.$message({
this.formLoading = false; type: "info",
}) message: "已取消操作",
.catch(() => {
this.formLoading = false;
}); });
}) this.formLoading = false;
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
this.formLoading = false; } else if (getAccountMonth === currentMonth) {
}); this.$axios
} else if (getAccountMonth === currentMonth) { .posts(
this.$axios "/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Pass",
.posts( this.listOutPutQuery
"/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Pass", )
this.listOutPutQuery .then((response) => {
) const index = this.list.indexOf(row);
.then((response) => { this.$notify({
const index = this.list.indexOf(row); title: "成功",
this.$notify({ message: "生成成功",
title: "成功", type: "success",
message: "生成成功", duration: 2000,
type: "success", });
duration: 2000, this.accountDatelist.accountDate = "";
this.dialogFormVisible = false;
this.getList();
this.formLoading = false;
})
.catch(() => {
this.formLoading = false;
}); });
this.accountDatelist.accountDate = ""; } else {
this.dialogFormVisible = false; this.$message({
this.getList(); type: "warning",
this.formLoading = false; message: "选择的过账日期不能大于当前月份!",
})
.catch(() => {
this.formLoading = false;
}); });
} else { this.formLoading = false;
this.$message({ return;
type: "warning", }
message: "选择的过账日期不能大于当前月份!", },
}); 1000,
this.formLoading = false; {
return; leading: true, //
trailing: false, //,
} }
}, ),
// saveBills(row) {
// this.listOutPutQuery.guids = [];
// this.listOutPutQuery.version = this.customerInfo.version;
// this.listOutPutQuery.billNum = this.customerInfo.parentId;
// if (this.accountDatelist.accountDate == "") {
// this.$message({
// message: "",
// type: "warning",
// });
// return;
// } else {
// if (this.accountDatelist != "") {
// this.listOutPutQuery.accountDate = this.accountDatelist.accountDate;
// }
// //this.listOutPutQuery.accountDate = this.accountDatelist;
// console.log("" + JSON.stringify(this.listOutPutQuery));
// this.$axios
// .posts(
// "/api/settleaccount/WmsHQKBOutput/WmsKanbanOutPut-Pass",
// this.listOutPutQuery
// )
// .then((response) => {
// const index = this.list.indexOf(row);
// this.$notify({
// title: "",
// message: "",
// type: "success",
// duration: 2000,
// });
// this.accountDatelist.accountDate = "";
// this.dialogFormVisible = false;
// this.getList();
// this.formLoading = false;
// })
// .catch(() => {
// this.formLoading = false;
// });
// }
// },
// //
handleDelete(row) { handleDelete(row) {
var params = []; var params = [];

Loading…
Cancel
Save