Browse Source

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

hella_vue3
zhang_li 3 months ago
parent
commit
ff0649af5e
  1. 157
      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. 63
      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. 248
      src/pages/repleinsh/record/directRepleinshRecord.vue
  14. 1
      src/pages/scrap/request/scrapRequestCreate.vue
  15. 3
      src/pages/unPlanned/record/issueRecord.vue

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

@ -1,27 +1,24 @@
<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 class="content" :nodes="content"> </rich-text>
</rich-text>
</scroll-view> </scroll-view>
<view class="split_line"></view>
<view class='split_line'></view>
<slot name="button"> <slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> <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)"> <view v-if="showCancelButton" class="cance_button" @tap="$u.throttle(cancelClose, 500)">
<text :style="{'color':cancelColor}">{{ cancelText }}</text> <text :style="{ color: cancelColor }">{{ cancelText }}</text>
</view> </view>
<u-line direction="col" length="100%"></u-line> <u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="$u.throttle(confirmClose, 500)"> <view v-if="showConfirmButton" class="confirm_button" @tap="$u.throttle(confirmClose, 500)">
<text :style="{'color':confirmColor}">{{confirmText}}</text> <text :style="{ color: confirmColor }">{{ confirmText }}</text>
<text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text> <text v-if="showConfirmCountdown">({{ seconds }}s关闭)</text>
</view> </view>
</view> </view>
@ -61,58 +58,56 @@
} }
}, },
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.$.refs.modal.popupClose();
this.success({ this.success({
// cancel: false, // cancel: false,
confirm: true, confirm: true
}); })
} }
}, },
cancelClose() { cancelClose() {
clearInterval(this.timer) // timer clearInterval(this.timer) // timer
this.$.refs.modal.popupClose(); this.$refs.modal.popupClose()
this.success({ this.success({
// cancel: true, // cancel: true,
confirm: false, confirm: false
}); })
}, },
// ( // (
showConfirmMessageModal(mContent, callback) { showConfirmMessageModal(mContent, callback) {
this.showConfirmModal("消息", mContent, callback); this.showConfirmModal('消息', mContent, callback)
}, },
// ( // (
showConfirmSuccessModal(mContent, callback) { showConfirmSuccessModal(mContent, callback) {
this.showConfirmModal("成功", mContent, callback); this.showConfirmModal('成功', mContent, callback)
}, },
// ( // (
showConfirmFailModal(mContent, callback) { showConfirmFailModal(mContent, callback) {
this.showConfirmModal("失败", mContent, callback); this.showConfirmModal('失败', mContent, callback)
}, },
// ( // (
showConfirmWarningModal(mContent, callback) { showConfirmWarningModal(mContent, callback) {
this.showConfirmModal("警告", mContent, callback); this.showConfirmModal('警告', mContent, callback)
}, },
// ( // (
showConfirmQuestionModal(mContent, callback) { showConfirmQuestionModal(mContent, callback) {
this.showConfirmModal("疑问", mContent, callback); this.showConfirmModal('疑问', mContent, callback)
}, },
// ( // (
@ -121,44 +116,43 @@
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// (+ // (+
showSelectMessageModal(mContent, callback) { showSelectMessageModal(mContent, callback) {
this.showSelectModal("消息", mContent, callback); this.showSelectModal('消息', mContent, callback)
}, },
// (+ // (+
showSelectSuccessModal(mContent, callback) { showSelectSuccessModal(mContent, callback) {
this.showSelectModal("成功", mContent, callback); this.showSelectModal('成功', mContent, callback)
}, },
// (+ // (+
showSelectFailModal(mContent, callback) { showSelectFailModal(mContent, callback) {
this.showSelectModal("失败", mContent, callback); this.showSelectModal('失败', mContent, callback)
}, },
// (+ // (+
showSelectWarningModal(mContent, callback) { showSelectWarningModal(mContent, callback) {
this.showSelectModal("警告", mContent, callback); this.showSelectModal('警告', mContent, callback)
}, },
// (+ // (+
showSelectQuestionModal(mContent, callback) { showSelectQuestionModal(mContent, callback) {
this.showSelectModal("疑问", mContent, callback); this.showSelectModal('疑问', mContent, callback)
}, },
// (+ // (+
@ -166,44 +160,43 @@
this.showModal({ this.showModal({
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// (+) // (+)
showConfirmCountdownMessageModal(mContent, callback) { showConfirmCountdownMessageModal(mContent, callback) {
this.showConfirmCountdownModal("消息", mContent, callback); this.showConfirmCountdownModal('消息', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownSuccessModal(mContent, callback) { showConfirmCountdownSuccessModal(mContent, callback) {
this.showConfirmCountdownModal("成功", mContent, callback); this.showConfirmCountdownModal('成功', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownFailModal(mContent, callback) { showConfirmCountdownFailModal(mContent, callback) {
this.showConfirmCountdownModal("失败", mContent, callback); this.showConfirmCountdownModal('失败', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownWarningModal(mContent, callback) { showConfirmCountdownWarningModal(mContent, callback) {
this.showConfirmCountdownModal("警告", mContent, callback); this.showConfirmCountdownModal('警告', mContent, callback)
}, },
// (+) // (+)
showConfirmCountdownQuestionModal(mContent, callback) { showConfirmCountdownQuestionModal(mContent, callback) {
this.showConfirmCountdownModal("疑问", mContent, callback); this.showConfirmCountdownModal('疑问', mContent, callback)
}, },
// (+) // (+)
@ -213,43 +206,43 @@
content: mContent, content: mContent,
showCancelButton: false, showCancelButton: false,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// (++) // (++)
showSelectCountdownMessageModal(mContent, callback) { showSelectCountdownMessageModal(mContent, callback) {
this.showSelectCountdownModal("消息", mContent, callback); this.showSelectCountdownModal('消息', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownSuccessModal(mContent, callback) { showSelectCountdownSuccessModal(mContent, callback) {
this.showSelectCountdownModal("成功", mContent, callback); this.showSelectCountdownModal('成功', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownFailModal(mContent, callback) { showSelectCountdownFailModal(mContent, callback) {
this.showSelectCountdownModal("失败", mContent, callback); this.showSelectCountdownModal('失败', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownWarningModal(mContent, callback) { showSelectCountdownWarningModal(mContent, callback) {
this.showSelectCountdownModal("警告", mContent, callback); this.showSelectCountdownModal('警告', mContent, callback)
}, },
// (++) // (++)
showSelectCountdownQuestionModal(mContent, callback) { showSelectCountdownQuestionModal(mContent, callback) {
this.showSelectCountdownModal("疑问", mContent, callback); this.showSelectCountdownModal('疑问', mContent, callback)
}, },
// (++) // (++)
@ -258,18 +251,18 @@
iconType: mIconType, iconType: mIconType,
content: mContent, content: mContent,
showConfirmCountdown: true, showConfirmCountdown: true,
success: function(res) { success(res) {
if (callback != undefined) { if (callback != undefined) {
if (res.confirm == true) { if (res.confirm == true) {
callback(true); callback(true)
console.log('用户点击确定') console.log('用户点击确定')
} else { } else {
callback(false); callback(false)
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
} }
}); })
}, },
// //
@ -278,22 +271,22 @@
this.iconType = data.iconType this.iconType = data.iconType
switch (data.iconType) { switch (data.iconType) {
case '消息': case '消息':
this.icon = '/static/icons/error-circle.svg'; this.icon = '/static/icons/error-circle.svg'
break; break
case '成功': case '成功':
this.icon = '/static/icons/checkmark-circle.svg'; this.icon = '/static/icons/checkmark-circle.svg'
break; break
case '失败': case '失败':
this.icon = '/static/icons/close-circle.svg'; this.icon = '/static/icons/close-circle.svg'
break; break
case '警告': case '警告':
this.icon = '/static/icons/warning.svg'; this.icon = '/static/icons/warning.svg'
break; break
case '疑问': case '疑问':
this.icon = '/static/icons/question-circle.svg'; this.icon = '/static/icons/question-circle.svg'
break; break
default: default:
break; break
} }
} }
// image // image
@ -301,8 +294,8 @@
this.title = data.title this.title = data.title
} }
if (data.content) { if (data.content) {
console.log(data.content); console.log(data.content)
this.content = data.content; this.content = data.content
} else { } else {
this.content = '' this.content = ''
} }
@ -358,24 +351,22 @@
} else { } else {
this.success = () => {} this.success = () => {}
} }
setTimeout(res => { setTimeout((res) => {
this.show = true; this.show = true
}, 500) }, 500)
if (this.showConfirmCountdown) { if (this.showConfirmCountdown) {
this.startTimer(); this.startTimer()
} }
}, },
startTimer() { startTimer() {
this.seconds = 3; this.seconds = 3
clearInterval(this.timer) clearInterval(this.timer)
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.seconds-- this.seconds--
// console.log("", this.seconds); // console.log("", this.seconds);
if (this.seconds <= 0) { if (this.seconds <= 0) {
this.timeUp() this.timeUp()
return
} }
}, 1000) }, 1000)
}, },
@ -383,13 +374,9 @@
timeUp() { timeUp() {
// clearInterval(this.timer) // clearInterval(this.timer)
console.log('时间到') console.log('时间到')
this.confirmClose(); this.confirmClose()
}, }
}
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -422,8 +409,6 @@
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 { .cance_button {

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>

63
src/mycomponents/scan/winScanPackAndCont.vue

@ -1,41 +1,34 @@
<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" <win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType" :isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
:isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view> </view>
</view> </view>
</view> </view>
</uni-popup> </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 { export default {
name: 'winScanPack', name: 'winScanPack',
components: { components: {
winComScan, winComScan
}, },
props: { props: {
title: { title: {
@ -53,38 +46,36 @@
}, },
data() { data() {
return { return {
show: false, show: false
} }
}, },
created() { created() {},
},
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => { setTimeout((res) => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 500) }, 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)
@ -92,36 +83,36 @@
}, },
getContainerByNumber(result) { getContainerByNumber(result) {
getContainerByNumber(result.label.container).then(res => { getContainerByNumber(result.label.container)
.then((res) => {
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
this.$emit("getResult", result); this.$emit('getResult', result)
} else { } else {
this.showMessage('未查找到托码【' + result.label.container + '】'); this.showMessage(`未查找到托码【${result.label.container}`)
} }
})
}).catch(error => { .catch((error) => {
this.showMessage(error); this.showMessage(error)
}) })
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus()
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus()
} }
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message); this.$refs.comMessage.showMessage(message)
}, },
change(e) { change(e) {
this.show = e.show this.show = e.show
}, }
} }
} }
</script> </script>

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'

248
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) {
showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`) return r
}
} }
// 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) => { if (detail == undefined) {
uni.hideLoading() const newDetail = createDetailInfo(balance, pack)
showErrorMessage(error) newDetail.packUnit = packUnit
}) newDetail.packQty = packQty
} else { item.subList.push(newDetail)
callback(recommend) calcHandleQty(detailSource.value)
} } else if (detail.scaned == true) {
} showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`)
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) => { const updateData = () => {
positionInfo.value = `${e[0].label}-${e[1].label}-${e[2].label}` calcHandleQty(detailSource.value)
workshopCode.value = e[0].value for (let i = 0; i < detailSource.value.length; i++) {
productionLineCode.value = e[1].value const item = detailSource.value[i]
workStationCode.value = e[2].value if (item.qty == 0) {
workShopName.value = e[0].label detailSource.value.splice(i, 1)
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