收货确认、委外冲销
This commit is contained in:
259
pages/management/outsource-outbound.vue
Normal file
259
pages/management/outsource-outbound.vue
Normal file
@@ -0,0 +1,259 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<nav-bar title="委外出库单"></nav-bar>
|
||||
<view class="sticky search-confirm-wrap" style="z-index: 11;">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-14 zd-row jcflexstart">
|
||||
<view class="zd-col-12"><search-box placeholder="关键字" v-model="val1" /></view>
|
||||
<view class="zd-col-12 select_wraper mgl10">
|
||||
<zxz-uni-data-select placeholder="请选择收货组织信息" v-model="value1" filterable :localdata="range1"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-10 zd-row jcflexend">
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkData.length === 0}" :disabled="disabled1" @tap="_feedbackSapWwJhdCx">冲销确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid-wrap">
|
||||
<view class="zdrow-wrap">
|
||||
<view class="zd-row sticky zd-th-wraper zd-bor-bottom">
|
||||
<view class="zd-col-1 zd-th"><text>序号</text></view>
|
||||
<view class="zd-col-1 zd-th"><text>选择</text></view>
|
||||
<view class="zd-col-3 zd-th"><text class="fontcol1">交货单号</text></view>
|
||||
<view class="zd-col-2 zd-th"><text class="fontcol1">交货日期</text></view>
|
||||
<view class="zd-col-2 zd-th"><text class="fontcol1">凭证日期</text></view>
|
||||
<view class="zd-col-2 zd-th"><text class="fontcol1">计划日期</text></view>
|
||||
<view class="zd-col-2 zd-th"><text>所属厂区</text></view>
|
||||
<view class="zd-col-2 zd-th"><text>供应商编码</text></view>
|
||||
<view class="zd-col-2 zd-th"><text>供应商名称</text></view>
|
||||
<view class="zd-col-2 zd-th">更多</view>
|
||||
</view>
|
||||
<view class="zd-td-wraper" v-for="(e, i) in dataList" :key="e.id">
|
||||
<view class="zd-row zd-bor-bottom">
|
||||
<view class="zd-col-1 zd-td"><text>{{i+1}}</text></view>
|
||||
<view class="zd-col-1 zd-td" @tap.stop="toCheckbox(e)">
|
||||
<view class="zd-checkbox" :class="{'zd-checkbox_active': e.checked}">
|
||||
<uni-icons type="checkmarkempty" size="12" class="checkbox_icon"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-3 zd-td fontcol1"><text>{{e.vbeln}}</text></view>
|
||||
<view class="zd-col-2 zd-td fontcol1"><text>{{e.lfdat}}</text></view>
|
||||
<view class="zd-col-2 zd-td fontcol1"><text>{{e.bldat}}</text></view>
|
||||
<view class="zd-col-2 zd-td fontcol1"><text>{{e.wadat}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>所属厂区</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.lifnr}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>供应商名称</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="getDetails(5,e)">
|
||||
<uni-icons type="more-filled" size="14" color="#909399"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcenter pd20">
|
||||
<pagination v-show="dataList.length > 0" :total="totalCount1" :page-size="queryParams1.pageSize" :current-page="currentPage1" @page-change="handlePageChange1" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer"></view>
|
||||
<grid-detail :show="delShow" :data="detailObj" @closeDetail="delShow=false"></grid-detail>
|
||||
<view v-if="show" class="modal" @click.stop="show = false"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/ReceiveDetail.vue'
|
||||
import {getOrganizationInfo, getWarehouseInfo, querySapWwJhdCx, feedbackSapWwJhdCx} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
ScanInput,
|
||||
Pagination,
|
||||
GridDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
crType: '',
|
||||
val1: '', // 模糊查询
|
||||
value1: '', // 收货组织信息
|
||||
range1: [],
|
||||
totalCount1: 0, // 分页
|
||||
queryParams1:{
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
currentPage1: 1,
|
||||
dataList: [], // 一级表格数据
|
||||
checkData: [], // 一级表格多选数组
|
||||
val2: '',
|
||||
popData: [], // 副表格点击物料编码弹出弹窗
|
||||
popdisabled: false,
|
||||
popObj: {}, // 弹窗当前主表格内容
|
||||
show: false, // 弹窗显示布尔值
|
||||
type: '', // 弹窗类型
|
||||
delShow: false, // 详情弹窗布尔值
|
||||
detailObj: {}, // 详情弹窗
|
||||
disabled1: false,
|
||||
value2: '', // 收货仓库信息
|
||||
range2: [],
|
||||
raw: '', // 副表格修改前输入框数据
|
||||
rawObj: {} ,// 副表格修改前行数据
|
||||
subCheckData: [] // 二级表格多选数组
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.crType = options.type
|
||||
this.toSearch()
|
||||
// setTimeout(() => {
|
||||
// this._getWarehouseInfo()
|
||||
// this._getOrganizationInfo()
|
||||
// }, 3000)
|
||||
},
|
||||
methods: {
|
||||
// 组织信息下拉框
|
||||
async _getOrganizationInfo () {
|
||||
let res = await getOrganizationInfo()
|
||||
if (res.code === 1) {
|
||||
this.range1 = [...res.result]
|
||||
this.range1.map(e => {
|
||||
this.$set(e, 'text', e.kczzmc)
|
||||
this.$set(e, 'value', e.kczzbm)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 仓库下拉框
|
||||
async _getWarehouseInfo () {
|
||||
let res = await getWarehouseInfo()
|
||||
if (res.code === 1) {
|
||||
this.range2 = [...res.result]
|
||||
this.range2.map(e => {
|
||||
this.$set(e, 'text', e.ckmc)
|
||||
this.$set(e, 'value', e.ckbm)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询一级表格
|
||||
toSearch () {
|
||||
this.queryParams1 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage1 = 1
|
||||
this.pkId = ''
|
||||
this._querySapWwJhdCx()
|
||||
},
|
||||
// 一级表格接口
|
||||
async _querySapWwJhdCx (e) {
|
||||
let res = await querySapWwJhdCx(this.val1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
|
||||
if (res.code === 1) {
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'subData', [])
|
||||
this.$set(el, 'subAllChecked', false)
|
||||
this.$set(el, 'subOneChecked', false)
|
||||
this.$set(el, 'subStatus1', false)
|
||||
})
|
||||
this.dataList = [...res.result]
|
||||
this.totalCount1 = Number(res.totalElements)
|
||||
this.queryParams1.pageSize = Number(res.pageSize)
|
||||
this.queryParams1.pageNum = Number(res.pageNum)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 一级表格切换分页
|
||||
handlePageChange1(page) {
|
||||
this.queryParams1.pageNum = page
|
||||
this.currentPage1 = page
|
||||
this._querySapWwJhdCx()
|
||||
},
|
||||
// 一级表格多选
|
||||
toCheckbox (e) {
|
||||
e.checked = !e.checked
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
this.checkData = arr.map(el => {
|
||||
return {
|
||||
vbeln: el.vbeln,
|
||||
wadat: el.wadat
|
||||
}
|
||||
})
|
||||
},
|
||||
// 详情弹窗
|
||||
getDetails (type,e) {
|
||||
this.delShow = !this.delShow
|
||||
this.detailObj = {type: type, data:e}
|
||||
},
|
||||
// 点击确认收货按钮
|
||||
async _feedbackSapWwJhdCx () {
|
||||
this.disabled1 = true
|
||||
if (!this.checkData.length) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认收货?',
|
||||
confirmColor: '#fff',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.__feedbackSapWwJhdCx()
|
||||
} else if (res.cancel) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async __feedbackSapWwJhdCx () {
|
||||
try {
|
||||
let res = await feedbackSapWwJhdCx(this.checkData)
|
||||
if (res.code === 1) {
|
||||
this.disabled1 = false
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
this._querySapJhd()
|
||||
} else {
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.confirm-button_1
|
||||
min-width 100px
|
||||
.select_wraper
|
||||
/deep/ .uni-select__input-box
|
||||
height 30px
|
||||
/deep/ .uni-select__selector
|
||||
z-index 11
|
||||
/deep/ .uni-select
|
||||
height: 30px;
|
||||
min-height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 2px 0 12px;
|
||||
border: 1px solid #dcdfe6;
|
||||
background-color: #fff;
|
||||
border-radius: 6px;
|
||||
/deep/ .uni-select__input-placeholder, /deep/ .uni-select__input-text
|
||||
font-size 13px
|
||||
.zd-th
|
||||
font-size: 12px;
|
||||
line-height: 13px;
|
||||
height: 36px;
|
||||
</style>
|
||||
Reference in New Issue
Block a user