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>
<view class="" style="font-size: 32rpx;">
<view class="" >
车间代码 : {{dataContent.workShopCode}}
</view>
<view class="" >
车间名称 :
车间 : {{dataContent.workShopName}} ({{dataContent.workShopCode}})
</view>
<view class="">
生产线代码 :{{dataContent.productionLineCode}}
生产线 : {{dataContent.productionLineName}}({{dataContent.productionLineCode}})
</view>
<view class="">
工位代码 :{{dataContent.workStationCode}}
工位 : {{dataContent.workStationName}} ({{dataContent.workStationCode}})
</view>
</view>

150
pages/issue/coms/comIssueRequestPopup.vue

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

3
pages/issue/request/issueRequestSubmit.vue

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

67
pages/purchaseReturn/record/returnRecord.vue

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

4
pages/putaway/record/putawayRecord.vue

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

Loading…
Cancel
Save