QuKatie 3 lat temu
rodzic
commit
1ed919a472
1 zmienionych plików z 175 dodań i 122 usunięć
  1. 175 122
      src/views/kaihe/costModify/index.vue

+ 175 - 122
src/views/kaihe/costModify/index.vue

@@ -94,18 +94,18 @@
                 </el-select>
               </el-form-item>
             </el-col>
-<!--            <el-col :span="6">-->
-<!--              <el-form-item label-width="100px" label="原系统编号" prop="">-->
-<!--                <el-input-->
-<!--                  placeholder="请输入原系统编号"-->
-<!--                  clearable-->
-<!--                  size="small"-->
-<!--                  @keyup.enter.native="handleQuery"-->
-<!--                  style="max-width: 199px"-->
-<!--                  v-model="queryParams.fBillno"-->
-<!--                />-->
-<!--              </el-form-item>-->
-<!--            </el-col>-->
+            <!--            <el-col :span="6">-->
+            <!--              <el-form-item label-width="100px" label="原系统编号" prop="">-->
+            <!--                <el-input-->
+            <!--                  placeholder="请输入原系统编号"-->
+            <!--                  clearable-->
+            <!--                  size="small"-->
+            <!--                  @keyup.enter.native="handleQuery"-->
+            <!--                  style="max-width: 199px"-->
+            <!--                  v-model="queryParams.fBillno"-->
+            <!--                />-->
+            <!--              </el-form-item>-->
+            <!--            </el-col>-->
             <el-col :span="6">
               <el-form-item label-width="100px" label="原提单号" prop="">
                 <el-input
@@ -140,36 +140,36 @@
       </el-collapse-transition>
     </el-form>
     <el-row :gutter="10" style="padding-bottom: 10px">
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="primary"-->
-<!--          icon="el-icon-plus"-->
-<!--          size="mini"-->
-<!--          @click="handleAdd"-->
-<!--          v-hasPermi="['fleet:plans:add']"-->
-<!--        >新增</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="success"-->
-<!--          icon="el-icon-edit"-->
-<!--          size="mini"-->
-<!--          :disabled="single"-->
-<!--          @click="handleUpdate"-->
-<!--          v-hasPermi="['warehouseBusiness:inStock:edit']"-->
-<!--        >修改-->
-<!--        </el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="warning"-->
-<!--          icon="el-icon-download"-->
-<!--          size="mini"-->
-<!--          @click="handleExport"-->
-<!--          v-hasPermi="['warehouseBusiness:inStock:export']"-->
-<!--        >导出-->
-<!--        </el-button>-->
-<!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="primary"-->
+      <!--          icon="el-icon-plus"-->
+      <!--          size="mini"-->
+      <!--          @click="handleAdd"-->
+      <!--          v-hasPermi="['fleet:plans:add']"-->
+      <!--        >新增</el-button>-->
+      <!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="success"-->
+      <!--          icon="el-icon-edit"-->
+      <!--          size="mini"-->
+      <!--          :disabled="single"-->
+      <!--          @click="handleUpdate"-->
+      <!--          v-hasPermi="['warehouseBusiness:inStock:edit']"-->
+      <!--        >修改-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="warning"-->
+      <!--          icon="el-icon-download"-->
+      <!--          size="mini"-->
+      <!--          @click="handleExport"-->
+      <!--          v-hasPermi="['warehouseBusiness:inStock:export']"-->
+      <!--        >导出-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
       <div class="tabSetting">
         <div style="margin-right: 20px">
           <el-button
@@ -178,24 +178,24 @@
             size="mini"
             @click="handleQuery"
             v-hasPermi="['warehouse:modify:list']"
-          >搜索</el-button
+            >搜索</el-button
           >
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
+            >重置</el-button
           >
           <el-button
             v-show="show"
             @click="show = !show"
             icon="el-icon-arrow-up"
             size="mini"
-          >展开</el-button
+            >展开</el-button
           >
           <el-button
             v-show="!show"
             @click="show = !show"
             icon="el-icon-arrow-down"
             size="mini"
-          >展开</el-button
+            >展开</el-button
           >
         </div>
         <right-toolbar
@@ -244,7 +244,7 @@
                     v-model="item.checked"
                     :true-label="0"
                     :false-label="1"
-                  >{{ item.name }}
+                    >{{ item.name }}
                   </el-checkbox>
                 </div>
               </div>
@@ -274,7 +274,12 @@
       ref="table"
       :height="tableHeight"
     >
-      <el-table-column type="selection" width="55" align="center" fixed="left" />
+      <el-table-column
+        type="selection"
+        width="55"
+        align="center"
+        fixed="left"
+      />
       <el-table-column
         v-for="(item, index) in getRowList"
         :key="index"
@@ -305,6 +310,9 @@
           <span v-else-if="item.label == 'fVoyid'">
             {{ scope.row.fVoyid | voyageFormat(voyageOptions) }}
           </span>
+          <span v-else-if="item.label == 'fStatus'">
+            {{ scope.row.fStatus | statusFormat }}
+          </span>
           <span v-else>
             {{ scope.row[item.label] }}
           </span>
@@ -324,7 +332,7 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['warehouse:modify:query']"
-          >查看</el-button
+            >查看</el-button
           >
           <!-- <el-button
             v-if="scope.row.billStatus != 6"
@@ -335,14 +343,14 @@
             v-hasPermi="['fleet:plans:edit']"
             >修改</el-button
           > -->
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-delete"-->
-<!--            @click="handleDelete(scope.row)"-->
-<!--            v-hasPermi="['fleet:plans:remove']"-->
-<!--          >删除</el-button-->
-<!--          >-->
+          <!--          <el-button-->
+          <!--            size="mini"-->
+          <!--            type="text"-->
+          <!--            icon="el-icon-delete"-->
+          <!--            @click="handleDelete(scope.row)"-->
+          <!--            v-hasPermi="['fleet:plans:remove']"-->
+          <!--          >删除</el-button-->
+          <!--          >-->
         </template>
       </el-table-column>
     </el-table>
@@ -376,12 +384,16 @@
 
 <script>
 import { listCorps } from "@/api/basicdata/corps";
-import { addSet, resetModule, select } from '@/api/system/set';
-import Cookies from 'js-cookie';
+import { addSet, resetModule, select } from "@/api/system/set";
+import Cookies from "js-cookie";
 import draggable from "vuedraggable";
 import AddOrUpdate from "./AddOrUpdate";
-import {listWarehouseModify,passWarehouse,detailWarehouseModify} from "@/api/warehouseBusiness/wareHouseModify";
-import {listGoods} from "@/api/basicdata/goods";
+import {
+  listWarehouseModify,
+  passWarehouse,
+  detailWarehouseModify,
+} from "@/api/warehouseBusiness/wareHouseModify";
+import { listGoods } from "@/api/basicdata/goods";
 import {
   listWarehouse,
   treeselect,
@@ -395,7 +407,7 @@ export default {
   name: "costModify",
   components: {
     draggable,
-    AddOrUpdate
+    AddOrUpdate,
   },
   data() {
     return {
@@ -501,9 +513,16 @@ export default {
           checked: 0,
           width: 100,
         },
+        {
+          surface: "11",
+          label: "fStatus",
+          name: "状态",
+          checked: 0,
+          width: 100,
+        },
       ],
       // 子组件弹窗title
-      title: '',
+      title: "",
       // 子组件弹窗显示开关
       addOrUpdateVisible: false,
       // 子组件表格是否禁用
@@ -513,31 +532,31 @@ export default {
       formfeesList: [],
       goodsOptions: [],
       warehouseOptions: [],
-      fDc: '',
+      fDc: "",
       warehouseId: null,
       disabledtwo: false,
       approVal: false,
       userOptions: [],
       vesselOptions: [], //船名
       voyageOptions: [], //航次
-    }
+    };
   },
   created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
-    this.getRow()
+    this.getRow();
     this.getList();
     this.getDicts("data_billtype_type").then((response) => {
       this.billTypeList = response.data;
-      this.billTypeList.push({dictLabel: '凯和订单', dictValue:'KHDD'})
+      this.billTypeList.push({ dictLabel: "凯和订单", dictValue: "KHDD" });
     });
     listCorps().then((response) => {
       this.fMblnoOptions = response.rows;
     });
-    listGoods({fStatus: 0, delFlag: 0}).then((response) => {
+    listGoods({ fStatus: 0, delFlag: 0 }).then((response) => {
       this.goodsOptions = response.rows;
     });
-    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+    listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
       this.warehouseOptions = response.rows;
     });
     listUser().then((response) => {
@@ -549,43 +568,46 @@ export default {
   activated() {
     if (this.$route.query.data) {
       this.reset();
-      this.warehouseId = this.$route.query.data.form.fId
-      this.fDc = this.$route.query.data.fDc
-      this.disabledtwo = false
-      passWarehouse(this.fDc, this.warehouseId).then(res => {
-        this.form = res.data.data
-        this.feeList = res.data.data.tWarehousebillsfees
-      })
+      this.warehouseId = this.$route.query.data.form.fId;
+      this.fDc = this.$route.query.data.fDc;
+      this.disabledtwo = false;
+      passWarehouse(this.fDc, this.warehouseId).then((res) => {
+        this.form = res.data.data;
+        this.feeList = res.data.data.tWarehousebillsfees;
+      });
       this.$nextTick(() => {
-        this.openDialog()
-        this.$refs.addOrUpdateRef.init()
-      })
+        this.openDialog();
+        this.$refs.addOrUpdateRef.init();
+      });
     }
     if (this.$route.query.id) {
       let id = this.$route.query.id;
       this.reset();
-      detailWarehouseModify(id).then(res => {
-        this.form = res.data
-        this.feeList = res.data.tWarehousebillsfees
-        this.formfeesList = res.data.warehousebillsfeesModifyList? res.data.warehousebillsfeesModifyList:[]
-      })
-      this.disabledtwo = true
+      detailWarehouseModify(id).then((res) => {
+        this.form = res.data;
+        this.feeList = res.data.tWarehousebillsfees;
+        this.formfeesList = res.data.warehousebillsfeesModifyList
+          ? res.data.warehousebillsfeesModifyList
+          : [];
+      });
+      this.disabledtwo = true;
       this.title = "查看订单";
       this.addOrUpdateVisible = true;
       this.form.id = id;
-      this.formDisabled = true
-      this.approVal = true
-      this.$refs.addOrUpdateRef.init()
-      this.$router.push({query: {}});
+      this.formDisabled = true;
+      this.approVal = true;
+      this.$refs.addOrUpdateRef.init();
+      this.$router.push({ query: {} });
     }
   },
   mounted() {
     this.$nextTick(() => {
       // 监听浏览器高度变化,改变表格高度
       window.onresize = () => {
-        this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
-      }
-    })
+        this.tableHeight =
+          window.innerHeight - this.$refs.table.$el.offsetTop - 70;
+      };
+    });
   },
   filters: {
     corpNameFormat(row, fMblnoOptions) {
@@ -642,9 +664,35 @@ export default {
       });
       return name;
     },
+    statusFormat(status) {
+      let name;
+      switch (status) {
+        case "1":
+          name = "新建";
+          break;
+        case "2":
+          name = "暂存";
+          break;
+        case "3":
+          name = "审批驳回";
+          break;
+        case "4":
+          name = "提交审批";
+          break;
+        case "5":
+          name = "审批中";
+          break;
+        case "6":
+          name = "审批完成";
+          break;
+        default:
+          name = "——";
+      }
+      return name;
+    },
   },
   methods: {
-    openDialog(){
+    openDialog() {
       this.formDisabled = true;
       this.title = "查看订单";
       // this.$nextTick(() => {
@@ -653,27 +701,32 @@ export default {
       this.addOrUpdateVisible = true;
     },
     getList() {
-      listWarehouseModify(this.queryParams).then(res => {
-        this.costModifyList = res.rows
-        this.total = res.total
+      listWarehouseModify(this.queryParams).then((res) => {
+        this.costModifyList = res.rows;
+        this.total = res.total;
         this.loading = false;
-      })
+      });
       // 根据浏览器高度设置初始高度
       setTimeout(() => {
-        this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
-      }, 300)
+        this.tableHeight =
+          window.innerHeight - this.$refs.table.$el.offsetTop - 70;
+      }, 300);
     },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
       this.queryParams.pageSize = 10;
       if (this.queryParams.createTimeList) {
-        this.queryParams.createTimeList[0] = this.queryParams.createTimeList[0]+ " " + "00:00:00"
-        this.queryParams.createTimeList[1] = this.queryParams.createTimeList[1]+ " " + "23:59:59"
+        this.queryParams.createTimeList[0] =
+          this.queryParams.createTimeList[0] + " " + "00:00:00";
+        this.queryParams.createTimeList[1] =
+          this.queryParams.createTimeList[1] + " " + "23:59:59";
       }
       if (this.queryParams.bstimeList) {
-        this.queryParams.bstimeList[0] = this.queryParams.bstimeList[0]+ " " + "00:00:00"
-        this.queryParams.bstimeList[1] = this.queryParams.bstimeList[1]+ " " + "23:59:59"
+        this.queryParams.bstimeList[0] =
+          this.queryParams.bstimeList[0] + " " + "00:00:00";
+        this.queryParams.bstimeList[1] =
+          this.queryParams.bstimeList[1] + " " + "23:59:59";
       }
       this.getList();
     },
@@ -682,7 +735,7 @@ export default {
       this.queryParams = {
         pageNum: 1,
         pageSize: 10,
-      }
+      };
       this.resetForm("queryForm");
       this.handleQuery();
     },
@@ -759,20 +812,22 @@ export default {
     handleUpdate(row) {
       let id = row.fId;
       this.reset();
-      detailWarehouseModify(id).then(res => {
-        this.form = res.data
-        this.warehouseId = res.data.fPid
-        this.feeList = res.data.tWarehousebillsfees
-        this.formfeesList = res.data.warehousebillsfeesModifyList?res.data.warehousebillsfeesModifyList: []
+      detailWarehouseModify(id).then((res) => {
+        this.form = res.data;
+        this.warehouseId = res.data.fPid;
+        this.feeList = res.data.tWarehousebillsfees;
+        this.formfeesList = res.data.warehousebillsfeesModifyList
+          ? res.data.warehousebillsfeesModifyList
+          : [];
         this.$nextTick(() => {
-          this.$refs.addOrUpdateRef.init()
-        })
-      })
-      this.disabledtwo = true
+          this.$refs.addOrUpdateRef.init();
+        });
+      });
+      this.disabledtwo = true;
       this.title = "查看订单";
       this.addOrUpdateVisible = true;
       this.form.id = id;
-      this.formDisabled = true
+      this.formDisabled = true;
     },
     /** 删除按钮操作 */
     handleDelete(row) {
@@ -806,7 +861,7 @@ export default {
           path: "/domesticTrade/costModify",
           query: {},
         });
-        this.getList()
+        this.getList();
       } else {
         this.addOrUpdateVisible = true;
       }
@@ -816,7 +871,7 @@ export default {
     voyageRemthods() {
       getVoyageName().then((response) => {
         this.voyageOptions = response.rows;
-        this.form.fVslid && (this.form.fVoyid = "")
+        this.form.fVslid && (this.form.fVoyid = "");
       });
     },
     //获取船名
@@ -856,7 +911,7 @@ export default {
         if (res.code == 200) {
           this.showSetting = false;
           this.setRowList = this.tableDate;
-          console.log(this.setRowList)
+          console.log(this.setRowList);
           this.getRowList = this.tableDate;
         }
       });
@@ -898,10 +953,8 @@ export default {
         }
       });
     },
-  }
-}
+  },
+};
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>