陈婷婷
2 天以前 c9bd26c6cdac80e94e79da47c5113d95ba6e726f
运单列表打印功能
1个文件已添加
4个文件已修改
438 ■■■■■ 已修改文件
.env.development 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/static/grf/出运单.grf 375 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/printList/barcode.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/component/printList/hBarPlanPrint.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/logistics/transportGPS/WL_YayBill.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -6,15 +6,15 @@
# æ™ºäº‘迈思L-MOM管理系统/开发环境
# VUE_APP_BASE_API = http://localhost:81/API/
# VUE_APP_BASE_API = 'http://47.96.97.237/API/'
VUE_APP_BASE_API = 'http://47.96.97.237/API/'
# VUE_APP_BASE_API = 'http://220.189.218.155:9010/API/'
# VUE_APP_BASE_API = 'http://localhost:8082/LuBaoAPI/'
#锦隆
# VUE_APP_BASE_API_INNER = http://192.168.1.11/API/
# VUE_APP_BASE_API = http://61.174.29.234:8880/API/
# å®æ³¢ å››ç»´å°”
VUE_APP_BASE_API_INNER = http://192.168.0.236:9010/API/
VUE_APP_BASE_API = http://220.189.218.155:9010/API/
# VUE_APP_BASE_API_INNER = http://192.168.0.236:9010/API/
# VUE_APP_BASE_API = http://220.189.218.155:9010/API/
#杜贺
# VUE_APP_BASE_API = http://localhost:8082/API/
# å†…网地址测试
public/static/grf/³öÔ˵¥.grf
New file
@@ -0,0 +1,375 @@
{
    "Version":"6.8.2.2",
    "Title":"1a.简单表格",
    "Author":"锐浪报表软件",
    "Description":"演示一个最基本的列表报表。",
    "Font":{
        "Name":"宋体",
        "Size":90000,
        "Weight":400,
        "Charset":134
    },
    "Printer":{
        "TopMargin":1.5,
        "BottomMargin":1.5
    },
    "DetailGrid":{
        "CenterView":true,
        "PrintAdaptMethod":"ResizeToFit",
        "Recordset":{
            "Field":[
                {
                    "Name":"单据号"
                },
                {
                    "Name":"物料代码"
                },
                {
                    "Name":"物料名称"
                },
                {
                    "Name":"物料数量",
                    "DBFieldName":"数量"
                },
                {
                    "Name":"始发地"
                },
                {
                    "Name":"日期",
                    "Type":"DateTime",
                    "Format":"yyyy//MM//mm"
                },
                {
                    "Name":"目的地"
                },
                {
                    "Name":"运输类型"
                },
                {
                    "Name":"司机"
                },
                {
                    "Name":"车型"
                },
                {
                    "Name":"车牌号"
                },
                {
                    "Name":"客户"
                },
                {
                    "Name":"提货地址"
                },
                {
                    "Name":"到货地址"
                },
                {
                    "Name":"承运商"
                }
            ]
        },
        "Column":[
            {
                "Name":"单据号",
                "Width":2.77813
            },
            {
                "Name":"物料代码",
                "Width":2.80458
            },
            {
                "Name":"物料名称",
                "Width":2.61938
            },
            {
                "Name":"规格型号",
                "Width":4.84188
            },
            {
                "Name":"Column1",
                "Width":3.96875
            },
            {
                "Name":"Column2",
                "Width":2.77813
            },
            {
                "Name":"Column3",
                "Width":2.77813
            }
        ],
        "ColumnContent":{
            "Height":1.00542,
            "ColumnContentCell":[
                {
                    "Column":"单据号",
                    "TextAlign":"MiddleCenter",
                    "DataField":"运输类型"
                },
                {
                    "Column":"物料代码",
                    "TextAlign":"MiddleCenter",
                    "DataField":"物料代码"
                },
                {
                    "Column":"物料名称",
                    "TextAlign":"MiddleCenter",
                    "DataField":"物料名称"
                },
                {
                    "Column":"规格型号",
                    "TextAlign":"MiddleCenter",
                    "DataField":"物料数量"
                },
                {
                    "Column":"Column1",
                    "DataField":"客户"
                },
                {
                    "Column":"Column2",
                    "DataField":"提货地址"
                },
                {
                    "Column":"Column3",
                    "DataField":"到货地址"
                }
            ]
        },
        "ColumnTitle":{
            "BackColor":"C0C0C0",
            "Height":0.608542,
            "Font":{
                "Name":"宋体",
                "Size":90000,
                "Bold":true,
                "Charset":134
            },
            "RepeatStyle":"OnPage",
            "ColumnTitleCell":[
                {
                    "GroupTitle":false,
                    "Column":"单据号",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"运输类型"
                },
                {
                    "GroupTitle":false,
                    "Column":"物料代码",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"物料代码"
                },
                {
                    "GroupTitle":false,
                    "Column":"物料名称",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"物料名称"
                },
                {
                    "GroupTitle":false,
                    "Column":"规格型号",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"物料数量"
                },
                {
                    "GroupTitle":false,
                    "Column":"Column1",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"客户"
                },
                {
                    "GroupTitle":false,
                    "Column":"Column2",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"提货地址"
                },
                {
                    "GroupTitle":false,
                    "Column":"Column3",
                    "BackColor":"FFFFFF",
                    "TextAlign":"MiddleCenter",
                    "Text":"到货地址"
                }
            ]
        }
    },
    "ReportHeader":[
        {
            "Height":2.98979,
            "Control":[
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox1",
                    "Center":"Horizontal",
                    "Left":6.29708,
                    "Top":0.79375,
                    "Width":3.41313,
                    "Height":0.582083,
                    "Font":{
                        "Name":"宋体",
                        "Size":150000,
                        "Bold":true,
                        "Charset":134
                    },
                    "TextAlign":"MiddleCenter",
                    "Text":"出运单"
                },
                {
                    "Type":"MemoBox",
                    "Name":"MemoBox1",
                    "Top":2.40771,
                    "Width":2.19604,
                    "Height":0.582083,
                    "Text":"发货通知单"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox1",
                    "Left":2.40771,
                    "Top":2.40771,
                    "Width":2.19604,
                    "Height":0.582083,
                    "DataField":"单据号"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox2",
                    "Left":3.99521,
                    "Top":2.40771,
                    "Width":2.61938,
                    "Height":0.582083,
                    "Text":"始发地"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox2",
                    "Left":5.60917,
                    "Top":2.40771,
                    "Width":2.80458,
                    "Height":0.582083,
                    "DataField":"始发地"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox3",
                    "Left":11.0067,
                    "Top":0.79375,
                    "Width":1.79917,
                    "Height":0.582083,
                    "Text":"日期"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox3",
                    "Left":12.409,
                    "Top":0.79375,
                    "Width":2.01083,
                    "Height":0.582083,
                    "DataField":"日期"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox4",
                    "Left":8.20208,
                    "Top":2.40771,
                    "Width":2.19604,
                    "Height":0.582083,
                    "Text":"目的地"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox4",
                    "Left":10.2129,
                    "Top":2.40771,
                    "Width":2.59292,
                    "Height":0.608542,
                    "DataField":"目的地"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox6",
                    "Left":12.409,
                    "Top":2.40771,
                    "Width":1.5875,
                    "Height":0.608542,
                    "Text":"承运商"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox6",
                    "Left":13.9965,
                    "Top":2.40771,
                    "Width":2.01083,
                    "Height":0.582083,
                    "DataField":"承运商"
                },
                {
                    "Type":"Line",
                    "Name":"Line1",
                    "Left":3.99521,
                    "Top":1.5875,
                    "Width":6.61458
                }
            ]
        }
    ],
    "ReportFooter":[
        {
            "Name":"ReportFooter1",
            "Control":[
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox5",
                    "Width":2.59292,
                    "Height":0.396875,
                    "Text":"司机"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox5",
                    "Left":2.59292,
                    "Width":2.4,
                    "Height":0.396875,
                    "DataField":"司机"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox7",
                    "Left":5.00063,
                    "Width":2.19604,
                    "Height":0.396875,
                    "Text":"车型"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox7",
                    "Left":6.40292,
                    "Width":3.20146,
                    "Height":0.396875,
                    "DataField":"车型"
                },
                {
                    "Type":"StaticBox",
                    "Name":"StaticBox8",
                    "Left":8.59896,
                    "Width":2.01083,
                    "Height":0.396875,
                    "Text":"车牌号"
                },
                {
                    "Type":"FieldBox",
                    "Name":"FieldBox8",
                    "Left":10.6098,
                    "Width":1.98438,
                    "Height":0.396875,
                    "DataField":"车牌号"
                }
            ]
        }
    ]
}
src/views/component/printList/barcode.vue
@@ -58,6 +58,7 @@
      return datajson;
    },
    async getPrintData() {
       console.log(this.$route.query.Type)
      // åœ¨å¤§æ‰¹é‡æ‰“印的时候 url长度可能超get允许的长度 åŽç«¯éœ€æŒ‰éœ€æ±‚ æ”¹æˆPOST请求
      let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
      let sql = "";
@@ -84,6 +85,12 @@
        let condition = decodeURI(this.handleMessage.linterid.toString());
        condition = condition.split(',').map(e => `'${e}'`).join(',')
        sql = `exec h_p_GetSPBarCode_Swell N'${condition}'`;
      } else if (this.$route.query.Type == "WL_YayBill") {
        sql = "select * from h_v_WL_YayBilllist where hmainid in(" +
          this.handleMessage.linterid.toString() +
          ") order by hmainid desc";
        console.log(sql)
      }
      try{
        let res =  await axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
@@ -95,6 +102,8 @@
          },
        });
        // å°† æ¸²æŸ“数据 å’Œ æ¨¡æ¿åŠ è½½åˆ°æœ¬åœ°
        console.log(res)
        let result = res.data;
        this.json_data.recordset = result.data;
        this.grfPath = "./static/grf/" + OpenTmp + ".grf";
src/views/component/printList/hBarPlanPrint.vue
@@ -39,6 +39,7 @@
      return datajson;
    },
    ws_both_from_object() {
      console.log(this.$route.query.Type)
      let OpenTmp = decodeURIComponent(this.$route.query.OpenTmp);
      let sql = "";
      if (this.$route.query.Type == "Kf_SellOutBillList") {
@@ -71,12 +72,14 @@
              ) AS t
              GROUP BY CEILING(CAST(t.row_num AS FLOAT) / 2)
              ORDER BY orderid;`;
      } else if (this.$route.query.Type == "Cg_ContractTransportBillMainList") {
        sql = "exec h_p_Cg_ContractTransportBillMainList " +
          this.handleMessage.linterid.toString();
      } else if (this.$route.query.Type == "WL_YayBill") {
        sql = "select * from h_v_WL_YayBilllist where hmainid in(" +
          this.handleMessage.linterid.toString() +
          ") order by hmainid desc";
      }
      axios
        .get(this.$baseUrl + "/CommonModel/searchMethod", {
      this.$nextTick(() => {
        axios.get(this.$baseUrl + "/CommonModel/searchMethod", {
          params: {
            sql: sql,
            user: sessionStorage["HUserName"],
@@ -85,6 +88,7 @@
          },
        })
        .then((response) => {
            console.log(111, OpenTmp, response)
          let result = response.data;
          this.json_data.recordset = result.data;
          //参数具体说明请参考帮助文档中的“WEB报表(B/S报表)->WEB报表客户端->启动参数说明”部分
@@ -103,6 +107,8 @@
          console.log(22222, error);
          this.$modal.msgError("接口请求失败!");
        });
      })
    },
  },
};
src/views/logistics/transportGPS/WL_YayBill.vue
@@ -263,8 +263,8 @@
            </el-dialog>
            <!-- æ‰“印 -->
            <el-dialog title="打印模板选择" :visible.sync="openPrintList" width="800px" append-to-body>
                <PrintList :linterid=this.rowForm.HInterID :MyMsg=this.rowForm.HInterID :Type='HBillType'
                    :HModName="HModName" @rowEditClose="rowSetClose" v-if="printListShow" />
                <PrintList :linterid='printIds' :MyMsg='printIds' :Type='HBillType' :HModName="HBillType"
                    @rowEditClose="rowSetClose" v-if="printListShow" />
                <!-- <div>111</div> -->
            </el-dialog>
@@ -274,7 +274,8 @@
                        <el-input v-model="formVolume.单据号" placeholder="请输入单据号" disabled />
                    </el-form-item>
                    <el-form-item label="零单占用体积">
                        <el-input-number v-model="formVolume.currentVolume"  :placeholder="`零担体积: ${formVolume.零担体积 || 0}`"  />
                        <el-input-number v-model="formVolume.currentVolume"
                            :placeholder="`零担体积: ${formVolume.零担体积 || 0}`" />
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
@@ -344,7 +345,7 @@
            baseURL: process.env.VUE_APP_BASE_API,                //后端接口前缀(后端服务器ip地址)
            HModName: "Cg_ContractTransportBillMainList",
            HBillType: "Cg_ContractTransportBillMainList",
            HBillType: "WL_YayBill",
            OperationType: null,                                  //保存类型(新增1修改3)
            copyType: 0,                                          //复制标记。打开编辑组件时,用于区分编辑还是复制
            HInterID: null,
@@ -445,6 +446,7 @@
            totalNameList: [],                                            // éœ€è¦è®¾ç½®åˆè®¡è¡Œçš„列数组
            tableData: [],                                                // åˆ—表数据。用于table监听事件
            ids: [],                                                      // é€‰ä¸­è¡Œçš„hmainid数组
            printIds: '',                                                   //打印选择Id字段
            single: true,                                                 // å½“选中的行数不为1时为true。用于禁用相关操作
            multiple: true,                                               // å½“选中的行数为0时为true。用于禁用相关操作
            lastSelectedRowIndex: null,                                   // ç”¨äºŽè®°å½•上次点击的行索引
@@ -1175,29 +1177,13 @@
        //#region æ‰“印
        get_PrintReport() {
            if (this.ids.length != 1) {
                this.$modal.msgError("请选择一行数据")
            } else if (this.rowForm.单据状态 != "已审核" && !this.defaintOperationByCompanyName()) {
                this.$modal.msgError("打印失败!原因:单据状态不为'已审核'状态!!");
            if (this.ids.length == 0) {
                this.$modal.msgError("请至少选择一行数据")
            } else {
                axios.get(this.$baseUrl + "/Kf_SellOutBill/CheckSellOutBill_IsExist", {
                    params: { "HInterID": this.rowForm.HInterID }
                }).then(response => {
                    var result = response.data
                    if (result.count == 1) {
                this.printIds = this.ids.join(',')
                        this.printListShow = true
                        this.openPrintList = true
                        // this.$router.push({ path:'/printList', query: { linterid: this.rowForm.hmainid,MyMsg:this.rowForm.hmainid,Type:'Kf_SellOutBillList' }})
                    } else {
                        this.$modal.msgError(result.code + result.Message)
                    }
                }).catch(error => {
                    this.$modal.msgError("接口请求失败!");
                });
            }
            //  var content= ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=Kf_SellOutBillList', 'yes']
        },
        //#endregion