Sfoglia il codice sorgente

修改:经销商提货预约汇总列表 搜索仓库

zh 2 anni fa
parent
commit
0d70e13ee2
1 ha cambiato i file con 52 aggiunte e 12 eliminazioni
  1. 52 12
      src/views/supply/pickup/sum_list.vue

+ 52 - 12
src/views/supply/pickup/sum_list.vue

@@ -26,8 +26,21 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
-                <el-form-item label="仓库" prop="warehouse">
-                  <el-input v-model="screenForm.warehouse" placeholder="请输入仓库" />
+                  <el-form-item label="仓库" prop="correspondId">
+                    <el-select
+                      v-model="screenForm.correspondId"
+                      placeholder="请选择发货仓库"
+                      size="mini"
+                      style="margin-right: 10px"
+                    >
+                      <el-option
+                        v-for="(item, index) in warehouseList"
+                        :key="index"
+                        :label="item.name"
+                        :value="item.id"
+                      />
+                    </el-select>
+                  </el-form-item>
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :sm="12" :lg="6">
@@ -157,11 +170,27 @@
             </template>
           </el-table-column>
           <el-table-column align="left" label="销售订单号" prop="mainOrderId" min-width="140" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <CopyButton :copy-text="scope.row.mainOrderId" />
-              <span>{{ scope.row.mainOrderId }}</span>
-            </template>
-          </el-table-column>
+              <template slot-scope="scope">
+                <CopyButton
+                  :copy-text="
+                    scope.row.orderType === 'TRADE' ||
+                    scope.row.orderType === 'HOME' ||
+                    scope.row.orderType === 'REQUISITION_TRADE' ||
+                    scope.row.orderType === 'REQUISITION_HOME'
+                      ? scope.row.enginOrderNo
+                      : scope.row.mainOrderId
+                  "
+                />
+                <span>{{
+                  scope.row.orderType === 'TRADE' ||
+                  scope.row.orderType === 'HOME' ||
+                  scope.row.orderType === 'REQUISITION_TRADE' ||
+                  scope.row.orderType === 'REQUISITION_HOME'
+                    ? scope.row.enginOrderNo
+                    : scope.row.mainOrderId
+                }}</span>
+              </template>
+            </el-table-column>
           <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
             <template slot-scope="scope">
               <CopyButton :copy-text="scope.row.materialCode" />
@@ -252,6 +281,7 @@
 <script>
 import { getPickupList, getPickupManList } from '@/api/supply/pickup'
 import { getLogisticsList } from '@/api/basic_data/logistics'
+import { getWarehouseList } from '@/api/supply/engin'
 
 export default {
   data() {
@@ -266,7 +296,7 @@ export default {
         orderNum: '',
         jxsName: '',
         jxsNum: '',
-        warehouse: '',
+        correspondId: '',
         date: '',
         status: '',
         takerPhone: '',
@@ -277,7 +307,8 @@ export default {
       },
       pickupManList: '',
       isCollapse: true,
-      logisticsList: []
+      logisticsList: [],
+      warehouseList:[]
     }
   },
 
@@ -287,7 +318,7 @@ export default {
         invoiceId: this.screenForm.orderNum,
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,
-        stockName: this.screenForm.warehouse,
+        correspondId: this.screenForm.correspondId,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         status: this.screenForm.status,
@@ -303,6 +334,7 @@ export default {
 
   created() {
     this.getList()
+    this.getWarehouseList()
     this.getLogisticsList()
     this.getPickupManList()
   },
@@ -319,7 +351,7 @@ export default {
         customerNumber: this.screenForm.jxsNum,
         logisticsId: this.screenForm.logisticsId,
 
-        stockName: this.screenForm.warehouse,
+        correspondId: this.screenForm.correspondId,
         startTime: this.screenForm.date ? this.screenForm.date[0] : '',
         endTime: this.screenForm.date ? this.screenForm.date[1] : '',
         status: this.screenForm.status,
@@ -335,7 +367,15 @@ export default {
         this.listLoading = false
       })
     },
-
+// 获取仓库列表
+getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1
+      }).then(res => {
+        this.warehouseList = res.data.records
+      })
+    },
     getPickupManList() {
       getPickupManList({ pageNum: 1, pageSize: -1 }).then(res => {
         this.pickupManList = res.data.records