zhangjinxing il y a 3 ans
Parent
commit
bfdbed8492

+ 16 - 16
src/App.vue

@@ -16,17 +16,17 @@ export default {
     };
   },
   async created() {
-      const res = await asyncRequest.list(this.parmValue);
-      console.log(res);
-      // if (res && res.code === 0 && res.data) {
-      //   this.tableData = res.data.list;
-      //   this.pageInfo.total = Number(res.data.count);
-      // } else if (res && res.code >= 100 && res.code <= 104) {
-      //   await this.logout();
-      // } else {
-      //   this.tableData = [];
-      //   this.pageInfo.total = 0;
-      // }
+    const res = await asyncRequest.list(this.parmValue);
+    console.log(res);
+    // if (res && res.code === 0 && res.data) {
+    //   this.tableData = res.data.list;
+    //   this.pageInfo.total = Number(res.data.count);
+    // } else if (res && res.code >= 100 && res.code <= 104) {
+    //   await this.logout();
+    // } else {
+    //   this.tableData = [];
+    //   this.pageInfo.total = 0;
+    // }
 
     // axios
     //   .post("/process/statistics", {})
@@ -35,11 +35,11 @@ export default {
     //   })
     //   .catch((err) => {});
 
-    // if (JudgeEnvironment() === "isDingDing") {
-    //   await this.testing();
-    // } else {
-    //   await this.getMenu();
-    // }
+    if (JudgeEnvironment() === "isDingDing") {
+      await this.testing();
+    } else {
+      await this.getMenu();
+    }
   },
   methods: {
     async testing() {

+ 31 - 28
src/views/process/done/index.vue

@@ -5,7 +5,7 @@
 <template>
   <div class="done pagePadding">
     <ex-table
-      v-loading="loading"
+      v-loading="false"
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
       :table="table"
       :data="tableData"
@@ -73,7 +73,6 @@
       <template #operation="{ scope }">
         <el-tooltip
           v-if="powers.some((item) => item == '007')"
-           
           effect="dark"
           content="详情"
           placement="top"
@@ -85,7 +84,6 @@
         </el-tooltip>
         <el-tooltip
           v-if="powers.some((item) => item == '005')"
-           
           effect="dark"
           content="修改"
           placement="top"
@@ -99,7 +97,6 @@
           v-if="
             powers.some((item) => item == '004') && scope.row.status === '1'
           "
-           
           effect="dark"
           content="禁用"
           placement="top"
@@ -113,7 +110,6 @@
           v-if="
             powers.some((item) => item == '004') && scope.row.status === '0'
           "
-           
           effect="dark"
           content="启用"
           placement="top"
@@ -155,9 +151,8 @@ export default {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "done"
-        ) || {};
+        this.$store.getters.btnList.find((item) => item.menu_route == "done") ||
+        {};
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;
       } else {
@@ -189,7 +184,7 @@ export default {
       table: {
         stripe: true,
         border: true,
-        _defaultHeader_: ["setcol"]
+        _defaultHeader_: ["setcol"],
       },
       // 表格 - 分页
       pageInfo: {
@@ -200,35 +195,43 @@ export default {
       // 表格 - 列参数
       columns: [
         {
-          prop: "done_name",
-          label: "组名",
+          prop: "oing_sn",
+          label: "待办编号",
         },
         {
-          prop: "userdoneList",
-          label: "组员",
+          prop: "operation",
+          label: "流程名称",
         },
+
         {
-          prop: "done_remark",
-          label: "备注",
+          prop: "bills",
+          label: "单据号",
         },
-
         {
-          prop: "status",
-          label: "状态",
-          _slot_: "status",
+          prop: "current_node",
+          label: "当前节点",
         },
         {
-          prop: "addtime",
-          label: "创建时间",
-          sortable: true,
+          prop: "stay_time",
+          label: "停留时间",
+          // sortable: true,
+          // _slot_: "status",
+        },
+        {
+          prop: "launcher",
+          label: "发起人",
+          // sortable: true,
+        },
+        {
+          prop: "launcher_part",
+          label: "发起人部门",
+          // fixed: "right",
+          // _noset_: true,
+          // _slot_: "operation",
         },
-
         {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
+          prop: "aply_time",
+          label: "申请时间",
         },
       ],
     };

+ 30 - 24
src/views/process/oing/index.vue

@@ -133,7 +133,8 @@
 <script>
 import ExTable from "@/components/ExTableNew.vue";
 import addEdit from "./addEdit";
-import asyncRequest from "@/apis/service/process/oing";
+// import asyncRequest from "@/apis/service/process/oing";
+import asyncRequest from "@/mock/service/process/oing";
 import statusList from "@/assets/js/statusList";
 import roleLevel from "@/assets/js/roleLevel";
 import mixinPage from "@/mixins/elPaginationHandle";
@@ -151,9 +152,8 @@ export default {
     ...mapGetters(["tablebtnSize", "searchSize", "size"]),
     powers() {
       let tran =
-        this.$store.getters.btnList.find(
-          (item) => item.menu_route == "oing"
-        ) || {};
+        this.$store.getters.btnList.find((item) => item.menu_route == "oing") ||
+        {};
       if (tran && tran.action && tran.action.length > 0) {
         return tran.action;
       } else {
@@ -200,39 +200,43 @@ export default {
       // 表格 - 列参数
       columns: [
         {
-          prop: "actionlist",
-          label: "菜单数据",
+          prop: "oing_sn",
+          label: "待办编号",
         },
         {
-          prop: "share_user",
-          label: "数据源用户",
+          prop: "operation",
+          label: "流程名称",
         },
 
         {
-          prop: "to_user",
-          label: "数据共享用户",
+          prop: "bills",
+          label: "单据号",
         },
         {
-          prop: "to_group",
-          label: "数据共享用户组",
+          prop: "current_node",
+          label: "当前节点",
         },
         {
-          prop: "status",
-          label: "状态",
-          sortable: true,
-          _slot_: "status",
+          prop: "stay_time",
+          label: "停留时间",
+          // sortable: true,
+          // _slot_: "status",
         },
         {
-          prop: "addtime",
-          label: "创建时间",
-          sortable: true,
+          prop: "launcher",
+          label: "发起人",
+          // sortable: true,
         },
         {
-          prop: "",
-          label: "操作",
-          fixed: "right",
-          _noset_: true,
-          _slot_: "operation",
+          prop: "launcher_part",
+          label: "发起人部门",
+          // fixed: "right",
+          // _noset_: true,
+          // _slot_: "operation",
+        },
+        {
+          prop: "aply_time",
+          label: "申请时间",
         },
       ],
     };
@@ -300,7 +304,9 @@ export default {
     // 刷新表格
     async searchList() {
       this.loading = true;
+      // const res = await asyncRequest.list(this.parmValue);
       const res = await asyncRequest.list(this.parmValue);
+      console.log(res);
       if (res && res.code === 0 && res.data) {
         this.tableData = res.data.list;
         this.pageInfo.total = Number(res.data.count);

+ 400 - 394
src/views/stock/allot/index.vue

@@ -1,420 +1,426 @@
 <template>
-    <div class="allot pagePadding">
+  <div class="allot pagePadding">
     <div
-    v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-  >
-    <ex-table
-      v-loading="loading"
-      :table="table"
-      :data="tableData"
-      :columns="columns"
-      :page="pageInfo"
-      :size="size"
-      @page-curr-change="handlePageChange"
-      @page-size-change="handleSizeChange"
-      @screen-reset="
-        pageInfo.curr = 1;
-        parmValue.page = 1;
-        searchList();
-      "
-      @screen-submit="
-        pageInfo.curr = 1;
-        parmValue.page = 1;
-        searchList();
-      "
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <template #table-header="{}">
-        <div style="width: 100%">
-          <el-row style="padding: 0 0 0 80px">
-            <el-col :span="24">
-              <el-col :span="4" style="width: 120px">
-                <el-select
-                  :size="searchSize"
-                  v-model="parmValue.status"
-                  filterable
-                  clearable
-                  placeholder="账号状态"
-                  style="width: 100%"
-                  @change="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                  <el-option
-                    v-for="item in statusList"
-                    :key="'status' + item.code"
-                    :label="item.name"
-                    :value="item.code"
+      <ex-table
+        v-loading="false"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%; min-width: 1600px">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <el-col :span="6" style="width: 352px">
+                  <PeriodDatePicker
+                    :start="parmValue.total_low"
+                    :end="parmValue.total_up"
+                    :type="1"
+                    :width="'135px'"
+                    :title="'预警量'"
+                    :size="searchSize"
+                    @numReturned="numReturned($event, 0)"
                   />
-                </el-select>
-              </el-col>
-              <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
-                <el-input
-                  :size="searchSize"
-                  v-model="parmValue.name"
-                  :maxlength="40"
-                  placeholder="业务员姓名"
-                />
-              </el-col>
-              <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
-                <el-input
-                  :size="searchSize"
-                  v-model="parmValue.username"
-                  :maxlength="40"
-                  placeholder="手机号"
-                />
-              </el-col>
-              <el-col :span="4" style="width: 54px">
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  class="fr"
-                  icon="el-icon-search"
-                  @click="searchList"
-              /></el-col>
-              <el-col
-                :span="4"
-                style="width: 66px"
-                v-if="powers.some((item) => item == '024')"
-              >
-                <el-button
-                  type="warning"
-                  class="fr"
-                  :size="searchSize"
-                  @click="restSearch"
-                >
-                  重置
-                </el-button>
-              </el-col>
-              <el-col
-                :span="3"
-                style="width: 66px; float: right"
-                v-if="powers.some((item) => item == '002')"
-              >
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  style="float: right; margin-left: 5px"
-                  @click="searchList"
+                </el-col>
+
+                <el-col :span="4" style="width: 150px; padding: 0 0 0 50px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.allot_sn"
+                    :maxlength="40"
+                    placeholder="调拨编号"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 160px; padding: 0 0 0 50px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.stayStock_name"
+                    :maxlength="40"
+                    placeholder="入库仓库名称"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 160px; padding: 0 0 0 50px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.stayOutStock_name"
+                    :maxlength="40"
+                    placeholder="出库仓库名称"
+                  />
+                </el-col>
+                <!-- <el-col :span="4" style="width: 54px">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    @click="searchList"
+                /></el-col> -->
+                <el-col :span="4" style="width: 76px; margin: 0 30px">
+                  <el-button
+                    style="width: 100%"
+                    type="primary"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    新建
+                  </el-button>
+                </el-col>
+
+                <el-col :span="4" style="width: 76px; margin-right: 30px">
+                  <el-button
+                    style="width: 100%"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    搜索
+                  </el-button>
+                </el-col>
+
+                <el-col
+                  :span="4"
+                  style="width: 76px"
+                  v-if="powers.some((item) => item == '024')"
                 >
-                  刷新
-                </el-button>
+                  <el-button
+                    style="width: 100%"
+                    type="warning"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    重置
+                  </el-button>
+                </el-col>
               </el-col>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #status="{ scope }">
-        <el-tag
-          :size="tablebtnSize"
-          :type="scope.row.status == '0' ? 'warning' : ''"
-          v-text="
-            (statusOptions.find((item) => item.id == scope.row.status) || {})
-              .label || '--'
-          "
-        ></el-tag>
-      </template>
-      <template #operation="{ scope }">
-        <el-tooltip
-          v-if="powers.some((item) => item == '020')"
-           
-          effect="dark"
-          content="重置密码"
-          placement="top"
-        >
-          <i
-            class="el-icon-refresh-left tb-icon"
-            @click="openPasswordModal(scope.row.id, false)"
-          ></i>
-        </el-tooltip>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '020')"
+            effect="dark"
+            content="重置密码"
+            placement="top"
+          >
+            <i
+              class="el-icon-refresh-left tb-icon"
+              @click="openPasswordModal(scope.row.id, false)"
+            ></i>
+          </el-tooltip>
 
-        <el-tooltip
-          v-if="powers.some((item) => item == '007')"
-           
-          effect="dark"
-          content="详情"
-          placement="top"
-        >
-          <i
-            class="el-icon-view tb-icon"
-            @click="openModal(scope.row.id, true, scope.row)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '005')"
-           
-          effect="dark"
-          content="修改"
-          placement="top"
-        >
-          <i
-            class="el-icon-edit tb-icon"
-            @click="openModal(scope.row.id, false, scope.row)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="
-            powers.some((item) => item == '004') && scope.row.status === '1'
-          "
-           
-          effect="dark"
-          content="禁用"
-          placement="top"
-        >
-          <i
-            class="el-icon-video-pause tb-icon"
-            @click="statusConfirm(scope.row.id, scope.row.status)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="
-            powers.some((item) => item == '004') && scope.row.status === '0'
-          "
-           
-          effect="dark"
-          content="启用"
-          placement="top"
-        >
-          <i
-            class="el-icon-video-play tb-icon"
-            @click="statusConfirm(scope.row.id, scope.row.status)"
-          ></i>
-        </el-tooltip>
-      </template>
-    </ex-table>
-    <add-edit
-      :id="modelId"
-      :sitem="sitem"
-      :show-model="showModel"
-      :is-detail="isDetail"
-      @refresh="searchList"
-      @cancel="showModel = false"
-    />
-  </div>
-  <div v-else>
-    <no-auth></no-auth>
-  </div>
-       
-   
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openModal(scope.row.id, true, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '005')"
+            effect="dark"
+            content="修改"
+            placement="top"
+          >
+            <i
+              class="el-icon-edit tb-icon"
+              @click="openModal(scope.row.id, false, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '1'
+            "
+            effect="dark"
+            content="禁用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-pause tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '0'
+            "
+            effect="dark"
+            content="启用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-play tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
       <add-edit
-        :showModel="showModel"
         :id="modelId"
-        :isDetail="isDetail"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
         @refresh="searchList"
         @cancel="showModel = false"
-      ></add-edit>
+      />
     </div>
-   </template>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+
+    <add-edit
+      :showModel="showModel"
+      :id="modelId"
+      :isDetail="isDetail"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    ></add-edit>
+  </div>
+</template>
    <script>
-    import mixinPage from "@/mixins/elPaginationHandle";
-    import resToken from "@/mixins/resToken";
-    import ExTable from "@/components/ExTableNew.vue";
-    import statusList from "@/assets/js/statusList";
-    import asyncRequest from "@/apis/service/stock/allot";
-    import addEdit from "./addEdit";
-    import { mapGetters } from "vuex";
-   
-   export default {
-    name: 'allot',
-    mixins: [mixinPage, resToken],
-    components: {
-      addEdit,
-      ExTable,
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import ExTable from "@/components/ExTableNew.vue";
+import statusList from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/stock/allot";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+import PeriodDatePicker from "@/components/PeriodDatePicker";
+
+export default {
+  name: "allot",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+    ExTable,
+    PeriodDatePicker,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "allot"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
     },
-    computed: {
-      ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-      powers() {
-        let tran =
-          this.$store.getters.btnList.find(
-            (item) => item.menu_route == "allot"
-          ) || {};
-        if (tran && tran.action && tran.action.length > 0) {
-          return tran.action;
-        } else {
-          return [];
-        }
+  },
+  data() {
+    return {
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      statusList: statusList,
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        total_low: "", //开始日期
+        total_up: "", //结束日期
+        allot_sn: "", //调拨编号
+        stayStock_name: "", //入仓库名称
+        stayOutStock_name: "", //出仓库名称
       },
-    },
-    data() {
-      return {
-        sitem: null,
-        // 状态
-        statusOptions: [
-          { id: "0", label: "禁用" },
-          { id: "1", label: "启用" },
-        ],
-        statusList: statusList,
-        loading: true,
-        showModel: false,
-        isDetail: false,
-        modelId: 0,
-        parmValue: {
-          name: "", // 业务员名字
-          username: "", // 账号
-          status: "", //
-          page: 1, // 页码
-          size: 15, // 每页显示条数
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "allot_sn",
+          label: "调拨编号",
         },
-        tableData: [],
-        passwordModel: false,
-        passwordModelId: 0,
-        isPasswordDetail: false,
-        // 表格 - 数据
-        tableData: [],
-        // 表格 - 参数
-        table: {
-          stripe: true,
-          border: true,
-          _defaultHeader_: ["setcol"],
+        {
+          prop: "applicant",
+          label: "申请人",
         },
-        // 表格 - 分页
-        pageInfo: {
-          size: 15,
-          curr: 1,
-          total: 0,
+        {
+          prop: "stayStock_name",
+          label: "入库仓库名称",
         },
-        // 表格 - 列参数
-        columns: [
-          {
-            prop: "nickname",
-            label: "真实姓名",
-          },
-          {
-            prop: "role_name",
-            label: "角色名称",
-          },
-          {
-            prop: "mobile",
-            label: "联系电话",
-          },
-          {
-            prop: "email",
-            label: "邮箱",
-          },
-          {
-            prop: "status",
-            label: "状态",
-            _slot_: "status",
-            width: "80px",
-          },
-          {
-            prop: "addtime",
-            label: "创建时间",
-            sortable: true,
-          },
-          {
-            prop: "",
-            label: "操作",
-            fixed: "right",
-            _noset_: true,
-            _slot_: "operation",
-          },
-        ],
+        {
+          prop: "stayOutStock_name",
+          label: "出库仓库名称",
+        },
+        {
+          prop: "express_cost",
+          label: "物流总费用",
+        },
+        {
+          prop: "status",
+          label: "当前状态",
+          // sortable: true,
+        },
+        {
+          prop: "apply_time",
+          label: "申请时间",
+        },
+        {
+          prop: "",
+          label: "操作",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        name: "", // 业务员名字
+        username: "", // 账号
+        status: "", //
+        page: 1, // 页码
+        size: 10, // 每页显示条数
       };
-    },
-    mounted() {
       this.searchList();
     },
-  
-    methods: {
-      restSearch() {
-        this.parmValue = {
-          name: "", // 业务员名字
-          username: "", // 账号
-          status: "", //
-          page: 1, // 页码
-          size: 10, // 每页显示条数
-        };
-        this.searchList();
-      },
-      
-      openModal(id, isDetail, sitem) {
-        this.showModel = true;
-        this.modelId = id;
-        this.isDetail = isDetail;
-        this.sitem = sitem;
-      },
-      async deleteById(id, status) {
-        await this.$confirm("确定要删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+
+    openModal(id, isDetail, sitem) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+      this.sitem = sitem;
+    },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
         })
-          .then(async () => {
-            const model = {
-              id: id,
-              status: status === "1" ? "0" : "1",
-            };
-            const res = await asyncRequest.status(model);
-            if (res && res.code === 0) {
-              this.$notify.success({
-                title: "删除成功",
-                message: "",
-              });
-              this.searchList();
-            } else if (res && res.code >= 100 && res.code <= 104) {
-              await this.logout();
-            } else {
-              this.$message.warning(res.message);
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      },
-      async searchList() {
-        this.loading = true;
-        const res = await asyncRequest.list(this.parmValue);
-        if (res && res.code === 0 && res.data) {
-          this.tableData = res.data.list;
-          this.pageInfo.total = Number(res.data.count);
-        } else if (res && res.code >= 100 && res.code <= 104) {
-          await this.logout();
-        } else {
-          this.tableData = [];
-          this.pageInfo.total = 0;
-        }
-        this.loading = false;
-      },
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
 
-      async statusConfirm(id, status) {
-        let str= status === "1" ? "禁用" : "启用"
-        await this.$confirm('确定要改为'+str+'?',{
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+    async statusConfirm(id, status) {
+      let str = status === "1" ? "禁用" : "启用";
+      await this.$confirm("确定要改为" + str + "?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "状态修改成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
         })
-          .then(async () => {
-            this.loading = true;
-            const model = {
-              id: id,
-              status: status === "1" ? "0" : "1",
-            };
-            const res = await asyncRequest.status(model);
-            if (res && res.code === 0) {
-              this.loading = false;
-              this.$notify.success({
-                title: "状态修改成功!",
-                message: "",
-              });
-              await this.searchList();
-            } else if (res && res.code >= 100 && res.code <= 104) {
-              await this.logout();
-            } else {
-              this.$message.warning(res.message);
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      },
-    }
-   }
-   </script>
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+  },
+};
+</script>
    <style lang="scss" scoped>
-   .allot {
-    
-   }
-   </style>
+.allot {
+}
+</style>
    

+ 386 - 393
src/views/stock/check/index.vue

@@ -1,420 +1,413 @@
 <template>
-    <div class="check pagePadding">
+  <div class="check pagePadding">
     <div
-    v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
-  >
-    <ex-table
-      v-loading="loading"
-      :table="table"
-      :data="tableData"
-      :columns="columns"
-      :page="pageInfo"
-      :size="size"
-      @page-curr-change="handlePageChange"
-      @page-size-change="handleSizeChange"
-      @screen-reset="
-        pageInfo.curr = 1;
-        parmValue.page = 1;
-        searchList();
-      "
-      @screen-submit="
-        pageInfo.curr = 1;
-        parmValue.page = 1;
-        searchList();
-      "
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
-      <template #table-header="{}">
-        <div style="width: 100%">
-          <el-row style="padding: 0 0 0 80px">
-            <el-col :span="24">
-              <el-col :span="4" style="width: 120px">
-                <el-select
-                  :size="searchSize"
-                  v-model="parmValue.status"
-                  filterable
-                  clearable
-                  placeholder="账号状态"
-                  style="width: 100%"
-                  @change="
-                    pageInfo.curr = 1;
-                    parmValue.page = 1;
-                    searchList();
-                  "
-                >
-                  <el-option
-                    v-for="item in statusList"
-                    :key="'status' + item.code"
-                    :label="item.name"
-                    :value="item.code"
+      <ex-table
+        v-loading="false"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{}">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="24">
+                <el-col :span="4" style="width: 120px">
+                  <el-select
+                    :size="searchSize"
+                    v-model="parmValue.status"
+                    filterable
+                    clearable
+                    placeholder="账号状态"
+                    style="width: 100%"
+                    @change="
+                      pageInfo.curr = 1;
+                      parmValue.page = 1;
+                      searchList();
+                    "
+                  >
+                    <el-option
+                      v-for="item in statusList"
+                      :key="'status' + item.code"
+                      :label="item.name"
+                      :value="item.code"
+                    />
+                  </el-select>
+                </el-col>
+                <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.name"
+                    :maxlength="40"
+                    placeholder="业务员姓名"
                   />
-                </el-select>
-              </el-col>
-              <el-col :span="4" style="width: 150px; padding: 0 0 0 10px">
-                <el-input
-                  :size="searchSize"
-                  v-model="parmValue.name"
-                  :maxlength="40"
-                  placeholder="业务员姓名"
-                />
-              </el-col>
-              <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
-                <el-input
-                  :size="searchSize"
-                  v-model="parmValue.username"
-                  :maxlength="40"
-                  placeholder="手机号"
-                />
-              </el-col>
-              <el-col :span="4" style="width: 54px">
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  class="fr"
-                  icon="el-icon-search"
-                  @click="searchList"
-              /></el-col>
-              <el-col
-                :span="4"
-                style="width: 66px"
-                v-if="powers.some((item) => item == '024')"
-              >
-                <el-button
-                  type="warning"
-                  class="fr"
-                  :size="searchSize"
-                  @click="restSearch"
+                </el-col>
+                <el-col :span="4" style="width: 160px; padding: 0 0 0 10px">
+                  <el-input
+                    :size="searchSize"
+                    v-model="parmValue.username"
+                    :maxlength="40"
+                    placeholder="手机号"
+                  />
+                </el-col>
+                <el-col :span="4" style="width: 54px">
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    class="fr"
+                    icon="el-icon-search"
+                    @click="searchList"
+                /></el-col>
+                <el-col
+                  :span="4"
+                  style="width: 66px"
+                  v-if="powers.some((item) => item == '024')"
                 >
-                  重置
-                </el-button>
-              </el-col>
-              <el-col
-                :span="3"
-                style="width: 66px; float: right"
-                v-if="powers.some((item) => item == '002')"
-              >
-                <el-button
-                  :size="searchSize"
-                  type="primary"
-                  style="float: right; margin-left: 5px"
-                  @click="searchList"
+                  <el-button
+                    type="warning"
+                    class="fr"
+                    :size="searchSize"
+                    @click="restSearch"
+                  >
+                    重置
+                  </el-button>
+                </el-col>
+                <el-col
+                  :span="3"
+                  style="width: 66px; float: right"
+                  v-if="powers.some((item) => item == '002')"
                 >
-                  刷新
-                </el-button>
+                  <el-button
+                    :size="searchSize"
+                    type="primary"
+                    style="float: right; margin-left: 5px"
+                    @click="searchList"
+                  >
+                    刷新
+                  </el-button>
+                </el-col>
               </el-col>
-            </el-col>
-          </el-row>
-        </div>
-      </template>
-      <template #status="{ scope }">
-        <el-tag
-          :size="tablebtnSize"
-          :type="scope.row.status == '0' ? 'warning' : ''"
-          v-text="
-            (statusOptions.find((item) => item.id == scope.row.status) || {})
-              .label || '--'
-          "
-        ></el-tag>
-      </template>
-      <template #operation="{ scope }">
-        <el-tooltip
-          v-if="powers.some((item) => item == '020')"
-           
-          effect="dark"
-          content="重置密码"
-          placement="top"
-        >
-          <i
-            class="el-icon-refresh-left tb-icon"
-            @click="openPasswordModal(scope.row.id, false)"
-          ></i>
-        </el-tooltip>
+            </el-row>
+          </div>
+        </template>
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {})
+                .label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #operation="{ scope }">
+          <el-tooltip
+            v-if="powers.some((item) => item == '020')"
+            effect="dark"
+            content="重置密码"
+            placement="top"
+          >
+            <i
+              class="el-icon-refresh-left tb-icon"
+              @click="openPasswordModal(scope.row.id, false)"
+            ></i>
+          </el-tooltip>
 
-        <el-tooltip
-          v-if="powers.some((item) => item == '007')"
-           
-          effect="dark"
-          content="详情"
-          placement="top"
-        >
-          <i
-            class="el-icon-view tb-icon"
-            @click="openModal(scope.row.id, true, scope.row)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="powers.some((item) => item == '005')"
-           
-          effect="dark"
-          content="修改"
-          placement="top"
-        >
-          <i
-            class="el-icon-edit tb-icon"
-            @click="openModal(scope.row.id, false, scope.row)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="
-            powers.some((item) => item == '004') && scope.row.status === '1'
-          "
-           
-          effect="dark"
-          content="禁用"
-          placement="top"
-        >
-          <i
-            class="el-icon-video-pause tb-icon"
-            @click="statusConfirm(scope.row.id, scope.row.status)"
-          ></i>
-        </el-tooltip>
-        <el-tooltip
-          v-if="
-            powers.some((item) => item == '004') && scope.row.status === '0'
-          "
-           
-          effect="dark"
-          content="启用"
-          placement="top"
-        >
-          <i
-            class="el-icon-video-play tb-icon"
-            @click="statusConfirm(scope.row.id, scope.row.status)"
-          ></i>
-        </el-tooltip>
-      </template>
-    </ex-table>
-    <add-edit
-      :id="modelId"
-      :sitem="sitem"
-      :show-model="showModel"
-      :is-detail="isDetail"
-      @refresh="searchList"
-      @cancel="showModel = false"
-    />
-  </div>
-  <div v-else>
-    <no-auth></no-auth>
-  </div>
-       
-   
+          <el-tooltip
+            v-if="powers.some((item) => item == '007')"
+            effect="dark"
+            content="详情"
+            placement="top"
+          >
+            <i
+              class="el-icon-view tb-icon"
+              @click="openModal(scope.row.id, true, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="powers.some((item) => item == '005')"
+            effect="dark"
+            content="修改"
+            placement="top"
+          >
+            <i
+              class="el-icon-edit tb-icon"
+              @click="openModal(scope.row.id, false, scope.row)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '1'
+            "
+            effect="dark"
+            content="禁用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-pause tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+          <el-tooltip
+            v-if="
+              powers.some((item) => item == '004') && scope.row.status === '0'
+            "
+            effect="dark"
+            content="启用"
+            placement="top"
+          >
+            <i
+              class="el-icon-video-play tb-icon"
+              @click="statusConfirm(scope.row.id, scope.row.status)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
       <add-edit
-        :showModel="showModel"
         :id="modelId"
-        :isDetail="isDetail"
+        :sitem="sitem"
+        :show-model="showModel"
+        :is-detail="isDetail"
         @refresh="searchList"
         @cancel="showModel = false"
-      ></add-edit>
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
     </div>
-   </template>
+
+    <add-edit
+      :showModel="showModel"
+      :id="modelId"
+      :isDetail="isDetail"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    ></add-edit>
+  </div>
+</template>
    <script>
-    import mixinPage from "@/mixins/elPaginationHandle";
-    import resToken from "@/mixins/resToken";
-    import ExTable from "@/components/ExTableNew.vue";
-    import statusList from "@/assets/js/statusList";
-    import asyncRequest from "@/apis/service/stock/check";
-    import addEdit from "./addEdit";
-    import { mapGetters } from "vuex";
-   
-   export default {
-    name: 'check',
-    mixins: [mixinPage, resToken],
-    components: {
-      addEdit,
-      ExTable,
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import ExTable from "@/components/ExTableNew.vue";
+import statusList from "@/assets/js/statusList";
+import asyncRequest from "@/apis/service/stock/check";
+import addEdit from "./addEdit";
+import { mapGetters } from "vuex";
+
+export default {
+  name: "check",
+  mixins: [mixinPage, resToken],
+  components: {
+    addEdit,
+    ExTable,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "check"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
     },
-    computed: {
-      ...mapGetters(["tablebtnSize", "searchSize", "size"]),
-      powers() {
-        let tran =
-          this.$store.getters.btnList.find(
-            (item) => item.menu_route == "check"
-          ) || {};
-        if (tran && tran.action && tran.action.length > 0) {
-          return tran.action;
-        } else {
-          return [];
-        }
+  },
+  data() {
+    return {
+      sitem: null,
+      // 状态
+      statusOptions: [
+        { id: "0", label: "禁用" },
+        { id: "1", label: "启用" },
+      ],
+      statusList: statusList,
+      loading: true,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        name: "", // 业务员名字
+        username: "", // 账号
+        status: "", //
+        page: 1, // 页码
+        size: 15, // 每页显示条数
       },
-    },
-    data() {
-      return {
-        sitem: null,
-        // 状态
-        statusOptions: [
-          { id: "0", label: "禁用" },
-          { id: "1", label: "启用" },
-        ],
-        statusList: statusList,
-        loading: true,
-        showModel: false,
-        isDetail: false,
-        modelId: 0,
-        parmValue: {
-          name: "", // 业务员名字
-          username: "", // 账号
-          status: "", //
-          page: 1, // 页码
-          size: 15, // 每页显示条数
+      tableData: [],
+      passwordModel: false,
+      passwordModelId: 0,
+      isPasswordDetail: false,
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: [
+        {
+          prop: "nickname",
+          label: "真实姓名",
+        },
+        {
+          prop: "role_name",
+          label: "角色名称",
+        },
+        {
+          prop: "mobile",
+          label: "联系电话",
         },
-        tableData: [],
-        passwordModel: false,
-        passwordModelId: 0,
-        isPasswordDetail: false,
-        // 表格 - 数据
-        tableData: [],
-        // 表格 - 参数
-        table: {
-          stripe: true,
-          border: true,
-          _defaultHeader_: ["setcol"],
+        {
+          prop: "email",
+          label: "邮箱",
         },
-        // 表格 - 分页
-        pageInfo: {
-          size: 15,
-          curr: 1,
-          total: 0,
+        {
+          prop: "status",
+          label: "状态",
+          _slot_: "status",
+          width: "80px",
         },
-        // 表格 - 列参数
-        columns: [
-          {
-            prop: "nickname",
-            label: "真实姓名",
-          },
-          {
-            prop: "role_name",
-            label: "角色名称",
-          },
-          {
-            prop: "mobile",
-            label: "联系电话",
-          },
-          {
-            prop: "email",
-            label: "邮箱",
-          },
-          {
-            prop: "status",
-            label: "状态",
-            _slot_: "status",
-            width: "80px",
-          },
-          {
-            prop: "addtime",
-            label: "创建时间",
-            sortable: true,
-          },
-          {
-            prop: "",
-            label: "操作",
-            fixed: "right",
-            _noset_: true,
-            _slot_: "operation",
-          },
-        ],
+        {
+          prop: "addtime",
+          label: "创建时间",
+          sortable: true,
+        },
+        {
+          prop: "",
+          label: "操作",
+          fixed: "right",
+          _noset_: true,
+          _slot_: "operation",
+        },
+      ],
+    };
+  },
+  mounted() {
+    this.searchList();
+  },
+
+  methods: {
+    restSearch() {
+      this.parmValue = {
+        name: "", // 业务员名字
+        username: "", // 账号
+        status: "", //
+        page: 1, // 页码
+        size: 10, // 每页显示条数
       };
-    },
-    mounted() {
       this.searchList();
     },
-  
-    methods: {
-      restSearch() {
-        this.parmValue = {
-          name: "", // 业务员名字
-          username: "", // 账号
-          status: "", //
-          page: 1, // 页码
-          size: 10, // 每页显示条数
-        };
-        this.searchList();
-      },
-      
-      openModal(id, isDetail, sitem) {
-        this.showModel = true;
-        this.modelId = id;
-        this.isDetail = isDetail;
-        this.sitem = sitem;
-      },
-      async deleteById(id, status) {
-        await this.$confirm("确定要删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+
+    openModal(id, isDetail, sitem) {
+      this.showModel = true;
+      this.modelId = id;
+      this.isDetail = isDetail;
+      this.sitem = sitem;
+    },
+    async deleteById(id, status) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
         })
-          .then(async () => {
-            const model = {
-              id: id,
-              status: status === "1" ? "0" : "1",
-            };
-            const res = await asyncRequest.status(model);
-            if (res && res.code === 0) {
-              this.$notify.success({
-                title: "删除成功",
-                message: "",
-              });
-              this.searchList();
-            } else if (res && res.code >= 100 && res.code <= 104) {
-              await this.logout();
-            } else {
-              this.$message.warning(res.message);
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      },
-      async searchList() {
-        this.loading = true;
-        const res = await asyncRequest.list(this.parmValue);
-        if (res && res.code === 0 && res.data) {
-          this.tableData = res.data.list;
-          this.pageInfo.total = Number(res.data.count);
-        } else if (res && res.code >= 100 && res.code <= 104) {
-          await this.logout();
-        } else {
-          this.tableData = [];
-          this.pageInfo.total = 0;
-        }
-        this.loading = false;
-      },
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async searchList() {
+      this.loading = true;
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
 
-      async statusConfirm(id, status) {
-        let str= status === "1" ? "禁用" : "启用"
-        await this.$confirm('确定要改为'+str+'?',{
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning",
+    async statusConfirm(id, status) {
+      let str = status === "1" ? "禁用" : "启用";
+      await this.$confirm("确定要改为" + str + "?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "状态修改成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
         })
-          .then(async () => {
-            this.loading = true;
-            const model = {
-              id: id,
-              status: status === "1" ? "0" : "1",
-            };
-            const res = await asyncRequest.status(model);
-            if (res && res.code === 0) {
-              this.loading = false;
-              this.$notify.success({
-                title: "状态修改成功!",
-                message: "",
-              });
-              await this.searchList();
-            } else if (res && res.code >= 100 && res.code <= 104) {
-              await this.logout();
-            } else {
-              this.$message.warning(res.message);
-            }
-          })
-          .catch(() => {
-            console.log("取消");
-          });
-      },
-    }
-   }
-   </script>
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+  },
+};
+</script>
    <style lang="scss" scoped>
-   .check {
-    
-   }
-   </style>
+.check {
+}
+</style>
    

+ 5 - 1
src/views/stock/stockWarning/index.vue

@@ -68,7 +68,7 @@
                     :end="parmValue.total_up"
                     :type="1"
                     :width="'150px'"
-                    :title="'库存量开始'"
+                    :title="'库存量'"
                     :size="searchSize"
                     @numReturned="numReturned($event, 0)"
                   />
@@ -343,6 +343,10 @@ export default {
           prop: "stock_warning",
           label: "预警库存",
         },
+        {
+          prop: "operation",
+          label: "操作",
+        },
       ],
     };
   },

+ 142 - 88
src/views/stock/survey/index.vue

@@ -3,6 +3,98 @@
     <div
       v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
     >
+      <div style="width: 100%">
+        <el-row style="padding: 20px 0 0 30px">
+          <el-col :span="24" style="width: 220px">
+            <el-cascader
+              placeholder="请选择仓库"
+              filterable
+              clearable
+              :size="searchSize"
+              v-model="value"
+              :options="options"
+              style="width: 100%"
+              @change="
+                pageInfo.curr = 1;
+                parmValue.page = 1;
+                searchList();
+              "
+            ></el-cascader>
+
+            <!-- 请选择仓库 -->
+            <!-- <el-col :span="5" style="width: 220px">
+              <el-select
+                :size="searchSize"
+                v-model="parmValue.status"
+                filterable
+                clearable
+                placeholder="请选择仓库"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in stock"
+                  :key="item.id"
+                  :label="`${item.name}  ${item.id}`"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col> -->
+
+            <el-col
+              :span="4"
+              style="width: 66px"
+              v-if="powers.some((item) => item == '024')"
+            >
+              <el-button
+                type="warning"
+                class="fr"
+                :size="searchSize"
+                @click="restSearch"
+              >
+                重置
+              </el-button>
+            </el-col>
+            <el-col
+              :span="3"
+              style="width: 66px; float: right"
+              v-if="powers.some((item) => item == '002')"
+            >
+              <el-button
+                :size="searchSize"
+                type="primary"
+                style="float: right; margin-left: 5px"
+                @click="searchList"
+              >
+                刷新
+              </el-button>
+            </el-col>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="stock-survey clear">
+        <el-row
+          :gutter="24"
+          v-for="item in stock_list"
+          :key="item.id"
+          style="float: left"
+        >
+          <el-col :span="24">
+            <el-card
+              shadow="always"
+              style="width: 200px; height: 115px; flex: 1 1 auto; margin: 10px"
+            >
+              <i :class="item.icon" class="icon"></i>
+              <p>{{ item.label }}</p>
+            </el-card>
+          </el-col>
+        </el-row>
+      </div>
       <ex-table
         v-loading="false"
         :table="table"
@@ -24,93 +116,8 @@
         "
       >
         <template #table-header="{}">
-          <div style="width: 100%">
-
-              <div class="stock-survey clear">
-            <el-row
-              :gutter="24"
-              v-for="item in stock_list"
-              :key="item.id"
-              style="float: left"
-            >
-              <el-col :span="24">
-                <el-card
-                  shadow="always"
-                  style="
-                    width: 220px;
-                    height: 115px;
-                    flex: 1 1 auto;
-                    margin: 20px;
-                  "
-                >
-                  <i :class="item.icon" class="icon"></i>
-                  <p>{{ item.label }}</p>
-                </el-card>
-              </el-col>
-            </el-row>
-          </div>
-            <el-row style="padding: 0 0 0 80px">
-              <el-col :span="24">
-                <!-- 请选择仓库 -->
-                <el-col :span="5" style="width: 160px">
-                  <el-select
-                    :size="searchSize"
-                    v-model="parmValue.status"
-                    filterable
-                    clearable
-                    placeholder="请选择仓库"
-                    style="width: 100%"
-                    @change="
-                      pageInfo.curr = 1;
-                      parmValue.page = 1;
-                      searchList();
-                    "
-                  >
-                  
-                    <el-option
-                      v-for="item in stock"
-                      :key="item.id"
-                      :label="`${item.name}  ${item.id}`"
-                      :value="item.id"
-                    />
-                  </el-select>
-                </el-col>
-
-                <el-col
-                  :span="4"
-                  style="width: 66px"
-                  v-if="powers.some((item) => item == '024')"
-                >
-                  <el-button
-                    type="warning"
-                    class="fr"
-                    :size="searchSize"
-                    @click="restSearch"
-                  >
-                    重置
-                  </el-button>
-                </el-col>
-                <el-col
-                  :span="3"
-                  style="width: 66px; float: right"
-                  v-if="powers.some((item) => item == '002')"
-                >
-                  <el-button
-                    :size="searchSize"
-                    type="primary"
-                    style="float: right; margin-left: 5px"
-                    @click="searchList"
-                  >
-                    刷新
-                  </el-button>
-                </el-col>
-              </el-col>
-            </el-row>
-          </div>
+          <div style="width: 100%; height: 30px"></div>
         </template>
-
-        
-
         <template #status="{ scope }">
           <el-tag
             :size="tablebtnSize"
@@ -344,6 +351,51 @@ export default {
           _slot_: "operation",
         },
       ],
+      value: [],
+      options: [
+        {
+          value: "",
+          label: "A公司",
+          children: [
+            {
+              value: "",
+              label: "A公司仓库1",
+            },
+            {
+              value: "",
+              label: "A公司仓库2",
+            },
+          ],
+        },
+        {
+          value: "",
+          label: "B公司",
+          children: [
+            {
+              value: "",
+              label: "B公司仓库1",
+            },
+            {
+              value: "",
+              label: "B公司仓库2",
+            },
+          ],
+        },
+        {
+          value: "",
+          label: "C公司",
+          children: [
+            {
+              value: "",
+              label: "C公司仓库1",
+            },
+            {
+              value: "",
+              label: "C公司仓库2",
+            },
+          ],
+        },
+      ],
     };
   },
   mounted() {
@@ -449,12 +501,14 @@ export default {
 @import "~@/styles/index.scss";
 .stock-survey {
   width: 100%;
-  margin-top: 60px;
-  margin-bottom: 30px;
   padding: 30px auto;
   display: flex;
+  border: 1px solid red;
+  box-sizing: border-box;
   // position: relative;
   justify-content: center;
+  overflow: hidden;
+  padding: 0 0 0 10px;
   text-align: center;
   .icon {
     font-size: 40px;