单号查询

master
zhoulei 4 years ago
parent 48fa2c1f59
commit 1779a0faf8

@ -211,11 +211,13 @@ export default {
CommissionedCumulativeData:'累计数据',
CommissionedLocation:'库位',
CommissionedThisNumber:'本次数量',
CommissionedNumber:'入库数量',
CommissionedEntrantDetails:'入库明细',
// 委外-出库
CommissionGoOut:'委外出库',
CommissionedGoOutDetails:'出库明细',
CommissionedGoOutNumber:'出库数量',
//移库
Warehouse_QueryCriteria: "查询条件",
Warehouse_TransferOrderNo: "移库单号",

@ -85,32 +85,21 @@
<u-col :span="12">
<view class="table-wrapper">
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.po_MaterielNo") }}</u-th>
<u-th class="u-th">{{ $t("message.po_MaterielDes") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.productCode }}</u-td>
<u-td class="u-td">{{ item.productDescZh }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
<!-- <wyb-table
class="table"
ref="table"
width="100%"
enable-check="multiple"
show-left-and-right-border
:headers="headers"
:contents="materialList"
:show-vert-border="false"
@onCheck="onCheck"
></wyb-table> -->
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.po_MaterielNo") }}</u-th>
<u-th class="u-th">{{ $t("message.po_MaterielDes") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.productCode }}</u-td>
<u-td class="u-td">{{ item.productDescZh }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view>
</u-col>
</u-form>

@ -1,20 +1,29 @@
/*
* @Author: zhou lei
* @Date: 2021-11-11 11:09:57
* @LastEditTime: 2021-11-22 10:06:58
* @LastEditors: zhou lei
* @Description:
* @FilePath: /wms_haiwai_app/src/pages/raw/commission/goOut/config.ts
* :910592680@qq.com 18669792120
*/
/**
*
*/
import vm from '@/main';
export const headers = [
{
label: vm.$t('message.product_barCode'),
key: 'barcode',
label: vm.$t('message.CommissionedLocation'),
key: 'locationCode',
width: 300,
},
{
label: vm.$t('message.product_FGCode'),
key: 'materialCode',
label: vm.$t('message.CommissionedGoOutNumber'),
key: 'scanAmount',
width: 300,
},
{
label: vm.$t('message.product_FGDes'),
label: vm.$t('message.operation'),
key: 'materialDesc',
width: 300,
},

@ -13,7 +13,7 @@
<u-search
:placeholder="$t('message.po_PleaseInput')"
v-model="form.poNo"
@search="model.queryOrder"
@search="queryOrder"
:show-action="false"
></u-search>
</u-form-item>
@ -91,22 +91,27 @@
<u-row>
<u-col :span="8"></u-col>
<u-col :span="4">
<u-button :style="{margin:'24rpx 0'}" type="primary">{{$t('message.product_add')}}</u-button>
<u-button :style="{margin:'24rpx 0'}" type="primary" size="medium" class="confirm" @click="confirm">{{$t('message.product_add')}}</u-button>
</u-col>
</u-row>
<u-col :span="12">
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="multiple"
show-left-and-right-border
:headers="headers"
:contents="materialList"
:show-vert-border="false"
@onCheck="onCheck"
></wyb-table>
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.CommissionedLocation") }}</u-th>
<u-th class="u-th">{{ $t("message.CommissionedGoOutNumber") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.locationCode }}</u-td>
<u-td class="u-td">{{ item.scanAmount }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view>
</u-col>
</u-form>
@ -120,7 +125,7 @@
</u-button>
</u-col>
<u-col :span="4">
<u-button type="primary" @click="resetHandle">{{ $t('message.product_Upload') }}</u-button>
<u-button type="primary" @click="onSubmit">{{ $t('message.product_Upload') }}</u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="onOk">{{ $t('message.po_Return') }}</u-button>
@ -151,6 +156,7 @@ export default class stoOutboundDom extends BasePage {
*/
@Ref('table') readonly $table: any;
LocationList: any = [];
/**
* 页面Module
*/
@ -232,6 +238,14 @@ export default class stoOutboundDom extends BasePage {
uni.navigateBack({ delta: 1 });
this.$table.onEmpty();
}
//
async queryOrder(poNo:string){
const {orderInInfo} = await model.queryOrder(poNo)
Object.assign(this.form,{
...orderInInfo
})
}
materialConfirm(v: any) {
console.log('v[0].value', v[0]);
// this.form.productCode = v[0].value;
@ -271,63 +285,76 @@ export default class stoOutboundDom extends BasePage {
}
});
}
confirm() {
// if (this.wlCode == "" || this.number == "") {
// uni.showToast({
// icon: "none",
// title: "",
// });
// return;
// }
console.log('123')
this.LocationList.push(this.form)
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
}
/**
* 条码回车
* 提交
*/
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) <= parseInt(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,
type: 0,
keepBy: session.loginName as string,
loginName: session.loginName as string,
},
];
// 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) <= parseInt(this.form.scanAmount)) {
// uni.showToast({ icon: 'none', title: this.$t('message.product_Tip6') as string });
// return;
// }
const list = this.LocationList.map( (item:any) =>({
wlCode:item.locationCode,
nowAmount:item.scanAmount,
}))
if (valid) {
const res = await this.model.tluSubmit(list);
const res = await this.model.materialComplete({
poNo:this.form.poNo,
materialCode:this.form.materialCode,
list
});
console.log('fanhui ', res);
// if (res.barcode) {
// // this.materialList.push(res);
// this.form.scanAmount = res.scanAmount;
// }
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 });
}
}
// 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 = {

@ -70,6 +70,19 @@ export class ReturningModule extends VuexModule {
return { locationCodeList };
}
/**
*
*/
@Action
async materialComplete(form:any) {
const res = await http.post(url.material.commission.goOut.materialComplete, {
factoryCode: session.factoryCode,
loginName: session.loginName,
...form
});
console.log(res,'>>>>>res')
}
/**
*
*/

Loading…
Cancel
Save