update:成品退扫

master
hou 4 years ago
parent f3e6f7c038
commit 4dfc17b04d

@ -68,14 +68,14 @@
<script lang="ts">
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { VForm, VFormRules } from 'vue/types/form';
import { VForm } from 'vue/types/form';
import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from '@/store/modules/session';
interface OptionType {
label: string;
value: string;
}
// interface OptionType {
// label: string;
// value: string;
// }
@Component({
components: {
jPicker,
@ -155,6 +155,7 @@ export default class ProductCheckReceipt extends BasePage {
barcode: this.form.barcode,
productCode: this.wl.value,
locCode: this.Some.originWl,
order1: this.form.order3,
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
@ -166,6 +167,32 @@ export default class ProductCheckReceipt extends BasePage {
//this.Some.actualQty += 1;
this.onSubmit();
}
if (this.model.code == '2') {
uni.showModal({
content: this.$t('message.sweep') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.product_Cancel') as string,
success: async (res) => {
if (res.confirm) {
let params = {
barCode: this.form.barcode,
orderType: '2',
order3: this.form.order3,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await this.model.codeDel(params);
if (this.model.delCode == '1') {
this.customToast(this.$t('message.success') as string);
this.form.barcode = '';
}
} else if (res.cancel) {
this.form.barcode = '';
return;
}
},
});
}
}
//
async onSubmit() {
@ -211,7 +238,7 @@ export default class ProductCheckReceipt extends BasePage {
success: (res: any) => {
if (res.confirm) {
//debugger;
console.log("////111111");
console.log('////111111');
this.model.close(this.form.order3);
if (this.model.code == '1') {
uni.showToast({
@ -335,8 +362,5 @@ export default class ProductCheckReceipt extends BasePage {
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.button-bar {
}
}
</style>

@ -4,7 +4,6 @@ import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
// import { page } from '@/utils/page';
import vm from '@/main';
class OrderInInfo {
productDescZh?: string;
@ -28,6 +27,7 @@ export class wholeCollect extends VuexModule {
*/
WlList = [];
code: any = '';
delCode: any = '';
recordsList: any = [];
choiceCodeList: any = [];
materielList: any = [];
@ -88,7 +88,7 @@ export class wholeCollect extends VuexModule {
const recordsList = res.data.records;
const choiceCodeList = [];
recordsList.forEach((item: any) => {
let arr: any = {};
const arr: any = {};
arr.label = item.productCode;
arr.value = item.productCode;
choiceCodeList.push(arr);
@ -108,6 +108,13 @@ export class wholeCollect extends VuexModule {
const code = res.code;
return { code, orderInInfo };
}
//退扫
@MutationAction
async codeDel(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
const delCode = res.code;
return { delCode };
}
@MutationAction
async onTakeoutConfirm(list: any[]) {
const records: any = await http.post(url.warehouse.rowTransfer.commit, list);

@ -79,7 +79,7 @@
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { VForm, VFormRules } from 'vue/types/form';
import { VForm } from 'vue/types/form';
import model from './model';
import { session } from '@/store/modules/session';
@ -135,6 +135,7 @@ export default class productCheckReceipt extends BasePage {
barcode: this.form.barcode,
productCode: this.wl.value,
locCode: this.Some.originWl,
order1: this.form.order3,
};
await this.model.getProductCode(params);
if (this.model.code == '1') {
@ -146,6 +147,32 @@ export default class productCheckReceipt extends BasePage {
// this.Some.actualQty += 1;
this.onSubmit();
}
if (this.model.code == '2') {
uni.showModal({
content: this.$t('message.sweep') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.product_Cancel') as string,
success: async (res) => {
if (res.confirm) {
let params = {
barCode: this.form.barcode,
orderType: '1',
factoryCode: session.factoryCode,
loginName: session.loginName,
order3: this.form.order3,
};
await this.model.codeDel(params);
if (this.model.delCode == '1') {
this.customToast(this.$t('message.success') as string);
this.form.barcode = '';
}
} else if (res.cancel) {
this.form.barcode = '';
return;
}
},
});
}
}
// onReadyonLoad
onReady() {

@ -3,7 +3,6 @@ import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
import vm from '@/main';
// import { page } from '@/utils/page';
class OrderInInfo {
@ -29,6 +28,7 @@ export class wholeScrap extends VuexModule {
*/
WlList = [];
code: any = '';
delCode: any = '';
recordsList: any = [];
choiceCodeList: any = [];
materielList: any = [];
@ -95,7 +95,13 @@ export class wholeScrap extends VuexModule {
const code = res.code;
return { code, orderInInfo };
}
//退扫
@MutationAction
async codeDel(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
const delCode = res.code;
return { delCode };
}
@MutationAction
async onTakeoutConfirm(list: any) {
const records: any = await http.post(url.warehouse.rowTransfer.commit, list);
@ -141,7 +147,7 @@ export class wholeScrap extends VuexModule {
const recordsList = res.data.records;
const choiceCodeList = [];
recordsList.forEach((item: any) => {
let arr: any = {};
const arr: any = {};
arr.label = item.productCode;
arr.value = item.productCode;
choiceCodeList.push(arr);

@ -126,13 +126,49 @@ export default class productCheckReceipt extends BasePage {
this.customToast(this.$t('message.product_unit7') as string);
return;
}
await model.getProductCode(this.form.productCode);
if (model.code == '1') {
if (this.userDefined4 == '' || this.userDefined4.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip') as string);
return;
}
let params = {
barcode: this.form.productCode,
order1: this.userDefined4,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await model.getProductCode(params);
if (this.model.code == '1') {
uni.showToast({
icon: 'success',
title: this.$t('message.successful') as string,
});
}
if (this.model.code == '2') {
uni.showModal({
content: this.$t('message.sweep') as string,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.product_Cancel') as string,
success: async (res) => {
if (res.confirm) {
let params = {
barCode: this.form.productCode,
orderType: '0',
order3: this.userDefined4,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
await this.model.codeDel(params);
if (this.model.delCode == '1') {
this.customToast(this.$t('message.success') as string);
this.form.productCode = '';
}
} else if (res.cancel) {
this.form.productCode = '';
return;
}
},
});
}
}
//
async QueryHistory() {

@ -31,8 +31,9 @@ export class wholeTransfer extends VuexModule {
userDefined: any = '';
detailedList: any;
code = '';
removeList:any = []
removeMaterialList:any = []
delCode = '';
removeList: any = [];
removeMaterialList: any = [];
/**
*
*/
@ -88,12 +89,8 @@ export class wholeTransfer extends VuexModule {
* @param dnNo
*/
@MutationAction
async getProductCode(barcode: string) {
const res: any = await http.post(url.warehouse.wholeTransfer.content, {
barcode,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
async getProductCode(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.content, params);
const code = res.code;
const orderInInfo = res.data.records[0];
if (orderInInfo.custCode == '0') {
@ -107,6 +104,13 @@ export class wholeTransfer extends VuexModule {
}
return { orderInInfo, code };
}
//退扫
@MutationAction
async codeDel(params: any) {
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
const delCode = res.code;
return { delCode };
}
//清除数据
@MutationAction
async empty() {
@ -125,30 +129,30 @@ export class wholeTransfer extends VuexModule {
//生成移库码
@MutationAction
async getCpMoveBatchNo(loginName: any) {
let res: any = await http.post(url.warehouse.rowTransfer.getCode, loginName);
let userDefined: any = res.data;
const res: any = await http.post(url.warehouse.rowTransfer.getCode, loginName);
const userDefined: any = res.data;
return { userDefined };
}
//查询已扫物料
@MutationAction
async QueryHistory(params: any = {}) {
let res: any = await http.post(url.warehouse.rowTransfer.queryGroupLis, params);
console.log('res>>>>>>>>>>>>>>>>',res)
const removeList:any = res.data
const removeMaterialList:any = []
res.data.forEach((item:any) =>{
let arr:any = {
value:item.materialCode,
laber:item.materialCode,
}
removeMaterialList.push(arr)
})
return { removeList,removeMaterialList };
const res: any = await http.post(url.warehouse.rowTransfer.queryGroupLis, params);
console.log('res>>>>>>>>>>>>>>>>', res);
const removeList: any = res.data;
const removeMaterialList: any = [];
res.data.forEach((item: any) => {
const arr: any = {
value: item.materialCode,
laber: item.materialCode,
};
removeMaterialList.push(arr);
});
return { removeList, removeMaterialList };
}
//查询明细
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async querydetaildlist(content: any) {
let res: any = await http.post('/wmspda/fg/queryListByMoveCode', content);
const res: any = await http.post('/wmspda/fg/queryListByMoveCode', content);
console.log('明细》》》》》》》》》', res.list);
this.detailedList = res.data;
return res;

@ -125,10 +125,10 @@ export const url = {
findProdInfoByDN: '/wmspda/fg/findProdInfoByDN',
yuetaiType: '/wmspda/fg/queryDocksUnderWareHouse',
Bookkeeping: '/wmspda/fg/scanBarcodeDN',
close:'/wmspda/material/outsourcing/close',
close: '/wmspda/material/outsourcing/close',
// Bookkeeping: '/wmspda/fg/confirmMove',
checkScan: '/wmspda/fg/getMaterialByCode',
del:'/wmspda/fg/scanBarcodeDN/del',
del: '/wmspda/fg/scanBarcodeDN/del',
getMaterialByCode: '/wmspda/fg/getMaterialByCode',
queryOrder: '/wmspda/material/outsourcing/into/queryOrder',
submit: '/wmspda/material/outsourcing/into/materialComplete',
@ -137,7 +137,7 @@ export const url = {
getDetailByorderNo: '/wmspda/fg/queryListInfoByDnNo',
scanBarcodeDN: '/wmspda/fg/scanBarcodeDN/del',
queryAmount: '/wmspda/fg/queryAmountByDn',
Posting:'/wmspda/fg/dnPosting',
Posting: '/wmspda/fg/dnPosting',
},
},
inbound: {
@ -166,7 +166,7 @@ export const url = {
save: {
aggregate: '/wmspda/sortscan/save/aggregate',
order: '/wmspda/sortscan/save/order',
queryWlByMat:'/wmspda/sortscan/queryWlByMat',
queryWlByMat: '/wmspda/sortscan/queryWlByMat',
},
unlock: {
list: '/wmspda/sortscan/unlock/list',
@ -200,7 +200,7 @@ export const url = {
commit: '/wmspda/fg/confirmMove',
getMaterialByCode: '/wmspda/fg/getMaterialByCode',
getCode: '/wmspda/fg/getCpMoveBatchNo',
queryGroupLis:'/wmspda/fg/queryGroupListByMoveCode',
queryGroupLis: '/wmspda/fg/queryGroupListByMoveCode',
//查询明细
queryListByMoveCode: '/wmspda/fg/queryListByMoveCode',
close: '/wmspda/fg/closeHandOrder',
@ -224,6 +224,7 @@ export const url = {
wholeTransfer: {
list: '/wmspda/fg/getMdLocation',
content: '/wmspda/fg/getMaterialByCode',
del: '/wmspda/fg/scanBarcodeStock/del',
},
wholeLnventory: {
content: '/wmspda/fg/findMaterialByPddNo',

Loading…
Cancel
Save