陈婷婷
2026-04-03 32d02ad7839e63d0c721de8a2b243f531e5272d0
src/views/logistics/transportGPS/WL_YayBill.vue
@@ -24,6 +24,17 @@
                <el-input v-model="queryParams.HPlateNumber" placeholder="请输入车牌号" @keyup.enter.native="handleQuery"
                    style="width: 120px;" />
            </el-form-item>
            <el-form-item label="发货通知单" prop="HSourceBillNo">
                <el-input v-model="queryParams.HSourceBillNo" placeholder="请输入发货通知单" @keyup.enter.native="handleQuery"
                    style="width: 120px;" />
            </el-form-item>
            <el-form-item label="物流状态" prop="HBillStatus">
                <el-select v-model="queryParams.HBillStatus" placeholder="请选择物流状态">
                    <el-option v-for="(item, index) in HBillStatusList" :key="index" :label="item.Name"
                        :value="item.Name">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="组织" prop="HOrgID">
                <el-select v-model="queryParams.HOrgID" placeholder="请选择组织">
@@ -256,8 +267,9 @@
                </template>
            </el-table>
            <!-- 记录数、页数、当前页 -->
            <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize"
                @pagination="handleQuery" />
            <!-- <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize"
                @pagination="handleQuery" /> -->
            <pagination v-show="total > 0" :total="total" :page.sync="page" :limit.sync="pageSize" :pageSizes="pageSizes" @pagination="getList" />
            <!-- 列设置 -->
            <el-dialog title="隐藏列设置" :visible.sync="openRowHide" width="816px" append-to-body>
                <RowSettings :colName="btResList" :HModName="HModName" @rowEditClose="rowSetClose" v-if="rowHideShow" />
@@ -337,9 +349,9 @@
                        <el-input v-model="fileUploadForm.billNo" disabled />
                    </el-form-item>
                    <el-form-item label="附件">
                        <el-upload class="upload-demo" ref="fileUpload" :action="upload.url + '?updateSupport=' + upload.updateSupport" :on-preview="handleFilePreview"
                        <el-upload class="upload-demo" ref="fileUpload" :headers="upload.headers" action="http://220.189.218.155:9010/File" :on-preview="handleFilePreview"
                            :on-remove="handleFileRemove" :on-change="handleFileChange" :file-list="fileList"  :on-success="handleFileSuccess" :on-error="handleFileError" 
                            :auto-upload="false" :limit="10" :on-exceed="handleFileExceed"
                             :limit="10" :on-exceed="handleFileExceed"
                            accept=".jpg,.png,.jpeg,.pdf,.doc,.docx,.xls,.xlsx,.zip,.rar">
                            <el-button size="small" type="primary">点击上传</el-button>
                            <div slot="tip" class="el-upload__tip">
@@ -361,7 +373,7 @@
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button type="primary" @click="submitFileUpload" :loading="fileUploadLoading">上传</el-button>
                    <!-- <el-button type="primary" @click="submitFileUpload" :loading="fileUploadLoading">上传</el-button> -->
                    <el-button @click="openFileUpload = false">关 闭</el-button>
                </div>
            </el-dialog>
@@ -421,7 +433,7 @@
                // 是否更新已经存在的数据
                updateSupport: 0,
                // 设置上传的请求头部
                // headers: { Authorization: "Bearer " + getToken() },
                 headers: {  'Content-Type': 'multipart/form-data'},
                // 上传的地址
                url: 'http://220.189.218.155:9010/File'
            },
@@ -432,7 +444,17 @@
            copyType: 0,                                          //复制标记。打开编辑组件时,用于区分编辑还是复制
            HInterID: null,
            hPriceTypeList: ['成本价', '结算价'],
            HBillStatusList:[
                {ID: 1, Name: "申请中" },
                {ID: 2, Name: "待供应商确认" },
                {ID: 3, Name: "指定驾驶员、车辆中" },
                {ID: 4, Name: "正在前往始发地" },
                {ID: 5, Name: "提货中" },
                {ID: 6, Name: "准备离厂" },
                {ID: 7, Name: "送货中" },
                {ID: 8, Name: "已签收" },
                {ID: 9, Name: "已核算" },
            ],
            rqsgList: [                                           //日期间隔下拉列表数据
                { label: '今天', value: 0 },
                { label: '近两天', value: 1 },
@@ -519,6 +541,8 @@
                HBillNo: '',
                HPlateNumber: '',
                HInitTimeCycle: 29,
                HSourceBillNo:'',
                HBillStatus:'',
                sTime: '',
                eTime: '',
                HOrgID: sessionStorage["OrganizationID"] - 0,
@@ -535,6 +559,14 @@
                ColContent2: '',
                ColContent: '',
            },
            loading: true,
            tyResList: [],//列表(接口数据)
            btList: [],//表头列表显示
            btResList: [],
            tableData: [],//列表(分页显示)
            dataList: [],
            titleData: [],//不需要显示的字段 可扩展
            pageSizes: [ 50,100, 500, 5000, 50000],
            page: 1,                                                      //page页索引
            pageSize: 0,                                                  //page页面记录数
            total: 0,                                                     //记录合计数
@@ -749,6 +781,12 @@
            if (this.queryParams.HPlateNumber) {
                this.sWhere += " and 车牌号 like '%" + this.queryParams.HPlateNumber + "%'";
            }
            if (this.queryParams.HSourceBillNo) {
                this.sWhere += " and 发货通知单号 like '%" + this.queryParams.HSourceBillNo + "%'";
            }
            if (this.queryParams.HBillStatus) {
                this.sWhere += " and 物流状态 like '%" + this.queryParams.HBillStatus + "%'";
            }
            // if (this.queryParams.HOrgID) {
            //     this.sWhere += " and HOrgID = '" + this.queryParams.HOrgID + "'";
@@ -761,7 +799,7 @@
        //#region 查询
        getList() {
            this.pageSize = 50
            if (this.pageSize == 0) {
                this.pageSize = 50
            }
@@ -769,18 +807,19 @@
            this.loading = true
            console.log("swhere", this.sWhere)
            // 列表查询
            axios.get(this.$baseUrl + '/WLYayBillController/GetListPage', {
            axios.get(this.$baseUrl + '/WLYayBillController/page', {
                params: {
                    "sWhere": this.sWhere,
                    "user": sessionStorage["HUserName"],
                    "page": this.page,
                    "size": this.pageSize
                    "size": this.pageSize,
                    "Type":3321
                },
            }).then(response => {
                this.tyResList = response.data.data//总数据
                let data1 = response.data
                let option = []
                if (data1.code == 1) {
                if (data1.list && data1.list.length > 0) {
                    this.btResList = data1.list             //列表表头数据
                    this.total = data1.count;
                    var data = [];//列字段数据
@@ -1231,11 +1270,11 @@
                            this.totalNameList.push(item)
                        }
                    })
                    if (data1.data[0].HPageSize == 0) {
                        this.pageSize = 50
                    } else {
                        this.pageSize = data1.data[0].HPageSize
                    }
                    // if (data1.data[0].HPageSize == 0) {
                    //     this.pageSize = 50
                    // } else {
                    //     this.pageSize = data1.data[0].HPageSize
                    // }
                    this.tableData = option.data
                    this.tableShow = true
                    this.loading = false
@@ -1473,17 +1512,22 @@
            this.fileList = []
            this.uploadFiles = []
            this.uploadedFileList = []
            this.getUploadedFileList()
            // this.getUploadedFileList()
            this.openFileUpload = true
        },
        handleFileChange(file, fileList) {
            this.uploadFiles = fileList
            console.log(file, fileList)
            // this.uploadFiles = fileList
        },
        handleFileRemove(file, fileList) {
            console.log(file, fileList)
            this.uploadFiles = fileList
        },
        handleFileSuccess(response, file, fileList){
            console.log(file)
                       console.log(response, file, fileList)
        },
          handleFileError(response, file, fileList){
            console.log(response, file, fileList)