qq_41295110
2026-01-16 cbc2fe74fb54aad814695982c2987e064696f540
src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
@@ -23,7 +23,7 @@
                </el-col>
                <el-col :span="6">
                    <el-form-item label="工厂代码" prop="HWorksNumber">
                        <el-select v-model="form.HWorksNumber" placeholder="请选择组织" style="width: 100%">
                        <el-select v-model="form.HWorksNumber" placeholder="请选择工厂" style="width: 100%">
                            <el-option v-for="(item, index) in HWorksNumberList" :key="index" :label="item"
                                :value="item">
                            </el-option>
@@ -51,7 +51,8 @@
                <el-col :span="6">
                    <el-form-item label="选单号" prop="HSourceBillNo">
                        <el-input v-model="form.HSourceBillNo" placeholder="请输入选单号" disabled>
                            <el-button slot="append" icon="el-icon-search" @click="openDataDialog(openNum)"></el-button>
                            <el-button class="input-search-btn" slot="append" icon="el-icon-search"
                                @click="openDataDialog(null)"></el-button>
                        </el-input>
                    </el-form-item>
                </el-col>
@@ -83,7 +84,11 @@
                        </el-table-column>
                        <el-table-column align="center" label="物料代码" prop="HMaterNumber" width="120"
                            show-overflow-tooltip>
                            <template slot-scope="scope"><el-input v-model="scope.row.HMaterNumber" /></template>
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.HMaterNumber"
                                    @keyup.native.f7="openDataDialog(3, scope.row)"
                                    @dblclick.native="openDataDialog(3, scope.row)" />
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="物料名称" prop="HMaterName" width="120"
                            show-overflow-tooltip>
@@ -92,6 +97,22 @@
                        <el-table-column align="center" label="规格型号" prop="HMaterModel" width="120"
                            show-overflow-tooltip>
                            <template slot-scope="scope">{{ scope.row.HMaterModel }}</template>
                        </el-table-column>
                        <el-table-column align="center" label="数量" prop="HQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope">
                                <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
                                    style="width: 100%;" @change="editMainTable(scope.row)" />
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="最小包装数" prop="HMinQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope">
                                <el-input-number v-model="scope.row.HMinQty" :min="0" controls-position="right"
                                    style="width: 100%;" @change="editMainTable(scope.row)" />
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="箱数" prop="HBQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope">{{ scope.row.HBQty }}</template>
                        </el-table-column>
                        <el-table-column align="center" label="客户规格型号" prop="HCusModel" width="120"
                            show-overflow-tooltip>
@@ -126,21 +147,7 @@
                        <el-table-column align="center" label="计划跟踪号" prop="HMTONo" width="120" show-overflow-tooltip>
                            <template slot-scope="scope"><el-input v-model="scope.row.HMTONo" /></template>
                        </el-table-column>
                        <el-table-column align="center" label="数量" prop="HQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope">
                                <el-input-number v-model="scope.row.HQty" :min="0" controls-position="right"
                                    style="width: 100%;" @change="editMainTable(scope.row)" />
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="最小包装数" prop="HMinQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope">
                                <el-input-number v-model="scope.row.HMinQty" :min="0" controls-position="right"
                                    style="width: 100%;" @change="editMainTable(scope.row)" />
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="箱数" prop="HBQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope">{{ scope.row.HBQty }}</template>
                        </el-table-column>
                        <el-table-column align="center" label="外箱数" prop="HPackQty" width="120" show-overflow-tooltip>
                            <template slot-scope="scope"><el-input v-model="scope.row.HPackQty" /></template>
                        </el-table-column>
@@ -186,7 +193,11 @@
                        </el-table-column>
                        <el-table-column align="center" label="辅助属性代码" prop="HAuxPropNumber" width="120"
                            show-overflow-tooltip>
                            <template slot-scope="scope"><el-input v-model="scope.row.HAuxPropNumber" /></template>
                            <template slot-scope="scope">
                                <el-input v-model="scope.row.HAuxPropNumber"
                                    @keyup.native.f7="openDataDialog(1, scope.row)"
                                    @dblclick.native="openDataDialog(1, scope.row)" />
                            </template>
                        </el-table-column>
                        <el-table-column align="center" label="辅助属性名称" prop="HAuxPropName" width="120"
                            show-overflow-tooltip>
@@ -225,7 +236,8 @@
                </el-tab-pane>
                <el-tab-pane label="条码信息" name="tiaoma">
                    <el-table :data="editTmData" style="width: 100%" height="480" width="100%" ref="tbzbTable"
                        @selection-change="handleTableWlxxZbEdit" :row-class-name="tiaomaZbIndex" border v-if="editTmData.length>0">
                        @selection-change="handleTableWlxxZbEdit" :row-class-name="tiaomaZbIndex" border
                        v-if="editTmData.length > 0">
                        <el-table-column align="center" label="序号" type="index" width="80" fixed />
                        <template v-for="(item, index) in tmBtList">
                            <el-table-column align="center" :prop="item.field" :label="item.title" :width="item.width"
@@ -235,7 +247,8 @@
                </el-tab-pane>
                <el-tab-pane label="档案列表" name="dangan">
                    <el-table :data="editDaData" style="width: 100%" height="480" width="100%" ref="dazbTable"
                        @selection-change="handleTableDangan" :row-class-name="danganZbIndex" border v-if="editDaData.length>0">
                        @selection-change="handleTableDangan" :row-class-name="danganZbIndex" border
                        v-if="editDaData.length > 0">
                        <el-table-column type="selection" width="55" align="center" />
                        <el-table-column align="center" label="序号" type="index" width="80" fixed />
                        <template v-for="(item, index) in daBtList">
@@ -254,6 +267,8 @@
        <el-dialog :title="dialogTitle" :visible.sync="openData" width="1280px" append-to-body @close="closeBill">
            <HSourceReportHtml @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName"
                :HOrgID='this.form.HOrgID' :HSouceBillType="HSouceBillType" v-if="ScICMOBillShow" />
            <Material @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="materialShow" />
            <GyProperty @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="propertyShow" />
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="deptClickSub">确 定</el-button>
                <el-button @click="deptClose">取 消</el-button>
@@ -271,10 +286,12 @@
import HSourceReportHtml from '@/views/component/HSourceReportHtml'
import PrintList from "@/views/component/printList";
import moment from 'moment';
import GyProperty from "@/views/basic/gyProperty/gyPropertyList.vue";
import Material from '@/views/gyMaterial/GyMaterial.vue'
export default {
    name: 'Gy_BarCodeBill',
    components: { HSourceReportHtml, PrintList },
    components: { HSourceReportHtml, PrintList, GyProperty, Material },
    props: {
        OperationType: { type: Number, },
        linterid: { type: Number, },
@@ -283,7 +300,7 @@
    },
    data() {
        return {
            rowSel:[],
            rowSel: [],
            HModName: "Gy_BarCodeBill",
            danganSelList: [],
            openPrintList: false,
@@ -449,6 +466,7 @@
            materialShow: false,//物料数据组件
            gyEmployeeShow: false,//销售员数据组件
            ScICMOBillShow: false,
            propertyShow: false,
            deptform: {},//弹窗选中数据
            openData: false,//数据弹窗
            dialogTitle: '',
@@ -521,8 +539,8 @@
        this.getdata()
    },
    methods: {
        closeBill(){
            this.ScICMOBillShow=false
        closeBill() {
            this.ScICMOBillShow = false
        },
        get_PrintReport() {
            if (this.danganSelList.length == 0) {
@@ -530,11 +548,11 @@
            } else {
                this.rowSel = [];
                for (var i = 0; i < this.danganSelList.length; i++) {
                     this.rowSel.push(this.danganSelList[i].HItemID.toString());
                    this.rowSel.push(this.danganSelList[i].HItemID.toString());
                }
                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) => {
@@ -560,7 +578,7 @@
        },
        ToolBatch() {
            if (this.HMinQty2 == 0 && this.HMaterID) {
                axios.get(this.baseURL + '/Sc_BarCode/Batch', {
                axios.get(this.$baseUrl + '/Sc_BarCode/Batch', {
                    params: {
                        "HMaterID": this.HMaterID, "HBatchNo": this.HBatchNo
                    },
@@ -650,7 +668,7 @@
        SaveBarCodeCreate(sMainSub, CampanyName) {
            axios({
                method: 'post',
                url: this.baseURL + "/Sc_BarCode/Sub_SaveBill",
                url: this.$baseUrl + "/Sc_BarCode/Sub_SaveBill",
                data: {
                    "msg": sMainSub, "CampanyName": CampanyName
                },
@@ -683,7 +701,7 @@
        },
        set_HBarCodeType() {
            //获取条码类型代码
            axios.get(this.baseURL + '/Sc_BarCode/GetHBarCodeTypeBill').then(response => {
            axios.get(this.$baseUrl + '/Sc_BarCode/GetHBarCodeTypeBill').then(response => {
                let result = response.data
                if (result.count == 1) {
                    this.HBarCodeTypeList = result.list
@@ -691,7 +709,7 @@
            }).catch(error => {
                this.$modal.msgError("接口请求失败!");
            });
            axios.get(this.baseURL + '/Sc_BarCode/GetHWorksNumberBill').then(response => {
            axios.get(this.$baseUrl + '/Sc_BarCode/GetHWorksNumberBill').then(response => {
                let result = response.data
                if (result.count == 1) {
                    this.HWorksNumberList = result.list
@@ -769,13 +787,41 @@
        //弹窗赋值
        dbEmitData(deptRow, num) {
            console.log(deptRow)
            if (num) {
                if (num == 'gyProperty') {
                    this.editWlxxData[this.zbIndex].HAuxPropID = deptRow.HItemID;
                    this.editWlxxData[this.zbIndex]["HAuxPropName"] = deptRow["辅助属性名称"];
                    this.editWlxxData[this.zbIndex]["HAuxPropNumber"] = deptRow["辅助属性代码"];
                    this.propertyShow = false;
                    this.openData = false;
                } else if (num == 3) {
                    this.editWlxxData = []
                    for (var i = 0; i < deptRow.length; i++) {
                        this.editWlxxData.push({
                            "HMaterID": deptRow[i].HItemID,
                            "HMaterNumber": deptRow[i].物料代码,
                            "HMaterName": deptRow[i].物料名称,
                            "HMaterModel": deptRow[i].规格型号,
                            "HUnitID": deptRow[i].HUnitID,
                            "HUnitNumber": deptRow[i].计量单位代码,
                            "HUnitName": deptRow[i].计量单位,
                            "HAuxQty": 0,
                        })
                    }
                    this.materialShow = false
                    this.openData = false
                }
                return
            }
            if (deptRow.length > 0) {
                this.zbDataShow = false
                this.editWlxxData = []
                var list = []
                var BillSelect = []
                for (var i = 0; i < deptRow.length; i++) {
                    if (deptRow[i].部门 != "" && deptRow[i].部门 != null) {
                    if (!deptRow[i].部门) {
                        list.push(deptRow[i].部门)
                    }
                    BillSelect.push({
@@ -802,7 +848,7 @@
                    //通过选择的源单主子内码查找详细信息
                    axios({
                        method: 'post',
                        url: this.baseURL + "/Sc_BarCode/SelectReportFromBillList",
                        url: this.$baseUrl + "/Sc_BarCode/SelectReportFromBillList",
                        data: {
                            "msg": Str
                        },
@@ -890,7 +936,7 @@
        },
        //根据用户获取对应职员、部门、销售主管
        getCzyglByUser() {
            axios.get(this.baseURL + '/Xs_SeOrderBill/getCzyglByUser', {
            axios.get(this.$baseUrl + '/Xs_SeOrderBill/getCzyglByUser', {
                params: { "CurUserName": sessionStorage["HUserName"] }
            }).then(response => {
                let dataForm = response.data.data[0]
@@ -917,7 +963,7 @@
        handleUpdate() {
            this.reset()
            let rowHmainid = this.linterid
            axios.get(this.baseURL + "/Kf_SellOutBill/cx", {
            axios.get(this.$baseUrl + "/Kf_SellOutBill/cx", {
                params: { 'HInterID': rowHmainid }
            }).then(response => {
                if (response.data.count == 1) {
@@ -1039,8 +1085,9 @@
                                , 'HPOOrderInterID': result.data[i].采购订单内码
                                , 'HPOOrderEntryID': result.data[i].采购订单子内码
                                , 'HPOOrderBillNo': result.data[i].采购订单号
                                , 'HPropertyID': result.data[i].HPropertyID
                                , 'HPropertyName': result.data[i].辅助属性
                                , 'HAuxPropID': result.data[i].HPropertyID
                                , 'HAuxPropName': result.data[i].辅助属性
                                , 'HAuxPropNumber': result.data[i].辅助属性代码
                                , 'HSecUnitID': result.data[i].HSecUnitID
                                , 'HSecUnitName': result.data[i].辅助计量单位
                                , 'HSecUnitRate': result.data[i].换算率
@@ -1067,7 +1114,7 @@
        },
        //根据客户带出联系人、联系电话
        getCustomerByCusID(HCusID) {
            axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
            axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
                params: {
                    HCusID: HCusID
                }
@@ -1185,6 +1232,7 @@
            this.danganSelList = selection
        },
        showReset() {
            this.materialShow = false
            this.ScICMOBillShow = false
        },
        //  打开数据列表弹窗
@@ -1193,13 +1241,34 @@
            if (row) {
                this.zbIndex = row.index - 1
            }
            this.showReset()
            this.HSouceBillType = this.getSupType()
            this.dialogTitle = this.getSupType() + '列表'
            this.ScICMOBillShow = true
            this.openData = true
            if (num) {
                switch (num) {
                    case 1:
                        this.dialogTitle = '辅助属性列表'
                        this.propertyShow = true
                        this.openData = true
                            ; break;
                    case 3:
                        this.dialogTitle = '物料列表'
                        this.materialShow = true
                        this.openData = true
                        break;
                }
            } else {
                this.showReset()
                this.HSouceBillType = this.getSupType()
                this.dialogTitle = this.getSupType() + '列表'
                this.ScICMOBillShow = true
                this.openData = true
            }
        },
    }
};
</script>
</script>
<style>
.input-search-btn {
    background-color: rgb(24, 144, 255) !important;
    color: #fff !important;
}
</style>