Browse Source

Merge branch 'hella_online_20240803' into master_hella

# Conflicts:
#	src/mycomponents/qty/balanceQtyEdit.vue
hella_online_20240829
陈薪名 3 months ago
parent
commit
3daf4da63a
  1. 2
      .env.development
  2. 9
      .env.production
  3. 2
      .hbuilderx/launch.json
  4. 4
      src/api/httpRequest3.js
  5. 25
      src/api/request2.js
  6. 21
      src/common/noclick.js
  7. 1
      src/main.js
  8. 6
      src/manifest.json
  9. 30
      src/mycomponents/common/comMessage.vue
  10. 8
      src/mycomponents/qty/balanceQtyEdit.vue
  11. 257
      src/mycomponents/query/balanceQuery.vue
  12. 84
      src/mycomponents/query/showListItem.vue
  13. 55
      src/mycomponents/scan/winComScan.vue
  14. 2
      src/mycomponents/scan/winScanPackAndLocation.vue
  15. 59
      src/pages.json
  16. 2
      src/pages/count/job/fuzzyCountDetail.vue
  17. 49
      src/pages/customerReturn/job/returnDetail.vue
  18. 2
      src/pages/index/index.vue
  19. 6
      src/pages/inventoryMove/coms/comInventoryDetailCard.vue
  20. 48
      src/pages/inventoryMove/coms/comMoveRecord.vue
  21. 53
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  22. 63
      src/pages/issue/job/issueDetail.vue
  23. 2
      src/pages/issue/job/issueJob.vue
  24. 44
      src/pages/issue/record/directIssue.vue
  25. 36
      src/pages/login/index.vue
  26. 4
      src/pages/package/coms/comScanPackagePack.vue
  27. 2
      src/pages/package/record/splitPackageRecord.vue
  28. 134
      src/pages/pointPutawayJob/index.vue
  29. 10
      src/pages/productDismantle/job/productDismantleDetail.vue
  30. 10
      src/pages/productPutaway/job/productPutawayDetail.vue
  31. 48
      src/pages/productPutaway/record/productPutawayRecord.vue
  32. 10
      src/pages/productReceipt/job/completeReceiveJobDetail.vue
  33. 24
      src/pages/productReceipt/job/productReceiptDetail.vue
  34. 43
      src/pages/productReceipt/job/scrapReceiptDetail.vue
  35. 10
      src/pages/productReceipt/job/semiProductReceiptDetail.vue
  36. 52
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  37. 57
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  38. 5
      src/pages/productionReceipt/job/productionReceiptJob.vue
  39. 10
      src/pages/productionReturn/job/returnDetail.vue
  40. 8
      src/pages/purchaseReceipt/job/receiptDetail.vue
  41. 52
      src/pages/purchaseReturn/job/returnDetail.vue
  42. 10
      src/pages/putaway/job/putawayDetail.vue
  43. 431
      src/pages/putaway/job/quantityPutawayJob.vue
  44. 604
      src/pages/putaway/job/quantityPutawayJobDetail.vue
  45. 51
      src/pages/scrap/job/scrapJobDetail.vue
  46. 10
      src/pages/transfer/job/issueDetail.vue
  47. 11
      src/pages/transfer/job/receiptDetail.vue
  48. 12
      src/pages/transfer/job/transferDetail.vue
  49. 50
      src/pages/unPlanned/job/issueJobDetail.vue
  50. 10
      src/pages/unPlanned/job/receiptJobDetail.vue
  51. 12
      src/store/modules/user.js
  52. 8
      src/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue

2
.env.development

@ -2,7 +2,7 @@ VITE_BASE_URL=http://172.22.32.9:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置 # 租户配置
VITE_TENANT='[{"text":"长春1379","value":1},{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=true VITE_isDevelopment=true

9
.env.production

@ -1,11 +1,12 @@
VITE_BASE_URL=http://172.21.32.13:81/api/admin-api VITE_BASE_URL=http://172.22.32.8:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api
# 租户配置 # 租户配置
VITE_TENANT='[{"text":"长春1379","value":1}]' VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=false VITE_isDevelopment=false
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'

2
.hbuilderx/launch.json

@ -17,7 +17,7 @@
"type" : "uni-app:h5" "type" : "uni-app:h5"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

4
src/api/httpRequest3.js

@ -89,6 +89,8 @@ function service(options = {}) {
message = '接口' + message.substr(message.length - 3) + '异常' message = '接口' + message.substr(message.length - 3) + '异常'
} else if (message.includes('get lock')) { } else if (message.includes('get lock')) {
message = '接口' + "数据库死锁" message = '接口' + "数据库死锁"
}else if(message.includes('statusCode:-1')){
message = "当前设备无网络,请检查网络后重试"
} }
reject("系统异常:" + message); reject("系统异常:" + message);
console.log("系统异常", message) console.log("系统异常", message)
@ -99,7 +101,7 @@ function service(options = {}) {
const networkType = res.networkType; const networkType = res.networkType;
console.log("网络类型", networkType) console.log("网络类型", networkType)
if (networkType == "none") { if (networkType == "none") {
reject("当前无网络"); reject("当前设备无网络,请检查网络后重试");
} else { } else {
uni.request(options); uni.request(options);
} }

25
src/api/request2.js

@ -19,7 +19,7 @@ export function getCaptchaImage(params) {
*/ */
export function login(username, password, code, uuid, tenantName) { export function login(username, password, code, uuid, tenantName) {
return request({ return request({
url: baseApi + '/system/auth/login', url: baseApi + '/system/auth/loginNoCode',
headers: { headers: {
isToken: false isToken: false
}, },
@ -553,6 +553,29 @@ export function getBasicItemByCode(itemCode) {
}); });
} }
/**
* 查询物品信息接口
* @param {*} code 物品代码
*
*/
export function getBasicItemByCodeSenior(itemCode) {
var params = {
filters: [{
column: "code",
action: "like",
value: itemCode
}],
pageNo: 1,
pageSize: 1000
}
return request({
url: baseApi + "/wms/itembasic/senior",
method: "post",
data: params,
});
}
/** /**
* 按物品查询库存汇总 * 按物品查询库存汇总
* @param {*} itemCode * @param {*} itemCode

21
src/common/noclick.js

@ -11,15 +11,34 @@ function noMultipleClicks(methods, info) {
} else { } else {
methods(); methods();
} }
setTimeout(()=> { let timer = setTimeout(()=> {
that.noClick= true; that.noClick= true;
clearTimeout(timer)
}, 2000) }, 2000)
} else { } else {
// 这里是重复点击的判断 // 这里是重复点击的判断
} }
} }
// 节流函数
const throttle = (fn, t,_this) => {
console.log('throttle')
return ()=> {
if (!_this.timer) {
_this.timer = setTimeout(()=>{
console.log('fn')
//·清空定时器
_this.timer = null
}, t)
fn()
}
}
}
//导出 //导出
export default { export default {
noMultipleClicks,//禁止多次点击 noMultipleClicks,//禁止多次点击
throttle
} }

1
src/main.js

@ -36,6 +36,7 @@ export function createApp() {
app.use(uView) app.use(uView)
app.component('comMessage', comMessage) app.component('comMessage', comMessage)
app.config.globalProperties.$noMultipleClicks = noclick.noMultipleClicks; app.config.globalProperties.$noMultipleClicks = noclick.noMultipleClicks;
app.config.globalProperties.$throttle = noclick.throttle;
// startApp(app); // startApp(app);
return { return {
app, app,

6
src/manifest.json

@ -1,10 +1,10 @@
{ {
"name" : "wms", "name" : "wms",
"package" : "uni.UNI43932FE", "package" : "uni.UNI43932FE",
"appid" : "__UNI__C9CF4BF", "appid" : "__UNI__F36DDCF",
"description" : "", "description" : "",
"versionName" : "1.0.55", "versionName" : "1.0.63",
"versionCode" : 55, "versionCode" : 63,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

30
src/mycomponents/common/comMessage.vue

@ -12,16 +12,22 @@
<slot name="icon"> <slot name="icon">
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<slot name="content"> <scroll-view style="max-height: 400rpx; " scroll-y="true">
<text class="content" :style="{'color': textColor?textColor:'#000'}" > <slot name="content">
{{content}} <view class="" style="display: flex;align-items: center;justify-content: center;">
</text> <text class="text_content" :style="{'color': textColor?textColor:'#000'}" >
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> --> {{content}}
</text>
</slot> </view>
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> -->
</slot>
</scroll-view>
<view class='split_line'></view> <view class='split_line'></view>
<slot name="button"> <slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> <view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 50rpx;">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> <view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text> <text :style="{'color':cancelColor}">{{ cancelText }}</text>
</view> </view>
@ -493,6 +499,7 @@
display: flex; // display: flex; //
flex-direction: column; // flex-direction: column; //
align-items: center; // align-items: center; //
margin: 8rpx;
// background-image: url() // background-image: url()
} }
@ -544,4 +551,11 @@
.def_text { .def_text {
color: $uni-color-primary; color: $uni-color-primary;
} }
.text_content{
padding: 10rpx;
font-size: 32rpx;
text-align: center;
word-break: break-all;
white-space: normal;
}
</style> </style>

8
src/mycomponents/qty/balanceQtyEdit.vue

@ -36,7 +36,7 @@
<text>数量 : </text> <text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;"> <view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number" <input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" disabled :style="{background:'#f5f5f5',color:'#bbbbbb'}"/> @confirm="confirm()" @input="checkNum" :maxlength="maxlength" :disabled="!allowEditQty" :style="allowEditQty?{}:{background:'#f5f5f5',color:'#bbbbbb'}"/>
<uom :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
</view> </view>
</view> </view>
@ -119,7 +119,11 @@
queryBalance: { queryBalance: {
type: Boolean, type: Boolean,
default: true default: true
} },
allowEditQty: {
type: Boolean,
default: true
},
}, },
watch:{ watch:{
'allQty'(newVal){ 'allQty'(newVal){

257
src/mycomponents/query/balanceQuery.vue

@ -0,0 +1,257 @@
<template>
<view style=" ">
<uni-drawer ref="showRight" mode="left" :mask-click="true" :width="330">
<view style="height:100vh;display:flex;flex-direction:column;">
<view class="uni-flex" style="justify-content: center;
background-color:#007AFF ;
color: #fff;
padding: 15rpx;
font-size: 35rpx;">
库存查询
</view>
<scroll-view v-if="true" style="height: calc(100vh - 180rpx)" scroll-y="true">
<!-- <button @click="closeDrawer" type="primary">关闭Drawer</button> -->
<!-- <view v-for="item in 110" :key="item">可滚动内容 {{ item }}</view> -->
<view class="" style="margin: 10rpx; font-size: 35rpx;">
物料号
</view>
<view style=" margin: 10rpx; display: flex; align-items: center;">
<uni-easyinput class="uni-mt-5" prefixIcon="search" v-model="itemCode" placeholder="请输入物料号"
@clear="clearItemCode" @confirm="onConfirmItemCode"></uni-easyinput>
<!-- <view>查询</view> -->
<!-- <button style="height: 80rpx; align-items: center; text-align: center;" type="primary" size="mini" >查询</button> -->
</view>
<view v-for="(item, index) in itemCodeResult" :key="index" @click="selectItemCode(item)">
<view class="" style="font-size: 30rpx; margin: 20rpx;">
<view class="">
({{index+1}}) 物料代码 : {{item.code}}
</view>
<view class="">
名称 : {{item.name}}
</view>
<view class="">
描述1 : {{item.desc1}}
</view>
<view class="">
描述2 : {{item.desc1}}
</view>
</view>
<view class="split_line"></view>
</view>
<scroll-view scroll-x="true" v-if="tableData.length>0" style="width: 330px; display: flex; align-items: center; justify-content: center; ">
<view style="width: 330px; display: flex;justify-content: center; background-color: #fff; padding-bottom: 150rpx;">
<uni-table border stripe emptyText="暂无更多数据">
<!-- 表头行 -->
<uni-tr>
<uni-th width="60" style="font-weight: 800;" align="left">序号</uni-th>
<uni-th width="60" align="left">批次</uni-th>
<uni-th width="50" align="left">库位</uni-th>
<uni-th width="60" align="left">状态</uni-th>
<uni-th width="120" align="left">数量</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in tableData" :key="index">
<uni-td>{{index+1}}</uni-td>
<uni-td>{{item.batch}}</uni-td>
<uni-td>{{item.locationCode}}</uni-td>
<uni-td>{{statusDesc(item.inventoryStatus)}}</uni-td>
<uni-td>{{item.qty}}</uni-td>
</uni-tr>
</uni-table>
<view class="uni-flex" style=" flex-direction: column; position: fixed; bottom: 0; margin-bottom: 100rpx; background-color: #fff; width: 100%; align-items: center;" >
<view class="" style="width: 100%; display: flex; justify-content: center; font-size: 32rpx;margin-top: 10rpx;margin-bottom: 10rpx;">
<view class="" >当前页{{ current }}总数{{ total }}每页{{ pageSize }}
</view>
</view>
<uni-pagination :current="current" :total="total" :show-icon="true"
@change="change" />
</view>
</view>
</scroll-view>
</scroll-view>
<button @click="closeDrawer" type="primary" style="padding-left: 20rpx;">关闭</button>
</view>
</uni-drawer>
</view>
</template>
<script>
import {
getBasicItemByCodeSenior,
} from '@/api/request2.js';
import {
getInventoryStatusStyle,
getInventoryStatusName
} from '@/common/directory.js';
export default {
components: {},
data() {
return {
itemCode: "",
itemCodeResult: [],
current: 1,
total: 18,
tableData: [{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 1
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 2
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 3
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 4
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 3
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 4
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 3
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 4
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 3
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 4
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 3
},
{
batch: "20240814",
locationCode: "901",
inventoryStatus: "OK",
qty: 4
}
]
}
},
props: {
// detail: {
// type: Object,
// default: {}
// },
// isShowPack: {
// type: Boolean,
// default: true
// }
},
watch: {
},
methods: {
statusStyle: function(val) {
return getInventoryStatusStyle(val);
},
statusDesc(value) {
return getInventoryStatusName(value)
},
change() {
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
selectItemCode(item) {
this.itemCode = item.code
this.itemCodeResult = []
},
clearItemCode() {
this.itemCode = ""
this.itemCodeResult = []
},
onConfirmItemCode() {
if (!this.itemCode) {
this.showErrorMessage("物料号为空,请先输入物料号")
return;
}
uni.showLoading({
title: "加载中",
mask: true
})
getBasicItemByCodeSenior(this.itemCode).then(res => {
uni.hideLoading()
if (res.data && res.data.list.length > 0) {
if (res.data.list.length == 1) {
this.itemCode = res.data.list[0].code
} else {
this.itemCodeResult = res.data.list
}
} else {
this.showErrorMessage("未查找到物料[" + this.itemCode + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
showDrawer() {
this.$refs.showRight.open();
},
closeDrawer() {
this.$refs.showRight.close();
}
}
}
</script>
<style>
</style>

84
src/mycomponents/query/showListItem.vue

@ -0,0 +1,84 @@
<template>
<view class="wyf">
<uni-popup ref="listPopup" type="dialog">
<view class="container">
<uni-list class="list">
<uni-list-item v-for="(item,index) in list" :title="item.title"
thumb-size="lg" >
<template v-slot:footer>
<!-- <image class="slot-image" src="@/static/logo.png" mode="widthFix" @click="selectItem(item,index)"></image -->
<text class="go" @click="selectItem(item,index)">Go</text>
</template>
</uni-list-item>
</uni-list>
</view>
</uni-popup>
</view>
</template>
<script>
import { onShow } from '@dcloudio/uni-app';
export default {
emits: ["selectItem"],
components: {
},
data() {
return {
isScanedASN:false,
list: []
// [{
// title:'',
// selected:false
// }],
}
},
props: {
},
methods:{
openList(list){
this.list = list;
this.$refs.listPopup.open('center')
},
selectItem(item,index){
this.$refs.listPopup.close();
this.$emit("selectItem", item);
}
}
}
</script>
<style lang="scss" scoped>
.wyf{
// display: block;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000
}
.container{
display: flex;
justify-content: center;
align-items: center;
.list{
width: 80%;
max-height:50vh;
overflow-y: auto;
border-radius: 10px !important;
.slot-image{
width: 40rpx;
}
.go{
color: rgb(60, 156, 255);
}
}
}
.list ::v-deep .uni-list--border{
border: 1rpx solid #e5e5e5;
}
</style>

55
src/mycomponents/scan/winComScan.vue

@ -4,15 +4,11 @@
<view> <view>
<view class="pop_tab"> <view class="pop_tab">
<view class="tab_info"> <view class="tab_info">
<view class="conbox" > <view class="conbox">
<textarea <textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" :placeholder="placeholderValue" :focus="boxfocus" @blur="handleBlur" @focus="handleFocus"
:placeholder="placeholderValue" @input="handelScanMsg" ></textarea>
:focus="boxfocus" </view>
@blur="handleBlur"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea>
</view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
<!-- <view class="paizhao" @click="scanQRCode()" v-if="true"> <!-- <view class="paizhao" @click="scanQRCode()" v-if="true">
@ -20,7 +16,7 @@
</view> --> </view> -->
<view class="uni-flex"> <view class="uni-flex">
<button class="clean_scan_btn" @touchend.prevent="clearScanValue()">清空</button> <button class="clean_scan_btn" @touchend.prevent="clearScanValue()">清空</button>
<button class="scan_btn" @click="clickScanMsg()">扫描</button> <button class="scan_btn" @click="clickScanMsg()">扫描</button>
</view> </view>
</view> </view>
@ -37,8 +33,7 @@
</view> </view>
</view> </view>
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line> <u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line>
<scroll-view scroll-y="true" class="scroll-view" v-if="expand" <scroll-view scroll-y="true" class="scroll-view" v-if="expand" style="height: 70px;">
style="height: 70px;">
<view class="uni-flex u-col" v-for="(item,index) in scanList"> <view class="uni-flex u-col" v-for="(item,index) in scanList">
<view style="width: 100%;max-height: 100px;"> <view style="width: 100%;max-height: 100px;">
<view class="uni-flex u-row space-between u-col-center" @click="showItem(item)"> <view class="uni-flex u-row space-between u-col-center" @click="showItem(item)">
@ -59,7 +54,7 @@
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script > <script>
import { import {
getLabelInfo getLabelInfo
} from '../../common/label.js'; } from '../../common/label.js';
@ -104,7 +99,7 @@
} }
}, },
mounted() { mounted() {
}, },
watch: { watch: {
placeholder() { placeholder() {
@ -139,7 +134,7 @@
}, },
clearScanValue() { clearScanValue() {
this.scanMsg = '' this.scanMsg = ''
this.cursorIndex =0 // this.cursorIndex = 0
this.getfocus(); this.getfocus();
}, },
clickScanMsg() { clickScanMsg() {
@ -153,11 +148,13 @@
// mask: true // mask: true
// }) // })
let that = this; let that = this;
let index = that.scanMsg.indexOf('\n'); // if(index==-1){
if (index >= 0) { // that.scanMsg =that.scanMsg + "\n";
// }
if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
if (content == "") { if (content == "") {
// that.getfocus(); // that.getfocus();
@ -176,7 +173,7 @@
getLabelInfo(content, this.headerType, callback => { getLabelInfo(content, this.headerType, callback => {
// uni.hideLoading(); // uni.hideLoading();
let scanResult = callback; let scanResult = callback;
scanResult.scanMessage=content scanResult.scanMessage = content
if (scanResult.success) { if (scanResult.success) {
that.clear(); that.clear();
// that.getfocus();// // that.getfocus();//
@ -191,14 +188,13 @@
}) })
} }
}); });
}, 500); }, 200);
} }
}, },
handleFocus(){ handleFocus() {},
},
handleBlur() {
handleBlur(){
// setTimeout(res=>{ // setTimeout(res=>{
// uni.hideKeyboard(); // uni.hideKeyboard();
// },200) // },200)
@ -216,14 +212,13 @@
}); });
}, },
clear() { clear() {
if(this.clearResult) if (this.clearResult) {
{ this.scanMsg = ""
this.cursorIndex = 0; // this.cursorIndex = 0;
this.scanMsg = ''
} }
}, },
iconClick(type) { iconClick(type) {
this.$emit("clearResult", this.scanMsgk); this.$emit("clearResult", this.scanMsg);
}, },
expands() { expands() {
this.expand = !this.expand; this.expand = !this.expand;

2
src/mycomponents/scan/winScanPackAndLocation.vue

@ -434,7 +434,7 @@
balance: item, balance: item,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
} }
// this.packGetFocus(); this.packGetFocus();
this.$emit("getResult", data); this.$emit("getResult", data);
}, },

59
src/pages.json

@ -458,6 +458,45 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/putaway/job/quantityPutawayJob",
"style": {
"navigationBarTitleText": "采购上架(批量)",
"enablePullDownRefresh": false,
"titleNView": {
// "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
}
}
},
{
"path": "pages/putaway/job/quantityPutawayJobDetail",
"style": {
"navigationBarTitleText": "采购上架(批量)详情",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/putaway/record/putawayRecord", "path": "pages/putaway/record/putawayRecord",
"style": { "style": {
@ -606,7 +645,25 @@
"navigationBarTitleText": "直接发料", "navigationBarTitleText": "直接发料",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"titleNView": { "titleNView": {
"autoBackButton": "true" "autoBackButton": "true",
"buttons": [
//
{
"float": "right",
"fontSize": "58rpx", //
"text": "\ue696",
"fontSrc": "/static/ali_icon/iconfont.ttf"
},
{
"float": "right",
"fontSize": "52rpx", //
"text": "\ue6e2",
"fontSrc": "/static/ali_icon/iconfont.ttf"
}
]
} }
} }
}, },

2
src/pages/count/job/fuzzyCountDetail.vue

@ -318,7 +318,7 @@
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.losefocus();
} }
}, },

49
src/pages/customerReturn/job/returnDetail.vue

@ -339,17 +339,44 @@
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -358,24 +385,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this.subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

2
src/pages/index/index.vue

@ -388,7 +388,7 @@
console.log("包装规格获取失败", res) console.log("包装规格获取失败", res)
}) })
var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate,CreateProductputawayRequestAfterProductreceiptRecordCreated"; var switchCode="FgPutawayLocationCodeValidate,SemiPutawayLocationCodeValidate,PurchasePutawayToLocationCodeValidate,IssueToLocationCodeValidate,fgProductReceipCommitValidate,semiProductReceipCommitValidate,purchasereceiptPrintPDA,purchaseReceiptLocationCodeValidate,CreateProductputawayRequestAfterProductreceiptRecordCreated";
getSwitchByCode(switchCode).then(res=>{ getSwitchByCode(switchCode).then(res=>{
uni.setStorageSync("switch", res.data) uni.setStorageSync("switch", res.data)

6
src/pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -17,7 +17,7 @@
<!-- <view class='split_line'></view> --> <!-- <view class='split_line'></view> -->
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm" :allowEditStatus="true"></balance-qty-edit> <balance-qty-edit ref="qtyEdit" :allowEditQty="allowEditQty" :settingParam="settingParam" @confirm="confirm" :allowEditStatus="true"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
></win-scan-location> ></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup> <detail-info-popup ref="detailInfoPopup"></detail-info-popup>
@ -67,6 +67,10 @@
type: Object, type: Object,
default: {} default: {}
}, },
allowEditQty: {
type: Boolean,
default: true
}
}, },
watch: { watch: {
// dataContent: { // dataContent: {

48
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -372,20 +372,7 @@
getPrecisionStrategyList(precisionStrategParams, res => { getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() this.submit()
console.log("提交" + JSON.stringify(params))
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" +
res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else { } else {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(res.message); this.showErrorMessage(res.message);
@ -398,6 +385,39 @@
} }
}, },
submit(){
//
var params = this.setParams()
let hint=""
this.dataContent.subList.forEach(res=>{
if(res.fromLocationCode==res.toLocationCode&&
res.fromInventoryStatus==res.toInventoryStatus){
hint +=`包装号【${res.fromPackingNumber}】来源库位与目标库位 来源状态与目标状态一致,不可以提交\n`
}
})
if(hint){
uni.hideLoading()
this.$refs.comMessage.showQuestionMessage1(hint, 'red', res => {
if (res) {
}
});
return;
}
console.log("提交" + JSON.stringify(params))
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" +
res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
setPrecisionStrategParams() { setPrecisionStrategParams() {
var itemList = [] var itemList = []

53
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -12,7 +12,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData" <comInventoryDetailCard :allowEditQty="false" :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' @openDetail="openDetail"> @updateData='updateData' @openDetail="openDetail">
</comInventoryDetailCard> </comInventoryDetailCard>
</view> </view>
@ -354,17 +354,44 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
//
//
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -373,26 +400,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

63
src/pages/issue/job/issueDetail.vue

@ -171,12 +171,6 @@
this.$refs.comIssueDetailCard.forEach(r => { this.$refs.comIssueDetailCard.forEach(r => {
r.resizeCollapse(); r.resizeCollapse();
}) })
// this.$refs.mainCollapse.forEach(r => {
// r.childrens.forEach(i => {
// i.init();
// })
// r.resize();
// })
}); });
}, },
@ -455,39 +449,46 @@
afterScan() { afterScan() {
this.resizeCollapse(); this.resizeCollapse();
let str = ""
this.detailSource.forEach(detail => { this.detailSource.forEach(detail => {
let s = '';
detail.Items.forEach(item => { detail.Items.forEach(item => {
let totalHandleQty = 0;
var isHandleEmpty = false; // handleQty =0;
item.Locations.forEach(lco => { item.Locations.forEach(lco => {
lco.Batchs.forEach(batch => { lco.Batchs.forEach(batch => {
if (batch.handleQty != 0) { batch.Records.forEach(record => {
totalHandleQty = calc.add(totalHandleQty, batch if (batch.qty != record.qty) {
.handleQty) var tempHandleQty = 0
} else { if (record.qty) {
isHandleEmpty = true; tempHandleQty = record.qty
} } else {
tempHandleQty = 0
}
if (batch.qty != 0) {
str +=
`包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n`
}
}
})
}) })
}) })
if (item.qty == totalHandleQty) {
if (isHandleEmpty) {
return;
}
this.submit();
} else {
this.$refs.comMessage.showQuestionMessage('实际扫描数量【' + totalHandleQty +
'】与物料需求数量【' + item.qty +
'】不一致,是否继续提交', res => {
if (res) {
this.submit();
}else {
this.scanPopupGetFocus()
}
});
}
}) })
}) })
if (str) {
str = '任务明细未全部完成,是否提交?\n' + str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
//
this.$throttle(this.submit, 2000, this)()
} else {
this.scanPopupGetFocus()
}
});
} else {
//
this.$throttle(this.submit, 2000, this)()
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {

2
src/pages/issue/job/issueJob.vue

@ -194,6 +194,7 @@
this.fromInventoryStatuses = res.fromInventoryStatuses.split(','); this.fromInventoryStatuses = res.fromInventoryStatuses.split(',');
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
// this.openScanPopup(); // this.openScanPopup();
this.$refs.scanPopup.openScanPopup(this.businessType);
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
} }
@ -294,6 +295,7 @@
uni.hideLoading(); uni.hideLoading();
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
this.openScanPopup()
} }
var list = res.data.list; var list = res.data.list;

44
src/pages/issue/record/directIssue.vue

@ -5,10 +5,11 @@
</view> </view>
<view class="page-wraper" v-if="detailSource.length>0"> <view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header"> <view class="page-header">
<view class="header_item"> <view class="header-view">
来源库位 : {{fromLocationCode}} <view class="header_item">
来源库位 : {{fromLocationCode}}
</view>
</view> </view>
<view class='split_line'></view>
</view> </view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
@ -16,9 +17,8 @@
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" <record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)" :isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowToLocation="false" :isShowToLocation="false" :isShowParentToLocation="false" @updateData="updateData"
:isShowParentToLocation="false" @removePack="removePack">
@updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -45,9 +45,10 @@
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode"> <winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="businessTypeCode">
</winComScanBalance> </winComScanBalance>
<!-- <balanceQuery ref="refBalanceQuery"></balanceQuery> -->
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -98,6 +99,8 @@
import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue' import recordDetailCard from '@/mycomponents/record/recordDetailCard.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue' import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
// import balanceQuery from '@/mycomponents/query/balanceQuery.vue'
export default { export default {
components: { components: {
@ -110,7 +113,8 @@
recordComDetailCard, recordComDetailCard,
recordDetailCard, recordDetailCard,
balanceSelect, balanceSelect,
winComScanBalance winComScanBalance,
// balanceQuery
}, },
data() { data() {
return { return {
@ -132,7 +136,7 @@
show: false, show: false,
positionInfo: "请选择生产线", positionInfo: "请选择生产线",
resultData: {}, resultData: {},
itemCode:"" itemCode: ""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -156,10 +160,14 @@
// } // }
}, },
// //
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
goHome(); goHome();
} else if (e.index == 1) {
// this.$refs.refBalanceQuery.showDrawer();
// this.closeScanPopup();
} }
}, },
// //
@ -170,7 +178,10 @@
mounted() {}, mounted() {},
methods: { methods: {
// showDrawer() {
// this.$refs.showRight.open();
// },
getBusinessType() { getBusinessType() {
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
@ -183,7 +194,7 @@
} }
}); });
}, },
getScanResult(result) { getScanResult(result) {
this.setData(result); this.setData(result);
}, },
@ -191,14 +202,14 @@
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) { if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
.fromLocationCode + "]没有库存余额") .fromLocationCode + "]没有库存余额")
return; return;
} }
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) { if (res.itemCode == balance.itemCode) {
return res return res
@ -256,9 +267,6 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -519,7 +527,7 @@
this.toWarehouseCode = ''; this.toWarehouseCode = '';
this.detailSource = []; this.detailSource = [];
this.positionInfo = "请选择生产线"; this.positionInfo = "请选择生产线";
this.itemCode="" this.itemCode = ""
} }
} }
} }

36
src/pages/login/index.vue

@ -65,13 +65,13 @@
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: row;"> <view style="display: flex;flex-direction: row;" v-if="needCode">
<!-- <view class="uni-input"> <!-- <view class="uni-input">
<input class="" placeholder="请输入验证码" <input class="" placeholder="请输入验证码"
v-model="code" v-model="code"
style="background-color: lightgray;padding-top: 40rpx;padding-bottom: 40rpx;margin-right: 20rpx;" /> style="background-color: lightgray;padding-top: 40rpx;padding-bottom: 40rpx;margin-right: 20rpx;" />
</view> --> </view> -->
<view class="uni-input-wrapper"> <view class="uni-input-wrapper" >
<input class="" style="height: 80rpx; background-color: #F7F9FF;margin-right: 20rpx;" <input class="" style="height: 80rpx; background-color: #F7F9FF;margin-right: 20rpx;"
placeholder="请输入验证码" type="number" v-model="code" /> placeholder="请输入验证码" type="number" v-model="code" />
</view> </view>
@ -119,7 +119,8 @@
imageSrc: "", imageSrc: "",
code: "", code: "",
uuid: "", uuid: "",
version: "" version: "",
needCode:false
} }
}, },
// computed: mapState(['forcedLogin', 'hasLogin']), // computed: mapState(['forcedLogin', 'hasLogin']),
@ -185,13 +186,15 @@
icon: 'none', icon: 'none',
mask: true mask: true
}) })
} else if (this.code === '') { }
else if (this.needCode&&this.code === '') {
uni.showToast({ uni.showToast({
title: '验证码不能为空', title: '验证码不能为空',
icon: 'none', icon: 'none',
mask: true mask: true
}) })
} else { }
else {
// console.log("", this.username, "", this.password, this.tapstyle, this.smloginmsg) // console.log("", this.username, "", this.password, this.tapstyle, this.smloginmsg)
let logininfo = { let logininfo = {
username: "", username: "",
@ -226,14 +229,21 @@
title: "正在登录", title: "正在登录",
mask: true mask: true
}) })
await this.$store.dispatch('Login', logininfo); try{
// await this.$store.dispatch('GetTenantIdInfo', this.tenantName) var result = await this.$store.dispatch('Login', logininfo);
uni.hideLoading() // await this.$store.dispatch('GetTenantIdInfo', this.tenantName)
uni.setStorageSync('hasLogin', true) console.log(result)
uni.switchTab({ uni.hideLoading()
url: '/pages/index/index' uni.setStorageSync('hasLogin', true)
}); uni.switchTab({
uni.setStorageSync('username', this.username); url: '/pages/index/index'
});
uni.setStorageSync('username', this.username);
}catch(e){
uni.hideLoading()
this.showErrorMessage(e)
}
}, },

4
src/pages/package/coms/comScanPackagePack.vue

@ -353,8 +353,10 @@ import { getDirectoryItemArray } from '@/common/directory';
let record = this.creatRecord(label, balance, packageInfo); let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record); batch.Records.push(record);
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
this.packGetFocus();
this.$emit('refresh'); this.$emit('refresh');
setTimeout(res=>{
this.packGetFocus();
},100)
}, },
swipeClick(e, item, index) { swipeClick(e, item, index) {

2
src/pages/package/record/splitPackageRecord.vue

@ -30,7 +30,7 @@
<view class=""> <view class="">
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="$throttle(commit,2000,this)()">提交</button>
</view> </view>
</view> </view>
</view> </view>

134
src/pages/pointPutawayJob/index.vue

@ -26,7 +26,7 @@
<tr> <tr>
<td>供应商</td> <td>供应商</td>
<td>{{item.supplierCode}}</td> <td>{{item.supplierCode}}</td>
<td>批次</td> <td>供应商批次</td>
<td>{{item.supplierBatch}}</td> <td>{{item.supplierBatch}}</td>
</tr> </tr>
<tr> <tr>
@ -35,6 +35,9 @@
<td>抽检数量</td> <td>抽检数量</td>
<td>{{item.sampleQty}}</td> <td>{{item.sampleQty}}</td>
</tr> </tr>
<tr v-if="!item.haveInspectionRequest">
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
</tbody> </tbody>
</table> </table>
</view> </view>
@ -76,6 +79,7 @@
</button> </button>
</view> </view>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -197,41 +201,83 @@
this.readFile(htmlFileUrl1, (htmlContent) => { this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent this.newHtmlContent1 = htmlContent
this.data1.inspectDTOList.forEach(item => { this.data1.inspectDTOList.forEach(item => {
str += ` if(!item.haveInspectionRequest){
<div class="box" style="page-break-before:always;"><br /> str += `
<div class="relative" > <div class="box" style="page-break-before:always;"><br />
<div class="q">Q</div> <div class="relative" >
<table border='1'> <div class="q">Q</div>
<thead> <table border='1'>
<tr class='top1'> <thead>
<th>物料代码:</th> <tr class='top1'>
<th colspan='3'>${item.itemCode}</th> <th>物料代码:</th>
</tr> <th colspan='3'>${item.itemCode}</th>
</thead> </tr>
<tbody> </thead>
<tr> <tbody>
<td>物料名称</td> <tr>
<td>${item.itemName}</td> <td>物料名称</td>
<td>发货单号</td> <td>${item.itemName}</td>
<td>${this.data1.asnNumber}</td> <td>发货单号</td>
</tr> <td>${this.data1.asnNumber}</td>
<tr> </tr>
<td>供应商</td> <tr>
<td>${item.supplierCode}</td> <td>供应商</td>
<td>批次</td> <td>${item.supplierCode}</td>
<td>${item.supplierBatch}</td> <td>供应商批次</td>
</tr> <td>${item.supplierBatch}</td>
<tr> </tr>
<td>到货数量</td> <tr>
<td>${item.quantityQty}</td> <td>到货数量</td>
<td>抽检数量</td> <td>${item.quantityQty}</td>
<td>${item.sampleQty}</td> <td>抽检数量</td>
</tr> <td>${item.sampleQty}</td>
</tbody> </tr>
</table> <tr>
<td colspan='4' style="color:#ff0000;font-weight: bold;font-size: 15px;">未生成检验申请</td>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div> `
` }else{
str += `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>供应商批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
</tbody>
</table>
</div>
</div>
`
}
}) })
this.newHtmlContent1 = this.newHtmlContent1.replace( this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str); // "mainBody", str); //
@ -268,7 +314,14 @@
this.showTableInspectDTOList = this.data1.inspectDTOList this.showTableInspectDTOList = this.data1.inspectDTOList
} }
console.log(233, this.showTableInspectDTOList) console.log(233, this.showTableInspectDTOList)
} },
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
}
});
},
}, },
watch: { watch: {
isLoadFinish: { isLoadFinish: {
@ -306,14 +359,21 @@
await queryInspectionFreeFlag({ await queryInspectionFreeFlag({
number: this.number number: this.number
}).then(async res1 => { }).then(async res1 => {
console.log(444,res1)
this.data1 = res1.data this.data1 = res1.data
this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item=>item.sampleQty>0) this.data1.inspectDTOList = this.data1.inspectDTOList.filter(item=>item.sampleQty>0)
// this.data1.inspectDTOList=[]
if(this.data1&&this.data1.inspectDTOList&&this.data1.inspectDTOList.length == 0){ if(this.data1&&this.data1.inspectDTOList&&this.data1.inspectDTOList.length == 0){
this.tabIndex =2 this.tabIndex =2
} }
this.getTableInspectDTOList() this.getTableInspectDTOList()
}) })
.catch(error=>{
this.$refs.comMessage.showMessage(error, res => {
if (res) {
}
});
})
} }
this.getPointPutawayJobHtml() this.getPointPutawayJobHtml()

10
src/pages/productDismantle/job/productDismantleDetail.vue

@ -342,12 +342,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

10
src/pages/productPutaway/job/productPutawayDetail.vue

@ -404,12 +404,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

48
src/pages/productPutaway/record/productPutawayRecord.vue

@ -1,10 +1,10 @@
<template> <template>
<view class=""> <view class="page-wraper">
<view class=""> <view class="">
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view> <com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view>
</view> </view>
<view class="uni-flex uni-column" v-if="detailSource.length>0" style="height: calc(100vh - 44px);"> <view class="page-wraper" v-if="detailSource.length>0" style="height: calc(100vh - 44px);">
<view class="" style="flex: 1;"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
@ -30,9 +30,11 @@
</view> </view>
</view> </view>
</view> </view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-button v-if="detailSource.length>0" @goScan='openScanPopup'></win-scan-button>
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package> <win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getToLocationCode' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getToLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></win-scan-location> :locationAreaTypeList="toLocationAreaTypeList"></win-scan-location>
@ -142,7 +144,7 @@
}, },
methods: { methods: {
getScanResult(result) { getScanResult(result) {
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
result.balance.forEach( result.balance.forEach(
@ -155,17 +157,14 @@
}) })
if (item == undefined) { if (item == undefined) {
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
itemp.containerNumber = balance.parentPackingNumber
// //
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
newDetail.fromInventoryStatus = balance.inventoryStatus; newDetail.fromInventoryStatus = balance.inventoryStatus;
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.getRecommendLocation(balance, res => { this.detailSource.push(itemp)
itemp.toLocationCode = res.code; this.calcHandleQty();
itemp.expectinNumber = res.expectinNumber; this.getRecommendLocation(balance)
this.detailSource.push(itemp)
this.$forceUpdate();
})
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
@ -191,7 +190,7 @@
) )
}, },
getRecommendLocation(balance, callback) { getRecommendLocation(balance) {
uni.showLoading({ uni.showLoading({
title: '扫描中...', title: '扫描中...',
mask: true mask: true
@ -201,11 +200,21 @@
expectinNumber: balance.packingNumber + "-" + Date.now(), expectinNumber: balance.packingNumber + "-" + Date.now(),
itemCode: balance.itemCode, itemCode: balance.itemCode,
inventoryStatus: balance.inventoryStatus, inventoryStatus: balance.inventoryStatus,
batch: balance.batch
}; };
console.log(JSON.stringify(param)) console.log(JSON.stringify(param))
getrecommendLocationExpectin(param).then(res => { getrecommendLocationExpectin(param).then(result => {
callback(res.data);
uni.hideLoading(); uni.hideLoading();
let item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode && res.containerNumber == balance
.parentPackingNumber) {
return res
}
})
item.toLocationCode = result.data.code;
item.expectinNumber = result.data.expectinNumber;
this.$forceUpdate();
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error); this.showErrorMessage(error);
@ -277,7 +286,7 @@
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus(); this.$refs.scanPopup.losefocus();
@ -460,9 +469,8 @@
} }
} }
}, },
cancel() cancel() {
{
this.clearData(); this.clearData();
this.openScanPopup(); this.openScanPopup();
} }

10
src/pages/productReceipt/job/completeReceiveJobDetail.vue

@ -302,12 +302,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage("任务明细未全部完成,不允许部分提交!");
.length +
"]");
} }
} }

24
src/pages/productReceipt/job/productReceiptDetail.vue

@ -85,7 +85,8 @@
import { import {
goHome, goHome,
navigateBack, navigateBack,
getPackingNumberAndBatch, getPackingNumberAndBatch,
getSwitchInfoByCode
} from '@/common/basic.js'; } from '@/common/basic.js';
import { import {
@ -334,18 +335,21 @@
}); });
}, },
commit() { commit() {
this.scanCount = getScanCount(this.subList); this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) { if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
}
var valiDate = getSwitchInfoByCode("semiProductReceipCommitValidate")
//
if(valiDate){
if (!this.checkLocation()) {
return
}
}else{
this.toLocationCode = this.jobToLocationCode
} }
//
if (!this.checkLocation()) {
return
}
// //
if (this.scanCount == this.subList.length) { if (this.scanCount == this.subList.length) {
if (this.checkCount()) { if (this.checkCount()) {
@ -378,8 +382,8 @@
var subItem = item.subList[i] var subItem = item.subList[i]
if (calc.sub(subItem.handleQty, subItem.qty) < 0) { if (calc.sub(subItem.handleQty, subItem.qty) < 0) {
isCheck = false; isCheck = false;
hint = "包装【" + subItem.packingNumber + "】实际收货数量:" + subItem.handleQty + "与包装数量" + subItem.qty + hint = "包装【" + subItem.packingNumber + "】实际收货数量:[" + subItem.handleQty + "]与包装数量[" + subItem.qty +
"不相等,是否继续收货?" "]不相等,是否继续收货?"
break break
} }
} }

43
src/pages/productReceipt/job/scrapReceiptDetail.vue

@ -294,18 +294,41 @@
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.showMessage("任务明细未全部完成,是否提交");
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -314,22 +337,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.showMessage(',\n' + "[" + this.scanCount + "][" + this.subList
// .length +
// "]");
// }
// }
}, },
submitJob() { submitJob() {

10
src/pages/productReceipt/job/semiProductReceiptDetail.vue

@ -302,12 +302,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage("任务明细未全部完成,不允许部分提交!");
.length +
"]");
} }
} }

52
src/pages/productRecycle/job/productRecycleJobDetail.vue

@ -318,17 +318,45 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -337,26 +365,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

57
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -217,28 +217,32 @@
}, },
autoCommit(){ autoCommit(){
// //
var noCommitInfo=null let str=""
for (var i = 0; i < this.detailSource.length; i++) { this.detailSource.forEach((item) => {
var sub =this.detailSource[i].subList item.subList.forEach(cur => {
for(var j=0;j<sub.length;j++){ if (cur.qty != cur.handleQty) {
var item =sub[j] var tempHandleQty =0
if(item.qty!=item.handleQty){ if(cur.handleQty){
noCommitInfo=item; tempHandleQty=cur.handleQty
break; }else {
} tempHandleQty =0
} }
} str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
//
if(noCommitInfo){
this.showQuestionMessage("扫描数量["+noCommitInfo.handleQty+"]任务数量["+noCommitInfo.qty+"]不一致,是否提交?",res=>{
if(res){
this.commit()
} }
}) })
}else { })
//
this.commit() if (str) {
str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) {
this.$throttle(this.commit,2000,this)()
}
});
} else {
this.$throttle(this.commit,2000,this)()
} }
}, },
// //
@ -358,6 +362,7 @@
itemDetail.balance.packQty = Number(result.package.packQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
console.log("自动提交")
this.autoCommit(); this.autoCommit();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -381,6 +386,7 @@
itemDetail.balance.packQty = Number(result.package.packQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
this.autoCommit(); this.autoCommit();
} }
} }
@ -405,16 +411,20 @@
// //
if (this.scanCount == this.subList.length) { if (this.scanCount == this.subList.length) {
this.submitJob(); this.submitJob();
console.log("提交this.submitJob()")
} else if (this.scanCount < this.subList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
console.log("提交this.submitJob()")
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -462,7 +472,6 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
// var itemCodes = [] // var itemCodes = []
// this.detailSource.forEach(item => { // this.detailSource.forEach(item => {
// itemCodes.push(item.itemCode) // itemCodes.push(item.itemCode)

5
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -373,6 +373,11 @@
action: "in", action: "in",
value: result.package.number + "," + result.package.parentNumber value: result.package.number + "," + result.package.parentNumber
}, },
{
column: "status",
action: "in",
value: '1,2'
},
{ {
column: "batch", column: "batch",
action: "==", action: "==",

10
src/pages/productionReturn/job/returnDetail.vue

@ -349,12 +349,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

8
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -454,16 +454,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.$refs.comMessage.showQuestionMessage('还有未扫描的物料,是否继续提交?', res => { this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) { if (res) {
this.submitJob(); this.submitJob()
} }
}); });
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

52
src/pages/purchaseReturn/job/returnDetail.vue

@ -350,17 +350,45 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
//
//
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -369,26 +397,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
//
//
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

10
src/pages/putaway/job/putawayDetail.vue

@ -452,12 +452,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

431
src/pages/putaway/job/quantityPutawayJob.vue

@ -0,0 +1,431 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
</job-filter>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)">
<com-putaway-job-card :dataContent="item" @click='openJobDetail(item)'></com-putaway-job-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<putaway-info-popup ref='jobInfoPopup'></putaway-info-popup>
<putaway-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></putaway-job-list-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult'>
</winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import jobList from '@/mycomponents/jobList/jobList.vue'
import {
getPutawayJobList,
cancleTakePutawayJob
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getDetailOption,
getDetailGiveupOption
} from '@/common/array.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comPutawayJobCard from '@/pages/putaway/coms/comPutawayJobCard.vue'
import putawayJobListPopup from '@/pages/putaway/coms/putawayJobListPopup.vue'
import putawayInfoPopup from '@/pages/putaway/coms/putawayInfoPopup.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
import {
Exception
} from 'sass';
export default {
name: 'Putaway',
components: {
comEmptyView,
jobFilter,
comPutawayJobCard,
putawayJobListPopup,
putawayInfoPopup,
winScanButton,
winScanPackJob,
jobList
},
data() {
return {
jobList: [],
pageNo: 1,
pageSize: 10,
totalCount: 0,
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
title: '',
scanMessage: ""
};
},
onLoad(option) {
this.title = option.title
},
onShow() {
this.getList('refresh');
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
uni.navigateBack({
delta: 1
})
return false;
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
methods: {
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getPutawayJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
this.openScanPopup()
}
var list = res.data.list;
this.totalCount = res.data.total
updateTitle(this.title + "(" + this.totalCount + ")");
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();
}
this.loadingType = "";
updateTitle(this.title);
uni.hideLoading();
that.showMessage(error)
})
},
openJobDetail(item) {
uni.navigateTo({
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status + '&title=' + this.title
});
this.scanMessage = ""
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
},
selectedItem(item) {
this.openJobDetail(item);
},
swipeClick(e, dataContent) {
if (e.content.text == "详情") {
this.openjobInfoPopup(dataContent);
} else if (e.content.text == "放弃") {
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?",
res => {
if (res) {
this.cancleJob(dataContent.masterId);
}
});
}
},
openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item)
},
cancleJob(id) {
cancleTakePutawayJob(id).then(res => {
if (res.data) {
this.getList("refresh")
uni.showToast({
title: "放弃任务成功"
})
} else {
this.showMessage("放弃任务失败")
}
}).catch(error => {
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) {
this.checkedToday = state;
this.todayTime = creationTime;
this.getList("refresh");
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
},
getScanNumber(code) {
this.getDataListByType(code)
},
getDataListByType(code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getPutawayJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
}
});
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
uni.navigateTo({
url: './putawayDetail?id=' +
item.masterId +
'&status=' + item.status +
'&scaned=' + item.packingNumber +
'&title=' + this.title +
"&scanMessage=" + this.scanMessage
});
this.scanMessage = ""
},
getScanResult(result) {
try {
this.scanMessage = ""
var filters = [{
column: "packingNumber",
action: "in",
value: result.package.number + "," + result.package.parentNumber
},
{
column: "batch",
action: "==",
value: result.package.batch
},
// {
// column: "qty",
// action: "==",
// value: result.label.qty
// },
{
column: "itemCode",
action: "==",
value: result.package.itemCode
},
{
column: "status",
action: "in",
value: '1,2',
},
// {
// column: "accept_user_id",
// action: "==",
// value: this.$store.state.user.id
// }
// {
// column: "fromLocationCode",
// action: "==",
// value: result.label.fromLocationCode
// },
]
getPutawayJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
this.scanMessage = result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item => {
if (!list.find(subItem => subItem.title == item.title)) {
list.push(item)
}
})
if (list.length == 1) {
//
if (list[0].status == 1) {
this.selectItem(list[0])
} else if (list[0].status == 2) {
//
if (list[0].acceptUserId == this.$store.state.user.id) {
this.selectItem(list[0])
} else {
this.showMessage("该任务已经被[" + list[0].acceptUserName + "]承接" + "\n任务号[" +
list[0].number + "]扫描[" + result.scanMessage + "]")
}
} else if (list[0].status == 3) {
this.showMessage("该任务已经完成\n承接人[" + list[0].acceptUserName + "]\n任务号[" +
list[0].number + "]扫描[" + result.scanMessage + "]")
}
} else {
this.showMessage("查询到多条任务\n" + "扫描[" + result.scanMessage + "]")
}
} else {
this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
}
}).catch(error => {
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
})
} catch (e) {
this.showMessage(e + "\n扫描[" + result.scanMessage + "]")
}
},
}
}
</script>
<style scoped lang="scss">
</style>

604
src/pages/putaway/job/quantityPutawayJobDetail.vue

@ -0,0 +1,604 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comJobDetailCard :dataContent="item" :index="index" :settingParam="jobContent"
:isShowStatus="false" @remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'>
</comJobDetailCard>
</view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode"
:locationCode="toLocationCode" @getLocation='scanLocationCode' :isShowEdit="isCheckLocation"
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<!-- <winScanPackAndLocationNoBalance ref="scanPopup" @getResult='getScanResult' :allowNullBalance="true">
</winScanPackAndLocationNoBalance> -->
<winScanPackAndLocation :balanceFromInventoryStatuses="false" ref="scanPopup" @getResult='getScanResult'
:noShowBalanceMessage="true">
</winScanPackAndLocation>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getManagementPrecisions,
} from '@/common/balance.js';
import {
getPutawayJobDetail,
putawayJobSubmit,
takePutawayJob,
cancleTakePutawayJob,
getSwitchByCode
} from '@/api/request2.js';
import {
goHome,
getCurrDateTime,
getPackingNumberAndBatch,
navigateBack,
compareAsc,
getSwitchInfoByCode
} from '@/common/basic.js';
import {
getDirectoryItemArray,
getInventoryStatusName
} from '@/common/directory.js';
import {
getTreeDataSource,
calcHandleQty,
calcTreeHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comJobDetailCard from "@/mycomponents/detail/comJobDetailCard.vue"
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
components: {
winScanButton,
winScanPackAndLocation,
locationCompare,
comJobDetailCard,
jobTop
},
data() {
return {
id: '',
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
managementList: [],
fromLocationCode: "",
toLocationCode: "",
toLocationAreaTypeList: [],
jobStatus: "",
jobToLocationCode: "",
isCheckLocation: false,
scanMessage: ""
};
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title + '详情'
})
this.id = option.id;
this.scanMessage = option.scanMessage
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus == "2") {
//
cancleTakePutawayJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
},
mounted() {
},
methods: {
//
receive(callback) {
if (this.id != null) {
takePutawayJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
})
}
},
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getPutawayJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getTreeDataSource(that.subList)
that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode;
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.isCheckLocation = getSwitchInfoByCode("PurchasePutawayToLocationCodeValidate")
if (that.isCheckLocation) {
that.toLocationCode = ""
} else {
that.toLocationCode = that.jobToLocationCode;
}
//
if (this.scanMessage) {
this.openScanPopupSimulate(this.scanMessage)
}
} else {
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
calcScanCount(closeScan) {
let items = this.subList.filter(r => {
if (r.scaned) {
return r;
}
})
this.scanCount = items != null ? items.length : 0;
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
}
},
calcHandleQty() {
calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate();
},
//
continueScan() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
}
},
updateData() {
console.log("updateData")
// this.calcHandleQty();
calcTreeHandleQty(this.detailSource)
},
//
openScanPopupSimulate(message) {
let fromlocationCode = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
if (fromlocationCode == '') {
fromlocationCode = l.fromLocationCode;
}
})
}
this.$refs.scanPopup.openScanPopupForJobSimulate(fromlocationCode, fromlocationList, this.jobContent,
message);
},
openScanPopup() {
let fromlocationCode = '';
let fromlocationList = [];
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
item.subList.forEach(l => {
//
var location = fromlocationList.find(res => res == l.fromLocationCode)
if (location == undefined) {
fromlocationList.push(l.fromLocationCode);
}
//
if (fromlocationCode == '') {
if (!l.scaned) {
fromlocationCode = l.fromLocationCode;
}
}
})
}
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
getScanResult(result) {
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var locationCode = result.fromLocationCode;
if (!result.balance) {
this.showMessage("箱码【" + packingNumber + "】没有库存余额")
return;
}
// var inventoryStatus = "OK";
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.subList.find(r => {
return r.packingNumber == packingNumber &&
r.batch == batch &&
r.fromLocationCode == result.fromLocationCode
})
if (itemDetail == undefined) {
var isExit;
for (let subItem of detail.subList) {
var item;
for (let pack of subItem.packList) {
if (pack.packingNumber == packingNumber &&
pack.batch == batch) {
item = pack;
isExit = pack;
break;
}
}
if (item != undefined) {
subItem.scaned = true
subItem.handleQty = 0;
item = undefined
}
}
if (isExit == undefined) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】不在列表中")
} else {
if (!isExit.cancleScanedHiht && isExit.scaned) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
isExit.scaned = true
let qty = 0;
if (result.balance != null) {
qty = Number(result.balance.qty);
} else {
qty = Number(result.label.qty);
}
isExit.handleQty = Number(result.label.qty);
isExit.toLocationCode = this.toLocationCode;
}
}
calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
} else {
var scanedLength = 0;
itemDetail.packList.forEach(res => {
if (res.scaned) {
scanedLength++;
}
})
//
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList
.length) {
this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else {
itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); //
itemDetail.handleQty = result.label.qty;
// itemDetail.toInventoryStatus = "OK"
itemDetail.packList.forEach(pac => {
pac.scaned = true
pac.handleQty = Number(pac.qty);
pac.toLocationCode = this.toLocationCode;
})
calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
}
}
} catch (e) {
this.showMessage(e.message)
}
},
scanLocationCode(location, code) {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
openDetail(item) {
this.$refs.jobDetailPopup.openPopup(item)
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
},
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
if (res) {
callback()
}
});
},
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
//
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
putawayJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成采购上架记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.singlePrice = 1;
detail.amount = 11;
detail.arriveDate = getCurrDateTime();
detail.produceDate = getCurrDateTime();
detail.expireDate = getCurrDateTime();
let packList = detail.packList.filter(p => p.scaned == true);
detail.packList = packList;
// detail.singlePrice = detail.balance.singlePrice;
// detail.amount = detail.balance.singlePrice * detail.handleQty;
// detail.arriveDate = detail.balance.arriveDate;
// detail.produceDate = detail.balance.produceDate;
// detail.expireDate = detail.balance.expireDate;
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
})
},
showErrorMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
})
},
showQuestionMessage(message, callback) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage(message, res => {
if (res) {
callback(res);
}
});
})
},
scanPopupGetFocus() {
this.$refs.scanPopup.packGetFocus();
},
scanPopupLoseFocus() {
this.$refs.scanPopup.packLoseFocus();
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
}
}
</script>
<style scoped lang="scss">
</style>

51
src/pages/scrap/job/scrapJobDetail.vue

@ -288,18 +288,44 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -308,25 +334,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

10
src/pages/transfer/job/issueDetail.vue

@ -333,12 +333,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

11
src/pages/transfer/job/receiptDetail.vue

@ -358,13 +358,14 @@
} else if (this.scanCount < this.subList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
this.submitJob(); if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

12
src/pages/transfer/job/transferDetail.vue

@ -12,7 +12,7 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData" <comInventoryDetailCard :allowEditQty="true" :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData'> @updateData='updateData'>
</comInventoryDetailCard> </comInventoryDetailCard>
</view> </view>
@ -368,13 +368,15 @@
async commit() { async commit() {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
this.scanCount = this.getScanCount(); this.scanCount = this.getScanCount();
if (this.scanCount < this.subList.length) { if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

50
src/pages/unPlanned/job/issueJobDetail.vue

@ -280,17 +280,44 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -299,25 +326,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },

10
src/pages/unPlanned/job/receiptJobDetail.vue

@ -261,12 +261,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

12
src/store/modules/user.js

@ -59,16 +59,14 @@ const user = {
storage.setStorage(storage.constant.token,res.accessToken) storage.setStorage(storage.constant.token,res.accessToken)
resolve(res) resolve(res)
}else { }else {
uni.showToast({ if(res.msg){
title:res.msg reject(res.msg)
}) }else {
reject("登录失败")
}
} }
}).catch(error => { }).catch(error => {
reject(error) reject(error)
uni.showToast({
title:error
})
}) })
}) })
}, },

8
src/uni_modules/uni-pagination/components/uni-pagination/uni-pagination.vue

@ -16,9 +16,10 @@
<view class="uni-pagination__btn" <view class="uni-pagination__btn"
:class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :class="currentIndex === 1 ? 'uni-pagination--disabled' : 'uni-pagination--enabled'"
:hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-class="currentIndex === 1 ? '' : 'uni-pagination--hover'" :hover-start-time="20"
:hover-stay-time="70" @click="clickLeft"> :hover-stay-time="70" @click="clickLeft"
style="margin-right: 70rpx;">
<template v-if="showIcon === true || showIcon === 'true'"> <template v-if="showIcon === true || showIcon === 'true'">
<uni-icons color="#666" size="16" type="left" /> <uni-icons color="#666" size="16" type="left" />
</template> </template>
<template v-else> <template v-else>
<text class="uni-pagination__child-btn">{{ prevPageText }}</text> <text class="uni-pagination__child-btn">{{ prevPageText }}</text>
@ -41,7 +42,8 @@
<view class="uni-pagination__btn" <view class="uni-pagination__btn"
:class="currentIndex >= maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'" :class="currentIndex >= maxPage ? 'uni-pagination--disabled' : 'uni-pagination--enabled'"
:hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'" :hover-start-time="20" :hover-class="currentIndex === maxPage ? '' : 'uni-pagination--hover'" :hover-start-time="20"
:hover-stay-time="70" @click="clickRight"> :hover-stay-time="70" @click="clickRight"
style="margin-left: 70rpx;">
<template v-if="showIcon === true || showIcon === 'true'"> <template v-if="showIcon === true || showIcon === 'true'">
<uni-icons color="#666" size="16" type="right" /> <uni-icons color="#666" size="16" type="right" />
</template> </template>

Loading…
Cancel
Save