增加过账功能

master
hou 3 years ago
parent dd88df3da8
commit 6330086a77

@ -145,7 +145,7 @@ export default class stoOutboundDom extends BasePage {
// onReadyonLoad // onReadyonLoad
async onReady() { async onReady() {
this.$form.setRules(this.rules); this.$form.setRules(this.rules);
model.queryReturningTypeList(); await model.queryReturningTypeList();
this.form.orderNo = JSON.parse(sessionStorage.getItem('SweepCode')); this.form.orderNo = JSON.parse(sessionStorage.getItem('SweepCode'));
sessionStorage.removeItem('SweepCode'); sessionStorage.removeItem('SweepCode');
if (this.form.orderNo == null) { if (this.form.orderNo == null) {
@ -231,94 +231,38 @@ export default class stoOutboundDom extends BasePage {
} }
}); });
} }
/** //
* 条码回车 async Posting() {
*/ if(!this.form.orderNo){
// this.customToast(this.$t('message.Commission_tips1') as string);
// onSubmit() { return
// this.$form.validate(async (valid: boolean) => { }
// // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) { let params = {
// // uni.showToast({ nxOutCode:this.form.orderNo,
// // icon: "none", rowItem:this.form.row,
// // title: this.$t("message.product_Tip5") as string, materialCode:this.form.rowItem,
// // }); loginName:session.loginName,
// // return; factoryCode:session.factoryCode,
// // } }
// if (parseInt(this.form.orderAmount) <= this.form.scanAmount) { await this.model.Posting(params)
// uni.showToast({ if(this.model.PostingCode == '1'){
// icon: 'none', uni.showToast({ title: this.$t('message.Warehouse_Tip9') as any });
// title: this.$t('message.product_Tip6') as string, this.empty()
// }); }
// return; }
// } empty(){
// // let list = [ this.form.dockCode = null
// // { this.form.dockName = null
// // order3: this.form.orderNo, this.form.orderNo = null
// // productCode: this.form.productCode, this.form.qty = 0
// // productDescZh: this.form.productDescZh, this.form.orderAmount = ''
// // barCode: this.form.barCode, this.form.productCode = ''
// // dockCode: this.form.dockCode, this.form.productDescZh = ''
// // dockName: this.form.dockName, this.form.scanAmount = 0
// // // orderType: 3, this.form.rowItem = ''
// // orderType: 4, this.form.row = ''
// // type: 0, this.form.barCode = ''
// // keepBy: session.loginName as string, this.model.empty()
// // 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() {
} }
onOk() { onOk() {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {

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

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

@ -136,6 +136,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',
}, },
}, },
inbound: { inbound: {

Loading…
Cancel
Save