cosmoim-852 fix 泰国调拨出入库
parent
1a666ac522
commit
00dcf5b09a
@ -0,0 +1,239 @@
|
||||
<template>
|
||||
<view class="page-kan-dan-index">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.Transferissue') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<u-form class="form" ref="form" :error-type="['toast']" label-width="150rpx">
|
||||
<!-- 单号查询 -->
|
||||
<u-form-item :required="true" :label="$t('message.InventoryOrderNo')" prop="orderNo">
|
||||
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @search="query" :show-action="false"></u-search>
|
||||
<view class="single-right">
|
||||
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<!-- 物料号选择 -->
|
||||
<u-form-item :required="true" :label="$t('message.CommissionedMaterielNo')">
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="orderlist.materialCode" class="search" :options="model.materielList" />
|
||||
</u-form-item>
|
||||
<!-- 物料描述 -->
|
||||
<u-form-item :label="$t('message.po_MaterielDes')">
|
||||
<u-input :disabled="true" v-model="orderlist.materialDesc" placeholder="" style="overflow: hidden" />
|
||||
</u-form-item>
|
||||
<!-- 源工厂 -->
|
||||
<u-form-item :label="$t('message.SourceFactory')">
|
||||
<u-input :disabled="true" v-model="orderlist.deliveryFactory" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 源库位 -->
|
||||
<u-form-item :label="$t('message.SourceLocation')">
|
||||
<u-input :disabled="true" v-model="orderlist.deliveryWlcode" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 目标工厂 -->
|
||||
<u-form-item :label="$t('message.Targetfactory')">
|
||||
<u-input :disabled="true" v-model="orderlist.receiveFactory" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 目标库位 -->
|
||||
<u-form-item :label="$t('message.Warehouse_TargetLocation')">
|
||||
<u-input :disabled="true" v-model="orderlist.receiveWlcode" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 计划数量 -->
|
||||
<u-form-item :label="$t('message.plan')">
|
||||
<u-input v-model="NEWqty" placeholder="" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<!-- 确定 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="primary" @click="submit">{{ $t('message.product_Confirm') }}</u-button>
|
||||
</u-col>
|
||||
<!-- 返回 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class KanDanHandOver extends BasePage {
|
||||
order3 = '';
|
||||
NEWqty = '';
|
||||
model = model;
|
||||
border = true;
|
||||
materialCodeSelect = false;
|
||||
orderlist: any = [];
|
||||
productDescZh = '';
|
||||
//查询单号
|
||||
async query() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.Warehouse_Tip') as string);
|
||||
return;
|
||||
} else {
|
||||
await this.model.takeYKOrder({
|
||||
stoNo: this.order3,
|
||||
});
|
||||
if (model.code == '1') {
|
||||
uni.showToast({
|
||||
//icon: 'success',
|
||||
title: this.$t('message.successful') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.orderlist = model.materielList[0];
|
||||
//this.getproduct(this.orderlist.productCode);
|
||||
//this.productDescZh = model.resdata.materialDesc;
|
||||
}
|
||||
}
|
||||
}
|
||||
async getproduct(params: any) {
|
||||
await model.getproduct({
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
productCode: params,
|
||||
});
|
||||
}
|
||||
//选择物料回调函数
|
||||
materialConfirm(v: any) {
|
||||
this.orderlist.materialCode = v.pickerName.materialCode;
|
||||
model.materielList.forEach((item: any) => {
|
||||
if (this.orderlist.materialCode == item.materialCode) {
|
||||
this.orderlist = item;
|
||||
//this.getproduct(this.orderlist.productCode);
|
||||
// await model.getproduct({
|
||||
// factoryCode: session.factoryCode,
|
||||
// loginName: session.loginName,
|
||||
// productCode: this.orderlist.productCode,
|
||||
// });
|
||||
//this.productDescZh = model.resdata.materialDesc;
|
||||
}
|
||||
});
|
||||
}
|
||||
//提交数据
|
||||
async submit() {
|
||||
if (this.order3 == '') {
|
||||
this.customToast(this.$t('message.InventoryPleaseScan') as string);
|
||||
return;
|
||||
}
|
||||
if (this.orderlist.length == 0) {
|
||||
this.customToast(this.$t('message.Commission_tips6') as string);
|
||||
return;
|
||||
}
|
||||
if (this.NEWqty == '' || parseFloat(this.NEWqty) == 0) {
|
||||
this.customToast(this.$t('message.PleaseQuantity') as string);
|
||||
return;
|
||||
}
|
||||
// if (parseFloat(this.NEWqty) > parseFloat(this.orderlist.qty)) {
|
||||
// this.customToast(this.$t('message.greater') as string);
|
||||
// return;
|
||||
// }
|
||||
// this.orderlist.type = '1';
|
||||
// this.orderlist.keepBy = session.loginName;
|
||||
// this.orderlist.orderType = '0';
|
||||
// this.orderlist.qty = this.NEWqty;
|
||||
// let arr = [];
|
||||
// arr.push(this.orderlist);
|
||||
await model.onTakeoutConfirm({
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
stoNo: this.order3,
|
||||
stoItem: this.orderlist.stoItem,
|
||||
materialCode: this.orderlist.materialCode,
|
||||
orderAmount: this.NEWqty,
|
||||
deliveryFactory: this.orderlist.deliveryFactory,
|
||||
deliveryWlcode: this.orderlist.deliveryWlcode,
|
||||
receiveFactory: this.orderlist.receiveFactory,
|
||||
receiveWlcode: this.orderlist.receiveWlcode,
|
||||
});
|
||||
if (model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.Warehouse_Tip9') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.orderlist = {};
|
||||
this.model.materielList.length = 0;
|
||||
this.NEWqty = '';
|
||||
this.query();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-kan-dan-index {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 36rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
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;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
padding: 30rpx 0;
|
||||
line-height: 35rpx;
|
||||
}
|
||||
}
|
||||
.single-right {
|
||||
button {
|
||||
//margin-top: 15rpx;
|
||||
width: 110rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* @Author: zhou lei
|
||||
* @Date: 2022-11-12 11:41:43
|
||||
* @LastEditTime: 2022-11-12 14:12:47
|
||||
* @LastEditors: zhou lei
|
||||
* @Description:111
|
||||
* @FilePath: \hgwms-factory-app\src\pages\raw\STO\STO-OutboundTai\model.ts
|
||||
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||
*/
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
// import { page } from '@/utils/page';
|
||||
import { session } from '@/store/modules/session';
|
||||
import vm from '@/main';
|
||||
|
||||
class OrderInInfo {
|
||||
checked?: boolean;
|
||||
poNo?: string;
|
||||
kw?: string;
|
||||
userDefined10?: string;
|
||||
orderStatus?: string;
|
||||
}
|
||||
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'raw.warehouse.rowTransfer',
|
||||
})
|
||||
export class rowTransfer extends VuexModule {
|
||||
/**
|
||||
* sap库存地点列表
|
||||
*/
|
||||
cboPlaceList = [];
|
||||
/**
|
||||
* 隐藏看单号
|
||||
*/
|
||||
poNo = '';
|
||||
/**
|
||||
* 看单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
/**
|
||||
* 看单明细
|
||||
*/
|
||||
orderInInfoList: OrderInInfo[] = [];
|
||||
materielList = [];
|
||||
code = '';
|
||||
resdata: any = {};
|
||||
/**
|
||||
* 看单明细未通过明细
|
||||
*/
|
||||
// orderInInfoListEx: OrderInInfo[] = [];
|
||||
|
||||
/**
|
||||
// * 查询看单号
|
||||
* @param poNo
|
||||
*/
|
||||
@MutationAction
|
||||
async takeYKOrder(order3: any) {
|
||||
// console.log('获取来的数据咋啊啊啊');
|
||||
try {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.findStoOutOrderInfo, {
|
||||
...order3,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
console.log('records', records);
|
||||
const code = records.code;
|
||||
const orderInInfoList = records.data;
|
||||
const materielList = orderInInfoList.map((item: any) => ({
|
||||
label: item.materialCode,
|
||||
value: item.materialCode,
|
||||
...item,
|
||||
}));
|
||||
console.log('materielList', materielList);
|
||||
return { orderInInfoList, materielList, code };
|
||||
} catch {
|
||||
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
|
||||
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
|
||||
}
|
||||
}
|
||||
|
||||
@MutationAction
|
||||
async onTakeoutConfirm(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.stoOutOrderDelivery, list);
|
||||
const code = records.code;
|
||||
return { code };
|
||||
}
|
||||
//根据物料编码查询
|
||||
@MutationAction
|
||||
async getproduct(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.getproduct, list);
|
||||
const code = records.code;
|
||||
const resdata = records.data;
|
||||
return { code, resdata };
|
||||
}
|
||||
//清除数据
|
||||
@MutationAction
|
||||
async empty() {
|
||||
const materielList = null;
|
||||
return { materielList };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(rowTransfer);
|
@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<view class="page-kan-dan-index">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.Transferreceipt') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<u-form class="form" ref="form" :error-type="['toast']" label-width="150rpx">
|
||||
<!-- 单号查询 -->
|
||||
<u-form-item :required="true" :label="$t('message.InventoryOrderNo')" prop="orderNo">
|
||||
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @search="query" :show-action="false"></u-search>
|
||||
<view class="single-right">
|
||||
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
||||
</view>
|
||||
</u-form-item>
|
||||
<!-- 物料号选择 -->
|
||||
<u-form-item :required="true" :label="$t('message.CommissionedMaterielNo')">
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="orderlist.materialCode" class="search" :options="model.materielList" />
|
||||
</u-form-item>
|
||||
<!-- 物料描述 -->
|
||||
<u-form-item :label="$t('message.po_MaterielDes')">
|
||||
<u-input :disabled="true" v-model="orderlist.materialDesc" placeholder="" style="overflow: hidden" />
|
||||
</u-form-item>
|
||||
<!-- 源工厂 -->
|
||||
<u-form-item :label="$t('message.SourceFactory')">
|
||||
<u-input :disabled="true" v-model="orderlist.deliveryFactory" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 源库位 -->
|
||||
<u-form-item :label="$t('message.SourceLocation')">
|
||||
<u-input :disabled="true" v-model="orderlist.deliveryWlcode" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 目标工厂 -->
|
||||
<u-form-item :label="$t('message.Targetfactory')">
|
||||
<u-input :disabled="true" v-model="orderlist.receiveFactory" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 目标库位 -->
|
||||
<u-form-item :label="$t('message.Warehouse_TargetLocation')">
|
||||
<u-input :disabled="true" v-model="orderlist.receiveWlcode" placeholder="" />
|
||||
</u-form-item>
|
||||
<!-- 计划数量 -->
|
||||
<u-form-item :label="$t('message.plan')">
|
||||
<u-input :disabled="true" v-model="orderlist.orderAmount" placeholder="" />
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<!-- 确定 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="primary" @click="submit">{{ $t('message.product_Confirm') }}</u-button>
|
||||
</u-col>
|
||||
<!-- 返回 -->
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class KanDanHandOver extends BasePage {
|
||||
order3 = '';
|
||||
NEWqty = '';
|
||||
model = model;
|
||||
border = true;
|
||||
materialCodeSelect = false;
|
||||
orderlist: any = [];
|
||||
productDescZh = '';
|
||||
//查询单号
|
||||
async query() {
|
||||
if (this.order3 === '') {
|
||||
this.customToast(this.$t('message.Warehouse_Tip') as string);
|
||||
return;
|
||||
} else {
|
||||
await this.model.takeYKOrder({
|
||||
stoNo: this.order3,
|
||||
});
|
||||
if (model.code == '1') {
|
||||
uni.showToast({
|
||||
//icon: 'success',
|
||||
title: this.$t('message.successful') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.orderlist = model.materielList[0];
|
||||
// this.getproduct(this.orderlist.productCode);
|
||||
// this.productDescZh = model.resdata.materialDesc;
|
||||
// this.NEWqty = model.materielList[0].qty;
|
||||
}
|
||||
}
|
||||
}
|
||||
async getproduct(params: any) {
|
||||
await model.getproduct({
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
productCode: params,
|
||||
});
|
||||
}
|
||||
//选择物料回调函数
|
||||
materialConfirm(v: any) {
|
||||
this.orderlist.materialCode = v.pickerName.materialCode;
|
||||
model.materielList.forEach((item: any) => {
|
||||
if (this.orderlist.materialCode == item.materialCode) {
|
||||
this.orderlist = item;
|
||||
// this.getproduct(this.orderlist.productCode);
|
||||
// this.productDescZh = model.resdata.materialDesc;
|
||||
//this.NEWqty = item.qty;
|
||||
}
|
||||
});
|
||||
}
|
||||
//提交数据
|
||||
async submit() {
|
||||
if (this.order3 == '') {
|
||||
this.customToast(this.$t('message.InventoryPleaseScan') as string);
|
||||
return;
|
||||
}
|
||||
if (this.orderlist.length == 0) {
|
||||
this.customToast(this.$t('message.Commission_tips6') as string);
|
||||
return;
|
||||
}
|
||||
// if (this.NEWqty == '' || parseFloat(this.NEWqty) == 0) {
|
||||
// this.customToast(this.$t('message.PleaseQuantity') as string);
|
||||
// return;
|
||||
// }
|
||||
// if (parseFloat(this.NEWqty) > parseFloat(this.orderlist.qty)) {
|
||||
// this.customToast(this.$t('message.greater') as string);
|
||||
// return;
|
||||
// }
|
||||
// this.orderlist.type = '1';
|
||||
// this.orderlist.keepBy = session.loginName;
|
||||
// this.orderlist.orderType = '0';
|
||||
// this.orderlist.qty = this.NEWqty;
|
||||
// let arr = [];
|
||||
// arr.push(this.orderlist);
|
||||
await model.onTakeoutConfirm({
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
stoNo: this.order3,
|
||||
stoItem: this.orderlist.stoItem,
|
||||
materialCode: this.orderlist.materialCode,
|
||||
orderAmount: this.orderlist.orderAmount,
|
||||
deliveryFactory: this.orderlist.deliveryFactory,
|
||||
deliveryWlcode: this.orderlist.deliveryWlcode,
|
||||
receiveFactory: this.orderlist.receiveFactory,
|
||||
receiveWlcode: this.orderlist.receiveWlcode,
|
||||
});
|
||||
if (model.code == '1') {
|
||||
uni.showToast({
|
||||
title: this.$t('message.Warehouse_Tip9') as string,
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
this.orderlist = {};
|
||||
this.model.materielList.length = 0;
|
||||
//this.NEWqty = '';
|
||||
this.query();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-kan-dan-index {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 36rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
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;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
padding: 30rpx 0;
|
||||
line-height: 35rpx;
|
||||
}
|
||||
}
|
||||
.single-right {
|
||||
button {
|
||||
//margin-top: 15rpx;
|
||||
width: 110rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
.bottom-bar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 99;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* @Author: zhou lei
|
||||
* @Date: 2022-11-12 11:41:58
|
||||
* @LastEditTime: 2022-11-12 14:12:54
|
||||
* @LastEditors: zhou lei
|
||||
* @Description: 111
|
||||
* @FilePath: \hgwms-factory-app\src\pages\raw\STO\STO-StorageTai\model.ts
|
||||
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||
*/
|
||||
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
// import { page } from '@/utils/page';
|
||||
import { session } from '@/store/modules/session';
|
||||
import vm from '@/main';
|
||||
|
||||
class OrderInInfo {
|
||||
checked?: boolean;
|
||||
poNo?: string;
|
||||
kw?: string;
|
||||
userDefined10?: string;
|
||||
orderStatus?: string;
|
||||
}
|
||||
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'raw.warehouse.rowTransfer',
|
||||
})
|
||||
export class rowTransfer extends VuexModule {
|
||||
/**
|
||||
* sap库存地点列表
|
||||
*/
|
||||
cboPlaceList = [];
|
||||
/**
|
||||
* 隐藏看单号
|
||||
*/
|
||||
poNo = '';
|
||||
/**
|
||||
* 看单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
/**
|
||||
* 看单明细
|
||||
*/
|
||||
orderInInfoList: OrderInInfo[] = [];
|
||||
materielList = [];
|
||||
code = '';
|
||||
resdata: any = {};
|
||||
/**
|
||||
* 看单明细未通过明细
|
||||
*/
|
||||
// orderInInfoListEx: OrderInInfo[] = [];
|
||||
|
||||
/**
|
||||
// * 查询看单号
|
||||
* @param poNo
|
||||
*/
|
||||
@MutationAction
|
||||
async takeYKOrder(order3: any) {
|
||||
// console.log('获取来的数据咋啊啊啊');
|
||||
try {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.findStoReceiveOrderInfo, {
|
||||
...order3,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
console.log('records', records);
|
||||
const code = records.code;
|
||||
const orderInInfoList = records.data.records;
|
||||
const materielList = orderInInfoList.map((item: any) => ({
|
||||
label: item.materialCode,
|
||||
value: item.materialCode,
|
||||
...item,
|
||||
}));
|
||||
console.log('materielList', materielList);
|
||||
return { orderInInfoList, materielList, code };
|
||||
} catch {
|
||||
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
|
||||
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
|
||||
}
|
||||
}
|
||||
|
||||
@MutationAction
|
||||
async onTakeoutConfirm(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.stoOutOrderReceive, list);
|
||||
const code = records.code;
|
||||
return { code };
|
||||
}
|
||||
//根据物料编码查询
|
||||
@MutationAction
|
||||
async getproduct(list: any) {
|
||||
const records: any = await http.post(url.warehouse.rowTransfer.getproduct, list);
|
||||
const code = records.code;
|
||||
const resdata = records.data;
|
||||
return { code, resdata };
|
||||
}
|
||||
//清除数据
|
||||
@MutationAction
|
||||
async empty() {
|
||||
const materielList = null;
|
||||
return { materielList };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(rowTransfer);
|
Loading…
Reference in New Issue