Commit c3dc43c4 by LJM

add

parent f6941768
.page-box { .page-box {
.base-information {
padding: 0 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 16rpx;
.top {
padding: 23rpx 0;
border-bottom: 1px solid #e6edf0;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
.toggle {
.iconfont {
font-size: 15rpx;
color: #9ca8ad;
transform: rotate(180deg);
}
.tt {
margin-left: 11rpx;
font-size: 24rpx;
color: #404547;
}
.rotate {
transform: rotate(0deg);
}
}
}
.text-box {
padding: 24rpx 0;
flex-wrap: wrap;
.input-box {
margin-bottom: 18rpx;
flex: 0 0 50%;
.label {
width: 132rpx;
font-size: 28rpx;
color: #919399;
white-space: nowrap;
}
.text {
font-size: 28rpx;
color: #484b59;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.desc {
font-size: 28rpx;
color: #484b59;
word-break: break-all;
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.tt {
font-size: 28rpx;
color: #1969f9;
}
}
}
.pp {
height: 80rpx;
.t1 {
width: 156rpx;
font-size: 24rpx;
color: #6e767a;
}
.input-wrap {
.uni-input {
font-size: 24rpx;
}
}
}
.scan-view {
.iconfont {
font-size: 48rpx;
color: #197adb;
}
}
}
.abnormal-information {
padding: 24rpx;
background: #ffffff;
border-radius: 4rpx;
margin-bottom: 48rpx;
.top {
margin-bottom: 24rpx;
.title {
.arrow {
width: 12rpx;
height: 12rpx;
background: #197adb;
margin-right: 16rpx;
border-radius: 50%;
}
.tt {
font-size: 32rpx;
color: #1e2021;
font-weight: bold;
}
}
}
.box {
height: 80rpx;
border-bottom: 1px solid #e6edf0;
.label {
position: relative;
width: 183rpx;
font-size: 24rpx;
color: #6e767a;
&.required:after {
position: absolute;
left: -10rpx;
top: -4rpx;
content: '*';
color: red;
display: block;
}
}
.input-wrap {
width: calc(100% - 183rpx);
.tab-panel {
&:last-child {
margin-right: 0;
}
}
}
.tab {
.tab-panel {
width: 120rpx;
height: 48rpx;
background: #9ca8ad;
border-radius: 4rpx;
font-size: 24rpx;
color: #ffffff;
margin-right: 24rpx;
&.curr {
background: #197adb;
}
}
}
.uni-list-cell-db {
width: calc(100% - 183rpx);
position: relative;
.icon-sanjiaoxing1 {
position: absolute;
right: 0;
top: 15rpx;
font-size: 17rpx;
color: #9ca8ad;
}
}
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.uni-input-box {
width: calc(100% - 183rpx);
.uni-input {
font-size: 24rpx;
color: #404547;
font-weight: bold;
}
.scan-view {
.iconfont {
font-size: 48rpx;
color: #197adb;
margin-right: 10rpx;
}
.tt {
font-size: 24rpx;
color: #197adb;
}
}
}
}
.upload-box {
position: relative;
z-index: 1;
padding-top: 23rpx;
padding-bottom: 24rpx;
.title {
margin-bottom: 24rpx;
.tt-l {
font-size: 24rpx;
color: #6e767a;
}
.tt-r {
font-size: 24rpx;
color: #404547;
}
}
.upload-list {
padding-bottom: 24rpx;
border-bottom: 1px solid #e6edf0;
.default {
width: 144rpx;
height: 144rpx;
background-color: #f1f4f6;
border: 1rpx solid #e6edf0;
.iconfont {
font-size: 48rpx;
color: #d8d8d8;
}
}
.pic-box {
position: relative;
flex: 0 0 25%;
margin-right: 10rpx;
&:nth-of-type(4n) {
margin-right: 0;
}
image {
width: 144rpx;
height: 144rpx;
}
.delete {
position: absolute;
right: 10rpx;
top: -13rpx;
width: 30rpx;
height: 30rpx;
border-radius: 50%;
background-color: #bb3434;
z-index: 999;
.iconfont {
font-size: 20rpx;
color: #ffffff;
}
}
}
}
.textarea-box {
position: relative;
padding-top: 23rpx;
textarea {
height: 80rpx;
font-size: 24rpx;
color: #6e767a;
border-bottom: 1px solid #e6edf0;
}
.quickExpressions {
margin-top: 12rpx;
flex-wrap: wrap;
.lable-box {
color: #197adb;
font-size: 26rpx;
margin-right: 30rpx;
margin-bottom: 10rpx;
}
}
}
}
}
.btn {
position: fixed;
bottom: 10rpx;
z-index: 2;
left: 0;
right: 0;
height: 88rpx;
background: #197adb;
border-radius: 4rpx;
font-size: 28rpx;
color: #ffffff;
margin: 0 24rpx;
}
} }
...@@ -218,6 +218,19 @@ ...@@ -218,6 +218,19 @@
margin-right: 0; margin-right: 0;
} }
} }
.num {
position: absolute;
width: 40rpx;
height: 40rpx;
line-height: 20px;
border-radius: 20rpx;
background: red;
color: #fff;
top: -9rpx;
right: 8rpx;
font-size: 24rpx;
text-align: center;
}
} }
.scroll-Y { .scroll-Y {
height: 100%; height: 100%;
......
...@@ -149,11 +149,6 @@ ...@@ -149,11 +149,6 @@
name: '货品查询', name: '货品查询',
iconfont: 'icon-huopinchaxun', iconfont: 'icon-huopinchaxun',
tips: '' tips: ''
},
{
name: '异常管理',
iconfont: 'icon-a-10cangkucangchu1',
tips: ''
} }
] ]
}; };
......
...@@ -20,16 +20,19 @@ ...@@ -20,16 +20,19 @@
</view> </view>
<view class="row radio-box"> <view class="row radio-box">
<radio-group @change="radioChange" class="row verCenter" style="width: 100%;"> <radio-group @change="radioChange" class="row verCenter" style="width: 100%;">
<label class="radio row verCenter" style="width: 30%;"> <label class="radio row verCenter">
<radio value="" style="transform:scale(0.7)" color="#197adb" />全部
</label>
<label class="radio row verCenter">
<radio value="0" style="transform:scale(0.7)" color="#197adb" />待业务处理 <radio value="0" style="transform:scale(0.7)" color="#197adb" />待业务处理
</label> </label>
<label class="radio row verCenter" style="width: 30%;"> <label class="radio row verCenter">
<radio value="1" style="transform:scale(0.7)" color="#197adb" />待仓库确认 <radio value="1" style="transform:scale(0.7)" color="#197adb" />待仓库确认
</label> </label>
<label class="radio row verCenter" style="width: 20%;"> <label class="radio row verCenter">
<radio value="2" style="transform:scale(0.7)" color="#197adb" />已确认 <radio value="2" style="transform:scale(0.7)" color="#197adb" />已确认
</label> </label>
<label class="radio row verCenter" style="width: 20%;"> <label class="radio row verCenter">
<radio value="-1" style="transform:scale(0.7)" color="#197adb" />作废 <radio value="-1" style="transform:scale(0.7)" color="#197adb" />作废
</label> </label>
</radio-group> </radio-group>
...@@ -40,7 +43,7 @@ ...@@ -40,7 +43,7 @@
<view class="box row" v-for="(item, index) in list" :key="index"> <view class="box row" v-for="(item, index) in list" :key="index">
<view class="input-box row verCenter bothSide" style="flex: 0 0 100%;"> <view class="input-box row verCenter bothSide" style="flex: 0 0 100%;">
<view> <view>
<text class="tt" style="color: #000;font-weight: bold;" @click="open()">{{ item.entrust_no }}</text> <text class="tt" style="color: #000;font-weight: bold;">{{ item.entrust_no }}</text>
</view> </view>
<view class="row verCenter"> <view class="row verCenter">
<text class="text" style="color: red;font-weight: bold;">{{ item.abnormal_type_val }}</text> <text class="text" style="color: red;font-weight: bold;">{{ item.abnormal_type_val }}</text>
...@@ -57,7 +60,9 @@ ...@@ -57,7 +60,9 @@
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> <view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">实物型号:</text> <text class="label">实物型号:</text>
<text class="text">{{item.actual_model}}</text> <view class="text">
<rich-text :nodes="highlightDifferences(item.order_model, item.actual_model)"></rich-text>
</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%;">
<text class="label">订单品牌:</text> <text class="label">订单品牌:</text>
...@@ -190,8 +195,9 @@ ...@@ -190,8 +195,9 @@
export default { export default {
data() { data() {
return { return {
noexebshowFalg: true, //控制是否会触发生命周期
page: 1, page: 1,
limit: 30, limit: 10,
list: [], list: [],
index: 0, index: 0,
array: ['全量搜索'], array: ['全量搜索'],
...@@ -207,7 +213,8 @@ ...@@ -207,7 +213,8 @@
allOrderDataByEntrustNoIndex: -1, allOrderDataByEntrustNoIndex: -1,
order_id: '', order_id: '',
searchParams: { searchParams: {
keyword: '' keyword: '',
abnormal_status: ''
} }
}; };
}, },
...@@ -220,12 +227,14 @@ ...@@ -220,12 +227,14 @@
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index == 0) { if (e.index == 0) {
this.open();
} }
}, },
onShow() { onShow() {
this.getData(); if (this.noexebshowFalg) {
this.$refs.popup.open(); this.resetChange();
this.getData();
}
}, },
methods: { methods: {
/** /**
...@@ -242,7 +251,9 @@ ...@@ -242,7 +251,9 @@
}, },
radioChange: function(e) { radioChange: function(e) {
var value = e.detail.value; var value = e.detail.value;
console.log(value) this.searchParams.abnormal_status = value;
this.resetChange();
this.getData();
}, },
getData() { getData() {
this.request(API.abnormalManageList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => { this.request(API.abnormalManageList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, true).then(res => {
...@@ -263,6 +274,38 @@ ...@@ -263,6 +274,38 @@
}); });
}, },
/** /**
* 比较两个字符串并标记不同的字符
* @param {string} str1 - 第一个字符串
* @param {string} str2 - 第二个字符串
* @returns {string} 处理后的第二个字符串,带有<em>标签
*/
highlightDifferences(str1, str2) {
// 去除前后空格
str1 = str1.trim();
str2 = str2.trim();
// 初始化结果字符串
let result = '';
const maxLength = Math.max(str1.length, str2.length);
// 逐字符比较
for (let i = 0; i < maxLength; i++) {
const char1 = str1[i] || ''; // 如果str1比str2短,取空字符
const char2 = str2[i] || ''; // 如果str2比str1短,取空字符
// 比较字符
if (char1 !== char2) {
// 如果字符不同,在第二个字符串中用<em>包裹
result += `<span style="color: red">${char2}</span>`;
} else {
// 如果字符相同,直接添加到结果中
result += char2;
}
}
return result;
},
/**
* 预览图片 * 预览图片
* @param {Object} img * @param {Object} img
* @param {Object} index * @param {Object} index
...@@ -433,6 +476,8 @@ ...@@ -433,6 +476,8 @@
}); });
return false; return false;
} }
this.$refs.popup.close();
this.$refs.popupErpSn.close();
let erp_order_sn = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].erp_order_sn; let erp_order_sn = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].erp_order_sn;
let salesman = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].salesman; let salesman = this.allOrderDataByEntrustNoList[this.allOrderDataByEntrustNoIndex].salesman;
uni.navigateTo({ uni.navigateTo({
...@@ -456,6 +501,7 @@ ...@@ -456,6 +501,7 @@
duration: 1000 duration: 1000
}); });
setTimeout(() => { setTimeout(() => {
this.resetChange();
this.getData(); this.getData();
}, 1000) }, 1000)
} else { } else {
...@@ -488,6 +534,7 @@ ...@@ -488,6 +534,7 @@
duration: 1000 duration: 1000
}); });
setTimeout(() => { setTimeout(() => {
this.resetChange();
this.getData(); this.getData();
}, 1000) }, 1000)
} else { } else {
......
<template> <template>
<view class="page-box"> <view class="page-box">
<view class="base-information">
<view class="top row bothSide verCenter">
<view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text>
<text class="tt">基础信息</text>
</view>
</view>
<view class="row text-box">
<view class="input-box row verCenter">
<text class="label">入仓号:</text>
<text class="text">{{form.entrust_no}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">部门:</text>
<text class="text">{{salesman}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">型号:</text>
<text class="text">{{orderDetailByIdList.model}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">品牌:</text>
<text class="text">{{orderDetailByIdList.brand}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">数量:</text>
<text class="text">{{orderDetailByIdList.qty}}</text>
</view>
<view class="input-box row verCenter">
<text class="label">产地:</text>
<text class="text">{{orderDetailByIdList.origin}}</text>
</view>
</view>
</view>
<view class="abnormal-information">
<view class="top row bothSide verCenter">
<view class="title row verCenter">
<text class="arrow row rowCenter verCenter"></text>
<text class="tt">异常信息</text>
</view>
</view>
<view class="box row verCenter">
<text class="label required">异常类型</text>
<view class="uni-list-cell-db">
<text class="iconfont icon-sanjiaoxing1"></text>
<picker @change="bindPickerChange(1,$event)" :value="index" :range="array">
<view class="uni-input">{{ array[index] || '请选择异常类型' }}</view>
</picker>
</view>
</view>
<view class="box row verCenter">
<template v-if="index == 0">
<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%;" />
</view>
</template>
<template v-else-if="index == 1">
<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%;" />
</view>
</template>
<template v-else-if="index == 2">
<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%;" />
</view>
</template>
<template v-else-if="index == 3">
<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%;" />
</view>
</template>
</view>
<view class="box row verCenter">
<text class="label required">是否需业务处理</text>
<view class="uni-list-cell-db">
<text class="iconfont icon-sanjiaoxing1"></text>
<picker @change="bindPickerChange(2,$event)" :value="is_business_processing_index" :range="is_business_processing">
<view class="uni-input">{{ is_business_processing[is_business_processing_index] || '请选择' }}</view>
</picker>
</view>
</view>
<view class="upload-box">
<view class="title row bothSide verCenter">
<view class="row verCenter">
<text style="color: red;">*</text>
<text class="tt-l">异常图片上传(选填)</text>
</view>
<text class="tt-r">{{ abnormal_pic_url.length }}/4</text>
</view>
<view class="upload-list row verCenter">
<template v-if="abnormal_pic_url.length > 0">
<view class="pic-box" v-for="(v, index) in abnormal_pic_url" :key="index">
<image :src="v" mode="aspectFill" lazy-load="true" @click="previewChange(abnormal_pic_url, index)"></image>
<view class="delete row rowCenter verCenter" @click="deletePic(index)"><text class="iconfont icon-shanchu"></text></view>
</view>
</template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="abnormal_pic_url.length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
<view class="textarea-box">
<textarea maxlength="200" placeholder="请输入异常说明(选填)" placeholder-style="color:#6E767A;" v-model="form.abnormal_explain"></textarea>
<view class="quickExpressions row">
<view class="lable-box" @click="selectionText(item.expressions)" v-for="(item,index) in quickExpressions" :key="index">{{item.expressions}}</view>
</view>
</view>
</view>
</view>
<view class="btn row rowCenter verCenter" @click="addAbnormal()">提交</view>
</view> </view>
</template> </template>
<script> <script>
import { API } from '@/util/api.js'; import { API } from '@/util/api.js';
import w_md5 from '../../js_sdk/zww-md5/w_md5.js';
export default { export default {
data() { data() {
return { return {
order_id: '', noexebshowFalg: true, //控制是否会触发生命周期
erp_order_sn: '', array: ['型号异常', '品牌异常', '数量异常', '产地异常'],
index: 0,
salesman: '', salesman: '',
orderDetailByIdIndex: '', orderDetailByIdIndex: '',
orderDetailByIdList: {}, orderDetailByIdList: {},
quickExpressions: {} quickExpressions: [],
is_business_processing: ['否', '是'],
is_business_processing_index: -1,
abnormal_pic_url: [],
form: {
order_goods_id: '',
entrust_no: '',
abnormal_type: 1,
actual_model: '',
actual_brand: '',
actual_qty: '',
actual_origin: '',
abnormal_explain: '',
abnormal_pic_url: '',
is_business_processing: ''
}
}; };
}, },
onLoad(options) { onLoad(options) {
this.order_id = options.order_id; this.form.order_goods_id = options.order_id;
this.erp_order_sn = options.erp_order_sn; this.form.entrust_no = options.erp_order_sn;
this.salesman = options.salesman; this.salesman = options.salesman;
this.orderDetailByIdIndex = options.orderDetailByIdIndex; this.orderDetailByIdIndex = options.orderDetailByIdIndex;
}, },
watch: {
abnormal_pic_url(arr) {
if (arr.length > 0) {
this.form.abnormal_pic_url = arr.join(',');
} else {
this.form.abnormal_pic_url = '';
}
}
},
onShow() { onShow() {
this.getData(); this.getData();
this.getQuickExpressions();
}, },
methods: { methods: {
bindPickerChange: function(type, e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
if (type == 1) {
this.index = e.detail.value;
this.form.abnormal_type = Number(e.detail.value) + 1;
this.getQuickExpressions(); //更新常用语
} else if (type == 2) {
this.is_business_processing_index = e.detail.value;
this.form.is_business_processing = e.detail.value;
}
},
/**
* 选中常用语
*/
selectionText(val) {
this.form.abnormal_explain = val;
},
getData() { getData() {
this.request(API.getOrderDetailById, 'GET', { order_id: this.order_id }, true).then(res => { this.request(API.getOrderDetailById, 'GET', { order_id: this.form.order_goods_id }, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.orderDetailByIdList = res.data[this.orderDetailByIdIndex]; this.orderDetailByIdList = res.data[this.orderDetailByIdIndex];
} else { } else {
...@@ -38,9 +193,190 @@ ...@@ -38,9 +193,190 @@
}); });
} }
}); });
this.request(API.getQuickExpressions, 'GET', { abnormal_type: 1 }, true).then(res => { },
/**
* 获取常用语
*/
getQuickExpressions() {
this.request(API.getQuickExpressions, 'GET', { abnormal_type: this.form.abnormal_type }, false).then(res => {
if (res.err_code === 0) {
this.quickExpressions.list = res.data;
} else {
uni.showToast({
title: res.err_msg,
icon: 'none'
});
}
});
},
previewChange(img, index) {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
uni.previewImage({
current: index,
urls: img
});
},
deletePic(index) {
this.abnormal_pic_url.splice(index, 1);
},
chooseImageChange() {
this.noexebshowFalg = false; //不允许再次触发onshow这个生命周期
var self = this;
var time = parseInt(new Date().getTime() / 1000);
// #ifdef MP-WEIXIN
uni.chooseMedia({
count: 4,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
uni.showLoading({
title: '上传中...'
});
const tempFilePaths = chooseImageRes.tempFiles;
let maxNum = tempFilePaths.length * 1 + self.abnormal_pic_url.length * 1;
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
});
return false;
}
for (let i = 0; i < tempFilePaths.length; i++) {
uni.uploadFile({
url: API.upload,
filePath: tempFilePaths[i].tempFilePath,
name: 'upload',
formData: {
source: '1',
k1: time,
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
},
success: uploadFileRes => {
uni.hideLoading();
var data = JSON.parse(uploadFileRes.data);
if (data.code === 200) {
self.abnormal_pic_url.push(data.data[0]);
} else {
uni.showToast({
title: data.message,
icon: 'error'
});
}
},
fail: error => {
uni.hideLoading();
}
});
}
}
});
// #endif
// #ifdef APP-PLUS
uni.chooseImage({
count: 4,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
uni.showLoading({
title: '上传中...'
});
const tempFilePaths = chooseImageRes.tempFilePaths;
let maxNum = tempFilePaths.length * 1 + self.abnormal_pic_url.length * 1;
if (maxNum > 4) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
});
return false;
}
for (let i = 0; i < tempFilePaths.length; i++) {
uni.uploadFile({
url: API.upload,
filePath: tempFilePaths[i],
name: 'upload',
formData: {
source: '1',
k1: time,
k2: w_md5.hex_md5_32(w_md5.hex_md5_32(String(time)) + 'fh6y5t4rr351d2c3bryi')
},
success: uploadFileRes => {
uni.hideLoading();
var data = JSON.parse(uploadFileRes.data);
if (data.code === 200) {
self.abnormal_pic_url.push(data.data[0]);
} else {
uni.showToast({
title: data.message,
icon: 'error'
});
}
},
fail: error => {
uni.hideLoading();
}
});
}
}
});
// #endif
},
/**
* 新增异常
*/
addAbnormal() {
if (this.index == -1) {
uni.showToast({
title: '请选择异常类型',
icon: 'none'
});
return false;
}
if (!this.form.actual_model && !this.form.actual_brand && !this.form.actual_qty && this.form.actual_origin) {
uni.showToast({
title: '请填写实物',
icon: 'none'
});
return false;
}
if (this.form.is_business_processing == '') {
uni.showToast({
title: '请选择是否需要业务处理',
icon: 'none'
});
return false;
}
if (this.form.abnormal_pic_url == '') {
uni.showToast({
title: '请上传异常图片',
icon: 'none'
});
return false;
}
if (!this.form.abnormal_explain) {
uni.showToast({
title: '请填写异常说明',
icon: 'none'
});
return false;
}
this.request(API.addAbnormal, 'POST', this.form, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.quickExpressions = res.data; uni.showToast({
title: '操作成功',
icon: 'success',
duration: 2000
});
setTimeout(() => {
// 在进行导航之前设置全局变量
getApp().globalData.fromPage = "addAbnormal";
uni.navigateBack({
delta: 1
});
}, 2000)
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
......
...@@ -205,7 +205,11 @@ ...@@ -205,7 +205,11 @@
<view class="btn-list row verCenter bothSide" v-if="!tallyData.detail"> <view class="btn-list row verCenter bothSide" v-if="!tallyData.detail">
<navigator url="/pages/tally/fixBox" class="box row rowCenter verCenter" hover-class="none">合 箱</navigator> <navigator url="/pages/tally/fixBox" class="box row rowCenter verCenter" hover-class="none">合 箱</navigator>
<navigator url="/pages/tally/unboxing" class="box row rowCenter verCenter" hover-class="none">重新开箱</navigator> <navigator url="/pages/tally/unboxing" class="box row rowCenter verCenter" hover-class="none">重新开箱</navigator>
<navigator url="/pages/tally/abnormalTally" class="box row rowCenter verCenter" hover-class="none">理货异常处理</navigator> <navigator url="/pages/tally/abnormalTally" class="box row rowCenter verCenter" hover-class="none">美产商检管理</navigator>
<view style="position:relative;">
<navigator url="/pages/tally/abnormalManageList" class="box row rowCenter verCenter" hover-class="none">异常管理</navigator>
<text class="num row verCenter rowCenter" v-if="stayHandleCount > 0">{{stayHandleCount}}</text>
</view>
</view> </view>
<!-- 选择国家 --> <!-- 选择国家 -->
<uni-popup ref="popup" background-color="#F1F4F6"> <uni-popup ref="popup" background-color="#F1F4F6">
...@@ -356,7 +360,8 @@ ...@@ -356,7 +360,8 @@
}, },
net_weight_total: 0, //净重合计 net_weight_total: 0, //净重合计
allChecked: false, allChecked: false,
checkboxItems: [] checkboxItems: [],
stayHandleCount: 0
}; };
}, },
watch: { watch: {
...@@ -381,6 +386,9 @@ ...@@ -381,6 +386,9 @@
}); });
} }
}, },
onShow() {
this.getStayHandleCount();
},
methods: { methods: {
/** /**
* 点击遮罩层触发 * 点击遮罩层触发
...@@ -778,6 +786,16 @@ ...@@ -778,6 +786,16 @@
}); });
}, },
/** /**
* 获取异常待处理数
*/
getStayHandleCount() {
this.request(API.getStayHandleCount, 'GET', {}, false).then(res => {
if (res.err_code === 0) {
this.stayHandleCount = res.data || 0;
}
});
},
/**
* 获取产地升级版 * 获取产地升级版
*/ */
getOriginCn() { getOriginCn() {
......
...@@ -377,7 +377,11 @@ const API = { ...@@ -377,7 +377,11 @@ const API = {
/** /**
* 获取快捷用语 * 获取快捷用语
*/ */
getQuickExpressions: API_BASE + '/supplywechatwms/getQuickExpressions' getQuickExpressions: API_BASE + '/supplywechatwms/getQuickExpressions',
/**
* 待处理数
*/
getStayHandleCount: API_BASE + '/supplywechatwms/getStayHandleCount'
} }
......
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