Просмотр исходного кода

批量修改交期功能 聚仁需求

yusheng 10 месяцев назад
Родитель
Сommit
4934ff907a

+ 1 - 1
qiankun_config/store.js

@@ -25,7 +25,7 @@ export default function (state) {
     store.commit('user/setAuthorities', state.user.authorities);
   }
   if (state.user?.authorityDept) {
-    store.dispatch('user/getCurrentUserAuthorityDept');
+    // store.dispatch('user/getCurrentUserAuthorityDept');
   }
   if (state.paramsSetData) {
     store.dispatch('paramsSetData/setParamsDataInfo');

+ 76 - 13
src/BIZComponents/inventoryTable.vue

@@ -9,6 +9,7 @@
       max-height="300"
       @columns-change="handleColumnChange"
       :cache-key="cacheKeyUrl"
+      :selection.sync="selection"
     >
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
@@ -52,6 +53,18 @@
             >
               保存
             </el-button>
+            <setAllValue
+              :disabled="!selection.length"
+              title="客户期望交期"
+              @success="setAllValueChange"
+              valueKey="customerExpectDeliveryDeadline"
+            />
+            <setAllValue
+              :disabled="!selection.length"
+              title="生产交付交期"
+              valueKey="produceDeliveryDeadline"
+              @success="setAllValueChange"
+            />
           </div>
           <div class="pricebox">
             <span class="amount">总计:{{ allPrice }}元</span>
@@ -317,9 +330,8 @@
           }"
         >
           <el-input
-            v-model="scope.row.singlePrice"
+            v-model.number="scope.row.singlePrice"
             placeholder="请输入"
-            type="number"
             @input="changeCount(scope.row, scope.$index)"
           >
             <template slot="append">元</template>
@@ -363,7 +375,9 @@
         }}</span>
       </template>
       <template v-slot:headerCustomerExpectDeliveryDeadline="{ column }">
-        <span class="is-required">{{ column.label }}</span>
+        <span :class="isDate == 1 ? 'is-required' : ''">{{
+          column.label
+        }}</span>
       </template>
 
       <template v-slot:technicalAnswerName="{ row, $index }">
@@ -428,15 +442,16 @@
         </el-form-item>
       </template>
       <template v-slot:headerProduceDeliveryDeadline="{ column }">
-        <span :class="isProduceDeliveryDeadline ? 'is-required' : ''">{{
-          column.label
-        }}</span>
+        <span
+          :class="isProduceDeliveryDeadline && isDate == 1 ? 'is-required' : ''"
+          >{{ column.label }}</span
+        >
       </template>
       <template v-slot:produceDeliveryDeadline="scope">
         <el-form-item
           :prop="'datasource.' + scope.$index + '.produceDeliveryDeadline'"
           :rules="{
-            required: isProduceDeliveryDeadline ? true : false,
+            required: isProduceDeliveryDeadline && isDate == 1 ? true : false,
             message: '选择生产交付交期',
             trigger: 'change'
           }"
@@ -457,7 +472,7 @@
         <el-form-item
           v-if="scope.row.arrivalWay == 1"
           :rules="{
-            required: true,
+            required: isDate == 1 ? true : false,
             message:
               contractBookType == 1 ? '请选择客户期望交期' : '请选择交付日期',
             trigger: 'change'
@@ -762,11 +777,15 @@
   import timeDialog from '@/components/timeDialog/index.vue';
   import { copyObj } from '@/utils/util';
   import selectStockLedgerDialog from '@/BIZComponents/selectStockLedger/selectStockLedgerDialog.vue'; //库存台账
+  import setAllValue from '@/BIZComponents/setAllValue.vue'; //批量修改
+
   import tabMixins from '@/mixins/tableColumnsMixin';
   import commodityPriceListDialog from '@/views/commodityManagement/commodityPriceList/components/commodityPriceListDialog.vue';
   const dayjs = require('dayjs');
   import { levelList } from '@/enum/dict.js';
   import { getGoodsPriceByCondition } from '@/api/goodsManage/index';
+  import { parameterGetByCode } from '@/api/main/index.js';
+
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -778,7 +797,8 @@
       taskinstanceDialog,
       timeDialog,
       selectStockLedgerDialog,
-      commodityPriceListDialog
+      commodityPriceListDialog,
+      setAllValue
     },
     props: {
       pageName: {
@@ -928,6 +948,7 @@
           datasource: [],
           discountTotalPrice: 0
         },
+        isDate: 1,
         pricingWayList,
         curIndex: '',
         rules: {},
@@ -936,7 +957,8 @@
           { label: '一次性到货', value: 1 },
           { label: '分批到货', value: 2 }
         ],
-        columnsVersion: 1
+        columnsVersion: 1,
+        selection: []
       };
     },
     computed: {
@@ -967,6 +989,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            label: '选择',
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left'
+          },
           orderColumn,
           {
             width: 280,
@@ -1361,6 +1391,13 @@
       this.requestDict('保质期单位');
       this.requestDict('产地');
       this.requestDict('商品价格类型');
+      parameterGetByCode({
+        code: 'eom_inventoryTable_customerExpectDeliveryDeadline'
+      }).then((res) => {
+        if (res.value) {
+          this.isDate = res.value;
+        }
+      });
     },
     methods: {
       packingChange(item, index) {
@@ -1577,6 +1614,13 @@
         this.$forceUpdate();
         this.$refs.table.reRenderTable();
       },
+      setAllValueChange({ key, value }) {
+        let indexS = this.selection.map((item) => item.key - 1);
+        indexS.forEach((i) => {
+          this.$set(this.form.datasource[i], key, value);
+          this.setDeliveryDays(this.form.datasource[i], i, 'guaranteePeriod');
+        });
+      },
       //获取折让单价
       getDiscountSinglePrice(row) {
         let num =
@@ -1604,7 +1648,8 @@
         if (productList) {
           let supplierObj = await this.getSupplierObj(productList, 'productId');
 
-          productList.forEach((item) => {
+          productList.forEach((item, index) => {
+            item['key'] = index + 1;
             item.pricingWay =
               item.pricingWay ||
               data.pricingWay ||
@@ -1708,7 +1753,7 @@
           let row = JSON.parse(JSON.stringify(this.defaultForm));
           row.key = this.form.datasource.length + 1;
           let parasm = idx == -1 ? row : this.form.datasource[i];
-          console.log(this.defTaxRate,'this.defTaxRate')
+          console.log(this.defTaxRate, 'this.defTaxRate');
           this.$set(parasm, 'taxRate', this.defTaxRate);
           this.$set(parasm, 'productId', item.id);
           this.$set(parasm, 'categoryName', item.name);
@@ -1725,6 +1770,23 @@
           this.$set(parasm, 'singleWeight', item.netWeight);
           this.$set(parasm, 'pricingWay', 1);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
+          this.$set(parasm, 'guaranteePeriod', item.warrantyPeriod);
+          this.$set(
+            parasm,
+            'guaranteePeriodUnitCode',
+            item.warrantyPeriodUnit ? item.warrantyPeriodUnit + '' : ''
+          );
+          if (item.warrantyPeriod && item.warrantyPeriodUnit) {
+            this.$set(
+              parasm,
+              'guaranteePeriodDeadline',
+              this.setDay(
+                item.warrantyPeriod,
+                this.guaranteePeriodUnit(item.warrantyPeriodUnit),
+                {}
+              )
+            );
+          }
           this.$set(
             parasm,
             'packageDispositionList',
@@ -1751,7 +1813,7 @@
             this.$set(parasm, 'orderNo', this.orderOption[0]?.orderNo);
             this.$set(parasm, 'orderId', this.orderOption[0]?.orderId);
           }
-          if (this.isGoods&&item.goodsId) {
+          if (this.isGoods && item.goodsId) {
             this.$set(parasm, 'goodsId', item.goodsId);
             this.$set(parasm, 'goodsPriceId', item.goodsPriceId);
             this.$set(parasm, 'goodsPriceType', item.goodsPriceType);
@@ -1761,6 +1823,7 @@
             this.$set(parasm, 'discountSinglePrice', item.singlePrice);
             this.$set(parasm, 'totalCount', '');
           }
+
           if (this.isSupplier) {
             this.$set(
               parasm,

+ 7 - 7
src/BIZComponents/product-list.vue

@@ -348,13 +348,13 @@
             },
             minWidth: 110
           },
-          // {
-          //   prop: 'extField.approvalNumber',
-          //   align: 'center',
-          //   label: '批准文号',
-          //   showOverflowTooltip: true,
-          //   minWidth: 110
-          // },
+          {
+            prop: 'level',
+            align: 'center',
+            label: '级别',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
           {
             prop: 'extField.packingSpecification',
             align: 'center',

+ 67 - 0
src/BIZComponents/setAllValue.vue

@@ -0,0 +1,67 @@
+<template>
+  <el-button
+    size="small"
+    type="primary"
+    class="ele-btn-icon"
+    style="margin-left: 5px"
+    :disabled="disabled"
+    @click="show = true"
+    >批量设置{{ title }}
+
+    <ele-modal
+      custom-class="ele-dialog-form long-dialog-form"
+      :centered="true"
+      :visible.sync="show"
+      :close-on-click-modal="false"
+      width="600px"
+      :maxable="true"
+      :resizable="true"
+      :append-to-body="true"
+    >
+      <div>
+        {{ title }}:
+        <el-date-picker v-model="value" type="date" placeholder="选择日期">
+        </el-date-picker>
+      </div>
+      <div slot="footer" class="footer">
+        <el-button type="primary" @click="warehouseChangeAll">确认</el-button>
+        <el-button @click="show = false">返回</el-button>
+      </div>
+    </ele-modal>
+  </el-button>
+</template>
+<script>
+  export default {
+    components: {},
+    data() {
+      return {
+        show: false,
+        value: ''
+      };
+    },
+    props: {
+      disabled: {
+        default: true,
+        type: Boolean
+      },
+      valueKey: '',
+      title: ''
+    },
+    created() {},
+    computed: {},
+    methods: {
+      warehouseChangeAll() {
+        if (!this.value) {
+          return this.$message.error(this.title + '不能为空!');
+        }
+        this.$emit('success', { key: this.valueKey, value: this.value });
+        this.cancel();
+      },
+      cancel() {
+        this.show = false;
+      }
+    }
+  };
+</script>
+
+<style scoped lang="scss"></style>

+ 3 - 0
src/components/Dict/DictSelection.vue

@@ -5,6 +5,9 @@
     v-bind="$attrs"
     v-on="$listeners"
     :disabled="disabled"
+    filterable
+
+    size="small"
   >
     <el-option
       v-for="item in dictList"

+ 4 - 3
src/views/commodityManagement/commodityPriceList/components/addDialog.vue

@@ -320,9 +320,9 @@
           goodsCode: [
             { required: true, message: '请输入商品编码', trigger: 'blur' }
           ],
-          level: [
-            { required: true, message: '请选择商品级别', trigger: 'blur' }
-          ]
+          // level: [
+          //   { required: true, message: '请选择商品级别', trigger: 'blur' }
+          // ]
         }
       };
     },
@@ -405,6 +405,7 @@
         obj.forEach(async (item, index) => {
           this.form.categoryId = item.id;
           this.form.productName = item.name;
+          this.$set(this.form,'goodsName', item.name);
           this.form.productCategoryName = item.categoryLevelPath;
           this.form.packingSpecification = item.extField?.packingSpecification;
           this.form.productCode = item.code;

+ 38 - 38
src/views/commodityManagement/commodityPriceList/components/priceSearch.vue

@@ -14,58 +14,58 @@ export default {
       return [
         {
           label: '关键字:',
-          value: 'code',
+          value: 'searchName',
           type: 'input',
           placeholder: '商品编码/商品名称/产品名称'
         },
-        {
-          label: '价格类型:',
-          value: 'categoryLevelId',
-          type: 'DictSelection',
-          placeholder: '',
-          dictName: "商品价格类型"
-        },
+        // {
+        //   label: '价格类型:',
+        //   value: 'categoryLevelId',
+        //   type: 'DictSelection',
+        //   placeholder: '',
+        //   dictName: "商品价格类型"
+        // },
         {
           label: '商品编码:',
-          value: 'code',
+          value: 'goodsCode',
           type: 'input',
           placeholder: '请输入'
         },
         {
           label: '商品名称:',
-          value: 'workCode',
+          value: 'goodsName',
           width: 380,
           type: 'input',
           placeholder: '请输入'
         },
-        {
-          label: '商品分类:',
-          value: 'workCode',
-          width: 380,
-          type: 'input',
-          placeholder: ''
-        },
-        {
-          label: '产品名称:',
-          value: 'workCode',
-          width: 380,
-          type: 'input',
-          placeholder: ''
-        },
-        {
-          label: '状态:',
-          value: 'workCode',
-          width: 380,
-          type: 'input',
-          placeholder: ''
-        },
-        {
-          label: '创建时间:',
-          value: 'workCode',
-          width: 380,
-          type: 'input',
-          placeholder: ''
-        },
+        // {
+        //   label: '商品分类:',
+        //   value: 'workCode',
+        //   width: 380,
+        //   type: 'input',
+        //   placeholder: ''
+        // },
+        // {
+        //   label: '产品名称:',
+        //   value: 'workCode',
+        //   width: 380,
+        //   type: 'input',
+        //   placeholder: ''
+        // },
+        // {
+        //   label: '状态:',
+        //   value: 'workCode',
+        //   width: 380,
+        //   type: 'input',
+        //   placeholder: ''
+        // },
+        // {
+        //   label: '创建时间:',
+        //   value: 'workCode',
+        //   width: 380,
+        //   type: 'input',
+        //   placeholder: ''
+        // },
       ];
     }
   },

+ 12 - 4
src/views/commodityManagement/commodityPriceList/index.vue

@@ -121,6 +121,15 @@
                 {{ row.goodsName }}</el-link
               >
             </template>
+            <template v-slot:approvalStatus="{ row }">
+              <el-link
+                type="primary"
+                :underline="false"
+                @click="openEdit('view', row)"
+              >
+                {{ reviewStatus[row.approvalStatus] }}</el-link
+              >
+            </template>
 
             <!-- 商品图片 -->
             <template v-slot:imagesPaths="{ row }">
@@ -237,6 +246,7 @@
         locationUrl: window.location.origin,
         loading: false,
         processSubmitDialogFlag: false,
+        reviewStatus,
         cacheKeyUrl: 'eos-01283c34-commodityManagement-commodityPriceList',
         // 表格列配置
         columns: [
@@ -363,11 +373,9 @@
             prop: 'approvalStatus',
             label: '审核状态',
             align: 'center',
+            slot: 'approvalStatus',
             showOverflowTooltip: true,
-            minWidth: 100,
-            formatter: (_row, _column, cellValue) => {
-              return reviewStatus[_row.approvalStatus];
-            }
+            minWidth: 100
           },
           {
             prop: 'createTime',

+ 1 - 1
src/views/login/index.vue

@@ -193,7 +193,7 @@
               this.loading = false;
               this.$message.success(res.message);
 
-              this.$store.dispatch('user/getCurrentUserAuthorityDept');
+              // this.$store.dispatch('user/getCurrentUserAuthorityDept');
               this.$store.dispatch('paramsSetData/setParamsDataInfo');
               this.goHome();
             })

+ 7 - 5
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -789,6 +789,9 @@
           relationId: this.form.relationId,
           relationType: this.form.relationType
         });
+        info.productList.forEach((item) => {
+          item['deliveryDeadline'] = item.expectReceiveDate;
+        });
         let form = {
           contractVO: {
             ...this.form
@@ -842,11 +845,10 @@
         });
         info['rawDetailList'] = info.rawList;
         info['outputDetailList'] = info.outputList;
-        // if (info.productList.length > 1) {
-        //   this.$refs.planTableListRef.open(info);
-        // } else {
+        info.productList.forEach((item) => {
+          item['deliveryDeadline'] = item.expectReceiveDate;
+        });
 
-        // }
         let supplierList = res.detailList
           .filter((item) => item.supplierId)
           .map((item) => {
@@ -870,7 +872,7 @@
           } else {
             this.supplierListShow = true;
           }
-        }else{
+        } else {
           this.putTableValue(info);
         }
 

+ 2 - 0
src/views/purchasingManage/supplierManage/index.vue

@@ -337,6 +337,8 @@
     computed: {},
     created() {
       this.requestDict('供应商状态');
+      this.requestDict('产地');
+
       this.getTreeData();
     },
     methods: {

+ 197 - 172
src/views/saleManage/contact/components/parentList.vue

@@ -1,22 +1,48 @@
 <template>
-  <ele-modal title="选择客户" custom-class="ele-dialog-form long-dialog-form" :visible.sync="visible"
-             :before-close="handleClose" :close-on-click-modal="false" top="5vh"
-             :close-on-press-escape="false" append-to-body width="70%" :maxable="true">
+  <ele-modal
+    title="选择客户"
+    custom-class="ele-dialog-form long-dialog-form"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    top="5vh"
+    :close-on-press-escape="false"
+    append-to-body
+    width="70%"
+    :maxable="true"
+  >
     <el-card shadow="never">
-
       <contact-search @search="reload"></contact-search>
 
-      <ele-split-layout width="244px" allow-collapse :right-style="{ overflow: 'hidden' }">
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
         <div class="ele-border-lighter split-layout-right-content">
-          <AssetTree @handleNodeClick="handleNodeClick" id="17" :isFirstRefreshTable="false" ref="treeList"/>
+          <AssetTree
+            @handleNodeClick="handleNodeClick"
+            id="17"
+            :isFirstRefreshTable="false"
+            ref="treeList"
+          />
         </div>
         <!-- 表格 -->
         <template v-slot:content>
-          <ele-pro-table ref="table" :columns="columns" :datasource="datasource" row-key="id"
-                         height="calc(100vh - 460px)" class="dict-table" @cell-click="cellClick">
+          <ele-pro-table
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            row-key="id"
+            height="calc(100vh - 460px)"
+            class="dict-table"
+            @cell-click="cellClick"
+          >
             <!-- 表头工具栏 -->
             <template v-slot:action="{ row }">
-              <el-radio class="radio" v-model="radio" :label="row.id"><i></i></el-radio>
+              <el-radio class="radio" v-model="radio" :label="row.id"
+                ><i></i
+              ></el-radio>
             </template>
           </ele-pro-table>
         </template>
@@ -27,178 +53,177 @@
       <el-button type="primary" size="small" @click="selected">选择</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
     </div>
-
   </ele-modal>
 </template>
 
 <script>
-
-import {contactPageUsages} from '@/api/saleManage/contact';
-import ContactSearch from './contactSearch.vue';
-import AssetTree from '@/components/AssetTree';
-
-export default {
-  components: {
-    ContactSearch,
-    AssetTree
-  },
-  props: {
-    classType: {
-      type: Number | String,
-      default: 1
-    }
-  },
-  data() {
-    return {
-      visible: false,
-
-
-      columns: [
-
-        {
-          action: 'action',
-          slot: 'action',
-          align: 'center',
-          label: '选择'
-        },
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          showOverflowTooltip: true,
-          fixed: 'left'
-        },
-        {
-          prop: 'code',
-          label: '客户编码',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'name',
-          label: '客户名称',
-          align: 'center',
-          slot: 'name',
-          showOverflowTooltip: true,
-          minWidth: 200
-        },
-        {
-          prop: 'serialNo',
-          label: '客户代号',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 140
-        },
-        {
-          prop: 'phone',
-          label: '客户电话',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        {
-          prop: 'addressName',
-          label: '单位地址',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120,
-          formatter: (_row, _column, cellValue) => {
-            let addr = '' + _row.addressName ? _row.addressName.replaceAll(',', '') : '';
-            addr += _row.address ? _row.address : '';
-            return addr;
-          }
-        },
-        {
-          prop: 'linkName',
-          label: '联系人',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        {
-          prop: 'linkPhone',
-          label: '联系人电话',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 120
-        },
-        {
-          prop: 'status',
-          label: '状态',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 100,
-          formatter: (_row, _column, cellValue) => {
-            return _row.status === 1 ? '启用' : '禁用';
-          }
-        },
-
-
-      ],
-
-      radio: null,
-    }
-  },
-
-  watch: {},
-  methods: {
-    open(item) {
-      if (item) {
-
-        this.radio = item.id
-      }
-      this.visible = true
-    },
-
-
-    /* 表格数据源 */
-    datasource({page, limit, where, order}) {
-      return contactPageUsages({
-        pageNum: page,
-        size: limit,
-        type: this.classType,
-        ...where,
-        status: '1'
-      });
+  import { contactPageUsages } from '@/api/saleManage/contact';
+  import ContactSearch from './contactSearch.vue';
+  import AssetTree from '@/components/AssetTree';
+
+  export default {
+    components: {
+      ContactSearch,
+      AssetTree
     },
-
-
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({page: 1, where});
-    },
-
-    handleNodeClick(data, node) {
-      this.curNodeData = data;
-      this.reload({categoryId: data.id});
+    props: {
+      classType: {
+        type: Number | String,
+        default: 1
+      }
     },
+    data() {
+      return {
+        visible: false,
+
+        columns: [
+          {
+            action: 'action',
+            slot: 'action',
+            align: 'center',
+            label: '选择'
+          },
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '客户编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'name',
+            label: '客户名称',
+            align: 'center',
+            slot: 'name',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+          {
+            prop: 'serialNo',
+            label: '客户代号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
+          {
+            prop: 'phone',
+            label: '客户电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'addressName',
+            label: '单位地址',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120,
+            formatter: (_row, _column, cellValue) => {
+              let addr =
+                '' + _row.addressName
+                  ? _row.addressName.replaceAll(',', '')
+                  : '';
+              addr += _row.address ? _row.address : '';
+              return addr;
+            }
+          },
+          {
+            prop: 'linkName',
+            label: '联系人',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'linkPhone',
+            label: '联系人电话',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 120
+          },
+          {
+            prop: 'status',
+            label: '状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return _row.status === 1 ? '启用' : '禁用';
+            }
+          },
+
+          {
+            prop: 'remark',
+            label: '备注',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200
+          }
+        ],
 
-
-    // 单击获取id
-    cellClick(row) {
-      this.current = row
-      this.radio = row.id
-    },
-    handleClose() {
-      this.visible = false
-      this.current = null
-      this.radio = ''
+        radio: null
+      };
     },
 
-    selected() {
-      if (!this.current) {
-        return this.$message.warning('请选择客户')
+    watch: {},
+    methods: {
+      open(item) {
+        if (item) {
+          this.radio = item.id;
+        }
+        this.visible = true;
+      },
+
+      /* 表格数据源 */
+      datasource({ page, limit, where, order }) {
+        return contactPageUsages({
+          pageNum: page,
+          size: limit,
+          type: this.classType,
+          ...where,
+          status: '1'
+        });
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where });
+      },
+
+      handleNodeClick(data, node) {
+        this.curNodeData = data;
+        this.reload({ categoryId: data.id });
+      },
+
+      // 单击获取id
+      cellClick(row) {
+        this.current = row;
+        this.radio = row.id;
+      },
+      handleClose() {
+        this.visible = false;
+        this.current = null;
+        this.radio = '';
+      },
+
+      selected() {
+        if (!this.current) {
+          return this.$message.warning('请选择客户');
+        }
+        this.$emit('changeParent', this.current);
+        this.handleClose();
       }
-      this.$emit('changeParent', this.current)
-      this.handleClose()
-    },
-
-  }
-}
+    }
+  };
 </script>
 
-<style lang="scss" scoped>
-</style>
+<style lang="scss" scoped></style>

+ 8 - 0
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -645,6 +645,13 @@
           saleType: [
             { required: true, message: '请选择销售类型', trigger: 'change' }
           ],
+          projectName: [
+            {
+              required: this.clientEnvironmentId == 4 ? true : false,
+              message: '请选择项目',
+              trigger: 'change'
+            }
+          ],
 
           partaName: [
             { required: true, message: '请选择客户名称', trigger: 'change' }
@@ -1098,6 +1105,7 @@
           if (this.contactData.id) {
             this.changeParent({ id: this.contactData.id });
           }
+          this.form.saleType = 1;
           //嘉实默认值
           if (this.clientEnvironmentId == 5) {
             this.form.saleType = 2;

+ 9 - 0
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -262,6 +262,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            label: '选择',
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left'
+          },
           {
             minWidth: 200,
             prop: 'productName',
@@ -667,6 +675,7 @@
         if (data) {
           this.form.datasource = data;
           data.forEach(async (item, index) => {
+            item['key'] = index + 1;
             if (!item.warehouseId) {
               this.warehouseChange(index, item);
             }

+ 19 - 14
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -30,7 +30,6 @@
             class="ele-btn-icon"
             @click="handParent()"
             v-if="isShowAdd && needProduce == 4"
-
           >
             新增
           </el-button>
@@ -202,7 +201,7 @@
       <template v-slot:warehouseId="scope">
         <el-form-item
           :prop="'datasource.' + scope.$index + '.warehouseId'"
-          :rules="[{ required: false, message: '请选择仓库', trigger: 'blur' }]"
+          :rules="[{ required: isWarehouseId==1?true:false, message: '请选择仓库', trigger: 'blur' }]"
         >
           <el-select
             v-model="scope.row.warehouseId"
@@ -274,7 +273,7 @@
         <span class="is-required">{{ column.label }}</span>
       </template>
       <template v-slot:headerWarehouseId="{ column }">
-        <span class="is-required">{{ column.label }}</span>
+        <span :class="isWarehouseId==1?'is-required':''">{{ column.label }}</span>
       </template>
       <template v-slot:headerTotalCount="{ column }">
         <span class="is-required">{{ column.label }}</span>
@@ -301,7 +300,6 @@
             type="number"
             :min="0"
             @input="changeCount(scope.row, scope.$index)"
-          
           >
           </el-input>
         </el-form-item>
@@ -315,8 +313,7 @@
             v-model="scope.row.saleUnitId"
             style="width: 100%"
             @change="changeCount(scope.row, scope.$index)"
-            :disabled="clientEnvironmentId==4"
-
+            :disabled="clientEnvironmentId == 4"
           >
             <el-option
               :label="item.conversionUnit"
@@ -406,7 +403,9 @@
   import { lbjtList } from '@/enum/dict.js';
   import tabMixins from '@/mixins/tableColumnsMixin';
   import { levelList } from '@/enum/dict.js';
-  import { changeCount, getAllPrice } from '@/BIZComponents/setProduct.js';
+  import { changeCount } from '@/BIZComponents/setProduct.js';
+  import { parameterGetByCode } from '@/api/main/index.js';
+
   export default {
     mixins: [dictMixins, getDynamicsColumns, tabMixins],
     props: {
@@ -496,6 +495,7 @@
         warehouseList: [],
         dynamicsColumns: [],
         columnsVersion: 1,
+        isWarehouseId: 0,
         form: {
           datasource: []
         },
@@ -505,6 +505,13 @@
     created() {
       this.requestDict('产地');
       this.requestDict('生产类型');
+      parameterGetByCode({
+        code: 'eom_saleManage_invoice_warehouseId'
+      }).then((res) => {
+        if (res.value) {
+          this.isWarehouseId = res.value;
+        }
+      });
     },
     computed: {
       canHandl() {
@@ -615,7 +622,7 @@
             prop: 'warehouseId',
             label: '仓库名称',
             slot: 'warehouseId',
-            // headerSlot: 'headerWarehouseId',
+            headerSlot: 'headerWarehouseId',
             align: 'center'
           },
           {
@@ -640,8 +647,7 @@
             label: '发货数量',
             slot: 'saleCount',
             headerSlot: 'headerTotalCount',
-            align: 'center',
-           
+            align: 'center'
           },
           {
             width: 150,
@@ -688,7 +694,7 @@
             label: '发货块数',
             slot: 'blockCount',
             align: 'center',
-            show:this.clientEnvironmentId==4
+            show: this.clientEnvironmentId == 4
           },
           {
             width: 120,
@@ -1019,9 +1025,8 @@
         this.changeSendTotalWeight(row, index);
         this.getNotaxSinglePrice();
         this.$forceUpdate();
-        if(this.clientEnvironmentId==4){
+        if (this.clientEnvironmentId == 4) {
           this.tableHandleKeyUp(row, index, 'sum');
-
         }
       },
       //修改发货总重
@@ -1132,7 +1137,7 @@
             row.totalCount =
               (Number(row.blockCount) * modelLong * modeWide * modeHight) /
               1000000;
-            row.saleCount =row.totalCount
+            row.saleCount = row.totalCount;
             this.changeCount(row, index);
           }
         }