Browse Source

Merge branch 'dev' into pre-production

pre-production
pref_mail@163.com 9 months ago
parent
commit
0dd5b1bad9
  1. BIN
      public/img/load.gif
  2. 26
      src/api/wel/index.js
  3. 182
      src/components/webCameraIMG/webCamera.vue
  4. 52
      src/option/distribution/zeroAdditionalRecording.js
  5. 3
      src/views/distribution/artery/VehicleStowage.vue
  6. 49
      src/views/system/pdaversion/pdaversionManage.vue
  7. 258
      src/views/wel/index2.vue

BIN
public/img/load.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

26
src/api/wel/index.js

@ -90,3 +90,29 @@ export const postUnloadAbnormalData = data => {
data,
});
};
/**
* 配送数据
* @param {Object} data
* @returns
*/
export const postDeliveryData = data => {
return request({
url: '/api/logpm-report-tjj/warehouseIndex/deliveryData',
method: 'post',
data,
});
};
/**
* 签收数据
* @param {Object} data
* @returns
*/
export const postSignforData = data => {
return request({
url: '/api/logpm-report-tjj/warehouseIndex/signforData',
method: 'post',
data,
});
};

182
src/components/webCameraIMG/webCamera.vue

@ -3,17 +3,35 @@
<el-tabs type="border-card">
<el-tab-pane label="拍摄">
<div>
<el-button type="primary" @click="Deviceinitialization">启动摄像头</el-button>
<el-button type="primary" @click="Turnoffcamera">关闭摄像头</el-button>
<el-button type="primary" @click="view1_scan">点击拍摄</el-button>
<el-button type="primary" @click="Rotatingcamera(90)">旋转摄像头</el-button>
<el-button type="primary" @click="Enlargeimage">放大图片</el-button>
<el-button type="primary" @click="Reduceimage">缩小图像</el-button>
<!-- <el-button type="primary" @click="Opentrimming" :disabled="!IMG_startUp">{{
IMG_Trimming_edge ? '关闭裁边' : '开启裁边'
}}</el-button> -->
<!-- <el-button type="primary" @click="view1_scan" :disabled="!IMG_startUp"
>点击拍摄</el-button
> -->
</div>
<div class="IMG_VIEW_container">
<!-- 主摄像头 -->
<div class="IMG_VIEW1">
<img id="IMG_VIEW1" v-if="IMG_camera" ref="IMG_VIEW" src="#" alt="主摄像头" />
<img id="IMG_VIEW1" v-if="IMG_camera" ref="IMG_VIEW" src="../../../public/img/load.gif" alt="主摄像头" />
<!-- <el-icon v-if="!IMG_startUp" @click="Deviceinitialization" class="SwitchButton"
><SwitchButton
/></el-icon> -->
<div class="el_icon" v-if="IMG_startUp">
<el-tooltip effect="dark" :content="IMG_Trimming_edge ? '关闭裁边' : '开启裁边'">
<el-icon
:style="{ color: IMG_Trimming_edge ? 'red' : '#fff' }"
@click="Opentrimming"
><Crop
/></el-icon>
</el-tooltip>
<el-tooltip effect="dark" content="点击拍摄">
<el-icon @click="view1_scan"><CameraFilled /></el-icon>
</el-tooltip>
<el-tooltip effect="dark" content="旋转摄像头">
<el-icon @click="Rotatingcamera(90)"><RefreshRight /></el-icon>
</el-tooltip>
</div>
</div>
<!-- 缩略图 -->
@ -36,18 +54,59 @@ const IMG_camera = ref(false); // 摄像头状态
const IMG_URL = 'http://127.0.0.1:38088/video=stream&camidx=0'; //
const IMG_VIEW = ref(null); //
const IMG_Thumbnail = ref(null); //
let IMG_API = reactive('/api/blade-resource/oss/endpoint/put-file');
let zoom = reactive(5); //
const IMG_TITLE=ref('设备正在初始化中...')
let IMG_Trimming_edge = ref(false); //
let IMG_startUp = ref(false); //
let IMG_API = ref('/api/blade-resource/oss/endpoint/put-file');
let zoom = ref(5); //
const $emit = defineEmits(['upload-success']);
//
const Getdevicestatus = () => {};
//(/)
const Opentrimming = () => {
IMG_Trimming_edge.value = !IMG_Trimming_edge.value;
if (IMG_Trimming_edge.value) {
ElMessage({ message: '图像裁边已开启', type: 'success' });
mylog('图像裁边已开启');
} else {
ElMessage({ message: '图像裁边已关闭', type: 'success' });
mylog('图像裁边已关闭');
}
};
//
const FrameSelectImage = () => {
let data = {
filepath: '', // a
left: 0,
top: 0,
right: 100,
bottom: 100,
};
axios.post('/imgapi/select=imagearea', JSON.stringify(data)).then(res => {
console.log(res, '框选图片');
});
};
//
const Deviceinitialization = () => {
IMG_camera.value = true; //
// 线
let TIME_IMG_VIEW = setTimeout(() => {
if (IMG_VIEW.value) {
IMG_startUp.value = true; //
IMG_VIEW.value.src = IMG_URL; //
IMG_TITLE.value=''
ElMessage({ message: '摄像头已启动', type: 'success' });
mylog('摄像头已启动');
}
clearTimeout(TIME_IMG_VIEW);
}, 50);
}, 2000);
};
//
const onLoad=()=>{
Deviceinitialization();//
}
onLoad()
//
const mylog = val => {
let element = document.getElementById('log');
@ -57,17 +116,14 @@ const mylog = val => {
};
// API
const zoomAPI = () => {
const zoomAPI = attribute => {
let data = {
action: '0',
corp: zoom,
camidx: '0', // 0:1:
corp: JSON.stringify(zoom.value), // 0~909
};
axios
.post('/imgapi/stream=zoominout', data)
.then(() => {
IMG_camera.value = false; //
Deviceinitialization()
})
.post('/imgapi/stream=zoominout', JSON.stringify(data))
.then(() => {})
.catch(error => {
console.error('请求出错', error);
});
@ -75,26 +131,26 @@ const zoomAPI = () => {
//
const Enlargeimage = () => {
if (zoom == 9) {
if (zoom.value == 9) {
ElMessage({
message: '已经最大了',
type: 'warning',
});
return;
}
zoom += 1;
zoom.value += 1;
zoomAPI();
};
//
const Reduceimage = () => {
if (zoom == 0) {
if (zoom.value == 0) {
ElMessage({
message: '已经最小了',
type: 'warning',
});
return;
}
zoom -= 1;
zoom.value -= 1;
zoomAPI();
};
@ -106,9 +162,10 @@ const Turnoffcamera = () => {
axios
.post('/imgapi/video=close', data)
.then(() => {
if (IMG_VIEW.value) {
IMG_VIEW.value.src = '';
}
IMG_VIEW.value.src = ''; //
IMG_startUp.value = false; //
ElMessage({ message: '摄像头已关闭', type: 'success' });
mylog('摄像头已关闭');
IMG_camera.value = false; //
})
.catch(error => {
@ -133,17 +190,32 @@ const base64ToBlob = (base64, mime) => {
};
//
const Upload_Images = blob => {
const Upload_Images = file => {
// FormData
const formData = new FormData();
formData.append('file', blob);
//
const filename = file.name || 'image.jpg'; //
const filetype = file.type || 'image/jpeg'; //
// 使File
const fileBlob = new Blob([file], { type: filetype });
const fileWithMetadata = new File([fileBlob], filename, { type: filetype });
// FormData
formData.append('file', fileWithMetadata);
// 使axiosPOST
axios
.post(IMG_API, formData, {
.post(IMG_API.value, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
})
.then(res => {
console.log(res, '图片上传成功');
//
$emit('upload-success', res);
})
.catch(error => {
console.error('上传失败', error);
@ -165,10 +237,11 @@ const IMG_add = img_base64 => {
mylog('添加缩略图成功');
}
console.log(img, 'img');
// Upload_Images(blob);//
Upload_Images(blob); //
console.log(url, 'blob');
};
//
const Rotatingcamera = angle => {
// angle:
@ -178,15 +251,17 @@ const Rotatingcamera = angle => {
mylog('旋转摄像头成功');
});
};
//
let view1_scan = () => {
let view1_scan = async () => {
let data = {
filepath: 'base64',
rotate: '0',
cutpage: '0',
camidx: '0',
ColorMode: '0',
quality: '3',
filepath: 'base64', //["", "D:\\1.jpg", "base64"]
rotate: '0', // 90"0"
camidx: '0', // 0:1:
ColorMode: '0', // 0 1 2 3 4() 5:()
deskew: IMG_Trimming_edge.value ? '1' : '0', //0:1:()
bAutoAdjust: '0', // 0 1
quality: '2', //0:1:2:3:4:5:
};
axios.post('/imgapi/video=grabimage', JSON.stringify(data)).then(res => {
console.log(res, '图片地址');
@ -195,7 +270,7 @@ let view1_scan = () => {
return ElMessage.error('拍摄失败请重新尝试');
}
ElMessage({ message: '拍摄成功', type: 'success' });
IMG_add(res.data.photoBase64);
IMG_add(res.data.photoBase64); //
});
};
</script>
@ -226,10 +301,43 @@ let view1_scan = () => {
width: 60%;
height: 300px;
border: 1px solid red;
position: relative;
background-color: #000;
img {
width: 100%;
height: 100%;
}
.el_icon {
position: absolute;
bottom: 10px;
left: 50%;
transform: translate(-50%, 0);
font-size: 25px;
color: #fff;
}
.el_icon {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.el_icon i {
margin: 0 10px;
}
.el_icon i:active {
color: #2196f3;
}
.SwitchButton {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 25px;
color: #fff;
}
.SwitchButton:active {
color: #2196f3;
}
}
/* 缩略图 */
#suoluetu {

52
src/option/distribution/zeroAdditionalRecording.js

@ -97,8 +97,8 @@ export const oldColumnList = [
sortable: true,
},
{
prop: 'totalNum',
label: '件数',
prop: 'planNum',
label: '计划件数',
type: 1,
values: '',
width: '130',
@ -107,8 +107,8 @@ export const oldColumnList = [
sortable: true,
},
{
prop: 'stockNum',
label: '在库件数',
prop: 'realNum',
label: '装车件数',
type: 1,
values: '',
width: '130',
@ -127,7 +127,7 @@ export const oldColumnList = [
sortable: true,
},
{
prop: 'weight',
prop: 'totalWeight',
label: '重量(KG)',
type: 1,
values: '',
@ -137,7 +137,7 @@ export const oldColumnList = [
sortable: true,
},
{
prop: 'volume',
prop: 'totalVolume',
label: '体积',
type: 1,
values: '',
@ -147,7 +147,7 @@ export const oldColumnList = [
sortable: true,
},
{
prop: 'totalFreight',
prop: 'freight',
label: '运费',
type: 1,
values: '',
@ -278,8 +278,8 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'totalNum',
label: '件数',
prop: 'planNum',
label: '计划件数',
type: 2,
values: '',
width: '130',
@ -288,17 +288,7 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'stockNum',
label: '在库件数',
type: 2,
values: '',
width: '130',
checkarr: [],
fixed: false,
sortable: true,
},
{
prop: 'loadingNum',
prop: 'realNum',
label: '装车件数',
type: 2,
values: '',
@ -307,6 +297,16 @@ export const newColumnList = [
fixed: false,
sortable: true,
},
// {
// prop: 'loadingNum',
// label: '装车件数',
// type: 2,
// values: '',
// width: '130',
// checkarr: [],
// fixed: false,
// sortable: true,
// },
{
prop: 'price',
label: '单价',
@ -318,9 +318,9 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'weight',
prop: 'totalWeight',
label: '重量(KG)',
type: 2,
type: 1,
values: '',
width: '130',
checkarr: [],
@ -328,9 +328,9 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'volume',
prop: 'totalVolume',
label: '体积',
type: 2,
type: 1,
values: '',
width: '130',
checkarr: [],
@ -338,9 +338,9 @@ export const newColumnList = [
sortable: true,
},
{
prop: 'totalFreight',
prop: 'freight',
label: '运费',
type: 2,
type: 1,
values: '',
width: '130',
checkarr: [],

3
src/views/distribution/artery/VehicleStowage.vue

@ -724,7 +724,8 @@ const permissionObj = reactive({
}),
/** 配置直发商家 */
VehicleStowage_handleDirectGoMarketVesited: computed(() => {
return $store.getters.permission.VehicleStowage_handleDirectGoMarketVesited;
// return $store.getters.permission.VehicleStowage_handleDirectGoMarketVesited;
return true;
}),
/** 签收详情 */
VehicleStowage_handleDirectGoMarketDetails: computed(() => {

49
src/views/system/pdaversion/pdaversionManage.vue

@ -439,16 +439,51 @@ export default {
uploadBefore(file, done, loading, column) {
return true; // true false
},
async customUploadRequest({file}){
console.log(file,'文件上传');
const response = await this.$fileslicing(this, file);//()
if(response.code && response.code == 200){
this.form.filelink = response.data.domain + response.data.name
async customUploadRequest({ file }) {
try {
console.log(file, '文件上传');
const responses = await this.$fileslicing(this, file); // ()
console.log(responses, 'responses');
let time= setTimeout(()=>{
let response=responses
if (response && response.code === 200) {
// this.form.filelink
if (!this.form.filelink) {
this.form.filelink = [];
console.log('初始化 this.form.filelink 为空数组');
}
//
if (!this.form.filelink[0]) {
this.form.filelink[0] = { response: { data: {} } };
console.log('初始化 this.form.filelink[0] 为 { response: { data: {} } }');
} else {
if (!this.form.filelink[0].response) {
this.form.filelink[0].response = { data: {} };
console.log('初始化 this.form.filelink[0].response 为 { data: {} }');
}
if (!this.form.filelink[0].response.data) {
this.form.filelink[0].response.data = {};
console.log('初始化 this.form.filelink[0].response.data 为 {}');
}
}
console.log('在赋值之前的 this.form.filelink:', this.form.filelink);
this.form.filelink[0].response.data.link = response.data.domain + response.data.name;
console.log('赋值之后的 this.form.filelink:', this.form.filelink);
} else {
console.error('文件上传失败或响应无效', response);
}
console.log(response,'文件上传返回值');
},
clearTimeout(time)
},0)
} catch (error) {
console.error('文件上传过程中发生错误', error);
}
},
handleSubmit() {
if (!this.form.id) {
console.log( this.form.filelink,' this.form.filelink');
this.form.link = this.form.filelink[0].response.data.link;
this.form.versionCode = this.form.versionName.split('.').join('');
this.form.newTypes = this.form.link.indexOf('wgt') == -1 ? '1' : '2';

258
src/views/wel/index2.vue

@ -575,7 +575,11 @@
<!-- 当前配送数据 && 签收数据 -->
<div class="flex mb10 row_fourthly">
<!-- 当前配送数据 -->
<div class="mr10 box1 view_box" style="width: 40%">
<div
class="mr10 box1 view_box"
style="width: 40%"
v-loading="details.loadingObj.deliveryData"
>
<!-- 标题 -->
<div class="flex-c-sb mb20">
<div class="align_center">
@ -649,12 +653,200 @@
</div>
<!-- 签收数据 -->
<div class="flex1 box2 view_box">
<div class="flex1 box2 view_box" v-loading="details.loadingObj.signforData">
<!-- 标题 -->
<div class="align_center mb20">
<img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" />
<div class="align_center mb20 flex-c-sb">
<div class="flex">
<img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" />
<div class="title">签收数据</div>
<div class="title">签收数据</div>
</div>
<div class="align_center">
<div
:class="{ button: true, active: abnormal_status === 'day' }"
@click="() => (abnormal_status = 'day')"
>
当天
</div>
<div
:class="{ button: true, active: abnormal_status === 'month' }"
@click="() => (abnormal_status = 'month')"
>
当月
</div>
</div>
</div>
<div class="border pd10 flex-c-sb">
<div class="text_center">
<div class="data_box mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>已签收</span>
</div>
</div>
<div class="text_center">
<div class="data_box orange mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>未签收</span>
</div>
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">16899</div>
<div class="">%</div>
</div>
<div class="">
<span>签收率</span>
</div>
</div>
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>文员签收数</span>
</div>
</div>
<div class="text_center">
<div class="data_box purple mb10">
<div class="data mr5px">16899</div>
<div class="">%</div>
</div>
<div class="">
<span>文员签收率</span>
</div>
</div>
<div class="text_center">
<div class="data_box red mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>超时签收</span>
</div>
</div>
<div class="text_center">
<div class="data_box red mb10">
<div class="data mr5px">168991</div>
<div class="">%</div>
</div>
<div class="">
<span>签收超时率</span>
</div>
</div>
</div>
</div>
</div>
<!-- 当前配送数据 && 签收数据 -->
<div class="flex mb10 row_fourthly">
<!-- 当前配送数据 -->
<div
class="mr10 box1 view_box"
style="width: 40%"
v-loading="details.loadingObj.deliveryData"
>
<!-- 标题 -->
<div class="flex-c-sb mb20">
<div class="align_center">
<img class="mr10 img_13pt" src="@/static/icon_data.png" alt="" />
<div class="title">当前配送数据 -- 自提</div>
</div>
</div>
<!-- 数据 -->
<div class="border pd10 flex-c-sb">
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>配送计划总数</span>
</div>
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">{{ deliveryDataBill }}</div>
<div class=""></div>
</div>
<div class="">
<span>总作业</span>
</div>
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">16899</div>
<div class="">kg</div>
</div>
<div class="">
<span>总重量</span>
</div>
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>总方数</span>
</div>
</div>
<div class="text_center">
<div class="data_box blue mb10">
<div class="data mr5px">16899</div>
<div class=""></div>
</div>
<div class="">
<span>在途件数</span>
</div>
</div>
</div>
</div>
<!-- 签收数据 -->
<div class="flex1 box2 view_box" v-loading="details.loadingObj.signforData">
<!-- 标题 -->
<div class="align_center mb20 flex-c-sb">
<div class="flex">
<img class="mr10 img_13pt" src="@/static/icon_money.png" alt="" />
<div class="title">签收数据 -- 自提</div>
</div>
<div class="align_center">
<div
:class="{ button: true, active: abnormal_status === 'day' }"
@click="() => (abnormal_status = 'day')"
>
当天
</div>
<div
:class="{ button: true, active: abnormal_status === 'month' }"
@click="() => (abnormal_status = 'month')"
>
当月
</div>
</div>
</div>
<div class="border pd10 flex-c-sb">
@ -743,6 +935,8 @@ import {
postTrunklineCarsData,
postTrunklineHandOrderData,
postUnloadAbnormalData,
postDeliveryData,
postSignforData,
} from '@/api/wel/index';
const details = reactive({
@ -814,6 +1008,8 @@ const details = reactive({
unloadDayNum: 0,
unloadMonthNum: 0,
},
/** 配送数据 */
deliveryDataInfo: [],
loadingObj: {
/** 开单数据 */
openOrderData: false,
@ -829,9 +1025,15 @@ const details = reactive({
trunklineCarsData: false,
/** 异常卸车数据 */
unloadAbnormalData: false,
/** 配送数据 */
deliveryData: false,
/** 签收数据 */
signforData: false,
},
});
const deliveryDataBill = computed(() => {});
const isActive = ref(false);
/** 异常数据状态 */
@ -942,14 +1144,46 @@ const initUnloadAbnormalData = async () => {
}
};
/** 配送数据 */
const initDeliveryData = async () => {
try {
details.loadingObj.deliveryData = true;
const res = await postDeliveryData({});
const { code, data } = res.data;
if (code !== 200) return;
details.deliveryDataInfo = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.deliveryData = false;
}
};
/** 签收数据 */
const initSignforData = async () => {
try {
details.loadingObj.signforData = true;
const res = await postSignforData({});
const { code, data } = res.data;
if (code !== 200) return;
details.unloadAbnormalDataInfo = data;
} catch (error) {
console.log('error :>> ', error);
} finally {
details.loadingObj.signforData = false;
}
};
const handleRefresh = () => {
initAllocationData();
initHandOrderData();
initOpenOrderData();
initOpenOrderIncome();
initTrunklineCarsData();
initTrunklineHandOrderData();
initUnloadAbnormalData();
// initAllocationData();
// initHandOrderData();
// initOpenOrderData();
// initOpenOrderIncome();
// initTrunklineCarsData();
// initTrunklineHandOrderData();
// initUnloadAbnormalData();
// initDeliveryData();
initSignforData();
};
handleRefresh();

Loading…
Cancel
Save