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

2
src/mycomponents/scan/winCheckFgLabel.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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()"> --> <!-- <uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()"> -->
<view class="popup_box"> <view class="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">

2
src/mycomponents/scan/winScanFgLabel.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> <view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPack.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> <view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

225
src/mycomponents/scan/winScanPackAndCont.vue

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

2
src/mycomponents/scan/winScanPackAndLocation.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> <view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> <view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPackAndPosition.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <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="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> <view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

2
src/mycomponents/scan/winScanPackJob.vue

@ -1,5 +1,5 @@
<template> <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="popup_box">
<view class="pop_title uni-flex space-between"> <view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view> <view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>

9
src/pages/index/index.vue

@ -1,11 +1,7 @@
<template> <template>
<view class="u-wrap"> <view class="u-wrap">
<view class="serch"> <view class="serch">
<!-- <uni-search-bar class="flex1" placeholder="请输入菜单名称" @confirm="search" @input="input" cancelButton="none" <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>
@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> -->
</view> </view>
<view class="item-container" style="align-items: center; width: 100%"> <view class="item-container" style="align-items: center; width: 100%">
@ -136,7 +132,6 @@ onHide(() => {
}) })
onShow(() => { onShow(() => {
if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) { if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) {
// uni.showModal({
uni.reLaunch({ uni.reLaunch({
url: '../login/index' url: '../login/index'
}) })
@ -332,7 +327,7 @@ const getDictory = () => {
const unitparams = { const unitparams = {
filters: [], filters: [],
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 1000
} }
getPackageUnitList(unitparams) getPackageUnitList(unitparams)
.then((unitres) => { .then((unitres) => {

2
src/pages/login/index.vue

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

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

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

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

@ -5,28 +5,23 @@
</view> </view>
<view class="page-wraper" v-if="detailSource.length > 0"> <view class="page-wraper" v-if="detailSource.length > 0">
<view class="page-header"> <view class="page-header">
<view class="header_item"> 来源库位 : {{ fromLocationCode }} </view> <view class="page-header-box">
<view class="split_line"></view> <view class="header_item u-p-t-20"> 来源库位 : {{ fromLocationCode }} </view>
</view>
</view> </view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%"> <view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class="uni-row uni-flex"> <view class="">
<text>生产线:</text> <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" @getLocation="getToLocationCode" :locationAreaTypeList="toLocationAreaTypeList"> </requiredLocation>
<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> </view>
<view class="uni-flex uni-row"> <view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -44,15 +39,15 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue' import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app' 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 { calc } from '@/common/calc.js'
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.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' import { getManagementPrecisions, getPrecisionStrategyList, getPrecisionStrategyParams } from '@/common/balance.js'
@ -71,7 +66,7 @@ const { proxy } = getCurrentInstance()
const id = ref('') const id = ref('')
const dataContent = ref({}) const dataContent = ref({})
const detailSource = ref([]) // const detailSource = ref([]) //
const fromLocationInfo = ref({}) // const fromLocationInfo = ref({})
const fromLocationCode = ref('') const fromLocationCode = ref('')
const fromLocationAreaTypeList = ref([]) const fromLocationAreaTypeList = ref([])
const toLocationAreaTypeList = ref([]) const toLocationAreaTypeList = ref([])
@ -82,16 +77,18 @@ const showToLoaction = ref(true)
const recommendLocationList = ref([]) // const recommendLocationList = ref([]) //
const fromWarehouseCode = ref('') // const fromWarehouseCode = ref('') //
const businessTypeCode = ref('Repleinment') const businessTypeCode = ref('Repleinment')
const positionList = ref([]) const toLocationCode = ref('')
const show = ref(false) const managementList = ref([])
const positionInfo = ref('请选择生产线') // const positionList = ref([])
// const show = ref(false)
// const positionInfo = ref('线')
const comMessageRef = ref() const comMessageRef = ref()
const show = ref(false) const show = ref(false)
const scanPopup = ref() const scanPopup = ref()
const scanLocationCode = ref() const scanLocationCode = ref()
onLoad((option) => { onLoad((option) => {
clearData() clear()
getBusinessType(typeCode, (res) => { getBusinessType(businessTypeCode.value, (res) => {
if (res.success) { if (res.success) {
businessType.value = res.businessType businessType.value = res.businessType
fromLocationAreaTypeList.value = res.fromLocationAreaTypeList fromLocationAreaTypeList.value = res.fromLocationAreaTypeList
@ -101,17 +98,6 @@ onLoad((option) => {
showErrorMessage(res.message) 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) => { onNavigationBarButtonTap((e) => {
@ -124,6 +110,8 @@ const getScanResult = (result) => {
const { balance } = result const { balance } = result
const { label } = result const { label } = result
const pack = result.package const pack = result.package
const { packUnit } = pack
const { packQty } = pack
const item = detailSource.value.find((res) => { const item = detailSource.value.find((res) => {
if (res.itemCode == balance.itemCode) { if (res.itemCode == balance.itemCode) {
return res return res
@ -133,134 +121,45 @@ const getScanResult = (result) => {
fromWarehouseCode.value = balance.warehouseCode fromWarehouseCode.value = balance.warehouseCode
} }
if (item == undefined) { if (item == undefined) {
//
// this.getRecommendLocation(balance, pack, toLocation => {
const itemp = createItemInfo(balance, pack) const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) // const newDetail = createDetailInfo(balance, pack)
// newDetail.toLocationCode = toLocation.code; newDetail.packUnit = packUnit || ''
// newDetail.toWarehouseCode = toLocation.warehouseCode; newDetail.packQty = packQty
itemp.subList.push(newDetail) itemp.subList.push(newDetail)
const dataList = pack.subList const dataList = pack.subList
detailSource.value.push(itemp) detailSource.value.push(itemp)
detailSource.value.forEach((res) => { calcHandleQty(detailSource.value)
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
})
})
})
// })
} else { } else {
const itemDetail = item.subList.find((r) => r.packingNumber == balance.packingNumber && r.batch == balance.batch) const detail = item.subList.find((r) => {
if (itemDetail != undefined) { 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}]已经在列表中`) showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`)
} }
} }
// calcTreeHandleQty(this.detailSource);
} }
// const updateData = () => {
const getRecommendLocation = (balance, pack, callback) => { calcHandleQty(detailSource.value)
uni.showLoading({ for (let i = 0; i < detailSource.value.length; i++) {
title: '扫描中...', const item = detailSource.value[i]
mask: true if (item.qty == 0) {
}) detailSource.value.splice(i, 1)
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 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) => { const removeItem = (index, item) => {
detailSource.value.splice(index, 1) detailSource.value.splice(index, 1)
updateData()
} }
const removePack = () => { const removePack = () => {
@ -299,6 +198,18 @@ const scanPopupGetFocus = () => {
} }
const commit = () => { 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({ uni.showLoading({
title: '提交中....', title: '提交中....',
mask: true mask: true
@ -310,7 +221,7 @@ const commit = () => {
getPrecisionStrategyList(precisionStrategyParams, (res) => { getPrecisionStrategyList(precisionStrategyParams, (res) => {
if (res.success) { if (res.success) {
managementList.value = res.list managementList.value = res.list
const params = { ...setRecordParams() } const params = setRecordParams()
repleinshRecordSubmit(params) repleinshRecordSubmit(params)
.then((res) => { .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 setRecordParams = () => {
const subList1 = [] const subList1 = []
const creator = store.id const creator = store.id
detailSource.value.forEach((item) => { detailSource.value.forEach((item) => {
item.subList.forEach((detail) => { item.subList.forEach((detail) => {
if (detail.scaned) { 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) const submitItem = deepCopyData(detail)
submitItem.toPackingNumber = info.packingNumber submitItem.toPackingNumber = info.packingNumber
submitItem.toBatch = info.batch submitItem.toBatch = info.batch
@ -391,7 +275,11 @@ const setRecordParams = () => {
toBatch: info.batch, toBatch: info.batch,
fromLocationCode: detail.locationCode, fromLocationCode: detail.locationCode,
toLocationCode: detail.toLocationCode, toLocationCode: detail.toLocationCode,
handleQty: detail.handleQty handleQty: detail.handleQty,
fromPackUnit: detail.packUnit,
toPackUnit: detail.packUnit,
fromPackQty: detail.packQty,
toPackQty: detail.packQty
} }
] ]
subList1.push(submitItem) subList1.push(submitItem)
@ -434,7 +322,6 @@ const getLocation = (location, code) => {
} }
const getFromLocationCode = (location, code) => { const getFromLocationCode = (location, code) => {
fromLocationInfo.value = location
fromLocationCode.value = code fromLocationCode.value = code
openScanPopup() openScanPopup()
} }
@ -451,23 +338,14 @@ const getToLocationCode = (location, code) => {
const showCommitSuccessMessage = (hint) => { const showCommitSuccessMessage = (hint) => {
comMessageRef.value.showSuccessMessage(hint, (res) => { comMessageRef.value.showSuccessMessage(hint, (res) => {
clearData() clear()
}) })
} }
const updateData = () => { const clear = () => {
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 = {}
fromLocationCode.value = '' fromLocationCode.value = ''
fromWarehouseCode.value = '' fromWarehouseCode.value = ''
toWarehouseCode.value = ''
detailSource.value = [] detailSource.value = []
toLocationCode.value = ''
} }
</script> </script>

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

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

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

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

Loading…
Cancel
Save