overseamom-252 feat 手持增加sto详情页和取消按钮

master
mabaoyan 2 years ago
parent 0023eb9ed6
commit d55bdfe6ee

@ -570,5 +570,8 @@ export default {
supplierName: '供应商名称',
PickingVn: '拣配-越南',
HandoverVn: '交接-越南',
detail: '详情',
pcNo:'批次号',
stoPcPleaseInput: '请输入批次号',
},
};

@ -572,5 +572,9 @@ export default {
supplierName: 'supplier',
PickingVn: 'Picking-Vn',
HandoverVn: 'Handover-Vn',
detail: 'Detail',
pcNo:'Batch No',
stoPcPleaseInput: 'Please input batch No',
},
};

@ -567,5 +567,8 @@ export default {
HeaderText: 'Примечания',
supplierCode: 'Код поставщика',
supplierName: 'Название поставщика',
detail: 'Detail',
pcNo:'Batch No',
stoPcPleaseInput: 'Please input batch No',
},
};

@ -1338,6 +1338,14 @@
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/product/stoOutbound/detail",
"style": {
"navigationBarTitleText": "成品STO出库",//stosto
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/demo/index",
"style": {

@ -0,0 +1,37 @@
/**
*
*/
import vm from '@/main';
export const headers = [
{
label: vm.$t('message.product_BarCode'),
key: 'barcode',
width: 400,
},
{
label: vm.$t('message.pcNo'),
key: 'pcNo',
width: 400,
},
{
label: vm.$t('message.po_MaterielNo'),
key: 'matCode',
width: 300,
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'matDesc',
width: 400,
},
{
label: vm.$t('message.stoOrderNo'),
key: 'stoNo',
width: 300,
},
{
label: vm.$t('message.stoLine'),
key: 'stoItem',
width: 300,
},
];

@ -0,0 +1,126 @@
<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%" @onCheck='onCheck' show-left-and-right-border :headers="headers" :contents="model.stoBarcodeList" enable-check='single' :show-vert-border="false"></wyb-table>
</view>
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="12">
<u-button type="error" @click="Delete">{{ $t('message.product_Delete') }}</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 { headers } from './config';
import { session } from '@/store/modules/session';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
headers = headers;
seleteData={}
onCheck(data){
this.seleteData=data.data;
}
async Delete(){
console.log("2222ss",this.seleteData)
console.log("1111ss",this.seleteData[0].lineData.barcode)
const barcode = this.seleteData[0].lineData.barcode;
const stoNo = this.seleteData[0].lineData.stoNo;
const stoItem = this.seleteData[0].lineData.stoItem;
if (!this.seleteData) {
this.customToast(this.$t('message.stoPleaseInput') as any);
return;
}
const SunmitList = {
loginName: session.loginName,
factoryCode: session.factoryCode,
stoNo: stoNo,
stoItem: stoItem,
barcode: barcode,
};
await this.model.deleteBarcode(SunmitList);
if (this.model.SubCode == 1) {
uni.showToast({
title: this.$t('message.success') as string,
image: '/static/icons/icon-51.png',
});
this.seleteData={};
}
}
}
</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;
padding-bottom: 2px;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.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>

@ -58,7 +58,7 @@
<!-- 车牌弹窗输入 -->
<view>
<u-modal v-model="showMsg" :title="title" confirmText="confirm" cancelText="cancel" showCancelButton @confirm="Confirm" @cancel="emptyMsg">
<u-modal v-model="showMsg" :title="title" confirmText="confirm" cancelText="cancel" showCancelButton @confirm="ConfirmDo" @cancel="emptyMsg">
<!-- 运输公司 -->
<u-form-item label="Company" borderBottom labelWidth="160">
<u-input v-model="company" placeholder="transportation company"></u-input>
@ -70,6 +70,17 @@
</u-modal>
</view>
<!-- 批次取消弹窗输入 -->
<view>
<u-modal v-model="showCancel" :title="title" confirmText="confirm" cancelText="cancel" showCancelButton @confirm="CancelDo" @cancel="emptyMsg">
<!-- 运输公司 -->
<u-form-item label="Batch No" borderBottom labelWidth="160">
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="SelectPcLine" showKey="value" valKey="value" :val="pcNo" class="search" :options="model.stoPcList" />
<!-- <u-input v-model="pcNo" placeholder="Batch No"></u-input> -->
</u-form-item>
</u-modal>
</view>
<!-- 出库库位 -->
<!-- <view class="material">
<view class="material-right">
@ -81,14 +92,20 @@
<!-- 底部按钮 -->
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-col :span="3">
<u-button type="primary" @click="Detail">{{ $t('message.detail') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="primary" @click="Confirm">{{ $t('message.confirm') }}</u-button>
</u-col>
<!-- <u-col :span="4">
<u-button type="primary" @click="Submit">{{ $t('message.Posting') }}</u-button>
</u-col> -->
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
<u-col :span="3">
<u-button type="primary" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="error" @click="Cancel">{{ $t('message.Cancel') }}</u-button>
</u-col>
</u-row>
</view>
@ -124,8 +141,10 @@ export default class dnReceiptDom extends BasePage {
ItemIndex: any = '';
carNo: any = '';
company: any = '';
pcNo: any = '';
showVehicle = false;
showMsg = false;
showCancel = false;
title = 'Please Enter Msg';
async query() {
@ -133,6 +152,8 @@ export default class dnReceiptDom extends BasePage {
this.company = '';
this.showVehicle = false;
this.showMsg = false;
this.pcNo = '';
this.showCancel = false;
if (!this.stoNo) {
this.customToast(this.$t('message.stoPleaseInput') as any);
return;
@ -154,6 +175,9 @@ export default class dnReceiptDom extends BasePage {
this.ItemIndex = index;
}
});
}
async SelectPcLine(e: any) {
this.pcNo = e.pickerName;
}
//num: any = '';
//SunmitList: any = [];
@ -162,6 +186,7 @@ export default class dnReceiptDom extends BasePage {
this.company = '';
this.showVehicle = false;
this.showMsg = false;
this.showCancel = false;
//
if (!this.stoNo) {
this.customToast(this.$t('message.stoPleaseInput') as any);
@ -191,13 +216,32 @@ export default class dnReceiptDom extends BasePage {
this.barcode = '';
}
}
//
/**
* 详情
*/
async Detail() {
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
stoNo: this.stoNo,
};
await this.model.QueryStoDetail(params);
uni.setStorageSync('factory', JSON.stringify(params) as any);
this.toPage(this.page.product.stoOutbound.datile);
}
//
async Confirm() {
if (!this.stoNo) {
this.customToast(this.$t('message.stoPleaseInput') as any);
return;
}
}
//
async ConfirmDo() {
if (!this.stoNo) {
this.customToast(this.$t('message.stoPleaseInput') as any);
return;
}
if (this.carNo == '' || this.company == '') {
this.showVehicle = true;
this.showMsg = true;
@ -227,6 +271,52 @@ export default class dnReceiptDom extends BasePage {
this.emptyMsg();
}
}
//
async Cancel() {
console.log("11111111");
if (!this.stoNo) {
//this.customToast(this.$t('message.stoPleaseInput') as any);
return;
}
const SunmitList = {
loginName: session.loginName,
factoryCode: session.factoryCode,
stoNo: this.stoNo,
};
await this.model.QueryPcList(SunmitList);
this.showCancel = true;
}
//
async CancelDo() {
if (!this.pcNo) {
this.customToast(this.$t('message.stoPcPleaseInput') as any);
return;
}
console.log("222222222");
const SunmitList = {
loginName: session.loginName,
factoryCode: session.factoryCode,
stoNo: this.stoNo,
pcNo: this.pcNo,
};
await this.model.stoCancel(SunmitList);
if (this.model.SubCode == 1) {
uni.showToast({
title: this.$t('message.success') as string,
image: '/static/icons/icon-51.png',
});
this.pcNo = '';
//
this.empty();
} else {
this.pcNo = '';
//
this.emptyMsg();
}
}
//
async Submit() {
if (!this.stoNo) {
@ -260,6 +350,8 @@ export default class dnReceiptDom extends BasePage {
this.company = '';
this.showVehicle = false;
this.showMsg = false;
this.pcNo = '';
this.showCancel=false;
//this.SunmitList = [];
this.model.stoNoList.length = 0;
}
@ -267,6 +359,9 @@ export default class dnReceiptDom extends BasePage {
this.carNo = '';
this.company = '';
this.showMsg = false;
this.pcNo = '';
this.showCancel=false;
console.log("ccccccan");
}
}
</script>

@ -1,13 +1,4 @@
/*
* @Author: zhou lei
* @Date: 2022-10-10 15:40:04
* @LastEditTime: 2022-10-12 11:35:25
* @LastEditors: zhou lei
* @Description:
* @FilePath: \hgwms-factory-app\src\pages\product\STO-Outbound\model.ts
* :910592680@qq.com 18669792120
*/
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import { getModule,Action, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
@ -22,6 +13,8 @@ export class ReceiptModule extends VuexModule {
//越南 STO出库 扫描DN单号
stoNoList: any = [];
stoItemList: any = [];
stoPcList: any = [];
stoBarcodeList: any = [];
res: any = '';
@MutationAction
async QuerySto(stoNo: any) {
@ -85,6 +78,42 @@ export class ReceiptModule extends VuexModule {
const SubCode = res.code;
return { SubCode };
}
//查询sto未过账的批次集合
@MutationAction
async QueryPcList(content: any) {
const res: any = await http.post(url.outbound.stoOutbound.pcListQuery, content);
const stoPcList = res.data;
return {stoPcList};
}
//越南 批次取消
CancelCode: any = '';
@MutationAction
async stoCancel(list: any) {
const res: any = await http.post(url.outbound.stoOutbound.stoCancel, list);
const CancelCode = res.code;
return { CancelCode };
}
//越南 条码删除
DeleteCode: any = '';
@MutationAction
async deleteBarcode(list: any) {
const res: any = await http.post(url.outbound.stoOutbound.stoDelete, list);
const DeleteCode = res.code;
return { DeleteCode };
}
//查询sto扫描条码明细
@MutationAction
async QueryStoDetail(content: any) {
const res: any = await http.post(url.outbound.stoOutbound.stoDetailQuery, content);
const stoBarcodeList = res.data;
return {stoBarcodeList};
}
}
export default getModule(ReceiptModule);

@ -34,6 +34,9 @@ export const page = {
stoOutboundDetail: '/pages/product/outbound/stoOutbound/detail',
stoBack: '/pages/product/STO-Outbound/Back',
},
stoOutbound:{
datile:'/pages/product/stoOutbound/detail',
},
SpareDeliverGoods: {
detail: '/pages/product/outbound/SpareDeliverGoods/detail',
},

@ -186,6 +186,10 @@ export const url = {
stoScan: '/wmspda/fg/stoOutbound/scan',
stoConfirm: '/wmspda/fg/stoOutbound/confirm',
stoPost: '/wmspda/fg/stoOutbound/post',
stoDetailQuery: '/wmspda/fg/stoOutbound/queryDetail',
pcListQuery: '/wmspda/fg/stoOutbound/queryPcNoList',
stoCancel: '/wmspda/fg/stoOutbound/cancel',
stoDelete: '/wmspda/fg/stoOutbound/delete',
},
},
inbound: {

Loading…
Cancel
Save