Commit f4a5dc63 authored by tanjunxin's avatar tanjunxin

merge: 解决合并冲突

parents 4887a5c8 bdbb2890
...@@ -49,6 +49,13 @@ const install = (Vue, vm) => { ...@@ -49,6 +49,13 @@ const install = (Vue, vm) => {
getforinvmbinfo: (params = {}) => vm.$u.postJson(config.adminPath + '/invmb/getforinvmbinfo', params), getforinvmbinfo: (params = {}) => vm.$u.postJson(config.adminPath + '/invmb/getforinvmbinfo', params),
// 入库单创建 // 入库单创建
createforstorage: (params = {}) => vm.$u.postJson(config.adminPath + '/sfctb/createforstorage', params), createforstorage: (params = {}) => vm.$u.postJson(config.adminPath + '/sfctb/createforstorage', params),
stockSaleOutList: (params = {}) => vm.$u.postJson(config.adminPath + '/stockSaleOut/list', params),
stockList: (params = {}) => vm.$u.postJson(config.adminPath + '/stockSaleOut/stockList', params),
confirmStock: (params = {}) => vm.$u.postJson(config.adminPath + '/stockSaleOut/confirm', params),
getforinvmlinfo: (params = {}) => vm.$u.postJson(config.adminPath + '/invml/getforinvmlinfo', params),
validateArrival: (params = {}) => vm.$u.postJson(config.adminPath + '/stockArrival/validate', params),
confirmArrival: (params = {}) => vm.$u.postJson(config.adminPath + '/stockArrival/confirm', params),
warehouseList: (params = {}) => vm.$u.postJson(config.adminPath + '/warehouseArrive/list', params),
// 查询产品库存 // 查询产品库存
getforinvmlinfoApi: (params = {}) => vm.$u.postJson(config.adminPath + '/invml/getforinvmlinfo', params), getforinvmlinfoApi: (params = {}) => vm.$u.postJson(config.adminPath + '/invml/getforinvmlinfo', params),
// 新增库存交易单 // 新增库存交易单
...@@ -63,6 +70,7 @@ const install = (Vue, vm) => { ...@@ -63,6 +70,7 @@ const install = (Vue, vm) => {
} }
export default { export default {
install install
} }
...@@ -141,6 +141,42 @@ ...@@ -141,6 +141,42 @@
"失败": "ล้มเหลว", "失败": "ล้มเหลว",
"未知错误": "ข้อผิดพลาดที่ไม่รู้จัก", "未知错误": "ข้อผิดพลาดที่ไม่รู้จัก",
"获取用户语言失败": "ล้มเหลวในการรับภาษาผู้ใช้", "获取用户语言失败": "ล้มเหลวในการรับภาษาผู้ใช้",
"录入到货单": "ใส่ลงในใบส่งสินค้า",
"供应商代码": "รหัสผู้ขาย",
"到货供应商": "ผู้จัดจำหน่ายขาเข้า",
"到货明细": "รายละเอียดการมาถึง",
"一个到货单无法录入两个供应商订单": "ใบสั่งซื้อสินค้าหนึ่งใบไม่สามารถป้อนคำสั่งซื้อของผู้จำหน่ายสองรายได้",
"销售出库": "การขายออกจากคลัง",
"销货单创建": "การสร้างใบขาย",
"请扫描单号": "กรุณาสแกนหมายเลขเดี่ยว",
"步骤一 扫描单号": "ขั้นตอนที่ 1 สแกนหมายเลขเดียว",
"摄像头对准": "การจัดตำแหน่งกล้อง",
"出货通知单号二维码": "หมายเลขใบแจ้งการจัดส่ง QR Code",
"点击扫描或": "คลิกสแกน หรือ",
"点选单号": "ชี้หมายเลขแผ่น",
"交货单:{0}": "การจัดส่ง: {0}",
"拣货明细": "รายละเอียดการหยิบสินค้า",
"计划出库日期:{0}": "กำหนดวันออกจากคลังสินค้า: {0}",
"请扫描盘点条码": "กรุณาสแกนบาร์โค้ด",
"返回": "กลับ",
"提交": "ส่ง",
"保存成功": "บันทึกความสำเร็จ",
"产品编号:{0}": "รหัสสินค้า: {0}",
"产品名称:{0}": "ชื่อสินค้า: {0}",
"领料": "ปลอกคอ",
"未配货": "ไม่จัดส่ง",
"库存明细": "รายละเอียดสินค้าคงคลัง",
"选择库存": "เลือกสินค้า",
"库房/储位:{0}|{1}": "คลังสินค้า / พื้นที่จัดเก็บ: {0}} {1}",
"库存数:{0}pcs": "จำนวนสต็อก: {0}pcs",
"出货数:": "จำนวนการจัดส่ง:",
"库存数:": "จำนวนสต็อก:",
"采购到货": "ซื้อมาถึง",
"到货仓": "ไปยังคลังสินค้า",
"请选择到货仓": "กรุณาเลือกไปยังคลังสินค้า",
"确认成功": "ยืนยันความสำเร็จ",
"到货确认": "ยืนยันการมาถึง",
"确认": "ยืนยัน",
"提交成功": "ส่งเรียบร้อยแล้ว", "提交成功": "ส่งเรียบร้อยแล้ว",
"提交失败": "การส่งล้มเหลว", "提交失败": "การส่งล้มเหลว",
"请勿重复提交": "ไม่ยื่นซ้ำซ้อน", "请勿重复提交": "ไม่ยื่นซ้ำซ้อน",
......
...@@ -141,6 +141,42 @@ ...@@ -141,6 +141,42 @@
"失败": "失败", "失败": "失败",
"未知错误": "未知错误", "未知错误": "未知错误",
"获取用户语言失败": "获取用户语言失败", "获取用户语言失败": "获取用户语言失败",
"录入到货单": "录入到货单",
"供应商代码": "供应商代码",
"到货供应商": "到货供应商",
"到货明细": "到货明细",
"一个到货单无法录入两个供应商订单": "一个到货单无法录入两个供应商订单",
"销售出库": "销售出库",
"销货单创建": "销货单创建",
"请扫描单号": "请扫描单号",
"步骤一 扫描单号": "步骤一 扫描单号",
"摄像头对准": "摄像头对准",
"出货通知单号二维码": "出货通知单号二维码",
"点击扫描或": "点击扫描或",
"点选单号": "点选单号",
"交货单:{0}": "交货单:{0}",
"拣货明细": "拣货明细",
"计划出库日期:{0}": "计划出库日期:{0}",
"请扫描盘点条码": "请扫描盘点条码",
"返回": "返回",
"提交": "提交",
"保存成功": "保存成功",
"产品编号:{0}": "产品编号:{0}",
"产品名称:{0}": "产品名称:{0}",
"领料": "领料",
"未配货": "未配货",
"库存明细": "库存明细",
"选择库存": "选择库存",
"库房/储位:{0}|{1}": "库房/储位:{0}|{1}",
"库存数:{0}pcs": "库存数:{0}pcs",
"出货数:": "出货数:",
"库存数:": "库存数:",
"采购到货": "采购到货",
"到货仓": "到货仓",
"请选择到货仓": "请选择到货仓",
"确认成功": "确认成功",
"到货确认": "到货确认",
"确认": "确认",
"提交成功": "提交成功", "提交成功": "提交成功",
"提交失败": "提交失败", "提交失败": "提交失败",
"请勿重复提交": "请勿重复提交", "请勿重复提交": "请勿重复提交",
......
...@@ -205,6 +205,34 @@ ...@@ -205,6 +205,34 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/dhd/Main",
"style": {
"navigationBarTitleText": "到货单",
"enablePullDownRefresh": false
}
},
{
"path": "pages/saleck/Main",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/saleck/saleckList",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{
"path": "pages/saleck/selectCK",
"style": {
"navigationBarTitleText": "销售出库",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/stockTransfer/index", "path": "pages/stockTransfer/index",
"style": { "style": {
......
<template>
<view class="page">
<StickyNavBar>
<NavBar :title="$t('录入到货单')"></NavBar>
</StickyNavBar>
<view style="padding: 0 10px;">
<u-form ref="daohuoForm" :modelValue="daohuoForm" :rules="rules" labelWidth="200">
<u-form-item prop="warehouse" class="under" :label="$t('到货仓')">
<uni-data-select
v-model="daohuoForm.warehouse"
:clear="false"
:localdata="typeData"
></uni-data-select>
</u-form-item>
<u-form-item prop="supplierNo" class="under" :label="$t('到货供应商')">
<input
v-model="input"
type="text"
@confirm="inputCC"
:placeholder="$t('供应商代码')"
>
</input>
</u-form-item>
</u-form>
<view v-if="goodsList.length > 0">{{$t('到货明细')}}</view>
</view>
<ContentLoadingMore class="cardbox" :list="goodsList">
<view class="cardContent" v-for="(item, index) in goodsList">
<scanningList
:item="item"
:idx="index"
@deleGonds="deleGonds"
/>
</view>
</ContentLoadingMore>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
</view>
</template>
<script>
import i18n from '../../lang/index'
import scanningList from "./scanningList.vue";
import BottomBtn from "@/components/BottomBtn/index.vue";
import StickyNavBar from "@/components/StickyNavBar/index.vue";
import ContentLoadingMore from "@/components/ContentLoadingMore/index.vue";
export default {
components: {
StickyNavBar,
scanningList,
BottomBtn,
ContentLoadingMore,
},
data() {
return {
number: 0,
totalNum: 0,
show: true,
goodsList: [],
typeData: [],
btnArr: [
{
style: "",
type: "warning",
text: i18n.t('返回'),
way: "goBack",
},
{
style: "",
type: "primary",
text: i18n.t('到货确认'),
way: "goSubmit",
},
],
wxparams: "",
input: '',
loading: false,
daohuoForm: {
supplierNo: "",
warehouse: null
},
rules: {
supplierNo: { required: true,type: 'string', trigger: ['blur'], errorMessage: "11" },
purchaseType: { required: true, type: 'string',trigger: ['blur'], errorMessage: "11" }
},
}
},
created() {
this.warehouseList()
},
methods: {
warehouseList() {
this.$u.api.warehouseList().then(res => {
if(res.success) {
this.typeData = res.data.map(v => ({text: v.warehouseName, value: v.warehouseName}))
}
})
},
getBtnHandle(row) {
this[row.way]();
},
goBack() {
uni.navigateBack();
},
async inputCC(e){
if(e && e.detail.value) {
// 2028-330-20250106001-0019-A1010004-5
if(e.detail.value.includes("-")){
const arr = e.detail.value.split("-")
if (arr.length === 6) {
if (arr[0] !== this.daohuoForm.supplierNo && this.daohuoForm.supplierNo) return this.$u.toast(i18n.t('一个到货单无法录入两个供应商订单'))
const data = await this.$u.api.validateArrival({
"materialNo": arr[4],
"purchaseNo": arr[2],
"purchaseSerial": arr[3],
"purchaseType": arr[1]
})
if (!data.success) return
const index = this.goodsList.findIndex(v => v.joinlabel === arr.slice(0, 5).join('-'))
if (index > -1) {
this.goodsList[index]['arrivalQuantity'] = Number(this.goodsList[index]['arrivalQuantity']) + Number(arr[5])
} else {
const data1 = await this.$u.api
.getforinvmbinfo({
mb001: arr[4]
})
this.goodsList.push({
supplierNo: arr[0],
purchaseType: arr[1],
purchaseNo: arr[2],
purchaseSerial: arr[3],
materialNo: arr[4],
arrivalQuantity: arr[5],
udf07: data1.data['udf07'],
mb002: data1.data['mb002'],
joinlabel: arr.slice(0, 5).join('-')
})
}
this.input = ''
this.daohuoForm.supplierNo = arr[0]
}
} else {
}
}
},
deleGonds(idx) {
this.goodsList.splice(idx, 1);
},
goSubmit(){
if (!this.goodsList.length) return;
if(!this.daohuoForm.warehouse) return this.$u.toast(i18n.t('请选择到货仓'));
this.loading = true;
this.$u.api.confirmArrival({
warehouse: this.daohuoForm.warehouse,
details: this.goodsList.map(v => ({arrivalQuantity: v.arrivalQuantity, materialNo: v.materialNo, purchaseNo: v.purchaseNo, purchaseSerial: v.purchaseSerial, purchaseType: v.purchaseType, supplierNo: v.supplierNo}))
})
.then(res => {
this.loading = false;
if (res.success) {
this.$u.toast(i18n.t('确认成功'));
this.goodsList = []
this.daohuoForm.supplierNo = ''
} else {
this.$u.toast(res.errorMessage);
}
});
}
},
};
</script>
<style lang="scss" scoped>
.page {
background: #fff;
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.cardbox {
border: 1px solid #dadde2;
border-radius: 5px;
background: #f3f3f5;
margin: 0rpx 20rpx;
margin-top: 20rpx;
}
.cardContent {
border-radius: 8px;
background: #fff;
margin-top: 20rpx;
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
page {
position: relative;
width: 100%; height: 100%;
}
.cardbox {
min-height: calc(100vh - 520rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
</style>
\ No newline at end of file
<template>
<view>
<view class="listItemTitle">
<view class="item" style="border-bottom: 1px solid #d8dbdf;">
<view>{{item.purchaseNo}}|{{item.purchaseSerial}}</view>
<view>{{item.arrivalQuantity}}pcs
<text style="margin-left: 40rpx"><u-icon name="minus" color="#000" size="32" @click="deleGonds(idx)"></u-icon></text>
</view>
</view>
<view class="item">
<view>品号:{{item.materialNo}}</view>
</view>
<view class="item">品名:{{ item.mb002 }}</view>
<view class="item">图号:{{ item.mb029 }}</view>
</view>
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn
},
props: {
item: {
type: Object,
default: function () {
return {};
}
},
idx: {
type: Number,
default: 0
}
},
computed:{
},
data() {
return {
show: true
};
},
created() {
},
methods: {
deleGonds(idx) {
this.$emit('deleGonds',idx)
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.headerTitle {
padding: 20rpx;
font-weight: 600;
.items {
line-height: 40rpx;
}
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.listItemTitle {
width: 100%;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
width: 100%;
line-height: 50rpx;
color: #333;
display: flex;
justify-content: space-between;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
font-weight: 600;
}
}
.listBottom {
.bottomTitle {
height: 80rpx;
position: relative;
.desc {
color: #bbb;
font-size: 24rpx;
line-height: 80rpx;
padding-left: 20rpx;
}
.topIcons {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #aaa;
}
}
.bottomBox {
padding: 20rpx;
.bottomItem {
background: #f8f8f8;
padding: 20rpx;
margin-bottom: 20rpx;
.items {
color: #333;
font-size: 24rpx;
line-height: 40rpx;
/deep/ .uni-easyinput{
width: 200rpx;
}
}
.inputItem{
display: inline-flex;
// line-height: 76rpx;
}
}
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
...@@ -68,6 +68,16 @@ import i18n from '../../lang/index' ...@@ -68,6 +68,16 @@ import i18n from '../../lang/index'
text: i18n.t('品号信息'), text: i18n.t('品号信息'),
url: '/pages/invmbinfo/Main' url: '/pages/invmbinfo/Main'
}, },
{
src: require('@/static/images/keyin.png'),
text: i18n.t('采购到货'),
url: '/pages/dhd/Main'
},
{
src: require('@/static/images/item.png'),
text: i18n.t('销售出库'),
url: '/pages/saleck/Main'
},
{ {
src: require('@/static/images/keyin.png'), src: require('@/static/images/keyin.png'),
text: i18n.t('库存调拨'), text: i18n.t('库存调拨'),
......
<template>
<view>
<StickyNavBar>
<NavBar :title="$t('销售出库')"></NavBar>
<view class="btn">
<uni-easyinput
prefixIcon="search"
:disabled="isDisabled"
v-model="wxparams"
:focus="isFocus"
:placeholder="$t('请扫描单号')"
@confirm="handleConfirm"
></uni-easyinput>
</view>
</StickyNavBar>
<view class="cardBox">
<text class="cardBoxTip">{{$t('步骤一 扫描单号')}}</text>
<u-image class='cardBoxImg' :src="bgSrc" width="560rpx" height="400rpx"></u-image>
<view class="cardBoxTip2">{{$t('摄像头对准')}}</view>
<view class="cardBoxTip3">{{$t('出货通知单号二维码')}}</view>
<view class="cardBoxTip2">
<text class="tipLeft">{{$t('点击扫描或')}}</text>
<text class="tipRight">{{$t('点选单号')}}</text>
</view>
</view>
</view>
</template>
<script>
import i18n from '../../lang/index'
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore
},
data() {
return {
bgSrc: require('@/static/images/qrcode.png'),
wxparams: '',
isFocus: false,
isDisabled: false
};
},
created() {
},
methods: {
handleConfirm(e) {
this.isFocus = false;
e && this.getPlnr(e);
// uni.navigateTo({
// url: `/pages/saleck/saleckList?order=${e}`
// });
},
getPlnr(VBELN) {
this.$u.api
.stockSaleOutList({
saleOutNo: VBELN
})
.then(({data, errorMessage}) => {
setTimeout(() => {
this.isFocus = true;
}, 1000);
if (data && data.applyNo) {
uni.navigateTo({
url: `/pages/saleck/saleckList?order=${VBELN}`
});
} else {
// 删除本地缓存的单号
this.$u.toast(errorMessage);
}
this.loading = false;
});
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.cardBox {
min-height: calc(100vh - 400rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
font-size: 28rpx;
}
.cardBoxTip2{
color: #000;
font-size: 28rpx;
text-align: center;
}
.cardBoxTip3{
color: #3f9dcc;
font-size: 28rpx;
text-align: center;
}
.tipRight{
color: #ff9900;
}
</style>
\ No newline at end of file
<template>
<view>
<ContentLoadingMore class="cardbox" :loadmore='true' :status="status" :list='goodsList'>
<view class="cardContent" v-for="(item, index) in goodsList">
<view class="listItemTitle" @click="handleClick(item)">
<view>
<view class="item">{{$t('产品编号:{0}', [ item.ml001 ])}}</view>
<!-- <view class="item">物料编号:{{ item.sapItemCode }}</view> -->
<!-- <view class="item">物料描述:{{ item.itemName }}</view> -->
<view class="item">{{$t('产品名称:{0}', [ item.materialName ])}}</view>
<view class="item">{{$t('库房/储位:{0}|{1}', [ item.ml002 , item.ml003 ])}}</view>
<view class="item">{{$t('库存数:')}}{{item.ml005}}</view>
</view>
</view>
</view>
</ContentLoadingMore>
<!-- <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn> -->
</view>
</template>
<script>
import i18n from '../../../lang/index'
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
export default {
components: {
ContentLoadingMore
},
props: {
order: {
type: String
},
currentKc: {
type: Object
}
},
data() {
return {
number: 0,
totalNum: 0,
show: true,
nlpla: '',
wxparams: '',
goodsList: [],
pagination: {
pageNum:1,
pageSize:10,
},
total: 0,
status: 'loadmore'
};
},
activated() {
if(this.order) {
this.getPlnr(this.order);
}
},
methods: {
handleClick(item){
},
getPlnr(order) {
this.totalNum = 0;
if (this.currentKc) {
this.$u.api
.getforinvmlinfo({
ml001: this.currentKc.materialNo
}).then((res) => {
if (res && res.success) {
this.goodsList = res.data;
} else {
this.$u.toast(res.msg);
}
})
} else {
this.$u.api
.stockList({
saleOutNo: order
})
.then((res) => {
if (res && res.success) {
this.goodsList = res.data;
} else {
this.$u.toast(res.msg);
}
});
}
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.cardbox {
min-height: calc(100vh - 540rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
.cardContent {
border-radius: 8px;
background: #fff;
margin-bottom: 20rpx;
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #000;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
}
}
.listBottom {
.bottomTitle {
height: 80rpx;
position: relative;
.desc {
color: #bbb;
font-size: 24rpx;
line-height: 80rpx;
padding-left: 20rpx;
}
.topIcons {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #aaa;
}
}
.bottomBox {
padding: 20rpx;
.bottomItem {
background: #f8f8f8;
padding: 20rpx;
margin-bottom: 20rpx;
.items {
color: #333;
font-size: 24rpx;
height: 40rpx;
line-height: 40rpx;
}
}
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
</style>
\ No newline at end of file
<template>
<view class="page">
<view class="listItemTitle">
<view @click="handleDetail(null)">
<view class="item">{{$t('交货单:{0}', [ applyNo ])}}</view>
</view>
</view>
<view class="listBottom">
<view class="bottomTitle">
<view class="desc">{{$t('拣货明细')}}</view>
</view>
<view class="bottomBox">
<view class="bottomItem" v-for="(ele, idx) in goodlist" :key="ele.materialNo+idx" >
<view class="box-top">
<view class="left">
<view class="items">{{ ele.materialNo }}|{{ ele.materialName }}</view>
<view class="items">{{$t('计划出库日期:{0}', [ ele.planOutDate ])}}</view>
</view>
<view class="right">
<u-icon name="plus" color="#000" size="32" @click="addKC(ele)"></u-icon>
<view class="items">{{outQuantity(ele.materialNo)}}/{{ele.deliverQuantity}}pcs</view>
</view>
</view>
<view class="detail-box">
<template v-for="(item, index) in list">
<view class="detail-line-wrap" v-if="item.materialNo === ele.materialNo && item.outQuantity" :key="item.materialNo + '444' + index" @click="handleDetail(item)">
<view class="detail-line">
<text>{{item.warehouse}}|{{item.location}}</text>
<text style="margin-left: auto">{{item.outQuantity}}pcs</text>
</view>
</view>
</template>
</view>
</view>
</view>
</view>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
</view>
</template>
<script>
import i18n from '../../../lang/index'
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn
},
props: {
order: {
type: String
},
},
data() {
return {
r1:'',
number: 0,
totalNum: 0,
show: false,
applyNo: '',
wxparams: '',
list: [],
goodlist: [],
btnArr: [
{
style: '',
type: 'warning',
text: i18n.t('返回'),
way: 'goBack'
},
{
style: '',
type: 'primary',
text: i18n.t('确认'),
way: 'goSubmit'
}
],
isFocus: false,
show: true,
};
},
computed: {
},
created () {
uni.$on('sendkcData', (data, info) => {
data.forEach((vvvv) => {
if (vvvv.outQuantity) {
this.list.push({
"deliverQuantity": info.deliverQuantity,
"location": vvvv.ml003,
"materialName": info.materialName,
"materialNo": info.materialNo,
"outQuantity": vvvv.outQuantity,
"planOutDate": info.planOutDate,
"unit": info.materialNo,
"warehouse": vvvv.ml002
})
}
})
});
if(this.order) {
this.$u.api
.stockSaleOutList({
saleOutNo: this.order
})
.then(({data}) => {
if (data && data.applyNo) {
this.applyNo = data.applyNo
this.list = data.data
data.data.forEach(v => {
const index = this.goodlist.findIndex(i => i.materialNo === v.materialNo)
if (index < 0){
this.goodlist.push({
"materialName": v.materialName,
"deliverQuantity": v.deliverQuantity,
"materialNo": v.materialNo,
"planOutDate": v.planOutDate,
"unit": v.unit
})
}
})
}
});
}
},
beforeDestroy() {
// 移除监听事件,防止内存泄漏
uni.$off('sendkcData');
},
methods: {
handleDetail(item){
this.$emit('kcdetail', item)
},
goBack() {
uni.navigateBack();
},
goSubmit() {
if (this.list.length === 0) {
return;
}
const arr = this.list.filter(v => v.outQuantity)
if (arr.length === 0) {
return;
}
this.$u.api.confirmStock({
applyNo: this.applyNo,
data: arr
}).then(res => {
if (res.success) {
this.$u.toast(i18n.t('保存成功'))
uni.navigateBack()
}
})
},
addKC(ele) {
uni.navigateTo({
url: `/pages/saleck/selectCK?info=${encodeURIComponent(JSON.stringify(ele))}`
});
},
getBtnHandle(row) {
this[row.way]();
},
deliverQuantity(materialNo) {
const y = JSON.parse(JSON.stringify(this.list))
const arr = y.filter(i => i.materialNo = materialNo)
return arr.reduce((pre, cur) => pre + Number(cur.deliverQuantity), 0)
},
outQuantity(materialNo) {
const y = JSON.parse(JSON.stringify(this.list))
const arr = y.filter(i => i.materialNo = materialNo)
const num = arr.reduce((pre, cur) => pre + (cur.outQuantity ? Number(cur.outQuantity) : 0), 0)
return isNaN(num) ? 0 : num
},
deleGonds(row, idx) {
this.$emit('deleGonds', row, idx);
},
handleNum(){
let num = 0
this.list.forEach(ele => {
if(ele.ZSIZE === this.item.ZSIZE && ele.MATNR === this.item.MATNR && ele.PLNR){
num += (ele.PACMG-0)
}
});
return num
}
}
};
</script>
<style lang="scss" scoped>
.page {
background: #fff;
}
.headerTitle {
padding: 20rpx;
font-weight: 600;
.items {
line-height: 40rpx;
}
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #333;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
font-weight: 600;
}
}
.listBottom {
background: #f3f3f5;
height: calc(100vh - 290rpx);
overflow: auto;
.bottomTitle {
height: 80rpx;
position: relative;
background: #fff;
.desc {
color: #000;
font-size: 24rpx;
line-height: 80rpx;
padding-left: 20rpx;
}
.topIcons {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #aaa;
}
}
.bottomBox {
padding: 20rpx;
min-height: calc(100% - 520rpx);
overflow: auto;
.bottomItem {
background: #fff;
border: 1px solid #d4d7dc;
border-radius: 5px;
margin-bottom: 20rpx;
position: relative;
.items {
color: #333;
font-size: 24rpx;
line-height: 40rpx;
/deep/ .uni-easyinput{
width: 200rpx;
}
}
.box-top {
padding: 20rpx;
display: flex;
justify-content: space-between;
.right {
text-align: right;
}
}
.detail-box {
padding: 20rpx;
background: #fff;
}
.detail-line-wrap {
&:first-child {
border-top: 1px solid #d4d7dc;
}
}
.detail-line {
background: rgb(243, 243, 245);
display: flex;
padding: 0px 10rpx;
border: 1px solid #d4d7dc;
height: 80rpx;
line-height: 80rpx;
border-radius: 5px;
margin-top: 10px;
}
}
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.boxBtn {
position: absolute;
bottom: 10rpx;
right: 10rpx;
}
.checkedBox{
text-align: right;
}
/deep/ .uni-checkbox-input-disabled:before{
color: #007aff !important;
}
</style>
<template>
<view class="page">
<StickyNavBar>
<u-tabs :list="tabList" :is-scroll="false" :current="current" @change="handleTabChange"></u-tabs>
<keep-alive>
<component :is="tabList[current].comName" :order="order" :currentKc="currentKc" @kcdetail="(v) => currentKc = v"></component>
</keep-alive>
</StickyNavBar>
</view>
</template>
<script>
import i18n from '../../lang/index'
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import lhmx from './components/lhmx.vue';
import kcmx from './components/kcmx.vue';
export default {
components: {
StickyNavBar,
lhmx,
kcmx
},
data() {
return {
current: 0,
order: '',
currentKc: null,
tabList: [{
name: i18n.t('拣货明细'),
comName: 'lhmx'
}, {
name: i18n.t('库存明细'),
comName: 'kcmx'
}],
};
},
computed: {},
onLoad(option) {
if (option && option.order) {
this.order = option.order
}
},
watch: {
},
created() {},
methods: {
handleTabChange(index) {
this.current = index;
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.headerTitle {
padding: 20rpx;
font-weight: 600;
.items {
line-height: 40rpx;
}
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.cardbox {
min-height: calc(100vh - 480rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
.cardContent {
border-radius: 8px;
background: #fff;
margin-bottom: 20rpx;
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #333;
font-size: 28rpx;
font-weight: 500;
word-break: break-all;
font-weight: 600;
}
}
.listBottom {
.bottomTitle {
height: 80rpx;
position: relative;
.desc {
color: #bbb;
font-size: 24rpx;
line-height: 80rpx;
padding-left: 20rpx;
}
.topIcons {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #aaa;
}
}
.bottomBox {
padding: 20rpx;
.bottomItem {
background: #f8f8f8;
padding: 20rpx;
margin-bottom: 20rpx;
.items {
color: #333;
font-size: 24rpx;
height: 40rpx;
line-height: 40rpx;
}
}
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.checkedCase {
margin-top: 10rpx;
}
</style>
\ No newline at end of file
<template>
<view class="page">
<StickyNavBar>
<NavBar :title="$t('选择库存')"></NavBar>
<view class="info">{{ info.materialNo }}|{{ info.materialName }}</view>
</StickyNavBar>
<ContentLoadingMore class="cardbox" :loadmore='true' :list='goodsList'>
<view class="cardContent" v-for="(item, index) in goodsList">
<view class="listItemTitle" @click="handleClick(item)">
<view>
<view class="item">{{$t('库房/储位:{0}|{1}', [ item.ml002 , item.ml003 ])}}</view>
<view class="item">{{$t('库存数:{0}pcs', [ item.ml005 ])}}</view>
<view class="item">{{$t('出货数:')}}<uni-easyinput
v-model="item.outQuantity"
placeholder=""
></uni-easyinput></view>
</view>
</view>
</view>
</ContentLoadingMore>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
</view>
</template>
<script>
import i18n from '../../lang/index'
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import lhmx from './components/lhmx.vue';
import kcmx from './components/kcmx.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn,
lhmx,
kcmx
},
data() {
return {
current: 0,
info: {},
goodsList: [],
btnArr: [
{
style: '',
type: 'warning',
text: i18n.t('返回'),
way: 'goBack'
},
{
style: '',
type: 'primary',
text: i18n.t('提交'),
way: 'goSubmit'
}
]
};
},
computed: {},
onLoad(option) {
if (option && option.info) {
this.info = JSON.parse(decodeURIComponent(option.info))
this.$u.api
.getforinvmlinfo({
ml001: this.info.materialNo
}).then(({data}) => {
if (data) {
data.forEach(element => {
element['outQuantity'] = 0
});
this.goodsList = data
}
})
}
},
watch: {
},
created() {},
methods: {
getBtnHandle(row) {
this[row.way]();
},
goBack() {
uni.navigateBack();
},
goSubmit() {
if (this.goodsList.length === 0) {
return;
}
const data = JSON.parse(JSON.stringify(this.goodsList));
console.log('datadatadata0', data)
uni.$emit('sendkcData', data, this.info);
uni.navigateBack();
},
handleTabChange(index) {
this.current = index;
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.info {
height: 120rpx;
padding: 0 20rpx;
line-height: 120rpx;
}
.headerTitle {
padding: 20rpx;
font-weight: 600;
.items {
line-height: 40rpx;
}
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.bottomBtn {
position: sticky;
padding: 20rpx;
display: flex;
justify-content: space-between;
background: #fff;
bottom: 0rpx;
margin-top: 20rpx;
.u-btn {
width: 300rpx;
}
}
.blue {
color: #3f9dcc;
}
.total {
background: #fff;
color: #000;
padding: 0rpx 40rpx;
display: flex;
justify-content: space-between;
font-size: 32rpx;
.line {
margin: 0px 10rpx;
}
}
.cardbox {
min-height: calc(100vh - 480rpx);
padding: 0 20rpx;
margin-top: 20rpx;
}
.cardContent {
border-radius: 8px;
background: #fff;
margin-top: 20rpx;
}
.listItemTitle {
display: flex;
justify-content: space-between;
padding: 20rpx;
border-bottom: 2px solid #f8f8f8;
.u-btn {
width: 150rpx;
margin: 0px;
margin-top: 10rpx;
}
.item {
line-height: 50rpx;
color: #333;
font-size: 28rpx;
display: flex;
font-weight: 500;
align-items: center;
word-break: break-all;
font-weight: 600;
}
}
.listBottom {
.bottomTitle {
height: 80rpx;
position: relative;
.desc {
color: #bbb;
font-size: 24rpx;
line-height: 80rpx;
padding-left: 20rpx;
}
.topIcons {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
color: #aaa;
}
}
.bottomBox {
padding: 20rpx;
.bottomItem {
background: #f8f8f8;
padding: 20rpx;
margin-bottom: 20rpx;
.items {
color: #333;
font-size: 24rpx;
height: 40rpx;
line-height: 40rpx;
}
}
}
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.checkedCase {
margin-top: 10rpx;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment