Răsfoiți Sursa

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

695593266@qq.com 7 luni în urmă
părinte
comite
cf1582afc8

+ 4 - 4
src/BIZComponents/inventoryTableDetails.vue

@@ -57,7 +57,7 @@
           :prop="'datasource.' + scope.$index + '.' + countObj.countKey"
         >
           {{ scope.row[countObj.countKey] }}
-          {{ scope.row[countObj.unitKey] }}
+          {{ scope.row[countObj.unitKey] || '' }}
         </el-form-item>
       </template>
       <!-- <template v-slot:saleUnit="scope">
@@ -392,7 +392,7 @@
             headerSlot: 'headerTotalCount',
             formatter: (row, column) => {
               if (row.totalCount) {
-                return row.totalCount + ' ' + row.measuringUnit;
+                return row.totalCount + ' ' + (row.measuringUnit || '');
               }
             },
             align: 'center'
@@ -406,7 +406,7 @@
             headerSlot: 'headerSingleWeight',
             formatter: (row, column) => {
               if (row.singleWeight) {
-                return row.singleWeight + ' ' + row.weightUnit;
+                return row.singleWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'
@@ -418,7 +418,7 @@
             slot: 'totalWeight',
             formatter: (row, column) => {
               if (row.totalWeight) {
-                return row.totalWeight + ' ' + row.weightUnit;
+                return row.totalWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'

+ 12 - 0
src/api/bpm/components/salesServiceManagement/recycle.js

@@ -0,0 +1,12 @@
+import request from '@/utils/request';
+import { download } from '@/utils/file';
+
+
+// 配件回收记录 表格 详情
+export async function recycleDetails(id) {
+  const res = await request.get(`/eom/afterSalesAccessoryApply/getById/${id}`);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 5
src/utils/dict/warehouse.js

@@ -47,6 +47,11 @@ export const sceneState = [
   { code: 13, label: '受托入库', documentsName: '受托收货单' },
   { code: 14, label: '项目入库', documentsName: '项目编码' },
   { code: 15, label: '调拨入库' },
+  { code: 16, label: '异常处理入库' },
+  {
+    code: 17,
+    label: '回收入库'
+  },
   { code: 99, label: '其他入库' }
 ];
 export const outputSceneState = [
@@ -62,8 +67,7 @@ export const outputSceneState = [
   { code: 10, label: '采购退货出库' },
   { code: 11, label: '自选领用出库' },
   { code: 12, label: '配料出库' },
-  { code: 99, label: '其他出库' },
-
+  { code: 99, label: '其他出库' }
 ];
 // 紧急状态
 export const emergencyState = [
@@ -147,7 +151,7 @@ export const qualityResults = {
   0: '无',
   1: '合格',
   2: '不合格',
-  3:'让步接收'
+  3: '让步接收'
 };
 
 // 质检结果下拉选项
@@ -166,7 +170,7 @@ export const qualityResultsOptions = [
   },
   {
     label: '让步接收',
-    value:3
+    value: 3
   }
 ];
 
@@ -174,4 +178,4 @@ export const dimensionType = [
   { code: 1, label: '物品维度' },
   { code: 2, label: '批次维度' },
   { code: 3, label: '包装维度' }
-]
+];

+ 4 - 1
src/views/bpm/handleTask/components/allocate/submit.vue

@@ -71,6 +71,8 @@
       },
       async _approveTaskWithVariables(status) {
         console.log(status);
+        console.log(this.taskDefinitionKey);
+        // return
         if (status == 1) {
           if (this.taskDefinitionKey === 'storage') {
             const res = await storageApi.allot({ applyId: this.businessId });
@@ -103,7 +105,8 @@
             }
           }
         } 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,

+ 13 - 0
src/views/bpm/handleTask/components/contractBook/detailDialog.vue

@@ -65,6 +65,13 @@
             {{ form.requireDeptName }}
           </el-form-item>
 
+          <el-form-item
+            :label="form.type == 2 ? '采购部门:' : '销售部门:'"
+            prop="businessDeptName"
+          >
+            {{ form.businessDeptName }}
+          </el-form-item>
+
           <el-form-item label="编码:" prop="contractNumber">
             {{ form.contractNo }}
           </el-form-item>
@@ -90,6 +97,12 @@
           >
             {{ form.requireUserName }}
           </el-form-item>
+          <el-form-item
+            :label="form.type == 2 ? '采购员:' : '业务员:'"
+            prop="businessUserName"
+          >
+            {{ form.businessUserName }}
+          </el-form-item>
           <el-form-item prop="contractFile" label="合同附件:">
             <fileMain v-model="form.fileId" type="view"></fileMain>
           </el-form-item>

+ 2 - 2
src/views/bpm/handleTask/components/purchaseNeedManage/detailDialog.vue

@@ -179,7 +179,7 @@
             align: 'center',
             formatter: (row, column) => {
               if (row.purchaseCount) {
-                return row.purchaseCount + ' ' + row.purchaseUnit;
+                return row.purchaseCount + ' ' + (row.purchaseUnit || '');
               }
             }
           },
@@ -198,7 +198,7 @@
             align: 'center',
             formatter: (row, column) => {
               if (row.totalCount) {
-                return row.totalCount + ' ' + row.measuringUnit;
+                return row.totalCount + ' ' + (row.measuringUnit || '');
               }
             }
           },

+ 17 - 8
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -49,7 +49,16 @@
             {{ form.requireUserName }}
           </el-form-item>
         </el-col>
-
+        <el-col :span="8">
+          <el-form-item label="采购部门:" prop="purchaseDeptName">
+            {{ form.purchaseDeptName }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="采购员:" prop="purchaseUserName">
+            {{ form.purchaseUserName }}
+          </el-form-item>
+        </el-col>
         <el-col :span="8">
           <el-form-item label="结算方式:" prop="settlementModeName">
             {{ detailData.settlementModeName }}
@@ -349,7 +358,7 @@
             align: 'center',
             formatter: (row, column) => {
               if (row.purchaseCount) {
-                return row.purchaseCount + ' ' + row.purchaseUnit;
+                return row.purchaseCount + ' ' + (row.purchaseUnit || '');
               }
             }
           },
@@ -372,7 +381,7 @@
             label: '计量数量',
             formatter: (row, column) => {
               if (row.totalCount) {
-                return row.totalCount + ' ' + row.measuringUnit;
+                return row.totalCount + ' ' + (row.measuringUnit || '');
               }
             },
             align: 'center'
@@ -415,7 +424,7 @@
             label: '单重',
             formatter: (row, column) => {
               if (row.singleWeight) {
-                return row.singleWeight + ' ' + row.weightUnit;
+                return row.singleWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'
@@ -426,7 +435,7 @@
             label: '总重',
             formatter: (row, column) => {
               if (row.totalWeight) {
-                return row.totalWeight + ' ' + row.weightUnit;
+                return row.totalWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'
@@ -679,7 +688,7 @@
             slot: 'totalCount',
             formatter: (row, column) => {
               if (row.totalCount) {
-                return row.totalCount + ' ' + row.measuringUnit;
+                return row.totalCount + ' ' + (row.measuringUnit || '');
               }
             },
             align: 'center'
@@ -691,7 +700,7 @@
             label: '单重',
             formatter: (row, column) => {
               if (row.singleWeight) {
-                return row.singleWeight + ' ' + row.weightUnit;
+                return row.singleWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'
@@ -702,7 +711,7 @@
             label: '总重',
             formatter: (row, column) => {
               if (row.totalWeight) {
-                return row.totalWeight + ' ' + row.weightUnit;
+                return row.totalWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'

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

@@ -312,7 +312,7 @@
             align: 'center',
             formatter: (row, column) => {
               if (row.purchaseCount) {
-                return row.purchaseCount + ' ' + row.purchaseUnit;
+                return row.purchaseCount + ' ' + (row.purchaseUnit || '');
               }
             }
           },
@@ -336,7 +336,7 @@
             align: 'center',
             formatter: (row, column) => {
               if (row.totalCount) {
-                return row.totalCount + ' ' + row.measuringUnit;
+                return row.totalCount + ' ' + (row.measuringUnit || '');
               }
             }
             // slot: 'totalCount'
@@ -371,7 +371,7 @@
             label: '重量',
             formatter: (row, column) => {
               if (row.totalWeight) {
-                return row.totalWeight + ' ' + row.weightUnit;
+                return row.totalWeight + ' ' + (row.weightUnit || '');
               }
             },
             align: 'center'

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

@@ -78,6 +78,9 @@
             <el-form-item label="销售部门:" prop="salesDeptName">
               {{ form.salesDeptName }}
             </el-form-item>
+            <el-form-item label="业务员:" prop="salesmanName">
+              {{ form.salesmanName }}
+            </el-form-item>
             <el-form-item label="订单总金额:" prop="totalAmount">
               {{ form.totalAmount }}元
             </el-form-item>

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

@@ -123,11 +123,13 @@
       :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">
@@ -669,6 +671,26 @@
       }
     },
     methods: {
+      // 通过挂起状态设置行样式
+      tableRowClassName({row}) {
+        // console.log('tableRowClassName', row)
+        if (row.isSuspend == 1) {
+          return 'warning-row';
+        }
+        return '';
+      },
+      handleRowClick(row) {
+        // this.current = row;
+        // console.log('handleRowClick', row)
+        if (row.isSuspend == 1) {
+          this.$alert(`替代批次号:${row.offsetDetail[0].batchNo}`, {
+            confirmButtonText: '知道了',
+            type: 'none'
+          }).catch(() => {
+            // 捕获用户取消操作时的Promise rejection
+          });
+        }
+      },
       getSummaries(param) {
         return getSummaries(
           param,
@@ -734,6 +756,9 @@
 </script>
 
 <style scoped lang="scss">
+  ::v-deep .el-table .warning-row {
+    background: #d9ecff;
+  }
   .title {
     font-size: 22px;
     font-weight: 800;

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

+ 257 - 0
src/views/bpm/handleTask/components/salesServiceManagement/recycle/recycleDialog.vue

@@ -0,0 +1,257 @@
+<template>
+  <div>
+    <el-form ref="recyleFormRef" :model="form" label-width="100px">
+      <headerTitle title="基本信息" style="margin-top: 15px"></headerTitle>
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="编码:" prop="code">
+            <el-input v-model="form.code" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="回收部门:" prop="recycleDeptId">
+            <el-input v-model="form.recycleDeptName" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="回收人:" prop="recycleName">
+            <el-input v-model="form.recycleName" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="工单名称:" prop="orderWorkName">
+            <el-input v-model="form.orderWorkName" disabled placeholder=" " />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="工单编码:">
+            <el-input v-model="form.orderWorkCode" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="客户名称:" prop="code">
+            <el-input v-model="form.contactName" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="客户编码:" prop="code">
+            <el-input v-model="form.contactCode" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="设备名称" prop="demandDetailId">
+            <el-input v-model="form.categoryName" disabled />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="设备编码:">
+            <el-input v-model="form.categoryCode" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="回收时间:">
+            <el-date-picker
+              style="width: 100%"
+              v-model="form.usageTime"
+              type="date"
+              placeholder="选择"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              disabled
+            ></el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="原因">
+            <el-input
+              v-model="form.reason"
+              type="textarea"
+              :rows="2"
+              disabled
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <headerTitle title="配件回收清单" style="margin-top: 15px"> </headerTitle>
+      <ele-pro-table
+        ref="table"
+        :needPage="false"
+        :columns="columns"
+        :datasource="form.detailList"
+        class="time-form"
+        :maxHeight="400"
+        full-height="calc(100vh - 116px)"
+      >
+      </ele-pro-table>
+    </el-form>
+    <headerTitle
+      title="入库信息"
+      style="margin-top: 15px"
+      v-if="taskDefinitionKey == 'storemanApprove' && form.code"
+    >
+    </headerTitle>
+
+    <add
+      ref="add"
+      :form="form"
+      v-if="taskDefinitionKey == 'storemanApprove' && form.code && !isView"
+      :sourceBizNo="form.code"
+      :saleProductList="
+        form.detailList.map((item) => {
+          item.productCode = item.categoryCode;
+          item.totalCountNew = this.form.detailList.filter(
+            (item1) => item1.categoryCode == item.categoryCode
+          ).length;
+          item.measuringUnit = item.measureUnit;
+          return item;
+        })
+      "
+      :bizType="16"
+      :isMoreProduct="true"
+    ></add>
+    <detailDialog
+      :businessId="form.code"
+      v-if="isView && form.code"
+    ></detailDialog>
+  </div>
+</template>
+
+<script>
+  import { recycleDetails } from '@/api/bpm/components/salesServiceManagement/recycle';
+  import add from '@/views/bpm/stockManagement/storage.vue';
+  import detailDialog from '@/views/bpm/stockManagement/details.vue';
+
+  export default {
+    components: {
+      add,
+      detailDialog
+    },
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      },
+      isView: ''
+    },
+
+    data() {
+      return {
+        loading: false,
+
+        form: {},
+        columns: [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            showOverflowTooltip: true,
+            fixed: 'left'
+          },
+
+          {
+            prop: 'categoryCode',
+            label: '物品编码',
+            align: 'center'
+          },
+          {
+            prop: 'categoryName',
+            label: '物品名称',
+            align: 'center'
+          },
+
+          {
+            prop: 'categoryModel',
+            label: '型号',
+            align: 'center'
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center'
+          },
+          {
+            prop: 'level',
+            label: '级别',
+            align: 'center'
+          },
+          {
+            prop: 'totalCount',
+            label: '数量',
+            align: 'center',
+            width: 100,
+            slot: 'totalCount'
+          },
+          {
+            prop: 'singlePrice',
+            label: '单价',
+            align: 'center',
+            width: 100,
+            slot: 'singlePrice'
+          },
+          {
+            prop: 'totalPrice',
+            label: '总价',
+            align: 'center',
+            width: 100
+          },
+          //   {
+          //     prop: 'measureQuantity',
+          //     label: '库存',
+          //     align: 'center'
+          //   },
+          {
+            prop: 'measureUnit',
+            label: '计量单位',
+            align: 'center'
+          },
+          {
+            prop: 'warehouseName',
+            label: '仓库',
+            slot: 'warehouseName',
+            align: 'center'
+          }
+        ]
+      };
+    },
+    created() {
+      this.getDetail();
+    },
+
+    methods: {
+      async getDetail() {
+        this.form = await recycleDetails(this.businessId);
+      },
+      async getTableValue() {
+        try {
+          this.form.returnStorageData = await this.$refs.add.getReturnStorage();
+          return Object.assign({}, this.form);
+        } catch (error) {
+          return '';
+          // 表单验证未通过,不执行保存操作
+        }
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .device_name {
+    .el-select-dropdown__wrap {
+      .el-select-dropdown__item {
+        padding: 0 !important;
+      }
+    }
+
+    .option_ {
+      width: 100%;
+      padding: 0 20px;
+    }
+  }
+</style>

+ 200 - 0
src/views/bpm/handleTask/components/salesServiceManagement/recycle/submit.vue

@@ -0,0 +1,200 @@
+<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)"
+        v-if="taskDefinitionKey != 'storemanApprove'"
+        >通过
+      </el-button>
+      <el-button
+        icon="el-icon-edit-outline"
+        type="success"
+        size="mini"
+        @click="storemanApprove"
+        v-if="taskDefinitionKey == 'storemanApprove'"
+        >申请入库
+      </el-button>
+      <el-button
+        icon="el-icon-circle-close"
+        type="danger"
+        size="mini"
+        @click="approveTaskWithVariables(0)"
+        >驳回
+      </el-button>
+      <el-dropdown
+        @command="(command) => handleCommand(command)"
+        style="margin-left: 30px"
+      >
+        <span class="el-dropdown-link"
+          >更多<i class="el-icon-arrow-down el-icon--right"></i
+        ></span>
+        <el-dropdown-menu slot="dropdown">
+          <el-dropdown-item command="cancel">作废</el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
+    </div>
+  </el-col>
+</template>
+
+<script>
+  import {
+    approveTaskWithVariables,
+    rejectTask,
+    cancelTask
+  } from '@/api/bpm/task';
+
+  import storageApi from '@/api/warehouseManagement';
+  // 流程实例的详情页,可用于审批
+  export default {
+    name: '',
+    components: {
+      //   Parser
+    },
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskId: {
+        default: ''
+      },
+      id: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {
+          technicianId: '',
+          reason: ''
+        },
+        activeComp: ''
+      };
+    },
+    async created() {},
+    methods: {
+      /** 处理转办审批人 */
+      handleUpdateAssignee() {
+        this.$emit('handleUpdateAssignee');
+      },
+      /** 退回 */
+      handleBackList() {
+        this.$emit('handleBackList');
+      },
+      async storemanApprove() {
+        let res = await this.getTableValue();
+        let storageData = res.returnStorageData;
+
+        if (!storageData) {
+          return;
+        }
+        // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
+        storageData.isSkip = 1;
+
+        try {
+          this.isSaveLoading = true;
+          await storageApi.storage(storageData);
+          approveTaskWithVariables({
+            id: this.taskId,
+            reason: this.form.reason,
+            variables: {
+              pass: true
+            }
+          }).then((res) => {
+            if (res.code != '-1') {
+              this.$emit('handleAudit', {
+                status: 1,
+                title: '入库'
+              });
+            }
+            this.isSaveLoading = false;
+          });
+        } catch (error) {
+          this.isSaveLoading = false;
+          this.$message.error('保存失败');
+        }
+      },
+
+      async handleAudit(status) {
+        await this.approveTaskWithVariables(status);
+      },
+
+      async approveTaskWithVariables(status) {
+        let variables = {
+          pass: !!status
+        };
+        let API = !!status ? approveTaskWithVariables : rejectTask;
+        API({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables
+        }).then((res) => {
+          if (res.code != '-1') {
+            this.$emit('handleAudit', {
+              status,
+              title: status === 0 ? '驳回' : ''
+            });
+          }
+        });
+      },
+
+      getTableValue() {
+        return new Promise((resolve, reject) => {
+          this.$emit('getTableValue', async (data) => {
+            resolve(await data);
+          });
+        });
+      },
+
+      //更多
+      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>

+ 14 - 2
src/views/bpm/outgoingManagement/outbound.vue

@@ -744,6 +744,7 @@
       },
       tableRowClassName({ row, rowIndex }) {
         console.log(row);
+        // 结果 0=默认,1=合格,2=不合格
         if (row.result == 1) {
           return 'warning-row';
         } else {
@@ -759,6 +760,7 @@
         this.productList = data.map((productItem) => {
           return {
             ...productItem,
+            suspendBatchNo: productItem.batchNo || '',
             outInDetailRecordRequestList:
               productItem.outInDetailRecordRequestList.map((packingItem) => {
                 return {
@@ -797,6 +799,7 @@
 
         const newProducts = mergedData.map((productItem) => ({
           ...productItem,
+          suspendBatchNo: productItem.batchNo || '',
           outInDetailRecordRequestList:
             productItem.outInDetailRecordRequestList.map((packingItem) => ({
               ...packingItem,
@@ -1067,15 +1070,18 @@
                 );
               });
           }
+          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 || ''
+                batchNo: item.batchNo || '',
+                reversionBatchNo: item.isSuspend == 1 ? item.offsetDetail?.batchNo || '' : '',
               };
             })
           };
@@ -1127,13 +1133,16 @@
             this.formData.extInfo.verifyDeptCode = this.form.deptId;
             this.formData.extInfo.verifyDeptName = this.form.deptName;
           });
+          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 || ''
+                batchNo: item.batchNo || '',
+                reversionBatchNo: item.isSuspend == 1 ? item?.offsetDetail[0]?.batchNo || '' : '',
                 // warehouseId: this.bizType == 3 ? item.warehouseId : ''
                 // batchNo: item.batchNo || '',
               };
@@ -1144,6 +1153,7 @@
             taskIds: this.extractedList.map((item) => item.taskId),
             workOrderIds: this.extractedList.map((item) => item.workOrderId)
           };
+          console.log('111~~~~~~~~', pData)
           storageApi
             .getHierarchyFifo(this.wwType == 3 ? pData2 : pData)
             .then((data) => {
@@ -1162,8 +1172,10 @@
             this.formData.extInfo.verifyDeptCode = this.form.deptId;
             this.formData.extInfo.verifyDeptName = this.form.deptName;
           });
+          console.log(this.saleProductList, 'this.saleProductList22222');
           let pData = {
             type: '1',
+            // deliveryOrderNo: this.form.docNo,
             builders: this.form.productList.map((item) => {
               return {
                 categoryId: item.productId,

+ 36 - 2
src/views/bpm/stockManagement/storage.vue

@@ -169,6 +169,8 @@
               ref="productListTable"
               :data="productList"
               tooltip-effect="dark"
+              @row-click="handleRowClick"
+              :row-class-name="tableRowClassName"
             >
               <el-table-column
                 label="序号"
@@ -1399,6 +1401,26 @@
     },
     methods: {
       ...mapActions('dict', ['requestDict']),
+      // 通过挂起状态设置行样式
+      tableRowClassName({row}) {
+        // console.log('tableRowClassName', row)
+        if (row.isReversal == 1) {
+          return 'warning-row';
+        }
+        return '';
+      },
+      handleRowClick(row) {
+        // this.current = row;
+        console.log('handleRowClick', row)
+        if (row.isReversal == 1) {
+          this.$alert(`替代批次号:${row.suspendOrReverseDetail[0].batchNo}`, {
+            confirmButtonText: '知道了',
+            type: 'none'
+          }).catch(() => {
+            // 捕获用户取消操作时的Promise rejection
+          });
+        }
+      },
       changeCount(number) {
         return new BigNumber(number).toString();
       },
@@ -1673,7 +1695,8 @@
 
               let warehouseId = filtersItem.warehouseId;
               let warehouseName = filtersItem.warehouseName;
-              let measureQuantity = filtersItem.totalCount || 0;
+              let measureQuantity =
+                filtersItem.totalCountNew || filtersItem.totalCount || 0;
               // let measureQuantityOld = filtersItem.totalCount || 0;
               if (
                 (filtersItem.sendTotalWeight ||
@@ -1684,7 +1707,11 @@
                   filtersItem.sendTotalWeight || filtersItem.receiveTotalWeight;
               }
               let packingQuantity =
-                filtersItem.purchaseCount || filtersItem.totalCount || 0;
+                filtersItem.totalCountNew ||
+                filtersItem.purchaseCount ||
+                filtersItem.totalCount ||
+                0;
+                console.log(packingQuantity,'packingQudasdasdantity')
               let packingUnit =
                 filtersItem.purchaseUnit || filtersItem.measuringUnit || '';
 
@@ -1968,6 +1995,10 @@
               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, // 物品编码
@@ -4073,6 +4104,9 @@
 </script>
 
 <style lang="scss" scoped>
+::v-deep .el-table .warning-row {
+    background: #d9ecff;
+  }
   .inbound_details {
     margin-top: 10px;