收货确认增加需求
This commit is contained in:
@@ -53,7 +53,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<button class="confirm-button" @tap="toSubSearch(e)">查询</button>
|
<button class="confirm-button" @tap="toSubSearch(e)">查询</button>
|
||||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked}" @tap="showPop(1, e, {})">一键设置</button>
|
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked}" @tap="showPop(1, e, {})">一键设置</button>
|
||||||
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked}" :disabled="disabled1" @tap="_receiptBillConfirm(e)">确认收货</button>
|
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked || !e.subStatus1}" @tap="showPop(4, e, {})">库位分配</button>
|
||||||
|
<button class="confirm-button" :class="{'confirm-button_disabled': !e.subOneChecked || !e.subStatus1}" :disabled="disabled1" @tap="_receiptBillConfirm(e)">确认收货</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="table-wrap table-wrap_1">
|
<view class="table-wrap table-wrap_1">
|
||||||
@@ -78,6 +79,9 @@
|
|||||||
<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>
|
||||||
@@ -90,7 +94,7 @@
|
|||||||
<view class="zd-checkbox zd-checkbox_i" :class="{'zd-checkbox_active': el.checked}"></view>
|
<view class="zd-checkbox zd-checkbox_i" :class="{'zd-checkbox_active': el.checked}"></view>
|
||||||
</view>
|
</view>
|
||||||
</td>
|
</td>
|
||||||
<td><view class="fontcol1">{{el.cgbh}}</view></td>
|
<td><view class="underline fontcol1" @tap="showPop(3, e, el)">{{el.cgbh}}</view></td>
|
||||||
<td>{{el.wlbm}}</td>
|
<td>{{el.wlbm}}</td>
|
||||||
<td>{{el.wlmc}}</td>
|
<td>{{el.wlmc}}</td>
|
||||||
<td>{{el.jldw}}</td>
|
<td>{{el.jldw}}</td>
|
||||||
@@ -109,6 +113,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</td>
|
</td>
|
||||||
<td>{{el.ckmc}}</td>
|
<td>{{el.ckmc}}</td>
|
||||||
|
<td>{{el.czsl}}</td>
|
||||||
|
<td>{{el.sysl}}</td>
|
||||||
|
<td>{{el.assign_qty}}</td>
|
||||||
<td>{{el.num}}</td>
|
<td>{{el.num}}</td>
|
||||||
<td @tap.stop="getDetails(4,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
|
<td @tap.stop="getDetails(4,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -128,16 +135,68 @@
|
|||||||
<view class="pop-wraper" :class="{'popshow': show, 'pophide': !show}">
|
<view class="pop-wraper" :class="{'popshow': show, 'pophide': !show}">
|
||||||
<view v-if="type === 1" class="allwidth pop-title">一键设置仓库</view>
|
<view v-if="type === 1" class="allwidth pop-title">一键设置仓库</view>
|
||||||
<view v-if="type === 2" class="allwidth pop-title">修改收货仓库</view>
|
<view v-if="type === 2" class="allwidth pop-title">修改收货仓库</view>
|
||||||
<view class="zd-row jcenter kwcode_wraper">
|
<view v-if="type === 3 || type === 4" class="allwidth pop-title">分配明细</view>
|
||||||
|
<view v-if="type ===1 || type === 2" class="zd-row jcenter kwcode_wraper">
|
||||||
<view class="zd-col-10 select_wraper">
|
<view class="zd-col-10 select_wraper">
|
||||||
<zxz-uni-data-select placeholder="选择仓库名称" v-model="value2" filterable :localdata="range2"></zxz-uni-data-select>
|
<zxz-uni-data-select placeholder="选择仓库名称" v-model="value2" filterable :localdata="range2"></zxz-uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="type === 3 || type === 4" class="pop-grid-wraper">
|
||||||
|
<view class="zd-row sticky zd-sec-th-wraper zd-pop-th-wraper">
|
||||||
|
<view class="zd-col-2 zd-sec-th"><text>序号</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-th"><text>物料编号</text></view>
|
||||||
|
<view class="zd-col-5 zd-sec-th"><text>物料名称</text></view>
|
||||||
|
<view class="zd-col-5 zd-sec-th"><text>库位编码</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-th"><text>数量</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-th"><text>库存数量</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-th"><text>单据编号</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-th"><text>分录序号</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-th"><text>备注</text></view>
|
||||||
|
</view>
|
||||||
|
<view v-if="type === 3" class="zd-row zd-td-wraper" v-for="(ele, t) in popData" :key="ele.id">
|
||||||
|
<view class="zd-col-2 zd-sec-td zd-pop-td"><text>{{t+1}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.wlbm}}</text></view>
|
||||||
|
<view class="zd-col-5 zd-sec-td zd-pop-td"><text>{{ele.wlmc}}</text></view>
|
||||||
|
<view v-if="ele.status" class="zd-col-5 zd-sec-td zd-pop-td"><text>{{ele.kwbm}}</text></view>
|
||||||
|
<view v-else class="zd-col-5 zd-sec-td zd-pop-td">
|
||||||
|
<scan-input
|
||||||
|
v-model="ele.kwbm"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view v-if="ele.status" class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.fpsl}}</text></view>
|
||||||
|
<view v-else class="zd-col-4 zd-sec-td zd-pop-td">
|
||||||
|
<input type="number" class="pop-input" v-model="ele.fpsl">
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.kcsl}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.djbh}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.flxh}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.bz}}</text></view>
|
||||||
|
</view>
|
||||||
|
<view v-if="type === 4" class="zd-row zd-td-wraper" v-for="(ele, t) in popData" :key="ele.id">
|
||||||
|
<view class="zd-col-2 zd-sec-td zd-pop-td"><text>{{t+1}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.wlbm}}</text></view>
|
||||||
|
<view class="zd-col-5 zd-sec-td zd-pop-td"><text>{{ele.wlmc}}</text></view>
|
||||||
|
<view class="zd-col-5 zd-sec-td zd-pop-td">
|
||||||
|
<scan-input
|
||||||
|
v-model="ele.kwbm"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td">
|
||||||
|
<input type="number" class="pop-input" v-model="ele.fpsl">
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.kcsl}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.djbh}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.flxh}}</text></view>
|
||||||
|
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.bz}}</text></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="mgb20 zd-row jcenter">
|
<view class="mgb20 zd-row jcenter">
|
||||||
<view class="zd-col-10 zd-row">
|
<view class="zd-col-10 zd-row">
|
||||||
<button class="confirm-button confirm-button_cancle mgl0" @tap="show = false">取消</button>
|
<button class="confirm-button confirm-button_cancle mgl0" @tap="show = false">取消</button>
|
||||||
<button v-if="type === 1" class="confirm-button mgl0" @tap="_receiptBillDetailSetStor">确定</button>
|
<button v-if="type === 1" class="confirm-button mgl0" @tap="_receiptBillDetailSetStor">确定</button>
|
||||||
<button v-if="type === 2" class="confirm-button mgl0" @tap="receiptBillUpdateConfirm">确定</button>
|
<button v-if="type === 2" class="confirm-button mgl0" @tap="receiptBillUpdateConfirm">确定</button>
|
||||||
|
<button v-if="type === 3" class="confirm-button mgl0" :class="{'confirm-button_disabled': popData.length === 0}" :disabled="popdisabled" @tap="_updateAssignDtl">确定</button>
|
||||||
|
<button v-if="type === 4" class="confirm-button mgl0" :class="{'confirm-button_disabled': popData.length === 0}" :disabled="popdisabled" @tap="_addAssignDtl">确定</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -148,13 +207,15 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import ScanInput from '@/components/ScanInput.vue'
|
||||||
import Pagination from '@/components/Pagination.vue'
|
import Pagination from '@/components/Pagination.vue'
|
||||||
import GridDetail from '@/components/GridDetail.vue'
|
import GridDetail from '@/components/GridDetail.vue'
|
||||||
import {getOrganizationInfo, getWarehouseInfo, receiptPage, receiptBillDetailPage, receiptBillDetailUpdate, receiptBillDetailSetStor, receiptBillConfirm} from '@/utils/getData2.js'
|
import {getOrganizationInfo, getWarehouseInfo, receiptPage, receiptBillDetailPage, receiptBillDetailUpdate, receiptBillDetailSetStor, receiptBillConfirm, viewAssignDtl, inWarehouseAssignLocation, updateAssignDtl, addAssignDtl} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox,
|
SearchBox,
|
||||||
|
ScanInput,
|
||||||
Pagination,
|
Pagination,
|
||||||
GridDetail
|
GridDetail
|
||||||
},
|
},
|
||||||
@@ -172,6 +233,7 @@
|
|||||||
dataList: [], // 一级表格数据
|
dataList: [], // 一级表格数据
|
||||||
val2: '',
|
val2: '',
|
||||||
popData: [], // 副表格点击物料编码弹出弹窗
|
popData: [], // 副表格点击物料编码弹出弹窗
|
||||||
|
popdisabled: false,
|
||||||
popObj: {}, // 弹窗当前主表格内容
|
popObj: {}, // 弹窗当前主表格内容
|
||||||
show: false, // 弹窗显示布尔值
|
show: false, // 弹窗显示布尔值
|
||||||
type: '', // 弹窗类型
|
type: '', // 弹窗类型
|
||||||
@@ -233,6 +295,7 @@
|
|||||||
this.$set(el, 'subData', [])
|
this.$set(el, 'subData', [])
|
||||||
this.$set(el, 'subAllChecked', false)
|
this.$set(el, 'subAllChecked', false)
|
||||||
this.$set(el, 'subOneChecked', false)
|
this.$set(el, 'subOneChecked', false)
|
||||||
|
this.$set(el, 'subStatus1', false)
|
||||||
})
|
})
|
||||||
this.dataList = [...res.result]
|
this.dataList = [...res.result]
|
||||||
this.totalCount1 = Number(res.totalElements)
|
this.totalCount1 = Number(res.totalElements)
|
||||||
@@ -263,6 +326,7 @@
|
|||||||
}
|
}
|
||||||
e.subAllChecked = false
|
e.subAllChecked = false
|
||||||
e.subOneChecked = false
|
e.subOneChecked = false
|
||||||
|
e.subStatus1 = false
|
||||||
},
|
},
|
||||||
// 副表格接口
|
// 副表格接口
|
||||||
async _receiptBillDetailPage (e) {
|
async _receiptBillDetailPage (e) {
|
||||||
@@ -290,6 +354,8 @@
|
|||||||
e.subData.map(el => {
|
e.subData.map(el => {
|
||||||
el.checked = e.subAllChecked
|
el.checked = e.subAllChecked
|
||||||
})
|
})
|
||||||
|
let arr = e.subData.filter(el => el.ckbm !== '')
|
||||||
|
e.subStatus1 = e.subAllChecked && e.subData.length > 0 && e.subData.length === arr.length
|
||||||
},
|
},
|
||||||
// 副表格多选
|
// 副表格多选
|
||||||
toSubCheckbox (e,el) {
|
toSubCheckbox (e,el) {
|
||||||
@@ -301,6 +367,8 @@
|
|||||||
let arr = e.subData.filter(ele => ele.checked === true)
|
let arr = e.subData.filter(ele => ele.checked === true)
|
||||||
e.subAllChecked = arr.length === e.subData.length
|
e.subAllChecked = arr.length === e.subData.length
|
||||||
e.subOneChecked = arr.length > 0
|
e.subOneChecked = arr.length > 0
|
||||||
|
let arr1 = arr.filter(el => el.ckbm !== '')
|
||||||
|
e.subStatus1 = arr.length > 0 && arr.length === arr1.length
|
||||||
},
|
},
|
||||||
// 副表格查询
|
// 副表格查询
|
||||||
toSubSearch (e) {
|
toSubSearch (e) {
|
||||||
@@ -330,8 +398,62 @@
|
|||||||
this.show = true
|
this.show = true
|
||||||
this.popObj = e
|
this.popObj = e
|
||||||
this.rawObj = obj
|
this.rawObj = obj
|
||||||
|
} else if (type === 3) {
|
||||||
|
this._viewAssignDtl(e, obj)
|
||||||
|
this.popObj = e
|
||||||
|
} else if (type === 4) {
|
||||||
|
if (!e.subOneChecked || !e.subStatus1) return
|
||||||
|
let arr = e.subData.filter(ele => ele.checked === true)
|
||||||
|
this.popObj = e
|
||||||
|
this._inWarehouseAssignLocation(arr)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 点击二级表格行中的物料编号,弹窗加载表格
|
||||||
|
async _viewAssignDtl (e, obj) {
|
||||||
|
let res = await viewAssignDtl(obj)
|
||||||
|
if (res.code ===1) {
|
||||||
|
this.popData = [...res.result]
|
||||||
|
this.sortArr(this.popData)
|
||||||
|
this.show = true
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sortArr (arr) {
|
||||||
|
// 按单据编号排序,单据编号相同按照分录序号排序
|
||||||
|
arr.sort((a, b) => {
|
||||||
|
if (a.djbh !== b.djbh) {
|
||||||
|
return a.djbh < b.djbh ? -1 : 1
|
||||||
|
} else {
|
||||||
|
return a.flxh < b.flxh ? -1 : 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 点击二级表格行中的物料编号,弹窗加载表格 -> 点击确定按钮
|
||||||
|
async _updateAssignDtl () {
|
||||||
|
this.popdisabled = true
|
||||||
|
if (this.popData.length === 0) {
|
||||||
|
this.popdisabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await updateAssignDtl(this.popData)
|
||||||
|
if (res.code === 1) {
|
||||||
|
this.show = false
|
||||||
|
this._receiptBillDetailPage(this.popObj)
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.popdisabled = false
|
||||||
|
} catch (e) {
|
||||||
|
this.popdisabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 一键设置仓库弹窗->确定
|
// 一键设置仓库弹窗->确定
|
||||||
async _receiptBillDetailSetStor () {
|
async _receiptBillDetailSetStor () {
|
||||||
if (this.value2 === '') {
|
if (this.value2 === '') {
|
||||||
@@ -405,10 +527,46 @@
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 点击分配库位按钮->弹窗表格
|
||||||
|
async _inWarehouseAssignLocation (arr) {
|
||||||
|
let res = await inWarehouseAssignLocation(arr, 'RECE')
|
||||||
|
if (res.code ===1) {
|
||||||
|
this.popData = [...res.result]
|
||||||
|
this.sortArr(this.popData)
|
||||||
|
this.show = true
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 分配库位弹窗表格 -> 点击确定按钮
|
||||||
|
async _addAssignDtl () {
|
||||||
|
this.popdisabled = true
|
||||||
|
if (this.popData.length === 0) {
|
||||||
|
this.popdisabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await addAssignDtl(this.popData, 'RECE')
|
||||||
|
if (res.code === 1) {
|
||||||
|
this.show = false
|
||||||
|
this._receiptPage(this.popObj)
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.popdisabled = false
|
||||||
|
} catch (e) {
|
||||||
|
this.popdisabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
// 点击收货确认按钮
|
// 点击收货确认按钮
|
||||||
async _receiptBillConfirm (e) {
|
async _receiptBillConfirm (e) {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (!e.subOneChecked) {
|
if (!e.subOneChecked || !e.subStatus1) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user