yusheng 1 год назад
Родитель
Сommit
66e1b95a1b

+ 7 - 0
src/BIZComponents/inventoryTable.vue

@@ -897,6 +897,13 @@
             slot: 'taskName',
             align: 'center'
           },
+          {
+            minWidth: 160,
+            prop: 'productionCodes',
+            label: '生产编码',
+            align: 'center'
+          },
+          
           {
             minWidth: 120,
             prop: 'entrustedEnterpriseId',

+ 6 - 0
src/BIZComponents/inventoryTableDetails.vue

@@ -189,6 +189,12 @@
             slot: 'taskName',
             align: 'center'
           },
+          {
+            minWidth: 160,
+            prop: 'productionCodes',
+            label: '生产编码',
+            align: 'center'
+          },
           {
             minWidth: 120,
             prop: 'entrustedEnterpriseId',

+ 2 - 2
src/api/purchasingManage/inquiryManage.js

@@ -4,8 +4,8 @@ import request from '@/utils/request';
 /**
  * 获取信息列表
  */
-export async function getTableList(params) {
-  const res = await request.get(`/eom/purchaseinquiry/page`, { params });
+export async function getTableList(data) {
+  const res = await request.post(`/eom/purchaseinquiry/page`, data);
   if (res.data.code == 0) {
     return res.data.data;
   }

+ 18 - 8
src/views/commodityManagement/commodityPriceList/index.vue

@@ -148,7 +148,9 @@
             <template v-slot:action="{ row }">
               <el-link
                 @click="submit(row)"
-                v-if="row.goodsStatus == 0&&[0,3].includes(row.approvalStatus)"
+                v-if="
+                  row.goodsStatus == 0 && [0, 3].includes(row.approvalStatus)
+                "
                 type="primary"
                 :underline="false"
                 icon="el-icon-sort-up"
@@ -168,7 +170,9 @@
                 @click="openEditGoodsInfo(row)"
                 type="primary"
                 :underline="false"
-                v-if="row.goodsStatus == 0&&[0,3].includes(row.approvalStatus)"
+                v-if="
+                  row.goodsStatus == 0 && [0, 3].includes(row.approvalStatus)
+                "
               >
                 修改
               </el-link>
@@ -176,7 +180,9 @@
                 class="ele-action"
                 title="确定要删除此信息吗?"
                 @confirm="commitBtn([row.id])"
-                v-if="row.goodsStatus == 0&&[0,3].includes(row.approvalStatus)"
+                v-if="
+                  row.goodsStatus == 0 && [0, 3].includes(row.approvalStatus)
+                "
               >
                 <template v-slot:reference>
                   <el-link type="danger" :underline="false"> 删除 </el-link>
@@ -214,6 +220,7 @@
   import dictMixins from '@/mixins/dictMixins';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import { reviewStatus } from '@/enum/dict';
+  import { mapGetters } from 'vuex';
 
   export default {
     mixins: [tabMixins, dictMixins],
@@ -222,13 +229,14 @@
       PriceSearch,
       AddDialog,
       EditPriceDialog,
-      HistoricalpriceDialog,processSubmitDialog
+      HistoricalpriceDialog,
+      processSubmitDialog
     },
     data() {
       return {
         locationUrl: window.location.origin,
         loading: false,
-        processSubmitDialogFlag:false,
+        processSubmitDialogFlag: false,
         cacheKeyUrl: 'eos-01283c34-commodityManagement-commodityPriceList',
         // 表格列配置
         columns: [
@@ -278,7 +286,6 @@
             slot: 'goodsName',
             showOverflowTooltip: true,
             minWidth: 180
-
           },
           {
             prop: 'categoryLevelName',
@@ -387,6 +394,9 @@
     created() {
       this.requestDict('商品价格类型');
     },
+    computed: {
+      ...mapGetters(['user'])
+    },
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where }) {
@@ -438,12 +448,12 @@
       },
 
       async submit(res) {
-        this.processSubmitDialogFlag=true
+        this.processSubmitDialogFlag = true;
         this.$nextTick(() => {
           let params = {
             businessId: res.id,
             businessKey: 'goods_manage_priceOffOnSheft_on',
-            formCreateUserId: res.createUserId,
+            formCreateUserId: this.user.info.userId,
             variables: {
               businessCode: res.goodsCode,
               businessName: res.goodsName,

+ 1 - 0
src/views/purchasingManage/inquiryManage/components/detailDialog.vue

@@ -11,6 +11,7 @@
     @close="cancel"
     :maxable="true"
     :resizable="true"
+    :append-to-body="true"
   >
     <div class="switch">
       <div class="switch_left">

+ 337 - 340
src/views/purchasingManage/inquiryManage/components/inquiryTable.vue

@@ -101,7 +101,14 @@
         </span>
       </template>
       <template v-slot:taxRate="{ row, $index }">
-        <el-form-item  v-if="status !== 'Detail'">
+        <el-form-item
+          v-if="status !== 'Detail'"
+          :rules="{
+            required: isTaxRate==1 ? true : '',
+            message: '请输入税率',
+            trigger: 'change'
+          }"
+        >
           <el-input
             v-model="row.taxRate"
             style="width: 100%"
@@ -163,10 +170,7 @@
         </el-form-item>
       </template>
       <template v-slot:supplierProductCode="scope" v-if="status !== 'Detail'">
-        <el-form-item
-          style="margin-bottom: 20px"
-     
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input
             v-model="scope.row.supplierProductCode"
             :disabled="status == 'Detail'"
@@ -174,18 +178,12 @@
         </el-form-item>
       </template>
       <template v-slot:deliveryDays="scope" v-if="status !== 'Detail'">
-        <el-form-item
-          style="margin-bottom: 20px"
-      
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input v-model="scope.row.deliveryDays"></el-input>
         </el-form-item>
       </template>
       <template v-slot:guaranteePeriod="scope" v-if="status !== 'Detail'">
-        <el-form-item
-          style="margin-bottom: 20px"
-        
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input
             v-model="scope.row.guaranteePeriod"
             :disabled="status == 'Detail'"
@@ -193,10 +191,7 @@
         </el-form-item>
       </template>
       <template v-slot:guaranteePeriodUnitCode="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-        
-        >
+        <el-form-item style="margin-bottom: 20px">
           <DictSelection
             dictName="质保期单位"
             clearable
@@ -229,10 +224,7 @@
       </template>
 
       <template v-slot:notaxSinglePrice="scope">
-        <el-form-item
-          style="margin-bottom: 20px"
-         
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input
             v-model="scope.row.notaxSinglePrice"
             placeholder="请输入"
@@ -268,7 +260,7 @@
         }}</span>
       </template>
       <template v-slot:provenance="scope">
-        <el-form-item >
+        <el-form-item>
           <DictSelection
             dictName="产地"
             clearable
@@ -280,10 +272,7 @@
         </el-form-item>
       </template>
       <template v-slot:modelType="scope" v-if="status !== 'Detail'">
-        <el-form-item
-          style="margin-bottom: 20px"
-        
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input
             v-model="scope.row.modelType"
             :disabled="status == 'Detail'"
@@ -292,10 +281,7 @@
       </template>
 
       <template v-slot:specification="scope" v-if="status !== 'Detail'">
-        <el-form-item
-          style="margin-bottom: 20px"
-          
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input
             v-model="scope.row.specification"
             :disabled="status == 'Detail'"
@@ -304,10 +290,7 @@
       </template>
 
       <template v-slot:remark="scope" v-if="status !== 'Detail'">
-        <el-form-item
-          style="margin-bottom: 20px"
-       
-        >
+        <el-form-item style="margin-bottom: 20px">
           <el-input
             v-model="scope.row.remark"
             type="textarea"
@@ -333,305 +316,8 @@
   import { getInventoryTotalAPI } from '@/api/wms';
   import { listByContactId } from '@/api/saleManage/contact';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { parameterGetByCode } from '@/api/main/index.js';
 
-  const defaultColumns = [
-    {
-      width: 50,
-      label: '序号',
-      type: 'index',
-      columnKey: 'index',
-      align: 'center',
-      fixed: 'left'
-    },
-    {
-      minWidth: 120,
-      prop: 'supplierName',
-      label: '供应商',
-      slot: 'supplierName',
-      align: 'center',
-      showOverflowTooltip: true,
-      isMerge: true,
-      fixed: 'left'
-    },
-    {
-      minWidth: 80,
-      prop: 'supplierTotalPrice',
-      label: '总价',
-      slot: 'supplierTotalPrice',
-      align: 'center',
-      showOverflowTooltip: true,
-      isMerge: true,
-      fixed: 'left'
-    },
-    {
-      minWidth: 120,
-      prop: 'preferentialPrice',
-      label: '优惠后总价',
-      slot: 'preferentialPrice',
-      headerSlot: 'isRequired',
-      align: 'center',
-      showOverflowTooltip: true,
-      isMerge: true,
-      fixed: 'left'
-    },
-    {
-      minWidth: 120,
-      prop: 'settlementMode',
-      label: '结算方式',
-      slot: 'settlementMode',
-      headerSlot: 'isRequired',
-      align: 'center',
-      showOverflowTooltip: true,
-      isMerge: true,
-      fixed: 'left'
-    },
-    {
-      minWidth: 160,
-      prop: 'deliveryDate',
-      label: '交货日期',
-      slot: 'deliveryDate',
-      headerSlot: 'isRequired',
-      align: 'center',
-      showOverflowTooltip: true,
-      isMerge: true,
-      fixed: 'left'
-    },
-    {
-      minWidth: 100,
-      prop: 'productCode',
-      label: '编码',
-      slot: 'productCode',
-      align: 'center',
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 100,
-      prop: 'productName',
-      label: '产品名称',
-      slot: 'productName',
-      align: 'center',
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 100,
-      prop: 'isWinner',
-      label: '是否中标',
-      slot: 'isWinner',
-      align: 'center',
-      headerSlot: 'isRequired',
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 140,
-      prop: 'supplierProductCode',
-      label: '供应商产品编码',
-      slot: 'supplierProductCode',
-      align: 'center',
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 160,
-      prop: 'supplierProductName',
-      label: '供应商产品名称',
-      slot: 'supplierProductName',
-      headerSlot: 'isRequired',
-      align: 'center',
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 130,
-      prop: 'reqTotalCount',
-      label: '需求数量',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 130,
-      prop: 'totalCount',
-      label: '购买数量',
-      slot: 'totalCount',
-      headerSlot: 'isRequired',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-
-    {
-      minWidth: 80,
-      prop: 'availableCountBase',
-      label: '库存数量',
-      slot: 'availableCountBase',
-      align: 'center'
-    },
-    {
-      minWidth: 80,
-      prop: 'measuringUnit',
-      label: '单位',
-      slot: 'measuringUnit',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 120,
-      prop: 'modelType',
-      label: '型号',
-      slot: 'modelType',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-
-    {
-      minWidth: 120,
-      prop: 'specification',
-      label: '规格',
-      slot: 'specification',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 120,
-      prop: 'minimumOrderQuantity',
-      label: '最低订购量',
-      align: 'center'
-    },
-    {
-      minWidth: 80,
-      prop: 'doneTotalCount',
-      label: '已采数量',
-      align: 'center'
-    },
-    {
-      minWidth: 80,
-      prop: 'waitTotalCount',
-      label: '待采数量',
-      align: 'center'
-    },
- 
-    {
-      minWidth: 140,
-      prop: 'singlePrice',
-      label: '采购单价',
-      slot: 'singlePrice',
-      headerSlot: 'isRequired',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      width: 180,
-      prop: 'notaxSinglePrice',
-      label: '不含税单价',
-      slot: 'notaxSinglePrice',
-      align: 'center'
-    },
-    {
-      minWidth: 80,
-      prop: 'totalPrice',
-      label: '采购金额',
-      slot: 'totalPrice',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 150,
-      prop: 'taskName',
-      label: '工序',
-      slot: 'taskName',
-      align: 'center'
-    },
-    {
-      width: 110,
-      prop: 'batchNo',
-      label: '批次号',
-      slot: 'batchNo',
-      align: 'center'
-    },
-    {
-      prop: 'provenance',
-      label: '产地',
-      slot: 'provenance',
-      align: 'center',
-      showOverflowTooltip: true,
-      minWidth: 200
-    },
-
-
-    // {
-    //   width: 130,
-    //   prop: 'brand',
-    //   label: '品牌',
-    //   slot: 'brand'
-    // },
-    {
-      minWidth: 80,
-      prop: 'deliveryDays',
-      label: '交期(天)',
-      slot: 'deliveryDays',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 100,
-      prop: 'guaranteePeriod',
-      label: '质保期',
-      slot: 'guaranteePeriod',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 120,
-      prop: 'guaranteePeriodUnitCode',
-      label: '质保期单位',
-      slot: 'guaranteePeriodUnitCode',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    // {
-    //   width: 120,
-    //   prop: 'produceType',
-    //   align: 'center',
-    //   label: '属性类型',
-    //   showOverflowTooltip: true,
-    //   formatter: (row, column) => {
-    //     return row.produceType && row.produceType.length
-    //       ? row.produceType
-    //           .map((item) => this.getDictValue('生产类型', item + ''))
-    //           .join(',')
-    //       : '';
-    //   }
-    // },
-    {
-      minWidth: 120,
-      prop: 'packingSpecification',
-      align: 'center',
-      label: '包装规格',
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 220,
-      prop: 'remark',
-      label: '备注',
-      slot: 'remark',
-      showOverflowTooltip: true,
-      align: 'center'
-    },
-    {
-      minWidth: 90,
-      prop: 'taxRate',
-      label: '税率',
-      slot: 'taxRate',
-      align: 'center',
-      // isMerge: true,
-      showOverflowTooltip: true
-    },
-    {
-      minWidth: 220,
-      prop: 'files',
-      label: '附件',
-      slot: 'files',
-      align: 'center',
-      isMerge: true,
-      showOverflowTooltip: true
-    }
-  ];
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -641,8 +327,8 @@
     },
     props: {
       obj: {
-        default: ()=>{
-          return {}
+        default: () => {
+          return {};
         }
       },
       status: {
@@ -694,10 +380,311 @@
         dataList: [],
         spanArr: [],
 
-        columns: [...defaultColumns]
+        isTaxRate: 0
       };
     },
-    computed: {},
+    computed: {
+      columns() {
+        return [
+          {
+            width: 50,
+            label: '序号',
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            minWidth: 120,
+            prop: 'supplierName',
+            label: '供应商',
+            slot: 'supplierName',
+            align: 'center',
+            showOverflowTooltip: true,
+            isMerge: true,
+            fixed: 'left'
+          },
+          {
+            minWidth: 80,
+            prop: 'supplierTotalPrice',
+            label: '总价',
+            slot: 'supplierTotalPrice',
+            align: 'center',
+            showOverflowTooltip: true,
+            isMerge: true,
+            fixed: 'left'
+          },
+          {
+            minWidth: 120,
+            prop: 'preferentialPrice',
+            label: '优惠后总价',
+            slot: 'preferentialPrice',
+            headerSlot: 'isRequired',
+            align: 'center',
+            showOverflowTooltip: true,
+            isMerge: true,
+            fixed: 'left'
+          },
+          {
+            minWidth: 120,
+            prop: 'settlementMode',
+            label: '结算方式',
+            slot: 'settlementMode',
+            headerSlot: 'isRequired',
+            align: 'center',
+            showOverflowTooltip: true,
+            isMerge: true,
+            fixed: 'left'
+          },
+          {
+            minWidth: 160,
+            prop: 'deliveryDate',
+            label: '交货日期',
+            slot: 'deliveryDate',
+            headerSlot: 'isRequired',
+            align: 'center',
+            showOverflowTooltip: true,
+            isMerge: true,
+            fixed: 'left'
+          },
+          {
+            minWidth: 100,
+            prop: 'productCode',
+            label: '编码',
+            slot: 'productCode',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'productName',
+            label: '产品名称',
+            slot: 'productName',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 100,
+            prop: 'isWinner',
+            label: '是否中标',
+            slot: 'isWinner',
+            align: 'center',
+            headerSlot: 'isRequired',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 140,
+            prop: 'supplierProductCode',
+            label: '供应商产品编码',
+            slot: 'supplierProductCode',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 160,
+            prop: 'supplierProductName',
+            label: '供应商产品名称',
+            slot: 'supplierProductName',
+            headerSlot: 'isRequired',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 130,
+            prop: 'reqTotalCount',
+            label: '需求数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 130,
+            prop: 'totalCount',
+            label: '购买数量',
+            slot: 'totalCount',
+            headerSlot: 'isRequired',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+
+          {
+            minWidth: 80,
+            prop: 'availableCountBase',
+            label: '库存数量',
+            slot: 'availableCountBase',
+            align: 'center'
+          },
+          {
+            minWidth: 80,
+            prop: 'measuringUnit',
+            label: '单位',
+            slot: 'measuringUnit',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'modelType',
+            label: '型号',
+            slot: 'modelType',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+
+          {
+            minWidth: 120,
+            prop: 'specification',
+            label: '规格',
+            slot: 'specification',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'minimumOrderQuantity',
+            label: '最低订购量',
+            align: 'center'
+          },
+          {
+            minWidth: 80,
+            prop: 'doneTotalCount',
+            label: '已采数量',
+            align: 'center'
+          },
+          {
+            minWidth: 80,
+            prop: 'waitTotalCount',
+            label: '待采数量',
+            align: 'center'
+          },
+
+          {
+            minWidth: 140,
+            prop: 'singlePrice',
+            label: '采购单价',
+            slot: 'singlePrice',
+            headerSlot: 'isRequired',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            width: 180,
+            prop: 'notaxSinglePrice',
+            label: '不含税单价',
+            slot: 'notaxSinglePrice',
+            align: 'center'
+          },
+          {
+            minWidth: 80,
+            prop: 'totalPrice',
+            label: '采购金额',
+            slot: 'totalPrice',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'taskName',
+            label: '工序',
+            slot: 'taskName',
+            align: 'center'
+          },
+          {
+            width: 110,
+            prop: 'batchNo',
+            label: '批次号',
+            slot: 'batchNo',
+            align: 'center'
+          },
+          {
+            prop: 'provenance',
+            label: '产地',
+            slot: 'provenance',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 200
+          },
+
+          // {
+          //   width: 130,
+          //   prop: 'brand',
+          //   label: '品牌',
+          //   slot: 'brand'
+          // },
+          {
+            minWidth: 80,
+            prop: 'deliveryDays',
+            label: '交期(天)',
+            slot: 'deliveryDays',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 100,
+            prop: 'guaranteePeriod',
+            label: '质保期',
+            slot: 'guaranteePeriod',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'guaranteePeriodUnitCode',
+            label: '质保期单位',
+            slot: 'guaranteePeriodUnitCode',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          // {
+          //   width: 120,
+          //   prop: 'produceType',
+          //   align: 'center',
+          //   label: '属性类型',
+          //   showOverflowTooltip: true,
+          //   formatter: (row, column) => {
+          //     return row.produceType && row.produceType.length
+          //       ? row.produceType
+          //           .map((item) => this.getDictValue('生产类型', item + ''))
+          //           .join(',')
+          //       : '';
+          //   }
+          // },
+          {
+            minWidth: 120,
+            prop: 'packingSpecification',
+            align: 'center',
+            label: '包装规格',
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 220,
+            prop: 'remark',
+            label: '备注',
+            slot: 'remark',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 90,
+            prop: 'taxRate',
+            label: '税率',
+            slot: 'taxRate',
+            align: 'center',
+            headerSlot: this.isTaxRate==1 ? 'isRequired' : '',
+            // isMerge: true,
+            showOverflowTooltip: true
+          },
+          {
+            minWidth: 220,
+            prop: 'files',
+            label: '附件',
+            slot: 'files',
+            align: 'center',
+            isMerge: true,
+            showOverflowTooltip: true
+          }
+        ];
+      }
+    },
     watch: {
       radio(n, v) {
         this.radio1 = n;
@@ -705,13 +692,19 @@
     },
 
     created() {
+      parameterGetByCode({
+        code: 'eom_purchasingManage_inquiryManage_taxRate'
+      }).then((res) => {
+        this.isTaxRate = res.value;
+        console.log(this.isTaxRate,'this.isTaxRate')
+      });
       this.obj.resultList.forEach((item) => {
         this.obj['deliveryDate'] =
           this.obj.deliveryDate || item.expectReceiveDate;
       });
       this.form = copyObj(this.obj);
       console.log(this.form, '');
-      
+
       this.radio1 = this.radio;
       this.getSpanArr();
       this.setDeliveryDays();
@@ -807,7 +800,8 @@
       },
       deliveryDateChange(row) {
         this.$emit('deliveryDateChange', (data) => {
-          let is = false;
+          let is = false,
+            iSexpectReceiveDate = false;
 
           if (data.length > 0) {
             data.forEach((item) => {
@@ -817,10 +811,13 @@
               ) {
                 is = true;
               }
+              if (item.expectReceiveDate) {
+                iSexpectReceiveDate = true;
+              }
             });
           }
-          if (is) {
-            this.$message.error('交货日期大于到货日期');
+          if (is && iSexpectReceiveDate) {
+            this.$message.warning('交货日期大于到货日期');
           }
         });
         this.setDeliveryDays();

+ 21 - 8
src/views/purchasingManage/inquiryManage/index.vue

@@ -18,7 +18,7 @@
           :cache-key="cacheKeyUrl"
         >
           <!-- 表头工具栏 -->
-          <template v-slot:toolbar>
+          <template v-slot:toolbar v-if="!purchasePlanId">
             <el-button
               size="small"
               type="primary"
@@ -56,7 +56,7 @@
             >
           </template>
           <!-- 查看详情列 -->
-          <template v-slot:planCode="{ row }">
+          <template v-slot:planCode="{ row }" v-if="!purchasePlanId">
             <el-link
               type="primary"
               :underline="false"
@@ -160,20 +160,18 @@
   import planDetaillog from '../../purchasingManage/purchasePlanManage/components/detailDialog.vue';
   import popModal from '@/components/pop-modal';
   import dictMixins from '@/mixins/dictMixins';
-  import { contactDetail, contactTypeTree } from '@/api/saleManage/contact';
+  import { contactTypeTree } from '@/api/saleManage/contact';
 
   import {
     getTableList,
     deleteInformation,
-    generateContract,
-    submit,
-    isHasGeneratedContractPI
+    generateContract
   } from '@/api/purchasingManage/inquiryManage';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
       processSubmitDialog,
       searchQuotation,
@@ -184,6 +182,15 @@
       addContractBookDialog,
       generateContractsDialog
     },
+    props: {
+      purchasePlanId: '',
+      sonPurchasePlanIds: {
+        type: Array,
+        default: () => {
+          return [];
+        }
+      }
+    },
     data() {
       return {
         selection: [], //单选中集合
@@ -332,7 +339,7 @@
             fixed: 'right'
           }
         ],
-        cacheKeyUrl:'eos-151ba34e-inquiryManage',
+        cacheKeyUrl: 'eos-151ba34e-inquiryManage'
       };
     },
     computed: {},
@@ -342,6 +349,12 @@
     methods: {
       /* 表格数据源 */
       datasource({ page, limit, where, order }) {
+        if (this.purchasePlanId) {
+          where['planId'] = this.purchasePlanId;
+        }
+        if(this.sonPurchasePlanIds){
+          where['planIds'] = this.sonPurchasePlanIds;
+        }
         return getTableList({
           pageNum: page,
           size: limit,

+ 2 - 1
src/views/purchasingManage/purchaseOrder/invoice/components/detailDialog.vue

@@ -114,6 +114,7 @@
         @columns-change="handleColumnChange"
         :datasource="detailData.productList"
         row-key="id"
+        max-height="500px"
       >
         <template v-slot:technicalDrawings="{ row }">
           <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
@@ -167,7 +168,7 @@
   import tabMixins from '@/mixins/tableColumnsMixin';
 
   export default {
-    mixins: [dictMixins,tabMixins],
+    mixins: [dictMixins, tabMixins],
     components: {
       fileMain,
       // innertboundDetailsDialog,

+ 80 - 11
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -8,6 +8,7 @@
       :datasource="form.datasource"
       class="time-form"
       :cache-key="cacheKeyUrl"
+      :selection.sync="selection"
       @columns-change="handleColumnChange"
     >
       <!-- 表头工具栏 -->
@@ -22,6 +23,15 @@
           >
             新增
           </el-button>
+          <el-button
+            size="small"
+            type="primary"
+            class="ele-btn-icon"
+            style="margin-left: 5px"
+            :disabled="!selection.length"
+            @click="warehouseShow = true"
+            >批量设置仓库</el-button
+          >
         </div>
       </template>
       <template v-slot:technicalDrawings="{ row, $index }">
@@ -225,6 +235,37 @@
       @saveTaskInstance="saveTaskInstance"
       :visible.sync="taskinstanceDialogFlag"
     ></taskinstance-dialog>
+    <ele-modal
+      custom-class="ele-dialog-form long-dialog-form"
+      :centered="true"
+      :visible.sync="warehouseShow"
+      title="设置仓库"
+      :close-on-click-modal="false"
+      width="600px"
+      :maxable="true"
+      :resizable="true"
+      :append-to-body="true"
+    >
+      <div>
+        仓库名称:
+        <el-select v-model="warehouseId" placeholder="请选择">
+          <el-option
+            v-for="item in warehouseList"
+            :key="item.id"
+            :label="item.name"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </div>
+      <div slot="footer" class="footer">
+        <el-button type="primary" @click="warehouseChangeAll"
+          >确认选择</el-button
+        >
+
+        <el-button @click="warehouseShow = false">返回</el-button>
+      </div>
+    </ele-modal>
   </el-form>
 </template>
 <script>
@@ -274,6 +315,9 @@
       };
       return {
         discountTotalPrice: 0.0,
+        warehouseShow: false,
+        warehouseId: '',
+        selection: [],
         allPrice: 0.0,
         outboundDetailsDialogFlag: false,
         taskinstanceDialogFlag: false,
@@ -296,6 +340,14 @@
             align: 'center',
             fixed: 'left'
           },
+          {
+            label: '选择',
+            width: 45,
+            type: 'selection',
+            columnKey: 'selection',
+            align: 'center',
+            fixed: 'left'
+          },
           {
             width: 200,
             prop: 'productName',
@@ -562,14 +614,14 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              let name=''
-              if(_row.guaranteePeriod){
-                name+=_row.guaranteePeriod
+              let name = '';
+              if (_row.guaranteePeriod) {
+                name += _row.guaranteePeriod;
               }
-              if(_row.guaranteePeriodUnitName){
-                name+=_row.guaranteePeriodUnitName
+              if (_row.guaranteePeriodUnitName) {
+                name += _row.guaranteePeriodUnitName;
               }
-              return name||''
+              return name || '';
             },
             align: 'center'
           },
@@ -650,16 +702,33 @@
         //   row.warehouseId = '';
         //   return this.$message.error('同一个产品不能选择相同的仓库');
         // }
+        // this.form.datasource.forEach((item, i) => {
+        //   if (row.productCode == item.productCode && !item.warehouseId) {
+        //     this.$set(this.form.datasource[i], 'warehouseName', data.name);
+        //     this.$set(this.form.datasource[i], 'warehouseCode', data.code);
+        //     this.$set(this.form.datasource[i], 'warehouseId', data.id);
+        //   }
+        // });
+        this.$set(this.form.datasource[index], 'warehouseName', data.name);
+        this.$set(this.form.datasource[index], 'warehouseCode', data.code);
+        this.$set(this.form.datasource[index], 'warehouseId', data.id);
+      },
+      warehouseChangeAll() {
+        if (!this.warehouseId) {
+          return this.$message.error('请先选择仓库');
+        }
+        const data = this.warehouseList.find(
+          (item) => item.id == this.warehouseId
+        );
+        let codeS = this.selection.map((item) => item.productCode);
         this.form.datasource.forEach((item, i) => {
-          if (row.productCode == item.productCode && !item.warehouseId) {
+          if (codeS.includes(item.productCode)) {
             this.$set(this.form.datasource[i], 'warehouseName', data.name);
             this.$set(this.form.datasource[i], 'warehouseCode', data.code);
             this.$set(this.form.datasource[i], 'warehouseId', data.id);
           }
         });
-        this.$set(this.form.datasource[index], 'warehouseName', data.name);
-        this.$set(this.form.datasource[index], 'warehouseCode', data.code);
-        this.$set(this.form.datasource[index], 'warehouseId', data.id);
+        this.warehouseShow=false
       },
       handleTaskinstance(row, index) {
         this.taskinstanceDialogFlag = true;
@@ -1018,7 +1087,7 @@
 <style lang="scss" scoped>
   .headbox {
     display: flex;
-    justify-content: space-between;
+    // justify-content: space-between;
     align-items: center;
 
     .amount {

+ 31 - 18
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -8,7 +8,7 @@
     :append-to-body="true"
     :title="title"
     :close-on-click-modal="false"
-    width="60%"
+    width="80%"
     @close="cancel"
     :maxable="true"
     :resizable="true"
@@ -29,17 +29,7 @@
     </div>
     <div v-show="activeComp == 'main'">
       <el-form ref="form" :model="form" class="el-form-box" label-width="120px">
-        <headerTitle title="基本信息">
-          <!-- <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-s-grid"
-                  class="ele-btn-icon"
-                  @click="exportTable"
-                >
-                 导出
-                </el-button> -->
-        </headerTitle>
+        <headerTitle title="基本信息"> </headerTitle>
         <el-row>
           <el-col :span="form?.sourceId ? 8 : 12">
             <el-form-item label="需求类型:" prop="sourceTypeName">
@@ -234,6 +224,11 @@
       ref="contactDetailDialogRef"
       :isModal="false"
     ></detail-dialog>
+    <inquiryManageIndex
+      v-if="activeComp === 'inquiryManage'"
+      :purchasePlanId="form.id"
+      :sonPurchasePlanIds="sonPurchasePlanList.map((item) => item.id)"
+    ></inquiryManageIndex>
   </ele-modal>
 </template>
 
@@ -249,7 +244,7 @@
   import outsourcing from './outsourcing.vue';
   import { orderSourceType } from '@/enum/dict';
   import tabMixins from '@/mixins/tableColumnsMixin';
-
+  import inquiryManageIndex from '@/views/purchasingManage/inquiryManage/index.vue';
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -257,7 +252,8 @@
       detailDialog,
       bpmDetail,
       timeDialog,
-      outsourcing
+      outsourcing,
+      inquiryManageIndex
     },
     props: {
       isModal: {
@@ -266,12 +262,14 @@
     },
     data() {
       return {
-        cacheKeyUrl: 'eos-purchasingManage-purchasePlanManage-inventoryTableDetail',
+        cacheKeyUrl:
+          'eos-purchasingManage-purchasePlanManage-inventoryTableDetail',
         orderSourceType,
         activeComp: 'main',
         tabOptions: [
           { key: 'main', name: '计划详情' },
-          { key: 'bpm', name: '流程详情' }
+          { key: 'bpm', name: '流程详情' },
+          { key: 'inquiryManage', name: '核价清单' }
         ],
         activeName: '1',
         fullscreen: false,
@@ -280,6 +278,7 @@
         title: '详情',
         row: {},
         form: {},
+        sonPurchasePlanList: [],
         detailData: {},
         columns: [
           {
@@ -368,13 +367,24 @@
             slot: 'totalCount',
             align: 'center'
           },
-
+          {
+            width: 150,
+            prop: 'reqTotalCount',
+            label: '需求数量',
+            align: 'center'
+          },
           {
             width: 150,
             prop: 'inquiryNum',
             label: '已核价数量',
             align: 'center'
           },
+          {
+            width: 150,
+            prop: 'splitTotalCount',
+            label: '已拆分数量',
+            align: 'center'
+          },
           {
             width: 80,
             prop: 'doneTotalCount',
@@ -503,9 +513,11 @@
       // },
       async open(row) {
         this.activeName = '1';
+        this.sonPurchasePlanList=row.sonPurchasePlanList||[]
         this.visible = true;
         this.getPlanData(row.planId || row.id);
         this.detailId = row.id;
+        
       },
 
       cancel() {
@@ -532,7 +544,8 @@
           this.detailData = data;
           this.form = data;
           this.$nextTick(() => {
-            this.$refs.outsourcingRef&&this.$refs.outsourcingRef.init(data.sourceId);
+            this.$refs.outsourcingRef &&
+              this.$refs.outsourcingRef.init(data.sourceId);
           });
 
           if (data.files && data.files.length > 0) {

+ 25 - 4
src/views/purchasingManage/purchasePlanManage/components/splitDialog.vue

@@ -126,6 +126,7 @@
               type="date"
               value-format="yyyy-MM-dd"
               placeholder="请选择日期"
+              disabled
             >
             </el-date-picker>
           </el-form-item>
@@ -152,6 +153,7 @@
               v-model="scope.row.arrivalWay"
               clearable
               style="width: 100%"
+              disabled
             >
               <el-option
                 v-for="item in arrivalWayList"
@@ -233,6 +235,7 @@
         :toolkit="[]"
         style="margin-bottom: 10px"
         :datasource="item.detailList"
+        max-height="400px"
         row-key="id"
       >
         <template v-slot:totalCount="{ row }">
@@ -434,6 +437,12 @@
             label: '已核价数量',
             align: 'center'
           },
+          {
+            width: 150,
+            prop: 'splitTotalCount',
+            label: '已拆分数量',
+            align: 'center'
+          },
           {
             width: 100,
             prop: 'measuringUnit',
@@ -573,7 +582,11 @@
           }, 0);
           let remainCount = maxCount - usedCount;
           let availableCount = remainCount + row.totalCount;
-          this.setFormCount(row.id, remainCount);
+          // +this.form.detailList[index].splitTotalCount
+          let splitTotalCount=row.oldTotalCount-remainCount
+    
+          console.log(maxCount,'splitTotalCount')
+          this.setFormCount(row.id, remainCount,splitTotalCount);
           return availableCount;
         };
       }
@@ -587,6 +600,10 @@
         const data = await getplanDetail(id);
         this.loading = false;
         if (data) {
+          data.detailList.forEach(item=>{
+            item['oldTotalCount']=item.totalCount
+            item.totalCount=item.totalCount-item.splitTotalCount
+          })
           this.form = data;
           this.historyForm = deepClone(this.form);
           if (data.files && data.files.length > 0) {
@@ -596,9 +613,10 @@
           }
         }
       },
-      setFormCount(id, num) {
+      setFormCount(id, num,usedCount) {
         let index = this.form.detailList.findIndex((item) => item.id == id);
         this.$set(this.form.detailList[index], 'totalCount', num);
+        this.$set(this.form.detailList[index], 'splitTotalCount', usedCount);
       },
       handleTotalCount(row, formIndex) {
         row.arrivalBatch = [];
@@ -711,7 +729,8 @@
       async save() {
         let copyList = deepClone(this.splitFormList);
         let isArrivalBatch = false;
-        copyList.push(deepClone(this.form));
+        // copyList.push(deepClone(this.form));
+        // console.log(this.form,'this.form')
 
         copyList.forEach((item, index) => {
           item.detailList = item.detailList.filter((i) => i.totalCount > 0);
@@ -725,9 +744,11 @@
           item.id = '';
         });
         copyList = copyList.filter((item) => item.detailList.length);
+        console.log([this.form,...copyList],'copyList')
+        // return
         if (isArrivalBatch)
           return this.$message.warning('因数量变化请重新设置分批到货时间');
-        await savePurchasePlanCutAPI(copyList);
+        await savePurchasePlanCutAPI([deepClone(this.form),...copyList]);
         this.$message.success('操作成功');
         this.$emit('done');
         this.cancel();

+ 7 - 11
src/views/purchasingManage/purchasePlanManage/index.vue

@@ -209,8 +209,9 @@
                 icon="el-icon-edit"
                 v-if="
                   [2].includes(row.status) &&
-                  !row.isCut &&!row.parentId&&
-                  [0, 100, 101, 103].includes(row.progress)&&!orderSourceType.includes(row.sourceType)
+                  (!row.parentId || row.parentId == 0) &&
+                  [0].includes(row.progress) &&
+                  !orderSourceType.includes(row.sourceType)
                 "
                 @click="handleSplit(row)"
               >
@@ -323,16 +324,10 @@
   import dictMixins from '@/mixins/dictMixins';
   import {
     getTableList,
-    deleteInformation,
-    isHasGeneratedInquiryAPI,
-    saveAndSubmitPurchasePlanAPI
+    deleteInformation
   } from '@/api/purchasingManage/purchasePlanManage';
-  import { isHasGeneratedQuoteAPI } from '@/api/saleManage/businessOpportunity';
   import splitDialog from './components/splitDialog.vue';
-  import {
-    purchaseOrderProgressStatusEnum,
-    purchasePlanProgressStatusEnum
-  } from '@/enum/dict';
+  import { purchasePlanProgressStatusEnum } from '@/enum/dict';
   import autogenerateDialog from '@/BIZComponents/autogenerateDialog.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
   import { parameterGetByCode } from '@/api/main/index.js';
@@ -363,7 +358,8 @@
         loading: false, // 加载状态
         processSubmitDialogFlag: false,
         splitDialogFlag: false, // 加载状态
-        isAddInquiry: 0,orderSourceType
+        isAddInquiry: 0,
+        orderSourceType
       };
     },
     //客户管理数据

+ 13 - 4
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -26,10 +26,17 @@
             <el-input
               clearable
               v-model="form.projectName"
-              @click.native="handleProjectBtn"
               @clear="clearContrcat"
-              placeholder="请选择"
+              placeholder="请输入"
+              style="width: calc(100% - 80px)"
             />
+            <el-button
+              style="margin-left: 5px"
+              size="small"
+              type="primary"
+              @click.native="handleProjectBtn"
+              >选择
+            </el-button>
           </el-form-item>
           <el-form-item label="销售类型" prop="saleType">
             <DictSelection
@@ -54,7 +61,9 @@
             />
           </el-form-item>
           <el-form-item label="订单类型" prop="needProduce">
-            <el-radio v-model="form.needProduce" :label="1">有客户生产性订单</el-radio>
+            <el-radio v-model="form.needProduce" :label="1"
+              >有客户生产性订单</el-radio
+            >
             <el-radio v-model="form.needProduce" :label="0"
               >库存式订单</el-radio
             >
@@ -1078,7 +1087,7 @@
             variables: {
               businessCode: data.orderNo,
               businessName: data.partaName,
-              businessType:businessType
+              businessType: businessType
             }
           };
           this.$refs.processSubmitDialogRef.init(params);

+ 6 - 0
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -528,6 +528,12 @@
             slot: 'specification',
             align: 'center'
           },
+          {
+            minWidth: 160,
+            prop: 'productionCodes',
+            label: '生产编码',
+            align: 'center'
+          },
           {
             width: 120,
             prop: 'imgCode',

+ 6 - 0
src/views/saleManage/saleOrder/invoice/components/inventoryTableDetails.vue

@@ -114,6 +114,12 @@
             slot: 'specification',
             align: 'center'
           },
+          {
+            minWidth: 160,
+            prop: 'productionCodes',
+            label: '生产编码',
+            align: 'center'
+          },
           {
             width: 120,
             prop: 'imgCode',