23 changed files with 3550 additions and 244 deletions
@ -0,0 +1,129 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
|
|||
// 生成盘点点
|
|||
createBill: function(data) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
// 查询分页列表
|
|||
listPage: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/listPage', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 生成盘点报告
|
|||
billCreateReport: function(data) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/createReport', |
|||
method: 'post', |
|||
params: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
// 盘点单详情
|
|||
billDetail: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/detailGoodPageList', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 盘库列表
|
|||
billStocktak: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/detailRackPageList', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 库位盘点明细列表
|
|||
billRackCodeDetail: function(params) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/detailRackGoodPageList', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 初始化盘库报告
|
|||
init: function(data) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}); |
|||
}, |
|||
|
|||
// 保存盘点报告
|
|||
saveReport: function(data) { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/saveReport', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
downloadExcel: function() { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/downloadExcel', |
|||
method: 'post', |
|||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
downloadPDF: function() { |
|||
return request({ |
|||
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default", |
|||
url: '/wms/v1/oldpPartStocktaking/downloadPdf', |
|||
method: 'post', |
|||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
} |
@ -0,0 +1,866 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="旧件盘点管理" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="部门名称"> |
|||
<el-input v-model="queryParams.params.deptNmae" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="盘点编号"> |
|||
<el-input v-model="queryParams.params.billNo" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="生成日期"> |
|||
<el-date-picker v-model="queryParams.params.createStartTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" /> |
|||
至 |
|||
<el-date-picker v-model="queryParams.params.createEndTime" type="date" placeholder="选择日期" |
|||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;" /> |
|||
</el-form-item> |
|||
<el-form-item label="盘点状态"> |
|||
<el-select v-model="queryParams.params.checkState" placeholder="请选择" style="width: 200px;"> |
|||
<el-option v-for="item in checkStateList" :key="item.sid" :label="item.name" :value="item.name" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="盘点人"> |
|||
<el-input v-model="queryParams.params.createByName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="监盘人"> |
|||
<el-input v-model="queryParams.params.superviseName" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Start 项目列表头部 --> |
|||
<div class="listtop"> |
|||
<div class="tit">旧件盘点列表</div> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" |
|||
@selection-change="selectionLineChangeHandle"> |
|||
<el-table-column fixed width="50" type="selection" align="center" /> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" align="center" width="220"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> |
|||
<el-button type="primary" size="mini" v-show="scope.row.state=='0'" |
|||
@click="toEdit(scope.row)">办理</el-button> |
|||
<el-button type="primary" size="mini" v-show="scope.row.state=='0'" |
|||
@click="toReport(scope.row)">盘库报告</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="nodeState" label="流程状态" width="120" align="center" /> |
|||
<el-table-column prop="deptName" label="部门" width="120" align="center" /> |
|||
<el-table-column prop="billNo" label="盘点编号" width="120" align="center" /> |
|||
<el-table-column prop="createTime" label="生成日期" width="120" align="center" /> |
|||
<el-table-column prop="createByName" label="盘点人" width="120" align="center" /> |
|||
<el-table-column prop="superviseName" label="监盘人" width="120" align="center" /> |
|||
<el-table-column prop="checkState" label="盘点状态" width="120" align="center" /> |
|||
<el-table-column label="应盘" align="center"> |
|||
<el-table-column prop="bookCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="bookAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="实盘" align="center"> |
|||
<el-table-column prop="realCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="realAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="未盘" align="center"> |
|||
<el-table-column prop="notCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="notAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="盘盈" align="center"> |
|||
<el-table-column prop="profitCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="profitAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="盘亏" align="center"> |
|||
<el-table-column prop="loseCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="loseAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="盘损" align="center"> |
|||
<el-table-column prop="lossCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="lossAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column prop="remarks" label="备注" align="center" width="200" /> |
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- 盘库 --> |
|||
<stocktakingRackCodeList v-show="viewState == 2 " ref="divstocktak" @doback="resetState" @reloadlist="loadList" /> |
|||
<!-- 办理 --> |
|||
<stocktakingEditReport v-show="viewState == 3 " ref="divedit" @doback="resetState" @reloadlist="loadList" /> |
|||
<!-- 盘库报告 --> |
|||
<stocktakingReportDetail v-show="viewState == 4 " ref="divreport" @doback="resetState" @reloadlist="loadList" /> |
|||
<!--查看详情 --> |
|||
<stocktakingInfo v-show="viewState == 5" ref="divinfo" @doback="resetState" /> |
|||
|
|||
<el-dialog title="新建盘点单" :visible.sync="dialogVisible" :before-close="handleClose"> |
|||
<el-form ref="form_obj" class="formaddcopy02" :rules="rules" style="margin-top: -40px;" :model="formobj"> |
|||
<el-row class="first_row"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">盘点人</div> |
|||
<el-form-item> <span class="addinputInfo addinputw">{{formobj.createByName}}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">生成日期</div> |
|||
<el-form-item> <span class="addinputInfo addinputw">{{formobj.createDate}}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="first_row"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="must">*</span> 盘点类型</div> |
|||
<el-form-item prop="checkTypeValue"> |
|||
<el-select v-model="formobj.checkTypeValue" placeholder="请选择" class="addinputInfo addinputw" |
|||
@change="selectStocktakTyp"> |
|||
<el-option v-for="item in stocktakTypeList" :key="item.sid" :label="item.name" :value="item.sid" /> |
|||
</el-select> |
|||
<!-- <el-select v-model="formobj.financeSid" placeholder="请选择" class="addinputInfo addinputw" filterable |
|||
multiple @change="selectFinance"> |
|||
<el-option v-for="item in financeList" :key="item" :label="item.name" :value="item.sid"></el-option> |
|||
</el-select> --> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="must">*</span> 监盘人</div> |
|||
<el-form-item prop="superviseName"> |
|||
<el-select v-model="formobj.superviseName" placeholder="请选择" class="addinputInfo addinputw" |
|||
@change="selectFinance"> |
|||
<el-option v-for="item in financeList" :key="item.sid" :label="item.name" :value="item.sid" /> |
|||
</el-select> |
|||
<!-- <el-select v-model="formobj.financeSid" placeholder="请选择" class="addinputInfo addinputw" filterable |
|||
multiple @change="selectFinance"> |
|||
<el-option v-for="item in financeList" :key="item" :label="item.name" :value="item.sid"></el-option> |
|||
</el-select> --> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><el-input v-model="formobj.remarks" placeholder="请填写" class="addinputInfo addinputw" |
|||
clearable /> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div class="title titleOne" v-show="showList=='1'"> |
|||
<div>盘点库位</div> |
|||
<el-button type="primary" size="mini" class="btntopblueline" @click="seleRack()">选择库位</el-button> |
|||
</div> |
|||
<el-table v-loading="tableLoading" :data="formobj.dataList" border style="width: 100%" v-show="showList=='1'"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toDeleted(scope.row)">删除</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|||
<el-table-column prop="locationName" label="库区" align="center" /> |
|||
<el-table-column prop="rackCode" label="库位" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
|
|||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|||
<el-button type="primary" style="margin-top: 20px;" @click="saveExamine">保 存</el-button> |
|||
<el-button type="primary" style="margin-top: 20px;" @click="handleClose">关 闭</el-button> |
|||
</div> |
|||
|
|||
</el-dialog> |
|||
|
|||
<el-dialog title="选择盘点库位" :visible.sync="dialogVisible2" :before-close="handleClose2"> |
|||
<el-form ref="form_obj2" class="formaddcopy02" :rules="rules" style="margin-top: -40px;" :model="formobj"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="仓库"> |
|||
<el-select v-model="dialogParams.params.warehouseName" placeholder="请选择仓库" @change="selectWarehouseChange" |
|||
style="width: 200px;"> |
|||
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="库区"> |
|||
<el-select v-model="dialogParams.params.warehouseAreaName" placeholder="请选择库区" |
|||
@change="selectWarehouseAreaChange" style="width: 200px;"> |
|||
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" :value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="库位"> |
|||
<el-select v-model="dialogParams.params.warehouseRackCode" placeholder="请选择库位" style="width: 200px;" |
|||
@change="selectWarehouseRackChange"> |
|||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackCode" :value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<div class="btn" style="text-align: center; margin-top: 10px;margin-bottom: 10px;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dialogDosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="dialogResetQuery">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
<div class="title titleOne" style="margin-top: 0px;"> |
|||
<div>库位列表</div> |
|||
</div> |
|||
<el-table v-loading="tableLoading" :data="allWarehouseRackList" border style="width: 100%;" |
|||
@selection-change="selectionWarehouseRack"> |
|||
<el-table-column fixed width="50" type="selection" align="center" /> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
|||
<el-table-column prop="locationName" label="库区" align="center" /> |
|||
<el-table-column prop="rackCode" label="库位" align="center" /> |
|||
</el-table> |
|||
<pagination v-show="allWarehouseRackList.length > 0" :total="dialogParams.total" |
|||
:page.sync="dialogParams.current" :limit.sync="dialogParams.size" class="pagination" @pagination="seleRack" /> |
|||
|
|||
</el-form> |
|||
|
|||
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
|||
<el-button type="primary" style="margin-top: 20px;" @click="addRck">确 认</el-button> |
|||
<el-button type="primary" style="margin-top: 20px;" @click="handleClose2">关 闭</el-button> |
|||
</div> |
|||
|
|||
</el-dialog> |
|||
|
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import stocktakingAdd from './oldpPartStocktakingAdd.vue' |
|||
import stocktakingInfo from './oldpPartStocktakingInfo.vue' |
|||
import stocktakingRackCodeList from './oldpPartStocktakingRackCodeList.vue' |
|||
import stocktakingEditReport from './oldpPartStocktakingEditReport.vue' |
|||
import stocktakingReportDetail from './oldpPartStocktakingReportDetail.vue' |
|||
import req2 from '@/api/warehouse/warehouse.js' |
|||
import req3 from '@/api/warehouse/warehouseArea.js' |
|||
import req4 from '@/api/warehouse/goodsShelves.js' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
selAllByOrgSidPath |
|||
} from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
stocktakingAdd, |
|||
stocktakingInfo, |
|||
stocktakingRackCodeList, |
|||
stocktakingEditReport, |
|||
stocktakingReportDetail |
|||
}, |
|||
data() { |
|||
return { |
|||
showList: '2', |
|||
dialogVisible: false, |
|||
dialogVisible2: false, |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
btnList: [{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'plus', |
|||
btnKey: 'toAdd', |
|||
btnLabel: '生成盘点单' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'edit', |
|||
btnKey: 'toShowBill', |
|||
btnLabel: '盘库' |
|||
}, |
|||
{ |
|||
type: 'primary', |
|||
size: 'small', |
|||
icon: 'edit', |
|||
btnKey: 'toStocktak', |
|||
btnLabel: '生成盘库报告' |
|||
}, |
|||
{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
} |
|||
], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"deptNmae": "", |
|||
"billNo": "", |
|||
"createStartTime": "", |
|||
"createEndTime": "", |
|||
"checkState": "", |
|||
"createByName": "", |
|||
"superviseName": "" |
|||
} |
|||
}, |
|||
sids: [], |
|||
selectionList: [], |
|||
checkStateList: [{ |
|||
sid: '1', |
|||
name: '未完成' |
|||
}, |
|||
{ |
|||
sid: '2', |
|||
name: '已完成' |
|||
} |
|||
], |
|||
stocktakTypeList: [{ |
|||
sid: '1', |
|||
name: '月度抽盘' |
|||
}, |
|||
{ |
|||
sid: '2', |
|||
name: '季度全盘' |
|||
}, |
|||
|
|||
], |
|||
formobj: { |
|||
createByName: window.sessionStorage.getItem('name'), |
|||
createBySid: window.sessionStorage.getItem('userSid'), |
|||
deptSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|||
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|||
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
createDate: getCurrentDate(), |
|||
checkTypeValue: '', |
|||
checkTypeKey: '', |
|||
superviseName: '', |
|||
superviseSid: '', |
|||
remarks: "", |
|||
dataList: [] |
|||
}, |
|||
financeList: [], |
|||
rules: { |
|||
checkTypeValue: [{ |
|||
required: true, |
|||
message: '请选择盘点类型', |
|||
trigger: 'change' |
|||
}], |
|||
superviseName: [{ |
|||
required: true, |
|||
message: '请选择监盘人', |
|||
trigger: 'change' |
|||
}], |
|||
}, |
|||
dialogParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackCode": "", |
|||
} |
|||
}, |
|||
warehouseList: [], |
|||
warehouseAreaList: [], |
|||
warehouseRackList: [], |
|||
allWarehouseRackList: [], |
|||
selectionWarehouseRackList: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
this.loadList() |
|||
|
|||
selAllByOrgSidPath({ |
|||
orgSidPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.financeList = res.data |
|||
|
|||
console.log("aaaaaa", this.financeList); |
|||
|
|||
} |
|||
}) |
|||
|
|||
var parpams = { |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
} |
|||
|
|||
req2.getAllWarehouse(parpams).then(resp => { |
|||
this.warehouseList = resp.data |
|||
}) |
|||
|
|||
|
|||
}, |
|||
methods: { |
|||
getWarehouseArea(sid) { |
|||
this.dialogParams.params.warehouseAreaSid = '' |
|||
this.dialogParams.params.warehouseAreaName = '' |
|||
|
|||
var params = { |
|||
ckSid: sid |
|||
} |
|||
|
|||
req3.getAllWarehouseareaBysid(params).then(resp => { |
|||
console.log('>>>>>>>>>getAllWarehousearea', resp) |
|||
this.warehouseAreaList = resp.data |
|||
}).catch(() => {}) |
|||
}, |
|||
|
|||
getAllTypeByAreaSid(sid) { |
|||
this.dialogParams.params.warehouseRackSid = '' |
|||
this.dialogParams.params.warehouseRackCode = '' |
|||
|
|||
var params = { |
|||
areaSid: sid |
|||
} |
|||
|
|||
req4.getAllTypeByAreaSid(params).then(resp => { |
|||
console.log('>>>>>>>>>getAllTypeByAreaSid', resp) |
|||
this.warehouseRackList = resp.data |
|||
}).catch(() => {}) |
|||
}, |
|||
|
|||
|
|||
selectWarehouseChange(val) { |
|||
const choose = this.warehouseList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseChange', choose) |
|||
this.dialogParams.params.warehouseSid = choose[0].sid |
|||
this.dialogParams.params.warehouseName = choose[0].warehouseName |
|||
|
|||
this.getWarehouseArea(choose[0].sid) |
|||
|
|||
}, |
|||
|
|||
selectWarehouseAreaChange(val) { |
|||
const choose = this.warehouseAreaList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseAreaChange', choose) |
|||
this.dialogParams.params.warehouseAreaSid = choose[0].sid |
|||
this.dialogParams.params.warehouseAreaName = choose[0].areaName |
|||
|
|||
this.getAllTypeByAreaSid(choose[0].sid) |
|||
}, |
|||
|
|||
selectWarehouseRackChange(val) { |
|||
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseRackChange', choose) |
|||
this.dialogParams.params.warehouseRackSid = choose[0].sid |
|||
this.dialogParams.params.warehouseRackCode = choose[0].rackCode |
|||
|
|||
}, |
|||
|
|||
|
|||
dialogDosearch() { |
|||
this.dialogParams.current = 1 |
|||
this.seleRack() |
|||
}, |
|||
dialogResetQuery() { |
|||
this.dialogParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackCode": "", |
|||
} |
|||
} |
|||
this.seleRack() |
|||
}, |
|||
seleRack() { |
|||
|
|||
this.dialogParams.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.dialogParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.dialogParams.params.menuUrl = this.$route.path |
|||
|
|||
req4.warehouserackListAll(this.dialogParams).then(resp => { |
|||
console.log('>>>>>>>>>warehouserackListAll', resp) |
|||
|
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.dialogParams.total = data.total |
|||
this.allWarehouseRackList = data.records |
|||
this.dialogVisible2 = true |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.allWarehouseRackList = [] |
|||
this.dialogParams.total = 0 |
|||
} |
|||
|
|||
}).catch(() => {}) |
|||
|
|||
}, |
|||
selectionWarehouseRack(val) { |
|||
console.log('>>>>>>>>>selectionWarehouseRack', val) |
|||
this.selectionWarehouseRackList = val |
|||
}, |
|||
addRck() { |
|||
this.formobj.dataList = [] |
|||
for (var i = 0; i < this.selectionWarehouseRackList.length; i++) { |
|||
var item = this.selectionWarehouseRackList[i] |
|||
|
|||
this.formobj.dataList.push(item) |
|||
|
|||
} |
|||
console.log('>>>>>>>>>addRck', this.formobj.dataList) |
|||
|
|||
this.dialogParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackCode": "", |
|||
} |
|||
} |
|||
this.dialogVisible2 = false |
|||
}, |
|||
handleClose2() { |
|||
this.dialogParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackCode": "", |
|||
} |
|||
} |
|||
this.dialogVisible2 = false |
|||
}, |
|||
toDeleted(row) { |
|||
console.log('>>>>>>>>>toDeleted', row) |
|||
const index = this.formobj.dataList.findIndex((item) => item == row) |
|||
this.formobj.dataList.splice(index, 1) |
|||
}, |
|||
selectStocktakTyp(val) { |
|||
this.showList = val |
|||
|
|||
console.log('>>>>>>>>>selectStocktakTyp', val) |
|||
const choose = this.stocktakTypeList.filter((item) => val.includes(item.sid)) |
|||
console.log('>>>>>>>>>selectStocktakTyp', choose) |
|||
this.formobj.checkTypeValue = choose[0].name |
|||
this.formobj.checkTypeKey = choose[0].sid |
|||
}, |
|||
selectFinance(val) { |
|||
|
|||
console.log('>>>>>>>>>selectFinance', val) |
|||
|
|||
const choose = this.financeList.filter((item) => val.includes(item.sid)) |
|||
console.log('>>>>>>>>>selectFinance', choose) |
|||
this.formobj.superviseName = choose[0].name |
|||
this.formobj.superviseSid = choose[0].sid |
|||
|
|||
// this.formobj.finances = [] |
|||
// for (var i = 0; i < choose.length; i++) { |
|||
|
|||
// this.formobj.finances.push({ |
|||
// name: choose[i].name, |
|||
// sid: choose[i].sid |
|||
// }) |
|||
|
|||
// } |
|||
|
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
this.showList = "2" |
|||
this.formobj.checkTypeValue = '' |
|||
this.formobj.checkTypeKey = '' |
|||
this.formobj.superviseName = '' |
|||
this.formobj.superviseSid = '' |
|||
this.formobj.remarks = '' |
|||
this.formobj.dataList = [] |
|||
}, |
|||
saveExamine() { |
|||
|
|||
console.log('>>>>>>>>>saveExamine', this.formobj) |
|||
this.formobj.rackSids = [] |
|||
for (var i = 0; i < this.formobj.dataList.length; i++) { |
|||
var item = this.formobj.dataList[i] |
|||
this.formobj.rackSids.push(item.sid) |
|||
} |
|||
|
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
req.createBill(this.formobj).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '操作成功', |
|||
showClose: true |
|||
}) |
|||
this.handleClose() |
|||
this.loadList() |
|||
} |
|||
}).catch(() => {}) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'toAdd': |
|||
this.toAdd() |
|||
break |
|||
case 'toShowBill': |
|||
this.toShowBill() |
|||
break |
|||
case 'toStocktak': |
|||
this.toStocktak() |
|||
break |
|||
case 'doClose': |
|||
this.doClose() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
loadList() { |
|||
this.tableLoading = true |
|||
this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') |
|||
this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|||
this.queryParams.params.menuUrl = this.$route.path |
|||
req.listPage(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
|
|||
// this.$http({ |
|||
// method: "post", |
|||
// url: "http://127.0.0.1:4523/mock/430173/user/list", |
|||
// params: this.queryParams, |
|||
// }).then((resp) => { |
|||
// const data = resp.data |
|||
// this.queryParams.total = data.total |
|||
// this.dataList = data.records |
|||
// }); |
|||
|
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"deptNmae": "", |
|||
"billNo": "", |
|||
"createStartTime": "", |
|||
"createEndTime": "", |
|||
"checkState": "", |
|||
"createByName": "", |
|||
"superviseName": "" |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
toAdd() { |
|||
// this.viewState = 2 |
|||
// this.$refs['divadd'].showAdd() |
|||
|
|||
|
|||
this.dialogVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
selectionLineChangeHandle(val) { |
|||
console.log('val', val) |
|||
|
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
toDetail(row) { |
|||
console.log('toDetail', row) |
|||
|
|||
this.viewState = 5 |
|||
this.$refs['divinfo'].showDetail(row.sid) |
|||
}, |
|||
toShowBill() { |
|||
|
|||
if (this.selectionList.length != 1) { |
|||
this.$message({ |
|||
type: 'warning', |
|||
message: '请选择一条数据。', |
|||
showClose: true |
|||
}) |
|||
return |
|||
} |
|||
|
|||
this.viewState = 2 |
|||
this.$refs['divstocktak'].showDetail(this.selectionList[0].sid) |
|||
}, |
|||
toStocktak() { |
|||
if (this.selectionList.length != 1) { |
|||
this.$message({ |
|||
type: 'warning', |
|||
message: '请选择一条数据。', |
|||
showClose: true |
|||
}) |
|||
return |
|||
} |
|||
|
|||
|
|||
if (this.selectionList[0].state == '0') { |
|||
this.$message({ |
|||
type: 'warning', |
|||
message: '所选记录已生成报告,不可重复生成。', |
|||
showClose: true |
|||
}) |
|||
return |
|||
} |
|||
var params = { |
|||
sid: this.selectionList[0].sid |
|||
} |
|||
|
|||
req.billCreateReport(params).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ |
|||
type: 'success', |
|||
message: '操作成功', |
|||
showClose: true |
|||
}) |
|||
|
|||
this.loadList() |
|||
} |
|||
}).catch(() => {}) |
|||
|
|||
}, |
|||
toEdit(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divedit'].showEdit(row.sid) |
|||
}, |
|||
toReport(row) { |
|||
|
|||
this.viewState = 4 |
|||
this.$refs['divreport'].showDetail(row.sid) |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
}, |
|||
|
|||
resetState() { |
|||
this.viewState = 1 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 90px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 80px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 80px !important; |
|||
width: calc(100% - 70px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 180px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,445 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="settle()">盘点</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|||
<div |
|||
style="display: flex;flex-direction: row;align-items: center;justify-content: space-between;padding: 10px;"> |
|||
<div>商品列表</div> |
|||
<div v-if="formobj.billNo!=''">单号:{{formobj.billNo}}</div> |
|||
</div> |
|||
|
|||
<el-table :key="commodityKey" :data="formobj.wmsInventoryCheckbillDetailList" :index="index" border |
|||
style="width: 100%;"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column align="center" width="70" :render-header="commodityHeader"> |
|||
<template slot-scope="scope"> |
|||
<i class="el-icon-delete" @click="commodityDelete(scope.$index)"></i> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="商品名称" align="center" min-width="180"> |
|||
<template slot-scope="scope"> |
|||
<el-popover placement="right" width="900" trigger="click"> |
|||
<div> |
|||
<el-table :data="commodityData" v-loading="commodityLoading" highlight-current-row |
|||
@current-change="commodityCurrentChange($event, scope.row)"> |
|||
<el-table-column fixed prop="goodsSpuName" label="商品名称" align="center" /> |
|||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|||
<el-table-column prop="goodsSkuOwnSpec" label="型号" align="center" /> |
|||
<el-table-column prop="unit" label="单位" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> |
|||
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|||
<el-table-column prop="count" label="账面数量" align="center" /> |
|||
</el-table> |
|||
<el-pagination :page.sync="commodityQuery.current" :page-size="commodityQuery.size" |
|||
layout="total, pager" :total="commodityQuery.total" /> |
|||
</div> |
|||
<el-input slot="reference" v-model="scope.row.goodsSpuName" |
|||
@input="commodityInput(scope.row.goodsSpuName)" clearable placeholder="商品名称" /> |
|||
</el-popover> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" /> |
|||
<el-table-column prop="carModel" label="型号" align="center" /> |
|||
<el-table-column prop="unit" label="单位" width="70" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" /> |
|||
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
|||
<el-table-column prop="cost" label="单价" align="center" /> |
|||
<el-table-column prop="bookCount" label="账面数量" align="center" /> |
|||
<el-table-column label="实盘数量" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input ref="focusAssumptionInput" @input="commodityComputeYHAndXSJE(scope.row,$event)" |
|||
v-model="scope.row.realCount" clearable placeholder="" |
|||
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="stateValue" label="状态" align="center" width="100" /> |
|||
<el-table-column prop="profitandlossNumber" label="盈亏数" align="center" width="100" /> |
|||
<el-table-column prop="profitandlossAmount" label="盈亏金额" align="center" width="100" /> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="24"> |
|||
<el-form-item><span>盘盈数量:{{ profitandNumber }} , 盘盈金额:{{ profitandPrice }} , 盘亏数量:{{ lossNumber }} , |
|||
盘库金额:{{ lossPrice }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="1"> |
|||
<el-form-item><span>备注</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="23"> |
|||
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="请填写备注..." /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
import { |
|||
getOrgSidByPath, |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
settleVisible: false, // |
|||
activeNames: '1', |
|||
index: 0, |
|||
|
|||
// commodity商品 |
|||
commodityKey: 1, |
|||
commodityLoading: false, |
|||
commodityQuery: { |
|||
current: 1, |
|||
size: 2, |
|||
total: 0, |
|||
params: { |
|||
name: '' |
|||
} |
|||
}, |
|||
commodityData: [], |
|||
formobj: { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"billNo": "", |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createDate": "", |
|||
"createUserSid": window.sessionStorage.getItem('userSid'), |
|||
"checkType": "", |
|||
"profitAmount": "", |
|||
"lossCount": "", |
|||
"lossAmount": "", |
|||
"useOrgSid": '', |
|||
"createOrgSid": '', |
|||
"wmsInventoryCheckbillDetailList": [ |
|||
|
|||
] |
|||
}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
computed: { |
|||
// 计算盘盈数量 |
|||
profitandNumber() { |
|||
let quantity = 0 |
|||
if (this.formobj.wmsInventoryCheckbillDetailList.length > 0) { |
|||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|||
if (Number(e.bookCount) < Number(e.realCount)) { |
|||
quantity += e.realCount - e.bookCount |
|||
} |
|||
}) |
|||
} |
|||
this.formobj.profitCount = quantity |
|||
return quantity |
|||
}, |
|||
// 计算盘盈金额 |
|||
profitandPrice() { |
|||
let material = 0 |
|||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|||
if (Number(e.bookCount) < Number(e.realCount)) { |
|||
material += (e.realCount - e.bookCount) * e.cost |
|||
} |
|||
}) |
|||
this.formobj.profitAmount = material.toFixed(2) |
|||
return material.toFixed(2) |
|||
}, |
|||
// 计算盘亏数量 |
|||
lossNumber() { |
|||
let quantity = 0 |
|||
if (this.formobj.wmsInventoryCheckbillDetailList.length > 0) { |
|||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|||
if (Number(e.bookCount) > Number(e.realCount)) { |
|||
quantity += e.realCount - e.bookCount |
|||
} |
|||
}) |
|||
} |
|||
|
|||
this.formobj.lossCount = quantity |
|||
|
|||
return quantity |
|||
}, |
|||
// 计算盘亏金额 |
|||
lossPrice() { |
|||
let material = 0 |
|||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|||
if (Number(e.bookCount) > Number(e.realCount)) { |
|||
material += (e.realCount - e.bookCount) * e.cost |
|||
} |
|||
}) |
|||
|
|||
this.formobj.lossAmount = material.toFixed(2) |
|||
|
|||
return material.toFixed(2) |
|||
}, |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
showAdd() { |
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
this.formobj.useOrgSid = res.data |
|||
} |
|||
}) |
|||
|
|||
this.viewTitle = '【新增】盘点记录' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
}, |
|||
showEdit(row) { |
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
this.formobj.useOrgSid = res.data |
|||
} |
|||
}) |
|||
|
|||
this.viewTitle = '【修改】盘点记录' |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.init(row.sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
|
|||
this.formobj.wmsInventoryCheckbillDetailList.forEach((e) => { |
|||
this.commodityComputeYHAndXSJE(e, e.realCount) |
|||
}) |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
// 在头部标题上添加“新增”图标 |
|||
commodityHeader(h, { |
|||
column |
|||
}) { |
|||
return h( |
|||
'div', |
|||
[ |
|||
h('span', column.label), |
|||
h('i', { |
|||
class: 'add-btn-icon el-icon-plus', |
|||
style: 'color: red;font-size:20px', |
|||
on: { |
|||
click: this.commodityAdd // 点击执行函数 |
|||
} |
|||
}) |
|||
] |
|||
) |
|||
}, |
|||
commodityAdd() { |
|||
this.formobj.wmsInventoryCheckbillDetailList.push({ |
|||
"sid": "", |
|||
"stateValue": "", |
|||
"state": "", |
|||
"billSid": "", |
|||
"inventorySid": "", |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackCode": "", |
|||
"cost": "", |
|||
"bookCount": "", |
|||
"realCount": "", |
|||
"profitandlossNumber": "", |
|||
"profitandlossAmount": "", |
|||
"picUrl": "" |
|||
}) |
|||
}, |
|||
commodityInput(value) { |
|||
this.commodityQuery.params.name = value |
|||
this.commodityLoading = true |
|||
req.getWarehousesGoods(this.commodityQuery).then((response) => { |
|||
if (response.success) { |
|||
this.commodityLoading = false |
|||
this.commodityData = response.data.records |
|||
this.commodityQuery.total = response.data.total |
|||
} else { |
|||
this.commodityLoading = false |
|||
this.commodityData = [] |
|||
this.commodityQuery.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
commodityDelete(index) { |
|||
this.formobj.wmsInventoryCheckbillDetailList.splice(index, 1) |
|||
}, |
|||
commodityCurrentChange(value, row) { |
|||
console.log('>>>>>>>>>commodityCurrentChange', value) |
|||
|
|||
row.sid = '' |
|||
// row.inventorySid = value.sid |
|||
row.goodsSpuSid = value.sid |
|||
row.goodsSpuName = value.goodsSpuName |
|||
row.goodsSkuCode = value.goodsSkuCode |
|||
row.carModel = value.goodsSkuOwnSpec |
|||
row.unit = value.unit |
|||
row.warehouseName = value.warehouseName |
|||
row.warehouseSid = value.warehouseSid |
|||
row.warehouseRackSid = value.warehouseRackSid |
|||
row.warehouseRackCode = value.warehouseRackCode |
|||
row.bookCount = value.count |
|||
row.cost = value.salesPrice |
|||
// row.realCount = "" |
|||
// row.profitandlossNumber = "" |
|||
// row.profitandlossAmount = "" |
|||
document.body.click() |
|||
}, |
|||
// 计算状态 盈亏数量 盈亏金额 |
|||
commodityComputeYHAndXSJE(row, val) { |
|||
|
|||
console.log("aaa", row); |
|||
console.log("aaa", val); |
|||
|
|||
// 正常 |
|||
if (Number(row.bookCount) == Number(val)) { |
|||
row.stateValue = "正常" |
|||
row.state = 0 |
|||
row.profitandlossNumber = "0" |
|||
row.profitandlossAmount = "0.00" |
|||
} |
|||
|
|||
// 盘盈 |
|||
if (Number(row.bookCount) < Number(val)) { |
|||
row.stateValue = "盘盈" |
|||
row.state = 1 |
|||
row.profitandlossNumber = val - row.bookCount |
|||
row.profitandlossAmount = ((val - row.bookCount) * row.cost).toFixed(2) |
|||
} |
|||
|
|||
// 盘亏 |
|||
if (Number(row.bookCount) > Number(val)) { |
|||
row.stateValue = "盘亏" |
|||
row.state = 2 |
|||
row.profitandlossNumber = val - row.bookCount |
|||
row.profitandlossAmount = ((val - row.bookCount) * row.cost).toFixed(2) |
|||
} |
|||
|
|||
}, |
|||
saveOrUpdate() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.save(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
settle() { |
|||
|
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.inven(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '操作成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
|
|||
}, |
|||
confirm() { |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.settlement(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '结算成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = { |
|||
"sid": "", |
|||
"remarks": "", |
|||
"billNo": "", |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createDate": "", |
|||
"createUserSid": window.sessionStorage.getItem('userSid'), |
|||
"checkType": "", |
|||
"profitAmount": "", |
|||
"lossCount": "", |
|||
"lossAmount": "", |
|||
"useOrgSid": '', |
|||
"createOrgSid": '', |
|||
"wmsInventoryCheckbillDetailList": [ |
|||
|
|||
] |
|||
} |
|||
this.submitdisabled = false |
|||
this.settleVisible = false |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
</style> |
@ -0,0 +1,367 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>编辑盘库报告</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="downLoadPDF()">下载pdf</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">监盘人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.finances }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><el-input v-model="formobj.remarks" placeholder="" class="addinputw addinputInfo" |
|||
clearable /></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>总体盘点情况</div> |
|||
<el-button type="primary" size="mini" class="btntopblueline" @click="downLoadDetail()">明细下载</el-button> |
|||
</div> |
|||
|
|||
<div style="display: flex;flex-direction: row;align-items: center; |
|||
border: 1px solid #E0E3EB;line-height: 30px;padding: 5px 10px;"> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 应盘数量:</span> |
|||
<span> {{formobj.ypNum}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 应盘金额:</span> |
|||
<span> {{formobj.ypMoney}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 实盘数量:</span> |
|||
<span> {{formobj.spNum}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 实盘金额:</span> |
|||
<span> {{formobj.spMoney}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘盈数量:</span> |
|||
<span> {{formobj.pyNum}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘盈金额:</span> |
|||
<span> {{formobj.pyMoney}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘亏数量:</span> |
|||
<span> {{formobj.pkNum}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘亏金额:</span> |
|||
<span> {{formobj.pkMoney}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘损数量:</span> |
|||
<span> {{formobj.psNum}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘损金额:</span> |
|||
<span> {{formobj.psMoney}}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>仓库盘点情况</div> |
|||
</div> |
|||
<el-table :data="formobj.warehouseStocktakList" :index="index" border style="width: 100%;"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" width="200" align="center" /> |
|||
<el-table-column prop="ypNum" label="应盘" align="center" /> |
|||
<el-table-column prop="ypMoney" label="应盘金额" align="center" /> |
|||
<el-table-column prop="spNum" label="实盘" align="center" /> |
|||
<el-table-column prop="spMoney" label="实盘金额" align="center" /> |
|||
<el-table-column prop="pyNum" label="盘盈" align="center" /> |
|||
<el-table-column prop="pyMoney" label="盘盈金额" align="center" /> |
|||
<el-table-column prop="pkNum" label="盘亏" align="center" /> |
|||
<el-table-column prop="pkMoney" label="盘亏金额" align="center" /> |
|||
<el-table-column prop="psNum" label="盘损" align="center" /> |
|||
<el-table-column prop="psMoney" label="盘损金额" align="center" /> |
|||
</el-table> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>库区盘点情况</div> |
|||
</div> |
|||
<el-table :data="formobj.arehouseAreaeStocktakList" :index="index" border style="width: 100%;"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column prop="warehouseAreaeName" label="仓库-库区" width="200" align="center" /> |
|||
<el-table-column prop="ypNum" label="应盘" align="center" /> |
|||
<el-table-column prop="ypMoney" label="应盘金额" align="center" /> |
|||
<el-table-column prop="spNum" label="实盘" align="center" /> |
|||
<el-table-column prop="spMoney" label="实盘金额" align="center" /> |
|||
<el-table-column prop="pyNum" label="盘盈" align="center" /> |
|||
<el-table-column prop="pyMoney" label="盘盈金额" align="center" /> |
|||
<el-table-column prop="pkNum" label="盘亏" align="center" /> |
|||
<el-table-column prop="pkMoney" label="盘亏金额" align="center" /> |
|||
<el-table-column prop="psNum" label="盘损" align="center" /> |
|||
<el-table-column prop="psMoney" label="盘损金额" align="center" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
import { |
|||
getCurrentDate |
|||
} from '@/utils/index.js' |
|||
import { |
|||
getOrgSidByPath, |
|||
} from '@/api/Common/dictcommons' |
|||
export default { |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
index: 0, |
|||
|
|||
formobj: { |
|||
"createByName": window.sessionStorage.getItem('name'), |
|||
"createBySid": window.sessionStorage.getItem('userSid'), |
|||
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|||
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1), |
|||
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|||
.getItem('defaultOrgPath').lastIndexOf('/') + 1), |
|||
"createTime": getCurrentDate(), |
|||
"createName": "", |
|||
"finances": "", |
|||
"remarks": "", |
|||
"ypNum": "", |
|||
"ypMoney": "", |
|||
"spNum": "", |
|||
"spMoney": "", |
|||
"pyNum": "", |
|||
"pyMoney": "", |
|||
"pkNum": "", |
|||
"pkMoney": "", |
|||
"psNum": "", |
|||
"psMoney": "", |
|||
"warehouseStocktakList": [], |
|||
"arehouseAreaeStocktakList": [], |
|||
"useOrgSid": '', |
|||
"createOrgSid": '', |
|||
|
|||
}, |
|||
} |
|||
}, |
|||
|
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
init() { |
|||
getOrgSidByPath({ |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath') |
|||
}).then((res) => { |
|||
if (res.success) { |
|||
this.formobj.createOrgSid = res.data |
|||
this.formobj.useOrgSid = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
showEdit(row) { |
|||
|
|||
req.init(row.sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
|
|||
this.formobj.createByName = window.sessionStorage.getItem('name') |
|||
this.formobj.createBySid = window.sessionStorage.getItem('userSid') |
|||
this.formobj.deptName = window.sessionStorage.getItem('defaultOrgPathName').substring(window |
|||
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1) |
|||
this.formobj.deptSid = window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage |
|||
.getItem('defaultOrgPath').lastIndexOf('/') + 1) |
|||
this.formobj.createTime = getCurrentDate() |
|||
this.init() |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
saveOrUpdate() { |
|||
this.submitdisabled = true |
|||
req.saveReport(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '保存成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
}, |
|||
submit() { |
|||
|
|||
req.submitReport(this.formobj).then((res) => { |
|||
if (res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '操作成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.submitdisabled = false |
|||
} |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
|
|||
}, |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = {} |
|||
this.submitdisabled = false |
|||
this.$emit('doback') |
|||
}, |
|||
downLoadPDF() { |
|||
|
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.downloadPDF().then((resp) => { |
|||
loading.close() |
|||
const blob = new Blob([resp], { |
|||
type: 'application/vnd.ms-excel' |
|||
}) |
|||
const fileName = '盘库报告' + '.pdf' |
|||
const elink = document.createElement('a') |
|||
elink.download = fileName |
|||
elink.style.display = 'nonde' |
|||
elink.href = URL.createObjectURL(blob) |
|||
document.body.appendChild(elink) |
|||
elink.click() |
|||
URL.revokeObjectURL(elink.href) |
|||
document.body.removeChild(elink) |
|||
}).catch(() => { |
|||
loading.close() |
|||
}) |
|||
|
|||
}, |
|||
downLoadDetail() { |
|||
|
|||
const loading = this.$loading({ |
|||
lock: true, |
|||
text: 'Loading', |
|||
spinner: 'el-icon-loading', |
|||
background: 'rgba(0, 0, 0, 0.7)' |
|||
}) |
|||
req.downloadExcel().then((resp) => { |
|||
loading.close() |
|||
const blob = new Blob([resp], { |
|||
type: 'application/vnd.ms-excel' |
|||
}) |
|||
const fileName = '总体盘库明细' + '.xls' |
|||
const elink = document.createElement('a') |
|||
elink.download = fileName |
|||
elink.style.display = 'nonde' |
|||
elink.href = URL.createObjectURL(blob) |
|||
document.body.appendChild(elink) |
|||
elink.click() |
|||
URL.revokeObjectURL(elink.href) |
|||
document.body.removeChild(elink) |
|||
}).catch(() => { |
|||
loading.close() |
|||
}) |
|||
|
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,374 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="商品盘点明细" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="仓库"> |
|||
<el-select v-model="queryParams.params.warehouseName" placeholder="请选择仓库" |
|||
@change="selectWarehouseChange"> |
|||
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" |
|||
:value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="库区"> |
|||
<el-select v-model="queryParams.params.warehouseAreaName" placeholder="请选择库区" |
|||
@change="selectWarehouseAreaChange"> |
|||
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" |
|||
:value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="库位"> |
|||
<el-select v-model="queryParams.params.warehouseRackName" placeholder="请选择库位"> |
|||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackName" |
|||
:value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="商品ID"> |
|||
<el-input v-model="queryParams.params.goodsID" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="商品名称"> |
|||
<el-input v-model="queryParams.params.goodsSkuTitle" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="商品图号"> |
|||
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Start 项目列表头部 --> |
|||
<div class="listtop"> |
|||
<div class="tit">商品盘点记录</div> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column prop="goodsID" label="商品ID" width="120" align="center" /> |
|||
<el-table-column prop="goodsSkuTitle" label="商品名称" width="120" align="center" /> |
|||
<el-table-column prop="goodsSkuCode" label="图号" width="120" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" width="120" align="center" /> |
|||
<el-table-column prop="warehouseArea" label="库区" width="120" align="center" /> |
|||
<el-table-column prop="warehouseRackName" label="库位" width="120" align="center" /> |
|||
<el-table-column prop="unit" label="单位" width="120" align="center" /> |
|||
<el-table-column prop="cost" label="单价" width="120" align="center" /> |
|||
<el-table-column prop="bookCount" label="库存数量" width="120" align="center" /> |
|||
<el-table-column prop="bookAmount" label="库存金额" width="120" align="center" /> |
|||
<el-table-column prop="realCount" label="实盘数量" width="120" align="center" /> |
|||
<el-table-column prop="realCount" label="实盘金额" width="120" align="center" /> |
|||
<el-table-column prop="state" label="状态" width="120" align="center" /> |
|||
<el-table-column prop="profitAndLoseCount" label="亏盈数" width="120" align="center" /> |
|||
<el-table-column prop="profitAndLoseAmount" label="盈亏金额" width="120" align="center" /> |
|||
<el-table-column prop="lossCount" label="盘损数量" width="120" align="center" /> |
|||
<el-table-column prop="lossAmount" label="盘损金额" width="120" align="center" /> |
|||
<el-table-column prop="remarks" label="备注" align="center" width="200" /> |
|||
<el-table-column label="附件" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div style="color: #1890FF; text-decoration: underline ;" @click="showImage(scope.row.fillPaths)"> |
|||
查看 |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose"> |
|||
|
|||
<el-form ref="dataForm1" class="formadd" style="margin-top: -30px;"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="24" class="trightb"> |
|||
<el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" |
|||
v-for="(item,index) in fileList" :src="item.url" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import req2 from '@/api/warehouse/warehouse.js' |
|||
import req3 from '@/api/warehouse/warehouseArea.js' |
|||
import req4 from '@/api/warehouse/goodsShelves.js' |
|||
export default { |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
btnList: [{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
}], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"billSid": "", |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"goodsID": "", |
|||
"goodsSkuTitle": "", |
|||
"goodsSkuCode": "" |
|||
} |
|||
}, |
|||
billSid: "", |
|||
fileList: [], |
|||
warehouseList: [], |
|||
warehouseAreaList: [], |
|||
warehouseRackList: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
initData() { |
|||
|
|||
var parpams = { |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
} |
|||
|
|||
req2.getAllWarehouse(parpams).then(resp => { |
|||
this.warehouseList = resp.data |
|||
}) |
|||
}, |
|||
|
|||
getWarehouseArea(sid) { |
|||
this.queryParams.params.warehouseAreaSid = '' |
|||
this.queryParams.params.warehouseAreaName = '' |
|||
|
|||
var params = { |
|||
ckSid: sid |
|||
} |
|||
|
|||
req3.getAllWarehouseareaBysid(params).then(resp => { |
|||
console.log('>>>>>>>>>getAllWarehousearea', resp) |
|||
this.warehouseAreaList = resp.data |
|||
}).catch(() => {}) |
|||
}, |
|||
|
|||
getAllTypeByAreaSid(sid) { |
|||
this.queryParams.params.warehouseRackSid = '' |
|||
this.queryParams.params.warehouseRackName = '' |
|||
|
|||
var params = { |
|||
areaSid: sid |
|||
} |
|||
|
|||
req4.getAllTypeByAreaSid(params).then(resp => { |
|||
console.log('>>>>>>>>>getAllTypeByAreaSid', resp) |
|||
this.warehouseRackList = resp.data |
|||
}).catch(() => {}) |
|||
}, |
|||
|
|||
|
|||
selectWarehouseChange(val) { |
|||
const choose = this.warehouseList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseChange', choose) |
|||
this.queryParams.params.warehouseSid = choose[0].sid |
|||
this.queryParams.params.warehouseName = choose[0].warehouseName |
|||
|
|||
this.getWarehouseArea(choose[0].sid) |
|||
|
|||
}, |
|||
|
|||
selectWarehouseAreaChange(val) { |
|||
const choose = this.warehouseAreaList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseAreaChange', choose) |
|||
this.queryParams.params.warehouseAreaSid = choose[0].sid |
|||
this.queryParams.params.warehouseAreaName = choose[0].areaName |
|||
|
|||
this.getAllTypeByAreaSid(choose[0].sid) |
|||
}, |
|||
|
|||
selectWarehouseRackChange(val) { |
|||
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseRackChange', choose) |
|||
this.queryParams.params.warehouseRackSid = choose[0].sid |
|||
this.queryParams.params.warehouseRackName = choose[0].rackName |
|||
|
|||
}, |
|||
|
|||
|
|||
showImage(paths) { |
|||
this.fileList = paths |
|||
this.dialogVisible = true |
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.close() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
|
|||
showDetail(sid) { |
|||
this.initData() |
|||
this.billSid = sid |
|||
this.queryParams.params.billSid = sid |
|||
this.loadList() |
|||
}, |
|||
|
|||
loadList() { |
|||
|
|||
this.tableLoading = true |
|||
|
|||
req.billDetail(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"billSid": this.billSid, |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"goodsID": "", |
|||
"goodsSkuTitle": "", |
|||
"goodsSkuCode": "" |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
|
|||
close() { |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 90px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 80px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 80px !important; |
|||
width: calc(100% - 70px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 180px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,271 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="库位商品盘点明细" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="商品ID"> |
|||
<el-input v-model="queryParams.params.goodsID" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="商品名称"> |
|||
<el-input v-model="queryParams.params.goodsSkuTitle" placeholder="" clearable /> |
|||
</el-form-item> |
|||
<el-form-item label="商品图号"> |
|||
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Start 项目列表头部 --> |
|||
<div class="listtop"> |
|||
<div class="tit">商品盘点记录</div> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column prop="goodsID" label="商品ID" width="120" align="center" /> |
|||
<el-table-column prop="goodsSkuTitle" label="商品名称" width="120" align="center" /> |
|||
<el-table-column prop="goodsSkuCode" label="图号" width="120" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" width="120" align="center" /> |
|||
<el-table-column prop="warehouseArea" label="库区" width="120" align="center" /> |
|||
<el-table-column prop="warehouseRackName" label="库位" width="120" align="center" /> |
|||
<el-table-column prop="unit" label="单位" width="120" align="center" /> |
|||
<el-table-column prop="cost" label="单价" width="120" align="center" /> |
|||
<el-table-column prop="bookCount" label="库存数量" width="120" align="center" /> |
|||
<el-table-column prop="bookAmount" label="库存金额" width="120" align="center" /> |
|||
<el-table-column prop="realCount" label="实盘数量" width="120" align="center" /> |
|||
<el-table-column prop="realCount" label="实盘金额" width="120" align="center" /> |
|||
<el-table-column prop="state" label="状态" width="120" align="center" /> |
|||
<el-table-column prop="profitAndLoseCount" label="亏盈数" width="120" align="center" /> |
|||
<el-table-column prop="profitAndLoseAmount" label="盈亏金额" width="120" align="center" /> |
|||
<el-table-column prop="lossCount" label="盘损数量" width="120" align="center" /> |
|||
<el-table-column prop="lossAmount" label="盘损金额" width="120" align="center" /> |
|||
<el-table-column prop="remarks" label="备注" align="center" width="200" /> |
|||
<el-table-column label="附件" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div style="color: #1890FF; text-decoration: underline ;" @click="showImage(scope.row.fillPaths)"> |
|||
查看 |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<el-dialog title="附件" :visible.sync="dialogVisible" :before-close="handleClose"> |
|||
|
|||
<el-form ref="dataForm1" class="formadd" style="margin-top: -30px;"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="24" class="trightb"> |
|||
<el-image style="width: 120px;height: 120px; margin: 10px; background: #f0f;" |
|||
v-for="(item,index) in fileList" :src="item.url" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
export default { |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
btnList: [{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
}], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"billSid": "", |
|||
"warehouseRackSid": "", |
|||
"goodsID": "", |
|||
"goodsSkuTitle": "", |
|||
"goodsSkuCode": "" |
|||
} |
|||
}, |
|||
billSid: "", |
|||
warehouseRackSid: "", |
|||
fileList: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
showImage(paths) { |
|||
this.fileList = paths |
|||
this.dialogVisible = true |
|||
}, |
|||
handleClose() { |
|||
this.dialogVisible = false |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.close() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
|
|||
showDetail(sid, warehouseRackSid) { |
|||
this.billSid = sid |
|||
this.warehouseRackSid = warehouseRackSid |
|||
this.queryParams.params.billSid = sid |
|||
this.queryParams.params.warehouseRackSid = warehouseRackSid |
|||
this.loadList() |
|||
}, |
|||
|
|||
loadList() { |
|||
this.tableLoading = true |
|||
req.billRackCodeDetail(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"billSid": this.billSid, |
|||
"warehouseRackSid": this.warehouseRackSid, |
|||
"goodsID": "", |
|||
"goodsSkuTitle": "", |
|||
"goodsSkuCode": "" |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
|
|||
close() { |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 90px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 80px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 80px !important; |
|||
width: calc(100% - 70px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 180px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,355 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<button-bar ref="btnbar" view-title="盘库明细" :btndisabled="btndisabled" @btnhandle="btnHandle" /> |
|||
<div class="main-content"> |
|||
<div class="searchcon"> |
|||
<el-button size="small" class="searchbtn" @click="clicksearchShow"> |
|||
{{ searchxianshitit }} |
|||
</el-button> |
|||
<div v-show="isSearchShow" class="search"> |
|||
<el-form :inline="true" class="tab-header"> |
|||
<el-form-item label="仓库"> |
|||
<el-select v-model="queryParams.params.warehouseName" placeholder="请选择仓库" |
|||
@change="selectWarehouseChange"> |
|||
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" |
|||
:value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="库区"> |
|||
<el-select v-model="queryParams.params.warehouseAreaName" placeholder="请选择库区" |
|||
@change="selectWarehouseAreaChange"> |
|||
<el-option v-for="item in warehouseAreaList" :key="item.sid" :label="item.areaName" |
|||
:value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="库位"> |
|||
<el-select v-model="queryParams.params.warehouseRackName" placeholder="请选择库位" |
|||
@change="selectWarehouseRackChange"> |
|||
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackName" |
|||
:value="item.sid"> |
|||
</el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div class="btn" style="text-align: center;"> |
|||
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|||
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- Start 项目列表头部 --> |
|||
<div class="listtop"> |
|||
<div class="tit">库位盘点列表</div> |
|||
</div> |
|||
<!-- End 项目列表头部 --> |
|||
<!-- Start 项目列表 --> |
|||
<div class=""> |
|||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" /> |
|||
<el-table-column fixed label="操作" align="center" width="100"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="mini" @click="toDetail(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="warehouseName" label="仓库" width="120" align="center" /> |
|||
<el-table-column prop="warehouseArea" label="库区" width="120" align="center" /> |
|||
<el-table-column prop="warehouseRackName" label="库位" width="120" align="center" /> |
|||
<el-table-column label="应盘" align="center"> |
|||
<el-table-column prop="bookCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="bookAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="实盘" align="center"> |
|||
<el-table-column prop="realCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="realAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="未盘" align="center"> |
|||
<el-table-column prop="notCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="notAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="盘盈" align="center"> |
|||
<el-table-column prop="profitCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="profitAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="盘亏" align="center"> |
|||
<el-table-column prop="loseCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="loseAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
<el-table-column label="盘损" align="center"> |
|||
<el-table-column prop="lossCount" label="数量" align="center" width="100" /> |
|||
<el-table-column prop="lossAmount" label="金额" align="center" width="100" /> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- End 项目列表 --> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" |
|||
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<!-- 查看库位明细 --> |
|||
<stocktakingRackCodeDetail v-show="viewState == 2" ref="divSp" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import stocktakingRackCodeDetail from './oldpPartStocktakingRackCodeDetail.vue' |
|||
import req2 from '@/api/warehouse/warehouse.js' |
|||
import req3 from '@/api/warehouse/warehouseArea.js' |
|||
import req4 from '@/api/warehouse/goodsShelves.js' |
|||
export default { |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
pageye, |
|||
stocktakingRackCodeDetail |
|||
}, |
|||
data() { |
|||
return { |
|||
dialogVisible: false, |
|||
btndisabled: false, |
|||
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
tableLoading: false, |
|||
dataList: [], |
|||
btnList: [{ |
|||
type: 'info', |
|||
size: 'small', |
|||
icon: 'cross', |
|||
btnKey: 'doClose', |
|||
btnLabel: '关闭' |
|||
}], |
|||
queryParams: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"billSid": "", |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackName": "", |
|||
} |
|||
}, |
|||
billSid: "", |
|||
warehouseList: [], |
|||
warehouseAreaList: [], |
|||
warehouseRackList: [] |
|||
} |
|||
}, |
|||
mounted() { |
|||
this.$refs['btnbar'].setButtonList(this.btnList) |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
|
|||
initData() { |
|||
|
|||
var parpams = { |
|||
orgPath: window.sessionStorage.getItem('defaultOrgPath'), |
|||
} |
|||
|
|||
req2.getAllWarehouse(parpams).then(resp => { |
|||
this.warehouseList = resp.data |
|||
}) |
|||
}, |
|||
|
|||
getWarehouseArea(sid) { |
|||
this.queryParams.params.warehouseAreaSid = '' |
|||
this.queryParams.params.warehouseAreaName = '' |
|||
|
|||
var params = { |
|||
ckSid: sid |
|||
} |
|||
|
|||
req3.getAllWarehouseareaBysid(params).then(resp => { |
|||
console.log('>>>>>>>>>getAllWarehousearea', resp) |
|||
this.warehouseAreaList = resp.data |
|||
}).catch(() => {}) |
|||
}, |
|||
|
|||
getAllTypeByAreaSid(sid) { |
|||
this.queryParams.params.warehouseRackSid = '' |
|||
this.queryParams.params.warehouseRackName = '' |
|||
|
|||
var params = { |
|||
areaSid: sid |
|||
} |
|||
|
|||
req4.getAllTypeByAreaSid(params).then(resp => { |
|||
console.log('>>>>>>>>>getAllTypeByAreaSid', resp) |
|||
this.warehouseRackList = resp.data |
|||
}).catch(() => {}) |
|||
}, |
|||
|
|||
|
|||
selectWarehouseChange(val) { |
|||
const choose = this.warehouseList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseChange', choose) |
|||
this.queryParams.params.warehouseSid = choose[0].sid |
|||
this.queryParams.params.warehouseName = choose[0].warehouseName |
|||
|
|||
this.getWarehouseArea(choose[0].sid) |
|||
|
|||
}, |
|||
|
|||
selectWarehouseAreaChange(val) { |
|||
const choose = this.warehouseAreaList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseAreaChange', choose) |
|||
this.queryParams.params.warehouseAreaSid = choose[0].sid |
|||
this.queryParams.params.warehouseAreaName = choose[0].areaName |
|||
|
|||
this.getAllTypeByAreaSid(choose[0].sid) |
|||
}, |
|||
|
|||
selectWarehouseRackChange(val) { |
|||
const choose = this.warehouseRackList.filter((item) => item.sid == val) |
|||
console.log('>>>>>>>>>selectWarehouseRackChange', choose) |
|||
this.queryParams.params.warehouseRackSid = choose[0].sid |
|||
this.queryParams.params.warehouseRackName = choose[0].rackName |
|||
|
|||
}, |
|||
|
|||
|
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
btnHandle(btnKey) { |
|||
switch (btnKey) { |
|||
case 'doClose': |
|||
this.close() |
|||
break |
|||
default: |
|||
break |
|||
} |
|||
}, |
|||
showDetail(sid) { |
|||
this.initData() |
|||
this.billSid = sid |
|||
this.queryParams.params.billSid = sid |
|||
this.loadList() |
|||
}, |
|||
|
|||
loadList() { |
|||
this.tableLoading = true |
|||
req.billStocktak(this.queryParams).then((resp) => { |
|||
this.tableLoading = false |
|||
if (resp.success) { |
|||
const data = resp.data |
|||
this.queryParams.total = data.total |
|||
this.dataList = data.records |
|||
} else { |
|||
// 根据resp.code进行异常情况处理 |
|||
this.dataList = [] |
|||
this.queryParams.total = 0 |
|||
} |
|||
}).catch(() => { |
|||
this.tableLoading = false |
|||
}) |
|||
}, |
|||
|
|||
// 序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
dosearch() { |
|||
this.queryParams.current = 1 |
|||
this.loadList() |
|||
}, |
|||
resetQuery() { |
|||
this.queryParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
"billSid": this.billSid, |
|||
"warehouseSid": "", |
|||
"warehouseName": "", |
|||
"warehouseAreaSid": "", |
|||
"warehouseAreaName": "", |
|||
"warehouseRackSid": "", |
|||
"warehouseRackName": "", |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
|
|||
toDetail(row) { |
|||
|
|||
this.viewState = 2 |
|||
this.$refs['divSp'].showDetail(row.billSid, row.warehouseRackSid) |
|||
}, |
|||
close() { |
|||
this.$emit('doback') |
|||
}, |
|||
|
|||
resetState() { |
|||
this.viewState = 1 |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 90px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 80px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 80px !important; |
|||
width: calc(100% - 70px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 180px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
@ -0,0 +1,239 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>盘库报告</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="settle()">下载pdf</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<el-form ref="form_obj" :model="formobj" class="formaddcopy02"> |
|||
|
|||
<el-row class="first_row"> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起部门</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.deptName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">发起日期</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<el-row> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">盘点人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.createName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">监盘人</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.finances }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<div class="span-sty">备注</div> |
|||
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>总体盘点情况</div> |
|||
<el-button type="primary" size="mini" class="btntopblueline" @click="seleMaintenance()">明细下载</el-button> |
|||
</div> |
|||
|
|||
<div style="display: flex;flex-direction: row;align-items: center; |
|||
border: 1px solid #E0E3EB;line-height: 30px;padding: 5px 10px;"> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 应盘数量:</span> |
|||
<span> {{formobj.ypNum}}</span> |
|||
</div> |
|||
|
|||
<!-- <div style="flex: 1;"> |
|||
<span> 应盘金额:</span> |
|||
<span> {{formobj.ypMoney}}</span> |
|||
</div> --> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 实盘数量:</span> |
|||
<span> {{formobj.spNum}}</span> |
|||
</div> |
|||
<!-- |
|||
<div style="flex: 1;"> |
|||
<span> 实盘金额:</span> |
|||
<span> {{formobj.spMoney}}</span> |
|||
</div> --> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘盈数量:</span> |
|||
<span> {{formobj.pyNum}}</span> |
|||
</div> |
|||
<!-- |
|||
<div style="flex: 1;"> |
|||
<span> 盘盈金额:</span> |
|||
<span> {{formobj.pyMoney}}</span> |
|||
</div> --> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘亏数量:</span> |
|||
<span> {{formobj.pkNum}}</span> |
|||
</div> |
|||
|
|||
<!-- <div style="flex: 1;"> |
|||
<span> 盘亏金额:</span> |
|||
<span> {{formobj.pkMoney}}</span> |
|||
</div> --> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 盘损数量:</span> |
|||
<span> {{formobj.psNum}}</span> |
|||
</div> |
|||
|
|||
<!-- <div style="flex: 1;"> |
|||
<span> 盘损金额:</span> |
|||
<span> {{formobj.psMoney}}</span> |
|||
</div> --> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 虚拟件数量:</span> |
|||
<span> {{formobj.virtualNum}}</span> |
|||
</div> |
|||
|
|||
<div style="flex: 1;"> |
|||
<span> 未入库数量:</span> |
|||
<span> {{formobj.unInStorageNum}}</span> |
|||
</div> |
|||
|
|||
</div> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>仓库盘点情况</div> |
|||
</div> |
|||
<el-table :data="formobj.warehouseStocktakList" :index="index" border style="width: 100%;"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column prop="warehouseName" label="仓库" min-width="120" align="center" /> |
|||
<el-table-column prop="ypNum" label="应盘" align="center" /> |
|||
<el-table-column prop="ypMoney" label="应盘金额" width="120" align="center" /> |
|||
<el-table-column prop="spNum" label="实盘" width="120" align="center" /> |
|||
<el-table-column prop="spMoney" label="实盘金额" align="center" width="120" /> |
|||
<el-table-column prop="pyNum" label="盘盈" align="center" /> |
|||
<el-table-column prop="pyMoney" label="盘盈金额" align="center" width="120" /> |
|||
<el-table-column prop="pkNum" label="盘亏" align="center" width="100" /> |
|||
<el-table-column prop="pkMoney" label="盘亏金额" align="center" width="120" /> |
|||
<el-table-column prop="psNum" label="盘损" align="center" width="100" /> |
|||
<el-table-column prop="psMoney" label="盘损金额" align="center" width="100" /> |
|||
<el-table-column prop="virtualNum" label="虚拟件" align="center" width="100" /> |
|||
<el-table-column prop="virtualMoney" label="虚拟件金额" align="center" width="120" /> |
|||
<el-table-column prop="unInStorageNum" label="未入库" align="center" width="100" /> |
|||
<el-table-column prop="unInStorageMoney" label="未入库金额" align="center" width="120" /> |
|||
</el-table> |
|||
|
|||
<div class="title titleOne"> |
|||
<div>库区盘点情况</div> |
|||
</div> |
|||
<el-table :data="formobj.arehouseAreaeStocktakList" :index="index" border style="width: 100%;"> |
|||
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
|||
<el-table-column prop="warehouseAreaeName" label="仓库-库区" min-width="120" align="center" /> |
|||
<el-table-column prop="ypNum" label="应盘" align="center" /> |
|||
<el-table-column prop="ypMoney" label="应盘金额" width="120" align="center" /> |
|||
<el-table-column prop="spNum" label="实盘" width="120" align="center" /> |
|||
<el-table-column prop="spMoney" label="实盘金额" width="120" align="center" /> |
|||
<el-table-column prop="pyNum" label="盘盈" align="center" /> |
|||
<el-table-column prop="pyMoney" label="盘盈金额" width="120" align="center" /> |
|||
<el-table-column prop="pkNum" label="盘亏" align="center" width="100" /> |
|||
<el-table-column prop="pkMoney" label="盘亏金额" align="center" width="120" /> |
|||
<el-table-column prop="psNum" label="盘损" align="center" width="100" /> |
|||
<el-table-column prop="psMoney" label="盘损金额" align="center" width="120" /> |
|||
<el-table-column prop="virtualNum" label="虚拟件" align="center" width="100" /> |
|||
<el-table-column prop="virtualMoney" label="虚拟件金额" align="center" width="120" /> |
|||
<el-table-column prop="unInStorageNum" label="未入库" align="center" width="100" /> |
|||
<el-table-column prop="unInStorageMoney" label="未入库金额" align="center" width="120" /> |
|||
</el-table> |
|||
|
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/storage/oldpPartStocktaking.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
index: 0, |
|||
|
|||
formobj: {}, |
|||
} |
|||
}, |
|||
|
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
showDetail(sid) { |
|||
req.init(sid).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
|
|||
} |
|||
}) |
|||
}, |
|||
|
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj = {} |
|||
this.submitdisabled = false |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
/deep/ .el-form-item__error { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.must { |
|||
color: #f00; |
|||
} |
|||
|
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw { |
|||
margin-left: 120px !important; |
|||
width: calc(100% - 115px); |
|||
} |
|||
|
|||
.first_row { |
|||
border-top: 1px solid #E0E3EB; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
|
|||
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .el-radio-group { |
|||
display: inline; |
|||
line-height: 1px; |
|||
vertical-align: middle; |
|||
} |
|||
</style> |
Loading…
Reference in new issue