Browse Source

修改生产退料

wms3.0_pda
lijuncheng 11 months ago
parent
commit
20a7373f6a
  1. 14
      api/httpRequest3.js
  2. 148
      pages/productionReturn/coms/comReturnDetailCard.vue
  3. 68
      pages/productionReturn/coms/returnDetailInfoPopup.vue
  4. 47
      pages/productionReturn/job/returnDetail.vue
  5. 1
      pages/repleinsh/job/repleinshDetail.vue
  6. 2
      pages/unPlanned/job/receiptJobDetail.vue
  7. 2
      static/config.json

14
api/httpRequest3.js

@ -27,27 +27,27 @@ function service(options = {}) {
if(res.data.code==0){ if(res.data.code==0){
resolve(res.data); resolve(res.data);
}else { }else {
reject( res.data.msg) reject("系统:"+res.data.msg)
} }
}else { }else {
reject( res.data.msg) reject("系统:"+ res.data.msg)
} }
} else { } else {
reject(res.data.msg) reject("系统:"+res.data.msg)
} }
}; };
options.fail = (error) => { options.fail = (error) => {
var message = error.errMsg var message = error.errMsg
if (message === 'Network Error') { if (message === 'Network Error') {
message = '后端接口连接异常' message = '接口连接异常'
} else if (message.includes('timeout')) { } else if (message.includes('timeout')) {
message = '系统接口请求超时' message = '接口请求超时'
} else if (message.includes('Request failed with status code')) { } else if (message.includes('Request failed with status code')) {
message = '系统接口' + message.substr(message.length - 3) + '异常' message = '接口' + message.substr(message.length - 3) + '异常'
} }
reject(message); reject("系统:"+message);
}; };
uni.request(options); uni.request(options);
}); });

148
pages/productionReturn/coms/comReturnDetailCard.vue

@ -0,0 +1,148 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty>
</template>
<u-line />
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowLocation="false" :isShowFromLocation="false" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line color="#D8D8D8"></u-line>
</view>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam"
@confirm="confirm">
</recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
<returnDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></returnDetailInfoPopup>
<com-message ref="message"></com-message>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import returnDetailInfoPopup from '@/pages/productionReturn/coms/returnDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
components: {
itemCompareQty,
recommend,
recommendQtyEdit,
jobDetailPopup,
returnDetailInfoPopup,
comMessage,
winScanLocation
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
locationTypeList: {
type: Object,
default: {}
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
locatonItem:{},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation)
}
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty,item.labelQty);
},
showLocation(item) {
this.locatonItem =item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode =code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

68
pages/productionReturn/coms/returnDetailInfoPopup.vue

@ -0,0 +1,68 @@
<template>
<view class="">
<uni-popup ref="popup">
<detail-common-info :dataContent="dataContent" @onClose="closePopup">
<view class="">
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">标包数量 : </text>
<text class="text_wrap">{{dataContent.stdPackQty}} </text>
</view>
<view class="item">
<text class="item_title">标包单位 : </text>
<text class="text_wrap">{{getStdPackUnitInfo(dataContent.stdPackUnit)}} </text>
</view>
</view>
</view>
<u-line></u-line>
</detail-common-info>
</uni-popup>
</view>
</template>
<script>
import {getStdPackUnitInfo} from "@/common/directory.js"
import {
dateFormat
} from '@/common/basic.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
export default {
components: {
detailCommonInfo
},
data() {
return {
dataContent: {
type: Object,
default: {}
}
}
},
mounted() {},
props: {},
methods: {
openPopup(val) {
this.dataContent = val;
this.$refs.popup.open('bottom')
},
closePopup() {
this.$refs.popup.close()
},
getStdPackUnitInfo(value){
return getStdPackUnitInfo(value).label
},
dateFormat(value){
return dateFormat(value)
}
}
}
</script>
<style>
</style>

47
pages/productionReturn/job/returnDetail.vue

@ -7,17 +7,37 @@
<view class="header_item"> <view class="header_item">
申请单号 : {{jobContent.requestNumber}} 申请单号 : {{jobContent.requestNumber}}
</view> </view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
</view>
<view class="cen_card" style="margin-top: 10rpx;">
<view class="cell_box uni-flex uni-row" style="margin-top: 10rpx;">
<view class="cell_info">
<view class="text_lightblue">车间</view>
<view>{{jobContent.workshopCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">生产线</view>
<view>{{titleInfo.productionLineCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">工位</view>
<view>{{ titleInfo.workStationCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">原材料库</view>
<view>{{ titleInfo.toLocationCode}}</view>
</view>
</view>
</view>
<u-line color="#D8D8D8" style="margin-bottom: 0rpx;margin-top: 10rpx;"></u-line>
</view>
<u-line color="#D8D8D8" style="margin-bottom: 15rpx;margin-top: 10rpx;"></u-line>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <comReturnDetailCard :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
:locationTypeList='tolocationTypeList'> </comReturnDetailCard>
</com-detail-card>
</view> </view>
<u-line /> <u-line />
</view> </view>
@ -29,8 +49,8 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" <requiredLocation title="目标库位" :locationCode="toLocationCode"
:isShowEdit="jobContent.allowModifyLocation==1" @getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation=='TRUE'" @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationTypeList="toLocationTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -78,7 +98,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comReturnDetailCard from "@/pages/productionReturn/coms/comReturnDetailCard.vue"
import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productionReturn/coms/detailInfoPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -91,7 +111,7 @@
requiredLocation, requiredLocation,
// winScanPackAndLocation, // winScanPackAndLocation,
winScanPack, winScanPack,
comDetailCard, comReturnDetailCard,
detailInfoPopup, detailInfoPopup,
comMessage, comMessage,
jobTop jobTop
@ -109,9 +129,10 @@
detailSource: [], // detailSource: [], //
fromLocationCode: '', fromLocationCode: '',
toLocationCode: '', toLocationCode: '',
tolocationTypeList: [], toLocationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {} businessTypeInfo: {},
titleInfo: ""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -192,6 +213,7 @@
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.titleInfo = that.subList[0];
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -278,6 +300,7 @@
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.package.qty) itemDetail.handleQty = Number(result.package.qty)
itemDetail.inventoryStatus = "OK"
itemDetail.stdPackQty = result.package.stdPackQty itemDetail.stdPackQty = result.package.stdPackQty
itemDetail.stdPackUnit = result.package.stdPackUnit itemDetail.stdPackUnit = result.package.stdPackUnit
this.calcHandleQty(); this.calcHandleQty();

1
pages/repleinsh/job/repleinshDetail.vue

@ -198,6 +198,7 @@
submit() { submit() {
uni.showLoading({ uni.showLoading({
title: "提交中....", title: "提交中....",
mask: true mask: true

2
pages/unPlanned/job/receiptJobDetail.vue

@ -87,7 +87,6 @@
data() { data() {
return { return {
id: '', id: '',
receiptJob: {},
received: false, received: false,
scanCount: 0, scanCount: 0,
jobContent: {}, // jobContent: {}, //
@ -231,6 +230,7 @@
itemDetail.scaned = true; itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty); itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode; itemDetail.toLocationCode = this.toLocationCode;
itemDetail.stdPackQty = result.package.stdPackQty
itemDetail.labelQty = Number(result.label.qty); itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.continueScan() this.continueScan()

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://192.168.0.180:12080/admin-api", "value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.180:12080/admin-api", "chefang": "http://192.168.0.180:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save