wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/purchase/postockInBack/Kf_POStockInBackBillList.vue
@@ -202,42 +202,31 @@
            </el-col>
        </el-row>
        <div class="tableBox" v-loading="loading">
            <el-row>
                <el-col :span="4">
                    <div class="cgtlType" v-for="(item, index) in backTypeList" :key="index" :class="{ 'cgtlActive': typeIndex==index }" @click="backTypeClick(item,index)">
                        {{item.name}}
                    </div>
                </el-col>
                <el-col :span="20">
                    <el-table :data="tableData" ref="tableData" max-height="710" :summary-method="getSummaries"
                        @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick"
                        :row-style="rowStyle" @cell-dblclick="handleDblclick" v-if="tableShow">
                        <template v-for="(item, index) in btList">
                            <el-table-column type="selection" width="55" align="center" :fixed="item.fixed"
                                v-if="item.type == 'checkbox'" :key="index" />
                            <el-table-column :align="item.align" :prop="item.field" :label="item.title"
                                :width="item.width" :key="item.id" v-else-if="!item.hide && item.type != 'checkbox'"
                                :sortable="item.sort" show-overflow-tooltip :fixed="item.fixed">
                                <template slot-scope="{ row, column }">
                                    <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
                                    <div :style="item.style">
                                        <span v-if="column.property.includes('日期')">{{
                                            parseTime(row[column.property], "{y}-{m}-{d}")
                                        }}</span>
                                        <el-button type="text" @click="handleEdit(row, (OperationType = 3))"
                                            v-else-if="column.property == '单据号'">{{ row.单据号 }}</el-button>
                                        <span v-else>{{ row[column.label] }}</span>
                                    </div>
                                </template>
                            </el-table-column>
            <el-table :data="tableData" ref="tableData" max-height="710" :summary-method="getSummaries"
                @selection-change="handleSelectionChange" show-summary border @row-click="handleRowClick"
                :row-style="rowStyle" @cell-dblclick="handleDblclick" v-if="tableShow">
                <template v-for="(item, index) in btList">
                    <el-table-column type="selection" width="55" align="center" :fixed="item.fixed"
                        v-if="item.type == 'checkbox'" :key="index" />
                    <el-table-column :align="item.align" :prop="item.field" :label="item.title" :width="item.width"
                        :key="item.id" v-else-if="!item.hide && item.type != 'checkbox'" :sortable="item.sort"
                        show-overflow-tooltip :fixed="item.fixed">
                        <template slot-scope="{ row, column }">
                            <el-checkbox v-model="checked" v-if="item.type == 'checkbox'"></el-checkbox>
                            <div :style="item.style">
                                <span v-if="column.property.includes('日期')">{{
                                    parseTime(row[column.property], "{y}-{m}-{d}")
                                }}</span>
                                <el-button type="text" @click="handleEdit(row, (OperationType = 3))"
                                    v-else-if="column.property == '单据号'">{{ row.单据号 }}</el-button>
                                <span v-else>{{ row[column.label] }}</span>
                            </div>
                        </template>
                    </el-table>
                    <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize"
                        :pageSizes="pageSizes" @pagination="getList" />
                </el-col>
            </el-row>
                    </el-table-column>
                </template>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize"
                :pageSizes="pageSizes" @pagination="handleQuery" />
            <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body>
                <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
            </el-dialog>
@@ -268,7 +257,7 @@
    components: { RowSettings, Edit, PrintList, BarCodeDetail },
    data() {
        return {
            typeIndex:0,
            typeIndex: 0,
            activeSeach: "",
            HModName: "Kf_StockOutRequestBillList",
            backTypeList: [{ name: ' 采购退料列表(已入库)', value: 1, }, { name: '采购退料列表(未入库)', value: 0, }],
@@ -375,13 +364,10 @@
    created() {
        // this.fetchData()
        this.riqiChange();
        this.getList();
        this.handleQuery();
    },
    methods: {
        backTypeClick(item,index){
            this.typeIndex=index
        },
        getSummaries(param) {
            const { columns, data } = param;
            const sums = [];
@@ -421,7 +407,7 @@
            this.rowHideShow = false;
            this.tableShow = true;
            this.openRowHide = val;
            this.getList();
            this.handleQuery();
        },
        riqiChange() {
            const end = new Date();
@@ -437,18 +423,16 @@
            this.eTime = yyyyE + "-" + mmE + "-" + ddE;
        },
        getList() {
            console.log(this.$route.query.type)
            this.pageSize = 50;
            this.tableShow = false;
            this.loading = true;
            if (this.sTime) {
                this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.sTime + "'";
                this.sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + this.eTime + "'";
            }
            if (this.pageSize == 0) {
                this.pageSize = 50;
            }
            // 列表
            axios.get(this.baseURL + "/Kf_POStockInBackBill/list", {
            axios.get(this.$baseUrl + "/Kf_POStockInBackBill/list", {
                params: {
                    sWhere: this.sWhere,
                    user: sessionStorage["HUserName"],
@@ -551,7 +535,7 @@
        DisPlay_HideColumn(HModName, user, option, dataOption) {
            this.totalNameList = [];
            axios
                .get(this.baseURL + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
                .get(this.$baseUrl + "/Xt_grdAlignment_WMES/grdAlignmentWMESList", {
                    params: {
                        HModName: HModName,
                        user: user,
@@ -797,7 +781,6 @@
            if (this.sTime) {
                this.sTime = moment(this.sTime).format("YYYY-MM-DD");
                this.eTime = moment(this.eTime).format("YYYY-MM-DD");
                console.log(this.sTime, this.eTime);
                this.sWhere +=
                    " and CONVERT(varchar(100),日期, 23) >= '" +
                    this.sTime +
@@ -863,7 +846,7 @@
            };
            this.riqiChange();
            this.resetForm("queryForm");
            this.getList();
            this.handleQuery();
        },
        //退出
@@ -872,7 +855,7 @@
            this.tableShow = true;
            this.openEdit = false;
            this.editShow = false;
            this.getList();
            this.handleQuery();
        },
        //打开新增组件弹窗
        handleAddEdit() {
@@ -891,19 +874,19 @@
            this.open = val;
            this.editShow = false;
            this.openEdit = val;
            this.getList();
            this.handleQuery();
        },
        /** 删除按钮操作 */
        handleDelete() {
            this.$modal.confirm("确认要删除吗,删除后不能恢复").then(() => {
                axios.get(this.baseURL + "/Kf_POStockInBackBill/DeltetKf_POStockInBackBill", {
                axios.get(this.$baseUrl + "/Kf_POStockInBackBill/DeltetKf_POStockInBackBill", {
                    params: {
                        HInterID: this.rowForm.hmainid.toString(),
                        user: sessionStorage["HUserName"],
                    },
                }).then((response) => {
                    if (response.data.count == 1) {
                        this.getList();
                        this.handleQuery();
                        this.$modal.msgSuccess("删除成功");
                    } else {
                        this.$modal.msgError("错误:" + result.code + result.Message);
@@ -915,7 +898,7 @@
        },
        set_CheckBill(num) {
            //逻辑审核方法
            axios.get(this.baseURL + "/Kf_POStockInBackBill/AuditProcessReportList", {
            axios.get(this.$baseUrl + "/Kf_POStockInBackBill/AuditProcessReportList", {
                params: { "HInterID": this.rowForm.hmainid, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] }
            }).then(response => {
                let result = response.data
@@ -933,7 +916,7 @@
        },
        set_CloseBill(num) {
            //逻辑关闭方法
            axios.get(this.baseURL + "/Kf_POStockInBackBill/CloseKf_POStockInBackBill", {
            axios.get(this.$baseUrl + "/Kf_POStockInBackBill/CloseKf_POStockInBackBill", {
                params: { "HInterID": this.rowForm.hmainid, "Type": num, "CurUserName": sessionStorage["HUserName"] }
            }).then(response => {
                let result = response.data
@@ -951,7 +934,7 @@
        },
        set_DropBill(num) {
            //逻辑作废方法
            axios.get(this.baseURL + "/Kf_POStockInBackBill/DropKf_POStockInBackBill", {
            axios.get(this.$baseUrl + "/Kf_POStockInBackBill/DropKf_POStockInBackBill", {
                params: { "HInterID": this.rowForm.hmainid, "Type": num, "CurUserName": sessionStorage["HUserName"] }
            }).then(response => {
                let result = response.data
@@ -974,7 +957,7 @@
            } else {
                this.printListShow = true;
                this.openPrintList = true;
                // axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
                // axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
                //         params: { HInterID: this.rowForm.hmainid },
                //     })
                //     .then((response) => {