
24 changed files with 3211 additions and 15 deletions
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 17 KiB |
@ -0,0 +1,84 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
// 仓库区域 接口
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 区域查询
|
||||
|
getAllWarehousezone: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/listAll', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 根据仓库sid查询区域
|
||||
|
getAllWarehousezoneBysid: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/selectAll', |
||||
|
method: 'get', |
||||
|
params: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 修改是否可用状态
|
||||
|
updateIsEnable: function(sid, isEnable) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/updateIsEnable/' + sid + "/" + isEnable |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 新增、保存
|
||||
|
saveWarehousezone: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 初始化
|
||||
|
initWarehousezone: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/initialization/' + data, |
||||
|
method: 'get' |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
// 区域-- 删除
|
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehousezone/delBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
// 库存调整 接口文档
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 添加商品 查询分页列表
|
||||
|
selInventoryByWareSid: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehouseinventory/selInventoryByWareSid', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 保存调整单
|
||||
|
saveOrUpdate: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
// 初始化调整单
|
||||
|
init: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/initialization/' + data, |
||||
|
method: 'get', |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 批量删除
|
||||
|
deleteBySids: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/delBySids', |
||||
|
method: 'DELETE', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 下载模板
|
||||
|
downloadExcel: function() { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/download', |
||||
|
method: 'post', |
||||
|
responseType: 'blob', // 表明返回服务器返回的数据类型
|
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
// 库存差异量调整 接口文档
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/listPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 商品库位库存列表
|
||||
|
selInventoryByWareSid: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehouseinventory/selInventoryByWareSid', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 保存调整单
|
||||
|
saveOrUpdate: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/inventoryadjustment/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
// 区域预警 接口文档
|
||||
|
export default { |
||||
|
|
||||
|
// 查询分页列表
|
||||
|
listPage: function(params) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehouseinventory/areaWarningListPage', |
||||
|
method: 'post', |
||||
|
data: params, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 保存预警上下限
|
||||
|
updateLimit: function(data) { |
||||
|
return request({ |
||||
|
url: '/wms/apiadmin/warehouseareawarning/saveOrUpdate', |
||||
|
method: 'post', |
||||
|
data: data, |
||||
|
headers: { |
||||
|
'Content-Type': 'application/json' |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 39 KiB |
@ -0,0 +1,337 @@ |
|||||
|
<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.name" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="区域编码"> |
||||
|
<el-input v-model="queryParams.params.code" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="所属仓库"> |
||||
|
<el-select v-model="queryParams.params.warehouseSid" placeholder="所属仓库"> |
||||
|
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" |
||||
|
:value="item.sid" /> |
||||
|
</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%" |
||||
|
@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 label="操作" align="center" width="100"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">详情</el-button> |
||||
|
</template> |
||||
|
</el-table-column> --> |
||||
|
<el-table-column label="是否可用" align="center" width="140"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-switch v-model="scope.row.isEnable" active-text="是" inactive-text="否" active-value="1" |
||||
|
inactive-value="0" @change="enableChange(scope.row.sid,scope.row.isEnable)" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="zoneName" label="区域名称" align="center" /> |
||||
|
<el-table-column prop="zoneCode" label="区域编码" align="center" /> |
||||
|
<el-table-column prop="volume" label="区域面积" align="center" /> |
||||
|
<el-table-column prop="unit" label="计量单位" align="center" /> |
||||
|
<el-table-column prop="remarks" label="备注" align="center" /> |
||||
|
<el-table-column prop="warehouseName" label="所属仓库" align="center" /> |
||||
|
</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> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
<!-- <divInfo v-show="viewState == 4" ref="divinfo" @doback="resetState" @reloadlist="loadList" /> --> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/baseinfo/warehouseZone/warehouseZone.js' |
||||
|
import req2 from '@/api/baseinfo/warehouse/warehouse.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './warehouseZoneAdd.vue' |
||||
|
// import divInfo from './warehouseInfo.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd, |
||||
|
// divInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
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: 'plus', |
||||
|
btnKey: 'toEdit', |
||||
|
btnLabel: '编辑' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
queryParams: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '', |
||||
|
code: "", |
||||
|
address: "" |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [], |
||||
|
warehouseList: [], |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
this.getwarehouse() |
||||
|
}, |
||||
|
methods: { |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
|
||||
|
const aa = [] |
||||
|
val.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
getwarehouse() { |
||||
|
var parpams = { |
||||
|
orgPath: window.sessionStorage.getItem('orgSid'), |
||||
|
} |
||||
|
req2.getAllWarehouse(parpams).then(resp => { |
||||
|
console.log('>>>>>>>>>getAllWarehouse', resp) |
||||
|
this.warehouseList = resp.data |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
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('orgSidPath') |
||||
|
this.queryParams.params.menuUrl = this.$route.path |
||||
|
req.listPage(this.queryParams).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.queryParams.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.queryParams.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.queryParams.current - 1) * this.queryParams.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
dosearch() { |
||||
|
this.queryParams.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.queryParams = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
name: '', |
||||
|
code: "", |
||||
|
address: "" |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
|
||||
|
toEdit() { |
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 4 |
||||
|
this.$refs['divinfo'].showEdit(row) |
||||
|
}, |
||||
|
|
||||
|
doDel() { |
||||
|
|
||||
|
if (this.sids.length > 0) { |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteBySids(this.sids).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
message: '请至少选择一条记录进行删除操作' |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
enableChange(sid, state) { |
||||
|
console.log('sid', sid) |
||||
|
console.log('state', state) |
||||
|
req.updateIsEnable(sid, state).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '状态已更新', |
||||
|
showClose: true |
||||
|
}) |
||||
|
} else { // 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
console.log(e) |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,274 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
|
||||
|
<div class="tab-header webtop"> |
||||
|
<!-- 标题 --> |
||||
|
<div>{{title}}仓区域域</div> |
||||
|
<!-- start 添加修改按钮 --> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate">保存</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
<!-- end 添加修改按钮 --> |
||||
|
<!-- end 详情按钮 --> |
||||
|
</div> |
||||
|
|
||||
|
<div class="listconadd"> |
||||
|
|
||||
|
<el-card class="box-card"> |
||||
|
<div class="item"> |
||||
|
<span class="item_text"><span class="must">*</span> 所属仓库:</span> |
||||
|
<el-select v-model="formobj.warehouseName" placeholder="请选择所属仓库" class="item_input" |
||||
|
@change="selectWarehouseChange"> |
||||
|
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" :value="item.sid" /> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text"><span class="must">*</span> 区域名称:</span> |
||||
|
<el-input v-model="formobj.zoneName" placeholder="区域名称" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text"><span class="must">*</span> 区域编码:</span> |
||||
|
<el-input v-model="formobj.zoneCode" placeholder="区域编码" class="item_input" clearable |
||||
|
oninput="value=value.replace(/[^A-Za-z0-9]/g, '')" /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">区域容量:</span> |
||||
|
<el-input v-model="formobj.volume" placeholder="区域容量" class="item_input" clearable |
||||
|
oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">计量单位:</span> |
||||
|
<el-input v-model="formobj.unit" placeholder="计量单位" class="item_input" clearable /> |
||||
|
</div> |
||||
|
<div class="item"> |
||||
|
<span class="item_text">备注:</span> |
||||
|
<el-input v-model="formobj.remarks" placeholder="备注" class="item_input" clearable /> |
||||
|
</div> |
||||
|
|
||||
|
</el-card> |
||||
|
|
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/baseinfo/warehouseZone/warehouseZone.js' |
||||
|
import req2 from '@/api/baseinfo/warehouse/warehouse.js' |
||||
|
export default { |
||||
|
components: {}, |
||||
|
data() { |
||||
|
return { |
||||
|
title: "【新增】", |
||||
|
submitdisabled: false, |
||||
|
formobj: { |
||||
|
sid: '', |
||||
|
zoneName: '', |
||||
|
zoneCode: '', |
||||
|
volume: '', |
||||
|
unit: '', |
||||
|
remarks: '', |
||||
|
warehouseName: '', |
||||
|
warehouseSid: '', |
||||
|
orgPath: window.sessionStorage.getItem('orgSidPath'), |
||||
|
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
||||
|
userSid: window.sessionStorage.getItem('userSid'), |
||||
|
createOrgSid: window.sessionStorage.getItem('orgSid'), |
||||
|
}, |
||||
|
warehouseList: [], |
||||
|
rules: { |
||||
|
warehouseName: [{ |
||||
|
required: true, |
||||
|
message: '请选择所属仓库', |
||||
|
trigger: 'change' |
||||
|
}], |
||||
|
|
||||
|
zoneName: [{ |
||||
|
required: true, |
||||
|
message: '区域名称不能为空', |
||||
|
trigger: 'blur' |
||||
|
}], |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
this.initData() |
||||
|
}, |
||||
|
methods: { |
||||
|
initData() { |
||||
|
var parpams = { |
||||
|
orgPath: window.sessionStorage.getItem('orgSid'), |
||||
|
} |
||||
|
req2.getAllWarehouse(parpams).then(resp => { |
||||
|
this.warehouseList = resp.data |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
saveOrUpdate() { |
||||
|
console.log('>>>>>>>>>saveOrUpdate', this.formobj) |
||||
|
|
||||
|
if (this.formobj.warehouseName == '' || this.formobj.warehouseSid == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'warning', |
||||
|
message: '所属仓库不能为空' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (this.formobj.zoneName == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'warning', |
||||
|
message: '区域名称不能为空' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (this.formobj.zoneCode == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'warning', |
||||
|
message: '区域编码不能为空' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
req.saveWarehousezone(this.formobj) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'success', |
||||
|
message: resp.msg |
||||
|
}) |
||||
|
this.handleReturn('true') |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}) |
||||
|
.catch(() => {}) |
||||
|
|
||||
|
}, |
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
sid: '', |
||||
|
zoneName: '', |
||||
|
zoneCode: '', |
||||
|
volume: '', |
||||
|
unit: '', |
||||
|
remarks: '', |
||||
|
warehouseName: '', |
||||
|
warehouseSid: '', |
||||
|
orgPath: window.sessionStorage.getItem('orgSidPath'), |
||||
|
useOrgSid: window.sessionStorage.getItem('defaultDeptSid'), |
||||
|
userSid: window.sessionStorage.getItem('userSid'), |
||||
|
createOrgSid: window.sessionStorage.getItem('orgSid'), |
||||
|
|
||||
|
} |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.title = "【新增】" |
||||
|
|
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.title = "【编辑】", |
||||
|
|
||||
|
req.initWarehousezone(row.sid) |
||||
|
.then(resp => { |
||||
|
if (resp.success) { |
||||
|
this.formobj = resp.data |
||||
|
} |
||||
|
}) |
||||
|
.catch(e => { |
||||
|
this.formobj = row |
||||
|
}) |
||||
|
}, |
||||
|
selectWarehouseChange(val) { |
||||
|
const choose = this.warehouseList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectWarehouseChange', choose) |
||||
|
this.formobj.warehouseSid = choose[0].sid |
||||
|
this.formobj.warehouseName = choose[0].warehouseName |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="scss" scoped> |
||||
|
// 隐藏上传组件 |
||||
|
|
||||
|
::v-deep .hide { |
||||
|
.el-upload--picture-card { |
||||
|
display: none !important; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.box-card { |
||||
|
margin-left: 60px; |
||||
|
margin-right: 60px; |
||||
|
min-width: 70%; |
||||
|
margin-top: 20px; |
||||
|
|
||||
|
.item { |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
align-items: center; |
||||
|
margin-top: 15px; |
||||
|
height: 40px; |
||||
|
line-height: 40px; |
||||
|
|
||||
|
.item_text { |
||||
|
flex: 0.8; |
||||
|
font-size: 18px; |
||||
|
text-align: right; |
||||
|
|
||||
|
.must { |
||||
|
color: #f00; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.item_input { |
||||
|
flex: 4; |
||||
|
font-size: 16px; |
||||
|
margin-left: 10px; |
||||
|
margin-right: 80px; |
||||
|
} |
||||
|
|
||||
|
.item_left_input { |
||||
|
width: 20%; |
||||
|
} |
||||
|
|
||||
|
.item_left_text { |
||||
|
height: 30px; |
||||
|
margin-left: 20px; |
||||
|
line-height: 30px; |
||||
|
color: #018AD2; |
||||
|
padding: 0px 15px; |
||||
|
border: 1.5px solid #018AD2; |
||||
|
border-radius: 5px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.item_right { |
||||
|
flex: 1; |
||||
|
justify-items: center; |
||||
|
|
||||
|
.item_right_list_text { |
||||
|
font-size: 16px; |
||||
|
} |
||||
|
|
||||
|
.item_right_list_delect { |
||||
|
color: #5E94FF; |
||||
|
margin-left: 20px; |
||||
|
font-size: 16px; |
||||
|
text-decoration: underline; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
</style> |
@ -0,0 +1,361 @@ |
|||||
|
<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-date-picker v-model="listQuery.params.createDateStart" @change="selectTime1" |
||||
|
type="date" placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" |
||||
|
style="width: 200px;"> |
||||
|
</el-date-picker> 至 |
||||
|
<el-date-picker v-model="listQuery.params.createDateEnd" @change="selectTime2" |
||||
|
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-input v-model="listQuery.params.spec" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商品"> |
||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" |
||||
|
style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" |
||||
|
:value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="调整类型"> |
||||
|
<el-select v-model="listQuery.params.typeSid" placeholder="请选择" style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in typeList" :key="i" :label="item.name" |
||||
|
:value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="操作员"> |
||||
|
<el-input v-model="listQuery.params.spec" 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 prop="createTime" label="操作日期" align="center" /> |
||||
|
<el-table-column prop="type" label="调整类型" align="center" /> |
||||
|
<el-table-column prop="state" label="调整状态" align="center" /> |
||||
|
<el-table-column prop="billNo" label="单据编号" align="center" /> |
||||
|
<el-table-column prop="warehouseName" label="仓库" align="center" /> |
||||
|
<el-table-column prop="operator" label="操作员" align="center" /> |
||||
|
<el-table-column prop="remarks" label="备注" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventoryAdjust/inventoryAdjust.js' |
||||
|
import req2 from '@/api/goods/goods.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './inventoryAdjustAdd.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
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: 'toEdit', |
||||
|
btnLabel: '编辑' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'danger', |
||||
|
size: 'small', |
||||
|
icon: 'del', |
||||
|
btnKey: 'doDel', |
||||
|
btnLabel: '删除' |
||||
|
}, { |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [], |
||||
|
goodsList: [], |
||||
|
typeList: [{ |
||||
|
sid: "1", |
||||
|
name: "数量调整" |
||||
|
}], |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
this.init() |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
var query = { |
||||
|
orgPath: window.sessionStorage.getItem('orgSidPath') |
||||
|
} |
||||
|
req2.getGoodsListAllByOrg(query).then((res) => { |
||||
|
this.goodsList = res.data |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
||||
|
this.listQuery.params.menuUrl = this.$route.path |
||||
|
req.listPage(this.listQuery).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.listQuery.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
selectTime1() { |
||||
|
|
||||
|
}, |
||||
|
selectTime2() { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
dosearch() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
this.viewState = 2 |
||||
|
this.$refs['divadd'].showAdd() |
||||
|
}, |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
|
||||
|
}, |
||||
|
toEdit() { |
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
// if (this.selectionList[0].checkState != 1) { |
||||
|
// this.$message({ |
||||
|
// type: 'warning', |
||||
|
// message: "此记录已完成,不可重复编辑。", |
||||
|
// showClose: true |
||||
|
// }) |
||||
|
// return |
||||
|
// } |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
toBuild() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
req.exportExcel(this.listQuery.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '出入库明细_' + this.listQuery.params.createDateStart + '.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() |
||||
|
}) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
doDel() { |
||||
|
if (this.sids.length > 0) { |
||||
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteBySids(this.sids).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
} else { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
message: '请至少选择一条记录进行删除操作' |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,452 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<div v-show="viewState == 1"> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>{{ viewTitle }}</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="downLoadFile()">库存差异量导入</el-button> |
||||
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</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"> |
||||
|
<el-row class="first_row"> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">操作员</div> |
||||
|
<el-form-item> <span class="addinputw addinputInfo">{{formobj.operator}}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">操作日期</div> |
||||
|
<el-form-item> <span class="addinputw addinputInfo">{{formobj.createTime}}</span></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty"><span class="must">*</span> 所属仓库</div> |
||||
|
<el-form-item prop="warehouseName"> |
||||
|
<el-select v-model="formobj.warehouseName" placeholder="请选择所属仓库" class="addinputw addinputInfo" |
||||
|
@change="selectWarehouseChange"> |
||||
|
<el-option v-for="item in warehouseList" :key="item.sid" :label="item.warehouseName" |
||||
|
:value="item.sid" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty"><span class="must">*</span> 调整类型</div> |
||||
|
<el-form-item prop="type"><el-select v-model="formobj.type" placeholder="请选择调整类型" |
||||
|
class="addinputw addinputInfo" @change="selectAdjustTypeChange"> |
||||
|
<el-option v-for="item in adjustTypeList" :key="item.sid" :label="item.name" :value="item.sid" /> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="16"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item><el-input v-model="formobj.remarks" class="addinputInfo addinputw" clearable |
||||
|
placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品列表</div> |
||||
|
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd()">新增</el-button> |
||||
|
</div> |
||||
|
|
||||
|
<el-table :key="commodityKey" :data="formobj.list" :index="index" border style="width: 100%;"> |
||||
|
<el-table-column fixed width="60" label="序号" type="index" :index="index + 1" align="center" /> |
||||
|
<el-table-column label="操作" width="80" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toDelete(scope.$index)">删除</el-button> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column prop="goodsSkuTitle" 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 label="调整差异数量" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @keyup.native="scope.row.count = getNumber(scope.row.count, 0)" |
||||
|
v-model="scope.row.count" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="备注" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.remarks" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- 选择商品 --> |
||||
|
<chooseproducts v-show="viewState == 2" ref="divSp" @backData="backData" @doback="resetState" /> |
||||
|
<!-- 导入 --> |
||||
|
<el-dialog :visible.sync="dialogVisible" width="60%" :show-close="false"> |
||||
|
<div style="margin-top: -40px;"> |
||||
|
<el-button size="medium" type="text" style="font-weight: bold" @click="downLoad">下载库存差异量导入明细模板</el-button> |
||||
|
|
||||
|
</div> |
||||
|
<div style="margin-top: 10px;font-weight: bold">导入的EXCEL中的抬头的顺序和名字请保持一致!否则导入数据不正确。</div> |
||||
|
<div style="margin-top: 5px;font-weight: bold">导入之前,请仔细检查数据中不能存在"\这些特殊字符。</div> |
||||
|
<div style="margin-top: 5px;font-weight: bold">只能导入xls或者xlsx文件,如果导入内容较多,请耐心等待响应。</div> |
||||
|
<div style="margin-top: 5px;font-weight: bold;color:#f00">注意:商品编码与条码不能同时为空!!!</div> |
||||
|
<el-card class="box-card" style="margin-top: 10px;"> |
||||
|
<div> |
||||
|
<el-upload ref="upload" class="upload-demo" accept=".xls,.xlsx" name="file" :action="updateAction" |
||||
|
:on-success="handleSuccess" :file-list="fileList" :auto-upload="false" :multiple="false" :limit="1" |
||||
|
:data="uploadData" :headers="headers"> |
||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button> |
||||
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传</el-button> |
||||
|
</el-upload> |
||||
|
</div> |
||||
|
<div> |
||||
|
<h3>文件上传结果</h3> |
||||
|
<el-card class="box-card"> |
||||
|
<div>{{ uploadResultMesssage }}</div> |
||||
|
</el-card> |
||||
|
</div> |
||||
|
</el-card> |
||||
|
<div slot="footer" class="dialog-footer" style="text-align: center"> |
||||
|
<el-button type="primary" size="small" @click="handleConfirm">确定</el-button> |
||||
|
<el-button size="small" @click="dialogVisible = false">取消</el-button> |
||||
|
</div> |
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventoryAdjust/inventoryAdjust.js' |
||||
|
import req2 from '@/api/baseinfo/warehouse/warehouse.js' |
||||
|
import chooseproducts from './relation/chooseproducts' |
||||
|
import { |
||||
|
getCurrentDate |
||||
|
} from '@/utils/index.js' |
||||
|
export default { |
||||
|
components: { |
||||
|
chooseproducts, |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
viewTitle: '', |
||||
|
viewState: 1, |
||||
|
submitdisabled: false, |
||||
|
dialogVisible: false, |
||||
|
activeNames: '1', |
||||
|
index: 0, |
||||
|
formobj: { |
||||
|
"sid": "", |
||||
|
"remarks": "", |
||||
|
"billNo": "", |
||||
|
"createBySid": window.sessionStorage.getItem('userSid'), |
||||
|
"operator": window.sessionStorage.getItem('name'), |
||||
|
"createTime": getCurrentDate(), |
||||
|
"createUserSid": window.sessionStorage.getItem('userSid'), |
||||
|
"type": "", |
||||
|
"typeSid": "", |
||||
|
"warehouseName": "", |
||||
|
"warehouseSid": "", |
||||
|
"useOrgSid": window.sessionStorage.getItem('orgSid'), |
||||
|
"createOrgSid": window.sessionStorage.getItem('orgSid'), |
||||
|
"list": [ |
||||
|
|
||||
|
] |
||||
|
}, |
||||
|
commodityKey: 0, |
||||
|
adjustTypeList: [{ |
||||
|
sid: "1", |
||||
|
name: "数量调整" |
||||
|
}], |
||||
|
warehouseList: [], |
||||
|
rules: { |
||||
|
warehouseName: [{ |
||||
|
required: true, |
||||
|
message: '请选择所属仓库', |
||||
|
trigger: 'change' |
||||
|
}], |
||||
|
type: [{ |
||||
|
required: true, |
||||
|
message: '请选择调整类型', |
||||
|
trigger: 'change' |
||||
|
}], |
||||
|
}, |
||||
|
updateAction: process.env.VUE_APP_BASE_API + '/wms/apiadmin/inventoryadjustment/importExcel', |
||||
|
fileList: [], |
||||
|
uploadSuccess: false, |
||||
|
uploadResultMesssage: '', |
||||
|
uploadData: { |
||||
|
sid: '' |
||||
|
}, |
||||
|
headers: { |
||||
|
token: window.sessionStorage.getItem('token') |
||||
|
}, |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
init() { |
||||
|
var parpams = { |
||||
|
orgPath: window.sessionStorage.getItem('orgSidPath'), |
||||
|
} |
||||
|
req2.getAllWarehouse(parpams).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseList = res.data |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
getNumber(val, limit) { |
||||
|
val = val.replace(/[^0-9-]/g, '') // 保留数字 |
||||
|
val = val.replace(/^00/, '0') // 开头不能有两个0 |
||||
|
val = val.replace(/\-{2,}/g, "-"); // -只能保留一个 |
||||
|
val = val.replace(/(\d)\-/g, "$1"); // 数字后面不能接-,不能出现类似-11-2,12-,11-23 |
||||
|
val = val.replace(/(-)0+/g, "$1"); // 不能出现-0,-001,-0001类似 |
||||
|
return val |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.viewTitle = '【新增】调整单' |
||||
|
this.init() |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
this.viewTitle = '【编辑】调整单' |
||||
|
this.init() |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
req.init(row.sid).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.formobj = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
saveOrUpdate() { |
||||
|
this.$refs['form_obj'].validate((valid) => { |
||||
|
if (valid) { |
||||
|
this.submitdisabled = true |
||||
|
req.saveOrUpdate(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'), |
||||
|
"operator": window.sessionStorage.getItem('name'), |
||||
|
"createTime": getCurrentDate(), |
||||
|
"createUserSid": window.sessionStorage.getItem('userSid'), |
||||
|
"type": "", |
||||
|
"typeSid": "", |
||||
|
"warehouseName": "", |
||||
|
"warehouseSid": "", |
||||
|
"useOrgSid": window.sessionStorage.getItem('orgSid'), |
||||
|
"createOrgSid": window.sessionStorage.getItem('orgSid'), |
||||
|
"list": [ |
||||
|
|
||||
|
] |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
handleAdd() { |
||||
|
|
||||
|
if (this.formobj.warehouseName == '' || this.formobj.warehouseSid == '') { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'warning', |
||||
|
message: '请先选择所属仓库' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 2 |
||||
|
this.$refs['divSp'].showData([], this.formobj.warehouseSid) |
||||
|
}, |
||||
|
backData(val) { |
||||
|
console.log("backData", val); |
||||
|
this.viewState = 1 |
||||
|
|
||||
|
for (var i = 0; i < val.length; i++) { |
||||
|
var item = { |
||||
|
billNo: this.formobj.billNo, |
||||
|
billSid: this.formobj.sid, |
||||
|
warehouseAreaSid: val[i].warehouseAreaSid, |
||||
|
warehouseAreaName: val[i].warehouseAreaName, |
||||
|
goodsSpuSid: val[i].goodsSpuSid, |
||||
|
goodsSpuName: val[i].goodsSpuName, |
||||
|
goodsSkuSid: val[i].goodsSkuSid, |
||||
|
goodsSkuTitle: val[i].goodsSkuTitle, |
||||
|
barCode: val[i].barCode, |
||||
|
goodsSkuCode: val[i].goodsSkuCode, |
||||
|
goodsSkuOwnSpec: val[i].goodsSkuOwnSpec, |
||||
|
rackSid: val[i].warehouseRackSid, |
||||
|
rackName: val[i].warehouseRackName, |
||||
|
rackCode: val[i].warehouseRackCode, |
||||
|
unit: val[i].unit, |
||||
|
count: 0, |
||||
|
remarks: "", |
||||
|
|
||||
|
} |
||||
|
|
||||
|
this.formobj.list.push(item) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
toDelete(index) { |
||||
|
this.formobj.list.splice(index, 1) |
||||
|
}, |
||||
|
selectWarehouseChange(val) { |
||||
|
console.log("selectWarehouseChange", val); |
||||
|
const choose = this.warehouseList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectWarehouseChange', choose) |
||||
|
this.formobj.warehouseName = choose[0].warehouseName |
||||
|
this.formobj.warehouseSid = choose[0].sid |
||||
|
|
||||
|
}, |
||||
|
selectAdjustTypeChange(val) { |
||||
|
console.log("selectAdjustTypeChange", val); |
||||
|
const choose = this.adjustTypeList.filter((item) => item.sid == val) |
||||
|
console.log('>>>>>>>>>selectAdjustTypeChange', choose) |
||||
|
this.formobj.type = choose[0].name |
||||
|
this.formobj.typeSid = choose[0].sid |
||||
|
}, |
||||
|
downLoadFile() { |
||||
|
this.dialogVisible = true |
||||
|
}, |
||||
|
downLoad() { |
||||
|
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() |
||||
|
}) |
||||
|
}, |
||||
|
submitUpload() { |
||||
|
this.uploadData.sid = this.formobj.warehouseSid |
||||
|
this.$refs.upload.submit() |
||||
|
}, |
||||
|
handleSuccess(resp, file, fileList) { |
||||
|
const _this = this |
||||
|
_this.uploadResultMesssage = resp.msg |
||||
|
_this.uploadSuccess = resp.success |
||||
|
|
||||
|
console.log("handleSuccess", resp.data); |
||||
|
|
||||
|
for (var i = 0; i < resp.data.length; i++) { |
||||
|
var item = { |
||||
|
billNo: this.formobj.billNo, |
||||
|
billSid: this.formobj.sid, |
||||
|
warehouseAreaSid: resp.data[i].warehouseAreaSid, |
||||
|
warehouseAreaName: resp.data[i].warehouseAreaName, |
||||
|
goodsSpuSid: resp.data[i].goodsSpuSid, |
||||
|
goodsSpuName: resp.data[i].goodsSpuName, |
||||
|
goodsSkuSid: resp.data[i].goodsSkuSid, |
||||
|
goodsSkuTitle: resp.data[i].goodsSkuTitle, |
||||
|
barCode: resp.data[i].barCode, |
||||
|
goodsSkuCode: resp.data[i].goodsSkuCode, |
||||
|
goodsSkuOwnSpec: resp.data[i].goodsSkuOwnSpec, |
||||
|
unit: resp.data[i].unit, |
||||
|
rackSid: resp.data[i].rackSid, |
||||
|
rackName: resp.data[i].rackName, |
||||
|
rackCode: resp.data[i].rackCode, |
||||
|
count: 0, |
||||
|
remarks: "" |
||||
|
} |
||||
|
|
||||
|
this.formobj.list.push(item) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
handleConfirm() { |
||||
|
if (!this.uploadSuccess) { |
||||
|
this.$message({ |
||||
|
showClose: true, |
||||
|
type: 'error', |
||||
|
message: '请先上传库存差异量导入明细' |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
this.dialogVisible = false |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
/deep/ .el-form-item__error { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.must { |
||||
|
color: #f00; |
||||
|
} |
||||
|
|
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.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; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,172 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div> |
||||
|
<div class="tab-header webtop"> |
||||
|
<div>选择商品</div> |
||||
|
<div> |
||||
|
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button> |
||||
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class=""> |
||||
|
<div class="searchcon"> |
||||
|
<el-button size="small" class="searchbtn" |
||||
|
@click="clicksearchShow">{{ searchxianshitit }}</el-button> |
||||
|
<div v-show="isSearchShow" class="search"> |
||||
|
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" |
||||
|
class="tab-header"> |
||||
|
<el-form-item label="商品名称" class="searchlist"> |
||||
|
<el-input v-model="listQuery.params.goodsSpuName" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商品编码" class="searchlist"> |
||||
|
<el-input v-model="listQuery.params.goodsSkuCode" placeholder="" clearable /> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
<div class="btn" style="text-align: center;"> |
||||
|
<el-button type="primary" icon="el-icon-search" @click="handleFilter" |
||||
|
size="small">查询</el-button> |
||||
|
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" |
||||
|
size="small">重置</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listtop"> |
||||
|
<div class="tit">商品列表</div> |
||||
|
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>--> |
||||
|
</div> |
||||
|
<div class=""> |
||||
|
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border |
||||
|
style="width: 100%" @selection-change="handleSelectionChange"> |
||||
|
<el-table-column width="50px" type="selection" align="center" /> |
||||
|
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center" /> |
||||
|
<el-table-column prop="goodsSkuTitle" 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="warehouseAreaName" label="库区" align="center" /> |
||||
|
<el-table-column prop="warehouseRackCode" label="库位" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="getList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import req from '@/api/storage/inventoryAdjust/inventoryAdjust.js' |
||||
|
export default { |
||||
|
name: 'SelectVehicle', |
||||
|
components: { |
||||
|
Pagination |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '隐藏查询条件', |
||||
|
tableKey: 0, |
||||
|
sids: [], |
||||
|
list: [], |
||||
|
number: '', |
||||
|
listLoading: false, |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 5, |
||||
|
params: { |
||||
|
menuUrl: this.$route.path, |
||||
|
orgPath: window.sessionStorage.getItem('orgSidPath'), |
||||
|
userSid: window.sessionStorage.getItem('userSid'), |
||||
|
warehouseSid: '', |
||||
|
goodsSkuCode: '', |
||||
|
goodsSpuName: '', |
||||
|
}, |
||||
|
total: 0, |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
// 查询列表信息 |
||||
|
getList() { |
||||
|
this.listLoading = true |
||||
|
req.selInventoryByWareSid(this.listQuery).then((response) => { |
||||
|
this.listLoading = false |
||||
|
if (response.success) { |
||||
|
this.listQuery.total = response.data.total |
||||
|
this.list = response.data.records |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
// 查询按钮 |
||||
|
handleFilter() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 重置按钮 |
||||
|
handleReset() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.listQuery.size = 5 |
||||
|
this.listQuery.total = 0 |
||||
|
this.listQuery.params.goodsSkuCode = '' |
||||
|
this.getList() |
||||
|
}, |
||||
|
handleSelectionChange(row) { |
||||
|
this.sids = row |
||||
|
}, |
||||
|
showData(value, warehouseSid) { |
||||
|
// const aa = [] |
||||
|
// if (value.length > 0) { |
||||
|
// for (var i = 0; i < value.length; i++) { |
||||
|
// aa.push(value[i].saleVehSid) |
||||
|
// } |
||||
|
// this.listQuery.params.saleVehSids = aa |
||||
|
// } else { |
||||
|
// this.listQuery.params.saleVehSids = [] |
||||
|
// }`` |
||||
|
this.listQuery.params.warehouseSid = warehouseSid |
||||
|
this.listQuery.current = 1 |
||||
|
this.listQuery.size = 5 |
||||
|
this.listQuery.total = 0 |
||||
|
this.getList() |
||||
|
}, |
||||
|
// 添加修改返回 |
||||
|
AddUpdateReturn() { |
||||
|
if (this.sids.length > 0) { |
||||
|
this.$emit('backData', this.sids) |
||||
|
} else { |
||||
|
this.$notify({ |
||||
|
title: '提示', |
||||
|
message: '请至少选择一条记录进行操作', |
||||
|
type: 'error', |
||||
|
duration: 2000 |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
// 返回 |
||||
|
handleReturn() { |
||||
|
this.$emit('doback') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,365 @@ |
|||||
|
<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="listQuery.params.goodsSpuSid" placeholder="请选择" |
||||
|
style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" |
||||
|
:value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商品"> |
||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" |
||||
|
style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" |
||||
|
:value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="品牌"> |
||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" |
||||
|
style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" |
||||
|
:value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="差异量"> |
||||
|
<el-input v-model="listQuery.params.spec" placeholder="" clearable |
||||
|
style="width: 100px;" /> |
||||
|
至 |
||||
|
<el-input v-model="listQuery.params.spec" placeholder="" clearable |
||||
|
style="width: 100px;" /> |
||||
|
</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 prop="billNo" label="商品名称" align="center" /> |
||||
|
<el-table-column prop="createDate" label="规格" align="center" /> |
||||
|
<el-table-column prop="createByName" label="编码" align="center" /> |
||||
|
<el-table-column prop="checkStateName" label="条码" align="center" /> |
||||
|
<el-table-column prop="completeDate" label="实际库存" align="center" /> |
||||
|
<el-table-column prop="completeDate" label="库存差异量" align="center" /> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<el-dialog title="库存调整" :visible.sync="dialogVisible" :before-close="handleClose"> |
||||
|
<div class="listtop" style="margin-top: -30px;"> |
||||
|
<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 prop="billNo" label="商品名称" align="center" /> |
||||
|
<el-table-column prop="createDate" label="规格" align="center" /> |
||||
|
<el-table-column prop="createByName" label="编码" align="center" /> |
||||
|
<el-table-column prop="checkStateName" label="条码" align="center" /> |
||||
|
<el-table-column prop="completeDate" label="实际库存" align="center" /> |
||||
|
<el-table-column label="调整差异数量" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" |
||||
|
@keyup.native="scope.row.count = getNumber(scope.row.count, 0)" |
||||
|
v-model="scope.row.count" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
|
||||
|
<div style="display: flex;flex-direction: row;width: 100%;justify-content: center;align-items: center;"> |
||||
|
<el-button type="primary" style="margin-top: 20px;" @click="handleClose">取 消</el-button> |
||||
|
<el-button type="primary" style="margin-top: 20px;" @click="saveData">确 定</el-button> |
||||
|
</div> |
||||
|
|
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventoryDifferential/inventoryDifferential.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 { |
||||
|
btndisabled: false, |
||||
|
dialogVisible: false, |
||||
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
||||
|
isSearchShow: false, |
||||
|
searchxianshitit: '显示查询条件', |
||||
|
tableLoading: false, |
||||
|
dataList: [], |
||||
|
btnList: [{ |
||||
|
type: 'primary', |
||||
|
size: 'small', |
||||
|
icon: 'plus', |
||||
|
btnKey: 'toAdd', |
||||
|
btnLabel: '库存调整' |
||||
|
}, |
||||
|
{ |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
} |
||||
|
], |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [], |
||||
|
warehouseAreaList: [], |
||||
|
goodsList: [], |
||||
|
bankList: [], |
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
getNumber(val, limit) { |
||||
|
val = val.replace(/[^0-9-]/g, '') // 保留数字 |
||||
|
val = val.replace(/^00/, '0') // 开头不能有两个0 |
||||
|
val = val.replace(/\-{2,}/g, "-"); // -只能保留一个 |
||||
|
val = val.replace(/(\d)\-/g, "$1"); // 数字后面不能接-,不能出现类似-11-2,12-,11-23 |
||||
|
val = val.replace(/(-)0+/g, "$1"); // 不能出现-0,-001,-0001类似 |
||||
|
return val |
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doDel': |
||||
|
this.doDel() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
req.listPage(this.listQuery).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.listQuery.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
|
||||
|
dosearch() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"createDateStart": "", |
||||
|
"createDateEnd": "", |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
// this.viewState = 2 |
||||
|
// this.$refs['divadd'].showAdd() |
||||
|
|
||||
|
this.dialogVisible = true |
||||
|
|
||||
|
}, |
||||
|
saveData() { |
||||
|
|
||||
|
}, |
||||
|
handleClose() { |
||||
|
this.dialogVisible = false |
||||
|
}, |
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
|
||||
|
}, |
||||
|
toEdit() { |
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (this.selectionList[0].checkState != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "此记录已完成,不可重复编辑。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
toBuild() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
req.exportExcel(this.listQuery.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '出入库明细_' + this.listQuery.params.createDateStart + '.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() |
||||
|
}) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选品牌?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteGoods(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
</style> |
@ -0,0 +1,580 @@ |
|||||
|
<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="listQuery.params.warehouseAreaSid" placeholder="请选择" style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in warehouseAreaList" :key="i" :label="item.areaName" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="商品"> |
||||
|
<el-select v-model="listQuery.params.goodsSpuSid" placeholder="请选择" style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.title" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="品牌"> |
||||
|
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in bankList" :key="i" :label="item.brandName" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="类别"> |
||||
|
<el-select v-model="listQuery.params.goodsTypeSid" placeholder="请选择" style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in typeList" :key="i" :label="item.goodsTypeName" :value="item.sid"> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="实际库存"> |
||||
|
<el-input v-model="listQuery.params.countStart" placeholder="" clearable style="width: 100px;" /> 至 |
||||
|
<el-input v-model="listQuery.params.countEnd" placeholder="" clearable style="width: 100px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="是否设置预警"> |
||||
|
<el-select v-model="listQuery.params.ifWarning" placeholder="请选择" style="width: 200px;"> |
||||
|
<el-option v-for="(item,i) in stateList" :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> |
||||
|
</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 prop="goodsSpuName" label="商品名称" align="center" /> |
||||
|
<el-table-column prop="goodsSpuCode" label="商品编码" align="center" /> |
||||
|
<el-table-column prop="goodsSkuOwnSpec" label="规格" align="center" /> |
||||
|
<el-table-column prop="barCode" label="条码" align="center" /> |
||||
|
<el-table-column prop="warehouseAreaName" label="库区" align="center" /> |
||||
|
<el-table-column prop="completeDate" label="补货锁定" align="center" /> |
||||
|
<el-table-column prop="createOrgName" label="补货在途" align="center" /> |
||||
|
|
||||
|
<el-table-column label="库位库存" align="center"> |
||||
|
<el-table-column prop="count" label="实际" align="center" /> |
||||
|
<el-table-column prop="useCount" label="可用" align="center" /> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="库区预警" align="center"> |
||||
|
|
||||
|
<el-table-column label="可用上限" align="center" min-width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="" v-model="scope.row.alertUpperLimit" clearable placeholder="" |
||||
|
@change="itemRemarks(scope.row)" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
|
||||
|
<el-table-column label="可用下限" align="center" min-width="200"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="" v-model="scope.row.warningLowerLimit" clearable placeholder="" |
||||
|
@change="itemRemarks(scope.row)" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
</div> |
||||
|
<!-- End 项目列表 --> |
||||
|
<div class="pages"> |
||||
|
<div class="tit" /> |
||||
|
<!-- 翻页 --> |
||||
|
<pagination v-show="dataList.length > 0" :total="listQuery.total" :page.sync="listQuery.current" |
||||
|
:limit.sync="listQuery.size" class="pagination" @pagination="loadList" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- End 查询和其列表部分 --> |
||||
|
<!-- 新增修改部分组件 --> |
||||
|
<divAdd v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="loadList" /> |
||||
|
|
||||
|
|
||||
|
<el-dialog title="批量设置预警" :visible.sync="dialogVisible" :before-close="handleClose"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
|
||||
|
<el-radio-group v-model="formobj.type" size="small" style="margin-top: -40px;" :disabled="true" |
||||
|
@change="selectType"> |
||||
|
<el-radio :label="'1'">固定值</el-radio> |
||||
|
<el-radio :label="'2'">百分比</el-radio> |
||||
|
</el-radio-group> |
||||
|
|
||||
|
<el-row class="first_row"> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty"><span class="must">*</span> 可用上限</div> |
||||
|
<el-form-item prop="alertUpperLimit"><el-input v-model="formobj.alertUpperLimit" |
||||
|
class="addinputInfo addinputw" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="12"> |
||||
|
<div class="span-sty"><span class="must">*</span> 可用下限</div> |
||||
|
<el-form-item prop="warningLowerLimit"><el-input v-model="formobj.warningLowerLimit" |
||||
|
class="addinputInfo addinputw" clearable placeholder="" |
||||
|
oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</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="handleClose">取 消</el-button> |
||||
|
<el-button type="primary" style="margin-top: 20px;" @click="saveData">确 定</el-button> |
||||
|
</div> |
||||
|
|
||||
|
</el-dialog> |
||||
|
|
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventoryWarning/regionalWarning.js' |
||||
|
import req2 from '@/api/baseinfo/warehouseArea/warehouseArea.js' |
||||
|
import req3 from '@/api/goods/goods.js' |
||||
|
import req4 from '@/api/goods/brand.js' |
||||
|
import req5 from '@/api/goods/category.js' |
||||
|
import ButtonBar from '@/components/ButtonBar' |
||||
|
import Pagination from '@/components/pagination' |
||||
|
import pageye from '@/components/pagination/pageye' |
||||
|
import divAdd from './regionalWarningAdd.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
ButtonBar, |
||||
|
Pagination, |
||||
|
pageye, |
||||
|
divAdd |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dialogVisible: 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: 'success', |
||||
|
size: 'small', |
||||
|
icon: 'Import', |
||||
|
btnKey: 'doImport', |
||||
|
btnLabel: '导入' |
||||
|
}, { |
||||
|
type: 'info', |
||||
|
size: 'small', |
||||
|
icon: 'cross', |
||||
|
btnKey: 'doClose', |
||||
|
btnLabel: '关闭' |
||||
|
}], |
||||
|
listQuery: { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"warehouseAreaSid": "", |
||||
|
"goodsSpuSid": "", |
||||
|
"countStart": "", |
||||
|
"countEnd": "", |
||||
|
"goodsTypeSid": "", |
||||
|
"ifWarning": "", |
||||
|
} |
||||
|
}, |
||||
|
sids: [], |
||||
|
selectionList: [], |
||||
|
warehouseAreaList: [], |
||||
|
goodsList: [], |
||||
|
bankList: [], |
||||
|
typeList: [], |
||||
|
stateList: [{ |
||||
|
name: "有", |
||||
|
sid: '1' |
||||
|
}, |
||||
|
{ |
||||
|
name: "无", |
||||
|
sid: '0' |
||||
|
} |
||||
|
], |
||||
|
formobj: { |
||||
|
type: "1", |
||||
|
sids: [], |
||||
|
alertUpperLimit: "", |
||||
|
warningLowerLimit: "" |
||||
|
}, |
||||
|
rules: { |
||||
|
alertUpperLimit: [{ |
||||
|
required: true, |
||||
|
message: '可用上限不能为空', |
||||
|
trigger: 'blur' |
||||
|
}], |
||||
|
warningLowerLimit: [{ |
||||
|
required: true, |
||||
|
message: '可用下限不能为空', |
||||
|
trigger: 'blur' |
||||
|
}], |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
mounted() { |
||||
|
this.$refs['btnbar'].setButtonList(this.btnList) |
||||
|
}, |
||||
|
created() { |
||||
|
this.init() |
||||
|
this.loadList() |
||||
|
}, |
||||
|
methods: { |
||||
|
init() { |
||||
|
|
||||
|
var query = { |
||||
|
orgPath: window.sessionStorage.getItem('orgSidPath') |
||||
|
} |
||||
|
req2.getAllWarehousearea(query).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.warehouseAreaList = res.data |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
req3.getGoodsListAllByOrg(query).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.goodsList = res.data |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
req4.getAllBrand(query).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.bankList = res.data |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
req5.getAllType(query).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.typeList = res.data |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
// 搜索条件效果 |
||||
|
clicksearchShow() { |
||||
|
this.isSearchShow = !this.isSearchShow |
||||
|
if (this.isSearchShow) { |
||||
|
this.searchxianshitit = '隐藏查询条件' |
||||
|
} else { |
||||
|
this.searchxianshitit = '显示查询条件' |
||||
|
} |
||||
|
}, |
||||
|
btnHandle(btnKey) { |
||||
|
switch (btnKey) { |
||||
|
case 'toAdd': |
||||
|
this.toAdd() |
||||
|
break |
||||
|
case 'toEdit': |
||||
|
this.toEdit() |
||||
|
break |
||||
|
case 'doClose': |
||||
|
this.doClose() |
||||
|
break |
||||
|
default: |
||||
|
break |
||||
|
} |
||||
|
}, |
||||
|
loadList() { |
||||
|
this.tableLoading = true |
||||
|
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
||||
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
||||
|
this.listQuery.params.menuUrl = this.$route.path |
||||
|
req.listPage(this.listQuery).then((resp) => { |
||||
|
this.tableLoading = false |
||||
|
if (resp.success) { |
||||
|
const data = resp.data |
||||
|
this.listQuery.total = data.total |
||||
|
this.dataList = data.records |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
this.dataList = [] |
||||
|
this.listQuery.total = 0 |
||||
|
} |
||||
|
}).catch(() => { |
||||
|
this.tableLoading = false |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
// 序号 |
||||
|
indexMethod(index) { |
||||
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
||||
|
var pageindex = index + 1 + pagestart |
||||
|
return pageindex |
||||
|
}, |
||||
|
|
||||
|
dosearch() { |
||||
|
this.listQuery.current = 1 |
||||
|
this.loadList() |
||||
|
}, |
||||
|
resetQuery() { |
||||
|
this.listQuery = { |
||||
|
current: 1, |
||||
|
size: 10, |
||||
|
total: 0, |
||||
|
params: { |
||||
|
"warehouseAreaSid": "", |
||||
|
"goodsSpuSid": "", |
||||
|
"countStart": "", |
||||
|
"countEnd": "", |
||||
|
"goodsTypeSid": "", |
||||
|
"ifWarning": "", |
||||
|
} |
||||
|
} |
||||
|
this.loadList() |
||||
|
}, |
||||
|
toAdd() { |
||||
|
// this.viewState = 2 |
||||
|
// this.$refs['divadd'].showAdd() |
||||
|
if (this.selectionList.length == 0) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请至少选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.dialogVisible = true |
||||
|
|
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
selectType(val) { |
||||
|
|
||||
|
}, |
||||
|
handleClose() { |
||||
|
this.dialogVisible = false |
||||
|
}, |
||||
|
saveData() { |
||||
|
|
||||
|
var infoList = [] |
||||
|
|
||||
|
for (var i = 0; i < this.selectionList.length; i++) { |
||||
|
var item = this.selectionList[i] |
||||
|
|
||||
|
infoList.push({ |
||||
|
warehouseAreaSid: item.warehouseAreaSid, |
||||
|
goodsSpuSid: item.goodsSpuSid, |
||||
|
goodsSpuName: item.goodsSpuName, |
||||
|
goodsSpuCode: item.goodsSpuCode, |
||||
|
alertUpperLimit: this.formobj.alertUpperLimit, |
||||
|
warningLowerLimit: this.formobj.warningLowerLimit, |
||||
|
type: this.formobj.type |
||||
|
}) |
||||
|
} |
||||
|
console.log("val", infoList); |
||||
|
|
||||
|
req.updateLimit(infoList).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.dialogVisible = false |
||||
|
this.loadList() |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
itemRemarks(row) { |
||||
|
console.log("itemRemarks", row); |
||||
|
var infoList = [] |
||||
|
var query = { |
||||
|
warehouseAreaSid: row.warehouseAreaSid, |
||||
|
goodsSpuSid: row.goodsSpuSid, |
||||
|
goodsSpuName: row.goodsSpuName, |
||||
|
goodsSpuCode: row.goodsSpuCode, |
||||
|
alertUpperLimit: row.alertUpperLimit, |
||||
|
warningLowerLimit: row.warningLowerLimit, |
||||
|
type: '1' |
||||
|
} |
||||
|
infoList.push(query) |
||||
|
req.updateLimit(infoList).then((res) => { |
||||
|
if (res.success) { |
||||
|
this.dialogVisible = false |
||||
|
this.loadList() |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
selectionLineChangeHandle(val) { |
||||
|
console.log("val", val); |
||||
|
|
||||
|
this.selectionList = val |
||||
|
const aa = [] |
||||
|
val.forEach(element => { |
||||
|
aa.push(element.sid) |
||||
|
}) |
||||
|
this.sids = aa |
||||
|
}, |
||||
|
toEdit() { |
||||
|
if (this.selectionList.length != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "请选择一条数据。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
if (this.selectionList[0].checkState != 1) { |
||||
|
this.$message({ |
||||
|
type: 'warning', |
||||
|
message: "此记录已完成,不可重复编辑。", |
||||
|
showClose: true |
||||
|
}) |
||||
|
return |
||||
|
} |
||||
|
|
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(this.selectionList[0]) |
||||
|
}, |
||||
|
toBuild() { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
|
||||
|
|
||||
|
req.exportExcel(this.listQuery.params).then((resp) => { |
||||
|
loading.close() |
||||
|
const blob = new Blob([resp], { |
||||
|
type: 'application/vnd.ms-excel' |
||||
|
}) |
||||
|
const fileName = '出入库明细_' + this.listQuery.params.createDateStart + '.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() |
||||
|
}) |
||||
|
}, |
||||
|
doClose() { |
||||
|
this.$store.dispatch('tagsView/delView', this.$route) |
||||
|
this.$router.go(-1) |
||||
|
}, |
||||
|
|
||||
|
toRelevancy(row) { |
||||
|
this.viewState = 3 |
||||
|
this.$refs['divadd'].showEdit(row) |
||||
|
}, |
||||
|
toRelevancyInfo(row) { |
||||
|
const tip = '请确认是否删除所选品牌?' |
||||
|
this.$confirm(tip, '提示', { |
||||
|
confirmButtonText: '确定', |
||||
|
cancelButtonText: '取消', |
||||
|
type: 'warning' |
||||
|
}).then(() => { |
||||
|
const loading = this.$loading({ |
||||
|
lock: true, |
||||
|
text: 'Loading', |
||||
|
spinner: 'el-icon-loading', |
||||
|
background: 'rgba(0, 0, 0, 0.7)' |
||||
|
}) |
||||
|
req.deleteGoods(row.sid).then((resp) => { |
||||
|
loading.close() |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: resp.msg, |
||||
|
showClose: true |
||||
|
}) |
||||
|
this.loadList() |
||||
|
} else { |
||||
|
// 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
loading.close() |
||||
|
}) |
||||
|
}).catch(() => {}) |
||||
|
}, |
||||
|
resetState() { |
||||
|
this.viewState = 1 |
||||
|
}, |
||||
|
enableChange(sid, state) { |
||||
|
console.log('sid', sid) |
||||
|
console.log('state', state) |
||||
|
req.updateIsEnable(sid, state).then((resp) => { |
||||
|
if (resp.success) { |
||||
|
this.$message({ |
||||
|
type: 'success', |
||||
|
message: '状态已更新', |
||||
|
showClose: true |
||||
|
}) |
||||
|
} else { // 根据resp.code进行异常情况处理 |
||||
|
} |
||||
|
}).catch(e => { |
||||
|
console.log(e) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped> |
||||
|
/deep/ .el-form-item__error { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.must { |
||||
|
color: #f00; |
||||
|
} |
||||
|
|
||||
|
.span-sty { |
||||
|
width: 130px !important; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.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; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,271 @@ |
|||||
|
<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="info" size="small" @click="handleReturn()">关闭</el-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="listconadd"> |
||||
|
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02"> |
||||
|
<el-row class="first_row"> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">操作员</div> |
||||
|
<el-form-item prop="supplierName"><el-input v-model="formobj.supplierName" class="addinputInfo addinputw" |
||||
|
clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">操作日期</div> |
||||
|
<el-form-item prop="supplierPY"><el-input v-model="formobj.supplierPY" class="addinputInfo addinputw" |
||||
|
clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">所属仓库</div> |
||||
|
<el-form-item prop="supplierCode"><el-input v-model="formobj.supplierCode" class="addinputInfo addinputw" |
||||
|
clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<el-row> |
||||
|
<el-col :span="8"> |
||||
|
<div class="span-sty">调整类型</div> |
||||
|
<el-form-item prop="supplierName"><el-input v-model="formobj.supplierName" class="addinputInfo addinputw" |
||||
|
clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
<el-col :span="16"> |
||||
|
<div class="span-sty">备注</div> |
||||
|
<el-form-item prop="supplierPY"><el-input v-model="formobj.supplierPY" class="addinputInfo addinputw" |
||||
|
clearable placeholder="" /></el-form-item> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
|
||||
|
<div class="title titleOne"> |
||||
|
<div>商品列表</div> |
||||
|
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAdd">新增</el-button> |
||||
|
</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 label="操作" width="80" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-button type="primary" size="mini" @click="toEdit(scope.row)">删除</el-button> |
||||
|
</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="规格" align="center" /> |
||||
|
<el-table-column prop="unit" label="单位" align="center" /> |
||||
|
<el-table-column label="调整差异数量" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" @input="handleEdit" v-model="scope.row.realCount" clearable |
||||
|
placeholder="" oninput="value=value.replace(/^(0+)|[^\d]+/g,'')" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column label="备注" align="center"> |
||||
|
<template slot-scope="scope"> |
||||
|
<el-input ref="focusAssumptionInput" v-model="scope.row.realCount" clearable placeholder="" /> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
</el-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import req from '@/api/storage/inventoryWarning/regionalWarning.js' |
||||
|
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": window.sessionStorage.getItem('orgSid'), |
||||
|
"createOrgSid": window.sessionStorage.getItem('orgSid'), |
||||
|
"wmsInventoryCheckbillDetailList": [ |
||||
|
|
||||
|
] |
||||
|
}, |
||||
|
rules: {} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
handleEdit(e) { |
||||
|
// 只能输入整数(包括正整数、负整数、0) |
||||
|
let value = e.replace(/[^\-\d]/g, ""); // 只能输入-和数字 |
||||
|
value = value.replace(/\-{2,}/g, "-"); // -只能保留一个 |
||||
|
value = value.replace(/(\d)\-/g, "$1"); // 数字后面不能接-,不能出现类似-11-2,12-,11-23 |
||||
|
value = value.replace(/-(0+)/g, "0"); // 不能出现-0,-001,-0001类似 |
||||
|
value = value.replace(/^0+(\d)/, "$1"); // 第一位0开头,0后面为数字,则过滤掉,取后面的数字 |
||||
|
value = value.replace(/(-?\d{15})\d*/, '$1') // 最多保留15位整数 |
||||
|
// this.height = value |
||||
|
}, |
||||
|
showAdd() { |
||||
|
this.viewTitle = '【新增】调整单' |
||||
|
this.$nextTick(() => { |
||||
|
this.$refs['form_obj'].clearValidate() |
||||
|
}) |
||||
|
}, |
||||
|
showEdit(row) { |
||||
|
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) |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
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 |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
handleReturn(isreload) { |
||||
|
if (isreload === 'true') this.$emit('reloadlist') |
||||
|
this.formobj = { |
||||
|
"sid": "", |
||||
|
"remarks": "", |
||||
|
"createBySid": "", |
||||
|
"createDate": "", |
||||
|
"createUserSid": "", |
||||
|
"createByName": "", |
||||
|
"checkType": "", |
||||
|
"checkState": "", |
||||
|
"profitCount": "", |
||||
|
"profitAmount": "", |
||||
|
"lossCount": "", |
||||
|
"lossAmount": "", |
||||
|
"useOrgSid": "", |
||||
|
"createOrgName": "", |
||||
|
"createOrgSid": "", |
||||
|
"wmsInventoryCheckbillDetailList": [] |
||||
|
} |
||||
|
this.submitdisabled = false |
||||
|
this.settleVisible = false |
||||
|
this.$emit('doback') |
||||
|
}, |
||||
|
handleAdd() { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</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); |
||||
|
} |
||||
|
|
||||
|
/deep/ .el-form-item__error { |
||||
|
margin-left: 120px !important; |
||||
|
} |
||||
|
|
||||
|
.titleOne { |
||||
|
padding: 7px; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
/*表格列设置fixed后固定列出现下边框的设置*/ |
||||
|
/deep/ .el-table__fixed { |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
|
||||
|
/*表格列设置fixed后固定列出现下边框的设置*/ |
||||
|
/deep/ .el-table__fixed-right { |
||||
|
height: 100% !important; |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue