wangyi
2026-01-19 7fb0a8f0ab16c149484bf043754cd10cfa94de2f
src/views/logistics/transportGPS/WL_YayBill.vue
@@ -132,7 +132,7 @@
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-edit" size="mini" :disabled="single"
                    @click="handleEdit(row = rowForm, OperationType = 3)">编辑</el-button>
                    @click="handleEdit(row = rowForm, OperationType = 3, copyType = 0)">编辑</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-document-copy" size="mini" :disabled="single"
@@ -141,6 +141,34 @@
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-delete" size="mini" :disabled="single" @click="handleDelete">删除
                </el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="set_ConfirmBill">供应商确认</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="set_ConfirmOtherBill(1)">到厂确认</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="set_ConfirmOtherBill(2)">提货确认</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="set_ConfirmOtherBill(3)">出厂运输确认</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="set_ConfirmOtherBill(4)">到货签收确认</el-button>
            </el-col>
            <!-- <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="set_CheckBill(0, form = rowForm)">分配司机</el-button>
            </el-col> -->
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-circle-check" size="mini" :disabled="single"
                    @click="handleVolume(rowForm)">维护零单占用体积</el-button>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-edit-outline" size="mini" :disabled="single"
@@ -172,9 +200,9 @@
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-date" size="mini" @click="handleRowHide">隐藏列设置</el-button>
            </el-col>
            <el-col :span="1.5">
            <!-- <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-printer" size="mini" @click="get_PrintReport">打印</el-button>
            </el-col>
            </el-col>
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-printer" size="mini" :disabled="single"
                    @click="get_BarCodeDetail">条码明细</el-button>
@@ -182,7 +210,7 @@
            <el-col :span="1.5">
                <el-button type="primary" icon="el-icon-printer" size="mini" :disabled="single"
                    @click="get_PackStockDetail">包装容器出入库明细</el-button>
            </el-col>
            </el-col>-->
        </el-row>
        <div class="tableBox" v-loading="loading">
            <el-table :data="tableData" ref="tableData" max-height="710" :summary-method="getSummaries"
@@ -228,6 +256,21 @@
                <PrintList :linterid=this.rowForm.HInterID :MyMsg=this.rowForm.HInterID :Type='HBillType'
                    :HModName="HModName" @rowEditClose="rowSetClose" v-if="printListShow" />
                <!-- <div>111</div> -->
            </el-dialog>
            <el-dialog title="维护零单占用体积" :visible.sync="openVolume" width="580px" append-to-body>
                <el-form ref="form" :model="formVolume" :rules="rulesVolume" label-width="130px">
                    <el-form-item label="单据号">
                        <el-input v-model="formVolume.单据号" placeholder="请输入单据号" disabled />
                    </el-form-item>
                    <el-form-item label="零单占用体积">
                        <el-input-number v-model="formVolume.currentVolume" placeholder="请输入零单占用体积" />
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button type="primary" @click="set_HScatteredVolumeList">确 定</el-button>
                    <el-button @click="cancelVolume">取 消</el-button>
                </div>
            </el-dialog>
            <!-- 条码明细 -->
            <BarCodeDetail :visible.sync="barCodeDetailShow" ref="barcodeDetail" />
@@ -304,7 +347,7 @@
            rowHideShow: false,                                   //列设置组件容器显示标记
            barCodeDetailShow: false,                             //条码明细组件容器显示标记
            packStockDetailShow: false,                            //包装容器出入库明细容器显示标记
            openVolume: false,                                    //维护零单占用体积弹窗标记
            // 查询参数
@@ -342,7 +385,8 @@
            lastSelectedRow: null,                                        // 上一次选中的行
            selectedRow: null,                                            // 当前选中的行
            rowForm: {},                                                  // 当选中的只有一行时,更新数据为该选中的行。
            formVolume: {},                                               // 维护零单占用体积表单。
            rulesVolume: {},                                               // 维护零单占用体积表单验证。
            tyResList: [],                                                // 列表数据,用于导出
            titleData: ["HInterID", "HEntryID", "HBillStatus", "HMaterID", "HPreventErrMouldID", "HOrgID"],           // 不需要显示的字段 可扩展
            btResList: [],                                                // 列表表头数据。用于列设置
@@ -512,7 +556,6 @@
            if (this.queryParams.sTime) {
                this.queryParams.sTime = moment(this.queryParams.sTime).format('YYYY-MM-DD')
                this.queryParams.eTime = moment(this.queryParams.eTime).format('YYYY-MM-DD')
                console.log(this.queryParams.sTime, this.queryParams.eTime)
                this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.queryParams.sTime + "'" + " and CONVERT(varchar(100),日期, 23) <= '" + this.queryParams.eTime + "'";
            }
            if (this.queryParams.HBillNo) {
@@ -648,12 +691,129 @@
                        this.$modal.msgError("错误:" + result.code + result.Message);
                    }
                }).catch(error => {
                    console.log(error)
                    this.$modal.msgError("接口请求失败!");
                });
            }).catch(() => { })
        },
        //#endregion
        //#region 承运商确认
        set_ConfirmBill() {
            var confirmMes = "";
            if (this.rowForm["承运商确认时间"] != null) {
                confirmMes = "是否更新承运商确认时间?"
            } else {
                confirmMes = "是否确认承运商确认时间?"
            }
            this.$modal.confirm(confirmMes).then(() => {
                axios.get(this.$baseUrl + "/WLYayBillController/ConfrimBillNo", {
                    params: { 'HInterID': this.rowForm.HInterID.toString(), "IsAudit": 0, 'CurUserName': sessionStorage["HUserName"] }
                }).then(response => {
                    let result = response.data
                    if (result.count == 1) {
                        this.handleQuery()
                        this.$modal.msgSuccess(result.Message)
                    } else {
                        this.$modal.msgError(result.code + result.Message);
                    }
                }).catch(error => {
                    console.log(error)
                    this.$modal.msgError("接口请求失败!");
                });
            }).catch(() => { })
        },
        //#endregion
        //#region 其他确认
        set_ConfirmOtherBill(nums) {
            var confirmMes = "";
            if (nums === 1) {
                confirmMes = "是否确认到厂?"
            }
            else if (nums === 2) {
                confirmMes = "是否确认提货?"
            }
            else if (nums === 3) {
                confirmMes = "是否确认出厂运输?"
            }
            else if (nums === 4) {
                confirmMes = "是否确认到货签收?"
            } else {
                confirmMes = "是否确认承运商确认时间?"
            }
            this.$modal.confirm(confirmMes).then(() => {
                axios.get(this.$baseUrl + "/WLYayBillController/ConfrimOtherBillNo", {
                    params: { 'HInterID': this.rowForm.HInterID.toString(), "IsAudit": nums, 'CurUserName': sessionStorage["HUserName"] }
                }).then(response => {
                    let result = response.data
                    if (result.count == 1) {
                        this.handleQuery()
                        this.$modal.msgSuccess(result.Message)
                    } else {
                        this.$modal.msgError(result.code + result.Message);
                    }
                }).catch(error => {
                    console.log(error)
                    this.$modal.msgError("接口请求失败!");
                });
            }).catch(() => { })
        },
        //#endregion
        //#region 维护零单占用体积
        //#region 维护零单占用体积重置
        resetVolume() {
            this.formVolume = {
                HInterID: 0,
                HEntryID0: 0,
                currentVolume: 0,
                单据号: ''
            }
        },
        //#endregion
        //#region 维护零单占用体积重置
        handleVolume(form) {
            this.resetVolume()
            axios.get(this.$baseUrl + "/WLYayBillController/WL_YayBillDetail", {
                params: { 'HID': form.HInterID }
            }).then(response => {
                console.log(response.data.data.h_v_WL_YayBillEdit)
                // this.formVolume = response.data.data.h_v_WL_YayBillEdit[form.HEntryID-1]
                this.formVolume=form
                this.openVolume = true
            })
        },
        //#endregion
        cancelVolume() {
            this.openVolume = false
            this.resetVolume()
        },
        //#region 维护零单占用体积提交
        set_HScatteredVolumeList() {
            axios.get(this.$baseUrl + "/WLYayBillController/updateBillMEs", {
                params: {
                    'HInterID': this.formVolume.HInterID.toString(),
                    "HEntryID": this.formVolume.HEntryID.toString(),
                    "ScatteredVolume": this.formVolume.currentVolume,
                    'CurUserName': sessionStorage["HUserName"]
                }
            }).then(response => {
                let result = response.data
                if (result.count == 1) {
                    this.handleQuery()
                    this.openVolume = true
                    this.$modal.msgSuccess(result.Message)
                } else {
                    this.$modal.msgError(result.code + result.Message);
                }
            }).catch(error => {
                console.log(error)
                this.$modal.msgError("接口请求失败!");
            });
        },
        //#endregion
        //#endregion
        //#region 审核/反审核
        set_CheckBill(num, form) {
            var InterID = form.hmainid || form.HInterID
@@ -876,7 +1036,7 @@
        get_PrintReport() {
            if (this.ids.length != 1) {
                this.$modal.msgError("请选择一行数据")
            } else if (this.rowForm.状态 != "已审核" && !this.defaintOperationByCompanyName()) {
            } else if (this.rowForm.单据状态 != "已审核" && !this.defaintOperationByCompanyName()) {
                this.$modal.msgError("打印失败!原因:单据状态不为'已审核'状态!!");
            } else {
                axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {