Qukaidi 4 anni fa
parent
commit
94df518c23
1 ha cambiato i file con 42 aggiunte e 2 eliminazioni
  1. 42 2
      src/views/Warehousing/outStock/AddOrUpdate.vue

+ 42 - 2
src/views/Warehousing/outStock/AddOrUpdate.vue

@@ -3825,7 +3825,11 @@ export default {
             formData.append("tCntr", JSON.stringify(this.CntrTable));
             disChargelist(formData).then((response) => {
               if ((response.code = 200)) {
-                formData.append("warehouseBills", JSON.stringify(this.form));
+                this.$set(
+                  this.form,
+                  "fDateChanged",
+                  response.data.fDateChanged
+                );
                 this.detailList.map((e, index) => {
                   response.data.warehousebillsitems.map((item) => {
                     item.fBsdate = Date.parse(new Date(item.fBsdate));
@@ -3959,6 +3963,38 @@ export default {
           formData.append("tCntr", JSON.stringify(this.CntrTable));
           addWhgenleg(formData).then((response) => {
             if ((response.code = 200)) {
+              this.mblnoStatus = "";
+              this.form = response.data.warehouseBills;
+              this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
+              this.$set(this.form, "fBstime", Date.parse(this.form.fBstime));
+              this.$set(
+                this.form,
+                "createTime",
+                Date.parse(this.form.createTime)
+              );
+              if (this.form.fStltypeid || this.form.fStltypeid == 0) {
+                this.$set(
+                  this.form,
+                  "fStltypeid",
+                  this.form.fStltypeid.toString()
+                );
+              }
+              this.$set(this.form, "fFeetUnit", this.form.fFeetunit);
+              if (this.form.fCartype || this.form.fCartype == 0) {
+                this.$set(this.form, "fCartype", this.form.fCartype.toString());
+              }
+              if (this.form.fTrademodeid) {
+                this.$set(
+                  this.form,
+                  "fTrademodeid",
+                  this.form.fTrademodeid.toString()
+                );
+              }
+              response.data.warehousebillsitems.map((e) => {
+                e.fBsdate = Date.parse(e.fBsdate);
+                e.fBusinessType = e.fBusinessType.toString();
+                e.fLntype = e.fLntype ? e.fLntype.toString() : null;
+              });
               this.detailList.map((e, index) => {
                 response.data.warehouseItem.map((item) => {
                   item.fBsdate = Date.parse(new Date(item.fBsdate));
@@ -5260,7 +5296,11 @@ export default {
             formData.append("tCntr", JSON.stringify(this.CntrTable));
             addJoblist(formData).then((response) => {
               if (response.code == 200) {
-                formData.append("warehouseBills", JSON.stringify(this.form));
+                this.$set(
+                  this.form,
+                  "fDateChanged",
+                  response.data.fDateChanged
+                );
                 this.detailList.map((e, index) => {
                   response.data.warehousebillsitems.map((item) => {
                     item.fBsdate = Date.parse(new Date(item.fBsdate));