From deb987f3f16011737790ff25741639e9c6933a9f Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 24 十一月 2023 11:04:18 +0800
Subject: [PATCH] 	modified:   src/views/warehouse/pallettransports/detail-ifslocation-form.vue 	modified:   src/views/warehouse/pallettransports/ifslocation-form.vue 	modified:   src/views/warehouse/pallettransports/index.vue

---
 src/views/warehouse/pallettransports/detail-ifslocation-form.vue |   41 ++++++++-----
 src/views/warehouse/pallettransports/index.vue                   |    6 +-
 src/views/warehouse/pallettransports/ifslocation-form.vue        |   75 +++++++++++++++++++------
 3 files changed, 84 insertions(+), 38 deletions(-)

diff --git a/src/views/warehouse/pallettransports/detail-ifslocation-form.vue b/src/views/warehouse/pallettransports/detail-ifslocation-form.vue
index ebdb511..879c1a7 100644
--- a/src/views/warehouse/pallettransports/detail-ifslocation-form.vue
+++ b/src/views/warehouse/pallettransports/detail-ifslocation-form.vue
@@ -23,7 +23,7 @@
       </div>
       <div style="display:flex;align-items:center;margin-left:10px;">
         <div>
-          <span>搴撲綅鎻忚堪锛�</span>
+          <span>搴撲綅鍚嶇О锛�</span>
         </div>
         <div>
           <el-input
@@ -56,25 +56,32 @@
         </template>
       </el-table-column>
       <el-table-column type="index" width="50" label="搴忓彿"> </el-table-column>
-      <el-table-column prop="locationNo" label="搴撲綅鍙�" align="center">
+      <el-table-column prop="locNo" label="搴撲綅鍙�" align="center">
       </el-table-column>
       <el-table-column
-        prop="locationDesc"
-        label="搴撲綅鎻忚堪"
+        prop="locName"
+        label="搴撲綅鍚嶇О"
         align="center"
         show-overflow-tooltip
       >
       </el-table-column>
       <el-table-column
-        prop="locationGroupDesc"
-        label="搴撲綅缁勬弿杩�"
+        prop="locType"
+        label="搴撲綅绫诲瀷"
         align="center"
         show-overflow-tooltip
       >
       </el-table-column>
       <el-table-column
-        prop="locationTypeDesc"
-        label="搴撲綅绫诲瀷鎻忚堪"
+        prop="ifsLocation"
+        label="ifs搴撲綅"
+        align="center"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        prop="ifsLocationGroup"
+        label="ifs搴撲綅缁�"
         align="center"
         show-overflow-tooltip
       >
@@ -128,16 +135,16 @@
         locationNo: this.dataForm.locationNo,
         locationDesc: this.dataForm.locationDesc
       }).then((response) => {
-        if (response.data.code === 0) {
-          const _data = response.data.data.LIST_INFO
-          console.log(`output->_data`,_data)
+        if (response.data.code == 0) {
+          const _data = response.data.data
           this.ifsLocationData = _data.map((item, index) => {
             return {
               id: index + 1,
-              locationNo: item.LOCATION_NO,
-              locationDesc: item.LOCATION_DESC,
-              locationGroupDesc: item.LOCATION_GROUP_DESC,
-              locationTypeDesc: item.LOCATION_TYPE_DESC,
+              locNo: item.locNo,
+              locName: item.locName,
+              locType: item.locType,
+              ifsLocation: item.ifsLocation,
+              ifsLocationGroup: item.ifsLocationGroup,
               commonChecked: false
             }
           })
@@ -169,8 +176,8 @@
       this.detailList.forEach((item) => {
         transportsDetails.push({
           id: item.id,
-          toIfsLocationName: this.currLocationRow.locationDesc,
-          toIfsLocationNo: this.currLocationRow.locationNo
+          toIfsLocationName: this.currLocationRow.locName,
+          toIfsLocationNo: this.currLocationRow.locNo
         })
       })
       updateBatchPalletTransportsDetail(transportsDetails)
diff --git a/src/views/warehouse/pallettransports/ifslocation-form.vue b/src/views/warehouse/pallettransports/ifslocation-form.vue
index 5bc0f5f..b1afc35 100644
--- a/src/views/warehouse/pallettransports/ifslocation-form.vue
+++ b/src/views/warehouse/pallettransports/ifslocation-form.vue
@@ -23,7 +23,7 @@
       </div>
       <div style="display:flex;align-items:center;margin-left:10px;">
         <div>
-          <span>搴撲綅鎻忚堪锛�</span>
+          <span>搴撲綅鍚嶇О锛�</span>
         </div>
         <div>
           <el-input
@@ -56,29 +56,39 @@
         </template>
       </el-table-column>
       <el-table-column type="index" width="50" label="搴忓彿"> </el-table-column>
-      <el-table-column prop="locationNo" label="搴撲綅鍙�" align="center">
+      <el-table-column prop="locNo" label="搴撲綅鍙�" align="center">
       </el-table-column>
       <el-table-column
-        prop="locationDesc"
-        label="搴撲綅鎻忚堪"
+        prop="locName"
+        label="搴撲綅鍚嶇О"
         align="center"
         show-overflow-tooltip
       >
       </el-table-column>
       <el-table-column
-        prop="locationGroupDesc"
-        label="搴撲綅缁勬弿杩�"
+        prop="locType"
+        label="搴撲綅绫诲瀷"
+        align="center"
+        show-overflow-tooltip
+      >
+      <template scope="scope">
+        {{formatLocType(scope.row.locType)}}
+      </template>
+      </el-table-column>
+     <!--  <el-table-column
+        prop="ifsLocation"
+        label="ifs搴撲綅"
         align="center"
         show-overflow-tooltip
       >
       </el-table-column>
       <el-table-column
-        prop="locationTypeDesc"
-        label="搴撲綅绫诲瀷鎻忚堪"
+        prop="ifsLocationGroup"
+        label="ifs搴撲綅缁�"
         align="center"
         show-overflow-tooltip
       >
-      </el-table-column>
+      </el-table-column> -->
     </el-table>
     <div slot="footer" class="dialog-footer">
       <el-button @click="innerVisible = false">鍙� 娑�</el-button>
@@ -94,8 +104,10 @@
 <script>
 import { getIfsLocationByGroupCopyAll } from '@/api/warehouse/location'
 import { updateBatchPalletTransportsMaterial } from '@/api/warehouse/pallettransports'
+import Template from '../../quality/parts/template.vue'
+import { remote } from '../../../api/admin/dict'
 export default {
-  components: {},
+  components: {Template},
   props: {
     currshowlist: {
       type: Boolean,
@@ -108,9 +120,13 @@
       }
     }
   },
+  filters:{
+    
+  },
   data() {
     return {
       innerVisible: false,
+      locTypeOption: [],
       isSubmit: false,
       dataForm: {
         locationNo: '',
@@ -120,7 +136,20 @@
       currLocationRow: null
     }
   },
+  created() {
+    this.getLoc()
+  },
   methods: {
+    formatLocType(val){
+      let list = this.locTypeOption
+      console.log(val,list)
+      list.forEach(ele=>{
+        console.log(Number(ele.value) == Number(val));
+        if(Number(ele.value) == Number(val)){
+          return ele.label
+        }
+      })
+    },
     // 鏌ヨifs搴撲綅鍒楄〃
     queryLocation() {
       this.ifsLocationData = []
@@ -128,19 +157,29 @@
         locationNo: this.dataForm.locationNo,
         locationDesc: this.dataForm.locationDesc
       }).then((response) => {
-        if (response.data.code === 0) {
-          const _data = response.data.data.LIST_INFO
+        if (response.data.code == 0) {
+          const _data = response.data.data
           this.ifsLocationData = _data.map((item, index) => {
             return {
               id: index + 1,
-              locationNo: item.LOCATION_NO,
-              locationDesc: item.LOCATION_DESC,
-              locationGroupDesc: item.LOCATION_GROUP_DESC,
-              locationTypeDesc: item.LOCATION_TYPE_DESC,
+              locNo: item.locNo,
+              locName: item.locName,
+              locType: item.locType,
+              ifsLocation: item.ifsLocation,
+              ifsLocationGroup: item.ifsLocationGroup,
               commonChecked: false
             }
           })
         }
+      })
+    },
+    // 鑾峰彇搴撲綅绫诲瀷鐨勬暟鎹瓧鍏�
+    getLoc() {
+      remote('warehouse_type').then((response) => {
+        if (response.data.code === 0) {
+          this.locTypeOption = response.data.data
+        }
+        console.log(response);
       })
     },
     // 鍗曡閫変腑
@@ -169,8 +208,8 @@
       this.transportsList.forEach((item) => {
         transportsMaterials.push({
           id: item.id,
-          toIfsLocationName: this.currLocationRow.locationDesc,
-          toIfsLocationNo: this.currLocationRow.locationNo
+          toIfsLocationName: this.currLocationRow.locName,
+          toIfsLocationNo: this.currLocationRow.locNo
         })
       })
       updateBatchPalletTransportsMaterial(transportsMaterials)
diff --git a/src/views/warehouse/pallettransports/index.vue b/src/views/warehouse/pallettransports/index.vue
index 88d665f..88571e8 100644
--- a/src/views/warehouse/pallettransports/index.vue
+++ b/src/views/warehouse/pallettransports/index.vue
@@ -47,7 +47,7 @@
             <div>
               <el-button type="text" v-if="permissions.warehouse_pallettransports_demand_add"
                 @click="openPartDialog">鏂板</el-button><el-button type="text"
-                v-if="permissions.warehouse_pallettransports_ifs" @click="openLocationDialog">IFS鑷冲簱浣�</el-button>
+                v-if="permissions.warehouse_pallettransports_ifs" @click="openLocationDialog">绉昏嚦搴撲綅</el-button>
             </div>
           </div>
           <div>
@@ -73,7 +73,7 @@
               </el-table-column>
               <el-table-column prop="unit" label="璁¢噺鍗曚綅" align="center">
               </el-table-column>
-              <el-table-column prop="toIfsLocationNo" label="IFS鑷冲簱浣�" align="center">
+              <el-table-column prop="toIfsLocationNo" label="绉昏嚦搴撲綅" align="center">
               </el-table-column>
               <el-table-column label="鎿嶄綔" align="center" width="100">
                 <template slot-scope="scope">
@@ -127,7 +127,7 @@
               </el-table-column>
               <el-table-column prop="fromIfsLocationNo" label="IFS浠庡簱浣�" align="center">
               </el-table-column>
-              <el-table-column prop="toIfsLocationNo" label="IFS鑷冲簱浣�" align="center">
+              <el-table-column prop="toIfsLocationNo" label="绉昏嚦搴撲綅" align="center">
                 <template slot-scope="scope">
                   <el-link type="primary" @click="openSingleLocationDialog(scope.row)">{{ scope.row.toIfsLocationNo
                   }}</el-link>

--
Gitblit v1.9.3