Commit 92e630e5 by LJM

bug

parent c3dc43c4
......@@ -50,7 +50,7 @@
<text class="text" style="margin-left: 20px;font-weight: bold;">{{ item.abnormal_status_val }}</text>
</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="text">{{item.abnormal_number}}</text>
</view>
......@@ -165,19 +165,21 @@
<view class="uni-th" style="text-align: center;">明细数</view>
<view class="uni-th" style="text-align: center;">入库状态</view>
</view>
<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;">
<template v-if="allOrderDataByEntrustNoIndex==index">
<text class="iconfont icon-danxuankuangdanxuan-xuanzhong-weixuanzhong"></text>
</template>
<template v-else>
<text class="iconfont icon-danxuanxuanzhong-weixuanzhong"></text>
</template>
<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-td" style="text-align: center;">
<template v-if="allOrderDataByEntrustNoIndex==index">
<text class="iconfont icon-danxuankuangdanxuan-xuanzhong-weixuanzhong"></text>
</template>
<template v-else>
<text class="iconfont icon-danxuanxuanzhong-weixuanzhong"></text>
</template>
</view>
<view class="uni-td" style="text-align: center;">{{item.erp_order_sn}}</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>
<view class="uni-td" style="text-align: center;">{{item.erp_order_sn}}</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>
</scroll-view>
</view>
</view>
<view class="btn row bothSide">
......@@ -212,6 +214,8 @@
allOrderDataByEntrustNoList: [],
allOrderDataByEntrustNoIndex: -1,
order_id: '',
erp_order_sn: '',
salesman: '',
searchParams: {
keyword: '',
abnormal_status: ''
......@@ -379,6 +383,8 @@
if (res.err_code === 0) {
if (res.data.length > 0) {
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);
} else {
this.allOrderDataByEntrustNoList = res.data;
......@@ -420,8 +426,13 @@
*/
open(type) {
if (type == 1) {
this.allOrderDataByEntrustNoIndex = -1;
this.allOrderDataByEntrustNoLis = [];
this.$refs.popupErpSn.open();
} else {
this.entrust_no = '';
this.orderDetailByIdIndex = -1;
this.orderDetailByIdList = [];
this.$refs.popup.open();
}
},
......@@ -439,6 +450,8 @@
});
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.$refs.popupErpSn.close();
} else {
......@@ -478,10 +491,8 @@
}
this.$refs.popup.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({
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 @@
</view>
<view class="box row verCenter">
<template v-if="index == 0">
<text class="label">实物型号</text>
<text class="label">实物品牌</text>
<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>
</template>
<template v-else-if="index == 1">
<text class="label">实物品牌</text>
<text class="label">实物型号</text>
<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>
</template>
<template v-else-if="index == 2">
<text class="label">实物数量</text>
<text class="label">实物产地</text>
<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>
</template>
<template v-else-if="index == 3">
<text class="label">实物产地</text>
<text class="label">实物数量</text>
<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>
</template>
</view>
......@@ -122,7 +123,7 @@
data() {
return {
noexebshowFalg: true, //控制是否会触发生命周期
array: ['型号异常', '品牌异常', '数量异常', '产地异常'],
array: ['品牌异常', '型号异常', '产地异常', '数量异常'],
index: 0,
salesman: '',
orderDetailByIdIndex: '',
......@@ -342,7 +343,7 @@
});
return false;
}
if (this.form.is_business_processing == '') {
if (this.form.is_business_processing === '') {
uni.showToast({
title: '请选择是否需要业务处理',
icon: 'none'
......
......@@ -387,7 +387,13 @@
}
},
onShow() {
//获取异常数量
this.getStayHandleCount();
if (this.box_sn && this.erp_order_sn) {
this.getTallyList();
}
},
methods: {
/**
......
......@@ -155,11 +155,40 @@
this.page++;
this.getData();
},
mounted() {
},
onShow() {
this.getData();
this.setDefaultTimeInterval();
},
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) {
......
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