Overseamom-518 feat 增加委外退货
parent
b2d0734a9e
commit
e396cf9d67
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2021-11-11 11:09:57
|
||||||
|
* @LastEditTime: 2021-12-14 10:13:18
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: /wms_haiwai_app/src/pages/raw/commission/goOut/config.ts
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 看单明细表格列
|
||||||
|
*/
|
||||||
|
import vm from '@/main';
|
||||||
|
export const headers = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedSingleNumber'),
|
||||||
|
key: 'poNo',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_MaterielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc',
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedGoOutNumber'),
|
||||||
|
key: 'outAmount',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const detailHeader = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_MaterielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 301,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 186,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'nowAmount',
|
||||||
|
width: 186,
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,74 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-receipt-detail">
|
||||||
|
<view class="header">
|
||||||
|
<view class="left">
|
||||||
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||||
|
</view>
|
||||||
|
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
|
||||||
|
<view class="right"></view>
|
||||||
|
</view>
|
||||||
|
<view class="table-wrapper">
|
||||||
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="model.detailedList" :show-vert-border="false"></wyb-table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component } from 'vue-property-decorator';
|
||||||
|
import { BasePage } from '@/components/base/page';
|
||||||
|
import { headers } from './config';
|
||||||
|
import model from './model';
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class RawReceiptDetail extends BasePage {
|
||||||
|
model = model;
|
||||||
|
headers = headers;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-receipt-detail {
|
||||||
|
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||||
|
background-size: 100% 600rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
min-height: 100%;
|
||||||
|
padding-top: 118rpx;
|
||||||
|
padding-bottom: 162rpx;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
position: fixed;
|
||||||
|
top: 36rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
.title {
|
||||||
|
flex: 3;
|
||||||
|
}
|
||||||
|
.left,
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 40rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,185 @@
|
|||||||
|
import { Action, getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||||
|
import store from '@/store';
|
||||||
|
import http from '@/utils/request';
|
||||||
|
import { url } from '@/utils/url';
|
||||||
|
import { session } from '@/store/modules/session';
|
||||||
|
// import vm from '@/main';
|
||||||
|
|
||||||
|
class OrderInInfo {
|
||||||
|
stoAmount?: 0;
|
||||||
|
stoNo?: string; //STO采购单号
|
||||||
|
orderAmount?: string; //单据总数
|
||||||
|
Allocated?: string; //已分配
|
||||||
|
Unallocated?: string; //未分配
|
||||||
|
}
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
namespaced: true,
|
||||||
|
dynamic: true,
|
||||||
|
store,
|
||||||
|
name: 'product.outbound.stoOut',
|
||||||
|
})
|
||||||
|
export class ReturningModule extends VuexModule {
|
||||||
|
/**
|
||||||
|
* 月台列表
|
||||||
|
*/
|
||||||
|
returningTypeList: any[] = [];
|
||||||
|
detailedList: any;
|
||||||
|
/**
|
||||||
|
* 物料列表
|
||||||
|
*/
|
||||||
|
materielList: any[] = [];
|
||||||
|
locationCodeList: any[] = [];
|
||||||
|
LocList: any[] = [];
|
||||||
|
//条码扫描的返回的结果
|
||||||
|
oneMaterielDetail: any = {};
|
||||||
|
/**
|
||||||
|
* 订单号查询结果
|
||||||
|
*/
|
||||||
|
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||||
|
//记账按钮的code码
|
||||||
|
code = '';
|
||||||
|
/**
|
||||||
|
* 委外出库单号查询
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async queryOrder(form: any) {
|
||||||
|
const result = await http.post(url.material.commission.goOut.queryOrder, {
|
||||||
|
...form,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
const orderInInfo = result.data.records[0] || {};
|
||||||
|
return { orderInInfo };
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 库位
|
||||||
|
*/
|
||||||
|
// @MutationAction
|
||||||
|
// async queryByFactoryCodeAndWorkAreaCode() {
|
||||||
|
// const list: [] = await http.post(url.material.commission.goOut.queryByFactoryCodeAndWorkAreaCode, {
|
||||||
|
// factoryCode: session.factoryCode,
|
||||||
|
// whCode: session.warehouseCode,
|
||||||
|
// loginName: session.loginName,
|
||||||
|
// });
|
||||||
|
// const locationCodeList = list.map((item: any) => ({
|
||||||
|
// label: item.locationCode,
|
||||||
|
// value: item.locationCode,
|
||||||
|
// }));
|
||||||
|
// return { locationCodeList };
|
||||||
|
// }
|
||||||
|
/**
|
||||||
|
* 获取物料
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
* @memberof ReturningModule
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async outInfo(poNo: string) {
|
||||||
|
const list: [] = await http.post(url.material.commission.goOut.outInfo, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
poNo: poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
});
|
||||||
|
const locationCodeList = list.map((item: any) => ({
|
||||||
|
label: item.locationCode,
|
||||||
|
value: item.locationCode,
|
||||||
|
}));
|
||||||
|
return { locationCodeList };
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async materialComplete(form: any) {
|
||||||
|
const res = await http.post(url.material.commission.goOut.materialComplete, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
...form,
|
||||||
|
});
|
||||||
|
console.log(res, '>>>>>res');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫条码
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async tluSubmit(list: any[]) {
|
||||||
|
const obj = {
|
||||||
|
barcode: list[0].barCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
};
|
||||||
|
let oneMaterielDetail: any = {};
|
||||||
|
const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj);
|
||||||
|
console.log('shneme a ', data.records);
|
||||||
|
oneMaterielDetail = data.records[0];
|
||||||
|
data.records[0].materialCode = list[0].productCode;
|
||||||
|
data.records[0].materialDesc = list[0].productDescZh;
|
||||||
|
console.log('aaaaa', oneMaterielDetail);
|
||||||
|
return oneMaterielDetail;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 确认按钮
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async confirm(list: any[]) {
|
||||||
|
const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
|
||||||
|
console.log('res数据', data, code);
|
||||||
|
// if (code == '1') {
|
||||||
|
// uni.showToast({ icon: 'success', title: msg });
|
||||||
|
// } else {
|
||||||
|
// uni.showToast({ icon: 'none', title: msg });
|
||||||
|
// }
|
||||||
|
const materielList: any = [];
|
||||||
|
return { code, materielList };
|
||||||
|
}
|
||||||
|
//委外出库 关闭订单
|
||||||
|
@MutationAction
|
||||||
|
async closeCode(poNo: any) {
|
||||||
|
const res: any = await http.post(url.outbound.stoOutbound.close, {
|
||||||
|
poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
const code: any = res.code;
|
||||||
|
return { code };
|
||||||
|
}
|
||||||
|
|
||||||
|
//委外出库 初始化获取库位
|
||||||
|
// @Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
@MutationAction
|
||||||
|
async queryLocList(content: any) {
|
||||||
|
const res: any = await http.post(url.Subcontract.base.queryLocList, content);
|
||||||
|
const LocList = res;
|
||||||
|
return { LocList };
|
||||||
|
}
|
||||||
|
//订单信息查询
|
||||||
|
@Action
|
||||||
|
async querySubcontractInfo(poNo: any) {
|
||||||
|
const res = await http.post(url.Subcontract.matReturn.queryOrderInfo, {
|
||||||
|
poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
//submit
|
||||||
|
@Action
|
||||||
|
async submitSubcontractReturn(upload: any) {
|
||||||
|
const res = await http.post(url.Subcontract.matReturn.submit, upload);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
//查询明细
|
||||||
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
async querydetaildlistSubcontractReturn(content: any) {
|
||||||
|
const res: any = await http.post(url.Subcontract.matReturn.detail, content);
|
||||||
|
console.log('明细》》》》》》》》》', res.list);
|
||||||
|
this.detailedList = res.data;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getModule(ReturningModule);
|
Loading…
Reference in New Issue