Browse Source

采购退货申请

wms3.0_pda
lijuncheng 12 months ago
parent
commit
e8cd8586d5
  1. 13
      api/request2.js
  2. 9
      pages/issue/coms/comIssueRequestCreator.vue
  3. 150
      pages/issue/coms/comIssueRequestPopup.vue
  4. 3
      pages/issue/request/issueRequestSubmit.vue
  5. 67
      pages/purchaseReturn/record/returnRecord.vue
  6. 4
      pages/putaway/record/putawayRecord.vue

13
api/request2.js

@ -360,6 +360,19 @@ export function getProductionlineItem(params) {
}); });
} }
/**
* 查询生产线-车间-工位
* @param {*}
*
*/
export function getWorkShopLineStation() {
return request({
url: baseApi + "/wms/issue-request-main/get-workshop-productionline-workstation" ,
method: "get",
data: {},
});
}

9
pages/issue/coms/comIssueRequestCreator.vue

@ -7,16 +7,13 @@
<template v-slot:title> <template v-slot:title>
<view class="" style="font-size: 32rpx;"> <view class="" style="font-size: 32rpx;">
<view class="" > <view class="" >
车间代码 : {{dataContent.workShopCode}} 车间 : {{dataContent.workShopName}} ({{dataContent.workShopCode}})
</view> </view>
<view class=""> <view class="">
车间名称 : 生产线 : {{dataContent.productionLineName}}({{dataContent.productionLineCode}})
</view> </view>
<view class=""> <view class="">
生产线代码 :{{dataContent.productionLineCode}} 工位 : {{dataContent.workStationName}} ({{dataContent.workStationCode}})
</view>
<view class="">
工位代码 :{{dataContent.workStationCode}}
</view> </view>
</view> </view>

150
pages/issue/coms/comIssueRequestPopup.vue

@ -19,7 +19,7 @@
<view class="" style="margin-left: 20rpx;"> <view class="" style="margin-left: 20rpx;">
{{positionInfo}} {{positionInfo}}
</view> </view>
<u-select v-model="show" mode="mutil-column-auto" :list="list" <u-select v-model="show" mode="mutil-column-auto" :list="positionList"
@confirm="confirmSelect"></u-select> @confirm="confirmSelect"></u-select>
</view> </view>
@ -70,7 +70,8 @@
import { import {
getBasicLocationByCode, getBasicLocationByCode,
getBasicItemByCode, getBasicItemByCode,
getProductionlineItem getProductionlineItem,
getWorkShopLineStation
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getLocationTypeName, getLocationTypeName,
@ -93,9 +94,13 @@
data() { data() {
return { return {
// itemCode: 'CE115F11161AG', // itemCode: 'CE115F11161AG',
workShopCode: "", workShopCode: "", //
productionLineCode: "", workShopName: "",
workStationCode: "", productionLineCode: "",//线
productionLineName:"",
workStationCode: "",//
workStationName:"",
itemCode: '', itemCode: '',
itemName: "", itemName: "",
qty: 0, qty: 0,
@ -110,6 +115,102 @@
positionInfo: "请选择位置", positionInfo: "请选择位置",
show: false, show: false,
isModifiedPosition: true, isModifiedPosition: true,
positionList:[
{
"children": [
{
"children": [
{
"label": "",
"value": ""
}
],
"label": "生产线1",
"value": "111"
}
],
"label": "车间1",
"value": "111"
},
{
"children": [
{
"children": [
{
"label": "测试",
"value": "测试111"
}
],
"label": "222",
"value": "222"
}
],
"label": "333",
"value": "222"
},
{
"children": [
{
"children": [
{
"label": "",
"value": ""
}
],
"label": "",
"value": ""
}
],
"label": "3333",
"value": "333"
},
{
"children": [
{
"children": [
{
"label": "",
"value": ""
}
],
"label": "",
"value": ""
}
],
"label": "测试1111",
"value": "测试111"
},
{
"children": [
{
"children": [
{
"label": "工位1",
"value": "station1"
},
{
"label": "工位2",
"value": "station2"
}
],
"label": "车间1-生产线1",
"value": "line1"
},
{
"children": [
{
"label": "",
"value": ""
}
],
"label": "车间1-生产线2",
"value": "line2"
}
],
"label": "车间1",
"value": "work1"
}
],
list: [{ list: [{
value: 1, value: 1,
label: '车间1', label: '车间1',
@ -184,6 +285,14 @@
}, },
methods: { methods: {
openRequestPopup(editPosition) { openRequestPopup(editPosition) {
if(this.positionList.length==0){
getWorkShopLineStation().then(res=>{
// this.positionList =res
}).catch(error=>{
})
}
this.editPosition = editPosition; this.editPosition = editPosition;
if (this.isModifiedPosition) { if (this.isModifiedPosition) {
this.isModifiedPosition = false this.isModifiedPosition = false
@ -208,9 +317,8 @@
this.showErrorMessage("请先选择位置") this.showErrorMessage("请先选择位置")
return return
} }
this.$refs.selectList.queryList("111dsda") this.$refs.selectList.queryList(this.productionLineCode)
// this.refs.selectList
// this.getItemCodeListByProLine("111")
}, },
itemCodeGetFocus() { itemCodeGetFocus() {
@ -262,9 +370,12 @@
callback(action) { callback(action) {
let item = { let item = {
positionInfo: this.positionInfo, positionInfo: this.positionInfo,
workShopCode: this.workShopCode, workShopCode: this.workShopCode,//
productionLineCode: this.productionLineCode, workShopName: this.workShopName,
workStationCode: this.workStationCode, productionLineCode: this.productionLineCode,//线
productionLineName:this.productionLineName,
workStationCode: this.workStationCode,//
workStationName:this.workStationName,
itemCode: this.itemCode, itemCode: this.itemCode,
itemName: this.itemName, itemName: this.itemName,
uom: this.uom, uom: this.uom,
@ -305,12 +416,19 @@
}, },
confirmSelect(e) { confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
// this.productionLineCode =e[1].label; var positionInfoValue = e[0].value + "-" + e[1].value + "-" + e[2].value
// this.getItemCodeListByProLine(lineCode) console.log("位置",this.positionInfo)
this.workShopCode = e[0].label console.log("位置value",positionInfoValue)
this.productionLineCode = e[1].label this.workShopCode = e[0].value
this.workStationCode = e[2].label this.productionLineCode = e[1].value
this.workStationCode = e[2].value
this.workShopName= e[0].label
this.productionLineName = e[1].label
this.workStationName = e[2].label
}, },
getItemCodeListByProLine(lineCode) { getItemCodeListByProLine(lineCode) {

3
pages/issue/request/issueRequestSubmit.vue

@ -92,8 +92,11 @@
if (this.detailSource.subList.length == 0) { if (this.detailSource.subList.length == 0) {
this.detailSource = { this.detailSource = {
workShopCode: item.workShopCode, workShopCode: item.workShopCode,
workShopName: item.workShopName,
productionLineCode:item.productionLineCode, productionLineCode:item.productionLineCode,
productionLineName:item.productionLineName,
workStationCode:item.workStationCode, workStationCode:item.workStationCode,
workStationName: item.workStationName,//
subList: [] subList: []
} }
var subItem = { var subItem = {

67
pages/purchaseReturn/record/returnRecord.vue

@ -54,6 +54,10 @@
calcHandleQty calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
@ -221,6 +225,8 @@
var params = this.setParams(); var params = this.setParams();
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
if (this.fromType == "requestType") { if (this.fromType == "requestType") {
var params = this.setParams(false)
console.log("提交" + JSON.stringify(params))
// purchaseReturnRequestSubmit(params).then(res => { // purchaseReturnRequestSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
@ -234,10 +240,39 @@
// }) // })
} else { } else {
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(true)
console.log("提交参数", JSON.stringify(params));
// putawayRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data )
// } else {
// this.showErrorMessage(""+res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
// purchaseReturnRecordSubmit(params).then(res => { // purchaseReturnRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("<br>" + res.data )
// } else { // } else {
// this.showErrorMessage(""+res.msg) // this.showErrorMessage(""+res.msg)
// } // }
@ -253,23 +288,35 @@
}, },
setParams() { setParams(queryModel) {
var subList = [] var subList = []
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
var subItem = {}; if (queryModel) {
Object.assign(subItem, detail) var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
subItem.package ="" detail.packingNumber, detail.batch);
subList.push(subItem) detail.toPackingNumber = info.packingNumber;;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = info.batch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
} else {
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber
detail.toBatch = detail.toBatch;
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = ""
}
subList.push(detail)
} }
}) })
}) })
this.submitMainContent.subList = subList this.jobContent.subList = subList
this.submitMainContent.creator = creator; this.jobContent.creator = creator;
return this.jobContent;
return this.submitMainContent;
}, },
showMessage(message) { showMessage(message) {

4
pages/putaway/record/putawayRecord.vue

@ -69,6 +69,10 @@
calcHandleQty calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'

Loading…
Cancel
Save