lijuncheng 8 months ago
parent
commit
ed6a4ac095
  1. 25
      pages/issue/job/issueDetail.vue
  2. 30
      pages/productionReturn/record/returnToHold.vue
  3. 30
      pages/productionReturn/record/returnToStore.vue
  4. 2
      static/config.json

25
pages/issue/job/issueDetail.vue

@ -44,10 +44,6 @@
issueJobSubmit issueJobSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import { import {
goHome, goHome,
updateTitle, updateTitle,
@ -283,7 +279,7 @@
}, },
setParams() { setParams() {
var commitSubList = [] var subList = []
var createTime = getCurrDateTime(); var createTime = getCurrDateTime();
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => { this.detailSource.forEach(toLocationCode => {
@ -292,8 +288,8 @@
fromLocation.Batchs.forEach(batch => { fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail; let subItem = batch.detail;
if (subItem != undefined) { if (subItem != undefined) {
subItem.recordList = [];
if (batch.Records.length > 0) { if (batch.Records.length > 0) {
subItem.recordList = [];
batch.Records.forEach(r => { batch.Records.forEach(r => {
let record = {}; let record = {};
record.handleQty = r.qty; record.handleQty = r.qty;
@ -312,6 +308,14 @@
.toLocationCode; .toLocationCode;
record.supplierCode = r.supplierCode; record.supplierCode = r.supplierCode;
let single_price = r.balance
.singlePrice == null ? 0 : r
.balance
.singlePrice;
record.singlePrice = single_price;
record.amount = single_price * r.qty;
//使 //使
if (this.jobContent if (this.jobContent
.useOnTheWayLocation == .useOnTheWayLocation ==
@ -332,14 +336,15 @@
} }
subItem.recordList.push(record); subItem.recordList.push(record);
}) })
commitSubList.push(subItem); subList.push(subItem);
} }
} }
}) })
}) })
}) })
}) })
this.jobContent.subList = commitSubList
this.jobContent.subList = subList
this.jobContent.createTime = createTime; this.jobContent.createTime = createTime;
this.jobContent.creator = creator; this.jobContent.creator = creator;
return this.jobContent; return this.jobContent;
@ -387,10 +392,10 @@
let handleQty = 0; let handleQty = 0;
if (batch != undefined) { if (batch != undefined) {
batch.Records.forEach(res => { batch.Records.forEach(res => {
handleQty = calc.add(handleQty,res.qty) handleQty += Number(res.qty)
}) })
batch.handleQty = handleQty; batch.handleQty = handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty) itemHandleQty += handleQty;
} }
}) })
} }

30
pages/productionReturn/record/returnToHold.vue

@ -53,7 +53,8 @@
<script> <script>
import { import {
productionReturnRecordSubmit, productionReturnRecordSubmit,
getPrecisionStrategy getPrecisionStrategy,
getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -167,7 +168,7 @@
this.$refs.scanPopup.openScanPopup(isEditPosition); this.$refs.scanPopup.openScanPopup(isEditPosition);
}, },
getScanResult(result, param) { async getScanResult(result, param) {
this.positionInfo = param.positionInfo; this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode; this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode; this.productionLineCode = param.productionLineCode;
@ -184,6 +185,31 @@
}) })
if (item == undefined) { if (item == undefined) {
var filters = []
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "locationCode",
action: "==",
value: this.rawLocationCode
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
var isCheckItemCode = await getBalanceByFilter(params);
if(isCheckItemCode.data==null||isCheckItemCode.data.list==0){
this.showErrorMessage("未查询到物料号[" + label.itemCode + "]" +
"库位[" + this.rawLocationCode + "]的信息")
return
}
var itemp = this.createItemInfo(label, pack); var itemp = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
newDetail.toLocationCode = "HOLD"; newDetail.toLocationCode = "HOLD";

30
pages/productionReturn/record/returnToStore.vue

@ -44,7 +44,8 @@
import { import {
productionReturnRecordSubmit, productionReturnRecordSubmit,
getPutawayRecommendLocation, getPutawayRecommendLocation,
getPrecisionStrategy getPrecisionStrategy,
getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
@ -162,7 +163,7 @@
this.$refs.scanPopup.openScanPopup(isEditPosition); this.$refs.scanPopup.openScanPopup(isEditPosition);
}, },
getScanResult(result, param) { async getScanResult(result, param) {
this.positionInfo = param.positionInfo; this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode; this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode; this.productionLineCode = param.productionLineCode;
@ -180,6 +181,31 @@
}) })
if (item == undefined) { if (item == undefined) {
var filters = []
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "locationCode",
action: "==",
value: this.rawLocationCode
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
var isCheckItemCode = await getBalanceByFilter(params);
if(isCheckItemCode.data==null||isCheckItemCode.data.list==0){
this.showErrorMessage("未查询到物料号[" + label.itemCode + "]" +
"库位[" + this.rawLocationCode + "]的信息")
return
}
// //
this.getRecommendLocation(label, pack, toLocation => { this.getRecommendLocation(label, pack, toLocation => {
var itemp = this.createItemInfo(label, pack); var itemp = this.createItemInfo(label, pack);

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "request_url", "name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api", "value": "http://192.168.0.179:12080/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.176:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save