huang_an 1 год назад
Родитель
Сommit
3fa5ee70b1

+ 9 - 0
src/api/warehouseManagement/index.js

@@ -160,5 +160,14 @@ export default {
       return res.data;
     }
     return Promise.reject(new Error(res.data.message));
+  },
+  getListByNameOrModeType: async (data) => {
+    const res = await request.post(
+      `/main/category/getListByNameOrModeType`,
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
   }
 };

+ 1 - 0
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -185,6 +185,7 @@
         v-if="activeComp == 'inoutBound'"
         :form="form"
         :sourceBizNo="form.receiveNo"
+        :detailList="form.productList"
         :bizType="2"
       ></add>
     </keep-alive>

+ 126 - 105
src/views/bpm/handleTask/components/saleOrder/invoice/addInvoiceDialog.vue

@@ -33,10 +33,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="12">
-            <el-form-item
-              label="受托发货单"
-              style="margin-bottom: 22px"
-            >
+            <el-form-item label="受托发货单" style="margin-bottom: 22px">
               <el-input
                 clearable
                 v-model="form.entrustedCode"
@@ -51,7 +48,8 @@
             <el-form-item
               label="客户名称"
               prop="contactName"
-              style="margin-bottom: 22px">
+              style="margin-bottom: 22px"
+            >
               <el-input v-model="form.contactName" disabled></el-input>
             </el-form-item>
           </el-col>
@@ -59,16 +57,19 @@
             <el-form-item
               label="客户联系人"
               prop="linkName"
-              style="margin-bottom: 22px">
-              <el-input clearable v-model="form.linkName" placeholder="请输入"/>
+              style="margin-bottom: 22px"
+            >
+              <el-input
+                clearable
+                v-model="form.linkName"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
-            <el-form-item
-              label="计价方式"
-              style="margin-bottom: 22px">
+            <el-form-item label="计价方式" style="margin-bottom: 22px">
               <el-select v-model="form.pricingWay" disabled style="width: 100%">
                 <el-option label="按数量计费" :value="1"></el-option>
                 <el-option label="按重量计费" :value="2"></el-option>
@@ -79,22 +80,32 @@
             <el-form-item
               label="客户电话"
               prop="linkPhone"
-              style="margin-bottom: 22px">
-              <el-input clearable v-model="form.linkPhone" placeholder="请输入"/>
+              style="margin-bottom: 22px"
+            >
+              <el-input
+                clearable
+                v-model="form.linkPhone"
+                placeholder="请输入"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row :gutter="20">
           <el-col :span="12">
-            <el-form-item label="车辆号" prop="carNo" style="margin-bottom: 22px">
-              <el-input clearable v-model="form.carNo" placeholder="请输入"/>
+            <el-form-item
+              label="车辆号"
+              prop="carNo"
+              style="margin-bottom: 22px"
+            >
+              <el-input clearable v-model="form.carNo" placeholder="请输入" />
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item
               label="收货地址"
               prop="receiveAddress"
-              style="margin-bottom: 22px">
+              style="margin-bottom: 22px"
+            >
               <el-input
                 clearable
                 v-model="form.receiveAddress"
@@ -120,65 +131,74 @@
                 v-model="form.repliedFiles"
                 module="main"
                 :showLib="false"
-                :limit="10"/>
+                :limit="10"
+              />
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
-    <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
-    <inventoryTable
-      :pricingWay="form.pricingWay"
-      :entrustedCode="form.entrustedCode"
-      ref="inventoryTableref"
-      :orderId="form.orderId"
-      v-show="taskDefinitionKey != 'salesmanUploadReceipt'"
-    ></inventoryTable>
-    <ele-pro-table
-      ref="table"
-      :needPage="false"
-      :columns="competAnalysisListcolumns"
-      :toolkit="[]"
-      :datasource="form.productList"
-      row-key="id"
-      v-show="taskDefinitionKey == 'salesmanUploadReceipt'"
-    >
-      <!-- <template v-slot:toolbar>
+      <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>
+      <inventoryTable
+        :pricingWay="form.pricingWay"
+        :entrustedCode="form.entrustedCode"
+        ref="inventoryTableref"
+        :orderId="form.orderId"
+        v-show="taskDefinitionKey != 'salesmanUploadReceipt'"
+      ></inventoryTable>
+      <ele-pro-table
+        ref="table"
+        :needPage="false"
+        :columns="competAnalysisListcolumns"
+        :toolkit="[]"
+        :datasource="form.productList"
+        row-key="id"
+        v-show="taskDefinitionKey == 'salesmanUploadReceipt'"
+      >
+        <!-- <template v-slot:toolbar>
         <div class="headbox">
         <span class="amount">总计:{{detailData.totalAmount}}元</span>
         <span class="amount">应付金额:{{detailData.payAmount}}元</span>
       </div>
       </template> -->
-      <template v-slot:technicalDrawings="{ row }">
-        <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
-          <el-link
-            v-for="link in row.technicalDrawings"
-            :key="link.id"
-            type="primary"
-            :underline="false"
-            @click="downloadFile(link)"
-          >
-            {{ link.name }}</el-link
-          >
-        </div>
-      </template>
-    </ele-pro-table>
-    <orderListDialog
-      ref="orderListDialogRef"
-      @changeParent="changeOrder"
-    ></orderListDialog>
+        <template v-slot:technicalDrawings="{ row }">
+          <div v-if="row.technicalDrawings && row.technicalDrawings?.length">
+            <el-link
+              v-for="link in row.technicalDrawings"
+              :key="link.id"
+              type="primary"
+              :underline="false"
+              @click="downloadFile(link)"
+            >
+              {{ link.name }}</el-link
+            >
+          </div>
+        </template>
+      </ele-pro-table>
+      <orderListDialog
+        ref="orderListDialogRef"
+        @changeParent="changeOrder"
+      ></orderListDialog>
       <!--  受托发货单  -->
-      <entrusted-receive-dialog :entrusted-receive-dialog-flag.sync="entrustedReceiveDialogFlag"
-                                v-if="entrustedReceiveDialogFlag"
-                                @changeParent="getInfo"
-                                ref="entrustedReceiveDialogRef"></entrusted-receive-dialog>
+      <entrusted-receive-dialog
+        :entrusted-receive-dialog-flag.sync="entrustedReceiveDialogFlag"
+        v-if="entrustedReceiveDialogFlag"
+        @changeParent="getInfo"
+        ref="entrustedReceiveDialogRef"
+      ></entrusted-receive-dialog>
     </div>
-    <detailDialog type="sourceBizNo" :businessId="form.docNo" v-if="activeComp == 'outBound'"></detailDialog>
+    <detailDialog
+      type="sourceBizNo"
+      :businessId="form.docNo"
+      v-if="activeComp == 'outBound'"
+    ></detailDialog>
+    <!-- <detailDialog type="sourceBizNo" :businessId="form.docNo" v-if="activeComp == 'outBound'"></detailDialog> -->
   </div>
 </template>
 
 <script>
   import fileUpload from '@/components/upload/fileUpload';
-  import detailDialog from '@/views/bpm/handleTask/components/outBound/detailDialog.vue'
+  // import detailDialog from '@/views/bpm/handleTask/components/outBound/detailDialog.vue'
+  import detailDialog from '@/views/bpm/outgoingManagement/details.vue';
   import dictMixins from '@/mixins/dictMixins';
 
   import {
@@ -190,7 +210,7 @@
   import inventoryTable from './inventoryTable.vue';
   import orderListDialog from './orderListDialog.vue';
   import { copyObj } from '@/utils/util';
-  import EntrustedReceiveDialog from "@/views/bpm/handleTask/components/saleOrder/invoice/entrustedReceiveDialog.vue";
+  import EntrustedReceiveDialog from '@/views/bpm/handleTask/components/saleOrder/invoice/entrustedReceiveDialog.vue';
 
   export default {
     mixins: [dictMixins],
@@ -243,11 +263,9 @@
             { required: true, message: '请选择客户名称', trigger: 'change' }
           ],
           linkName: [
-            { required: true, message: '请输入', trigger: ['blur','change'] }
+            { required: true, message: '请输入', trigger: ['blur', 'change'] }
           ],
-          orderNo: [
-            { required: true, message: '请选择', trigger: 'change' }
-          ]
+          orderNo: [{ required: true, message: '请选择', trigger: 'change' }]
         },
 
         // 提交状态
@@ -267,56 +285,56 @@
             prop: 'productName',
             label: '名称',
             slot: 'productName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'productCode',
             label: '编码',
             slot: 'productCode',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
             prop: 'productCategoryName',
             label: '类型',
             slot: 'productCategoryName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 160,
             prop: 'productBrand',
             label: '牌号',
             slot: 'productBrand',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'modelType',
             label: '型号',
             slot: 'modelType',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'specification',
             label: '规格',
             slot: 'specification',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
             prop: 'customerMark',
             label: '客户代号',
             slot: 'customerMark',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
             prop: 'warehouseName',
             label: '仓库名称',
             slot: 'warehouseName',
-            align: 'center',
+            align: 'center'
           },
 
           {
@@ -324,35 +342,35 @@
             prop: 'totalCount',
             label: '数量',
             slot: 'totalCount',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'measuringUnit',
             label: '计量单位',
             slot: 'measuringUnit',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'singleWeight',
             label: '单重',
             slot: 'singleWeight',
-            align: "center"
+            align: 'center'
           },
           {
             width: 100,
             prop: 'receiveTotalWeight',
             label: '收货总重',
             slot: 'receiveTotalWeight',
-            align: "center"
+            align: 'center'
           },
           {
             width: 200,
             prop: 'sendTotalWeight',
             label: '发货总重',
             slot: 'sendTotalWeight',
-            align: "center",
+            align: 'center',
             headerSlot: 'headerTotalCount'
           },
 
@@ -361,21 +379,21 @@
             prop: 'increaseTotalWeight',
             label: '增重重量',
             slot: 'increaseTotalWeight',
-            align: "center"
+            align: 'center'
           },
           {
             width: 100,
             prop: 'weightUnit',
             label: '重量单位',
             slot: 'weightUnit',
-            align: "center"
+            align: 'center'
           },
           {
             width: 160,
             prop: 'singlePrice',
             label: '单价',
             slot: 'singlePrice',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
@@ -385,7 +403,7 @@
             formatter: (_row, _column, cellValue) => {
               return _row.totalPrice + '元';
             },
-            align: 'center',
+            align: 'center'
           },
 
           {
@@ -393,7 +411,7 @@
             prop: 'deliveryDays',
             label: '交期(天)',
             slot: 'deliveryDays',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
@@ -401,9 +419,11 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             },
-            align: 'center',
+            align: 'center'
           },
           // {
           //   width: 120,
@@ -416,14 +436,14 @@
             prop: 'technicalAnswerName',
             label: '技术答疑人',
             slot: 'technicalAnswerName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 220,
             prop: 'technicalParams',
             label: '技术参数',
             slot: 'technicalParams',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 240,
@@ -431,16 +451,18 @@
             label: '技术图纸',
             slot: 'technicalDrawings',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             },
-            align: 'center',
+            align: 'center'
           },
           {
             width: 220,
             prop: 'remark',
             label: '备注',
             slot: 'remark',
-            align: 'center',
+            align: 'center'
           }
         ]
       };
@@ -520,7 +542,7 @@
         if (data) {
           this.$nextTick(() => {
             this.form = data;
-            this.form.pricingWay = data?.saleOrder?.pricingWay
+            this.form.pricingWay = data?.saleOrder?.pricingWay;
             this.$refs.inventoryTableref &&
               this.$refs.inventoryTableref.putTableValue(data.productList);
           });
@@ -541,20 +563,19 @@
             entrustedCode: '',
             entrustedId: '',
             sendNoteNo: '',
-            pricingWay: '',
-          })
+            pricingWay: ''
+          });
           this.$refs.inventoryTableref &&
-          this.$refs.inventoryTableref.putTableValue([]);
-          return
+            this.$refs.inventoryTableref.putTableValue([]);
+          return;
         }
         this.searchParams = {
           orderId: this.form.orderId
-        }
-        this.entrustedReceiveDialogFlag = true
+        };
+        this.entrustedReceiveDialogFlag = true;
         this.$nextTick(() => {
           this.$refs.entrustedReceiveDialogRef.init();
-        })
-
+        });
       },
       //获取受托收货单数据回调
       async getInfo(row) {
@@ -593,11 +614,11 @@
             entrustedCode: code,
             entrustedId: id
           });
-          productList.forEach(item => {
-            item.id = ''
-          })
+          productList.forEach((item) => {
+            item.id = '';
+          });
           this.$refs.inventoryTableref &&
-          this.$refs.inventoryTableref.putTableValue(productList, code);
+            this.$refs.inventoryTableref.putTableValue(productList, code);
         });
       },
       //选择订单弹框
@@ -614,11 +635,11 @@
             orderId: '',
             pricingWay: '',
             entrustedCode: '',
-            entrustedId: '',
-          })
+            entrustedId: ''
+          });
           this.$refs.inventoryTableref &&
-          this.$refs.inventoryTableref.putTableValue([]);
-          return
+            this.$refs.inventoryTableref.putTableValue([]);
+          return;
         }
 
         let item = {

+ 66 - 62
src/views/bpm/handleTask/components/saleOrder/invoice/detailDialog.vue

@@ -71,7 +71,9 @@
               style="margin-bottom: 16px"
             >
               <div
-                v-if="detailData.repliedFiles && detailData.repliedFiles?.length"
+                v-if="
+                  detailData.repliedFiles && detailData.repliedFiles?.length
+                "
               >
                 <el-link
                   v-for="link in detailData.repliedFiles"
@@ -84,9 +86,7 @@
                 >
               </div>
             </el-form-item>
-            <el-form-item
-              label="计价方式:"
-              style="margin-bottom: 22px">
+            <el-form-item label="计价方式:" style="margin-bottom: 22px">
               {{ form.pricingWay == 1 ? '按数量计费' : '按重量计费' }}
             </el-form-item>
           </el-col>
@@ -147,21 +147,20 @@
       </div>
       </template> -->
         <template v-slot:stockLedger="scope">
-          <el-popover
-            placement="right"
-            width="60%"
-            trigger="hover">
-            <ele-pro-table :ref="'childrenTable'+scope.$index"
-                           row-key="id"
-                           max-height="300px"
-                           :needPage="false"
-                           :columns="childrenColumns"
-                           :toolkit="[]"
-                           :datasource="scope.row.sendProductDetail"
-                           cache-key="stockLedgerRoleTable" class="time-form">
+          <el-popover placement="right" width="60%" trigger="hover">
+            <ele-pro-table
+              :ref="'childrenTable' + scope.$index"
+              row-key="id"
+              max-height="300px"
+              :needPage="false"
+              :columns="childrenColumns"
+              :toolkit="[]"
+              :datasource="scope.row.sendProductDetail"
+              cache-key="stockLedgerRoleTable"
+              class="time-form"
+            >
             </ele-pro-table>
             <el-button type="text" slot="reference">明细</el-button>
-
           </el-popover>
         </template>
         <template v-slot:industryArtFiles="{ row, $index }">
@@ -213,18 +212,17 @@
             >
           </div>
         </template>
-
       </ele-pro-table>
     </div>
     <keep-alive>
       <add
         ref="add"
         v-if="activeComp == 'outBound'"
-        type="sourceBizNo"
-        @success="success"
+        :form="form"
+        :sourceBizNo="form.docNo"
+        :bizType="3"
       ></add>
     </keep-alive>
-
   </div>
 </template>
 
@@ -234,7 +232,7 @@
   import { getSendSaleOrderrecordDetail } from '@/api/bpm/components/saleManage/saleorder';
   import { reviewStatusEnum } from '@/enum/dict';
   import { copyObj } from '@/utils/util';
-  import add from './saleShipmentsOutbound.vue';
+  import add from '@/views/bpm/outgoingManagement/outbound.vue';
 
   export default {
     mixins: [dictMixins],
@@ -262,25 +260,25 @@
             type: 'index',
             columnKey: 'index',
             align: 'center',
-            fixed: 'left',
+            fixed: 'left'
           },
           {
             minWidth: 100,
             prop: 'code',
             label: '编码',
-            align: 'center',
+            align: 'center'
           },
           {
             minWidth: 140,
             prop: 'barcodes',
             label: '发货条码',
-            align: 'center',
+            align: 'center'
           },
           {
             minWidth: 100,
             prop: 'engrave',
             label: '刻码',
-            align: 'center',
+            align: 'center'
           }
         ],
         competAnalysisListcolumns: [
@@ -296,56 +294,56 @@
             prop: 'productName',
             label: '名称',
             slot: 'productName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'productCode',
             label: '编码',
             slot: 'productCode',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
             prop: 'productCategoryName',
             label: '类型',
             slot: 'productCategoryName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 160,
             prop: 'productBrand',
             label: '牌号',
             slot: 'productBrand',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'modelType',
             label: '型号',
             slot: 'modelType',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'specification',
             label: '规格',
             slot: 'specification',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
             prop: 'customerMark',
             label: '客户代号',
             slot: 'customerMark',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
             prop: 'warehouseName',
             label: '仓库名称',
             slot: 'warehouseName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 100,
@@ -359,35 +357,35 @@
             prop: 'totalCount',
             label: '数量',
             slot: 'totalCount',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'measuringUnit',
             label: '计量单位',
             slot: 'measuringUnit',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
             prop: 'singleWeight',
             label: '单重',
             slot: 'singleWeight',
-            align: "center"
+            align: 'center'
           },
           {
             width: 100,
             prop: 'receiveTotalWeight',
             label: '收货总重',
             slot: 'receiveTotalWeight',
-            align: "center"
+            align: 'center'
           },
           {
             width: 200,
             prop: 'sendTotalWeight',
             label: '发货总重',
             slot: 'sendTotalWeight',
-            align: "center",
+            align: 'center',
             headerSlot: 'headerTotalCount'
           },
 
@@ -396,21 +394,21 @@
             prop: 'increaseTotalWeight',
             label: '增重重量',
             slot: 'increaseTotalWeight',
-            align: "center"
+            align: 'center'
           },
           {
             width: 100,
             prop: 'weightUnit',
             label: '重量单位',
             slot: 'weightUnit',
-            align: "center"
+            align: 'center'
           },
           {
             width: 160,
             prop: 'singlePrice',
             label: '单价',
             slot: 'singlePrice',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 120,
@@ -420,7 +418,7 @@
             formatter: (_row, _column, cellValue) => {
               return _row.totalPrice + '元';
             },
-            align: 'center',
+            align: 'center'
           },
 
           {
@@ -428,7 +426,7 @@
             prop: 'deliveryDays',
             label: '交期(天)',
             slot: 'deliveryDays',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 200,
@@ -436,9 +434,11 @@
             label: '质保期',
             slot: 'guaranteePeriod',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             },
-            align: 'center',
+            align: 'center'
           },
           // {
           //   width: 120,
@@ -451,14 +451,14 @@
             prop: 'technicalAnswerName',
             label: '技术答疑人',
             slot: 'technicalAnswerName',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 220,
             prop: 'technicalParams',
             label: '技术参数',
             slot: 'technicalParams',
-            align: 'center',
+            align: 'center'
           },
           {
             width: 240,
@@ -466,16 +466,18 @@
             label: '技术图纸',
             slot: 'technicalDrawings',
             formatter: (_row, _column, cellValue) => {
-              return (_row.guaranteePeriod||'') + _row.guaranteePeriodUnitName;
+              return (
+                (_row.guaranteePeriod || '') + _row.guaranteePeriodUnitName
+              );
             },
-            align: 'center',
+            align: 'center'
           },
           {
             width: 220,
             prop: 'remark',
             label: '备注',
             slot: 'remark',
-            align: 'center',
+            align: 'center'
           }
         ]
       };
@@ -488,27 +490,28 @@
     },
     async created() {
       await this.getDetailData(this.businessId);
+      console.log('this.taskDefinitionKey--------', this.taskDefinitionKey);
       if (this.taskDefinitionKey == 'storemanApprove') {
         this.tabOptions.push({ key: 'outBound', name: '出库单' });
         this.activeComp = 'outBound';
         this.$emit('activeCompChange', 'outBound');
-        this.$nextTick(() => {
-          this.$refs.add.eomSuccess(this.form);
-        });
+        // this.$nextTick(() => {
+        //   this.$refs.add.eomSuccess(this.form);
+        // });
       }
     },
     methods: {
       changeActive(item) {
         this.activeComp = item.key;
         this.$emit('activeCompChange', item.key);
-        if (
-          this.taskDefinitionKey == 'storemanApprove' &&
-          item.key == 'outBound'
-        ) {
-          this.$nextTick(() => {
-            this.$refs.add.eomSuccess(this.form);
-          });
-        }
+        // if (
+        //   this.taskDefinitionKey == 'storemanApprove' &&
+        //   item.key == 'outBound'
+        // ) {
+        //   this.$nextTick(() => {
+        //     this.$refs.add.eomSuccess(this.form);
+        //   });
+        // }
       },
       save(data) {
         this.$refs.add.handleNewSave(data);
@@ -541,6 +544,7 @@
         const data = await getSendSaleOrderrecordDetail(id);
         this.loading = false;
         if (data) {
+          data.categoryLevelTopId = data.topCategoryIds;
           this.form = data;
           this.detailData = data;
         }

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

@@ -1,4 +1,4 @@
-<!-- 销售发货出库 -->
+<!-- 销售发货出库 出库标识 -->
 <template>
   <div class="ele-body">
     <el-card shadow="never">

+ 22 - 20
src/views/bpm/handleTask/components/saleOrder/invoice/submit.vue

@@ -57,8 +57,6 @@
         >驳回
       </el-button>
 
-
-
       <!-- <el-button
         icon="el-icon-circle-close"
         type="danger"
@@ -91,12 +89,13 @@
     UpdateSendInformation,
     getSendSaleOrderrecordDetail,
     getWarehouseListByIds,
-    saleSendProcessCancel,
+    saleSendProcessCancel
   } from '@/api/bpm/components/saleManage/saleorder';
   import { approveTaskWithVariables } from '@/api/bpm/task';
   import { getOutInBySourceBizNo } from '@/api/classifyManage';
   import outin from '@/api/warehouseManagement/outin';
   import { data } from 'ele-admin/lib/ele-pro-table';
+  import storageApi from '@/api/warehouseManagement';
 
   // 流程实例的详情页,可用于审批
   export default {
@@ -149,11 +148,11 @@
         let res = await this.getTableValue();
         let storageData = res.returnStorageData;
         console.log(storageData);
-        // 出库来源storageSource 0-正常  1-外部(外部跳过内部审核流程)
-        storageData.storageSource = 1;
+        // 出库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
+        storageData.isSkip = 1;
         try {
           this.isSaveLoading = true;
-          await outin.saveNew(storageData);
+          await storageApi.outStorage(storageData);
           approveTaskWithVariables({
             id: this.taskId,
             reason: this.form.reason,
@@ -257,24 +256,27 @@
       //更多
       handleCommand(command) {
         if (command === 'cancel') {
-          this.$confirm("是否确认作废?", {
+          this.$confirm('是否确认作废?', {
             type: 'warning',
             cancelButtonText: '取消',
             confirmButtonText: '确定'
-          }).then(() => {
-            saleSendProcessCancel({
-              id: this.taskId,
-              reason: this.form.reason,
-              businessId: this.businessId,
-            }).then(() => {
-              this.$emit('handleClose');
-            }).catch(() => {
-              this.$message.error("流程作废失败");
-            });
-          }).catch(() => {});
+          })
+            .then(() => {
+              saleSendProcessCancel({
+                id: this.taskId,
+                reason: this.form.reason,
+                businessId: this.businessId
+              })
+                .then(() => {
+                  this.$emit('handleClose');
+                })
+                .catch(() => {
+                  this.$message.error('流程作废失败');
+                });
+            })
+            .catch(() => {});
         }
-      },
-
+      }
     }
   };
 </script>

+ 5 - 3
src/views/bpm/outgoingManagement/details.vue

@@ -102,6 +102,7 @@
             tooltip-effect="dark"
             :max-height="300"
             :header-cell-style="rowClass"
+            border
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
@@ -241,6 +242,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             v-el-table-infinite-scroll="pickingHandleScroll"
           >
             <el-table-column label="序号" type="index" width="50">
@@ -361,6 +363,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             style="width: 100%"
             stripe
             height="300px"
@@ -580,11 +583,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#0000', border: 'none' };
+        return { background: '#0000' };
       },
       async getAllCategoryType() {
         const { data } = await allCategoryLevel();

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

@@ -140,6 +140,7 @@
               tooltip-effect="dark"
               :max-height="300"
               :header-cell-style="rowClass"
+              border
             >
               <el-table-column label="序号" type="index" width="50">
               </el-table-column>
@@ -285,6 +286,7 @@
               :max-height="300"
               :row-class-name="tableRowClassName"
               :header-cell-style="rowClass"
+              border
               v-el-table-infinite-scroll="pickingHandleScroll"
             >
               <el-table-column label="序号" type="index" width="50">
@@ -406,6 +408,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             style="width: 100%"
             stripe
             height="300px"
@@ -762,11 +765,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#EEEEEE', border: 'none' };
+        return { background: '#0000' };
       },
       // 部门点击事件
       async auditorDeptClick(data) {
@@ -828,6 +830,7 @@
         });
       },
       addStock() {
+        console.log(this.formData.extInfo.assetType);
         if (
           !(
             this.formData.extInfo.assetType &&

+ 5 - 3
src/views/bpm/stockManagement/details.vue

@@ -115,6 +115,7 @@
             tooltip-effect="dark"
             :max-height="300"
             :header-cell-style="rowClass"
+            border
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
@@ -264,6 +265,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             v-el-table-infinite-scroll="pickingHandleScroll"
           >
             <el-table-column label="序号" type="index" width="50">
@@ -384,6 +386,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             style="width: 100%"
             stripe
             height="300px"
@@ -592,11 +595,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#0000', border: 'none' };
+        return { background: '#0000' };
       },
       async getAllCategoryType() {
         const { data } = await allCategoryLevel();

+ 5 - 3
src/views/bpm/stockManagement/quality.vue

@@ -98,6 +98,7 @@
             tooltip-effect="dark"
             :max-height="300"
             :header-cell-style="rowClass"
+            border
           >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
@@ -247,6 +248,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             v-el-table-infinite-scroll="pickingHandleScroll"
           >
             <el-table-column label="序号" type="index" width="50">
@@ -388,6 +390,7 @@
             :max-height="300"
             :row-class-name="tableRowClassName"
             :header-cell-style="rowClass"
+            border
             style="width: 100%"
             stripe
             height="300px"
@@ -649,11 +652,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#0000', border: 'none' };
+        return { background: '#0000' };
       },
       async getAllCategoryType() {
         const { data } = await allCategoryLevel();

+ 52 - 5
src/views/bpm/stockManagement/storage.vue

@@ -136,6 +136,7 @@
             <el-table
               :header-cell-style="rowClass"
               :max-height="300"
+              border
               ref="productListTable"
               :data="productList"
               tooltip-effect="dark"
@@ -478,6 +479,7 @@
           tooltip-effect="dark"
           :key="formData.bizType"
           :header-cell-style="rowClass"
+          border
           style="width: 100%"
           stripe
           :max-height="300"
@@ -678,6 +680,7 @@
           tooltip-effect="dark"
           :key="formData.bizType"
           :header-cell-style="rowClass"
+          border
           style="width: 100%"
           stripe
           :max-height="300"
@@ -879,9 +882,10 @@
       'el-table-infinite-scroll': elTableInfiniteScroll
     },
     props: {
-      form: { type: Object, default: {} },
+      form: { type: Object, default: () => {} },
       bizType: { type: Number, default: 1 },
-      sourceBizNo: { type: String, default: '' }
+      sourceBizNo: { type: String, default: '' },
+      detailList: { type: Array, default: () => [] }
     },
     data() {
       return {
@@ -989,6 +993,50 @@
         this.formData.sourceBizNo = this.sourceBizNo;
         this.formData.extInfo.supplierName = this.form.supplierName;
         this.formData.extInfo.supplierId = this.form.supplierId;
+        if (this.detailList?.length > 0) {
+          let codeList = this.detailList.map((item) => {
+            return item.productCode;
+          });
+          console.log('codeList-----------', codeList);
+          storageApi.getListByNameOrModeType({ codeList }).then(async (res) => {
+            console.log(res);
+            const batchNo = await getCode('lot_number_code');
+            this.productList = res.map((item, index) => {
+              let warehouseId = this.detailList.filter(
+                (detailItem) => detailItem.productCode == item.code
+              )[0].warehouseId;
+              let warehouseName = this.detailList.filter(
+                (detailItem) => detailItem.productCode == item.code
+              )[0].warehouseName;
+              return {
+                index: this.productList.length + index,
+                categoryId: item.id, // 物品id
+                categoryName: item.name, // 物品名称
+                categoryCode: item.code, // 物品编码
+                categoryModel: item.listSavemodelType, // 物品型号
+                specification: item.specification, // 规格
+                brandNum: item.brandNum, // 牌号
+                batchNo: batchNo, // 批次号
+                minPackingQuantity: '', // 最小包装单元数量
+                packingQuantity: '', // 包装数量
+                packingUnit: item.packingUnit, // 包装单位
+                measureQuantity: 0, // 计量数量
+                measureUnit: item.measuringUnit, // 计量单位
+                netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
+                weight: 0, // 重量
+                weightUnit: item.weightUnit, // 重量单位
+                totalMoney: '', // 总价
+                price: item.price, // 单价
+                purpose: '', // 用途
+                isUnpack: item.isUnpack, // 是否允许拆包
+                warehouseId, // 仓库id
+                warehouseName, // 仓库名称
+                warehouseIds: [warehouseId],
+                warehouseNames: [warehouseName]
+              };
+            });
+          });
+        }
       },
       // 获取物品列表
       async getListItems() {
@@ -1503,11 +1551,10 @@
         if (rowIndex === 1) {
           return {
             display: 'none',
-            background: '#EEEEEE',
-            border: 'none'
+            background: '#EEEEEE'
           };
         }
-        return { background: '#EEEEEE', border: 'none' };
+        return { background: '#0000' };
       },
       // 添加物品明细
       async addGoods(data) {