Browse Source

完善盘点管理

master
guoxing 8 months ago
parent
commit
11abaf59c4
  1. 129
      yxt-as-ui/src/api/storage/oldpPartStocktaking.js
  2. 19
      yxt-as-ui/src/api/storage/stocktaking.js
  3. 14
      yxt-as-ui/src/api/storage/stocktakingLoss.js
  4. 14
      yxt-as-ui/src/api/storage/stocktakingSurplus.js
  5. 7
      yxt-as-ui/src/api/warehouse/goodsShelves.js
  6. 14
      yxt-as-ui/src/router/index.js
  7. 12
      yxt-as-ui/src/views/goods/brands/brandsAdd.vue
  8. 16
      yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue
  9. 46
      yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue
  10. 151
      yxt-as-ui/src/views/storage/oldPartsCope/index.vue
  11. 145
      yxt-as-ui/src/views/storage/oldPartsCope/oldPartsCopeAdd.vue
  12. 22
      yxt-as-ui/src/views/storage/oldPartsCope/oldPartsCopeInfo.vue
  13. 866
      yxt-as-ui/src/views/storage/oldpPartStocktaking/index.vue
  14. 445
      yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingAdd.vue
  15. 367
      yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingEditReport.vue
  16. 374
      yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingInfo.vue
  17. 271
      yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingRackCodeDetail.vue
  18. 355
      yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingRackCodeList.vue
  19. 239
      yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingReportDetail.vue
  20. 131
      yxt-as-ui/src/views/storage/stocktaking/index.vue
  21. 61
      yxt-as-ui/src/views/storage/stocktaking/stocktakingEditReport.vue
  22. 88
      yxt-as-ui/src/views/storage/stocktaking/stocktakingReportDetail.vue
  23. 8
      yxt-as-ui/src/views/storage/stocktakingSurplus/index.vue

129
yxt-as-ui/src/api/storage/oldpPartStocktaking.js

@ -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'
}
})
},
}

19
yxt-as-ui/src/api/storage/stocktaking.js

@ -84,8 +84,12 @@ export default {
init: function(data) {
return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorycheckbill/fetchDetailsBySid/' + data,
method: 'get'
url: '/wms/v1/wmsinventorycheckbill/viewReport',
method: 'post',
params: data,
headers: {
'Content-Type': 'application/json'
}
});
},
@ -95,7 +99,7 @@ export default {
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorycheckbill/saveReport',
method: 'post',
data: data,
params: data,
headers: {
'Content-Type': 'application/json'
}
@ -128,11 +132,12 @@ export default {
})
},
downloadExcel: function() {
downloadExcel: function(params) {
return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorycheckbill/downloadExcel',
method: 'post',
params: params,
responseType: 'blob', // 表明返回服务器返回的数据类型
headers: {
'Content-Type': 'application/json'
@ -140,12 +145,12 @@ export default {
})
},
downloadPDF: function() {
downloadPDF: function(params) {
return request({
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorycheckbill/downloadPdf',
url: '/wms/v1/wmsinventorycheckbill/createPdf',
method: 'post',
responseType: 'blob', // 表明返回服务器返回的数据类型
params: params,
headers: {
'Content-Type': 'application/json'
}

14
yxt-as-ui/src/api/storage/stocktakingLoss.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表
listPage: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/listPage',
method: 'post',
data: params,
@ -17,7 +17,7 @@ export default {
deleteBySids: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/delBySids',
method: 'DELETE',
data: data,
@ -31,7 +31,7 @@ export default {
// 盘点单详情
fetchDetailsBySid: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/fetchDetailsBySid/' + params,
method: 'get',
data: params,
@ -45,7 +45,7 @@ export default {
// 根据部门sid 获取所有盘点单号
getSourceBillNoBySid: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/getSourceBillNoBySid',
method: 'post',
params: data
@ -55,7 +55,7 @@ export default {
// 根据盘点单sid 获取商品
sourceBillBySid: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/sourceBillBySid/' + params,
method: 'get',
data: params,
@ -69,7 +69,7 @@ export default {
// 保存盘盈入库
save: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/save',
method: 'post',
data: data,
@ -82,7 +82,7 @@ export default {
// 提交盘盈入库
submit: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventoryloss/submit',
method: 'post',
data: data,

14
yxt-as-ui/src/api/storage/stocktakingSurplus.js

@ -5,7 +5,7 @@ export default {
// 查询分页列表
listPage: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/listPage',
method: 'post',
data: params,
@ -17,7 +17,7 @@ export default {
deleteBySids: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/delBySids',
method: 'DELETE',
data: data,
@ -30,7 +30,7 @@ export default {
// 盘点单详情
fetchDetailsBySid: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/fetchDetailsBySid/' + params,
method: 'get',
data: params,
@ -43,7 +43,7 @@ export default {
// 根据部门sid 获取所有盘点单号
getSourceBillNoBySid: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/getSourceBillNoBySid',
method: 'post',
params: data
@ -53,7 +53,7 @@ export default {
// 根据盘点单sid 获取商品
sourceBillBySid: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/sourceBillBySid/' + params,
method: 'get',
data: params,
@ -67,7 +67,7 @@ export default {
// 保存盘盈入库
save: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/save',
method: 'post',
data: data,
@ -80,7 +80,7 @@ export default {
// 提交盘盈入库
submit: function(data) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/v1/wmsinventorysurplus/submit',
method: 'post',
data: data,

7
yxt-as-ui/src/api/warehouse/goodsShelves.js

@ -84,10 +84,13 @@ export default {
// 查询所有库位列表
warehouserackListAll: function(params) {
return request({
baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/base/warehouserack/listAll',
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
url: '/wms/apiadmin/base/wmswarehouserack/listAll',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},

14
yxt-as-ui/src/router/index.js

@ -125,7 +125,10 @@ export const constantRoutes = [{
path: '/webmasterConfirmation/webmasterConfirmation',
component: () => import('@/views/operation/webmasterConfirmation/webmasterConfirmation.vue'),
name: 'WebmasterConfirmation',
meta: { title: '站长出厂确认', noCache: true }
meta: {
title: '站长出厂确认',
noCache: true
}
},
{
path: '/workorderinvoicing/workorderinvoicing',
@ -564,6 +567,15 @@ export const constantRoutes = [{
noCache: true
}
},
{
path: '/oldpPartStocktaking/index',
component: () => import('@/views/storage/oldpPartStocktaking/index'),
name: 'OldpPartStocktaking',
meta: {
title: '旧件盘点管理',
noCache: true
}
},
{
path: '/storageage/storageage',
component: () => import('@/views/storage/storageage/storageage'),

12
yxt-as-ui/src/views/goods/brands/brandsAdd.vue

@ -157,14 +157,14 @@
this.formobj.letter = val
},
backData(value) {
console.log('imgList', this.imgList)
console.log('value', value)
if (this.imgList.length > 0) {
this.formobj.image = this.imgList[0].url
if (value.length > 0) {
this.formobj.image = value[0].url
} else {
this.formobj.image = ''
}
this.hideUploadBtn = this.imgList.length != 0
this.hideUploadBtn = value.length == 1
console.log('this.hideUploadBtn', this.hideUploadBtn)
},
@ -239,7 +239,7 @@
},
showAdd() {
console.log("this.imgList", this.imgList)
this.hideUploadBtn = this.imgList.length != 0
this.hideUploadBtn = this.imgList.length == 1
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
@ -261,7 +261,7 @@
})
}
this.hideUploadBtn = this.imgList.length != 0
this.hideUploadBtn = this.imgList.length == 1
}
})
.catch(e => {

16
yxt-as-ui/src/views/storage/manufacturerconfirm/index.vue

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<button-bar ref="btnbar" view-title="旧件返厂申请厂家确认" :btndisabled="btndisabled" @btnhandle="btnHandle" />
<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">
@ -15,6 +15,9 @@
<el-form-item label="申请部门">
<el-input v-model="queryParams.params.deptName" placeholder="" clearable />
</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.billNo" placeholder="" clearable />
</el-form-item>
@ -35,12 +38,12 @@
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item>
<el-form-item label="厂家确认结果">
<!-- <el-form-item label="厂家确认结果">
<el-select v-model="queryParams.params.billState" placeholder="请选择">
<el-option v-for="(item,i) in confirmResultsList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</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>
@ -50,7 +53,7 @@
</div>
<!-- Start 项目列表头部 -->
<div class="listtop">
<div class="tit">旧件返厂申请列表</div>
<div class="tit">旧件返厂确认列表</div>
</div>
<!-- End 项目列表头部 -->
<!-- Start 项目列表 -->
@ -80,13 +83,14 @@
</div>
</template>
</el-table-column>
<el-table-column label="厂家确认结果" align="center">
<el-table-column prop="needReturnCount" label="厂家确认数量" width="180" align="center" />
<!-- <el-table-column label="厂家确认结果" align="center">
<template slot-scope="scope">
<div style="color: #1890FF; text-decoration: underline ;" @click="showResult(scope.row)">
{{ scope.row.confirmResult }}
</div>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
</div>

46
yxt-as-ui/src/views/storage/manufacturerconfirm/manufacturerconfirmAdd.vue

@ -2,7 +2,7 @@
<div>
<div class="tab-header webtop">
<!-- 标题 -->
<div>{{title}}旧件返厂申请</div>
<div>{{title}}旧件返厂确认</div>
<!-- start 添加修改按钮 -->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="importDetail">导入厂家返件明细</el-button>
@ -14,13 +14,13 @@
<!-- end 详情按钮 -->
</div>
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<div class="title">
<div>基础信息</div>
</div>
<el-row class="first_row">
<!-- <el-col :span="12">
<!-- <el-col :span="12">
<div class="span-sty">单据编号</div>
<el-form-item><span class="addinputInfo">{{ formobj.billNo }}</span></el-form-item>
</el-col> -->
@ -34,7 +34,7 @@
</el-col>
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 申请日期</div>
<el-form-item prop="createTime">
<el-form-item prop="createTime">
<el-date-picker v-model="formobj.createTime" class="addinputw addinputInfo" type="date"
value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker>
@ -42,7 +42,7 @@
</el-col>
</el-row>
<!-- <el-row>
<!-- <el-row>
<el-col :span="12">
<div class="span-sty">分公司</div>
@ -77,7 +77,7 @@
<el-col :span="24">
<div class="span-sty"><span class="must">*</span> 附件</div>
<el-form-item prop="imgList">
<el-form-item prop="imgList">
<upload-img ref="uploadImg" class="addinputw" v-model="imgList" :limit="50" bucket="map"
:upload-data="{ type: '0001' }" />
</el-form-item>
@ -85,7 +85,7 @@
</el-row>
<div class="title">
<div>返厂旧件列表</div>
<div>返厂旧件列表</div>
</div>
<el-table v-loading="listLoading" :data="formobj.asOldpartreturnList" border>
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
@ -202,18 +202,18 @@
formobj: {
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"orgSidPath": window.sessionStorage.getItem('orgSidPath'),
"orgSidPath": window.sessionStorage.getItem('orgSidPath'),
"procDefId": "",
"nodeId": "",
"procInstId": "",
@ -411,12 +411,12 @@
this.formobj = {
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
@ -530,9 +530,9 @@
console.log('backData》》》》', value)
console.log('imgList', this.imgList)
for (var i = 0; i < this.imgList.length; i++) {
this.formobj.filePaths.push(this.imgList[i].url)
}
for (var i = 0; i < this.imgList.length; i++) {
this.formobj.filePaths.push(this.imgList[i].url)
}
}

151
yxt-as-ui/src/views/storage/oldPartsCope/index.vue

@ -8,43 +8,49 @@
{{ 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.useOrgName" placeholder="" clearable />
</el-form-item>
<el-form-item label="申请部门">
<el-input v-model="queryParams.params.createDeptName" placeholder="" clearable />
</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.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>
<el-date-picker v-model="queryParams.params.createEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item>
<el-form-item label="办结日期">
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item>
<el-form-item label="处理方式">
<el-select v-model="queryParams.params.handleModeKey" placeholder="请选择">
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-form>
<el-form :inline="true" class="tab-header">
<el-form-item label="分公司">
<el-input v-model="queryParams.params.useOrgName" placeholder="" clearable />
</el-form-item>
<el-form-item label="申请部门">
<el-input v-model="queryParams.params.createDeptName" placeholder="" clearable />
</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.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>
<el-date-picker v-model="queryParams.params.createEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item>
<el-form-item label="办结日期">
<el-date-picker v-model="queryParams.params.finishStartTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
<el-date-picker v-model="queryParams.params.finishEndTime" type="date" placeholder="选择日期"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;">
</el-date-picker>
</el-form-item>
<el-form-item label="处理原因">
<el-select v-model="queryParams.params.handleReasonKey" placeholder="请选择">
<el-option v-for="(item,i) in handleReasonList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="处理方式">
<el-select v-model="queryParams.params.handleModeKey" placeholder="请选择">
<el-option v-for="(item,i) in billStateList" :key="i" :label="item.name" :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>
@ -70,14 +76,16 @@
</template>
</el-table-column>
<el-table-column prop="nodeState" label="流程状态" align="center" />
<el-table-column prop="billNo" label="单据编号 "width="180" align="center" />
<el-table-column prop="billNo" label="单据编号 " width="180" align="center" />
<el-table-column prop="useOrgName" label="分公司" align="center" />
<el-table-column prop="deptName" label="申请部门" align="center" />
<el-table-column prop="createByName" label="申请人" align="center" />
<el-table-column prop="createTime" label="申请日期" align="center" />
<el-table-column prop="finishTime" label="办结日期" align="center" />
<el-table-column prop="handleModeValue" label="处理方式" width="180"align="center" />
<el-table-column prop="handleReasonValue" label="处理原因" width="180"align="center" />
<el-table-column prop="handleReasonValue" label="处理原因" width="180" align="center" />
<el-table-column prop="handleModeValue" label="处理方式" width="180" align="center" />
<el-table-column prop="totalRevenue" label="收益总额" width="180" align="center" />
</el-table>
</div>
<!-- End 项目列表 -->
@ -113,12 +121,6 @@
},
data() {
return {
dialogVisible: false,
formobj: {
sid: "",
reviewStatus: "",
remarks: ''
},
btndisabled: false,
viewState: 1, // 1 2 3 4
isSearchShow: false,
@ -153,11 +155,33 @@
size: 10,
total: 0,
params: {
name: ''
"useOrgName": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
"createEndTime": "",
"finishStartTime": "",
"finishEndTime": "",
"handleReasonKey": "",
"handleModeKey": "",
"userSid": "",
"orgPath": "",
"menuUrl": "",
"menuSid": ""
}
},
sids: [],
selectionList: [],
handleReasonList: [{
name: '处理原因1',
sid: "1"
},
{
name: '处理原因2',
sid: "2"
}
],
billStateList: [{
name: '处理方式1',
sid: "1"
@ -248,24 +272,37 @@
size: 10,
total: 0,
params: {
name: ''
"useOrgName": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
"createEndTime": "",
"finishStartTime": "",
"finishEndTime": "",
"handleReasonKey": "",
"handleModeKey": "",
"userSid": "",
"orgPath": "",
"menuUrl": "",
"menuSid": ""
}
}
this.loadList()
},
doDel() {
for (var i = 0; i < this.selectionList.length; i++) {
for (var i = 0; i < this.selectionList.length; i++) {
if(this.selectionList[i].nodeState!='待提交'){
this.$message({
type: 'warning',
message: '请勿勾选已提交的。',
showClose: true
})
return
}
if (this.selectionList[i].nodeState != '待提交') {
this.$message({
type: 'warning',
message: '请勿勾选已提交的。',
showClose: true
})
return
}
}
if (this.sids.length > 0) {
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'

145
yxt-as-ui/src/views/storage/oldPartsCope/oldPartsCopeAdd.vue

@ -48,24 +48,28 @@
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 处理原因</div>
<el-form-item prop="handleReasonValue">
<el-select v-model="formobj.handleReasonValue" placeholder="请选择" class="addinputw addinputInfo" @change="selectHandleReason">
<el-option v-for="(item,i) in handleReasonList" :key="i" :label="item.name" :value="item.sid"
>
<el-select v-model="formobj.handleReasonValue" placeholder="请选择" class="addinputw addinputInfo"
@change="selectHandleReason">
<el-option v-for="(item,i) in handleReasonList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<div class="span-sty"><span class="must">*</span> 处理方式</div>
<el-form-item prop="handleModeValue">
<el-select v-model="formobj.handleModeValue" placeholder="请选择" class="addinputw addinputInfo" @change="selectHandleMode">
<el-option v-for="(item,i) in handleModeList" :key="i" :label="item.name" :value="item.sid"
>
<el-select v-model="formobj.handleModeValue" placeholder="请选择" class="addinputw addinputInfo"
@change="selectHandleMode">
<el-option v-for="(item,i) in handleModeList" :key="i" :label="item.name" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收益总额</div>
<el-form-item><span class="addinputInfo">{{ totalQuantity }}</span></el-form-item>
</el-col>
</el-row>
@ -145,25 +149,30 @@
<el-table-column label="数量" align="center" width="180">
<template slot-scope="scope">
<el-input ref="focusAssumptionInput" v-model="scope.row.count" clearable placeholder=""
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
@input="commodityComputeYHAndXSJE(scope.row)" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" />
</template>
</el-table-column>
<el-table-column prop="profit" label="收益金额" align="center" />
</el-table>
</el-form>
</div>
<el-dialog title="选择旧件商品" :visible.sync="dialogVisible" :before-close="handleClose">
<el-dialog title="选择旧件商品" :visible.sync="dialogVisible" :before-close="handleClose"
style="width:150%;margin-left: -20%;">
<el-form :inline="true" class="tab-header" style="margin-top: -30px;">
<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.goodsName" placeholder="" clearable />
</el-form-item>
<el-form-item label="商品编码">
<el-input v-model="queryParams.params.goodsSkuCode" placeholder="" clearable />
</el-form-item>
<el-form-item label="仓库">
<!-- <el-form-item label="仓库">
<el-input v-model="queryParams.params.warehouseName" placeholder="" clearable />
</el-form-item>
<el-form-item label="库位">
@ -171,6 +180,9 @@
</el-form-item>
<el-form-item label="供应商">
<el-input v-model="queryParams.params.supplierName" placeholder="" clearable />
</el-form-item> -->
<el-form-item label="厂家">
<el-input v-model="queryParams.params.manufactor" placeholder="" clearable />
</el-form-item>
</el-form>
@ -183,15 +195,19 @@
@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 prop="goodsID" label="商品ID" width="150" align="center" />
<el-table-column prop="goodsSpuName" label="商品名称" width="120" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" width="100" align="center" />
<el-table-column prop="goodsSkuOwnSpec" label="规格" width="100" align="center" />
<el-table-column prop="unit" label="单位" width="100" align="center" />
<el-table-column prop="warehouseName" label="仓库" width="150" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" width="120" align="center" />
<el-table-column prop="supplierName" label="供应商" width="120" align="center" />
<el-table-column prop="count" label="库存数量" width="100" align="center" />
<el-table-column prop="goodsID" label="商品ID" align="center" />
<el-table-column 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="manufactor" label="厂家" align="center" />
<el-table-column prop="vinNo" label="车架号" align="center" />
<el-table-column prop="sourceBillNo" label="维修单号" align="center" />
<!-- <el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="supplierName" label="供应商" align="center" /> -->
<el-table-column prop="price" label="单价" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
</el-table>
<div class="pages">
<div class="tit" />
@ -237,10 +253,10 @@
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
@ -252,6 +268,7 @@
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": [
]
@ -330,21 +347,36 @@
}
}
},
computed: {
//
totalQuantity() {
let quantity = 0
if (this.formobj.asOldparthandleList.length > 0) {
this.formobj.asOldparthandleList.forEach((e) => {
quantity += Number(e.profit)
})
}
this.formobj.totalProfit = quantity
return quantity
},
},
created() {
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
getOrgSidByPath({
orgPath: window.sessionStorage.getItem('defaultOrgPath')
}).then((res) => {
if (res.success) {
this.formobj.createOrgSid = res.data
this.formobj.useOrgSid = res.data
}
})
},
methods: {
selectHandleReason(val) {
console.log('>>>>>>>>>selectHandleReason', val)
console.log('>>>>>>>>>selectHandleReason', val)
const choose = this.handleReasonList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectHandleReason', choose)
this.formobj.handleReasonValue = choose[0].name
@ -513,28 +545,29 @@
if (isreload === 'true') this.$emit('reloadlist')
this.imgList = []
this.formobj = {
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"asOldparthandleList": [
]
"sid": "",
"remarks": "",
"createBySid": window.sessionStorage.getItem('userSid'),
"createByName": window.sessionStorage.getItem('name'),
"deptSid": window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage
.getItem('defaultOrgPath').lastIndexOf('/') + 1),
"deptName": window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
"createTime": "",
"billNo": "",
"filePaths": [],
"useOrgSid": '',
"useOrgName": '',
"procDefId": "",
"nodeId": "",
"procInstId": "",
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": [
]
}
this.submitdisabled = false
this.isUpdata = false
@ -585,7 +618,11 @@
}
},
commodityComputeYHAndXSJE(row) {
row.profit = (Number(row.count) * Number(row.price)).toFixed(2)
}
}
}
</script>

22
yxt-as-ui/src/views/storage/oldPartsCope/oldPartsCopeInfo.vue

@ -44,11 +44,14 @@
<div class="span-sty">处理原因</div>
<el-form-item><span class="addinputInfo">{{ formobj.handleReasonValue }}</span></el-form-item>
</el-col>
<el-col :span="16">
<el-col :span="8">
<div class="span-sty">处理方式</div>
<el-form-item><span class="addinputInfo">{{ formobj.handleModeValue }}</span></el-form-item>
</el-col>
<el-col :span="8">
<div class="span-sty">收益总额</div>
<el-form-item><span class="addinputInfo">{{ formobj.totalProfit }}</span></el-form-item>
</el-col>
</el-row>
@ -83,12 +86,17 @@
<el-table-column prop="goodsSkuId" label="商品ID" align="center" />
<el-table-column prop="goodsSkuName" label="商品名称" align="center" />
<el-table-column prop="goodsSkuCode" label="商品编码" align="center" />
<el-table-column prop="supplierName" label="供应商" align="center" />
<!-- <el-table-column prop="supplierName" 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="仓库" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="count" label="数量" align="center" />
<el-table-column prop="manufactor" label="厂家" align="center" />
<el-table-column prop="vinNo" label="车架号" align="center" />
<el-table-column prop="sourceBillNo" label="维修单号" align="center" />
<!-- <el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="warehouseRackCode" label="库位" align="center" />
<el-table-column prop="supplierName" label="供应商" align="center" /> -->
<el-table-column prop="price" label="单价" align="center" />
<el-table-column prop="count" label="库存数量" align="center" />
</el-table>
</el-form>
@ -125,6 +133,7 @@
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": [
]
@ -177,6 +186,7 @@
"nodeState": "",
"taskId": "",
"finishTime": "",
"totalProfit": "",
"asOldparthandleList": []
}
this.$emit('doback')

866
yxt-as-ui/src/views/storage/oldpPartStocktaking/index.vue

@ -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>

445
yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingAdd.vue

@ -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>

367
yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingEditReport.vue

@ -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>

374
yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingInfo.vue

@ -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>

271
yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingRackCodeDetail.vue

@ -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>

355
yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingRackCodeList.vue

@ -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>

239
yxt-as-ui/src/views/storage/oldpPartStocktaking/oldpPartStocktakingReportDetail.vue

@ -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>

131
yxt-as-ui/src/views/storage/stocktaking/index.vue

@ -128,8 +128,8 @@
<el-row class="first_row">
<el-col :span="12">
<div class="span-sty"><span class="must">*</span> 盘点类型</div>
<el-form-item prop="stocktakType">
<el-select v-model="formobj.stocktakType" placeholder="请选择" class="addinputInfo addinputw"
<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>
@ -175,7 +175,7 @@
</el-table-column>
<el-table-column prop="warehouseName" label="仓库" align="center" />
<el-table-column prop="locationName" label="库区" align="center" />
<el-table-column prop="rackName" label="库位" align="center" />
<el-table-column prop="rackCode" label="库位" align="center" />
</el-table>
</el-form>
@ -203,9 +203,9 @@
</el-select>
</el-form-item>
<el-form-item label="库位">
<el-select v-model="dialogParams.params.warehouseRackName" placeholder="请选择库位" style="width: 200px;"
<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.rackName" :value="item.sid">
<el-option v-for="item in warehouseRackList" :key="item.sid" :label="item.rackCode" :value="item.sid">
</el-option>
</el-select>
</el-form-item>
@ -223,7 +223,7 @@
<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="rackName" 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" />
@ -355,8 +355,8 @@
deptName: window.sessionStorage.getItem('defaultOrgPathName').substring(window
.sessionStorage.getItem('defaultOrgPathName').lastIndexOf('/') + 1),
createDate: getCurrentDate(),
stocktakTypName: '',
stocktakTypSid: '',
checkTypeValue: '',
checkTypeKey: '',
superviseName: '',
superviseSid: '',
remarks: "",
@ -364,7 +364,7 @@
},
financeList: [],
rules: {
stocktakTypName: [{
checkTypeValue: [{
required: true,
message: '请选择盘点类型',
trigger: 'change'
@ -385,7 +385,7 @@
"warehouseAreaSid": "",
"warehouseAreaName": "",
"warehouseRackSid": "",
"warehouseRackName": "",
"warehouseRackCode": "",
}
},
warehouseList: [],
@ -439,7 +439,7 @@
getAllTypeByAreaSid(sid) {
this.dialogParams.params.warehouseRackSid = ''
this.dialogParams.params.warehouseRackName = ''
this.dialogParams.params.warehouseRackCode = ''
var params = {
areaSid: sid
@ -475,7 +475,7 @@
const choose = this.warehouseRackList.filter((item) => item.sid == val)
console.log('>>>>>>>>>selectWarehouseRackChange', choose)
this.dialogParams.params.warehouseRackSid = choose[0].sid
this.dialogParams.params.warehouseRackName = choose[0].rackName
this.dialogParams.params.warehouseRackCode = choose[0].rackCode
},
@ -495,16 +495,18 @@
"warehouseAreaSid": "",
"warehouseAreaName": "",
"warehouseRackSid": "",
"warehouseRackName": "",
"warehouseRackCode": "",
}
}
this.seleRack()
},
seleRack() {
var params = {
orgPath: window.sessionStorage.getItem('defaultOrgPath'),
}
req4.warehouserackListAll(params).then(resp => {
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) {
@ -526,6 +528,7 @@
this.selectionWarehouseRackList = val
},
addRck() {
this.formobj.dataList = []
for (var i = 0; i < this.selectionWarehouseRackList.length; i++) {
var item = this.selectionWarehouseRackList[i]
@ -533,9 +536,36 @@
}
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) {
@ -549,8 +579,8 @@
console.log('>>>>>>>>>selectStocktakTyp', val)
const choose = this.stocktakTypeList.filter((item) => val.includes(item.sid))
console.log('>>>>>>>>>selectStocktakTyp', choose)
this.formobj.stocktakTypName = choose[0].name
this.formobj.stocktakTypSid = choose[0].sid
this.formobj.checkTypeValue = choose[0].name
this.formobj.checkTypeKey = choose[0].sid
},
selectFinance(val) {
@ -574,13 +604,23 @@
},
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) => {
@ -590,12 +630,7 @@
message: '操作成功',
showClose: true
})
this.dialogVisible = false
this.formobj.superviseName = ''
this.formobj.superviseSid = ''
this.formobj.remarks = ""
this.handleClose()
this.loadList()
}
}).catch(() => {})
@ -739,7 +774,6 @@
return
}
if (this.selectionList[0].state == '0') {
this.$message({
type: 'warning',
@ -748,31 +782,46 @@
})
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()
this.$confirm("请确认是否盘点完毕,生成盘点报告后将不能再盘点!", "提示", {
// iconClass: "el-icon-question", //
confirmButtonText: "确认", //
cancelButtonText: "取消", //
showClose: true, //
type: "warning", // success/info/warning/error
}).then(() => {
//
var params = {
sid: this.selectionList[0].sid
}
}).catch(() => {})
req.billCreateReport(params).then((resp) => {
if (resp.success) {
this.$message({
type: 'success',
message: '操作成功',
showClose: true
})
this.loadList()
}
}).catch(() => {})
}).catch(() => {
//
});
},
toEdit(row) {
this.viewState = 3
this.$refs['divedit'].showEdit(row.sid)
this.$refs['divedit'].showEdit(row)
},
toReport(row) {
this.viewState = 4
this.$refs['divreport'].showDetail(row.sid)
this.$refs['divreport'].showDetail(row)
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)

61
yxt-as-ui/src/views/storage/stocktaking/stocktakingEditReport.vue

@ -154,6 +154,9 @@
import {
getOrgSidByPath,
} from '@/api/Common/dictcommons'
import {
getStorage
} from '@/utils/auth'
export default {
data() {
return {
@ -209,7 +212,9 @@
showEdit(row) {
req.init(row.sid).then((res) => {
req.init({
sid: row.sid
}).then((res) => {
if (res.success) {
this.formobj = res.data
@ -227,7 +232,13 @@
saveOrUpdate() {
this.submitdisabled = true
req.saveReport(this.formobj).then((res) => {
var info = {
sid: this.formobj.sid,
remarks: this.formobj.remarks
}
req.saveReport(info).then((res) => {
if (res.success) {
this.$message({
showClose: true,
@ -274,20 +285,34 @@
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)
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()
})
@ -301,7 +326,9 @@
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.downloadExcel().then((resp) => {
req.downloadExcel({
sid: this.formobj.sid
}).then((resp) => {
loading.close()
const blob = new Blob([resp], {
type: 'application/vnd.ms-excel'

88
yxt-as-ui/src/views/storage/stocktaking/stocktakingReportDetail.vue

@ -4,7 +4,7 @@
<div class="tab-header webtop">
<div>盘库报告</div>
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="settle()">下载pdf</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>
@ -43,7 +43,7 @@
<div class="title titleOne">
<div>总体盘点情况</div>
<el-button type="primary" size="mini" class="btntopblueline" @click="seleMaintenance()">明细下载</el-button>
<el-button type="primary" size="mini" class="btntopblueline" @click="downLoadDetail()">明细下载</el-button>
</div>
<div style="display: flex;flex-direction: row;align-items: center;
@ -108,7 +108,7 @@
<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="70" 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" />
@ -126,7 +126,7 @@
<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="70" 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" />
@ -145,6 +145,9 @@
<script>
import req from '@/api/storage/stocktaking.js'
import {
getStorage
} from '@/utils/auth'
export default {
data() {
return {
@ -160,8 +163,10 @@
},
methods: {
showDetail(sid) {
req.init(sid).then((res) => {
showDetail(row) {
req.init({
sid: row.sid
}).then((res) => {
if (res.success) {
this.formobj = res.data
@ -174,6 +179,77 @@
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(() => {
console.log(22222222);
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()
})
}
}
}

8
yxt-as-ui/src/views/storage/stocktakingSurplus/index.vue

@ -10,7 +10,7 @@
<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-input v-model="queryParams.params.deptName" placeholder="" clearable />
</el-form-item>
<el-form-item label="申请人">
<el-input v-model="queryParams.params.createByName" placeholder="" clearable />
@ -139,7 +139,7 @@
size: 10,
total: 0,
params: {
"deptNmae": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
@ -283,7 +283,7 @@
size: 10,
total: 0,
params: {
"deptNmae": "",
"deptName": "",
"createByName": "",
"billNo": "",
"createStartTime": "",
@ -304,7 +304,7 @@
},
toEdit(row) {
this.viewState = 2
this.$refs['divadd'].showEdit(row.sid)
this.$refs['divadd'].showEdit(row)
},
doClose() {

Loading…
Cancel
Save