增加过账功能

master
hou 3 years ago
parent dd88df3da8
commit 6330086a77

@ -145,7 +145,7 @@ export default class stoOutboundDom extends BasePage {
// onReadyonLoad
async onReady() {
this.$form.setRules(this.rules);
model.queryReturningTypeList();
await model.queryReturningTypeList();
this.form.orderNo = JSON.parse(sessionStorage.getItem('SweepCode'));
sessionStorage.removeItem('SweepCode');
if (this.form.orderNo == null) {
@ -231,94 +231,38 @@ export default class stoOutboundDom extends BasePage {
}
});
}
/**
* 条码回车
*/
//
// onSubmit() {
// this.$form.validate(async (valid: boolean) => {
// // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) {
// // uni.showToast({
// // icon: "none",
// // title: this.$t("message.product_Tip5") as string,
// // });
// // return;
// // }
// if (parseInt(this.form.orderAmount) <= this.form.scanAmount) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.product_Tip6') as string,
// });
// return;
// }
// // let list = [
// // {
// // order3: this.form.orderNo,
// // productCode: this.form.productCode,
// // productDescZh: this.form.productDescZh,
// // barCode: this.form.barCode,
// // dockCode: this.form.dockCode,
// // dockName: this.form.dockName,
// // // orderType: 3,
// // orderType: 4,
// // type: 0,
// // keepBy: session.loginName as string,
// // loginName: session.loginName as string,
// // },
// // ];
// if (valid) {
// let list: any = {
// productCode: this.form.productCode,
// barcode: this.form.barCode,
// loginName: session.loginName,
// factoryCode: session.factoryCode,
// };
// const res = await this.model.getMaterialByCode(list);
// console.log('fanhui', res);
// // if (res.barcode) {
// // // this.materialList.push(res);
// // this.form.scanAmount = res.scanAmount;
// // }
// //guoshuang
// if (this.materialList.length == 0) {
// await this.materialList.push(res);
// this.form.scanAmount += 1;
// this.$table.onCheckAllTap();
// } else {
// let flag = 0;
// for (let i = 0; i < this.materialList.length; i++) {
// console.log('11111', this.materialList[i]);
// if (this.form.barCode == this.materialList[i].barcode) {
// flag = 1;
// break;
// }
// }
// if (flag == 0) {
// await this.$table.onCheckAllTap();
// await this.materialList.push(res);
// this.form.scanAmount += 1;
// this.$table.onCheckAllTap();
// } else {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.product_Tip7') as string,
// });
// }
// }
// }
// });
// const item = {
// ...this.form,
// barCode: String(''),
// };
// this.firstFocus = false;
// setTimeout(() => {
// this.form = item;
// this.firstFocus = true;
// }, 0);
// }
Posting() {
//
async Posting() {
if(!this.form.orderNo){
this.customToast(this.$t('message.Commission_tips1') as string);
return
}
let params = {
nxOutCode:this.form.orderNo,
rowItem:this.form.row,
materialCode:this.form.rowItem,
loginName:session.loginName,
factoryCode:session.factoryCode,
}
await this.model.Posting(params)
if(this.model.PostingCode == '1'){
uni.showToast({ title: this.$t('message.Warehouse_Tip9') as any });
this.empty()
}
}
empty(){
this.form.dockCode = null
this.form.dockName = null
this.form.orderNo = null
this.form.qty = 0
this.form.orderAmount = ''
this.form.productCode = ''
this.form.productDescZh = ''
this.form.scanAmount = 0
this.form.rowItem = ''
this.form.row = ''
this.form.barCode = ''
this.model.empty()
}
onOk() {
this.$form.validate(async (valid: boolean) => {

@ -24,6 +24,7 @@ export class ReturningModule extends VuexModule {
*
*/
returningTypeList: any[] = [];
PostingCode: any = '';
/**
*
*/
@ -35,7 +36,7 @@ export class ReturningModule extends VuexModule {
*
*/
orderInInfo: OrderInInfo = new OrderInInfo();
resCode:any = ''
resCode: any = '';
//记账按钮的code码
code = '';
DNcode: any = '';
@ -102,7 +103,7 @@ export class ReturningModule extends VuexModule {
});
const materielList = result.data.map((item: any) => ({
value: item.materialCode,
rowItem:item.rowItem,
rowItem: item.rowItem,
label: item.rowItem + '(' + item.materialCode + ')',
...item,
}));
@ -115,10 +116,10 @@ export class ReturningModule extends VuexModule {
}
//退扫
@MutationAction
async delCode(params:any = {}){
const res:any = await http.post(url.outbound.stoOutbound.del,params)
const resCode = res.code
return { resCode }
async delCode(params: any = {}) {
const res: any = await http.post(url.outbound.stoOutbound.del, params);
const resCode = res.code;
return { resCode };
}
/**
*
@ -170,9 +171,9 @@ export class ReturningModule extends VuexModule {
*/
@MutationAction
async confirmMove(list: any) {
const res:any = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
const res: any = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
console.log('res数据', res);
const code = res.code
const code = res.code;
// if (code == '1') {
// uni.showToast({ icon: 'success', title: msg });
// } else {
@ -213,6 +214,18 @@ export class ReturningModule extends VuexModule {
console.log('退扫>>>>>>>>>>>>>>>>>>>>>>>>.', res);
return {};
}
//过账
@MutationAction
async Posting(params: any) {
const res: any = await http.post(url.outbound.stoOutbound.Posting, params);
const PostingCode = res.code;
return { PostingCode };
}
@MutationAction
async empty() {
const orderInInfo = {};
return { orderInInfo };
}
}
export default getModule(ReturningModule);

@ -18,7 +18,7 @@
</u-form-item>
<!-- 库位 -->
<u-form-item :label="$t('message.CommissionedLocation')" prop="spQty">
<u-input v-model="productItem.locCode" placeholder=" " :disabled="true" type="number" />
<u-input v-model="productItem.locCode" placeholder=" " :disabled="true" type="text" />
</u-form-item>
<!-- 物料号 -->
<u-form-item :label="$t('message.po_MaterielNo')" prop="productDescZh">
@ -136,6 +136,7 @@ export default class rawMaterialInventory extends BasePage {
async checkRawOrderComplete() {
await model.checkRawOrderComplete(this.pddNo);
if (this.model.code == '1') {
uni.showToast({ title: this.$t('message.Warehouse_Tip9') as any });
this.empty();
this.pddNo = '';
}

@ -136,6 +136,7 @@ export const url = {
getDetailByorderNo: '/wmspda/fg/queryListInfoByDnNo',
scanBarcodeDN: '/wmspda/fg/scanBarcodeDN/del',
queryAmount: '/wmspda/fg/queryAmountByDn',
Posting:'/wmspda/fg/dnPosting',
},
},
inbound: {

Loading…
Cancel
Save