单据出库修改
This commit is contained in:
@@ -3,6 +3,19 @@
|
||||
<!-- 单据列表 -->
|
||||
<nav-bar :title="title" :inner="true"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">单据编码</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box
|
||||
v-model="code"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
@@ -17,8 +30,8 @@
|
||||
<th>申请数量</th>
|
||||
<th>计划数量</th>
|
||||
<th>已分配数量</th>
|
||||
<th>单位</th>
|
||||
<th>批次号</th>
|
||||
<th>单位</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -32,20 +45,18 @@
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.assign_qty}}</td>
|
||||
<td>{{e.unit_id}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.unit_name}}</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>
|
||||
<button class="zd-col-6 button-primary" @tap="seachList">查询</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_outStorageOrderConfirm">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -53,7 +64,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {outStorageOrder, outStorageOrderList, outStorageConfirm} from '@/utils/getData2.js'
|
||||
import {outStorageOrderList, outStorageOrderConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -63,9 +74,9 @@
|
||||
return {
|
||||
title: '',
|
||||
id: '',
|
||||
code: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false,
|
||||
reload: false,
|
||||
status: 'more',
|
||||
@@ -85,8 +96,22 @@
|
||||
this._outStorageOrderList()
|
||||
},
|
||||
methods: {
|
||||
async _outStorageOrderList () {
|
||||
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', this.id)
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(e)
|
||||
}
|
||||
},
|
||||
seachList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(this.code)
|
||||
},
|
||||
async _outStorageOrderList (e) {
|
||||
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', this.id, e)
|
||||
if (res.code === '200') {
|
||||
this.totalCount = res.totalElements
|
||||
if (res.totalElements > 0) {
|
||||
@@ -107,7 +132,7 @@
|
||||
this.status = 'loading'
|
||||
setTimeout(() => {
|
||||
this.pageNum++
|
||||
this._outStorageOrderList()
|
||||
this._outStorageOrderList(this.code)
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
@@ -115,12 +140,29 @@
|
||||
},
|
||||
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()
|
||||
async _outStorageOrderConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await outStorageOrderConfirm(this.pkId)
|
||||
if (res.code === '200') {
|
||||
if (res.content.length > 0) {
|
||||
this.$store.dispatch('setPublicObj', res.content[0])
|
||||
uni.navigateBack()
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,40 +21,22 @@
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.form_type}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">备注</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.remark}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">创建时间</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.create_time}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">创建人</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.create_name}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">物料编码</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.material_code}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">申请数量</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.qty}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">计划数量</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.plan_qty}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<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 class="zd-col-6"><span class="filter_input">{{currentData.unit_name}}</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">
|
||||
<input type="text" class="filter_input" v-model="currentData.pcsn">
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-6"><span class="filter_label">仓库</span></view>
|
||||
<view class="zd-col-6 filter_select">
|
||||
<uni-data-select v-model="currentData.stor_code" :localdata="options1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcflexstart">
|
||||
<view class="zd-col-6"><span class="filter_label">车间</span></view>
|
||||
<view class="zd-col-6 filter_select">
|
||||
<uni-data-select v-model="currentData.product_area" :localdata="options2"></uni-data-select>
|
||||
@@ -74,10 +56,11 @@
|
||||
</th>
|
||||
<th>计划数量</th>
|
||||
<th>申请数量</th>
|
||||
<th>库存数量</th>
|
||||
<th>出库数量</th>
|
||||
<th>已分配数量</th>
|
||||
<th>单位</th>
|
||||
<th>批次号</th>
|
||||
<th>单位</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -86,10 +69,11 @@
|
||||
<td class="td_3">{{e.material_name}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.sto_qty}}</td>
|
||||
<td><input type="number" class="sin_input" v-model="e.now_assign_qty" @blur="handleBlur(e)"></td>
|
||||
<td>{{e.assign_qty}}</td>
|
||||
<td>{{e.unit_id}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td><input type="text" class="sin_input" v-model="e.pcsn"></td>
|
||||
<td>{{e.unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -150,68 +150,14 @@ export const outStorageOrder = () => request({
|
||||
method: 'GET',
|
||||
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, code) => request({
|
||||
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 + '&code=' + code
|
||||
})
|
||||
export const outStorageOrderConfirm = (code) => request({
|
||||
url:'api/pda/outStorage/orderConfirm',
|
||||
data: {code: code}
|
||||
})
|
||||
// export const outStorageOrderList = (page, size, type) => {
|
||||
// let res = {
|
||||
// "totalElements": 10,
|
||||
// "content": [
|
||||
// {
|
||||
// "code": "PPBOM241102856",
|
||||
// "form_type": "单据类型",
|
||||
// "remark": "备注",
|
||||
// "create_time": "2024-10-20 21:41:50",
|
||||
// "create_name": "创建人",
|
||||
// "material_code": "04.01.DY.00531",
|
||||
// "qty": 0.0,
|
||||
// "plan_qty": 0.0,
|
||||
// "assign_qty": 0.0,
|
||||
// "unit_id": "单位",
|
||||
// "pcsn": "批次",
|
||||
// "stor_code": "FStockPallet",
|
||||
// "product_area": "A4",
|
||||
// "children": [
|
||||
// {
|
||||
// "code": "bbb",
|
||||
// "material_name": "白色插座下线套 (模号587#)(色号12081407乳白)",
|
||||
// "material_code": "物料编码",
|
||||
// "material_spec": "物料类型",
|
||||
// "stor_code": "FStockPallet",
|
||||
// "product_area": "A4",
|
||||
// "qty": 10.0,
|
||||
// "plan_qty": 0.0,
|
||||
// "assign_qty": 0.0,
|
||||
// "unit_id": "单位",
|
||||
// "pcsn": "批次",
|
||||
// },
|
||||
// {
|
||||
// "code": "CCC",
|
||||
// "material_name": "物料名称",
|
||||
// "material_code": "物料编码",
|
||||
// "material_spec": "物料类型",
|
||||
// "stor_code": "FStockPallet",
|
||||
// "product_area": "A4",
|
||||
// "qty": 10.0,
|
||||
// "plan_qty": 0.0,
|
||||
// "assign_qty": 0.0,
|
||||
// "unit_id": "单位",
|
||||
// "pcsn": "批次"
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// ],
|
||||
// "data": {},
|
||||
// "code": "200",
|
||||
// "msg": ""
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
export const outStorageConfirm = (obj) => request({
|
||||
url:'api/pda/outStorage/confirm',
|
||||
data: obj
|
||||
|
||||
115
utils/mork2.js
115
utils/mork2.js
@@ -95,4 +95,119 @@ export const groupMaterList = () => {
|
||||
msg: '查询成功'
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const outStorageOrder = () => {
|
||||
let res = [{value: '1', text: 'a'}]
|
||||
return res
|
||||
}
|
||||
export const outStorageOrderList = (page, size, type) => {
|
||||
let res = {
|
||||
"totalElements": 10,
|
||||
"content": [
|
||||
{
|
||||
"code": "PPBOM241102856",
|
||||
"form_type": "单据类型",
|
||||
"remark": "备注",
|
||||
"create_time": "2024-10-20 21:41:50",
|
||||
"create_name": "创建人",
|
||||
"material_code": "04.01.DY.00531",
|
||||
"qty": 0.0,
|
||||
"sto_qty": 8888,
|
||||
"plan_qty": 0.0,
|
||||
"assign_qty": 0.0,
|
||||
"unit_name": "单位",
|
||||
"pcsn": "批次",
|
||||
"stor_code": "FStockPallet",
|
||||
"product_area": "A4",
|
||||
"children": [
|
||||
{
|
||||
"code": "bbb",
|
||||
"material_name": "白色插座下线套 (模号587#)(色号12081407乳白)",
|
||||
"material_code": "物料编码",
|
||||
"material_spec": "物料类型",
|
||||
"stor_code": "FStockPallet",
|
||||
"product_area": "A4",
|
||||
"qty": 10.0,
|
||||
"plan_qty": 0.0,
|
||||
"assign_qty": 0.0,
|
||||
"unit_name": "单位",
|
||||
"pcsn": "批次",
|
||||
},
|
||||
{
|
||||
"code": "CCC",
|
||||
"material_name": "物料名称",
|
||||
"material_code": "物料编码",
|
||||
"material_spec": "物料类型",
|
||||
"stor_code": "FStockPallet",
|
||||
"product_area": "A4",
|
||||
"qty": 10.0,
|
||||
"plan_qty": 0.0,
|
||||
"assign_qty": 0.0,
|
||||
"unit_name": "单位",
|
||||
"pcsn": "批次"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"data": {},
|
||||
"code": "200",
|
||||
"msg": ""
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const outStorageOrderConfirm = (code) => {
|
||||
let res = {
|
||||
"totalElements": 10,
|
||||
"content": [
|
||||
{
|
||||
"code": "PPBOM241102856",
|
||||
"form_type": "单据类型",
|
||||
"remark": "备注",
|
||||
"create_time": "2024-10-20 21:41:50",
|
||||
"create_name": "创建人",
|
||||
"material_code": "04.01.DY.00531",
|
||||
"qty": 0.0,
|
||||
"sto_qty": 8888,
|
||||
"plan_qty": 0.0,
|
||||
"assign_qty": 0.0,
|
||||
"unit_name": "单位",
|
||||
"pcsn": "批次",
|
||||
"stor_code": "FStockPallet",
|
||||
"product_area": "A4",
|
||||
"children": [
|
||||
{
|
||||
"code": "bbb",
|
||||
"material_name": "白色插座下线套 (模号587#)(色号12081407乳白)",
|
||||
"material_code": "物料编码",
|
||||
"material_spec": "物料类型",
|
||||
"stor_code": "FStockPallet",
|
||||
"product_area": "A4",
|
||||
"qty": 10.0,
|
||||
"sto_qty": 8888,
|
||||
"plan_qty": 0.0,
|
||||
"assign_qty": 0.0,
|
||||
"unit_name": "单位",
|
||||
"pcsn": "批次",
|
||||
},
|
||||
{
|
||||
"code": "CCC",
|
||||
"material_name": "物料名称",
|
||||
"material_code": "物料编码",
|
||||
"material_spec": "物料类型",
|
||||
"stor_code": "FStockPallet",
|
||||
"product_area": "A4",
|
||||
"qty": 10.0,
|
||||
"plan_qty": 0.0,
|
||||
"assign_qty": 0.0,
|
||||
"unit_id": "单位",
|
||||
"pcsn": "批次"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"data": {},
|
||||
"code": "200",
|
||||
"msg": ""
|
||||
}
|
||||
return res
|
||||
}
|
||||
Reference in New Issue
Block a user