Browse Source

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002390 1 year ago
parent
commit
35e97a9692

+ 3 - 2
src/views/business/spd/bo/basic/process.vue

@@ -1416,8 +1416,9 @@
       </el-tab-pane>
       <el-tab-pane label="跟进记录" name="tA" style="height: 200px; overflow-y: scroll" v-if="tabsName.A">
         <BehaviorList
-          :source="'BoDetails'"
-          :bo="behaviorParame"
+          :source="'Bo'"
+          :bo="form"
+          :query="behaviorParame"
           :boAuthority="boAuthority"
           v-if="activeName == 'tA'"
         />

+ 22 - 16
src/views/business/spd/bo/behavior/behaviorList.vue

@@ -1,17 +1,15 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="10" class="mb8" v-if="this.bo.winningState == 0">
-      <el-col :span="1.5">
-        <el-button
+    <div class="btn_grooup" v-if="bo.winningState == 0 ? true : false">
+      <el-button
           type="primary"
           plain
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-if="this.boAuthority.boAuthority.behaviorAdd"
+          v-if="boAuthority.boAuthority.behaviorAdd"
         >新增</el-button>
-      </el-col>
-    </el-row>
+    </div>
     <el-table v-loading="loading" :data="behaviorList">
       <el-table-column label="负责人" align="center" prop="staffName" />
       <el-table-column label="行动日期" align="center" prop="time" />
@@ -55,7 +53,6 @@
             type="text"
             icon="el-icon-view"
             @click="handleBrowse(scope.row)"
-            :disabled="!boAuthority.boAuthority.behaviorView"
           >查看</el-button>
         </template>
       </el-table-column>
@@ -265,7 +262,7 @@ import SaleaeaRef from '@/views/business/spd/bo/refer/saleaea/index.vue';
 
 export default {
   name: "BehaviorList",
-  props:["bo","boAuthority"],
+  props:["source","bo","query","boAuthority"],
   dicts: ['mk_bo_behavior_res','mk_bo_behavior_type','sys_yes_no','mk_bo_behavior_goal'],
   components: {ContactRef,SaleaeaRef},
   data() {
@@ -345,17 +342,21 @@ export default {
     };
   },
   created() {
-    console.log('this.boAuthority',this.boAuthority);
-    this.queryParams.bo = this.bo.id;
-    this.queryParams.boStage = this.bo.boStage;
-    let params = {"post":this.boAuthority.post};
-    this.queryParams.params = params;
+    console.log("this.bo",this.bo);
+    if(this.source == "Task"){
+      this.queryParams.task = this.query.id;
+    }
+    if(this.source == "Bo"){
+      this.queryParams.bo = this.query.id;
+      this.queryParams.boStage = this.query.boStage;
+      let params = {"post":this.boAuthority.post};
+      this.queryParams.params = params;
+    }
     this.getList();
   },
   methods: {
     uploadPic(file, fileList) {
       this.fileList = fileList
-      console.log('this.fileList',this.fileList);
     },
     handleRemove(file) {
       this.fileList = this.fileList.filter(item => item.uid !== file.uid)
@@ -467,7 +468,6 @@ export default {
       getBehavior(id).then(response => {
         this.form = response.data;
         this.fileList = this.form.behaviorPs;
-        console.log('this.fileList',this.fileList);
         this.open = true;
         this.operatingState = "Browse";
         this.title = "基础信息";
@@ -574,4 +574,10 @@ export default {
   overflow-y: auto;
   overflow-x: auto;
 }
-</style>
+
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>

+ 12 - 7
src/views/business/spd/bo/contact/contactList.vue

@@ -1,8 +1,7 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="10" class="mb8" v-if="this.bo.winningState == 0">
-      <el-col :span="1.5">
-        <el-button
+    <div class="btn_grooup" v-if="this.bo.winningState == 0">
+      <el-button
           type="primary"
           plain
           icon="el-icon-plus"
@@ -10,9 +9,7 @@
           @click="handleAdd"
           v-if="this.boAuthority.boAuthority.contactAdd"
         >新增</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+    </div>
     <el-table v-loading="loading" :data="contactList">
       <el-table-column label="序号" type="index" width="50" align="center" fixed/>
       <el-table-column width="300" label="编号" align="center" prop="code" />
@@ -300,7 +297,7 @@
           <el-col :span="8">
           </el-col>
         </el-row>
-        <el-tabs v-model="activeName" @tab-click="handleClick" v-if="this.operatingState != 'Insert'">
+        <el-tabs v-model="activeName" v-if="this.operatingState != 'Insert'">
           <el-tab-pane label="学历信息" name="first">
             <EducationList  :key="timer" :supForm="this.form" />
           </el-tab-pane>
@@ -586,3 +583,11 @@ export default {
   }
 };
 </script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>

+ 18 - 40
src/views/business/spd/bo/pojpsn/pojpsnList.vue

@@ -1,45 +1,15 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="10" class="mb8" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          :disabled="!pojpsnAuthority.pojpsnAdd"
-          >新增</el-button
-        >
-      </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          >修改</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          >删除</el-button
-        >
-      </el-col> -->
-      <!-- <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar> -->
-    </el-row>
-
+    <div class="btn_grooup" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
+      <el-button
+        type="primary"
+        plain
+        icon="el-icon-plus"
+        size="mini"
+        @click="handleAdd"
+        v-if="pojpsnAuthority.pojpsnAdd"
+        >新增</el-button>
+    </div>
     <el-table
       v-loading="loading"
       :data="pojpsnList"
@@ -385,3 +355,11 @@ export default {
   },
 };
 </script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>

+ 20 - 36
src/views/business/spd/bo/task/index.vue

@@ -215,7 +215,7 @@
         :model="form"
         :rules="rules"
         label-width="80px"
-        :disabled="this.operatingState == 'Browse'"
+        :disabled="operatingState == 'Browse'"
       >
         <el-row>
           <el-col :span="8">
@@ -350,26 +350,18 @@
         <el-row>
           <el-col :span="8">
             <el-form-item label="销售组织" prop="salesOrgName">
-              <el-input v-model="form.salesOrgName" :disabled="true">
-                <el-button
-                  slot="append"
-                  icon="el-icon-more"
-                  @click="refereOrg"
-                  :disabled="true"
-                ></el-button>
-              </el-input>
+              <el-input
+                v-model="form.salesOrgName"
+                readonly
+              />
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="部门" prop="deptName">
-              <el-input v-model="form.deptName" :disabled="true">
-                <el-button
-                  slot="append"
-                  icon="el-icon-more"
-                  @click="refereDept"
-                  :disabled="true"
-                ></el-button>
-              </el-input>
+              <el-input
+                v-model="form.deptName"
+                readonly
+              />
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -432,10 +424,10 @@
 
       <BehaviorList
           :key="timer"
-          :source="'TaskList'"
-          :bo="this.form"
+          :source="'Task'"
+          :query="form"
           :boAuthority="boAuthority"
-          v-if="this.operatingState == 'Browse'"
+          v-if="operatingState == 'Browse'"
         />
         
       <div slot="footer">
@@ -443,7 +435,7 @@
           size="mini"
           type="primary"
           @click="submitForm"
-          v-if="this.operatingState != 'Browse'"
+          v-if="operatingState != 'Browse'"
           >确 定</el-button
         >
         <el-button size="mini" @click="cancel">取 消</el-button>
@@ -462,22 +454,13 @@
 <script>
 import { listTask, getTask, delTask, addTask, updateTask,submit } from "@/api/business/spd/bo/task";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import CustomerRef from "@/views/business/spd/bo/refer/customer/index.vue";
-import ContactRef from "@/views/business/spd/bo/refer/contact/index.vue";
-import OrgRef from "@/views/business/spd/bo/refer/org/index.vue";
-import DeptRef from "@/views/business/spd/bo/refer/dept/index.vue";
 import StaffRef from "@/views/business/spd/bo/refer/staff/index.vue";
 import BehaviorList from "../behavior/behaviorList.vue";
-import { getPsnPost } from "@/api/business/spd/bo/authority";
 
 export default {
   name: "Task",
     dicts: ["mk_bo_taskstate", "mk_bo_tasktype", "mk_bo_stage"],
     components: {
-      CustomerRef,
-      ContactRef,
-      OrgRef,
-      DeptRef,
       StaffRef,
       BehaviorList,
     },
@@ -567,7 +550,7 @@ export default {
     /** 查询任务列表 */
     getList() {
       this.loading = true;
-      this.queryParams.staff = this.$store.state.user.id;
+      this.queryParams.params = {source:"list"};
       listTask(this.queryParams).then(response => {
         this.taskList = response.rows;
         this.total = response.total;
@@ -636,11 +619,12 @@ export default {
         this.open = true;
         this.operatingState = "Browse";
         this.title = "基础信息";
-        //加载权限数据
-        getPsnPost(this.form.bo).then((response) => {
-          this.boAuthority = response.data;
-          this.timer = new Date().getTime();
-        });
+        this.timer = new Date().getTime();
+        // //加载权限数据
+        // getPsnPost(this.form.bo).then((response) => {
+        //   this.boAuthority = response.data;
+          
+        // });
       });
     },
     /** 新增按钮操作 */

+ 30 - 61
src/views/business/spd/bo/task/taskList.vue

@@ -1,33 +1,15 @@
 <template>
   <div class="app-container">
-    <el-row
-      :gutter="10"
-      class="mb8"
-      v-if="
-        this.source == 'BoDetails'
-          ? this.bo.winningState == 0
-            ? true
-            : false
-          : true
-      "
-    >
-      <el-col :span="1.5">
-        <el-button
+    <div class="btn_grooup" v-if="bo.winningState == 0 ? true : false">
+      <el-button
           type="primary"
           plain
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-if="this.boAuthority.boAuthority.taskAdd"
-          >新增</el-button
-        >
-      </el-col>
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
-    </el-row>
-
+          v-if="boAuthority.boAuthority.taskAdd"
+          >新增</el-button>
+    </div>
     <el-table
       v-loading="loading"
       :data="taskList"
@@ -80,13 +62,7 @@
         fixed="right"
         align="center"
         class-name="small-padding fixed-width"
-        v-if="
-          this.source == 'BoDetails'
-            ? this.bo.winningState == 0
-              ? true
-              : false
-            : true
-        "
+        v-if="bo.winningState == 0 ? true : false"
       >
         <template slot-scope="scope">
           <el-button
@@ -142,7 +118,7 @@
         :model="form"
         :rules="rules"
         label-width="80px"
-        :disabled="this.operatingState == 'Browse'"
+        :disabled="operatingState == 'Browse'"
       >
         <el-row>
           <el-col :span="8">
@@ -330,10 +306,10 @@
 
       <BehaviorList
           :key="timer"
-          :source="'TaskList'"
-          :bo="this.form"
+          :source="'Task'"
+          :query="form"
           :boAuthority="boAuthority"
-          v-if="this.operatingState == 'Browse'"
+          v-if="operatingState == 'Browse'"
         />
         
       <div slot="footer">
@@ -341,7 +317,7 @@
           size="mini"
           type="primary"
           @click="submitForm"
-          v-if="this.operatingState != 'Browse'"
+          v-if="operatingState != 'Browse'"
           :disabled="submitButtonEditStatus"
           >确 定</el-button
         >
@@ -366,22 +342,14 @@ import {
   updateTask,
 } from "@/api/business/spd/bo/task";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import CustomerRef from "@/views/business/spd/bo/refer/customer/index.vue";
-import ContactRef from "@/views/business/spd/bo/refer/contact/index.vue";
-import OrgRef from "@/views/business/spd/bo/refer/org/index.vue";
-import DeptRef from "@/views/business/spd/bo/refer/dept/index.vue";
 import StaffRef from "@/views/business/spd/bo/refer/staff/index.vue";
 import BehaviorList from "../behavior/behaviorList.vue";
 
 export default {
   name: "TaskList",
-  props: ["source", "bo", "boAuthority"],
+  props: ["bo", "boAuthority"],
   dicts: ["mk_bo_taskstate", "mk_bo_tasktype", "mk_bo_stage"],
   components: {
-    CustomerRef,
-    ContactRef,
-    OrgRef,
-    DeptRef,
     StaffRef,
     BehaviorList,
   },
@@ -498,16 +466,11 @@ export default {
     };
   },
   created() {
-    if (this.source == "BoDetails") {
-      this.queryParams.bo = this.bo.id;
-      let params = {"post":this.boAuthority.post};
-      this.queryParams.params = params;
-    }
-    if (this.source == "Task") {
-      this.queryParams = this.bo;
-    }
+    console.log("this.bo",this.bo);
+    this.queryParams.bo = this.bo.id;
+    let params = {"post":this.boAuthority.post};
+    this.queryParams.params = params;
     this.getList();
-    console.log('this.boAuthority',this.boAuthority);
   },
   methods: {
     /** 查询任务列表 */
@@ -577,14 +540,12 @@ export default {
     handleAdd() {
       this.operatingState = "Insert";
       this.reset();
-      if (this.source == "BoDetails") {
-        this.form.bo = this.bo.id;
-        this.form.boName = this.bo.boName;
-        this.form.boStage = this.bo.boStage;
-        this.form.customer = this.bo.customer;
-        this.form.customerName = this.bo.customerName;
-        this.form.startTime = new Date();
-      }
+      this.form.bo = this.bo.id;
+      this.form.boName = this.bo.boName;
+      this.form.boStage = this.bo.boStage;
+      this.form.customer = this.bo.customer;
+      this.form.customerName = this.bo.customerName;
+      this.form.startTime = new Date();
       this.form.state = "0";
       this.open = true;
       this.title = "添加任务";
@@ -675,3 +636,11 @@ export default {
   },
 };
 </script>
+
+<style lang="scss" scoped>
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+</style>

+ 3 - 3
src/views/login.vue

@@ -23,7 +23,7 @@
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
         </el-input>
       </el-form-item>
-      <el-form-item prop="code" v-if="captchaEnabled">
+      <!-- <el-form-item prop="code" v-if="captchaEnabled">
         <el-input
           v-model="loginForm.code"
           auto-complete="off"
@@ -36,7 +36,7 @@
         <div class="login-code">
           <img :src="codeUrl" @click="getCode" class="login-code-img"/>
         </div>
-      </el-form-item>
+      </el-form-item> -->
       <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
       <el-form-item style="width:100%;">
         <el-button
@@ -89,7 +89,7 @@ export default {
       },
       loading: false,
       // 验证码开关
-      captchaEnabled: true,
+      captchaEnabled: false,
       // 注册开关
       register: false,
       redirect: undefined

+ 35 - 23
src/views/material/classify/index.vue

@@ -1,29 +1,22 @@
 <template>
   <div class="classify">
-    <el-row :gutter="10" class="mb10">
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="addClassify"
-          >新增</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="editClassify"
-          >修改</el-button
-        >
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="deleteClassify"
-          >删除</el-button
-        >
-      </el-col>
-    </el-row>
 
     <el-card v-loading="loading">
+
+      <el-row :gutter="10" class="mb10">
+        <div>
+          <el-button type="primary" size="mini" plain @click="addClassify">新增</el-button>
+          <el-button type="primary" size="mini" plain @click="editClassify">修改</el-button>
+          <el-button type="primary" size="mini" plain @click="refreshData">{{refreshName == '2'? '查询启用': '查询停用'}}</el-button>
+          <el-button type="primary" size="mini" plain @click="deleteClassify">删除</el-button>
+        </div>
+      </el-row>
+
       <el-row :gutter="10" class="content">
         <el-col :span="6">
           <el-input
-            placeholder="输入关键字进行过滤"
-            size="small"
+            placeholder="输入关键字/编码进行过滤"
+            size="mini"
             v-model="filterText"
           >
           </el-input>
@@ -60,6 +53,7 @@
                   <el-input
                     :disabled="disable"
                     v-model="ruleForm.code"
+                    size="mini"
                   ></el-input>
                   <span>编码规则x-xxx-xxx-xxx</span>
                 </el-form-item>
@@ -69,6 +63,7 @@
                   <el-input
                     :disabled="disable"
                     v-model="ruleForm.materialType"
+                    size="mini"
                   ></el-input>
                 </el-form-item>
               </el-col>
@@ -80,6 +75,7 @@
                     v-model="ruleForm.isEnable"
                     placeholder="启用状态"
                     clearable
+                    size="mini"
                     :disabled="disable"
                     style="width: 230px"
                   >
@@ -102,6 +98,7 @@
                     placeholder="属性结构"
                     clearable
                     :disabled="disable"
+                    size="mini"
                     style="width: 230px"
                   >
                     <el-option
@@ -210,6 +207,7 @@ export default {
       // 判断是新增还是修改
       isAdd: true,
       defaultExpanded: [],
+      refreshName: '0'
     };
   },
   watch: {
@@ -218,15 +216,15 @@ export default {
     },
   },
   created() {
-    this.getTreeData();
+    this.getTreeData(this.refreshName);
     //
   },
   mounted() {},
   methods: {
     // 获取树形结构
-    getTreeData(data) {
+    getTreeData(isEnable) {
       this.loading = true;
-      getTree({})
+      getTree({isEnable: isEnable})
         .then((res) => {
           let { code, rows } = res;
           if (code === 200) {
@@ -252,7 +250,7 @@ export default {
     },
     filterNode(value, data) {
       if (!value) return true;
-      return data.materialType.indexOf(value) !== -1;
+      return data.materialType.indexOf(value) !== -1 || data.code.indexOf(value) !== -1;
     },
     clickTree(data, node) {
       console.log("data", data, node);
@@ -389,6 +387,16 @@ export default {
         this.isAdd = false;
       }
     },
+    // 启用停用
+    refreshData() {
+      if(this.refreshName == '0') {
+        this.refreshName = '2'
+        this.getTreeData(this.refreshName);
+      } else {
+        this.refreshName = '0'
+        this.getTreeData(this.refreshName);
+      }
+    },
   },
 };
 </script>
@@ -403,4 +411,8 @@ export default {
 .title {
   font-weight: bold;
 }
+.mb10 {
+  display: flex;
+  flex-direction: row-reverse;
+}
 </style>

+ 12 - 0
src/views/purchase/catalogue/columns.js

@@ -137,6 +137,18 @@ export default function useColumns() {
       },
     },
     {
+      item: { key: "materialClassifyList", title: "物料一级分类"},
+      attr: {
+        is: "el-popover-multiple-tree-select",
+        referName: "MATERIALCLASSIFY_PARAM",
+        valueKey: "code",
+      },
+    },
+    {
+      item: { width: 100, key: "source", title: "价格来源" },
+      attr: { is: "el-select", dictName: "price_source" },
+    },
+    {
       item: { width: 100, key: "status", title: "有效状态" },
       attr: { is: "el-select", dictName: "is_effective" },
     },

File diff suppressed because it is too large
+ 1036 - 1060
src/views/purchase/transferOrder/add.vue


Some files were not shown because too many files changed in this diff