chen 2 år sedan
förälder
incheckning
51db13e0ef

+ 5 - 5
src/api/client/client.js

@@ -2,7 +2,7 @@ import request from '@/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/blade-client/client/list',
+    url: '/pl-client/client/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const getDetail = (id) => {
   return request({
-    url: '/blade-client/client/detail',
+    url: '/pl-client/client/detail',
     method: 'get',
     params: {
       id
@@ -24,7 +24,7 @@ export const getDetail = (id) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/blade-client/client/remove',
+    url: '/pl-client/client/remove',
     method: 'post',
     params: {
       ids,
@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/blade-client/client/submit',
+    url: '/pl-client/client/submit',
     method: 'post',
     data: row
   })
@@ -42,7 +42,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/blade-client/client/submit',
+    url: '/pl-client/client/submit',
     method: 'post',
     data: row
   })

+ 5 - 5
src/api/equipment/equipment.js

@@ -2,7 +2,7 @@ import request from '@/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/blade-equipment/equipment/list',
+    url: '/pl-equipment/equipment/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const getDetail = (id) => {
   return request({
-    url: '/blade-equipment/equipment/detail',
+    url: '/pl-equipment/equipment/detail',
     method: 'get',
     params: {
       id
@@ -24,7 +24,7 @@ export const getDetail = (id) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/blade-equipment/equipment/remove',
+    url: '/pl-equipment/equipment/remove',
     method: 'post',
     params: {
       ids,
@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/blade-equipment/equipment/submit',
+    url: '/pl-equipment/equipment/submit',
     method: 'post',
     data: row
   })
@@ -42,7 +42,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/blade-equipment/equipment/submit',
+    url: '/pl-equipment/equipment/submit',
     method: 'post',
     data: row
   })

+ 5 - 5
src/api/factory/factory.js

@@ -2,7 +2,7 @@ import request from '@/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/blade-factory/factory/list',
+    url: '/pl-factory/factory/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const getDetail = (id) => {
   return request({
-    url: '/blade-factory/factory/detail',
+    url: '/pl-factory/factory/detail',
     method: 'get',
     params: {
       id
@@ -24,7 +24,7 @@ export const getDetail = (id) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/blade-factory/factory/remove',
+    url: '/pl-factory/factory/remove',
     method: 'post',
     params: {
       ids,
@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/blade-factory/factory/submit',
+    url: '/pl-factory/factory/submit',
     method: 'post',
     data: row
   })
@@ -42,7 +42,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/blade-factory/factory/submit',
+    url: '/pl-factory/factory/submit',
     method: 'post',
     data: row
   })

+ 5 - 5
src/api/product/product.js

@@ -2,7 +2,7 @@ import request from '@/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/blade-product/product/list',
+    url: '/pl-product/product/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const getDetail = (id) => {
   return request({
-    url: '/blade-product/product/detail',
+    url: '/pl-product/product/detail',
     method: 'get',
     params: {
       id
@@ -24,7 +24,7 @@ export const getDetail = (id) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/blade-product/product/remove',
+    url: '/pl-product/product/remove',
     method: 'post',
     params: {
       ids,
@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/blade-product/product/submit',
+    url: '/pl-product/product/submit',
     method: 'post',
     data: row
   })
@@ -42,7 +42,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/blade-product/product/submit',
+    url: '/pl-product/product/submit',
     method: 'post',
     data: row
   })

+ 5 - 5
src/api/productBatch/productBatch.js

@@ -2,7 +2,7 @@ import request from '@/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/blade-productBatch/productBatch/list',
+    url: '/pl-productBatch/productBatch/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const getDetail = (id) => {
   return request({
-    url: '/blade-productBatch/productBatch/detail',
+    url: '/pl-productBatch/productBatch/detail',
     method: 'get',
     params: {
       id
@@ -24,7 +24,7 @@ export const getDetail = (id) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/blade-productBatch/productBatch/remove',
+    url: '/pl-productBatch/productBatch/remove',
     method: 'post',
     params: {
       ids,
@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/blade-productBatch/productBatch/submit',
+    url: '/pl-productBatch/productBatch/submit',
     method: 'post',
     data: row
   })
@@ -42,7 +42,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/blade-productBatch/productBatch/submit',
+    url: '/pl-productBatch/productBatch/submit',
     method: 'post',
     data: row
   })

+ 50 - 0
src/api/productModel/productModel.js

@@ -0,0 +1,50 @@
+import request from '@/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/pl-productModel/productModel/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const getDetail = (id) => {
+  return request({
+    url: '/pl-productModel/productModel/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const remove = (ids) => {
+  return request({
+    url: '/pl-productModel/productModel/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const add = (row) => {
+  return request({
+    url: '/pl-productModel/productModel/submit',
+    method: 'post',
+    data: row
+  })
+}
+
+export const update = (row) => {
+  return request({
+    url: '/pl-productModel/productModel/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 5 - 5
src/api/productRework/productRework.js

@@ -2,7 +2,7 @@ import request from '@/axios';
 
 export const getList = (current, size, params) => {
   return request({
-    url: '/blade-productRework/productRework/list',
+    url: '/pl-productRework/productRework/list',
     method: 'get',
     params: {
       ...params,
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
 
 export const getDetail = (id) => {
   return request({
-    url: '/blade-productRework/productRework/detail',
+    url: '/pl-productRework/productRework/detail',
     method: 'get',
     params: {
       id
@@ -24,7 +24,7 @@ export const getDetail = (id) => {
 
 export const remove = (ids) => {
   return request({
-    url: '/blade-productRework/productRework/remove',
+    url: '/pl-productRework/productRework/remove',
     method: 'post',
     params: {
       ids,
@@ -34,7 +34,7 @@ export const remove = (ids) => {
 
 export const add = (row) => {
   return request({
-    url: '/blade-productRework/productRework/submit',
+    url: '/pl-productRework/productRework/submit',
     method: 'post',
     data: row
   })
@@ -42,7 +42,7 @@ export const add = (row) => {
 
 export const update = (row) => {
   return request({
-    url: '/blade-productRework/productRework/submit',
+    url: '/pl-productRework/productRework/submit',
     method: 'post',
     data: row
   })

+ 24 - 6
src/option/client/client.js

@@ -1,3 +1,5 @@
+import { setStore, getStore } from '@/utils/store';
+
 export default {
   height:'auto',
   calcHeight: 30,
@@ -9,6 +11,7 @@ export default {
   viewBtn: true,
   selection: true,
   dialogClickModal: false,
+  columnBtn:false,
   column: [
     {
       label: "主键",
@@ -31,19 +34,34 @@ export default {
     {
       label: "所属工厂",
       prop: "factoryId",
-      type: "select",
+      search: getStore({ name: 'userInfo' }).user_category==1,
+      hide: getStore({ name: 'userInfo' }).user_category!=1,
+      display: getStore({ name: 'userInfo' }).user_category==1,
+      type: "tree",
+      dicUrl: "/api/pl-factory/factory/select",
+      props: {
+        label: "name",
+        value: "id",
+      },
     },
     {
       label: "名称",
       prop: "name",
       type: "input",
       search: true,
+      rules: [
+        {
+          required: true,
+          message: '请填写客户名称',
+          trigger: 'click',
+        },
+      ],
     },
-    {
-      label: "编码",
-      prop: "code",
-      type: "input",
-    },
+    // {
+    //   label: "编码",
+    //   prop: "code",
+    //   type: "input",
+    // },
     {
       label: "地址",
       prop: "address",

+ 34 - 1
src/option/equipment/equipment.js

@@ -1,3 +1,4 @@
+import { setStore, getStore } from '@/utils/store';
 export default {
   height:'auto',
   calcHeight: 30,
@@ -9,6 +10,9 @@ export default {
   viewBtn: true,
   selection: true,
   dialogClickModal: false,
+  labelWidth:160,
+  searchLabelWidth:100,
+  columnBtn:false,
   column: [
     {
       label: "主键",
@@ -31,25 +35,54 @@ export default {
     {
       label: "所属工厂",
       prop: "factoryId",
-      type: "input",
+      search: getStore({ name: 'userInfo' }).user_category==1,
+      hide: getStore({ name: 'userInfo' }).user_category!=1,
+      display: getStore({ name: 'userInfo' }).user_category==1,
+      type: "tree",
+      dicUrl: "/api/pl-factory/factory/select",
+      props: {
+        label: "name",
+        value: "id",
+      },
     },
     {
       label: "设备名称",
       prop: "eqName",
       type: "input",
       search: true,
+      rules: [
+        {
+          required: true,
+          message: '请填写设备名称',
+          trigger: 'click',
+        },
+      ],
     },
     {
       label: "设备序列号",
       prop: "eqSn",
       type: "input",
       search: true,
+      rules: [
+        {
+          required: true,
+          message: '请填写设备序列号',
+          trigger: 'click',
+        },
+      ],
     },
     {
       label: "相机mac地址",
       prop: "macAddress",
       type: "input",
       search: true,
+      rules: [
+        {
+          required: true,
+          message: '请填相机mac地址',
+          trigger: 'click',
+        },
+      ],
     },
     {
       label: "设备类型",

+ 1 - 0
src/option/factory/factory.js

@@ -9,6 +9,7 @@ export default {
   viewBtn: true,
   selection: true,
   dialogClickModal: false,
+  columnBtn:false,
   column: [
     {
       label: "主键",

+ 7 - 3
src/option/product/product.js

@@ -9,6 +9,10 @@ export default {
   viewBtn: true,
   selection: true,
   dialogClickModal: false,
+  columnBtn:false,
+  addBtn:false,
+  editBtn:false,
+  delBtn:false,
   column: [
     {
       label: "主键",
@@ -51,13 +55,13 @@ export default {
       search: true,
     },
     {
-      label: "品型号id",
+      label: "品型号id",
       prop: "productModelId",
       type: "select",
       hide: true,
     },
     {
-      label: "品名称",
+      label: "品名称",
       prop: "productName",
       type: "input",
       addDisplay: false,
@@ -66,7 +70,7 @@ export default {
       search: true,
     },
     {
-      label: "品型号",
+      label: "品型号",
       prop: "productModel",
       type: "input",
       addDisplay: false,

+ 1 - 0
src/option/productBatch/productBatch.js

@@ -9,6 +9,7 @@ export default {
   viewBtn: true,
   selection: true,
   dialogClickModal: false,
+  columnBtn:false,
   column: [
     {
       label: "主键",

+ 138 - 0
src/option/productModel/productModel.js

@@ -0,0 +1,138 @@
+import { setStore, getStore } from '@/utils/store';
+export default {
+  height:'auto',
+  calcHeight: 30,
+  tip: false,
+  searchShow: true,
+  searchMenuSpan: 6,
+  border: true,
+  index: true,
+  viewBtn: true,
+  selection: true,
+  dialogClickModal: false,
+  columnBtn:false,
+  column: [
+    {
+      label: "主键",
+      prop: "id",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "租户ID",
+      prop: "tenantId",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "所属工厂",
+      prop: "factoryId",
+      search: getStore({ name: 'userInfo' }).user_category==1,
+      hide: getStore({ name: 'userInfo' }).user_category!=1,
+      display: getStore({ name: 'userInfo' }).user_category==1,
+      type: "tree",
+      dicUrl: "/api/pl-factory/factory/select",
+      props: {
+        label: "name",
+        value: "id",
+      },
+    },
+    {
+      label: "所属客户",
+      prop: "clientId",
+      type: "input",
+      search: true,
+      type: "tree",
+      dicUrl: "/api/pl-client/client/select",
+      props: {
+        label: "name",
+        value: "id",
+      },
+    },
+    {
+      label: "产品名称",
+      prop: "productName",
+      type: "input",
+      search: true,
+    },
+    {
+      label: "产品型号",
+      prop: "productModel",
+      type: "input",
+      search: true,
+    },
+    {
+      label: "规格",
+      prop: "productSpec",
+      type: "input",
+    },
+    {
+      label: "创建人",
+      prop: "createUser",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "创建部门",
+      prop: "createDept",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "创建时间",
+      prop: "createTime",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+    },
+    {
+      label: "修改人",
+      prop: "updateUser",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "修改时间",
+      prop: "updateTime",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "状态",
+      prop: "status",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+    {
+      label: "是否已删除",
+      prop: "isDeleted",
+      type: "input",
+      addDisplay: false,
+      editDisplay: false,
+      viewDisplay: false,
+      hide: true,
+    },
+  ]
+}

+ 1 - 0
src/option/productRework/productRework.js

@@ -9,6 +9,7 @@ export default {
   viewBtn: true,
   selection: true,
   dialogClickModal: false,
+  columnBtn:false,
   column: [
     {
       label: "主键",

+ 5 - 3
src/views/client/client.vue

@@ -26,11 +26,11 @@
                    v-if="permission.client_delete"
                    @click="handleDelete">删 除
         </el-button>
-        <el-button type="warning"
+        <!-- <el-button type="warning"
                    plain
                    icon="el-icon-download"
                    @click="handleExport">导 出
-        </el-button>
+        </el-button> -->
       </template>
     </avue-crud>
   </basic-container>
@@ -38,6 +38,7 @@
 
 <script>
   import {getList, getDetail, add, update, remove} from "@/api/client/client";
+  import { setStore, getStore } from '@/utils/store';
   import option from "@/option/client/client";
   import {mapGetters} from "vuex";
   import {exportBlob} from "@/api/common";
@@ -127,6 +128,7 @@
           });
       },
       handleDelete() {
+        console.log(getStore({ name: 'userInfo' }))
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
           return;
@@ -149,7 +151,7 @@
           });
       },
       handleExport() {
-        let downloadUrl = `/blade-client/client/export-client?${this.website.tokenHeader}=${getToken()}`;
+        let downloadUrl = `/pl-client/client/export-client?${this.website.tokenHeader}=${getToken()}`;
         const {
             name,
         } = this.query;

+ 3 - 3
src/views/equipment/equipment.vue

@@ -26,11 +26,11 @@
                    v-if="permission.equipment_delete"
                    @click="handleDelete">删 除
         </el-button>
-        <el-button type="warning"
+        <!-- <el-button type="warning"
                    plain
                    icon="el-icon-download"
                    @click="handleExport">导 出
-        </el-button>
+        </el-button> -->
       </template>
     </avue-crud>
   </basic-container>
@@ -149,7 +149,7 @@
           });
       },
       handleExport() {
-        let downloadUrl = `/blade-equipment/equipment/export-equipment?${this.website.tokenHeader}=${getToken()}`;
+        let downloadUrl = `/pl-equipment/equipment/export-equipment?${this.website.tokenHeader}=${getToken()}`;
         const {
             eqName,
             eqSn,

+ 3 - 3
src/views/factory/factory.vue

@@ -26,11 +26,11 @@
                    v-if="permission.factory_delete"
                    @click="handleDelete">删 除
         </el-button>
-        <el-button type="warning"
+        <!-- <el-button type="warning"
                    plain
                    icon="el-icon-download"
                    @click="handleExport">导 出
-        </el-button>
+        </el-button> -->
       </template>
     </avue-crud>
   </basic-container>
@@ -149,7 +149,7 @@
           });
       },
       handleExport() {
-        let downloadUrl = `/blade-factory/factory/export-factory?${this.website.tokenHeader}=${getToken()}`;
+        let downloadUrl = `/pl-factory/factory/export-factory?${this.website.tokenHeader}=${getToken()}`;
         const {
             name,
             code,

+ 4 - 4
src/views/product/product.vue

@@ -20,7 +20,7 @@
                @refresh-change="refreshChange"
                @on-load="onLoad">
       <template #menu-left>
-        <el-button type="danger"
+        <!-- <el-button type="danger"
                    icon="el-icon-delete"
                    plain
                    v-if="permission.product_delete"
@@ -30,7 +30,7 @@
                    plain
                    icon="el-icon-download"
                    @click="handleExport">导 出
-        </el-button>
+        </el-button> -->
       </template>
     </avue-crud>
   </basic-container>
@@ -149,7 +149,7 @@
           });
       },
       handleExport() {
-        let downloadUrl = `/blade-product/product/export-product?${this.website.tokenHeader}=${getToken()}`;
+        let downloadUrl = `/pl-product/product/export-product?${this.website.tokenHeader}=${getToken()}`;
         const {
             clientId,
             batchNo,
@@ -169,7 +169,7 @@
         }).then(() => {
           NProgress.start();
           exportBlob(downloadUrl, values).then(res => {
-            downloadXls(res.data, `品表${dateNow()}.xlsx`);
+            downloadXls(res.data, `品表${dateNow()}.xlsx`);
             NProgress.done();
           })
         });

+ 2 - 2
src/views/productBatch/productBatch.vue

@@ -149,7 +149,7 @@
           });
       },
       handleExport() {
-        let downloadUrl = `/blade-productBatch/productBatch/export-productBatch?${this.website.tokenHeader}=${getToken()}`;
+        let downloadUrl = `/pl-productBatch/productBatch/export-productBatch?${this.website.tokenHeader}=${getToken()}`;
         const {
             batchNo,
             productName,
@@ -167,7 +167,7 @@
         }).then(() => {
           NProgress.start();
           exportBlob(downloadUrl, values).then(res => {
-            downloadXls(res.data, `品入库批次表${dateNow()}.xlsx`);
+            downloadXls(res.data, `品入库批次表${dateNow()}.xlsx`);
             NProgress.done();
           })
         });

+ 237 - 0
src/views/productModel/productModel.vue

@@ -0,0 +1,237 @@
+<template>
+  <basic-container>
+    <avue-crud :option="option"
+               v-model:search="search"
+               v-model:page="page"
+               v-model="form"
+               :table-loading="loading"
+               :data="data"
+               :permission="permissionList"
+               :before-open="beforeOpen"
+               ref="crud"
+               @row-update="rowUpdate"
+               @row-save="rowSave"
+               @row-del="rowDel"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template #menu-left>
+        <el-button type="danger"
+                   icon="el-icon-delete"
+                   plain
+                   v-if="permission.productModel_delete"
+                   @click="handleDelete">删 除
+        </el-button>
+        <!-- <el-button type="warning"
+                   plain
+                   icon="el-icon-download"
+                   @click="handleExport">导 出
+        </el-button> -->
+      </template>
+    </avue-crud>
+  </basic-container>
+</template>
+
+<script>
+  import {getList, getDetail, add, update, remove} from "@/api/productModel/productModel";
+  import option from "@/option/productModel/productModel";
+  import {mapGetters} from "vuex";
+  import {exportBlob} from "@/api/common";
+  import {getToken} from '@/utils/auth';
+  import {downloadXls} from "@/utils/util";
+  import {dateNow} from "@/utils/date";
+  import NProgress from 'nprogress';
+  import 'nprogress/nprogress.css';
+
+  export default {
+    data() {
+      return {
+        form: {},
+        query: {},
+        search: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option: option,
+        data: []
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.validData(this.permission.productModel_add, false),
+          viewBtn: this.validData(this.permission.productModel_view, false),
+          delBtn: this.validData(this.permission.productModel_delete, false),
+          editBtn: this.validData(this.permission.productModel_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    methods: {
+      rowSave(row, done, loading) {
+        add(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        update(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return remove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      handleExport() {
+        let downloadUrl = `/pl-productModel/productModel/export-productModel?${this.website.tokenHeader}=${getToken()}`;
+        const {
+            clientId,
+            productName,
+            productModel,
+        } = this.query;
+        let values = {
+            clientId_: clientId,
+            productName_: productName,
+            productModel_: productModel,
+        };
+        this.$confirm("是否导出数据?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          NProgress.start();
+          exportBlob(downloadUrl, values).then(res => {
+            downloadXls(res.data, `产品型号表${dateNow()}.xlsx`);
+            NProgress.done();
+          })
+        });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          getDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+
+        const {
+          clientId,
+          productName,
+          productModel,
+        } = this.query;
+
+        let values = {
+          clientId_: clientId,
+          productName_: productName,
+          productModel_: productModel,
+        };
+
+        getList(page.currentPage, page.pageSize, values).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      }
+    }
+  };
+</script>
+
+<style>
+</style>

+ 2 - 2
src/views/productRework/productRework.vue

@@ -149,7 +149,7 @@
           });
       },
       handleExport() {
-        let downloadUrl = `/blade-productRework/productRework/export-productRework?${this.website.tokenHeader}=${getToken()}`;
+        let downloadUrl = `/pl-productRework/productRework/export-productRework?${this.website.tokenHeader}=${getToken()}`;
         const {
             qrCode,
             productName,
@@ -171,7 +171,7 @@
         }).then(() => {
           NProgress.start();
           exportBlob(downloadUrl, values).then(res => {
-            downloadXls(res.data, `品返修表${dateNow()}.xlsx`);
+            downloadXls(res.data, `品返修表${dateNow()}.xlsx`);
             NProgress.done();
           })
         });

+ 53 - 0
src/views/system/user.vue

@@ -557,6 +557,44 @@ export default {
                   },
                 ],
               },
+                {
+                  label: "用户类型",
+                  prop: "userCategory",
+                  type: "select",
+                  dicData: [
+                    { label: "系统用户", value: 1 },
+                    { label: "生产工厂", value: 2 },
+                  ],
+                },
+                {
+                  label: "所属工厂",
+                  prop: "factoryId",
+                  type: "tree",
+                  dicUrl: "/api/pl-factory/factory/select",
+                  display:false,
+                  props: {
+                    label: "name",
+                    value: "id",
+                  },
+                  rules: [
+                    {
+                      required: true,
+                      message: '请所属工厂',
+                      trigger: 'click',
+                    },
+                  ],
+                },
+                {
+                  label: "小程序权限",
+                  prop: "appletPermission",
+                  type: "select",
+                  dicData: [
+                    { label: "管理组", value: 1 },
+                    { label: "生产组", value: 2 },
+                    { label: "检测组", value: 3 },
+                    { label: "维修组", value: 4 },
+                  ],
+                },
             ],
           },
         ],
@@ -701,6 +739,21 @@ export default {
         column.action = `/blade-system/user/import-user?isCovered=${this.excelForm.isCovered}`;
       }
     },
+    'form.userCategory'(val,form) {
+        let that = this;
+        let dutyInfo =this.findObject(this.option.group,'dutyInfo');
+        let factoryId =this.findObject(dutyInfo.column,'factoryId');
+        if(val){
+          if(val == 2 ){
+            factoryId.display= true;
+            // that.$set(factoryId,"display",true);
+          }else{
+            factoryId.display= false;
+            this.form.factoryId='';
+            // that.$set(factoryId,"display",false);
+          }
+        }
+    }
   },
   computed: {
     ...mapGetters(['userInfo', 'permission']),