单据出库功能修改
This commit is contained in:
@@ -225,6 +225,14 @@
|
|||||||
,{
|
,{
|
||||||
"path" : "pages/outbound/bill-out-store",
|
"path" : "pages/outbound/bill-out-store",
|
||||||
"style" :
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/outbound/bill-list",
|
||||||
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": true,
|
"enablePullDownRefresh": true,
|
||||||
|
|||||||
128
pages/outbound/bill-list.vue
Normal file
128
pages/outbound/bill-list.vue
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- 单据列表 -->
|
||||||
|
<nav-bar :title="title" :inner="true"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="slide_new">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>单据编码</th>
|
||||||
|
<th>单据类型</th>
|
||||||
|
<th>备注</th>
|
||||||
|
<th>创建时间</th>
|
||||||
|
<th>创建人</th>
|
||||||
|
<th>物料编码</th>
|
||||||
|
<th>申请数量</th>
|
||||||
|
<th>计划数量</th>
|
||||||
|
<th>已分配数量</th>
|
||||||
|
<th>单位</th>
|
||||||
|
<th>批次号</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.code}">
|
||||||
|
<td>{{e.code}}</td>
|
||||||
|
<td>{{e.form_type}}</td>
|
||||||
|
<td>{{e.remark}}</td>
|
||||||
|
<td>{{e.create_time}}</td>
|
||||||
|
<td>{{e.create_name}}</td>
|
||||||
|
<td>{{e.material_code}}</td>
|
||||||
|
<td>{{e.qty}}</td>
|
||||||
|
<td>{{e.plan_qty}}</td>
|
||||||
|
<td>{{e.assign_qty}}</td>
|
||||||
|
<td>{{e.unit_id}}</td>
|
||||||
|
<td>{{e.pcsn}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||||
|
</view>
|
||||||
|
<view class="compute_wraper">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-22 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {outStorageOrder, outStorageOrderList, outStorageConfirm} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
id: '',
|
||||||
|
dataList: [],
|
||||||
|
pkId: '',
|
||||||
|
pkObj: {},
|
||||||
|
disabled: false,
|
||||||
|
reload: false,
|
||||||
|
status: 'more',
|
||||||
|
contentText: {
|
||||||
|
contentdown: '查看更多',
|
||||||
|
contentrefresh: '加载中',
|
||||||
|
contentnomore: '没有更多'
|
||||||
|
},
|
||||||
|
totalCount: 0,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 100
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
this.id = options.id
|
||||||
|
this._outStorageOrderList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _outStorageOrderList () {
|
||||||
|
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', this.id)
|
||||||
|
if (res.code === '200') {
|
||||||
|
this.totalCount = res.totalElements
|
||||||
|
if (res.totalElements > 0) {
|
||||||
|
const dataMap = res.content
|
||||||
|
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
||||||
|
this.reload = false
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
if (this.totalCount == this.dataList.length) {
|
||||||
|
this.reload = false
|
||||||
|
this.status = 'noMore'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onReachBottom () {
|
||||||
|
if (this.totalCount > this.dataList.length) {
|
||||||
|
this.status = 'loading'
|
||||||
|
setTimeout(() => {
|
||||||
|
this.pageNum++
|
||||||
|
this._outStorageOrderList()
|
||||||
|
}, 1000)
|
||||||
|
} else { //停止加载
|
||||||
|
this.status = 'noMore'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toChek (e) {
|
||||||
|
this.pkId = this.pkId === e.code ? '' : e.code
|
||||||
|
this.pkObj = this.pkId === e.code ? e : {}
|
||||||
|
},
|
||||||
|
toSure () {
|
||||||
|
if (this.pkId) {
|
||||||
|
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -13,65 +13,80 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view v-if="JSON.stringify(currentData) !== '{}'" class="zd_wrapper">
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6"><span class="filter_label">单据编码</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.code}}</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_label">单据类型</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.form_type}}</span></view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6"><span class="filter_label">备注</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.remark}}</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_label">创建时间</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.create_time}}</span></view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6"><span class="filter_label">创建人</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.create_name}}</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_label">物料编码</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.material_code}}</span></view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6"><span class="filter_label">申请数量</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.qty}}</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_label">计划数量</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.plan_qty}}</span></view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6"><span class="filter_label">已分配数量</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_input">{{currentData.assign_qty}}</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_label">单位</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_input">{{currentData.unit_id}}</span></view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6"><span class="filter_label">批次号</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.pcsn}}</span></view>
|
||||||
|
<view class="zd-col-6"><span class="filter_label">创建时间</span></view>
|
||||||
|
<view class="zd-col-7"><span class="filter_input">{{currentData.create_time}}</span></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="JSON.stringify(currentData) !== '{}'" class="zd_wrapper grid-wraper">
|
||||||
<view class="slide_new">
|
<view class="slide_new">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>单据编码</th>
|
<th>单据编码</th>
|
||||||
<th>对应流程实例id</th>
|
|
||||||
<th>业务单据编号</th>
|
|
||||||
<th>业务单据类型</th>
|
|
||||||
<th>业务单据日期</th>
|
|
||||||
<th>单据类型</th>
|
|
||||||
<th>业务单据状态</th>
|
|
||||||
<th>备注</th>
|
|
||||||
<th>创建时间</th>
|
|
||||||
<th>创建人</th>
|
|
||||||
<th>物料编码</th>
|
|
||||||
<th>物料名称</th>
|
<th>物料名称</th>
|
||||||
|
<th>物料编码</th>
|
||||||
<th>物料类型</th>
|
<th>物料类型</th>
|
||||||
<th>物料单重</th>
|
<th>申请数量</th>
|
||||||
<th>数量</th>
|
<th>计划数量</th>
|
||||||
<th>分配数量</th>
|
<th>已分配数量</th>
|
||||||
|
<th>单位</th>
|
||||||
<th>批次号</th>
|
<th>批次号</th>
|
||||||
<th>载具</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === code}">
|
<tr v-for="(e, i) in currentData.children" :key="i">
|
||||||
<td>{{e.code}}</td>
|
<td>{{e.code}}</td>
|
||||||
<td>{{e.proc_inst_id}}</td>
|
|
||||||
<td>{{e.source_form_id}}</td>
|
|
||||||
<td>{{e.source_form_type}}</td>
|
|
||||||
<td>{{e.source_form_date}}</td>
|
|
||||||
<td>{{e.form_type}}</td>
|
|
||||||
<td>{{e.status}}</td>
|
|
||||||
<td>{{e.remark}}</td>
|
|
||||||
<td>{{e.create_time}}</td>
|
|
||||||
<td>{{e.create_name}}</td>
|
|
||||||
<td>{{e.material_code}}</td>
|
|
||||||
<td>{{e.material_name}}</td>
|
<td>{{e.material_name}}</td>
|
||||||
|
<td>{{e.material_code}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.single_weight}}</td>
|
|
||||||
<td>{{e.qty}}</td>
|
<td>{{e.qty}}</td>
|
||||||
<td>{{e.assign_qty}}</td>
|
<td>{{e.plan_qty}}</td>
|
||||||
|
<td><input type="number" class="sin_input" v-model="e.assign_qty" @blur="handleBlur(e)"></td>
|
||||||
|
<td>{{e.unit_id}}</td>
|
||||||
<td>{{e.pcsn}}</td>
|
<td>{{e.pcsn}}</td>
|
||||||
<td>{{e.vehicle_code}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
|
||||||
</view>
|
|
||||||
<view class="compute_wraper">
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
||||||
<button class="zd-col-6 button-primary" @tap="searchList">查询</button>
|
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageConfirm">强制完成</button>
|
||||||
<button class="zd-col-10 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_outStorageConfirm">强制完成</button>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -90,20 +105,8 @@
|
|||||||
title: '',
|
title: '',
|
||||||
options: [],
|
options: [],
|
||||||
index: '',
|
index: '',
|
||||||
dataList: [],
|
currentData: {},
|
||||||
pkId: '',
|
disabled: false
|
||||||
pkObj: {},
|
|
||||||
disabled: false,
|
|
||||||
reload: false,
|
|
||||||
status: 'more',
|
|
||||||
contentText: {
|
|
||||||
contentdown: '查看更多',
|
|
||||||
contentrefresh: '加载中',
|
|
||||||
contentnomore: '没有更多'
|
|
||||||
},
|
|
||||||
totalCount: 0,
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
@@ -112,6 +115,15 @@
|
|||||||
created () {
|
created () {
|
||||||
this._outStorageOrder()
|
this._outStorageOrder()
|
||||||
},
|
},
|
||||||
|
onShow () {
|
||||||
|
if (this.$store.getters.publicObj !== '') {
|
||||||
|
this.currentData = this.$store.getters.publicObj
|
||||||
|
this.currentData.children.map(el => {
|
||||||
|
this.$set(el, 'assign_qty', el.qty)
|
||||||
|
})
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 下拉框*/
|
/** 下拉框*/
|
||||||
async _outStorageOrder () {
|
async _outStorageOrder () {
|
||||||
@@ -121,58 +133,28 @@
|
|||||||
selectChange (e) {
|
selectChange (e) {
|
||||||
this.index = e
|
this.index = e
|
||||||
if (e) {
|
if (e) {
|
||||||
this.searchList()
|
uni.navigateTo({
|
||||||
|
url: '/pages/outbound/bill-list?title=单据列表&id=' + e
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchList () {
|
handleBlur (e) {
|
||||||
this.dataList = []
|
if (e.assign_qty < 0 || e.assign_qty > e.qty) {
|
||||||
this.pageNum = 1
|
e.assign_qty = e.qty
|
||||||
this._outStorageOrderList()
|
|
||||||
},
|
|
||||||
async _outStorageOrderList () {
|
|
||||||
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', this.index)
|
|
||||||
if (res.code === '200') {
|
|
||||||
this.totalCount = res.totalElements
|
|
||||||
if (res.totalElements > 0) {
|
|
||||||
const dataMap = res.content
|
|
||||||
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
|
|
||||||
this.reload = false
|
|
||||||
} else {
|
|
||||||
this.dataList = []
|
|
||||||
}
|
|
||||||
if (this.totalCount == this.dataList.length) {
|
|
||||||
this.reload = false
|
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom () {
|
|
||||||
if (this.totalCount > this.dataList.length) {
|
|
||||||
this.status = 'loading'
|
|
||||||
setTimeout(() => {
|
|
||||||
this.pageNum++
|
|
||||||
this._outStorageOrderList()
|
|
||||||
}, 1000)
|
|
||||||
} else { //停止加载
|
|
||||||
this.status = 'noMore'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toChek (e) {
|
|
||||||
this.pkId = this.pkId === e.code ? '' : e.code
|
|
||||||
this.pkObj = this.pkId === e.code ? e : {}
|
|
||||||
},
|
|
||||||
toEmpty () {
|
toEmpty () {
|
||||||
this.index = ''
|
this.index = ''
|
||||||
this.dataList = []
|
this.currentData = {}
|
||||||
},
|
},
|
||||||
async _outStorageConfirm () {
|
async _outStorageConfirm () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.pkId) {
|
if (JSON.stringify(this.currentData) === '{}') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await outStorageConfirm(this.pkObj)
|
let res = await outStorageConfirm(this.currentData)
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
@@ -185,3 +167,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
.filter_label
|
||||||
|
font-size: 26rpx;
|
||||||
|
</style>
|
||||||
@@ -143,10 +143,70 @@ export const outStorageOrder = () => request({
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
url:'api/pda/outStorage/order'
|
url:'api/pda/outStorage/order'
|
||||||
})
|
})
|
||||||
|
// export const outStorageOrder = () => {
|
||||||
|
// let res = [{value: '1', text: 'a'}]
|
||||||
|
// return res
|
||||||
|
// }
|
||||||
export const outStorageOrderList = (page, size, type) => request({
|
export const outStorageOrderList = (page, size, type) => request({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url:'api/pda/outStorage/orderList?page=' + page + '&size=' + size + '&form_type=' + type
|
url:'api/pda/outStorage/orderList?page=' + page + '&size=' + size + '&form_type=' + type
|
||||||
})
|
})
|
||||||
|
// export const outStorageOrderList = (page, size, type) => {
|
||||||
|
// let res = {
|
||||||
|
// "totalElements": 10,
|
||||||
|
// "content": [
|
||||||
|
// {
|
||||||
|
// "code": "22984980",
|
||||||
|
// "form_type": "单据类型",
|
||||||
|
// "remark": "备注",
|
||||||
|
// "create_time": "创建时间",
|
||||||
|
// "create_name": "创建人",
|
||||||
|
// "material_code": "物料编码",
|
||||||
|
// "qty": 0.0,
|
||||||
|
// "plan_qty": 0.0,
|
||||||
|
// "assign_qty": 0.0,
|
||||||
|
// "unit_id": "单位",
|
||||||
|
// "pcsn": "批次",
|
||||||
|
// "children": [
|
||||||
|
// {
|
||||||
|
// "id": "",
|
||||||
|
// "code": "bbb",
|
||||||
|
// "proc_inst_id": "",
|
||||||
|
// "source_form_id": "",
|
||||||
|
// "source_form_type": "",
|
||||||
|
// "source_form_date": "",
|
||||||
|
// "form_type": "",
|
||||||
|
// "status": "",
|
||||||
|
// "remark": "",
|
||||||
|
// "create_time": "",
|
||||||
|
// "create_name": "",
|
||||||
|
// "material_id": "",
|
||||||
|
// "material_name": "物料名称",
|
||||||
|
// "material_code": "物料编码",
|
||||||
|
// "material_spec": "物料类型",
|
||||||
|
// "single_weight": "",
|
||||||
|
// "qty": 10.0,
|
||||||
|
// "plan_qty": 0.0,
|
||||||
|
// "assign_qty": 0.0,
|
||||||
|
// "unit_id": "单位",
|
||||||
|
// "pcsn": "批次",
|
||||||
|
// "vehicle_code": "",
|
||||||
|
// "vehicle_id": "",
|
||||||
|
// "form_data": {
|
||||||
|
// "": {}
|
||||||
|
// },
|
||||||
|
// "parent_id": "",
|
||||||
|
// "HasChildren": "public static final Boolean FALSE = new Boolean(false);"
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// "data": {},
|
||||||
|
// "code": "200",
|
||||||
|
// "msg": ""
|
||||||
|
// }
|
||||||
|
// return res
|
||||||
|
// }
|
||||||
export const outStorageConfirm = (obj) => request({
|
export const outStorageConfirm = (obj) => request({
|
||||||
url:'api/pda/outStorage/confirm',
|
url:'api/pda/outStorage/confirm',
|
||||||
data: obj
|
data: obj
|
||||||
|
|||||||
Reference in New Issue
Block a user