收货确认
This commit is contained in:
@@ -169,7 +169,7 @@
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
import {getWarehouseInfo, allocationPage, allocationBillPage, allocationBillUpdate, allocationBillConfirm} from '@/utils/mork2.js'
|
||||
import {getWarehouseInfo, allocationPage, allocationBillPage, allocationBillUpdate, allocationBillConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
|
||||
@@ -2,105 +2,118 @@
|
||||
<view class="content">
|
||||
<nav-bar title="收货确认"></nav-bar>
|
||||
<view class="search-confirm-wrap">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-24 zd-row">
|
||||
<view class="zd-col-8"><search-box v-model="val1" /></view>
|
||||
<view class="zd-col-8 select_wraper">
|
||||
<uni-data-select
|
||||
placeholder="请选择仓库名称"
|
||||
v-model="value1"
|
||||
:localdata="range1"
|
||||
></uni-data-select>
|
||||
</view>
|
||||
<view class="zd-col-7 select_wraper">
|
||||
<uni-data-select
|
||||
placeholder="请选择状态"
|
||||
v-model="value"
|
||||
:localdata="range"
|
||||
></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<button class="confirm-button mgr30" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr1.length === 0}" :disabled="disabled1" @tap="toSure">收货确认</button>
|
||||
<view class="zd-row jcflexstart">
|
||||
<view class="zd-col-8"><search-box v-model="val1" /></view>
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcflexstart table-title_wraper">{{title}}</view>
|
||||
<view class="zd-row jcflexstart table-title_wraper">收货确认</view>
|
||||
<view class="grid-wrap">
|
||||
<view class="table-wrap">
|
||||
<view class="zdrow-wrap">
|
||||
<view class="zd-row sticky zd-th-wraper">
|
||||
<view class="zd-col-1 zd-th"><text>序号</text></view>
|
||||
<view class="zd-col-1 zd-th"><text>选择</text></view>
|
||||
<view class="zd-col-2 zd-th"><text>{{crType === 'IN'? '入库单号':'出库单号'}}</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"><text>状态</text></view>
|
||||
<view class="zd-col-2 zd-th nowrap"><text>制单日期</text></view>
|
||||
<view class="zd-col-2 zd-th nowrap"><text>制单人</text></view>
|
||||
<view class="zd-col-2 zd-th nowrap"><text>业务日期</text></view>
|
||||
<view class="zd-col-2 zd-th nowrap"><text>操作日期</text></view>
|
||||
<view class="zd-col-2 zd-th"><text>操作人</text></view>
|
||||
<view class="zd-col-3 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"><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"><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"><text>创建日期</text></view>
|
||||
<view class="zd-col-2 zd-th">更多</view>
|
||||
</view>
|
||||
<view class="zd-td-wraper" v-for="(e, i) in dataList1" :key="e.id">
|
||||
<view class="zd-row" :class="{'zd-td-checked': pkId === e.id}">
|
||||
<view class="zd-col-1 zd-td" @tap.stop="toCollapse(e)"><text>{{i+1}}</text></view>
|
||||
<view class="zd-col-1 zd-td" @tap.stop="toCheck1(e)">
|
||||
<view class="zd-checkbox" :class="{'zd-checkbox_active': e.checked}"></view>
|
||||
<view class="zd-row" :class="{'zd-td-checked': pkId === e.id}" @tap="toCollapse(e)">
|
||||
<view class="zd-col-1 zd-td"><text>{{i+1}}</text></view>
|
||||
<view class="zd-col-3 zd-td fontcol1"><text>{{e.djbh}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.ywrq}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.tjsj}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.cggs}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.sscq}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.gysbm}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.gys}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.dhrq}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.cjr}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.cjrq}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="getDetails(4,e)">
|
||||
<uni-icons type="more-filled" size="14" color="#fff"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-col-2 zd-td fontcol1" @tap.stop="toCollapse(e)"><text>{{e.djbh}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="toCollapse(e)"><text>{{e.bmmc}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="toCollapse(e)"><text>{{e.zzmc}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="toCollapse(e)"><text>{{e.ckmc}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="toCollapse(e)"><text class="fontbg1">{{e.djzt}}</text></view>
|
||||
<view class="zd-col-2 zd-td nowrap" @tap.stop="toCollapse(e)"><text>{{e.cjsj}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="toCollapse(e)"><text>{{e.cjr}}</text></view>
|
||||
<view class="zd-col-2 zd-td nowrap" @tap.stop="toCollapse(e)"><text>{{e.ywrq}}</text></view>
|
||||
<view class="zd-col-2 zd-td nowrap" @tap.stop="toCollapse(e)"><text>{{e.update_time}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="toCollapse(e)"><text>{{e.update_name}}</text></view>
|
||||
<view class="zd-col-2 zd-td" @tap.stop="getDetails(1,e)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></view>
|
||||
</view>
|
||||
<!-- 二级表格start -->
|
||||
<view v-show="pkId === e.djid" class="zd-sec-wraper">
|
||||
<view class="zd-row zd-sec-th-wraper">
|
||||
<view class="zd-col-1 zd-sec-th"><text>序号</text></view>
|
||||
<view class="zd-col-1 zd-sec-th"><text>选择</text></view>
|
||||
<view class="zd-col-2 zd-sec-th"><text>仓库名称</text></view>
|
||||
<view class="zd-col-2 zd-sec-th"><text>物料编号</text></view>
|
||||
<view class="zd-col-3 zd-sec-th"><text>物料名称</text></view>
|
||||
<view class="zd-col-1 zd-sec-th"><text>单位</text></view>
|
||||
<view class="zd-col-2 zd-sec-th"><text>库位</text></view>
|
||||
<view class="zd-col-1 zd-sec-th"><text>数量</text></view>
|
||||
<view class="zd-col-2 zd-sec-th"><text>{{crType === 'IN'? '已入数量':'已出数量'}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-th"><text>剩余数量</text></view>
|
||||
<view class="zd-col-2 zd-sec-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-1 zd-th"><text>更多</text></view>
|
||||
<view v-if="pkId === e.djid" class="zd-sec-wraper pd0">
|
||||
<view class="table-wrap">
|
||||
<table class="grid-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th v-if="pkObj.djzt !== '审核后'">选择</th>
|
||||
<th><text class="fontcol1">采购订单号</text></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>
|
||||
</thead>
|
||||
<tbody v-if="pkObj.djzt !== '审核后'">
|
||||
<tr v-for="(el, j) in dataList2" :key="el.id">
|
||||
<td>{{j+1}}</td>
|
||||
<td><view class="zd-checkbox" :class="{'zd-checkbox_active': el.checked}" @tap="toCheck2(el)"></view></td>
|
||||
<td>{{el.cgbh}}</td>
|
||||
<td>{{el.wlbm}}</td>
|
||||
<td>{{el.wlmc}}</td>
|
||||
<td>{{el.ggxh}}</td>
|
||||
<td>{{el.jldw}}</td>
|
||||
<td>{{el.ddsl}}</td>
|
||||
<td>{{el.bcshsl}}</td>
|
||||
<td>{{el.zzmc}}</td>
|
||||
<td>{{el.num}}</td>
|
||||
<td><input class="td_input" type="number" v-model="el.shsl" @blur="_receiptBillUpdate(el)" /></td>
|
||||
<td @tap.stop="checkWarehouse(1, '收货仓库', el)"><input class="td_input" type="text" v-model="el.ckbm" readonly /></td>
|
||||
<td>
|
||||
<view class="td_scan_wraper">
|
||||
<scan-input v-model="el.kwbm" @handleChange="_receiptBillUpdate(el)" />
|
||||
</view>
|
||||
</td>
|
||||
<td @tap.stop="getDetails(4,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else>
|
||||
<tr v-for="(el, j) in dataList2" :key="el.id">
|
||||
<td>{{j+1}}</td>
|
||||
<td>{{el.cgbh}}</td>
|
||||
<td>{{el.wlbm}}</td>
|
||||
<td>{{el.wlmc}}</td>
|
||||
<td>{{el.ggxh}}</td>
|
||||
<td>{{el.jldw}}</td>
|
||||
<td>{{el.ddsl}}</td>
|
||||
<td>{{el.bcshsl}}</td>
|
||||
<td>{{el.zzmc}}</td>
|
||||
<td>{{el.num}}</td>
|
||||
<td>{{el.shsl}}</td>
|
||||
<td>{{el.ckbm}}</td>
|
||||
<td>{{el.kwbm}}</td>
|
||||
<td @tap.stop="getDetails(4,el)"><uni-icons type="more-filled" size="14" color="#fff"></uni-icons></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
<view class="zd-row zd-td-wraper" v-for="(el, j) in dataList2" :key="el.id" @tap.stop="toCheck2(el)">
|
||||
<view class="zd-col-1 zd-sec-td"><text>{{j+1}}</text></view>
|
||||
<view class="zd-col-1 zd-sec-td"><view class="zd-checkbox" :class="{'zd-checkbox_active': el.checked}"></view></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.ckmc}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.wlbm}}</text></view>
|
||||
<view class="zd-col-3 zd-sec-td"><text>{{el.wlmc}}</text></view>
|
||||
<view class="zd-col-1 zd-sec-td nowrap"><text>{{el.jldw}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.kwbm}}</text></view>
|
||||
<view class="zd-col-1 zd-sec-td"><text>{{el.sl}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.czsl}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.sysl}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.kcsl}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td"><text>{{el.update_name}}</text></view>
|
||||
<view class="zd-col-2 zd-sec-td nowrap"><text>{{el.update_time}}</text></view>
|
||||
<view class="zd-col-1 zd-sec-td"><uni-icons type="more-filled" size="14" color="#fff" @tap="getDetails(2,el)"></uni-icons></view>
|
||||
</view>
|
||||
<view class="zd-row jcenter">
|
||||
<view class="zd-col-22 zd-row">
|
||||
<view class="zd-col-1 zd-row jcenter">
|
||||
<view class="zd-row jcenter mgt10 mgb20">
|
||||
<view class="zd-col-21 zd-row jcenter">
|
||||
<view v-if="pkObj.djzt !== '审核后'" class="zd-col-1 zd-row jcenter">
|
||||
<view class="zd-checkbox" :class="{'zd-checkbox_active': checkArrActive}" @tap="selectAll"></view>
|
||||
</view>
|
||||
<view class="zd-col-11 zd-row jcflexstart">
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr2.length === 0}" @tap="kuwConfirm">{{crType === 'IN' ? '入库' : '出库'}}</button>
|
||||
<view v-if="pkObj.djzt !== '审核后'" class="zd-col-11 zd-row jcflexstart">
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkArr.length === 0}" :disabled="disabled" @tap="_receiptBillConfirm">直接调拨</button>
|
||||
</view>
|
||||
<view class="zd-col-12 zd-row jcflexend">
|
||||
<pagination :total="totalCount2" :page-size="queryParams2.pageSize" :current-page="currentPage2" @page-change="handlePageChange2" />
|
||||
@@ -111,60 +124,27 @@
|
||||
<!-- 二级表格end -->
|
||||
</view>
|
||||
</view>
|
||||
<pagination v-show="dataList1.length > 0" :total="totalCount1" :page-size="queryParams1.pageSize" :current-page="currentPage1" @page-change="handlePageChange1" />
|
||||
<view class="zd-row jcenter pd20">
|
||||
<pagination v-show="dataList1.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" :crType="crType" @closeDetail="delShow=false"></grid-detail>
|
||||
<grid-detail :show="delShow" :data="detailObj" @closeDetail="delShow=false"></grid-detail>
|
||||
<view class="pop-wraper" :class="{'popshow': show, 'pophide': !show}">
|
||||
<view class="allwidth pop-title">{{crType === 'IN' ? '入库' : '出库'}}</view>
|
||||
<view v-if="type === '1'" 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>
|
||||
<view class="zd-row zd-td-wraper" v-for="(ele, t) in dataList3" :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 v-show="!ele.checked" type="number" class="pop-input" v-model="ele.sysl" @blur="handleBlur(ele)">
|
||||
<text v-show="ele.checked">{{ele.sysl}}</text>
|
||||
</view> -->
|
||||
<view class="zd-col-4 zd-sec-td zd-pop-td">
|
||||
<input type="number" class="pop-input" v-model="ele.sysl">
|
||||
</view>
|
||||
<view class="zd-col-4 zd-sec-td zd-pop-td"><text>{{ele.kcsl}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="zd-row jcenter kwcode_wraper">
|
||||
<view class="zd-col-12">
|
||||
<scan-input
|
||||
v-model="kwCode"
|
||||
/>
|
||||
<view class="allwidth pop-title">修改{{modalObj.title}}</view>
|
||||
<view class="zd-row jcenter kwcode_wraper">
|
||||
<view class="zd-col-12 select_wraper">
|
||||
<zxz-uni-data-select placeholder="请选择仓库名称" v-model="value" filterable :localdata="range"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mgb20 zd-row jcenter">
|
||||
<view class="zd-col-4">
|
||||
<button class="confirm-button confirm-button_cancle" @tap="show = false">取消</button>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': (type === '1' && dataList3.length === 0) || (type === '2' && kwCode === '')}" :disabled="disabled2" @tap="modalConfirm">确定</button>
|
||||
<view class="zd-col-10 zd-row">
|
||||
<button class="confirm-button confirm-button_cancle mgl0" @tap="show = false">取消</button>
|
||||
<button class="confirm-button mgl0" @tap="modalConfirm">确定</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="show" class="modal" @click.stop="show = false"></view>
|
||||
<uni-popup ref="alertDialog" type="dialog">
|
||||
<uni-popup-dialog type="info" cancelText="关闭" confirmText="确定" title="提示" :content="crType === 'IN'? '是否确认入库?':'是否确认出库?'" @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -174,7 +154,7 @@
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
import {easOutInBillPage, easOutInBillDetailPage, easOutInBillUpdate, easOutInBillDetailUpdate, queryInventoryInfo} from '@/utils/getData2.js'
|
||||
import {getWarehouseInfo, receiptPage, receiptBillPage, receiptBillUpdate, receiptBillConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -185,62 +165,50 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
id: '',
|
||||
crType: '',
|
||||
val1: '',
|
||||
dataList1: [],
|
||||
dataList2: [],
|
||||
dataList3: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
checkArr1: [],
|
||||
disabled1: false,
|
||||
btnActive1: false,
|
||||
totalCount1: 0,
|
||||
queryParams1:{
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
currentPage1: 1,
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
dataList2: [],
|
||||
totalCount2: 0,
|
||||
queryParams2:{
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNum: 1
|
||||
},
|
||||
currentPage2: 1,
|
||||
checkArr2: [],
|
||||
checkArr: [],
|
||||
checkArrActive: false,
|
||||
disabled2: false,
|
||||
show: false,
|
||||
type: '',
|
||||
kwCode: '',
|
||||
checkArr3: [],
|
||||
delShow: false,
|
||||
detailObj: {},
|
||||
value: '',
|
||||
range:[{value: 1, text: '提交'}, {value: 2, text: '审核'}],
|
||||
value1: '',
|
||||
range1: [{value: '3.03.013', text: '三期原材料库'}]
|
||||
range: [],
|
||||
show: false,
|
||||
modalObj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
if (this.$store.getters.publicArr) {
|
||||
this.dataList1 = this.$store.getters.publicArr
|
||||
}
|
||||
},
|
||||
destroyed () {
|
||||
this.$store.dispatch('setPublicArr', '')
|
||||
},
|
||||
onLoad (options) {
|
||||
this.id = options.id
|
||||
this.title = options.name
|
||||
this.crType = options.type
|
||||
},
|
||||
created () {
|
||||
this.toSearch()
|
||||
this._getWarehouseInfo()
|
||||
},
|
||||
methods: {
|
||||
// 仓库下拉框
|
||||
async _getWarehouseInfo () {
|
||||
let res = await getWarehouseInfo()
|
||||
if (res.code === 1) {
|
||||
this.range = [...res.result]
|
||||
this.range.map(e => {
|
||||
this.$set(e, 'text', e.ckmc)
|
||||
this.$set(e, 'value', e.ckbm)
|
||||
})
|
||||
this.toSearch()
|
||||
}
|
||||
},
|
||||
// 查询一级表格
|
||||
toSearch () {
|
||||
this.queryParams1 = {
|
||||
@@ -250,16 +218,12 @@
|
||||
this.currentPage1 = 1
|
||||
this.dataList2 = []
|
||||
this.pkId = ''
|
||||
this._easOutInBillPage()
|
||||
this._receiptPage()
|
||||
},
|
||||
// 一级表格接口
|
||||
async _easOutInBillPage () {
|
||||
let res = await easOutInBillPage(this.val1, this.id, this.value, this.value1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
|
||||
async _receiptPage () {
|
||||
let res = await receiptPage(this.val1, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
|
||||
if (res.code === 1) {
|
||||
this.checkArr1 = []
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList1 = [...res.result]
|
||||
this.totalCount1 = Number(res.totalElements)
|
||||
this.queryParams1.pageSize = Number(res.pageSize)
|
||||
@@ -272,15 +236,15 @@
|
||||
}
|
||||
},
|
||||
// 二级表格接口
|
||||
async _easOutInBillDetailPage () {
|
||||
let res = await easOutInBillDetailPage(this.pkObj.djid, this.queryParams2.pageNum + '', this.queryParams2.pageSize + '')
|
||||
async _receiptBillPage () {
|
||||
let res = await receiptBillPage(this.pkObj.djid, this.queryParams2.pageNum + '', this.queryParams2.pageSize + '')
|
||||
if (res.code === 1) {
|
||||
this.checkArr2 = []
|
||||
this.checkArrActive = false
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'checked', true)
|
||||
})
|
||||
this.dataList2 = [...res.result]
|
||||
this.checkArr = [...this.dataList2]
|
||||
this.checkArrActive = true
|
||||
this.totalCount2 = Number(res.totalElements)
|
||||
this.queryParams2.pageSize = Number(res.pageSize)
|
||||
this.queryParams2.pageNum = Number(res.pageNum)
|
||||
@@ -297,13 +261,13 @@
|
||||
this.currentPage1 = page
|
||||
this.dataList2 = []
|
||||
this.pkId = ''
|
||||
this._easOutInBillPage()
|
||||
this._receiptPage()
|
||||
},
|
||||
// 二级表格切换分页
|
||||
handlePageChange2(page) {
|
||||
this.queryParams2.pageNum = page
|
||||
this.currentPage2 = page
|
||||
this._easOutInBillDetailPage()
|
||||
this._receiptBillPage()
|
||||
},
|
||||
// 点击一级表格一行加载二级表格
|
||||
toCollapse (e) {
|
||||
@@ -312,61 +276,18 @@
|
||||
this.dataList2 = []
|
||||
if (this.pkId === e.djid) {
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
this._receiptBillPage()
|
||||
}
|
||||
},
|
||||
// 一级表格选中一行
|
||||
toCheck1 (e) {
|
||||
e.checked = !e.checked
|
||||
let arr = this.dataList1.filter(el => el.checked === true)
|
||||
this.checkArr1 = arr.map(el => {return el.djid})
|
||||
// if (arr.length === 1) {
|
||||
// this.btnActive1 = arr[0].djzt === '提交' ? true : false
|
||||
// } else {
|
||||
// this.btnActive1 = false
|
||||
// }
|
||||
},
|
||||
// 点击单据审核按钮
|
||||
async toSure () {
|
||||
this.disabled1 = true
|
||||
// if (this.checkArr1.length === 0 || this.btnActive1) {
|
||||
// this.disabled1 = false
|
||||
// return
|
||||
// }
|
||||
if (this.checkArr1.length === 0) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await easOutInBillUpdate(this.checkArr1)
|
||||
if (res.code === 1) {
|
||||
this.disabled1 = false
|
||||
this.checkArr1 = []
|
||||
this._easOutInBillPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 二级表格多选
|
||||
toCheck2 (e) {
|
||||
e.checked = !e.checked
|
||||
this.checkArr2 = this.dataList2.filter(el => el.checked === true)
|
||||
if (this.checkArr2.length === this.dataList2.length) {
|
||||
this.checkArr = this.dataList2.filter(el => el.checked === true)
|
||||
if (this.checkArr.length === this.dataList2.length) {
|
||||
this.checkArrActive = true
|
||||
}
|
||||
},
|
||||
@@ -376,141 +297,84 @@
|
||||
this.dataList2.map(el => {
|
||||
el.checked = this.checkArrActive
|
||||
})
|
||||
this.checkArr2 = this.dataList2.filter(el => el.checked === true)
|
||||
this.checkArr = this.dataList2.filter(el => el.checked === true)
|
||||
},
|
||||
// 点击出入库按钮
|
||||
kuwConfirm () {
|
||||
if (this.checkArr2.length === 0) {
|
||||
return
|
||||
} else if (this.checkArr2.length === 1) {
|
||||
if ((Number(this.checkArr2[0].sl) > Number(this.checkArr2[0].kcsl)) && this.crType === 'OUT') {
|
||||
// 二级表格详情修改接口
|
||||
async _receiptBillUpdate (e) {
|
||||
try {
|
||||
let res = await receiptBillUpdate(e)
|
||||
if (res.code !== 1) {
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else {
|
||||
this.type = '1'
|
||||
this._queryInventoryInfo()
|
||||
}
|
||||
} else if (this.checkArr2.length >= 2) {
|
||||
let flag = false
|
||||
this.checkArr2.map(el => {
|
||||
if (Number(el.sl) > Number(el.kcsl)) {
|
||||
flag = true
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
// 修改调出仓库弹窗
|
||||
checkWarehouse (type, title, e) {
|
||||
this.modalObj = {type: type, title: title, id: e.flid}
|
||||
if (type === 1) {
|
||||
this.value = e.dcckmc
|
||||
} else if (type === 2) {
|
||||
this.value = e.drckmc
|
||||
}
|
||||
this.show = true
|
||||
},
|
||||
// 修改调出仓库确定
|
||||
modalConfirm () {
|
||||
let obj = {}
|
||||
if (this.modalObj.type === 1) {
|
||||
this.dataList2.map(e => {
|
||||
if (e.flid === this.modalObj.id) {
|
||||
e.dcckmc = this.value
|
||||
obj = e
|
||||
}
|
||||
})
|
||||
if (flag && this.crType === 'OUT') {
|
||||
} else if (this.modalObj.type === 2) {
|
||||
this.dataList2.map(e => {
|
||||
if (e.flid === this.modalObj.id) {
|
||||
e.drckmc = this.value
|
||||
obj = e
|
||||
}
|
||||
})
|
||||
}
|
||||
this.show = false
|
||||
this._receiptBillUpdate(obj)
|
||||
},
|
||||
// 点击直接调拨按钮
|
||||
async _receiptBillConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.checkArr.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = receiptBillConfirm(this.checkArr)
|
||||
if (res.code === 1) {
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._receiptBillPage()
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
} else {
|
||||
this.type = '2'
|
||||
// this.show = true
|
||||
// this.kwCode = ''
|
||||
this.$refs.alertDialog.open()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
// 选择二级表格一行,点击出入库按钮,弹窗加载出入库表格
|
||||
async _queryInventoryInfo () {
|
||||
let res = await queryInventoryInfo(this.checkArr2)
|
||||
if (res.code ===1) {
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'yqty', el.sysl)
|
||||
})
|
||||
this.dataList3 = [...res.result]
|
||||
this.show = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 出入库表格输入框计算,功能暂时隐藏
|
||||
handleBlur (ele) {
|
||||
if (Number(ele.sysl) >= Number(ele.yqty)) {
|
||||
ele.sysl = ele.yqty
|
||||
return
|
||||
}
|
||||
ele.checked = true
|
||||
let index = ''
|
||||
let obj = {}
|
||||
this.dataList3.map((e, i) => {
|
||||
if (e.id === ele.id) {
|
||||
index = i
|
||||
obj = Object.assign({}, e, {'checked': false}, {'kwbm': ''}, {id: e.id + Math.random() * 1000}, {sysl: Number(e.yqty) - Number(ele.sysl)}, {yqty: Number(e.yqty) - Number(ele.sysl)})
|
||||
}
|
||||
})
|
||||
this.dataList3.splice(index+1, 0, obj)
|
||||
this.dataList3 = [...this.dataList3]
|
||||
},
|
||||
// 点击出入库弹窗确定按钮
|
||||
modalConfirm () {
|
||||
this.disabled2 = true
|
||||
let arr = []
|
||||
if (this.type === '1' && this.dataList3.length === 0) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
} else if (this.type === '2' && this.kwCode === '') {
|
||||
this.disabled2 = false
|
||||
return
|
||||
} else if (this.type === '1') {
|
||||
// arr = this.dataList3
|
||||
this.checkArr3 = [...this.dataList3]
|
||||
this.$refs.alertDialog.open()
|
||||
this.disabled2 = false
|
||||
return
|
||||
} else if (this.type === '2') {
|
||||
this.checkArr2.map(el => {
|
||||
el.kwbm = this.kwCode
|
||||
})
|
||||
arr = [...this.checkArr2]
|
||||
}
|
||||
this._easOutInBillDetailUpdate(arr)
|
||||
},
|
||||
// 提示弹窗确定按钮
|
||||
dialogConfirm () {
|
||||
if (this.type === '2') {
|
||||
this._easOutInBillDetailUpdate(this.checkArr2)
|
||||
} else {
|
||||
this._easOutInBillDetailUpdate(this.checkArr3)
|
||||
}
|
||||
},
|
||||
dialogClose () {},
|
||||
// 出入库确定接口
|
||||
async _easOutInBillDetailUpdate (arr) {
|
||||
try {
|
||||
|
||||
let res = await easOutInBillDetailUpdate(arr)
|
||||
if (res.code === 1) {
|
||||
this.disabled2 = false
|
||||
this.show = false
|
||||
this.queryParams2 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage2 = 1
|
||||
this._easOutInBillDetailPage()
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
} else {
|
||||
this.disabled2 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
// 详情弹窗
|
||||
getDetails (type,e) {
|
||||
this.delShow = !this.delShow
|
||||
@@ -545,4 +409,8 @@
|
||||
border-bottom-color #071F3E
|
||||
/deep/ .uni-select__selector-item
|
||||
color #fff
|
||||
.zd-th
|
||||
font-size: 12px;
|
||||
line-height: 13px;
|
||||
height: 36px;
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user