|
|
@ -169,22 +169,22 @@ |
|
|
|
style="width:150%;margin-left: -20%;"> |
|
|
|
<el-form :inline="true" style="margin-top: -30px;"> |
|
|
|
<el-form-item label="外部单号"> |
|
|
|
<el-input v-model="queryParams.params.sourceBillNo" placeholder="" clearable /> |
|
|
|
<el-input v-model="dialogParams.params.sourceBillNo" placeholder="" clearable /> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="入库状态"> |
|
|
|
<el-select v-model="queryParams.params.billState" placeholder="请选择" style="width: 200px;"> |
|
|
|
<el-select v-model="dialogParams.params.billState" placeholder="请选择" style="width: 200px;"> |
|
|
|
<el-option v-for="(item,i) in billStateList" :key="item.sid" :label="item.name" :value="item.sid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="供应商"> |
|
|
|
<el-select v-model="queryParams.params.supplierSid" placeholder="请选择" style="width: 200px;"> |
|
|
|
<el-select v-model="dialogParams.params.supplierSid" placeholder="请选择" style="width: 200px;"> |
|
|
|
<el-option v-for="(item,i) in supplierList" :key="i" :label="item.supplierName" :value="item.sid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="申请时间"> |
|
|
|
<el-date-picker v-model="queryParams.params.inStotageStartTime" type="date" placeholder="选择日期" |
|
|
|
<el-date-picker v-model="dialogParams.params.inStotageStartTime" type="date" placeholder="选择日期" |
|
|
|
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 200px;"> |
|
|
|
</el-date-picker>至 |
|
|
|
<el-date-picker v-model="queryParams.params.inStotageEndTime" type="date" placeholder="选择日期" |
|
|
@ -192,14 +192,14 @@ |
|
|
|
</el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="商品"> |
|
|
|
<el-select v-model="queryParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;"> |
|
|
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.name" :value="item.sid"> |
|
|
|
<el-select v-model="dialogParams.params.goodsSkuSid" placeholder="请选择" style="width: 200px;"> |
|
|
|
<el-option v-for="(item,i) in goodsList" :key="i" :label="item.goodsName" :value="item.sid"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-left: 50px;"> |
|
|
|
<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> |
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch1">查询</el-button> |
|
|
|
<el-button type="primary" size="small" icon="el-icon-refresh" @click="resetQuery1">重置</el-button> |
|
|
|
</el-form-item> |
|
|
|
<!-- <div class="btn" style="text-align: center;margin-bottom: 30px;"> |
|
|
|
<el-button type="primary" size="small" icon="el-icon-search" @click="dosearch">查询</el-button> |
|
|
@ -208,14 +208,14 @@ |
|
|
|
|
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-table :data="billList" border style="width: 100%" @selection-change="selectionLineChangeHandle" |
|
|
|
@row-click="rowItemClick"> |
|
|
|
<el-table :data="billList" border style="width: 100%" @selection-change="handleSelectionChange" ref="main" |
|
|
|
@select-all="mainSelectAll" @select="mainSelect"> |
|
|
|
<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 type="expand"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-table :data="scope.row.goodsLsit" border stripe size="small" :ref="'sub' + scope.$index" |
|
|
|
@select="subSelect" @select-all="subSelectAll"> |
|
|
|
<el-table :data="scope.row.goodsList" border stripe size="small" :ref="'sub' + scope.$index" |
|
|
|
@select="subSelect" @select-all="subSelectAll(scope.$index,$event)"> |
|
|
|
<el-table-column type="selection" width="100" align="center" /> |
|
|
|
<el-table-column prop="goodsCode" label="商品编码" align="center" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="goodsBarCode" label="商品条码" align="center" show-overflow-tooltip /> |
|
|
@ -265,6 +265,7 @@ |
|
|
|
import divAddupShelfRecord from './upShelfAddRecord.vue' |
|
|
|
import { |
|
|
|
// getTypeValueList, |
|
|
|
typeValues, |
|
|
|
choiceSupplierInfo |
|
|
|
} from '@/api/Common/dictcommons' |
|
|
|
export default { |
|
|
@ -327,7 +328,19 @@ |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
name: '' |
|
|
|
"inStotageBillNo": "", |
|
|
|
"sourceBillNo": "", |
|
|
|
"preBillNo": "", |
|
|
|
"warehouseRackName": "", |
|
|
|
"inStotageStartTime": "", |
|
|
|
"inStotageEndTime": "", |
|
|
|
"carrierName": "", |
|
|
|
"waybillNumber": "", |
|
|
|
"goodsSkuSid": "", |
|
|
|
"supplierSid": "", |
|
|
|
"menuUrl": "", |
|
|
|
"orgPath": "", |
|
|
|
"userSid": "" |
|
|
|
} |
|
|
|
}, |
|
|
|
sids: [], |
|
|
@ -337,24 +350,24 @@ |
|
|
|
goodsDetailList: [], |
|
|
|
billRemarks: {}, |
|
|
|
operationList: [], |
|
|
|
billStateList: [{ |
|
|
|
name: "在途", |
|
|
|
sid: "0" |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "部分收货", |
|
|
|
sid: "1" |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "收货完成", |
|
|
|
sid: "2" |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: "关闭", |
|
|
|
sid: "3" |
|
|
|
billStateList: [], |
|
|
|
billList: [], |
|
|
|
subIds: [], |
|
|
|
dialogParams: { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
"sourceBillNo": "", |
|
|
|
"inStotageStartTime": "", |
|
|
|
"inStotageEndTime": "", |
|
|
|
"goodsSkuSid": "", |
|
|
|
"supplierSid": "", |
|
|
|
"menuUrl": "", |
|
|
|
"orgPath": "", |
|
|
|
"userSid": "" |
|
|
|
} |
|
|
|
], |
|
|
|
billList: [] |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
@ -367,18 +380,18 @@ |
|
|
|
methods: { |
|
|
|
|
|
|
|
init() { |
|
|
|
var query = { |
|
|
|
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
|
|
} |
|
|
|
// req2.warehouserackListAll(query).then((res) => { |
|
|
|
// if (res.success) { |
|
|
|
// this.warehouseRackList = res.data |
|
|
|
|
|
|
|
// console.log("aaaaaa", this.warehouseRackList); |
|
|
|
typeValues({ |
|
|
|
type: 'receiveState' |
|
|
|
}).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.billStateList = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// } |
|
|
|
// }) |
|
|
|
req3.getGoodsListAllByOrg(query).then((res) => { |
|
|
|
req3.getGoodsListAllByOrg({ |
|
|
|
orgPath: window.sessionStorage.getItem('orgSidPath') |
|
|
|
}).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.goodsList = res.data |
|
|
|
} |
|
|
@ -516,14 +529,29 @@ |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
name: '' |
|
|
|
"inStotageBillNo": "", |
|
|
|
"sourceBillNo": "", |
|
|
|
"preBillNo": "", |
|
|
|
"warehouseRackName": "", |
|
|
|
"inStotageStartTime": "", |
|
|
|
"inStotageEndTime": "", |
|
|
|
"carrierName": "", |
|
|
|
"waybillNumber": "", |
|
|
|
"goodsSkuSid": "", |
|
|
|
"supplierSid": "", |
|
|
|
"menuUrl": "", |
|
|
|
"orgPath": "", |
|
|
|
"userSid": "" |
|
|
|
} |
|
|
|
} |
|
|
|
this.loadList() |
|
|
|
}, |
|
|
|
toAdd() { |
|
|
|
|
|
|
|
req.getReservationBill(window.sessionStorage.getItem('orgSidPath')).then((resp) => { |
|
|
|
this.dialogParams.params.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.dialogParams.params.orgPath = window.sessionStorage.getItem('orgSidPath') |
|
|
|
this.dialogParams.params.menuUrl = this.$route.path |
|
|
|
req.getReservationBill(this.dialogParams).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.billList = resp.data |
|
|
|
this.dialogVisible = true |
|
|
@ -567,12 +595,183 @@ |
|
|
|
this.$store.dispatch('tagsView/delView', this.$route) |
|
|
|
this.$router.go(-1) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
|
|
|
|
handleSelectionChange() { |
|
|
|
|
|
|
|
}, |
|
|
|
//主table全选 |
|
|
|
mainSelectAll(selection) { |
|
|
|
console.log("selection", selection) |
|
|
|
var datas = this.$refs.main.data; |
|
|
|
datas.forEach((item, index) => { |
|
|
|
|
|
|
|
this.$refs['main'].toggleRowExpansion(item, true) |
|
|
|
|
|
|
|
item.check = selection.length != 0 |
|
|
|
|
|
|
|
item.goodsList.forEach((childItem) => { |
|
|
|
childItem.check = selection.length != 0 |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[`sub${index}`].toggleRowSelection(childItem, selection.length != 0); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
//主table的单选 |
|
|
|
mainSelect(selection, row) { |
|
|
|
console.log("selection", selection) |
|
|
|
console.log("row", row) |
|
|
|
|
|
|
|
const selectIndex = this.billList.findIndex((choose) => choose.sid == row.sid) |
|
|
|
let selected = selection.length && selection.indexOf(row) !== -1; |
|
|
|
//为true时选中,为 0 时(false)未选中 |
|
|
|
|
|
|
|
row.check = selected |
|
|
|
this.$refs['main'].toggleRowExpansion(this.billList[selectIndex], true) |
|
|
|
this.$refs.main.toggleRowSelection(this.billList[selectIndex], selected) |
|
|
|
|
|
|
|
row.goodsList.forEach((childItem) => { |
|
|
|
|
|
|
|
childItem.check = selected |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[`sub${selectIndex}`].toggleRowSelection(childItem, selected); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//子表格勾选 --->联动一级表格 |
|
|
|
subSelectAll(pIndex, selection) { |
|
|
|
console.log("pIndex", pIndex) |
|
|
|
console.log("selection", selection) |
|
|
|
|
|
|
|
let selected = selection.length != 0; |
|
|
|
//为true时选中,为 0 时(false)未选中 |
|
|
|
|
|
|
|
this.$refs.main.toggleRowSelection(this.billList[pIndex], selected) |
|
|
|
|
|
|
|
selection.forEach((childItem) => { |
|
|
|
this.$refs[`sub${pIndex}`].toggleRowSelection(childItem, selected); |
|
|
|
childItem.check = selected |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//子table单选 |
|
|
|
subSelect(selection, row) { |
|
|
|
|
|
|
|
console.log("row", row) |
|
|
|
console.log("selection", selection) |
|
|
|
let selected = selection.length && selection.indexOf(row) !== -1; |
|
|
|
row.check = selected |
|
|
|
|
|
|
|
if (selection.length == 0) { |
|
|
|
const selectIndex = this.billList.findIndex((choose) => choose.sid == row.billSid) |
|
|
|
this.$refs.main.toggleRowSelection(this.billList[selectIndex], false) |
|
|
|
this.billList[selectIndex].check = false |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
dosearch1() { |
|
|
|
// console.log(" dosearch1", this.selectList); |
|
|
|
|
|
|
|
this.dialogParams.current = 1 |
|
|
|
this.toAdd() |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
resetQuery1() { |
|
|
|
|
|
|
|
this.dialogParams = { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
"sourceBillNo": "", |
|
|
|
"inStotageStartTime": "", |
|
|
|
"inStotageEndTime": "", |
|
|
|
"goodsSkuSid": "", |
|
|
|
"supplierSid": "", |
|
|
|
"menuUrl": "", |
|
|
|
"orgPath": "", |
|
|
|
"userSid": "" |
|
|
|
} |
|
|
|
} |
|
|
|
this.toAdd() |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
handleClose() { |
|
|
|
this.dialogParams = { |
|
|
|
current: 1, |
|
|
|
size: 10, |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
"sourceBillNo": "", |
|
|
|
"inStotageStartTime": "", |
|
|
|
"inStotageEndTime": "", |
|
|
|
"goodsSkuSid": "", |
|
|
|
"supplierSid": "", |
|
|
|
"menuUrl": "", |
|
|
|
"orgPath": "", |
|
|
|
"userSid": "" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
var datas = this.$refs.main.data; |
|
|
|
this.$refs[`main`].clearSelection() |
|
|
|
datas.forEach((item, index) => { |
|
|
|
item.check = false |
|
|
|
this.$refs['main'].toggleRowExpansion(item, true) |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs[`sub${index}`].clearSelection() |
|
|
|
}) |
|
|
|
item.goodsList.forEach((childItem) => { |
|
|
|
childItem.check = false |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
saveData() { |
|
|
|
|
|
|
|
this.subIds = [] |
|
|
|
var datas = this.$refs.main.data; |
|
|
|
datas.forEach((item, index) => { |
|
|
|
item.goodsList.forEach((childItem) => { |
|
|
|
if (childItem.check && Number(childItem.unInStorageNum) != 0) { |
|
|
|
this.subIds.push(childItem.goodsSid) |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log(" dosearch1", this.subIds); |
|
|
|
|
|
|
|
req.createInStorageBill(this.subIds).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.dialogVisible = false |
|
|
|
this.loadList() |
|
|
|
} else {} |
|
|
|
}).catch(() => {}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|