Browse Source

8月13号1点12之前git提交记录的修改

hella_vue3
zhang_li 3 months ago
parent
commit
ff0649af5e
  1. 883
      src/components/show-modal/show-modal.vue
  2. 2
      src/mycomponents/scan/winCheckFgLabel.vue
  3. 2
      src/mycomponents/scan/winScanFgLabel.vue
  4. 2
      src/mycomponents/scan/winScanPack.vue
  5. 225
      src/mycomponents/scan/winScanPackAndCont.vue
  6. 2
      src/mycomponents/scan/winScanPackAndLocation.vue
  7. 2
      src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
  8. 2
      src/mycomponents/scan/winScanPackAndPosition.vue
  9. 2
      src/mycomponents/scan/winScanPackJob.vue
  10. 9
      src/pages/index/index.vue
  11. 2
      src/pages/login/index.vue
  12. 2
      src/pages/putaway/record/putawayRecord.vue
  13. 250
      src/pages/repleinsh/record/directRepleinshRecord.vue
  14. 1
      src/pages/scrap/request/scrapRequestCreate.vue
  15. 3
      src/pages/unPlanned/record/issueRecord.vue

883
src/components/show-modal/show-modal.vue

@ -1,456 +1,441 @@
<template name="show-modal">
<view>
<u-modal v-model="show" :title-style="{color: 'red'}" :title="title" :showTitle="false"
:showConfirmButton="false" ref="modal">
<view class="slot-content">
<slot name="icon">
<image class="icon" :src="icon" />
</slot>
<scroll-view scroll-y="true" style="max-height: 200px;">
<rich-text class="content" :nodes="content">
</rich-text>
</scroll-view>
<view class='split_line'></view>
<slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;">
<view v-if="showCancelButton" class="cance_button" @tap="$u.throttle(cancelClose, 500)">
<text :style="{'color':cancelColor}">{{ cancelText }}</text>
</view>
<u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="$u.throttle(confirmClose, 500)">
<text :style="{'color':confirmColor}">{{confirmText}}</text>
<text v-if="showConfirmCountdown">({{seconds}}s关闭)</text>
</view>
</view>
</slot>
</view>
</u-modal>
</view>
<view>
<u-modal v-model="show" :title-style="{ color: 'red' }" :title="title" :showTitle="false" :showConfirmButton="false" ref="modal">
<view class="slot-content">
<slot name="icon">
<image class="icon" :src="icon" />
</slot>
<scroll-view scroll-y="true" style="max-height: 200px">
<rich-text class="content" :nodes="content"> </rich-text>
</scroll-view>
<view class="split_line"></view>
<slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%; height: 48px">
<view v-if="showCancelButton" class="cance_button" @tap="$u.throttle(cancelClose, 500)">
<text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view>
<u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="$u.throttle(confirmClose, 500)">
<text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view>
</view>
</slot>
</view>
</u-modal>
</view>
</template>
<script>
/**
* modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */
export default {
data() {
return {
timer: null,
show: false, //
iconType: '消息',
icon: '../../static/icons/error-circle.svg',
title: '', //
content: '', //
cancelText: '取消', //
confirmText: '确定', //
showCancel: true, // true
confirmColor: '#007aff', //
cancelColor: null, //
showConfirmButton: true, //
showConfirmCountdown: true, //
showCancelButton: true, //
showClose: false,
confirm: false, // true
cancel: false, // true
seconds: 0,
success: () => {} //
}
},
methods: {
open() {
this.show = true;
},
close() {
this.$.refs.modal.popupClose();
},
confirmClose() {
if (this.show) {
this.show = false;
clearInterval(this.timer) //timer
this.$.refs.modal.popupClose();
this.success({
// cancel: false,
confirm: true,
});
}
},
cancelClose() {
clearInterval(this.timer) //timer
this.$.refs.modal.popupClose();
this.success({
// cancel: true,
confirm: false,
});
},
// (
showConfirmMessageModal(mContent, callback) {
this.showConfirmModal("消息", mContent, callback);
},
// (
showConfirmSuccessModal(mContent, callback) {
this.showConfirmModal("成功", mContent, callback);
},
// (
showConfirmFailModal(mContent, callback) {
this.showConfirmModal("失败", mContent, callback);
},
// (
showConfirmWarningModal(mContent, callback) {
this.showConfirmModal("警告", mContent, callback);
},
// (
showConfirmQuestionModal(mContent, callback) {
this.showConfirmModal("疑问", mContent, callback);
},
// (
showConfirmModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
},
// (+
showSelectMessageModal(mContent, callback) {
this.showSelectModal("消息", mContent, callback);
},
// (+
showSelectSuccessModal(mContent, callback) {
this.showSelectModal("成功", mContent, callback);
},
// (+
showSelectFailModal(mContent, callback) {
this.showSelectModal("失败", mContent, callback);
},
// (+
showSelectWarningModal(mContent, callback) {
this.showSelectModal("警告", mContent, callback);
},
// (+
showSelectQuestionModal(mContent, callback) {
this.showSelectModal("疑问", mContent, callback);
},
// (+
showSelectModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
},
// (+)
showConfirmCountdownMessageModal(mContent, callback) {
this.showConfirmCountdownModal("消息", mContent, callback);
},
// (+)
showConfirmCountdownSuccessModal(mContent, callback) {
this.showConfirmCountdownModal("成功", mContent, callback);
},
// (+)
showConfirmCountdownFailModal(mContent, callback) {
this.showConfirmCountdownModal("失败", mContent, callback);
},
// (+)
showConfirmCountdownWarningModal(mContent, callback) {
this.showConfirmCountdownModal("警告", mContent, callback);
},
// (+)
showConfirmCountdownQuestionModal(mContent, callback) {
this.showConfirmCountdownModal("疑问", mContent, callback);
},
// (+)
showConfirmCountdownModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
showConfirmCountdown: true,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
},
// (++)
showSelectCountdownMessageModal(mContent, callback) {
this.showSelectCountdownModal("消息", mContent, callback);
},
// (++)
showSelectCountdownSuccessModal(mContent, callback) {
this.showSelectCountdownModal("成功", mContent, callback);
},
// (++)
showSelectCountdownFailModal(mContent, callback) {
this.showSelectCountdownModal("失败", mContent, callback);
},
// (++)
showSelectCountdownWarningModal(mContent, callback) {
this.showSelectCountdownModal("警告", mContent, callback);
},
// (++)
showSelectCountdownQuestionModal(mContent, callback) {
this.showSelectCountdownModal("疑问", mContent, callback);
},
// (++)
showSelectCountdownModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showConfirmCountdown: true,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
},
//
showModal(data) {
if (data.iconType) {
this.iconType = data.iconType
switch (data.iconType) {
case '消息':
this.icon = '/static/icons/error-circle.svg';
break;
case '成功':
this.icon = '/static/icons/checkmark-circle.svg';
break;
case '失败':
this.icon = '/static/icons/close-circle.svg';
break;
case '警告':
this.icon = '/static/icons/warning.svg';
break;
case '疑问':
this.icon = '/static/icons/question-circle.svg';
break;
default:
break;
}
}
// image
if (data.title) {
this.title = data.title
}
if (data.content) {
console.log(data.content);
this.content = data.content;
} else {
this.content = ''
}
if (data.cancelText) {
this.cancelText = data.cancelText
} else {
this.cancelText = '取消'
}
if (data.confirmText) {
this.confirmText = data.confirmText
} else {
this.confirmText = '确定'
}
if (data.showCancel === false || data.showCancel === true) {
this.showCancel = data.showCancel
} else {
this.showCancel = true
}
if (data.confirmColor) {
this.confirmColor = data.confirmColor
} else {
this.confirmColor = '#007aff'
}
if (data.cancelColor) {
this.cancelColor = data.cancelColor
} else {
this.cancelColor = '#666F83'
}
if (data.showConfirmButton === false || data.showConfirmButton === true) {
this.showConfirmButton = data.showConfirmButton
} else {
this.showConfirmButton = true
}
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) {
this.showConfirmCountdown = data.showConfirmCountdown
} else {
this.showConfirmCountdown = false
}
if (data.showCancelButton === false || data.showCancelButton === true) {
this.showCancelButton = data.showCancelButton
} else {
this.showCancelButton = true
}
if (data.success) {
this.success = data.success
} else {
this.success = () => {}
}
setTimeout(res => {
this.show = true;
}, 500)
if (this.showConfirmCountdown) {
this.startTimer();
}
},
startTimer() {
this.seconds = 3;
clearInterval(this.timer)
this.timer = setInterval(() => {
this.seconds--
// console.log("", this.seconds);
if (this.seconds <= 0) {
this.timeUp()
return
}
}, 1000)
},
timeUp() {
// clearInterval(this.timer)
console.log('时间到')
this.confirmClose();
},
},
}
/**
* modal 模态框
* @description 弹出模态框常用于消息提示消息确认在当前页面内完成特定的交互操作
* */
export default {
data() {
return {
timer: null,
show: false, //
iconType: '消息',
icon: '../../static/icons/error-circle.svg',
title: '', //
content: '', //
cancelText: '取消', //
confirmText: '确定', //
showCancel: true, // true
confirmColor: '#007aff', //
cancelColor: null, //
showConfirmButton: true, //
showConfirmCountdown: true, //
showCancelButton: true, //
showClose: false,
confirm: false, // true
cancel: false, // true
seconds: 0,
success: () => {} //
}
},
methods: {
open() {
this.show = true
},
close() {
this.$.refs.modal.popupClose()
},
confirmClose() {
if (this.show) {
this.show = false
clearInterval(this.timer) // timer
this.success({
// cancel: false,
confirm: true
})
}
},
cancelClose() {
clearInterval(this.timer) // timer
this.$refs.modal.popupClose()
this.success({
// cancel: true,
confirm: false
})
},
// (
showConfirmMessageModal(mContent, callback) {
this.showConfirmModal('消息', mContent, callback)
},
// (
showConfirmSuccessModal(mContent, callback) {
this.showConfirmModal('成功', mContent, callback)
},
// (
showConfirmFailModal(mContent, callback) {
this.showConfirmModal('失败', mContent, callback)
},
// (
showConfirmWarningModal(mContent, callback) {
this.showConfirmModal('警告', mContent, callback)
},
// (
showConfirmQuestionModal(mContent, callback) {
this.showConfirmModal('疑问', mContent, callback)
},
// (
showConfirmModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
},
// (+
showSelectMessageModal(mContent, callback) {
this.showSelectModal('消息', mContent, callback)
},
// (+
showSelectSuccessModal(mContent, callback) {
this.showSelectModal('成功', mContent, callback)
},
// (+
showSelectFailModal(mContent, callback) {
this.showSelectModal('失败', mContent, callback)
},
// (+
showSelectWarningModal(mContent, callback) {
this.showSelectModal('警告', mContent, callback)
},
// (+
showSelectQuestionModal(mContent, callback) {
this.showSelectModal('疑问', mContent, callback)
},
// (+
showSelectModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
},
// (+)
showConfirmCountdownMessageModal(mContent, callback) {
this.showConfirmCountdownModal('消息', mContent, callback)
},
// (+)
showConfirmCountdownSuccessModal(mContent, callback) {
this.showConfirmCountdownModal('成功', mContent, callback)
},
// (+)
showConfirmCountdownFailModal(mContent, callback) {
this.showConfirmCountdownModal('失败', mContent, callback)
},
// (+)
showConfirmCountdownWarningModal(mContent, callback) {
this.showConfirmCountdownModal('警告', mContent, callback)
},
// (+)
showConfirmCountdownQuestionModal(mContent, callback) {
this.showConfirmCountdownModal('疑问', mContent, callback)
},
// (+)
showConfirmCountdownModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
showConfirmCountdown: true,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
},
// (++)
showSelectCountdownMessageModal(mContent, callback) {
this.showSelectCountdownModal('消息', mContent, callback)
},
// (++)
showSelectCountdownSuccessModal(mContent, callback) {
this.showSelectCountdownModal('成功', mContent, callback)
},
// (++)
showSelectCountdownFailModal(mContent, callback) {
this.showSelectCountdownModal('失败', mContent, callback)
},
// (++)
showSelectCountdownWarningModal(mContent, callback) {
this.showSelectCountdownModal('警告', mContent, callback)
},
// (++)
showSelectCountdownQuestionModal(mContent, callback) {
this.showSelectCountdownModal('疑问', mContent, callback)
},
// (++)
showSelectCountdownModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showConfirmCountdown: true,
success(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true)
console.log('用户点击确定')
} else {
callback(false)
console.log('用户点击取消')
}
}
}
})
},
//
showModal(data) {
if (data.iconType) {
this.iconType = data.iconType
switch (data.iconType) {
case '消息':
this.icon = '/static/icons/error-circle.svg'
break
case '成功':
this.icon = '/static/icons/checkmark-circle.svg'
break
case '失败':
this.icon = '/static/icons/close-circle.svg'
break
case '警告':
this.icon = '/static/icons/warning.svg'
break
case '疑问':
this.icon = '/static/icons/question-circle.svg'
break
default:
break
}
}
// image
if (data.title) {
this.title = data.title
}
if (data.content) {
console.log(data.content)
this.content = data.content
} else {
this.content = ''
}
if (data.cancelText) {
this.cancelText = data.cancelText
} else {
this.cancelText = '取消'
}
if (data.confirmText) {
this.confirmText = data.confirmText
} else {
this.confirmText = '确定'
}
if (data.showCancel === false || data.showCancel === true) {
this.showCancel = data.showCancel
} else {
this.showCancel = true
}
if (data.confirmColor) {
this.confirmColor = data.confirmColor
} else {
this.confirmColor = '#007aff'
}
if (data.cancelColor) {
this.cancelColor = data.cancelColor
} else {
this.cancelColor = '#666F83'
}
if (data.showConfirmButton === false || data.showConfirmButton === true) {
this.showConfirmButton = data.showConfirmButton
} else {
this.showConfirmButton = true
}
if (data.showConfirmCountdown === false || data.showConfirmCountdown === true) {
this.showConfirmCountdown = data.showConfirmCountdown
} else {
this.showConfirmCountdown = false
}
if (data.showCancelButton === false || data.showCancelButton === true) {
this.showCancelButton = data.showCancelButton
} else {
this.showCancelButton = true
}
if (data.success) {
this.success = data.success
} else {
this.success = () => {}
}
setTimeout((res) => {
this.show = true
}, 500)
if (this.showConfirmCountdown) {
this.startTimer()
}
},
startTimer() {
this.seconds = 3
clearInterval(this.timer)
this.timer = setInterval(() => {
this.seconds--
// console.log("", this.seconds);
if (this.seconds <= 0) {
this.timeUp()
}
}, 1000)
},
timeUp() {
// clearInterval(this.timer)
console.log('时间到')
this.confirmClose()
}
}
}
</script>
<style lang="scss" scoped>
.slot-content {
font-size: 36rpx;
display: flex; //
flex-direction: column; //
align-items: center; //
// background-image: url()
}
.icon {
width: 70rpx;
height: 70rpx;
opacity: 1; //
margin-top: 16px;
}
.title {
font-size: 35rpx;
}
.content {
margin-top: 16px;
margin-bottom: 16px;
margin-left: 8px;
margin-right: 8px;
font-size: 32rpx;
text-align: center;
word-wrap: break-word;
word-break: break-all;
white-space: pre-line;
}
.cance_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_text {
// color: $uni-color-primary;
}
.def_text {
color: $uni-color-primary;
}
.slot-content {
font-size: 36rpx;
display: flex; //
flex-direction: column; //
align-items: center; //
// background-image: url()
}
.icon {
width: 70rpx;
height: 70rpx;
opacity: 1; //
margin-top: 16px;
}
.title {
font-size: 35rpx;
}
.content {
margin-top: 16px;
margin-bottom: 16px;
margin-left: 8px;
margin-right: 8px;
font-size: 32rpx;
text-align: center;
word-wrap: break-word;
word-break: break-all;
white-space: pre-line;
}
.cance_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_button {
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
font-size: 32rpx;
display: flex;
justify-content: center;
align-items: center;
}
.confirm_text {
// color: $uni-color-primary;
}
.def_text {
color: $uni-color-primary;
}
</style>

2
src/mycomponents/scan/winCheckFgLabel.vue

@ -1,6 +1,6 @@
<template>
<view>
<u-popup v-model="show" mode="bottom">
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<!-- <uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()"> -->
<view class="popup_box">
<view class="pop_title uni-flex space-between">

2
src/mycomponents/scan/winScanFgLabel.vue

@ -1,6 +1,6 @@
<template>
<view>
<u-popup v-model="show" mode="bottom">
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPack.vue

@ -1,6 +1,6 @@
<template>
<view>
<u-popup mode="bottom" v-model="show">
<u-popup mode="bottom" v-model="show" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

225
src/mycomponents/scan/winScanPackAndCont.vue

@ -1,135 +1,126 @@
<template>
<view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描 : {{title}}
</view>
<view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描 : {{ title }} </view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()"></image>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType" :isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import {
getContainerByNumber
} from '@/api/request2.js';
export default {
name: 'winScanPack',
components: {
winComScan,
},
props: {
title: {
type: String,
default: '箱标签或托标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType:{
type: String,
default: 'HPQ,HMQ,HCQ'
}
},
data() {
return {
show: false,
}
},
created() {
import winComScan from '@/mycomponents/scan/winComScan.vue'
import { getContainerByNumber } from '@/api/request2.js'
},
methods: {
openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
export default {
name: 'winScanPack',
components: {
winComScan
},
props: {
title: {
type: String,
default: '箱标签或托标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: 'HPQ,HMQ,HCQ'
}
},
data() {
return {
show: false
}
},
created() {},
methods: {
openScanPopup() {
setTimeout((res) => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close();
this.$emit("close", '');
},
closeScanPopup() {
this.$refs.popup.close()
this.$emit('close', '')
},
scanClick() {
this.$refs.comscan.clickScanMsg();
},
scanClick() {
this.$refs.comscan.clickScanMsg()
},
cancelClick() {
this.$refs.comscan.clearScanValue();
},
cancelClick() {
this.$refs.comscan.clearScanValue()
},
getScanResult(result) {
if (result.success) {
if(result.label.labelType=="ContainerLabel"){
this.getContainerByNumber(result);
}else {
this.$emit("getResult", result);
}
} else {
this.showMessage(result.message)
}
},
getContainerByNumber(result){
getContainerByNumber(result.label.container).then(res => {
if (res.data.list.length > 0) {
this.$emit("getResult", result);
} else {
this.showMessage('未查找到托码【' + result.label.container + '】');
}
}).catch(error => {
this.showMessage(error);
})
},
getScanResult(result) {
if (result.success) {
if (result.label.labelType == 'ContainerLabel') {
this.getContainerByNumber(result)
} else {
this.$emit('getResult', result)
}
} else {
this.showMessage(result.message)
}
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
getContainerByNumber(result) {
getContainerByNumber(result.label.container)
.then((res) => {
if (res.data.list.length > 0) {
this.$emit('getResult', result)
} else {
this.showMessage(`未查找到托码【${result.label.container}`)
}
})
.catch((error) => {
this.showMessage(error)
})
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
change(e) {
this.show = e.show
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus()
}
},
}
}
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus()
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message)
},
change(e) {
this.show = e.show
}
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

2
src/mycomponents/scan/winScanPackAndLocation.vue

@ -1,6 +1,6 @@
<template>
<view>
<u-popup v-model="show" mode="bottom">
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -1,6 +1,6 @@
<template>
<view>
<u-popup v-model="show" mode="bottom">
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPackAndPosition.vue

@ -1,6 +1,6 @@
<template>
<view>
<u-popup mode="bottom" v-model="isShow">
<u-popup mode="bottom" v-model="isShow" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPackJob.vue

@ -1,5 +1,5 @@
<template>
<u-popup v-model="show" mode="bottom">
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

9
src/pages/index/index.vue

@ -1,11 +1,7 @@
<template>
<view class="u-wrap">
<view class="serch">
<!-- <uni-search-bar class="flex1" placeholder="请输入菜单名称" @confirm="search" @input="input" cancelButton="none"
@clear="clearfilterlist">
</uni-search-bar> -->
<u-search placeholder="请输入菜单名称" v-model="serchval" bg-color="rgb(132,195,255)" shape="square" color="white" input-align="center" placeholder-color="white" :action-style="{ color: 'white' }" @search="search" :input-style="{ 'font-size': '30rpx' }" @clear="clearfilterlist"></u-search>
<!-- <button class="mini-btn" type="primary" size="mini" style="margin-right: 15rpx; font-size: 16px" @click="search">搜索</button> -->
<u-search placeholder="请输入菜单名称" v-model="serchval" bg-color="rgb(132,195,255)" shape="square" color="white" search-icon-color="white" input-align="center" placeholder-color="white" :action-style="{ color: 'white' }" @search="search" @custom="search" :input-style="{ 'font-size': '30rpx' }" @clear="clearfilterlist"></u-search>
</view>
<view class="item-container" style="align-items: center; width: 100%">
@ -136,7 +132,6 @@ onHide(() => {
})
onShow(() => {
if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) {
// uni.showModal({
uni.reLaunch({
url: '../login/index'
})
@ -332,7 +327,7 @@ const getDictory = () => {
const unitparams = {
filters: [],
pageNo: 1,
pageSize: 100
pageSize: 1000
}
getPackageUnitList(unitparams)
.then((unitres) => {

2
src/pages/login/index.vue

@ -167,7 +167,7 @@ const onchange = (e) => {
const { value } = e.detail
}
const changePassword = () => {
showPassword.value.vlaue = !showPassword.value.vlaue
showPassword.value = !showPassword.value
}
const showErrorMessage = (message) => {
console.log(comMessag1e.value)

2
src/pages/putaway/record/putawayRecord.vue

@ -41,7 +41,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { putawayRequestSubmit, putawayRecordSubmit, validateItemAndLocation, getPutawayRecommendLocation } from '@/api/request2.js'
import { putawayRecordSubmit, validateItemAndLocation, getPutawayRecommendLocation } from '@/api/request2.js'
import { goHome, updateTitle, getCurrDateTime, getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js'

250
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -5,28 +5,23 @@
</view>
<view class="page-wraper" v-if="detailSource.length > 0">
<view class="page-header">
<view class="header_item"> 来源库位 : {{ fromLocationCode }} </view>
<view class="split_line"></view>
<view class="page-header-box">
<view class="header_item u-p-t-20"> 来源库位 : {{ fromLocationCode }} </view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<recordDetailCard :dataContent="item" :index="index" :settingParam="dataContent" :isShowFromLocation="false" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </recordDetailCard>
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" :isShowFromLocation="false" @removeItem="removeItem(index, item)" :isShowToLocation="false" @updateData="updateData" @removePack="removePack"> </record-com-detail-card>
</view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class="uni-row uni-flex">
<text>生产线:</text>
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 20rpx">
{{ positionInfo }}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList" @confirm="confirmSelect"></u-select>
</view>
<view class="">
<requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation="getToLocationCode" :locationAreaTypeList="toLocationAreaTypeList"> </requiredLocation>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -44,15 +39,15 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import { repleinshRecordSubmit, getWorkShopLineStation } from '@/api/request2.js'
import { repleinshRecordSubmit, validateItemAndLocation, getPutawayRecommendLocation } from '@/api/request2.js'
import { goHome, getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js'
import { goHome, updateTitle, getCurrDateTime, getPackingNumberAndBatchByList, deepCopyData } from '@/common/basic.js'
import { calc } from '@/common/calc.js'
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcTreeHandleQty } from '@/common/record.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js'
import { getManagementPrecisions, getPrecisionStrategyList, getPrecisionStrategyParams } from '@/common/balance.js'
@ -71,7 +66,7 @@ const { proxy } = getCurrentInstance()
const id = ref('')
const dataContent = ref({})
const detailSource = ref([]) //
const fromLocationInfo = ref({})
// const fromLocationInfo = ref({})
const fromLocationCode = ref('')
const fromLocationAreaTypeList = ref([])
const toLocationAreaTypeList = ref([])
@ -82,16 +77,18 @@ const showToLoaction = ref(true)
const recommendLocationList = ref([]) //
const fromWarehouseCode = ref('') //
const businessTypeCode = ref('Repleinment')
const positionList = ref([])
const show = ref(false)
const positionInfo = ref('请选择生产线')
const toLocationCode = ref('')
const managementList = ref([])
// const positionList = ref([])
// const show = ref(false)
// const positionInfo = ref('线')
const comMessageRef = ref()
const show = ref(false)
const scanPopup = ref()
const scanLocationCode = ref()
onLoad((option) => {
clearData()
getBusinessType(typeCode, (res) => {
clear()
getBusinessType(businessTypeCode.value, (res) => {
if (res.success) {
businessType.value = res.businessType
fromLocationAreaTypeList.value = res.fromLocationAreaTypeList
@ -101,17 +98,6 @@ onLoad((option) => {
showErrorMessage(res.message)
}
})
getWorkShopLineStation()
.then((res) => {
if (res.data != null && res.data.length > 0) {
positionList.value = res.data
} else {
showErrorMessage('未查找到位置信息')
}
})
.catch((error) => {
showErrorMessage(error)
})
})
//
onNavigationBarButtonTap((e) => {
@ -124,6 +110,8 @@ const getScanResult = (result) => {
const { balance } = result
const { label } = result
const pack = result.package
const { packUnit } = pack
const { packQty } = pack
const item = detailSource.value.find((res) => {
if (res.itemCode == balance.itemCode) {
return res
@ -133,134 +121,45 @@ const getScanResult = (result) => {
fromWarehouseCode.value = balance.warehouseCode
}
if (item == undefined) {
//
// this.getRecommendLocation(balance, pack, toLocation => {
const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) //
// newDetail.toLocationCode = toLocation.code;
// newDetail.toWarehouseCode = toLocation.warehouseCode;
const newDetail = createDetailInfo(balance, pack)
newDetail.packUnit = packUnit || ''
newDetail.packQty = packQty
itemp.subList.push(newDetail)
const dataList = pack.subList
detailSource.value.push(itemp)
detailSource.value.forEach((res) => {
res.subList.forEach((pack) => {
pack.packList = dataList.filter((c) => c.parentNumber == pack.packingNumber)
pack.packList.forEach((pac) => {
pac.parentPackingNumber = pac.parentNumber
pac.packingNumber = pac.number
pac.inventoryStatus = 'OK'
pac.scaned = true
})
})
})
// })
calcHandleQty(detailSource.value)
} else {
const itemDetail = item.subList.find((r) => r.packingNumber == balance.packingNumber && r.batch == balance.batch)
if (itemDetail != undefined) {
const detail = item.subList.find((r) => {
if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) {
return r
}
})
if (detail == undefined) {
const newDetail = createDetailInfo(balance, pack)
newDetail.packUnit = packUnit
newDetail.packQty = packQty
item.subList.push(newDetail)
calcHandleQty(detailSource.value)
} else if (detail.scaned == true) {
showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`)
}
}
// calcTreeHandleQty(this.detailSource);
}
//
const getRecommendLocation = (balance, pack, callback) => {
uni.showLoading({
title: '扫描中...',
mask: true
})
const recommend = recommendLocationList.value.find((r) => r.itemCode == balance.itemCode)
if (recommend == undefined) {
const param = {
itemCode: balance.itemCode,
batch: balance.batch,
inventoryStatus: balance.inventoryStatus,
supplierCode: pack.supplierCode,
businessCode: businessTypeCode.value
}
getPutawayRecommendLocation(param)
.then((res) => {
recommendLocationList.value.push({
itemCode: balance.itemCode,
locationCode: res.data.code
})
callback(res.data)
uni.hideLoading()
})
.catch((error) => {
uni.hideLoading()
showErrorMessage(error)
})
} else {
callback(recommend)
}
}
const calcTreeHandleQty = () => {
for (const item of detailSource.value) {
item.qty = 0
for (const detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty, detail.qty)
}
const updateData = () => {
calcHandleQty(detailSource.value)
for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i]
if (item.qty == 0) {
detailSource.value.splice(i, 1)
}
}
}
const showSelect = () => {
// if (this.editPosition) {
show.value = true
// }
}
const confirmSelect = (e) => {
positionInfo.value = `${e[0].label}-${e[1].label}-${e[2].label}`
workshopCode.value = e[0].value
productionLineCode.value = e[1].value
workStationCode.value = e[2].value
workShopName.value = e[0].label
productionLineName.value = e[1].label
workStationName.value = e[2].label
const shop = positionList.value.find((shop) => shop.value == workshopCode.value)
if (shop != undefined && shop.children != undefined) {
const prodLine = shop.children.find((line) => line.value == productionLineCode.value)
if (prodLine != undefined && prodLine.children != undefined) {
const station = prodLine.children.find((r) => r.value == workStationCode.value)
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
showErrorMessage(`${workStationName.value}的原材料库位为空,请重新选择`)
return
}
rawLocationCode.value = station.rawLocationCode
fgLocationCode.value = station.fgLocationCode
} else {
showErrorMessage('生产线-工位基础信息维护错误')
}
} else {
showErrorMessage('车间-生产线基础信息维护错误')
}
//
let toLocationCode = ''
positionList.value.forEach((item) => {
if (workshopCode.value == item.value) {
//
item.children.find((child) => {
if (productionLineCode.value == child.value) {
toLocationCode = child.children.find((subChild) => workStationCode.value == subChild.value).rawLocationCode
}
})
}
})
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
detail.toLocationCode = toLocationCode
})
})
}
const removeItem = (index, item) => {
detailSource.value.splice(index, 1)
updateData()
}
const removePack = () => {
@ -299,6 +198,18 @@ const scanPopupGetFocus = () => {
}
const commit = () => {
if (toLocationCode.value == '') {
showMessage('请输入目标库位')
return
}
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
detail.toLocationCode = toLocationCode.value
detail.fromLocation = fromLocationCode.value
})
})
uni.showLoading({
title: '提交中....',
mask: true
@ -310,7 +221,7 @@ const commit = () => {
getPrecisionStrategyList(precisionStrategyParams, (res) => {
if (res.success) {
managementList.value = res.list
const params = { ...setRecordParams() }
const params = setRecordParams()
repleinshRecordSubmit(params)
.then((res) => {
@ -332,40 +243,13 @@ const commit = () => {
})
}
const getItemAndLocationRelations = () => {
const itemList = []
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
detail.toLocationCode = toLocationCode.value
const filterResult = itemList.filter((res) => {
if (res.itemCode == item.itemCode && res.locationCode == detail.toLocationCode && res.batch == detail.batch && res.inventoryStatus == detail.inventoryStatus) {
return res
}
})
//
if (filterResult.length == 0) {
const result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode,
batch: detail.batch,
inventoryStatus: detail.inventoryStatus
}
itemList.push(result)
}
}
})
})
return itemList
}
const setRecordParams = () => {
const subList1 = []
const creator = store.id
detailSource.value.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
const info = getPackingNumberAndBatchByList(managementL.valueist, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch)
const info = getPackingNumberAndBatchByList(managementList.value, detail.itemCode, detail.packingNumber, detail.toLocationCode, detail.batch)
const submitItem = deepCopyData(detail)
submitItem.toPackingNumber = info.packingNumber
submitItem.toBatch = info.batch
@ -391,7 +275,11 @@ const setRecordParams = () => {
toBatch: info.batch,
fromLocationCode: detail.locationCode,
toLocationCode: detail.toLocationCode,
handleQty: detail.handleQty
handleQty: detail.handleQty,
fromPackUnit: detail.packUnit,
toPackUnit: detail.packUnit,
fromPackQty: detail.packQty,
toPackQty: detail.packQty
}
]
subList1.push(submitItem)
@ -434,7 +322,6 @@ const getLocation = (location, code) => {
}
const getFromLocationCode = (location, code) => {
fromLocationInfo.value = location
fromLocationCode.value = code
openScanPopup()
}
@ -451,23 +338,14 @@ const getToLocationCode = (location, code) => {
const showCommitSuccessMessage = (hint) => {
comMessageRef.value.showSuccessMessage(hint, (res) => {
clearData()
clear()
})
}
const updateData = () => {
for (let i = 0; i < detailSource.value.length; i++) {
const item = detailSource.value[i]
if (item.qty == 0) {
detailSource.value.splice(i, 1)
}
}
}
const clearData = () => {
fromLocationInfo.value = {}
const clear = () => {
fromLocationCode.value = ''
fromWarehouseCode.value = ''
toWarehouseCode.value = ''
detailSource.value = []
toLocationCode.value = ''
}
</script>

1
src/pages/scrap/request/scrapRequestCreate.vue

@ -225,7 +225,6 @@ const setRequestParams = () => {
dataContent.value.subList = subList
dataContent.value.status = 1
dataContent.value.fromWarehouseCode = 'W1'
dataContent.value.dueTime = getCurrDateOneMonthsTimes()
return dataContent.value
}

3
src/pages/unPlanned/record/issueRecord.vue

@ -210,12 +210,13 @@ const setParams = () => {
submitItem.reason = reasonCode.value
submitItem.qty = detail.handleQty
submitItem.package = ''
submitItem.detailDataType = 1
subList.push(submitItem)
}
})
})
dataContent.value.dataType = 1
dataContent.value.subList = subList
dataContent.value.creator = creator
return dataContent.value

Loading…
Cancel
Save