Z há 1 ano atrás
pai
commit
cd19230838
37 ficheiros alterados com 799 adições e 423 exclusões
  1. 84 0
      src/BIZComponents/autogenerateDialog.vue
  2. 10 0
      src/api/saleManage/contact.js
  3. 11 0
      src/api/wms/index.js
  4. 11 18
      src/layout/index.vue
  5. 1 0
      src/views/contractManage/contractBook/components/inventoryTable.vue
  6. 14 5
      src/views/contractManage/contractBook/components/searchContract.vue
  7. 7 0
      src/views/contractManage/contractBook/index.vue
  8. 61 3
      src/views/purchasingManage/inquiryManage/components/addDialog.vue
  9. 22 8
      src/views/purchasingManage/inquiryManage/components/inquiryManage-list.vue
  10. 1 0
      src/views/purchasingManage/inquiryManage/components/inquiryTable.vue
  11. 161 163
      src/views/purchasingManage/inquiryManage/components/inventoryTable.vue
  12. 11 2
      src/views/purchasingManage/inquiryManage/components/searchIndex.vue
  13. 1 1
      src/views/purchasingManage/inquiryManage/components/supplierManageDialog.vue
  14. 8 1
      src/views/purchasingManage/inquiryManage/index.vue
  15. 3 2
      src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue
  16. 46 36
      src/views/purchasingManage/purchaseNeedManage/components/searchQuotation.vue
  17. 7 0
      src/views/purchasingManage/purchaseNeedManage/index.vue
  18. 2 2
      src/views/purchasingManage/purchaseOrder/accountstatement/components/searchTable.vue
  19. 51 11
      src/views/purchasingManage/purchaseOrder/components/addDialog.vue
  20. 1 0
      src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue
  21. 10 1
      src/views/purchasingManage/purchaseOrder/components/searchTable.vue
  22. 7 0
      src/views/purchasingManage/purchaseOrder/index.vue
  23. 1 0
      src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue
  24. 2 1
      src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue
  25. 1 1
      src/views/purchasingManage/purchasePlanManage/components/purchaseNeed-list.vue
  26. 37 28
      src/views/purchasingManage/purchasePlanManage/components/searchQuotation.vue
  27. 1 0
      src/views/purchasingManage/purchasePlanManage/components/splitDialog.vue
  28. 19 5
      src/views/purchasingManage/purchasePlanManage/index.vue
  29. 37 36
      src/views/purchasingManage/supplierManage/components/addContactDialog.vue
  30. 38 38
      src/views/purchasingManage/supplierManage/components/contactDetailDialog.vue
  31. 11 1
      src/views/saleManage/businessOpportunity/components/opportunitySearch.vue
  32. 7 1
      src/views/saleManage/businessOpportunity/index.vue
  33. 12 1
      src/views/saleManage/quotation/components/searchQuotation.vue
  34. 7 0
      src/views/saleManage/quotation/index.vue
  35. 62 41
      src/views/saleManage/saleOrder/components/addDialog.vue
  36. 11 2
      src/views/saleManage/saleOrder/components/searchTable.vue
  37. 23 15
      src/views/saleManage/saleOrder/index.vue

+ 84 - 0
src/BIZComponents/autogenerateDialog.vue

@@ -0,0 +1,84 @@
+<template>
+  <ele-modal
+    custom-class="ele-dialog-form long-dialog-form"
+    :centered="true"
+    :visible="autogenerateDialogFlag"
+    title="提示"
+    append-to-body
+    :close-on-click-modal="false"
+    width="20%"
+    :before-close="cancel"
+  >
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-width="160px"
+      class="el-form-box"
+    >
+      <el-row>
+        <el-col :span="24">
+          <el-form-item label="自动生成采购计划:" prop="generatePurchase">
+            <el-radio-group v-model="form.generatePurchase">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="自动生成生产计划:" prop="generateProduce">
+            <el-radio-group v-model="form.generateProduce">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="自动生成项目立项:" prop="generateProject">
+            <el-radio-group v-model="form.generateProject">
+              <el-radio :label="1">是</el-radio>
+              <el-radio :label="0">否</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div style="float: right">
+      <el-button type="primary" @click="save">确定</el-button>
+    </div>
+  </ele-modal>
+</template>
+<script>
+  export default {
+    name: 'autogenerateDialog',
+    props: {
+      autogenerateDialogFlag: {
+        type: Boolean,
+        default: false
+      }
+    },
+    components: {},
+    data() {
+      return {
+        form: {
+          generatePurchase: 0,
+          generateProduce: 0,
+          generateProject: 0
+        },
+        rules: {},
+        a: null
+      };
+    },
+    methods: {
+      save() {
+        this.$emit('getAutogenerateParams', this.form);
+        this.cancel();
+      },
+      cancel() {
+        this.$emit('update:autogenerateDialogFlag', false);
+      }
+    }
+  };
+</script>
+
+<style scoped lang="scss"></style>

+ 10 - 0
src/api/saleManage/contact.js

@@ -197,3 +197,13 @@ export async function contactProductUpdateAPI(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+/**
+ * 通过产品查供应商
+ */
+export async function contactQueryByCategoryIdsAPI(data) {
+  const res = await request.post('/eom/contact/queryByCategoryIds', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 11 - 0
src/api/wms/index.js

@@ -142,3 +142,14 @@ export async function getWarehouseList() {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 查询出入库详情
+//sourceBizNo
+export async function getInfoBySourceBizNoAPI(sourceBizNo) {
+  const res = await request.get(`/wms/outintwo/getInfoBySourceBizNo/${sourceBizNo}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+

+ 11 - 18
src/layout/index.vue

@@ -53,9 +53,8 @@
     <router-layout />
     <!-- logo 图标 -->
     <template v-slot:logo>
-      <img src="@/assets/logo.png" alt="logo" />
+      <el-image fit="contain" src="@/assets/logo.png" alt="logo" />
     </template>
-    <!-- 顶栏右侧区域 -->
     <template v-slot:right>
       <header-tools :fullscreen="fullscreen" @fullscreen="onFullscreen" />
     </template>
@@ -90,7 +89,7 @@
   import { toggleFullscreen, isFullscreen } from 'ele-admin';
   import RouterLayout from '@/components/RouterLayout/index.vue';
   import HeaderTools from './components/header-tools.vue';
-  // import PageFooter from './components/page-footer.vue';
+  import PageFooter from './components/page-footer.vue';
   import {
     PROJECT_NAME,
     HIDE_SIDEBARS,
@@ -119,7 +118,6 @@
     components: {
       RouterLayout,
       HeaderTools
-      // PageFooter
     },
     data() {
       return {
@@ -242,13 +240,15 @@
 </script>
 
 <style lang="scss">
-  .ele-admin-layout {
-    .ele-admin-logo {
-      font-size: 18px !important;
-      img {
-        width: 50px !important;
-        height: auto !important;
-      }
+  .ele-admin-logo {
+    font-size: 18px !important;
+    justify-content: flex-start !important;
+    align-items: center !important;
+    img {
+      height: 35px !important;
+      max-width: 86px;
+      width: auto;
+      margin-right: 6px;
     }
   }
   // 侧栏菜单徽章样式,定位在右侧垂直居中并调小尺寸
@@ -340,11 +340,4 @@
       }
     }
   }
-
-  .ele-admin-layout .ele-admin-logo img  {
-    height: auto !important;
-    width: 80px !important;
-    margin-right: 5px;
-    max-height: 35px
-  }
 </style>

+ 1 - 0
src/views/contractManage/contractBook/components/inventoryTable.vue

@@ -5,6 +5,7 @@
       :needPage="false"
       :columns="columns"
       :toolkit="[]"
+      max-height="500px"
       :datasource="form.datasource"
       cache-key="systemRoleTable17"
       class="time-form"

+ 14 - 5
src/views/contractManage/contractBook/components/searchContract.vue

@@ -51,13 +51,22 @@
            v-model.trim="params.contractNumber" controls-position="right" ></el-input>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+<!--      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">-->
 
-        <el-form-item label="签订人:" prop="linkName">
+<!--        <el-form-item label="签订人:" prop="linkName">-->
+<!--          <el-input-->
+<!--          placeholder="请输入"-->
+<!--           v-model.trim="params.linkName" controls-position="right" >-->
+<!--          </el-input>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
           <el-input
-          placeholder="请输入"
-           v-model.trim="params.linkName" controls-position="right" >
-          </el-input>
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
         </el-form-item>
       </el-col>
       <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">

+ 7 - 0
src/views/contractManage/contractBook/index.vue

@@ -214,6 +214,13 @@ export default {
           showOverflowTooltip: true,
           minWidth: 140
         },
+        {
+          prop: 'productNames',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
         {
           prop: 'partaName',
           label: '甲方名称',

+ 61 - 3
src/views/purchasingManage/inquiryManage/components/addDialog.vue

@@ -102,6 +102,7 @@
       ref="inventoryTable"
       @delList="delList"
       :acceptUnpack="form.acceptUnpack"
+      @supplierSelect="supplierSelect"
     ></inventoryTable>
 
     <headerTitle title="报价清单" style="margin-top: 15px"></headerTitle>
@@ -152,6 +153,8 @@ import {
 import {copyObj} from '@/utils/util';
 
 import {getFile} from '@/api/system/file';
+import {contactDetail, contactQueryByCategoryIdsAPI} from "@/api/saleManage/contact";
+import {deepClone} from "@/utils";
 
 export default {
   props: {
@@ -190,6 +193,7 @@ export default {
       detailList: [],
       list: [],
       delDetailIds: [],
+      supplierProducts: {},
       formDef,
 
       acceptUnpackList: [
@@ -249,6 +253,10 @@ export default {
       if (data) {
         this.form = data;
         this.supplierList = data.supplierList;
+        let supplierObj = await contactQueryByCategoryIdsAPI(data.detailList.map(item => item.productId));
+        data.detailList.forEach((item) => {
+          item.supplierList = supplierObj[item.productId] || []
+        });
         this.list = data.detailList;
         this.$nextTick(() => {
           this.$refs.inventoryTable &&
@@ -269,11 +277,13 @@ export default {
       let data = await getplanDetail(id);
       this.loading = false;
       if (data) {
+        let supplierObj = await contactQueryByCategoryIdsAPI(data.detailList.map(item => item.productId));
         data.detailList.forEach((item) => {
           if (item.arrivalWay == 2 && item.arrivalBatch.length > 0) {
             item.expectReceiveDate =
               item.arrivalBatch[item.arrivalBatch.length - 1].arriveDate;
           }
+          item.supplierList = supplierObj[item.productId] || []
         });
         this.$set(this.form, 'acceptUnpack', data.acceptUnpack);
         this.form.planId = data.id;
@@ -308,7 +318,7 @@ export default {
           this.getplanData(row.id);
           //是否生成过核价单
           let res = await isHasGeneratedInquiryAPI(row.id)
-          if(res) this.$message.warning('该计划已生成过核价单,请注意。')
+          if (res) this.$message.warning('该计划已生成过核价单,请注意。')
         }
       } else {
         this.isUpdate = true;
@@ -355,7 +365,7 @@ export default {
       });
     },
     removeSupplier(supplierId) {
-      if(supplierId == this.form.winnerId){
+      if (supplierId == this.form.winnerId) {
         this.form.winnerId = ''
         this.form.winnerName = ''
       }
@@ -375,6 +385,54 @@ export default {
 
       this.getplanData(data.id, 'change');
     },
+    async supplierSelect(row) {
+      let supplierIds = Object.keys(this.supplierProducts);
+      const promises = [];
+      row.supplierIds.forEach(item => {
+        if (!supplierIds.includes(item)) {
+          promises.push(contactDetail(item));
+        } else {
+          this.productSetSupplier(this.supplierProducts[item], row)
+        }
+      });
+      Promise.all(promises).then(results => {
+        results.forEach((data, index) => {
+          this.supplierProducts[data.base.id] = data;
+          this.productSetSupplier(this.supplierProducts[data.base.id], row)
+        });
+      });
+    },
+    productSetSupplier(data, row) {
+      let obj = deepClone(row);
+      obj.supplierProductName = data.productList.find(item => item.productCode == row.productCode)?.productName
+      obj.supplierProductCode = data.productList.find(item => item.productCode == row.productCode)?.productCode
+      let params = {
+        ...data.base,
+        supplierId: data.base.id,
+        supplierName: data.base.name,
+        supplierCode: data.base.code,
+        files: [],
+        preferentialPrice: '',
+        settlementMode: '',
+        settlementModeName: '',
+        taxRate: '',
+        totalPrice: '',
+        resultList: [obj],
+      }
+      let supplierIds = this.supplierList.map((item) => item.supplierId);
+      let supplierIndex = supplierIds.indexOf(data.base.id)
+      if (supplierIndex == -1) {
+        this.supplierList.push(params);
+      } else {
+        let isHave = this.supplierList[supplierIndex].resultList.some(item => item.productCode == obj.productCode)
+        if (!isHave) {
+          // putTableValue
+          this.supplierList[supplierIndex].resultList.push(obj)
+          this.$refs['inquiryTable' + data.base.id][0].putTableValue(this.supplierList[supplierIndex].resultList)
+        }
+      }
+      console.log(this.supplierList, this.$refs['inquiryTable' + data.base.id], '=====');
+    },
     //供应商回调
     supplierManageChange(data) {
       let supplierIds = this.supplierList.map((item) => item.supplierId);
@@ -424,7 +482,7 @@ export default {
         }
         this.form.files = this.form.files || [];
         if (this.isUpdate) {
-          if(!this.form.winnerId) return this.$message.warning('请选择中标单位')
+          if (!this.form.winnerId) return this.$message.warning('请选择中标单位')
           UpdateInformation(this.form)
             .then((res) => {
               this.loading = false;

+ 22 - 8
src/views/purchasingManage/inquiryManage/components/inquiryManage-list.vue

@@ -17,15 +17,14 @@
       :datasource="datasource"
       row-key="id"
       height="calc(100vh - 450px)"
-      @cell-click="cellClick"
-
+      default-expand-all
+      :tree-props="{children: 'sonPurchasePlanList', hasChildren: 'hasChildren'}"
       class="dict-table"
     >
+<!--       @cell-click="cellClick"-->
       <!-- 表头工具栏 -->
       <template v-slot:action="{ row }">
-        <el-radio class="radio" v-model="radio" :label="row.planCode"
-        ><i></i
-        ></el-radio>
+        <el-radio v-if="(!row.isCut||(row.parentId&&row.parentId!=0))" class="radio" v-model="radio" @change="cellClick(row)" :label="row.planCode"><i></i></el-radio>
       </template>
       <!-- 状态 -->
       <template v-slot:status="{ row }">
@@ -69,7 +68,9 @@ export default {
           action: 'action',
           slot: 'action',
           align: 'center',
-          label: '选择'
+          label: '选择',
+          fixed: 'left',
+          width: 50,
         },
         {
           columnKey: 'index',
@@ -78,17 +79,23 @@ export default {
           width: 55,
           align: 'center',
           showOverflowTooltip: true,
-          fixed: 'left'
         },
         {
           prop: 'planCode',
           slot: 'planCode',
-
           label: '采购计划编码',
           align: 'center',
           showOverflowTooltip: true,
           minWidth: 200
         },
+        {
+          prop: 'planName',
+          slot: 'planName',
+          label: '采购计划名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
         {
           prop: 'requirementCode',
           label: '采购需求编码',
@@ -274,4 +281,11 @@ export default {
 .topsearch {
   margin-bottom: 15px;
 }
+::v-deep .el-table__row--level-1 {
+  background: #e2f1ff61;
+}
+
+::v-deep .el-table__row--level-0 {
+  background: rgb(187 216 243);
+}
 </style>

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

@@ -38,6 +38,7 @@
       :needPage="false"
       :columns="columns"
       :toolkit="[]"
+      max-height="500px"
       :datasource="form.resultList"
       cache-key="systemRoleTable17"
       class="time-form"

+ 161 - 163
src/views/purchasingManage/inquiryManage/components/inventoryTable.vue

@@ -5,6 +5,7 @@
       :needPage="false"
       :columns="columns"
       :toolkit="[]"
+      max-height="500px"
       :datasource="form.datasource"
       cache-key="systemRoleTable17"
       class="time-form"
@@ -182,6 +183,13 @@
           </el-date-picker>
         </el-form-item>
       </template>
+      <template v-slot:supplierIds="scope">
+        <el-form-item prop="supplierIds">
+          <el-select v-model="scope.row['supplierIds']" clearable filterable multiple collapse-tags @change="handleSupplierSelect(scope.row)">
+            <el-option v-for="i in scope.row.supplierList" :key="i.id" :value="i.id" :label="i.name"></el-option>
+          </el-select>
+        </el-form-item>
+      </template>
       <!-- <template v-slot:productNameHeader="{ column, $index }">
         <span data-="">{{ column.label }}</span>
         <fileUpload
@@ -253,147 +261,6 @@ import {getFile} from "@/api/system/file";
 import {getInventoryTotalAPI} from "@/api/wms";
 import {getByCode} from "@/api/system/dictionary-data";
 // import headList from '@/views/saleManage/businessOpportunity/components/headList.vue';
-const defaultColumns = [
-  {
-    width: 45,
-    type: 'index',
-    columnKey: 'index',
-    align: 'center',
-    fixed: 'left'
-  },
-  {
-    width: 150,
-    prop: 'productCategoryName',
-    label: '分类',
-    slot: 'productCategoryName',
-    align: "center"
-  },
-  {
-    width: 140,
-    prop: 'productCode',
-    label: '编码',
-    slot: 'productCode',
-    align: "center"
-  },
-  {
-    width: 240,
-    prop: 'productName',
-    label: '名称',
-    slot: 'productName',
-    headerSlot: 'productNameHeader',
-    align: "center"
-  },
-  {
-    width: 150,
-    prop: 'productBrand',
-    label: '牌号',
-    slot: 'productBrand',
-    align: "center"
-  },
-  {
-    width: 80,
-    prop: 'totalCount',
-    label: '数量',
-    slot: 'totalCount',
-    align: "center"
-  },
-  {
-    width: 80,
-    prop: 'availableCountBase',
-    label: '库存数量',
-    slot: 'availableCountBase',
-    align: "center"
-  },
-  {
-    width: 100,
-    prop: 'measuringUnit',
-    label: '单位',
-    slot: 'measuringUnit',
-    align: "center"
-  },
-  {
-    width: 130,
-    prop: 'modelType',
-    label: '型号',
-    slot: 'modelType',
-    align: "center"
-  },
-
-  {
-    width: 120,
-    prop: 'specification',
-    label: '规格',
-    slot: 'specification',
-    align: "center"
-  },
-  {
-    width: 120,
-    prop: 'imgCode',
-    align: 'center',
-    label: '图号/件号',
-    showOverflowTooltip: true
-  },
-  {
-    width: 120,
-    prop: 'produceType',
-    align: 'center',
-    label: '生产类型',
-    showOverflowTooltip: true,
-    formatter: (row, column) => {
-      return row.produceType.map(item => this.getDictV('getDictV', item)).join(',')
-    }
-  },
-  {
-    width: 120,
-    prop: 'approvalNumber',
-    align: 'center',
-    label: '批准文号',
-    showOverflowTooltip: true
-  },
-  {
-    width: 120,
-    prop: 'packingSpecification',
-    align: 'center',
-    label: '包装规格',
-    showOverflowTooltip: true
-  },
-  // {
-  //   width: 130,
-  //   prop: 'brand',
-  //   label: '品牌',
-  //   slot: 'brand'
-  // },
-  {
-    width: 170,
-    prop: 'expectReceiveDate',
-    label: '到货日期',
-    slot: 'expectReceiveDate',
-    align: "center"
-  },
-  {
-    width: 140,
-    prop: 'files',
-    label: '附件',
-    slot: 'files'
-  },
-  {
-    width: 220,
-    prop: 'remark',
-    label: '备注',
-    slot: 'remark',
-    align: "center"
-  },
-  {
-    columnKey: 'action',
-    label: '操作',
-    width: 120,
-    align: 'center',
-    resizable: false,
-    slot: 'action',
-    fixed: 'right',
-    showOverflowTooltip: true
-  }
-];
 export default {
   mixins: [dictMixins],
   components: {
@@ -424,17 +291,165 @@ export default {
       dictList: {},
       files: [],
       rules: {},
-      columns: [...defaultColumns]
     };
   },
   computed: {
     canHandl() {
       return this.form.datasource.length;
+    },
+    columns() {
+      return [
+        {
+          width: 45,
+          type: 'index',
+          columnKey: 'index',
+          align: 'center',
+          fixed: 'left'
+        },
+        {
+          width: 150,
+          prop: 'productCategoryName',
+          label: '分类',
+          slot: 'productCategoryName',
+          align: "center"
+        },
+        {
+          width: 140,
+          prop: 'productCode',
+          label: '编码',
+          slot: 'productCode',
+          align: "center"
+        },
+        {
+          width: 240,
+          prop: 'productName',
+          label: '名称',
+          slot: 'productName',
+          headerSlot: 'productNameHeader',
+          align: "center"
+        },
+        {
+          width: 140,
+          prop: 'supplierIds',
+          label: '供应商选择',
+          slot: 'supplierIds',
+          align: "center"
+        },
+        {
+          width: 150,
+          prop: 'productBrand',
+          label: '牌号',
+          slot: 'productBrand',
+          align: "center"
+        },
+        {
+          width: 80,
+          prop: 'totalCount',
+          label: '数量',
+          slot: 'totalCount',
+          align: "center"
+        },
+        {
+          width: 80,
+          prop: 'availableCountBase',
+          label: '库存数量',
+          slot: 'availableCountBase',
+          align: "center"
+        },
+        {
+          width: 100,
+          prop: 'measuringUnit',
+          label: '单位',
+          slot: 'measuringUnit',
+          align: "center"
+        },
+        {
+          width: 130,
+          prop: 'modelType',
+          label: '型号',
+          slot: 'modelType',
+          align: "center"
+        },
+
+        {
+          width: 120,
+          prop: 'specification',
+          label: '规格',
+          slot: 'specification',
+          align: "center"
+        },
+        {
+          width: 120,
+          prop: 'imgCode',
+          align: 'center',
+          label: '图号/件号',
+          showOverflowTooltip: true
+        },
+        {
+          width: 120,
+          prop: 'produceType',
+          align: 'center',
+          label: '生产类型',
+          showOverflowTooltip: true,
+          formatter: (row, column) => {
+            return row.produceType && row.produceType.length ? row.produceType.map(item => this.getDictV('productionType', item)).join(',') : ''
+          }
+        },
+        {
+          width: 120,
+          prop: 'approvalNumber',
+          align: 'center',
+          label: '批准文号',
+          showOverflowTooltip: true
+        },
+        {
+          width: 120,
+          prop: 'packingSpecification',
+          align: 'center',
+          label: '包装规格',
+          showOverflowTooltip: true
+        },
+        // {
+        //   width: 130,
+        //   prop: 'brand',
+        //   label: '品牌',
+        //   slot: 'brand'
+        // },
+        {
+          width: 170,
+          prop: 'expectReceiveDate',
+          label: '到货日期',
+          slot: 'expectReceiveDate',
+          align: "center"
+        },
+        {
+          width: 140,
+          prop: 'files',
+          label: '附件',
+          slot: 'files'
+        },
+        {
+          width: 220,
+          prop: 'remark',
+          label: '备注',
+          slot: 'remark',
+          align: "center"
+        },
+        // {
+        //   columnKey: 'action',
+        //   label: '操作',
+        //   width: 120,
+        //   align: 'center',
+        //   resizable: false,
+        //   slot: 'action',
+        //   fixed: 'right',
+        //   showOverflowTooltip: true
+        // }
+      ]
     }
   },
   created() {
     this.getDictList('productionType')
-    // this.setColumns();
   },
   methods: {
     getDictV(code, val) {
@@ -482,30 +497,13 @@ export default {
       }
 
     },
-
+    handleSupplierSelect(row) {
+      this.$emit('supplierSelect', row);
+    },
     //选择产品
     handParent() {
       this.$refs.productListRef.open();
     },
-
-    handHead(row, index) {
-      let item = {
-        id: row.technicalAnswerId
-      };
-      this.$refs.headRef.open(item, index);
-    },
-    //供应商
-    setColumns(data = []) {
-      this.columns = [...defaultColumns];
-      // this.columns.push()
-      data.forEach((item, index) => {
-        this.$set(this.columns, 13 + index, item);
-      });
-      this.supplierList = data;
-    },
-    getsupplier() {
-      return this.supplierList;
-    },
     //选择产品回调
     changeParent(obj, idx) {
       obj['productBrand'] = obj.brandNum;

+ 11 - 2
src/views/purchasingManage/inquiryManage/components/searchIndex.vue

@@ -52,8 +52,16 @@
 
 
     <el-row :gutter="15">
-
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 24, md: 24 } : { span: 24 }">
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 18, md: 18 } : { span: 18 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -81,6 +89,7 @@
         createTimeStart: '',
         createTimeEnd: '',
         sourceType: '',
+        productName: '',
         sourceId: ''
       };
       return {

+ 1 - 1
src/views/purchasingManage/inquiryManage/components/supplierManageDialog.vue

@@ -10,7 +10,7 @@
     width="70%"
   >
     <supplierManage :isDialog="true" ref="supplierManageRef"></supplierManage>
-    <div class="btns">
+    <div slot="footer">
       <el-button type="primary" size="small" @click="selected">选择</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
     </div>

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

@@ -9,7 +9,7 @@
           ref="table"
           :columns="columns"
           :datasource="datasource"
-          height="calc(100vh - 325px)"
+          height="calc(100vh - 375px)"
           full-height="calc(100vh - 116px)"
           tool-class="ele-toolbar-form"
           :selection.sync="selection"
@@ -205,6 +205,13 @@
             showOverflowTooltip: true,
             minWidth: 200
           },
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
           // {
           //   prop: 'supplierNames',
           //   label: '供应商名称',

+ 3 - 2
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -5,6 +5,7 @@
       :needPage="false"
       :columns="columns"
       :toolkit="[]"
+      max-height="500px"
       :datasource="form.datasource"
       cache-key="systemRoleTable17"
       class="time-form"
@@ -596,8 +597,8 @@ export default {
         this.$set(parasm, 'productName', item.name);
         this.$set(parasm, 'availableCountBase', item.availableCountBase);
         this.$set(parasm, 'modelType', item.modelType);
-        this.$set(parasm, 'weightUnit', item.weightUnit);
-        this.$set(parasm, 'measuringUnit', item.measuringUnit);
+        this.$set(parasm, 'weightUnit', item.unit);
+        this.$set(parasm, 'measuringUnit', item.unit);
         this.$set(parasm, 'specification', item.specification);
         this.$set(parasm, 'remark', '');
         this.$set(parasm, 'imgCode', item.imgCode);

+ 46 - 36
src/views/purchasingManage/purchaseNeedManage/components/searchQuotation.vue

@@ -49,42 +49,51 @@
 
     </el-row>
     <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="完成日期:" prop="finishDateStart">
-          <el-date-picker
-            v-model="finishDate"
-            @change="changeCreateTime"
-            style="width: 100%"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          >
-          </el-date-picker>
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="创建时间:" prop="createTimeStart">
-          <el-date-picker
-            v-model="createTime"
-            style="width: 100%"
+<!--      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">-->
+<!--        <el-form-item label="完成日期:" prop="finishDateStart">-->
+<!--          <el-date-picker-->
+<!--            v-model="finishDate"-->
+<!--            @change="changeCreateTime"-->
+<!--            style="width: 100%"-->
+<!--            type="daterange"-->
+<!--            value-format="yyyy-MM-dd"-->
+<!--            start-placeholder="开始日期"-->
+<!--            end-placeholder="结束日期"-->
+<!--          >-->
+<!--          </el-date-picker>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
+<!--      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">-->
+<!--        <el-form-item label="创建时间:" prop="createTimeStart">-->
+<!--          <el-date-picker-->
+<!--            v-model="createTime"-->
+<!--            style="width: 100%"-->
 
-            @change="changeDate"
-            type="datetimerange"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            start-placeholder="开始时间"
-            end-placeholder="结束时间"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-col>
+<!--            @change="changeDate"-->
+<!--            type="datetimerange"-->
+<!--            value-format="yyyy-MM-dd HH:mm:ss"-->
+<!--            start-placeholder="开始时间"-->
+<!--            end-placeholder="结束时间"-->
+<!--            :default-time="['00:00:00', '23:59:59']"-->
+<!--          >-->
+<!--          </el-date-picker>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 6, md: 6 } : { span: 6 }">
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -106,6 +115,7 @@
       // 默认表单数据
       const defaultParams = {
         requirementName: '',
+        productName: '',
         requirementCode: '',
         finishDateStart: '',
         finishDateEnd: '',
@@ -143,14 +153,14 @@
       },
       /* 搜索 */
       search() {
-        const [finishDateStart, finishDateEnd] = this.finishDate;
-        const [createTimeStart, createTimeEnd] = this.createTime;
-        this.params = Object.assign({}, this.params, {
-          finishDateStart,
-          finishDateEnd,
-          createTimeStart,
-          createTimeEnd
-        });
+        // const [finishDateStart, finishDateEnd] = this.finishDate;
+        // const [createTimeStart, createTimeEnd] = this.createTime;
+        // this.params = Object.assign({}, this.params, {
+        //   finishDateStart,
+        //   finishDateEnd,
+        //   createTimeStart,
+        //   createTimeEnd
+        // });
         this.$emit('search', {
           ...this.params
         });

+ 7 - 0
src/views/purchasingManage/purchaseNeedManage/index.vue

@@ -174,6 +174,13 @@
             showOverflowTooltip: true,
             minWidth: 200
           },
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
           {
             prop: 'sourceTypeName',
             label: '订单类型',

+ 2 - 2
src/views/purchasingManage/purchaseOrder/accountstatement/components/searchTable.vue

@@ -44,9 +44,9 @@
           <el-date-picker
             v-model="createTime"
             @change="changeDate"
-            type="daterange"
+            type="datetimerange"
             style="width:100%"
-            value-format="yyyy-MM-dd"
+            value-format="yyyy-MM-dd HH:mm:ss"
             start-placeholder="开始时间"
             end-placeholder="结束时间"
             :default-time="['00:00:00', '23:59:59']">

+ 51 - 11
src/views/purchasingManage/purchaseOrder/components/addDialog.vue

@@ -51,7 +51,7 @@
           <el-form-item
             label="需求部门"
             prop="requireDeptId"
-           >
+          >
             <ele-tree-select
               clearable
               :data="groupTreeData"
@@ -125,7 +125,7 @@
           <el-form-item
             label="计价方式"
             prop="pricingWay"
-           >
+          >
             <el-radio-group v-model="form.pricingWay" @change="changePricingWay" :disabled="!!form.contractId">
               <el-radio v-for="item in pricingWayList" :label="item.id">{{ item.name }}</el-radio>
             </el-radio-group>
@@ -150,7 +150,21 @@
             prop="partaName"
 
           >
-            <el-input clearable v-model="form.partaName" placeholder="请输入"/>
+<!--            <el-input clearable v-model="form.partaName" placeholder="请输入"/>-->
+            <el-select
+              style="width: 100%"
+              v-model="form.partaName"
+              placeholder="请选择"
+              @change="getEnterprise()"
+            >
+              <el-option
+                v-for="item in enterprisePage"
+                :key="item.id"
+                :label="item.name"
+                :value="item.name"
+              >
+              </el-option>
+            </el-select>
           </el-form-item>
           <el-form-item
             label="采购方统一社会信用代码"
@@ -235,7 +249,7 @@
           <el-form-item
             label="供应商统一社会信用代码"
             prop="partbUnifiedSocialCreditCode"
-           class="form_item_label"
+            class="form_item_label"
 
           >
             <el-input
@@ -313,7 +327,8 @@
             prop="payAmount"
 
           >
-            <el-input clearable v-model="form.payAmount" :disabled="(!!form.contractId&&!OutValidate.includes(form.sourceType))||!allcountAmount"
+            <el-input clearable v-model="form.payAmount"
+                      :disabled="(!!form.contractId&&!OutValidate.includes(form.sourceType))||!allcountAmount"
                       type="number"
                       @blur="discountInput"
                       placeholder="请输入">
@@ -483,7 +498,7 @@ export default {
       // 组织机构树形结构数据
       groupTreeData: [],
       groupData: [],
-      OutValidate:['3','4'],
+      OutValidate: ['3', '4'],
 
       // 提交状态
       loading: false,
@@ -502,10 +517,18 @@ export default {
           {required: true, message: '请选择交货日期', trigger: 'change'}
         ],
         purchasePlanName: [
-          {required: this.OutValidate.includes(this.form.sourceType), message: '请选择采购计划单', trigger: ['change', 'blur']}
+          {
+            required: this.OutValidate.includes(this.form.sourceType),
+            message: '请选择采购计划单',
+            trigger: ['change', 'blur']
+          }
         ],
         contractName: [
-          {required: this.OutValidate.includes(this.form.sourceType), message: '请选择合同', trigger: ['change', 'blur']}
+          {
+            required: this.OutValidate.includes(this.form.sourceType),
+            message: '请选择合同',
+            trigger: ['change', 'blur']
+          }
         ],
         // purchaseType: [
         //   {required: true, message: '请选择采购订单类型', trigger: 'change'}
@@ -794,7 +817,7 @@ export default {
       this.$set(this.form, 'partaEmail', obj.email);
     },
     //选择供应商回调
-    changeParent(obj) {
+    async changeParent(obj) {
       this.form = Object.assign({}, this.form, {
         partbId: obj.id,
         partbName: obj.name,
@@ -804,7 +827,15 @@ export default {
         partbEmail: '',
         partbTel: ''
       });
-      this.getLinkInfo(obj.id);
+      await this.getLinkInfo(obj.id);
+      this.$nextTick(() => {
+        let firstLink = this.linkNameOptions.find(item => item.ifChief == 1) || {}
+        this.form = Object.assign({}, this.form, {
+          partbLinkId: firstLink.id || this.linkNameOptions[0]?.id,
+          partbLinkName: firstLink.linkName || this.linkNameOptions[0]?.linkName,
+          partbTel: firstLink.mobilePhone || this.linkNameOptions[0]?.mobilePhone,
+        });
+      });
     },
 
     //选择合同回调
@@ -830,7 +861,7 @@ export default {
     },
     async getPlanInfo(id) {
       let res = await getPurchasePlanByContractIdAPI(id)
-      if(!res.data?.id) return
+      if (!res.data?.id) return
       this.form = Object.assign({}, this.form, {
         purchasePlanId: res.data?.id,
         purchasePlanName: res.data?.planName,
@@ -946,6 +977,15 @@ export default {
         this.enterprisePage.push(...res.list);
       });
     },
+    getEnterprise() {
+      let data = this.enterprisePage.find(
+        (item) => item.name == this.form.quoteName
+      );
+      this.form.partaName = data.name;
+      this.form.partaUnifiedSocialCreditCode = data.unifiedSocialCreditCode;
+      this.form.partaFax = data.fax;
+      this.form.partaAddress = data.address;
+    },
     //从合同页面新增订单
     contractOpen(row) {
       this.title = '新增'

+ 1 - 0
src/views/purchasingManage/purchaseOrder/components/inventoryTable.vue

@@ -6,6 +6,7 @@
         :needPage="false"
         :columns="columns"
         :toolkit="[]"
+        max-height="500px"
         :datasource="form.datasource"
         cache-key="systemRoleTable17"
         class="time-form"

+ 10 - 1
src/views/purchasingManage/purchaseOrder/components/searchTable.vue

@@ -80,12 +80,21 @@
 
     </el-row>
     <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
+        </el-form-item>
+      </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg:18, md: 18 } : { span:18 }">
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg:12, md: 12 } : { span:12 }">
 
         <div class="ele-form-actions">
           <el-button

+ 7 - 0
src/views/purchasingManage/purchaseOrder/index.vue

@@ -286,6 +286,13 @@ export default {
           showOverflowTooltip: true,
           minWidth: 130
         },
+        {
+          prop: 'productNames',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
         {
           prop: 'partbName',
           label: '供应商名称',

+ 1 - 0
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -5,6 +5,7 @@
       :needPage="false"
       :columns="columns"
       :toolkit="[]"
+      max-height="500px"
       :datasource="form.datasource"
       cache-key="systemRoleTable17"
       class="time-form"

+ 2 - 1
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -4,6 +4,7 @@
       ref="table"
       :needPage="false"
       :columns="columns"
+      max-height="500px"
       :toolkit="[]"
       :datasource="form.datasource"
       cache-key="systemRoleTable17"
@@ -702,7 +703,7 @@ export default {
         this.$set(parasm, 'availableCountBase', item.availableCountBase);
         this.$set(parasm, 'modelType', item.modelType);
         this.$set(parasm, 'weightUnit', item.weightUnit);
-        this.$set(parasm, 'measuringUnit', item.measuringUnit);
+        this.$set(parasm, 'measuringUnit', item.unit);
         this.$set(parasm, 'specification', item.specification);
         this.$set(parasm, 'remark', '');
         this.$set(parasm, 'imgCode', item.imgCode);

+ 1 - 1
src/views/purchasingManage/purchasePlanManage/components/purchaseNeed-list.vue

@@ -31,7 +31,7 @@
       </template>
     </ele-pro-table>
 
-    <div class="btns">
+    <div slot="footer">
       <el-button type="primary" size="small" @click="selected">选择</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
     </div>

+ 37 - 28
src/views/purchasingManage/purchasePlanManage/components/searchQuotation.vue

@@ -68,41 +68,50 @@
 
     </el-row>
     <el-row :gutter="15">
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="完成日期:" prop="finishDateStart">
-          <el-date-picker
-            v-model="finishDate"
-            @change="changeDate"
-            style="width: 100%"
-            type="daterange"
-            value-format="yyyy-MM-dd"
-            start-placeholder="开始日期"
-            end-placeholder="结束日期"
-          >
-          </el-date-picker>
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-        <el-form-item label="创建时间:" prop="createTimeStart">
-          <el-date-picker
-            style="width: 100%"
-            v-model="createTime"
-            @change="changeCreateTime"
-            type="datetimerange"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            start-placeholder="开始时间"
-            end-placeholder="结束时间"
-            :default-time="['00:00:00', '23:59:59']"
-          >
-          </el-date-picker>
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
         </el-form-item>
       </el-col>
+<!--      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">-->
+<!--        <el-form-item label="完成日期:" prop="finishDateStart">-->
+<!--          <el-date-picker-->
+<!--            v-model="finishDate"-->
+<!--            @change="changeDate"-->
+<!--            style="width: 100%"-->
+<!--            type="daterange"-->
+<!--            value-format="yyyy-MM-dd"-->
+<!--            start-placeholder="开始日期"-->
+<!--            end-placeholder="结束日期"-->
+<!--          >-->
+<!--          </el-date-picker>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
+<!--      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">-->
+<!--        <el-form-item label="创建时间:" prop="createTimeStart">-->
+<!--          <el-date-picker-->
+<!--            style="width: 100%"-->
+<!--            v-model="createTime"-->
+<!--            @change="changeCreateTime"-->
+<!--            type="datetimerange"-->
+<!--            value-format="yyyy-MM-dd HH:mm:ss"-->
+<!--            start-placeholder="开始时间"-->
+<!--            end-placeholder="结束时间"-->
+<!--            :default-time="['00:00:00', '23:59:59']"-->
+<!--          >-->
+<!--          </el-date-picker>-->
+<!--        </el-form-item>-->
+<!--      </el-col>-->
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 6, md: 6 } : { span: 6 }">
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg: 12, md: 12 } : { span: 12 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"

+ 1 - 0
src/views/purchasingManage/purchasePlanManage/components/splitDialog.vue

@@ -106,6 +106,7 @@
         :needPage="false"
         :columns="columns"
         :toolkit="[]"
+        max-height="500px"
         :datasource="form.detailList"
         row-key="id"
       >

+ 19 - 5
src/views/purchasingManage/purchasePlanManage/index.vue

@@ -33,7 +33,7 @@
           <el-table-column
             prop="planCode"
             label="采购计划单编码"
-            :minWidth="160"
+            :minWidth="200"
             :showOverflowTooltip="true"
             align="center">
             <template slot-scope="{ row }">
@@ -66,6 +66,13 @@
               >
             </template>
           </el-table-column>
+          <el-table-column
+            prop="productNames"
+            label="产品名称"
+            :minWidth="120"
+            :showOverflowTooltip="true"
+            align="center">
+          </el-table-column>
           <el-table-column
             prop="sourceTypeName"
             label="需求类型"
@@ -139,7 +146,7 @@
                 type="primary"
                 :underline="false"
                 icon="el-icon-edit"
-                v-if="[2].includes(row.status)&&!row.isCut"
+                v-if="[2].includes(row.status)&&!row.isCut&&!row.inquiryCount"
                 @click="handleSplit(row)"
               >
                 拆分
@@ -360,8 +367,8 @@ export default {
           slot: 'planCode',
           label: '采购计划单编码',
           align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 200
+          // showOverflowTooltip: true,
+          minWidth: 210
         },
         {
           prop: 'planName',
@@ -378,6 +385,13 @@ export default {
           showOverflowTooltip: true,
           minWidth: 200
         },
+        {
+          prop: 'productNames',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
         {
           prop: 'sourceTypeName',
           label: '需求类型',
@@ -611,6 +625,6 @@ export default {
 }
 
 ::v-deep .el-table__row--level-0 {
-  background: rgb(187 216 243);
+  background: rgb(156 249 177);
 }
 </style>

+ 37 - 36
src/views/purchasingManage/supplierManage/components/addContactDialog.vue

@@ -402,6 +402,7 @@
     </certificate-qualifications-dialog>
     <product-list
       ref="productListRef"
+      :data="supplyList"
       @changeParent="getSupplyList"
     ></product-list>
   </ele-modal>
@@ -774,42 +775,42 @@ export default {
           minWidth: 90
         },
 
-        {
-          prop: 'weightUnit',
-          label: '重量单位',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        {
-          prop: 'roughWeight',
-          label: '毛重',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        {
-          prop: 'netWeight',
-          label: '净重',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        {
-          prop: 'packingUnit',
-          align: 'center',
-          label: '包装单位',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'categoryLevelPath',
-          label: '分类',
-          align: 'center',
-          showOverflowTooltip: true
-        },
+        // {
+        //   prop: 'weightUnit',
+        //   label: '重量单位',
+        //   showOverflowTooltip: true,
+        //   align: 'center',
+        //   minWidth: 90
+        // },
+        //
+        // {
+        //   prop: 'roughWeight',
+        //   label: '毛重',
+        //   showOverflowTooltip: true,
+        //   align: 'center',
+        //   minWidth: 90
+        // },
+        //
+        // {
+        //   prop: 'netWeight',
+        //   label: '净重',
+        //   showOverflowTooltip: true,
+        //   align: 'center',
+        //   minWidth: 90
+        // },
+        //
+        // {
+        //   prop: 'packingUnit',
+        //   align: 'center',
+        //   label: '包装单位',
+        //   showOverflowTooltip: true
+        // },
+        // {
+        //   prop: 'categoryLevelPath',
+        //   label: '分类',
+        //   align: 'center',
+        //   showOverflowTooltip: true
+        // },
         {
           slot: 'action',
           align: 'center',

+ 38 - 38
src/views/purchasingManage/supplierManage/components/contactDetailDialog.vue

@@ -1253,14 +1253,14 @@ export default {
           label: '序号'
         },
         {
-          prop: 'code',
+          prop: 'productCode',
           label: '编码',
           align: 'center',
           showOverflowTooltip: true,
           minWidth: 110
         },
         {
-          prop: 'name',
+          prop: 'productName',
           label: '名称',
           align: 'center',
           showOverflowTooltip: true,
@@ -1320,42 +1320,42 @@ export default {
           minWidth: 90
         },
 
-        {
-          prop: 'weightUnit',
-          label: '重量单位',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        {
-          prop: 'roughWeight',
-          label: '毛重',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        {
-          prop: 'netWeight',
-          label: '净重',
-          showOverflowTooltip: true,
-          align: 'center',
-          minWidth: 90
-        },
-
-        {
-          prop: 'packingUnit',
-          align: 'center',
-          label: '包装单位',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'categoryLevelPath',
-          label: '分类',
-          align: 'center',
-          showOverflowTooltip: true
-        }
+        // {
+        //   prop: 'weightUnit',
+        //   label: '重量单位',
+        //   showOverflowTooltip: true,
+        //   align: 'center',
+        //   minWidth: 90
+        // },
+        //
+        // {
+        //   prop: 'roughWeight',
+        //   label: '毛重',
+        //   showOverflowTooltip: true,
+        //   align: 'center',
+        //   minWidth: 90
+        // },
+        //
+        // {
+        //   prop: 'netWeight',
+        //   label: '净重',
+        //   showOverflowTooltip: true,
+        //   align: 'center',
+        //   minWidth: 90
+        // },
+        //
+        // {
+        //   prop: 'packingUnit',
+        //   align: 'center',
+        //   label: '包装单位',
+        //   showOverflowTooltip: true
+        // },
+        // {
+        //   prop: 'categoryLevelPath',
+        //   label: '分类',
+        //   align: 'center',
+        //   showOverflowTooltip: true
+        // }
       ],
     };
   },

+ 11 - 1
src/views/saleManage/businessOpportunity/components/opportunitySearch.vue

@@ -44,7 +44,16 @@
           <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col style="display: flex;justify-content: end"  v-bind="styleResponsive ? { lg:24, md: 24 } : { span:24 }">
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col style="display: flex;justify-content: end"  v-bind="styleResponsive ? { lg:18, md: 18 } : { span:18 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -67,6 +76,7 @@ export default {
     const defaultParams = {
       type: 1,
       name: '',
+      productName: '',
       codeOrSerialNo: '',
       status: '',
       deptIds:''

+ 7 - 1
src/views/saleManage/businessOpportunity/index.vue

@@ -198,7 +198,13 @@
             showOverflowTooltip: true,
             minWidth: 140
           },
-
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
           {
             prop: 'name',
             label: '商机名称',

+ 12 - 1
src/views/saleManage/quotation/components/searchQuotation.vue

@@ -48,12 +48,22 @@
 
     </el-row>
     <el-row :gutter="15">
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
+        </el-form-item>
+      </el-col>
+
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <el-form-item label="组织机构:">
           <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col style="display: flex;justify-content: end"  v-bind="styleResponsive ? { lg:18, md: 18 } : { span:18 }">
+      <el-col style="display: flex;justify-content: end"  v-bind="styleResponsive ? { lg:12, md: 12 } : { span:12 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -77,6 +87,7 @@
       // 默认表单数据
       const defaultParams = {
         contactName: '',
+        productName: '',
         createTimeStart: '',
         createTimeEnd:'',
         totalPriceMax: null,

+ 7 - 0
src/views/saleManage/quotation/index.vue

@@ -183,6 +183,13 @@
             showOverflowTooltip: true,
             minWidth: 140
           },
+          {
+            prop: 'productNames',
+            label: '产品名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140
+          },
           {
             prop: 'quoteName',
             label: '报价方名称',

+ 62 - 41
src/views/saleManage/saleOrder/components/addDialog.vue

@@ -50,7 +50,7 @@
           <el-form-item
             label="订单类型"
             prop="needProduce"
-           >
+          >
             <el-radio v-model="form.needProduce" :label="1">生产性订单</el-radio>
             <el-radio v-model="form.needProduce" :label="0">库存式订单</el-radio>
           </el-form-item>
@@ -111,7 +111,7 @@
           <el-form-item
             label="计价方式"
             prop="pricingWay"
-           >
+          >
             <el-radio-group v-model="form.pricingWay" @change="changePricingWay" :disabled="!!form.contractId">
               <el-radio v-for="item in pricingWayList" :label="item.id">{{ item.name }}</el-radio>
             </el-radio-group>
@@ -368,6 +368,8 @@
       ref="selectContractRef"
       @changeParent="changeContract"
     ></contractListDialog>
+    <autogenerate-dialog :autogenerate-dialog-flag.sync="autogenerateDialogFlag" ref="autogenerateDialogRef"
+                         v-if="autogenerateDialogFlag" @getAutogenerateParams="getAutogenerateParams"></autogenerate-dialog>
   </ele-modal>
 </template>
 
@@ -378,6 +380,7 @@ import inventoryTable from './inventoryTable.vue';
 import fileUpload from '@/components/upload/fileUpload';
 import dictMixins from '@/mixins/dictMixins';
 import parentList from '@/views/saleManage/contact/components/parentList.vue';
+import autogenerateDialog from "@/BIZComponents/autogenerateDialog.vue";
 import {getDetail} from '@/api/contractManage/contractBook';
 import {
   getSaleOrderDetail,
@@ -401,7 +404,8 @@ export default {
     contractListDialog,
     paymentList,
     inventoryTable,
-    parentList
+    parentList,
+    autogenerateDialog
   },
   data() {
     let formDef = {
@@ -419,8 +423,8 @@ export default {
       saleType: '',
       saleTypeName: '',
       totalAmount: '',
-      settlementMode:'4',
-      settlementModeName:'分期付款',
+      settlementMode: '4',
+      settlementModeName: '分期付款',
       partaUnifiedSocialCreditCode: '',
       partbUnifiedSocialCreditCode: '',
       partaAddress: '',
@@ -444,6 +448,7 @@ export default {
 
     return {
       clearing: false, //是否清除合同
+      autogenerateDialogFlag: false,
       payWayOptions: [],
       delDetailIds: [],
       linkNameOptions: [],
@@ -554,7 +559,7 @@ export default {
     },
 
     //选择供应商
-    changeSupplier(obj) {
+    async changeSupplier(obj) {
       this.form = Object.assign({}, this.form, {
         partbId: obj.id,
         partbName: obj.name,
@@ -564,7 +569,15 @@ export default {
         partbEmail: '',
         partbTel: ''
       });
-      this.getLinkInfo(obj.id);
+      await this.getLinkInfo(obj.id);
+      this.$nextTick(() => {
+        let firstLink = this.linkNameOptions.find(item => item.ifChief == 1) || {}
+        this.form = Object.assign({}, this.form, {
+          partbLinkId: firstLink.id || this.linkNameOptions[0]?.id,
+          partbLinkName: firstLink.linkName || this.linkNameOptions[0]?.linkName,
+          partbTel: firstLink.mobilePhone || this.linkNameOptions[0]?.mobilePhone,
+        });
+      });
     },
     //选择合同获取合同的详情
     async getDetailData(id) {
@@ -699,7 +712,7 @@ export default {
       this.$set(this.form, 'partbEmail', obj.email);
     },
     //选择客户回调
-    changeParent(obj) {
+    async changeParent(obj) {
       this.form = Object.assign({}, this.form, {
         partaId: obj.id,
         partaName: obj.name,
@@ -709,7 +722,15 @@ export default {
         partaEmail: '',
         partaTel: ''
       });
-      this.getLinkInfo(obj.id);
+      await this.getLinkInfo(obj.id);
+      this.$nextTick(() => {
+        let firstLink = this.linkNameOptions.find(item => item.ifChief == 1) || {}
+        this.form = Object.assign({}, this.form, {
+          partaLinkId: firstLink.id || this.linkNameOptions[0]?.id,
+          partaLinkName: firstLink.linkName || this.linkNameOptions[0]?.linkName,
+          partaTel: firstLink.mobilePhone || this.linkNameOptions[0]?.mobilePhone,
+        });
+      });
     },
 
     //选择合同回调
@@ -776,7 +797,7 @@ export default {
       return data.filter(item => item.dictCode !== 0)
     },
     //切换计价方式重新算费用
-    changePricingWay(){
+    changePricingWay() {
       this.$refs.inventoryTable.getTotalPrice()
     },
     //打开新增编辑弹框
@@ -890,42 +911,41 @@ export default {
           saleTypeName: this.getDictValue('销售类型', this.form.saleType)
         });
 
-        if (this.isUpdate) {
-          UpdateInformation(commitData)
-            .then((res) => {
-              this.loading = false;
-              this.$message.success('修改成功');
-              if (type === 'sub') {
-                this.saleOrderSubmit(res);
-                return;
-              }
-              this.cancel();
-              this.$emit('done');
-            })
-            .catch((e) => {
-              //this.loading = false;
-            });
-        } else {
-          addInformation(commitData)
-            .then((res) => {
-              this.loading = false;
-              this.$message.success('新增成功');
-              if (type === 'sub') {
-                this.saleOrderSubmit(res);
-                return;
-              }
-              this.cancel();
-              this.$emit('done');
-            })
-            .catch((e) => {
-              //this.loading = false;
-            });
-        }
+        this.interfaceCall(commitData,type);
+        // if (type === 'sub') {
+        //   this.autogenerateDialogFlag = true
+        // }else {
+        //   this.interfaceCall(commitData,type);
+        // }
       } catch (error) {
         console.log(error);
         // 表单验证未通过,不执行保存操作
       }
     },
+    getAutogenerateParams(params){
+      let commitData = Object.assign({}, this.form, {
+        productList: this.$refs.inventoryTable.getTableValue(),
+        saleTypeName: this.getDictValue('销售类型', this.form.saleType),
+        ...params
+      });
+      this.interfaceCall(commitData,'sub');
+    },
+    interfaceCall(commitData,type){
+      let API = this.isUpdate ? UpdateInformation : addInformation;
+      API(commitData).then((res) => {
+        this.loading = false;
+        this.$message.success('操作成功');
+        if (type === 'sub') {
+          this.saleOrderSubmit(res);
+          return;
+        }
+        this.cancel();
+        this.$emit('done');
+      })
+        .catch((e) => {
+          //this.loading = false;
+        });
+    },
     saleOrderSubmit(res) {
       submit({
         businessId: this.businessId || res
@@ -935,6 +955,7 @@ export default {
         this.$emit('done');
       });
     },
+
     cancel() {
       this.$nextTick(() => {
         this.activeName = 'base';

+ 11 - 2
src/views/saleManage/saleOrder/components/searchTable.vue

@@ -60,7 +60,15 @@
           </el-select>
         </el-form-item>
       </el-col>-->
-
+      <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
+        <el-form-item label="产品名称:" prop="productName">
+          <el-input
+            clearable
+            placeholder="请输入"
+            v-model.trim="params.productName"
+          ></el-input>
+        </el-form-item>
+      </el-col>
       <el-col v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
         <el-form-item label="创建时间:" prop="createTimeStart">
           <el-date-picker
@@ -81,7 +89,7 @@
           <auth-selection v-model="params.deptIds" style="width: 100%"></auth-selection>
         </el-form-item>
       </el-col>
-      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg:12, md: 12 } : { span:12 }">
+      <el-col style="display: flex;justify-content: end" v-bind="styleResponsive ? { lg:6, md: 12 } : { span:6 }">
         <el-button
           type="primary"
           icon="el-icon-search"
@@ -101,6 +109,7 @@ import {deliveryStatusOptions,orderStatusOptions,payStatusOptions} from '@/enum/
     data () {
       // 默认表单数据
       const defaultParams = {
+        productName: '',
         contractNo: '',
         contractName: '',
         contractNumber: '',

+ 23 - 15
src/views/saleManage/saleOrder/index.vue

@@ -245,21 +245,7 @@ export default {
           showOverflowTooltip: true,
           minWidth: 200
         },
-        {
-          prop: 'contractNo',
-          label: '合同编码',
-          align: 'center',
-          slot: 'contractNo',
-          showOverflowTooltip: true,
-          minWidth: 200
-        },
-        {
-          prop: 'contractNumber',
-          label: '合同编号',
-          align: 'center',
-          showOverflowTooltip: true,
-          minWidth: 200
-        },
+
         // {
         //   prop: 'deliveryDate',
         //   label: '交货日期',
@@ -267,6 +253,13 @@ export default {
         //   showOverflowTooltip: true,
         //   minWidth: 200
         // },
+        {
+          prop: 'productNames',
+          label: '产品名称',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 140
+        },
         {
           prop: 'saleTypeName',
           label: '销售类型',
@@ -335,6 +328,21 @@ export default {
             return reviewStatus[_row.orderStatus];
           }
         },
+        {
+          prop: 'contractNo',
+          label: '合同编码',
+          align: 'center',
+          slot: 'contractNo',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
+        {
+          prop: 'contractNumber',
+          label: '合同编号',
+          align: 'center',
+          showOverflowTooltip: true,
+          minWidth: 200
+        },
         {
           prop: 'createTime',
           label: '创建时间',