生产出库功能
This commit is contained in:
10
pages.json
10
pages.json
@@ -27,7 +27,15 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/management/in-storage_LLCKD",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/management/alloc-maintenance",
|
||||
"style" :
|
||||
|
||||
@@ -88,7 +88,11 @@
|
||||
} else if (e.ywlx === 'SH') {
|
||||
url = '/pages/management/receive-confirm_new'
|
||||
} else {
|
||||
url = '/pages/management/in-storage_new?id=' + e.djlx + '&name=' + e.name + '&type=' + e.ywlx
|
||||
if (e.djlx === 'LLCKD') {
|
||||
url = '/pages/management/in-storage_LLCKD?id=' + e.djlx + '&name=' + e.name + '&type=' + e.ywlx
|
||||
} else {
|
||||
url = '/pages/management/in-storage_new?id=' + e.djlx + '&name=' + e.name + '&type=' + e.ywlx
|
||||
}
|
||||
}
|
||||
uni.redirectTo({
|
||||
url: url
|
||||
|
||||
651
pages/management/in-storage_LLCKD.vue
Normal file
651
pages/management/in-storage_LLCKD.vue
Normal file
@@ -0,0 +1,651 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="search-confirm-wrap">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-13 zd-row jcflexstart">
|
||||
<view :class="crType === 'OUT' ? 'zd-col-10' : 'zd-col-16'"><search-box placeholder="输入查询条件" v-model="val1" /></view>
|
||||
<view v-if="crType === 'OUT'" class="zd-col-6 select_wraper mgl10">
|
||||
<zxz-uni-data-select placeholder="选择仓管员" v-model="value2" filterable :localdata="range2"></zxz-uni-data-select>
|
||||
</view>
|
||||
<view class="relative zd-col-8 mgl10">
|
||||
<switch :checked="isChecked" color="#007de7"/>
|
||||
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 75px; height: 26px;left: 0;"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-11 zd-row jcflexend">
|
||||
<button class="confirm-button" @tap="toSearch">查询</button>
|
||||
<button class="confirm-button" :disabled="disabled1" @tap="_easOutInBillSync">同步</button>
|
||||
<button v-if="id !== 'CGRKD'" class="confirm-button" :class="{'confirm-button_disabled': !subCheckData.length}" @tap="showPop(2, '', '')">库位分配</button>
|
||||
<button v-if="id !== 'CGRKD'" class="confirm-button" :class="{'confirm-button_disabled': !subCheckData.length}" @tap="inWarehouseSure">库存提交</button>
|
||||
<button class="confirm-button" :class="{'confirm-button_disabled': checkData.length === 0}" :disabled="disabled1" @tap="_easOutInBillUpdate">单据审核</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="grid-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 class="fontcol1">{{crType === 'IN'? '入库单号':'出库单号'}}</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-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 v-if="crType === 'OUT'" class="zd-col-2 zd-th"><text>仓管员</text></view>
|
||||
<view class="zd-col-4 zd-th"><text>审核结果</text></view>
|
||||
<view class="zd-th" :class="crType === 'OUT' ? 'zd-col-1' : 'zd-col-2'">更多</view>
|
||||
</view>
|
||||
<view class="zd-td-wraper" v-for="(e, i) in dataList" :key="e.id">
|
||||
<view class="zd-row" @tap="loadSubData(e)">
|
||||
<view class="zd-col-1 zd-td"><text>{{i+1}}</text></view>
|
||||
<view class="zd-col-1 zd-td" @tap.stop="toCheckbox(e)">
|
||||
<view class="zd-checkbox" :class="{'zd-checkbox_active': e.checked}"></view>
|
||||
</view>
|
||||
<view class="zd-col-2 zd-td fontcol1"><text>{{e.djbh}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.bmmc}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.zzmc}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.ckmc}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text class="fontbg1">{{e.djzt}}</text></view>
|
||||
<view class="zd-col-2 zd-td nowrap"><text>{{e.cjsj}}</text></view>
|
||||
<view class="zd-col-2 zd-td"><text>{{e.cjr}}</text></view>
|
||||
<view class="zd-col-2 zd-td nowrap"><text>{{e.ywrq}}</text></view>
|
||||
<view v-if="crType === 'OUT'" class="zd-col-2 zd-td"><text>{{e.cgymc}}</text></view>
|
||||
<view class="zd-col-4 zd-td"><text>{{e.shjg}}</text></view>
|
||||
<view class="zd-td" :class="crType === 'OUT' ? 'zd-col-1' : 'zd-col-2'" @tap.stop="getDetails(1,e)">
|
||||
<uni-icons type="more-filled" size="14" color="#fff"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 二级表格start -->
|
||||
<view v-if="e.subData.length > 0" class="zd-sec-wraper pd0">
|
||||
<view class="table-wrap" :style="{height: isChecked ? (e.subData.length >= 5 ? '230px' : (30 + 40 * e.subData.length) + 'px') : (e.filtData.length >= 5 ? '230px' : (30 + 40 * e.filtData.length) + 'px')}" @touchmove="handleInnerScroll">
|
||||
<table class="grid-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>
|
||||
<view class="zd-row jcenter">
|
||||
<view class="zd-checkbox zd-checkbox_i" :class="{'zd-checkbox_active': e.subAllChecked}" @tap="toSubAllCheckbox(e)"></view>
|
||||
</view>
|
||||
</th>
|
||||
<th class="fontcol1">物料编号</th>
|
||||
<th>物料名称</th>
|
||||
<th>跟踪号</th>
|
||||
<th>仓库名称</th>
|
||||
<th>单位</th>
|
||||
<th>数量</th>
|
||||
<th>总数</th>
|
||||
<th>{{crType === 'IN'? '已入数量':'已出数量'}}</th>
|
||||
<th>剩余数量</th>
|
||||
<th>已分配数量</th>
|
||||
<th>库存</th>
|
||||
<th>操作人</th>
|
||||
<th v-if="crType === 'OUT'">仓管员</th>
|
||||
<th>操作日期</th>
|
||||
<th>更多</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(el, j) in e.subData" :key="el.id" v-if="(Number(el.sysl) !== 0 && !isChecked) || isChecked">
|
||||
<td>{{j+1}}</td>
|
||||
<td @tap="toSubCheckbox(e, el)">
|
||||
<view class="zd-row jcenter">
|
||||
<view class="zd-checkbox zd-checkbox_i" :class="{'zd-checkbox_active': el.checked}"></view>
|
||||
</view>
|
||||
</td>
|
||||
<td v-if="id !== 'CGRKD'" class="underline fontcol1" @tap="showPop(1, e, el)">{{el.wlbm}}</td>
|
||||
<td v-if="id === 'CGRKD'" class="fontcol1">{{el.wlbm}}</td>
|
||||
<td>{{el.wlmc}}</td>
|
||||
<td>{{el.gzhbm}}</td>
|
||||
<td>{{el.ckmc}}</td>
|
||||
<td>{{el.jldw}}</td>
|
||||
<td>{{el.sl}}</td>
|
||||
<td>{{el.wlzs}}</td>
|
||||
<td>{{el.czsl}}</td>
|
||||
<td>{{el.sysl}}</td>
|
||||
<td>{{el.assign_qty}}</td>
|
||||
<td>{{el.kcsl}}</td>
|
||||
<td>{{el.update_name}}</td>
|
||||
<td v-if="crType === 'OUT'">{{el.cgymc}}</td>
|
||||
<td>{{el.update_time}}</td>
|
||||
<td @tap.stop="getDetails(2,el)">
|
||||
<uni-icons type="more-filled" size="14" color="#fff"></uni-icons>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 二级表格end -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcenter pd20">
|
||||
<pagination v-show="dataList.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>
|
||||
<view class="pop-wraper pop-wraper_1" :class="{'popshow': show, 'pophide': !show}">
|
||||
<view class="allwidth pop-title">分配明细</view>
|
||||
<view 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-4 zd-sec-th"><text>物料名称</text></view>
|
||||
<view class="zd-col-9 zd-sec-th"><text>库位编码</text></view>
|
||||
<view class="zd-col-3 zd-sec-th"><text>数量</text></view>
|
||||
<view class="zd-col-3 zd-sec-th"><text>库存数量</text></view>
|
||||
<view class="zd-col-4 zd-sec-th"><text>单据编号</text></view>
|
||||
<view class="zd-col-3 zd-sec-th"><text>分录序号</text></view>
|
||||
<view class="zd-col-4 zd-sec-th"><text>备注</text></view>
|
||||
</view>
|
||||
<view v-if="type === 1" 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-4 zd-sec-td zd-pop-td"><text>{{ele.wlmc}}</text></view>
|
||||
<view v-if="ele.status" class="zd-col-9 zd-sec-td zd-pop-td"><text>{{ele.kwbm}}</text></view>
|
||||
<view v-else class="zd-col-9 zd-sec-td zd-pop-td">
|
||||
<scan-input
|
||||
v-model="ele.kwbm"
|
||||
/>
|
||||
</view>
|
||||
<view v-if="ele.status" class="zd-col-3 zd-sec-td zd-pop-td"><text>{{ele.fpsl}}</text></view>
|
||||
<view v-else class="zd-col-3 zd-sec-td zd-pop-td">
|
||||
<input type="number" class="pop-input" v-model="ele.fpsl">
|
||||
</view>
|
||||
<view class="zd-col-3 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-3 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 === 2" 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-4 zd-sec-td zd-pop-td"><text>{{ele.wlmc}}</text></view>
|
||||
<view class="zd-col-9 zd-sec-td zd-pop-td">
|
||||
<scan-input
|
||||
v-model="ele.kwbm"
|
||||
/>
|
||||
</view>
|
||||
<view class="zd-col-3 zd-sec-td zd-pop-td">
|
||||
<input type="number" class="pop-input" v-model="ele.fpsl">
|
||||
</view>
|
||||
<view class="zd-col-3 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-3 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="zd-col-10 zd-row">
|
||||
<button class="confirm-button confirm-button_cancle mgl0" @tap="show = false">取消</button>
|
||||
<button v-show="type === 1" class="confirm-button mgl0" :class="{'confirm-button_disabled': popData.length === 0}" :disabled="popdisabled" @tap="_updateAssignDtl">确定</button>
|
||||
<button v-show="type === 2" class="confirm-button mgl0" :class="{'confirm-button_disabled': popData.length === 0}" :disabled="popdisabled" @tap="_addAssignDtl">确定</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="是否提交库存?" @confirm="_inWarehouseCommit"></uni-popup-dialog>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import ScanInput from '@/components/ScanInput.vue'
|
||||
import Pagination from '@/components/Pagination.vue'
|
||||
import GridDetail from '@/components/GridDetail.vue'
|
||||
import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, viewAssignDtl, inWarehouseAssignLocation, updateAssignDtl, addAssignDtl, inWarehouseCommit, easOutInBillUpdate, easOutInBillSync} from '@/utils/getData2.js'
|
||||
// import {updateAssignDtl, addAssignDtl, inWarehouseCommit, easOutInBillUpdate, easOutInBillSync} from '@/utils/getData2.js'
|
||||
// import {getWarehouseInfo, getUserInfo, easOutInBillPage, easOutInBillDetailPage, viewAssignDtl, inWarehouseAssignLocation} from '@/utils/mork2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
ScanInput,
|
||||
Pagination,
|
||||
GridDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
id: '',
|
||||
crType: '',
|
||||
val1: '', // 模糊查询
|
||||
value1: '', // 仓库名称
|
||||
range1: [],
|
||||
value2: '', // 仓管员
|
||||
range2: [],
|
||||
totalCount1: 0, // 分页
|
||||
queryParams1:{
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
},
|
||||
currentPage1: 1,
|
||||
dataList: [], // 一级表格数据
|
||||
checkData: [], // 一级表格多选数组
|
||||
subData: [], // 二级表格数据
|
||||
subCheckData: [], // 二级表格多选数组
|
||||
popData: [], // 二级表格点击物料编码弹出弹窗
|
||||
popdisabled: false,
|
||||
popObj: {}, // 弹窗当前主表格内容
|
||||
show: false, // 弹窗显示布尔值
|
||||
type: '', // 弹窗类型
|
||||
delShow: false, // 详情弹窗布尔值
|
||||
detailObj: {}, // 详情弹窗
|
||||
disabled1: false,
|
||||
isChecked: false
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.id = options.id
|
||||
this.title = options.name
|
||||
this.crType = options.type
|
||||
if (this.crType === 'IN') {
|
||||
this.toSearch()
|
||||
} else {
|
||||
this._getUserInfo()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setWStatus () {
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
handleInnerScroll(event) {
|
||||
event.stopPropagation()
|
||||
},
|
||||
// 仓库下拉框
|
||||
async _getWarehouseInfo () {
|
||||
let res = await getWarehouseInfo()
|
||||
if (res.code === 1) {
|
||||
this.range1 = [...res.result]
|
||||
this.range1.map(e => {
|
||||
this.$set(e, 'text', e.ckmc)
|
||||
this.$set(e, 'value', e.ckbm)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 仓管员下拉框
|
||||
async _getUserInfo () {
|
||||
let res = await getUserInfo()
|
||||
if (res.code === 1) {
|
||||
this.range2 = [...res.result]
|
||||
if (this.$store.getters.userInfo !== '') {
|
||||
let flag = this.range2.includes({text: JSON.parse(this.$store.getters.userInfo).person_name, value: JSON.parse(this.$store.getters.userInfo).username})
|
||||
if (!flag) {
|
||||
this.range2.push({text: JSON.parse(this.$store.getters.userInfo).person_name, value: JSON.parse(this.$store.getters.userInfo).username})
|
||||
}
|
||||
this.value2 = JSON.parse(this.$store.getters.userInfo).username
|
||||
}
|
||||
this.toSearch()
|
||||
}
|
||||
},
|
||||
// 查询一级表格
|
||||
toSearch () {
|
||||
this.queryParams1 = {
|
||||
pageSize: 10,
|
||||
pageNum: 1
|
||||
}
|
||||
this.currentPage1 = 1
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
this._easOutInBillPage()
|
||||
},
|
||||
// 一级表格接口
|
||||
async _easOutInBillPage () {
|
||||
let res = await easOutInBillPage(this.val1, this.id, this.value1, this.value2, this.queryParams1.pageNum + '', this.queryParams1.pageSize + '')
|
||||
if (res.code === 1) {
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
this.$set(el, 'subData', [])
|
||||
this.$set(el, 'filtData', [])
|
||||
this.$set(el, 'subAllChecked', false)
|
||||
this.$set(el, 'subOneChecked', false)
|
||||
})
|
||||
this.dataList = [...res.result]
|
||||
this.totalCount1 = Number(res.totalElements)
|
||||
this.queryParams1.pageSize = Number(res.pageSize)
|
||||
this.queryParams1.pageNum = Number(res.pageNum)
|
||||
if (this.val1 && this.id !== 'WWFLD' && this.id !== 'CGRKD') {
|
||||
this.dataList.map(el => {
|
||||
this.loadSubData(el)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this._getWarehouseInfo()
|
||||
},
|
||||
// 一级表格切换分页
|
||||
handlePageChange1(page) {
|
||||
this.queryParams1.pageNum = page
|
||||
this.currentPage1 = page
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
this._easOutInBillPage()
|
||||
},
|
||||
// 一级表格多选
|
||||
toCheckbox (e) {
|
||||
e.checked = !e.checked
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
this.checkData = arr.map(el => {return el.djid})
|
||||
},
|
||||
// 点击一级表格一行加载二级表格
|
||||
loadSubData (e) {
|
||||
this.subCheckData = this.subCheckData.filter(item1 => !e.subData.some(item2 => item2.id === item1.id))
|
||||
if (e.subData.length > 0) {
|
||||
e.subData = []
|
||||
} else if (e.subData.length === 0) {
|
||||
this._easOutInBillDetailPage(e)
|
||||
}
|
||||
e.subAllChecked = false
|
||||
e.subOneChecked = false
|
||||
},
|
||||
// 二级表格接口
|
||||
async _easOutInBillDetailPage (e) {
|
||||
let res = await easOutInBillDetailPage(this.val1, e.djid, '1', '500')
|
||||
if (res.code === 1) {
|
||||
res.result.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.dataList.map(el => {
|
||||
if (el.djid === e.djid) {
|
||||
el.subData = [...res.result]
|
||||
el.subAllChecked = false
|
||||
el.subOneChecked = false
|
||||
let arr = res.result.filter(ele => Number(ele.sysl) !== 0)
|
||||
el.filtData = [...arr]
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
// 二级表格全选
|
||||
toSubAllCheckbox (e) {
|
||||
e.subAllChecked = !e.subAllChecked
|
||||
e.subOneChecked = e.subAllChecked
|
||||
e.subData.map(el => {
|
||||
el.checked = e.subAllChecked
|
||||
})
|
||||
if (e.subAllChecked) {
|
||||
this.subCheckData = this.subCheckData.concat(e.subData)
|
||||
for (let i = 0; i < this.subCheckData.length; i++) {
|
||||
for (let j = i + 1; j < this.subCheckData.length; j++) {
|
||||
if (this.subCheckData[i].id === this.subCheckData[j].id) {
|
||||
this.subCheckData.splice(j, 1)
|
||||
j--
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (!e.subAllChecked) {
|
||||
this.subCheckData = this.subCheckData.filter(item1 => !e.subData.some(item2 => item2.id === item1.id))
|
||||
}
|
||||
},
|
||||
// 二级表格多选
|
||||
toSubCheckbox (e,el) {
|
||||
if (el.checked) {
|
||||
this.$set(el, 'checked', false)
|
||||
this.subCheckData = this.subCheckData.filter(item => item.id !== el.id)
|
||||
} else if (!el.checked) {
|
||||
this.$set(el, 'checked', true)
|
||||
this.subCheckData.push(el)
|
||||
}
|
||||
let arr = e.subData.filter(ele => ele.checked === true)
|
||||
e.subAllChecked = arr.length === e.subData.length
|
||||
e.subOneChecked = arr.length > 0
|
||||
},
|
||||
showPop (type, e, obj) {
|
||||
this.type = type
|
||||
if (type === 1) {
|
||||
this._viewAssignDtl(e, obj)
|
||||
} else if (type === 2) {
|
||||
if (!this.subCheckData.length) return
|
||||
this._inWarehouseAssignLocation()
|
||||
}
|
||||
},
|
||||
// 点击二级表格行中的物料编号,弹窗加载表格
|
||||
async _viewAssignDtl (e, obj) {
|
||||
let res = await viewAssignDtl(obj)
|
||||
if (res.code ===1) {
|
||||
this.popData = [...res.result]
|
||||
this.sortArr(this.popData)
|
||||
this.popObj = e
|
||||
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, this.crType)
|
||||
if (res.code === 1) {
|
||||
this.show = false
|
||||
this._easOutInBillDetailPage(this.popObj)
|
||||
}
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.popdisabled = false
|
||||
} catch (e) {
|
||||
this.popdisabled = false
|
||||
}
|
||||
},
|
||||
// 分配库位弹窗表格
|
||||
async _inWarehouseAssignLocation () {
|
||||
let arr = []
|
||||
if (!this.isChecked) {
|
||||
arr = this.subCheckData.filter(el => Number(el.sysl) !== 0)
|
||||
} else {
|
||||
arr = this.subCheckData
|
||||
}
|
||||
let res = await inWarehouseAssignLocation(arr, this.crType)
|
||||
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, this.crType)
|
||||
if (res.code === 1) {
|
||||
this.show = false
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.dataList.map(el => {
|
||||
if (el.subOneChecked) {
|
||||
this._easOutInBillDetailPage(el)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.popdisabled = false
|
||||
} catch (e) {
|
||||
this.popdisabled = false
|
||||
}
|
||||
},
|
||||
// 库存提交
|
||||
inWarehouseSure () {
|
||||
if (!this.subCheckData.length) {
|
||||
return
|
||||
}
|
||||
this.$refs.alertDialog.open()
|
||||
},
|
||||
// 库存提交-确认接口
|
||||
async _inWarehouseCommit () {
|
||||
try {
|
||||
let arr = []
|
||||
if (!this.isChecked) {
|
||||
arr = this.subCheckData.filter(el => Number(el.sysl) !== 0)
|
||||
} else {
|
||||
arr = this.subCheckData
|
||||
}
|
||||
let res = await inWarehouseCommit(arr, this.crType)
|
||||
if (res.code === 1) {
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.dataList.map(el => {
|
||||
if (el.subOneChecked) {
|
||||
this._easOutInBillDetailPage(el)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.popdisabled = false
|
||||
} catch (e) {
|
||||
this.popdisabled = false
|
||||
}
|
||||
},
|
||||
// 点击单据审核按钮
|
||||
async _easOutInBillUpdate () {
|
||||
this.disabled1 = true
|
||||
if (!this.checkData.length) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let str = this.checkData.join(',')
|
||||
let res = await easOutInBillUpdate(this.crType, str)
|
||||
if (res.code === 1) {
|
||||
this.disabled1 = false
|
||||
this.checkData = []
|
||||
this.subCheckData = []
|
||||
this._easOutInBillPage()
|
||||
} else {
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 详情弹窗
|
||||
getDetails (type,e) {
|
||||
this.delShow = !this.delShow
|
||||
this.detailObj = {type: type, data:e}
|
||||
},
|
||||
// 同步
|
||||
async _easOutInBillSync () {
|
||||
this.disabled1 = true
|
||||
try {
|
||||
let type = this.id === 'CGRKD' ? 'SRMINOUT' : 'EASINOUT'
|
||||
let res = await easOutInBillSync(type)
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.select_wraper
|
||||
/deep/ .uni-select__input-box
|
||||
height 30px
|
||||
/deep/ .uni-select__selector
|
||||
z-index 11
|
||||
/deep/ .uni-select
|
||||
height: 30px;
|
||||
min-height: 30px;
|
||||
line-height: 30px;
|
||||
padding: 0 2px 0 12px;
|
||||
border: 1px solid #4980bd;
|
||||
background-color: rgba(45,88,184,0.1);
|
||||
border-radius: 6px;
|
||||
/deep/ .uni-select__input-placeholder, /deep/ .uni-select__input-text
|
||||
font-size 13px
|
||||
/deep/ .uni-select__selector
|
||||
background-color #071F3E
|
||||
border-color #0c3162
|
||||
/deep/ .uni-popper__arrow
|
||||
border-bottom-color #0c3162
|
||||
&:after
|
||||
border-bottom-color #071F3E
|
||||
/deep/ .uni-select__selector-item
|
||||
color #fff
|
||||
/deep/ uni-switch .uni-switch-input
|
||||
width 70px
|
||||
height 26px
|
||||
border-color: #8e99a4;
|
||||
background-color: #8e99a4;
|
||||
&:before
|
||||
width 70px
|
||||
height 26px
|
||||
/deep/ uni-switch .uni-switch-input.uni-switch-input-checked:after
|
||||
transform translateX(44px)
|
||||
/deep/ uni-switch .uni-switch-input:before
|
||||
background-color: #8e99a4;
|
||||
height 26px
|
||||
/deep/ uni-switch .uni-switch-input:after
|
||||
height 26px
|
||||
/deep/ uni-switch .uni-switch-input:after
|
||||
width 26px
|
||||
</style>
|
||||
@@ -414,67 +414,32 @@ export const easOutInBillDetailPage = (djid, page, size) => {
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '3',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
"djid": "btAAAAW8Wd5QCrde",
|
||||
"sysl": 0.00,
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '4',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
"djid": "btAAAAW8Wd5QCrde",
|
||||
"sysl": 0.00,
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '5',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
"djid": "btAAAAW8Wd5QCrde",
|
||||
"sysl": 0.00,
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '6',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
"djid": "btAAAAW8Wd5QCrde",
|
||||
"sysl": 0.00,
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '7',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '8',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '9',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '10',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '11',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '12',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '13',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '14',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
},
|
||||
{
|
||||
"flid": "2",
|
||||
"id": '15',
|
||||
"djid": "btAAAAW8Wd5QCrde"
|
||||
"djid": "btAAAAW8Wd5QCrde",
|
||||
"sysl": 0.00,
|
||||
}
|
||||
],
|
||||
"code": 1,
|
||||
|
||||
Reference in New Issue
Block a user