|
|
|
@ -117,15 +117,20 @@
|
|
|
|
|
<el-divider style="margin: 15px"></el-divider>
|
|
|
|
|
<el-table
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
@select="select"
|
|
|
|
|
@select-all="handleAll"
|
|
|
|
|
:header-cell-class-name="leftheaderStyle"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="list"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
highlight-current-row
|
|
|
|
|
border
|
|
|
|
|
@row-click="handleSelectionChange"
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
|
|
|
|
|
<el-table-column
|
|
|
|
|
type="selection"
|
|
|
|
|
:selectable="checkSelection"
|
|
|
|
|
width="55"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="扫码单据类型"
|
|
|
|
@ -245,6 +250,10 @@ export default {
|
|
|
|
|
type: Function,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
checkPreInOrders: {
|
|
|
|
|
type: Array,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -361,8 +370,9 @@ export default {
|
|
|
|
|
resultTotal: 0,
|
|
|
|
|
resultDetailLoading: false,
|
|
|
|
|
resultDetailList: [],
|
|
|
|
|
selectboxs: [],
|
|
|
|
|
selectbox: "",
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
selectbox: [],
|
|
|
|
|
selectRow: null,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
components: {},
|
|
|
|
@ -402,20 +412,23 @@ export default {
|
|
|
|
|
//选入
|
|
|
|
|
combine() {
|
|
|
|
|
this.closeDialogtwo();
|
|
|
|
|
this.$emit("giveselectbox", this.currentRow.billNo);
|
|
|
|
|
this.$emit("giveselectbox", this.selectbox);
|
|
|
|
|
},
|
|
|
|
|
// //选择
|
|
|
|
|
// select(selection,row){
|
|
|
|
|
|
|
|
|
|
// // console.log(row);
|
|
|
|
|
// this.selectboxs.push(row)
|
|
|
|
|
// let nerArr = JSON.parse(JSON.stringify(this.selectboxs))
|
|
|
|
|
// let qwe = nerArr.map(item=>{
|
|
|
|
|
// // 每一项的单号
|
|
|
|
|
// return item.billNo
|
|
|
|
|
// })
|
|
|
|
|
// this.selectbox=qwe
|
|
|
|
|
// },
|
|
|
|
|
//选择框根据已选入判断禁用方法
|
|
|
|
|
checkSelection(row, index) {
|
|
|
|
|
let flag = true;
|
|
|
|
|
if (this.checkPreInOrders.length === 0) {
|
|
|
|
|
flag = true;
|
|
|
|
|
} else {
|
|
|
|
|
if (this.checkPreInOrders.includes(row.billNo)) {
|
|
|
|
|
flag = false;
|
|
|
|
|
} else {
|
|
|
|
|
flag = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return flag;
|
|
|
|
|
},
|
|
|
|
|
//关闭对话框
|
|
|
|
|
closeLocalDialog() {},
|
|
|
|
|
hideSearch() {
|
|
|
|
@ -432,10 +445,21 @@ export default {
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
//多行勾选
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
this.currentRow = val;
|
|
|
|
|
console.log(this.currentRow.billNo);
|
|
|
|
|
this.getOrderDetails();
|
|
|
|
|
let checkboxs = JSON.parse(JSON.stringify(val));
|
|
|
|
|
this.multipleSelection = checkboxs.map((item) => {
|
|
|
|
|
return item.billNo;
|
|
|
|
|
});
|
|
|
|
|
let hebin = [...this.checkPreInOrders, ...this.multipleSelection];
|
|
|
|
|
let boxarry = Array.from(new Set(hebin));
|
|
|
|
|
this.selectbox = boxarry;
|
|
|
|
|
},
|
|
|
|
|
//全选
|
|
|
|
|
handleAll(selection) {
|
|
|
|
|
if(selection.length==0){
|
|
|
|
|
this.$refs.multipleTable.clearSelection()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 获取单据 业务详情、扫码详情、扫码明细
|
|
|
|
|
getOrderDetails() {
|
|
|
|
@ -726,4 +750,5 @@ export default {
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style type="text/scss" lang="scss">
|
|
|
|
|
|
|
|
|
|
</style>
|
|
|
|
|