瀏覽代碼

渔船类型动态获取,餐饮核销记录参数名错误修复

17755135699 1 年之前
父節點
當前提交
00f5414149
共有 2 個文件被更改,包括 13 次插入12 次删除
  1. 12 11
      pagesHouse/Verification/check.vue
  2. 1 1
      pagesHouse/Verification/recordCy.vue

+ 12 - 11
pagesHouse/Verification/check.vue

@@ -42,7 +42,7 @@
 			<view class="tit">选择渔船</view>
 			<view class="typeItem">
 				<view class="txt" v-for="(t,i) in types" :key="i" @click="typeIndex=i" :class="typeIndex==i?'on':''">
-				{{t}}
+				{{t.boatName}}{{t.boatNo}}
 				<image v-if="typeIndex==i" src="https://i.ringzle.com/file/20240320/b458b03f8f654a51a921656b8aa955de.png"></image>
 				</view>
 			
@@ -60,16 +60,7 @@
 		data() {
 			return {
 				typeIndex:null,
-				types: ['浙嵊渔休30015',
-					'浙嵊渔休30016',
-					'浙嵊渔休30017',
-					'浙嵊渔休30018',
-					'浙嵊渔休30019',
-					'浙嵊渔休30020',
-					'浙嵊渔休30021',
-					'浙嵊渔休30022',
-					'浙嵊渔休30023',
-					'浙嵊渔休30025',
+				types: [
 				],
 				date: new Date().Format('yyyy-MM-dd'),
 				show: false,
@@ -87,10 +78,20 @@
 			this.playTime = opt.playTime || '';
 			this.boatNo = opt.boatNo || '';
 			this.getOrderInfo();
+			this.getTypes();
 			//获取上次核销缓存
 
 		},
 		methods: {
+			getTypes(){
+				this.$api.get('/scenic/boat/page',{
+					page:-1
+				}).then(res=>{
+					if(res.data.code==0){
+						this.types=res.data.data.list;
+					}
+				})
+			},
 			back() {
 				this.keyName = this.orderInfo.playDate + this.orderInfo.playTime + this.boatNo;
 				uni.setStorageSync(this.keyName, JSON.stringify(this.data));

+ 1 - 1
pagesHouse/Verification/recordCy.vue

@@ -60,7 +60,7 @@
 				this.$api.post('/api/merchant/food/getMerchantFoodWriteOffList', {
 					dateType: 1,
 					merchantId: this.merchantId,
-					queryDate: this.date
+					dateTime: this.date
 				}).then(res => {
 					if (res.data.code == 0) {
 						// this.totalAmount = res.data.data.orderAmount;