cosmoim-852 fix 新增泰国物料转换,BOM关系

master
guoshuang 3 years ago
parent 352771a138
commit fcffc32265

@ -524,5 +524,6 @@ export default {
TargetMaterial: '目标物料',
TargetMaterialdes: '目标物料描述',
allocation: '调拨',
Relationship: 'BOM关系外生产扣料',
},
};

@ -507,22 +507,23 @@ export default {
CausesOfDefects: 'Causes of defects',
PleaseOne: 'Please enter the responsible person',
PleaseTwo: 'Please enter the cause of the defect',
rejectsOffline: 'Defective products offline',
rejectsOffline: 'NG Roll Off',
ResponsibleProcess: 'Responsible process',
PleaseThere: 'Please enter the responsible operation',
rawWasteJudgment: 'Waste judgment of raw materials',
rawWasteJudgment: 'Waste judgment of raw',
reason1: 'reason',
PleaseFour: 'Please enter the reason',
ResponsibilityCategory: 'Responsibility category',
Please_category: 'Please select the responsibility category',
VirtualReplenishment: 'Virtual replenishment',
VirtualInventory: 'Virtual inventory',
semifinishedWasteJudgment: 'Semi finished products are scrapped',
semifinishedWasteJudgment: 'Waste judgment of SFG',
MaterialConversionL: 'Material conversion',
OriginalMaterial: 'Original material',
OriginalMaterialdes: 'Raw material des',
TargetMaterial: 'Target material',
TargetMaterialdes: 'Target material des',
allocation: 'allocation',
Relationship: 'External Mat',
},
};

@ -524,5 +524,6 @@ export default {
TargetMaterial: 'Целевой материалl',
TargetMaterialdes: 'описание цели',
allocation: 'переброска',
Relationship: 'производственные вычеты',
},
};

@ -1295,23 +1295,23 @@
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/MaterialConversion/index",
"style": {
"navigationBarTitleText": "物料转换",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/warehouse/Relationship/index",
"style": {
"navigationBarTitleText": "BOM关系外生产扣料",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
}
// {
// "path": "pages/raw/warehouse/MaterialConversion/index",
// "style": {
// "navigationBarTitleText": "物料转换",
// "navigationStyle": "custom", //
// "navigationBarTextStyle": "white" // white-black-
// }
// },
// {
// "path": "pages/raw/warehouse/allocation/index",
// "style": {
// "navigationBarTitleText": "调拨",
// "navigationStyle": "custom", //
// "navigationBarTextStyle": "white" // white-black-
// }
// }
],
"globalStyle": {
"navigationBarTextStyle": "black",

@ -0,0 +1,262 @@
<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.MaterialConversionL') }}</view>
<view class="right"></view>
</view>
<u-form class="form" label-width="130rpx">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.CommissionedSingleNumber') }}</view>
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
</view>
</view>
<!--原物料号 -->
<u-form-item :label="$t('message.OriginalMaterial')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="MaterialList" />
</u-form-item>
<!-- 原物料描述 -->
<u-form-item :label="$t('message.OriginalMaterialdes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 目标物料号 -->
<u-form-item :label="$t('message.TargetMaterial')">
<u-input :disabled="true" v-model="Some.productCodeTarget" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 目标物料描述 -->
<u-form-item :label="$t('message.TargetMaterialdes')">
<u-input :disabled="true" v-model="Some.productDescZhTarget" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 计划数量 -->
<u-form-item :label="$t('message.plan')">
<u-input v-model="Some.qty" :disabled="true" placeholder="" type="number" />
</u-form-item>
<!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.dn_Number')">
<u-input v-model="actualQty" type="number" placeholder="" />
</u-form-item>
<u-row class="button-bar">
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col
>
</u-row>
</u-form>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from '@/store/modules/session';
//import { any } from 'lodash/fp';
@Component({
components: {
jPicker,
},
})
export default class KanDanHandOver extends BasePage {
//
order3 = '';
model = model;
border = true;
wl: any = {};
actualQty = 0;
Some: any = {};
MaterialList: any = [];
//
async query() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
} else {
await this.model.takeOrder({
orderNo: this.order3,
orderType: 'MC',
});
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.model.orderInInfoList.forEach((item: any) => {
let arr: any = {
label: item.productCode,
value: item.productCode,
};
this.MaterialList.push(arr);
});
this.Some = this.model.orderInInfoList[0];
this.wl = this.MaterialList[0];
}
}
}
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.orderInInfoList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.Some = item;
}
});
}
//
async submit() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (!this.Some) {
this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
let orderlist = [];
let arr: any = {
stoId: this.Some.stoId,
orderNo: this.Some.orderNo,
factoryCode: this.Some.factoryCode,
productCode: this.Some.productCode,
productDescZh: this.Some.productDescZh,
productCodeTarget: this.Some.productCodeTarget,
productDescZhTarget: this.Some.productDescZhTarget,
actualQty: this.actualQty,
originWl: this.Some.originWl,
type: '1',
loginName: session.loginName,
orderType: this.Some.orderType,
};
// this.Some.type = '1';
// this.Some.loginName = session.loginName;
// this.Some.orderType = '1';
orderlist.push(arr);
await model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.success') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.Some = {};
this.actualQty = 0;
this.wl = {};
this.MaterialList = [];
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 {
// line-height: 35rpx;
// background-color: #f7f6fb;
// padding: 10rpx 30rpx;
// border-radius: 8rpx;
// &:after {
// border-bottom-width: 0;
// }
// }
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
}
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
height: 70rpx;
}
}
}
.title {
margin-bottom: 40rpx;
color: #1a1a1a;
font-size: 30rpx;
font-weight: 500;
}
.button-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,86 @@
/*
* @Author: zhou lei
* @Date: 2022-10-27 18:31:28
* @LastEditTime: 2022-10-28 15:22:18
* @LastEditors: zhou lei
* @Description:
* @FilePath: \hgwms-factory-app\src\pages\raw\warehouse\MaterialConversion\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.MaterialConversion',
})
export class MaterialConversion extends VuexModule {
/**
* sap
*/
cboPlaceList = [];
/**
*
*/
poNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
/**
*
*/
orderInInfoList: OrderInInfo[] = [];
code: any = '';
/**
*
*/
// orderInInfoListEx: OrderInInfo[] = [];
/**
// * 查询看单号
* @param poNo
*/
@MutationAction
async takeOrder(order3: any) {
try {
const records: any = await http.post(url.warehouse.rowTransfer.stoAdjusList, {
...order3,
factoryCode: session.factoryCode,
loginName: session.loginName,
orderStatus: '0',
});
const orderInInfoList = records.data.records;
const code = records.code;
console.log('获取来的数据', orderInInfoList);
return { orderInInfoList, 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.confirmMoveStoAdjus, list);
const code = records.code;
return { code };
}
}
export default getModule(MaterialConversion);

@ -0,0 +1,259 @@
<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.Relationship') }}</view>
<view class="right"></view>
</view>
<u-form class="form" label-width="130rpx">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.CommissionedSingleNumber') }}</view>
<u-search :placeholder="$t('message.Commission_tips1')" v-model.trim="order3" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
</view>
</view>
<!--原物料号 -->
<u-form-item :label="$t('message.OriginalMaterial')">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="MaterialList" />
</u-form-item>
<!-- 原物料描述 -->
<u-form-item :label="$t('message.OriginalMaterialdes')">
<u-input :disabled="true" v-model="Some.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 目标物料号 -->
<!-- <u-form-item :label="$t('message.TargetMaterial')">
<u-input :disabled="true" v-model="Some.productCodeTarget" placeholder="" style="overflow: hidden" />
</u-form-item> -->
<!-- 目标物料描述 -->
<!-- <u-form-item :label="$t('message.TargetMaterialdes')">
<u-input :disabled="true" v-model="Some.productDescZhTarget" placeholder="" style="overflow: hidden" />
</u-form-item> -->
<!-- 计划数量 -->
<u-form-item :label="$t('message.plan')">
<u-input v-model="Some.qty" :disabled="true" placeholder="" type="number" />
</u-form-item>
<!-- 原库位 -->
<u-form-item :label="$t('message.Warehouse_OriginalLocation')">
<u-input :disabled="true" v-model="Some.originWl" placeholder="" />
</u-form-item>
<!-- 数量 -->
<u-form-item :label="$t('message.dn_Number')">
<u-input v-model="actualQty" type="number" placeholder="" />
</u-form-item>
<u-row class="button-bar">
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
<u-col :span="6">
<u-button type="primary" @click="submit">{{ $t('message.InventoryFinish') }} </u-button></u-col
>
</u-row>
</u-form>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from '@/store/modules/session';
@Component({
components: {
jPicker,
},
})
export default class KanDanHandOver extends BasePage {
//
order3 = '';
model = model;
border = true;
wl: any = {};
actualQty = 0;
Some: any = {};
MaterialList: any = [];
//
async query() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
} else {
await this.model.takeOrder({
orderNo: this.order3,
orderType: 'BM',
});
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.successful') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.model.orderInInfoList.forEach((item: any) => {
let arr: any = {
label: item.productCode,
value: item.productCode,
};
this.MaterialList.push(arr);
});
this.Some = this.model.orderInInfoList[0];
this.wl = this.MaterialList[0];
}
}
}
//
materialChoice(e: any) {
this.wl = e.pickerName;
this.model.orderInInfoList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.Some = item;
}
});
}
//
async submit() {
if (this.order3 === '') {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (!this.Some) {
this.customToast(this.$t('message.Warehouse_Tip5') as string);
return;
}
let orderlist = [];
let arr: any = {
stoId: this.Some.stoId,
orderNo: this.Some.orderNo,
factoryCode: this.Some.factoryCode,
productCode: this.Some.productCode,
productDescZh: this.Some.productDescZh,
actualQty: this.actualQty,
originWl: this.Some.originWl,
type: '1',
loginName: session.loginName,
orderType: this.Some.orderType,
};
// this.Some.type = '1';
// this.Some.loginName = session.loginName;
// this.Some.orderType = '1';
orderlist.push(arr);
await model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.success') as string,
duration: 2000,
image: '/static/icons/icon-51.png',
});
this.Some = {};
this.actualQty = 0;
this.wl = {};
this.MaterialList = [];
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 {
// line-height: 35rpx;
// background-color: #f7f6fb;
// padding: 10rpx 30rpx;
// border-radius: 8rpx;
// &:after {
// border-bottom-width: 0;
// }
// }
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
}
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
height: 70rpx;
}
}
}
.title {
margin-bottom: 40rpx;
color: #1a1a1a;
font-size: 30rpx;
font-weight: 500;
}
.button-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,86 @@
/*
* @Author: zhou lei
* @Date: 2022-10-27 18:31:28
* @LastEditTime: 2022-10-28 11:53:07
* @LastEditors: zhou lei
* @Description:
* @FilePath: \hgwms-factory-app\src\pages\raw\warehouse\Relationship\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.Relationship',
})
export class Relationship extends VuexModule {
/**
* sap
*/
cboPlaceList = [];
/**
*
*/
poNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
/**
*
*/
orderInInfoList: OrderInInfo[] = [];
code: any = '';
/**
*
*/
// orderInInfoListEx: OrderInInfo[] = [];
/**
// * 查询看单号
* @param poNo
*/
@MutationAction
async takeOrder(params: any) {
try {
const records: any = await http.post(url.warehouse.rowTransfer.stoAdjusList, {
...params,
factoryCode: session.factoryCode,
loginName: session.loginName,
orderStatus: '0',
});
const orderInInfoList = records.data.records;
const code = records.code;
console.log('获取来的数据', orderInInfoList);
return { orderInInfoList, 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.confirmMoveStoAdjus, list);
const code = records.code;
return { code };
}
}
export default getModule(Relationship);
Loading…
Cancel
Save