LAPTOP-R6EHHS26\86155 1 year ago
commit c3e0bffd4e

@ -487,6 +487,30 @@
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wms/product/SalesReturn/index",
"style": {
"navigationBarTitleText": "成品销售退货",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wms/product/SalesReturn/detail",
"style": {
"navigationBarTitleText": "成品销售退货托盘箱码关系",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/wms/product/TransferWarehouse/index",
"style": {
"navigationBarTitleText": "成品调拨出库",
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
}

@ -2,7 +2,7 @@
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
<u-icon class="icon" name="arrow-left" @click="returntrue" />
</view>
<view class="title">托盘箱码关系</view>
<view class="right"></view>
@ -37,7 +37,7 @@
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({})"></u-button>
<u-button type="error" @click="returntrue"></u-button>
</u-col>
</u-row>
</view>
@ -74,6 +74,7 @@ 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 { usedata } from '@/store/use/salesreturn';
@Component({
components: {
jPicker,
@ -142,6 +143,13 @@ export default class OfflineStoragedetail extends BasePage {
return;
}
}
returntrue() {
const cacheData = usedata.salesreturndata;
const list = cacheData?.list;
list[cacheData?.index].number = this.list.length;
usedata.cacheData({ list: list, index: cacheData?.index, kuwei: cacheData.kuwei });
uni.navigateBack({});
}
}
</script>
<style lang="scss" scoped>

@ -52,9 +52,14 @@
</view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 待入库数量: </view>
<view> {{ orderNoItemList && orderNoItemList.attr3 }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 入库数量: </view>
<u-input :border="border" v-model="number1" placeholder="" type="number" />
<!-- <view> {{ orderNoItemList && orderNoItemList.putQuantity }} </view> -->
<view> {{ number1 }} </view>
</view>
</view>
<view class="row-list">
<view class="list-item">出库仓库: </view>
@ -154,7 +159,7 @@ 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 { usedata } from '@/store/use/data';
import { usedata } from '@/store/use/salesreturn';
interface OptionType {
label: string;
value: string;
@ -175,7 +180,7 @@ export default class OfflineStorage extends BasePage {
itemdetail: any = '';
showmodal = false;
content: any = '';
number1: any = '';
number1 = 0;
border = true;
delindex = -1;
cimWl = {} as OptionType;
@ -211,21 +216,18 @@ export default class OfflineStorage extends BasePage {
usedata.cacheData(null);
}
async onShow() {
const cacheData = usedata.OfflineStoragedata;
const cacheData = usedata.salesreturndata;
console.log('cacheData执行了', cacheData);
if (cacheData) {
console.log('cacheData执行了', cacheData);
this.orderNo = cacheData?.orderNo;
this.list = cacheData?.list;
this.cimWl.value = cacheData?.kuwei;
this.biaojiindex = cacheData?.index;
this.biaojisn = cacheData?.sn;
this.number = cacheData?.number;
await this.query();
await this.model.selectSnCorrelationBarcode(this.biaojisn);
if (model.selectcode) {
this.list[this.biaojiindex].number = model.selectdata.length;
}
let sum = 0;
this.list.forEach((element) => {
sum += element.number;
});
this.number1 = sum;
}
}
//
@ -243,6 +245,7 @@ export default class OfflineStorage extends BasePage {
this.itemdetail.orderNo = this.orderNo;
console.log(this.itemdetail, this.orderNo);
this.list.splice(this.delindex, 1);
this.number1 = this.number1 - this.itemdetail.number;
}
//
warehouseChange(e: any) {
@ -265,7 +268,7 @@ export default class OfflineStorage extends BasePage {
await this.model.queryOrderNo(this.orderNo);
if (model.orderNoItemList) {
this.orderNoItemList = model.orderNoItemList;
this.number1 = this.number ? this.number : this.orderNoItemList.attr3;
//this.number1 = this.number ? this.number : this.orderNoItemList.attr3;
} else {
this.orderNoItemList = {};
}
@ -287,12 +290,12 @@ export default class OfflineStorage extends BasePage {
});
return;
}
let insertTarynumber = 0;
this.list.forEach((item) => {
insertTarynumber = insertTarynumber + parseInt(item.number);
});
// let insertTarynumber = 0;
// this.list.forEach((item) => {
// insertTarynumber = insertTarynumber + parseInt(item.number);
// });
//console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
if (insertTarynumber <= parseFloat(this.number1)) {
if (parseFloat(this.orderNoItemList.attr3) <= this.number1) {
let params = {
workOrder: this.orderNoItemList.workOrder,
factoryCode: session.FactoryCode,
@ -346,10 +349,10 @@ export default class OfflineStorage extends BasePage {
this.list.forEach((item) => {
insertTarynumber = insertTarynumber + parseInt(item.number);
});
let ordernumber = parseFloat(this.number1) || 0;
let ordernumber = parseFloat(this.orderNoItemList.attr3) || 0;
if (insertTarynumber >= ordernumber) {
(this.$refs.uToast as any).show({
title: '实际入库数量不能大于入库数量,请先删除再入库',
title: '实际入库数量不能大于入库数量,请先删除再入库',
// url: '/pages/user/index'
});
return;
@ -384,13 +387,18 @@ export default class OfflineStorage extends BasePage {
sn: this.form5.sn,
//batchNumber: this.orderNoItemList.batchNumber,
});
let insertTarynumber = 0;
this.list.forEach((item) => {
insertTarynumber = insertTarynumber + parseInt(item.number);
});
this.number1 = insertTarynumber;
this.show = false;
}
}
async onFormDoubleClick(item, index) {
console.log('双击', item);
//await this.model.OnSubmit(item.id);
usedata.cacheData({ orderNo: this.orderNo, number: this.number1, kuwei: this.cimWl.value, list: this.list, index: index, sn: item.sn });
usedata.cacheData({ kuwei: this.cimWl.value, list: this.list, index: index });
this.uni.navigateTo({
url: this.page.wms.OfflineStoragedetail + '?sn=' + item.sn,
});

@ -16,7 +16,7 @@
<u-search placeholder="请扫描" v-model="orderNo" @search="query" :show-action="false"></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query"></u-button>
<u-button type="primary" @click="tidan"></u-button>
</view>
</view>
<!-- 订单 -->
@ -24,8 +24,24 @@
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="aimWl.value" :options="materilist" />
</u-form-item>
<!-- <u-form-item label="出库仓库">
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="aimWl.value" :options="materilist" />
</u-form-item>
<u-form-item label="客户名称">
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="aimWl.value" :options="materilist" />
</u-form-item> -->
<view class="row-list-top">
<view class="row-list-item-top">
<view class="list-item-top"> 出库仓库: </view>
<jPicker sureColor="#ff0000" @bindpicker="wlChange" showKey="label" valKey="value" :val="cimWl.value" :options="warehouselist" />
</view>
<view class="row-list-item-top">
<view class="list-item-top"> 客户名称: </view>
<view> {{ orderNoItemList && orderNoItemList.attr1 }} </view>
</view>
</view>
<!-- 机台 -->
<u-form-item label="出库仓库"> 成品库 </u-form-item>
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form>
<u-form style="margin-top: 1rpx" class="form3">
<view class="list">
@ -54,28 +70,33 @@
</view>
</u-form>
<u-form class="form4">
<u-search placeholder="请扫描箱码" @search="addlist" v-model="boxnumber" :show-action="false"></u-search>
<u-radio-group v-model="selectvalue" style="width: 100%" @change="radioGroupChange">
<u-radio style="width: 50%" v-for="(item, index) in Radiolist" :key="index" :name="item.code" :disabled="item.disabled">
{{ item.name }}
</u-radio>
</u-radio-group>
<u-search placeholder="请扫描条码" @search="addlist" v-model="boxnumber" :show-action="false"></u-search>
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
</u-form>
</view>
<view style="height: 14rpx"></view>
<view class="scroll">
<view v-for="item in list" :key="item.id">
<view v-for="(item, index) in list" :key="item.id">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="rowleft">
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 批次: </view>
<view> {{ item.lotNumber }} </view>
<view class="list-item"> 托盘: </view>
<view>{{ item.sn }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 箱码: </view>
<view> {{ item.barcode }} </view>
<view> {{ item.barcode }} </view>
</view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="row-list-item-row">
<view class="list-item"> 库位码: </view>
<view> {{ item.wlCode }} </view>
</view>
@ -87,7 +108,7 @@
</view>
<view class="rowright">
<view class="righttitle">
<view @click.stop="ondelete(item)" class="boder-icon-rigth"> 删除 </view>
<view @click.stop="ondelete(item, index)" class="boder-icon-rigth"> 删除 </view>
</view>
</view>
</view>
@ -114,6 +135,7 @@ 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';
interface OptionType {
label: string;
value: string;
@ -127,7 +149,9 @@ interface OptionType {
export default class SaleOutWH extends BasePage {
model = model;
list: any = [];
aimWl = {} as OptionType;
//productCodebiaozhiwei = '';
cimWl = {} as OptionType;
aimWl: any = {};
boxnumber: any = '';
materilist = [];
// remove: any = {};
@ -144,33 +168,54 @@ export default class SaleOutWH extends BasePage {
showProduceCodeList: any = [];
itemdetail: any = '';
outnumber: any = 0;
warehouselist = [];
Radiolist = [
{
code: 0,
name: '整托扫描',
disabled: false,
},
{
code: 1,
name: '单箱扫描',
disabled: false,
},
];
selectvalue: any = 0;
async onLoad() {
await this.model.getwarehouselist();
this.warehouselist = model.warehouselist;
this.cimWl = this.warehouselist[0];
}
bookTypeChange(e: any) {
this.aimWl = e.pickerName;
this.getlist();
this.queryinformation();
this.orderNoItemList = e.pickerName;
this.list = [];
this.outnumber = this.orderNoItemList.outQuantity;
}
wlChange(e: any) {
this.cimWl = e.pickerName;
}
// radioradio-group
radioGroupChange(e) {
console.log(e);
console.log('selectvalue', this.selectvalue);
}
//
async ondelete(item) {
console.log('1234567', item);
this.itemdetail = item;
// this.showmodal = true;
// this.content = '?';
this.itemdetail.orderNo = this.orderNo;
console.log(this.itemdetail, this.orderNo);
await this.model.deleteTray(this.itemdetail);
if (this.model.SubmitCode == '200') {
async ondelete(item, index) {
console.log('this.list', Array.isArray(this.list));
const newList = [...this.list]; //
newList.splice(index, 1); // splice
this.list = newList; //
(this.$refs.uToast as any).show({
title: '删除成功',
type: 'success',
});
this.getlist();
} else {
(this.$refs.uToast as any).show({
title: '删除失败',
type: 'error',
});
this.getlist();
}
console.log('this.outnumber', this.outnumber);
this.outnumber = this.outnumber - 1;
// if(!this.list.length){
// this.productCodebiaozhiwei = '';
// }
}
//
async query() {
@ -184,53 +229,20 @@ export default class SaleOutWH extends BasePage {
await this.model.showProduceCode(this.orderNo);
if (model.orderNoItemList) {
this.materilist = [];
let a: any = {};
model.orderNoItemList.forEach((item) => {
a.label = item.productName;
a.value = item.productCode;
this.materilist.push(a);
//let a: any = {};
this.model.orderNoItemList.forEach((item) => {
item.label = item.productName;
item.value = item.productCode;
this.materilist.push(item);
});
this.aimWl.value = this.materilist[0].value;
this.queryinformation();
this.getlist();
this.orderNoItemList = this.materilist[0];
this.outnumber = this.orderNoItemList.outQuantity;
} else {
this.materilist = [];
}
}
//
async queryinformation() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入备货单号',
// url: '/pages/user/index'
});
return;
}
let item: any = {};
item.orderNo = this.orderNo;
item.value = this.aimWl.value;
await this.model.queryinformation(item);
if (model.information) {
this.orderNoItemList = model.information;
} else {
this.orderNoItemList = {};
}
// this.getlist();
}
async getlist() {
let item: any = {};
item.orderNo = this.orderNo;
item.value = this.aimWl.value;
await (this.model as any).showTrays(item);
if (model.TraysList.length > 0) {
this.list = model.TraysList;
this.outnumber = model.TraysList.length;
} else {
this.list = [];
this.outnumber = 0;
}
console.log(model.TraysList);
}
async addlist() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
@ -246,25 +258,70 @@ export default class SaleOutWH extends BasePage {
});
return;
}
if (this.selectvalue == 0) {
//
let item: any = {};
item.productCode = this.aimWl.value;
item.barcode = this.boxnumber;
await this.model.selloutconntray(item);
if (this.model.SubmitCode == '200') {
item.sn = this.boxnumber;
item.siteCode = session.FactoryCode;
await this.model.ScanCodeWholePallet(item);
if (this.model.scanCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.getlist();
model.scandatalist.map((item) => {
if (item.productCode == this.aimWl.value) {
this.list.push({ sn: item.sn, barcode: item.barcode, wlCode: item.wlCode, storageId: item.storageId });
this.outnumber += 1;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
});
// this.list.push()
this.boxnumber = '';
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.getlist();
this.boxnumber = '';
}
} else if (this.selectvalue == 1) {
let item: any = {};
item.barcode = this.boxnumber;
item.siteCode = session.FactoryCode;
await this.model.ScanCodeSingleBox(item);
if (this.model.scanCode == '200') {
let scandata = model.scandata;
if (this.aimWl.value == scandata.productCode) {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.list.push({ sn: scandata.sn, barcode: scandata.barcode, wlCode: scandata.wlCode, storageId: scandata.storageId });
this.outnumber += 1;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
this.boxnumber = '';
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.boxnumber = '';
}
}
// //
// await this.model.queryOrderNo(this.form5);
// this.list = model.orderNoItemList;
@ -280,27 +337,39 @@ export default class SaleOutWH extends BasePage {
if (this.list.length == 0 || this.list == '') {
(this.$refs.uToast as any).show({
title: '请先扫箱码',
title: '请先扫箱码',
// url: '/pages/user/index'
});
return;
}
this.list[0].outnumber = this.outnumber;
await this.model.out(this.list);
//this.list[0].outnumber = this.outnumber;
let item = {
factoryCode: session.FactoryCode,
whCode: this.cimWl.value,
id: this.orderNoItemList.id,
productCode: this.orderNoItemList.productCode,
productName: this.orderNoItemList.productName,
wmsProductPutTrayCodeList: this.list,
};
await this.model.out(item);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.getlist();
this.list = [];
this.query();
//this.productCodebiaozhiwei = '';
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.getlist();
}
}
async tidan() {
//
}
}
</script>
<style lang="scss" scoped>
@ -400,6 +469,16 @@ export default class SaleOutWH extends BasePage {
justify-content: space-around;
flex: 1;
}
.row-list-top {
display: flex;
flex-direction: row;
width: 100%;
.row-list-item-top {
display: flex;
flex-direction: row;
width: 50%;
}
}
}
.form3 {
background-color: #fff;
@ -454,10 +533,10 @@ export default class SaleOutWH extends BasePage {
.scroll {
// margin-top: 2rpx;
height: 680rpx;
height: 430rpx;
position: absolute;
width: 92%;
top: 710rpx;
top: 780rpx;
/* bottom: 40px; */
overflow: auto;
.form2 {
@ -481,6 +560,12 @@ export default class SaleOutWH extends BasePage {
justify-content: space-between;
width: 40%;
}
.row-list-item-row {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 60%;
}
.list-item {
display: flex;
flex-direction: row;

@ -13,30 +13,14 @@ export class SaleOutWH extends VuexModule {
orderNoItemList: any = [];
@MutationAction
async showProduceCode(orderNo: any) {
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.showProduceCode + '/' + orderNo, {
headers: {
poolName: session.PoolName,
},
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.selectQueryFinishedProductSales, {
deliveryOrder: orderNo,
factoryCode: session.FactoryCode,
});
// http.defaults.headers.common['Accept-Language'] = session.PoolName;
const orderNoItemList = result.data;
return { orderNoItemList };
}
information: any = [];
@MutationAction
async queryinformation(item) {
console.log(item);
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.queryinformation + '/' + item.orderNo + '/' + item.value, {});
const information = result.data;
return { information };
}
TraysList: any = [];
@MutationAction
async showTrays(item: any) {
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.showTrays + '/' + item.orderNo + '/' + item.value, {});
const TraysList = result.data;
return { TraysList };
}
SubmitCode: any = '';
@MutationAction
async selloutconntray(params: any) {
@ -45,17 +29,42 @@ export class SaleOutWH extends VuexModule {
return { SubmitCode };
}
@MutationAction
async deleteTray(item: any) {
console.log(item);
const result: any = await http.delete(url.lanjuwms.product.SaleOutWH.deleteTray + '/' + item.barcode);
async out(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.confirmFinishedProductSales, params);
const SubmitCode = result.code;
return { SubmitCode };
}
scanCode: any = '';
scandatalist: any = [];
scandata: any = {};
//整托
@MutationAction
async out(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.out + '/' + params[0].outnumber, params);
const SubmitCode = result.code;
return { SubmitCode };
async ScanCodeWholePallet(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.ScanCodeWholePallet, params);
const scanCode = result.code;
const scandatalist = result.data;
return { scanCode, scandatalist };
}
//单箱
@MutationAction
async ScanCodeSingleBox(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.ScanCodeSingleBox, params);
const scanCode = result.code;
const scandata = result.data;
return { scanCode, scandata };
}
warehouselist: any = [];
@MutationAction
async getwarehouselist() {
const result = await http.post(url.lanjuwms.raw.ProductionREQ.warehouselist, {
factoryCode: session.FactoryCode,
});
const warehouselist = result.data.map((element: any) => ({
label: element.warehouseName,
value: element.warehouseCode,
...element,
}));
return { warehouselist };
}
}

@ -0,0 +1,375 @@
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="returntrue" />
</view>
<view class="title">托盘箱码关系</view>
<view class="right"></view>
</view>
<view class="scroll">
<view v-for="item in list" :key="item.id">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="row-list">
<view class="list-item"> 托盘号: </view>
<view> {{ item.sn }}</view>
</view>
<view class="row-list">
<view class="list-item"> 箱码: </view>
<view> {{ item.barcode }} </view>
</view>
<view class="rowright">
<view class="righttitle">
<view @click.stop="onPassdelet(item)" class="boder-icon-rigth"> 解除关联 </view>
</view>
</view>
</view>
</u-form>
</view>
</view>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<u-col :span="6">
<u-button @click="onSubmit" type="primary">关联箱码</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="6">
<u-button type="error" @click="returntrue"></u-button>
</u-col>
</u-row>
</view>
<view>
<u-popup v-model="show" mode="center" width="550rpx" height="450rpx">
<view class="form5">
<view class="poupitem">
<view class="pouptitle">托盘号</view>
<u-input class="poupcontent" :clearable="false" v-model="sn" placeholder="" style="overflow: hidden" />
</view>
<view class="poupitem">
<view class="pouptitle">箱码</view>
<u-input class="poupcontent" :clearable="false" v-model="barcode" placeholder="" style="overflow: hidden" />
</view>
<!-- <view class="poupitem">
<view class="pouptitle">箱数</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.number" placeholder="" style="overflow: hidden" />
</view> -->
</view>
<view class="poupbutton">
<!-- 确定 -->
<u-button @click="onOk" type="primary">确定</u-button>
<!-- 返回 -->
<u-button type="error" @click="nopoup"></u-button>
</view>
</u-popup>
<view v-if="show" class="mask"></view>
</view>
</view>
</template>
<script lang="ts">
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 { usedata } from '@/store/use/salesreturn';
@Component({
components: {
jPicker,
},
})
export default class OfflineStoragedetail extends BasePage {
model = model;
sn = '';
barcode = '';
show = false;
list: any[] = [];
onLoad(options) {
this.sn = options.sn;
this.query();
}
async query() {
await this.model.selectSnCorrelationBarcode(this.sn);
if (model.selectcode == '200') {
this.list = model.selectdata;
} else {
this.list = [];
}
}
onSubmit() {
this.show = true;
}
nopoup() {
this.show = false;
this.barcode = '';
}
async onOk() {
if (this.sn == '' || this.barcode == '') {
(this.$refs.uToast as any).show({
title: '不能为空',
// url: '/pages/user/index'
});
return;
}
let item = {
sn: this.sn,
barcode: this.barcode,
siteCode: session.FactoryCode,
};
await this.model.addSnCorrelationBarcode(item);
if (model.addsncode == '200') {
this.query();
this.nopoup();
} else {
(this.$refs.uToast as any).show({
title: '绑定失败',
// url: '/pages/user/index'
});
return;
}
}
async onPassdelet(item) {
console.log('item', item);
await this.model.deletSnCorrelationBarcode(item.storageId);
if (model.addsncode == '200') {
this.query();
} else {
(this.$refs.uToast as any).show({
title: '取消关联失败',
// url: '/pages/user/index'
});
return;
}
}
returntrue() {
const cacheData = usedata.salesreturndata;
const list = cacheData?.list;
list[cacheData?.index].number = this.list.length;
usedata.cacheData({ list: list, index: cacheData?.index, kuwei: cacheData.kuwei });
uni.navigateBack({});
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 0rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 120rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding: 45rpx 0rpx 0rpx;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.scroll {
// margin-top: 120rpx;
// padding-left: 30rpx;
// padding-right: 16rpx;
// margin-bottom: 20rpx;
// overflow: scroll;
// padding-top: 20rpx;
.form2 {
background-color: #fff;
padding: 25rpx 25rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.row-list {
display: flex;
flex-direction: row;
justify-content: space-between;
.row-list-item {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 40%;
}
.list-item {
display: flex;
flex-direction: row;
flex: 1;
}
}
.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: -27rpx;
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;
}
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.button-bar {
}
.photoList {
display: flex;
padding-top: 12rpx;
.chooseBtn {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
border: 2rpx dashed #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
.inner {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.desc {
font-size: 28rpx;
font-weight: 400;
color: #24252a;
line-height: 40rpx;
}
.img {
width: 50rpx;
height: 50rpx;
margin-bottom: 6rpx;
}
}
.photoBox {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
position: relative;
.closeBtn {
position: absolute;
top: -12rpx;
right: -12rpx;
z-index: 2;
width: 36rpx;
height: 36rpx;
.img {
width: 36rpx;
height: 36rpx;
}
}
.img {
width: 202rpx;
height: 202rpx;
border-radius: 12rpx;
}
}
.itemBox {
flex: 0 0 202rpx;
margin-right: 20rpx;
&:last-child {
margin-right: 0;
}
}
// /deep/ .remarksBox textarea {
// font-size: 24rpx;
// }
}
.form5 {
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;
align-items: center;
.pouptitle {
// width: 25%;
min-width: 35%;
// white-space: nowrap;
}
.poupcontent {
border: 1px solid rgba(128, 128, 128, 0.2);
}
}
}
.poupbutton {
display: flex;
justify-content: center;
}
}
</style>

@ -0,0 +1,756 @@
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">销售退货</view>
<view class="right"></view>
</view>
<view class="fiexdcontent">
<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>
</view>
<!-- <view class="single-right">
<u-button type="primary" @click="tidan"></u-button>
</view> -->
</view>
<view class="row-list">
<view class="list-item">行项目: </view>
<jPicker style="width: 80%" sureColor="#ff0000" @bindpicker="arrtChange" showKey="value" valKey="value" :val="aimWl.value" :options="orderNoItemList" />
</view>
<view class="row-list">
<view class="list-item">物料编码: </view>
<view class="item-input">{{ orderNoItem.productCode }}</view>
<!-- <jPicker style="width: 80%" sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" /> -->
</view>
<view class="row-list">
<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="收货工厂"> {{ session.FactoryCode }}</u-form-item>
<view class="row-list">
<view class="list-item">应收/已收: </view>
<view class="item-input">{{ orderNoItem.planQuantity ? orderNoItem.planQuantity : 0 }}/{{ putQuantity }}</view>
</view>
</u-form>
<u-form class="form4" style="">
<!-- <u-search placeholder="请扫描" v-model="boxnumber" :show-action="false"></u-search> -->
<view class="buttontostore" @click="rukubutn"></view>
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
</u-form>
</view>
<view style="height: 14rpx"></view>
<view style="margin-top: 180rpx" class="scroll">
<view v-for="(item, index) in list" :key="item.id" @dblclick="onFormDoubleClick(item, index)">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="rowleft">
<view class="row-list">
<!-- <view class="row-list-item">
<view class="list-item"> 批次号: </view>
<view>{{ item.batchNumber }} </view>
</view> -->
<view class="row-list-item">
<view class="list-item"> 箱数: </view>
<view>{{ item.number }} </view>
</view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 库位码: </view>
<view>{{ item.wlCode }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 托盘码: </view>
<view>{{ item.sn }} </view>
</view>
</view>
</view>
<view class="rowright">
<view class="righttitle">
<view @click.stop="onPassdelet(item, index)" class="boder-icon-rigth"> 删除 </view>
</view>
</view>
</view>
</u-form>
</view>
</view>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<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">
<view class="form5">
<view class="poupitem">
<view class="pouptitle">托盘号</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.sn" placeholder="" style="overflow: hidden" />
</view>
<view class="poupitem">
<view class="pouptitle">入库库位</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.wlCode" placeholder="" style="overflow: hidden" />
</view>
<!-- <view class="poupitem">
<view class="pouptitle">箱数</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.number" placeholder="" style="overflow: hidden" />
</view> -->
</view>
<view class="poupbutton">
<!-- 确定 -->
<u-button @click="onOk" type="primary">确定</u-button>
<!-- 返回 -->
<u-button type="error" @click="nopoup"></u-button>
</view>
</u-popup>
<view v-if="show" class="mask"></view>
</view>
<u-modal v-model="showmodal" @confirm="confirm" :content="content" :show-cancel-button="true"></u-modal>
<u-toast ref="uToast" />
</view>
</template>
<script lang="ts">
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 { usedata } from '@/store/use/salesreturn';
interface OptionType {
label: string;
value: string;
}
//import { session } from '@/store/modules/session';
@Component({
components: {
jPicker,
},
})
export default class SalesReturn extends BasePage {
model = model;
list: any = [];
orderNoItemList: any = [];
show = false;
form5: any = {};
boxnumber: any = '';
itemdetail: any = '';
showmodal = false;
content: any = '';
number1: any = '';
border = true;
delindex = -1;
aimWl: any = {};
cimWl = {} as OptionType;
warehouselist = [];
orderNo: any = '';
histroyItem: any = {};
barcode: any = '';
productCodeList: any = {};
biaojiindex = '';
biaojisn = '';
number = '';
orderNoItem: any = {};
putQuantity = 0;
async onReady() {
await this.model.getwarehouselist();
this.warehouselist = model.warehouselist;
this.cimWl = this.warehouselist[0];
}
// A
onUnload() {
//
usedata.cacheData(null);
}
async onShow() {
const cacheData = usedata.salesreturndata;
console.log('cacheData执行了', cacheData);
if (cacheData) {
console.log('cacheData执行了', cacheData);
this.list = cacheData?.list;
//this.cimWl.value = cacheData?.kuwei;
this.biaojiindex = cacheData?.index;
let sum = 0;
this.list.forEach((element) => {
sum += element.number;
});
this.putQuantity = this.orderNoItem.putQuantity + sum;
//this.aimWl.value = cacheData?.rowitem;
}
}
//
async onPassdelet(item, index) {
console.log('1234567', item);
this.itemdetail = item;
this.delindex = index;
this.showmodal = true;
this.content = '是否删除?';
// let params = {
// item
// }
}
async confirm() {
this.itemdetail.orderNo = this.orderNo;
console.log(this.itemdetail, this.orderNo);
this.list.splice(this.delindex, 1);
this.putQuantity = this.putQuantity - this.itemdetail.number;
}
//
arrtChange(e: any) {
this.aimWl = e.pickerName;
this.orderNoItem = e.pickerName;
this.list = [];
this.putQuantity = this.orderNoItem.putQuantity;
}
//
warehouseChange(e: any) {
this.cimWl = e.pickerName;
}
//
nopoup() {
this.show = false;
this.form5 = {};
}
//
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入退货单号',
// url: '/pages/user/index'
});
return;
}
await this.model.queryOrderNo(this.orderNo);
if (model.orderNoItemList) {
model.orderNoItemList.map((item) => {
item.label = item.attr10;
item.value = item.attr10;
});
this.orderNoItemList = model.orderNoItemList;
this.orderNoItem = this.orderNoItemList[0];
this.aimWl = this.orderNoItemList[0];
this.putQuantity = this.orderNoItemList[0].putQuantity;
} else {
this.orderNoItemList = {};
}
}
//
async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入退货单号',
// url: '/pages/user/index'
});
return;
}
if (this.list.length == 0 || this.list == '') {
(this.$refs.uToast as any).show({
title: '请先收货',
// url: '/pages/user/index'
});
return;
}
// let insertTarynumber = 0;
// this.list.forEach((item) => {
// insertTarynumber = insertTarynumber + parseInt(item.number);
// });
//console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
if (this.putQuantity <= parseFloat(this.orderNoItem.planQuantity)) {
let params = {
//workOrder: this.orderNoItemList.workOrder,
factoryCode: session.FactoryCode,
whCode: this.cimWl.value, //
id: this.orderNoItem.id,
attr10: this.aimWl.value,
unitOfMeasure: this.orderNoItem.unitOfMeasure,
productOrder: this.orderNoItem.productOrder,
productCode: this.orderNoItem.productCode,
productName: this.orderNoItem.productName,
createBy: session.loginName,
putQuantity: this.putQuantity,
wmsProductPut: this.list,
};
//console.log('',params);
await this.model.handPut(params);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.show = false;
this.list = [];
this.query();
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.show = false;
}
} else {
(this.$refs.uToast as any).show({
title: '总收货数量不能大于计划数量',
// url: '/pages/user/index'
});
}
}
async rukubutn() {
this.form5 = {};
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入退货单号',
// url: '/pages/user/index'
});
return;
}
if (this.list.length > 0) {
// let insertTarynumber = 0;
// this.list.forEach((item) => {
// insertTarynumber = insertTarynumber + parseInt(item.number);
// });
//let ordernumber = parseFloat(this.number1) || 0;
if (this.putQuantity >= this.orderNoItem.planQuantity) {
(this.$refs.uToast as any).show({
title: '总收货数量不能大于计划数量',
// url: '/pages/user/index'
});
return;
}
this.show = true;
} else {
this.show = true;
}
}
//
async onOk() {
console.log(this.form5);
if (this.form5.sn == '' || this.form5.wlCode == '') {
(this.$refs.uToast as any).show({
title: '不能为空',
// url: '/pages/user/index'
});
return;
}
// this.list.push({
// number: 0,
// wlCode: this.form5.wlCode,
// sn: this.form5.sn,
// //batchNumber: this.orderNoItemList.batchNumber,
// });
// this.show = false;
await this.model.selectSnCorrelationBarcode(this.form5.sn);
if (model.selectcode) {
this.list.push({
number: model.selectdata.length || 0,
wlCode: this.form5.wlCode,
sn: this.form5.sn,
//batchNumber: this.orderNoItemList.batchNumber,
});
this.show = false;
this.putQuantity = this.putQuantity + model.selectdata.length;
}
}
async onFormDoubleClick(item, index) {
console.log('双击', item);
//await this.model.OnSubmit(item.id);
usedata.cacheData({ kuwei: this.cimWl.value, list: this.list, index: index });
this.uni.navigateTo({
url: this.page.wms.SalesReturndetail + '?sn=' + item.sn,
});
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 0rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 120rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding: 45rpx 0rpx 0rpx;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.fiexdcontent {
position: fixed;
width: 92%;
// box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%);
z-index: 100;
}
.form {
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 20rpx 0;
line-height: 35rpx;
.Transfer {
width: 280rpx;
height: 64rpx;
background: rgb(242, 242, 242);
border-radius: 110rpx;
}
}
.single {
width: 100%;
height: 60rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 142rpx;
height: 100%;
line-height: 55rpx;
}
}
.single-right {
button {
// margin-top: 15rpx;
width: 140rpx;
height: 70rpx;
background-color: #fa3534;
}
}
}
.row {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 1;
}
.row-list {
display: flex;
flex-direction: row;
padding: 10rpx 0rpx;
.list-item {
width: 30%;
}
.item-input {
border: 1rpx solid #8e8a8a;
width: 100%;
border-radius: 4rpx;
}
}
}
.form3 {
background-color: #fff;
padding: 25rpx 25rpx 25rpx;
border-radius: 10rpx;
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
//color: #8d8989;
// .list {
// display: flex;
// flex-direction: row;
// }
.row-list {
display: flex;
flex-direction: row;
justify-content: space-between;
.row-list-item {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 40%;
}
.list-item {
display: flex;
flex-direction: row;
flex: 1;
}
}
.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;
}
}
}
.form4 {
// background-color: #fff;
padding: 1rpx;
border-radius: 10rpx;
margin-top: 2rpx;
display: flex;
justify-content: flex-end;
// margin-bottom: 5px;
padding-bottom: 5px;
.buttontostore {
margin-top: 5px;
background: red;
width: 13%;
/* height: 100%; */
height: 33px;
text-align: center;
/* margin: auto; */
color: #ffff;
line-height: 30px;
border-radius: 5px;
}
.u-input__input {
min-height: 36px;
}
}
.scroll {
// margin-top: 2rpx;
height: 835rpx;
position: absolute;
width: 92%;
top: 550rpx;
/* bottom: 40px; */
overflow: auto;
.form2 {
background-color: #fff;
padding: 25rpx 25rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #8d8989;
.list {
display: flex;
flex-direction: row;
.rowleft {
width: 80%;
.row-list {
display: flex;
flex-direction: row;
justify-content: space-between;
.row-list-item {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 40%;
}
.list-item {
display: flex;
flex-direction: row;
flex: 1;
}
}
}
.rowright {
width: 20%;
display: flex;
justify-content: right;
.righttitle {
width: 60%;
background-color: #8d898947;
color: red;
text-align: center;
/* margin: auto; */
height: 100%;
line-height: 70rpx;
}
}
}
// .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: -27rpx;
// 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;
// }
// }
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.photoList {
display: flex;
padding-top: 12rpx;
.chooseBtn {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
border: 2rpx dashed #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
.inner {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.desc {
font-size: 28rpx;
font-weight: 400;
color: #24252a;
line-height: 40rpx;
}
.img {
width: 50rpx;
height: 50rpx;
margin-bottom: 6rpx;
}
}
.photoBox {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
position: relative;
.closeBtn {
position: absolute;
top: -12rpx;
right: -12rpx;
z-index: 2;
width: 36rpx;
height: 36rpx;
.img {
width: 36rpx;
height: 36rpx;
}
}
.img {
width: 202rpx;
height: 202rpx;
border-radius: 12rpx;
}
}
.itemBox {
flex: 0 0 202rpx;
margin-right: 20rpx;
&:last-child {
margin-right: 0;
}
}
// /deep/ .remarksBox textarea {
// font-size: 24rpx;
// }
}
.form5 {
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;
align-items: center;
.pouptitle {
// width: 25%;
min-width: 35%;
// white-space: nowrap;
}
.poupcontent {
border: 1px solid rgba(128, 128, 128, 0.2);
}
}
}
.poupbutton {
display: flex;
justify-content: center;
}
}
</style>

@ -0,0 +1,96 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.product.SalesReturn',
})
// http.defaults.headers.common['poolName'] = session.PoolName;
export class SalesReturn extends VuexModule {
WlList = [];
orderNoItemList: any = [];
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.post(url.lanjuwms.product.SalesReturn.FinishedProductSalesReturn, {
productOrder: orderNo,
factoryCode: session.FactoryCode,
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
productCodeList: any = [];
@MutationAction
async list(orderNo: any) {
const result: any = await http.get(url.lanjuwms.product.OfflineStorage.list + '/' + orderNo, {});
const productCodeList = result.data;
return { productCodeList };
}
SubmitCode: any = '';
@MutationAction
async insertTary(params: any) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.insertTary, params);
const SubmitCode = result.code;
return { SubmitCode };
}
@MutationAction
async deleteTray(item: any) {
console.log(item);
const result: any = await http.delete(url.lanjuwms.product.OfflineStorage.deleteTray + '/' + item.sn + '/' + item.orderNo);
const SubmitCode = result.code;
return { SubmitCode };
}
@MutationAction
async handPut(params: any) {
const result: any = await http.post(url.lanjuwms.product.SalesReturn.FinishedProductSalesReturnConfirm, params);
const SubmitCode = result.code;
return { SubmitCode };
}
warehouselist: any = [];
@MutationAction
async getwarehouselist() {
const result = await http.post(url.lanjuwms.raw.ProductionREQ.warehouselist, {
factoryCode: session.FactoryCode,
});
const warehouselist = result.data.map((element: any) => ({
label: element.warehouseName,
value: element.warehouseCode,
...element,
}));
return { warehouselist };
}
selectdata: any = [];
selectcode: any = '';
@MutationAction
async selectSnCorrelationBarcode(sn: string) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.selectSnCorrelationBarcode, {
siteCode: session.FactoryCode,
sn: sn,
});
const selectdata = result.data;
const selectcode = result.code;
return { selectdata, selectcode };
}
addsncode: any = '';
@MutationAction
async addSnCorrelationBarcode(params: any) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.addSnCorrelationBarcode, params);
const addsncode = result.code;
return { addsncode };
}
delsncode: any = '';
@MutationAction
async deletSnCorrelationBarcode(params: any) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.deletSnCorrelationBarcode, {
siteCode: session.FactoryCode,
storageId: params,
});
const delsncode = result.code;
return { delsncode };
}
}
export default getModule(SalesReturn);

@ -0,0 +1,722 @@
<template>
<view class="page-product-receipt">
<view class="header" :style="{ backgroundColor: `rgba(250, 53, 52, ${scrollTop / 100})` }">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</view>
<view class="title">调拨出库</view>
<view class="right"></view>
</view>
<view class="fiexdcontent">
<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>
</view>
<!-- <view class="single-right">
<u-button type="primary" @click="tidan"></u-button>
</view> -->
</view>
<!-- 行项目 -->
<u-form-item label="行项目">
<jPicker sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="aimWl.value" :options="materilist" />
</u-form-item>
<!-- 订单 -->
<u-form-item label="产品编码">
<view>{{ orderNoItemList.productCode }}</view>
</u-form-item>
<view class="row-list-top">
<view style="width: 60%" class="row-list-item-top">
<view style="width: 50%" class="list-item-top"> 出库仓库: </view>
<jPicker sureColor="#ff0000" @bindpicker="wlChange" showKey="label" valKey="value" :val="cimWl.value" :options="warehouselist" />
</view>
<view class="row-list-item-top">
<view class="list-item-top"> 工厂: </view>
<view> {{ session.FactoryCode }} </view>
</view>
</view>
<!-- 机台 -->
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form>
<u-form style="margin-top: 1rpx" class="form3">
<view class="list">
<view class="row-list">
<view class="list-item"> 产品编码: </view>
<view> {{ orderNoItemList && orderNoItemList.productCode }} </view>
</view>
<view class="row-list">
<view class="list-item"> 产品名称: </view>
<view> {{ orderNoItemList && orderNoItemList.productName }} </view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 订单数量: </view>
<view> {{ orderNoItemList && orderNoItemList.planQuantity }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 单位: </view>
<view> {{ orderNoItemList && orderNoItemList.unitOfMeasure }} </view>
</view>
</view>
<view class="row-list">
<view class="list-item">捡货数量: </view>
<view> {{ outnumber }} </view>
</view>
</view>
</u-form>
<u-form class="form4">
<u-radio-group v-model="selectvalue" style="width: 100%" @change="radioGroupChange">
<u-radio style="width: 50%" v-for="(item, index) in Radiolist" :key="index" :name="item.code" :disabled="item.disabled">
{{ item.name }}
</u-radio>
</u-radio-group>
<u-search placeholder="请扫描条码" @search="addlist" v-model="boxnumber" :show-action="false"></u-search>
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
</u-form>
</view>
<view style="height: 14rpx"></view>
<view class="scroll">
<view v-for="(item, index) in list" :key="item.id">
<u-form style="margin-top: 10rpx" class="form2">
<view class="list">
<view class="rowleft">
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 托盘号: </view>
<view>{{ item.sn }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 箱码: </view>
<view> {{ item.barcode }} </view>
</view>
</view>
<view class="row-list">
<view class="row-list-item-row">
<view class="list-item"> 库位码: </view>
<view> {{ item.wlCode }} </view>
</view>
<!-- <view class="row-list-item">
<view class="list-item"> 出库数量: </view>
<view> </view>
</view> -->
</view>
</view>
<view class="rowright">
<view class="righttitle">
<view @click.stop="ondelete(item, index)" class="boder-icon-rigth"> 删除 </view>
</view>
</view>
</view>
</u-form>
</view>
</view>
<view class="bottom-bar">
<u-row class="button-bar">
<!-- 确定 -->
<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>
<u-toast ref="uToast" />
</view>
</template>
<script lang="ts">
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';
interface OptionType {
label: string;
value: string;
}
//import { session } from '@/store/modules/session';
@Component({
components: {
jPicker,
},
})
export default class TransferWarehouse extends BasePage {
model = model;
list: any = [];
productCodebiaozhiwei = '';
cimWl = {} as OptionType;
aimWl: any = {};
boxnumber: any = '';
materilist = [];
// remove: any = {};
// async onReady() {
// await this.model.queryLocation();
// this.remove = this.model.WlList[0];
// }
// selectItem(e: any) {
// this.remove = e.pickerName;
// }
orderNo: any = '';
border = true;
orderNoItemList: any = [];
showProduceCodeList: any = [];
itemdetail: any = '';
outnumber: any = 0;
warehouselist = [];
Radiolist = [
{
code: 0,
name: '整托扫描',
disabled: false,
},
{
code: 1,
name: '单箱扫描',
disabled: false,
},
];
selectvalue: any = 0;
async onLoad() {
await this.model.getwarehouselist();
this.warehouselist = model.warehouselist;
this.cimWl = this.warehouselist[0];
}
bookTypeChange(e: any) {
this.aimWl = e.pickerName;
this.orderNoItemList = e.pickerName;
this.list = [];
this.outnumber = this.orderNoItemList.outQuantity;
}
wlChange(e: any) {
this.cimWl = e.pickerName;
}
// radioradio-group
radioGroupChange(e) {
console.log(e);
console.log('selectvalue', this.selectvalue);
}
//
async ondelete(item, index) {
console.log('this.list', Array.isArray(this.list));
const newList = [...this.list]; //
newList.splice(index, 1); // splice
this.list = newList; //
(this.$refs.uToast as any).show({
title: '删除成功',
type: 'success',
});
console.log('this.outnumber', this.outnumber);
this.outnumber = this.outnumber - 1;
}
//
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入出库单号',
// url: '/pages/user/index'
});
return;
}
await this.model.showProduceCode(this.orderNo);
if (model.orderNoItemList) {
this.materilist = [];
//let a: any = {};
this.model.orderNoItemList.forEach((item) => {
item.label = item.itemNumber;
item.value = item.itemNumber;
this.materilist.push(item);
});
this.aimWl.value = this.materilist[0].value;
this.orderNoItemList = this.materilist[0];
this.outnumber = this.orderNoItemList.outQuantity;
} else {
this.materilist = [];
}
}
async addlist() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入出库单号',
// url: '/pages/user/index'
});
return;
}
if (this.aimWl.value == '' || this.aimWl.value.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入选择行项目',
// url: '/pages/user/index'
});
return;
}
if (this.selectvalue == 0) {
//
let item: any = {};
item.sn = this.boxnumber;
item.siteCode = session.FactoryCode;
await this.model.ScanCodeWholePallet(item);
if (this.model.scanCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
// if(this.productCodebiaozhiwei == ''){
// this.productCodebiaozhiwei = model.scandatalist[0].productCode;
// }
model.scandatalist.map((item) => {
if (item.productCode == this.orderNoItemList.productCode) {
this.list.push({ sn: item.sn, barcode: item.barcode, wlCode: item.wlCode, storageId: item.storageId });
this.outnumber += 1;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
});
// this.list.push()
this.boxnumber = '';
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.boxnumber = '';
}
} else if (this.selectvalue == 1) {
let item: any = {};
item.barcode = this.boxnumber;
item.siteCode = session.FactoryCode;
await this.model.ScanCodeSingleBox(item);
if (this.model.scanCode == '200') {
// if(this.productCodebiaozhiwei == ''){
// this.productCodebiaozhiwei = model.scandatalist[0].productCode;
// }
let scandata = model.scandata;
if (this.orderNoItemList.productCode == scandata.productCode) {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.list.push({ sn: scandata.sn, barcode: scandata.barcode, wlCode: scandata.wlCode, storageId: scandata.storageId });
this.outnumber += 1;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
this.boxnumber = '';
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.boxnumber = '';
}
}
// //
// await this.model.queryOrderNo(this.form5);
// this.list = model.orderNoItemList;
}
async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请输入出库单号',
// url: '/pages/user/index'
});
return;
}
if (this.list.length == 0 || this.list == '') {
(this.$refs.uToast as any).show({
title: '请先扫描箱码',
// url: '/pages/user/index'
});
return;
}
if (this.orderNoItemList.planQuantity < this.outnumber) {
(this.$refs.uToast as any).show({
title: '实际数量不能超过计划数量',
// url: '/pages/user/index'
});
return;
}
//this.list[0].outnumber = this.outnumber;
let item = {
factoryCode: session.FactoryCode,
// whCode: this.cimWl.value,
id: this.orderNoItemList.id,
productCode: this.orderNoItemList.productCode,
productName: this.orderNoItemList.productName,
wmsProductPutTrayCodeList: this.list,
};
await this.model.out(item);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.list = [];
this.query();
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
}
}
}
</script>
<style lang="scss" scoped>
.page-product-receipt {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #f8262c 51%, #d9001b 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 0rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 120rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
padding: 45rpx 0rpx 0rpx;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.fiexdcontent {
position: fixed;
width: 92%;
box-shadow: 0 0 14px 0 rgb(128 128 128 / 46%);
z-index: 100;
}
.form {
background-color: #fff;
padding: 30rpx;
border-radius: 10rpx;
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 20rpx 0;
line-height: 35rpx;
.Transfer {
width: 280rpx;
height: 64rpx;
background: rgb(242, 242, 242);
border-radius: 110rpx;
}
}
.single {
width: 100%;
height: 60rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 142rpx;
height: 100%;
line-height: 55rpx;
}
}
.single-right {
button {
// margin-top: 15rpx;
width: 140rpx;
height: 70rpx;
background-color: #fa3534;
}
}
}
.row {
display: flex;
flex-direction: row;
justify-content: space-around;
flex: 1;
}
.row-list-top {
display: flex;
flex-direction: row;
width: 100%;
.row-list-item-top {
display: flex;
flex-direction: row;
// width:50%;
}
}
}
.form3 {
background-color: #fff;
padding: 25rpx 25rpx 25rpx;
border-radius: 10rpx;
//box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
//color: #8d8989;
// .list {
// display: flex;
// flex-direction: row;
// }
.row-list {
display: flex;
flex-direction: row;
justify-content: space-between;
.row-list-item {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 40%;
}
.list-item {
display: flex;
flex-direction: row;
flex: 1;
}
}
.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;
}
}
}
.form4 {
background-color: #fff;
padding: 18rpx;
border-radius: 10rpx;
margin-top: 2rpx;
.u-input__input {
min-height: 36px;
}
}
.scroll {
// margin-top: 2rpx;
height: 430rpx;
position: absolute;
width: 92%;
top: 780rpx;
/* bottom: 40px; */
overflow: auto;
.form2 {
background-color: #fff;
padding: 25rpx 25rpx 25rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
color: #8d8989;
.list {
display: flex;
flex-direction: row;
.rowleft {
width: 80%;
.row-list {
display: flex;
flex-direction: row;
justify-content: space-between;
.row-list-item {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 40%;
}
.row-list-item-row {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 60%;
}
.list-item {
display: flex;
flex-direction: row;
flex: 1;
}
}
}
.rowright {
width: 20%;
display: flex;
justify-content: right;
.righttitle {
width: 60%;
background-color: #8d898947;
color: red;
text-align: center;
/* margin: auto; */
height: 100%;
line-height: 70rpx;
}
}
}
// .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: -27rpx;
// 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;
// }
// }
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.button-bar {
}
.photoList {
display: flex;
padding-top: 12rpx;
.chooseBtn {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
border: 2rpx dashed #e2e2e2;
display: flex;
justify-content: center;
align-items: center;
.inner {
text-align: center;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.desc {
font-size: 28rpx;
font-weight: 400;
color: #24252a;
line-height: 40rpx;
}
.img {
width: 50rpx;
height: 50rpx;
margin-bottom: 6rpx;
}
}
.photoBox {
width: 202rpx;
height: 202rpx;
background: #fafafa;
border-radius: 12rpx;
position: relative;
.closeBtn {
position: absolute;
top: -12rpx;
right: -12rpx;
z-index: 2;
width: 36rpx;
height: 36rpx;
.img {
width: 36rpx;
height: 36rpx;
}
}
.img {
width: 202rpx;
height: 202rpx;
border-radius: 12rpx;
}
}
.itemBox {
flex: 0 0 202rpx;
margin-right: 20rpx;
&:last-child {
margin-right: 0;
}
}
// /deep/ .remarksBox textarea {
// font-size: 24rpx;
// }
}
}
</style>

@ -0,0 +1,71 @@
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'page.product.TransferWarehouse',
})
export class TransferWarehouse extends VuexModule {
orderNoItemList: any = [];
@MutationAction
async showProduceCode(orderNo: any) {
const result: any = await http.post(url.lanjuwms.product.TransferWarehouse.selectFinishedProductTransferAndOutbound, {
deliveryOrder: orderNo,
factoryCode: session.FactoryCode,
});
const orderNoItemList = result.data;
return { orderNoItemList };
}
SubmitCode: any = '';
@MutationAction
async selloutconntray(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.selloutconntray, params);
const SubmitCode = result.code;
return { SubmitCode };
}
@MutationAction
async out(params: any) {
const result: any = await http.post(url.lanjuwms.product.TransferWarehouse.confirmFinishedProductTransferAndOutbound, params);
const SubmitCode = result.code;
return { SubmitCode };
}
scanCode: any = '';
scandatalist: any = [];
scandata: any = {};
//整托
@MutationAction
async ScanCodeWholePallet(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.ScanCodeWholePallet, params);
const scanCode = result.code;
const scandatalist = result.data;
return { scanCode, scandatalist };
}
//单箱
@MutationAction
async ScanCodeSingleBox(params: any) {
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.ScanCodeSingleBox, params);
const scanCode = result.code;
const scandata = result.data;
return { scanCode, scandata };
}
warehouselist: any = [];
@MutationAction
async getwarehouselist() {
const result = await http.post(url.lanjuwms.raw.ProductionREQ.warehouselist, {
factoryCode: session.FactoryCode,
});
const warehouselist = result.data.map((element: any) => ({
label: element.warehouseName,
value: element.warehouseCode,
...element,
}));
return { warehouselist };
}
}
export default getModule(TransferWarehouse);

@ -0,0 +1,28 @@
import { Action, getModule, Module, Mutation, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
export interface salesreturn {
kuwei?: string;
list?: any[];
index?: string;
//rowitem?: string;
}
@Module({
dynamic: true,
store,
namespaced: true,
name: 'data',
})
class usedataService extends VuexModule {
salesreturndata: salesreturn | null = null;
@Mutation
salesreturn(data: salesreturn) {
this.salesreturndata = data;
}
@Action
cacheData(data: salesreturn) {
this.context.commit('salesreturn', data);
}
}
export const usedata = getModule(usedataService);

@ -39,5 +39,8 @@ export const page = {
WhiteOutstorage: '/pages/wms/WhiteManagement/WhiteOutstorage/index',
TransferInlibrary: '/pages/wms/WhiteManagement/TransferInlibrary/index',
WhiteReturn: '/pages/wms/WhiteManagement/WhiteReturn/index',
SalesReturn: '/pages/wms/product/SalesReturn/index',
SalesReturndetail: '/pages/wms/product/SalesReturn/detail',
TransferWarehouse: '/pages/wms/product/TransferWarehouse/index',
},
};

@ -65,6 +65,22 @@ export const url = {
showTrays: qianzhuione + '/wms/selloutconntray/showTrays',
// 手持出库确认
out: qianzhuione + '/wms/selloutconntray/out',
//销售出库整托扫码
ScanCodeWholePallet: qianzhuione + '/wms/WmsToWCSmission/ScanCodeWholePallet',
//销售出库单箱扫码
ScanCodeSingleBox: qianzhuione + '/wms/WmsToWCSmission/ScanCodeSingleBox',
//销售出库查询
selectQueryFinishedProductSales: qianzhuione + '/wms/WmsToWCSmission/selectQueryFinishedProductSales',
//销售出库确认
confirmFinishedProductSales: qianzhuione + '/wms/WmsToWCSmission/confirmFinishedProductSales',
},
SalesReturn: {
FinishedProductSalesReturn: qianzhuione + '/wms/WmsToWCSmission/FinishedProductSalesReturn',
FinishedProductSalesReturnConfirm: qianzhuione + '/wms/WmsToWCSmission/FinishedProductSalesReturnConfirm',
},
TransferWarehouse: {
selectFinishedProductTransferAndOutbound: qianzhuione + '/wms/WmsToWCSmission/selectFinishedProductTransferAndOutbound',
confirmFinishedProductTransferAndOutbound: qianzhuione + '/wms/WmsToWCSmission/confirmFinishedProductTransferAndOutbound',
},
},
raw: {

Loading…
Cancel
Save