Commit a21d94e6 by LJM

add

parent 720c28f3
...@@ -51,38 +51,60 @@ ...@@ -51,38 +51,60 @@
</view> </view>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;" @click="open()"> <view class="input-box row verCenter" style="flex: 0 0 100%;" @click="open()">
<text class="label">异常编码:</text> <text class="label" @click="open()">异常编码:</text>
<text class="text">{{item.abnormal_number}}</text> <text class="text">{{item.abnormal_number}}</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%;background-color: #f1f4f6;padding: 10rpx 0;">
<template v-if="item.abnormal_type == 1">
<text class="label">订单品牌:</text>
<text class="text">{{item.order_brand}}</text>
</template>
<template v-else-if="item.abnormal_type == 2">
<text class="label">订单型号:</text> <text class="label">订单型号:</text>
<text class="text">{{item.order_model}}</text> <text class="text">{{item.order_model}}</text>
</template>
<template v-else-if="item.abnormal_type == 3">
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</text>
</template>
<template v-else-if="item.abnormal_type == 4">
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</template>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> <view class="input-box row verCenter" style="flex: 0 0 100%;background-color: #f1f4f6;padding: 10rpx 0;">
<template v-if="item.abnormal_type == 1">
<text class="label">实物品牌:</text>
<view class="text">
<rich-text :nodes="highlightDifferences(item.order_brand, item.actual_brand)"></rich-text>
</view>
</template>
<template v-else-if="item.abnormal_type == 2">
<text class="label">实物型号:</text> <text class="label">实物型号:</text>
<view class="text"> <view class="text">
<rich-text :nodes="highlightDifferences(item.order_model, item.actual_model)"></rich-text> <rich-text :nodes="highlightDifferences(item.order_model, item.actual_model)"></rich-text>
</view> </view>
</template>
<template v-else-if="item.abnormal_type == 3">
<text class="label">实物产地:</text>
<view class="text">
<rich-text :nodes="highlightDifferences(item.order_origin, item.actual_origin)"></rich-text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> </template>
<text class="label">订单品牌:</text> <template v-else-if="item.abnormal_type == 4">
<text class="text">{{item.order_brand}}</text> <text class="label">实物数量:</text>
</view> <view class="text">
<view class="input-box row verCenter" style="flex: 0 0 100%;"> <rich-text :nodes="highlightDifferences(item.order_qty, item.actual_qty)"></rich-text>
<text class="label">订单数量:</text>
<text class="text">{{item.order_qty}}</text>
</view> </view>
<view class="input-box row verCenter" style="flex: 0 0 100%;"> </template>
<text class="label">订单产地:</text>
<text class="text">{{item.order_origin}}</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%;">
<text class="label">异常说明:</text> <text class="label">异常说明:</text>
<text class="text">{{item.abnormal_explain}}</text> <text class="text" style="max-width: 500rpx;" @click="show(item.abnormal_explain)">{{item.abnormal_explain}}</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%;">
<text class="label">业务回复:</text> <text class="label">业务回复:</text>
<text class="text" style="color: red;">{{item.handle_explain}}</text> <text class="text" style="color: red;" @click="show(item.handle_explain)">{{item.handle_explain}}</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%;">
<text class="label">创建时间:</text> <text class="label">创建时间:</text>
...@@ -93,7 +115,7 @@ ...@@ -93,7 +115,7 @@
<text class="text">{{item.salesman_handle_time}}</text> <text class="text">{{item.salesman_handle_time}}</text>
</view> </view>
<view class="input-box row" style="flex: 0 0 100%;"> <view class="input-box row" style="flex: 0 0 100%;">
<text class="label">理货照片:</text> <text class="label">异常图片:</text>
<view class="pick_img_list row"> <view class="pick_img_list row">
<template v-if="item.abnormal_pic_urls.length > 0"> <template v-if="item.abnormal_pic_urls.length > 0">
<view class="img_list" v-for="(v, i) in item.abnormal_pic_urls" :key="i"> <view class="img_list" v-for="(v, i) in item.abnormal_pic_urls" :key="i">
...@@ -284,9 +306,10 @@ ...@@ -284,9 +306,10 @@
* @returns {string} 处理后的第二个字符串,带有<em>标签 * @returns {string} 处理后的第二个字符串,带有<em>标签
*/ */
highlightDifferences(str1, str2) { highlightDifferences(str1, str2) {
if (str1 && str2) {
// 去除前后空格 // 去除前后空格
str1 = str1.trim(); str1 = str1.toString().trim();
str2 = str2.trim(); str2 = str2.toString().trim();
// 初始化结果字符串 // 初始化结果字符串
let result = ''; let result = '';
...@@ -308,6 +331,7 @@ ...@@ -308,6 +331,7 @@
} }
return result; return result;
}
}, },
/** /**
* 预览图片 * 预览图片
...@@ -496,6 +520,23 @@ ...@@ -496,6 +520,23 @@
}) })
}, },
/** /**
* 展示文本详情
*/
show(val) {
uni.showModal({
content: val,
showCancel: false,
confirmText: '关闭',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/**
* 异常作废 * 异常作废
*/ */
cancelAbnormal(abnormal_id) { cancelAbnormal(abnormal_id) {
......
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
is_business_processing: ['否', '是'], is_business_processing: ['否', '是'],
is_business_processing_index: -1, is_business_processing_index: -1,
abnormal_pic_url: [], abnormal_pic_url: [],
order_id: '',
form: { form: {
order_goods_id: '', order_goods_id: '',
entrust_no: '', entrust_no: '',
...@@ -147,7 +148,7 @@ ...@@ -147,7 +148,7 @@
}; };
}, },
onLoad(options) { onLoad(options) {
this.form.order_goods_id = options.order_id; this.order_id = options.order_id;
this.form.entrust_no = 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;
...@@ -184,9 +185,10 @@ ...@@ -184,9 +185,10 @@
this.form.abnormal_explain = val; this.form.abnormal_explain = val;
}, },
getData() { getData() {
this.request(API.getOrderDetailById, 'GET', { order_id: this.form.order_goods_id }, true).then(res => { this.request(API.getOrderDetailById, 'GET', { order_id: this.order_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];
this.form.order_goods_id = this.orderDetailByIdList.order_goods_id;
} else { } else {
uni.showToast({ uni.showToast({
title: res.err_msg, title: res.err_msg,
......
...@@ -391,6 +391,8 @@ ...@@ -391,6 +391,8 @@
this.getStayHandleCount(); this.getStayHandleCount();
if (this.box_sn && this.erp_order_sn && this.noexebshowFalg) { if (this.box_sn && this.erp_order_sn && this.noexebshowFalg) {
this.tallyData = [];
this.form = [];
this.getTallyData(); this.getTallyData();
} }
......
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