Răsfoiți Sursa

Merge branch 'dev' into 'purchaseDev'

Dev

See merge request new-business/drp-web!439
黄梓星 1 an în urmă
părinte
comite
6e50edf425

+ 0 - 14
src/views/business/spd/bo/plan/index.vue

@@ -294,7 +294,6 @@ export default {
         isPage: true,
         title: ''
       },
-      customerOptions: [],
       personOptions: [],
       deptOptions: [],
       tableList: [],
@@ -549,12 +548,6 @@ export default {
       this.$refs.refer.init(this.referCondition)
     },
     selectionsToInput(selection) {
-      // 搜索区选择客户
-      if (this.referCondition.type == 'CUSTOMER_PARAM') {
-        this.customerOptions = selection
-        this.queryParams.customer = selection[0].id
-        this.queryParams.customerName = selection[0].name
-      }
       if (this.referCondition.type == 'CONTACTS_PARAM') {
         this.personOptions = selection
         this.queryParams.charger = selection[0].id
@@ -571,13 +564,6 @@ export default {
         this.queryParams.marketingAreaName = selection[0].name
       }
     },
-    // 搜索区树形选择
-    chooseTreeRefer(type, isPage, title) {
-      this.referCondition.type = type
-      this.referCondition.isPage = isPage
-      this.referCondition.title = title
-      this.$refs.tree.init(this.referCondition)
-    },
     selectionsToInput2(selection) {
       this.classOptions.push(selection)
       this.download.category = selection.code

+ 9 - 6
src/views/business/spd/goal_management/AnnualSaleGoal.vue

@@ -96,7 +96,7 @@
           <el-form-item label="部门" prop="dept">
             <el-popover-select-v2 v-model="queryParams.dept" title="部门" valueKey="name"
                                   referName="DEPT_PARAM"
-                                  :dataMapping="{ deptCode: 'code', dept: 'name'}"
+                                  :dataMapping="{ deptId: 'id', dept: 'name'}"
                                   :source.sync="queryParams" placeholder="请输入部门" @keyup.enter.native="handleQuery">
             </el-popover-select-v2>
           </el-form-item>
@@ -279,7 +279,7 @@
             <el-form-item label="部门" prop="dept">
               <el-popover-select-v2 v-model="form.dept" title="部门" valueKey="name"
                                     referName="DEPT_PARAM"
-                                    :dataMapping="{ deptCode: 'code', dept: 'name'}"
+                                    :dataMapping="{ deptId: 'id', dept: 'name'}"
                                     :source.sync="form" placeholder="请输入部门">
               </el-popover-select-v2>
             </el-form-item>
@@ -596,7 +596,7 @@ export default {
         saleZone: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalTotal: null,
         notes: null,
@@ -644,7 +644,7 @@ export default {
         saleZone: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalTotal: null,
         notes: null,
@@ -715,6 +715,7 @@ export default {
     };
   },
   created() {
+    console.log(this.$store.state.user, 'this.$store.state.user')
     this.getList();
   },
   methods: {
@@ -757,7 +758,7 @@ export default {
         saleZone: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalTotal: null,
         notes: null,
@@ -786,7 +787,7 @@ export default {
         saleZone: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalTotal: null,
         notes: null,
@@ -811,7 +812,9 @@ export default {
       this.open = true;
       this.form.documentDate = new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString().padStart(2, '0') + '-' + new Date().getDate().toString().padStart(2, '0')
       this.form.annual = new Date().getFullYear().toString()
+      this.form.creatorCode = this.$store.state.user.name
       this.form.creator = this.$store.state.user.nickName
+      this.form.deptId = this.$store.state.user.deptId
       this.form.dept = this.$store.state.user.deptName
     },
     handleAddDetails() {

+ 6 - 6
src/views/business/spd/goal_management/AnnualSaleGoalMerge.vue

@@ -57,7 +57,7 @@
           <el-form-item label="部门" prop="dept">
             <el-popover-select-v2 v-model="queryParams.dept" title="部门" valueKey="name"
                                   referName="DEPT_PARAM"
-                                  :dataMapping="{ deptCode: 'code', dept: 'name'}"
+                                  :dataMapping="{ deptId: 'id', dept: 'name'}"
                                   :source.sync="queryParams" placeholder="请输入部门" @keyup.enter.native="handleQuery">
             </el-popover-select-v2>
           </el-form-item>
@@ -277,7 +277,7 @@
             <el-form-item label="部门" prop="dept">
               <el-popover-select-v2 v-model="form.dept" title="部门" valueKey="name"
                                     referName="DEPT_PARAM"
-                                    :dataMapping="{ deptCode: 'code', dept: 'name'}"
+                                    :dataMapping="{ deptId: 'id', dept: 'name'}"
                                     :source.sync="form" placeholder="请输入部门">
               </el-popover-select-v2>
             </el-form-item>
@@ -764,7 +764,7 @@ export default {
         annual: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalCategory: null,
         goalTotal: null,
@@ -816,7 +816,7 @@ export default {
         annual: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalCategory: null,
         goalTotal: null,
@@ -940,7 +940,7 @@ export default {
         annual: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalCategory: null,
         goalTotal: null,
@@ -974,7 +974,7 @@ export default {
         annual: null,
         creatorCode: null,
         creator: null,
-        deptCode: null,
+        deptId: null,
         dept: null,
         goalCategory: null,
         goalTotal: null,

+ 2 - 2
src/views/business/spd/goal_management/MonthGoalMerge.vue

@@ -469,7 +469,7 @@
               </el-table-column>
             </el-table>
           </el-tab-pane>
-          <el-tab-pane label="区域目标汇总(月)" name="zoneGoalSum">
+          <el-tab-pane label="区域目标汇总(月)" name="zoneGoalSum" v-if="this.form.goalCategory == '销售区域'">
             <el-table max-height="300" :data="zoneGoalSumList">
               <el-table-column label="序号" type="index" width="55" align="center" fixed />
               <el-table-column label="销售组织" align="center" prop="saleOrg" width="180">
@@ -503,7 +503,7 @@
               </el-table-column>
             </el-table>
           </el-tab-pane>
-          <el-tab-pane label="客户目标汇总(月)" name="customGoalSum">
+          <el-tab-pane label="客户目标汇总(月)" name="customGoalSum" v-if="this.form.goalCategory == '销售区域'">
             <el-table max-height="300" :data="customGoalSumList">
               <el-table-column label="序号" type="index" width="55" align="center" fixed />
               <el-table-column label="销售组织" align="center" prop="saleOrg" width="180">

+ 4 - 0
src/views/material/basicFile/details.vue

@@ -2098,6 +2098,10 @@
             this.basicData.value['businessDepartmentName'] = '';
 
           }
+          // 物料税类materialRate
+          if (this.MoreDataDialog.target.prop == 'materialRate') {
+            this.basicData.value['rateCode'] = this.MoreDataDialog.value.code
+          }
 
 
         } else if (this.MoreDataDialog.target.name == 'medcineData') {

+ 44 - 17
src/views/purchase/DemandSummary/index.vue

@@ -245,6 +245,7 @@
           height="355"
           max-height="355"
           style="font-size: 12px;"
+          :cell-class-name="cellClassName"
           @selection-change="handleSelectionChange"
           @row-click="rowSelect"
           @row-dblclick="doubleClick"
@@ -546,7 +547,12 @@ export default {
   methods: {
     reDraw() {
       this.$refs.table.doLayout();
-      console.log(111)
+    },
+    // 单元格标红
+    cellClassName({row, column, rowIndex, columnIndex}) {
+      if(column.label == "需求可用周期" && Number(row.demandCycle) > 1.5 ) {
+        return 'success-row';
+      }
     },
     // 指定列合计
     getSummaries(param) {
@@ -763,6 +769,8 @@ export default {
             this.$modal.notifySuccess("审核成功");
             this.getList(this.queryParams)
           }
+        }).catch(err => {
+          this.getList(this.queryParams)
         })
       }
     },
@@ -875,23 +883,39 @@ export default {
       this.$modal.loading("正在粘贴数据...");
       e.preventDefault() //阻止默认粘贴事件
       let source = e.clipboardData.getData("Text");
-      // 首先对源头进行解析
-      let rows = source.split("\r\n"); // 拆成一个数组
-      // 数组去除空字符串
-      rows = rows.filter(item => {
-        return item && item.trim()
-      })
-      await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
-        this.$modal.closeLoading();
-        if (res.code === 200) {
-          let rowList = res.rows
-          console.log('粘贴的', rowList)
-          this.queryParams.materialCodeList = rowList.map(item => {return item.code})
-          this.queryParams.names = (rowList.map(item => {return item.code})).join(',')
-        }
-      }).catch(err => {
+      console.log('source', source)
+      // 这里区分普通复制和在表格内复制,判断是否包含','
+      // 没找到,就通过表格复制
+      if (source.indexOf(",") === -1) {
+        // 首先对源头进行解析
+        let rows = source.split("\r\n"); // 拆成一个数组
+        // 数组去除空字符串
+        rows = rows.filter(item => {
+          return item && item.trim()
+        })
+        await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
+          this.$modal.closeLoading();
+          if (res.code === 200) {
+            let rowList = res.rows
+            console.log('粘贴的', rowList)
+            this.queryParams.materialCodeList = rowList.map(item => {return item.code})
+            this.queryParams.names = (rowList.map(item => {return item.code})).join(',')
+          }
+        }).catch(err => {
+          this.$modal.closeLoading();
+        })
+      } else {
+        // 找到了,按,分割
+        let codelist = source.split(',')
+        console.log('按照逗号分隔', codelist)
+        // 数组去除空字符串
+        codelist = codelist.filter(item => {
+          return item && item.trim()
+        })
+        this.queryParams.materialCodeList = codelist
+        this.queryParams.names = codelist.join(',')
         this.$modal.closeLoading();
-      })
+      }
     },
         // 明细行选择业务部门参照带出业务部门数据
     chooseSon(index, type, isPage, title) {
@@ -938,6 +962,9 @@ export default {
  ::v-deep .el-card .el-form-item {
   margin-bottom: 3px;
 }
+::v-deep .el-table__row .success-row {
+  background-color: #ff8a8a!important;
+}
 </style>
 <style>
 .exporttable {

+ 2 - 2
src/views/purchase/PurchaseDemandList/add.vue

@@ -292,7 +292,7 @@
           </ux-table-column>
           <ux-table-column resizable title="预留数量" align="center"  field="reservedQty" width="120px" edit-render>
             <template v-slot:edit="scope">
-                <el-input type="number" min="0" oninput="value=value.replace(/^(0+)|[^\d]+/g, '')" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedQty"></el-input>
+                <el-input type="number" min="0" @input="scope.row.reservedQty=Math.ceil(scope.row.reservedQty)" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedQty"></el-input>
             </template>
           </ux-table-column>
           <ux-table-column resizable title="集团预测分类" align="center"  field="forecastClassify" width="120px"/>
@@ -1854,7 +1854,7 @@ export default {
 //   top: 70%
 // }
 ::v-deep .elx-body--row .success-row {
-  background-color: #f11616!important;
+  background-color: #ff8a8a!important;
 }
 ::v-deep .uxbeautifyTableClass .elx-table--header-wrapper {
   color: #606266;