陈婷婷
2025-12-03 058e2a67319977a1630e518644d232b14c299da5
采购退料列表(已入库)(未入库)定义
2个文件已修改
297 ■■■■■ 已修改文件
src/views/component/HSourceReportHtml/index.vue 210 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/purchase/postockInBack/Kf_POStockInBackBillList.vue 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/HSourceReportHtml/index.vue
@@ -285,7 +285,7 @@
            if (this.pageSize == 0) {
                this.pageSize = 50;
            }
            if (this.queryParams.HBillStatus &&this.HSouceBillType == '生产订单') {
            if (this.queryParams.HBillStatus && this.HSouceBillType == '生产订单') {
                this.sWhere += " and 状态 = '" + this.queryParams.HBillStatus + "'";
            }
            if (this.HSouceBillType == '生产订单') {
@@ -306,111 +306,117 @@
                    limit: this.pageSize,
                },
            }).then((response) => {
                console.log(response)
                this.tyResList = response.data.data; //总数据
                let data1 = response.data;
                let option = [];
                if (data1.code == 1) {
                    this.btResList = data1.list; //接口表头数据
                    this.total = data1.count;
                    var data = []; //列字段数据
                    var col = [];
                    var totalArray = ["件数"];
                    //给空的数组赋值
                    for (var key in data1.list) {
                        //循序遍历数组
                        data.push({
                            id: data1.list[key].ColmCols,
                            name: data1.list[key].ColmCols,
                            Type: data1.list[key].ColmType,
                        }); //从每个对象中提取数据
                        var patrn = new RegExp(/^h/i);
                        if (patrn.test(data1.list[key].ColmCols)) {
                            this.titleData[key] = data1.list[key].ColmCols;
                        }
                // if (data1.code == 1) {
                this.btResList = data1.list; //接口表头数据
                this.total = data1.count;
                var data = []; //列字段数据
                var col = [];
                var totalArray = ["件数"];
                //给空的数组赋值
                for (var key in data1.list) {
                    //循序遍历数组
                    data.push({
                        id: data1.list[key].ColmCols,
                        name: data1.list[key].ColmCols,
                        Type: data1.list[key].ColmType,
                    }); //从每个对象中提取数据
                    var patrn = new RegExp(/^h/i);
                    if (patrn.test(data1.list[key].ColmCols)) {
                        this.titleData[key] = data1.list[key].ColmCols;
                    }
                    //在列表左边添加勾选框
                    col.push({ type: "checkbox", fixed: "left", totalRowText: "合计" });
                    for (var i = 0; i < data.length; i++) {
                        //遍历data数组重的数据
                        if (this.titleData.indexOf(data[i].name) > -1) {
                            //检查data【i】.name是否在数组中  //计算列
                            col.push({
                                field: data[i].id,
                                title: data[i].name,
                                align: "center",
                                hide: true,
                            }); //隐藏id列
                        } else if (
                            totalArray.indexOf(data[i].name) > -1 ||
                            data[i].Type == "Decimal" ||
                            data[i].Type == "Int32"
                        ) {
                            //计算列
                            col.push({
                                field: data[i].id,
                                title: data[i].name,
                                align: "center",
                                sort: true,
                                totalRow: true,
                                width: 120,
                            });
                        } else {
                            col.push({
                                field: data[i].id,
                                title: data[i].name,
                                align: "center",
                                sort: true,
                                width: 200,
                            });
                        }
                    }
                    option.cols = [col];
                    this.dataList = option;
                    option.data = data1.data;
                    var result = data1.data;
                    option.data = result;
                    switch (this.HSouceBillType) {
                        case '生产订单':
                            this.HModName = "Sc_ICMOBill_3710";
                            break;
                        case '生产汇报单':
                            this.HModName = "Sc_ICMOReportBill_3711";
                            break;
                        case '采购订单':
                            this.HModName = "Cg_POOrderBill_1102";
                            break;
                        case '收料通知单':
                            this.HModName = "Cg_POInStockBill_1103";
                            break;
                        case '委外订单':
                            this.HModName = "WW_EntrustOrderBill_1601";
                            break;
                        case '生产入库单':
                            $("#HProcExchBillNoHidden").show();
                            this.HModName = "ProductInBill_1202";
                            break;
                        case '采购入库单':
                            this.HModName = "POStockInBill_1201";
                            break;
                        case '销售退货':
                            this.HModName = "SellOutBackBill_1247";
                            break;
                        case '生产退料':
                            this.HModName = "MateOutBackBill_1244";
                            break;
                        case '工序流转卡':
                            this.HModName = "ProcessExchangeBill_3772";
                            break;
                        case '销售出库单':
                            this.HModName = "SellOutBill_1205";
                            break;
                        case '领料出库单':
                            this.HModName = "MateOutBill_1204";
                            break;
                    }
                    this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
                }
                //在列表左边添加勾选框
                col.push({ type: "checkbox", fixed: "left", totalRowText: "合计" });
                for (var i = 0; i < data.length; i++) {
                    //遍历data数组重的数据
                    if (this.titleData.indexOf(data[i].name) > -1) {
                        //检查data【i】.name是否在数组中  //计算列
                        col.push({
                            field: data[i].id,
                            title: data[i].name,
                            align: "center",
                            hide: true,
                        }); //隐藏id列
                    } else if (
                        totalArray.indexOf(data[i].name) > -1 ||
                        data[i].Type == "Decimal" ||
                        data[i].Type == "Int32"
                    ) {
                        //计算列
                        col.push({
                            field: data[i].id,
                            title: data[i].name,
                            align: "center",
                            sort: true,
                            totalRow: true,
                            width: 120,
                        });
                    } else {
                        col.push({
                            field: data[i].id,
                            title: data[i].name,
                            align: "center",
                            sort: true,
                            width: 200,
                        });
                    }
                }
                option.cols = [col];
                this.dataList = option;
                if (data1.code == 0) {
                    data1.data = []
                }
                option.data = data1.data;
                var result = data1.data;
                option.data = result;
                switch (this.HSouceBillType) {
                    case '生产订单':
                        this.HModName = "Sc_ICMOBill_3710";
                        break;
                    case '生产汇报单':
                        this.HModName = "Sc_ICMOReportBill_3711";
                        break;
                    case '采购订单':
                        this.HModName = "Cg_POOrderBill_1102";
                        break;
                    case '收料通知单':
                        this.HModName = "Cg_POInStockBill_1103";
                        break;
                    case '委外订单':
                        this.HModName = "WW_EntrustOrderBill_1601";
                        break;
                    case '生产入库单':
                        $("#HProcExchBillNoHidden").show();
                        this.HModName = "ProductInBill_1202";
                        break;
                    case '采购入库单':
                        this.HModName = "POStockInBill_1201";
                        break;
                    case '销售退货':
                        this.HModName = "SellOutBackBill_1247";
                        break;
                    case '生产退料':
                        this.HModName = "MateOutBackBill_1244";
                        break;
                    case '工序流转卡':
                        this.HModName = "ProcessExchangeBill_3772";
                        break;
                    case '销售出库单':
                        this.HModName = "SellOutBill_1205";
                        break;
                    case '领料出库单':
                        this.HModName = "MateOutBill_1204";
                        break;
                }
                this.DisPlay_HideColumn(this.HModName, sessionStorage["HUserName"], option, this.dataList);
                // }
            }).catch((error) => {
                console.log(error)
                this.$modal.msgError("接口请求失败!");
            });
        },
@@ -674,7 +680,7 @@
            if (this.queryParams.HBillNo) {
                this.sWhere += " and 单据号 like '%" + this.queryParams.HBillNo + "%'";
            }
            if (this.queryParams.HProcExchBillNo &&this.HSouceBillType == '生产入库单') {
            if (this.queryParams.HProcExchBillNo && this.HSouceBillType == '生产入库单') {
                this.sWhere += " and 流转卡号 like '%" + this.queryParams.HProcExchBillNo + "%'";
            }
            if (this.queryParams.HDeptName) {
@@ -686,7 +692,7 @@
            if (this.queryParams.PartName) {
                this.sWhere += " and 物料名称 like '%" + this.queryParams.PartName + "%'";
            }
            if (this.queryParams.HBillStatus &&this.HSouceBillType == '生产订单') {
            if (this.queryParams.HBillStatus && this.HSouceBillType == '生产订单') {
                this.sWhere += " and 状态 like '%" + this.queryParams.HBillStatus + "%'";
            }
            if (sessionStorage["Organization"] == "九菱电机" && this.HSouceBillType == '生产订单') {
src/views/purchase/postockInBack/Kf_POStockInBackBillList.vue
@@ -148,7 +148,7 @@
            </el-collapse>
        </el-form>
        <el-row :gutter="10" class="mb8" style="margin-top: 10px">
              <!-- <el-col :span="1.5">
            <!-- <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddEdit((OperationType = 1))"
                    id="btn-Add">新增</el-button>
            </el-col> -->
@@ -202,45 +202,56 @@
            </el-col>
        </el-row>
        <div class="tableBox" v-loading="loading">
            <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>
            <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>
                        </template>
                    </el-table-column>
                </template>
            </el-table>
            <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize"
                :pageSizes="pageSizes" @pagination="getList" />
                    </el-table>
                    <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize"
                        :pageSizes="pageSizes" @pagination="getList" />
                </el-col>
            </el-row>
            <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body>
                <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
            </el-dialog>
            <!-- 编辑 -->
            <el-dialog title="编辑" :visible.sync="openEdit" width="1480px" append-to-body class="xsckdBox"
                @close="close">
                <edit :OperationType="OperationType" :linterid="this.rowForm.hmainid"
                    HSouceBillType="0" :copyType="copyType" @editClose="editClose"
                    v-if="editShow" />
                <edit :OperationType="OperationType" :linterid="this.rowForm.hmainid" HSouceBillType="0"
                    :copyType="copyType" @editClose="editClose" v-if="editShow" />
            </el-dialog>
            <PrintList :linterid="this.rowForm.hmainid" :MyMsg="this.rowForm.hmainid" Type="HPOInStockBill"
                HModName="HPOInStockBill" @rowEditClose="rowSetClose" v-if="printListShow" />
            <BarCodeDetail :visible.sync="barCodeDetailShow" ref="barcodeDetail" />
        </div>
    </div>
</template>
@@ -257,8 +268,10 @@
    components: { RowSettings, Edit, PrintList, BarCodeDetail },
    data() {
        return {
            typeIndex:0,
            activeSeach: "",
            HModName: "Kf_StockOutRequestBillList",
            backTypeList: [{ name: ' 采购退料列表(已入库)', value: 1, }, { name: '采购退料列表(未入库)', value: 0, }],
            organizationList: JSON.parse(sessionStorage.getItem('organizationList')),
            editShow: false,
            openEdit: false,
@@ -366,6 +379,9 @@
    },
    methods: {
        backTypeClick(item,index){
            this.typeIndex=index
        },
        getSummaries(param) {
            const { columns, data } = param;
            const sums = [];
@@ -956,8 +972,8 @@
            if (this.ids.length != 1) {
                this.$modal.msgError("请选择一行数据");
            } else {
                 this.printListShow = true;
                            this.openPrintList = true;
                this.printListShow = true;
                this.openPrintList = true;
                // axios.get(this.baseURL + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
                //         params: { HInterID: this.rowForm.hmainid },
                //     })
@@ -995,4 +1011,15 @@
.xsckdBox .el-date-editor.el-input {
    width: 100%;
}
.cgtlType {
    text-decoration: underline;
    line-height: 36px;
    color: #606266;
    cursor: pointer;
}
.cgtlActive {
    color: blue;
}
</style>