Browse Source

新增调拨单拉单功能

001295 1 năm trước cách đây
mục cha
commit
41145e1d99

+ 8 - 0
src/api/sso/ssoLogin.js

@@ -10,6 +10,14 @@ export function sso(data) {
 }
 
 //根据员工工号获取token
+export function loginByStaffCode(code) {
+  return request({
+    'url': '/login/byStaffCode/' + code,
+    'method': 'get',
+  })
+}
+
+//根据员工工号获取token
 export function ehrLogin(code) {
   return request({
     'url': '/login/byStaffCode/' + code,

+ 5 - 0
src/router/index.js

@@ -92,6 +92,11 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/business/purchase/form/transferOrder/bipPull-entrance',
+    component: () => import('@/views/purchase/transferOrder/bipPull/bipPull-entrance'),
+    hidden: true
+  },
+  {
     path: '/404',
     component: () => import('@/views/error/404'),
     hidden: true

+ 33 - 0
src/views/purchase/transferOrder/bipPull/bipPull-entrance.vue

@@ -0,0 +1,33 @@
+<template>
+	<div v-loading="loading">
+		正在前往DRP调拨订单拉单页面...
+	</div>
+</template>
+<script>
+	import { ehrLogin } from '@/api/sso/ssoLogin';
+	import {setToken} from '@/utils/auth'
+	export default {
+		data() {
+			return {
+				//遮罩
+      			loading: false
+			}
+		},
+		methods: {
+		},
+		async created() {
+			let query = this.$route.query;
+			query.code = '001295';
+			ehrLogin(query.code).then(res => {
+				if (res.code === 200) {
+					let token = res.token;
+					setToken(token);
+					this.$store.commit('SET_TOKEN', token)
+					this.$store.dispatch("GetInfo").then(
+					this.$router.push({ path: "/business/purchase/form/transferOrder/bipPull"})
+					)
+				}
+			})
+		}
+	}
+</script>

+ 205 - 0
src/views/purchase/transferOrder/bipPull/index.vue

@@ -0,0 +1,205 @@
+<template>
+  <div id="transferOrder">
+    <div v-if="isList">
+      <el-card style="position: relative" v-loading="loading">
+        <el-super-search
+          v-model="params"
+          :size="size"
+          :dict="dict"
+          :columns="SearchColumns"
+          @reset="resetList"
+          @submit="getList(params, Pages)"
+        ></el-super-search>
+
+        <el-row class="my-4" style="text-align: right">
+          <el-button-group style="margin-right: 5px">
+            <el-button type="primary" :size="size" @click="verify"
+              >确认</el-button
+            >
+          </el-button-group>
+        </el-row>
+
+        <el-super-ux-table
+          v-model="tableList"
+          :size="size"
+          :dict="dict"
+          :page="Pages"
+          :columns="TableColumns"
+          index
+          pagination
+          height="400"
+          showSummary
+          convenitentOperation
+          storage-key="TransferOrderSuperTable"
+          @row-click="select"
+          @pagination="getList(params, Pages)"
+        >
+        </el-super-ux-table>
+
+        <el-tabs v-model="tabName" style="margin-top: 10px">
+          <el-tab-pane
+            v-for="({ item, TableColumns: columns }, index) in TabColumns"
+            :key="index"
+            :label="item.title"
+            :name="item.key"
+            lazy
+          >
+            <el-super-ux-table
+              v-loading="itemLoading"
+              index
+              v-model="tabParams[item.key]"
+              :ref="tabName"
+              :height="tabHeight"
+              :columns="columns"
+              :size="size"
+            ></el-super-ux-table>
+          </el-tab-pane>
+        </el-tabs>
+      </el-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import useColumns from "../columns";
+import { dicts } from "../dicts";
+import { getOrderList,listStAllotItem,} from "@/api/purchase/transferOrder.js";
+export default {
+  name: "transferOrder",
+  dicts: [...dicts, "oa_templete_id"],
+  components: {
+    ElSuperUxTable: () => import("@/components/super-ux-table/index.vue"),
+    BatchImport: () => import("@/components/BatchImport/index.vue"),
+    ElSuperSearch: () => import("@/components/super-search/index.vue"),
+  },
+  data() {
+    const { TableColumns, TabColumns, SearchColumns } = useColumns();
+    const Pages = this.$init.page();
+    const params = this.$init.params(SearchColumns);
+    return {
+      params: {
+        ...params,
+        code: this.$route.query.billCode,
+      },
+      TableColumns: TableColumns,
+      TabColumns: TabColumns,
+      SearchColumns: SearchColumns,
+      tabName: "materialInfo",
+      size: "mini",
+      Pages: Pages,
+      loading: false,
+      itemLoading: false,
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: "",
+      referCondition: {
+        type: "",
+        isPage: true,
+        title: "",
+      },
+      options: [
+        {
+          value: "1",
+          label: "是",
+        },
+        {
+          value: "0",
+          label: "否",
+        },
+      ],
+      tableList: [],
+      // total: 0,
+      tabParams: {
+        materialInfo: [],
+        receiveInfo: [],
+        priceList: [],
+        resultList: [],
+      },
+      rowDetail: {},
+      disable: false,
+      ids: [],
+      //选择的行
+      selectedRow:null
+    };
+  },
+  computed: {
+    tabHeight: {
+      get() {
+        let { materialInfo } = this.tabParams;
+        return `${
+          materialInfo.length
+            ? materialInfo.length > 8
+              ? 500
+              : materialInfo * 36 + 120
+            : 120
+        }px`;
+      },
+      set() {},
+    },
+  },
+  created() {
+    this.getList(this.params, this.Pages);
+  },
+  methods: {
+    resetList() {
+      this.Pages = this.$init.page();
+      const { SearchColumns } = useColumns();
+      this.params = {
+        ...this.$init.params(SearchColumns),
+        code: this.$route.query.billCode,
+      };
+      this.getList(this.params, this.Pages);
+    },
+    getList(params, Pages) {
+      this.loading = true;
+      getOrderList({
+        ...this.addDateRange(params, params.billDates),
+        ...Pages,
+      })
+        .then((res) => {
+          if (res.code === 200) {
+            this.tableList = res.rows;
+            this.Pages.total = res.total;
+          }
+          this.loading = false;
+        })
+        .then(() => {
+          // 合计不显示重绘
+          this.$refs.multipleTable.doLayout();
+        })
+        .catch((err) => {});
+    },
+    getlistStAllotItem(pid) {
+      this.itemLoading = true;
+      listStAllotItem(pid).then((response) => {
+        this.tabParams.materialInfo = response.rows;
+        this.itemLoading = false;
+      });
+    },
+    //确认
+    verify() {
+      console.log('this.selectedRow',this.selectedRow);
+    },
+    doubleClick(row) {
+      this.isList = false;
+      this.page = "check";
+      this.rowDetail = row;
+      this.disable = true;
+    },
+    // 选中某行
+    select(row) {
+      this.getlistStAllotItem(row.id);
+      this.selectedRow = row;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+#transferOrder {
+  padding: 12px;
+  box-sizing: border-box;
+  overflow-y: scroll;
+}
+</style>