yusheng 11 ヶ月 前
コミット
63007df2b6

+ 338 - 0
src/components/contactDialog/api.js

@@ -0,0 +1,338 @@
+import request from '@/utils/request';
+
+/**
+ * 获取客户信息列表
+ */
+export async function contactPage(params) {
+  const res = await request.get(`/eom/contact/page`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 获取客户信息列表
+ */
+export async function contactPageUsages(params) {
+  const res = await request.get(`/eom/contact/page2Usages`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取客户信息详情
+ */
+export async function contactDetail(id) {
+  const res = await request.get(`/eom/contact/getById/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新客户信息
+ */
+export async function contactUpdate(data) {
+  const res = await request.put(`/eom/contact/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 新增客户信息
+ */
+export async function contactSave(data) {
+  const res = await request.post(`/eom/contact/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 客户证书资质信息分页
+ */
+export async function contactQcPackPageAPI(params) {
+  const res = await request.get(
+    `/main/professionCertification/selectByRelationIdAndType`,
+    { params }
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 新增客户证书资质信息
+ */
+export async function contactQcPackSaveAPI(data) {
+  const res = await request.post(`/main/professionCertification/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 修改客户证书资质信息
+ */
+export async function contactQcPackUpdateAPI(data) {
+  const res = await request.put(`/main/professionCertification/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取客户证书资质信息详情
+ */
+export async function contactQcPackDetailAPI(id) {
+  const res = await request.get(
+    `/main/professionCertification/getById/${id}`,
+    {}
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 删除客户证书资质包
+ */
+export async function contactQcPackDeleteAPI(data) {
+  const res = await request.delete(`/main/professionCertification/delete`, {
+    data
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 提交客户证书资质信息  开启流程
+ */
+export async function contactQcSubmit(data) {
+  const res = await request.post(`/bpm/ProfessionCertification/submit`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除事项
+ */
+export async function contactDelete(data) {
+  const res = await request.post('/eom/contact/delete', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取客户分类树
+ */
+export async function contactTypeTree(data) {
+  const res = await request.get(`/main/categoryLevel/getTreeByPid/${data.id}`);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新用户状态
+ */
+export async function updateStatus(id, status) {
+  const res = await request.get(
+    `/eom/contact/updateStatus?id=` + id + '&status=' + status
+  );
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 指派
+ */
+export async function assign(data) {
+  const res = await request.post('/eom/contact/assign', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 释放
+ */
+export async function free(data) {
+  const res = await request.post('/eom/contact/free', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 申请
+ */
+export async function applySave(data) {
+  const res = await request.post('/eom/contactlistapply/save', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 供应商维护供货产品
+ */
+export async function contactProductSaveAPI(data) {
+  const res = await request.post('/main/contactproduct/save', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 供应商维护供货产品
+ */
+export async function contactProductUpdateAPI(data) {
+  const res = await request.post('/main/contactproduct/update', data);
+  if (res.data.code == 0) {
+    return res.data.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));
+}
+
+/**
+ * 发布动态
+ */
+export async function updateContactDynamics(data) {
+  const res = await request.put('/eom/contact/updateContactDynamics', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 回复动态
+ */
+export async function updateContactComment(data) {
+  const res = await request.put('/eom/contact/updateContactComment', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+/**
+ * 摘要卡片
+ */
+export async function queryContactIdCount(id) {
+  const res = await request.get(`eom/contact/queryContactIdCount/` + id);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 更新客户关联状态
+ */
+export async function updateRelationStatus(data) {
+  const res = await request.post('/eom/contact/updateRelationStatus', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取供应商最小订购数量
+ */
+export async function listByContactId(data) {
+  const res = await request.post('/eom/contactproduct/listByContactId',  data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 跟进记录统计
+ */
+export async function groupByContact(params) {
+  const res = await request.get(`/eom/businessopportunityfollowup/groupByContact`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+/**
+ * 客户资质证照
+ */
+export async function identityphotoList(data) {
+  const res = await request.post(`/main/identityphoto/list`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 保存or更新
+export async function saveOrEdit (data) {
+  const res = await request.post(`/main/identityphoto/saveOrUpdate`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+// 获取证照信息详情
+export async function getPhotoInfo (id) {
+  const res = await request.get(`/main/identityphoto/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+// 物品信息列表
+export async function getList(params) {
+  const res = await request.get('/main/category/getList', { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 删除
+ */
+export async function deleteIdentityphoto(data) {
+  const res = await request.delete('/main/identityphoto/delete', { data });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 104 - 0
src/components/contactDialog/contactSearch.vue

@@ -0,0 +1,104 @@
+<!-- 搜索表单 -->
+<template>
+  <seekPage :seekList="seekList" :formLength="3" @search="search"></seekPage>
+</template>
+<script>
+  import { reviewStatusSelect } from '@/enum/dict';
+  export default {
+    data() {
+      return {};
+    },
+    computed: {
+      // 表格列配置
+      seekList() {
+        return [
+        {
+            label: '关键字:',
+            value: 'searchName',
+            type: 'input',
+            placeholder: '编码/代号/客户名称/电话'
+          },
+          {
+            label: '编码/代号:',
+            value: 'codeOrSerialNo',
+            type: 'input',
+            placeholder: '请输入'
+          },
+          {
+            label: '客户名称:',
+            value: 'name',
+            type: 'input',
+            placeholder: '请输入',
+          },
+          // {
+          //   label: '电话:',
+          //   value: 'phone',
+          //   width: 380,
+          //   type: 'input',
+          //   placeholder: '请输入'
+          // },
+          // {
+          //   label: '注册地址:',
+          //   value: 'addressName',
+          //   width: 380,
+          //   type: 'input',
+          //   placeholder: '请输入'
+          // },
+          // {
+          //   label: '联系地址:',
+          //   value: 'otherAddressName',
+          //   width: 380,
+          //   type: 'input',
+          //   placeholder: '请输入'
+          // },
+          // {
+          //   label: '联系人:',
+          //   value: 'linkName',
+          //   width: 380,
+          //   type: 'input',
+          //   placeholder: '请输入'
+          // },
+          // {
+          //   label: '状态',
+          //   value: 'targetTime',
+          //   width: 380,
+          //   type: 'select',
+          //   placeholder: '请选择状态',
+          //   planList:reviewStatusSelect
+          // },
+          // {
+          //   label: '部门:',
+          //   value: 'assessmentObject',
+          //   width: 380,
+          //   type: 'input',
+          //   placeholder: '请输入',
+          // },
+          // {
+          //   label: '创建人:',
+          //   value: 'createUsername',
+          //   width: 380,
+          //   type: 'input',
+          //   placeholder: '请输入姓名'
+          // },
+          {
+            label: '创建时间:',
+            value: 'createTime',
+            type: 'date',
+            dateType: 'datetimerange',
+            placeholder: '',
+            width: 380,
+            valueAr: ['createTimeStart', 'createTimeEnd']
+          },
+        ];
+      }
+    },
+    methods: {
+      /* 搜索 */
+      search(e) {
+        this.$emit('search', {
+          ...e
+        });
+      }
+    }
+  };
+</script>

+ 204 - 0
src/components/contactDialog/index.vue

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

+ 25 - 0
src/components/contactDialog/openContactDialog.vue

@@ -0,0 +1,25 @@
+<template>
+  <el-button type="primary" size="small" @click="$refs.indexRef.open()">
+    <index ref="indexRef" @changeParent="changeParent"></index>
+    选择
+  </el-button>
+</template>
+
+<script>
+  import index from './index.vue';
+
+  export default {
+    components: {
+      index
+    },
+    data() {},
+
+    methods: {
+      changeParent(data) {
+        this.$emit('changeParent', data);
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

ファイルの差分が大きいため隠しています
+ 639 - 303
src/views/warehouseManagement/outgoingManagement/add.vue


+ 5 - 3
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -36,16 +36,18 @@
                   <span>{{ extInfo.documentSource }}</span>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 3">
+              <el-col :span="8" >
                 <el-form-item label="客户名称:">
                   <span>{{ infoData.clientName }}</span>
-                </el-form-item> </el-col><el-col :span="8" v-if="infoData.bizType == 3">
+                </el-form-item>
+               <!-- </el-col>
+                <el-col :span="8" v-if="infoData.bizType == 3">
                 <el-form-item label="客户联系人:">
                   <span>{{ infoData.clientUser }}</span>
                 </el-form-item> </el-col><el-col :span="8" v-if="infoData.bizType == 3">
                 <el-form-item label="客户电话:">
                   <span>{{ infoData.clientPhone }}</span>
-                </el-form-item>
+                </el-form-item> -->
               </el-col>
               <el-col :span="8">
                 <el-form-item :label="infoData.bizType == 4 ? '领料单:' : '来源单据:'">

+ 21 - 11
src/views/warehouseManagement/stockManagement/add.vue

@@ -59,6 +59,19 @@
                 ></el-option>
               </el-select> </el-form-item
           ></el-col>
+          <el-col :span="6">
+            <el-form-item label="客户名称" prop="">
+              <el-input
+                placeholder="请选择"
+                v-model="formData.clientName"
+                style="width: calc(100% - 80px);"
+              
+              >
+         
+              </el-input>
+              <openContactDialog style="margin-left: 3px;" @changeParent="contactDialogSuccess"></openContactDialog>
+            </el-form-item>
+          </el-col>
           <el-col :span="6">
             <el-form-item label="单据来源" prop="sourceBizNo">
               <el-input
@@ -76,16 +89,7 @@
               </el-input>
             </el-form-item>
           </el-col>
-          <!-- <el-col :span="6">
-            <el-form-item label="权属部门" prop="deptName">
-              <el-input
-                placeholder="权属部门"
-                disabled
-                v-model="formData.extInfo.deptName"
-                clearable
-              />
-            </el-form-item>
-          </el-col> -->
+        
           <el-col :span="6">
             <el-form-item label="入库时间">
               <el-date-picker
@@ -1111,6 +1115,7 @@
   import XLSX from 'xlsx';
   import { mapActions, mapGetters } from 'vuex';
   import outboundRequisitionDialog from '../components/outboundRequisitionDialog.vue';
+  import openContactDialog from '@/components/contactDialog/openContactDialog.vue';
   import elTableInfiniteScroll from 'el-table-infinite-scroll';
   import storageApi from '@/api/warehouseManagement/index.js';
   import WarehousingDialog from '../components/WarehousingDialog.vue';
@@ -1133,7 +1138,7 @@
     components: {
       selectType,
       WarehousingDialog,
-      outboundRequisitionDialog
+      outboundRequisitionDialog,openContactDialog
     },
     // 虚拟列表滚动方法
     directives: {
@@ -1802,6 +1807,11 @@
         //   return this.$message.error('请选择入库类型');
         // }
       },
+      contactDialogSuccess(data){
+        this.$set(this.formData,'clientName',data.name)
+        this.$set(this.formData,'clientCode',data.code)
+
+      },
       // 键盘移动
       moveFocus(event, index, key, type, row) {
         let keyfield = [];

+ 2 - 2
src/views/warehouseManagement/stockManagement/details.vue

@@ -61,12 +61,12 @@
                   <span>{{ infoData.verifyName }}</span>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 2">
+              <el-col :span="8" >
                 <el-form-item label="客户:">
                   <span>{{ infoData.clientName }}</span>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 2">
+              <el-col :span="8">
                 <el-form-item label="供应商:">
                   <span>{{ extInfo.supplierName }}</span>
                 </el-form-item>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません