瀏覽代碼

仓库添加 失效日期

yusheng 1 年之前
父節點
當前提交
a6e74da380

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

@@ -20,10 +20,10 @@
         </div>
         <div v-if="item.key == 'inoutBound'">
           <add ref="inoutBoundRef" :form="form" :sourceBizNo="form.receiveNo" :saleProductList="form.productList"
-            :bizType="2" :detailProductList="detailData.productList"></add>
+            :bizType="form.outsourceSendCode?10:2" :detailProductList="detailData.productList"></add>
         </div>
         <div v-if="item.key == 'inoutBoundView'">
-          <detailDialog ref="inoutBoundViewRef" :bizType="2" :businessId="form.receiveNo" :isUpload="isUpload">
+          <detailDialog ref="inoutBoundViewRef"  :bizType="form.outsourceSendCode?10:2" :businessId="form.receiveNo" :isUpload="isUpload">
           </detailDialog>
         </div>
         <div v-if="item.key == 'inoutBoundEdit'">

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

@@ -179,13 +179,13 @@
         :form="form"
         :sourceBizNo="form.planCode"
         :saleProductList="form.detailList"
-        :bizType="2"
+        :bizType="10"
       ></add>
     </div>
     <div v-if="isView && ['3', '4', '5'].includes(form.sourceType)">
       <detailDialog
         ref="inoutBoundViewRef"
-        :bizType="2"
+        :bizType="10"
         :businessId="form.planCode"
       >
       </detailDialog>

+ 779 - 527
src/views/bpm/stockManagement/details.vue

@@ -51,17 +51,17 @@
                   <span>{{ infoData.verifyName }}</span>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 2">
+              <el-col :span="8">
                 <el-form-item label="客户:">
                   <span>{{ infoData.clientName }}</span>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 2">
+              <el-col :span="8">
                 <el-form-item label="供应商:">
                   <span>{{ extInfo.supplierName }}</span>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 2">
+              <el-col :span="8">
                 <el-form-item label="供应商代号:">
                   <template v-if="bizType == 2">{{
                     extInfo.supplierMark
@@ -71,7 +71,7 @@
                   }}</template>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" v-if="infoData.bizType == 2">
+              <el-col :span="8">
                 <el-form-item label="产地:">
                   <span>{{ extInfo.provenance }}</span>
                 </el-form-item>
@@ -113,49 +113,137 @@
         </div>
         <div class="content-detail mt20">
           <header-title title="产品信息" size="16px"></header-title>
-          <el-table ref="productListTable" :data="productList" tooltip-effect="dark" :max-height="300"
-            :header-cell-style="rowClass" border>
+          <el-table
+            ref="productListTable"
+            :data="productList"
+            tooltip-effect="dark"
+            :max-height="300"
+            :header-cell-style="rowClass"
+            border
+          >
             <el-table-column label="序号" type="index" width="50">
             </el-table-column>
-            <el-table-column v-if="isIds" minWidth="150" label="入库单号" prop="bizNo" align="center"
-              :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="仓库" prop="warehouseName" :show-overflow-tooltip="true">
-            </el-table-column>
-            <el-table-column label="编码" prop="categoryCode" align="center"
-              :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="名称" align="center" prop="categoryName"
-              :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column v-if="clientEnvironmentId == 4" label="级别" prop="level" align="center">
-            </el-table-column>
-            <el-table-column label="型号" align="center" prop="categoryModel"
-              :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="规格" align="center" prop="specification"
-              :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="牌号" align="center" prop="brandNum" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column v-for="(item, index) in newColumns" :label="item.label" :align="item.align"
-              :prop="item.prop" :show-overflow-tooltip="item.showOverflowTooltip"></el-table-column>
-            <el-table-column label="批次号" prop="batchNo" align="center" :show-overflow-tooltip="true">
-            </el-table-column>
-            <el-table-column label="数量" v-if="clientEnvironmentId == 3" prop="packingQuantity" align="center">
+            <el-table-column
+              v-if="isIds"
+              minWidth="150"
+              label="入库单号"
+              prop="bizNo"
+              align="center"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              align="center"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              align="center"
+              prop="categoryName"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 4"
+              label="级别"
+              prop="level"
+              align="center"
+            >
+            </el-table-column>
+            <el-table-column
+              label="型号"
+              align="center"
+              prop="categoryModel"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="规格"
+              align="center"
+              prop="specification"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="牌号"
+              align="center"
+              prop="brandNum"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              v-for="(item, index) in newColumns"
+              :label="item.label"
+              :align="item.align"
+              :prop="item.prop"
+              :show-overflow-tooltip="item.showOverflowTooltip"
+            ></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="数量"
+              v-if="clientEnvironmentId == 3"
+              prop="packingQuantity"
+              align="center"
+            >
               <template slot-scope="{ row, $index }">
                 {{ row.packingQuantity }} {{ row.packingUnit }}
               </template>
             </el-table-column>
-            <el-table-column v-else label="数量" prop="packingQuantity" width="80"></el-table-column>
-            <el-table-column v-if="clientEnvironmentId == 3" label="最小包装单元" align="center" width="120"
-              prop="minPackingQuantity">
+            <el-table-column
+              v-else
+              label="数量"
+              prop="packingQuantity"
+              width="80"
+            ></el-table-column>
+            <el-table-column
+              v-if="clientEnvironmentId == 3"
+              label="最小包装单元"
+              align="center"
+              width="120"
+              prop="minPackingQuantity"
+            >
               <template slot-scope="{ row, $index }">
                 {{ row.minPackingQuantity }} {{ row.measureUnit }} /{{
                   row.packingUnit
                 }}
               </template>
             </el-table-column>
-            <el-table-column v-else label="单位" prop="packingUnit"></el-table-column>
-            <el-table-column label="计量数量" prop="measureQuantity" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="计量单位" prop="measureUnit"></el-table-column>
-            <el-table-column label="重量" prop="weight" align="center" :show-overflow-tooltip="true">
+            <el-table-column
+              v-else
+              label="单位"
+              prop="packingUnit"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+            ></el-table-column>
+            <el-table-column
+              label="重量"
+              prop="weight"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="重量单位" prop="weightUnit" align="center" :show-overflow-tooltip="true">
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              align="center"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
             <el-table-column label="单价" prop="unitPrice" align="center">
               <template slot-scope="{ row }">
@@ -165,88 +253,252 @@
               </template>
             </el-table-column>
 
-            <el-table-column label="金额" align="center" prop="totalMoney" :show-overflow-tooltip="true">
+            <el-table-column
+              label="金额"
+              align="center"
+              prop="totalMoney"
+              :show-overflow-tooltip="true"
+            >
               <template slot-scope="{ row, $index }">
                 {{ row.totalMoney ? row.totalMoney : 0 }}
               </template>
             </el-table-column>
-            <el-table-column v-if="clientEnvironmentId == 4" label="采购原因" align="center" prop="purpose"
-              :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="供应商" prop="supplierName" :show-overflow-tooltip="true">
+            <el-table-column
+              v-if="clientEnvironmentId == 4"
+              label="采购原因"
+              align="center"
+              prop="purpose"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="供应商"
+              prop="supplierName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="供应商代号"
+              prop="supplierCode"
+              width="120"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="供应商代号" prop="supplierCode" width="120" :show-overflow-tooltip="true">
+            <el-table-column
+              label="产地"
+              prop="provenance"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="产地" prop="provenance" :show-overflow-tooltip="true">
+            <el-table-column
+              label="生产日期"
+              prop="detailProductionDate"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <!-- <el-table-column
-              label="仓库"
-              prop="warehouseName"
+            <el-table-column
+              label="采购日期"
+              prop="detailPurchaseDate"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="失效日期"
+              prop="detailExpireDate"
               :show-overflow-tooltip="true"
             >
-            </el-table-column> -->
+            </el-table-column>
           </el-table>
         </div>
         <div class="mt20">
           <header-title :title="`包装明细`" size="16px"></header-title>
-          <el-table ref="showPackingListTable" :data="showPackingList" tooltip-effect="dark" :max-height="300"
-            :row-class-name="tableRowClassName" :header-cell-style="rowClass" border
-            v-el-table-infinite-scroll="pickingHandleScroll">
+          <el-table
+            ref="showPackingListTable"
+            :data="showPackingList"
+            tooltip-effect="dark"
+            :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">
             </el-table-column>
-            <el-table-column label="批次号" prop="batchNo" width="80" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="包装编码" prop="packageNo" width="130" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="名称" prop="categoryName" width="120" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="编码" prop="categoryCode" width="120" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="型号" prop="categoryModel" width="80" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="规格" prop="specification" width="80" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="牌号" prop="brandNum" width="80" :show-overflow-tooltip="true"></el-table-column>
+            <el-table-column
+              label="批次号"
+              prop="batchNo"
+              width="80"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装编码"
+              prop="packageNo"
+              width="130"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="名称"
+              prop="categoryName"
+              width="120"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="编码"
+              prop="categoryCode"
+              width="120"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="型号"
+              prop="categoryModel"
+              width="80"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="规格"
+              prop="specification"
+              width="80"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="牌号"
+              prop="brandNum"
+              width="80"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
             <!-- <el-table-column label="编码" prop="categoryCode" :show-overflow-tooltip="true"></el-table-column>
             <el-table-column label="名称" prop="categoryName" :show-overflow-tooltip="true"></el-table-column>
             <el-table-column label="批次号" prop="batchNo" :show-overflow-tooltip="true"></el-table-column> -->
-            <el-table-column label="发货条码" prop="barcodes" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="包装数量" prop="packingQuantity" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="包装单位" prop="packingUnit" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="计量数量" prop="measureQuantity" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="计量单位" prop="measureUnit" :show-overflow-tooltip="true"></el-table-column>
-            <el-table-column label="物料代号" prop="materielDesignation" :show-overflow-tooltip="true">
-            </el-table-column>
-            <el-table-column label="客户代号" prop="clientCode" :show-overflow-tooltip="true">
+            <el-table-column
+              label="发货条码"
+              prop="barcodes"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装数量"
+              prop="packingQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="包装单位"
+              prop="packingUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量数量"
+              prop="measureQuantity"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="计量单位"
+              prop="measureUnit"
+              :show-overflow-tooltip="true"
+            ></el-table-column>
+            <el-table-column
+              label="物料代号"
+              prop="materielDesignation"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="客户代号"
+              prop="clientCode"
+              :show-overflow-tooltip="true"
+            >
               <template slot-scope="{ row, $index }">
                 <span v-if="bizType != 2">{{ row?.clientCode }}</span>
                 <span v-if="bizType == 2">{{ row?.customerMark }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="刻码" prop="engrave" :show-overflow-tooltip="true">
+            <el-table-column
+              label="刻码"
+              prop="engrave"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="重量" prop="weight" :show-overflow-tooltip="true">
+            <el-table-column
+              label="重量"
+              prop="weight"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="重量单位" prop="weightUnit" :show-overflow-tooltip="true">
+            <el-table-column
+              label="重量单位"
+              prop="weightUnit"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="供应商" prop="supplierName" :show-overflow-tooltip="true">
+            <el-table-column
+              label="供应商"
+              prop="supplierName"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="供应商代号" prop="supplierCode" width="120" :show-overflow-tooltip="true">
+            <el-table-column
+              label="供应商代号"
+              prop="supplierCode"
+              width="120"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="质检结果" prop="result" :show-overflow-tooltip="true">
+            <el-table-column
+              label="质检结果"
+              prop="result"
+              :show-overflow-tooltip="true"
+            >
               <template slot-scope="{ row }">
                 <span>{{ qualityResults[row.result] }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="质检状态" prop="status" :show-overflow-tooltip="true">
+            <el-table-column
+              label="质检状态"
+              prop="status"
+              :show-overflow-tooltip="true"
+            >
               <template slot-scope="{ row }">
                 <span>{{ qualityStatus[row.status] }}</span>
               </template>
             </el-table-column>
-            <el-table-column label="仓库" prop="warehouseName" :show-overflow-tooltip="true">
+            <el-table-column
+              label="仓库"
+              prop="warehouseName"
+              :show-overflow-tooltip="true"
+            >
+            </el-table-column>
+            <el-table-column
+              label="货区"
+              prop="areaName"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="货区" prop="areaName" :show-overflow-tooltip="true">
+            <el-table-column
+              label="货架"
+              prop="goodsShelfName"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="货架" prop="goodsShelfName" :show-overflow-tooltip="true">
+            <el-table-column
+              label="货位"
+              prop="goodsAllocationName"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="货位" prop="goodsAllocationName" :show-overflow-tooltip="true">
+            <el-table-column
+              label="生产日期"
+              prop="productionDate"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="生产日期" prop="productionDate" :show-overflow-tooltip="true">
+            <el-table-column
+              label="采购日期"
+              prop="purchaseDate"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
-            <el-table-column label="采购日期" prop="purchaseDate" :show-overflow-tooltip="true">
+            <el-table-column
+              label="失效日期"
+              prop="expireDate"
+              :show-overflow-tooltip="true"
+            >
             </el-table-column>
           </el-table>
         </div>
@@ -337,528 +589,528 @@
 </template>
 
 <script>
-import elTableInfiniteScroll from 'el-table-infinite-scroll';
-// import fileUpload from '@/BIZComponents/addDoc/index.vue';
-import { getFile } from '@/api/system/file/index.js';
-import storageApi from '@/api/warehouseManagement';
-import { allCategoryLevel } from '@/api/classifyManage';
-import {
-  useDictLabel,
-  sceneState,
-  qualityStatus,
-  qualityResults
-} from '@/utils/dict/index';
-import { mapGetters, mapActions } from 'vuex';
-export default {
-  directives: {
-    'el-table-infinite-scroll': elTableInfiniteScroll
-  },
-  // components: { fileUpload },
-  props: {
-    bizType: {
-      type: String,
-      default: ''
-    },
-    businessId: {
-      type: String,
-      default: ''
-    },
-    isUpload: {
-      type: Boolean,
-      default: false
-    },
-    isInterior: {
-      type: Boolean,
-      default: false
+  import elTableInfiniteScroll from 'el-table-infinite-scroll';
+  // import fileUpload from '@/BIZComponents/addDoc/index.vue';
+  import { getFile } from '@/api/system/file/index.js';
+  import storageApi from '@/api/warehouseManagement';
+  import { allCategoryLevel } from '@/api/classifyManage';
+  import {
+    useDictLabel,
+    sceneState,
+    qualityStatus,
+    qualityResults
+  } from '@/utils/dict/index';
+  import { mapGetters, mapActions } from 'vuex';
+  export default {
+    directives: {
+      'el-table-infinite-scroll': elTableInfiniteScroll
     },
-    isIds: {
-      //多个入库单ID
-      type: Boolean,
-      default: false
-    }
-  },
-  data() {
-    return {
-      newColumns: [], // 动态表头
-      qualityFile: [], // 回执附件
-      qualityStatus, // 质检状态 0未检 1已检
-      qualityResults, // 质检结果 0无 1合格 2不合格
-      productList: [], // 产品列表
-      showPackingList: [], // 展示的包装列表
-      packingList: [], // 包装列表
-      showMaterialList: [], // 展示物料列表
-      materialList: [], // 物料列表
-      extInfo: {}, // 扩展信息
-      pageSize: 20,
-      pickingPageNum: 1,
-      materielPageNum: 1,
-      codeList: [],
-      infoData: {},
-      stepsTitle: '已完成',
-      stepsStatus: 'success',
-      active: 0
-    };
-  },
-  watch: {
-    'infoData.verifyStatus': {
-      immediate: true,
-      handler(val) {
-        if (val == 0) {
-          this.active = 1;
-          this.stepsTitle = '未审核';
-          this.stepsStatus = 'wait';
-        } else if (val == 1) {
-          this.active = 2;
-          this.stepsTitle = '审核中';
-          this.stepsStatus = 'process';
-        } else if (val == 2) {
-          this.active = 2;
-          this.stepsTitle = '审核通过';
-          this.stepsStatus = 'success';
-        } else if (val == 3) {
-          this.active = 2;
-          this.stepsTitle = '驳回';
-          this.stepsStatus = 'error';
-        }
+    // components: { fileUpload },
+    props: {
+      bizType: {
+        type: String,
+        default: ''
+      },
+      businessId: {
+        type: String,
+        default: ''
+      },
+      isUpload: {
+        type: Boolean,
+        default: false
+      },
+      isInterior: {
+        type: Boolean,
+        default: false
+      },
+      isIds: {
+        //多个入库单ID
+        type: Boolean,
+        default: false
       }
     },
-    businessId(val) {
-      if (val) {
-        this._getInfo(val);
-      }
-    }
-  },
-  computed: {
-    ...mapGetters(['getDictValue']),
-    clientEnvironmentId() {
-      return this.$store.state.user.info.clientEnvironmentId;
-    }
-  },
-  mounted() {
-    this.getFieldModel();
-    this.requestDict('类型用途');
-    this.getAllCategoryType();
-    this._getInfo(this.businessId);
-  },
-  methods: {
-    // 获取动态表头
-    getFieldModel() {
-      storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
-        let newRes = res.map((m) => {
-          return {
-            prop: 'extField.' + m.prop,
-            label: m.label,
-            align: 'center',
-            showOverflowTooltip: true
-          };
-        });
-        this.newColumns = [...newRes];
-      });
-    },
-    //获取回执附件
-    getQualityFile() {
-      return { qualityFile: this.qualityFile, id: this.infoData.id };
+    data() {
+      return {
+        newColumns: [], // 动态表头
+        qualityFile: [], // 回执附件
+        qualityStatus, // 质检状态 0未检 1已检
+        qualityResults, // 质检结果 0无 1合格 2不合格
+        productList: [], // 产品列表
+        showPackingList: [], // 展示的包装列表
+        packingList: [], // 包装列表
+        showMaterialList: [], // 展示物料列表
+        materialList: [], // 物料列表
+        extInfo: {}, // 扩展信息
+        pageSize: 20,
+        pickingPageNum: 1,
+        materielPageNum: 1,
+        codeList: [],
+        infoData: {},
+        stepsTitle: '已完成',
+        stepsStatus: 'success',
+        active: 0
+      };
     },
-    pickingHandleScroll() {
-      console.log('---------pickingHandleScroll------------');
-      if (this.showPackingList.length < this.packingList.length) {
-        if (this.packingList.length > this.pageSize) {
-          this.pickingPageNum += 1;
+    watch: {
+      'infoData.verifyStatus': {
+        immediate: true,
+        handler(val) {
+          if (val == 0) {
+            this.active = 1;
+            this.stepsTitle = '未审核';
+            this.stepsStatus = 'wait';
+          } else if (val == 1) {
+            this.active = 2;
+            this.stepsTitle = '审核中';
+            this.stepsStatus = 'process';
+          } else if (val == 2) {
+            this.active = 2;
+            this.stepsTitle = '审核通过';
+            this.stepsStatus = 'success';
+          } else if (val == 3) {
+            this.active = 2;
+            this.stepsTitle = '驳回';
+            this.stepsStatus = 'error';
+          }
         }
-        this.pickingFetchData();
-      }
-    },
-    pickingFetchData() {
-      const start = (this.pickingPageNum - 1) * this.pageSize;
-      const end = start + this.pageSize;
-      this.showPackingList = this.showPackingList.concat(
-        this.packingList.slice(start, end)
-      );
-    },
-    materielHandleScroll() {
-      console.log('---------materielHandleScroll------------');
-      if (this.showMaterialList.length < this.materialList.length) {
-        if (this.materialList.length > this.pageSize) {
-          this.materielPageNum += 1;
+      },
+      businessId(val) {
+        if (val) {
+          this._getInfo(val);
         }
-        this.materielFetchData();
-      }
-    },
-    materielFetchData() {
-      const start = (this.materielPageNum - 1) * this.pageSize;
-      const end = start + this.pageSize;
-      this.showMaterialList = this.showMaterialList.concat(
-        this.materialList.slice(start, end)
-      );
-      console.log(this.showMaterialList);
-    },
-    ...mapActions('dict', ['requestDict']),
-    getSceneState: useDictLabel(sceneState),
-    handleAssetType(r) {
-      const code = this.codeList.find((item) => item.dictCode == r);
-      return code?.dictValue;
-    },
-    tableRowClassName({ row, rowIndex }) {
-      console.log(row);
-      if (row.result == 2) {
-        return 'warning-row';
-      } else {
-        return '';
       }
     },
-    rowClass({ row, column, rowIndex, columnIndex }) {
-      if (rowIndex === 1) {
-        return {
-          display: 'none',
-          background: '#EEEEEE'
-        };
+    computed: {
+      ...mapGetters(['getDictValue']),
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
-      return { background: '#0000' };
     },
-    async getAllCategoryType() {
-      const { data } = await allCategoryLevel();
-      this.codeList = data.map((item) => {
-        return { dictCode: item.id, dictValue: item.name };
-      });
+    mounted() {
+      this.getFieldModel();
+      this.requestDict('类型用途');
+      this.getAllCategoryType();
+      this._getInfo(this.businessId);
     },
-    async _getInfo(id) {
-      if (!id) return;
-      let res = null;
-      let resAll = null;
-      if (this.isInterior) {
-        res = await storageApi.getInboundDetailsById(id);
-      } else if (this.isIds) {
-        resAll = await storageApi.getInboundDetailsByIds(id);
-      } else {
-        res = await storageApi.getInfoBySourceBizNo(id);
-      }
-      console.log(
-        'idsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss',
-        this.isIds
-      );
-      if (this.isIds) {
-        res = JSON.parse(JSON.stringify(resAll[0]));
-        this.extInfo = resAll[0].extInfo;
-        res['outInDetailList']=[]
-          resAll.forEach(item=>{
-            item.outInDetailList.forEach(val=>{
-              val['bizNo']=item.bizNo
-              res['outInDetailList'].push(val)
-            })
-          })
-          res['bizNo'] = resAll.map((item) => item.bizNo);
-          this.infoData = res;
-        console.log('resAll---------------', resAll);
-      } else {
-        this.infoData = res;
-        this.extInfo = res.extInfo;
-        console.log(
-          res,
-          'resresresresresresresresresresresresresresresresresresresresres2222'
+    methods: {
+      // 获取动态表头
+      getFieldModel() {
+        storageApi.fieldModel({ fieldModel: 't_main_category' }).then((res) => {
+          let newRes = res.map((m) => {
+            return {
+              prop: 'extField.' + m.prop,
+              label: m.label,
+              align: 'center',
+              showOverflowTooltip: true
+            };
+          });
+          this.newColumns = [...newRes];
+        });
+      },
+      //获取回执附件
+      getQualityFile() {
+        return { qualityFile: this.qualityFile, id: this.infoData.id };
+      },
+      pickingHandleScroll() {
+        console.log('---------pickingHandleScroll------------');
+        if (this.showPackingList.length < this.packingList.length) {
+          if (this.packingList.length > this.pageSize) {
+            this.pickingPageNum += 1;
+          }
+          this.pickingFetchData();
+        }
+      },
+      pickingFetchData() {
+        const start = (this.pickingPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showPackingList = this.showPackingList.concat(
+          this.packingList.slice(start, end)
         );
-      }
-      console.log('===', res);
-
-      this.productList = res.outInDetailList.map(
-        (productItem, productIndex) => {
-          // if (this.isIds) {
-          //   productItem['bizNo'] = res.bizNo[productIndex];
-          // }
+      },
+      materielHandleScroll() {
+        console.log('---------materielHandleScroll------------');
+        if (this.showMaterialList.length < this.materialList.length) {
+          if (this.materialList.length > this.pageSize) {
+            this.materielPageNum += 1;
+          }
+          this.materielFetchData();
+        }
+      },
+      materielFetchData() {
+        const start = (this.materielPageNum - 1) * this.pageSize;
+        const end = start + this.pageSize;
+        this.showMaterialList = this.showMaterialList.concat(
+          this.materialList.slice(start, end)
+        );
+        console.log(this.showMaterialList);
+      },
+      ...mapActions('dict', ['requestDict']),
+      getSceneState: useDictLabel(sceneState),
+      handleAssetType(r) {
+        const code = this.codeList.find((item) => item.dictCode == r);
+        return code?.dictValue;
+      },
+      tableRowClassName({ row, rowIndex }) {
+        console.log(row);
+        if (row.result == 2) {
+          return 'warning-row';
+        } else {
+          return '';
+        }
+      },
+      rowClass({ row, column, rowIndex, columnIndex }) {
+        if (rowIndex === 1) {
           return {
-            ...productItem,
-            outInDetailRecordRequestList:
-              productItem.outInDetailRecordRequestList.map((packingItem) => {
-                return {
-                  ...packingItem,
-                  categoryName: productItem.categoryName,
-                  categoryCode: productItem.categoryCode,
-                  supplierCode: productItem.supplierCode,
-                  supplierName: productItem.supplierName,
-                  materialDetailList: packingItem.materialDetailList.map(
-                    (materialItem) => {
-                      return {
-                        ...materialItem,
-                        categoryName: productItem.categoryName,
-                        categoryCode: productItem.categoryCode
-                      };
-                    }
-                  )
-                };
-              })
+            display: 'none',
+            background: '#EEEEEE'
           };
         }
-      );
-      // 获取包装维度数据
-      const arr = [];
-      for (const key in this.productList) {
-        for (const k in this.productList[key].outInDetailRecordRequestList) {
-          arr.push({
-            ...this.productList[key].outInDetailRecordRequestList[k]
+        return { background: '#0000' };
+      },
+      async getAllCategoryType() {
+        const { data } = await allCategoryLevel();
+        this.codeList = data.map((item) => {
+          return { dictCode: item.id, dictValue: item.name };
+        });
+      },
+      async _getInfo(id) {
+        if (!id) return;
+        let res = null;
+        let resAll = null;
+        if (this.isInterior) {
+          res = await storageApi.getInboundDetailsById(id);
+        } else if (this.isIds) {
+          resAll = await storageApi.getInboundDetailsByIds(id);
+        } else {
+          res = await storageApi.getInfoBySourceBizNo(id);
+        }
+        console.log(
+          'idsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss',
+          this.isIds
+        );
+        if (this.isIds) {
+          res = JSON.parse(JSON.stringify(resAll[0]));
+          this.extInfo = resAll[0].extInfo;
+          res['outInDetailList'] = [];
+          resAll.forEach((item) => {
+            item.outInDetailList.forEach((val) => {
+              val['bizNo'] = item.bizNo;
+              res['outInDetailList'].push(val);
+            });
           });
+          res['bizNo'] = resAll.map((item) => item.bizNo);
+          this.infoData = res;
+          console.log('resAll---------------', resAll);
+        } else {
+          this.infoData = res;
+          this.extInfo = res.extInfo;
+          console.log(
+            res,
+            'resresresresresresresresresresresresresresresresresresresresres2222'
+          );
         }
-      }
-      this.packingList = arr;
-      // 获取物料维度数据
-      let iArr = [];
-      arr.forEach((item) => {
-        item.materialDetailList.forEach((ele) => {
-          iArr.push({ ...ele });
+        console.log('===', res);
+
+        this.productList = res.outInDetailList.map(
+          (productItem, productIndex) => {
+            // if (this.isIds) {
+            //   productItem['bizNo'] = res.bizNo[productIndex];
+            // }
+            return {
+              ...productItem,
+              outInDetailRecordRequestList:
+                productItem.outInDetailRecordRequestList.map((packingItem) => {
+                  return {
+                    ...packingItem,
+                    categoryName: productItem.categoryName,
+                    categoryCode: productItem.categoryCode,
+                    supplierCode: productItem.supplierCode,
+                    supplierName: productItem.supplierName,
+                    materialDetailList: packingItem.materialDetailList.map(
+                      (materialItem) => {
+                        return {
+                          ...materialItem,
+                          categoryName: productItem.categoryName,
+                          categoryCode: productItem.categoryCode
+                        };
+                      }
+                    )
+                  };
+                })
+            };
+          }
+        );
+        // 获取包装维度数据
+        const arr = [];
+        for (const key in this.productList) {
+          for (const k in this.productList[key].outInDetailRecordRequestList) {
+            arr.push({
+              ...this.productList[key].outInDetailRecordRequestList[k]
+            });
+          }
+        }
+        this.packingList = arr;
+        // 获取物料维度数据
+        let iArr = [];
+        arr.forEach((item) => {
+          item.materialDetailList.forEach((ele) => {
+            iArr.push({ ...ele });
+          });
         });
-      });
-      this.materialList = iArr;
-      console.log(this.packingList);
-      console.log(this.materialList);
-      this.pickingFetchData();
-      this.materielFetchData();
-      console.log(this.productList, 'this.productList')
-    },
-    download(row) {
-      if (row.storePath) {
-        getFile({ objectName: row.storePath }, row.name);
+        this.materialList = iArr;
+        console.log(this.packingList);
+        console.log(this.materialList);
+        this.pickingFetchData();
+        this.materielFetchData();
+        console.log(this.productList, 'this.productList');
+      },
+      download(row) {
+        if (row.storePath) {
+          getFile({ objectName: row.storePath }, row.name);
+        }
       }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-::v-deep .warning-row {
-  color: red;
-}
-
-::v-deep .page-title {
-  border-bottom: none;
-}
-
-::v-deep .page-title-div {
-  width: 100%;
-}
-
-.stepsStatus {
-  width: 40%;
-  margin: 0 auto;
-}
-
-.el-form-item {
-  margin-bottom: 10px;
-}
-
-.p20 {
-  padding: 20px;
-}
-
-.flex {
-  display: flex;
-}
-
-.title {
-  justify-content: space-between;
-  border-bottom: 1px solid #ccc;
-  padding-bottom: 5px;
-
-  span {
-    font-size: 16px;
+  ::v-deep .warning-row {
+    color: red;
   }
 
-  .col {
-    padding-left: 40px;
-    font-size: 14px;
-    color: #aaaaaa;
+  ::v-deep .page-title {
+    border-bottom: none;
   }
-}
-
-.degree {
-  margin-right: 10px;
-  padding: 0px 15px;
-  color: #fff;
-  font-size: 13px;
-  line-height: 23px;
-  border-radius: 23px;
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-
-  span {
-    width: 5px;
-    height: 5px;
-    border-radius: 100%;
-    margin-right: 6px;
-    background-color: #fff;
+
+  ::v-deep .page-title-div {
+    width: 100%;
   }
-}
 
-.red {
-  background-color: rgb(163, 0, 20);
-}
+  .stepsStatus {
+    width: 40%;
+    margin: 0 auto;
+  }
 
-.blue {
-  background-color: #1989fa;
-}
+  .el-form-item {
+    margin-bottom: 10px;
+  }
 
-.createdInfo {
-  justify-content: space-around;
-  margin-top: 10px;
-  font-size: 14px;
+  .p20 {
+    padding: 20px;
+  }
 
-  .col {
-    color: #6e6e6e;
-    padding-right: 10px;
+  .flex {
+    display: flex;
   }
-}
-
-.mt40 {
-  margin-top: 40px;
-}
-
-.custSteps {
-  margin-top: 20px;
-  margin-left: 70px;
-
-  .box {
-    width: 158px;
-    border: 1px solid #ccc;
-    padding: 10px;
-    flex-direction: row;
-    flex-wrap: wrap;
-    // justify-content: space-between;
-    font-size: 12px;
-    color: #9e9e9e;
-
-    .x {
-      width: 20px;
-      height: 15px;
-      margin-right: 5px;
-    }
 
-    .q {
-      background-color: #d0e4d5;
-    }
+  .title {
+    justify-content: space-between;
+    border-bottom: 1px solid #ccc;
+    padding-bottom: 5px;
 
-    .b {
-      background-color: #1989fa;
+    span {
+      font-size: 16px;
     }
 
-    .g {
-      background-color: #157a2c;
+    .col {
+      padding-left: 40px;
+      font-size: 14px;
+      color: #aaaaaa;
     }
+  }
 
-    .r {
-      background-color: #a30014;
-    }
+  .degree {
+    margin-right: 10px;
+    padding: 0px 15px;
+    color: #fff;
+    font-size: 13px;
+    line-height: 23px;
+    border-radius: 23px;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
 
-    .a {
-      align-items: center;
-      margin-bottom: 10px;
+    span {
+      width: 5px;
+      height: 5px;
+      border-radius: 100%;
+      margin-right: 6px;
+      background-color: #fff;
     }
+  }
 
-    .mr10 {
-      margin-right: 10px;
-    }
+  .red {
+    background-color: rgb(163, 0, 20);
+  }
+
+  .blue {
+    background-color: #1989fa;
+  }
+
+  .createdInfo {
+    justify-content: space-around;
+    margin-top: 10px;
+    font-size: 14px;
 
-    .mb0 {
-      margin-bottom: 0;
+    .col {
+      color: #6e6e6e;
+      padding-right: 10px;
     }
   }
 
-  .stepsInfo {
-    // flex: 1;
-    width: 483px;
+  .mt40 {
+    margin-top: 40px;
   }
-}
 
-.mt20 {
-  margin-top: 20px;
-}
+  .custSteps {
+    margin-top: 20px;
+    margin-left: 70px;
+
+    .box {
+      width: 158px;
+      border: 1px solid #ccc;
+      padding: 10px;
+      flex-direction: row;
+      flex-wrap: wrap;
+      // justify-content: space-between;
+      font-size: 12px;
+      color: #9e9e9e;
+
+      .x {
+        width: 20px;
+        height: 15px;
+        margin-right: 5px;
+      }
 
-.content-detail {
-  overflow: hidden;
-}
+      .q {
+        background-color: #d0e4d5;
+      }
 
-.executor {
-  font-size: 14px;
+      .b {
+        background-color: #1989fa;
+      }
 
-  .col {
-    color: #6e6e6e;
-    padding-right: 10px;
+      .g {
+        background-color: #157a2c;
+      }
+
+      .r {
+        background-color: #a30014;
+      }
+
+      .a {
+        align-items: center;
+        margin-bottom: 10px;
+      }
+
+      .mr10 {
+        margin-right: 10px;
+      }
+
+      .mb0 {
+        margin-bottom: 0;
+      }
+    }
+
+    .stepsInfo {
+      // flex: 1;
+      width: 483px;
+    }
   }
-}
 
-.result {
-  justify-content: space-around;
-}
+  .mt20 {
+    margin-top: 20px;
+  }
 
-.mr20 {
-  margin-right: 20px;
-}
+  .content-detail {
+    overflow: hidden;
+  }
+
+  .executor {
+    font-size: 14px;
 
-.details {
-  font-size: 14px;
-  margin-bottom: 10px;
-}
+    .col {
+      color: #6e6e6e;
+      padding-right: 10px;
+    }
+  }
 
-.customSteps {
-  margin-top: 40px;
-  font-size: 14px;
-  margin-left: 80px;
+  .result {
+    justify-content: space-around;
+  }
 
-  .time {
-    font-size: 12px;
-    color: #6e6e6e;
+  .mr20 {
     margin-right: 20px;
-    position: relative;
+  }
 
-    &::after {
-      content: '';
-      width: 1px;
-      height: 100%;
-      background-color: #157a2c;
-      position: absolute;
-      right: -26px;
-    }
+  .details {
+    font-size: 14px;
+    margin-bottom: 10px;
   }
 
-  .flex:last-child {
+  .customSteps {
+    margin-top: 40px;
+    font-size: 14px;
+    margin-left: 80px;
+
     .time {
+      font-size: 12px;
+      color: #6e6e6e;
+      margin-right: 20px;
+      position: relative;
+
       &::after {
-        display: none;
+        content: '';
+        width: 1px;
+        height: 100%;
+        background-color: #157a2c;
+        position: absolute;
+        right: -26px;
       }
     }
-  }
 
-  .round {
-    margin-right: 20px;
-    width: 10px;
-    height: 10px;
-    border-radius: 100%;
-    background-color: #157a2c;
-    position: relative;
+    .flex:last-child {
+      .time {
+        &::after {
+          display: none;
+        }
+      }
+    }
 
-    span {
-      position: absolute;
-      top: 50%;
-      left: 50%;
-      width: 4px;
-      height: 4px;
-      background-color: #fff;
+    .round {
+      margin-right: 20px;
+      width: 10px;
+      height: 10px;
       border-radius: 100%;
-      transform: translate(-2px, -2px);
+      background-color: #157a2c;
+      position: relative;
+
+      span {
+        position: absolute;
+        top: 50%;
+        left: 50%;
+        width: 4px;
+        height: 4px;
+        background-color: #fff;
+        border-radius: 100%;
+        transform: translate(-2px, -2px);
+      }
     }
-  }
 
-  .text {
-    .info {
-      margin-top: 10px;
-      width: 955px;
-      background-color: #f0f3f3;
-      overflow: hidden;
-      padding: 10px;
-      margin-bottom: 10px;
+    .text {
+      .info {
+        margin-top: 10px;
+        width: 955px;
+        background-color: #f0f3f3;
+        overflow: hidden;
+        padding: 10px;
+        margin-bottom: 10px;
+      }
     }
   }
-}
 
-.switch_left li {
-  border-right: 1px solid rgba(222, 222, 222, 1);
-  border-left: 1px solid rgba(222, 222, 222, 1);
-}
+  .switch_left li {
+    border-right: 1px solid rgba(222, 222, 222, 1);
+    border-left: 1px solid rgba(222, 222, 222, 1);
+  }
 </style>

+ 168 - 19
src/views/bpm/stockManagement/storage.vue

@@ -557,6 +557,73 @@
                   }}
                 </template>
               </el-table-column>
+              <el-table-column
+                align="center"
+                label="生产日期"
+                prop="detailProductionDate"
+                width="220"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template v-if="row.isSave">
+                    {{ row.detailProductionDate }}
+                  </template>
+                  <el-date-picker
+                    v-else
+                    :disabled="row.isPack"
+                    size="small"
+                    v-model="row.detailProductionDate"
+                    type="datetime"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker
+                ></template>
+              </el-table-column>
+
+              <el-table-column
+                align="center"
+                label="采购日期"
+                prop="detailPurchaseDate"
+                width="220"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template v-if="row.isSave">
+                    {{ row.detailPurchaseDate }}
+                  </template>
+                  <el-date-picker
+                    v-else
+                    :disabled="row.isPack"
+                    size="small"
+                    v-model="row.detailPurchaseDate"
+                    type="datetime"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker
+                ></template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                label="失效日期"
+                prop="detailExpireDate"
+                width="220"
+              >
+                <template slot-scope="{ row, $index }">
+                  <template v-if="row.isSave">
+                    {{ row.detailExpireDate }}
+                  </template>
+                  <el-date-picker
+                    v-else
+                    :disabled="row.isPack"
+                    size="small"
+                    v-model="row.detailExpireDate"
+                    type="datetime"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    placeholder="选择日期"
+                  >
+                  </el-date-picker
+                ></template>
+              </el-table-column>
               <el-table-column
                 label="操作"
                 width="200"
@@ -592,10 +659,20 @@
             <el-button
               style="margin-left: 20px"
               type="text"
-              @click="dateSetting"
-              >批量设置{{
-                curDateType === 'productionDate' ? '生产日期' : '采购日期'
-              }}</el-button
+              @click="dateSetting('productionDate')"
+              >批量设置生产日期</el-button
+            >
+            <el-button
+              style="margin-left: 20px"
+              type="text"
+              @click="dateSetting('purchaseDate')"
+              >批量设置采购日期</el-button
+            >
+            <el-button
+              style="margin-left: 20px"
+              type="text"
+              @click="dateSetting('expireDate')"
+              >批量设置失效日期</el-button
             >
           </div>
         </header-title>
@@ -823,7 +900,61 @@
               }}
             </template>
           </el-table-column>
-          <el-table-column label="生产日期" prop="" width="220">
+          <template v-if="formData.bizType == 5">
+            <el-table-column
+              label="生产日期"
+              prop="productionDate"
+              width="220"
+            ></el-table-column>
+            <el-table-column
+              label="采购日期"
+              prop="purchaseDate"
+              width="220"
+            ></el-table-column>
+          </template>
+          <template v-else>
+            <el-table-column label="生产日期" prop="productionDate" width="220">
+              <template slot-scope="{ row, $index }">
+                <el-date-picker
+                  :disabled="row.isPack"
+                  size="small"
+                  v-model="row.productionDate"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="选择日期"
+                >
+                </el-date-picker
+              ></template>
+            </el-table-column>
+
+            <el-table-column label="采购日期" prop="purchaseDate" width="220">
+              <template slot-scope="{ row, $index }">
+                <el-date-picker
+                  :disabled="row.isPack"
+                  size="small"
+                  v-model="row.purchaseDate"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="选择日期"
+                >
+                </el-date-picker
+              ></template>
+            </el-table-column>
+            <el-table-column label="失效日期" prop="expireDate" width="220">
+              <template slot-scope="{ row, $index }">
+                <el-date-picker
+                  :disabled="row.isPack"
+                  size="small"
+                  v-model="row.expireDate"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="选择日期"
+                >
+                </el-date-picker
+              ></template>
+            </el-table-column>
+          </template>
+          <!-- <el-table-column label="生产日期" prop="" width="220">
             <template slot="header" slot-scope="scope">
               <el-select filterable v-model="curDateType">
                 <el-option value="productionDate" label="生产日期"></el-option>
@@ -845,7 +976,7 @@
               >
               </el-date-picker>
             </template>
-          </el-table-column>
+          </el-table-column> -->
 
           <!-- <el-table-column label="操作" width="120" fixed="right">
             <template slot-scope="{ row, $index }">
@@ -945,7 +1076,12 @@
       @selection="wareHouseSelection"
     ></WarehousingDialog>
     <!-- 生产日期、采购日期弹框 -->
-    <el-dialog :visible.sync="dateVisible" title="选择日期" width="400px">
+    <el-dialog
+      :visible.sync="dateVisible"
+      title="选择日期"
+      width="400px"
+      append-to-body
+    >
       <el-date-picker
         size="small"
         v-model="batchTime"
@@ -1280,7 +1416,17 @@
         // this.formData.extInfo.supplierName = this.form.supplierName;
         // this.formData.extInfo.supplierId = this.form.supplierId;
         console.log('saleProductList-------------------', this.saleProductList);
+       
         if (this.saleProductList?.length > 0) {
+          let detailPurchaseDate;
+          if (this.formData.bizType == '2' || this.formData.bizType == '10') {
+            // 采购入库
+            const defaultTime = '00:00:00';
+            detailPurchaseDate =
+              this.form.purchaseDate ||
+              `${this.form.receiveDate} ${defaultTime}`;
+          }
+
           // 物品列表
           let codeList = this.saleProductList.map((item) => {
             return item.productCode;
@@ -1408,6 +1554,8 @@
                 unitPrice: item.unitPrice || unitPrice, // 单价
                 pricingWay: pricingWay, //计价方式
                 purpose: '', // 用途
+                detailPurchaseDate,
+                detailExpireDate:this.saleProductList.find(product=>product.productId==item.id)?.guaranteePeriodDeadline,
                 // provenance:filtersItem.provenance,//产地
                 isUnpack: item.isUnpack, // 是否允许拆包
                 warehouseId, // 仓库id
@@ -1716,14 +1864,14 @@
               if (this.formData.bizType == '1') {
                 // 生产入库
                 productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
-                this.curDateType = 'productionDate';
+                // this.curDateType = 'productionDate';
               } else if (this.formData.bizType == '2') {
                 // 采购入库
                 const defaultTime = '00:00:00';
                 purchaseDate =
                   this.form.purchaseDate ||
                   `${this.form.receiveDate} ${defaultTime}`;
-                this.curDateType = 'purchaseDate';
+                // this.curDateType = 'purchaseDate';
               }
 
               let clientCode = '';
@@ -3131,8 +3279,10 @@
         console.log('计量单位----', row.measureUnit);
         let packingList = [];
         let obj = this.getNowDate();
-        let productionDate = '';
-        let purchaseDate = '';
+        let productionDate = row.detailProductionDate || '';
+        let purchaseDate = row.detailPurchaseDate || '';
+        let expireDate = row.detailExpireDate || '';
+        console.log(expireDate, 'expireDate');
         console.log(
           this.formData.bizType,
           'bizTypebizTypebizTypebizTypebizTypebizTypebizTypebizTypebizTypebizTypebizType'
@@ -3140,13 +3290,7 @@
         if (this.formData.bizType == '1') {
           // 生产入库
           productionDate = `${obj.year}-${obj.month}-${obj.strDate} ${obj.hour}:${obj.minute}:${obj.second}`;
-          this.curDateType = 'productionDate';
-        } else if (this.formData.bizType == '2') {
-          // 采购入库
-          const defaultTime = '00:00:00';
-          purchaseDate =
-            this.form.purchaseDate || `${this.form.receiveDate} ${defaultTime}`;
-          this.curDateType = 'purchaseDate';
+          // this.curDateType = 'productionDate';
         }
 
         // 判断单位和计量单位是否为不拆物料层规格
@@ -3261,6 +3405,8 @@
               isUnpack: row.isUnpack, // 是否允许拆包
               productionDate: productionDate, // 生产日期
               purchaseDate: purchaseDate, // 采购时间
+              expireDate: expireDate, //失效日期
+
               result: 1, // 结果(1合格 2不合格)
               qualityControl: row.qualityControl,
               status: status // 状态(0=未质检 1待检 2已检)
@@ -3460,6 +3606,8 @@
               isUnpack: row.isUnpack, // 是否允许拆包
               productionDate: productionDate, // 生产日期
               purchaseDate: purchaseDate, // 采购时间
+              expireDate: expireDate, //失效日期
+
               result: 1, // 结果(1合格 2不合格)
               qualityControl: row.qualityControl,
               status: status // 状态(0=未质检 1待检 2已检)
@@ -3641,10 +3789,11 @@
         return materialList;
       },
       // 设置时间
-      dateSetting() {
+      dateSetting(curDateType) {
         if (!this.packingListSelected.length) {
           return this.$message.error(`请选择${this.title}明细!`);
         }
+        this.curDateType = curDateType;
         this.dateVisible = true;
       },
       // 选择包装列表