Browse Source

修改 一键删除 权限 去掉多余字段

Qukatie 1 year ago
parent
commit
27ceb69f40

+ 9 - 0
src/api/tirePartsMall/purchasingManagement/warehouseEntryOrder.js

@@ -26,6 +26,15 @@ export const tradingBox = (id) => {
     }
   })
 }
+export const removeItem = (ids) => {
+  return request({
+    url: '/api/blade-sales-part/shipItems/remove',
+    method: 'get',
+    params: {
+      ids
+    }
+  })
+}
 export const getDetails = (data) => {
   return request({
     url: '/api/blade-sales-part/ship/detail',

+ 7 - 0
src/api/tirePartsMall/salesManagement/saleOrder.js

@@ -31,6 +31,13 @@ export const getDetails = (data) => {
     params: data
   })
 }
+export const getCopy = (data) => {
+  return request({
+    url: '/api/blade-sales-part/order/copy',
+    method: 'get',
+    params: data
+  })
+}
 export const submit = (data) => {
   return request({
     url: '/api/blade-sales-part/order/submit',

+ 9 - 0
src/api/tirePartsMall/salesService/outboundWorkOrder.js

@@ -26,6 +26,15 @@ export const tradingBox = (ids) => {
     }
   })
 }
+export const removeItem = (ids) => {
+  return request({
+    url: '/api/blade-sales-part/shipItems/remove',
+    method: 'get',
+    params: {
+      ids
+    }
+  })
+}
 export const getDetails = (data) => {
   return request({
     url: '/api/blade-sales-part/shipReturns/detail',

+ 14 - 45
src/components/dicSelect/mainProduct.vue

@@ -91,67 +91,36 @@ export default {
                 menu: false,
                 column: [
                     {
-                        label: "编码",
-                        prop: "code",
+                        label: "产品名称",
+                        prop: "goodsName",
                         search: true,
-                        rules: [{
-                            required: true,
-                            message: "请输入单位编码",
-                            trigger: "blur"
-                        }],
                         overHidden: true,
                     },
                     {
-                        label: "中文名称",
-                        prop: "cnName",
-                        search: true,
-                        rules: [{
-                            required: true,
-                            message: "请输入中文名称",
-                            trigger: "blur"
-                        }],
+                        label: "创建人",
+                        prop: "createUserName",
                         overHidden: true,
                     },
                     {
-                        label: "英文名称",
-                        prop: "enName",
+                        label: '创建时间',
+                        prop: "createTime",
                         search: true,
-                        rules: [{
-                            required: true,
-                            message: "请输入英文名称",
-                            trigger: "blur"
-                        }],
                         overHidden: true,
                     },
                     {
-                        label: "状态",
-                        prop: "status",
-                        type: 'select',
-                        search: true,
-                        dicData: [{
-                            label: '启用',
-                            value: 0
-                        }, {
-                            label: '停用',
-                            value: 1
-                        }],
-                        rules: [{
-                            required: true,
-                            message: "请输入状态",
-                            trigger: "blur"
-                        }],
+                        label: '修改人',
+                        prop: "updateUserName",
+                        overHidden: true,
+                    },
+                    {
+                        label: '更新时间',
+                        prop: "updateTime",
                         overHidden: true,
                     },
                     {
-                        label: "备注",
+                        label: '备注',
                         prop: "remarks",
-                        span: 24,
-                        type: 'textarea',
-                        width: "180",
-                        slot: true,
-                        minRows: 3,
                         overHidden: true,
-
                     },
                 ],
                 designer: null,

+ 292 - 329
src/views/authority/role.vue

@@ -1,381 +1,344 @@
 <template>
   <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="data"
-               ref="crud"
-               v-model="form"
-               :permission="permissionList"
-               :before-open="beforeOpen"
-               @row-del="rowDel"
-               @row-update="rowUpdate"
-               @row-save="rowSave"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad">
+    <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
+      :permission="permissionList" :before-open="beforeOpen" @row-del="rowDel" @row-update="rowUpdate"
+      @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
+      @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
       <template slot="menuLeft">
-        <el-button type="danger"
-                   size="small"
-                   icon="el-icon-delete"
-                   v-if="permission.role_delete"
-                   plain
-                   @click="handleDelete">删 除
+        <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.role_delete" plain
+          :disabled="!roleName.includes('admin')" @click="handleDelete">删 除
         </el-button>
-        <el-button size="small"
-                   icon="el-icon-setting"
-                   @click="handleRole"
-                   v-if="userInfo.role_name.includes('admin')"
-                   plain>权限设置
+        <el-button size="small" icon="el-icon-setting" @click="handleRole" v-if="userInfo.role_name.includes('admin')"
+          :disabled="!roleName.includes('admin')" plain>权限设置
         </el-button>
       </template>
     </avue-crud>
-    <el-dialog title="角色权限配置"
-               append-to-body
-               :visible.sync="box"
-               :close-on-click-modal="false"
-               width="345px">
+    <el-dialog title="角色权限配置" append-to-body :visible.sync="box" :close-on-click-modal="false" width="345px">
       <el-tabs type="border-card">
         <el-tab-pane label="菜单权限">
-          <el-tree :data="menuGrantList"
-                   show-checkbox
-                   node-key="id"
-                   ref="treeMenu"
-                   :default-checked-keys="menuTreeObj"
-                   :props="props">
+          <el-tree :data="menuGrantList" show-checkbox node-key="id" ref="treeMenu" :default-checked-keys="menuTreeObj"
+            :props="props">
           </el-tree>
         </el-tab-pane>
         <el-tab-pane label="数据权限">
-          <el-tree :data="dataScopeGrantList"
-                   show-checkbox
-                   node-key="id"
-                   ref="treeDataScope"
-                   :default-checked-keys="dataScopeTreeObj"
-                   :props="props">
+          <el-tree :data="dataScopeGrantList" show-checkbox node-key="id" ref="treeDataScope"
+            :default-checked-keys="dataScopeTreeObj" :props="props">
           </el-tree>
         </el-tab-pane>
         <el-tab-pane label="接口权限">
-          <el-tree :data="apiScopeGrantList"
-                   show-checkbox
-                   node-key="id"
-                   ref="treeApiScope"
-                   :default-checked-keys="apiScopeTreeObj"
-                   :props="props">
+          <el-tree :data="apiScopeGrantList" show-checkbox node-key="id" ref="treeApiScope"
+            :default-checked-keys="apiScopeTreeObj" :props="props">
           </el-tree>
         </el-tab-pane>
       </el-tabs>
 
-      <span slot="footer"
-            class="dialog-footer">
+      <span slot="footer" class="dialog-footer">
         <el-button @click="box = false">取 消</el-button>
-        <el-button type="primary"
-                   @click="submit">确 定</el-button>
+        <el-button type="primary" @click="submit">确 定</el-button>
       </span>
     </el-dialog>
   </basic-container>
 </template>
 
 <script>
-  import {add, getList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
-  import {mapGetters} from "vuex";
-  import website from '@/config/website';
+import { add, getList, getRole, getRoleTreeById, grant, grantTree, remove, update } from "@/api/system/role";
+import { mapGetters } from "vuex";
+import website from '@/config/website';
 
-  export default {
-    data() {
-      return {
-        form: {},
-        box: false,
-        props: {
-          label: "title",
-          value: "key"
-        },
-        menuGrantList: [],
-        dataScopeGrantList: [],
-        apiScopeGrantList: [],
-        apiGrantList: [],
-        menuTreeObj: [],
-        dataScopeTreeObj: [],
-        apiScopeTreeObj: [],
-        selectionList: [],
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0
-        },
-        option: {
-          tip: false,
-          simplePage: true,
-          searchShow: true,
-          searchMenuSpan: 6,
-          tree: true,
-          border: true,
-          index: true,
-          selection: true,
-          viewBtn: true,
-          dialogWidth: 900,
-          dialogClickModal: false,
-          column: [
-            {
-              label: "角色名称",
-              prop: "roleName",
-              search: true,
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入角色名称",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "所属企业",
-              prop: "tenantId",
-              type: "tree",
-              dicUrl: "/api/blade-system/tenant/select",
-              addDisplay: false,
-              editDisplay: false,
-              viewDisplay: website.tenantMode,
-              span: 24,
-              props: {
-                label: "tenantName",
-                value: "tenantId"
-              },
-              hide: !website.tenantMode,
-              search: website.tenantMode,
-              rules: [{
+export default {
+  data() {
+    return {
+      roleName: localStorage.getItem("roleName"),
+      form: {},
+      box: false,
+      props: {
+        label: "title",
+        value: "key"
+      },
+      menuGrantList: [],
+      dataScopeGrantList: [],
+      apiScopeGrantList: [],
+      apiGrantList: [],
+      menuTreeObj: [],
+      dataScopeTreeObj: [],
+      apiScopeTreeObj: [],
+      selectionList: [],
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      option: {
+        tip: false,
+        simplePage: true,
+        searchShow: true,
+        searchMenuSpan: 6,
+        tree: true,
+        border: true,
+        index: true,
+        selection: true,
+        viewBtn: true,
+        dialogWidth: 900,
+        dialogClickModal: false,
+        column: [
+          {
+            label: "角色名称",
+            prop: "roleName",
+            search: true,
+            span: 24,
+            rules: [
+              {
                 required: true,
-                message: "请输入所属企业",
-                trigger: "click"
-              }]
+                message: "请输入角色名称",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "所属企业",
+            prop: "tenantId",
+            type: "tree",
+            dicUrl: "/api/blade-system/tenant/select",
+            addDisplay: false,
+            editDisplay: false,
+            viewDisplay: website.tenantMode,
+            span: 24,
+            props: {
+              label: "tenantName",
+              value: "tenantId"
             },
-            {
-              label: "角色别名",
-              prop: "roleAlias",
-              search: true,
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入角色别名",
-                  trigger: "blur"
-                }
-              ]
-            },
-            {
-              label: "上级角色",
-              prop: "parentId",
-              dicData: [],
-              type: "tree",
-              hide: true,
-              span: 24,
-              props: {
-                label: "title"
-              },
-              rules: [
-                {
-                  required: false,
-                  message: "请选择上级角色",
-                  trigger: "click"
-                }
-              ]
+            hide: !website.tenantMode,
+            search: website.tenantMode,
+            rules: [{
+              required: true,
+              message: "请输入所属企业",
+              trigger: "click"
+            }]
+          },
+          {
+            label: "角色别名",
+            prop: "roleAlias",
+            search: true,
+            span: 24,
+            rules: [
+              {
+                required: true,
+                message: "请输入角色别名",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "上级角色",
+            prop: "parentId",
+            dicData: [],
+            type: "tree",
+            hide: true,
+            span: 24,
+            props: {
+              label: "title"
             },
-            {
-              label: "角色排序",
-              prop: "sort",
-              type: "number",
-              span: 24,
-              rules: [
-                {
-                  required: true,
-                  message: "请输入角色排序",
-                  trigger: "blur"
-                }
-              ]
-            }
-          ]
-        },
-        data: []
+            rules: [
+              {
+                required: false,
+                message: "请选择上级角色",
+                trigger: "click"
+              }
+            ]
+          },
+          {
+            label: "角色排序",
+            prop: "sort",
+            type: "number",
+            span: 24,
+            rules: [
+              {
+                required: true,
+                message: "请输入角色排序",
+                trigger: "blur"
+              }
+            ]
+          }
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["userInfo", "permission"]),
+    permissionList() {
+      return {
+        addBtn: !this.roleName.includes('admin') ? false : this.vaildData(this.permission.role_add, false),
+        viewBtn: this.vaildData(this.permission.role_view, false),
+        delBtn: !this.roleName.includes('admin') ? false : this.vaildData(this.permission.role_delete, false),
+        editBtn: !this.roleName.includes('admin') ? false : this.vaildData(this.permission.role_edit, false)
       };
     },
-    computed: {
-      ...mapGetters(["userInfo", "permission"]),
-      permissionList() {
-        return {
-          addBtn: this.vaildData(this.permission.role_add, false),
-          viewBtn: this.vaildData(this.permission.role_view, false),
-          delBtn: this.vaildData(this.permission.role_delete, false),
-          editBtn: this.vaildData(this.permission.role_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
 
+      });
+      return ids.join(",");
+    },
+    idsArray() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids;
+    }
+  },
+  methods: {
+    initData(roleId) {
+      getRoleTreeById(roleId).then(res => {
+        const column = this.findObject(this.option.column, "parentId");
+        column.dicData = res.data.data;
+      });
+    },
+    submit() {
+      const menuList = this.$refs.treeMenu.getCheckedKeys();
+      const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
+      const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
+      grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
+        this.box = false;
+        this.$message({
+          type: "success",
+          message: "操作成功!"
         });
-        return ids.join(",");
-      },
-      idsArray() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
+        this.onLoad(this.page);
+      });
+    },
+    rowSave(row, done, loading) {
+      add(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
         });
-        return ids;
-      }
+        done();
+      }, error => {
+        window.console.log(error);
+        loading();
+      });
     },
-    methods: {
-      initData(roleId){
-        getRoleTreeById(roleId).then(res => {
-          const column = this.findObject(this.option.column, "parentId");
-          column.dicData = res.data.data;
+    rowUpdate(row, index, done, loading) {
+      update(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
         });
-      },
-      submit() {
-        const menuList = this.$refs.treeMenu.getCheckedKeys();
-        const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
-        const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
-        grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
-          this.box = false;
+        done();
+      }, error => {
+        window.console.log(error);
+        loading();
+      });
+    },
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return remove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
           this.$message({
             type: "success",
             message: "操作成功!"
           });
-          this.onLoad(this.page);
         });
-      },
-      rowSave(row, done, loading) {
-        add(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
+    },
+
+    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();
+    },
+    beforeOpen(done, type) {
+      if (["add", "edit"].includes(type)) {
+        this.initData(this.form.id);
+      }
+      done();
+    },
+    handleRole() {
+      if (this.selectionList.length !== 1) {
+        this.$message.warning("只能选择一条数据");
+        return;
+      }
+      this.menuTreeObj = [];
+      this.dataScopeTreeObj = [];
+      this.apiScopeTreeObj = [];
+      grantTree()
+        .then(res => {
+          this.menuGrantList = res.data.data.menu;
+          this.dataScopeGrantList = res.data.data.dataScope;
+          this.apiScopeGrantList = res.data.data.apiScope;
+          getRole(this.ids).then(res => {
+            this.menuTreeObj = res.data.data.menu;
+            this.dataScopeTreeObj = res.data.data.dataScope;
+            this.apiScopeTreeObj = res.data.data.apiScope;
+            this.box = true;
           });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        update(row).then(() => {
+    },
+    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: "操作成功!"
           });
-          done();
-        }, error => {
-          window.console.log(error);
-          loading();
-        });
-      },
-      rowDel(row) {
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        })
-          .then(() => {
-            return remove(row.id);
-          })
-          .then(() => {
-            this.onLoad(this.page);
-            this.$message({
-              type: "success",
-              message: "操作成功!"
-            });
-          });
-      },
-
-      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();
-      },
-      beforeOpen(done, type) {
-        if (["add", "edit"].includes(type)) {
-          this.initData(this.form.id);
-        }
-        done();
-      },
-      handleRole() {
-        if (this.selectionList.length !== 1) {
-          this.$message.warning("只能选择一条数据");
-          return;
-        }
-        this.menuTreeObj = [];
-        this.dataScopeTreeObj = [];
-        this.apiScopeTreeObj = [];
-        grantTree()
-          .then(res => {
-            this.menuGrantList = res.data.data.menu;
-            this.dataScopeGrantList = res.data.data.dataScope;
-            this.apiScopeGrantList = res.data.data.apiScope;
-            getRole(this.ids).then(res => {
-              this.menuTreeObj = res.data.data.menu;
-              this.dataScopeTreeObj = res.data.data.dataScope;
-              this.apiScopeTreeObj = res.data.data.apiScope;
-              this.box = true;
-            });
-          });
-      },
-      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();
-          });
-      },
-      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;
-        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
-          this.data = res.data.data;
-          this.loading = false;
-          this.selectionClear();
+          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;
+      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        this.data = res.data.data;
+        this.loading = false;
+        this.selectionClear();
+      });
     }
-  };
+  }
+};
 </script>

+ 5 - 4
src/views/system/dept.vue

@@ -26,7 +26,7 @@
                   <el-button type="danger"
                              size="small"
                              icon="el-icon-delete"
-                             v-if="permission.dept_delete"
+                             v-if="permission.dept_delete&&roleName.includes('admin')"
                              plain
                              @click="handleDelete">删 除
                   </el-button>
@@ -89,6 +89,7 @@
       components: {SearchQuery},
     data() {
       return {
+        roleName: localStorage.getItem("roleName"),
         // 装货港数据
         polData:[],
         form: {},
@@ -385,10 +386,10 @@
       ...mapGetters(["userInfo", "permission"]),
       permissionList() {
         return {
-          addBtn: this.vaildData(this.permission.dept_add, false),
+          addBtn: this.roleName.includes('admin')?this.vaildData(this.permission.dept_add, false):false,
           viewBtn: this.vaildData(this.permission.dept_view, false),
-          delBtn: this.vaildData(this.permission.dept_delete, false),
-          editBtn: this.vaildData(this.permission.dept_edit, false)
+          delBtn: this.roleName.includes('admin')?this.vaildData(this.permission.dept_delete, false):false,
+          editBtn: this.roleName.includes('admin')?this.vaildData(this.permission.dept_edit, false):false
         };
       },
       ids() {

+ 5 - 4
src/views/system/post.vue

@@ -23,7 +23,7 @@
                    size="small"
                    icon="el-icon-delete"
                    plain
-                   v-if="permission.post_delete"
+                   v-if="permission.post_delete&&roleName.includes('admin')"
                    @click="handleDelete">删 除
         </el-button>
       </template>
@@ -43,6 +43,7 @@
   export default {
     data() {
       return {
+        roleName: localStorage.getItem("roleName"),
         form: {},
         query: {},
         loading: true,
@@ -149,10 +150,10 @@
       ...mapGetters(["permission"]),
       permissionList() {
         return {
-          addBtn: this.vaildData(this.permission.post_add, false),
+          addBtn: this.roleName.includes('admin')?this.vaildData(this.permission.post_add, false):false,
           viewBtn: this.vaildData(this.permission.post_view, false),
-          delBtn: this.vaildData(this.permission.post_delete, false),
-          editBtn: this.vaildData(this.permission.post_edit, false)
+          delBtn: this.roleName.includes('admin')?this.vaildData(this.permission.post_delete, false):false,
+          editBtn: this.roleName.includes('admin')?this.vaildData(this.permission.post_edit, false):false
         };
       },
       ids() {

+ 7 - 6
src/views/system/user.vue

@@ -35,20 +35,20 @@
                        size="small"
                        plain
                        icon="el-icon-delete"
-                       v-if="permission.user_delete"
+                       v-if="permission.user_delete&&roleName.includes('admin')"
                        @click="handleDelete">删 除
             </el-button>
             <el-button type="info"
                        size="small"
                        plain
-                       v-if="permission.user_role"
+                       v-if="permission.user_role&&roleName.includes('admin')"
                        icon="el-icon-user"
                        @click="handleGrant">角色配置
             </el-button>
             <el-button type="info"
                        size="small"
                        plain
-                       v-if="permission.user_reset"
+                       v-if="permission.user_reset&&roleName.includes('admin')"
                        icon="el-icon-refresh"
                        @click="handleReset">密码重置
             </el-button>
@@ -224,6 +224,7 @@
         }
       };
       return {
+        roleName: localStorage.getItem("roleName"),
         form: {},
         search:{},
         // 密码重置框是否可见
@@ -782,10 +783,10 @@
       ...mapGetters(["userInfo", "permission"]),
       permissionList() {
         return {
-          addBtn: this.vaildData(this.permission.user_add, false),
+          addBtn: this.roleName.includes('admin')?this.vaildData(this.permission.user_add, false):false,
           viewBtn: this.vaildData(this.permission.user_view, false),
-          delBtn: this.vaildData(this.permission.user_delete, false),
-          editBtn: this.vaildData(this.permission.user_edit, false)
+          delBtn: this.roleName.includes('admin')?this.vaildData(this.permission.user_delete, false):false,
+          editBtn: this.roleName.includes('admin')?this.vaildData(this.permission.user_edit, false):false
         };
       },
       platformPermissionList() {

+ 19 - 19
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -238,25 +238,25 @@ export default {
                             trigger: "blur"
                         }]
                     },
-                    {
-                        label: "花纹",
-                        prop: "brandItem",
-                        span: 8,
-                        type: 'select',
-                        filterable: true,
-                        allowCreate: true,
-                        dicData: [],
-                        props: {
-                            label: 'figure',
-                            value: 'figure',
-                            disabled: 'disabled'
-                        },
-                        rules: [{
-                            required: true,
-                            message: " ",
-                            trigger: "blur"
-                        }]
-                    },
+                    // {
+                    //     label: "花纹",
+                    //     prop: "brandItem",
+                    //     span: 8,
+                    //     type: 'select',
+                    //     filterable: true,
+                    //     allowCreate: true,
+                    //     dicData: [],
+                    //     props: {
+                    //         label: 'figure',
+                    //         value: 'figure',
+                    //         disabled: 'disabled'
+                    //     },
+                    //     rules: [{
+                    //         required: true,
+                    //         message: " ",
+                    //         trigger: "blur"
+                    //     }]
+                    // },
                     {
                         label: "尺寸",
                         prop: "goodsSize",

+ 3 - 1
src/views/tirePartsMall/basicData/costInformation/index.vue

@@ -3,7 +3,7 @@
       <avue-crud :option="option" :data="dataList" ref="crud" v-model="form" :page.sync="page" @row-del="rowDel"
         @row-update="rowUpdate" :before-open="beforeOpen" :before-close="beforeClose" @row-save="rowSave"
         @search-change="searchChange" @search-reset="searchReset" @on-load="onLoad"
-        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 371)"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 371)" :permission="permission"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 371)" @search-criteria-switch="searchCriteriaSwitch"
         @tree-load="treeLoad">
           <template slot-scope="{type,size,row,$index}" slot="menuLeft">
@@ -25,6 +25,8 @@
     name: "customerInformation",
     data() {
       return {
+        roleName: localStorage.getItem("roleName"),
+        permission: {},
         form: {},
         option: {},
         optionBack: {

+ 22 - 2
src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue

@@ -255,45 +255,53 @@ export default {
           {
             label: '合同号',
             prop: 'contractNumber',
+            overHidden: true,
             cell: false
           }, {
             label: '合同金额',
             prop: 'accountsAmount',
+            overHidden: true,
             cell: false
           }, {
             label: '已收款',
             prop: 'settlmentAmount',
+            overHidden: true,
             cell: false,
             decimals: 2
           }, {
             label: '本次金额',
             prop: 'thisAmount',
+            overHidden: true,
             width: 140,
           }, {
             label: '本次退货金额',
             prop: 'thisRefundAmount',
+            overHidden: true,
             width: 140,
           },
           {
             label: '发票金额',
             prop: 'invoiceAmount',
+            overHidden: true,
             width: 100,
           },
           {
             label: '发票号',
             prop: 'invoiceNo',
+            overHidden: true,
             cell: true,
             width: 100,
           },
           {
             label: '发票日期',
             prop: "invoiceDate",
+            overHidden: true,
             disabled: false,
             cell: true,
             type: "date",
             width: 140,
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
           },
           {
             label: '来源主表id',
@@ -303,24 +311,33 @@ export default {
           }, {
             label: '来源单据编号',
             prop: 'srcBillNo',
+            overHidden: true,
             hide: true,
             showColumn: false,
             cell: false
           }, {
             label: '所属公司id',
             prop: 'salesCompanyId',
+            overHidden: true,
             hide: true,
             showColumn: false,
             cell: false
           }, {
-            label: '所属公司名称',
+            label: '所属公司',
             prop: 'salesCompanyName',
+            overHidden: true,
             hide: true,
             showColumn: false,
             cell: false
           }, {
+            label: '业务公司',
+            prop: 'logisticsCorpName',
+            overHidden: true,
+            cell: false
+          }, {
             label: '业务日期',
             prop: "businesDate",
+            overHidden: true,
             disabled: false,
             type: "datetime",
             format: "yyyy-MM-dd",
@@ -335,6 +352,7 @@ export default {
           }, {
             label: '备注',
             prop: 'remarks',
+            overHidden: true,
             cell: true
           }]
       }
@@ -518,6 +536,8 @@ export default {
         item.srcBillNo = item.ordNo
         item.salesCompanyId = item.salesCompanyId
         item.salesCompanyName = item.salesCompanyName
+        item.logisticsCorpId = item.logisticsCorpId
+        item.logisticsCorpName = item.logisticsCorpName
         item.id = null
         delete item.ordNo;
         this.$refs.formContacts.rowCellAdd(item);

+ 20 - 11
src/views/tirePartsMall/financialManagement/collectionSettlement/index.vue

@@ -112,7 +112,7 @@ export default {
           // remote: true,
           // filterable:true,
           searchOrder: 1,
-          width:140,
+          width: 140,
           // type: 'select',
           overHidden: true,
           // props: {
@@ -135,18 +135,27 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss"
-        }, {
-          label: "所属公司",
-          prop: "salesCompanyId",
-          search: true,
+        },
+        {
+          label: '业务公司',
           type: 'select',
-          searchOrder: 6,
+          prop: "logisticsCorpId",
+          hide:true,
+          showColumn:false,
+          filterable: true,
+          search: true,
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=tyre_express_company",
           props: {
-            label: 'fullName',
-            value: 'id'
-          },
-          dicUrl: '/api/blade-system/dept/top-list'
-        }, {
+            label: "dictValue",
+            value: "dictValue"
+          }
+        },
+        {
+          label: '业务公司',
+          prop: "logisticsCorpName",
+          overHidden: true,
+        },
+        {
           label: '账户',
           prop: "accountName",
           searchOrder: 4,

+ 8 - 21
src/views/tirePartsMall/financialManagement/paymentSettlement/detailsPage.vue

@@ -254,26 +254,6 @@ export default {
           {
             label: '发票金额',
             prop: 'invoiceAmount',
-            width: 100,
-          },
-          {
-            label: '发票号',
-            prop: 'invoiceNo',
-            cell: true,
-            width: 100,
-          },
-          {
-            label: '发票日期',
-            prop: "invoiceDate",
-            disabled: false,
-            cell: true,
-            type: "date",
-            width: 140,
-            format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
-          },{
-            label: '发票金额',
-            prop: 'invoiceAmount',
             width: 140,
           }, 
           {
@@ -287,9 +267,14 @@ export default {
             disabled: false,
             type: "datetime",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
           }, 
           {
+            label: '业务公司',
+            prop: 'logisticsCorpName',
+            cell: false
+          },
+          {
             label: '业务日期',
             prop: "businesDate",
             disabled: false,
@@ -523,6 +508,8 @@ export default {
         item.srcBillNo = item.ordNo
         item.salesCompanyId = item.salesCompanyId
         item.salesCompanyName = item.salesCompanyName
+        item.logisticsCorpId = item.logisticsCorpId
+        item.logisticsCorpName = item.logisticsCorpName
         item.id = null
         delete item.ordNo;
         this.$refs.formContacts.rowCellAdd(item);

+ 27 - 7
src/views/tirePartsMall/financialManagement/saleDetail/index.vue

@@ -129,7 +129,7 @@ export default {
                 // searchIndex: 2,
                 // highlightCurrentRow: true,
                 border: true,
-                searchMenuSpan: 24,
+                searchMenuSpan: 1824,
                 addBtn: false,
                 showSummary: true,
                 summaryText: "合计",
@@ -161,7 +161,7 @@ export default {
                     overHidden: true,
                     search: true,
                     searchslot: true,
-                    width:140,
+                    width: 140,
                     searchOrder: 3
                 }, {
                     label: '业务员',
@@ -188,6 +188,18 @@ export default {
                     prop: 'businesDate',
                     overHidden: true,
                 }, {
+                    label: '业务公司',
+                    prop: 'logisticsCorpName',
+                    overHidden: true,
+                    search: true,
+                    type: 'select',
+                    filterable: true,
+                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=tyre_express_company",
+                    props: {
+                        label: "dictValue",
+                        value: "dictValue"
+                    }
+                }, {
                     label: '出库时间',
                     prop: 'deliveryBusinesDate',
                     overHidden: true,
@@ -263,11 +275,18 @@ export default {
                     label: '成本',
                     prop: 'costprie',
                     overHidden: true,
-                }, {
+                },
+                {
                     label: '毛利',
                     prop: 'profit',
                     overHidden: true,
-                }, {
+                },
+                {
+                    label: '发票金额',
+                    prop: 'invoiceAmount',
+                    overHidden: true,
+                },
+                {
                     label: '业务开始',
                     prop: 'businesDateStart',
                     overHidden: true,
@@ -312,9 +331,6 @@ export default {
                     label: '单据状态',
                     prop: 'status',
                     overHidden: true,
-                    // search: true,
-                    // searchslot: true,
-                    // searchOrder: 8
                 },
                 {
                     label: '业务类型',
@@ -324,6 +340,10 @@ export default {
                     searchslot: true,
                     searchOrder: 8
                 }, {
+                    label: '制单人',
+                    prop: 'createUserName',
+                    overHidden: true,
+                }, {
                     label: '包含未发货',
                     prop: 'isContain',
                     overHidden: true,

+ 30 - 12
src/views/tirePartsMall/productionManagement/productionOrder/detailsPage.vue

@@ -270,6 +270,11 @@ export default {
                         precision: 2,
                         controls: false,
                         disabled: false,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
                     },
                     {
                         label: '仓库',
@@ -471,16 +476,6 @@ export default {
                         label: '备注',
                         prop: 'remarks',
                         overHidden: true,
-                    },
-                    {
-                        label: '自有数',
-                        prop: 'sendNumHave',
-                        overHidden: true,
-                    },
-                    {
-                        label: '代采数',
-                        prop: 'sendNumFinancing',
-                        overHidden: true,
                     }
                 ]
             },
@@ -520,8 +515,31 @@ export default {
                     this.form.goodsId = row.goodsId
                     this.form.goodsName = row.goodsName
                     getGoodsDetail({ id: row.id }).then(res => {
-                        this.form.attributeItemsList = res.data.data.attributeItemsList.filter(e => e.whetherOpen == 1)
-                        this.form.craftItemsList = res.data.data.craftItemsList.filter(e => e.whetherOpen == 1)
+                        res.data.data.attributeItemsList.forEach(item=>{
+                            delete item.id
+                        })
+                        res.data.data.craftItemsList.forEach(item=>{
+                            delete item.id
+                        })
+                        res.data.data.attributeItemsList.forEach(e=>{
+                            if(e.whetherOpen == 1){
+                                this.form.attributeItemsList.push({
+                                    attributeNo:e.attributeNo,
+                                    attributeName:e.attributeName,
+                                    attributeValue:e.attributeValue,
+                                    type:e.attributeValue
+                                })
+                            }
+                        })
+                        res.data.data.craftItemsList.forEach(e=>{
+                            if(e.whetherOpen == 1){
+                                this.form.craftItemsList.push({
+                                    productionProcesses:e.productionProcesses,
+                                    assemblyMileageProgress:e.assemblyMileageProgress,
+                                    type:e.type
+                                })
+                            }
+                        })
                     })
                 } else {
                     this.form.goodsId = null

+ 9 - 2
src/views/tirePartsMall/productionManagement/productionOrder/index.vue

@@ -52,7 +52,7 @@ export default {
                 menuWidth: 140,
                 tip: false,
                 searchShow: true,
-                searchMenuSpan: 24,
+                searchMenuSpan: 18,
                 border: true,
                 index: true,
                 addBtn: false,
@@ -81,10 +81,17 @@ export default {
                         searchOrder: 1,
                     },
                     {
-                        label: "订单编号",
+                        label: '业务编号',
                         prop: "billno",
                         overHidden: true,
                         search: true,
+                        searchOrder: 1.1,
+                    },
+                    {
+                        label: "订单编号",
+                        prop: "ordNo",
+                        overHidden: true,
+                        search: true,
                         searchOrder: 2,
                     },
                     {

+ 3 - 2
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -128,7 +128,8 @@ import {
     goodsDetail,
     dotList,
     getWarehouseKeeper,
-    dotListAll
+    dotListAll,
+    removeItem
 } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -1007,7 +1008,7 @@ export default {
                 })
                 // 有id 的处理
                 if (itemsWithId.length != 0) {
-                    tradingBox(arrIds.join(',')).then(res => {
+                    removeItem(arrIds.join(',')).then(res => {
                         this.$message.success("操作成功!");
                     });
                 }

+ 70 - 53
src/views/tirePartsMall/salesManagement/purchaseOrder/index.vue

@@ -3,7 +3,7 @@
     <basic-container v-show="!detailsOpen">
       <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
         ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
-        @expand-change="expandChange" @refresh-change="refreshChange"
+        @expand-change="expandChange" @refresh-change="refreshChange" @selection-change="selectionChange"
         @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 274.4)"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 274.4)" :page.sync="page">
         <template slot-scope="{ row }" slot="expand">
@@ -35,8 +35,7 @@
           <!-- <el-button :size="size" :type="type" @click="check(row)">查看</el-button> -->
           <!--  判断是否一键采购过 然后展示不同的判断按钮-->
           <el-button v-if="row.shortcutWarehousingStatus == '1'" :size="size" :type="type"
-                     :disabled="row.status != '录入' && row.item >= 1"
-                     @click="$refs.crud.rowDel(row, index)">删除</el-button>
+            :disabled="row.status != '录入' && row.item >= 1" @click="$refs.crud.rowDel(row, index)">删除</el-button>
 
           <el-button v-else :size="size" :type="type"
             :disabled="row.status != '录入' && row.status != '待确认' && row.item >= 1 || row.numberRows >= 1"
@@ -46,10 +45,12 @@
           <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
         </template>
         <template slot="notCompleteSearch">
-          <el-checkbox v-model="search.notComplete" true-label="1" ></el-checkbox>
+          <el-checkbox v-model="search.notComplete" true-label="1"></el-checkbox>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
           <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
+          <el-button type="primary" :size="size" @click="copyOrder"
+            :disabled="selectionList.length != 1">复制订单</el-button>
           <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
         </template>
         <template slot-scope="{ row, index }" slot="ordNo">
@@ -68,10 +69,10 @@
 </template>
 
 <script>
-import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { getList, remove, getGoodsInfo, getCopy } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import detailsPage from "./detailsPage"
 import { getDetails } from "@/api/tirePartsMall/salesManagement/saleOrder";
-import {getToken} from "@/util/auth";
+import { getToken } from "@/util/auth";
 
 export default {
   name: "index",
@@ -80,9 +81,10 @@ export default {
   },
   data() {
     return {
+      selectionList: [],
       orderStatusList: [],
       actualStatusList: [],
-      returnStatusList:[],
+      returnStatusList: [],
       detailsOpen: false,
       loading: false,
       search: {},
@@ -260,6 +262,8 @@ export default {
         dialogWidth: "70%",
         summaryText: "合计",
         showSummary: true,
+        tip: false,
+        selection: true,
         sumColumnList: [{
           name: 'goodsTotalNum',
           type: 'sum',
@@ -303,8 +307,8 @@ export default {
           // type: 'select',
           search: true,
           overHidden: true,
-          cell:true,
-          width:140,
+          cell: true,
+          width: 140,
           // filterable:true,
           // remote:true,
           // props: {
@@ -355,18 +359,18 @@ export default {
           label: '数量',
           prop: "goodsTotalNum",
           overHidden: true,
-        }, 
+        },
         // {
         //   label: '金额',
         //   prop: "totalMoney",
         //   overHidden: true,
         // }, 
         {
-                label: '已付金额',
-                prop: "paymentAmountTl",
-                disabled: true
-            }, 
-            {
+          label: '已付金额',
+          prop: "paymentAmountTl",
+          disabled: true
+        },
+        {
           label: '状态',
           prop: "status",
           search: true,
@@ -381,7 +385,7 @@ export default {
         {
           label: '结算状态',
           prop: "actualPaymentStatus",
-          searchProp:'actualPaymentType',
+          searchProp: 'actualPaymentType',
           search: true,
           overHidden: true,
           type: 'select',
@@ -486,21 +490,21 @@ export default {
   },
   activated() {
     setTimeout(() => {
-      console.log(this.$route.query,400);
+      console.log(this.$route.query, 400);
       if (this.$route.query.srcId) {
         this.$store.commit("IN_LTCG_STATUS");
         this.editOpen({ id: this.$route.query.srcId }, 1)
       }
-        // 主页快捷跳转来的 直接打开新建订单
-        if (this.$route.query.showTrue) {
-            this.$store.commit("IN_LTCG_STATUS");
-            this.detailsOpen = true;
-        }
+      // 主页快捷跳转来的 直接打开新建订单
+      if (this.$route.query.showTrue) {
+        this.$store.commit("IN_LTCG_STATUS");
+        this.detailsOpen = true;
+      }
       if (this.$route.query.check) {
         this.editOpen({ id: this.$route.query.check.srcBillId }, 1)
         this.$store.commit("IN_LTCG_STATUS");
       }
-      if(this.$route.query.type == 'F'){
+      if (this.$route.query.type == 'F') {
         this.editOpen({ id: this.$route.query.detail.srcParentId }, 1)
       }
       this.detailData = {
@@ -528,34 +532,37 @@ export default {
     });
   },
   methods: {
-      // 导出
-      outExport() {
-          console.log(this.search,412)
-          let config = { params: { ...this.search } }
-          if (config.params) {
-              for (const propName of Object.keys(config.params)) {
-                  const value = config.params[propName];
-                  if (value !== null && typeof (value) !== "undefined") {
-                      if (value instanceof Array) {
-                          for (const key of Object.keys(value)) {
-                              let params = propName + '[' + key + ']';
-                              config.params[params] = value[key]
-                          }
-                          delete config.params[propName]
-                      }
-                  }
+    selectionChange(list) {
+      this.selectionList = list
+    },
+    // 导出
+    outExport() {
+      console.log(this.search, 412)
+      let config = { params: { ...this.search } }
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
               }
+              delete config.params[propName]
+            }
           }
-          config.params.bsType = 'CG'
-          console.log(config,427)
-          const routeData = this.$router.resolve({
-              path: '/api/blade-sales-part/order/listExport',      //跳转目标下载地址
-              query: {
-                  ...config.params    //括号内是要传递给新窗口的参数
-              }
-          })
-          window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
-      },
+        }
+      }
+      config.params.bsType = 'CG'
+      console.log(config, 427)
+      const routeData = this.$router.resolve({
+        path: '/api/blade-sales-part/order/listExport',      //跳转目标下载地址
+        query: {
+          ...config.params    //括号内是要传递给新窗口的参数
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    },
     check(row) {
       this.form = row
       this.detailsOpen = true
@@ -585,6 +592,15 @@ export default {
       this.$store.commit("IN_LTCG_STATUS");
       this.detailsOpen = true;
     },
+    copyOrder() {
+      this.loading = true
+      getCopy({ id: this.selectionList[0].id }).then(res => {
+        this.editOpen(res.data.data, 2)
+        this.onLoad(this.page, this.search)
+      }).finally(() => {
+        this.loading = false
+      })
+    },
     //刷新
     refreshChange() {
       this.onLoad(this.page, this.search)
@@ -606,9 +622,9 @@ export default {
       }).catch(() => {
       });
     },
-      // 点击搜索触发
+    // 点击搜索触发
     searchChange(params, done) {
-        this.page.currentPage = 1
+      this.page.currentPage = 1
       done();
       this.onLoad(this.page, params)
     },
@@ -643,7 +659,7 @@ export default {
     },
     expandChange(row) {
       if (!row.itemData) {
-        getDetails({ id: row.id})
+        getDetails({ id: row.id })
           .then(res => {
             this.dataList[row.$index].itemData = res.data.data.orderItemsList;
           })
@@ -686,7 +702,8 @@ export default {
   color: #fff;
   font-size: 10px;
 }
+
 /deep/ .el-col-md-8 {
-    width: 24.33333%;
+  width: 24.33333%;
 }
 </style>

+ 8 - 7
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -732,8 +732,9 @@ export default {
                         value: "dictValue"
                     },
                     value: '物流',
-                }, {
-                    label: '货运公司',
+                }, 
+                {
+                    label: '业务公司',
                     type: 'select',
                     prop: "logisticsCorpName",
                     allowCreate: true,
@@ -745,11 +746,11 @@ export default {
                         value: "dictValue"
                     }
                 },
-                {
-                    label: '货运单号',
-                    disabled: false,
-                    prop: "expressNo"
-                },
+                // {
+                //     label: '货运单号',
+                //     disabled: false,
+                //     prop: "expressNo"
+                // },
                 {
                     label: '成本',
                     prop: "cost",

+ 36 - 5
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -3,7 +3,7 @@
     <basic-container v-show="!detailsOpen">
       <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
         ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
-        @expand-change="expandChange" @refresh-change="refreshChange"
+        @expand-change="expandChange" @refresh-change="refreshChange" @selection-change="selectionChange"
         @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 269)"
         @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 269)" :page.sync="page">
         <template slot-scope="{ row }" slot="status">
@@ -46,6 +46,8 @@
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
           <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
+          <el-button type="primary" :size="size" @click="copyOrder"
+            :disabled="selectionList.length != 1">复制订单</el-button>
           <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
         </template>
         <template slot-scope="{ row, index }" slot="ordNo">
@@ -64,7 +66,7 @@
 </template>
 
 <script>
-import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { getList, remove, getGoodsInfo, getCopy } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import detailsPage from "./detailsPage"
 import { getDetails } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import { getToken } from "@/util/auth";
@@ -76,6 +78,7 @@ export default {
   },
   data() {
     return {
+      selectionList: [],
       detailsOpen: false,
       orderStatusList: [],
       actualStatusList: [],
@@ -198,7 +201,7 @@ export default {
         size: "small",
         menuWidth: 50,
         searchSpan: 6,
-        searchMenuSpan: 18,
+        searchMenuSpan: 12,
         searchIcon: true,
         expand: true,
         expandWidth: 60,
@@ -207,6 +210,8 @@ export default {
         dialogWidth: "70%",
         summaryText: "合计",
         showSummary: true,
+        tip: false,
+        selection: true,
         sumColumnList: [{
           name: 'goodsTotalNum',
           type: 'sum',
@@ -248,7 +253,8 @@ export default {
             label: "dictValue",
             value: "dictKey"
           }
-        }, {
+        },
+        {
           label: '所属公司',
           prop: "salesCompanyName",
           overHidden: true,
@@ -271,6 +277,19 @@ export default {
           // dicUrl: '/api/blade-sales-part/corpsDesc/list?current=1&size=20&corpType=KH&cname={{key}}',
         },
         {
+          label: '业务公司',
+          prop: "logisticsCorpName",
+          search: true,
+          overHidden: true,
+          type: 'select',
+          filterable: true,
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=tyre_express_company",
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          }
+        },
+        {
           label: '业务员',
           disabled: false,
           prop: "salerName",
@@ -529,7 +548,7 @@ export default {
       this.orderStatusList = res.data.data
       console.log(this.orderStatusList);
     });
-    this.getWorkDicts("settlement_Status").then(res => {
+    this.getWorkDicts("settlementsale_Status").then(res => {
       this.actualStatusList = res.data.data
     });
     this.getWorkDicts("return_Status").then(res => {
@@ -537,6 +556,9 @@ export default {
     });
   },
   methods: {
+    selectionChange(list) {
+      this.selectionList = list
+    },
     // 导出
     outExport() {
       console.log(this.search, 412)
@@ -595,6 +617,15 @@ export default {
       this.$store.commit("IN_LTXS_STATUS");
       this.detailsOpen = true;
     },
+    copyOrder() {
+      this.loading = true
+      getCopy({ id: this.selectionList[0].id }).then(res => {
+        this.editOpen(res.data.data, 2)
+        this.onLoad(this.page, this.search)
+      }).finally(() => {
+        this.loading = false
+      })
+    },
     //刷新
     refreshChange() {
       this.onLoad(this.page, this.search)

+ 3 - 2
src/views/tirePartsMall/salesService/inStorage/detailsPage.vue

@@ -124,7 +124,8 @@ import {
     goodsDetail,
     dotList,
     getWarehouseKeeper,
-    dotListAll
+    dotListAll,
+    removeItem
 } from "@/api/tirePartsMall/salesService/outboundWorkOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -998,7 +999,7 @@ export default {
                 })
                 // 有id 的处理
                 if (itemsWithId.length != 0) {
-                    tradingBox(arrIds.join(',')).then(res => {
+                    removeItem(arrIds.join(',')).then(res => {
                         this.$message.success("操作成功!");
                     });
                 }