From b4b3cb3641ecdf56cdfdf3532e5acf4af46fbe48 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 12 十二月 2023 18:33:45 +0800
Subject: [PATCH] 新增出入库明细页面,添加无权限展示页面,接口调整

---
 src/views/overview/AddOverviewDialog.vue              |  136 +++++++-----
 src/assets/img/noJurisdiction.png                     |    0 
 src/views/NoData/index.vue                            |   62 +++++
 vue.config.js                                         |    9 
 src/store/index.js                                    |    6 
 src/router/operate/index.js                           |    9 
 src/components/layout/components/appsidebar/index.vue |   71 ++----
 src/api/reportForm/inventoryRwport.js                 |    8 
 src/views/operate/outEnterLibrary/index.vue           |  294 ++++++++++++++++++++++++++
 src/router/index.js                                   |   11 +
 src/api/menus/index.js                                |   10 
 11 files changed, 512 insertions(+), 104 deletions(-)

diff --git a/src/api/menus/index.js b/src/api/menus/index.js
new file mode 100644
index 0000000..79af122
--- /dev/null
+++ b/src/api/menus/index.js
@@ -0,0 +1,10 @@
+import request from "@/common/untils/request.js"
+
+// 宸︿晶鑿滃崟
+export function getMenuTreeByRole(data) {
+  return request({
+    url: "/api/menu/getMenuTreeByRole",
+    method: "get",
+    data
+  })
+}
\ No newline at end of file
diff --git a/src/api/reportForm/inventoryRwport.js b/src/api/reportForm/inventoryRwport.js
index 9a86dfd..fa597c3 100644
--- a/src/api/reportForm/inventoryRwport.js
+++ b/src/api/reportForm/inventoryRwport.js
@@ -37,6 +37,14 @@
     data
   })
 }
+// 鍑哄叆搴撴槑缁�
+export function listByCondition(data) {
+  return request({
+    url: "/api-wms/v1/operation/listByCondition",
+    method: "post",
+    data
+  })
+}
 //鏌ヨ鍗曟潯璇︽儏鎺ュ彛
 export function getOperationInfo(data) {
   return request({
diff --git a/src/assets/img/noJurisdiction.png b/src/assets/img/noJurisdiction.png
new file mode 100644
index 0000000..9e6f432
--- /dev/null
+++ b/src/assets/img/noJurisdiction.png
Binary files differ
diff --git a/src/components/layout/components/appsidebar/index.vue b/src/components/layout/components/appsidebar/index.vue
index 06522e8..f14c975 100644
--- a/src/components/layout/components/appsidebar/index.vue
+++ b/src/components/layout/components/appsidebar/index.vue
@@ -16,53 +16,14 @@
         text-color="#bfcbd9"
         active-text-color="#fff"
       >
-        <el-menu-item index="/overview">
-          <template slot="title">
-            <i class="el-icon-bank-card icon"></i>
-            <span>姒傝堪</span>
-          </template>
-          <!-- <el-menu-item index="/supplierManage/supplier">渚涘簲鍟�</el-menu-item> -->
-        </el-menu-item>
-        <el-submenu index="2">
+
+        <el-submenu  v-for="item in menus" :key="item.id" :index="item.id">
           <template slot="title">
             <i class="el-icon-s-grid icon"></i>
-            <span>浜у搧</span>
+            <span>{{ item.title }}</span>
           </template>
-          <el-menu-item index="/productManage/product">浜у搧</el-menu-item>
-          <el-menu-item index="/productManage/productCategory">浜у搧绫诲埆</el-menu-item>
-        </el-submenu>
-        <el-submenu index="3">
-          <template slot="title">
-            <i class="el-icon-setting icon"></i>
-            <span>搴撳瓨鎿嶄綔</span>
-          </template>
-          <!-- <el-menu-item index="/productManage/product">琛ヨ揣</el-menu-item> -->
-          <el-menu-item index="/operate/inventoryAdjustment">搴撳瓨璋冩暣</el-menu-item>
-          <el-menu-item index="/operate/allot">搴撳瓨璋冩嫧</el-menu-item>
-          <el-menu-item index="/operate/scrap">搴撳瓨鎶ュ簾</el-menu-item>
-          <el-menu-item index="/operate/orderPoint">琛ヨ揣</el-menu-item>
-        </el-submenu>
-        <el-submenu index="4">
-          <template slot="title">
-            <i class="el-icon-box icon"></i>
-            <span>浠撳簱绠$悊</span>
-          </template>
-          <el-menu-item index="/warehouseManage/warehouse">浠撳簱</el-menu-item>
-          <el-menu-item index="/warehouseManage/position">浣嶇疆</el-menu-item>
-          <el-menu-item index="/warehouseManage/bussinessType">涓氬姟绫诲瀷</el-menu-item>
-          <el-menu-item index="/warehouseManage/listingRules">涓婃灦瑙勫垯</el-menu-item>
-          <el-menu-item index="/productManage/reorderRules">閲嶈璐ц鍒�</el-menu-item>
-        </el-submenu>
-        <el-submenu index="5">
-          <template slot="title">
-            <i class="el-icon-box icon"></i>
-            <span>鎶ヨ〃</span>
-          </template>
-          <el-menu-item index="/reportForm/inventoryReport">搴撳瓨鎶ヨ〃</el-menu-item>
-          <el-menu-item index="/reportForm/locationReport">浣嶇疆鎶ヨ〃</el-menu-item>
-          <!-- <el-menu-item index="/warehouseManage/bussinessType">鏌愭棩搴撳瓨</el-menu-item> -->
-          <el-menu-item index="/reportForm/inboundOutboundDetail">鍏ュ簱鏄庣粏鎶ヨ〃</el-menu-item>
-          <el-menu-item index="/reportForm/outboundDetail">鍑哄簱鏄庣粏鎶ヨ〃</el-menu-item>
+          <el-menu-item v-for="itm in item.children" :key="itm.id"  :index="itm.path">{{ itm.title }}</el-menu-item>
+        
         </el-submenu>
       </el-menu>
     </div>
@@ -70,23 +31,41 @@
 </template>
 
 <script>
+import {getMenuTreeByRole} from "@/api/menus/index"
+import {  mapMutations } from 'vuex';  
 export default {
   name: "AppSidebar",
   props: {},
   data() {
-    return {}
+    return {
+      menus:[]
+    }
   },
   watch: {},
   created() {
     this.initNavMenu()
+    this.getMenuTreeByRole()
+  },
+  computed:{
+    // ...mapState(['menus']),  
   },
   methods: {
+    ...mapMutations(['setMenus']),  
+    getMenuTreeByRole(){
+      getMenuTreeByRole().then((res)=>{
+        res.data.list.map((item)=>{
+          if(item.systemType===3){
+            this.menus=item.menus
+          }
+        })
+      })
+    },
     // 鐩戝惉璺敱
     initNavMenu() {
       // console.log(this.$route.name)
     },
     handleOpen(index) {
-      console.log(index)
+      console.log(index,"menuIndex")
     },
     handleClose() {}
   }
diff --git a/src/router/index.js b/src/router/index.js
index dffb3c5..f89362d 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -14,8 +14,19 @@
 const operate = (resolve) => require(["@/views/operate/index"], resolve) // 鎿嶄綔
 const warehouseManage = (resolve) => require(["@/views/warehouseManage/index"], resolve) // 浠撳簱绠$悊
 const reportForm = (resolve) => require(["@/views/reportForm/index"], resolve) // 鎶ヨ〃
+const noData = (resolve) => require(["@/views/NoData/index"], resolve)
 
 export const routes = [
+  // 鏃犳潈闄愭暟鎹〉闈�
+  {
+    path: "/",
+    name: "NoData",
+    meta: {
+      title: "",
+      auth: true,
+    },
+    component: noData,
+  },
   {
     path: "overview", // 姒傝堪
     name: "overview",
diff --git a/src/router/operate/index.js b/src/router/operate/index.js
index 68088c6..1ad6c81 100644
--- a/src/router/operate/index.js
+++ b/src/router/operate/index.js
@@ -3,6 +3,7 @@
 const allot = (resolve) => require(["@/views/operate/allot/index"], resolve) // 璋冩嫧
 const scrap = (resolve) => require(["@/views/operate/scrap/index"], resolve) // 鎶ュ簾
 const orderPoint = (resolve) => require(["@/views/operate/orderPoint/index"], resolve) // 鎶ュ簾
+const outEnterLibrary = (resolve) => require(["@/views/operate/outEnterLibrary/index"], resolve) // 鎶ュ簾
 const inventoryAdjustment = (resolve) => require(["@/views/operate/inventoryAdjustment/index"], resolve) // 搴撳瓨璋冩暣
 const inventoryAdjustmentHistory = (resolve) =>
   require(["@/views/operate/inventoryAdjustment/inventoryAdjustmentHistory"], resolve) // 搴撳瓨璋冩暣鍘嗗彶
@@ -33,6 +34,14 @@
     }
   },
   {
+    path: "/operate/outEnterLibrary",
+    name: "outEnterLibrary",
+    component: outEnterLibrary,
+    meta: {
+      title: "鍑哄叆搴撴槑缁�"
+    }
+  },
+  {
     path: "/operate/inventoryAdjustment",
     name: "inventoryAdjustment",
     component: inventoryAdjustment,
diff --git a/src/store/index.js b/src/store/index.js
index ceffa8e..1b91708 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -4,11 +4,15 @@
 Vue.use(Vuex)
 
 export default new Vuex.Store({
-  state: {
+  state: { 
+    menus: null,  
   },
   getters: {
   },
   mutations: {
+    setMenus(state, payload) {  
+      state.menus = payload;  
+    },
   },
   actions: {
   },
diff --git a/src/views/NoData/index.vue b/src/views/NoData/index.vue
new file mode 100644
index 0000000..1a7d65f
--- /dev/null
+++ b/src/views/NoData/index.vue
@@ -0,0 +1,62 @@
+<template>
+  <d2-container>
+    <div class="content">
+      <el-empty :image="require('@/assets/img/noJurisdiction.png')" description="鎮ㄥ皻鏈幏寰楄闂潈闄愩��">
+        <p>璇锋偍鑱旂郴涓昏处鍙风櫥褰曡闂帶鍒讹紝涓烘偍鎺堜簣鏈嶅姟鐨勭浉鍏虫潈闄愩��</p>
+      </el-empty>
+    </div>
+  </d2-container>
+</template>
+
+<script>
+
+export default {
+  name: "NoData",
+  components: {
+  },
+  
+  computed: {
+   
+  },
+  data() {
+    return {
+     
+    };
+  },
+  mounted() {},
+  methods: {
+    
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+
+// 鏄剧ず鍒楄〃
+.content {
+  width: 100%;
+  height:100%;
+  min-height: 300px;
+  overflow: hidden;
+  background:#fff;
+  padding:30px 0;
+  border-radius: 4px;
+  .el-empty{
+    width: 100%;
+    height:calc(100% - 280px);
+    p{
+      margin: 0;
+      font-size: 14px;
+      color: #909399;
+    }
+  }
+}
+
+::v-deep .el-empty__bottom{
+  margin: 0 !important;
+}
+::v-deep .el-empty__description{
+  margin: 0 !important;
+
+}
+</style>
diff --git a/src/views/operate/outEnterLibrary/index.vue b/src/views/operate/outEnterLibrary/index.vue
new file mode 100644
index 0000000..9eb2e60
--- /dev/null
+++ b/src/views/operate/outEnterLibrary/index.vue
@@ -0,0 +1,294 @@
+<template>
+  <div class="rightContent">
+    <div class="top">
+      <SearchCommonView
+        :add-title="'鏂板缓'"
+        :showAdd="false"
+        :placeholder="'璇锋牴鎹崟鍙枫�佷骇鍝併�佷笟鍔$被鍨嬭繘琛屾悳绱�'"
+        :amount-view="false"
+        @addCommonClick="addBtnClick"
+        @searchClick="getList"
+      />
+    </div>
+    <div class="list-view">
+      <div class="table">
+        <TableCommonView
+          ref="tableListRef"
+          :table-list="tableList"
+          @selTableCol="selTableCol"
+        >
+          <template slot="tableButton">
+            <el-table-column label="鎿嶄綔" width="100">
+              <template slot-scope="scope">
+                <el-button @click="tableRowClick(scope.row, '鏌ョ湅')" type="text" size="small">鏌ョ湅</el-button>
+                <el-button
+                  v-if="Number(scope.row.status) !== 4&&Number(scope.row.status) !== 5"
+                  @click="tableRowClick(scope.row, '缂栬緫')"
+                  type="text"
+                  size="small"
+                  >缂栬緫</el-button
+                >
+              </template>
+            </el-table-column>
+          </template>
+        </TableCommonView>
+      </div>
+      <div class="btn-pager">
+        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+      </div>
+    </div>
+    <!-- 鏌ョ湅/缂栬緫 -->
+    <AddOverviewDialog 
+      v-if="editConfig.visible" 
+      :edit-common-config="editConfig" 
+      :add-name="addName"
+    />
+  </div>
+</template>
+
+<script>
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import { listByCondition,getOperationInfo } from "@/api/reportForm/inventoryRwport"
+// import { getProductOperatonList } from "@/api/product/product"
+
+import AddOverviewDialog from "@/views/overview/AddOverviewDialog"
+import { getDataByType } from "@/api/data"
+export default {
+  name: "InboundOutboundDetail",
+  props: {},
+  components: { AddOverviewDialog },
+  mixins: [pageMixin],
+  computed: {},
+  data() {
+    return {
+      addName:'',
+      tableList: {},
+      showcol: ["鐘舵��"],
+      searchOptions: [],
+      commonDetail: {
+        visible: false,
+        title: "鏂板缓",
+        infomation: {}
+      },
+      editConfig: {
+        visible: false,
+        title: "鏂板缓",
+        infomation: {}
+      },
+      params: {},
+      baseOperationTypeList:getDataByType("baseOperationTypeTwo"),
+    }
+  },
+  created() {
+    this.setTable()
+    console.log(this.$route.params)
+    var paramsList = sessionStorage.getItem("paramsList")
+    let params = {}
+    if (paramsList) {
+      params = JSON.parse(sessionStorage.getItem("paramsList"))
+    } else {
+      params = this.$route.params
+      sessionStorage.setItem("paramsList", JSON.stringify(params))
+    }
+    this.params = params
+    console.log(this.params,'====111')
+    this.getData()
+  },
+  // 椤甸潰閿�姣佷箣鍓�
+  beforeDestroy() {
+    sessionStorage.removeItem("paramsList")
+  },
+  methods: {
+    setTable() {
+      this.tableList = {
+        tableInfomation: [],
+        selectBox: true,
+        showcol: this.showcol,
+        allcol: [],
+        tableColumn: this.setTableColumn(this.showcol)
+      }
+      let allcol = []
+      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
+        if (!this.tableList.tableColumn[i].default) {
+          const label = this.tableList.tableColumn[i].label
+          allcol.push(label)
+        }
+      }
+      this.tableList.allcol = allcol
+    },
+    setTableColumn(showcol) {
+      let tableColumn = [
+        {
+          label: "鏃ユ湡",
+          prop: "date",
+          isShowColumn: true,
+          default: true,
+          // date: true
+        },
+        {
+          label: "鍗曞彿",
+          prop: "number",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "浜у搧",
+          prop: "productName",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "浜у搧缂栫爜",
+          prop: "productId",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "涓氬姟绫诲瀷",
+          prop: "baseOperationType",
+          isShowColumn: true,
+          default: true,
+          conversion: true,
+          getStatus: this.getBaseOperationTypeList
+        },
+        {
+          label: "浠�",
+          prop: "fromLocation",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "鑷�",
+          prop: "toLocation",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "鏁伴噺",
+          prop: "amount",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "鍗曚綅",
+          prop: "unit",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "閲嶉噺",
+          prop: "weight",
+          isShowColumn: true,
+          default: true
+        },
+        {
+          label: "鐘舵��",
+          prop: "status",
+          width: 120,
+          isShowColumn: showcol.includes("鐘舵��"),
+          default: false,
+          status: true,
+          isCallMethod: true,
+          getCallMethod: this.getStatus
+        },
+        {
+          label: "瀹屾垚鑰�",
+          prop: "contactedName",
+          isShowColumn: showcol.includes("瀹屾垚鑰�"),
+          default: false
+        }
+      ]
+      return tableColumn
+    },
+    selTableCol(val) {
+      this.showcol = val
+      this.tableList.tableColumn = this.setTableColumn(val)
+    },
+    getBaseOperationTypeList(val){
+      let string = "--"
+      if (val) {
+        for (let i in this.baseOperationTypeList) {
+          if (this.baseOperationTypeList[i].id == val) {
+            return this.baseOperationTypeList[i].name
+          }
+        }
+      }
+      return string
+    },
+    // 搴撳瓨鎶ヨ〃璺宠浆璇锋眰鏁版嵁
+    async getData() {
+      if (this.params.name === "鎶ヨ〃") {
+        await listByCondition({
+          keyWord:this.params.keyWord,
+          produceId:this.params.produceId,
+          unit:this.params.unit,
+          productName:this.params.productName,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        }).then((res) => {
+          if (res.code === 200&&res.data) {
+            res.data.map((item)=>{
+                let dateObject = new Date(item.date);  
+                let formattedDateString = dateObject.toISOString().split('T')[0];  
+                item.date=formattedDateString
+            })
+            this.tableList.tableInfomation = res.data||[]
+          }else{
+            this.tableList.tableInfomation = res.data||[]
+          }
+          this.pagerOptions.totalCount = res.total
+        })
+      } else {
+        await listByCondition({
+          // baseOperationType:1,
+          condition:this.params.keyWord,
+          page: this.pagerOptions.currPage,
+          pageSize: this.pagerOptions.pageSize
+        }).then((res) => {
+          if (res.code === 200&&res.data) {
+            res.data.map((item)=>{
+                if(item.status===""){
+                  item.status=4
+                }
+                let dateObject = new Date(item.date);  
+                let formattedDateString = dateObject.toISOString().split('T')[0];  
+                item.date=formattedDateString
+            })
+            this.tableList.tableInfomation = res.data||[]
+          }else{
+            this.tableList.tableInfomation = res.data||[]
+          }
+          this.pagerOptions.totalCount = res.total
+        })
+      }
+    },
+    // 鎼滅储
+    getList(val) {
+      this.params.keyWord=val;
+      this.getData()
+    },
+    tableRowClick(row,val) {
+      this.editConfig.title = val
+      getOperationInfo(row.operationId).then((res)=>{
+        this.editConfig.infomation = { ...res.data }
+        this.editConfig.visible = true
+      })
+      // this.editConfig.visible = true
+      // this.editConfig.title = "鏌ョ湅"
+    },
+    // 鏂板缓
+    addBtnClick() {
+      // this.editConfig.visible = true
+      this.editConfig.title = "鏂板缓"
+    },
+    // 鐘舵��
+    getStatus(val) {
+      let newVal=Number(val)
+      return newVal === 1 ? "鑽夌" : newVal === 3 ? "灏辩华" : newVal=== 4 ?"瀹屾垚":newVal=== 5 ?"宸插彇娑�":" "
+    }
+  }
+}
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style lang="scss" scoped></style>
diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue
index c6b7a82..9226689 100644
--- a/src/views/overview/AddOverviewDialog.vue
+++ b/src/views/overview/AddOverviewDialog.vue
@@ -6,7 +6,7 @@
       <div slot="title" class="dialog-header">
         <span>{{ editCommonConfig.title === "鏌ョ湅" ? editCommonConfig.title : editCommonConfig.title + addName }}</span>
         <div class="header_btns">
-          <span class="btn" @click="btnPrint">
+          <span class="btn" :style="{cursor:thatCursor,color:thatColor}" @click="btnPrint" :disabled="true">
             <i class="el-icon-printer"></i>
             <span>鎵撳嵃</span>
           </span>
@@ -183,13 +183,13 @@
             </div>
             <!-- 鐗╂祦淇℃伅 -->
             <div v-if="activeName === 'two' && this.workType === 2">
-              <el-form :rules="rules" ref="shipmentsInfo" label-position="right" :model="shipmentsInfo" label-width="120px" size="mini"
+              <el-form :rules="rules2" ref="shipmentsInfo" label-position="right" :model="editConfig.infomation" label-width="120px" size="mini"
                 style="margin-top: 20px;">
                 <el-col :span="12">
                   <el-form-item label="鎵胯繍鍟�">
                     <el-select size="mini" :disabled="!showFooter" v-model="editConfig.infomation.logisticCompanyId"
                       placeholder="璇烽�夋嫨" style="width: 90%;">
-                      <el-option v-for="item in shipmentsInfo.carrier" :key="item.id" :label="item.name" :value="item.id">
+                      <el-option v-for="item in editConfig.infomation.carrier" :key="item.id" :label="item.name" :value="item.id">
                       </el-option>
                     </el-select>
                   </el-form-item>
@@ -257,7 +257,7 @@
       <!-- 灏� -->
       <div slot="footer" class="dialog-footer">
         <!-- <el-button type="primary" size="small" @click="editConfig.visible = false">淇濆苟鎻愪氦瀹℃壒</el-button> -->
-        <el-button type="primary" size="small" @click="saveClick('form','shipmentsInfo')" :disabled="!showFooter">淇濆瓨</el-button>
+        <el-button type="primary" size="small" @click="saveClick" :disabled="!showFooter">淇濆瓨</el-button>
         <el-button size="small" @click="editConfig.visible = false">鍙栨秷</el-button>
       </div>
     </el-dialog>
@@ -317,8 +317,10 @@
         toLocationId: [{ required: true, message: "璇烽�夋嫨浠撳簱浣嶇疆", trigger: "change" }],
         fromLocationId: [{ required: true, message: "璇烽�夋嫨婧愪綅缃�", trigger: "change" }],
         operationTypeId: [{ required: true, message: "璇烽�夋嫨鍏ュ簱绫诲瀷", trigger: "change" }],
-        receiverPhone: [
-          {required: true, message: "璇疯緭鍏ユ墜鏈哄彿", trigger: "change" },
+      }, 
+      rules2:{
+        receiverPhone:  [
+          // {required: true, message: "璇疯緭鍏ユ墜鏈哄彿", trigger: "change" },
           {
             pattern:
               /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
@@ -326,8 +328,7 @@
             trigger: ["blur",'change' ],
           },
         ] 
-        
-      }, 
+      },
       companyOptions: [], // 鍏徃
       supplierOptions: [],//渚涘簲鍟�
       clientOptions: [],//瀹㈡埛
@@ -359,10 +360,13 @@
         waybillNumber: '',
         weight: 0,
         logisticWeight: 0,
+        receiverPhone:''
       },
       showCancel: false, // 鍙栨秷鏄惁鍙互鏄剧ず
       list: [],
-      pdfParams:{}
+      pdfParams:{},
+      thatCursor:this.workType===3?"no-drop":'pointer',
+      thatColor:this.workType===3?'#ccc':'#000'
     }
   },
   created() {
@@ -531,40 +535,56 @@
     async getLogisticCompanyList() {
       await getLogisticCompanyList().then((res) => {
         if (res.code === 200) {
-          this.shipmentsInfo.carrier = res.data
+          this.editConfig.infomation.carrier = res.data
         }
       })
     },
     // 淇濆瓨
-    saveClick(formName,shipmentsInfo) {
-      this.$refs[formName,shipmentsInfo].validate((valid) => {
-        if (valid) {
-          for (let i = 0; i < this.tableData.length; i++) {
-            if (this.tableData[i].productName.length === 0) {
-              this.isNoProduct = true
-              break
-            } else {
-              this.isNoProduct = false
-            }
-          }
-          if (this.isNoProduct) {
-            this.$message.error("璇锋坊鍔犳槑缁嗚鎴栭�夋嫨浜у搧涓嶈兘涓虹┖")
+    saveClick() {
+      let validArr=[]
+      if(this.workType === 2){
+         console.log("鍑哄簱")
+         validArr=[this.$refs.form.validate(),this.$refs.shipmentsInfo.validate()]
+      }else{
+        console.log("鍏ュ簱")
+        validArr=[this.$refs.form.validate()]
+      }
+      console.log(validArr,"xxx")
+      Promise.all(validArr)
+      .then((results) => {
+        console.log(results,"鎵ц鎴愬姛")
+        for (let i = 0; i < this.tableData.length; i++) {
+          if (this.tableData[i].productName.length === 0) {
+            this.isNoProduct = true
+            break
           } else {
-            let requestUrl = this.editConfig.title === "鏂板缓" ? addOperation : updateOperation
-            let params = this.saveParams()
-            requestUrl({
-              ...params
-            }).then((res) => {
-              console.log(res)
-              this.editConfig.visible = false
-              if (res.code === 200) {
-                this.$message.success("娣诲姞鎴愬姛")
-                this.$parent.getData()
-              }
-            })
+            this.isNoProduct = false
           }
         }
+        if (this.isNoProduct) {
+          this.$message.error("璇锋坊鍔犳槑缁嗚鎴栭�夋嫨浜у搧涓嶈兘涓虹┖")
+        } else {
+          let requestUrl = this.editConfig.title === "鏂板缓" ? addOperation : updateOperation
+          let params = this.saveParams()
+          requestUrl({
+            ...params
+          }).then((res) => {
+            console.log(res)
+            this.editConfig.visible = false
+            if (res.code === 200) {
+              if(this.editConfig.title === "鏂板缓"){
+                this.$message.success("娣诲姞鎴愬姛")
+              }else {
+                this.$message.success("缂栬緫鎴愬姛")
+              }
+              this.$parent.getData()
+            }
+          })
+        }
       })
+      .catch((error) => {
+        console.error('琛ㄥ崟鏍¢獙鏈�氳繃:', error);
+      });
     },
     saveParams() {
       let data = this.editConfig.infomation
@@ -801,29 +821,32 @@
     },
     //鎵撳嵃
     async btnPrint() {
-      localStorage.removeItem('pdfParams');
-      try {
-        let res = await printReceipts(this.editCommonConfig.infomation.id);
-        console.log(res);
-        if (res.code === 200) {
-          console.log(this.editConfig.infomation.baseOperationType,"绫诲瀷")
-          let pdfParams = {
-            url: res.data,
-            baseOperationType: this.editConfig.infomation.baseOperationType || undefined,
-            cutAfterWidth: this.editConfig.infomation.baseOperationType === 2 ? 50.8 : 53.3
-          };
-          var { href } = this.$router.resolve({
-              path: '/overview/previewExcel',
-              query:{
-                ...pdfParams
-              }
-             
-          });
-          window.open(href, '_blank');
+      if(this.workType!==3){
+        localStorage.removeItem('pdfParams');
+        try {
+          let res = await printReceipts(this.editCommonConfig.infomation.id);
+          console.log(res);
+          if (res.code === 200) {
+            console.log(this.editConfig.infomation.baseOperationType,"绫诲瀷")
+            let pdfParams = {
+              url: res.data,
+              baseOperationType: this.editConfig.infomation.baseOperationType || undefined,
+              cutAfterWidth: this.editConfig.infomation.baseOperationType === 2 ? 50.8 : 53.3
+            };
+            var { href } = this.$router.resolve({
+                path: '/overview/previewExcel',
+                query:{
+                  ...pdfParams
+                }
+              
+            });
+            window.open(href, '_blank');
+          }
+        } catch (error) {
+          console.error(error);
         }
-      } catch (error) {
-        console.error(error);
       }
+      
     }
   }
 }
@@ -847,6 +870,7 @@
 
     .btn:nth-of-type(2) {
       cursor: no-drop;
+      color:#ccc;
     }
   }
 }
diff --git a/vue.config.js b/vue.config.js
index 1bfd2d9..0467880 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -24,7 +24,14 @@
         target:"http://fai365.com:9083",
         ws: true,
         changeOrigin: true
-      }
+      },
+      "/api/menu": {
+        target: "http://192.168.20.119:8001",
+         //娉細 鏆傛椂浣跨敤====鐢ㄦ埗鏉冮檺锛岃鑹叉殏鏃剁敤鐨勭幆澧�
+        //  target: "http://192.168.20.119:8011",
+        ws: true,
+        changeOrigin: true,
+      },
     }
   },
   transpileDependencies: [

--
Gitblit v1.8.0