9 changed files with 2166 additions and 0 deletions
@ -0,0 +1,111 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
export default { |
|||
// 查询分页列表
|
|||
listPage: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/listPage', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 生成盘点单
|
|||
createBill: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 点击盘库 -- 库位盘点列表
|
|||
billStocktak: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/detailRackPageList', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 库位盘点列表 -- 库位盘点明细列表
|
|||
billRackCodeDetail: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/detailRackGoodPageList', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 生成盘点报告
|
|||
billCreateReport: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/createReport', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
}, |
|||
// 初始化盘库报告
|
|||
init: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/viewReport', |
|||
method: 'post', |
|||
params: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 盘点报告 -- 保存
|
|||
saveReport: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/saveReport', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
}, |
|||
// 盘点报告 -- 提交
|
|||
submitReport: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/submitReport', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 盘点报告 -- 明细下载
|
|||
downloadExcel: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/downloadExcel', |
|||
method: 'post', |
|||
params: data, |
|||
responseType: 'blob', // 表明返回服务器返回的数据类型
|
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
}, |
|||
downloadPDF: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/createPdf', |
|||
method: 'post', |
|||
params: data |
|||
}) |
|||
}, |
|||
// 盘点单详情
|
|||
billDetail: function(data) { |
|||
return request({ |
|||
url: '/wms/v1/wmsinventorycheckbill/detailGoodPageList', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
}, |
|||
// 查询所有库位列表
|
|||
warehouserackListAll: function(data) { |
|||
return request({ |
|||
url: '/wms/apiadmin/base/wmswarehouserack/listAll', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { 'Content-Type': 'application/json' } |
|||
}) |
|||
} |
|||
} |
@ -0,0 +1,716 @@ |
|||
<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;" /> |
|||
<span style="padding: 0 8px">至</span> |
|||
<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> |
|||
|
|||
<!-- 盘库 --> |
|||
<stockCountAdd v-show="viewState == 2 " ref="divAdd" @doback="resetState" /> |
|||
<!-- 办理盘库报告 --> |
|||
<stockCountReport v-show="viewState == 3 " ref="divReport" @doback="resetState" @reloadlist="loadList" /> |
|||
<!-- 查看盘库报告 --> |
|||
<stockCountReportDetail v-show="viewState == 4 " ref="divReportDetail" @doback="resetState" /> |
|||
<!-- 查看详情 --> |
|||
<stockCountInfo 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 style="border-top: 1px solid #E0E3EB;"> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">盘点人</div> |
|||
<el-form-item> <span class="addinputInfo">{{ formobj.createByName }}</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty">生成日期</div> |
|||
<el-form-item> <span class="addinputInfo">{{ formobj.createDate }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="icon">*</span> 盘点类型</div> |
|||
<el-form-item prop="checkTypeValue"> |
|||
<el-select v-model="formobj.checkTypeValue" placeholder="请选择" class="addinputInfo addinputw" @change="selectStocktakTyp" filterable> |
|||
<el-option v-for="item in stocktakTypeList" :key="item.sid" :label="item.name" :value="item.sid" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<div class="span-sty"><span class="icon">*</span> 监盘人</div> |
|||
<el-form-item prop="superviseName"> |
|||
<el-select v-model="formobj.superviseName" placeholder="请选择" class="addinputInfo addinputw" @change="selectFinance" filterable> |
|||
<el-option v-for="item in financeList" :key="item.sid" :label="item.name" :value="item.sid" /> |
|||
</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.$index)">删除</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" width="70%"> |
|||
<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> |
|||
</el-form> |
|||
<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> |
|||
<div class="title" 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/disassemble/stockCount' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import stockCountInfo from './stockCountInfo.vue' |
|||
import stockCountAdd from './stockCountAdd.vue' |
|||
import stockCountReport from './stockCountReport.vue' |
|||
import stockCountReportDetail from './stockCountReportDetail.vue' |
|||
import { selAllByOrgSidPath, getAllWarehouse, getAllWarehouseareaBysid, getAllTypeByAreaSid } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'StockCount', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
stockCountInfo, |
|||
stockCountAdd, |
|||
stockCountReport, |
|||
stockCountReportDetail |
|||
}, |
|||
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: '', |
|||
warehouseTypeKey: '03' |
|||
} |
|||
}, |
|||
sids: [], |
|||
selectionList: [], |
|||
checkStateList: [ |
|||
{ |
|||
sid: '1', |
|||
name: '未完成' |
|||
}, |
|||
{ |
|||
sid: '2', |
|||
name: '已完成' |
|||
} |
|||
], |
|||
stocktakTypeList: [ |
|||
{ |
|||
sid: '1', |
|||
name: '月度抽盘' |
|||
}, |
|||
{ |
|||
sid: '2', |
|||
name: '季度全盘' |
|||
} |
|||
], |
|||
formobj: { |
|||
createByName: '', |
|||
createBySid: '', |
|||
deptSid: '', |
|||
deptName: '', |
|||
createDate: '', |
|||
checkTypeValue: '', |
|||
checkTypeKey: '', |
|||
superviseName: '', |
|||
superviseSid: '', |
|||
remarks: '', |
|||
dataList: [], |
|||
warehouseTypeKey: '', |
|||
warehouseTypeValue: '' |
|||
}, |
|||
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: '', |
|||
warehouseTypeKey: '03' |
|||
} |
|||
}, |
|||
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 |
|||
} |
|||
}) |
|||
getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
methods: { |
|||
selectWarehouseChange(val) { |
|||
const choose = this.warehouseList.filter((item) => item.sid === val) |
|||
this.dialogParams.params.warehouseSid = choose[0].sid |
|||
this.dialogParams.params.warehouseName = choose[0].warehouseName |
|||
this.getWarehouseArea(choose[0].sid) |
|||
}, |
|||
getWarehouseArea(sid) { |
|||
this.dialogParams.params.warehouseAreaSid = '' |
|||
this.dialogParams.params.warehouseAreaName = '' |
|||
getAllWarehouseareaBysid({ ckSid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseAreaList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseAreaChange(val) { |
|||
const choose = this.warehouseAreaList.filter((item) => item.sid === val) |
|||
this.dialogParams.params.warehouseAreaSid = choose[0].sid |
|||
this.dialogParams.params.warehouseAreaName = choose[0].areaName |
|||
this.getAllTypeByAreaSid(choose[0].sid) |
|||
}, |
|||
getAllTypeByAreaSid(sid) { |
|||
this.dialogParams.params.warehouseRackSid = '' |
|||
this.dialogParams.params.warehouseRackCode = '' |
|||
getAllTypeByAreaSid({ areaSid: sid }).then(resp => { |
|||
if (resp.success) { |
|||
this.warehouseRackList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseRackChange(val) { |
|||
const choose = this.warehouseRackList.filter((item) => item.sid === val) |
|||
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: '', |
|||
warehouseTypeKey: '03' |
|||
} |
|||
} |
|||
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 |
|||
req.warehouserackListAll(this.dialogParams).then(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) |
|||
} |
|||
this.dialogParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
warehouseSid: '', |
|||
warehouseName: '', |
|||
warehouseAreaSid: '', |
|||
warehouseAreaName: '', |
|||
warehouseRackSid: '', |
|||
warehouseRackCode: '', |
|||
warehouseTypeKey: '03' |
|||
} |
|||
} |
|||
this.dialogVisible2 = false |
|||
}, |
|||
handleClose2() { |
|||
this.dialogParams = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
warehouseSid: '', |
|||
warehouseName: '', |
|||
warehouseAreaSid: '', |
|||
warehouseAreaName: '', |
|||
warehouseRackSid: '', |
|||
warehouseRackCode: '', |
|||
warehouseTypeKey: '03' |
|||
} |
|||
} |
|||
this.dialogVisible2 = false |
|||
}, |
|||
toDeleted(index) { |
|||
this.formobj.dataList.splice(index, 1) |
|||
}, |
|||
selectStocktakTyp(val) { |
|||
this.showList = val |
|||
const choose = this.stocktakTypeList.filter((item) => val.includes(item.sid)) |
|||
this.formobj.checkTypeValue = choose[0].name |
|||
this.formobj.checkTypeKey = choose[0].sid |
|||
}, |
|||
selectFinance(val) { |
|||
const choose = this.financeList.filter((item) => val.includes(item.sid)) |
|||
this.formobj.superviseName = choose[0].name |
|||
this.formobj.superviseSid = choose[0].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() { |
|||
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) { |
|||
this.formobj.warehouseTypeKey = '03' |
|||
this.formobj.warehouseTypeValue = '拆件库' |
|||
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 |
|||
}) |
|||
}, |
|||
// 序号 |
|||
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: '', |
|||
warehouseTypeKey: '03' |
|||
} |
|||
} |
|||
this.loadList() |
|||
}, |
|||
toAdd() { |
|||
this.dialogVisible = true |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
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) |
|||
var nowDate = new Date() |
|||
var date = { |
|||
year: nowDate.getFullYear(), |
|||
month: nowDate.getMonth() + 1, |
|||
day: nowDate.getDate() |
|||
} |
|||
this.formobj.createDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) |
|||
}, |
|||
selectionLineChangeHandle(val) { |
|||
this.selectionList = val |
|||
const aa = [] |
|||
val.forEach(element => { |
|||
aa.push(element.sid) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
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['divAdd'].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 |
|||
} |
|||
this.$confirm('请确认是否盘点完毕,生成盘点报告后将不能再盘点!', '提示', { |
|||
confirmButtonText: '确认', |
|||
cancelButtonText: '取消', |
|||
showClose: true, |
|||
type: 'warning' |
|||
}).then(() => { |
|||
req.billCreateReport({ sid: this.selectionList[0].sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.$message({ type: 'success', message: '操作成功', showClose: true }) |
|||
this.loadList() |
|||
} |
|||
}).catch(() => {}) |
|||
}).catch(() => { |
|||
}) |
|||
}, |
|||
toEdit(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divReport'].showEdit(row) |
|||
}, |
|||
toReport(row) { |
|||
this.viewState = 4 |
|||
this.$refs['divReportDetail'].showDetail(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$store.dispatch('tagsView/delView', this.$route) |
|||
this.$router.go(-1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.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); |
|||
} |
|||
|
|||
/deep/ .el-form-item__error { |
|||
margin-left: 180px !important; |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,268 @@ |
|||
<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" filterable> |
|||
<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" filterable> |
|||
<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" filterable> |
|||
<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> |
|||
<!-- 查看库位明细 --> |
|||
<stockCountAddByDetail v-show="viewState == 2" ref="divSp" @doback="resetState" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/disassemble/stockCount' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import stockCountAddByDetail from './stockCountAddByDetail.vue' |
|||
import { getAllWarehouse, getAllWarehouseareaBysid, getAllTypeByAreaSid } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'StockCountAdd', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination, |
|||
stockCountAddByDetail |
|||
}, |
|||
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) |
|||
}, |
|||
methods: { |
|||
initData() { |
|||
getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then(resp => { |
|||
this.warehouseList = resp.data |
|||
}) |
|||
}, |
|||
selectWarehouseChange(val) { |
|||
const choose = this.warehouseList.filter((item) => item.sid === val) |
|||
this.queryParams.params.warehouseSid = choose[0].sid |
|||
this.queryParams.params.warehouseName = choose[0].warehouseName |
|||
this.getWarehouseArea(choose[0].sid) |
|||
}, |
|||
getWarehouseArea(sid) { |
|||
this.queryParams.params.warehouseAreaSid = '' |
|||
this.queryParams.params.warehouseAreaName = '' |
|||
getAllWarehouseareaBysid({ ckSid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseAreaList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseAreaChange(val) { |
|||
const choose = this.warehouseAreaList.filter((item) => item.sid === val) |
|||
this.queryParams.params.warehouseAreaSid = choose[0].sid |
|||
this.queryParams.params.warehouseAreaName = choose[0].areaName |
|||
this.getAllTypeByAreaSid(choose[0].sid) |
|||
}, |
|||
getAllTypeByAreaSid(sid) { |
|||
this.queryParams.params.warehouseRackSid = '' |
|||
this.queryParams.params.warehouseRackName = '' |
|||
getAllTypeByAreaSid({ areaSid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseRackList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseRackChange(val) { |
|||
const choose = this.warehouseRackList.filter((item) => item.sid === val) |
|||
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.doClose() |
|||
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) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
doClose() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
</style> |
@ -0,0 +1,216 @@ |
|||
<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" :key="index" :src="item.url" :preview-src-list="[item]" /> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</el-dialog> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/disassemble/stockCount' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
|
|||
export default { |
|||
name: 'StockCountAddByDetail', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination |
|||
}, |
|||
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) |
|||
}, |
|||
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> |
|||
</style> |
@ -0,0 +1,282 @@ |
|||
<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" :key="index" :src="item.url" :preview-src-list="[item]"> |
|||
</el-image> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/disassemble/stockCount' |
|||
import ButtonBar from '@/components/ButtonBar' |
|||
import Pagination from '@/components/pagination' |
|||
import { getAllWarehouse, getAllWarehouseareaBysid, getAllTypeByAreaSid } from '@/api/Common/dictcommons' |
|||
|
|||
export default { |
|||
name: 'StockCountInfo', |
|||
components: { |
|||
ButtonBar, |
|||
Pagination |
|||
}, |
|||
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) |
|||
}, |
|||
methods: { |
|||
initData() { |
|||
getAllWarehouse({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseChange(val) { |
|||
const choose = this.warehouseList.filter((item) => item.sid === val) |
|||
this.queryParams.params.warehouseSid = choose[0].sid |
|||
this.queryParams.params.warehouseName = choose[0].warehouseName |
|||
this.getWarehouseArea(choose[0].sid) |
|||
}, |
|||
getWarehouseArea(sid) { |
|||
this.queryParams.params.warehouseAreaSid = '' |
|||
this.queryParams.params.warehouseAreaName = '' |
|||
getAllWarehouseareaBysid({ ckSid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseAreaList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseAreaChange(val) { |
|||
const choose = this.warehouseAreaList.filter((item) => item.sid === val) |
|||
this.queryParams.params.warehouseAreaSid = choose[0].sid |
|||
this.queryParams.params.warehouseAreaName = choose[0].areaName |
|||
this.getAllTypeByAreaSid(choose[0].sid) |
|||
}, |
|||
getAllTypeByAreaSid(sid) { |
|||
this.queryParams.params.warehouseRackSid = '' |
|||
this.queryParams.params.warehouseRackName = '' |
|||
getAllTypeByAreaSid({ areaSid: sid }).then((resp) => { |
|||
if (resp.success) { |
|||
this.warehouseRackList = resp.data |
|||
} |
|||
}) |
|||
}, |
|||
selectWarehouseRackChange(val) { |
|||
const choose = this.warehouseRackList.filter((item) => item.sid === val) |
|||
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> |
|||
</style> |
@ -0,0 +1,313 @@ |
|||
<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 style="border-top: 1px solid #E0E3EB"> |
|||
<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">仓库盘点情况</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">库区盘点情况</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/disassemble/stockCount' |
|||
import { getOrgSidByPath } from '@/api/Common/dictcommons' |
|||
import { getStorage } from '@/utils/auth' |
|||
|
|||
export default { |
|||
name: 'StockCountReport', |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
index: 0, |
|||
formobj: { |
|||
createByName: '', |
|||
createBySid: '', |
|||
deptName: '', |
|||
deptSid: '', |
|||
createTime: '', |
|||
createName: '', |
|||
finances: '', |
|||
remarks: '', |
|||
ypNum: '', |
|||
ypMoney: '', |
|||
spNum: '', |
|||
spMoney: '', |
|||
pyNum: '', |
|||
pyMoney: '', |
|||
pkNum: '', |
|||
pkMoney: '', |
|||
psNum: '', |
|||
psMoney: '', |
|||
warehouseStocktakList: [], |
|||
arehouseAreaeStocktakList: [], |
|||
useOrgSid: '', |
|||
createOrgSid: '' |
|||
} |
|||
} |
|||
}, |
|||
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) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
req.init({ sid: 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) |
|||
var nowDate = new Date() |
|||
var date = { |
|||
year: nowDate.getFullYear(), |
|||
month: nowDate.getMonth() + 1, |
|||
day: nowDate.getDate() |
|||
} |
|||
this.formobj.createTime = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) |
|||
this.init() |
|||
} |
|||
}) |
|||
}, |
|||
saveOrUpdate() { |
|||
this.submitdisabled = true |
|||
var info = { sid: this.formobj.sid, remarks: this.formobj.remarks } |
|||
req.saveReport(info).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({ sid: this.formobj.sid }).then((res) => { |
|||
if (res.success) { |
|||
loading.close() |
|||
var xhr = new XMLHttpRequest() |
|||
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + |
|||
'&outFileName=' + '盘点报告', true) |
|||
xhr.setRequestHeader('token', getStorage()) |
|||
xhr.responseType = 'blob' |
|||
xhr.onload = function(e) { |
|||
// 如果请求执行成功 |
|||
var blob = this.response |
|||
var filename = '盘点报告.pdf' |
|||
var a = document.createElement('a') |
|||
// blob.type="application/octet-stream"; |
|||
// 创键临时url对象 |
|||
var url = URL.createObjectURL(blob) |
|||
a.href = url |
|||
a.download = filename |
|||
a.click() |
|||
// 释放之前创建的URL对象 |
|||
window.URL.revokeObjectURL(url) |
|||
} |
|||
// 发送请求 |
|||
xhr.send() |
|||
} |
|||
}).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({ sid: this.formobj.sid }).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> |
|||
.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); |
|||
} |
|||
|
|||
.titleOne { |
|||
padding: 7px; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
} |
|||
</style> |
@ -0,0 +1,223 @@ |
|||
<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="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 style="border-top: 1px solid #E0E3EB"> |
|||
<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="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">仓库盘点情况</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="仓库" align="center" /> |
|||
<el-table-column prop="ypNum" label="应盘" align="center" /> |
|||
<el-table-column prop="ypMoney" label="应盘金额" width="150" align="center" /> |
|||
<el-table-column prop="spNum" label="实盘" width="150" 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" width="100" /> |
|||
<el-table-column prop="pkMoney" label="盘亏金额" align="center" width="100" /> |
|||
<el-table-column prop="psNum" label="盘损" align="center" width="100" /> |
|||
<el-table-column prop="psMoney" label="盘损金额" align="center" width="100" /> |
|||
</el-table> |
|||
<div class="title">库区盘点情况</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="仓库-库区" align="center" /> |
|||
<el-table-column prop="ypNum" label="应盘" align="center" /> |
|||
<el-table-column prop="ypMoney" label="应盘金额" width="150" align="center" /> |
|||
<el-table-column prop="spNum" label="实盘" width="150" 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" width="100" /> |
|||
<el-table-column prop="pkMoney" label="盘亏金额" align="center" width="100" /> |
|||
<el-table-column prop="psNum" label="盘损" align="center" width="100" /> |
|||
<el-table-column prop="psMoney" label="盘损金额" align="center" width="100" /> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/disassemble/stockCount' |
|||
import { getStorage } from '@/utils/auth' |
|||
|
|||
export default { |
|||
name: 'StockCountReportDetail', |
|||
data() { |
|||
return { |
|||
viewState: 1, |
|||
submitdisabled: false, |
|||
index: 0, |
|||
formobj: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showDetail(row) { |
|||
req.init({ sid: row.sid }).then((res) => { |
|||
if (res.success) { |
|||
this.formobj = res.data |
|||
} |
|||
}) |
|||
}, |
|||
handleReturn() { |
|||
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({ sid: this.formobj.sid }).then((res) => { |
|||
if (res.success) { |
|||
loading.close() |
|||
var xhr = new XMLHttpRequest() |
|||
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + res.data + |
|||
'&outFileName=' + '盘点报告', true) |
|||
xhr.setRequestHeader('token', getStorage()) |
|||
xhr.responseType = 'blob' |
|||
xhr.onload = function(e) { |
|||
// 如果请求执行成功 |
|||
var blob = this.response |
|||
var filename = '盘点报告.pdf' |
|||
var a = document.createElement('a') |
|||
// blob.type="application/octet-stream"; |
|||
// 创键临时url对象 |
|||
var url = URL.createObjectURL(blob) |
|||
a.href = url |
|||
a.download = filename |
|||
a.click() |
|||
// 释放之前创建的URL对象 |
|||
window.URL.revokeObjectURL(url) |
|||
} |
|||
// 发送请求 |
|||
xhr.send() |
|||
} |
|||
}).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({ sid: this.formobj.sid }).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> |
|||
.span-sty { |
|||
width: 130px !important; |
|||
} |
|||
|
|||
.addinputInfo { |
|||
margin-left: 120px !important; |
|||
} |
|||
</style> |
Loading…
Reference in new issue