廖井涛
2025-12-01 d111849e6e78ed02a63661e31c81dadd65f53104
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -15,8 +15,8 @@
let money = ref("")
let otherMoneys = 0
let sumMoney = 0
let takeCare = "注意:请妥善保管好我司的玻璃架,如有丢失或损坏,按1500元只赔偿。谢谢配合!"
let remark = company.deliveryRemark
let takeCare =ref("注意:请妥善保管好我司的玻璃架,如有丢失或损坏,按1500元只赔偿。谢谢配合!")
let remark =ref(company.deliveryRemark)
@@ -39,6 +39,7 @@
  request.post(`/delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
    if(res.code==200){
      console.log(res.data)
      produceList.value = deepClone(res.data)
      for(let i=0;i<produceList.value.length;i++){
        let produceList1= ({
@@ -85,6 +86,18 @@
        }
        produceList1.otherMoney1=otherMoney1
        produceList2.value.push(produceList1)
      }
      for(let j=0;j<produceList2.value.length;j++){
        if(produceList2.value[j].delivery.money.toFixed(0)!==(produceList2.value[j].otherMoneys
            +produceList2.value[j].sumMoney+produceList2.value[j].delivery.freight).toFixed(0)){
          console.log(produceList2.value[j])
          console.log(produceList2.value[j].delivery.money)
          console.log((produceList2.value[j].otherMoneys
              +produceList2.value[j].sumMoney).toFixed(0))
          console.log(produceList2.value[j].delivery.deliveryId)
        }
      }
    }else{
@@ -134,6 +147,13 @@
}
const showSimpleOrderId = ref(true);
// 2. 切换显示状态的函数
const toggleOrderDisplay = () => {
  showSimpleOrderId.value = !showSimpleOrderId.value;
};
defineExpose({
@@ -156,13 +176,16 @@
      <tr  class="title-s">
        <th colspan="2" style="width: 30%"></th>
        <th colspan="5" style="width: 40%;">
          <h4 v-if="!company.showDeliveryCreator" >金华市乐动智能科技有限公司</h4>
          <h3>销售发货单</h3>
        </th>
        <th colspan="2" style="width: 30%;text-align: left;">发货单号:<span>{{itme1.delivery.deliveryId}}</span></th>
      </tr>
      <tr>
        <th style="text-align: left;border:none;" colspan="4">客户名称:<span>{{itme1.delivery.customerName}}</span></th>
        <th style="text-align: left;border:none;" colspan="3">项目名称:<span>{{itme1.delivery.project}}</span></th>
        <th style="text-align: left;border:none;" v-if="itme1.data[0].DeliveryDetail.order.batch!==''" colspan="3">
          项目名称:<span>{{itme1.delivery.project}}({{itme1.data[0].DeliveryDetail.order.batch}})</span></th>
        <th style="text-align: left;border:none;" v-else colspan="3">项目名称:<span>{{itme1.delivery.project}}</span></th>
        <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{itme1.delivery.contacts}}</span></th>
      </tr>
      <tr>
@@ -179,13 +202,14 @@
              <thead>
              <tr v-if="index===0">
                <th style="width: 6%;">序号</th>
                <th style="width: 15%;">楼层编号</th>
                <th style="width: 10%;">楼层编号</th>
                <th style="width: 7%;">箱号</th>
                <th style="width: 17%;" colspan="1">宽X高</th>
                <th style="width: 10%;">数量</th>
                <th style="width: 10%;">面积</th>
                <th style="width: 10%;">单价</th>
                <th style="width: 12%;">金额</th>
                <th style="width: 20%;" colspan="2">加工要求</th>
                <th style="width: 18%;" colspan="2">加工要求</th>
              </tr>
@@ -193,14 +217,21 @@
              <tr>
                <td style="font-size: 15px;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
                <td v-if="company.showDeliveryCreator" style="font-size: 15px;text-align: left" colspan="2">订货日期:<span>{{item.DeliveryDetail.order.contractId}}</span></td>
                <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" v-show="showSimpleOrderId"
                    @dblclick="toggleOrderDisplay" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
                <td style="font-size: 15px;text-align: left" v-show="!showSimpleOrderId"
                    @dblclick="toggleOrderDisplay" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}({{item.DeliveryDetail.order.batch}})</span></td>
              </tr>
              <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
                <td>{{items.order_number}}</td>
                <td>{{items.buildingNumber}}</td>
                <td colspan="1" style="font-size: 15px;font-weight: bold;" v-if="items.other_columns!=null&&(JSON.parse(items.other_columns).S02!=null)">{{JSON.parse(items.other_columns).S02}}</td>
                <td colspan="1" style="font-size: 15px;font-weight: bold;" v-else>{{items.width}}x{{items.height}}</td>
                <td >{{items.buildingNumber}}</td>
                <td >{{items.box_no}}</td>
<!--                <td colspan="1" style="font-size: 15px;font-weight: bold;" v-if="items.other_columns!=null&&(JSON.parse(items.other_columns).S02!=null && company.companyName==='金华福喜天成玻璃有限公司')">{{JSON.parse(items.other_columns).S02}}</td>-->
                <td colspan="1" style="font-size: 15px;font-weight: bold;" >
                  {{items.other_columns!=null&&(JSON.parse(items.other_columns).S02!=null )?"("+JSON.parse(items.other_columns).S02+")":''}}
                  {{items.width}}x{{items.height}}
                </td>
                <td>{{items.quantity}}</td>
                <td>{{items.area}}</td>
                <td>{{items.price}}</td>
@@ -208,7 +239,7 @@
                <td colspan="2">{{items.processingNote}}</td>
              </tr>
              <tr class="day-in" >
                <td style="font-size: 15px;" colspan="3">小计:</td>
                <td style="font-size: 15px;" colspan="4">小计:</td>
                <td>{{item.DeliveryDetail.quantity}}</td>
                <td>{{item.DeliveryDetail.area}}</td>
                <td></td>
@@ -218,7 +249,7 @@
            </template>
            <tr class="day-in">
              <td style="font-size: 15px;" colspan="3">合计:</td>
              <td style="font-size: 15px;" colspan="4">合计:</td>
              <td>{{itme1.delivery.quantity}}</td>
              <td>{{itme1.delivery.area}}</td>
              <td></td>
@@ -228,10 +259,10 @@
            <tr class="day-in">
              <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="4">
                <div style="display: flex;font-size: 10px;text-align: center;">
                  <span style="width: 25%">加工费用</span>&nbsp;
                  <span  style="width: 25%">单价</span>&nbsp;
                  <span  style="width: 25%">数量</span>&nbsp;
                  <span  style="width: 25%">金额</span>
                  <span style="width: 25%;font-weight: bold;font-size: 12px">加工费用</span>&nbsp;
                  <span  style="width: 25%;font-weight: bold;font-size: 12px">单价</span>&nbsp;
                  <span  style="width: 25%;font-weight: bold;font-size: 12px">数量</span>&nbsp;
                  <span  style="width: 25%;font-weight: bold;font-size: 12px">金额</span>
                </div>
              </td>
              <td style="text-align: left;border:none;font-size: 15px;" colspan="5">总金额:&nbsp;&nbsp;&nbsp;&nbsp;{{itme1.delivery.money}}</td>
@@ -286,8 +317,8 @@
            </tr>
            <tr class="day-in" style="border: 0;">
              <td colspan="9" style="border: 0;">
                <div style="display:flex;text-align: left" class="bottom" v-for="item in  remark">
                  {{item}}
                <div style="display:flex;text-align: left;border: 0;margin-top: 10px " class="bottom" >
                  <el-input type="textarea" :autosize="{ minRows: 7, maxRows: 20 }" v-model="remark"/>
                </div>
              </td>
@@ -317,151 +348,7 @@
    </table>
    <!--    <table border="1" >
      <thead>
      <tr class="title-s">
        <th colspan="13">
          <h1>
            {{company.companyName}}
          </h1>
        </th>
      </tr>
      <tr  class="title-s">
        <th colspan="2"></th>
        <th colspan="5">
          <h3>销售发货单</h3>
        </th>
        <th colspan="2" style="text-align: left;">发货单号:<span>{{delivery.deliveryId}}</span></th>
      </tr>
      <tr>
        <th style="text-align: left;border:none;" colspan="4">客户名称:<span>{{delivery.customerName}}</span></th>
        <th style="text-align: left;border:none;" colspan="3">项目名称:<span>{{delivery.project}}</span></th>
        <th style="text-align: left;border:none;" colspan="2">联系人:<span>{{delivery.contacts}}</span></th>
      </tr>
      <tr>
        <th style="text-align: left;border:none;" colspan="7">送货地址:<span>{{delivery.deliveryAddress}}</span></th>
        <th style="text-align: left;border:none;" colspan="2">联系电话:<span>{{delivery.contactNumber}}</span></th>
      </tr>
      <tr>
        <th style="width: 6%;">序号</th>
        <th style="width: 20%;">楼层编号</th>
        <th style="width: 20%;" colspan="2">宽X高</th>
        <th style="width: 10%;">数量</th>
        <th style="width: 10%;">面积</th>
        <th style="width: 10%;">单价</th>
        <th style="width: 12%;">金额</th>
        <th style="width: 12%;" colspan="2">加工要求</th>
      </tr>
      </thead>
      <template v-for="(item, index) in produceList" :key="index" >
        <tr>
          <td style="font-size: 15px;text-align: left" colspan="4">产品名称:<span>{{item.DeliveryDetail.orderDetail.productName}}</span></td>
          <td style="font-size: 15px;text-align: left" colspan="3">对方单号:</td>
          <td style="font-size: 15px;text-align: left" colspan="3">订单编号:<span>{{item.DeliveryDetail.orderDetail.orderId}}</span></td>
        </tr>
        <tr class="day-in" v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
          <td>{{items.order_number}}</td>
          <td>{{items.buildingNumber}}</td>
          <td colspan="2" style="font-size: 15px;font-weight: bold;">{{items.width}}x{{items.height}}</td>
          <td>{{items.quantity}}</td>
          <td>{{items.area}}</td>
          <td>{{items.price}}</td>
          <td>{{items.money}}</td>
          <td colspan="2">{{items.processingNote}}</td>
        </tr>
        <tr class="day-in" >
          <td style="font-size: 15px;" colspan="4">小计:</td>
          <td>{{item.DeliveryDetail.quantity}}</td>
          <td>{{item.DeliveryDetail.area}}</td>
          <td></td>
          <td>{{item.DeliveryDetail.money}}</td>
          <td></td>
        </tr>
      </template>
      <tr class="day-in">
        <td style="font-size: 15px;" colspan="4">合计:</td>
        <td>{{delivery.quantity}}</td>
        <td>{{delivery.area}}</td>
        <td></td>
        <td>{{delivery.money-otherMoneys-delivery.freight}}</td>
        <td></td>
      </tr>
      <tr class="day-in">
        <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6" colspan="4">
          <div style="display: flex;font-size: 10px;text-align: center;">
            <div style="width: 25%">加工费用</div>
            <div  style="width: 25%">单价</div>
            <div  style="width: 25%">数量</div>
            <div  style="width: 25%">金额</div>
          </div>
        </td>
        <td style="text-align: left;border:none;font-size: 15px;" colspan="5">总金额:&nbsp;&nbsp;&nbsp;&nbsp;{{delivery.money}}</td>
      </tr>
      <tr class="day-in">
        <td style="text-align: left;border-width: 0 1px 0 0; border-style: solid; border-color: #d3dce6;" colspan="4" >
          <div style="display: flex;font-size: 10px;text-align: center" v-for="(item, index2) in otherMoney" :key="index2">
            <div style="width: 25%">{{item.DeliveryDetailOtherMoney.alias}}</div>
            <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.price}}</div>
            <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.count}}</div>
            <div  style="width: 25%">{{item.DeliveryDetailOtherMoney.monery}}</div>
          </div>
          <div style="display: flex;font-size: 10px;text-align: center" v-if="delivery.freight>0">
            <div style="width: 25%">运费</div>
            <div  style="width: 25%">{{delivery.freightPrice}}</div>
            <div  style="width: 25%">{{delivery.freightQuantity}}</div>
            <div  style="width: 25%">{{delivery.freight}}</div>
          </div>
        </td>
        <td style="text-align: left;border:none;font-size: 15px;" colspan="5">大写金额:&nbsp;&nbsp;&nbsp;&nbsp;{{money}}</td>
      </tr>
      <tfoot style="border: 0">
      &lt;!&ndash;      <el-row :gutter="24">
              <el-col :span="4"><div style="font-size: 12px" class="bottom">制单员:{{data.order.creator}}<span style="font-size: 10px"></span></div></el-col>
              <el-col :span="6"><div style="font-size: 12px" class="bottom">制单日期:{{data.order.createTime}}<span style="font-size: 10px"></span></div></el-col>
              <el-col :span="4"><div style="font-size: 12px" class="bottom">审核员:{{data.order.verifier}}</div></el-col>
              <el-col :span="6"><div style="font-size: 12px" class="bottom">审核日期:{{data.order.updateTime}}</div></el-col>
              <el-col :span="4"><div style="font-size: 12px" class="bottom">打印人:{{username}}</div></el-col>
            </el-row>&ndash;&gt;
      <tr class="day-in" style="border: 0;">
        <td colspan="9" style="border: 0;">
          <div style="display:flex;">
            <div style="width: 15%">制单员:{{ delivery.creator }}</div>
            <div style="width: 25%">制单日期:{{ delivery.createTime }}</div>
            <div style="width: 10%">发货员:</div>
            <div style="width: 10%">司机:</div>
            <div style="width: 15%">客户签字:</div>
            <div style="width: 15%">签收日期:</div>
          </div>
        </td>
      </tr>
      <tr>
        <td colspan="9" style="border: 0;">
          <div style="display:flex;" class="bottom">架子&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;只</div>
          <div style="display:flex;" class="bottom">
            {{takeCare}}
          </div>
        </td>
      </tr>
      <tr>
        <td colspan="9" style="border: 0;">
          <div style="display:flex;" class="bottom">
            {{remark}}
          </div>
        </td>
      </tr>
      </tfoot>
    </table>-->
  </div>
@@ -474,11 +361,18 @@
<style scoped>
@media print {
  @page {
    margin: 8mm 16mm 20mm 16mm !important;
    margin: 12mm 10mm 20mm 10mm !important;
  }
  .pages {
    page-break-after: always;
  }
  @page {
    @top-right {
      margin-top: 50px;
      content: "第 " counter(page)  " 页"; /* 使用counter添加页码 */
    }
  }
}
h1,h3{
  left:0;