qq_41295110
2026-01-16 cbc2fe74fb54aad814695982c2987e064696f540
src/views/warehouse/barcodeMaster/Gy_BarCodeBill.vue
@@ -51,7 +51,8 @@
                <el-col :span="6">
                    <el-form-item label="选单号" prop="HSourceBillNo">
                        <el-input v-model="form.HSourceBillNo" placeholder="请输入选单号" disabled>
                            <el-button class="input-search-btn"  slot="append" icon="el-icon-search" @click="openDataDialog(null)"></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>
@@ -93,7 +98,7 @@
                            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"
@@ -189,9 +194,9 @@
                        <el-table-column align="center" label="辅助属性代码" prop="HAuxPropNumber" width="120"
                            show-overflow-tooltip>
                            <template slot-scope="scope">
                            <el-input v-model="scope.row.HAuxPropNumber"
                            @keyup.native.f7="openDataDialog(1, scope.row)"
                            @dblclick.native="openDataDialog(1, scope.row)" />
                                <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"
@@ -231,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"
@@ -241,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">
@@ -260,20 +267,15 @@
        <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" />
                 <GyProperty
                   @deptEmitDb="dbEmitData"
                   @deptEmit="emitData"
                   :openPage="HModName"
                   v-if="propertyShow"
                 />
            <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>
            </div>
        </el-dialog>
        <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
            <PrintList :linterid="rowSel.toString()" :MyMsg="rowSel.toString()" Type="HGy_BarCodeBill"
                HModName="HGy_BarCodeBill" @rowEditClose="rowSetClose" v-if="printListShow" />
            <!-- <div>111</div> -->
        </el-dialog>
@@ -285,10 +287,11 @@
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, GyProperty },
    components: { HSourceReportHtml, PrintList, GyProperty, Material },
    props: {
        OperationType: { type: Number, },
        linterid: { type: Number, },
@@ -297,7 +300,7 @@
    },
    data() {
        return {
            rowSel:[],
            rowSel: [],
            HModName: "Gy_BarCodeBill",
            danganSelList: [],
            openPrintList: false,
@@ -536,8 +539,8 @@
        this.getdata()
    },
    methods: {
        closeBill(){
            this.ScICMOBillShow=false
        closeBill() {
            this.ScICMOBillShow = false
        },
        get_PrintReport() {
            if (this.danganSelList.length == 0) {
@@ -545,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) => {
@@ -575,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
                    },
@@ -665,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
                },
@@ -698,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
@@ -706,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
@@ -783,25 +786,42 @@
        },
        //弹窗赋值
        dbEmitData(deptRow, num) {
            if(num) {
                if(num == 'gyProperty') {
            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
            }
            console.log(deptRow)
            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({
@@ -828,7 +848,7 @@
                    //通过选择的源单主子内码查找详细信息
                    axios({
                        method: 'post',
                        url: this.baseURL + "/Sc_BarCode/SelectReportFromBillList",
                        url: this.$baseUrl + "/Sc_BarCode/SelectReportFromBillList",
                        data: {
                            "msg": Str
                        },
@@ -916,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]
@@ -943,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) {
@@ -1094,7 +1114,7 @@
        },
        //根据客户带出联系人、联系电话
        getCustomerByCusID(HCusID) {
            axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", {
            axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", {
                params: {
                    HCusID: HCusID
                }
@@ -1212,6 +1232,7 @@
            this.danganSelList = selection
        },
        showReset() {
            this.materialShow = false
            this.ScICMOBillShow = false
        },
        //  打开数据列表弹窗
@@ -1220,15 +1241,20 @@
            if (row) {
                this.zbIndex = row.index - 1
            }
            if(num) {
                switch(num) {
                    case 1:
                    this.dialogTitle = '辅助属性列表'
                    this.propertyShow = true
                    this.openData = true
                    ;break;
            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 {
            } else {
                this.showReset()
                this.HSouceBillType = this.getSupType()
                this.dialogTitle = this.getSupType() + '列表'
@@ -1241,8 +1267,8 @@
};
</script>
<style>
    .input-search-btn {
        background-color: rgb(24, 144, 255) !important;
        color: #fff !important;
    }
.input-search-btn {
    background-color: rgb(24, 144, 255) !important;
    color: #fff !important;
}
</style>