fix:优化关联关系

20240912_adapter
chenhc 5 months ago
parent d3fd38b176
commit 03fe475973

@ -93,8 +93,8 @@
<el-table-column label="备注" prop="comment"></el-table-column> <el-table-column label="备注" prop="comment"></el-table-column>
<el-table-column label="操作" width="120px"> <el-table-column label="操作" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">详情</el-button>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button> <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)">删除</el-button>
<!-- <el-button type="text" size="small" @click.native="newDistributionForm(scope.$index, scope.row)">拼箱</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -111,24 +111,31 @@
<el-dialog <el-dialog
:title="formName" :title="formName"
:visible.sync="newSpDistributionVisible" :visible.sync="newSpDistributionVisible"
width="85%" width="45%"
append-to-body append-to-body
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="newSpDistributionVisible" v-if="newSpDistributionVisible"
@close='closeDialog' @close='closeDialog'
> >
<operateRelCode <el-table v-loading="loading" :data="codeArray" style="width: 100%;" max-height="800" height="350"
:closeDialog="closeDialog" border
:orderQuery="idQuery" ref="multipleTable">
></operateRelCode> <el-table-column label="序号" type="index" width="55"></el-table-column>
<el-table-column
label="追溯码"
prop="curCode"
width="280"
show-overflow-tooltip
></el-table-column>
</el-table>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {getList,delRelCode} from "@/api/collect/relCode"; import {getList,delRelCode,getDetailList} from "@/api/collect/relCode";
import {getAdminId, getToken} from '@/utils/auth'; import {getAdminId, getToken} from '@/utils/auth';
import operateRelCode from "@/views/collect/relCode/operateRelCode" import operateRelCode from "@/views/collect/relCode/operateRelCode"
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
@ -155,6 +162,7 @@ export default {
formData: null, formData: null,
total: 0, total: 0,
actDateRange:[], actDateRange:[],
codeArray:[],
scanCode:null, scanCode:null,
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
@ -228,14 +236,23 @@ export default {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
newDistributionForm(index, row) { newDistributionForm(index, row) {
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { this.formName = "码明细";
this.idQuery = row; //
this.formName = "拼箱"; let post = {
this.newSpDistributionVisible = true; batchIdFk: row.id,
} else { page: 1,
this.formName = "新增"; limit: 500
this.newSpDistributionVisible = true; }
} getDetailList(post).then((response) => {
if (response.code == 20000) {
this.codeArray = response.data.list
this.newSpDistributionVisible = true;
} else {
this.$message.error(response.message);
}
}).catch(() => {
});
}, },
closeDialog() { closeDialog() {
this.newSpDistributionVisible = false; this.newSpDistributionVisible = false;

Loading…
Cancel
Save