Bläddra i källkod

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-eom into dev

liujt 3 månader sedan
förälder
incheckning
6ea8ec47cf

+ 15 - 1
src/BIZComponents/inventoryTable.vue

@@ -11,6 +11,8 @@
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
       :selection.sync="selection"
+      :show-summary="showSummary"
+      :summary-method="getSummaries"
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
@@ -999,6 +1001,7 @@
     getGoodsByCategoryId
   } from '@/api/goodsManage/index';
   import { parameterGetByCode } from '@/api/main/index.js';
+  import { getSummaries } from '@/utils/util.js';
 
   export default {
     mixins: [dictMixins, tabMixins],
@@ -1149,6 +1152,10 @@
             unitIdKey: 'saleUnitId'
           };
         }
+      },
+      showSummary: {
+        type: Boolean,
+        default: false
       }
     },
     data() {
@@ -1209,7 +1216,7 @@
         // 基础列定义
         let baseColumns = [
           {
-            width: 45,
+            width: 65,
             type: 'index',
             columnKey: 'index',
             align: 'center',
@@ -1774,6 +1781,13 @@
     },
     methods: {
       formatPrice,
+      getSummaries(param) {
+        return getSummaries(
+          param,
+          ['saleCount'],
+          ' '
+        );
+      },
       handleCountChange(row, index,weightType) {
         // 数量变化时,若为生产加工类型,触发含税小计计算
         if (this.quoteType === 2) {

+ 14 - 0
src/BIZComponents/inventoryTableDetails.vue

@@ -15,6 +15,8 @@
       @select-all="handleSelectionChange"
       :cache-key="cacheKeyUrl"
       @done="handleDone"
+      :show-summary="showSummary"
+      :summary-method="getSummaries"
     >
       <!-- 原有插槽 -->
       <template v-slot:technicalDrawings="scope">
@@ -130,6 +132,7 @@
   import tabMixins from '@/mixins/tableColumnsMixin';
   import { levelList, pricingWayList, quoteTypeOp } from '@/enum/dict.js';
   import { getInventoryTotalAPI } from '@/api/wms';
+  import { getSummaries } from '@/utils/util.js';
 
   const dayjs = require('dayjs');
 
@@ -229,6 +232,10 @@
       quoteType: {
         type: Number,
         default: 1
+      },
+      showSummary: {
+        type: Boolean,
+        default: false
       }
     },
     data() {
@@ -920,6 +927,13 @@
       this.requestDict('商品价格类型');
     },
     methods: {
+      getSummaries(param) {
+        return getSummaries(
+          param,
+          ['saleCount'],
+          ' '
+        );
+      },
       handleDone() {
         if (this.isSelected) {
           console.log('selectedIds~~~~~', this.selectedIds);

+ 17 - 2
src/views/purchasingManage/inquiryManage/index.vue

@@ -97,7 +97,7 @@
               v-if="
                 [2].includes(row.status) &&
                 ((isAddContract == 1 && row.genContractNum == 0) ||
-                  isAddContract == 0)
+                  isAddContract == 0) && row.createUserId == userInfo.id
               "
             >
               生成合同
@@ -309,6 +309,13 @@
             showOverflowTooltip: true,
             minWidth: 180
           },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 180
+          },
           {
             prop: 'status',
             label: '状态',
@@ -338,11 +345,14 @@
             fixed: 'right'
           }
         ],
-        cacheKeyUrl: 'eos-151ba34e-inquiryManage'
+        cacheKeyUrl: 'eos-151ba34e-inquiryManage',
+        userInfo: {}
       };
     },
     computed: {},
     created() {
+      this.userInfo = this.$store.getters.user.info;
+      console.log('userInfo~~~', userInfo);
       this.getTreeData();
       //是否可以重复生成合同//0否 1是
       parameterGetByCode({
@@ -465,6 +475,11 @@
           text = '请至少选择一条数据';
         }
         if (list.length > 1) {
+          // 检查是否有创建人不是当前用户的
+          if (list.some((item) => item.createUserId != this.userInfo.id)) {
+            verify = false;
+            text = '只能自己创建的核价单生成合同';
+          }
           if (list.some((item) => item.winnerSuppleIds.split(',').length > 1)) {
             verify = false;
             text = '多核价单且含有多个核价清单的数据不允许批量生成合同';

+ 13 - 6
src/views/saleManage/saleOrder/accountstatement/components/saleForm.vue

@@ -78,17 +78,14 @@
       <el-col :span="8">
         <el-form-item label="查询方式" prop="dateType">
           <el-select
-            :disabled="dialogType == 'view'"
+            :disabled="dataForm.queryDimension == 2 || dialogType == 'view'"
             clearable
             class="ele-block"
             v-model="dataForm.dateType"
             @change="reloadTableData"
             placeholder="请选择"
           >
-            <el-option label="按年度" :value="1" />
-            <el-option label="按季度" :value="2" />
-            <el-option label="按月度" :value="3" />
-            <el-option label="按时间段" :value="4" />
+            <el-option v-for="item in dateTypeOps" :key="item.value" :label="item.label" :value="item.value" />
           </el-select>
         </el-form-item>
       </el-col>
@@ -215,7 +212,7 @@
         </el-form-item>
       </el-col>
     </el-row>
-    <el-row v-if="dialogType !== 'view'">
+    <el-row v-if="dataForm.queryDimension != 2 && dialogType !== 'view'">
       <el-col :span="24">
         <el-button style="float: right" v-click-once @click="handleSearch" type="primary"
           >查询</el-button
@@ -289,6 +286,13 @@ import { accountStatementExportAPI } from '@/api/saleManage/accountstatement';
     data() {
       return {
         monthByDays: {},
+        dateTypeOp: [
+          { label: '按年度', value: 1 },
+          { label: '按季度', value: 2 },
+          { label: '按月度', value: 3 },
+          { label: '按时间段', value: 4 },
+          { label: '按调拨单', value: 5 }
+        ],
         quarterList: {
           一季度: ['-01-01 00:00:00', '-03-31 23:59:59'],
           二季度: ['-04-01 00:00:00', '-06-30 23:59:59'],
@@ -318,6 +322,9 @@ import { accountStatementExportAPI } from '@/api/saleManage/accountstatement';
       };
     },
     computed: {
+      dateTypeOps() {
+        return this.dataForm.queryDimension != 2 ? this.dateTypeOp.filter(item => item.value != 5) : this.dateTypeOp
+      },
       //计算未对账金额
       accountStatementPrice() {
         return this.datasource.reduce((pre, cur) => pre + +cur.amountTotalPrice, 0);

+ 1 - 1
src/views/saleManage/saleOrder/accountstatement/index.vue

@@ -295,7 +295,7 @@
           },
           {
             prop: 'dateType',
-            label: '对账方式',
+            label: '查询方式',
             align: 'center',
             showOverflowTooltip: true,
             minWidth: 150,

+ 1 - 0
src/views/saleManage/saleOrder/components/addDialogNew.vue

@@ -549,6 +549,7 @@
         :isBatchNo="isBatchNo == 1 && form.saleTypeName.includes('受托')"
         :isProductionRequirements="true"
         :isIncreaseTotalWeight="true"
+        :showSummary="true"
       ></inventoryTable>
       <headerTitle
         title="类型清单"

+ 1 - 0
src/views/saleManage/saleOrder/components/darwerComponents/saleOrderInfo.vue

@@ -316,6 +316,7 @@
       :isProductionRequirements="true"
       :isWms="true"
       :isIncreaseTotalWeight="true"
+      :showSummary="true"
     ></inventoryTabledetail>
     <headerTitle title="类型清单" v-if="form.needProduce == 4"></headerTitle>
     <typeList

+ 2 - 1
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -308,6 +308,7 @@
             placeholder="请输入"
             type="number"
             :min="0"
+            :disabled="sourceType == 4"
             @input="changeCount(scope.row, scope.$index, false)"
           >
             <template slot="append">
@@ -315,7 +316,7 @@
                 v-model="scope.row.saleUnitId"
                 style="width: 80px"
                 @change="changeCount(scope.row, scope.$index)"
-                :disabled="clientEnvironmentId == 4"
+                :disabled="clientEnvironmentId == 4 || sourceType == 4"
               >
                 <el-option
                   :label="item.conversionUnit"