lijuncheng 11 months ago
parent
commit
a2189ad8a7
  1. 84
      api/request2.js
  2. 2
      pages/issue/coms/comIssueRequestCreator.vue
  3. 38
      pages/issue/coms/comIssueRequestPopup.vue
  4. 199
      pages/issue/record/issueRecord.vue
  5. 27
      static/config.json

84
api/request2.js

@ -1,7 +1,7 @@
import request from '@/api/httpRequest3.js'
// const baseApi = "/api/admin-api"
//公司地址
// 本地地址
// 本地地址
const baseApi = ""
/**
* 获取验证码
@ -61,11 +61,11 @@ export function getTenantInfo(name) {
pageNo: 1,
pageSize: 100,
}
return request({
url: baseApi + "/system/tenant/page",
method: "get",
data:params,
data: params,
});
}
@ -127,10 +127,10 @@ export function getBasicCustomerList() {
*
*/
export function getBusinesstypeByCode(code) {
var params ={
code:code,
pageNo:1,
pageSize:100
var params = {
code: code,
pageNo: 1,
pageSize: 100
}
return request({
url: baseApi + "/wms/businesstype/page",
@ -147,10 +147,10 @@ export function getBusinesstypeByCode(code) {
export function getBalanceByItemCode(params) {
return request({
url: baseApi + "/wms/balance/page",
method: "get",
data: params,
});
url: baseApi + "/wms/balance/page",
method: "get",
data: params,
});
}
/**
@ -197,7 +197,7 @@ export function getBalanceByLocationcodeGroup(params) {
* @param {*}
*/
export function getBalanceByLocationcode(params) {
return request({
url: baseApi + "/wms/balance/page",
method: "get",
@ -256,7 +256,7 @@ export function getBalanceByContainerNumber(params) {
export function getLabelByHeader(header, version) {
var params = {
header: header,
version:version,
version: version,
}
return request({
url: baseApi + "/wms/labeltype/getDetailsByHeader",
@ -291,10 +291,10 @@ export function getPackageByNumber(number) {
*
*/
export function getBasicLocationByCode(code) {
var parmas ={
code:code,
pageNo:1,
pageSize:100
var parmas = {
code: code,
pageNo: 1,
pageSize: 100
}
return request({
url: baseApi + "/wms/location/page",
@ -315,7 +315,7 @@ export function getBasicItemByCode(itemCode) {
pageSize: 100
}
return request({
url: baseApi + "/wms/itembasic/page" ,
url: baseApi + "/wms/itembasic/page",
method: "get",
data: params,
});
@ -354,7 +354,7 @@ export function getItempackagingByItemcode(itemCode) {
*/
export function getProductionlineItem(params) {
return request({
url: baseApi + "/wms/productionlineitem/page" ,
url: baseApi + "/wms/productionlineitem/page",
method: "get",
data: params,
});
@ -367,7 +367,7 @@ export function getProductionlineItem(params) {
*/
export function getWorkShopLineStation() {
return request({
url: baseApi + "/wms/issue-request-main/get-workshop-productionline-workstation" ,
url: baseApi + "/wms/issue-request-main/get-workshop-productionline-workstation",
method: "get",
data: {},
});
@ -412,7 +412,7 @@ export function getSupplierDeliverRecordList(params) {
*/
export function getSupplierDeliverRecordDetail(id) {
return request({
url: baseApi + "/wms/supplierdeliver-record-main/getSupplierdeliverRecordById?id="+id,
url: baseApi + "/wms/supplierdeliver-record-main/getSupplierdeliverRecordById?id=" + id,
method: "get",
data: {},
});
@ -445,7 +445,7 @@ export function getInspectRequestList(params) {
*/
export function getInspectRequestDetail(id) {
return request({
url: baseApi + "/wms/inspect-request-main/getInspectRequestById?id="+id,
url: baseApi + "/wms/inspect-request-main/getInspectRequestById?id=" + id,
method: "get",
data: {},
});
@ -581,7 +581,7 @@ export function cancleTakePurchasereturnJob(id) {
* 采购退货 任务提交
* @param {*} params
*/
export function purchaseReturnJobsubmit (params) {
export function purchaseReturnJobsubmit(params) {
return request({
url: baseApi + "/wms/purchasereturn-job-main/execute",
method: "put",
@ -927,6 +927,21 @@ export function getIssueJobDetail(id) {
}
/**
* 获取推荐明细接口
* @param {*} 任务id
* /wms/issue-request-main
*/
export function getBalanceByBatchOffShelf(itemCode, qty) {
return request({
url: baseApi + "/wms/issue-request-main/getBalanceByBatchOffShelf?itemCode=" + itemCode + "&&qty=" +
qty,
method: "get",
data: {},
});
}
/**
* 发料 任务承接
* @param {*} id
@ -1428,7 +1443,7 @@ export function cancleTakeProductReceiptJob(id) {
* 制品收货任务 提交
* @param {*} params
*/
export function productReceiptJobsubmit( params) {
export function productReceiptJobsubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereturn/jobSubmit",
method: "put",
@ -1440,7 +1455,7 @@ export function productReceiptJobsubmit( params) {
* 制品收货记录 提交
* @param {*} params
*/
export function productReceiptRecordsubmit( params) {
export function productReceiptRecordsubmit(params) {
return request({
url: baseApi + "/wms/productreceipt-record-main/create",
method: "post",
@ -1678,7 +1693,7 @@ export function cancleTakeDeliverJob(id) {
*
*/
export function deliverJobSubmit( params) {
export function deliverJobSubmit(params) {
return request({
url: baseApi + "/wms/deliver-job-main/execute",
method: "put",
@ -2008,7 +2023,7 @@ export function cancleTakeTransferIssueJob(id) {
* @param {*} 任务id
*
*/
export function transferIssueJobSubmit( params) {
export function transferIssueJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id,
method: "post",
@ -2021,7 +2036,7 @@ export function transferIssueJobSubmit( params) {
* @param {*}
*
*/
export function transferIssueRecordSubmit( params) {
export function transferIssueRecordSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
method: "put",
@ -2089,7 +2104,7 @@ export function getIssueRequestList(params) {
*/
export function getIssueRequestDetail(id) {
return request({
url: baseApi + "/wms/issue-request-main/getIssueRequestById?id="+id,
url: baseApi + "/wms/issue-request-main/getIssueRequestById?id=" + id,
method: "get",
data: {},
});
@ -2243,7 +2258,7 @@ export function cancleTakeProductionReturnJob(id) {
* @param {*} 任务id
*
*/
export function productionReturnJobSubmit( params) {
export function productionReturnJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit",
method: "put",
@ -2436,7 +2451,7 @@ export function cancleTakeScrapJob(id) {
* @param {*} 任务id
*
*/
export function scrapJobSubmit( params) {
export function scrapJobSubmit(params) {
return request({
url: baseApi + "/magic-api/pda/job/purchasereceipt/jobSubmit?id=" + id,
method: "put",
@ -2682,10 +2697,3 @@ export function getBalanceByFilter(param) {
data: param,
});
}

2
pages/issue/coms/comIssueRequestCreator.vue

@ -1,7 +1,5 @@
<template>
<view class="">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>

38
pages/issue/coms/comIssueRequestPopup.vue

@ -26,7 +26,7 @@
</view>
<u-line />
<view class="title padding" style="display: flex;">
<text style=" flex-shrink: 0;">物料</text>
<view class="" style="width: 100% ;">
@ -34,13 +34,12 @@
</view>
<view class="">
<image src="/static/search.svg" mode=""
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;"
@click="itemCodeClick">
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" @click="itemCodeClick">
</image>
</view>
</view>
<u-line />
<view class="uni-flex uni-row padding title u-col-center">
@ -107,6 +106,8 @@
itemCode: '请扫描物料信息',
itemName: "",
qty: 0,
rawLocationCode: "",
fgLocationCode: "",
itemCodeFocus: false,
requestInfo: null,
itemCodeList: [],
@ -245,8 +246,11 @@
return
}
if (this.rawLocationCode == '') {
this.showErrorMessage(this.workStationName + "的原材料库位为空")
return
}
this.callback('add');
},
checkItemCode(itemCode) {
@ -280,6 +284,8 @@
productionLineName: this.productionLineName,
workStationCode: this.workStationCode, //
workStationName: this.workStationName,
rawLocationCode: this.rawLocationCode,
fgLocationCode: this.fgLocationCode,
itemCode: this.itemCode,
itemName: this.itemName,
uom: this.uom,
@ -326,11 +332,29 @@
this.productionLineName = e[1].label
this.workStationName = e[2].label
let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择")
return;
} else {
this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode;
}
} else {
this.showErrorMessage("生产线-工位基础信息维护错误")
}
} else {
this.showErrorMessage("车间-生产线基础信息维护错误")
}
},
getScanCode(code) {
if (code == "") {
this.showMessage('物料号不能为空')
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";

199
pages/issue/record/issueRecord.vue

@ -1,13 +1,22 @@
<template>
<view class="page-wraper">
<view class="" v-if='detailSource.subList.length==0'>
<view class="" v-if='detailSource.length==0'>
<com-blank-view @goScan='goScan(true)'></com-blank-view>
</view>
<view v-else class="page-wraper">
<view class="page-main">
<comIssueRequestCreator ref="issueRequest" :dataContent="detailSource">
</comIssueRequestCreator>
<button class="btn_add" @click="goScan(false)">+去添加</button>
<scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource">
<com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation">
</com-issue-request-info>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'>
</com-issue-detail-card>
</view>
</scroll-view>
<!-- <comIssueRequestCreator ref="issueRequest" :dataContent="detailSource">
</comIssueRequestCreator> -->
<!-- <button class="btn_add" @click="goScan(false)">+去添加</button> -->
</view>
<div class="btn_bottom">
@ -17,16 +26,17 @@
</view>
</view>
</div>
<comMessage ref="comMessage"></comMessage>
</view>
</view>
<comMessage ref="comMessage"></comMessage>
<com-issue-request-popup ref="comIssueRequestPopup" @confirm='requestConfirm'></com-issue-request-popup>
</template>
<script>
import {
issueRequestSubmit,
issueRecordSubmit
issueRecordSubmit,
getBalanceByBatchOffShelf
} from '@/api/request2.js';
import {
@ -45,6 +55,8 @@
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.vue'
export default {
name: 'issueRequestSubmit',
@ -53,18 +65,18 @@
comIssueRequestPopup,
jobDetailPopup,
comMessage,
comIssueRequestCreator
comIssueRequestCreator,
comIssueRequestInfo,
comIssueDetailCard
},
data() {
return {
subList: [], //subList
detailSource: {
subList: []
}, //
detailSource: [], //
detailOptions: [],
scanOptions: [],
fromType:""
fromType: "",
workShopCode: ""
}
},
mounted() {
@ -72,76 +84,120 @@
},
onLoad(option) {
this.fromType = option.fromType
if(this.fromType=="requestType"){
if (this.fromType == "requestType") {
updateTitle("发料申请")
}else {
} else {
updateTitle("发料记录")
}
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.comIssueDetailCard.forEach(r => {
r.resizeCollapse();
})
});
},
goScan(editPosition) {
this.$refs.comIssueRequestPopup.openRequestPopup(editPosition);
},
//
requestConfirm(action, item) {
if (this.detailSource.subList.length == 0) {
this.detailSource = {
workshopCode: item.workshopCode,
workShopName: item.workShopName,
totalQty: 0,
subList: []
}
var subItem = {
productionLineCode: item.productionLineCode,
productionLineName: item.productionLineName,
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
itemCode: item.itemCode,
itemName: item.itemName,
qty: item.qty,
uom: item.uom
}
this.detailSource.subList.push(subItem)
} else {
var result = this.detailSource.subList.filter(res => {
if (res.itemCode == item.itemCode&&
res.productionLineCode==item.productionLineCode&&
res.workStationCode==item.workStationCode) {
return res
if (item.itemCode == '' || item.itemCode == null) return;
let that = this;
uni.showLoading({
title: '加载中...',
mask: true
})
getBalanceByBatchOffShelf(item.itemCode, item.qty).then(res => {
if (res.data == null) {
that.showMessage('未获取到推荐信息');
} else {
if (res.data.length > 0) {
this.workShopCode = item.workshopCode;
res.data.forEach(r => {
r.toLocationCode = item.rawLocationCode;
r.productionLineCode = item.productionLineCode;
r.workStationCode = item.workStationCode;
r.itemCode = item.itemCode;
r.uom = item.uom;
that.subList.push(r);
})
that.detailSource = getDataSource(that.detailSource, that.subList)
that.resizeCollapse();
} else {
that.showMessage('列表数据为0');
}
})
uni.hideLoading();
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
//
if (result.length == 0) {
var subItem = {
productionLineCode: item.productionLineCode,
productionLineName: item.productionLineName,
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
itemCode: item.itemCode,
itemName: item.itemName,
qty: item.qty,
uom: item.uom
}
this.detailSource.subList.push(subItem)
// if (this.detailSource.subList.length == 0) {
// this.detailSource = {
// workshopCode: item.workshopCode,
// workShopName: item.workShopName,
} else {
//
result[0].qty += item.qty
// totalQty: 0,
// subList: []
// }
// var subItem = {
// productionLineCode: item.productionLineCode,
// productionLineName: item.productionLineName,
// workStationCode: item.workStationCode,
// workStationName: item.workStationName, //
// itemCode: item.itemCode,
// itemName: item.itemName,
// qty: item.qty,
// uom: item.uom
// }
// this.detailSource.subList.push(subItem)
// } else {
// var result = this.detailSource.subList.filter(res => {
// if (res.itemCode == item.itemCode &&
// res.productionLineCode == item.productionLineCode &&
// res.workStationCode == item.workStationCode) {
// return res
// }
// })
}
}
this.caclcQty();
if (this.$refs.issueRequest != undefined) {
this.$refs.issueRequest.update()
}
// //
// if (result.length == 0) {
// var subItem = {
// productionLineCode: item.productionLineCode,
// productionLineName: item.productionLineName,
// workStationCode: item.workStationCode,
// workStationName: item.workStationName, //
// itemCode: item.itemCode,
// itemName: item.itemName,
// qty: item.qty,
// uom: item.uom
// }
// this.detailSource.subList.push(subItem)
// } else {
// //
// result[0].qty += item.qty
// }
// }
// this.caclcQty();
// if (this.$refs.issueRequest != undefined) {
// this.$refs.issueRequest.update()
// }
},
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
@ -159,7 +215,7 @@
title: "提交中....",
mask: true
});
if(this.fromType =="requestType"){
if (this.fromType == "requestType") {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRequestSubmit(params).then(res => {
@ -173,7 +229,7 @@
uni.hideLoading()
this.showErrorMessage(error)
})
}else {
} else {
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => {
@ -188,18 +244,25 @@
this.showErrorMessage(error)
})
}
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
if(this.fromType =="requestType"){
if (this.fromType == "requestType") {
uni.navigateTo({
url: './issueRequest'
})
}
})
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {}

27
static/config.json

@ -15,14 +15,15 @@
"value": "http://dev.ccwin-in.com:23132",
"desc": "api请求地址"
},
"request_url": {
"name": "request_url",
"value": "http://dev.ccwin-in.com:25100/api/admin-api",
"dev2":"http://192.168.0.157:12080/admin-api",
"chefang":"http://192.168.0.178:12080/admin-api",
"dev":"http://dev.ccwin-in.com:25100/api/admin-api",
"local":"http://localhost:12080",
"value": "http://192.168.0.230:12080/admin-api",
"dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.178:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api",
"dev": "http://dev.ccwin-in.com:25100/api/admin-api",
"local": "http://localhost:12080",
"desc": "api请求地址"
},
"tenantId": {
@ -33,7 +34,7 @@
},
"recepit_configList": [
{
"name": "receipt_isEditLocation",
"value": true,
@ -44,12 +45,12 @@
"value": true,
"desc": "采购收货_允许编辑数量"
},
{
{
"name": "receipt_isHandleQtyGreaterRecommendQty",
"value": true,
"desc": "采购收货_允许实际数量大于推荐数量"
},
{
{
"name": "receipt_isHandleQtyLessRecommendQty",
"value": true,
"desc": "采购收货_允许实际数量小于推荐数量"
@ -71,7 +72,7 @@
}
],
"feed_configList": [
{
"name": "feed_isEditLocation",
"value": true,
@ -82,12 +83,12 @@
"value": true,
"desc": "发料_允许编辑数量"
},
{
{
"name": "feed_isHandleQtyGreaterRecommendQty",
"value": true,
"desc": "发料_允许实际数量大于推荐数量"
},
{
{
"name": "feed_isHandleQtyLessRecommendQty",
"value": true,
"desc": "发料_允许实际数量小于推荐数量"
@ -130,4 +131,4 @@
]
}
}

Loading…
Cancel
Save