ysy 1 tahun lalu
induk
melakukan
a08ab4cd31
3 mengubah file dengan 115 tambahan dan 21 penghapusan
  1. 13 0
      src/api/pick/pickApply.js
  2. 101 20
      src/views/pick/pickApply/index.vue
  3. 1 1
      vue.config.js

+ 13 - 0
src/api/pick/pickApply.js

@@ -0,0 +1,13 @@
+import request from '@/utils/request';
+
+
+/**
+ * 列表
+ */
+export async function getPage(params) {
+  const res = await request.get('/mes/pickorder/page',  { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 101 - 20
src/views/pick/pickApply/index.vue

@@ -1,39 +1,120 @@
 <template>
- <div>
-  
- </div>
+  <div class="ele-body">
+    <el-card shadow="never" v-loading="loading">
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        max-height="68vh"
+        :datasource="datasource"
+        cache-key="pickingDetails"
+        highlight-current-row
+        @refresh="refresh"
+      >
+
+
+        <template v-slot:status="{ row }">
+          <el-tag
+            :type="row.status == '0' ? 'danger' : 'success'"
+            effect="dark"
+            >{{
+              row.status == '0'
+                ? '未领料'
+                : row.status == '1'
+                ? '已领料'
+                : row.status == '2'
+                ? '已出库'
+                : ''
+            }}</el-tag
+          >
+        </template>
+      </ele-pro-table>
+    </el-card>
+  </div>
 </template>
 
 <script>
-
-
-
-
+  import { getPage } from '@/api/pick/pickApply';
 
   export default {
-    components: {
-
-
-
-    },
+    name: 'pickApply',
+    components: {},
     data() {
       return {
-
-
+        dataList: [],
+        loading: false
       };
     },
 
     computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createTime',
+            label: '领料时间',
+            align: 'center'
+          },
+          {
+            prop: 'code',
+            label: '领料单编号',
+            align: 'center'
+          },
+
+          {
+            prop: 'name',
+            label: '领料单名称',
+            align: 'center'
+          },
+
+          {
+            prop: 'executorName',
+            label: '领料人',
+            align: 'center'
+          },
+
+          {
+            prop: 'status',
+            slot: 'status',
+            label: '状态',
+            align: 'center'
+          },
+
+          {
+            prop: '',
+            label: '操作',
+            width: 80,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action'
+          }
+        ];
+      }
     },
 
-    created() {
-
-    },
     methods: {
-    },
+  
+     /* 表格数据源 */
+     datasource({ page, limit, where }) {
+        return getPage({
+          ...where,
+          pageNum: page,
+          size: limit,
+        });
+      },
 
-    mounted() {},
 
-    destroyed() {}
+    },
+    created() {}
   };
 </script>
+
+<style lang="scss" scoped></style>

+ 1 - 1
vue.config.js

@@ -32,8 +32,8 @@ module.exports = {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
         // target: 'http://124.71.68.31:50001',
+        target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.125:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {