Ver Fonte

feat(冲差单): 新增冲差单相关功能模块

liujt há 7 meses atrás
pai
commit
40f5f481b5

+ 11 - 0
src/api/bpm/components/saleManage/saleorder.js

@@ -434,4 +434,15 @@ export async function productionplanByIds(data) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
+}
+
+/**
+ * 获取冲差单详情
+ */
+export async function getPunchSlipOrderInfo(id) {
+  const res = await request.get(`/eom/punchSlipOrder/v1/get/${id}`, {});
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
 }

+ 6 - 1
src/enum/dict.js

@@ -92,7 +92,12 @@ export default {
   物品机型: 'product_model_key',
   物品颜色: 'product_color_key',
   检查有效期单位: 'validity_unit',
-  记录规则类型: 'record_sheet'
+  记录规则类型: 'record_sheet',
+  冲差类型: 'adjust_type',
+  冲差方式: 'adjust_method',
+  冲差原因: 'adjust_reason',
+  冲差范围: 'adjust_range',
+  调整类型: 'adjust_price_type'
 };
 
 export const numberList = [

+ 230 - 0
src/views/bpm/handleTask/components/adjustNote/detailDialog.vue

@@ -0,0 +1,230 @@
+<template>
+  <div>
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      class="el-form-box"
+      label-width="160px"
+    >
+      <headerTitle title="基本信息"></headerTitle>
+      <el-row :gutter="20">
+        <el-col :span="8">
+          <el-form-item labelWidth="100px" label="冲差单编码" prop="orderNo">
+            <el-input
+              clearable
+              v-model="form.orderNo"
+              disabled
+              placeholder="自动生成"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item
+             labelWidth="100px"
+            label="冲差类型"
+            prop="type"
+          >
+            <DictSelection
+              dictName="冲差类型"
+              disabled
+              clearable
+              v-model="form.type"
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item
+            labelWidth="100px"
+            label="冲差原因"
+            prop="reason"
+            disabled
+          >
+            <DictSelection
+              dictName="冲差原因"
+              clearable
+              v-model="form.reason"
+              disabled
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item labelWidth="100px" label="冲差方式" prop="method">
+            <DictSelection
+              dictName="冲差方式"
+              disabled
+              clearable
+              v-model="form.method"
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item
+            labelWidth="100px"
+            label="调整类型"
+            prop="adjustType"
+            disabled
+          >
+            <DictSelection
+              dictName="调整类型"
+              clearable
+              v-model="form.adjustType"
+              disabled
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item labelWidth="100px" label="冲差范围" prop="rangeType">
+            <DictSelection
+              dictName="冲差范围"
+              disabled
+              clearable
+              v-model="form.rangeType"
+            >
+            </DictSelection>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="16">
+          <el-form-item labelWidth="100px" label="调整说明" prop="remark">
+            <el-input
+              clearable
+              v-model="form.remark"
+              type="textarea"
+              rows="1"
+              placeholder="请输入"
+              disabled
+            />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item labelWidth="100px" prop="files" label="附件">
+            <fileMain v-model="form.files" disabled></fileMain>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <headerTitle title="物品清单" style="margin-top: 30px"></headerTitle>
+      <inventoryTableDetails
+        ref="inventoryTableDetailsRef"
+        :isDiscountTotalPrice="true"
+        :isSelected="true"
+      ></inventoryTableDetails>
+      <headerTitle
+        title="冲差信息"
+        style="margin-top: 30px"
+      ></headerTitle>
+      <inventoryTable
+        ref="inventoryTableRef"
+      ></inventoryTable>
+      <div style="margin-top: 20px;">
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label-width="100px" label="总差异金额:" prop="differenceAmount">
+              <el-input
+                clearable
+                v-model="form.differenceAmount"
+                disabled
+                placeholder="请输入"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label-width="100px" label="总金额:" prop="adjustAmount">
+              <el-input
+                clearable
+                disabled
+                v-model="form.adjustAmount"
+                placeholder="请输入"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label-width="100px" label="优惠后总金额:" prop="adjustDiscountAmount">
+              <el-input
+                clearable
+                disabled
+                type="number"
+                v-model="form.adjustDiscountAmount"
+                placeholder="请输入"
+                @input="discountInput"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </div>
+    </el-form>
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex';
+  import { getPunchSlipOrderInfo } from '@/api/bpm/components/saleManage/saleorder.js';
+  // import fileMain from '@/components/addDoc/index.vue';
+  import { relationTypeList } from '@/enum/dict.js';
+  import inventoryTable from './inventoryTable.vue';
+  import inventoryTableDetails from '@/BIZComponents/inventoryTableDetails.vue';
+
+  const defForm = {
+    name: '',
+    changeCode: '',
+    file: [], //条件
+    remark: '',
+    type: '',
+    describes: '',
+    relationId: '',
+    relationName: '',
+    relationCode: '',
+    relationType: ''
+  };
+  export default {
+    components: { inventoryTable, inventoryTableDetails },
+    computed: {
+      ...mapGetters(['user'])
+    },
+    props: {
+      businessId: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {
+          ...defForm
+        }
+      };
+    },
+    created() {
+      this.getInfo(this.businessId);
+    },
+    methods: {
+      //获取详情
+      async getInfo(id) {
+        let data = await getPunchSlipOrderInfo(id);
+        if (data) {
+          const tempdata = {
+            // ...data,
+            totalPrice: data.amount,
+            discountTotalPrice: data.discountAmount,
+            productList: data.originalList
+          }
+          this.businessId = data.id;
+          this.adjustData = data.detailList;
+          this.form = data;
+          console.log('tempdata~~~~', tempdata);
+          this.$refs.inventoryTableDetailsRef &&
+            this.$refs.inventoryTableDetailsRef.putTableValue(tempdata);
+          this.$refs.inventoryTableRef && this.$refs.inventoryTableRef.putTableValue(data.detailList);
+        }
+      }
+    }
+  };
+</script>
+<style scoped lang="scss"></style>

+ 545 - 0
src/views/bpm/handleTask/components/adjustNote/inventoryTable.vue

@@ -0,0 +1,545 @@
+<template>
+  <el-form ref="form" :model="form" :rules="rules">
+    <ele-pro-table
+      ref="table"
+      :needPage="false"
+      :columns="columns"
+      :datasource="form.datasource"
+      @columns-change="handleColumnChange"
+      :cache-key="cacheKeyUrl"
+      class="time-form"
+      :maxHeight="250"
+    >
+      <template v-slot:priceDifference="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.priceDifference'"
+        >
+          <!-- @input="handleSinglePriceDiffChange(scope.row, scope.$index)"
+            @blur="handleSinglePriceDiffChange(scope.row, scope.$index)" -->
+          <el-input
+            v-model="scope.row.priceDifference"
+            placeholder="请输入"
+            type="number"
+            disabled
+            @input="changeDiffPrice(scope.row, scope.$index)"
+          >
+            <!-- <template slot="append">元</template> -->
+          </el-input>
+        </el-form-item>
+      </template>
+      <template v-slot:headerPriceDifference="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
+      <!-- 操作列 -->
+      <template v-slot:action="{ $index }">
+        <el-popconfirm
+          v-if="type != '10'"
+          class="ele-action"
+          title="确定要删除吗?"
+          @confirm="remove($index)"
+        >
+          <template v-slot:reference>
+            <el-link type="danger" :underline="false" icon="el-icon-delete">
+              删除
+            </el-link>
+          </template>
+        </el-popconfirm>
+      </template>
+    </ele-pro-table>
+  </el-form>
+</template>
+<script>
+  import dictMixins from '@/mixins/dictMixins';
+  import tabMixins from '@/mixins/tableColumnsMixin';
+
+  export default {
+    mixins: [dictMixins, tabMixins],
+    props: {
+      sendId: String,
+      pricingWay: {
+        default: 1,
+        type: [Number, String]
+      },
+      returnSourceType: [Number, String],
+      entrustedCode: [Number, String],
+      sendNo: [Number, String],
+      returnType: {
+        default: ''
+      },
+      type: {
+        default: ''
+      },
+      countObj: {
+        type: Object,
+        default: () => {
+          return {
+            countKey: 'quantity',
+            unitKey: 'saleUnit',
+            unitIdKey: 'saleUnitId'
+          };
+        }
+      },
+    },
+
+    components: { },
+    data() {
+      return {
+        cacheKeyUrl: 'eos-saleManage-saleOrder-adjustmentNote-inventoryTable',
+        payAmount: '',
+        form: {
+          datasource: [],
+          discountTotalPrice: 0
+        },
+        allPrice: 0,
+        rules: {
+          'priceDifference': [
+            { required: true, message: '请输入', trigger: 'blur' }
+          ]
+        },
+
+        columns: [
+          {
+            width: 45,
+            type: 'index',
+            columnKey: 'index',
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            minWidth: 160,
+            prop: 'productCode',
+            label: '编码',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'productName',
+            label: '名称',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'specification',
+            label: '规格',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 120,
+            prop: 'modelType',
+            label: '型号',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            minWidth: 150,
+            prop: 'quantity',
+            label: '数量',
+            showOverflowTooltip: true,
+            align: 'center'
+          },
+          {
+            width: 100,
+            prop: 'adjustPrice',
+            label: '单价',
+            slot: 'adjustPrice',
+            align: 'center'
+          },
+          {
+            width: 180,
+            prop: 'priceDifference',
+            label: '单价差异',
+            slot: 'priceDifference',
+            align: 'center',
+            headerSlot: 'headerPriceDifference'
+          },
+          {
+            width: 130,
+            prop: 'taxRate',
+            label: '税率',
+            formatter: (row, column) => {
+              return row.taxRate ? row.taxRate + '%' : '';
+            },
+            align: 'center'
+          },
+          {
+            width: 130,
+            prop: 'notaxSinglePrice',
+            label: '不含税单价',
+            slot: 'notaxSinglePrice',
+            align: 'center'
+          },
+          {
+            width: 130,
+            prop: 'adjustDiscountPrice',
+            label: '折让单价',
+            slot: 'adjustDiscountPrice',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'adjustAmount',
+            slot: 'adjustAmount',
+            label: '合计',
+            align: 'center'
+          },
+          {
+            width: 120,
+            prop: 'adjustDiscountAmount',
+            slot: 'adjustDiscountAmount',
+            label: '折让合计',
+            align: 'center'
+          },
+          // {
+          //   columnKey: 'action',
+          //   label: '操作',
+          //   width: 120,
+          //   align: 'center',
+          //   resizable: false,
+          //   slot: 'action',
+          //   fixed: 'right',
+          //   showOverflowTooltip: true
+          // }
+        ]
+      };
+    },
+    created() {
+
+    },
+    computed: {
+      totalAmount() {
+        let num = 0;
+        this.form.datasource.forEach((item, index) => {
+          this.$set(
+            this.form.datasource[index],
+            'adjustAmount',
+            item.adjustPrice * item.quantity || 0
+          );
+          num += this.form.datasource[index].adjustAmount;
+        });
+        return parseFloat(num).toFixed(2);
+      },
+
+    },
+    mounted() {
+      
+    },
+    methods: {
+      // changeSinglePriceDiff(row, index) {
+      //   if (row.priceDifference && row.singlePrice) {
+      //     this.$set(
+      //       this.form.datasource[index],
+      //       'adjustAmount',
+      //       row.priceDifference * row.quantity || 0
+      //     );
+      //   }
+      // },
+      //改变数量
+      changeDiffPrice(row, index) {
+        if (!row) {
+          this.form.datasource.forEach((item, index) => {
+            this.$set(
+              this.form,
+              'datasource[' + index + ']',
+              this.changeCount(item)
+            );
+          });
+        } else {
+          console.log('row~~~', row);
+          // 改变单价
+          this.$set(
+            this.form.datasource[index],
+            'adjustPrice',
+            row.priceDifference ? row.price + Number(row.priceDifference) : row.price
+          );
+          // 改变相关数据
+          this.$set(
+            this.form,
+            'datasource[' + index + ']',
+            this.changeCount(row)
+          );
+        }
+
+        this.getNotaxSinglePrice();
+        this.changeAll();
+        this.$forceUpdate();
+      },
+
+      //改变数量
+      changeCount(row, countObj) {
+        
+        // let total = row['quantity'] || 0;
+        let data = row;
+        // if (row.packageDispositionList) {
+        //   let endIndex = row.packageDispositionList.findIndex(
+        //     (ite) => row[countObj.unitIdKey] == ite.id
+        //   );
+        //   for (; 0 < endIndex; endIndex--) {
+        //     total = Vue.prototype.$math.format(
+        //       row.packageDispositionList[endIndex].packageCell * total,
+        //       14
+        //     );
+        //   }
+        // }
+
+        // data['totalCount'] = total;
+        data['adjustDiscountPrice'] = data.adjustPrice;
+
+
+        if (row['quantity'] && row.adjustPrice) {
+          data['adjustAmount'] = row['quantity'] * row.adjustPrice;
+          data['adjustDiscountAmount'] = data.adjustAmount;
+        } else {
+          data['adjustAmount'] = 0;
+          data['adjustDiscountAmount'] = 0;
+        }
+    
+        return data;
+
+      },
+      // 计算合计
+      getAllPrice(arr) {
+        let sum = 0;
+        arr.forEach((item) => {
+          if (item.adjustAmount) {
+            sum += Number(item.adjustAmount);
+          }
+        });
+        return isNaN(sum) ? 0 : sum.toFixed(2);
+      },
+      // 计算总差异金额
+      getDiffPriceTotal(arr) {
+        let sum = 0;
+        arr.forEach((item) => {
+          if (item.priceDifference) {
+            sum += (Number(item.priceDifference)*Number(item.quantity));
+          }
+        });
+        return isNaN(sum) ? 0 : sum.toFixed(2);
+      },
+
+      changeAll() {
+        this.allPrice = this.getAllPrice(this.form.datasource) || 0;
+        this.diffPriceTotal = this.getDiffPriceTotal(this.form.datasource) || 0;
+        // if (this.isDiscountTotalPrice) {
+          this.form.discountTotalPrice = this.allPrice;
+          // this.$emit('setDiscountTotalPrice', this.allPrice);
+        // }
+        this.$emit('setCountAmount', this.allPrice, this.diffPriceTotal);
+      },
+      //设置优惠后总金额修改产品单价
+      discountInputByOrder(val) {
+        this.form.discountTotalPrice = val;
+
+        this.form.datasource.forEach((item, index) => {
+          this.$set(
+            this.form.datasource[index],
+            'adjustDiscountPrice',
+            this.getDiscountSinglePrice(item)
+          );
+          this.$set(
+            this.form.datasource[index],
+            'adjustDiscountAmount',
+            this.getDiscountTotalPrice(item)
+          );
+        });
+        this.$emit('setDiscountTotalPrice', val);
+
+        this.$forceUpdate();
+        this.$refs.table.reRenderTable();
+      },
+      // 处理单价差异变化,更新单价
+      handleSinglePriceDiffChange(row, index) {
+        // 确保原单价和单价差异都有值
+        const originalPrice = Number(row.price) || 0;
+        const priceDiff = Number(row.priceDifference) || 0;
+        
+        // 计算新单价 = 原单价 + 单价差异
+        const newPrice = originalPrice + priceDiff;
+        
+        // 使用$set更新单价字段
+        this.$set(this.form.datasource[index], 'adjustPrice', newPrice);
+        
+        // 同时更新总价
+        if (row.quantity) {
+          this.$set(this.form.datasource[index], 'adjustAmount', row.quantity * newPrice);
+        }
+
+        this.$emit('changePrice', {
+          total: this.totalAmount,
+        });
+      },
+      //计算不含税单价
+      getNotaxSinglePrice() {
+        this.form.datasource.forEach((item, index) => {
+          if (item.adjustPrice && item.taxRate) {
+            this.$set(
+              this.form.datasource[index],
+              'notaxSinglePrice',
+              parseFloat(
+                (item.adjustPrice / (1 + item.taxRate / 100)).toFixed(2)
+              )
+            );
+          } else {
+            this.$set(this.form.datasource[index], 'notaxSinglePrice', '');
+          }
+        });
+      },
+      //获取折让单价
+      getDiscountSinglePrice(row) {
+        console.log('row~~~', this.allPrice);
+        let num =
+          (Number(this.form.discountTotalPrice) / Number(this.allPrice)) *
+          Number(row.adjustPrice);
+        return isNaN(num) ? '' : num;
+      },
+
+      //获取折让合计
+      getDiscountTotalPrice(row) {
+        let num = 0;
+        num = Number(row.adjustDiscountPrice) * Number(row.quantity);
+        return isNaN(num) ? '' : num.toFixed(2);
+      },
+      getTotalCount(row) {
+        let num = 0;
+        this.form.datasource
+          .filter((item) => item.warehouseId == row.warehouseId)
+          .forEach((item) => {
+            num += Number(item.totalCount);
+          });
+
+        return num;
+      },
+      // 返回列表数据
+      getTableValue() {
+        // let is = false;
+        // this.form.datasource.forEach((item) => {
+        //   if (item.pricingWay == 2 && !item.adjustAmount) {
+        //     is = true;
+        //   }
+        // });
+        // if (is) {
+        //   this.$message.error('合计金额不能为空');
+        //   return;
+        // }
+        let comitDatasource = this.form.datasource;
+        if (comitDatasource.length === 0) return { productList: [] };
+        comitDatasource.forEach((v) => {
+          // v.totalCount = Number(v.totalCount);
+          // v.technicalDrawings = Array.isArray(v.technicalDrawings)
+          //   ? v.technicalDrawings
+          //   : [];
+        });
+        return { productList: comitDatasource, payAmount: this.totalAmount };
+      },
+      getPrice() {
+        return [this.allPrice];
+      },
+
+      //修改回显
+      putTableValue(data) {
+        if (data) {
+          // 创建数据的深拷贝,避免引用关系导致两边数据互相影响
+          const copyData = JSON.parse(JSON.stringify(data));
+          
+          copyData.forEach((v) => {
+            v.sendTotalCount = v.packingQuantity || 0;
+            v.sendProductId = v.sendProductId || v.categoryId || v.productId;
+            // 初始化单价差异字段,如果未定义则设为0
+            if (v.adjustPrice !== undefined && v.priceDifference === undefined) {
+              v.priceDifference = '';
+            }
+          });
+          
+          // this.oldSendTotalWeightList = copyData.map((item) => {
+          //   return {
+          //     productCode: item.productCode,
+          //     oldSendTotalWeight: item.sendTotalWeight,
+          //     oldReceiveTotalWeight: item.receiveTotalWeight
+          //   };
+          // });
+          
+          this.form.datasource = copyData;
+ 
+        }
+      },
+
+      remove(index) {
+        this.form.datasource.splice(index, 1);
+        this.setSort();
+ 
+      },
+      // 清空表格
+      restTable() {
+        this.form.datasource = [];
+      },
+      // 重新排序
+      setSort() {
+        this.form.datasource.forEach((n, index) => {
+          n.key = index + 1;
+        });
+      },
+
+
+      validateForm(callback) {
+        //开始表单校验
+        this.$refs.form.validate((valid) => {
+          callback(valid);
+        });
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .headbox {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    .amount {
+      font-size: 14px;
+      font-weight: bold;
+      padding-right: 30px;
+    }
+  }
+
+  .time-form .el-form-item {
+    margin-bottom: 0 !important;
+  }
+
+  ::v-deep .period {
+    display: flex;
+
+    .borderleftnone {
+      .el-input--medium .el-input__inner {
+        border-top-right-radius: 0;
+        border-bottom-right-radius: 0;
+      }
+    }
+
+    .borderrightnone {
+      .el-input--medium .el-input__inner {
+        border-top-left-radius: 0;
+        border-bottom-left-radius: 0;
+      }
+    }
+  }
+
+  ::v-deep .time-form tbody > tr:hover > td {
+    background-color: transparent !important;
+  }
+
+  ::v-deep .time-form .el-table tr {
+    background-color: #ffffff;
+  }
+
+  .pricebox {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+    font-weight: bold;
+  }
+</style>

+ 155 - 0
src/views/bpm/handleTask/components/adjustNote/submit.vue

@@ -0,0 +1,155 @@
+<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="handleAudit(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 { UpdateInformation, cancel } from '@/api/bpm/components/contractManage/contractBook';
+  import {approveTaskWithVariables, rejectTask,cancelTask} from '@/api/bpm/task';
+  import { listAllUserBind } from '@/api/system/organization';
+
+  // 流程实例的详情页,可用于审批
+  export default {
+    name: '',
+    components: {
+      //   Parser
+    },
+    props: {
+      businessId: {
+        default: ''
+      },
+      taskId: {
+        default: ''
+      },
+      id: {
+        default: ''
+      },
+      taskDefinitionKey: {
+        default: ''
+      }
+    },
+    data() {
+      return {
+        form: {
+          reason: ''
+        },
+        userOptions: []
+      };
+    },
+    created() {
+
+      this.userOptions = [];
+      listAllUserBind().then((data) => {
+        this.userOptions.push(...data);
+      });
+    },
+    methods: {
+      /** 处理转办审批人 */
+      handleUpdateAssignee() {
+        this.$emit('handleUpdateAssignee');
+      },
+      /** 退回 */
+      handleBackList() {
+        this.$emit('handleBackList');
+      },
+
+
+      async handleAudit(status) {
+        let variables = {
+          pass: !!status
+        };
+
+        let API = !!status ? approveTaskWithVariables : rejectTask;
+        console.log('this.taskId~~', this.form);
+        API({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables
+        }).then((res) => {
+          if (res.data.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>