Browse Source

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

Lexie 1 year ago
parent
commit
f460802cc8
1 changed files with 47 additions and 11 deletions
  1. 47 11
      src/view/yunyin/shengchanguanli/gongdanziliao.vue

+ 47 - 11
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -135,6 +135,33 @@
               <el-button @click="yycpzlhandleCancel">放弃</el-button>
               <el-button type="primary" @click="yycpzlhandleConfirm">执行</el-button>
             </div>
+
+            <el-table ref="multipleTable"
+                      :show-overflow-tooltip="true"
+                      :row-style="{ height: '0px' }"
+                      :cell-style="{ padding: '0px' }"
+                      :header-row-style="{ height: '0px' }"
+                      :header-cell-style="{ padding: '0px' }"
+                      @row-click="yyzltableRowClick"
+                      highlight-current-row="true"
+                      style="width: 100%;height: 30vh;" border tooltip-effect="dark"
+                      :data="yyzltableData" row-key="ID">
+              <el-table-column align="left" label="工单编号" width="100">
+                <template v-slot="{ row }"><span>{{ row.工单编号 }}</span></template>
+              </el-table-column>
+              <el-table-column align="left" label="客户编号" width="100">
+                <template v-slot="{ row }"><span>{{ row.客户编号 }}</span></template>
+              </el-table-column>
+              <el-table-column align="left" label="客户名称" width="120">
+                <template v-slot="{ row }"><span>{{ row.客户名称 }}</span></template>
+              </el-table-column>
+              <el-table-column align="left" label="产品编号" width="100">
+                <template v-slot="{ row }"><span>{{ row.产品编号 }}</span></template>
+              </el-table-column>
+              <el-table-column align="left" label="产品名称">
+                <template v-slot="{ row }"><span>{{ row.产品名称 }}</span></template>
+              </el-table-column>
+            </el-table>
           </el-dialog>
 
           <!--工序产量核算-->
@@ -2705,14 +2732,15 @@ const yycpzlProductValue = async () => {
   }
   _WorkOrderDetailCopedata();
 };
-//引用产品资料->获取产品资料
+const yyzltableData = ref([]);
+//引用产品资料->获取产品资料 2403114
 const _WorkOrderDetailCopedata = async ()=>{
   let search = yycpzlformData['gdbh'];
-  console.log(search)
-  // const ProductInformations = await ProductInformation({workOrder:search});
+  // const WorkOrderDetailCopes = await ProductInformation({workOrder:search});
   const WorkOrderDetailCopes = await WorkOrderDetailCope({search:search});
-  console.log(WorkOrderDetailCopes);
-  // if(ProductInformations.msg === '未找到工单信息'){
+  // console.log(WorkOrderDetailCopes);
+  yyzltableData.value = WorkOrderDetailCopes.data
+  // if(WorkOrderDetailCopes.msg === '未找到工单信息'){
   //   yycpzlformData['khdh'] = '';
   //   yycpzlformData['khmc'] = '';
   //   yycpzlformData['cpdh'] = '';
@@ -2720,13 +2748,20 @@ const _WorkOrderDetailCopedata = async ()=>{
   //   ElMessage({type: 'warning',message: '未找到工单信息'})
   //   return false;
   // }else{
-  //   yycpzlformData['gdbh'] = ProductInformations.data['工单编号'];
-  //   yycpzlformData['khdh'] = ProductInformations.data['客户代号'];
-  //   yycpzlformData['khmc'] = ProductInformations.data['客户名称'];
-  //   yycpzlformData['cpdh'] = ProductInformations.data['产品代号'];
-  //   yycpzlformData['cpmc'] = ProductInformations.data['产品名称'];
+  //   yycpzlformData['gdbh'] = WorkOrderDetailCopes.data['工单编号'];
+  //   yycpzlformData['khdh'] = WorkOrderDetailCopes.data['客户代号'];
+  //   yycpzlformData['khmc'] = WorkOrderDetailCopes.data['客户名称'];
+  //   yycpzlformData['cpdh'] = WorkOrderDetailCopes.data['产品代号'];
+  //   yycpzlformData['cpmc'] = WorkOrderDetailCopes.data['产品名称'];
   // }
 }
+const yyzltableRowClick = async (row) => {
+  yycpzlformData['gdbh'] = row['工单编号'];
+  yycpzlformData['khdh'] = row['客户编号'];
+  yycpzlformData['khmc'] = row['客户名称'];
+  yycpzlformData['cpdh'] = row['产品编号'];
+  yycpzlformData['cpmc'] = row['产品名称'];
+};
 //引用产品资料【执行】
 const yycpzlhandleConfirm = async () => {
   _ProductInformationEdit();
@@ -2736,17 +2771,18 @@ const _ProductInformationEdit = async ()=>{
   let params = {}
   params.oldWorkOrder = _Gd_gdbh.value;
   params.newWorkOrder = yycpzlformData['gdbh'];
+  console.log(params)
   try {
     const ProductInformationEditdata = await ProductInformationEdit(params);
     if (ProductInformationEditdata.code === 0) {
       ElMessage({type: 'success', message: '更新成功'})
+      onyycpzllist.value = false;
     } else {
       ElMessage({type: 'error',message: '更新失败'})
     }
   } catch (error) {
     console.error(error);
   }
-  onyycpzllist.value = false;
 }
 //引用产品资料【放弃】
 const yycpzlhandleCancel = () => {onyycpzllist.value = false;};