update:成品退扫

master
hou 4 years ago
parent f3e6f7c038
commit 4dfc17b04d

@ -68,14 +68,14 @@
<script lang="ts"> <script lang="ts">
import { Component, Ref } from 'vue-property-decorator'; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page'; import { BasePage } from '@/components/base/page';
import { VForm, VFormRules } from 'vue/types/form'; import { VForm } from 'vue/types/form';
import model from './model'; import model from './model';
import jPicker from '@/components/J-Picker/jPicker.vue'; import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from '@/store/modules/session'; import { session } from '@/store/modules/session';
interface OptionType { // interface OptionType {
label: string; // label: string;
value: string; // value: string;
} // }
@Component({ @Component({
components: { components: {
jPicker, jPicker,
@ -155,6 +155,7 @@ export default class ProductCheckReceipt extends BasePage {
barcode: this.form.barcode, barcode: this.form.barcode,
productCode: this.wl.value, productCode: this.wl.value,
locCode: this.Some.originWl, locCode: this.Some.originWl,
order1: this.form.order3,
}; };
await this.model.getProductCode(params); await this.model.getProductCode(params);
if (this.model.code == '1') { if (this.model.code == '1') {
@ -166,6 +167,32 @@ export default class ProductCheckReceipt extends BasePage {
//this.Some.actualQty += 1; //this.Some.actualQty += 1;
this.onSubmit(); 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() { async onSubmit() {
@ -211,7 +238,7 @@ export default class ProductCheckReceipt extends BasePage {
success: (res: any) => { success: (res: any) => {
if (res.confirm) { if (res.confirm) {
//debugger; //debugger;
console.log("////111111"); console.log('////111111');
this.model.close(this.form.order3); this.model.close(this.form.order3);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ uni.showToast({
@ -335,8 +362,5 @@ export default class ProductCheckReceipt extends BasePage {
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx; padding: 20rpx;
} }
.button-bar {
}
} }
</style> </style>

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

@ -79,7 +79,7 @@
import { Component, Ref } from 'vue-property-decorator'; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page'; import { BasePage } from '@/components/base/page';
import jPicker from '@/components/J-Picker/jPicker.vue'; 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 model from './model';
import { session } from '@/store/modules/session'; import { session } from '@/store/modules/session';
@ -135,6 +135,7 @@ export default class productCheckReceipt extends BasePage {
barcode: this.form.barcode, barcode: this.form.barcode,
productCode: this.wl.value, productCode: this.wl.value,
locCode: this.Some.originWl, locCode: this.Some.originWl,
order1: this.form.order3,
}; };
await this.model.getProductCode(params); await this.model.getProductCode(params);
if (this.model.code == '1') { if (this.model.code == '1') {
@ -146,6 +147,32 @@ export default class productCheckReceipt extends BasePage {
// this.Some.actualQty += 1; // this.Some.actualQty += 1;
this.onSubmit(); 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 // onReadyonLoad
onReady() { onReady() {

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

@ -126,13 +126,49 @@ export default class productCheckReceipt extends BasePage {
this.customToast(this.$t('message.product_unit7') as string); this.customToast(this.$t('message.product_unit7') as string);
return; return;
} }
await model.getProductCode(this.form.productCode); if (this.userDefined4 == '' || this.userDefined4.length == 0) {
if (model.code == '1') { 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({ uni.showToast({
icon: 'success', icon: 'success',
title: this.$t('message.successful') as string, 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() { async QueryHistory() {

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

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

Loading…
Cancel
Save