cosmoim-852 fix 俄罗斯新增不良品下线

master
guoshuang 3 years ago
parent 66083c5efd
commit 7e03f8332d

@ -507,6 +507,8 @@ export default {
CausesOfDefects: '不良原因',
PleaseOne: '请输入责任人',
PleaseTwo: '请输入不良原因',
ManualOffline: '半成品手动下线',
rejectsOffline: '不良品下线',
ResponsibleProcess: '责任工序',
PleaseThere: '请输入责任工序',
},
};

@ -507,6 +507,8 @@ export default {
CausesOfDefects: 'Causes of defects',
PleaseOne: 'Please enter the responsible person',
PleaseTwo: 'Please enter the cause of the defect',
ManualOffline: 'Manual offline of semi-finished products',
rejectsOffline: 'Defective products offline',
ResponsibleProcess: 'Responsible process',
PleaseThere: 'Please enter the responsible operation',
},
};

@ -507,6 +507,8 @@ export default {
CausesOfDefects: 'нежелательная причина',
PleaseOne: 'Введите ответственное лицо',
PleaseTwo: 'Введите причину неисправности',
ManualOffline: 'ручной спуск полуфабриката',
rejectsOffline: 'нижняя линия дефекта',
ResponsibleProcess: 'ответственная операция',
PleaseThere: 'Введите ответственную операцию',
},
};

@ -1242,6 +1242,14 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/LineSide/rejectsOffline/index",
"style": {
"navigationBarTitleText": "不良品下线",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/product/STO-Outbound/index",
"style": {

@ -0,0 +1,255 @@
<template>
<view class="page-product-receipt">
<view class="top"></view>
<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.rejectsOffline') }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" :model="form" label-width="180rpx">
<!-- 半成品条码 -->
<view class="single">
<view class="single-left">
<view>{{ $t('message.product_barCode') }}</view>
<u-search :placeholder="$t('message.barcode')" v-model.trim="form.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.Pi_OrderNo')">
<u-input :disabled="true" v-model="Some.proMoveCode" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 型号名称 -->
<u-form-item :label="$t('message.ModelName')">
<u-input :disabled="true" v-model="Some.materialDesc" placeholder="" />
</u-form-item>
<!-- 型号编码 -->
<u-form-item :label="$t('message.ModelCode')">
<u-input :disabled="true" v-model="Some.materialCode" placeholder="" />
</u-form-item>
<!-- 原因 -->
<u-form-item :label="$t('message.CausesOfDefects')">
<u-input v-model="Some.reason" placeholder="" />
</u-form-item>
<!-- 责任人 -->
<u-form-item :label="$t('message.personLiable')">
<u-input v-model="Some.responsibleUser" placeholder="" />
</u-form-item>
<!-- 责任工序 -->
<u-form-item :label="$t('message.ResponsibleProcess')">
<u-input v-model="Some.responsibleProcess" placeholder="" />
</u-form-item>
</u-form>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- <u-col :span="3">
<u-button type="primary" @click="bill">{{ $t('message.detailed') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="primary" @click="scanning">{{ $t('message.scanning') }}</u-button>
</u-col> -->
<u-col :span="6">
<u-button type="primary" @click="closure">{{ $t('message.workArea_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, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { VForm } from 'vue/types/form';
import model from './model';
import { session } from '@/store/modules/session';
interface OptionType {
label: string;
value: string;
}
@Component({
components: {
jPicker,
},
})
export default class productCheckReceipt extends BasePage {
@Ref('form') readonly $form!: VForm;
model = model;
border = true;
form = {
productCode: '',
order3: '',
barcode: '',
aimWl: {} as OptionType,
};
dockCode: any = '';
dockName: any = '';
wl: any = {};
Some: any = {};
//
bookTypeChange(e: any) {
this.form.aimWl = e.pickerName;
}
// onReadyonLoad
//
async onReady() {
//
}
//
async query() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
let param = {
factoryCode: session.factoryCode,
loginName: session.loginName,
barCode: this.form.order3,
};
await this.model.getInfoByDoorBarcode(param);
if (this.model.code == '1') {
this.Some = this.model.resdata;
}
}
//
async closure() {
if (!this.form.order3) {
this.customToast(this.$t('message.Commission_tips1') as string);
return;
}
if (!this.Some.reason) {
this.customToast(this.$t('message.PleaseTwo') as string);
return;
}
if (!this.Some.responsibleUser) {
this.customToast(this.$t('message.PleaseOne') as string);
return;
}
if (!this.Some.responsibleProcess) {
this.customToast(this.$t('message.PleaseThere') as string);
return;
}
await this.model.scrapSfgOfflineConfirm({
orderNo: this.Some.proMoveCode,
productCode: this.Some.materialCode,
productDesc: this.Some.materialDesc,
factoryCode: session.factoryCode,
loginName: session.loginName,
barcode: this.form.order3,
reason: this.Some.reason,
responsibleUser: this.Some.responsibleUser,
responsibleProcess: this.Some.responsibleProcess,
});
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.form.order3 = '';
}
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.top {
width: 100%;
height: 20px;
position: fixed;
top: 0;
left: 0;
background-color: rgb(23, 83, 234);
z-index: 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 {
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;
}
}
}
}
.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,202 @@
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 { page } from '@/utils/page';
class OrderInInfo {
productDescZh?: string;
qty?: string;
custCode?: string;
custCodeName?: string;
productCode?: string;
locCode?: string;
barcode?: string;
costCenter?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.LineSide.rejectsOffline',
})
export class wholeScrap extends VuexModule {
/**
*
*/
WlList = [];
code: any = '';
delCode: any = '';
recordsList: any = [];
choiceCodeList: any = [];
materielList: any = [];
/**
*
*/
// modelType = [
// { label: '内销', value: '0' },
// { label: '外销', value: '1' },
// { label: '样机', value: '2' },
// { label: '半成品', value: '4' },
// ];
/**
*
*/
dnNo = '';
/**
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
// /**
// * 更新看单明细库位
// * @param kw 库位
// */
// @Mutation
// updateOrderInInfoListKw(kw: string) {
// this.orderInInfoList = this.orderInInfoList.map((item) => {
// item.kw = kw;
// return item;
// });
// }
/**
*
*/
@MutationAction
async queryLocation() {
const result: any = await http.get(url.warehouse.wholeTransfer.list, {
params: {
// factoryCode: '1999',
factoryCode: session.factoryCode,
loginName: session.loginName,
// loginName: '1999',
},
});
// console.log('库位数据',result)
const WlList = result.data.map((_: any) => ({
label: _.locationCode,
value: _.locationCode,
}));
return { WlList };
}
/**
*
* DN
* @param dnNo
*/
resdata: any = {};
@MutationAction
async getInfoByDoorBarcode(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.getInfoByDoorBarcode, params);
const resdata = res.data;
const code = res.code;
return { code, resdata };
}
//确认
@MutationAction
async scrapSfgOfflineConfirm(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.scrapSfgOfflineConfirm, params);
const code = res.code;
return { code };
}
@MutationAction
async onTakeoutConfirm(list: any) {
const records: any = await http.post(url.warehouse.rowTransfer.commit, list);
const code = records.code;
return { code };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async queryDetailed(proMoveCode: any) {
const { code, data } = await http.post(url.warehouse.rowTransfer.queryListByMoveCode, {
proMoveCode,
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
});
const materielList = data;
return { materielList, code };
}
/**
*
* DN
* @param dnNo
*/
@MutationAction
async close(proMoveCode: any) {
const { code } = await http.post(url.warehouse.rowTransfer.close, {
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
proMoveCode,
});
//const materielList = data;
return { code };
}
@MutationAction
async queryScrapList(param: any) {
const res: any = await http.post(url.warehouse.rowTransfer.list, param);
const code = res.code;
console.log('res', res);
const recordsList = res.data.records;
const choiceCodeList = [];
recordsList.forEach((item: any) => {
const arr: any = {};
arr.label = item.productCode;
arr.value = item.productCode;
choiceCodeList.push(arr);
});
console.log('choiceCodeList', choiceCodeList);
return { code, recordsList, choiceCodeList };
}
// /**
// * 提交看单明细
// */
// @MutationAction
// async submitOrderInEnter() {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? '2' : '1';
// item.requestAmount = item.checked ? item.y : '0';
// return item;
// });
// const result: any = await http.post(url.material.DNorderin.enter, {
// dnNo: this.dnNo,
// factoryCode: '1999',
// loginName: '1999',
// list,
// });
// uni.showToast({
// icon: 'none',
// title: result.msg,
// });
// const orderInInfoList = result.list.sort(
// (a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus),
// );
// return { orderInInfoList };
// }
/**
*
*/
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async changeOrderInLocation(kw: string) {
await http.post('/wmspda/material/orderin/enter', {
loginName: session.loginName,
// loginName: '1999',
warehouseCode: '',
factoryCode: session.factoryCode,
// factoryCode: '1999',
locationCode: kw,
});
return kw;
}
}
export default getModule(wholeScrap);

@ -289,6 +289,8 @@ export const url = {
scanBox: '/wmspda/sparePart/scanBox',
saleScan: '/wmspda/fg/sparepart/sale/scan',
querySpareListInfoByDnNo: '/wmspda/fg/querySpareListInfoByDnNo',
getInfoByDoorBarcode: '/wmspda/fg/getInfoByDoorBarcode',
scrapSfgOfflineConfirm: '/wmspda/fg/scrapSfgOfflineConfirm',
},
wholeLnventory: {
content: '/wmspda/fg/findMaterialByPddNo',

Loading…
Cancel
Save