戴艳蓉 пре 3 година
родитељ
комит
77dc559cd2

+ 0 - 108
src/views/goodStore/goodsCost/add.vue

@@ -1,108 +0,0 @@
-<template>
-  <div class="goodsCostAdd">
-    <div
-      class="goodsCostAdd"
-      v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
-    >
-      <base-form />
-    </div>
-    <div v-else>
-      <no-auth></no-auth>
-    </div>
-  </div>
-</template>
-   <script>
-import asyncRequest from "@/apis/service/goodStore/goodsCost";
-import resToken from "@/mixins/resToken";
-import { mapGetters } from "vuex";
-import baseForm from "./components/baseForm";
-export default {
-  name: "goodsCostAdd",
-  mixins: [resToken],
-  components: {
-    baseForm,
-  },
-  computed: {
-    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-    powers() {
-      let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "goodsCostAdd"
-        ) || {};
-      if (tran && tran.action && tran.action.length > 0) {
-        return tran.action;
-      } else {
-        return [];
-      }
-    },
-  },
-  data() {
-    return {
-      size: "small",
-      activeName: "1",
-      loading: false,
-    };
-  },
-  mounted() {
-    this.initForm();
-  },
-  methods: {
-    async initForm() {
-      this.loading = true;
-
-      this.loading = false;
-    },
-    handleClick(row) {
-      console.log(row);
-    },
-    async initData() {
-      this.loading = true;
-      let res = await asyncRequest.detail({ id: this.id });
-      this.loading = false;
-      if (res.code === 0) {
-        await this.resetForm(res.data);
-      }
-    },
-  },
-};
-</script>
-   <style lang="scss" scoped>
-.goodsCostAdd {
-  position: relative;
-  height: 100%;
-  .goodsCostAdd {
-    overflow-y: scroll;
-    padding: 10px;
-  }
-  .goodsCostAdd-title {
-    border-top: 1px solid #ebeef5;
-    span {
-      height: 50px;
-      line-height: 50px;
-      font-family: "微软雅黑", sans-serif;
-      font-weight: 400;
-      font-style: normal;
-      font-size: 16fpx;
-      text-align: left;
-    }
-  }
-  /deep/ .ddiv {
-    border-top: 1px solid #dcdfe6;
-  }
-  /deep/ .dtitle {
-    width: 40px;
-    text-align: center;
-    height: 100%;
-    min-height: 100%;
-    ul {
-      padding: 20px 0 0 0;
-    }
-  }
-  /deep/ .dmain {
-    padding: 20px 0 0 0;
-    width: calc(100% - 40px);
-    border-left: 1px solid #dcdfe6;
-  }
-}
-</style>
-   

+ 12 - 4
src/views/goodStore/goodsCost/components/baseForm.vue

@@ -8,9 +8,9 @@
     label-width="110px"
     class="demo-ruleForm"
   >
-    <el-row>
+    <el-row class="ddiv">
       <el-col :span="1" class="dtitle">
-        <ul style="padding: 150px 0 0 0">
+        <ul style="padding: 140px 0 0 0">
           <li>基</li>
           <li>础</li>
           <li>信</li>
@@ -631,7 +631,7 @@
     </el-row>
     <el-row class="ddiv">
       <el-col :span="1" class="dtitle">
-        <ul style="padding: 40px 0 0 0">
+        <ul style="padding: 30px 0 0 0">
           <li>固</li>
           <li>定</li>
           <li>成</li>
@@ -877,6 +877,7 @@ import {
 export default {
   name: "goodsCostAdd",
   mixins: [resToken],
+    props: ["showModel", "id", "sitem"],
   components: {
     baseFormAddEdit,
     costFormAddEdit,
@@ -895,6 +896,13 @@ export default {
       }
     },
   },
+  watch: {
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
   data() {
     return {
       costshowModel: false,
@@ -1057,7 +1065,7 @@ export default {
           if (res && res.code === 0) {
             // const title = this.id === "add" ? "!" : "修改成功!";
             this.$notify.success({
-              title:"添加成功",
+              title: "添加成功",
               message: "",
             });
             this.showModelThis = false;

+ 39 - 17
src/views/goodStore/goodsCost/detail.vue

@@ -1,10 +1,33 @@
 <template>
   <div class="goodsCostDetail">
     <div
-      class="goodsCostDetail"
+      class="goodsCostDetail-main"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
     >
-      <base-form :type="queryType" :id="queryId" />
+      <el-tabs v-model="activeTabs">
+        <el-tab-pane label="新建商品" name="0" v-if="queryType === 'add'">
+          <base-form :type="queryType" :id="queryId" :newTime="newTime" />
+        </el-tab-pane>
+        <el-tab-pane label="商品详情" name="1" v-if="queryType !== 'add'">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item title="退货单详情" name="0">
+              <base-form :type="queryType" :id="queryId" :newTime="newTime" />
+            </el-collapse-item>
+            <el-collapse-item title="发起流程" name="1"> 555 </el-collapse-item>
+            <el-collapse-item title="业务审核" name="2"> 444 </el-collapse-item>
+            <el-collapse-item title="通知库管" name="1"> 444 </el-collapse-item>
+            <el-collapse-item title="通知采购部门" name="1">
+              333
+            </el-collapse-item>
+            <el-collapse-item title="通知财务部门" name="1">
+              111
+            </el-collapse-item>
+          </el-collapse>
+        </el-tab-pane>
+        <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
+          111
+        </el-tab-pane>
+      </el-tabs>
     </div>
     <div v-else>
       <no-auth></no-auth>
@@ -36,17 +59,12 @@ export default {
       }
     },
   },
-  watch: {
-    newTime: function (val) {
-      if (val) {
-        this.initForm();
-      }
-    },
-  },
+
   data() {
     return {
       size: "small",
-      activeName: "1",
+      activeTabs: "1",
+      activeNames: ["0"],
       newTime: "",
       loading: false,
       queryType: "",
@@ -57,6 +75,7 @@ export default {
     const { id, type } = this.$route.query;
     this.queryId = id;
     this.queryType = type;
+    this.activeTabs = type === "add" ? "0" : "1";
     this.initForm();
   },
   methods: {
@@ -86,12 +105,15 @@ export default {
 .goodsCostDetail {
   position: relative;
   height: 100%;
-  overflow-y: scroll;
-  padding: 10px;
-  // .goodsCostDetail {
-  //   overflow-y: scroll;
-  //   padding: 10px;
-  // }
+  width: 100%;
+  box-sizing: border-box;
+  .goodsCostDetail-main {
+    overflow-y: scroll;
+    position: relative;
+    padding: 10px;
+    height: 100%;
+    width: 100%;
+  }
   .goodsCostDetail-title {
     border-top: 1px solid #ebeef5;
     span {
@@ -113,7 +135,7 @@ export default {
     height: 100%;
     min-height: 100%;
     ul {
-      padding: 20px 0 0 0;
+      padding: 12px 0 0 0;
     }
   }
   /deep/ .dmain {