Przeglądaj źródła

委外 受托修改

Z 2 lat temu
rodzic
commit
734462b2ae

+ 18 - 15
src/views/bpm/handleTask/components/purchaseOrder/invoice/inventoryTable.vue

@@ -552,21 +552,24 @@ export default {
     },
 //修改回显
     async putTableValue(data = [], code) {
-      this.form.datasource = data;
-      this.oldSendTotalWeightList = this.form.datasource.map(item => {
-        return {
-          productCode: item.productCode,
-          oldSendTotalWeight: item.sendTotalWeight
-        }
-      })
-      this.form.datasource.forEach(item => {
-        item.receiveTotalWeight = item.receiveTotalWeight || (Number(item.totalCount) * Number(item.singleWeight)) || 0
-        if(this.outsourceSendCode){
-          item.increaseTotalWeight =  Number(item.receiveTotalWeight)-Number(item.sendTotalWeight)
-        }else {
-          item.increaseTotalWeight = item.increaseTotalWeight || item.receiveTotalWeight || 0
-        }
-
+      this.$nextTick(()=>{
+        this.form.datasource = data;
+        this.oldSendTotalWeightList = this.form.datasource.map(item => {
+          return {
+            productCode: item.productCode,
+            oldSendTotalWeight: item.sendTotalWeight
+          }
+        })
+        this.form.datasource.forEach((item,index) => {
+          item.receiveTotalWeight = item.receiveTotalWeight || (Number(item.totalCount) * Number(item.singleWeight)) || 0
+          if(this.outsourceSendCode){
+            item.increaseTotalWeight =  Number(item.receiveTotalWeight)-Number(item.sendTotalWeight)
+          }else {
+            item.increaseTotalWeight = item.increaseTotalWeight || item.receiveTotalWeight || 0
+          }
+          this.changeNum(item.totalCount,index)
+        })
+        this.$refs.table.reload()
       })
     },
     remove(i) {

+ 22 - 11
src/views/bpm/handleTask/components/purchaseOrder/outSourceSend/detailDialog.vue

@@ -1,37 +1,38 @@
 <template>
  <div>
-   <el-form ref="form" :model="form" label-width="130px">
+   <el-form ref="form" :model="form" :rules="rules" label-width="130px">
      <headerTitle title="发货信息"></headerTitle>
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item
-           label="选择订单:"
-           prop="orderNo"
+           label="委外发货单编码:"
+           prop="code"
            style="margin-bottom: 22px"
          >
-           {{ form.orderNo }}
+           {{ form.code }}
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item
-           label="外协单位:"
-           prop="contactName"
+           label="采购订单编码:"
+           prop="orderNo"
            style="margin-bottom: 22px"
          >
-           {{ form.supplierName }}
+           {{ form.orderNo }}
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12">
          <el-form-item
-           label="需求来源:"
+           label="外协单位:"
            prop="contactName"
            style="margin-bottom: 22px"
          >
-           {{ form.sourceTypeName }}
+           {{ form.supplierName }}
          </el-form-item>
        </el-col>
+
        <el-col :span="12">
          <el-form-item
            label="外协单位联系人:"
@@ -77,11 +78,20 @@
        </el-col>
      </el-row>
      <el-row :gutter="20">
+       <el-col :span="12">
+         <el-form-item
+           label="需求来源:"
+           prop="contactName"
+           style="margin-bottom: 22px"
+         >
+           {{ form.sourceTypeName }}
+         </el-form-item>
+       </el-col>
        <el-col :span="12">
          <el-form-item prop="files" label="附件:">
-           <div v-if="form.files && form.files?.length">
+           <div v-if="row.files && row.files?.length">
              <el-link
-               v-for="link in form.files"
+               v-for="link in row.files"
                :key="link.id"
                type="primary"
                :underline="false"
@@ -96,6 +106,7 @@
        </el-col>
      </el-row>
    </el-form>
+
    <headerTitle title="产品清单"></headerTitle>
    <ele-pro-table
      ref="table"

+ 22 - 21
src/views/bpm/handleTask/components/purchaseOrder/outsourceSendReturnGoods/addReturnGoodsDialog.vue

@@ -86,32 +86,33 @@
       <inventoryTable
         :pricingWay="form.pricingWay"
         :sourceType="form.sourceType"
+        :returnSourceType="2"
         :outsourceSendCode="form.outsourceSendCode"
         :receiveNo="form.receiveNo"
         :payAmount.sync="form.payAmount"
         ref="inventoryTableref"
         :receiveId="form.receiveId"
       ></inventoryTable>
-      <el-row style="margin-top: 20px">
-        <el-col :span="12">
-          <el-form-item
-            label="总金额"
-            prop="totalPrice"
-            style="margin-bottom: 22px"
-          >
-            {{ totalAmount }}元
-          </el-form-item>
-        </el-col>
-        <el-col :span="12">
-          <el-form-item
-            label="金额"
-            prop="payAmount"
-            style="margin-bottom: 22px"
-          >
-            <el-input clearable v-model="form.payAmount" placeholder="请输入" />
-          </el-form-item>
-        </el-col>
-      </el-row>
+<!--      <el-row style="margin-top: 20px">-->
+<!--        <el-col :span="12">-->
+<!--          <el-form-item-->
+<!--            label="总金额"-->
+<!--            prop="totalPrice"-->
+<!--            style="margin-bottom: 22px"-->
+<!--          >-->
+<!--            {{ totalAmount }}元-->
+<!--          </el-form-item>-->
+<!--        </el-col>-->
+<!--        <el-col :span="12">-->
+<!--          <el-form-item-->
+<!--            label="金额"-->
+<!--            prop="payAmount"-->
+<!--            style="margin-bottom: 22px"-->
+<!--          >-->
+<!--            <el-input clearable v-model="form.payAmount" placeholder="请输入" />-->
+<!--          </el-form-item>-->
+<!--        </el-col>-->
+<!--      </el-row>-->
     </el-form>
     <!-- 委外发货单   -->
     <out-source-send-dialog :out-source-send-dialog-flag.sync="outSourceSendDialogFlag" v-if="outSourceSendDialogFlag"
@@ -152,7 +153,7 @@ export default {
         receiveId: '',
         receiveNo: '',
         totalAmount: '',
-        returnSourceType: 1,
+        returnSourceType: 2,
         linkName: '',
         linkPhone: '',
         payAmount: '',

+ 72 - 8
src/views/bpm/handleTask/components/purchaseOrder/outsourceSendReturnGoods/inventoryTable.vue

@@ -22,6 +22,18 @@
 <!--            新增-->
 <!--          </el-button>-->
 <!--        </div>-->
+        <div class="pricebox">
+          <span class="amount">总金额:{{ totalAmount }}元</span>
+          <!--            <span>优惠总金额:</span>-->
+          <!--            <el-input-->
+          <!--              v-model="payAmount"-->
+          <!--              style="width: 150px"-->
+          <!--              placeholder="请输入">-->
+          <!--              &lt;!&ndash; @input="discountInput" &ndash;&gt;-->
+
+          <!--              <template slot="append">元</template>-->
+          <!--            </el-input>-->
+        </div>
       </template>
       <!-- <template v-slot:technicalDrawings="{ row, $index }">
         <el-form-item
@@ -79,6 +91,38 @@
           />
         </el-form-item>
       </template> -->
+      <!--      <template v-slot:singlePrice="{ row, $index }">-->
+      <!--        <el-form-item-->
+      <!--          style="margin-bottom: 20px"-->
+      <!--          :prop="'datasource.' + $index + '.singlePrice'"-->
+      <!--        >-->
+      <!--          <el-input-->
+      <!--            type="number"-->
+      <!--            clearable-->
+      <!--            v-model="row.singlePrice"-->
+      <!--            @input="(val) => changeNumSinglePrice(val, $index)"-->
+      <!--            placeholder="请输入"-->
+      <!--          />-->
+      <!--        </el-form-item>-->
+      <!--      </template>-->
+
+      <template v-slot:totalPrice="{ row, $index }">
+        <el-form-item
+          v-if="returnSourceType==2"
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + $index + '.totalPrice'"
+        >
+          <el-input
+            type="number"
+            clearable
+            v-model="row.totalPrice"
+            @input="(val) => changeTotalPrice(val, $index)"
+            placeholder="请输入"
+          />
+        </el-form-item>
+        <span v-else>{{row.totalPrice}}</span>
+      </template>
+
       <template v-slot:totalCount="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -212,6 +256,7 @@ export default {
   props: {
     receiveId: String,
     payAmount: [Number,String],
+    returnSourceType: [Number,String],
     pricingWay: [Number, String],
     sourceType: [Number, String],
     outsourceSendCode: [Number, String],
@@ -235,6 +280,7 @@ export default {
     return {
       discountTotalPrice: 0.0,
       allPrice: 0.0,
+      totalAmount: 0.0,
       outboundDetailsDialogFlag: false,
       innerboundDetailsDialogFlag: false,
       numberReg,
@@ -376,7 +422,7 @@ export default {
           align: "center"
         },
         {
-          width: 120,
+          width: 140,
           prop: 'totalPrice',
           label: '合计',
           slot: 'totalPrice',
@@ -466,6 +512,25 @@ export default {
     // });
   },
   methods: {
+    changeNumSinglePrice(val,index){
+      if(!val){
+        this.$set(this.form.datasource[index], 'singlePrice', 0)
+        this.$set(this.form.datasource[index], 'discountSinglePrice', 0)
+      }else {
+        this.$set(this.form.datasource[index], 'discountSinglePrice', val)
+      }
+      let totalCount = this.form.datasource[index].totalCount
+      this.changeNum(totalCount,index)
+    },
+    changeTotalPrice(val,index){
+      if(!val){
+        this.$set(this.form.datasource[index], 'totalPrice', 0)
+        this.$set(this.form.datasource[index], 'discountTotalPrice', 0)
+      }else {
+        this.$set(this.form.datasource[index], 'discountTotalPrice', val)
+      }
+      this.gettotalAmount()
+    },
     //修改数量更新合计/总重
     changeNum(val, index) {
       this.curIndex = index
@@ -591,12 +656,11 @@ export default {
         let sum = productData
           .reduce((sum, item) => {
             return sum + Number(item.totalPrice);
-          }, 0)
-          .toFixed(2);
-        this.$emit('update:payAmount', productData.reduce((sum, item) => {
-            return sum + Number(item.discountTotalPrice);
-          }, 0).toFixed(2)
-        )
+          }, 0).toFixed(2);
+        this.totalAmount = productData.reduce((sum, item) => {
+          return sum + Number(item.discountTotalPrice);
+        }, 0).toFixed(2)
+        this.$emit('update:payAmount', this.totalAmount)
         this.$store.commit('returnGoods/setAllcountAmount', sum);
       } else {
         this.$store.commit('returnGoods/setAllcountAmount', 0);
@@ -797,7 +861,7 @@ export default {
 
 .pricebox {
   display: flex;
-  justify-content: flex-start;
+  justify-content: flex-end;
   align-items: center;
   font-weight: bold;
 }

+ 2 - 4
src/views/bpm/handleTask/components/purchaseOrder/outsourceSendReturnGoods/submit.vue

@@ -38,8 +38,7 @@
         :loading="isSaveLoading"
         @click="storemanApprove"
         v-if="
-          ['storemanApprove'].includes(taskDefinitionKey) &&
-          activeComp == 'inoutBound' &&
+          ['storemanApprove'].includes(taskDefinitionKey) &&  activeComp == 'inoutBound' &&
           [0, 3].includes(outInData.verifyStatus)
         "
         >申请入库
@@ -49,8 +48,7 @@
         type="danger"
         size="mini"
         @click="handleAudit(0)"
-        v-if="['storemanApprove'].includes(taskDefinitionKey)"
-        >驳回
+        v-if="!['starter'].includes(taskDefinitionKey)">驳回
       </el-button>
 
       <el-dropdown

+ 1 - 0
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/addReturnGoodsDialog.vue

@@ -86,6 +86,7 @@
       <inventoryTable
         :pricingWay="form.pricingWay"
         :sourceType="form.sourceType"
+        :returnSourceType="1"
         :outsourceSendCode="form.outsourceSendCode"
         :receiveNo="form.receiveNo"
         :payAmount.sync="form.payAmount"

+ 58 - 5
src/views/bpm/handleTask/components/purchaseOrder/returnGoods/inventoryTable.vue

@@ -79,6 +79,38 @@
           />
         </el-form-item>
       </template> -->
+      <!--      <template v-slot:singlePrice="{ row, $index }">-->
+      <!--        <el-form-item-->
+      <!--          style="margin-bottom: 20px"-->
+      <!--          :prop="'datasource.' + $index + '.singlePrice'"-->
+      <!--        >-->
+      <!--          <el-input-->
+      <!--            type="number"-->
+      <!--            clearable-->
+      <!--            v-model="row.singlePrice"-->
+      <!--            @input="(val) => changeNumSinglePrice(val, $index)"-->
+      <!--            placeholder="请输入"-->
+      <!--          />-->
+      <!--        </el-form-item>-->
+      <!--      </template>-->
+
+      <template v-slot:totalPrice="{ row, $index }">
+        <el-form-item
+          v-if="returnSourceType==2"
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + $index + '.totalPrice'"
+        >
+          <el-input
+            type="number"
+            clearable
+            v-model="row.totalPrice"
+            @input="(val) => changeTotalPrice(val, $index)"
+            placeholder="请输入"
+          />
+        </el-form-item>
+        <span v-else>{{row.totalPrice}}</span>
+      </template>
+
       <template v-slot:totalCount="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -212,6 +244,7 @@ export default {
   props: {
     receiveId: String,
     payAmount: [Number,String],
+    returnSourceType: [Number,String],
     pricingWay: [Number, String],
     sourceType: [Number, String],
     outsourceSendCode: [Number, String],
@@ -235,6 +268,7 @@ export default {
     return {
       discountTotalPrice: 0.0,
       allPrice: 0.0,
+      totalAmount: 0.0,
       outboundDetailsDialogFlag: false,
       innerboundDetailsDialogFlag: false,
       numberReg,
@@ -375,7 +409,7 @@ export default {
           align: "center"
         },
         {
-          width: 120,
+          width: 140,
           prop: 'totalPrice',
           label: '合计',
           slot: 'totalPrice',
@@ -465,6 +499,25 @@ export default {
     // });
   },
   methods: {
+    changeNumSinglePrice(val,index){
+      if(!val){
+        this.$set(this.form.datasource[index], 'singlePrice', 0)
+        this.$set(this.form.datasource[index], 'discountSinglePrice', 0)
+      }else {
+        this.$set(this.form.datasource[index], 'discountSinglePrice', val)
+      }
+      let totalCount = this.form.datasource[index].totalCount
+      this.changeNum(totalCount,index)
+    },
+    changeTotalPrice(val,index){
+      if(!val){
+        this.$set(this.form.datasource[index], 'totalPrice', 0)
+        this.$set(this.form.datasource[index], 'discountTotalPrice', 0)
+      }else {
+        this.$set(this.form.datasource[index], 'discountTotalPrice', val)
+      }
+      this.gettotalAmount()
+    },
     //修改数量更新合计/总重
     changeNum(val, index) {
       this.curIndex = index
@@ -592,10 +645,10 @@ export default {
             return sum + Number(item.totalPrice);
           }, 0)
           .toFixed(2);
-        this.$emit('update:payAmount', productData.reduce((sum, item) => {
-            return sum + Number(item.discountTotalPrice);
-          }, 0).toFixed(2)
-        )
+        this.totalAmount = productData.reduce((sum, item) => {
+          return sum + Number(item.discountTotalPrice);
+        }, 0).toFixed(2)
+        this.$emit('update:payAmount', this.totalAmount)
         this.$store.commit('returnGoods/setAllcountAmount', sum);
       } else {
         this.$store.commit('returnGoods/setAllcountAmount', 0);

+ 1 - 0
src/views/bpm/handleTask/components/saleOrder/entrustedReceiveReturnGoods/addReturnGoodsDialog.vue

@@ -112,6 +112,7 @@
       <inventoryTable
         ref="inventoryTableref"
         :pricingWay="form.pricingWay"
+        :returnSourceType="form.returnSourceType"
         :entrustedCode="form.entrustedCode"
         :sendId="form.sendId"
         :type="form.type"

+ 64 - 11
src/views/bpm/handleTask/components/saleOrder/entrustedReceiveReturnGoods/inventoryTable.vue

@@ -14,17 +14,17 @@
         <div class="headbox">
           <div class="pricebox">
             <span class="amount">总金额{{ totalAmount }}元</span>
-            <span>优惠总金额:</span>
-            <el-input
-              v-model="payAmount"
-              style="width: 150px"
-              placeholder="请输入"
-            >
-              <!-- @input="discountInput" -->
-
-              <template slot="append">元</template>
-            </el-input
-            >
+<!--            <span>优惠总金额:</span>-->
+<!--            <el-input-->
+<!--              v-model="payAmount"-->
+<!--              style="width: 150px"-->
+<!--              placeholder="请输入"-->
+<!--            >-->
+<!--              &lt;!&ndash; @input="discountInput" &ndash;&gt;-->
+
+<!--              <template slot="append">元</template>-->
+<!--            </el-input-->
+<!--            >-->
           </div>
         </div>
       </template>
@@ -129,6 +129,37 @@
           />
         </el-form-item>
       </template>
+      <!--      <template v-slot:singlePrice="{ row, $index }">-->
+      <!--        <el-form-item-->
+      <!--          style="margin-bottom: 20px"-->
+      <!--          :prop="'datasource.' + $index + '.singlePrice'"-->
+      <!--        >-->
+      <!--          <el-input-->
+      <!--            type="number"-->
+      <!--            clearable-->
+      <!--            v-model="row.singlePrice"-->
+      <!--            @input="(val) => changeNumSinglePrice(val, $index)"-->
+      <!--            placeholder="请输入"-->
+      <!--          />-->
+      <!--        </el-form-item>-->
+      <!--      </template>-->
+
+      <template v-slot:totalPrice="{ row, $index }">
+        <el-form-item
+          v-if="returnSourceType==2"
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + $index + '.totalPrice'"
+        >
+          <el-input
+            type="number"
+            clearable
+            v-model="row.totalPrice"
+            @input="(val) => changeTotalPrice(val, $index)"
+            placeholder="请输入"
+          />
+        </el-form-item>
+        <span v-else>{{row.totalPrice}}</span>
+      </template>
       <template v-slot:totalCount="scope">
         <el-form-item
           style="margin-bottom: 20px"
@@ -192,6 +223,7 @@ export default {
   props: {
     sendId: String,
     pricingWay: [Number, String],
+    returnSourceType: [Number, String],
     entrustedCode: [Number, String],
     returnType: {
       default: ''
@@ -433,6 +465,27 @@ export default {
     downloadFile(file) {
       getFile({objectName: file.storePath}, file.name);
     },
+    //修改单价
+    changeNumSinglePrice(val,index){
+      if(!val){
+        this.$set(this.form.datasource[index], 'singlePrice', 0)
+        this.$set(this.form.datasource[index], 'discountSinglePrice', 0)
+      }else {
+        this.$set(this.form.datasource[index], 'discountSinglePrice', val)
+      }
+      let totalCount = this.form.datasource[index].totalCount
+      this.changeNum(totalCount,index)
+    },
+    //修改合计
+    changeTotalPrice(val,index){
+      if(!val){
+        this.$set(this.form.datasource[index], 'totalPrice', 0)
+        this.$set(this.form.datasource[index], 'discountTotalPrice', 0)
+      }else {
+        this.$set(this.form.datasource[index], 'discountTotalPrice', val)
+      }
+      this.gettotalAmount()
+    },
     //修改数量更新合计/总重
     changeNum(val, index) {
       this.curIndex = index

+ 160 - 161
src/views/bpm/handleTask/components/saleOrder/entrustedReceiveReturnGoods/submit.vue

@@ -25,7 +25,7 @@
         size="mini"
         @click="handleAudit(1)"
         v-if="taskDefinitionKey != 'storeman'"
-        >通过
+      >通过
       </el-button>
       <el-button
         v-else
@@ -35,7 +35,7 @@
         :loading="isLoading"
         @click="storemanApprove"
         v-if="['storeman'].includes(taskDefinitionKey)"
-        >申请出库
+      >申请出库
       </el-button>
       <el-button
         icon="el-icon-circle-close"
@@ -43,14 +43,14 @@
         size="mini"
         @click="handleAudit(0)"
         v-if="!['starter'].includes(taskDefinitionKey)"
-        >驳回
+      >驳回
       </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
+        >更多<i class="el-icon-arrow-down el-icon--right"></i
         ></span>
         <el-dropdown-menu slot="dropdown">
           <el-dropdown-item command="cancel">作废</el-dropdown-item>
@@ -61,180 +61,179 @@
 </template>
 
 <script>
-  import outin from '@/api/warehouseManagement/outin';
-  import {
-    UpdateReturnInformation,
-    saleReturnProcessCancel,
-    getWarehouseListByIds
-  } from '@/api/bpm/components/saleManage/saleorder';
-  import { approveTaskWithVariables } from '@/api/bpm/task';
-  import { listAllUserBind } from '@/api/system/organization';
+import outin from '@/api/warehouseManagement/outin';
+import {
+  UpdateReturnInformation,
+  saleReturnProcessCancel,
+  getWarehouseListByIds
+} from '@/api/bpm/components/saleManage/saleorder';
+import {approveTaskWithVariables} from '@/api/bpm/task';
+import {listAllUserBind} from '@/api/system/organization';
 
-  // 流程实例的详情页,可用于审批
-  export default {
-    name: '',
-    components: {
-      //   Parser
+// 流程实例的详情页,可用于审批
+export default {
+  name: '',
+  components: {
+    //   Parser
+  },
+  props: {
+    businessId: {
+      default: ''
     },
-    props: {
-      businessId: {
-        default: ''
-      },
-      taskId: {
-        default: ''
-      },
-      id: {
-        default: ''
+    taskId: {
+      default: ''
+    },
+    id: {
+      default: ''
+    },
+    taskDefinitionKey: {
+      default: ''
+    }
+  },
+  data() {
+    return {
+      isLoading: false,
+      form: {
+        technicianId: '',
+        reason: ''
       },
-      taskDefinitionKey: {
-        default: ''
+      userOptions: [],
+      activeComp: ''
+    };
+  },
+  async created() {
+    this.userOptions = [];
+    listAllUserBind().then((data) => {
+      this.userOptions.push(...data);
+    });
+    if (this.taskDefinitionKey == 'storemanApprove') {
+      let data = await getReturnSaleOrderrecordDetail(this.businessId);
+      try {
+        this.outInData = await getOutInBySourceBizNo(data.orderNo);
+      } catch (error) {
       }
+      this.outInData.verifyStatus = 0;
+    }
+  },
+  methods: {
+    /** 处理转办审批人 */
+    handleUpdateAssignee() {
+      this.$emit('handleUpdateAssignee');
     },
-    data() {
-      return {
-        isLoading: false,
-        form: {
-          technicianId: '',
-          reason: ''
-        },
-        userOptions: [],
-        activeComp: ''
-      };
+    /** 退回 */
+    handleBackList() {
+      this.$emit('handleBackList');
     },
-    async created() {
-      this.userOptions = [];
-      listAllUserBind().then((data) => {
-        this.userOptions.push(...data);
-      });
-      if (this.taskDefinitionKey == 'storemanApprove') {
-        let data = await getReturnSaleOrderrecordDetail(this.businessId);
-        try {
-          this.outInData = await getOutInBySourceBizNo(data.orderNo);
-        } catch (error) {}
-        this.outInData.verifyStatus = 0;
+    async storemanApprove() {
+      let data = await this.getTableValue();
+      let storageData = data.returnStorageData;
+      // 入库来源storageSource 0-正常  1-外部(外部跳过内部审核流程)
+      storageData.storageSource = 1;
+      try {
+        this.isLoading = true;
+        const res = await outin.saveNew(storageData);
+        if (res.code == 0) {
+          approveTaskWithVariables({
+            id: this.taskId,
+            reason: this.form.reason,
+            variables: {
+              pass: true
+            }
+          }).then((res) => {
+            if (res.code != '-1') {
+              this.$emit('handleAudit', {
+                status: 1,
+                title: '出库'
+              });
+            }
+            this.isLoading = false;
+          });
+        }
+      } catch (error) {
+        this.isLoading = false;
+        console.error('保存失败:', error);
       }
     },
-    methods: {
-      /** 处理转办审批人 */
-      handleUpdateAssignee() {
-        this.$emit('handleUpdateAssignee');
-      },
-      /** 退回 */
-      handleBackList() {
-        this.$emit('handleBackList');
-      },
-      async storemanApprove() {
-        let data = await this.getTableValue();
-        let storageData = data.returnStorageData;
-        // 入库来源storageSource 0-正常  1-外部(外部跳过内部审核流程)
-        storageData.storageSource = 1;
-        console.log(storageData);
-        try {
-          this.isLoading = true;
-          const res = await outin.saveNew(storageData);
-          if (res.code == 0) {
-            approveTaskWithVariables({
-              id: this.taskId,
-              reason: this.form.reason,
-              variables: {
-                pass: true
-              }
-            }).then((res) => {
-              if (res.code != '-1') {
-                this.$emit('handleAudit', {
-                  status: 1,
-                  title: '出库'
-                });
-              }
-              this.isLoading = false;
-            });
-          }
-        } catch (error) {
-          this.isLoading = false;
-          console.error('保存失败:', error);
-        }
-      },
-      async handleAudit(status) {
-        let storemanIds = '';
-        //发起人补充
-        if (this.taskDefinitionKey === 'starter') {
-          let arr = await this.getTableValue();
-          if (!arr) {
-            return;
-          }
-          let data = await UpdateReturnInformation(arr);
-          if (data.code != '0') {
-            return;
-          }
+    async handleAudit(status) {
+      let storemanIds = '';
+      //发起人补充
+      if (this.taskDefinitionKey === 'starter') {
+        let arr = await this.getTableValue();
+        if (!arr) {
+          return;
         }
-        //部门负责人审核
-        if (this.taskDefinitionKey === 'deptLeader') {
-          let arr = await this.getTableValue();
-          let ids = arr.productList.map((item) => item.warehouseId);
-          let data = await getWarehouseListByIds(ids || []);
-          storemanIds = [...new Set(data.map((item) => item.ownerId))].join(
-            ','
-          );
+        let data = await UpdateReturnInformation(arr);
+        if (data.code != '0') {
+          return;
         }
+      }
+      //部门负责人审核
+      if (this.taskDefinitionKey === 'deptLeader') {
+        let arr = await this.getTableValue();
+        let ids = arr.productList.map((item) => item.warehouseId);
+        let data = await getWarehouseListByIds(ids || []);
+        storemanIds = [...new Set(data.map((item) => item.ownerId))].join(',');
+      }
 
-        this.approveTaskWithVariables(status, storemanIds);
-      },
-      activeCompChange(activeComp) {
-        this.activeComp = activeComp;
-      },
-      async approveTaskWithVariables(status, storemanIds) {
-        let variables = {
-          pass: !!status,
-          storemanIds
-        };
-        approveTaskWithVariables({
-          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);
+      this.approveTaskWithVariables(status, storemanIds);
+    },
+    activeCompChange(activeComp) {
+      this.activeComp = activeComp;
+    },
+    async approveTaskWithVariables(status, storemanIds) {
+      let variables = {
+        pass: !!status
+      };
+      if (storemanIds) variables.storemanIds = storemanIds
+      approveTaskWithVariables({
+        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(() => {
-              saleReturnProcessCancel({
-                id: this.taskId,
-                reason: this.form.reason,
-                businessId: this.businessId
-              })
-                .then(() => {
-                  this.$emit('handleClose');
-                })
-                .catch(() => {
-                  this.$message.error('流程作废失败');
-                });
+    //更多
+    handleCommand(command) {
+      if (command === 'cancel') {
+        this.$confirm('是否确认作废?', {
+          type: 'warning',
+          cancelButtonText: '取消',
+          confirmButtonText: '确定'
+        })
+          .then(() => {
+            saleReturnProcessCancel({
+              id: this.taskId,
+              reason: this.form.reason,
+              businessId: this.businessId
             })
-            .catch(() => {});
-        }
+              .then(() => {
+                this.$emit('handleClose');
+              })
+              .catch(() => {
+                this.$message.error('流程作废失败');
+              });
+          })
+          .catch(() => {
+          });
       }
     }
-  };
+  }
+};
 </script>
 
 <style lang="scss"></style>

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

@@ -84,6 +84,11 @@
                 >
               </div>
             </el-form-item>
+            <el-form-item
+              label="计价方式:"
+              style="margin-bottom: 22px">
+              {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
+            </el-form-item>
           </el-col>
 
           <el-col :span="12">

+ 9 - 9
src/views/bpm/handleTask/components/saleOrder/returnGoods/inventoryTable.vue

@@ -24,16 +24,16 @@
           </el-button>
           <div class="pricebox">
             <span class="amount">合计{{ totalAmount }}元</span>
-            <span>优惠合计:</span>
-            <el-input
-              v-model="payAmount"
-              style="width: 150px"
-              placeholder="请输入"
-            >
-              <!-- @input="discountInput" -->
+<!--            <span>优惠合计:</span>-->
+<!--            <el-input-->
+<!--              v-model="payAmount"-->
+<!--              style="width: 150px"-->
+<!--              placeholder="请输入"-->
+<!--            >-->
+<!--              &lt;!&ndash; @input="discountInput" &ndash;&gt;-->
 
-              <template slot="append">元</template></el-input
-            >
+<!--              <template slot="append">元</template></el-input-->
+<!--            >-->
           </div>
         </div>
       </template>