单据出库修改

This commit is contained in:
蔡玲
2024-11-29 14:46:20 +08:00
parent 3fccdd374f
commit def1dd4fe6
3 changed files with 70 additions and 30 deletions

View File

@@ -77,11 +77,13 @@ uni-button:after {
.filter_input {
width: 100%;
height: 80rpx;
line-height: 30rpx;
line-height: 28rpx;
border: 0;
background-color: transparent;
font-size: 28rpx;
color: #606266;
white-space: pre-wrap;
overflow-wrap: break-word;
}
.filter_input_disabled {
background-color: #eee;
@@ -186,6 +188,11 @@ uni-button:after {
z-index: 101;
box-shadow: 3px 0px 3px 0px rgba(160,160,160,0.20);
}
.slide_new table th .td_3, .slide_new table td.td_3 {
width: 100px;
line-height: 28rpx;
white-space: unset;
}
.slide_new table th.fontcol1,.slide_new table td.fontcol1 {
color: #4e6ef2;
font-weight: bold;

View File

@@ -14,31 +14,31 @@
</view>
</view>
<view v-if="JSON.stringify(currentData) !== '{}'" class="zd_wrapper">
<view class="zd-row border-bottom">
<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.code}}</span></view>
<view class="zd-col-6"><span class="filter_label">单据类型</span></view>
<view class="zd-col-6"><span class="filter_input">{{currentData.form_type}}</span></view>
</view>
<view class="zd-row border-bottom">
<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">
<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 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">
<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">
<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>
@@ -46,7 +46,19 @@
</view>
<view class="zd-row border-bottom">
<view class="zd-col-6"><span class="filter_label">批次号</span></view>
<view class="zd-col-18"><span class="filter_input">{{currentData.pcsn}}</span></view>
<view class="zd-col-6">
<input type="text" class="filter_input" v-model="currentData.pcsn">
</view>
<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>
</view>
</view>
</view>
<view v-if="JSON.stringify(currentData) !== '{}'" class="grid-wraper">
@@ -54,36 +66,28 @@
<table>
<thead>
<tr>
<th>单据id</th>
<th>物料名称</th>
<th>物料编码</th>
<th>物料类型</th>
<th @tap="toAllCheck"><uni-icons :type="allCheck ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></th>
<th class="td_3">
<view class="td_3">
物料名称
</view>
</th>
<th>申请数量</th>
<th>计划数量</th>
<th>已分配数量</th>
<th>单位</th>
<th>批次号</th>
<th>仓库</th>
<th>车间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in currentData.children" :key="i">
<td>{{e.code}}</td>
<td>{{e.material_name}}</td>
<td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td>
<tr v-for="(e, i) in dataList" :key="i">
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
<td class="td_3">{{e.material_name}}</td>
<td>{{e.qty}}</td>
<td>{{e.plan_qty}}</td>
<td><input type="number" class="sin_input" v-model="e.now_assign_qty" @blur="handleBlur(e)"></td>
<td>{{e.unit_id}}</td>
<td>{{e.pcsn}}</td>
<td>
<uni-data-select v-model="e.stor_code" :localdata="options1"></uni-data-select>
</td>
<td>
<uni-data-select v-model="e.product_area" :localdata="options2"></uni-data-select>
</td>
</tr>
</tbody>
</table>
@@ -112,9 +116,11 @@
options: [],
index: '',
currentData: {},
dataList: [],
disabled: false,
options1: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
options2: [{value: 'A1', text: 'A1车间'}, {value: 'A2', text: 'A2车间'}, {value: 'A3', text: 'A3车间'}],
allCheck: false
};
},
onLoad (options) {
@@ -126,8 +132,10 @@
onShow () {
if (this.$store.getters.publicObj !== '') {
this.currentData = this.$store.getters.publicObj
this.currentData.children.map(el => {
this.dataList = this.currentData.children
this.dataList.map(el => {
this.$set(el, 'now_assign_qty', el.qty)
this.$set(el, 'checked', false)
})
this.$store.dispatch('setPublicObj', '')
}
@@ -154,6 +162,19 @@
toEmpty () {
this.index = ''
this.currentData = {}
this.dataList = []
this.allCheck = false
},
toAllCheck () {
this.allCheck = !this.allCheck
this.dataList.map(el => {
el.checked = this.allCheck
})
},
toCheck (e) {
e.checked = !e.checked
let arr = this.dataList.filter(el => el.checked === true)
this.allCheck = arr.length === this.dataList.length
},
async _outStorageConfirm () {
this.disabled = true
@@ -161,8 +182,10 @@
this.disabled = false
return
}
let arr = this.dataList.filter(el => el.checked === true)
let obj = Object.assign(this.currentData, {children: arr})
try {
let res = await outStorageConfirm(this.currentData)
let res = await outStorageConfirm(obj)
if (res.code === '200') {
this.toEmpty()
}
@@ -180,10 +203,18 @@
</script>
<style lang="stylus" scoped>
.filter_input
font-size 26rpx
.filter_label
font-size: 26rpx;
.slide_new
padding-bottom 110px
.slide_new table td
overflow visible
/deep/ .uni-select__input-text
width calc(100% - 25px)
/deep/ .zd_icon_wraper
width 25px
/deep/ .uni-icons
vertical-align: bottom;
</style>

View File

@@ -163,21 +163,23 @@ export const outStorageOrderList = (page, size, type) => request({
// "totalElements": 10,
// "content": [
// {
// "code": "22984980",
// "code": "PPBOM241102856",
// "form_type": "单据类型",
// "remark": "备注",
// "create_time": "2024-10-20 21:41:50",
// "create_name": "创建人",
// "material_code": "物料编码",
// "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": "物料名称",
// "material_name": "白色插座下线套 (模号587#)色号12081407乳白",
// "material_code": "物料编码",
// "material_spec": "物料类型",
// "stor_code": "FStockPallet",
@@ -186,7 +188,7 @@ export const outStorageOrderList = (page, size, type) => request({
// "plan_qty": 0.0,
// "assign_qty": 0.0,
// "unit_id": "单位",
// "pcsn": "批次"
// "pcsn": "批次",
// },
// {
// "code": "CCC",