|
@@ -1520,11 +1520,45 @@ export default {
|
|
|
callback(new Error("校验失败,请稍后再试"));
|
|
|
}
|
|
|
},
|
|
|
+ // 校验表格数据
|
|
|
+ validateTableData() {
|
|
|
+ if (this.productionTableData.length == 0) {
|
|
|
+ return {
|
|
|
+ res: false,
|
|
|
+ msg: "请添加货品明细",
|
|
|
+ };
|
|
|
+ }
|
|
|
+ let res = this.productionTableData.every((item) => {
|
|
|
+ return (
|
|
|
+ item.productNo &&
|
|
|
+ item.productNumber &&
|
|
|
+ item.productUnitPrice &&
|
|
|
+ item.productAmounts &&
|
|
|
+ item.sliceType &&
|
|
|
+ item.colourNumber
|
|
|
+ );
|
|
|
+ });
|
|
|
+ if (!res) {
|
|
|
+ return {
|
|
|
+ res: false,
|
|
|
+ msg: "请填写完整货品明细",
|
|
|
+ };
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ res: true,
|
|
|
+ msg: "",
|
|
|
+ };
|
|
|
+ },
|
|
|
// 审计 提交编辑结果按钮回调
|
|
|
async editConfirm() {
|
|
|
this.$refs.formDataRef.validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
console.log(valid);
|
|
|
+ let tableValidate = this.validateTableData();
|
|
|
+ if (!tableValidate.res) {
|
|
|
+ this.$message.warning(tableValidate.msg);
|
|
|
+ return;
|
|
|
+ }
|
|
|
let {
|
|
|
id,
|
|
|
//订单表数据
|