Просмотр исходного кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt

lucw 10 месяцев назад
Родитель
Сommit
3ccfe13866

+ 1 - 1
src/BIZComponents/processSubmitDialog/components/SHGDListDialog.vue

@@ -232,7 +232,7 @@ export default {
       const params = {
         pageNum: page,
         size: limit,
-        isDispatch:'0',
+        isPieCar:1,
         ...where
       };
       return getSalesWorkOrder(params).finally(() => {

+ 11 - 0
src/api/bpm/components/entrust/index.js

@@ -22,3 +22,14 @@ export async function details(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+/**
+ * 驳回
+ */
+export async function pleaseReject(data) {
+  const res = await request.post('/bpm/please_entrust/notPass', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 38 - 0
src/api/bpm/components/samplingRecords/index.js

@@ -0,0 +1,38 @@
+// 抽样记录
+import request from '@/utils/request';
+
+// 分页api /qms/samplingRecord/page
+export async function samplingRecordsPage(params) {
+  const res = await request.get(`/qms/samplingrecord/page`, {
+    params
+  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+//取样新建/修改
+export async function samplingrecordSave(data) {
+  const res = await request.post(`/qms/samplingrecord/save`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//取样新建/修改
+export async function samplingrecordUpdate(data) {
+  const res = await request.put(`/qms/samplingrecord/update`, data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+//详情
+export async function getById(id) {
+  const res = await request.get(`/qms/samplingrecord/getById/` + id);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 0
src/api/bpm/processInstance.js

@@ -39,3 +39,12 @@ export async function getProcessInstance(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 审批
+export function processInstanceValueJsonChange(id, data) {
+  return request({
+    url: `/bpm/process-instance/processInstanceValueJsonChange/${id}`,
+    method: 'PATCH',
+    data: data
+  })
+}

+ 8 - 2
src/enum/dict.js

@@ -100,7 +100,11 @@ export default {
   冲差方式: 'adjust_method',
   冲差原因: 'adjust_reason',
   冲差范围: 'adjust_range',
-  调整类型: 'adjust_price_type'
+  调整类型: 'adjust_price_type',
+  取样类型: 'quality_method_code',
+  质检计划类型: 'inspection_plan_type',
+
+
 };
 
 export const numberList = [
@@ -116,7 +120,9 @@ export const numberList = [
   'id_type',
   'rule_status',
   'ledger',
-  'patrol_cycle'
+  'patrol_cycle',
+  'quality_method_code',
+  'inspection_plan_type',
 ];
 //报价单-是否接受拆单
 export const acceptUnpackoptions = [

+ 14 - 3
src/views/bpm/handleTask/components/allocate/submit.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-col :span="16" :offset="6">
+  <el-col :span="16" :offset="6" v-loading="isSaveLoading">
     <el-form label-width="100px" ref="formRef" :model="form">
       <el-form-item
         label="审批建议"
@@ -24,6 +24,7 @@
         type="success"
         size="mini"
         @click="handleAudit(1)"
+        :loading="isSaveLoading"
         >通过
       </el-button>
 
@@ -32,6 +33,7 @@
         type="danger"
         size="mini"
         @click="handleAudit(0)"
+        :loading="isSaveLoading"
         >驳回
       </el-button>
     </div>
@@ -43,7 +45,8 @@
   export default {
     data() {
       return {
-        form: {}
+        form: {},
+        isSaveLoading: false
       };
     },
     props: {
@@ -71,6 +74,9 @@
       },
       async _approveTaskWithVariables(status) {
         console.log(status);
+        console.log(this.taskDefinitionKey);
+        this.isSaveLoading = true;
+        // return
         if (status == 1) {
           if (this.taskDefinitionKey === 'storage') {
             const res = await storageApi.allot({ applyId: this.businessId });
@@ -81,6 +87,7 @@
                 variables: { pass: true }
               };
               const data = await approveTaskWithVariables(params);
+              this.isSaveLoading = false;
               if (data.data.code != '-1') {
                 this.$emit('handleAudit', {
                   status,
@@ -95,6 +102,7 @@
               variables: { pass: true }
             };
             const data = await approveTaskWithVariables(params);
+            this.isSaveLoading = false;
             if (data.data.code != '-1') {
               this.$emit('handleAudit', {
                 status,
@@ -103,12 +111,14 @@
             }
           }
         } else {
-          if (this.taskDefinitionKey === 'outbound') {
+          // 调拨出库 storage
+          if (this.taskDefinitionKey === 'outbound' || this.taskDefinitionKey === 'storage') {
             const data = await storageApi.notAllotPass({
               id: this.businessId,
               reason: this.form.reason,
               taskId: this.taskId
             });
+            this.isSaveLoading = false;
             if (data.data.code != '-1') {
               this.$emit('handleAudit', {
                 status,
@@ -122,6 +132,7 @@
               variables: { pass: false }
             };
             const data = await approveTaskWithVariables(params);
+            this.isSaveLoading = false;
             if (data.data.code != '-1') {
               this.$emit('handleAudit', {
                 status,

+ 16 - 8
src/views/bpm/handleTask/components/bomApproverJSYY/detailDialog.vue

@@ -13,11 +13,12 @@
             : 'EBOM'
         }}
       </div>
-      <div> 编码:{{ this.form.code }} </div>
+      <div> BOM编码:{{ this.form.code }} </div>
       <div> 名称:{{ this.form.name }} </div>
-      <div> 版本:V{{ this.form.versions }} </div>
+      <div> 编码:{{ this.form.categoryCode }} </div>
+      <div> 版本:V{{ this.form.versions }}.0 </div>
     </div>
-    <BOMSearch @search="reload" :statusOpt="statusOpt" />
+    <!-- <BOMSearch @search="reload" :statusOpt="statusOpt" /> -->
 
     <ele-pro-table
       ref="table"
@@ -250,7 +251,7 @@
         ],
         statusOpt: {
           '': '全部',
-          0: '已停用',
+          0: '草稿',
           1: '已发布'
         }
       };
@@ -266,7 +267,8 @@
           ...where,
           pageNum: page,
           size: -1,
-          id: this.businessId
+          id: this.businessId,
+          isResourceBom: 1
         });
       },
 
@@ -278,9 +280,15 @@
       handBomDetails(id) {
         if (id) {
           getBomGetById(id).then((res) => {
-            this.form = res;
-            this.baseCount = res.baseCount;
-            this.unit = res.category.measuringUnit;
+            console.log(res, '返回的数据12');
+            if (Object.keys(res).length != 0) {
+              this.form = res;
+              this.baseCount = res.baseCount;
+              this.unit = res.category.measuringUnit;
+            }
+            // this.form = res;
+            // this.baseCount = res.baseCount;
+            // this.unit = res.category.measuringUnit;
           });
         }
       },

+ 11 - 6
src/views/bpm/handleTask/components/bomApproverJSdevice/detailDialog.vue

@@ -13,12 +13,13 @@
             : 'EBOM'
         }}
       </div>
-      <div> 编码:{{ this.form.code }} </div>
+      <div> BOM编码:{{ this.form.code }} </div>
       <div> 名称:{{ this.form.name }} </div>
+      <div> 编码:{{ this.form.categoryCode }} </div>
       <div> 版本:V{{ this.form.versions }}.0 </div>
     </div>
 
-    <BOMSearch @search="reload" :statusOpt="statusOpt" />
+    <!-- <BOMSearch @search="reload" :statusOpt="statusOpt" /> -->
 
     <ele-pro-table
       ref="table"
@@ -265,7 +266,8 @@
           ...where,
           pageNum: page,
           size: -1,
-          id: this.businessId
+          id: this.businessId,
+          isResourceBom: 1
         });
       },
 
@@ -289,9 +291,12 @@
       handBomDetails(id) {
         if (id) {
           getBomGetById(id).then((res) => {
-            this.form = res;
-            this.baseCount = res.baseCount;
-            this.unit = res.category.measuringUnit;
+            console.log(res, '返回的数据335');
+            if (Object.keys(res).length != 0) {
+              this.form = res;
+              this.baseCount = res.baseCount;
+              this.unit = res.category.measuringUnit;
+            }
           });
         }
       },

+ 10 - 10
src/views/bpm/handleTask/components/entrust/submit.vue

@@ -46,7 +46,6 @@
         type="danger"
         size="mini"
         @click="handleAudit(0)"
-        v-if="taskDefinitionKey != 'starter'"
         >驳回
       </el-button>
       <!-- <el-dropdown
@@ -112,7 +111,7 @@
 <script>
   import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
   import dictMixins from '@/mixins/dictMixins';
-  import { save } from '@/api/bpm/components/entrust';
+  import { save, pleaseReject } from '@/api/bpm/components/entrust';
 
   // import {
   //   assign,
@@ -145,7 +144,7 @@
       return {
         visible: false,
         form: {
-          reason: ''
+          reason: '同意'
         },
         formData: {
           finishTime: ''
@@ -157,16 +156,17 @@
       async edit() {
         this.visible = true;
         this.formData = await this.getTableValue();
+        console.log(this.id, '85858');
       },
       async handleAudit(status) {
         //申请人申请
-        if (this.taskDefinitionKey === 'starter') {
-          const data = await this.getTableValue();
-          // return
-          if (data) {
-            await save(data);
-          }
-        }
+        // if (this.taskDefinitionKey === 'starter') {
+        //   const data = await this.getTableValue();
+        //   // return
+        //   if (data) {
+        //     await save(data);
+        //   }
+        // }
         await this._approveTaskWithVariables(status);
       },
       async save() {

+ 1 - 3
src/views/bpm/handleTask/components/outsourcedWarehousing/submit.vue

@@ -3,7 +3,6 @@
     <el-form label-width="100px" ref="formRef" :model="form">
       <el-form-item
         label="审批建议"
-
         style="margin-bottom: 20px"
         :rules="{
           required: true,
@@ -68,7 +67,7 @@
       return {
         form: {
           technicianId: '',
-          reason: ''
+          reason: '同意'
         }
       };
     },
@@ -81,7 +80,6 @@
       },
 
       async _approveTaskThorVariables(status) {
-
         if (status == 1) {
           outsourceAssign({
             businessId: this.businessId,

+ 79 - 17
src/views/bpm/handleTask/components/purchasePlanManage/detailDialog.vue

@@ -1,10 +1,27 @@
 <template>
   <div>
     <el-form ref="form" :model="form" label-width="120px">
+      <div class="title" style="margin-bottom: 10px;"> 采购来源清单</div>  
+      <ele-pro-table
+        ref="preTable"
+        :needPage="false"
+        :columns="preColumns"
+        :toolkit="[]"
+        :datasource="form.outputDetailList"
+        row-key="id"
+        maxHeight="500px"
+        style="margin-bottom: 20px"
+      >
+        <template v-slot:technicalDrawings="{ row }">
+          <fileMain v-model="row.technicalDrawings" type="view"></fileMain>
+        </template>
+        <template v-slot:files="{ row }">
+          <fileMain v-model="row.files" type="view"></fileMain>
+        </template>
+      </ele-pro-table>
       <div class="title"> 采购计划信息</div>
-
       <el-row>
-        <el-col :span="12" style="height: 40px">
+        <el-col :span="8">
           <el-form-item label="需求单名称:" prop="requirementName">
             <el-link
               type="primary"
@@ -16,50 +33,50 @@
             <!-- {{ form.requirementCode }} -->
           </el-form-item>
         </el-col>
-        <el-col :span="12" style="height: 46px">
+        <el-col :span="8">
           <el-form-item label="计划单名称:" prop="planName">
             {{ form.planName }}
             <!-- {{ form.requirementCode }} -->
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item label="负责人:" prop="responsibleName">
             {{ form.responsibleName }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item label="需求类型:" prop="sourceTypeName">
             {{ form.sourceTypeName }}
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item label="需求部门:" prop="requireDeptName">
             {{ form.requireDeptName }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item label="需求人:" prop="requireUserName">
             {{ form.requireUserName }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item prop="remark" label="是否接受拆单:">
             {{ form.acceptUnpack === 1 ? '接受' : '不接受' }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item prop="remark" label="是否需要核价:">
             {{ form.acceptUnpack === 1 ? '是' : '否' }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item prop="isGenerateOrder" label="是否自动生成订单:">
+        <el-col :span="8">
+          <el-form-item label-width="144px" prop="isGenerateOrder" label="是否自动生成订单:">
             {{ form.isGenerateOrder == 1 ? '是' : '否' }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
-          <el-form-item prop="isGenerateContract" label="是否自动生成合同:">
+        <el-col :span="8">
+          <el-form-item label-width="144px" prop="isGenerateContract" label="是否自动生成合同:">
             {{ form.isGenerateContract == 1 ? '是' : '否' }}
           </el-form-item>
         </el-col>
@@ -72,18 +89,18 @@
             {{ form.requireUserName }}
           </el-form-item>
         </el-col> -->
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item label="完结日期:" prop="receiveDate">
             {{ form.receiveDate }}
           </el-form-item>
         </el-col>
 
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item prop="remark" label="备注:">
             {{ form.remark }}
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+        <el-col :span="8">
           <el-form-item prop="files" label="附件:">
             <fileMain v-model="form.files" type="view"></fileMain>
           </el-form-item>
@@ -460,7 +477,52 @@
             align: 'center',
             slot: 'remark'
           }
-        ]
+        ],
+        preColumns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            width: 150,
+            prop: 'productCategoryName',
+            label: '分类',
+            align: 'center'
+          },
+          {
+            width: 140,
+            prop: 'productCode',
+            label: '编码',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'orderNo',
+            label: '来源单号',
+            align: 'center'
+          },
+          {
+            width: 240,
+            prop: 'productName',
+            label: '名称',
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'totalCount',
+            label: '数量',
+            align: 'center',
+            formatter: (row, column) => {
+              if (row.totalCount) {
+                return row.totalCount + ' ' + (row.measuringUnit || '');
+              }
+            }
+            // slot: 'totalCount'
+          },
+        ],
       };
     },
     created() {

+ 47 - 12
src/views/bpm/handleTask/components/purchasePlanManage/submit.vue

@@ -25,10 +25,12 @@
         }"
       >
         <el-select
-          v-model="form.userId"
+          v-model="selectId"
           clearable
+          multiple
           style="width: 100%"
           :filterable="true"
+          @change="handleUserChange"
         >
           <el-option
             v-for="item in userOptions"
@@ -155,20 +157,46 @@
       return {
         form: {
           userId: '',
+          userName: '',
           reason: '',
-          useDeptId: ''
+          useDeptId: '',
+          assignList: []
         },
         userOptions: [],
+        selectId: [],
         isSaveLoading:false
       };
     },
     created() {
-      this.userOptions = [];
-      listAllUserBind().then((data) => {
-        this.userOptions.push(...data);
-      });
+      this.getAllUsers()
     },
     methods: {
+      getAllUsers() {
+        this.userOptions = [];
+        listAllUserBind().then((data) => {
+          this.userOptions.push(...data);
+        });
+      },
+      handleUserChange(val, option){        
+        console.log(val, option, 'val');                   
+        // 通过选中的采购员Id数组,获取对应的name数组        
+        if (val && val.length > 0) {         
+          const userNameArray = val.map(userId => {            
+            const user = this.userOptions.find(item => item.id === userId);            
+            return user ? {userId: user.id, userName: user.name} : '';          
+          }).filter(name => name);          
+          // assignList数组
+          this.form.assignList = [...userNameArray];     
+          this.form.userId = this.form.assignList[0]?.userId || '';    
+          this.form.userName = this.form.assignList[0]?.userName || ''; 
+        } else {          
+          this.form.userId = '';
+          this.form.userName = '';
+          this.form.assignList = [];        
+        }        
+
+        console.log('assignList数组:', this.form.assignList);
+      },
       /** 处理转办审批人 */
       handleUpdateAssignee() {
         this.$emit('handleUpdateAssignee');
@@ -179,6 +207,10 @@
       },
       searchDeptNodeClick(val) {
         console.log(val, 'val');
+        if(!val) {
+          this.getAllUsers();
+          return;
+        }
         getUserPage({
           groupId: val,
           size: 999
@@ -217,9 +249,10 @@
         }
       },
       async handleAudit(status) {
-        let userInfo = this.userOptions.find(
-          (item) => item.id == this.form.userId
-        );
+        // let userInfo = this.userOptions.find(
+        //   (item) => item.id == this.form.userId
+        // );
+        console.log(this.form)
         //主管指派采购员
         if (this.taskDefinitionKey === 'deptLeaderAssign') {
           if (!this.form.userId) {
@@ -227,8 +260,9 @@
             return;
           }
           await assign({
-            userId: userInfo.id,
-            userName: userInfo.name,
+            userId: this.form.userId,
+            userName: this.form.userName,
+            assignList: this.form.assignList,
             id: this.taskId,
             reason: this.form.reason,
             businessId: this.businessId
@@ -247,7 +281,8 @@
           id: this.taskId,
           reason: this.form.reason,
           variables: {
-            userId: userInfo?.id,
+            // userId: this.form.userId,
+            userId: this.selectId.join(','),
             pass: !!status
           }
         });

+ 0 - 2
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -123,13 +123,11 @@
       :needPage="false"
       :columns="columns"
       @columns-change="handleColumnChange"
-      @row-click="handleRowClick"
       :cache-key="cacheKeyUrl"
       :datasource="detailData.productList"
       row-key="id"
       show-summary
       :summary-method="getSummaries"
-      :row-class-name="tableRowClassName"
     >
       <template v-slot:stockLedger="scope">
         <el-popover placement="right" width="60%" trigger="hover">

+ 1 - 0
src/views/bpm/handleTask/components/saleOrder/invoice/submit.vue

@@ -122,6 +122,7 @@
         let res = await this.getTableValue();
         let storageData = res.returnStorageData;
         console.log(storageData);
+        // return
         // 出库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         storageData.isSkip = 1;
         try {

+ 565 - 0
src/views/bpm/handleTask/components/sampleRecord/detailDialog.vue

@@ -0,0 +1,565 @@
+<template>
+  <div>
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-width="120px"
+      class="el-form-box"
+    >
+      <header-title title="基本信息"></header-title>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="质检工单编码:" prop="qualityWorkOrderCode">
+            <el-input
+              disabled
+              v-model="form.qualityWorkOrderCode"
+              placeholder=" "
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="质检工单名称:" prop="qualityWorkOrderName">
+            <el-input
+              disabled
+              v-model="form.qualityWorkOrderName"
+              placeholder=" "
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="来源单号:" prop="sourceCode">
+            <el-input disabled v-model="form.sourceCode" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="类型:" prop="qualityType">
+            <DictSelection
+              dictName="质检计划类型"
+              v-model="form.qualityType"
+              disabled
+            ></DictSelection>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="编码:" prop="productCode">
+            <el-input disabled v-model="form.productCode" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="名称:" prop="productName">
+            <el-input disabled v-model="form.productName" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="批次号:" prop="batchNo">
+            <el-input disabled v-model="form.batchNo" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="规格:" prop="specification">
+            <el-input disabled v-model="form.specification" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="型号:" prop="modelType">
+            <el-input disabled v-model="form.modelType" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="牌号:" prop="brandNo">
+            <el-input disabled v-model="form.brandNo" placeholder=" " />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="总数:" prop="total">
+            <el-input disabled v-model="form.total" placeholder=" ">
+              <template slot="append">
+                {{ form.measureUnit }}
+              </template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <header-title title="来源清单"></header-title>
+      <ele-pro-table
+        ref="sourceTable"
+        :columns="tableColumns"
+        :datasource="tableList"
+        :initLoad="false"
+        :needPage="false"
+        height="300px"
+        full-height="calc(100vh - 120px)"
+      >
+        <template v-slot:toolbar>
+          累计取样数量:{{ form.sampleQuantity }}{{ form.unit }}
+        </template>
+      </ele-pro-table>
+      <header-title title="请样信息"> </header-title>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="请样目的:" prop="pleasePurpose">
+            <el-input
+              v-model="form.pleasePurpose"
+              placeholder="请输入"
+              disabled
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="请样数量:" prop="pleaseQuantity">
+            <el-input
+              v-model="form.pleaseQuantity"
+              placeholder="请输入"
+              disabled
+            >
+              <template slot="append">
+                {{ form.pleaseUnit }}
+              </template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <!-- <el-col :span="4">
+          <el-form-item label="单位:" prop="pleaseUnit">
+            <DictSelection
+              dictName="计量单位"
+              clearable
+              v-model="form.pleaseUnit"
+              filter-placeholder="请输入计量单位搜索"
+              @change="changeSamUnit"
+            ></DictSelection>
+          </el-form-item>
+        </el-col> -->
+      </el-row>
+      <header-title title="取样信息"> </header-title>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="质检方式:" prop="qualityMode">
+            <DictSelection
+              dictName="取样类型"
+              v-model="form.qualityMode"
+              disabled
+            ></DictSelection>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="记录方法:" prop="recordingMethod">
+            <el-select
+              style="width: 100%"
+              v-model="form.recordingMethod"
+              placeholder="请选择"
+              disabled
+            >
+              <el-option
+                v-for="item in sampleQuantityList"
+                :label="item.label"
+                :value="item.value"
+                :key="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row v-if="form.qualityMode == '2'">
+        <el-col :span="8">
+          <el-form-item label="取样:" prop="sampleNumber">
+            <el-select
+              style="width: 100%"
+              v-model="form.conditionType"
+              placeholder="请选择"
+              disabled
+            >
+              <el-option
+                v-for="item in sampleNumberList"
+                :label="item.label"
+                :value="item.value"
+                :key="item.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="16">
+          <el-row>
+            <el-col :span="6" v-if="form.conditionType == 2">
+              <el-form-item prop="quantity">
+                <el-input
+                  v-model="form.quantity"
+                  placeholder="请输入"
+                  disabled
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" v-if="form.conditionType == 2">
+              <el-form-item prop="unit" label-width="0">
+                <DictSelection
+                  dictName="计量单位"
+                  clearable
+                  disabled
+                  v-model="form.unit"
+                  filter-placeholder="请输入计量单位搜索"
+                ></DictSelection>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8" v-if="form.conditionType == 2">
+              <el-form-item prop="portion" label="数量">
+                <el-input
+                  v-model="form.portion"
+                  disabled
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" v-if="form.conditionType == 1">
+              <el-form-item prop="portion" label="数量">
+                <el-input
+                  v-model="form.portion"
+                  disabled
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" v-if="form.conditionType == 1">
+              <el-form-item prop="packingUnit" label="单位">
+                <el-input
+                  v-model="form.unit"
+                  disabled
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-row>
+      <header-title title="样品信息"></header-title>
+      <ele-pro-table
+        ref="showSampleListTable"
+        :columns="tableColumns1"
+        :datasource="sampleList"
+        :needPage="false"
+        height="400px"
+        full-height="calc(100vh - 120px)"
+      ></ele-pro-table>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  const defForm = {
+    code: '', //编码
+    name: '', //名称
+    conditionType: '',
+    quantity: '',
+    unit: '',
+    portion: '',
+    qualityMode: '',
+    recordingMethod: 1,
+    pleaseQuantity: '',
+    pleasePurpose: '',
+    pleaseUnit: '',
+    sampleQuantity: '',
+    qualityWorkOrderId: '',
+    qualityWorkOrderCode: '',
+    qualityWorkOrderName: '',
+    isFirstSampling: ''
+  };
+  import { getById } from '@/api/bpm/components/samplingRecords';
+  export default {
+    components: {},
+    props: {
+      businessId: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: { ...defForm },
+        rules: {
+          name: [
+            { required: true, message: '名称不能为空', trigger: 'change' }
+          ],
+          factoriesId: [
+            { required: true, message: '请选择工厂', trigger: 'change' }
+          ],
+          bomId: [
+            { required: true, message: '请选择BOM版本', trigger: 'change' }
+          ],
+          bomCategory: [
+            { required: true, message: '请选择BOM类型', trigger: 'change' }
+          ],
+          produceRoutingId: [
+            { required: true, message: '请选择工艺路线', trigger: 'change' }
+          ],
+          code: [{ required: true, message: '编码不能为空', trigger: 'change' }]
+        },
+        sampleQuantityList: [
+          { label: '批样', value: 1 },
+          { label: '单样全部', value: 2 }
+        ],
+        sampleNumberList: [
+          { label: '取整样', value: 1 },
+          { label: '取小样', value: 2 }
+        ],
+        tableColumns1: [
+          {
+            label: '样品编码',
+            prop: 'sampleCode',
+            width: '200',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            label: '编码',
+            prop: 'categoryCode',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            label: '名称',
+            prop: 'categoryName',
+            align: 'center'
+          },
+          { label: '批次号', prop: 'batchNo', align: 'center' },
+          { label: '发货条码', prop: 'barcodes', align: 'center' },
+          { label: '包装编码', prop: 'packageNo', align: 'center' },
+          { label: '包装数量', prop: 'packingQuantity', align: 'center' },
+          { label: '包装单位', prop: 'packingUnit', align: 'center' },
+          { label: '计量数量', prop: 'measureQuantity', align: 'center' },
+          { label: '计量单位', prop: 'measureUnit', align: 'center' },
+          {
+            label: '供应商名称',
+            prop: 'supplierName',
+            align: 'center',
+            width: '120'
+          },
+          {
+            label: '供应商代号',
+            prop: 'supplierCode',
+            align: 'center',
+            width: '120'
+          },
+          {
+            label: '物料代号',
+            prop: 'materielDesignation',
+            align: 'center',
+            slot: 'materielDesignation',
+            width: '120'
+          },
+          {
+            label: '客户代号',
+            prop: 'clientCode',
+            align: 'center',
+            slot: 'clientCode',
+            width: '120'
+          },
+          {
+            label: '刻码',
+            prop: 'engrave',
+            align: 'center',
+            slot: 'engrave',
+            width: '120'
+          },
+          {
+            label: '机型',
+            prop: 'modelKey',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '颜色',
+            prop: 'colorKey',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '重量',
+            prop: 'weight',
+            align: 'center',
+            slot: 'weight',
+            width: '120'
+          },
+          {
+            label: '重量单位',
+            prop: 'weightUnit',
+            align: 'center',
+            width: 100
+          },
+          { label: '仓库', prop: 'warehouseName', align: 'center', width: 100 },
+          { label: '货区', prop: 'areaName', align: 'center' },
+          { label: '货架', prop: 'goodsShelfName', align: 'center' },
+          { label: '货位', prop: 'goodsAllocationName', align: 'center' },
+          { label: '生产日期', prop: 'productionDate', align: 'center' },
+          { label: '采购日期', prop: 'purchaseDate', align: 'center' }
+        ],
+        tableColumns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            label: '编码',
+            prop: 'categoryCode',
+            width: 150,
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '名称',
+            prop: 'categoryName',
+            width: '150',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            label: '批次号',
+            prop: 'batchNo',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            label: '发货条码',
+            prop: 'barcodes',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '包装编码',
+            prop: 'packageNo',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          { label: '包装数量', prop: 'packingQuantity', align: 'center' },
+          { label: '包装单位', prop: 'packingUnit', align: 'center' },
+
+          { label: '计量数量', prop: 'measureQuantity', align: 'center' },
+          { label: '计量单位', prop: 'measureUnit', align: 'center' },
+          { label: '物料代号', prop: 'materielDesignation', align: 'center' },
+          { label: '客户代号', prop: 'clientCode', align: 'center' },
+          {
+            label: '供应商名称',
+            prop: 'supplierName',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            label: '供应商代号',
+            prop: 'supplierCode',
+            align: 'center',
+            width: '120',
+            showOverflowTooltip: true
+          },
+          { label: '刻码', prop: 'engrave', align: 'center' },
+          {
+            label: '机型',
+            prop: 'modelKey',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            label: '颜色',
+            prop: 'colorKey',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          { label: '重量', prop: 'weight', align: 'center' },
+          { label: '重量单位', prop: 'weightUnit', align: 'center' },
+          {
+            label: '仓库',
+            prop: 'warehouseName',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          { label: '货区', prop: 'areaName', align: 'center' },
+          { label: '货架', prop: 'goodsShelfName', align: 'center' },
+          { label: '货位', prop: 'goodsAllocationName', align: 'center' },
+          {
+            label: '生产日期',
+            prop: 'productionDate',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          },
+          {
+            label: '采购日期',
+            prop: 'purchaseDate',
+            align: 'center',
+            width: 120,
+            showOverflowTooltip: true
+          }
+        ],
+        packingSpecificationOption: [],
+        sampleList: [],
+        schemeList: [],
+        tableList: []
+      };
+    },
+
+    computed: {},
+    created() {},
+    mounted() {
+      this.init();
+    },
+    methods: {
+      async init() {
+        getById(this.businessId).then((res) => {
+          [
+            'id',
+            'code',
+            'name',
+            'createTime',
+            'createUserId',
+            'status',
+            'approvalStatus',
+            'approvalUserId'
+          ].forEach((it) => {
+            delete res.qualityWorkOrderVO[it];
+          });
+          this.form = { ...res, ...res.qualityWorkOrderVO };
+
+          if (res.qualityWorkOrderVO.conditionType == 1) {
+            this.$set(this.form, 'portion', res.quantity);
+            console.log(this.form,'(this.form')
+          } else {
+            this.$set(this.form, 'portion', res.copies);
+          }
+
+          this.sampleList = res.qualitySampleList;
+          this.tableList = res.qualityInventoryList;
+        });
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .basic-details-title {
+    margin: 10px 0;
+  }
+
+  .title {
+    font-size: 16px;
+    line-height: 45px;
+  }
+
+  .add-product {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: flex-end;
+    font-size: 30px;
+    color: #1890ff;
+    margin: 10px 0;
+    cursor: pointer;
+  }
+</style>

+ 140 - 0
src/views/bpm/handleTask/components/sampleRecord/submit.vue

@@ -0,0 +1,140 @@
+<template>
+  <el-col :span="16" :offset="6">
+    <el-form label-width="100px" ref="formRef" :model="form">
+      <el-form-item
+        label="审批建议"
+        style="margin-bottom: 20px"
+        :rules="{
+          required: true,
+          message: '请选择',
+          trigger: 'change'
+        }"
+      >
+        <el-input
+          type="textarea"
+          v-model="form.reason"
+          placeholder="请输入审批建议"
+        />
+      </el-form-item>
+    </el-form>
+    <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="handleAudit(1)"
+        >通过
+      </el-button>
+
+      <el-button
+        icon="el-icon-circle-close"
+        type="danger"
+        size="mini"
+        @click="rejectTask(0)"
+        >驳回
+      </el-button>
+    </div>
+  </el-col>
+</template>
+
+<script>
+  import {
+    approveTaskWithVariables,
+    rejectTask,
+    cancelTask
+  } from '@/api/bpm/task';
+
+  // 流程实例的详情页,可用于审批
+  export default {
+    name: '',
+
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskId: {
+        default: ''
+      },
+      id: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form:{
+          reason:''
+        }
+      };
+    },
+    created() {},
+    methods: {
+      /** 处理转办审批人 */
+      handleUpdateAssignee() {
+        this.$emit('handleUpdateAssignee');
+      },
+      /** 退回 */
+      handleBackList() {
+        this.$emit('handleBackList');
+      },
+
+      async handleAudit(status) {
+        let API = !!status ? approveTaskWithVariables : rejectTask;
+        API({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables: {
+            pass: !!status
+          }
+        });
+        this.$emit('handleAudit', {
+          status,
+          title: status === 0 ? '驳回' : ''
+        });
+      },
+      rejectTask(status) {
+        rejectTask({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables: {
+            pass: !!status
+          }
+        });
+        this.$emit('handleAudit', {
+          status,
+          title: status === 0 ? '驳回' : ''
+        });
+      },
+
+      //更多
+      handleCommand(command) {
+        if (command === 'cancel') {
+          this.$confirm('是否确认作废?', {
+            type: 'warning',
+            cancelButtonText: '取消',
+            confirmButtonText: '确定'
+          })
+            .then(() => {
+              cancelTask({
+                id: this.id,
+                taskId: this.taskId,
+                reason: this.form.reason,
+                businessId: this.businessId
+              })
+                .then(() => {
+                  this.$emit('handleClose');
+                })
+                .catch(() => {
+                  this.$message.error('流程作废失败');
+                });
+            })
+            .catch(() => {});
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss"></style>

+ 6 - 0
src/views/bpm/handleTask/formParser/formParserDialog.vue

@@ -204,6 +204,7 @@ import useQualificationComponent from '@/BIZComponents/processSubmitDialog/compo
 import productSpecificationComponent from '@/BIZComponents/processSubmitDialog/components/productSpecificationComponent.vue';
 import eventComponent from '@/BIZComponents/processSubmitDialog/components/eventComponent.vue';
 import reissueComponent from '@/BIZComponents/processSubmitDialog/components/reissueComponent.vue';
+import { processInstanceValueJsonChange } from '@/api/bpm/processInstance';
 
 export default {
   name: 'formParserDialog',
@@ -274,6 +275,11 @@ export default {
       this.$emit('update:formParserDialogFlag', false);
     },
     async handleAudit(status) {
+      const data = await this.$refs.generateForm.getData(false);
+      await processInstanceValueJsonChange(this.form.processInstance.id, data)
+      console.log('form', this.form);
+      console.log('processInstanceValueJsonChange', await this.$refs.generateForm.getData(false));
+      // return
       await this._approveTaskWithVariables(status);
     },
 

+ 3 - 8
src/views/bpm/outgoingManagement/outbound.vue

@@ -760,6 +760,7 @@
         this.productList = data.map((productItem) => {
           return {
             ...productItem,
+            suspendBatchNo: productItem.batchNo || '',
             outInDetailRecordRequestList:
               productItem.outInDetailRecordRequestList.map((packingItem) => {
                 return {
@@ -798,6 +799,7 @@
 
         const newProducts = mergedData.map((productItem) => ({
           ...productItem,
+          suspendBatchNo: productItem.batchNo || '',
           outInDetailRecordRequestList:
             productItem.outInDetailRecordRequestList.map((packingItem) => ({
               ...packingItem,
@@ -1071,15 +1073,12 @@
           console.log(this.saleProductList, 'this.saleProductList33333');
           let pData = {
             type: '1',
-            deliveryOrderNo: this.form.docNo,
             builders: this.detailList.map((item) => {
               return {
                 categoryId:
                   item.categoryId || item.instanceId || item.productId,
                 num: item.demandQuantity || item.measurementCount,
                 warehouseId: this.bizType == 11 ? item.warehouseId : '',
-                batchNo: item.batchNo || '',
-                reversionBatchNo: item.isSuspend == 1 ? item.offsetDetail?.batchNo || '' : '',
               };
             })
           };
@@ -1134,15 +1133,12 @@
           console.log(this.saleProductList, 'this.saleProductList11111');
           let pData = {
             type: '1',
-            deliveryOrderNo: this.form.docNo,
             builders: this.saleProductList.map((item) => {
               return {
                 categoryId: item.productId || item.categoryId,
                 num: item.totalCount,
-                batchNo: item.batchNo || '',
-                reversionBatchNo: item.isSuspend == 1 ? item?.offsetDetail[0]?.batchNo || '' : '',
                 // warehouseId: this.bizType == 3 ? item.warehouseId : ''
-                // batchNo: item.batchNo || '',
+                batchNo: item.batchNo || '',
               };
             })
           };
@@ -1173,7 +1169,6 @@
           console.log(this.saleProductList, 'this.saleProductList22222');
           let pData = {
             type: '1',
-            // deliveryOrderNo: this.form.docNo,
             builders: this.form.productList.map((item) => {
               return {
                 categoryId: item.productId,

+ 0 - 6
src/views/bpm/stockManagement/storage.vue

@@ -169,8 +169,6 @@
               ref="productListTable"
               :data="productList"
               tooltip-effect="dark"
-              @row-click="handleRowClick"
-              :row-class-name="tableRowClassName"
             >
               <el-table-column
                 label="序号"
@@ -1995,10 +1993,6 @@
               return {
                 index: this.productList.length + index,
                 isSave: true,
-                isReversal: this.detailList.find((val) => val.categoryCode == item.code)
-                    ?.isReversal || item.isReversal || 0, // 是否挂起
-                suspendOrReverseDetail: this.detailList.find((val) => val.categoryCode == item.code)
-                    ?.suspendOrReverseDetail || item.suspendOrReverseDetail || null, // 挂起或反冲详情
                 categoryId: item.id, // 物品id
                 categoryName: item.name, // 物品名称
                 categoryCode: item.code, // 物品编码

+ 1 - 1
vue.config.js

@@ -41,7 +41,7 @@ module.exports = {
 
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18086',
-        target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.3:18086',
 
         // target: 'http://192.168.1.3:18086',
         // target: 'http://192.168.1.116:18086', // 赵沙金