单号查询

master
zhoulei 4 years ago
parent 48fa2c1f59
commit 1779a0faf8

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

@ -85,32 +85,21 @@
<u-col :span="12"> <u-col :span="12">
<view class="table-wrapper"> <view class="table-wrapper">
<u-table class="library-table"> <u-table class="library-table">
<u-tr class="u-tr"> <u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.po_MaterielNo") }}</u-th> <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.po_MaterielDes") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th> <u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr> </u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index"> <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.productCode }}</u-td>
<u-td class="u-td">{{ item.productDescZh }}</u-td> <u-td class="u-td">{{ item.productDescZh }}</u-td>
<u-td class="u-td"> <u-td class="u-td">
<div class="u-td" @click="deleteItem(index)"> <div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }} {{ $t("message.product_Delete") }}
</div> </div>
</u-td> </u-td>
</u-tr> </u-tr>
</u-table> </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> -->
</view> </view>
</u-col> </u-col>
</u-form> </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'; import vm from '@/main';
export const headers = [ export const headers = [
{ {
label: vm.$t('message.product_barCode'), label: vm.$t('message.CommissionedLocation'),
key: 'barcode', key: 'locationCode',
width: 300, width: 300,
}, },
{ {
label: vm.$t('message.product_FGCode'), label: vm.$t('message.CommissionedGoOutNumber'),
key: 'materialCode', key: 'scanAmount',
width: 300, width: 300,
}, },
{ {
label: vm.$t('message.product_FGDes'), label: vm.$t('message.operation'),
key: 'materialDesc', key: 'materialDesc',
width: 300, width: 300,
}, },

@ -13,7 +13,7 @@
<u-search <u-search
:placeholder="$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
v-model="form.poNo" v-model="form.poNo"
@search="model.queryOrder" @search="queryOrder"
:show-action="false" :show-action="false"
></u-search> ></u-search>
</u-form-item> </u-form-item>
@ -91,22 +91,27 @@
<u-row> <u-row>
<u-col :span="8"></u-col> <u-col :span="8"></u-col>
<u-col :span="4"> <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-col>
</u-row> </u-row>
<u-col :span="12"> <u-col :span="12">
<view class="table-wrapper"> <view class="table-wrapper">
<wyb-table <u-table class="library-table">
class="table" <u-tr class="u-tr">
ref="table" <u-th class="u-th">{{ $t("message.CommissionedLocation") }}</u-th>
width="100%" <u-th class="u-th">{{ $t("message.CommissionedGoOutNumber") }}</u-th>
enable-check="multiple" <u-th class="u-th">{{ $t("message.operation") }}</u-th>
show-left-and-right-border </u-tr>
:headers="headers" <u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
:contents="materialList" <u-td class="u-td">{{ item.locationCode }}</u-td>
:show-vert-border="false" <u-td class="u-td">{{ item.scanAmount }}</u-td>
@onCheck="onCheck" <u-td class="u-td">
></wyb-table> <div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view> </view>
</u-col> </u-col>
</u-form> </u-form>
@ -120,7 +125,7 @@
</u-button> </u-button>
</u-col> </u-col>
<u-col :span="4"> <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>
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="onOk">{{ $t('message.po_Return') }}</u-button> <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; @Ref('table') readonly $table: any;
LocationList: any = [];
/** /**
* 页面Module * 页面Module
*/ */
@ -232,6 +238,14 @@ export default class stoOutboundDom extends BasePage {
uni.navigateBack({ delta: 1 }); uni.navigateBack({ delta: 1 });
this.$table.onEmpty(); this.$table.onEmpty();
} }
//
async queryOrder(poNo:string){
const {orderInInfo} = await model.queryOrder(poNo)
Object.assign(this.form,{
...orderInInfo
})
}
materialConfirm(v: any) { materialConfirm(v: any) {
console.log('v[0].value', v[0]); console.log('v[0].value', v[0]);
// this.form.productCode = v[0].value; // 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() { onSubmit() {
this.$form.validate(async (valid: boolean) => { this.$form.validate(async (valid: boolean) => {
if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) { // 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 }); // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip5') as string });
return; // return;
} // }
if (parseInt(this.form.orderAmount) <= parseInt(this.form.scanAmount)) { // if (parseInt(this.form.orderAmount) <= parseInt(this.form.scanAmount)) {
uni.showToast({ icon: 'none', title: this.$t('message.product_Tip6') as string }); // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip6') as string });
return; // return;
} // }
let list = [ const list = this.LocationList.map( (item:any) =>({
{ wlCode:item.locationCode,
order3: this.form.orderNo, nowAmount:item.scanAmount,
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 (valid) { 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); console.log('fanhui ', res);
// if (res.barcode) { // if (res.barcode) {
// // this.materialList.push(res); // // this.materialList.push(res);
// this.form.scanAmount = res.scanAmount; // this.form.scanAmount = res.scanAmount;
// } // }
if (this.materialList.length == 0) { // if (this.materialList.length == 0) {
await this.materialList.push(res); // await this.materialList.push(res);
this.form.scanAmount += 1; // this.form.scanAmount += 1;
this.$table.onCheckAllTap(); // this.$table.onCheckAllTap();
} else { // } else {
let flag = 0; // let flag = 0;
for (let i = 0; i < this.materialList.length; i++) { // for (let i = 0; i < this.materialList.length; i++) {
console.log('11111', this.materialList[i]); // console.log('11111', this.materialList[i]);
if (this.form.barCode == this.materialList[i].barcode) { // if (this.form.barCode == this.materialList[i].barcode) {
flag = 1; // flag = 1;
break; // break;
} // }
} // }
if (flag == 0) { // if (flag == 0) {
await this.$table.onCheckAllTap(); // await this.$table.onCheckAllTap();
await this.materialList.push(res); // await this.materialList.push(res);
this.form.scanAmount += 1; // this.form.scanAmount += 1;
this.$table.onCheckAllTap(); // this.$table.onCheckAllTap();
} else { // } else {
uni.showToast({ icon: 'none', title: this.$t('message.product_Tip7') as string }); // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip7') as string });
} // }
} // }
} }
}); });
const item = { const item = {

@ -70,6 +70,19 @@ export class ReturningModule extends VuexModule {
return { locationCodeList }; 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