采购收获srm,成品生成记录修改

master
guoshuang 1 year ago
parent ff35ab8a1b
commit dded0d0600

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version);
}
///******************
version = '0.0.86'; //
version = '0.0.87'; //
//version = '0.0.5'; //
//*************** false true ****************
//isTest = true;

@ -8,16 +8,6 @@
<view class="right"></view>
</view>
<u-form class="form" ref="form" label-width="180rpx">
<!-- 送货单 -->
<view class="single">
<view class="single-left">
<view>送货单号:</view>
<u-search placeholder="请扫描" v-model="userDefined5" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="tidandelivery"></u-button>
</view>
</view>
<!-- 单号 -->
<view class="single">
<view class="single-left">
@ -50,10 +40,6 @@
<view class="list-item"> 采购单号: </view>
<view> {{ item.procureCode }} </view>
</view>
<view v-if="item.userDefined5" class="row-list">
<view class="list-item"> 送货单号: </view>
<view> {{ item.userDefined5 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 行项目: </view>
<view> {{ item.userDefined3 }} </view>
@ -94,10 +80,6 @@
<view class="list-item"> 采购单号: </view>
<view> {{ item.procureCode }} </view>
</view>
<view v-if="item.userDefined5" class="row-list">
<view class="list-item"> 送货单号: </view>
<view> {{ item.userDefined5 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 行项目: </view>
<view> {{ item.userDefined3 }} </view>
@ -141,8 +123,9 @@
<u-popup v-model="show" mode="center" width="580rpx" height="580rpx">
<view class="form3">
<view class="poupitem">
<view class="pouptitle">批次号</view>
<u-input class="poupcontent" :clearable="false" v-model="form3.incomeBatchNo" placeholder="" style="overflow: hidden" />
<view class="pouptitle">标识码</view>
<u-search placeholder="请扫描" v-model="form3.userDefined6" :show-action="false"></u-search>
<!-- <u-input class="poupcontent" :clearable="false" v-model="form3.incomeBatchNo" placeholder="" style="overflow: hidden" /> -->
</view>
<view class="poupitem">
<view class="pouptitle">数量</view>
@ -290,7 +273,6 @@ export default class receivePO extends BasePage {
// this.remove = e.pickerName;
// }
procureCode: any = '';
userDefined5: any = '';
materialCode: any = '';
border = true;
height = 100;
@ -344,13 +326,13 @@ export default class receivePO extends BasePage {
//
async onOk() {
console.log(this.form3);
if (this.form3.incomeBatchNo == '' || this.form3.incomeBatchNo == undefined) {
(this.$refs.uToast as any).show({
title: '批次号不能为空',
type: 'default',
});
return;
}
// if (this.form3.userDefined6 == '' || this.form3.userDefined6 == undefined) {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'default',
// });
// return;
// }
if (this.form3.planNumber == '' || this.form3.planNumber == undefined) {
(this.$refs.uToast as any).show({
title: '数量不能为空',
@ -391,7 +373,7 @@ export default class receivePO extends BasePage {
query.planNumber = this.form3.planNumber;
query.whCode = this.productCodeTypeList.warehouseCode;
query.factoryCode = session.FactoryCode;
query.incomeBatchNo = this.form3.incomeBatchNo;
query.userDefined6 = this.form3.userDefined6;
query.receiptNoCode = this.receiptNoCode;
query.poLine = this.clickitem.userDefined3;
await this.model.PurchaseOrderdeliPda(query);
@ -435,7 +417,6 @@ export default class receivePO extends BasePage {
let query = {
procureCode: this.procureCode,
materialCode: this.aimWl.value ? this.aimWl.value : '',
userDefined5: this.userDefined5,
//this.materialCode,
factoryCode: session.FactoryCode,
};
@ -514,35 +495,11 @@ export default class receivePO extends BasePage {
this.query();
}
}
//
async tidandelivery() {
if (this.userDefined5 == '' || this.userDefined5.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入送货单',
type: 'default',
});
return;
}
let item = {
userDefined5: this.userDefined5,
factoryCode: session.FactoryCode,
createBy: session.loginName,
};
await this.model.getDeliveryNoteDetail(item);
if (model.deliverycode == '200') {
(this.$refs.uToast as any).show({
title: '提单成功',
type: 'success',
});
this.query();
}
}
//
async ProcureOrderAlready() {
let item = {
procureCode: this.procureCode,
factoryCode: session.FactoryCode,
userDefined5: this.userDefined5,
};
await this.model.selectOdsProcureOrderAlready(item);
if (model.Alreadycode == '200') {

@ -9,30 +9,30 @@
</view>
<view class="scroll">
<view v-for="item in list" :key="item.id">
<view v-for="item in orderNoItemListdes" :key="item.id">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="row-list">
<view class="list-item"> 物资编码: </view>
<view> 4500331750 </view>
<view>{{ item.materialCode }} </view>
</view>
<view class="row-list">
<view class="list-item"> 资名称: </view>
<view> 40000006954 </view>
<view class="list-item"> 料描述: </view>
<view> {{ item.materialDesc }} </view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 收货数量: </view>
<view> 100 </view>
<view class="list-item">数量: </view>
<view> {{ item.amount }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 单位: </view>
<view> </view>
<view>{{ item.userDefined4 }} </view>
</view>
</view>
<view class="row-list">
<view class="list-item"> 托盘号: </view>
<view> 1000/0(PC) </view>
<view>{{ item.sn }} </view>
</view>
</view>
</u-form>
@ -51,7 +51,7 @@ import model from './model';
jPicker,
},
})
export default class receivesrm extends BasePage {
export default class receiveSRM extends BasePage {
model = model;
list: any = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];
form3: any = {};
@ -79,18 +79,29 @@ export default class receivesrm extends BasePage {
value: '0',
},
];
detailsinfo: any = '';
orderNoItemListdes: any = '';
productCodeList: any = {};
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
this.customToast('请输入nficl');
return;
}
await this.model.queryOrderNo(this.orderNo);
this.productCodeList = this.model.productCodeList[0];
this.histroyItem = this.model.orderNoItemList[0];
}
histroyItem: any = {};
async onLoad(options) {
let str = decodeURIComponent(options.listitem);
if (str) {
this.detailsinfo = JSON.parse(str);
let query = {
id: this.detailsinfo.id,
factoryCode: this.session.FactoryCode,
};
await this.model.PurchaseOrderdetailPda(query);
this.orderNoItemListdes = this.model.orderNoItemListdes;
}
}
selectProductCode(e: any) {
this.model.orderNoItemList.forEach((item: any) => {
if (item.productCode == e.pickerName.value) {
this.histroyItem = item;
}
});
}
barcode: any = '';
}
</script>

@ -8,55 +8,61 @@
<view class="right"></view>
</view>
<u-form class="form" ref="form" label-width="180rpx">
<!-- -->
<!-- 送货-->
<view class="single">
<view class="single-left">
<view>送货单号:</view>
<u-search placeholder="请扫描" v-model="orderNo" @search="query" :show-action="false"></u-search>
<u-search placeholder="请扫描" v-model="userDefined5" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="tidan"></u-button>
<u-button type="primary" @click="tidandelivery"></u-button>
</view>
</view>
<u-form-item label="采购单">
<!-- <u-input :border="true" v-model="materialCode" placeholder="" @confirm="query" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" @bindpicker="bookprodeChange" showKey="procureCode" valKey="procureCode" :val="prodobj.procureCode" :options="prodlist" />
</u-form-item>
<!-- 订单 -->
<u-form-item label="物料编码">
<u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" />
</u-form-item>
<!-- 机台 -->
<u-form-item>
<view class="row">
<view>收货仓库</view>
<view>0001-小榄物料仓</view>
</view>
<view class="row">
<view>工厂</view>
<view>1000</view>
</view>
<u-form-item label="物料描述">
<!-- <u-input :border="true" v-model="materialCode" placeholder="" @confirm="query" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" :showCode="true" @bindpicker="bookTypeChange" duoyukey="procureCode" showKey="label" valKey="value" :val="aimWl.value" :options="materilist" />
</u-form-item>
<view class="creatshow">
<u-button class="buttonshow" type="primary" @click="generate"></u-button>
<u-input border placeholder="" class="inputshow" disabled v-model="receiptNoCode" />
</view>
</u-form>
<view class="scroll">
<view class="matshow">
<view v-for="item in list" :key="item.id" @dblclick="onFormDoubleClick(item)">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="righttitle">
<view class="boder-icon-top zhuangtai" data-state="0">待收货</view>
<!-- 0是未收货1是正在收货2是收货完成 -->
<view class="boder-icon-top zhuangtai" data-state="0">{{ item.orderStatus == 0 ? '未收货' : item.orderStatus == 1 ? '正在收货' : '收货完成' }}</view>
</view>
<view v-if="item.userDefined5" class="row-list">
<view class="list-item"> 送货单号: </view>
<view> {{ item.userDefined5 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 采购单号: </view>
<view> 4500331750 </view>
<view class="list-item"> 行项目: </view>
<view> {{ item.userDefined3 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 物料编码: </view>
<view> 40000006954 </view>
<view> {{ item.handlematerialCode }}</view>
</view>
<view class="row-list">
<view class="list-item"> 物料名称: </view>
<view> 纸箱 </view>
<view class="list-item"> 物料描述: </view>
<view>{{ item.materialDesc }}</view>
</view>
<view class="row-list">
<view class="list-item"> 工厂号: </view>
<view>{{ item.siteCode }}</view>
</view>
<view class="row-list">
<view class="list-item"> 应收/已收: </view>
<view> 1000/0(PC) </view>
<view>{{ item.planNumber }}/{{ item.realityNumber }}</view>
</view>
<view a:if="true" class="righttitle">
<view @click.stop="onPass(item)" class="boder-icon-rigth"> 收货 </view>
@ -65,49 +71,129 @@
</u-form>
</view>
</view>
<view class="scroll">
<view v-for="item in receivedlist" :key="item.id" @dblclick="onFormDoubleClick(item)">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="righttitle">
<!-- 0是未收货1是正在收货2是收货完成 -->
<view class="boder-icon-top zhuangtai" data-state="0">已收货</view>
</view>
<view v-if="item.userDefined5" class="row-list">
<view class="list-item"> 送货单号: </view>
<view> {{ item.userDefined5 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 行项目: </view>
<view> {{ item.userDefined3 }} </view>
</view>
<view class="row-list">
<view class="list-item"> 物料编码: </view>
<view> {{ item.materialCode }}</view>
</view>
<view class="row-list">
<view class="list-item"> 物料描述: </view>
<view>{{ item.materialDesc }}</view>
</view>
<view class="row-list">
<view class="list-item"> 工厂号: </view>
<view>{{ item.siteCode }}</view>
</view>
<view class="row-list">
<view class="list-item"> 应收/已收: </view>
<view>{{ item.planNumber }}/{{ item.realityNumber }}</view>
</view>
<!-- <view a:if="true" class="righttitle">
<view @click.stop="onPass(item)" class="boder-icon-rigth"> 收货 </view>
</view> -->
</view>
</u-form>
</view>
</view>
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="error" @click="SignIn"></u-button>
</u-col>
<!-- 确定 -->
<u-col :span="6">
<u-button @click="onSubmit" type="primary">确定</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})"></u-button>
</u-col>
</u-row>
</view>
<view>
<u-popup v-model="show" mode="center" width="550rpx" height="450rpx">
<u-popup v-model="show" mode="center" width="580rpx" height="580rpx">
<view class="form3">
<view class="poupitem">
<view class="pouptitle">批次号</view>
<u-input class="poupcontent" :clearable="false" v-model="form3.productDescZh" placeholder="" style="overflow: hidden" />
<view class="pouptitle">标识码</view>
<u-search placeholder="请扫描" v-model="form3.userDefined6" :show-action="false"></u-search>
</view>
<view class="poupitem">
<view class="pouptitle">数量</view>
<u-input class="poupcontent" :clearable="false" v-model="form3.productDescZh" placeholder="" style="overflow: hidden" />
<u-input class="poupcontent" :clearable="false" v-model="form3.planNumber" placeholder="" style="overflow: hidden" />
</view>
<view class="poupitem">
<view class="pouptitle">托盘号</view>
<u-input class="poupcontent" :clearable="false" v-model="form3.productDescZh" placeholder="" style="overflow: hidden" />
<view class="pouptitle">收货方式</view>
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChangeway" showKey="lable" valKey="value" :val="bimWl.value" :options="waylist" />
<!-- <u-select mode="single-column" :list="waylist" @confirm="bookTypeChangeway"></u-select> -->
</view>
<view v-show="showshow">
<view v-show="!selectway" class="poupitem">
<view class="pouptitle">物料号</view>
<u-input disabled class="poupcontent" :clearable="false" v-model="aimWl.value" placeholder="" style="overflow: hidden" />
</view>
<view v-show="selectway" class="poupitem">
<view class="pouptitle">托盘号</view>
<u-input class="poupcontent" :clearable="false" v-model="form3.sn" placeholder="" style="overflow: hidden" />
</view>
</view>
<view class="poupitem">
<view class="pouptitle">收货仓库</view>
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductlocCode" showKey="label" valKey="value" :val="productCodeTypeList.value" :options="whList" />
</view>
</view>
<view class="poupbutton">
<u-row>
<!-- 确定 -->
<u-col :span="6">
<u-button @click="onOk" size="mini" type="primary">确定</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button size="mini" type="error" @click="nopoup"></u-button>
</u-col>
</u-row>
<view class="poupbutton" style="margin-top: 10px">
<div>
<u-button style="width: 100px; height: 35px" @click="onOk" size="mini" type="primary">确定</u-button>
</div>
<div>
<u-button style="width: 100px; height: 35px" size="mini" type="error" @click="nopoup"></u-button>
</div>
</view>
</u-popup>
<view v-if="show" class="mask"></view>
</view>
<u-toast ref="uToast" />
<view>
<u-popup v-model="singshow" mode="center" width="580rpx" height="500rpx">
<view class="form4">
<view class="poupitem">
<view class="pouptitle">已登记数量</view>
<u-input disabled class="poupcontent" :clearable="false" v-model="operationNumber" placeholder="" style="overflow: hidden; background-color: #ddd" />
</view>
<view class="poupitem">
<view class="pouptitle">未登记数量</view>
<u-input disabled class="poupcontent" :clearable="false" v-model="nooperationNumber" placeholder="" style="overflow: hidden; background-color: #ddd" />
</view>
<view class="poupitem">
<view class="pouptitle">登记数量</view>
<u-input class="poupcontent" :clearable="false" v-model="czNumber" placeholder="" style="overflow: hidden" />
</view>
<view class="poupbutton" style="margin-top: 10px">
<div>
<u-button style="width: 100px; height: 35px" @click="onOksing" size="mini" type="primary">确定</u-button>
</div>
<div>
<u-button style="width: 100px; height: 35px" size="mini" type="error" @click="nopoupsing"></u-button>
</div>
</view>
</view>
</u-popup>
<view v-if="singshow" class="mask"></view>
</view>
</view>
</template>
<script lang="ts">
@ -115,17 +201,74 @@ import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import jPicker from '@/components/J-Picker/jPicker.vue';
import model from './model';
//import { session } from '@/store/modules/session';
import { session } from '@/store/modules/session';
import dayjs from 'dayjs';
interface OptionType {
label: string;
value: string;
}
@Component({
components: {
jPicker,
},
})
export default class receivesrm extends BasePage {
export default class receiveSRM extends BasePage {
model = model;
list: any = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];
list: any = [];
receivedlist: any = [];
operationNumber = 0;
nooperationNumber = 0;
czNumber = '';
// receivedlist=[{
// orderStatus:'1',
// procureCode:'111',
// materialCode:'ddewcc',
// materialDesc:'ewdcxw',
// siteCode:'1061',
// planNumber:'1',
// realityNumber:'1'
// },{
// orderStatus:'1',
// procureCode:'111',
// materialCode:'ddewcc',
// materialDesc:'ewdcxw',
// siteCode:'1061',
// planNumber:'1',
// realityNumber:'1'
// },
// {
// orderStatus:'1',
// procureCode:'111',
// materialCode:'ddewcc',
// materialDesc:'ewdcxw',
// siteCode:'1061',
// planNumber:'1',
// realityNumber:'1'
// }
// ]
whList: any = [];
show = false;
singshow = false;
form3: any = {};
aimWl = {} as OptionType;
prodobj: any = {} as OptionType;
materilist = [];
prodlist: any = [];
productCodeTypeList: any = {};
moren = '选择仓库';
waylist = [
{
value: '0',
lable: '根据物料',
},
{
value: '1',
lable: '根据托盘',
},
];
bimWl = {} as OptionType;
selectway: boolean = null;
showshow = false;
// remove: any = {};
// async onReady() {
// await this.model.queryLocation();
@ -134,7 +277,9 @@ export default class receivesrm extends BasePage {
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
orderNo: any = '';
procureCode: any = '';
userDefined5: any = '';
materialCode: any = '';
border = true;
height = 100;
autoHeight = true;
@ -150,77 +295,383 @@ export default class receivesrm extends BasePage {
value: '0',
},
];
clickitem: any = '';
productCodeList: any = {};
receiptNoCode = '';
async onReady() {
await this.model.Stashlist();
this.whList = model.DictTypeList;
//this.remove = this.model.WlList[0];
}
//
generate() {
const today = dayjs().format('YYYYMMDDHHmmss');
this.receiptNoCode = `sn${today}`;
}
//
onPass(item) {
console.log('1234567', item);
this.clickitem = item;
this.show = true;
this.form3 = {};
this.productCodeTypeList = {};
this.showshow = false;
this.bimWl = {} as OptionType;
this.selectway = null;
}
nopoup() {
this.show = false;
this.form3 = {};
this.productCodeTypeList = {};
}
nopoupsing() {
this.singshow = false;
this.operationNumber = 0;
this.nooperationNumber = 0;
this.czNumber = '';
}
//
onOk() {
async onOk() {
console.log(this.form3);
// if (this.form3.incomeBatchNo == '' || this.form3.incomeBatchNo == undefined) {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'default',
// });
// return;
// }
if (this.form3.planNumber == '' || this.form3.planNumber == undefined) {
(this.$refs.uToast as any).show({
title: '数量不能为空',
type: 'default',
});
return;
}
if (this.form3.sn == '' && this.selectway == true) {
(this.$refs.uToast as any).show({
title: '托盘号不能为空',
type: 'default',
});
return;
}
if (this.productCodeTypeList.value == '' || this.productCodeTypeList.value == undefined) {
(this.$refs.uToast as any).show({
title: '请选择仓库',
type: 'default',
});
return;
}
if (this.receiptNoCode == '' || this.receiptNoCode == undefined) {
(this.$refs.uToast as any).show({
title: '请先生成收货单号',
type: 'default',
});
return;
}
console.log('1234567');
let query = this.clickitem;
// query.applyList = this.Sparepartlist;
query.workStatus = this.form3.workStatus;
if (this.selectway == true) {
query.sn = this.form3.sn;
} else {
query.sn = dayjs().format('YYYYMMDDHHmmss');
}
query.planNumber = this.form3.planNumber;
query.whCode = this.productCodeTypeList.warehouseCode;
query.factoryCode = session.FactoryCode;
query.userDefined6 = this.form3.userDefined6;
query.receiptNoCode = this.receiptNoCode;
query.poLine = this.clickitem.userDefined3;
await this.model.PurchaseOrderdeliPda(query);
console.log(this.model.SubmitCode);
if (this.model.SubmitCode.code == 200) {
(this.$refs.uToast as any).show({
title: '成功',
type: 'default',
});
this.show = false;
this.query();
// this.ProcureOrderAlready();
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: this.model.SubmitCode.msg,
});
}
}
async onFormDoubleClick(item) {
console.log('双击', item);
//await this.model.OnSubmit(item.id);
// uni.navigateTo({
// url: `/pages/equipment/Upkeep/repairing?listitem=` + encodeURIComponent(JSON.stringify(item)),
// });
this.uni.navigateTo({
url: this.page.wms.ReceiveSRMDetail,
url: this.page.wms.ReceivePODetail + '?listitem=' + encodeURIComponent(JSON.stringify(item)),
});
}
//
async query() {
// if (this.orderNo == '' || this.orderNo.length == 0) {
// this.customToast('nficl');
console.log(session);
if (this.userDefined5 == '' || this.userDefined5.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入送货单',
type: 'default',
});
return;
}
this.prodobj = {} as OptionType;
this.aimWl = {} as OptionType;
let query = {
materialCode: this.aimWl.value ? this.aimWl.value : '',
userDefined5: this.userDefined5,
//this.materialCode,
factoryCode: session.FactoryCode,
};
await this.model.PurchaseOrderPda(query);
let prodlist = model.orderNoItemList;
this.prodlist = prodlist.map((item) => {
let newmaterialCode = item.materialCode.slice(item.materialCode.search(/[1-9]/));
return {
...item,
handlematerialCode: newmaterialCode,
};
});
//this.list = [];
if (this.prodlist.length) {
this.prodobj = this.prodlist[0];
//this.list.push(this.materilist[0]);
this.procureCode = this.prodobj.procureCode;
} else {
this.prodobj = {} as OptionType;
}
this.querybyprod();
//this.ProcureOrderAlready();
//this.list = model.orderNoItemList;
}
async querybyprod() {
console.log(session);
// if (this.procureCode == '' || this.procureCode.length == 0) {
// (this.$refs.uToast as any).show({
// title: 'rfid',
// type: 'default',
// });
// return;
// }
// await this.model.queryOrderNo(this.orderNo);
// this.list = model.orderNoItemList;
this.aimWl = {} as OptionType;
let query = {
materialCode: this.aimWl.value ? this.aimWl.value : '',
//userDefined5: this.userDefined5,
procureCode: this.prodobj.procureCode,
//this.materialCode,
factoryCode: session.FactoryCode,
};
await this.model.PurchaseOrderPda(query);
let materilist = model.orderNoItemList;
this.materilist = materilist.map((item) => {
let newmaterialCode = item.materialCode.slice(item.materialCode.search(/[1-9]/));
return {
...item,
handlematerialCode: newmaterialCode,
};
});
this.list = [];
if (this.prodlist.length) {
this.aimWl = this.materilist[0];
this.list.push(this.materilist[0]);
this.procureCode = this.list[0].procureCode;
} else {
this.prodobj = {} as OptionType;
}
this.ProcureOrderAlready();
//this.list = model.orderNoItemList;
}
//
tidan() {
console.log('11111');
// async querydelivery() {
// console.log(session);
// if (this.userDefined5 == '' || this.userDefined5.length == 0) {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'default',
// });
// return;
// }
// this.aimWl = {} as OptionType;
// let query = {
// userDefined5: this.userDefined5,
// procureCode: this.procureCode,
// materialCode: this.aimWl.value ? this.aimWl.value : '',
// //this.materialCode,
// factoryCode: session.FactoryCode,
// };
// await this.model.PurchaseOrderPda(query);
// let materilist = model.orderNoItemList;
// this.materilist = materilist.map((item) => {
// let newmaterialCode = item.materialCode.slice(item.materialCode.search(/[1-9]/));
// return {
// ...item,
// handlematerialCode: newmaterialCode,
// };
// });
// this.list = [];
// if (this.materilist.length) {
// this.aimWl = this.materilist[0];
// this.list.push(this.materilist[0]);
// } else {
// this.aimWl = {} as OptionType;
// }
// this.ProcureOrderAlready();
// //this.list = model.orderNoItemList;
// }
//
async tidandelivery() {
if (this.userDefined5 == '' || this.userDefined5.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入送货单',
type: 'default',
});
return;
}
let item = {
userDefined5: this.userDefined5,
factoryCode: session.FactoryCode,
createBy: session.loginName,
};
await this.model.getDeliveryNoteDetail(item);
if (model.deliverycode == '200') {
(this.$refs.uToast as any).show({
title: '提单成功',
type: 'success',
});
this.query();
}
}
//
async ProcureOrderAlready() {
let item = {
procureCode: this.procureCode,
factoryCode: session.FactoryCode,
userDefined5: this.userDefined5,
};
await this.model.selectOdsProcureOrderAlready(item);
if (model.Alreadycode == '200') {
this.receivedlist = model.ProcureOrderAlreadylist;
}
}
histroyItem: any = {};
barcode: any = '';
async selectProductlocCode(e: any) {
console.log(e.pickerName.warehouseName);
this.productCodeTypeList = e.pickerName;
// let params = {
// factoryCode: session.FactoryCode,
// equipmentTypeCode: this.productCodeTypeList.value,
// };
// await this.model.getAllEquipmentsle(params);
// this.whList = model.DictTypeList;
}
//
async onSubmit() {
// if (this.orderNo == '' || this.orderNo.length == 0) {
// this.customToast('nficl');
// return;
// }
// if (this.histroyItem == {} || !this.histroyItem.productCode) {
// this.customToast(this.$t('message.AppendMateriel5') as string);
// return;
// }
// if (this.barcode == '' || this.barcode.length == 0) {
// this.customToast(this.$t('message.barcode') as string);
// return;
// }
// let params = {
// loginName: session.loginName,
// factoryCode: session.factoryCode,
// orderNo: this.orderNo,
// orderItem: this.histroyItem.orderItem,
// productCode: this.histroyItem.productCode,
// productDescZh: this.histroyItem.productDescZh,
// orderType: this.histroyItem.orderType,
// barcode: this.barcode,
// // locCode: this.remove.value,
// };
// await this.model.OnSubmit(params);
// if (this.model.SubmitCode == '1') {
// this.customToast(this.$t('message.Warehouse_Tip9') as string);
// this.barcode = '';
// this.histroyItem = {};
// this.productCodeList = {};
// this.model.empty();
// await this.query();
// }
if (this.procureCode == '' || this.procureCode.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入采购单号',
type: 'default',
});
return;
}
if (this.receiptNoCode == '' || this.receiptNoCode.length == 0) {
(this.$refs.uToast as any).show({
title: '请先生成收货单号',
type: 'default',
});
return;
}
let params = {
factoryCode: session.FactoryCode,
procureCode: this.procureCode,
receiptNoCode: this.receiptNoCode,
};
await this.model.OnSubmit(params);
if (this.model.submitcode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
await this.query();
this.receiptNoCode = '';
}
}
bookprodeChange(e: any) {
this.prodobj = e.pickerName;
this.procureCode = this.prodobj.procureCode;
this.querybyprod();
}
bookTypeChange(e: any) {
this.aimWl = e.pickerName;
this.list = [];
this.list.push(e.pickerName);
this.procureCode = this.list[0].procureCode;
//
//this.queryinformation();
//this.getlist();
}
bookTypeChangeway(e) {
this.showshow = true;
this.bimWl.value = e.pickerName.value;
console.log(e);
if (e.pickerName.value == '0') {
this.selectway = false;
} else {
this.selectway = true;
}
}
//
async SignIn() {
let params = {
factoryCode: session.FactoryCode,
id: this.list[0].id,
};
await this.model.selectArrivalRegistration(params);
if (this.model.singcode == 200) {
this.singshow = true;
this.operationNumber = model.singobj.operationNumber;
this.nooperationNumber = model.singobj.planNumber - model.singobj.operationNumber;
}
}
//
async onOksing() {
if (this.procureCode == '' || this.procureCode.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入采购单号',
type: 'default',
});
return;
}
if (parseFloat(this.czNumber) == 0 || this.czNumber == '') {
(this.$refs.uToast as any).show({
title: '填写登记数量且不能为0',
type: 'default',
duration: 4000,
});
return;
}
let params = {
factoryCode: session.FactoryCode,
procureCode: this.procureCode,
id: this.list[0].id,
czNumber: this.czNumber,
lastUpdateBy: session.loginName,
};
//console.log('99999',params);
await this.model.ArrivalRegistration(params);
if (this.model.Arrivalcode == 200) {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
duration: 4000,
});
this.nopoupsing();
}
}
}
</script>
@ -266,7 +717,7 @@ export default class receivesrm extends BasePage {
.form {
background-color: #fff;
padding: 40rpx;
padding: 20rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
@ -315,15 +766,78 @@ export default class receivesrm extends BasePage {
justify-content: space-around;
flex: 1;
}
.creatshow {
display: flex;
margin-top: 5px;
.buttonshow {
flex: 1;
}
.inputshow {
flex: 4;
//border: 1px solid #9f9a9a8f;
border-radius: 5px;
margin-left: 4px;
}
}
}
.scroll {
.matshow {
// margin-top: 120rpx;
// padding-left: 30rpx;
// padding-right: 16rpx;
// margin-bottom: 20rpx;
// overflow: scroll;
// padding-top: 20rpx;
.form2 {
background-color: #fff;
padding: 0rpx 25rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #292c32;
.row-list {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.righttitle {
display: flex;
justify-content: flex-end;
.boder-icon-rigth {
border: 1rpx solid #fa3534;
width: 130rpx;
text-align: center;
background: #fa3534;
color: #ffffff;
margin-top: 10px;
}
.zhuangtai {
background: #a7a0a04a;
width: 224rpx;
margin-right: -25rpx;
border: 2rpx solid #a7a0a04a;
border-radius: 12rpx;
text-align: center;
margin-bottom: 10rpx;
}
.zhuangtai[data-state='1'] {
color: green;
}
.zhuangtai[data-state='0'] {
color: blue;
}
}
}
}
.scroll {
height: 590rpx;
overflow: scroll;
// padding-top: 20rpx;
.form2 {
background-color: #fff;
padding: 0rpx 25rpx 25rpx;
@ -353,7 +867,7 @@ export default class receivesrm extends BasePage {
.zhuangtai {
background: #a7a0a04a;
width: 224rpx;
margin-right: -27rpx;
margin-right: -25rpx;
border: 2rpx solid #a7a0a04a;
border-radius: 12rpx;
text-align: center;
@ -472,16 +986,36 @@ export default class receivesrm extends BasePage {
justify-content: space-around;
margin: 20rpx;
.pouptitle {
width: 25%;
min-width: 30%;
white-space: nowrap;
}
.poupcontent {
border: 1px solid rgba(128, 128, 128, 0.2);
}
}
}
.form4 {
padding: 20rpx;
//border-radius: 10rpx;
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.poupitem {
display: flex;
flex-direction: row;
justify-content: space-around;
margin: 20rpx;
.pouptitle {
width: 40%;
white-space: nowrap;
}
.poupcontent {
border: 1px solid rgba(128, 128, 128, 0.2);
}
}
}
.poupbutton {
display: flex;
justify-content: center;
justify-content: space-around;
}
.mask {
position: fixed;

@ -1,55 +1,110 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
//import { url } from '@/utils/url';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.raw.receivesrm',
name: 'page.raw.receiveSRM',
})
export class receiveSRM extends VuexModule {
WlList = [];
@MutationAction
async queryLocation() {
const result: any = await http.post('', {
// factoryCode: session.factoryCode,
loginName: session.loginName,
});
const WlList = result.data.map((_: any) => ({
label: _.locationCode,
value: _.locationCode,
}));
return { WlList };
}
orderNoItemList: any = [];
productCodeList: any = [];
orderNoItemListdes: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.post('', {
// factoryCode: session.factoryCode,
loginName: session.loginName,
orderNo,
});
const orderNoItemList = result.data;
// const productCodeList = result.data.map((_: any) => ({
// label: _.productCode,
// value: _.productCode,
// }));
async PurchaseOrderPda(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderPda, data);
let orderNoItemList: any = [];
if (result.data.length) {
orderNoItemList = result.data.map((item: any) => ({
label: item.materialDesc,
value: item.materialCode,
...item,
}));
} else {
orderNoItemList = [];
}
return { orderNoItemList };
}
Alreadycode: any = '';
ProcureOrderAlreadylist: any = '';
@MutationAction
async selectOdsProcureOrderAlready(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.selectOdsProcureOrderAlready, data);
const Alreadycode = result.code;
const ProcureOrderAlreadylist = result.data;
return { Alreadycode, ProcureOrderAlreadylist };
}
sapPurchasecode: any = '';
@MutationAction
async sapPurchaseOrderSync(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.sapPurchaseOrderSync, data);
const sapPurchasecode = result.code;
return { sapPurchasecode };
}
deliverycode: any = '';
@MutationAction
async getDeliveryNoteDetail(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.getDeliveryNoteDetail, data);
const deliverycode = result.code;
return { deliverycode };
}
SubmitCode: any = '';
@MutationAction
async OnSubmit(params: any) {
const result: any = await http.post('', params);
const SubmitCode = result.code;
async PurchaseOrderdeliPda(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderdeliPda, data);
const SubmitCode: [] = result;
return { SubmitCode };
}
@MutationAction
async empty() {
const productCodeList = [];
return { productCodeList };
async PurchaseOrderdetailPda(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderdetailPda, data);
const orderNoItemListdes = result.data;
return { orderNoItemListdes };
}
DictTypeList: any = [];
@MutationAction
async Stashlist() {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.list, {
factoryCode: session.FactoryCode,
});
const DictTypeListoild: [] = result.data;
const DictTypeList = DictTypeListoild.map((item: any) => ({
label: item.warehouseName,
value: item.warehouseCode,
...item,
}));
return { DictTypeList };
}
submitcode: any = '';
@MutationAction
async OnSubmit(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderdeliPdaConfirm, data);
const submitcode = result.code;
return {
submitcode,
};
}
Arrivalcode: any = '';
@MutationAction
async ArrivalRegistration(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.ArrivalRegistration, data);
const Arrivalcode = result.code;
return {
Arrivalcode,
};
}
singcode: any = '';
singobj: any = {};
@MutationAction
async selectArrivalRegistration(data: any) {
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.selectArrivalRegistration, data);
const singcode = result.code;
const singobj = result.data;
return { singcode, singobj };
}
}

@ -57,7 +57,7 @@
<!-- <view> {{ orderNoItemList && orderNoItemList.putQuantity }} </view> -->
</view>
<view class="row-list">
<view class="list-item">库仓库: </view>
<view class="list-item">库仓库: </view>
<jPicker style="width: 80%" sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
</view>
<!-- <u-form-item label="出库仓库">

@ -34,6 +34,12 @@
<u-form-item label="产品"> {{ production.productName }}</u-form-item>
<!-- <u-form-item label="批次"> {{ session.FactoryCode }}</u-form-item> -->
<u-form-item label="数量"> <u-input border v-model="quantity"></u-input></u-form-item>
<view class="single">
<view class="single-left">
<view>标识码:</view>
<u-search placeholder="请扫描" v-model="attr1" :show-action="false"></u-search>
</view>
</view>
</u-form>
</view>
<view style="height: 14rpx"></view>
@ -81,6 +87,7 @@ export default class ProductionRecord extends BasePage {
border = true;
production: any = {};
quantity = '';
attr1 = '';
async onReady() {
await this.model.getlistBaseEquipment();
@ -177,6 +184,12 @@ export default class ProductionRecord extends BasePage {
});
return;
}
if (this.attr1 == '') {
(this.$refs.uToast as any).show({
title: '请输入标识码',
});
return;
}
let params = {
factoryCode: session.FactoryCode,
createBy: session.loginName,
@ -188,6 +201,7 @@ export default class ProductionRecord extends BasePage {
prodLineName: this.aimWl.label,
sn: this.orderNo,
quantity: this.quantity,
attr1: this.attr1,
};
//console.log('',params);
await this.model.getwarehouselist(params);
@ -198,6 +212,7 @@ export default class ProductionRecord extends BasePage {
});
this.quantity = '';
this.orderNo = '';
this.attr1 = '';
} else {
(this.$refs.uToast as any).show({
title: '失败',
@ -275,6 +290,7 @@ export default class ProductionRecord extends BasePage {
width: 100%;
height: 60rpx;
display: flex;
margin-top: 10rpx;
.single-left {
width: 80%;

Loading…
Cancel
Save