Kaynağa Gözat

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

695593266@qq.com 1 yıl önce
ebeveyn
işleme
96486d5123

+ 25 - 0
src/api/productionPlan/index.js

@@ -220,3 +220,28 @@ export async function getOrderBomRoot(data) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 根据产品查询BOM分类
+export async function findBomCategoryByCategoryId(categoryId) {
+  const res = await request.get(
+    `/aps/productionplan/findBomCategoryByCategoryId/${categoryId}`
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+// 根据计划id查询物料信息
+export async function findMaterialInfoByPlanId(params) {
+  const res = await request.get(
+    '/aps/productionplan/findMaterialInfoByPlanId',
+    {
+      params
+    }
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 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>

+ 1 - 1
src/views/materialPlan/components/plan-edit-dialog.vue

@@ -830,7 +830,7 @@
       },
       chooseOrder(list) {
         let salesOrderIds = [];
-
+        console.log(list,'listlistlistlistlistlistlistlistlist 获取的数据')
         const tableList = this.$refs.table.getData() || [];
         const existingIds = tableList.map((item) => item.id);
 

+ 2 - 2
src/views/productionPlan/components/disassemblePlanPop.vue

@@ -376,7 +376,6 @@
     },
     methods: {
       open(row) {
-        console.log(row, 'row 1234');
         this.unit = row.measuringUnit;
         this.formData = deepClone(row);
         this.getBomList();
@@ -636,7 +635,8 @@
         };
         batchSave(param).then((res) => {
           this.$emit('close', true);
-          this.visible = false;
+          // this.visible = false;
+          this.cancel();
         });
       }
     }

+ 25 - 4
src/views/productionPlan/components/factoryAdd/index.vue

@@ -55,6 +55,23 @@
               ></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="6">
+            <el-form-item label="客户名称:">
+              <el-input
+                clearable
+                v-model="form.customerName"
+                style="width: calc(100% - 80px)"
+              />
+
+              <contactDialog
+                style="margin-left: 3px"
+                @changeParent="contactDialogSuccess"
+              ></contactDialog>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="24">
           <el-col :span="6">
             <el-form-item
               label="计划开始日期:"
@@ -78,9 +95,6 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row :gutter="24">
           <el-col :span="6">
             <el-form-item
               label="计划结束日期:"
@@ -421,11 +435,12 @@
     temporarilyUpdate,
     temporaryPlanSave
   } from '@/api/saleOrder';
+  import contactDialog from '@/components/contactDialog/openContactDialog.vue';
 
   export default {
     components: {
       EquipmentDialog,
-      ProcessRoute
+      ProcessRoute,contactDialog
     },
     props: {
       factoryType: {
@@ -1022,7 +1037,13 @@
           this.$forceUpdate();
         });
       },
+      contactDialogSuccess(data){
+        console.log(data,'data 11')
+        // serialNo
+        this.form.serialNo = data.serialNo;
+        this.$set(this.form,'customerName',data.name)
 
+      },
       // 清空BOM 跟工艺路线
       wipeData(index) {
         let row = this.form.productInfoList[index];

+ 275 - 201
src/views/productionPlan/components/homogeneityInspectDialog.vue

@@ -1,104 +1,146 @@
 <template>
   <div>
-  <ele-modal
-    width="90vw"
-    :visible.sync="visible"
-    :close-on-click-modal="false"
-    row-key="code"
-    custom-class="ele-dialog-form"
-    :title="'齐套性检查'"
-    :maxable="true"
-  >
-    <div class="form-wrapper">
-      <div v-if="leftShow" :style="{width: leftWidth}">
-        <el-tree :expand-on-click-node="false" :data="cardList" :props="treeProps" @node-click="handleNodeClick"></el-tree>
-      </div>
-      <div :style="{width: rightWidth}">
-        <div v-if="!leftShow" class="planInfo">
-          <el-row style="width: 100%;">
-            <el-col :span="planInfo.salesCode ? 6 : planInfo.salesCode.length * 6">
-              <div style="color: blue; display: flex;">
-                <div>销售单号:</div><div v-if="planInfo.salesCode"><span v-for="item in planInfo.salesCode"> {{item}}</span></div>
-              </div>
-            </el-col>
-            <el-col :span="6">
-              计划编号:{{planInfo.code}}
-            </el-col>
-            <el-col :span="6">
-              批次号:{{planInfo.batchNo}}
-            </el-col>
-            <el-col :span="6">
-              名称:{{planInfo.productName}}
-            </el-col>
-            <el-col :span="6">
-              规格:{{planInfo.specification}}
-            </el-col>
-            <el-col :span="6">
-              型号:{{planInfo.model}}
-            </el-col>
-            <el-col :span="6">
-              计划数量:{{planInfo.productNum}}
-            </el-col>
-          </el-row>
+    <ele-modal
+      width="90vw"
+      :visible.sync="visible"
+      :close-on-click-modal="false"
+      row-key="code"
+      custom-class="ele-dialog-form"
+      :title="'齐套性检查'"
+      :maxable="true"
+    >
+      <div class="form-wrapper">
+        <div v-if="leftShow" :style="{ width: leftWidth }">
+          <el-tree
+            :expand-on-click-node="false"
+            :data="cardList"
+            :props="treeProps"
+            highlight-current
+            @node-click="handleNodeClick"
+          ></el-tree>
         </div>
-        <div>
-          <ele-pro-table
-            ref="table"
-            :needPage="false"
-            :columns="columns"
-            key="checkTable"
-            :init-load="false"
-            :datasource="datasource"
-          >
-            <template v-slot:stockCount="{ row }">
-              <el-link type="primary" :underline="false" @click="stockDetail(row)">
-                {{ row.stockCount }}
-              </el-link>
-            </template>
-            <template v-slot:currentCount="{ row }">
-              <el-link type="primary" :underline="false" @click="currentDetail(row)">
-                {{ row.currentCount }}
-              </el-link>
-            </template>
-            <template v-slot:stockColor="{ row }">
-              <div :class="{'statusRed' : row.stockStatus == '缺料'}">
-                {{row.stockStatus}}
-              </div>
-            </template>
-            <template v-slot:currentColor="{ row }">
-              <div :class="{'statusRed' : row.currentStatus == '缺料'}">
-                {{row.currentStatus}}
-              </div>
-            </template>
-            <template v-slot:finishColor="{ row }">
-              <div :class="{'statusRed' : row.finishStatus == '缺料'}">
-                {{row.finishStatus}}
-              </div>
-            </template>
-            <template v-slot:finishCount="{ row }">
-              <div>
-                <div v-if="row.finishCount > 0">{{row.finishCount}}</div>
-                <div v-else>-</div>
-              </div>
-            </template>
-          </ele-pro-table>
+        <div :style="{ width: rightWidth }">
+          <div v-if="!leftShow" class="planInfo">
+            <el-row style="width: 100%">
+              <el-col
+                :span="planInfo.salesCode ? 6 : planInfo.salesCode.length * 6"
+              >
+                <div style="color: blue; display: flex">
+                  <div>销售单号:</div
+                  ><div v-if="planInfo.salesCode"
+                    ><span v-for="item in planInfo.salesCode"
+                      > {{ item }}</span
+                    ></div
+                  >
+                </div>
+              </el-col>
+              <el-col :span="6"> 计划编号:{{ planInfo.code }} </el-col>
+              <el-col :span="6"> 批次号:{{ planInfo.batchNo }} </el-col>
+              <el-col :span="6"> 名称:{{ planInfo.productName }} </el-col>
+              <el-col :span="6"> 规格:{{ planInfo.specification }} </el-col>
+              <el-col :span="6"> 型号:{{ planInfo.model }} </el-col>
+              <el-col :span="6"> 计划数量:{{ planInfo.productNum }} </el-col>
+            </el-row>
+            <el-row>
+              <el-form
+                :inline="true"
+                :model="formInline"
+                class="demo-form-inline"
+              >
+                <el-form-item label="审批人">
+                  <el-select
+                    size="mini"
+                    v-model="formInline.region"
+                    placeholder="BOM类型"
+                  >
+                    <el-option label="区域一" value="shanghai"></el-option>
+                    <el-option label="区域二" value="beijing"></el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="活动区域">
+                  <el-select
+                    size="mini"
+                    v-model="formInline.region"
+                    placeholder="BOM版本"
+                  >
+                    <el-option label="区域一" value="shanghai"></el-option>
+                    <el-option label="区域二" value="beijing"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-form>
+            </el-row>
+          </div>
+          <div>
+            <ele-pro-table
+              ref="table"
+              :needPage="false"
+              :columns="columns"
+              key="checkTable"
+              :init-load="false"
+              :datasource="datasourceList"
+            >
+              <template v-slot:stockCount="{ row }">
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  @click="stockDetail(row)"
+                >
+                  {{ row.stockCount }}
+                </el-link>
+              </template>
+              <template v-slot:currentCount="{ row }">
+                <el-link
+                  type="primary"
+                  :underline="false"
+                  @click="currentDetail(row)"
+                >
+                  {{ row.currentCount }}
+                </el-link>
+              </template>
+              <template v-slot:stockColor="{ row }">
+                <div :class="{ statusRed: row.stockStatus == '缺料' }">
+                  {{ row.stockStatus }}
+                </div>
+              </template>
+              <template v-slot:currentColor="{ row }">
+                <div :class="{ statusRed: row.currentStatus == '缺料' }">
+                  {{ row.currentStatus }}
+                </div>
+              </template>
+              <template v-slot:finishColor="{ row }">
+                <div :class="{ statusRed: row.finishStatus == '缺料' }">
+                  {{ row.finishStatus }}
+                </div>
+              </template>
+              <template v-slot:finishCount="{ row }">
+                <div>
+                  <div v-if="row.finishCount > 0">{{ row.finishCount }}</div>
+                  <div v-else>-</div>
+                </div>
+              </template>
+            </ele-pro-table>
+          </div>
         </div>
       </div>
-    </div>
-    <div slot="footer">
-      <el-button plain @click="cancel">取消</el-button>
-      <el-button type="primary" @click="confirm">确定</el-button>
-    </div>
-  </ele-modal>
+      <div slot="footer">
+        <el-button plain @click="cancel">取消</el-button>
+        <el-button type="primary" @click="confirm">确定</el-button>
+      </div>
+    </ele-modal>
 
-  <stockDetailDialog ref="stockDetailDialog" />
+    <stockDetailDialog ref="stockDetailDialog" />
 
-  <currentDetailDialog ref="currentDetailDialog" />
+    <currentDetailDialog ref="currentDetailDialog" />
   </div>
 </template>
 
 <script>
-  import { homogeneityInspect, homogeneityInspectMerge } from '@/api/productionPlan/index.js';
+  import {
+    homogeneityInspect,
+    homogeneityInspectMerge,
+    findMaterialInfoByPlanId,
+    findBomCategoryByCategoryId
+  } from '@/api/productionPlan/index.js';
   import stockDetailDialog from './stockDetailDialog.vue';
   import currentDetailDialog from './currentDetailDialog.vue';
   export default {
@@ -117,10 +159,10 @@
           deviceId: ''
         },
         requiredFormingNum: 0,
-
-        form: {
-          homogeneityInspect: []
-        },
+        formInline: {},
+        // form: {
+        //   homogeneityInspect: []
+        // },
 
         rules: {},
 
@@ -133,52 +175,52 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          // {
+          //   prop: 'productCode',
+          //   label: '计划编号',
+          //   align: 'center',
+          //   minWidth: 100,
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'opCode',
+          //   label: '工序编码',
+          //   align: 'center',
+          //   minWidth: 100,
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'opName',
+          //   label: '工序名称',
+          //   align: 'center',
+          //   minWidth: 100
+          // },
+          // {
+          //   prop: 'bomCode',
+          //   label: '物料编码',
+          //   align: 'center',
+          //   minWidth: 100,
+          //   showOverflowTooltip: true
+          // },
+          // {
+          //   prop: 'bomName',
+          //   label: '物料名称',
+          //   align: 'center',
+          //   minWidth: 100
+          // },
           {
-            prop: 'productCode',
-            label: '计划编号',
-            align: 'center',
-            minWidth: 100,
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'opCode',
-            label: '工序编码',
-            align: 'center',
-            minWidth: 100,
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'opName',
-            label: '工序名称',
-            align: 'center',
-            minWidth: 100
-          },
-          {
-            prop: 'bomCode',
-            label: '物料编码',
-            align: 'center',
-            minWidth: 100,
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'bomName',
-            label: '物料名称',
-            align: 'center',
-            minWidth: 100
-          },
-          {
-            prop: 'count',
+            prop: 'demandQuantity',
             label: '定额数量',
             align: 'center',
             minWidth: 80
           },
-          {
-            slot: 'stockCount',
-            prop: 'stockCount',
-            label: '库存数量',
-            align: 'center',
-            minWidth: 80
-          },
+          // {
+          //   slot: 'stockCount',
+          //   prop: 'stockCount',
+          //   label: '库存数量',
+          //   align: 'center',
+          //   minWidth: 80
+          // },
           {
             slot: 'stockColor',
             prop: 'stockStatus',
@@ -187,25 +229,31 @@
             minWidth: 80
           },
           {
-            slot: 'currentCount',
-            prop: 'currentCount',
+            slot: 'inTransitNum',
+            prop: 'inTransitNum',
             label: '在途数量',
             align: 'center',
             minWidth: 80
           },
+          // {
+          //   slot: 'currentColor',
+          //   prop: 'currentStatus',
+          //   label: '在途状态',
+          //   align: 'center',
+          //   minWidth: 80
+          // },
           {
-            slot: 'currentColor',
-            prop: 'currentStatus',
-            label: '在途状态',
-            align: 'center',
-            minWidth: 80
-          },
-          {
-            slot: 'finishCount',
-            prop: 'finishCount',
             label: '最终缺料数量',
             align: 'center',
-            minWidth: 80
+            minWidth: 80,
+            formatter: (row) => {
+              let total =
+                row.demandQuantity - row.inTransitNum - row.inventoryQuantity;
+              if (total < 0) {
+                return 0;
+              }
+              return total;
+            }
           },
           {
             slot: 'finishColor',
@@ -213,7 +261,7 @@
             label: '最终状态',
             align: 'center',
             minWidth: 80
-          },
+          }
         ],
         ids: [],
         leftShow: false,
@@ -222,16 +270,17 @@
         cardList: [],
         treeProps: {
           label: 'code',
-          children: 'children',
+          children: 'children'
         },
         planInfo: {
-          salesCode: '',
+          salesCode: ''
         },
+        datasourceList: []
       };
     },
     watch: {
-      leftShow(newVal, oldVal){
-        if(newVal){
+      leftShow(newVal, oldVal) {
+        if (newVal) {
           this.leftWidth = '15%';
           this.rightWidth = '85%';
         } else {
@@ -240,11 +289,10 @@
         }
       }
     },
-    mounted() {
-    },
+    mounted() {},
     methods: {
-      handleNodeClick(data){
-        this.reload({planIds: [data.id]});
+      handleNodeClick(data) {
+        this.reload({ planIds: [data.id] });
       },
       reload(where) {
         this.$nextTick(() => {
@@ -252,42 +300,69 @@
         });
       },
       /* 表格数据源 */
-      datasource({ page, limit, where }) {
-        return homogeneityInspect({
-          pageNum: page,
-          size: limit,
-          ...where,
-        });
+      // datasource({ page, limit, where }) {
+      //   return homogeneityInspect({
+      //     pageNum: page,
+      //     size: limit,
+      //     ...where
+      //   });
+      // },
+      stockDetail(row) {
+        this.$refs.stockDetailDialog.open(row);
       },
-       stockDetail(row) {
-         this.$refs.stockDetailDialog.open(row);
-       },
-       currentDetail(row) {
-         this.$refs.currentDetailDialog.open(row);
-       },
-      open(dataList) {
-         this.visible = true;
-         this.cardList = dataList || [];
-         for(let item of this.cardList){
-           let children = [];
-           if(item.salesCode){
-
-             for(let ele of item.salesCode){
-               children.push({code: ele, id: item.id});
-             }
-           }
-           item.children = children;
-         }
-         this.planInfo = dataList.length > 0 ? dataList[0] : null;
-         console.log(this.planInfo);
-         if(dataList.length > 1){
-           this.leftShow = true;
-         } else {
-           this.leftShow = false;
-         }
-         if(this.planInfo){
-           this.reload({planIds: [this.planInfo.id]});
-         }
+      currentDetail(row) {
+        this.$refs.currentDetailDialog.open(row);
+      },
+      async open(dataList) {
+        this.visible = true;
+        try {
+          let data = dataList[0];
+          const res = await findBomCategoryByCategoryId(data.categoryId);
+          let obj = {};
+          res.map((el) => {
+            let OBMINFO = {
+              bomId: el.bomId,
+              bomType: el.type,
+              versions: `V${el.versions}.0`
+            };
+            if (obj[el.bomType]) {
+              obj[el.bomType].bomList.push(OBMINFO);
+            } else {
+              obj[el.bomType] = { ...el, bomList: [OBMINFO] };
+            }
+          });
+          console.log(obj,'obj ++++++++++')
+          console.log(res, '版本 类型');
+          let params = {
+            planId: data.id
+          };
+          const result = await findMaterialInfoByPlanId(params);
+          console.log(result, 'result +++++');
+          this.datasourceList = result;
+        } catch (err) {
+          this.$message.error(err.message);
+        }
+        return;
+        this.cardList = dataList || [];
+        for (let item of this.cardList) {
+          let children = [];
+          if (item.salesCode) {
+            for (let ele of item.salesCode) {
+              children.push({ code: ele, id: item.id });
+            }
+          }
+          item.children = children;
+        }
+        this.planInfo = dataList.length > 0 ? dataList[0] : null;
+        console.log(this.planInfo);
+        if (dataList.length > 1) {
+          this.leftShow = true;
+        } else {
+          this.leftShow = false;
+        }
+        if (this.planInfo) {
+          this.reload({ planIds: [this.planInfo.id] });
+        }
       },
       cancel() {
         this.formData = {};
@@ -297,11 +372,11 @@
       confirm() {
         this.visible = false;
       },
-      async merge(){
-        this.reload({planIds: this.ids, productType: 1, merge: 2});
+      async merge() {
+        this.reload({ planIds: this.ids, productType: 1, merge: 2 });
       },
-      tabClick(){
-        this.reload({planIds: this.ids, productType: 1});
+      tabClick() {
+        this.reload({ planIds: this.ids, productType: 1 });
       }
     }
   };
@@ -320,17 +395,16 @@
     justify-content: flex-end;
     padding-bottom: 3px;
   }
-  .statusRed{
+  .statusRed {
     color: red;
   }
-  .planInfo{
-
+  .planInfo {
   }
-  .form-wrapper{
+  .form-wrapper {
     display: flex;
   }
-  .planInfo{
-    display: flex;
+  .planInfo {
+    // display: flex;
     font-size: 16px;
   }
 </style>

+ 7 - 1
src/views/productionPlan/index.vue

@@ -480,7 +480,13 @@
             align: 'center',
             minWidth: 160
           },
-
+          {
+            prop: 'taskName',
+            action: 'taskName',
+            label: '工序进度',
+            align: 'center',
+            minWidth: 160
+          },
           {
             prop: 'productCode',
             label: '编码',

+ 14 - 1
src/views/saleOrder/components/create-order.vue

@@ -63,8 +63,14 @@
                 clearable
                 v-model="form.customerName"
                 :disabled="form.saleType == 3"
+                style="width:calc(100% - 80px);"
               />
+              <!-- <el-button style="margin-left: 3px;" size="small" type="primary" @click.native="$refs.contactDialogRef.open()"
+              >选择
+            </el-button> -->
+            <contactDialog style="margin-left: 3px;" @changeParent="contactDialogSuccess"></contactDialog>
             </el-form-item>
+      
           </el-col>
 
           <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
@@ -515,12 +521,13 @@
   import { parameterGetByCode } from '@/api/mainData/index';
   import dayjs from 'dayjs';
   import { multiply } from '@/utils/math';
+  import contactDialog from '@/components/contactDialog/openContactDialog.vue';
   export default {
     components: {
       EquipmentDialog,
       orderHomogeneityInspectDialog,
       orderHomogeneityInspectInstallDialog,
-      ProcessRoute
+      ProcessRoute,contactDialog
     },
     data() {
       return {
@@ -722,6 +729,12 @@
         this.visible = false;
       },
 
+      contactDialogSuccess(data){
+        this.$set(this.form,'customerName',data.name)
+        this.$set(this.form,'simpleName',data.simpleName)
+        this.$set(this.form,'serialNo',data.serialNo)
+        this.$set(this.form,'simpleName',data.simpleName)
+      },
       // 表格:模数、数量(方)、块数输入框 输入事件
       tableHandleKeyUp(row, index, e, name) {
         let modelArr = row.specification.split('*');

+ 33 - 1
src/views/saleOrder/components/order-search.vue

@@ -597,7 +597,25 @@
           }
         }
         const list = [];
+        let startTime = '';
+        let endTime = '';
         this.selection.map((item) => {
+          if (!startTime) {
+            startTime = item.releaseTime;
+          } else {
+            startTime =
+              this.compareTimes(startTime, item.releaseTime) == 1
+                ? item.releaseTime
+                : startTime;
+          }
+          if (!endTime) {
+            endTime = item.deliveryTime;
+          } else {
+            endTime =
+              this.compareTimes(endTime, item.deliveryTime) == 2
+                ? item.deliveryTime
+                : endTime;
+          }
           list.push(item.id);
         });
         this.$router.push({
@@ -608,11 +626,25 @@
             produceRoutingName: this.selection[0].produceRoutingName,
             factoriesId: factoriesId,
             bomCategoryId: bomCategoryId,
-            produceType: produceType
+            produceType: produceType,
+            startTime,
+            endTime
           }
         });
       },
+      // 比较时间大小
+      compareTimes(timeStr1, timeStr2) {
+        // 将时间字符串转换为Date对象
+        // 注意:需要将空格替换为'T'以符合ISO格式,或者直接按格式解析
+        const date1 = new Date(timeStr1.replace(' ', 'T'));
+        const date2 = new Date(timeStr2.replace(' ', 'T'));
 
+        if (date1 > date2) {
+          return 1;
+        } else {
+          return 2;
+        }
+      },
       // 刷新订单
       orderRefresh() {
         this.loading = true;

+ 28 - 0
src/views/saleOrder/salesToProductionNewTwo.vue

@@ -334,6 +334,13 @@
               {{ scope.row.productSumWeight }} {{ form.weightUnit }}
             </template>
           </el-table-column>
+          <el-table-column
+            label="下达时间"
+            align="center"
+            prop="releaseTime"
+            width="170"
+          >
+          </el-table-column>
           <el-table-column label="规格" align="center" prop="specification">
           </el-table-column>
           <el-table-column
@@ -863,6 +870,13 @@
       },
       'form.produceType'(newVal, oldVal) {
         console.log(newVal, '值');
+      },
+      form: {
+        handler(newVal) {
+          console.log(newVal, 'newVal 33');
+        },
+        deep: true,
+        immediate: true
       }
     },
     mounted() {
@@ -904,6 +918,18 @@
     },
 
     methods: {
+      // 初始化时间赋值
+      initTime() {
+        let data = this.$route.query;
+        if (data.startTime) {
+          this.$set(this.form, 'startTime', data.startTime);
+        }
+        if (data.endTime) {
+          this.$set(this.form, 'endTime', data.endTime);
+        }
+        console.log(data, '000000000000000000000 参数');
+        console.log(this.form, 'form 的赋值');
+      },
       // 是否必填
       mandatoryField() {
         parameterGetByCode({
@@ -938,6 +964,7 @@
         console.log(data, '订单的data');
 
         this.form = data;
+        this.initTime();
         // if (data.startTime) {
         //   this.form.startTime = new Date(data.startTime);
         // }
@@ -1079,6 +1106,7 @@
         productionToPlan(params).then((res) => {
           console.log(res, 'resresres');
           this.form = deepClone(res);
+          this.initTime();
           this.bomListVersion();
 
           console.log(this.bomVersionList, 'this.bomVersionList');

+ 7 - 0
src/views/workOrder/index.vue

@@ -387,6 +387,13 @@
             align: 'center',
             minWidth: 220,
             sortable: true
+          },
+           {
+            prop: 'taskName',
+            action: 'taskName',
+            label: '工序进度',
+            align: 'center',
+            minWidth: 160
           },
           {
             prop: 'productionPlanCode',

+ 2 - 1
src/views/workOrder/mixins/release.js

@@ -85,7 +85,8 @@ export default {
         this.FirstTaskIdFn(); // 查询工位数据
       } else {
         this.$message.warning(
-          `${this.current.firstTaskName}工序没有工作中心,请到主数据工序管理维护工序信息!`
+          // `${this.current.firstTaskName}工序没有工作中心,请到主数据工序管理维护工序信息!`
+          `当前登录人不属于首工序所属工作中心及班组,请切换首工序${this.current.firstTaskName}所在的班组成员派单`
         );
       }
     },

+ 1 - 1
vue.config.js

@@ -39,7 +39,7 @@ module.exports = {
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.251:18186',
-        target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.116:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域