|
|
@@ -162,6 +162,33 @@
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
>
|
|
|
<template v-slot:toolbar>
|
|
|
+ <el-button
|
|
|
+ v-if="productList.length != 0"
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ style="float: right; margin-right: 20px"
|
|
|
+ size="mini"
|
|
|
+ @click="dateSetting('detailExpireDate', 'productList')"
|
|
|
+ >批量设置失效日期</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="productList.length != 0"
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ style="float: right; margin-right: 20px"
|
|
|
+ size="mini"
|
|
|
+ @click="dateSetting('detailPurchaseDate', 'productList')"
|
|
|
+ >批量设置采购日期</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="productList.length != 0"
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ style="float: right; margin-right: 20px"
|
|
|
+ size="mini"
|
|
|
+ @click="dateSetting('detailProductionDate', 'productList')"
|
|
|
+ >批量设置生产日期</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
v-if="productList.length != 0"
|
|
|
type="success"
|
|
|
@@ -2533,9 +2560,15 @@
|
|
|
},
|
|
|
// 日期选择
|
|
|
dateConfirm() {
|
|
|
- this.packingListSelected.forEach((item) => {
|
|
|
- this.$set(item, this.curDateType, this.batchTime);
|
|
|
- });
|
|
|
+ if(this.listType == 'productList') {
|
|
|
+ this.productList.forEach((item) => {
|
|
|
+ this.$set(item, this.curDateType, this.batchTime);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.packingListSelected.forEach((item) => {
|
|
|
+ this.$set(item, this.curDateType, this.batchTime);
|
|
|
+ });
|
|
|
+ }
|
|
|
this.batchTime = '';
|
|
|
this.dateVisible = false;
|
|
|
},
|
|
|
@@ -3681,11 +3714,12 @@
|
|
|
return materialList;
|
|
|
},
|
|
|
// 设置时间
|
|
|
- dateSetting(curDateType) {
|
|
|
- if (!this.packingListSelected.length) {
|
|
|
+ dateSetting(curDateType, listType) {
|
|
|
+ if (!this.packingListSelected.length && !listType) {
|
|
|
return this.$message.error(`请选择${this.title}明细!`);
|
|
|
}
|
|
|
this.curDateType = curDateType;
|
|
|
+ this.listType = listType;
|
|
|
this.dateVisible = true;
|
|
|
},
|
|
|
// 选择包装列表
|