Commit 92e630e5 by LJM

bug

parent c3dc43c4
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<text class="text" style="margin-left: 20px;font-weight: bold;">{{ item.abnormal_status_val }}</text> <text class="text" style="margin-left: 20px;font-weight: bold;">{{ item.abnormal_status_val }}</text>
</view> </view>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> <view class="input-box row verCenter" style="flex: 0 0 100%;" @click="open()">
<text class="label">异常编码:</text> <text class="label">异常编码:</text>
<text class="text">{{item.abnormal_number}}</text> <text class="text">{{item.abnormal_number}}</text>
</view> </view>
...@@ -165,6 +165,7 @@ ...@@ -165,6 +165,7 @@
<view class="uni-th" style="text-align: center;">明细数</view> <view class="uni-th" style="text-align: center;">明细数</view>
<view class="uni-th" style="text-align: center;">入库状态</view> <view class="uni-th" style="text-align: center;">入库状态</view>
</view> </view>
<scroll-view scroll-y="true" style="max-height: 500rpx;">
<view class="uni-tr" v-for="(item,index) in allOrderDataByEntrustNoList" :key="index" @click="selectedChange(1,index)" :class="{curr:allOrderDataByEntrustNoIndex==index}"> <view class="uni-tr" v-for="(item,index) in allOrderDataByEntrustNoList" :key="index" @click="selectedChange(1,index)" :class="{curr:allOrderDataByEntrustNoIndex==index}">
<view class="uni-td" style="text-align: center;"> <view class="uni-td" style="text-align: center;">
<template v-if="allOrderDataByEntrustNoIndex==index"> <template v-if="allOrderDataByEntrustNoIndex==index">
...@@ -178,6 +179,7 @@ ...@@ -178,6 +179,7 @@
<view class="uni-td" style="text-align: center;">{{item.detail_count}}</view> <view class="uni-td" style="text-align: center;">{{item.detail_count}}</view>
<view class="uni-td" style="text-align: center;">{{item.stock_in_status_val}}</view> <view class="uni-td" style="text-align: center;">{{item.stock_in_status_val}}</view>
</view> </view>
</scroll-view>
</view> </view>
</view> </view>
<view class="btn row bothSide"> <view class="btn row bothSide">
...@@ -212,6 +214,8 @@ ...@@ -212,6 +214,8 @@
allOrderDataByEntrustNoList: [], allOrderDataByEntrustNoList: [],
allOrderDataByEntrustNoIndex: -1, allOrderDataByEntrustNoIndex: -1,
order_id: '', order_id: '',
erp_order_sn: '',
salesman: '',
searchParams: { searchParams: {
keyword: '', keyword: '',
abnormal_status: '' abnormal_status: ''
...@@ -379,6 +383,8 @@ ...@@ -379,6 +383,8 @@
if (res.err_code === 0) { if (res.err_code === 0) {
if (res.data.length > 0) { if (res.data.length > 0) {
if (res.data.length == 1) { if (res.data.length == 1) {
this.erp_order_sn = res.data[0].erp_order_sn;
this.salesman = res.data[0].salesman;
this.getOrderDetailById(res.data[0].order_id); this.getOrderDetailById(res.data[0].order_id);
} else { } else {
this.allOrderDataByEntrustNoList = res.data; this.allOrderDataByEntrustNoList = res.data;
...@@ -420,8 +426,13 @@ ...@@ -420,8 +426,13 @@
*/ */
open(type) { open(type) {
if (type == 1) { if (type == 1) {
this.allOrderDataByEntrustNoIndex = -1;
this.allOrderDataByEntrustNoLis = [];
this.$refs.popupErpSn.open(); this.$refs.popupErpSn.open();
} else { } else {
this.entrust_no = '';
this.orderDetailByIdIndex = -1;
this.orderDetailByIdList = [];
this.$refs.popup.open(); this.$refs.popup.open();
} }
}, },
...@@ -439,6 +450,8 @@ ...@@ -439,6 +450,8 @@
}); });
return false; return false;
} }
this.erp_order_sn = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].erp_order_sn
this.salesman = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].salesman
this.getOrderDetailById(this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].order_id); this.getOrderDetailById(this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].order_id);
this.$refs.popupErpSn.close(); this.$refs.popupErpSn.close();
} else { } else {
...@@ -478,10 +491,8 @@ ...@@ -478,10 +491,8 @@
} }
this.$refs.popup.close(); this.$refs.popup.close();
this.$refs.popupErpSn.close(); this.$refs.popupErpSn.close();
let erp_order_sn = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].erp_order_sn;
let salesman = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].salesman;
uni.navigateTo({ uni.navigateTo({
url: '/pages/tally/addAbnormal?order_id=' + this.order_id + '&erp_order_sn=' + erp_order_sn + '&salesman=' + salesman + '&orderDetailByIdIndex=' + this.orderDetailByIdIndex url: '/pages/tally/addAbnormal?order_id=' + this.order_id + '&erp_order_sn=' + this.erp_order_sn + '&salesman=' + this.salesman + '&orderDetailByIdIndex=' + this.orderDetailByIdIndex
}) })
}, },
/** /**
......
...@@ -52,27 +52,28 @@ ...@@ -52,27 +52,28 @@
</view> </view>
<view class="box row verCenter"> <view class="box row verCenter">
<template v-if="index == 0"> <template v-if="index == 0">
<text class="label">实物型号</text> <text class="label">实物品牌</text>
<view class="uni-input-box row verCenter bothSide"> <view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="实物型号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_model" style="width: 100%;" /> <input type="text" class="uni-input" placeholder="实物品牌" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_brand" style="width: 100%;" />
</view> </view>
</template> </template>
<template v-else-if="index == 1"> <template v-else-if="index == 1">
<text class="label">实物品牌</text> <text class="label">实物型号</text>
<view class="uni-input-box row verCenter bothSide"> <view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="实物品牌" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_brand" style="width: 100%;" /> <input type="text" class="uni-input" placeholder="实物型号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_model" style="width: 100%;" />
</view> </view>
</template> </template>
<template v-else-if="index == 2"> <template v-else-if="index == 2">
<text class="label">实物数量</text> <text class="label">实物产地</text>
<view class="uni-input-box row verCenter bothSide"> <view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="实物型号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_qty" style="width: 100%;" /> <input type="text" class="uni-input" placeholder="实物产地" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_origin" style="width: 100%;" />
</view> </view>
</template> </template>
<template v-else-if="index == 3"> <template v-else-if="index == 3">
<text class="label">实物产地</text> <text class="label">实物数量</text>
<view class="uni-input-box row verCenter bothSide"> <view class="uni-input-box row verCenter bothSide">
<input type="text" class="uni-input" placeholder="实物型号" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_origin" style="width: 100%;" /> <input type="text" class="uni-input" placeholder="实物数量" placeholder-style="color:#404547;font-weight:bold;" v-model="form.actual_qty" style="width: 100%;" />
</view> </view>
</template> </template>
</view> </view>
...@@ -122,7 +123,7 @@ ...@@ -122,7 +123,7 @@
data() { data() {
return { return {
noexebshowFalg: true, //控制是否会触发生命周期 noexebshowFalg: true, //控制是否会触发生命周期
array: ['型号异常', '品牌异常', '数量异常', '产地异常'], array: ['品牌异常', '型号异常', '产地异常', '数量异常'],
index: 0, index: 0,
salesman: '', salesman: '',
orderDetailByIdIndex: '', orderDetailByIdIndex: '',
...@@ -342,7 +343,7 @@ ...@@ -342,7 +343,7 @@
}); });
return false; return false;
} }
if (this.form.is_business_processing == '') { if (this.form.is_business_processing === '') {
uni.showToast({ uni.showToast({
title: '请选择是否需要业务处理', title: '请选择是否需要业务处理',
icon: 'none' icon: 'none'
......
...@@ -387,7 +387,13 @@ ...@@ -387,7 +387,13 @@
} }
}, },
onShow() { onShow() {
//获取异常数量
this.getStayHandleCount(); this.getStayHandleCount();
if (this.box_sn && this.erp_order_sn) {
this.getTallyList();
}
}, },
methods: { methods: {
/** /**
......
...@@ -155,11 +155,40 @@ ...@@ -155,11 +155,40 @@
this.page++; this.page++;
this.getData(); this.getData();
}, },
mounted() {
},
onShow() { onShow() {
this.getData(); this.setDefaultTimeInterval();
}, },
methods: { methods: {
/** /**
* 设置默认的时间区间为近一个月
*/
setDefaultTimeInterval() {
const currentDate = new Date();
// 格式化日期为 YYYY-MM-DD
const formatDate = (date) => {
const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0');
return `${year}-${month}-${day}`;
};
// 结束日期为当前日期
const create_time_end = formatDate(currentDate);
// 起始日期为一个月前的日期
const create_time_begin = formatDate(new Date(currentDate.setMonth(currentDate.getMonth() - 1)));
// 设置到 searchParams
this.searchParams.create_time_begin = create_time_begin;
this.searchParams.create_time_end = create_time_end;
this.getData();
},
/**
* 时间选择 * 时间选择
*/ */
bindTimeChange(type, e) { bindTimeChange(type, e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment