浏览代码

修改bug

QuKatie 3 年之前
父节点
当前提交
e8773b1da4
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11 5
      src/views/kaihe/domesticTrade/orderInformation/index.vue

+ 11 - 5
src/views/kaihe/domesticTrade/orderInformation/index.vue

@@ -740,7 +740,7 @@
               :on-progress="uploading"
               :show-file-list="false"
               :data="{
-                fId: goodsList[0].fId,
+                fId: goodsList.length > 0 ? goodsList[0].fId : null,
               }"
               :on-success="importTemplate"
               accept=".xls,.xlsx"
@@ -2204,8 +2204,9 @@ export default {
       addmodify(formDate).then((response) => {
         console.log(response);
         if (response.code == 200) {
-          this.form = response.rows[0];
-          console.log(this.form);
+          if (response.rows) {
+            this.form = response.rows[0];
+          }
           if (this.form.fMblno == null) {
             this.changeNum = false;
           } else {
@@ -2241,8 +2242,13 @@ export default {
             "fDetentioncargo",
             JSON.stringify(this.form.fDetentioncargo)
           );
-          this.goodsList = response.rows[0].tWarehousebillsCntrList;
-          this.estimatedTime = response.rows[0].tVoyageL;
+          if (response.rows[0].tWarehousebillsCntrList) {
+            this.goodsList = response.rows[0].tWarehousebillsCntrList;
+          }
+          if (response.rows[0].tVoyageL) {
+            this.estimatedTime = response.rows[0].tVoyageL;
+          }
+
           if (response.rows[0].tWarehousebillsCntritemsList !== null) {
             this.dataList = response.rows[0].tWarehousebillsCntritemsList;
           } else this.dataList = [];