zhang_li 8 months ago
parent
commit
56dc53e50d
  1. 26
      src/App.vue
  2. 25
      src/mycomponents/Batch/Batch.vue
  3. 147
      src/mycomponents/balance/balance.vue
  4. 88
      src/mycomponents/balance/balanceDetailPopup.vue
  5. 57
      src/mycomponents/balance/balanceLabel.vue
  6. 98
      src/mycomponents/balance/balanceMove.vue
  7. 54
      src/mycomponents/balance/balanceSelect.vue
  8. 24
      src/mycomponents/balance/batch.vue
  9. 37
      src/mycomponents/balance/bussinessType.vue
  10. 80
      src/mycomponents/balance/handleBalance.vue
  11. 31
      src/mycomponents/balance/location.vue
  12. 62
      src/mycomponents/balance/moveStatus.vue
  13. 34
      src/mycomponents/balance/pack.vue
  14. 59
      src/mycomponents/balance/productionLabel.vue
  15. 58
      src/mycomponents/balance/purchaseLabel.vue
  16. 84
      src/mycomponents/balance/recommendBalance.vue
  17. 31
      src/mycomponents/balance/toLocation.vue
  18. 57
      src/mycomponents/button/requestButton.vue
  19. 31
      src/mycomponents/common/comBlankView.vue
  20. 41
      src/mycomponents/common/comEmptyView.vue
  21. 162
      src/mycomponents/common/comListHint.vue
  22. 108
      src/mycomponents/common/comListItem.vue
  23. 479
      src/mycomponents/common/comMessage.vue
  24. 39
      src/mycomponents/common/comPopup.vue
  25. 120
      src/mycomponents/common/comUploadCamera.vue
  26. 24
      src/mycomponents/container/container.vue
  27. 54
      src/mycomponents/container/containerInfo.vue
  28. 47
      src/mycomponents/container/containerStatus.vue
  29. 68
      src/mycomponents/container/targetContainer.vue
  30. 162
      src/mycomponents/detail/comDetailCard.vue
  31. 151
      src/mycomponents/detail/comRequestDetailCard.vue
  32. 67
      src/mycomponents/detail/detailBalanceInfo.vue
  33. 65
      src/mycomponents/detail/detailCommonInfo.vue
  34. 63
      src/mycomponents/detail/detailHandleInfo.vue
  35. 46
      src/mycomponents/detail/detailItemInfo.vue
  36. 65
      src/mycomponents/detail/detailPackageInfo.vue
  37. 71
      src/mycomponents/detail/detailRecommendInfo.vue
  38. 79
      src/mycomponents/detail/jobDetailPopup.vue
  39. 66
      src/mycomponents/detail/recordDetailBasicInfo.vue
  40. 60
      src/mycomponents/detail/recordDetailCommonInfo.vue
  41. 71
      src/mycomponents/detail/recordDetailPopup.vue
  42. 43
      src/mycomponents/detail/requestDetailBasicInfo.vue
  43. 65
      src/mycomponents/detail/requestDetailCommonInfo.vue
  44. 48
      src/mycomponents/item/item.vue
  45. 63
      src/mycomponents/item/itemCompareQty.vue
  46. 74
      src/mycomponents/item/itemDetailInfo.vue
  47. 58
      src/mycomponents/item/itemInfo.vue
  48. 159
      src/mycomponents/item/itemInfoPopup.vue
  49. 67
      src/mycomponents/item/itemQty.vue
  50. 65
      src/mycomponents/item/itemRecommendQty.vue
  51. 62
      src/mycomponents/item/itemSelect.vue
  52. 47
      src/mycomponents/item/itemStatus.vue
  53. 49
      src/mycomponents/job/jobBottom.vue
  54. 93
      src/mycomponents/job/jobCard.vue
  55. 41
      src/mycomponents/job/jobComMainCard.vue
  56. 62
      src/mycomponents/job/jobCommonInfo.vue
  57. 79
      src/mycomponents/job/jobDetailPopup.vue
  58. 155
      src/mycomponents/job/jobFilter.vue
  59. 75
      src/mycomponents/job/jobInfoPopup.vue
  60. 36
      src/mycomponents/job/jobNumber.vue
  61. 64
      src/mycomponents/job/jobPersonInfo.vue
  62. 36
      src/mycomponents/job/jobProperty.vue
  63. 96
      src/mycomponents/job/jobRequestInfo.vue
  64. 77
      src/mycomponents/job/jobSettingInfo.vue
  65. 45
      src/mycomponents/job/jobStatus.vue
  66. 41
      src/mycomponents/job/jobTop.vue
  67. 146
      src/mycomponents/job/jobcomDetailCard.vue
  68. 57
      src/mycomponents/label/label.vue
  69. 55
      src/mycomponents/location/location.vue
  70. 47
      src/mycomponents/location/locationDetail.vue
  71. 58
      src/mycomponents/location/locationDrop.vue
  72. 45
      src/mycomponents/location/locationInfo.vue
  73. 46
      src/mycomponents/location/locationStatus.vue
  74. 79
      src/mycomponents/location/requiredLocation.vue
  75. 84
      src/mycomponents/package/packageBalance.vue
  76. 204
      src/mycomponents/package/packageDetailPopup.vue
  77. 85
      src/mycomponents/package/packageHandle.vue
  78. 57
      src/mycomponents/package/packageTarget.vue
  79. 158
      src/mycomponents/partCode/partCode.vue
  80. 62
      src/mycomponents/partCode/partCodeSelect.vue
  81. 116
      src/mycomponents/popup/selectList.vue
  82. 39
      src/mycomponents/production/productionInfo.vue
  83. 37
      src/mycomponents/purchase/purchaseInfo.vue
  84. 269
      src/mycomponents/qty/CountQtyEdit.vue
  85. 72
      src/mycomponents/qty/RecommendQty.vue
  86. 73
      src/mycomponents/qty/balanceQty.vue
  87. 217
      src/mycomponents/qty/balanceQtyEdit.vue
  88. 106
      src/mycomponents/qty/compareQty.vue
  89. 198
      src/mycomponents/qty/inspectQtyEdit.vue
  90. 58
      src/mycomponents/qty/qty.vue
  91. 227
      src/mycomponents/qty/recommendQtyEdit.vue
  92. 37
      src/mycomponents/qty/stdPackQty.vue
  93. 40
      src/mycomponents/qty/stdUom.vue
  94. 40
      src/mycomponents/qty/uom.vue
  95. 158
      src/mycomponents/recommend/recommend.vue
  96. 69
      src/mycomponents/recommend/recommendBalance.vue
  97. 146
      src/mycomponents/recommend/recommendCount.vue
  98. 96
      src/mycomponents/record/record.vue
  99. 49
      src/mycomponents/record/recordBottom.vue
  100. 179
      src/mycomponents/record/recordComDetailCard.vue

26
src/App.vue

@ -67,4 +67,30 @@
</script>
<style lang="scss">
@import 'vk-uview-ui/index.scss';
// @import "./uni_modules/vk-uview-ui/index.scss";
@import './common/style/new_style.css';
@import './common/style/uni.css';
@import './common/style/pdabasic.css';
@import './uni.scss';
@import './static/scss/index.scss';
@import './static/ali_icon/iconfont.css';
body {
background-color: #EBEEF0;
}
.content {
background-color: #fff
}
page {
// #ifdef APP-PLUS
height: 100vh;
// #endif
// #ifdef H5
// height: calc(100vh-94px);
// #endif
}
</style>

25
src/mycomponents/Batch/Batch.vue

@ -0,0 +1,25 @@
<template>
<view class="batch_view">
<text class="card_batch">批次</text>
<text class="card_batch_content">&nbsp{{batch}}</text>
</view>
</template>
<script>
export default {
data(){
return {
}
},
props: {
batch:{
type: String,
default: ""
}
},
}
</script>
<style>
</style>

147
src/mycomponents/balance/balance.vue

@ -0,0 +1,147 @@
<template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff;margin-bottom: 1px; ">
<view class="uni-flex uni-row space-between" style="align-items: center">
<view>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode">
</to-location>
</view>
<view>
<!-- <qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty> -->
<qty v-if="dataContent.handleQty==0 || dataContent.handleQty==undefined" :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number( dataContent.qty)"
:handleQty="Number (dataContent.handleQty)" :isShowStdPack="isShowStdPack">
</compare-qty>
<!-- <view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view> -->
</view>
</view>
<!-- <u-line></u-line> -->
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
// import config from '@/static/config.js'
export default {
components: {
pack,
location,
toLocation,
batch,
qty,
recommendQty,
compareQty,
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" +
this.dataContent.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
// isDevlement() {
// return config.isDevelopment;
// }
}
}
</script>
<style>
</style>

88
src/mycomponents/balance/balanceDetailPopup.vue

@ -0,0 +1,88 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<!-- <com-item :dataContent="dataContent.package"></com-item>
<u-line></u-line>
<scroll-view style="height:320px ">
<view v-for="(item, index) in dataList" style="width: 100%;">
<view class="item">
<text class="item_title">{{item.item_title}} </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text>
</view>
</view>
</scroll-view> -->
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
</template>
<script>
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import {
dateFormat
} from '@/common/basic.js';
export default {
emits: ['onClose'],
components: {
detailItemInfo,
detailBalanceInfo,
detailPackageInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
},
dataList: []
}
},
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
// avaliable(value) {
// return value == "TRUE" ? "" : ""
// },
// boolean(value) {
// return value == "TRUE" ? "" : ""
// },
// formatDate(val) {
// return dateFormat(val)
// },
closePopup(val) {
this.$refs.popup.close('bottom')
// this.$emit('onClose')
},
}
}
</script>
<style>
</style>

57
src/mycomponents/balance/balanceLabel.vue

@ -0,0 +1,57 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack" :isShowFromLocation="isShowLocation"></balance>
<purchase-info :dataContent="packageContent"></purchase-info>
</view>
</template>
<script>
import balance from '@/mycomponents/balance/balance.vue'
import purchaseInfo from '@/mycomponents/purchase/purchaseInfo.vue'
export default {
components: {
balance,
purchaseInfo
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
packageContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

98
src/mycomponents/balance/balanceMove.vue

@ -0,0 +1,98 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<view class="uni-flex uni-row space-between uni-inline-item">
<view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view>
<view>
<qty :isShowStatus="dataContent.inventoryStatus==dataContent.toInventoryStatus" v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
</compare-qty>
<moveStatus v-if="dataContent.inventoryStatus!=dataContent.toInventoryStatus" :fromInventoryStatus="fromInventoryStatus" :toInventoryStatus="toInventoryStatus">
</moveStatus>
</view>
</view>
<u-line></u-line>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import moveStatus from '@/mycomponents/balance/moveStatus.vue'
export default {
components: {
pack,
location,
batch,
qty,
recommendQty,
compareQty,
moveStatus
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowBusiness: {
type: Boolean,
default: false
},
scaned: {
type: Boolean,
default: true
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

54
src/mycomponents/balance/balanceSelect.vue

@ -0,0 +1,54 @@
<!--发料任务卡片-->
<template>
<!-- <page-meta root-font-size="18px"></page-meta> -->
<uni-popup ref="popupItems" type="center">
<scroll-view scroll-y="true" style="background-color: #EEEEEE;height: 90vh;">
<item :dataContent="balanceItems[0]"></item>
<view class="popinpop count_shadow" style="width: 90vw;margin: 20rpx 20rpx 30rpx 20rpx;"
v-for="(item, index) in balanceItems" :key="item.id" @click="callback(item)">
<balance :dataContent="item"></balance>
</view>
</scroll-view>
</uni-popup>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import balance from '@/mycomponents/balance/balance.vue'
export default {
name: "balanceSelect",
emits: ['onSelectItem'],
components: {
item,
balance
},
data() {
return {
balanceItems: [],
};
},
//
props: {
// datacontent: {
// type: Object,
// value: null
// }
},
methods: {
openPopup(items) {
this.balanceItems = items;
this.$refs['popupItems'].open("center");
},
callback(item) {
this.$emit("onSelectItem", item);
this.$refs['popupItems'].close();
},
}
}
</script>
<style scoped lang="scss">
</style>

24
src/mycomponents/balance/batch.vue

@ -0,0 +1,24 @@
<template>
<view class="card_view ">
<text class="card_batch card_content ">批次</text>
<text class="card_content ">{{batch}}</text>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
batch: {
type: String,
default: ""
}
},
}
</script>
<style>
</style>

37
src/mycomponents/balance/bussinessType.vue

@ -0,0 +1,37 @@
<template>
<view class="business_view">
<text class="card_business">{{businessTypeDesc(bussinessType)}}</text>
<text class="card_business_content">{{number}}</text>
</view>
</template>
<script>
import {
getBusinessTypeDesc
} from '@/common/directory.js';
export default {
data() {
return {}
},
props: {
bussinessType: {
type: String,
default: ""
},
number: {
type: String,
default: ""
}
},
methods:{
businessTypeDesc(type){
return getBusinessTypeDesc(type)
}
}
}
</script>
<style>
</style>

80
src/mycomponents/balance/handleBalance.vue

@ -0,0 +1,80 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="space_between center" >
<view style="word-break: break-all;width: 60%;">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view style="word-break: break-all;">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty"
:isShowStdPack="false">
</compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

31
src/mycomponents/balance/location.vue

@ -0,0 +1,31 @@
<template>
<view class="card_view ">
<text class="card_location card_content ">{{title}}</text>
<text class="card_content ">{{locationCode}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {}
},
props: {
locationCode: {
type: String,
default: ''
},
title: {
type: String,
default: '库位'
},
},
}
</script>
<style>
</style>

62
src/mycomponents/balance/moveStatus.vue

@ -0,0 +1,62 @@
<template>
<view class="uni-row uni-flex center" style="font-size: 30rpx;">
<status :status='fromInventoryStatus' :showDesc="true"></status>
<view class="uni-flex uni-row center"
v-if='showToInventoryStatus && toInventoryStatus!="" && toInventoryStatus!=fromInventoryStatus'>
<text style="color:#909399 ; ">
>
</text>
<status :status='toInventoryStatus' :showDesc="true"></status>
</view>
</view>
</template>
<script>
import {
getInventoryStatusStyle,
getInventoryStatusName
} from '@/common/directory.js';
import status from '@/mycomponents/status/status.vue'
export default {
components: {
status
},
data() {
return {
}
},
props: {
fromInventoryStatus: {
type: String,
default: ''
},
toInventoryStatus: {
type: String,
default: ''
},
showToInventoryStatus: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
statusStyle(value) {
return getInventoryStatusStyle(value);
},
statusDesc(value) {
return getInventoryStatusName(value)
}
}
}
</script>
<style>
</style>

34
src/mycomponents/balance/pack.vue

@ -0,0 +1,34 @@
<template>
<view class="card_view">
<text class="card_packing_code card_content ">箱码</text>
<text class="card_content ">{{packingCode}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
props: {
packingCode: {
type: String,
default: ''
},
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

59
src/mycomponents/balance/productionLabel.vue

@ -0,0 +1,59 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowFromLocation="isShowLocation"></balance>
<production-info :dataContent="packageContent"></production-info>
</view>
</template>
<script>
import balance from '@/mycomponents/balance/balance.vue'
import productionInfo from '@/mycomponents/production/productionInfo.vue'
export default {
components: {
balance,
productionInfo
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
packageContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

58
src/mycomponents/balance/purchaseLabel.vue

@ -0,0 +1,58 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<balance :dataContent="dataContent" :isShowStdPack="false" :isShowPack="isShowPack"
:isShowFromLocation="isShowLocation"></balance>
<!-- <purchase-info :dataContent="packageContent"></purchase-info> -->
</view>
</template>
<script>
import balance from '@/mycomponents/balance/balance.vue'
import purchaseInfo from '@/mycomponents/purchase/purchaseInfo.vue'
export default {
components: {
balance,
purchaseInfo
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
packageContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

84
src/mycomponents/balance/recommendBalance.vue

@ -0,0 +1,84 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;">
<view class="uni-flex uni-row space-between center ">
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" >
<view style=" width: 25rpx;color: #32C1E8;">
推荐
</view>
<view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
<view style="word-break: break-all">
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false">
</compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/RecommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

31
src/mycomponents/balance/toLocation.vue

@ -0,0 +1,31 @@
<template>
<view class="card_view ">
<text class="card_to_location card_content ">{{title}}</text>
<text class="card_content ">{{locationCode}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {}
},
props: {
locationCode: {
type: String,
default: ''
},
title: {
type: String,
default: '库位'
},
},
}
</script>
<style>
</style>

57
src/mycomponents/button/requestButton.vue

@ -0,0 +1,57 @@
<template>
<view>
<view class="scan_float" @click="goScan('bottom')">
<image src="@/static/icons_ui/icon_add.svg"></image>
<view>{{btnName}}</view>
</view>
<!-- <movable-area>
<movable-view class="max" direction="all">扫描</movable-view>
</movable-area> -->
</view>
</template>
<script>
export default {
data() {
return {
x: 0,
y: 0,
old: {
x: 0,
y: 0
}
}
},
props: {
btnName: {
type: String,
default: '创建'
},
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
},
tap: function(e) {
this.x = this.old.x
this.y = this.old.y
this.$nextTick(function() {
this.x = 30
this.y = 30
})
},
onChange: function(e) {
this.old.x = e.detail.x
this.old.y = e.detail.y
}
},
}
</script>
<style>
</style>

31
src/mycomponents/common/comBlankView.vue

@ -0,0 +1,31 @@
<template>
<view class="default_goscan">
<image class="img_goscan" src="@/static/icons_ui/default_blank.png"></image>
<button @click="goScan">
<image src="@/static/icons_ui/icon_add.svg"></image>
去扫描
</button>
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
goScan(content) {
this.$emit("goScan", '');
}
}
}
</script>
<style>
</style>

41
src/mycomponents/common/comEmptyView.vue

@ -0,0 +1,41 @@
<template>
<view class=" " >
<view class="">
<image class="default_nodata" src="@/static/icons_ui/default_data.png"></image>
</view>
<!--
<view class="" style="display: flex;flex-direction: column;
align-items: center;">
<view class="" >
<image class="nodata" src="/static/icons_ui/default_data.png"></image>
</view>
<view style="font-size: 40rpx;color: #909193;">
暂无数据
</view>
</view> -->
</view>
</template>
<script>
export default {
data() {
return {
}
},
created() {
},
methods: {
}
}
</script>
<style>
</style>

162
src/mycomponents/common/comListHint.vue

@ -0,0 +1,162 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_detail">
<view class="uni-flex space-between u-col-center"
style="padding-bottom: 15rpx;">
<view class="text_ellipsis" v-if="number" style="font-size: 35rpx;flex: 3;">
编号:{{number}}
</view>
<view class="text_ellipsis" v-else style="font-size: 40rpx;">
<view class="">
{{itemCode}}
</view>
<view class="">
{{itemDesc}}
</view>
</view>
<view class="uni-center" style="flex: 1;">
<view v-if="jobStatus==2" class="task_state_doing">
<text>执行中</text>
</view>
<view v-if="jobStatus==1" class="task_state_un-doing">
<text>待执行</text>
</view>
</view>
<!-- <view class="" v-else="number">
<view class="text_ellipsis" style="font-size: 40rpx;flex: 1;">
<view class="">
{{itemCode}}
</view>
<view class="">
{{itemDesc}}
</view>
</view>
</view> -->
</view>
<u-line></u-line>
<view class="" v-for="(item, index) in dataList">
<view class="item" v-if="(item.title!='worker')" v-show="(item.title!='date')">
<text class="item_title">{{item.title}} : </text>
<text class="text_wrap">{{item.content}} </text>
</view>
</view>
<u-line></u-line>
<view v-if="isShowbottom" style="margin-top: 10rpx;margin-bottom: 10rpx;width: 100%;display: flex;"
class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center " style="flex: 1; overflow: hidden;">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text class="text_ellipsis">{{getContent("worker")}}</text>
</view>
<view class="uni-flex uni-row u-col-center " style="flex: 3;justify-content: flex-end;overflow: hidden;">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{formatDate(getContent("date"))}}</text>
</view>
</view>
</view>
<view class="uni-flex u-row-center ">
<image src="/static/icons/icons_close-circle.svg"
mode=""
class="icons_close"
@click="closeScanPopup()"
></image>
</view>
</uni-popup>
</view>
</template>
<script>
import {
dateFormat,
} from '@/common/basic.js';
export default {
mounted() {
},
props: {
title: {
type: String,
default: ""
},
dataContent: {
type: Object,
default: {}
},
number:{
type: String,
default: ""
},
jobStatus:{
type: Number,
default: -1
},
dataList:{
type: Object,
default: []
},
worker:{
type: String,
default: ""
},
date:{
type: String,
default: ""
},
itemCode:{
type: String,
default: ""
},
itemDesc:{
type: String,
default: ""
},
isShowbottom:{
type: Boolean,
default: true
}
},
methods: {
openScanPopup() {
this.$refs.popup.open('center')
},
closeScanPopup() {
this.$refs.popup.close()
},
startEdit() {
this.$refs.receiptCountEdit.openScanPopup();
},
formatDate(val) {
return dateFormat(val)
},
statusColor: function(val) {
return getJobStatuDesc(val);
},
getContent(title){
let items = this.dataList.filter(r => {
if (r.title==title) {
return r;
}
})
if(items!=null&&items.length>0){
return items[0].content;
}
}
}
}
</script>
<style>
</style>

108
src/mycomponents/common/comListItem.vue

@ -0,0 +1,108 @@
<template>
<view class="">
<view class="uni-flex uni-column">
<view class="item" v-for="(item,index) in dataList">
<text class="item_title">{{item.title}} : </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}} </text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
<text v-else-if="item.type=='boolean'" class="text_wrap">{{boolean(item.content)}} </text>
<text v-else-if="item.type=='transferMode'" class="text_wrap">{{getTransferModeName(item.content)}} </text>
<text v-else-if="item.type=='locationType'" class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(item.content))}} </text>
<text v-else-if="item.type=='uom'" class="text_wrap">{{getUnitInfo(item.content)}} </text>
<text v-else-if="item.type=='inspectType'" class="text_wrap">{{getInspectType(item.content)}} </text>
<text v-else-if="item.type=='sampleMethod'" class="text_wrap">{{getSampleMethod(item.content)}} </text>
<text v-else-if="item.type=='requestState'" class="text_wrap">{{getRequestStateInfo(item.content)}} </text>
<text v-else-if="item.type=='inventoryStatus'" class="text_wrap">{{getInventoryStatusName(item.content)}} </text>
<text v-else-if="item.type=='locationCode'" class="text_wrap">{{getLocationTypeName(item.content)}} </text>
</view>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/common/basic.js';
import {
getTransferModeName,
getLocationTypeNameList,
getDirectoryItemArray,
getUnitInfo,
getInspectType,
getSampleMethod,
getRequestStateInfo,
getInventoryStatusName,
getLocationTypeName
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
watch: {
// dataContent: {
// handler(newName, oldName) {
// },
// immediate: true,
// deep: true
// }
},
props: {
dataList: {
type: Array,
default: []
}
},
methods: {
avaliable(value) {
return value == "TRUE" ? "可用" : "不可用"
},
boolean(value) {
return value == "TRUE" ? "是" : "否"
},
formatDate(val) {
return dateFormat(val)
},
getTransferModeName(value){
return getTransferModeName(value)
},
getLocationTypeNameList(value){
return getLocationTypeNameList(value)
},
getDirectoryItemArray(value){
return getDirectoryItemArray(value)
},
getUnitInfo(value){
return getUnitInfo(value).label
},
getInspectType(value){
return getInspectType(value)
},
getSampleMethod(value){
return getSampleMethod(value)
},
getRequestStateInfo(value){
return getRequestStateInfo(value).label
},
getInventoryStatusName(value){
return getInventoryStatusName(value)
},
getLocationTypeName(value){
return getLocationTypeName(value)
}
}
}
</script>
<style>
</style>

479
src/mycomponents/common/comMessage.vue

@ -0,0 +1,479 @@
<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>
<slot name="content">
<rich-text class="content" :nodes="content">
</rich-text>
</slot>
<u-line></u-line>
<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="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text>
</view>
<u-line direction="col" length="100%"></u-line>
<view v-if="showConfirmButton" class="confirm_button" @tap="confirmClose">
<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
isDisabled: true, // true
seconds: 0,
success: () => {} //
}
},
methods: {
open() {
this.show = true;
this.isDisabled = true;
},
close() {
this.$.refs.modal.popupClose();
this.isDisabled = false;
},
confirmClose() {
if (!this.isDisabled) return
this.isDisabled = false
// console.log('')
if (this.show) {
this.show = false;
clearInterval(this.timer) //timer
this.$.refs.modal.popupClose();
this.success({
// cancel: false,
confirm: true,
});
}
},
cancelClose() {
if (!this.isDisabled) return
this.isDisabled = false
clearInterval(this.timer) //timer
this.$.refs.modal.popupClose();
this.success({
// cancel: true,
confirm: false,
});
},
// (+)
showMessage(mContent, callback) {
this.showConfirmCountdownModal("消息", mContent, callback);
},
// (+)
showSuccessMessage(mContent, callback) {
this.showConfirmCountdownModal("成功", mContent, callback);
},
// (
showErrorMessage(mContent, callback) {
this.showConfirmModal("失败", mContent, callback);
},
// (
showBreakMessage(mContent, callback) {
this.showNoButtonModal("失败", mContent, callback);
},
// (+
showQuestionMessage(mContent, callback) {
this.showSelectModal("疑问", mContent, callback);
},
// (+)
showWarningMessage(mContent, callback) {
this.showConfirmCountdownModal("警告", mContent, callback);
},
// (+)
showConfirmCountdownFailModal(mContent, callback) {
this.showConfirmCountdownModal("失败", mContent, callback);
},
// (
showConfirmMessageModal(mContent, callback) {
this.showConfirmModal("消息", mContent, callback);
},
// (
showConfirmSuccessModal(mContent, callback) {
this.showConfirmModal("成功", mContent, callback);
},
// (
showConfirmWarningModal(mContent, callback) {
this.showConfirmModal("警告", mContent, callback);
},
// (
showConfirmQuestionModal(mContent, callback) {
this.showConfirmModal("疑问", mContent, callback);
},
// (
showNoButtonModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showConfirmButton:false,
showCancelButton: false,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
} else {
callback(false);
}
}
}
});
},
// (
showConfirmModal(mIconType, mContent, callback) {
this.showModal({
iconType: mIconType,
content: mContent,
showCancelButton: false,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
} else {
callback(false);
}
}
}
});
},
// (+
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);
},
// (+
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('用户点击取消')
}
}
}
});
},
// (+)
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);
} else {
callback(false);
}
}
}
});
},
// (++)
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) {
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.open();
}, 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();
},
},
}
</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 {
width: 100%;
margin-top: 16px;
margin-bottom: 16px;
margin-left: 8px;
margin-right: 8px;
font-size: 32rpx;
text-align: center;
}
.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>

39
src/mycomponents/common/comPopup.vue

@ -0,0 +1,39 @@
<template>
<view>
<scroll-view scroll-y="true" style="height: 450px;">
<slot></slot>
</scroll-view>
<view class="uni-flex u-row-center">
<image src="/static/icons/icons_close-circle.svg" class="icons_close" @click="closeScanPopup()">
</image>
</view>
</view>
</template>
<script>
export default {
emits: ["onClose"],
components: {
},
props: {
},
data() {
return {
}
},
methods: {
closeScanPopup() {
this.$emit("onClose", );
}
}
}
</script>
<style>
</style>
<style>
</style>

120
src/mycomponents/common/comUploadCamera.vue

@ -0,0 +1,120 @@
<!--拍照上传-->
<template>
<view>
<!-- <button @click="camera">拍照</button> -->
<uni-file-picker ref="files" limit="3" title="最多选择3张图片" :auto-upload="false" v-model="imageValue"
:sizeType="sizeType" fileMediatype="image" mode="grid" file-extname="png,jpg" @select="select"
@delete="deleteImg" @progress="progress" @success="success"
:disabled="disabled" :del-icon='!disabled'
@fail="fail" />
</view>
</template>
<script>
export default {
name: "uploadCamera",
data() {
return {
imageValue: [],
sizeType: ['compressed']
}
},
props: {
disabled: {
type: Boolean,
value: false
}
},
watch: {},
methods: {
//
upload() {
this.$refs.files.upload()
},
//
select(e) {
console.log('选择文件:', e)
},
//
deleteImg(e) {
console.log('删除:', e)
},
//
progress(e) {
console.log('上传进度:', e)
},
//
success(e) {
console.log('上传成功')
},
//
fail(e) {
console.log('上传失败:', e)
},
getFiles() {
return this.$refs.files.files;
},
setFiles(files) {
this.$refs.files.files = files;
},
clearFiles() {
this.$refs.files.files = []
}
// camera(){
// let that = this
// uni.chooseImage({
// count: 3, //9
// sizeType: ['original'], //
// sourceType: ['camera'], //
// success: function (res) {
// console.log(res.tempFilePaths)
// console.log(JSON.stringify(res.tempFilePaths));
// that.select({
// tempFilePaths:[
// JSON.stringify(res.tempFilePaths[0])
// ],
// tempFiles:[
// {path: res.tempFilePaths[0]}
// ]})
// }
// });
// },
// camera(){
// // getCamera index 12使
// // ios
// const cmr = plus.camera.getCamera()
// //
// const res = cmr.supportedImageResolutions[0]
// //
// const fmt = cmr.supportedImageFormats[0]
// //
// cmr.captureImage((path) => {
// // this.compressImage(path)
// // path
// console.log(path)
// plus.gallery.save( path, function () {
// alert( "" );
// },(error) => {
// alert(error);
// });
// },
// (error) => {
// console.log('Capture image failed: ' + error.message)
// }, {
// resolution: res,
// format: fmt,
// filename:''
// })
// },
}
}
</script>
<style scoped lang="scss">
</style>

24
src/mycomponents/container/container.vue

@ -0,0 +1,24 @@
<template>
<view class="card_view ">
<text class="card_container card_content ">托码</text>
<text class="card_content ">{{container}}</text>
</view>
</template>
<script>
export default {
data() {
return {}
},
props: {
container: {
type: String,
default: ""
}
},
}
</script>
<style>
</style>

54
src/mycomponents/container/containerInfo.vue

@ -0,0 +1,54 @@
<!--包装组件-->
<template>
<view class="">
<view class="uni-flex space-between padding_10" style="background-color: #fff;" >
<view>
<view class="font_xl text_black text_bold">
{{ itemDetail.number }}
</view>
<view class="">
总容量 : {{ itemDetail.capacity }}
</view>
</view>
<view class="">
<containerStatus :status="itemDetail.status"></containerStatus>
</view>
</view>
<itemInfoPopup ref="showHint" :dataContent="itemDetail" :type="'partCode'"></itemInfoPopup>
</view>
</template>
<script>
import containerStatus from '@/mycomponents/container/containerStatus.vue';
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue';
export default {
name: "comItem",
components: {
itemInfoPopup,
containerStatus
},
data() {
return {
};
},
//
props: {
itemDetail: {
type: Object,
value: null
}
},
methods: {
showHint() {
this.$refs.showHint.openScanPopup()
}
}
}
</script>
<style>
</style>

47
src/mycomponents/container/containerStatus.vue

@ -0,0 +1,47 @@
<template>
<view class="">
<text :class="statusStyle(status)"
style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(status)}}</text>
</view>
</template>
<script>
import {
getContainerStatusInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
};
},
props: {
dataContent: {
type: Object,
default: {},
},
status: {
type: String,
default: "",
},
},
methods: {
statusDesc(value) {
return getContainerStatusInfo(value).name
},
statusStyle(value) {
return getContainerStatusInfo(value).remark;
},
}
}
</script>
<style>
</style>

68
src/mycomponents/container/targetContainer.vue

@ -0,0 +1,68 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" @click="showLocation">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="containerCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{containerCode}}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view>
<winScanContainer ref="scanContainer" :title="title" @getContainer='getContainer'></winScanContainer>
</view>
</template>
<script>
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue"
export default {
components: {
winScanContainer
},
data() {
return {
defaultContainerCode: ""
}
},
props: {
title: {
type: String,
default: "需求库位"
},
containerCode: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
},
},
watch: {
containerCode: {
handler(newName, oldName) {
if (this.containerCode != "") {
this.defaultContainerCode = this.containerCode;
}
},
immediate: true,
deep: true
}
},
methods: {
showLocation() {
this.$refs.scanContainer.openScanPopup();
},
//
getContainer(containerInfo) {
this.$emit("getContainer", containerInfo)
}
}
}
</script>
<style>
</style>

162
src/mycomponents/detail/comDetailCard.vue

@ -0,0 +1,162 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false">
</item-compare-qty>
</template>
<u-line></u-line>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"
style='padding:0px 0px 5px 0px;align-items: center;'>
<recommend :detail="item" :isShowToLocation="false">
</recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
emits: ['openDetail', "updateData"],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
locationTypeList: {
type: Array,
default: []
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
showItem: {},
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = null;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
}
}
</script>
<style>
</style>

151
src/mycomponents/detail/comRequestDetailCard.vue

@ -0,0 +1,151 @@
<template>
<view class="" style="background-color: #fff;">
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem">
</comReturnRequestInfo> -->
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty
:dataContent="dataContent"
:handleQty="Number(dataContent.handleQty)"
:isShowStdPack="false">
</item-compare-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack"
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
export default {
emits: ['openDetail'],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
comReturnRequestInfo
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
dataContent(newVal) {
var test =this.dataContent
this.requestItem = newVal.subList[0];
},
},
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: [],
requestItem:{}
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

67
src/mycomponents/detail/detailBalanceInfo.vue

@ -0,0 +1,67 @@
<template>
<view>
<!-- <view class="item_big_title">
[明细]
</view> -->
<view class="item">
<text class="item_title">箱码 : </text>
<text class="text_wrap">{{dataContent.packingNumber}}</text>
</view>
<view class="item">
<text class="item_title">批次 : </text>
<text class="text_wrap">{{dataContent.batch}}</text>
</view>
<view class="item">
<text class="item_title">数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUnitInfo(dataContent.uom)}}</text>
</view>
</view>
<view class="item">
<text class="item_title">库存状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">来源库位 : </text>
<text class="text_wrap">{{dataContent.fromLocationCode}}</text>
</view>
</view>
</template>
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo,
getUnitInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUnitInfo(value){
return getUnitInfo(value).label
}
}
}
</script>
<style>
</style>

65
src/mycomponents/detail/detailCommonInfo.vue

@ -0,0 +1,65 @@
<template>
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<u-line></u-line>
<scroll-view style="height:320px ">
<detail-item-info :dataContent="dataContent"></detail-item-info>
<u-line></u-line>
<detail-recommend-info :dataContent="dataContent"></detail-recommend-info>
<u-line></u-line>
<view v-if="dataContent.record!=undefined">
<detail-handle-info :dataContent="dataContent">
</detail-handle-info>
<u-line></u-line>
</view>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailHandleInfo from '@/mycomponents/detail/detailHandleInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailRecommendInfo,
detailHandleInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
</script>
<style>
</style>

63
src/mycomponents/detail/detailHandleInfo.vue

@ -0,0 +1,63 @@
<template>
<view>
<!-- <view class="item_big_title">
[扫描]
</view> -->
<view class="item">
<text class="item_title">扫描箱码 : </text>
<text class="text_wrap">{{dataContent.record.packingNumber}}</text>
</view>
<view class="item">
<text class="item_title">扫描批次 : </text>
<text class="text_wrap">{{dataContent.record.batch}}</text>
</view>
<view class="item">
<text class="item_title">扫描数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.record.qty)}}</text>
<text class="text_wrap">{{dataContent.record.uom}}</text>
</view>
</view>
<view class="item">
<text class="item_title">扫描状态 : </text>
<text class="item_title">{{getInventoryStatusInfo(dataContent.record.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">目标库位 : </text>
<text class="item_title">{{dataContent.record.locationCode}}</text>
</view>
</view>
</template>
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
}
}
</script>
<style>
</style>

46
src/mycomponents/detail/detailItemInfo.vue

@ -0,0 +1,46 @@
<template>
<view class="">
<view class="item">
<text class="item_title">物品描述1 : </text>
<text class="text_wrap">{{dataContent.itemDesc1}} </text>
</view>
<view class="item">
<text class="item_title">物品描述2 : </text>
<text class="text_wrap">{{dataContent.itemDesc2}} </text>
</view>
<view class="item">
<text class="item_title">数量 : </text>
<text class="text_wrap">{{dataContent.qty}}{{getUnitInfo(dataContent.uom)}} </text>
</view>
</view>
</template>
<script>
import{getUnitInfo} from "@/common/directory.js"
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getUnitInfo(value){
return getUnitInfo(value).label
}
}
}
</script>
<style>
</style>

65
src/mycomponents/detail/detailPackageInfo.vue

@ -0,0 +1,65 @@
<template>
<view>
<view class="item">
<text class="item_title">供应商代码 : </text>
<text class="text_wrap">{{dataContent.supplierCode}}</text>
</view>
<view class="item">
<text class="item_title">采购订单 : </text>
<text class="text_wrap">{{dataContent.asnNumber}}</text>
</view>
<view class="item">
<text class="item_title">订单行 : </text>
<text class="text_wrap">{{dataContent.poNumber}}</text>
</view>
<view class="item">
<text class="item_title">订单行 : </text>
<view class="text_wrap">
<text class="text_wrap">{{dataContent.poLine}}</text>
</view>
</view>
<view class="item">
<text class="item_title">标包 : </text>
<view class="text_wrap">
<text class="text_wrap">{{dataContent.stdPackQty}}{{dataContent.stdPackUnit}}</text>
</view>
</view>
</view>
</template>
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo,
getUnitInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUnitInfo(value){
return getUnitInfo(value).label
}
}
}
</script>
<style>
</style>

71
src/mycomponents/detail/detailRecommendInfo.vue

@ -0,0 +1,71 @@
<template>
<view>
<!-- <view class="item_big_title">
[明细]
</view> -->
<view class="item">
<text class="item_title">明细箱码 : </text>
<text class="text_wrap">{{dataContent.packingNumber}}</text>
</view>
<view class="item">
<text class="item_title">明细批次 : </text>
<text class="text_wrap">{{dataContent.batch}}</text>
</view>
<view class="item">
<text class="item_title">明细数量 : </text>
<view class="text_wrap">
<text class="text_wrap">{{Number(dataContent.qty)}}</text>
<text class="text_wrap">{{getUnitInfo(dataContent.uom)}}</text>
</view>
</view>
<view class="item">
<text class="item_title">明细状态 : </text>
<text class="text_wrap">{{getInventoryStatusInfo(dataContent.inventoryStatus)}}</text>
</view>
<view class="item">
<text class="item_title">来源库位 : </text>
<text class="text_wrap">{{dataContent.fromLocationCode}}</text>
</view>
<view class="item">
<text class="item_title">目标库位 : </text>
<text class="text_wrap">{{dataContent.toLocationCode}}</text>
</view>
</view>
</template>
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo,
getUnitInfo
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getInventoryStatusInfo(value) {
return getInventoryStatusName(value)
},
getUnitInfo(value){
return getUnitInfo(value).label
}
}
}
</script>
<style>
</style>

79
src/mycomponents/detail/jobDetailPopup.vue

@ -0,0 +1,79 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent='dataContent'></detail-common-info>
</uni-popup>
</view>
</template>
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo
} from '@/common/directory.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {}
}
},
props: {
title: {
type: String,
default: ""
},
},
methods: {
openScanPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close()
},
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
getStdPackUnit(uom) {
let item = getStdPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
}
}
</script>
<style>
.popup_box {
width: 500rpx;
height: 500rpx;
}
.item_big_title {
color: #2196F3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
.item_title {
color: #000000;
font-size: 32rpx;
}
</style>

66
src/mycomponents/detail/recordDetailBasicInfo.vue

@ -0,0 +1,66 @@
<template>
<view class="">
<comListItem :dataList="dataList"></comListItem>
</view>
</template>
<script>
import comListItem from '@/mycomponents/common/comListItem.vue';
export default {
components: {
comListItem
},
data() {
return {
dataList: []
}
},
watch: {
dataContent: {
handler(newName, oldName) {
this.dataList = [{
title: '物品代码',
content: this.dataContent.itemCode
}, {
title: '物品名称',
content: this.dataContent.itemName
}, {
title: '物品描述1',
content: this.dataContent.itemDesc1,
}, {
title: '物品描述2',
content: this.dataContent.itemDesc2,
}, {
title: '项目代码',
content: this.dataContent.projectCode,
}, {
title: '数量',
content: this.dataContent.qty,
}, {
title: '计量单位',
content: this.dataContent.uom,
type:"uom"
}];
},
immediate: true,
deep: true
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {}
}
</script>
<style>
</style>

60
src/mycomponents/detail/recordDetailCommonInfo.vue

@ -0,0 +1,60 @@
<template>
<view class="pop_detail" style="height:80%">
<u-line></u-line>
<scroll-view style="height:320px ">
<scroll-view style="height:320px ">
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<u-line></u-line>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<!-- 包装 -->
<!-- <detail-package-info :dataContent="dataContent"></detail-package-info> -->
</scroll-view>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
detailItemInfo,
detailPackageInfo,
detailBalanceInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
</script>
<style>
</style>

71
src/mycomponents/detail/recordDetailPopup.vue

@ -0,0 +1,71 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<u-line></u-line>
<scroll-view style="height:320px ">
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<u-line></u-line>
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<u-line></u-line>
<!-- 包装 -->
<detail-package-info :dataContent="dataContent.package"></detail-package-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailPackageInfo from '@/mycomponents/detail/detailPackageInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
detailItemInfo,
detailPackageInfo,
detailBalanceInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closePopup() {
this.$refs.popup.close()
},
}
}
</script>
<style>
</style>

43
src/mycomponents/detail/requestDetailBasicInfo.vue

@ -0,0 +1,43 @@
<template>
<view class="">
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <comListItem :dataList="dataList"></comListItem> -->
</view>
</template>
<script>
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
export default {
components: {
detailItemInfo
},
data() {
return {
dataList: []
}
},
watch: {
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
getUnitInfo(value){
return getUnitInfo(value).label
}
}
}
</script>
<style>
</style>

65
src/mycomponents/detail/requestDetailCommonInfo.vue

@ -0,0 +1,65 @@
<template>
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<u-line></u-line>
<scroll-view style="height:320px ">
<!-- 物品 -->
<detail-item-info :dataContent="dataContent"></detail-item-info>
<!-- <request-detail-basic-info :dataContent="dataContent"></request-detail-basic-info> -->
<u-line></u-line>
<!-- 包装 -->
<!-- 库存余额 -->
<detail-balance-info :dataContent="dataContent"></detail-balance-info>
<slot>
<!-- 每个任务的详情 -->
</slot>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import requestDetailBasicInfo from '@/mycomponents/detail/requestDetailBasicInfo.vue'
import detailRecommendInfo from '@/mycomponents/detail/detailRecommendInfo.vue'
import detailItemInfo from '@/mycomponents/detail/detailItemInfo.vue'
import detailBalanceInfo from '@/mycomponents/detail/detailBalanceInfo.vue'
export default {
emits: ['onClose'],
components: {
comItem,
requestDetailBasicInfo,
detailRecommendInfo,
detailItemInfo,
detailBalanceInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
</script>
<style>
</style>

48
src/mycomponents/item/item.vue

@ -0,0 +1,48 @@
<template>
<view>
<view class="uni-flex u-col-center space-between" style="
background-color:#fff;
margin-left: 10rpx;">
<view >
<view class="card_itemCode" :class="openPopup(dataContent)">
{{dataContent.itemCode}}
</view>
<view class="card_itemName">
{{dataContent.itemName}}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
};
},
//
props: {
dataContent: {
type: Object,
default: {}
}
},
watch: {
},
methods: {
openPopup(val) {
// console.log(JSON.stringify(val));
},
},
}
</script>
<style>
</style>

63
src/mycomponents/item/itemCompareQty.vue

@ -0,0 +1,63 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff;">
<view style="word-break: break-all;width: 50%;">
<item :dataContent="dataContent"></item>
</view>
<view style="word-break: break-all;width: 50%;display: flex;justify-content:flex-end;margin-right: 10rpx;">
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack ="isShowStdPack"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false"
:isShowStdPack ="isShowStdPack">
</compare-qty>
</view>
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
export default {
components: {
item,
recommendQty,
compareQty,
balanceQty
},
data() {
return {
};
},
//
props: {
type: {
type: String,
default: 'recommend' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowStdPack:{
type: Boolean,
default: true
}
},
watch: {
},
methods: {
},
}
</script>
<style>
</style>

74
src/mycomponents/item/itemDetailInfo.vue

@ -0,0 +1,74 @@
<template>
<uni-popup ref="popup">
<view class="uni-flex uni-column" style="background-color: white;width: 200px; height:60%;">
<view class="uni-flex">
<text>物料号</text>
<text>{{dataContent.code}}</text>
</view>
<view class="uni-flex">
<text>物料名称</text>
<text>{{dataContent.name}}</text>
</view>
<view class="uni-flex">
<text>描述1</text>
<text>{{dataContent.desc1}}</text>
</view>
<view class="uni-flex">
<text>描述2</text>
<text>{{dataContent.desc2}}</text>
</view>
<view class="uni-flex">
<text>状态</text>
<text>{{dataContent.status}}</text>
</view>
<view class="uni-flex">
<text>类型</text>
<text>{{dataContent.type}}</text>
</view>
<view class="uni-flex">
<text>制造件</text>
<text>{{dataContent.canMake}}</text>
</view>
<view class="uni-flex">
<text>采购件</text>
<text>{{dataContent.canBuy}}</text>
</view>
<view class="uni-flex">
<text>外包件</text>
<text>{{dataContent.canOutsourcing}}</text>
</view>
<view class="uni-flex">
<text>回收件</text>
<text>{{dataContent.isRecycled}}</text>
</view>
<view class="uni-flex">
<text>ABC类</text>
<text>{{dataContent.abcClass}}</text>
</view>
</view>
</uni-popup>
</template>
<script>
export default {
data() {
return {
dataContent: {}
}
},
props: {
},
methods: {
openDetail() {
this.$refs['popup'].open("center");
},
closeScanPopup() {
this.$refs.popup.close()
},
}
}
</script>
<style>
</style>

58
src/mycomponents/item/itemInfo.vue

@ -0,0 +1,58 @@
<!--包装组件-->
<template>
<view class="">
<view class="uni-flex space-between padding_10" style="background-color: #fff;" >
<view>
<view class="font_xl text_black text_bold " style="font-size: 38rpx;">
{{ itemdetail.code }}
</view>
<view class="" style="font-size: 32rpx;">
{{ itemdetail.name }}
</view>
<view class="" style="font-size: 32rpx;">
{{ itemdetail.desc1 }}
{{ itemdetail.desc2 }}
</view>
</view>
<view class="">
<item-status :status="itemdetail.status"></item-status>
</view>
</view>
<itemInfoPopup ref="showHint" :dataContent="itemdetail" :type="'partCode'"></itemInfoPopup>
</view>
</template>
<script>
import itemStatus from '@/mycomponents/item/itemStatus.vue';
import itemInfoPopup from '@/mycomponents/item/itemInfoPopup.vue';
export default {
name: "comItem",
components: {
itemInfoPopup,
itemStatus
},
data() {
return {
};
},
//
props: {
itemdetail: {
type: Object,
value: null
}
},
methods: {
showHint() {
this.$refs.showHint.openScanPopup()
}
}
}
</script>
<style>
</style>

159
src/mycomponents/item/itemInfoPopup.vue

@ -0,0 +1,159 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_detail">
<view class="uni-flex space-between u-col-center"
style="padding-bottom: 15rpx;">
<view class="text_ellipsis" v-if="number" style="font-size: 35rpx;flex: 3;">
编号:{{number}}
</view>
<view class="text_ellipsis" v-else style="font-size: 40rpx;">
<view class="">
{{itemCode}}
</view>
<view class="">
{{itemDesc}}
</view>
</view>
<view class="uni-center" style="flex: 1;">
<view v-if="jobStatus==2" class="task_state_doing">
<text>执行中</text>
</view>
<view v-if="jobStatus==1" class="task_state_un-doing">
<text>待执行</text>
</view>
</view>
<!-- <view class="" v-else="number">
<view class="text_ellipsis" style="font-size: 40rpx;flex: 1;">
<view class="">
{{itemCode}}
</view>
<view class="">
{{itemDesc}}
</view>
</view>
</view> -->
</view>
<u-line></u-line>
<view class="" v-for="(item, index) in dataList">
<view class="item" v-if="(item.title!='worker')" v-show="(item.title!='date')">
<text class="item_title">{{item.title}} : </text>
<text class="text_wrap">{{item.content}} </text>
</view>
</view>
<u-line></u-line>
<view v-if="isShowbottom" style="margin-top: 10rpx;margin-bottom: 10rpx;width: 100%;display: flex;"
class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex uni-row u-col-center " style="flex: 1; overflow: hidden;">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text class="text_ellipsis">{{getContent("worker")}}</text>
</view>
<view class="uni-flex uni-row u-col-center " style="flex: 3;justify-content: flex-end;overflow: hidden;">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{formatDate(getContent("date"))}}</text>
</view>
</view>
</view>
<view class="uni-flex u-row-center ">
<image src="/static/icons/icons_close-circle.svg"
mode=""
class="icons_close"
@click="closeScanPopup()"
></image>
</view>
</uni-popup>
</view>
</template>
<script>
import {
dateFormat,
} from '@/common/basic.js';
export default {
mounted() {
},
props: {
title: {
type: String,
default: ""
},
dataContent: {
type: Object,
default: {}
},
number:{
type: String,
default: ""
},
jobStatus:{
type: Number,
default: -1
},
dataList:{
type: Object,
default: []
},
worker:{
type: String,
default: ""
},
date:{
type: String,
default: ""
},
itemCode:{
type: String,
default: ""
},
itemDesc:{
type: String,
default: ""
},
isShowbottom:{
type: Boolean,
default: true
}
},
methods: {
openScanPopup() {
this.$refs.popup.open('center')
},
closeScanPopup() {
this.$refs.popup.close()
},
startEdit() {
this.$refs.receiptCountEdit.openScanPopup();
},
formatDate(val) {
return dateFormat(val)
},
getContent(title){
let items = this.dataList.filter(r => {
if (r.title==title) {
return r;
}
})
if(items!=null&&items.length>0){
return items[0].content;
}
}
}
}
</script>
<style>
</style>

67
src/mycomponents/item/itemQty.vue

@ -0,0 +1,67 @@
<template>
<view class="uni-flex uni-row space-between center" style="background-color:#fff;">
<view>
<item :dataContent="dataContent"></item>
</view>
<view>
<!-- showBalanceQty -->
<balanceQty v-if="isShowBalanceQty" :dataContent="dataContent"></balanceQty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowStdPack="showStdPack">
</compare-qty>
</view>
<!-- <view v-else>
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false">
</compare-qty>
</view> -->
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
item,
balanceQty,
compareQty
},
data() {
return {
};
},
//
props: {
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowBalanceQty: {
type: Boolean,
default: true
},
showStdPack: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
},
}
</script>
<style>
</style>

65
src/mycomponents/item/itemRecommendQty.vue

@ -0,0 +1,65 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff;">
<view>
<item :dataContent="dataContent"></item>
</view>
<view v-if="isShowBalance">
<balanceQty :dataContent="dataContent"></balanceQty>
</view>
<view v-else>
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false">
</compare-qty>
</view>
</view>
</template>
<script>
import item from '@/mycomponents/item/item.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
export default {
components: {
item,
recommendQty,
compareQty,
balanceQty
},
data() {
return {
};
},
//
props: {
type: {
type: String,
default: 'recommend' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
isShowBalance: {
type: Boolean,
default: false
}
},
watch: {
},
methods: {
},
}
</script>
<style>
</style>

62
src/mycomponents/item/itemSelect.vue

@ -0,0 +1,62 @@
<template>
<view class="" style="background-color:#fff;">
<view class="uni-flex uni-row" style="display: flex;align-items: center;">
物料
<uni-easyinput ref='scanInput' v-model="partCode" @confirm="confirmPartCode" @clear="clear"
style='font-size: 18px;padding: 10rpx 20rpx;' placeholder="请输入物料号" @iconClick="">
</uni-easyinput>
</view>
<view class="">
<u-select v-model="showPartCode" mode="single-column" :list="list" @confirm="confirmSelectPartCode">
</u-select>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
partCode: "",
showPartCode: false,
}
},
props: {
list: {
type: Object,
default: []
}
},
watch: {
// recommend
},
methods: {
confirmPartCode() {
if (this.partCode == '') {
uni.showToast({
title: "请扫描物料"
})
return;
}
this.showPartCode = true;
},
confirmSelectPartCode(e) {
this.partCode = e[0].label
this.$emit("confirmSelectPartCode", this.partCode)
},
clear() {
this.partCode = "";
this.$emit("clearPartCode", this.partCode)
}
}
}
</script>
<style>
</style>

47
src/mycomponents/item/itemStatus.vue

@ -0,0 +1,47 @@
<template>
<view class="">
<text :class="statusStyle(status)"
style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(status)}}</text>
</view>
</template>
<script>
import {
getItemStateInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
};
},
props: {
dataContent: {
type: Object,
default: {},
},
status: {
type: String,
default: "",
},
},
methods: {
statusDesc(value) {
return getItemStateInfo(value).label
},
statusStyle(value) {
return getItemStateInfo(value).remark;
},
}
}
</script>
<style>
</style>

49
src/mycomponents/job/jobBottom.vue

@ -0,0 +1,49 @@
<template>
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" -->
<view class="task_item">
<view class="uni-flex space-between u-col-center">
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text>{{dataContent.creator}}</text>
</view>
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text class="center">{{formatDate(dataContent.createTime)}}</text>
</view>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
formatDate: function(val) {
return dateFormat(val)
}
}
}
</script>
<style lang="scss">
</style>

93
src/mycomponents/job/jobCard.vue

@ -0,0 +1,93 @@
<template>
<view>
<view class="task_card" @click="openDetail">
<job-top :dataContent="dataContent"></job-top>
<job-property :propertyList="propertyList"></job-property>
<u-line color="#909399" />
<job-bottom :dataContent="dataContent"></job-bottom>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/common/basic.js';
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobProperty from '@/mycomponents/job/jobProperty.vue'
export default {
components: {
jobTop,
jobBottom,
jobProperty
},
data() {
return {
options1: [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
}],
options2: [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},
{
text: '放弃',
style: {
backgroundColor: '#F56C6C'
}
}
],
title: "任务详情",
dataList: [{
title: "供应商",
content: '供应商'
},
{
title: "订单号",
content: '订单号'
},
{
title: "需求库位",
content: "D101"
},
{
title: "需求数量",
content: 100
},
]
};
},
watch: {
dataContent: {
handler(newName, oldName) {
},
immediate: true,
deep: true
}
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
</script>
<style lang="scss">
</style>

41
src/mycomponents/job/jobComMainCard.vue

@ -0,0 +1,41 @@
<template>
<view>
<view class="task_card">
<job-top :dataContent="dataContent"></job-top>
<slot></slot>
<u-line color="#909399" />
<job-bottom :dataContent="dataContent"></job-bottom>
</view>
</view>
</template>
<script>
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
export default {
components: {
jobTop,
jobBottom,
},
data() {
return {
};
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
</script>
<style lang="scss">
</style>

62
src/mycomponents/job/jobCommonInfo.vue

@ -0,0 +1,62 @@
<template>
<view class="pop_detail" style="height:80%">
<job-top :dataContent="dataContent"></job-top>
<u-line></u-line>
<scroll-view style="height:400px ">
<slot>
<!-- 每个任务的详情 -->
</slot>
<job-request-info :dataContent="dataContent"></job-request-info>
<u-line></u-line>
<job-person-info :dataContent="dataContent"></job-person-info>
<u-line></u-line>
<job-setting-info :dataContent="dataContent"></job-setting-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</template>
<script>
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobRequestInfo from '@/mycomponents/job/jobRequestInfo.vue'
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue'
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue'
export default {
emits: ['onClose'],
components: {
jobTop,
jobBottom,
jobPersonInfo,
jobSettingInfo,
jobRequestInfo
},
data() {
return {}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
closePopup() {
this.$emit('onClose')
},
}
}
</script>
<style>
</style>

79
src/mycomponents/job/jobDetailPopup.vue

@ -0,0 +1,79 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent='dataContent' @onClose="closeScanPopup()" ></detail-common-info>
</uni-popup>
</view>
</template>
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo
} from '@/common/directory.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {}
}
},
props: {
title: {
type: String,
default: ""
},
},
methods: {
openScanPopup(val) {
this.dataContent = val;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close()
},
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
getStdPackUnit(uom) {
let item = getStdPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.name
}
}
}
}
</script>
<style>
.popup_box {
width: 500rpx;
height: 500rpx;
}
.item_big_title {
color: #2196F3;
font-size: 35rpx;
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.item {
padding-top: 5rpx;
padding-bottom: 5rpx;
}
.item_title {
color: #000000;
font-size: 32rpx;
}
</style>

155
src/mycomponents/job/jobFilter.vue

@ -0,0 +1,155 @@
<template>
<uni-popup ref="popup">
<view class="maskbox" @tap="maskClick"></view>
<view class="uni-flex uni-column center"
style="background-color: white;width: 200px; height:auto;padding: 20rpx;z-index: 99;position: relative;">
<view class="uni-flex space-between u-col-center" style="width: 100%;">
<view class="" style="font-size: 32rpx;">
只看当天
</view>
<u-switch v-model="checkedTodayModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeToday"></u-switch>
</view>
<view class="uni-flex space-between u-col-center" style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
只看待处理
</view>
<u-switch v-model="checkedWaitModel" active-color="#4DD865" inactive-color="#eee" size="35" @change="switchChangeWait"></u-switch>
</view>
<view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
<button class="filter_button" hover-class="filter_button_after"
@click="scanOtherClick">扫描ASN单号</button>
</view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx;">
<button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button>
</view>
</view>
</view>
</uni-popup>
<win-scan-job-number ref="scanNumber" title="任务编号" @getScanCode='getScanNumber'></win-scan-job-number>
<win-scan-asn-number ref="scanAsnNumber" :title="otherTitle" @getScanCode='getScanAsNumber'></win-scan-asn-number>
</template>
<script>
import {
getTodayDate
} from '@/common/basic.js';
import winScanJobNumber from "@/mycomponents/scan/winScanJobNumber.vue"
import winScanAsnNumber from "@/mycomponents/scan/winScanAsnNumber.vue"
export default {
emits: ["switchChangeToday", "switchChangeWait", "onScanNumber", "onScanAsnNumber"],
components: {
winScanJobNumber,
winScanAsnNumber
},
props: {
checkedToday: {
type: Boolean,
default: false
},
checkedWaitTask: {
type: Boolean,
default: false
},
otherTitle: {
type: String,
default: ""
},
isShowAsn:{
type: Boolean,
default: false
}
},
data() {
return {
dataContent: {},
checkedTodayModel:false,
checkedWaitModel:false,
}
},
watch: {
checkedToday: {
handler(newName, oldName) {
this.checkedTodayModel = this.checkedToday
},
immediate: true,
deep: true
},
checkedWaitTask: {
handler(newName, oldName) {
this.checkedWaitModel = this.checkedWaitTask
},
immediate: true,
deep: true
}
},
mounted() {
},
methods: {
//
maskClick() {
//
this.closeScanPopup();
},
openFilter() {
this.$refs['popup'].open("right");
},
closeScanPopup() {
this.$refs.popup.close()
},
switchChangeToday(isOn) {
let creationTime = '';
if (isOn) {
creationTime = getTodayDate();
}
this.$emit("switchChangeToday", isOn, creationTime)
this.closeScanPopup()
},
switchChangeWait(isOn) {
let status = "1,2";
if(isOn){
status="1"
}
this.$emit("switchChangeWait", isOn, status)
this.closeScanPopup()
},
scanNumberClick() {
this.$refs.scanNumber.openScanPopup();
},
scanOtherClick() {
this.$refs.scanAsnNumber.openScanPopup();
},
getScanAsNumber(val) {
this.$emit("onScanAsnNumber", val)
this.$refs.scanAsnNumber.closeScanPopup();
this.closeScanPopup();
},
getScanNumber(val) {
this.$emit("onScanNumber", val)
this.$refs.scanNumber.closeScanPopup();
this.closeScanPopup();
},
}
}
</script>
<style lang="scss">
.maskbox {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
</style>

75
src/mycomponents/job/jobInfoPopup.vue

@ -0,0 +1,75 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="pop_detail" style="height:500px">
<job-top :dataContent="dataContent"></job-top>
<u-line></u-line>
<scroll-view style="height:400px ">
<slot>
<!-- 每个任务的详情 -->
</slot>
<job-person-info :dataContent="dataContent"></job-person-info>
<u-line></u-line>
<job-setting-info :dataContent="dataContent"></job-setting-info>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
<!-- <button class="close_button" @click="closePopup">关闭</button> -->
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import jobTop from '@/mycomponents/job/jobTop.vue'
import jobBottom from '@/mycomponents/job/jobBottom.vue'
import jobPersonInfo from '@/mycomponents/job/jobPersonInfo.vue'
import jobSettingInfo from '@/mycomponents/job/jobSettingInfo.vue'
export default {
components: {
jobTop,
jobBottom,
jobPersonInfo,
jobSettingInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
},
}
},
mounted() {},
props: {
title: {
type: String,
default: ""
},
},
methods: {
openPopup(dataContent, dataList) {
this.dataContent = dataContent;
// this.dataList = dataList;
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closePopup() {
this.$refs.popup.close()
},
}
}
</script>
<style>
</style>

36
src/mycomponents/job/jobNumber.vue

@ -0,0 +1,36 @@
<template>
<view class="task_number">
<!-- <text>任务编号 : {{number}}</text> -->
<text> {{number}}</text>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
};
},
watch: {
},
props: {
number: {
type: String,
default: ''
},
},
methods: {}
}
</script>
<style lang="scss">
</style>
<style>
</style>

64
src/mycomponents/job/jobPersonInfo.vue

@ -0,0 +1,64 @@
<template>
<view class="">
<view class="uni-flex uni-column">
<view>
<view class="item">
<text class="item_title">承接人 : </text>
<text class="text_wrap">{{dataContent.acceptUserName}} </text>
</view>
<view class="item">
<text class="item_title">承接时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.acceptTime)}} </text>
</view>
<view class="item">
<text class="item_title">创建人 : </text>
<text class="text_wrap">{{dataContent.creator}} </text>
</view>
<view class="item">
<text class="item_title">创建时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.createTime)}} </text>
</view>
<view class="item">
<text class="item_title">完成人 : </text>
<text class="text_wrap">{{dataContent.completeUserName}} </text>
</view>
<view class="item">
<text class="item_title">完成时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.completeTime)}} </text>
</view>
</view>
</view>
</view>
</template>
<script>
import {dateFormat} from "@/common/basic.js"
export default {
components: {},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
dateFormat(value){
return dateFormat(value)
}
}
}
</script>
<style>
</style>

36
src/mycomponents/job/jobProperty.vue

@ -0,0 +1,36 @@
<template>
<view class="task_item">
<view class="task_text">
<view class="" v-for="(item, index) in propertyList" >
<view class="">
{{item.name}} : {{item.value}}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
watch: {
},
props: {
propertyList: {
type: Object,
default: {}
},
},
methods: {
}
}
</script>
<style>
</style>

96
src/mycomponents/job/jobRequestInfo.vue

@ -0,0 +1,96 @@
<template>
<view class="">
<view class="uni-flex uni-column">
<view>
<view class="item">
<text class="item_title">申请单号 : </text>
<text class="text_wrap">{{dataContent.requestNumber}} </text>
</view>
<view class="item">
<text class="item_title">申请时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.requestTime)}} </text>
</view>
<view class="item">
<text class="item_title">要求截至时间 : </text>
<text class="text_wrap">{{dateFormat(dataContent.requestDueTime)}} </text>
</view>
<view class="item">
<text class="item_title">从仓库代码 : </text>
<text class="text_wrap">{{dataContent.fromWarehouseCode}} </text>
</view>
<view class="item">
<text class="item_title">到仓库代码 : </text>
<text class="text_wrap">{{dataContent.toWarehouseCode}} </text>
</view>
<view class="item">
<text class="item_title">出库库存状态范围 : </text>
<text class="text_wrap">{{getInventoryStatusDesc(getDirectoryItemArray(dataContent.outInventoryStatuses))}} </text>
</view>
<view class="item">
<text class="item_title">入库库存状态范围 : </text>
<text class="text_wrap">{{getInventoryStatusDesc(getDirectoryItemArray(dataContent.inInventoryStatuses))}} </text>
</view>
<view class="item">
<text class="item_title">从库位类型范围 : </text>
<text class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(dataContent.fromLocationTypes))}} </text>
</view>
<view class="item">
<text class="item_title">到库位类型范围 : </text>
<text class="text_wrap">{{getLocationTypeNameList(getDirectoryItemArray(dataContent.toLocationTypes))}} </text>
</view>
</view>
</view>
</view>
</template>
<script>
import {
dateFormat,
getDirectoryItemArray,
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getLocationTypeNameList
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
list:["OK"]
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
dateFormat(value){
return dateFormat(value)
},
getInventoryStatusDesc(value){
return getInventoryStatusDesc(value)
},
getDirectoryItemArray(value){
return getDirectoryItemArray(value)
},
getLocationTypeNameList(value){
return getLocationTypeNameList(value)
}
}
}
</script>
<style>
</style>

77
src/mycomponents/job/jobSettingInfo.vue

@ -0,0 +1,77 @@
<template>
<view class="">
<view class="uni-flex uni-column">
<view>
<view class="item">
<text class="item_title">允许修改库位 : </text>
<text class="text_wrap">{{ converter( dataContent.allowModifyLocation)}} </text>
</view>
<view class="item">
<text class="item_title">允许修改数量 : </text>
<text class="text_wrap">{{converter(dataContent.allowModifyQty)}} </text>
</view>
<view class="item">
<text class="item_title">允许大于推荐数量 : </text>
<text class="text_wrap">{{converter(dataContent.allowBiggerQty)}} </text>
</view>
<view class="item">
<text class="item_title">允许小于推荐数量 : </text>
<text class="text_wrap">{{converter(dataContent.allowSmallerQty)}} </text>
</view>
<view class="item">
<text class="item_title">允许修改库存状态 : </text>
<text class="text_wrap">{{converter(dataContent.allowModifyInventoryStatus)}} </text>
</view>
<view class="item">
<text class="item_title">允许修改箱码 : </text>
<text class="text_wrap">{{converter(dataContent.allowModifyPackingNumber)}} </text>
</view>
<view class="item">
<text class="item_title">允许修改批次 : </text>
<text class="text_wrap">{{converter(dataContent.allowModifyBach)}} </text>
</view>
<view class="item">
<text class="item_title">允许部分完成 : </text>
<text class="text_wrap">{{converter(dataContent.allowPartialComplete)}} </text>
</view>
<view class="item">
<text class="item_title">允许连续扫描 : </text>
<text class="text_wrap">{{converter(dataContent.allowContinuousScanning)}} </text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
mounted() {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
converter(val) {
// return ''
return val == "TRUE" ? '是' : '否'
}
}
}
</script>
<style>
</style>

45
src/mycomponents/job/jobStatus.vue

@ -0,0 +1,45 @@
<template>
<view >
<text :class="statusStyle(jobStatus)">
{{ jobStatusInfo.label}}
</text>
</view>
</template>
<script>
import {
getJobStateInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
jobStatusInfo: {}
};
},
watch: {},
props: {
jobStatus: {
type: String,
default: ""
}
},
mounted() {},
methods: {
statusStyle(value) {
this.jobStatusInfo = getJobStateInfo(value);
return getJobStateInfo(value).remark
},
}
}
</script>
<style>
</style>

41
src/mycomponents/job/jobTop.vue

@ -0,0 +1,41 @@
<template>
<view class="task_top">
<view class="uni-flex space-between u-col-center align-center" >
<job-number :number="dataContent.number"></job-number>
<job-status :jobStatus="dataContent.status"></job-status>
</view>
</view>
</template>
<script>
import jobNumber from '@/mycomponents/job/jobNumber.vue'
import jobStatus from '@/mycomponents/job/jobStatus.vue'
export default {
components: {
jobNumber,
jobStatus
},
data() {
return {
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
}
</script>
<style lang="scss">
</style>

146
src/mycomponents/job/jobcomDetailCard.vue

@ -0,0 +1,146 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="Number(dataContent.handleQty)">
</item-compare-qty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack"
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<job-detail-popup ref="receiptHint" :dataContent="showItem"></job-detail-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import batch from '@/mycomponents/balance/batch.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
export default {
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
jobDetailPopup,
batch
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
jobType: {
type: String,
default: ""
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

57
src/mycomponents/label/label.vue

@ -0,0 +1,57 @@
<template>
<view>
<balance :dataContent="detail" :isShowStdPack="false" :isShowPack="true" :isShowFromLocation="true"></balance>
<purchase-info :dataContent="labelContent"></purchase-info>
</view>
</template>
<script>
import balance from '@/mycomponents/balance/balance.vue'
import purchaseInfo from '@/mycomponents/purchase/purchaseInfo.vue'
export default {
components: {
balance,
purchaseInfo
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
packageContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

55
src/mycomponents/location/location.vue

@ -0,0 +1,55 @@
<template>
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-row space-between u-col-center" >
<view class="location_view" >
<text class="card_location"> 库位 </text>
<text> {{locationCode}}</text>
</view>
<view class="" v-if="recommendQty>0">
<count :countType="'recommend_handle_no_pack'"
:recommendQty="recommendQty"
:handledQty="handledQty"
:uom="uom"></count>
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data(){
return {
}
},
props: {
locationInfo:{
type: Object,
default: {}
},
locationCode:{
type: String,
default: ''
},
recommendQty:{
type: Number,
default: 0
},
handledQty:{
type: Number,
default: 0
},
uom:{
type: String,
default: ''
}
},
}
</script>
<style>
</style>

47
src/mycomponents/location/locationDetail.vue

@ -0,0 +1,47 @@
<template>
<view class="cen_card" style="background-color: #fff;">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">仓库</view>
<view>{{dataContent.warehouseCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库区</view>
<view>{{dataContent.areaCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">库位组</view>
<view>{{ dataContent.locationGroupCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">ERP储位</view>
<view>{{ dataContent.erpLocationCode }}</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'comItemLocationCenter',
components: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
data() {
return {}
},
created() {
},
methods: {
}
}
</script>
<style>
</style>

58
src/mycomponents/location/locationDrop.vue

@ -0,0 +1,58 @@
<template>
<view class="" style="background-color:#fff;">
<view class="uni-flex uni-row u-col-center" >
库位 <uni-easyinput ref='scanInput' v-model="locationCode" :focus="inputFocus"
@confirm="confirmLocation" suffixIcon="arrowdown" style='font-size: 18px;padding: 10rpx 20rpx;'
placeholder="请输入库位" @iconClick="showLocationSelect" :disabled="locationDisabled">
</uni-easyinput>
</view>
<view class="" >
<u-select v-model="showLocation" mode="mutil-column-auto" :list="listLode" @confirm="confirmSelectLocation">
</u-select>
</view>
</view>
</template>
<script>
export default {
components: {
},
data(){
return {
locationCode:"",
inputFocus: false,
showLocation: false,
showPartCode: false
}
},
props: {
locationDisabled:{
type: Boolean,
default: false
},
listLode:{
type: Object,
default: []
},
},
methods:{
confirmLocation(){
// this.showLocation =true
},
confirmSelectLocation(e) {
this.locationCode = e[2].label
this.$emit("confirm",this.locationCode)
},
showLocationSelect() {
this.showLocation = true;
},
}
}
</script>
<style>
</style>

45
src/mycomponents/location/locationInfo.vue

@ -0,0 +1,45 @@
<!--库位组件-->
<template>
<view class="" >
<view class="" style="background-color: #fff;">
<view class="uni-flex space-between" style="padding: 20rpx;">
<view class="" >
<text class="font_xl text_black text_bold">{{locationDetail.code}}</text>
</view>
<view class="">
<location-status :type="locationDetail.type" ></location-status>
</view>
</view>
<location-detail :dataContent="locationDetail"></location-detail>
</view>
</view>
</template>
<script>
import locationDetail from '@/mycomponents/location/locationDetail.vue'
import locationStatus from '@/mycomponents/location/locationStatus.vue'
export default {
name: "comlocation",
components: {
locationDetail,
locationStatus,
},
data() {
return {
};
},
//
props: {
locationDetail: {
type: Object,
value: null
}
},
methods:{
}
}
</script>
<style scoped lang="scss">
</style>

46
src/mycomponents/location/locationStatus.vue

@ -0,0 +1,46 @@
<template>
<view class="">
<text :class="statusStyle(type)" style="padding-top: 5rpx;padding-bottom: 5rpx;padding-left: 15rpx;padding-right: 15rpx;">{{statusDesc(type)}}</text>
</view>
</template>
<script>
import {
getLocationTypeInfo
} from '@/common/directory.js';
export default {
components: {
},
data() {
return {
};
},
props: {
dataContent: {
type: Object,
default: {},
},
type: {
type: String,
default: "",
},
},
methods: {
statusDesc(code) {
return getLocationTypeInfo(code).label
},
statusStyle(code) {
return getLocationTypeInfo(code).remark;
},
}
}
</script>
<style>
</style>

79
src/mycomponents/location/requiredLocation.vue

@ -0,0 +1,79 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view>
{{title}}
<!-- <text style="font-size: 35rpx;">{{title}}&nbsp {{locationCode}} </text> -->
<text style="font-size: 35rpx;color:#3FBAFF;" v-if="locationCode==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp {{locationCode}}</text>
</view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
</view>
</template>
<script>
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
export default {
components: {
winScanLocation
},
data() {
return {
defaultlocationCode: ""
}
},
props: {
title: {
type: String,
default: "需求库位"
},
locationCode: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
},
locationTypeList: {
type: Array,
default: []
}
},
watch: {
// locationCode: {
// handler(newName, oldName) {
// if (this.locationCode != "") {
// this.defaultlocationCode = this.locationCode;
// }
// },
// immediate: true,
// deep: true
// }
},
methods: {
showLocation() {
if (this.isShowEdit) {
this.$refs.scanLocationCode.openScanPopup();
}
},
//
getLocation(location, code) {
this.$emit("getLocation", location, code)
}
}
}
</script>
<style>
</style>

84
src/mycomponents/package/packageBalance.vue

@ -0,0 +1,84 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between uni-inline-item">
<view class="uni-flex uni-row uni-inline-item">
<view style=" width: 20px;display: flex;justify-content: center;align-items: center; color: #32C1E8;">
原始
</view>
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
<view>
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false">
</compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

204
src/mycomponents/package/packageDetailPopup.vue

@ -0,0 +1,204 @@
<template>
<uni-popup ref="popup">
<view class="pop_detail" style="height:80%">
<com-item :dataContent="dataContent"></com-item>
<u-line></u-line>
<scroll-view style="height:320px ">
<view v-for="(item, index) in dataList" style="width: 100%;">
<view class="item">
<text class="item_title">{{item.item_title}} </text>
<text v-if="(item.type=='')||(item.type==undefined)" class="text_wrap">{{item.content}}</text>
<text v-else-if="item.type=='dateTime'" class="text_wrap">{{formatDate(item.content)}} </text>
</view>
</view>
</scroll-view>
<view class="uni-flex u-row-center ">
<view class="close_button" @click="closePopup">
关闭</view>
<!-- button 滚动不好使 -->
</view>
</view>
</uni-popup>
</template>
<script>
import comItem from '@/mycomponents/item/item.vue'
import { dateFormat } from '@/common/basic.js';
export default {
emits: ['onClose'],
components: {
comItem
},
data() {
return {
dataContent: {
type: Object,
default: {}
},
dataList: []
}
},
mounted() {},
props: {
},
methods: {
openPopup(val) {
this.dataContent = val;
this.getDataList();
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closePopup(val) {
this.$refs.popup.close('bottom')
// this.$emit('onClose')
},
getDataList() {
// console.log(JSON.stringify(this.dataContent));
this.dataList.length = 0;
this.dataList.push(...[{
item_title: '包装号',
content: this.dataContent.number
}, {
item_title: '物料代码',
content: this.dataContent.itemCode
}, {
item_title: '物品名称',
content: this.dataContent.itemName
}, {
item_title: '物品描述1',
content: this.dataContent.itemDesc1
}, {
item_title: '物品描述2',
content: this.dataContent.itemDesc2
}, {
item_title: '批次',
content: this.dataContent.batch
}, {
item_title: '替代批次',
content: this.dataContent.altBatch
}, {
item_title: '生产日期',
content: this.dataContent.produceDate,
type:"dateTime"
}, {
item_title: '有效日期',
content: this.dataContent.validityDays,
type:"dateTime"
}, {
item_title: '失效日期',
content: this.dataContent.expireDate,
type:"dateTime"
}, {
item_title: '计量单位',
content: this.dataContent.uom,
type:"uom"
}, {
item_title: '数量',
content: this.dataContent.qty
}, {
item_title: '替代计量单位',
content: this.dataContent.altUom
}, {
item_title: '替代数量',
content: this.dataContent.altQty
}, {
item_title: '转换率',
content: this.dataContent.convertRate
}, {
item_title: '标包数量',
content: this.dataContent.stdPackQty
}, {
item_title: '标包单位',
content: this.dataContent.stdPackUnit
}, {
item_title: '仓库代码',
content: this.dataContent.toWarehouseCode
}, {
item_title: '月台代码',
content: this.dataContent.toDockCode
}, {
item_title: '库位代码',
content: this.dataContent.toLocationCode
}, {
item_title: '供应商代码',
content: this.dataContent.supplierCode
}, {
item_title: '供应商物品代码',
content: this.dataContent.supplierItemCode
}, {
item_title: '采购订单号',
content: this.dataContent.poNumber
}, {
item_title: '采购订单行',
content: this.dataContent.poLine
}, {
item_title: '采购计划单号',
content: this.dataContent.rpNumber
}, {
item_title: '发货单号',
content: this.dataContent.asnNumber
}, {
item_title: '生产订单号',
content: this.dataContent.woNumber
}, {
item_title: '生产订单行',
content: this.dataContent.woLine
}, {
item_title: '生产线代码',
content: this.dataContent.productionLineCode
}, {
item_title: '班组代码',
content: this.dataContent.teamCode
}, {
item_title: '班次代码',
content: this.dataContent.shiftCode
}, {
item_title: '客户代码',
content: this.dataContent.customerCode
}, {
item_title: '客户月台代码',
content: this.dataContent.customerDockCode
}, {
item_title: '客户物品代码',
content: this.dataContent.customerItemCode
}, {
item_title: '销售订单号',
content: this.dataContent.soNumber
}, {
item_title: '销售订单行',
content: this.dataContent.soLine
}, {
item_title: '质量等级',
content: this.dataContent.eqLevel
}, {
item_title: '货主代码',
content: this.dataContent.ownerCode
}, {
item_title: '重量',
content: this.dataContent.weight
}, {
item_title: '面积',
content: this.dataContent.area
}, {
item_title: '体积',
content: this.dataContent.volume
}]);
},
formatDate(val) {
return dateFormat(val)
},
}
}
</script>
<style>
</style>

85
src/mycomponents/package/packageHandle.vue

@ -0,0 +1,85 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between uni-inline-item">
<view class="uni-flex uni-row uni-inline-item">
<view style=" width: 20px;display: flex;justify-content: center;align-items: center; color: #32C1E8;">
实际
</view>
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
<view>
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="false">
</compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

57
src/mycomponents/package/packageTarget.vue

@ -0,0 +1,57 @@
<template>
<view class="uni-flex u-col-center" style="padding-top: 15rpx;
padding-bottom: 15rpx;
padding-left: 10rpx;
padding-right: 10rpx;
font-size:32rpx;background-color: #fff;">
<text style="font-size: 35rpx;">{{title}} </text>
<view class="uni-flex u-col-center" @click="showPack">
<text style="color:#3FBAFF;font-size: 35rpx;" v-if="packingNumber==''&&isShowEdit==true">&nbsp 请扫描</text>
<text style="color:#3FBAFF; font-size: 35rpx;">&nbsp {{packingNumber}}</text>
<image v-if="isShowEdit" style="width: 45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"
></image>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HPQ"></win-scan-pack>
</view>
</template>
<script>
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
components: {
winScanPack
},
data() {
return {
}
},
props: {
title: {
type: String,
default: "需求库位"
},
packingNumber: {
type: String,
default: ""
},
isShowEdit: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
showPack() {
this.$refs.scanPopup.openScanPopup();
},
getScanResult(result) {
this.$emit("getScanResult", result)
}
}
}
</script>
<style>
</style>

158
src/mycomponents/partCode/partCode.vue

@ -0,0 +1,158 @@
<template>
<view class="">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item :right-options="options" @click="swipeClicks($event)">
<view class="uni-flex u-col-center space-between" style="
background-color:#fff;
margin-left: 10rpx;">
<view class="card_partCode" >
<view class="" >
{{itemCode}}
</view>
<view class="">
{{itemName}}
</view>
</view>
<view class="" v-if="showCount">
<count :countType="countType"
:recommendQty="recommendQty"
:uom="uom"
:stdPackQty="stdPackQty"
:handledQty="handledQty"></count>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
options_edit: [{
text: '编辑',
style: {
backgroundColor: '#F1A532'
}
}],
options_clear: [{
text: '清空',
style: {
backgroundColor: '#F56C6C'
}
}],
options_remove: [{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}],
options_all: [{
text: '详情',
style: {
backgroundColor: '#3C9CFF'
}
},{
text: '编辑',
style: {
backgroundColor: '#F1A532'
}
},
{
text: '移除',
style: {
backgroundColor: '#F56C6C'
}
}],
index: 10,
options: []
}
},
props: {
itemCode: {
type: String,
default: ''
},
itemName: {
type: String,
default: ''
},
itemDesc: {
type: String,
default: ''
},
recommendQty: {
type: Number,
default: 0
},
handledQty: {
type: Number,
default: 0
},
stdPackQty: {
type: Number,
default: 0,
},
uom: {
type: String,
default: ''
},
jobStatus: {
type: Number,
default: 0
},
actionType: {
type: String,
default: ''
},
countType: {
type: String,
default: 'recommend_handle_no_state'
},
showCount:{
type:Boolean,
default:true
}
},
watch: {
// recommend
actionType: {
handler(newval, oldval) {
if (this.actionType == "edit") {
this.options = this.options_edit;
} else if(this.actionType == "clear"){
this.options = this.options_clear;
}else if(this.actionType == "remove"){
this.options = this.options_remove;
}else if(this.actionType == "all"){
this.options = this.options_all;
}
},
immediate: true,
deep: true
}
},
methods: {
swipeClicks(e) {
if (e.content.text == '详情') {
this.$emit("detail")
}else if (e.content.text == '编辑') {
this.$emit("edit")
} else if (e.content.text == '清空'|| e.content.text == '移除') {
this.$emit("clear")
}
}
}
}
</script>
<style>
</style>

62
src/mycomponents/partCode/partCodeSelect.vue

@ -0,0 +1,62 @@
<template>
<view class="" style="background-color:#fff;">
<view class="uni-flex uni-row" style="display: flex;align-items: center;">
物料
<uni-easyinput ref='scanInput' v-model="partCode" @confirm="confirmPartCode" @clear="clear"
style='font-size: 18px;padding: 10rpx 20rpx;' placeholder="请输入物料号" @iconClick="">
</uni-easyinput>
</view>
<view class="">
<u-select v-model="showPartCode" mode="single-column" :list="list" @confirm="confirmSelectPartCode">
</u-select>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
partCode: "",
showPartCode: false,
}
},
props: {
list: {
type: Object,
default: []
}
},
watch: {
// recommend
},
methods: {
confirmPartCode() {
if (this.partCode == '') {
uni.showToast({
title: "请扫描物料"
})
return;
}
this.showPartCode = true;
},
confirmSelectPartCode(e) {
this.partCode = e[0].label
this.$emit("confirmSelectPartCode", this.partCode)
},
clear() {
this.partCode = "";
this.$emit("clearPartCode", this.partCode)
}
}
}
</script>
<style>
</style>

116
src/mycomponents/popup/selectList.vue

@ -0,0 +1,116 @@
<template>
<uni-popup ref="popupItems">
<com-popup @onClose="closePopup">
<view class="uni-center" style="position: relative;height:900rpx ;">
<view class="" style="position: absolute;font-size: 38rpx;height: 50rpx; margin-top: 10rpx;margin-bottom: 10rpx;left: 0;top: 0;right: 0;">
选择物料
</view>
<u-line/>
<view class="" style="position: absolute;height: 720rpx; font-size: 40rpx;top: 70rpx;bottom: 80rpx;left: 0;right: 0;">
<view style="margin: 15rpx;text-align: left;" v-for="(item, index) in showList" :key="index" >
<view class="" style="padding: 10rpx;font-size: 30rpx; " @click="selectItem(item)">
({{index+1}}) 物料: {{item.itemCode}}
</view>
<u-line/>
</view>
</view>
<view class="" style="position: absolute; height:80rpx ;left: 0;bottom: 0;right: 0;">
<view class="flex uni-center" style="width: 100%;justify-content: center;margin-top: 10rpx;margin-bottom: 10rpx;" >
<view class="">
当前页{{ pageCurrent }}数据总量{{ total }}每页数据{{ pageSize }}
</view>
</view>
<view class="">
<uni-pagination :page-size="pageSize" :current="pageCurrent" :total="total" @change="change" />
</view>
</view>
</view>
</com-popup>
</uni-popup>
</template>
<script>
import {
getCustomerItemList
} from '@/api/request2.js';
import comPopup from '@/mycomponents/common/comPopup.vue'
export default {
emits: ["selectedItem"],
components: {
comPopup,
},
props: {
},
data() {
return {
showList: [],
pageCurrent:1,
pageSize:10,
total:0
}
},
methods: {
queryList(lineCode){
var filters =[]
filters.push({
column: "customerCode",
action: "==",
value: lineCode
})
var params = {
filters: filters,
pageNo: this.pageCurrent,
pageSize: this.pageSize,
}
getCustomerItemList(params).then(res => {
if (res.data != null && res.data.list.length > 0) {
this.showList = res.data.list;
this.total = res.data.total;
this.$forceUpdate()
this.$refs['popupItems'].open("center");
} else {
//线
// this.showErrorMessage('线' + lineCode + '');
this.$refs['popupItems'].open("center");
}
}).catch(error => {
// this.showErrorMessage(error);
})
},
openPopup(items) {
this.showList = items;
this.$refs['popupItems'].open("center");
},
closePopup() {
this.$refs.popupItems.close()
},
selectItem(item) {
this.$emit("selectedItem", item);
this.$refs['popupItems'].close();
},
change(e){
this.pageCurrent = e.current
console.log("分页",e.current)
}
}
}
</script>
<style>
.fixed-bottom {
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
background-color: #fff;
padding: 10px 0;
box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}
</style>

39
src/mycomponents/production/productionInfo.vue

@ -0,0 +1,39 @@
<template>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">生产线</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.productionLineCode}}</text>
</view>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">生产日期</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.produceDate}}</text>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
}
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

37
src/mycomponents/purchase/purchaseInfo.vue

@ -0,0 +1,37 @@
<template>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">供应商</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.SupplierName}}</text>
</view>
<view class="pack_view uni-inline-item">
<text style="color: #606266;font-size: 13px;">采购订单</text>
<text style="color: #606266;font-size: 13px;">{{dataContent.PoNumber}}</text>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: ''
},
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

269
src/mycomponents/qty/CountQtyEdit.vue

@ -0,0 +1,269 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<u-line />
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box>
<view class="std_pack">
{{getStdPackUnitInfo(dataContent.stdPackUnit)}}
</view>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@mousedown="mousedown" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view v-if="isShowBalance"
class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view v-if="isShowStatus" class="uni-flex uni-row space-between title"
style="align-items: center; padding-left: 30rpx;">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus" :allowEdit='true'
@updateStatus="updateStatus" @onOpen="clickState">
</balanceStatus>
</view>
</view>
<u-line />
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button v-if="showConfirmCountdown" class="btn_edit_big_confirm" hover-class="btn_edit_big_after"
@click="confirm()">确认({{seconds}}s关闭)</button>
<button v-else class="btn_edit_big_confirm" hover-class="btn_edit_big_after"
@click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import {
getStdPackUnitInfo
} from "@/common/directory.js"
import {
getInventoryStatusName
} from '@/common/directory.js';
export default {
components: {
uom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 0,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
dataContent: {},
handleQty: 0,
seconds: 0,
timer: {},
showConfirmCountdown: false,
detailList: [],
maxlength: 10,
mode: 'add' //add edit
}
},
watch: {
},
created() {
},
props: {
title: {
type: String,
default: "编辑数量"
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
isShowBalance: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
},
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
},
//
openEditPopup(item, detailList) {
this.initData(item, detailList);
// this.dataContent = item
// this.inventoryStatus = this.dataContent.inventoryStatus;
// this.allQty = Number(this.dataContent.qty)
// this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty);
// this.detailList = detailList
this.showConfirmCountdown = false;
this.mode = 'edit';
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
clearInterval(this.timer)
},
//
openEditPopupShowSeconds(item, detailList) {
this.initData(item, detailList);
this.showConfirmCountdown = true;
this.mode = 'add';
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.startTimer()
},
initData(item, detailList) {
this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.handleQty);
this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty);
this.detailList = detailList;
},
mousedown() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
},
clickState() {
this.showConfirmCountdown = false;
clearInterval(this.timer)
},
closeEditPopup() {
clearInterval(this.timer)
this.$emit("close");
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.closeEditPopup();
},
startTimer() {
this.seconds = 3;
clearInterval(this.timer)
this.timer = setInterval(() => {
this.seconds--
if (this.seconds <= 0) {
this.confirm();
// this.cancel()
return
}
}, 1000)
},
calcQty(val) {
if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty);
}
},
setValue() {
this.dataContent.handleQty = Number(this.allQty)
this.$emit("confirm", Number(this.allQty), this.inventoryStatus, this.mode);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
},
getStdPackUnitInfo(value) {
return getStdPackUnitInfo(value).name
}
}
}
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
</style>

72
src/mycomponents/qty/RecommendQty.vue

@ -0,0 +1,72 @@
<template>
<view>
<view class="uni-flex uni-row center">
<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="text_recommend ">
{{Number(dataContent.qty)}}
</view>
<uom v-show="!isShowStdPack" :uom="dataContent.uom"></uom>
</view>
<view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty>
</view>
</view>
</template>
<script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
stdPackQty,
uom,
status
},
data() {
return {
};
},
//
props: {
type: {
type: String,
default: 'default' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
recommendQty: {
type: Number,
default: 0
},
handleQty: {
type: Number,
default: 0
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
},
}
</script>
<style lang="scss">
</style>

73
src/mycomponents/qty/balanceQty.vue

@ -0,0 +1,73 @@
<template>
<view>
<view class="center">
<view class="uni-flex uni-row text_balance">
<text>
{{Number(dataContent.qty)}}
</text>
</view>
<uom v-if="dataContent.stdPackQty==undefined" :uom="dataContent.uom"></uom>
</view>
<view class="uni-flex uni-row center">
<std-pack-qty :dataContent="dataContent"></std-pack-qty>
</view>
</view>
</template>
<script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
stdPackQty,
uom,
status
},
data() {
return {
};
},
//
props: {
type: {
type: String,
default: 'default' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
recommendQty: {
type: Number,
default: 0
},
handleQty: {
type: Number,
default: 0
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
},
}
</script>
<style lang="scss">
</style>

217
src/mycomponents/qty/balanceQtyEdit.vue

@ -0,0 +1,217 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<u-line />
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box>
<std-uom :uom="dataContent.stdPackUnit"></std-uom>
<!-- <uom :uom="dataContent.stdPackUnit"></uom> -->
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>库存数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<text class="text_recommend">{{Number(dataContent.balanceQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view v-if="isShowStatus" class="uni-flex uni-row space-between title u-col-center"
style="padding-left: 30rpx;">
<text>库存状态 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<balanceStatus ref="balanceStatus" :status="inventoryStatus"
:allowEdit='allowEditStatus' @updateStatus="updateStatus">
</balanceStatus>
</view>
</view>
<u-line />
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import StdUom from '@/mycomponents/qty/StdUom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
export default {
components: {
uom,
StdUom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 0,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
originalInventoryStatus: "",
dataContent: {},
handleQty: 0,
maxlength: 10
}
},
watch: {
},
created() {
},
props: {
title: {
type: String,
default: "编辑数量"
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
}
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
},
openEditPopup(item, handleQty) {
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus
this.originalInventoryStatus =this.dataContent.inventoryStatus;
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = handleQty
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.dataContent.inventoryStatus = this.originalInventoryStatus;
this.closeEditPopup();
},
calcQty(val) {
if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty);
}
},
setValue() {
var balanceQty = Number(this.dataContent.balanceQty);
if (this.allQty == 0) {
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0',
res => {
this.allQty = balanceQty;
})
} else if (this.allQty > balanceQty) {
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']',
res => {
this.allQty = balanceQty;
})
} else {
this.callback();
}
},
callback() {
let qty = Number(this.allQty);
this.dataContent.handleQty = qty;
if (this.allowEditStatus) //,
{
this.dataContent.toInventoryStatus = this.inventoryStatus;
}
this.$emit("confirm", qty);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
console.log(this.inventoryStatus)
}
}
}
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
</style>

106
src/mycomponents/qty/compareQty.vue

@ -0,0 +1,106 @@
<template>
<view>
<view class="uni-flex uni-row ">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view v-if="Number(handleQty)!=0">
<view v-if="isShowRecommendQty">
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
</view>
<view v-else-if="Number(recommendQty)<Number(handleQty)" class="text_less">
{{Number(handleQty)}}
</view>
<view v-else-if="Number(recommendQty) ==Number(handleQty)" class="text_equal">
{{Number(handleQty)}}
</view>
</view>
<view v-else>
<view class="text_balance">
{{Number(handleQty)}}
</view>
</view>
</view>
<view class="center" v-if="isShowRecommendQty">
<view v-if="Number(handleQty)!=0" class="std_split">/</view>
<view class="text_recommend ">
{{Number(recommendQty)}}
</view>
</view>
</view>
<uom v-show="!isShowStdPack" :uom="dataContent.uom">
</uom>
<!-- <uom v-show="Number(handleQty)!=0||(isShowRecommendQty&&Number(recommendQty)>0)" :uom="dataContent.uom">
</uom> -->
</view>
<view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty>
</view>
</view>
</template>
<script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
stdPackQty,
uom,
status
},
data() {
return {
};
},
//
props: {
type: {
type: String,
default: 'default' //recommend: compare:
},
dataContent: {
type: Object,
default: {}
},
recommendQty: {
type: Number,
default: 0
},
handleQty: {
type: Number,
default: 0
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowRecommendQty: {
type: Boolean,
default: true
}
},
watch: {
handleQty: {
handler(newName, oldName) {},
immediate: true,
deep: true
}
},
methods: {
},
}
</script>
<style lang="scss">
</style>

198
src/mycomponents/qty/inspectQtyEdit.vue

@ -0,0 +1,198 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<u-line />
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>不合格数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="FailedQty" :focus="true" type="number"
@confirm="confirm()" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row u-col-center" style="width: 100%;">
<view class=""
style=" text-align: center;font-size: 32rpx;font-weight: 700;margin-left: 20rpx;">
不合格原因 :
</view>
<uni-data-picker style="padding: 20rpx; background-color:#fff;" class='uni-data-picker'
placeholder="请选择原因" popup-title="选择不合格原因" :localdata="reasonList" v-model="reason">
</uni-data-picker>
</view>
<u-line />
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import StdUom from '@/mycomponents/qty/StdUom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import {
getInspectReasonList
} from '@/common/directory.js';
export default {
components: {
uom,
StdUom,
balanceStatus,
},
data() {
return {
allQty: 0,
stdCount: 1,
stateData: 0,
balanceQty: 0,
inventoryStatus: "",
originalInventoryStatus: "",
dataContent: {},
handleQty: 0,
FailedQty: 0,
reasonList: [],
reason: ""
}
},
watch: {
},
created() {
this.reasonList = getInspectReasonList();
},
props: {
title: {
type: String,
default: "编辑数量"
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
allowEditStatus: {
type: Boolean,
default: false
}
},
methods: {
openEditPopup(item, handleQty) {
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = Number(handleQty)
this.FailedQty = Number(item.FailedQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 100)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.dataContent.inventoryStatus = this.originalInventoryStatus;
this.closeEditPopup();
},
calcQty(val) {
this.allQty = val * Number(this.dataContent.stdPackQty);
},
setValue() {
var balanceQty = Number(this.dataContent.qty);
if (this.allQty == 0) {
this.$refs.comMessage.showConfirmWarningModal('数量必须大于0',
res => {
this.allQty = balanceQty;
})
} else if (this.allQty > balanceQty) {
this.$refs.comMessage.showConfirmWarningModal('数量[' + this.allQty + ']不允许大于库存数量[' + balanceQty + ']',
res => {
this.allQty = balanceQty;
})
} else {
this.callback();
}
},
callback() {
var reasonInfo = this.reasonList.find(res => {
if (res.value == this.reason) {
return res
}
})
if (reasonInfo == undefined) {
reasonInfo = {
text: "",
value: ""
}
}
this.dataContent.toInventoryStatus = this.inventoryStatus
this.$emit("confirm", Number(this.allQty), Number(this.FailedQty), reasonInfo);
this.closeEditPopup();
},
updateStatus(value) {
this.inventoryStatus = value
console.log(this.inventoryStatus)
}
}
}
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
</style>

58
src/mycomponents/qty/qty.vue

@ -0,0 +1,58 @@
<template>
<view class="center uni-column">
<view class="uni-flex uni-row">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="text_default center">
{{Number(dataContent.qty)}}
</view>
<uom v-show="!isShowStdPack" :uom="dataContent.uom"></uom>
</view>
<view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty>
</view>
</view>
</template>
<script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
stdPackQty,
status,
uom
},
data() {
return {
};
},
//
props: {
dataContent: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
},
}
</script>
<style lang="scss">
</style>

227
src/mycomponents/qty/recommendQtyEdit.vue

@ -0,0 +1,227 @@
<template>
<view class="">
<uni-popup ref="popup">
<view class="uni-flex uni-column pop_customer">
<view class="" style="padding:10rpx">
<view class="uni-flex u-col-center uni-row space-between" style="padding: 10rpx 10rpx 20rpx 10rpx">
<view class="" style="font-size: 35rpx;">
{{title}}
</view>
<image style="width: 35rpx;height: 35rpx;" src="/static/icons/icons_close.svg"
@click="closeEditPopup"></image>
</view>
<u-line />
<view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title ">
<text>标包个数 : </text>
<view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box>
<std-uom :uom="dataContent.stdPackUnit"></std-uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>总数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="false" type="number"
@input="checkNum" @confirm="confirm()" :maxlength="maxlength" />
<uom :uom="dataContent.uom"></uom>
</view>
</view>
<u-line />
</view>
</view>
</view>
<view class="uni-flex uni-row hide_border">
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="cancel()">取消</button>
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue'
export default {
components: {
uom,
stdUom,
},
data() {
return {
allQty: 0,
stdCount: 0,
labelQty: 0,
recommendQty: 0,
maxlength: 10
}
},
watch: {
// handleQty: {
// handler(newval, oldval) {
// this.allQty = Number(this.handleQty)
// },
// immediate: true,
// deep: true
// }
},
created() {
},
props: {
title: {
type: String,
default: "编辑数量"
},
dataContent: {
type: Object,
default: {}
},
handleQty: {
type: Number,
default: 0
},
settingParam: {
type: Object,
default: {}
},
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
},
openEditPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
openTaskEditPopup(recommendQty, handleQty, labelQty) {
this.recommendQty = Number(recommendQty);
this.labelQty = Number(labelQty);
this.allQty = Number(handleQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
openRecordEditPopup(labelQty) {
this.recommendQty = 0;
this.labelQty = Number(labelQty);
this.allQty = Number(labelQty)
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeEditPopup() {
this.$refs.popup.close()
},
confirm() {
this.setValue();
},
cancel() {
this.closeEditPopup();
},
calcQty(val) {
if (val > 0) {
this.allQty = val * this.dataContent.stdPackQty;
}
},
setValue() {
// var recommendQty = Number(this.dataContent.qty);
// var labelQty = Number(this.dataContent.record.label.qty);
if (this.allQty > this.labelQty) {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于标签数量[' +
this.labelQty +
']',
res => {
this.allQty = this.labelQty;
})
} else {
if (this.recommendQty != 0) {
if (this.allQty > this.recommendQty) {
if (this.settingParam.allowBiggerQty != null && this.settingParam.allowBiggerQty ==
"TRUE") {
this.callback();
} else {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许大于推荐数量[' +
this.recommendQty +
']',
res => {
this.allQty = this.labelQty;
})
}
} else if (this.allQty < this.recommendQty) {
if (this.settingParam.allowSmallerQty != null && this.settingParam.allowSmallerQty ==
"TRUE") {
this.callback();
} else {
this.$refs.comMessage.showErrorMessage('数量[' + this.allQty + ']不允许小于推荐数量[' +
this.recommendQty +
']',
res => {
this.allQty = this.labelQty;
})
}
} else {
this.callback();
}
} else {
this.callback();
}
}
},
callback() {
this.$emit("confirm", Number(this.allQty));
this.closeEditPopup();
}
}
}
</script>
<style lang="scss">
.uni-popup .uni-popup__wrapper {
width: 100% !important;
padding: 30rpx;
}
.hide_border {
button {
border: none;
}
button::after {
border: none;
}
}
.title {
font-size: 30rpx;
}
</style>

37
src/mycomponents/qty/stdPackQty.vue

@ -0,0 +1,37 @@
<template>
<view class="std_pack" v-if="dataContent.stdPackQty!=undefined">
<text>
{{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.stdPackUnit)}}
</text>
</view>
</template>
<script>
import {
// getStdPackUnitInfo,
getStdPackUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
//
props: {
dataContent: {
stdPackQty: 1000,
uom: "EA",
},
},
methods: {
getStdPackUnit(stdPackUnit) {
let std = getStdPackUnitInfo(stdPackUnit);
return std == "" ? stdPackUnit : std.label;
}
}
}
</script>
<style>
</style>

40
src/mycomponents/qty/stdUom.vue

@ -0,0 +1,40 @@
<template>
<view class="uom">
{{getStdPackUnit(uom)}}
</view>
</template>
<script>
import {
getStdPackUnitInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
uom: {
type: String,
default: ''
},
},
methods: {
getStdPackUnit(uom) {
let item = getStdPackUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
}
}
</script>
<style>
</style>

40
src/mycomponents/qty/uom.vue

@ -0,0 +1,40 @@
<template>
<view class="uom">
{{getUnitInfo(uom)}}
</view>
</template>
<script>
import {
getUnitInfo
} from '@/common/directory.js';
export default {
data() {
return {
};
},
//
props: {
uom: {
type: String,
default: ''
},
},
methods: {
getUnitInfo(uom) {
let item = getUnitInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
}
}
}
</script>
<style>
</style>

158
src/mycomponents/recommend/recommend.vue

@ -0,0 +1,158 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;">
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
</container> -->
<pack v-if="isShowPack && detail.packingNumber!=null" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</to-location>
</view>
<view style="word-break: break-all;">
<!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>
</view>
</view>
</view>
</template>
<script>
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
</script>
<style>
</style>

69
src/mycomponents/recommend/recommendBalance.vue

@ -0,0 +1,69 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between uni-inline-item">
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view>
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail" :isShowStdPack="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty"
:isShowStdPack="false">
</compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

146
src/mycomponents/recommend/recommendCount.vue

@ -0,0 +1,146 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="uni-flex uni-row space-between ">
<!-- uni-inline-item 暂时拿掉-->
<view>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</location>
</view>
<view class="uni-flex uni-row center">
<!-- <recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty> -->
<!-- {{detail.scaned}} -->
<compare-qty :dataContent="detail" :recommendQty="Number(detail.qty)"
:isShowRecommendQty="isShowRecommendQty" :isShowStatus="isShowRecommendQty || detail.scaned==true"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
locationTitle: {
type: String,
default: '库位'
},
isShowRecommendQty: {
type: Boolean,
default: true
}
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
</script>
<style>
</style>

96
src/mycomponents/record/record.vue

@ -0,0 +1,96 @@
<template>
<view :class="dataContent.scaned?'scan_view':''">
<view class="uni-flex uni-row space-between uni-inline-item">
<view>
<pack v-if="isShowPack" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
</view>
<view>
<qty v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
</compare-qty>
</view>
</view>
<u-line></u-line>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qty from '@/mycomponents/qty/qty.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import bussinessType from '@/mycomponents/balance/bussinessType.vue'
export default {
components: {
pack,
location,
batch,
qty,
recommendQty,
compareQty,
bussinessType,
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStdPack: {
type: Boolean,
default: true
},
isShowBusiness: {
type: Boolean,
default: false
},
scaned: {
type: Boolean,
default: true
},
fromInventoryStatus: {
type: String,
default: ""
},
toInventoryStatus: {
type: String,
default: ""
},
},
watch: {
},
methods: {
}
}
</script>
<style>
</style>

49
src/mycomponents/record/recordBottom.vue

@ -0,0 +1,49 @@
<template>
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" -->
<view class="task_item">
<view class="uni-flex space-between u-col-center">
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_customer.svg" alt="" />
<text>{{dataContent.creator}}</text>
</view>
<view class="uni-flex uni-row u-col-center">
<image class="card_icon_normal" src="/static/icons/icon_date.svg" alt="" />
<text>{{formatDate(dataContent.createTime)}}</text>
</view>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
formatDate: function(val) {
return dateFormat(val)
}
}
}
</script>
<style lang="scss">
</style>

179
src/mycomponents/record/recordComDetailCard.vue

@ -0,0 +1,179 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeItem($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true" :isShowBalanceQty="isShowBalanceQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<!-- <u-line /> -->
<view class="" v-for="(detail,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,detail,index)"
:right-options="detail.scaned?scanOptions:detailOptions">
<balance :dataContent="detail" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation">
</balance>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <u-line /> -->
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<!-- <balance-detail-popup ref="balanceDetailPopup"></balance-detail-popup> -->
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
// import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceDetailPopup from '@/mycomponents/balance/balanceDetailPopup.vue'
import purchaseLabel from '@/mycomponents/balance/purchaseLabel.vue'
import location from '@/mycomponents/balance/location.vue'
import recordDetailPopup from '@/mycomponents/detail/recordDetailPopup.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
getClearOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
balance,
balanceQtyEdit,
balanceDetailPopup,
purchaseLabel,
location,
recordDetailPopup
// winListHint
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowStatus: {
type: Boolean,
default: false
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: true
},
isShowBalanceQty: {
type: Boolean,
default: false
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: [],
dataList: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
this.removeOptions = getClearOption();
},
methods: {
removeItem(e, dataContent) {
if (e.content.text == "清空") {
this.$refs.comMessage.showQuestionMessage("确定清空物料及箱码信息?",
res => {
if (res) {
this.$emit('removeItem')
// this.$emit('removeItem', this.dataContent)
}
});
}
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.handleQty);
},
detail(item) {
this.showItem = item;
this.$refs.recordDetailPopup.openPopup(item);
},
remove(item, index) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
this.$emit('removePack')
}
});
},
confirm(qty) {
// this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save