Procházet zdrojové kódy

refactor(warehouse): 统一使用currentDateType替代curDateType变量

liujt před 5 měsíci
rodič
revize
3bb0a94e83
1 změnil soubory, kde provedl 7 přidání a 6 odebrání
  1. 7 6
      pages/warehouse/enterHouse/addStock.vue

+ 7 - 6
pages/warehouse/enterHouse/addStock.vue

@@ -188,7 +188,7 @@
 									<u-button class="firstBtn" size="small" type="primary" text="选择时间类型"
 										@click="timeTypeShow = true"></u-button>
 									<u-button type="warning" size="small"
-										:text="`批量设置${curDateType?curDateTypeLabel[curDateType]:''}`"
+										:text="`批量设置${currentDateType?curDateTypeLabel[currentDateType]:''}`"
 										@click="typeTimeClick(index)"></u-button>
 								</view>
 							</view>
@@ -246,10 +246,10 @@
 											</view>
 										</view>
 										<view class="item">
-											<view class="lable rx-cc">{{ curDateTypeLabel[curDateType] }}</view>
+											<view class="lable rx-cc">{{ curDateTypeLabel[currentDateType] }}</view>
 											<view class="content input_box">
 												<u--input clearable placeholder="请选择" border="surround"
-													v-model="ite[curDateType]"
+													v-model="ite[currentDateType]"
 													@click.native="typeTimeClick(index, idx)"></u--input>
 											</view>
 										</view>
@@ -366,6 +366,7 @@
 				statusShow: false,
 				dictCodeList: [], // 字典列表
 				curDateType: 'purchaseDate',
+				currentDateType: 'purchaseDate',
 				qualityResultsOption: [
 					[{
 							label: '合格',
@@ -837,7 +838,7 @@
 					if (this.currentPackingIndex > -1) {
 						// 单独
 						this.productList[this.currentProductIndex].outInDetailRecordRequestList[this
-							.currentPackingIndex][this.curDateType] = this.formatter(this.currentTypeTime)
+							.currentPackingIndex][this.currentDateType] = this.formatter(this.currentTypeTime)
 					} else {
 						// 批量
 						this.productList[this.currentProductIndex].outInDetailRecordRequestList = this.productList[
@@ -846,7 +847,7 @@
 							console.log(this.formatter(this.currentTypeTime))
 							return {
 								...item,
-								[this.curDateType]: this.formatter(this.currentTypeTime)
+								[this.currentDateType]: this.formatter(this.currentTypeTime)
 							}
 						})
 					}
@@ -1218,7 +1219,7 @@
 				this.warehouseShow = false
 			},
 			selectTimeTypeInfo(e) {
-				this.curDateType = e.value[0]?.prop
+				this.currentDateType = e.value[0]?.prop
 				this.timeTypeShow = false
 			},
 			sceneStateFilter(bizType) {