Browse Source

前端库存成本

gjy 2 years ago
parent
commit
c8436e548c
3 changed files with 34 additions and 19 deletions
  1. 10 1
      pages.json
  2. 0 9
      pages/erpbusiness/sendCommand.vue
  3. 24 9
      pages/user/contractLook/inventoryCost.vue

+ 10 - 1
pages.json

@@ -1387,7 +1387,16 @@
 			"path": "pages/user/contractLook/inventoryCost",
 			"style": {
 				"navigationBarTitleText": "库存成本",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"app-plus": {
+					"titleNView": {
+						"buttons": [{
+							"color": "#000",
+							"fontSize": "28rpx",
+							"text": "导出"
+						}]
+					}
+				}
 			}
 
 		}, {

+ 0 - 9
pages/erpbusiness/sendCommand.vue

@@ -10,7 +10,6 @@
 			<view style='margin-top:4%;display: flex;flex-direction: column;'>
 				<button type='primary' class="btn" @tap='receiptTest' :loading='isReceiptSend'
 					:disabled='isReceiptSend'>打印质检单小票</button>
-				<button type='primary' class="btn" @tap='clearBlue'>重新连接蓝牙</button>
 				<button type='primary' class="btn" @tap='goToList'>返回列表页</button>
 				<!-- <button type='primary' @tap='labelTest' :loading='isLabelSend' :disabled='isLabelSend'>标签测试</button> -->
 			</view>
@@ -158,13 +157,6 @@
 			//    })	
 		},
 		methods: {
-			clearBlue() {
-				this.$store.commit('BLEInformationSet', '');
-				uni.showToast({
-					title: '请重新打印质检小票',
-					icon: 'none'
-				})
-			},
 			goToList() {
 				uni.navigateTo({
 					url: '/pages/erpbusiness/quality_testing?managementType=1'
@@ -337,7 +329,6 @@
 				if (that.gridList.type == '潮粮') {
 					command.setText("单价(元/公斤):" + that.gridList.tidalGrainPrice);
 				} else {
-					command.setText("单价(元/公斤):" + that.gridList.dryGrainPrice);
 				}
 				command.setPrint();
 				//杂质

+ 24 - 9
pages/user/contractLook/inventoryCost.vue

@@ -39,11 +39,11 @@
 						{{parameter.endDate?parameter.startDate+' - '+parameter.endDate:'请选择查询日期'}}
 					</view>
 				</view>
-				<view class="modal-row">
+				<view @click='show1=true' class="modal-row">
 					<view class="">仓库名称</view>
 					<view>{{parameter.warehouseName}}</view>
 				</view>
-
+				<u-picker mode="selector" v-model="show1" @confirm='warehouseConfirm' range-key='warehouseName' :default-selector="[0]" :range="warehouseList"></u-picker>
 			</view>
 		</u-modal>
 		<u-calendar v-model="show" :mode="mode" @change="change" range-color='#22C572' btn-type='success'
@@ -63,7 +63,9 @@
 		data() {
 			return {
 				isShowAlert: false,
+				show1:false,
 				content: '当前登录身份已失效,请重新登录!',
+				warehouseList:[],
 				parameter: {
 					startDate: "",
 					endDate: '',
@@ -90,12 +92,27 @@
 		onLoad: function(option) {
 			console.log(option)
 			this.searchMonth = option.searchMonth
-			this.init()
+			 this.init()
+		},
+		onNavigationBarButtonTap() {
+			this.parameter.warehouseName = this.costList[0].warehouseName
+		   this.parameter.startDate = helper.getNowFormatDate()
+		   this.parameter.endDate = helper.getNowFormatDate()
+		   this.$api.doRequest('get', '/warehouseBaseInfo/selectWarehouseSelf', {
+		   	compId: uni.getStorageSync('pcUserInfo').compId,
+		   }).then(res => {
+				this.warehouseList=res.data.data
+				this.isShowDetailBtn = true
+		   })
 		},
 		computed: {
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
+			warehouseConfirm(e){
+				console.log(e)
+				this.parameter.warehouseName = this.warehouseList[e[0]].warehouseName
+			},
 			alertBtn() {
 				uni.navigateTo({
 					url: '/pages/public/login'
@@ -131,8 +148,8 @@
 					title: '正在加载'
 				})
 				this.$api.doRequest('post', _url, {
-					startDate: this.parameter.startDate,
-					endDate: this.parameter.endDate,
+					startDate: this.parameter.startDate+' 00:00:00',
+					endDate: this.parameter.endDate+' 00:00:00',
 					warehouseName: this.parameter.warehouseName
 				}).then(res => {
 					uni.hideLoading()
@@ -158,10 +175,8 @@
 				this.isShowDetailBtn = false
 			},
 			toDetail(warehouseName) {
-				this.parameter.warehouseName = warehouseName
-				this.parameter.startDate = helper.getNowFormatDate()
-				this.parameter.endDate = helper.getNowFormatDate()
-				this.isShowDetailBtn = true
+				// this.parameter.warehouseName = warehouseName
+				
 			},
 			init() {
 				if (!this.hasLogin) {